ソースを参照

Updated polgyonMesh.ts

Changed the scene to optional and updated the parameter doc
Arthur Fiedler 6 年 前
コミット
5c9c31bc5a
2 ファイル変更3 行追加2 行削除
  1. 2 2
      src/Meshes/polygonMesh.ts
  2. 1 0
      what's new.md

+ 2 - 2
src/Meshes/polygonMesh.ts

@@ -174,10 +174,10 @@ export class PolygonMeshBuilder {
      * Creates a PolygonMeshBuilder
      * @param name name of the builder
      * @param contours Path of the polygon
-     * @param scene scene to add to
+     * @param scene scene to add to when creating the mesh
      * @param earcutInjection can be used to inject your own earcut reference
      */
-    constructor(name: string, contours: Path2 | Vector2[] | any, scene: Scene, earcutInjection = earcut) {
+    constructor(name: string, contours: Path2 | Vector2[] | any, scene?: Scene, earcutInjection = earcut) {
         this.bjsEarcut = earcutInjection;
         this._name = name;
         this._scene = scene;

+ 1 - 0
what's new.md

@@ -133,6 +133,7 @@
 - Added optional alphaFilter parameter to ```CreateGroundFromHeightMap``` to allow for heightmaps to be created that ignore any transparent data ([Postman-nz](https://github.com/Postman-nz))
 - Fixed renormalization of mesh weights to in cleanMatrixWeights function. ([Bolloxim](https://github.com/Bolloxim))
 - Added a validationSkin function to report out any errors on skinned meshes. ([Bolloxim](https://github.com/Bolloxim))
+- PolygonMeshBuilder can be used to generate ```VertexData``` instead of requiring a mesh to be built
 
 
 ### glTF Loader