Selaa lähdekoodia

Merge pull request #7329 from BabylonJS/master

Nightly
David Catuhe 5 vuotta sitten
vanhempi
commit
f110d9ba3e

+ 2 - 2
dist/preview release/babylon.d.ts

@@ -34805,7 +34805,7 @@ declare module BABYLON {
          * Defines that each mesh of the scene should keep up-to-date a map of referencing cloned meshes for fast diposing
          * It will improve performance when the number of mesh becomes important, but might consume a bit more memory
          */
-        useClonedMeshhMap?: boolean;
+        useClonedMeshMap?: boolean;
         /** Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene) */
         virtual?: boolean;
     }
@@ -35530,7 +35530,7 @@ declare module BABYLON {
         /** @hidden */
         readonly useMaterialMeshMap: boolean;
         /** @hidden */
-        readonly useClonedMeshhMap: boolean;
+        readonly useClonedMeshMap: boolean;
         private _externalData;
         private _uid;
         /**

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
dist/preview release/babylon.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 30 - 29
dist/preview release/babylon.max.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
dist/preview release/babylon.max.js.map


+ 4 - 4
dist/preview release/babylon.module.d.ts

@@ -35876,7 +35876,7 @@ declare module "babylonjs/scene" {
          * Defines that each mesh of the scene should keep up-to-date a map of referencing cloned meshes for fast diposing
          * It will improve performance when the number of mesh becomes important, but might consume a bit more memory
          */
-        useClonedMeshhMap?: boolean;
+        useClonedMeshMap?: boolean;
         /** Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene) */
         virtual?: boolean;
     }
@@ -36601,7 +36601,7 @@ declare module "babylonjs/scene" {
         /** @hidden */
         readonly useMaterialMeshMap: boolean;
         /** @hidden */
-        readonly useClonedMeshhMap: boolean;
+        readonly useClonedMeshMap: boolean;
         private _externalData;
         private _uid;
         /**
@@ -105466,7 +105466,7 @@ declare module BABYLON {
          * Defines that each mesh of the scene should keep up-to-date a map of referencing cloned meshes for fast diposing
          * It will improve performance when the number of mesh becomes important, but might consume a bit more memory
          */
-        useClonedMeshhMap?: boolean;
+        useClonedMeshMap?: boolean;
         /** Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene) */
         virtual?: boolean;
     }
@@ -106191,7 +106191,7 @@ declare module BABYLON {
         /** @hidden */
         readonly useMaterialMeshMap: boolean;
         /** @hidden */
-        readonly useClonedMeshhMap: boolean;
+        readonly useClonedMeshMap: boolean;
         private _externalData;
         private _uid;
         /**

+ 2 - 2
dist/preview release/documentation.d.ts

@@ -34805,7 +34805,7 @@ declare module BABYLON {
          * Defines that each mesh of the scene should keep up-to-date a map of referencing cloned meshes for fast diposing
          * It will improve performance when the number of mesh becomes important, but might consume a bit more memory
          */
-        useClonedMeshhMap?: boolean;
+        useClonedMeshMap?: boolean;
         /** Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene) */
         virtual?: boolean;
     }
@@ -35530,7 +35530,7 @@ declare module BABYLON {
         /** @hidden */
         readonly useMaterialMeshMap: boolean;
         /** @hidden */
-        readonly useClonedMeshhMap: boolean;
+        readonly useClonedMeshMap: boolean;
         private _externalData;
         private _uid;
         /**

+ 1 - 1
dist/preview release/packagesSizeBaseLine.json

@@ -1 +1 @@
-{"thinEngineOnly":112431,"engineOnly":149276,"sceneOnly":502475,"minGridMaterial":632856,"minStandardMaterial":757384}
+{"thinEngineOnly":112431,"engineOnly":149276,"sceneOnly":502546,"minGridMaterial":632925,"minStandardMaterial":757453}

+ 4 - 4
dist/preview release/viewer/babylon.module.d.ts

@@ -35876,7 +35876,7 @@ declare module "babylonjs/scene" {
          * Defines that each mesh of the scene should keep up-to-date a map of referencing cloned meshes for fast diposing
          * It will improve performance when the number of mesh becomes important, but might consume a bit more memory
          */
-        useClonedMeshhMap?: boolean;
+        useClonedMeshMap?: boolean;
         /** Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene) */
         virtual?: boolean;
     }
@@ -36601,7 +36601,7 @@ declare module "babylonjs/scene" {
         /** @hidden */
         readonly useMaterialMeshMap: boolean;
         /** @hidden */
-        readonly useClonedMeshhMap: boolean;
+        readonly useClonedMeshMap: boolean;
         private _externalData;
         private _uid;
         /**
@@ -105466,7 +105466,7 @@ declare module BABYLON {
          * Defines that each mesh of the scene should keep up-to-date a map of referencing cloned meshes for fast diposing
          * It will improve performance when the number of mesh becomes important, but might consume a bit more memory
          */
-        useClonedMeshhMap?: boolean;
+        useClonedMeshMap?: boolean;
         /** Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene) */
         virtual?: boolean;
     }
@@ -106191,7 +106191,7 @@ declare module BABYLON {
         /** @hidden */
         readonly useMaterialMeshMap: boolean;
         /** @hidden */
-        readonly useClonedMeshhMap: boolean;
+        readonly useClonedMeshMap: boolean;
         private _externalData;
         private _uid;
         /**

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 6 - 6
dist/preview release/viewer/babylon.viewer.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js


+ 2 - 2
src/Meshes/mesh.ts

@@ -417,7 +417,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
 
             // Source mesh
             this._internalMeshDataInfo._source = source;
-            if (scene.useClonedMeshhMap) {
+            if (scene.useClonedMeshMap) {
                 if (!source._internalMeshDataInfo.meshMap) {
                     source._internalMeshDataInfo.meshMap = {};
                 }
@@ -2236,7 +2236,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
         }
 
         // Sources
-        if (this._scene.useClonedMeshhMap) {
+        if (this._scene.useClonedMeshMap) {
             if (internalDataInfo.meshMap) {
                 for (const uniqueId in internalDataInfo.meshMap) {
                     const mesh = internalDataInfo.meshMap[uniqueId];

+ 15 - 6
src/scene.ts

@@ -92,7 +92,7 @@ export interface SceneOptions {
      * Defines that each mesh of the scene should keep up-to-date a map of referencing cloned meshes for fast diposing
      * It will improve performance when the number of mesh becomes important, but might consume a bit more memory
      */
-    useClonedMeshhMap?: boolean;
+    useClonedMeshMap?: boolean;
 
     /** Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene) */
     virtual?: boolean;
@@ -1186,7 +1186,7 @@ export class Scene extends AbstractScene implements IAnimatable {
     /** @hidden */
     public readonly useMaterialMeshMap: boolean;
     /** @hidden */
-    public readonly useClonedMeshhMap: boolean;
+    public readonly useClonedMeshMap: boolean;
 
     private _externalData: StringDictionary<Object>;
     private _uid: Nullable<string>;
@@ -1371,8 +1371,17 @@ export class Scene extends AbstractScene implements IAnimatable {
      */
     constructor(engine: Engine, options?: SceneOptions) {
         super();
+
+        const fullOptions = {
+            useGeometryUniqueIdsMap: true,
+            useMaterialMeshMap: true,
+            useClonedMeshMap: true,
+            virtual: false,
+            ...options
+        };
+
         this._engine = engine || EngineStore.LastCreatedEngine;
-        if (!options || !options.virtual) {
+        if (!fullOptions.virtual) {
             EngineStore._LastCreatedScene = this;
             this._engine.scenes.push(this);
         }
@@ -1399,12 +1408,12 @@ export class Scene extends AbstractScene implements IAnimatable {
 
         this.setDefaultCandidateProviders();
 
-        if (options && options.useGeometryUniqueIdsMap === true) {
+        if (fullOptions.useGeometryUniqueIdsMap) {
             this.geometriesByUniqueId = {};
         }
 
-        this.useMaterialMeshMap = options && options.useGeometryUniqueIdsMap || false;
-        this.useClonedMeshhMap = options && options.useClonedMeshhMap || false;
+        this.useMaterialMeshMap = fullOptions.useMaterialMeshMap;
+        this.useClonedMeshMap = fullOptions.useClonedMeshMap;
 
         if (!options || !options.virtual) {
             this._engine.onNewSceneAddedObservable.notifyObservers(this);