David Catuhe 6 năm trước cách đây
mục cha
commit
a6aeeaaa89

+ 30 - 9
Playground/babylon.d.txt

@@ -7428,8 +7428,9 @@ declare module BABYLON {
          * Multiplication factor on scale x/y/z when computing the world matrix. Eg. for a 1x1x1 cube setting this to 2 will make it a 2x2x2 cube
          */
         scalingDeterminant: number;
+        private _infiniteDistance;
         /**
-         * Sets the distance of the object to max, often used by skybox
+         * Gets or sets the distance of the object to max, often used by skybox
          */
         infiniteDistance: boolean;
         /**
@@ -7720,9 +7721,12 @@ declare module BABYLON {
          * @hidden
          */
         protected _getEffectiveParent(): Nullable<Node>;
-        private _activeCompositionProcess;
+        private _activeCompositionProcessor;
         private _defaultCompositionProcessor;
         private _pivotCompositionProcessor;
+        private _translationProcessor;
+        private _defaultTranslationProcessor;
+        private _infiniteDistanceTranslationProcessor;
         private _activeParentProcessor;
         private _activeBillboardPostProcessor;
         private _defaultParentProcessor;
@@ -16354,7 +16358,7 @@ declare module BABYLON {
          */
         refreshBoundingInfo(applySkeleton?: boolean): InstancedMesh;
         /** @hidden */
preActivate(): InstancedMesh;
-        /** @hidden */
activate(renderId: number): InstancedMesh;
+        /** @hidden */
activate(renderId: number): boolean;
         /**
          * Returns the current associated LOD AbstractMesh.
          */
@@ -16958,7 +16962,7 @@ declare module BABYLON {
         private _renderOpaque;
         private _renderAlphaTest;
         private _renderTransparent;
-        private _edgesRenderers;
+        /** @hidden */
edgesRenderers: SmartArray<IEdgesRenderer>;
         onBeforeTransparentRendering: () => void;
         /**
          * Set the opaque sort comparison function.
@@ -18054,6 +18058,7 @@ declare module BABYLON {
          */
         private _activeTargets;
         private _currentActiveTarget;
+        private _directTarget;
         /**
          * The target path of the runtime animation
          */
@@ -18076,6 +18081,11 @@ declare module BABYLON {
         private _previousRatio;
         private _enableBlending;
         private _correctLoopMode;
+        private _keys;
+        private _minFrame;
+        private _maxFrame;
+        private _minValue;
+        private _maxValue;
         /**
          * Gets the current frame of the runtime animation
          */
@@ -18104,6 +18114,8 @@ declare module BABYLON {
          * @param host defines the initiating Animatable
          */
         constructor(target: any, animation: Animation, scene: Scene, host: Animatable);
+        private _normalizationProcessor;
+        private _defaultNormalizationProcessor;
         private _preparePath;
         /**
          * Gets the animation from the runtime animation
@@ -18135,10 +18147,10 @@ declare module BABYLON {
         private _interpolate;
         /**
          * Apply the interpolated value to the target
-         * @param currentValue defines the value computed by the animation
-         * @param weight defines the weight to apply to this value (Defaults to 1.0)
          */
-        setValue(currentValue: any, weight?: number): void;
+        setValue: (currentValue: any, weight: number) => void;
+        private _setValueForArray;
+        private _setValueForDirect;
         private _getOriginalValues;
         private _activeBlendingProcessor;
         private _noBlendingProcessor;
@@ -20123,12 +20135,13 @@ declare module BABYLON {
      * @hidden
      **/
private class _InstanceDataStorage {
         visibleInstances: any;
-        renderIdForInstances: number[];
         batchCache: _InstancesBatch;
         instancesBufferSize: number;
         instancesBuffer: Nullable<Buffer>;
         instancesData: Float32Array;
         overridenInstanceCount: number;
+        isFrozen: boolean;
previousBatch: _InstancesBatch;
+        hardwareInstancedRendering: boolean;
     }
     /**
      * @hidden
@@ -20137,6 +20150,7 @@ declare module BABYLON {
         mustReturn: boolean;
         visibleInstances: Nullable<InstancedMesh[]>[];
         renderSelf: boolean[];
+        hardwareInstancedRendering: boolean[];
     }
     /**
      * Class used to represent renderable models
@@ -20609,6 +20623,8 @@ declare module BABYLON {
         /** @hidden */
getInstancesRenderList(subMeshId: number): _InstancesBatch;
         /** @hidden */
renderWithInstances(subMesh: SubMesh, fillMode: number, batch: _InstancesBatch, effect: Effect, engine: Engine): Mesh;
         /** @hidden */
processRendering(subMesh: SubMesh, effect: Effect, fillMode: number, batch: _InstancesBatch, hardwareInstancedRendering: boolean, onBeforeDraw: (isInstance: boolean, world: Matrix, effectiveMaterial?: Material) => void, effectiveMaterial?: Material): Mesh;
+        /** @hidden */
freeze(): void;
+        /** @hidden */
unFreeze(): void;
         /**
          * Triggers the draw call for the mesh. Usually, you don't need to call this method by your own because the mesh rendering is handled by the scene rendering manager
          * @param subMesh defines the subMesh to render
@@ -23562,6 +23578,8 @@ declare module BABYLON {
         definedFacingForward: boolean;
         /** @hidden */
occlusionQuery: Nullable<WebGLQuery>;
         private _visibility;
+        /** @hidden */
isActive: boolean;
+        /** @hidden */
renderingGroup: RenderingGroup;
         /**
          * Gets or sets mesh visibility between 0 and 1 (default is 1)
          */
@@ -23865,7 +23883,9 @@ declare module BABYLON {
         readonly useBones: boolean;
         /** @hidden */
preActivate(): void;
         /** @hidden */
preActivateForIntermediateRendering(renderId: number): void;
-        /** @hidden */
activate(renderId: number): void;
+        /** @hidden */
activate(renderId: number): boolean;
+        /** @hidden */
freeze(): void;
+        /** @hidden */
unFreeze(): void;
         /**
          * Gets the current world matrix
          * @returns a Matrix
@@ -28498,6 +28518,7 @@ declare module BABYLON {
         private _engine;
         private _uniformBuffersNames;
         private _uniformsNames;
+        private _samplerList;
         private _samplers;
         private _isReady;
         private _compilationError;

+ 38 - 9
dist/preview release/babylon.d.ts

@@ -7510,8 +7510,9 @@ declare module BABYLON {
          * Multiplication factor on scale x/y/z when computing the world matrix. Eg. for a 1x1x1 cube setting this to 2 will make it a 2x2x2 cube
          */
         scalingDeterminant: number;
+        private _infiniteDistance;
         /**
-         * Sets the distance of the object to max, often used by skybox
+         * Gets or sets the distance of the object to max, often used by skybox
          */
         infiniteDistance: boolean;
         /**
@@ -7808,9 +7809,12 @@ declare module BABYLON {
          * @hidden
          */
         protected _getEffectiveParent(): Nullable<Node>;
-        private _activeCompositionProcess;
+        private _activeCompositionProcessor;
         private _defaultCompositionProcessor;
         private _pivotCompositionProcessor;
+        private _translationProcessor;
+        private _defaultTranslationProcessor;
+        private _infiniteDistanceTranslationProcessor;
         private _activeParentProcessor;
         private _activeBillboardPostProcessor;
         private _defaultParentProcessor;
@@ -16610,7 +16614,7 @@ declare module BABYLON {
         /** @hidden */
         _preActivate(): InstancedMesh;
         /** @hidden */
-        _activate(renderId: number): InstancedMesh;
+        _activate(renderId: number): boolean;
         /**
          * Returns the current associated LOD AbstractMesh.
          */
@@ -17221,7 +17225,8 @@ declare module BABYLON {
         private _renderOpaque;
         private _renderAlphaTest;
         private _renderTransparent;
-        private _edgesRenderers;
+        /** @hidden */
+        _edgesRenderers: SmartArray<IEdgesRenderer>;
         onBeforeTransparentRendering: () => void;
         /**
          * Set the opaque sort comparison function.
@@ -18329,6 +18334,7 @@ declare module BABYLON {
          */
         private _activeTargets;
         private _currentActiveTarget;
+        private _directTarget;
         /**
          * The target path of the runtime animation
          */
@@ -18351,6 +18357,11 @@ declare module BABYLON {
         private _previousRatio;
         private _enableBlending;
         private _correctLoopMode;
+        private _keys;
+        private _minFrame;
+        private _maxFrame;
+        private _minValue;
+        private _maxValue;
         /**
          * Gets the current frame of the runtime animation
          */
@@ -18379,6 +18390,8 @@ declare module BABYLON {
          * @param host defines the initiating Animatable
          */
         constructor(target: any, animation: Animation, scene: Scene, host: Animatable);
+        private _normalizationProcessor;
+        private _defaultNormalizationProcessor;
         private _preparePath;
         /**
          * Gets the animation from the runtime animation
@@ -18410,10 +18423,10 @@ declare module BABYLON {
         private _interpolate;
         /**
          * Apply the interpolated value to the target
-         * @param currentValue defines the value computed by the animation
-         * @param weight defines the weight to apply to this value (Defaults to 1.0)
          */
-        setValue(currentValue: any, weight?: number): void;
+        setValue: (currentValue: any, weight: number) => void;
+        private _setValueForArray;
+        private _setValueForDirect;
         private _getOriginalValues;
         private _activeBlendingProcessor;
         private _noBlendingProcessor;
@@ -20423,12 +20436,14 @@ declare module BABYLON {
      **/
     class _InstanceDataStorage {
         visibleInstances: any;
-        renderIdForInstances: number[];
         batchCache: _InstancesBatch;
         instancesBufferSize: number;
         instancesBuffer: Nullable<Buffer>;
         instancesData: Float32Array;
         overridenInstanceCount: number;
+        isFrozen: boolean;
+        _previousBatch: _InstancesBatch;
+        hardwareInstancedRendering: boolean;
     }
     /**
      * @hidden
@@ -20437,6 +20452,7 @@ declare module BABYLON {
         mustReturn: boolean;
         visibleInstances: Nullable<InstancedMesh[]>[];
         renderSelf: boolean[];
+        hardwareInstancedRendering: boolean[];
     }
     /**
      * Class used to represent renderable models
@@ -20929,6 +20945,10 @@ declare module BABYLON {
         _renderWithInstances(subMesh: SubMesh, fillMode: number, batch: _InstancesBatch, effect: Effect, engine: Engine): Mesh;
         /** @hidden */
         _processRendering(subMesh: SubMesh, effect: Effect, fillMode: number, batch: _InstancesBatch, hardwareInstancedRendering: boolean, onBeforeDraw: (isInstance: boolean, world: Matrix, effectiveMaterial?: Material) => void, effectiveMaterial?: Material): Mesh;
+        /** @hidden */
+        _freeze(): void;
+        /** @hidden */
+        _unFreeze(): void;
         /**
          * Triggers the draw call for the mesh. Usually, you don't need to call this method by your own because the mesh rendering is handled by the scene rendering manager
          * @param subMesh defines the subMesh to render
@@ -23940,6 +23960,10 @@ declare module BABYLON {
         /** @hidden */
         _occlusionQuery: Nullable<WebGLQuery>;
         private _visibility;
+        /** @hidden */
+        _isActive: boolean;
+        /** @hidden */
+        _renderingGroup: RenderingGroup;
         /**
          * Gets or sets mesh visibility between 0 and 1 (default is 1)
          */
@@ -24266,7 +24290,11 @@ declare module BABYLON {
         /** @hidden */
         _preActivateForIntermediateRendering(renderId: number): void;
         /** @hidden */
-        _activate(renderId: number): void;
+        _activate(renderId: number): boolean;
+        /** @hidden */
+        _freeze(): void;
+        /** @hidden */
+        _unFreeze(): void;
         /**
          * Gets the current world matrix
          * @returns a Matrix
@@ -28979,6 +29007,7 @@ declare module BABYLON {
         private _engine;
         private _uniformBuffersNames;
         private _uniformsNames;
+        private _samplerList;
         private _samplers;
         private _isReady;
         private _compilationError;

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/babylon.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 280 - 204
dist/preview release/babylon.max.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/babylon.max.js.map


+ 78 - 18
dist/preview release/babylon.module.d.ts

@@ -7565,8 +7565,9 @@ declare module "babylonjs/Meshes/transformNode" {
          * Multiplication factor on scale x/y/z when computing the world matrix. Eg. for a 1x1x1 cube setting this to 2 will make it a 2x2x2 cube
          */
         scalingDeterminant: number;
+        private _infiniteDistance;
         /**
-         * Sets the distance of the object to max, often used by skybox
+         * Gets or sets the distance of the object to max, often used by skybox
          */
         infiniteDistance: boolean;
         /**
@@ -7863,9 +7864,12 @@ declare module "babylonjs/Meshes/transformNode" {
          * @hidden
          */
         protected _getEffectiveParent(): Nullable<Node>;
-        private _activeCompositionProcess;
+        private _activeCompositionProcessor;
         private _defaultCompositionProcessor;
         private _pivotCompositionProcessor;
+        private _translationProcessor;
+        private _defaultTranslationProcessor;
+        private _infiniteDistanceTranslationProcessor;
         private _activeParentProcessor;
         private _activeBillboardPostProcessor;
         private _defaultParentProcessor;
@@ -17007,7 +17011,7 @@ declare module "babylonjs/Meshes/instancedMesh" {
         /** @hidden */
         _preActivate(): InstancedMesh;
         /** @hidden */
-        _activate(renderId: number): InstancedMesh;
+        _activate(renderId: number): boolean;
         /**
          * Returns the current associated LOD AbstractMesh.
          */
@@ -17643,6 +17647,7 @@ declare module "babylonjs/Rendering/renderingGroup" {
     import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
     import { Nullable } from "babylonjs/types";
     import { IParticleSystem } from "babylonjs/Particles/IParticleSystem";
+    import { IEdgesRenderer } from "babylonjs/Rendering/edgesRenderer";
     import { ISpriteManager } from "babylonjs/Sprites/spriteManager";
     import { Material } from "babylonjs/Materials/material";
     import { Scene } from "babylonjs/scene";
@@ -17667,7 +17672,8 @@ declare module "babylonjs/Rendering/renderingGroup" {
         private _renderOpaque;
         private _renderAlphaTest;
         private _renderTransparent;
-        private _edgesRenderers;
+        /** @hidden */
+        _edgesRenderers: SmartArray<IEdgesRenderer>;
         onBeforeTransparentRendering: () => void;
         /**
          * Set the opaque sort comparison function.
@@ -18812,6 +18818,7 @@ declare module "babylonjs/Animations/runtimeAnimation" {
          */
         private _activeTargets;
         private _currentActiveTarget;
+        private _directTarget;
         /**
          * The target path of the runtime animation
          */
@@ -18834,6 +18841,11 @@ declare module "babylonjs/Animations/runtimeAnimation" {
         private _previousRatio;
         private _enableBlending;
         private _correctLoopMode;
+        private _keys;
+        private _minFrame;
+        private _maxFrame;
+        private _minValue;
+        private _maxValue;
         /**
          * Gets the current frame of the runtime animation
          */
@@ -18862,6 +18874,8 @@ declare module "babylonjs/Animations/runtimeAnimation" {
          * @param host defines the initiating Animatable
          */
         constructor(target: any, animation: Animation, scene: Scene, host: Animatable);
+        private _normalizationProcessor;
+        private _defaultNormalizationProcessor;
         private _preparePath;
         /**
          * Gets the animation from the runtime animation
@@ -18893,10 +18907,10 @@ declare module "babylonjs/Animations/runtimeAnimation" {
         private _interpolate;
         /**
          * Apply the interpolated value to the target
-         * @param currentValue defines the value computed by the animation
-         * @param weight defines the weight to apply to this value (Defaults to 1.0)
          */
-        setValue(currentValue: any, weight?: number): void;
+        setValue: (currentValue: any, weight: number) => void;
+        private _setValueForArray;
+        private _setValueForDirect;
         private _getOriginalValues;
         private _activeBlendingProcessor;
         private _noBlendingProcessor;
@@ -20983,12 +20997,14 @@ declare module "babylonjs/Meshes/mesh" {
      **/
     class _InstanceDataStorage {
         visibleInstances: any;
-        renderIdForInstances: number[];
         batchCache: _InstancesBatch;
         instancesBufferSize: number;
         instancesBuffer: Nullable<Buffer>;
         instancesData: Float32Array;
         overridenInstanceCount: number;
+        isFrozen: boolean;
+        _previousBatch: _InstancesBatch;
+        hardwareInstancedRendering: boolean;
     }
     /**
      * @hidden
@@ -20997,6 +21013,7 @@ declare module "babylonjs/Meshes/mesh" {
         mustReturn: boolean;
         visibleInstances: Nullable<import("babylonjs/Meshes/instancedMesh").InstancedMesh[]>[];
         renderSelf: boolean[];
+        hardwareInstancedRendering: boolean[];
     }
     /**
      * Class used to represent renderable models
@@ -21489,6 +21506,10 @@ declare module "babylonjs/Meshes/mesh" {
         _renderWithInstances(subMesh: SubMesh, fillMode: number, batch: _InstancesBatch, effect: Effect, engine: Engine): Mesh;
         /** @hidden */
         _processRendering(subMesh: SubMesh, effect: Effect, fillMode: number, batch: _InstancesBatch, hardwareInstancedRendering: boolean, onBeforeDraw: (isInstance: boolean, world: Matrix, effectiveMaterial?: Material) => void, effectiveMaterial?: Material): Mesh;
+        /** @hidden */
+        _freeze(): void;
+        /** @hidden */
+        _unFreeze(): void;
         /**
          * Triggers the draw call for the mesh. Usually, you don't need to call this method by your own because the mesh rendering is handled by the scene rendering manager
          * @param subMesh defines the subMesh to render
@@ -24442,6 +24463,7 @@ declare module "babylonjs/Meshes/abstractMesh" {
     import { Ray } from "babylonjs/Culling/ray";
     import { Collider } from "babylonjs/Collisions/collider";
     import { TrianglePickingPredicate } from "babylonjs/Culling/ray";
+    import { RenderingGroup } from "babylonjs/Rendering/renderingGroup";
     /**
      * Class used to store all common mesh properties
      */
@@ -24576,6 +24598,10 @@ declare module "babylonjs/Meshes/abstractMesh" {
         /** @hidden */
         _occlusionQuery: Nullable<WebGLQuery>;
         private _visibility;
+        /** @hidden */
+        _isActive: boolean;
+        /** @hidden */
+        _renderingGroup: RenderingGroup;
         /**
          * Gets or sets mesh visibility between 0 and 1 (default is 1)
          */
@@ -24902,7 +24928,11 @@ declare module "babylonjs/Meshes/abstractMesh" {
         /** @hidden */
         _preActivateForIntermediateRendering(renderId: number): void;
         /** @hidden */
-        _activate(renderId: number): void;
+        _activate(renderId: number): boolean;
+        /** @hidden */
+        _freeze(): void;
+        /** @hidden */
+        _unFreeze(): void;
         /**
          * Gets the current world matrix
          * @returns a Matrix
@@ -29708,6 +29738,7 @@ declare module "babylonjs/Materials/effect" {
         private _engine;
         private _uniformBuffersNames;
         private _uniformsNames;
+        private _samplerList;
         private _samplers;
         private _isReady;
         private _compilationError;
@@ -66966,8 +66997,9 @@ declare module BABYLON {
          * Multiplication factor on scale x/y/z when computing the world matrix. Eg. for a 1x1x1 cube setting this to 2 will make it a 2x2x2 cube
          */
         scalingDeterminant: number;
+        private _infiniteDistance;
         /**
-         * Sets the distance of the object to max, often used by skybox
+         * Gets or sets the distance of the object to max, often used by skybox
          */
         infiniteDistance: boolean;
         /**
@@ -67264,9 +67296,12 @@ declare module BABYLON {
          * @hidden
          */
         protected _getEffectiveParent(): Nullable<Node>;
-        private _activeCompositionProcess;
+        private _activeCompositionProcessor;
         private _defaultCompositionProcessor;
         private _pivotCompositionProcessor;
+        private _translationProcessor;
+        private _defaultTranslationProcessor;
+        private _infiniteDistanceTranslationProcessor;
         private _activeParentProcessor;
         private _activeBillboardPostProcessor;
         private _defaultParentProcessor;
@@ -76066,7 +76101,7 @@ declare module BABYLON {
         /** @hidden */
         _preActivate(): InstancedMesh;
         /** @hidden */
-        _activate(renderId: number): InstancedMesh;
+        _activate(renderId: number): boolean;
         /**
          * Returns the current associated LOD AbstractMesh.
          */
@@ -76677,7 +76712,8 @@ declare module BABYLON {
         private _renderOpaque;
         private _renderAlphaTest;
         private _renderTransparent;
-        private _edgesRenderers;
+        /** @hidden */
+        _edgesRenderers: SmartArray<IEdgesRenderer>;
         onBeforeTransparentRendering: () => void;
         /**
          * Set the opaque sort comparison function.
@@ -77785,6 +77821,7 @@ declare module BABYLON {
          */
         private _activeTargets;
         private _currentActiveTarget;
+        private _directTarget;
         /**
          * The target path of the runtime animation
          */
@@ -77807,6 +77844,11 @@ declare module BABYLON {
         private _previousRatio;
         private _enableBlending;
         private _correctLoopMode;
+        private _keys;
+        private _minFrame;
+        private _maxFrame;
+        private _minValue;
+        private _maxValue;
         /**
          * Gets the current frame of the runtime animation
          */
@@ -77835,6 +77877,8 @@ declare module BABYLON {
          * @param host defines the initiating Animatable
          */
         constructor(target: any, animation: Animation, scene: Scene, host: Animatable);
+        private _normalizationProcessor;
+        private _defaultNormalizationProcessor;
         private _preparePath;
         /**
          * Gets the animation from the runtime animation
@@ -77866,10 +77910,10 @@ declare module BABYLON {
         private _interpolate;
         /**
          * Apply the interpolated value to the target
-         * @param currentValue defines the value computed by the animation
-         * @param weight defines the weight to apply to this value (Defaults to 1.0)
          */
-        setValue(currentValue: any, weight?: number): void;
+        setValue: (currentValue: any, weight: number) => void;
+        private _setValueForArray;
+        private _setValueForDirect;
         private _getOriginalValues;
         private _activeBlendingProcessor;
         private _noBlendingProcessor;
@@ -79879,12 +79923,14 @@ declare module BABYLON {
      **/
     class _InstanceDataStorage {
         visibleInstances: any;
-        renderIdForInstances: number[];
         batchCache: _InstancesBatch;
         instancesBufferSize: number;
         instancesBuffer: Nullable<Buffer>;
         instancesData: Float32Array;
         overridenInstanceCount: number;
+        isFrozen: boolean;
+        _previousBatch: _InstancesBatch;
+        hardwareInstancedRendering: boolean;
     }
     /**
      * @hidden
@@ -79893,6 +79939,7 @@ declare module BABYLON {
         mustReturn: boolean;
         visibleInstances: Nullable<InstancedMesh[]>[];
         renderSelf: boolean[];
+        hardwareInstancedRendering: boolean[];
     }
     /**
      * Class used to represent renderable models
@@ -80385,6 +80432,10 @@ declare module BABYLON {
         _renderWithInstances(subMesh: SubMesh, fillMode: number, batch: _InstancesBatch, effect: Effect, engine: Engine): Mesh;
         /** @hidden */
         _processRendering(subMesh: SubMesh, effect: Effect, fillMode: number, batch: _InstancesBatch, hardwareInstancedRendering: boolean, onBeforeDraw: (isInstance: boolean, world: Matrix, effectiveMaterial?: Material) => void, effectiveMaterial?: Material): Mesh;
+        /** @hidden */
+        _freeze(): void;
+        /** @hidden */
+        _unFreeze(): void;
         /**
          * Triggers the draw call for the mesh. Usually, you don't need to call this method by your own because the mesh rendering is handled by the scene rendering manager
          * @param subMesh defines the subMesh to render
@@ -83396,6 +83447,10 @@ declare module BABYLON {
         /** @hidden */
         _occlusionQuery: Nullable<WebGLQuery>;
         private _visibility;
+        /** @hidden */
+        _isActive: boolean;
+        /** @hidden */
+        _renderingGroup: RenderingGroup;
         /**
          * Gets or sets mesh visibility between 0 and 1 (default is 1)
          */
@@ -83722,7 +83777,11 @@ declare module BABYLON {
         /** @hidden */
         _preActivateForIntermediateRendering(renderId: number): void;
         /** @hidden */
-        _activate(renderId: number): void;
+        _activate(renderId: number): boolean;
+        /** @hidden */
+        _freeze(): void;
+        /** @hidden */
+        _unFreeze(): void;
         /**
          * Gets the current world matrix
          * @returns a Matrix
@@ -88435,6 +88494,7 @@ declare module BABYLON {
         private _engine;
         private _uniformBuffersNames;
         private _uniformsNames;
+        private _samplerList;
         private _samplers;
         private _isReady;
         private _compilationError;

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

@@ -1 +1 @@
-{"engineOnly":307307,"sceneOnly":510947,"minGridMaterial":634716,"minStandardMaterial":758535}
+{"engineOnly":307404,"sceneOnly":511972,"minGridMaterial":636046,"minStandardMaterial":759865}

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

@@ -7565,8 +7565,9 @@ declare module "babylonjs/Meshes/transformNode" {
          * Multiplication factor on scale x/y/z when computing the world matrix. Eg. for a 1x1x1 cube setting this to 2 will make it a 2x2x2 cube
          */
         scalingDeterminant: number;
+        private _infiniteDistance;
         /**
-         * Sets the distance of the object to max, often used by skybox
+         * Gets or sets the distance of the object to max, often used by skybox
          */
         infiniteDistance: boolean;
         /**
@@ -7863,9 +7864,12 @@ declare module "babylonjs/Meshes/transformNode" {
          * @hidden
          */
         protected _getEffectiveParent(): Nullable<Node>;
-        private _activeCompositionProcess;
+        private _activeCompositionProcessor;
         private _defaultCompositionProcessor;
         private _pivotCompositionProcessor;
+        private _translationProcessor;
+        private _defaultTranslationProcessor;
+        private _infiniteDistanceTranslationProcessor;
         private _activeParentProcessor;
         private _activeBillboardPostProcessor;
         private _defaultParentProcessor;
@@ -17007,7 +17011,7 @@ declare module "babylonjs/Meshes/instancedMesh" {
         /** @hidden */
         _preActivate(): InstancedMesh;
         /** @hidden */
-        _activate(renderId: number): InstancedMesh;
+        _activate(renderId: number): boolean;
         /**
          * Returns the current associated LOD AbstractMesh.
          */
@@ -17643,6 +17647,7 @@ declare module "babylonjs/Rendering/renderingGroup" {
     import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
     import { Nullable } from "babylonjs/types";
     import { IParticleSystem } from "babylonjs/Particles/IParticleSystem";
+    import { IEdgesRenderer } from "babylonjs/Rendering/edgesRenderer";
     import { ISpriteManager } from "babylonjs/Sprites/spriteManager";
     import { Material } from "babylonjs/Materials/material";
     import { Scene } from "babylonjs/scene";
@@ -17667,7 +17672,8 @@ declare module "babylonjs/Rendering/renderingGroup" {
         private _renderOpaque;
         private _renderAlphaTest;
         private _renderTransparent;
-        private _edgesRenderers;
+        /** @hidden */
+        _edgesRenderers: SmartArray<IEdgesRenderer>;
         onBeforeTransparentRendering: () => void;
         /**
          * Set the opaque sort comparison function.
@@ -18812,6 +18818,7 @@ declare module "babylonjs/Animations/runtimeAnimation" {
          */
         private _activeTargets;
         private _currentActiveTarget;
+        private _directTarget;
         /**
          * The target path of the runtime animation
          */
@@ -18834,6 +18841,11 @@ declare module "babylonjs/Animations/runtimeAnimation" {
         private _previousRatio;
         private _enableBlending;
         private _correctLoopMode;
+        private _keys;
+        private _minFrame;
+        private _maxFrame;
+        private _minValue;
+        private _maxValue;
         /**
          * Gets the current frame of the runtime animation
          */
@@ -18862,6 +18874,8 @@ declare module "babylonjs/Animations/runtimeAnimation" {
          * @param host defines the initiating Animatable
          */
         constructor(target: any, animation: Animation, scene: Scene, host: Animatable);
+        private _normalizationProcessor;
+        private _defaultNormalizationProcessor;
         private _preparePath;
         /**
          * Gets the animation from the runtime animation
@@ -18893,10 +18907,10 @@ declare module "babylonjs/Animations/runtimeAnimation" {
         private _interpolate;
         /**
          * Apply the interpolated value to the target
-         * @param currentValue defines the value computed by the animation
-         * @param weight defines the weight to apply to this value (Defaults to 1.0)
          */
-        setValue(currentValue: any, weight?: number): void;
+        setValue: (currentValue: any, weight: number) => void;
+        private _setValueForArray;
+        private _setValueForDirect;
         private _getOriginalValues;
         private _activeBlendingProcessor;
         private _noBlendingProcessor;
@@ -20983,12 +20997,14 @@ declare module "babylonjs/Meshes/mesh" {
      **/
     class _InstanceDataStorage {
         visibleInstances: any;
-        renderIdForInstances: number[];
         batchCache: _InstancesBatch;
         instancesBufferSize: number;
         instancesBuffer: Nullable<Buffer>;
         instancesData: Float32Array;
         overridenInstanceCount: number;
+        isFrozen: boolean;
+        _previousBatch: _InstancesBatch;
+        hardwareInstancedRendering: boolean;
     }
     /**
      * @hidden
@@ -20997,6 +21013,7 @@ declare module "babylonjs/Meshes/mesh" {
         mustReturn: boolean;
         visibleInstances: Nullable<import("babylonjs/Meshes/instancedMesh").InstancedMesh[]>[];
         renderSelf: boolean[];
+        hardwareInstancedRendering: boolean[];
     }
     /**
      * Class used to represent renderable models
@@ -21489,6 +21506,10 @@ declare module "babylonjs/Meshes/mesh" {
         _renderWithInstances(subMesh: SubMesh, fillMode: number, batch: _InstancesBatch, effect: Effect, engine: Engine): Mesh;
         /** @hidden */
         _processRendering(subMesh: SubMesh, effect: Effect, fillMode: number, batch: _InstancesBatch, hardwareInstancedRendering: boolean, onBeforeDraw: (isInstance: boolean, world: Matrix, effectiveMaterial?: Material) => void, effectiveMaterial?: Material): Mesh;
+        /** @hidden */
+        _freeze(): void;
+        /** @hidden */
+        _unFreeze(): void;
         /**
          * Triggers the draw call for the mesh. Usually, you don't need to call this method by your own because the mesh rendering is handled by the scene rendering manager
          * @param subMesh defines the subMesh to render
@@ -24442,6 +24463,7 @@ declare module "babylonjs/Meshes/abstractMesh" {
     import { Ray } from "babylonjs/Culling/ray";
     import { Collider } from "babylonjs/Collisions/collider";
     import { TrianglePickingPredicate } from "babylonjs/Culling/ray";
+    import { RenderingGroup } from "babylonjs/Rendering/renderingGroup";
     /**
      * Class used to store all common mesh properties
      */
@@ -24576,6 +24598,10 @@ declare module "babylonjs/Meshes/abstractMesh" {
         /** @hidden */
         _occlusionQuery: Nullable<WebGLQuery>;
         private _visibility;
+        /** @hidden */
+        _isActive: boolean;
+        /** @hidden */
+        _renderingGroup: RenderingGroup;
         /**
          * Gets or sets mesh visibility between 0 and 1 (default is 1)
          */
@@ -24902,7 +24928,11 @@ declare module "babylonjs/Meshes/abstractMesh" {
         /** @hidden */
         _preActivateForIntermediateRendering(renderId: number): void;
         /** @hidden */
-        _activate(renderId: number): void;
+        _activate(renderId: number): boolean;
+        /** @hidden */
+        _freeze(): void;
+        /** @hidden */
+        _unFreeze(): void;
         /**
          * Gets the current world matrix
          * @returns a Matrix
@@ -29708,6 +29738,7 @@ declare module "babylonjs/Materials/effect" {
         private _engine;
         private _uniformBuffersNames;
         private _uniformsNames;
+        private _samplerList;
         private _samplers;
         private _isReady;
         private _compilationError;
@@ -66966,8 +66997,9 @@ declare module BABYLON {
          * Multiplication factor on scale x/y/z when computing the world matrix. Eg. for a 1x1x1 cube setting this to 2 will make it a 2x2x2 cube
          */
         scalingDeterminant: number;
+        private _infiniteDistance;
         /**
-         * Sets the distance of the object to max, often used by skybox
+         * Gets or sets the distance of the object to max, often used by skybox
          */
         infiniteDistance: boolean;
         /**
@@ -67264,9 +67296,12 @@ declare module BABYLON {
          * @hidden
          */
         protected _getEffectiveParent(): Nullable<Node>;
-        private _activeCompositionProcess;
+        private _activeCompositionProcessor;
         private _defaultCompositionProcessor;
         private _pivotCompositionProcessor;
+        private _translationProcessor;
+        private _defaultTranslationProcessor;
+        private _infiniteDistanceTranslationProcessor;
         private _activeParentProcessor;
         private _activeBillboardPostProcessor;
         private _defaultParentProcessor;
@@ -76066,7 +76101,7 @@ declare module BABYLON {
         /** @hidden */
         _preActivate(): InstancedMesh;
         /** @hidden */
-        _activate(renderId: number): InstancedMesh;
+        _activate(renderId: number): boolean;
         /**
          * Returns the current associated LOD AbstractMesh.
          */
@@ -76677,7 +76712,8 @@ declare module BABYLON {
         private _renderOpaque;
         private _renderAlphaTest;
         private _renderTransparent;
-        private _edgesRenderers;
+        /** @hidden */
+        _edgesRenderers: SmartArray<IEdgesRenderer>;
         onBeforeTransparentRendering: () => void;
         /**
          * Set the opaque sort comparison function.
@@ -77785,6 +77821,7 @@ declare module BABYLON {
          */
         private _activeTargets;
         private _currentActiveTarget;
+        private _directTarget;
         /**
          * The target path of the runtime animation
          */
@@ -77807,6 +77844,11 @@ declare module BABYLON {
         private _previousRatio;
         private _enableBlending;
         private _correctLoopMode;
+        private _keys;
+        private _minFrame;
+        private _maxFrame;
+        private _minValue;
+        private _maxValue;
         /**
          * Gets the current frame of the runtime animation
          */
@@ -77835,6 +77877,8 @@ declare module BABYLON {
          * @param host defines the initiating Animatable
          */
         constructor(target: any, animation: Animation, scene: Scene, host: Animatable);
+        private _normalizationProcessor;
+        private _defaultNormalizationProcessor;
         private _preparePath;
         /**
          * Gets the animation from the runtime animation
@@ -77866,10 +77910,10 @@ declare module BABYLON {
         private _interpolate;
         /**
          * Apply the interpolated value to the target
-         * @param currentValue defines the value computed by the animation
-         * @param weight defines the weight to apply to this value (Defaults to 1.0)
          */
-        setValue(currentValue: any, weight?: number): void;
+        setValue: (currentValue: any, weight: number) => void;
+        private _setValueForArray;
+        private _setValueForDirect;
         private _getOriginalValues;
         private _activeBlendingProcessor;
         private _noBlendingProcessor;
@@ -79879,12 +79923,14 @@ declare module BABYLON {
      **/
     class _InstanceDataStorage {
         visibleInstances: any;
-        renderIdForInstances: number[];
         batchCache: _InstancesBatch;
         instancesBufferSize: number;
         instancesBuffer: Nullable<Buffer>;
         instancesData: Float32Array;
         overridenInstanceCount: number;
+        isFrozen: boolean;
+        _previousBatch: _InstancesBatch;
+        hardwareInstancedRendering: boolean;
     }
     /**
      * @hidden
@@ -79893,6 +79939,7 @@ declare module BABYLON {
         mustReturn: boolean;
         visibleInstances: Nullable<InstancedMesh[]>[];
         renderSelf: boolean[];
+        hardwareInstancedRendering: boolean[];
     }
     /**
      * Class used to represent renderable models
@@ -80385,6 +80432,10 @@ declare module BABYLON {
         _renderWithInstances(subMesh: SubMesh, fillMode: number, batch: _InstancesBatch, effect: Effect, engine: Engine): Mesh;
         /** @hidden */
         _processRendering(subMesh: SubMesh, effect: Effect, fillMode: number, batch: _InstancesBatch, hardwareInstancedRendering: boolean, onBeforeDraw: (isInstance: boolean, world: Matrix, effectiveMaterial?: Material) => void, effectiveMaterial?: Material): Mesh;
+        /** @hidden */
+        _freeze(): void;
+        /** @hidden */
+        _unFreeze(): void;
         /**
          * Triggers the draw call for the mesh. Usually, you don't need to call this method by your own because the mesh rendering is handled by the scene rendering manager
          * @param subMesh defines the subMesh to render
@@ -83396,6 +83447,10 @@ declare module BABYLON {
         /** @hidden */
         _occlusionQuery: Nullable<WebGLQuery>;
         private _visibility;
+        /** @hidden */
+        _isActive: boolean;
+        /** @hidden */
+        _renderingGroup: RenderingGroup;
         /**
          * Gets or sets mesh visibility between 0 and 1 (default is 1)
          */
@@ -83722,7 +83777,11 @@ declare module BABYLON {
         /** @hidden */
         _preActivateForIntermediateRendering(renderId: number): void;
         /** @hidden */
-        _activate(renderId: number): void;
+        _activate(renderId: number): boolean;
+        /** @hidden */
+        _freeze(): void;
+        /** @hidden */
+        _unFreeze(): void;
         /**
          * Gets the current world matrix
          * @returns a Matrix
@@ -88435,6 +88494,7 @@ declare module BABYLON {
         private _engine;
         private _uniformBuffersNames;
         private _uniformsNames;
+        private _samplerList;
         private _samplers;
         private _isReady;
         private _compilationError;

+ 0 - 336
dist/preview release/viewer/babylon.viewer.d.ts

@@ -29,7 +29,6 @@
 //   ../../../../../Tools/Gulp/babylonjs/Lights/shadowLight
 //   ../../../../../Tools/Gulp/babylonjs-loaders/glTF/2.0/glTFLoaderExtension
 //   ../../../../../Tools/Gulp/babylonjs/PostProcesses/depthOfFieldEffect
-//   ../../../../../Tools/Gulp/babylonjs/Materials/Textures/cubeTexture
 declare module BabylonViewer {
     /**
         * BabylonJS Viewer
@@ -1657,54 +1656,6 @@ declare module BabylonViewer {
 }
 declare module BabylonViewer {
     /**
-        * The ViewerLabs class will hold functions that are not (!) backwards compatible.
-        * The APIs in all labs-related classes and configuration  might change.
-        * Once stable, lab features will be moved to the publis API and configuration object.
-        */
-    export class ViewerLabs {
-            constructor(_scene: BABYLON.Scene);
-            assetsRootURL: string;
-            environment: PBREnvironment;
-            /**
-                        * Loads an environment map from a given URL
-                        * @param url URL of environment map
-                        * @param onSuccess Callback fired after environment successfully applied to the scene
-                        * @param onProgress Callback fired at progress events while loading the environment map
-                        * @param onError Callback fired when the load fails
-                        */
-            loadEnvironment(url: string, onSuccess?: (env: PBREnvironment) => void, onProgress?: (bytesLoaded: number, bytesTotal: number) => void, onError?: (e: any) => void): void;
-            /**
-                * Loads an environment map from a given URL
-                * @param buffer ArrayBuffer containing environment map
-                * @param onSuccess Callback fired after environment successfully applied to the scene
-                * @param onProgress Callback fired at progress events while loading the environment map
-                * @param onError Callback fired when the load fails
-                */
-            loadEnvironment(buffer: ArrayBuffer, onSuccess?: (env: PBREnvironment) => void, onProgress?: (bytesLoaded: number, bytesTotal: number) => void, onError?: (e: any) => void): void;
-            /**
-                * Sets the environment to an already loaded environment
-                * @param env PBREnvironment instance
-                * @param onSuccess Callback fired after environment successfully applied to the scene
-                * @param onProgress Callback fired at progress events while loading the environment map
-                * @param onError Callback fired when the load fails
-                */
-            loadEnvironment(env: PBREnvironment, onSuccess?: (env: PBREnvironment) => void, onProgress?: (bytesLoaded: number, bytesTotal: number) => void, onError?: (e: any) => void): void;
-            /**
-                * Applies an `EnvironmentMapConfiguration` to the scene
-                * @param environmentMapConfiguration Environment map configuration to apply
-                */
-            applyEnvironmentMapConfiguration(rotationY?: number): void;
-            /**
-                * Get an environment asset url by using the configuration if the path is not absolute.
-                * @param url Asset url
-                * @returns The Asset url using the `environmentAssetsRootURL` if the url is not an absolute path.
-                */
-            getAssetUrl(url: string): string;
-            rotateShadowLight(shadowLight: BABYLON.ShadowLight, amount: number, point?: BABYLON.Vector3, axis?: BABYLON.Vector3, target?: BABYLON.Vector3): void;
-    }
-}
-declare module BabylonViewer {
-    /**
         * Defines an animation to be applied to a model (translation, scale or rotation).
         */
     export interface IModelAnimationConfiguration {
@@ -2224,291 +2175,4 @@ declare module BabylonViewer {
             z: number;
         };
     }
-}
-declare module BabylonViewer {
-    /**
-        * Spherical polynomial coefficients (counter part to spherical harmonic coefficients used in shader irradiance calculation)
-        * @ignoreChildren
-        */
-    export interface SphericalPolynomalCoefficients {
-            x: BABYLON.Vector3;
-            y: BABYLON.Vector3;
-            z: BABYLON.Vector3;
-            xx: BABYLON.Vector3;
-            yy: BABYLON.Vector3;
-            zz: BABYLON.Vector3;
-            yz: BABYLON.Vector3;
-            zx: BABYLON.Vector3;
-            xy: BABYLON.Vector3;
-    }
-    /**
-        * Wraps data and maps required for environments with physically based rendering
-        */
-    export interface PBREnvironment {
-            /**
-                * Spherical Polynomial Coefficients representing an irradiance map
-                */
-            irradiancePolynomialCoefficients: SphericalPolynomalCoefficients;
-            /**
-                * Specular cubemap
-                */
-            specularTexture?: TextureCube;
-            /**
-                * A scale factor applied to RGB values after reading from environment maps
-                */
-            textureIntensityScale: number;
-    }
-    /**
-                        * Environment map representations: layouts, projections and approximations
-                        */
-    export type MapType = 'irradiance_sh_coefficients_9' | 'cubemap_faces';
-    /**
-        * Image type used for environment map
-        */
-    export type ImageType = 'png';
-    /**
-        * A generic field in JSON that report's its type
-        */
-    export interface TypedObject<T> {
-            type: T;
-    }
-    /**
-        * Describes a range of bytes starting at byte pos (inclusive) and finishing at byte pos + length - 1
-        */
-    export interface ByteRange {
-            pos: number;
-            length: number;
-    }
-    /**
-        * Complete Spectre Environment JSON Descriptor
-        */
-    export interface EnvJsonDescriptor {
-            radiance: TypedObject<MapType>;
-            irradiance: TypedObject<MapType>;
-            specular: TypedObject<MapType>;
-    }
-    /**
-        * Spherical harmonic coefficients to provide an irradiance map
-        */
-    export interface IrradianceSHCoefficients9 extends TypedObject<MapType> {
-            l00: Array<number>;
-            l1_1: Array<number>;
-            l10: Array<number>;
-            l11: Array<number>;
-            l2_2: Array<number>;
-            l2_1: Array<number>;
-            l20: Array<number>;
-            l21: Array<number>;
-            l22: Array<number>;
-    }
-    /**
-        * A generic set of images, where the image content is specified by byte ranges in the mipmaps field
-        */
-    export interface ImageSet<T> extends TypedObject<MapType> {
-            imageType: ImageType;
-            width: number;
-            height: number;
-            mipmaps: Array<T>;
-            multiplier: number;
-    }
-    /**
-        * A set of cubemap faces
-        */
-    export type CubemapFaces = ImageSet<Array<ByteRange>>;
-    /**
-        * A single image containing an atlas of equirectangular-projection maps across all mip levels
-        */
-    export type EquirectangularMipmapAtlas = ImageSet<ByteRange>;
-    /**
-        * A static class proving methods to aid parsing Spectre environment files
-        */
-    export class EnvironmentDeserializer {
-            /**
-                * Parses an arraybuffer into a new PBREnvironment object
-                * @param arrayBuffer The arraybuffer of the Spectre environment file
-                * @return a PBREnvironment object
-                */
-            static Parse(arrayBuffer: ArrayBuffer): PBREnvironment;
-    }
-}
-declare module BabylonViewer {
-    /**
-        * WebGL Pixel Formats
-        */
-    export const enum PixelFormat {
-            DEPTH_COMPONENT = 6402,
-            ALPHA = 6406,
-            RGB = 6407,
-            RGBA = 6408,
-            LUMINANCE = 6409,
-            LUMINANCE_ALPHA = 6410
-    }
-    /**
-        * WebGL Pixel Types
-        */
-    export const enum PixelType {
-            UNSIGNED_BYTE = 5121,
-            UNSIGNED_SHORT_4_4_4_4 = 32819,
-            UNSIGNED_SHORT_5_5_5_1 = 32820,
-            UNSIGNED_SHORT_5_6_5 = 33635
-    }
-    /**
-        * WebGL Texture Magnification Filter
-        */
-    export const enum TextureMagFilter {
-            NEAREST = 9728,
-            LINEAR = 9729
-    }
-    /**
-        * WebGL Texture Minification Filter
-        */
-    export const enum TextureMinFilter {
-            NEAREST = 9728,
-            LINEAR = 9729,
-            NEAREST_MIPMAP_NEAREST = 9984,
-            LINEAR_MIPMAP_NEAREST = 9985,
-            NEAREST_MIPMAP_LINEAR = 9986,
-            LINEAR_MIPMAP_LINEAR = 9987
-    }
-    /**
-        * WebGL Texture Wrap Modes
-        */
-    export const enum TextureWrapMode {
-            REPEAT = 10497,
-            CLAMP_TO_EDGE = 33071,
-            MIRRORED_REPEAT = 33648
-    }
-    /**
-        * Raw texture data and descriptor sufficient for WebGL texture upload
-        */
-    export interface TextureData {
-            /**
-                * Width of image
-                */
-            width: number;
-            /**
-                * Height of image
-                */
-            height: number;
-            /**
-                * Format of pixels in data
-                */
-            format: PixelFormat;
-            /**
-                * Row byte alignment of pixels in data
-                */
-            alignment: number;
-            /**
-                * Pixel data
-                */
-            data: ArrayBufferView;
-    }
-    /**
-        * Wraps sampling parameters for a WebGL texture
-        */
-    export interface SamplingParameters {
-            /**
-                * Magnification mode when upsampling from a WebGL texture
-                */
-            magFilter?: TextureMagFilter;
-            /**
-                * Minification mode when upsampling from a WebGL texture
-                */
-            minFilter?: TextureMinFilter;
-            /**
-                * X axis wrapping mode when sampling out of a WebGL texture bounds
-                */
-            wrapS?: TextureWrapMode;
-            /**
-                * Y axis wrapping mode when sampling out of a WebGL texture bounds
-                */
-            wrapT?: TextureWrapMode;
-            /**
-             * Anisotropic filtering samples
-             */
-            maxAnisotropy?: number;
-    }
-    /**
-        * Represents a valid WebGL texture source for use in texImage2D
-        */
-    export type TextureSource = TextureData | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement;
-    /**
-        * A generic set of texture mipmaps (where index 0 has the largest dimension)
-        */
-    export type Mipmaps<T> = Array<T>;
-    /**
-        * A set of 6 cubemap arranged in the order [+x, -x, +y, -y, +z, -z]
-        */
-    export type Faces<T> = Array<T>;
-    /**
-        * A set of texture mipmaps specifically for 2D textures in WebGL (where index 0 has the largest dimension)
-        */
-    export type Mipmaps2D = Mipmaps<TextureSource>;
-    /**
-        * A set of texture mipmaps specifically for cubemap textures in WebGL (where index 0 has the largest dimension)
-        */
-    export type MipmapsCube = Mipmaps<Faces<TextureSource>>;
-    /**
-        * A minimal WebGL cubemap descriptor
-        */
-    export class TextureCube {
-            internalFormat: PixelFormat;
-            type: PixelType;
-            source: MipmapsCube;
-            /**
-                * Returns the width of a face of the texture or 0 if not available
-                */
-            readonly Width: number;
-            /**
-                * Returns the height of a face of the texture or 0 if not available
-                */
-            readonly Height: number;
-            /**
-                * constructor
-                * @param internalFormat WebGL pixel format for the texture on the GPU
-                * @param type WebGL pixel type of the supplied data and texture on the GPU
-                * @param source An array containing mipmap levels of faces, where each mipmap level is an array of faces and each face is a TextureSource object
-                */
-            constructor(internalFormat: PixelFormat, type: PixelType, source?: MipmapsCube);
-    }
-    /**
-                * A static class providing methods to aid working with Bablyon textures.
-                */
-    export class TextureUtils {
-            /**
-                * A prefix used when storing a babylon texture object reference on a Spectre texture object
-                */
-            static BabylonTextureKeyPrefix: string;
-            /**
-                * Controls anisotropic filtering for deserialized textures.
-                */
-            static MaxAnisotropy: number;
-            /**
-                * Returns a BabylonCubeTexture instance from a Spectre texture cube, subject to sampling parameters.
-                * If such a texture has already been requested in the past, this texture will be returned, otherwise a new one will be created.
-                * The advantage of this is to enable working with texture objects without the need to initialize on the GPU until desired.
-                * @param scene A Babylon BABYLON.Scene instance
-                * @param textureCube A Spectre TextureCube object
-                * @param parameters WebGL texture sampling parameters
-                * @param automaticMipmaps Pass true to enable automatic mipmap generation where possible (requires power of images)
-                * @param environment Specifies that the texture will be used as an environment
-                * @param singleLod Specifies that the texture will be a singleLod (for environment)
-                * @return Babylon cube texture
-                */
-            static GetBabylonCubeTexture(scene: BABYLON.Scene, textureCube: TextureCube, automaticMipmaps: boolean, environment?: boolean, singleLod?: boolean): BABYLON.CubeTexture;
-            /**
-                * Applies Spectre SamplingParameters to a Babylon texture by directly setting texture parameters on the internal WebGLTexture as well as setting Babylon fields
-                * @param babylonTexture Babylon texture to apply texture to (requires the Babylon texture has an initialize _texture field)
-                * @param parameters Spectre SamplingParameters to apply
-                */
-            static ApplySamplingParameters(babylonTexture: BABYLON.BaseTexture, parameters: SamplingParameters): void;
-            /**
-                * Environment preprocessing dedicated value (Internal Use or Advanced only).
-                */
-            static EnvironmentLODScale: number;
-            /**
-                * Environment preprocessing dedicated value (Internal Use or Advanced only)..
-                */
-            static EnvironmentLODOffset: number;
-    }
 }

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 126 - 126
dist/preview release/viewer/babylon.viewer.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js


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

@@ -30,7 +30,6 @@
 //   ../../../../../Tools/Gulp/babylonjs/Lights/shadowLight
 //   ../../../../../Tools/Gulp/babylonjs-loaders/glTF/2.0/glTFLoaderExtension
 //   ../../../../../Tools/Gulp/babylonjs/PostProcesses/depthOfFieldEffect
-//   ../../../../../Tools/Gulp/babylonjs/Materials/Textures/cubeTexture
 
 declare module 'babylonjs-viewer' {
     import { mapperManager } from 'babylonjs-viewer/configuration/mappers';
@@ -1823,56 +1822,7 @@ declare module 'babylonjs-viewer/configuration/loader' {
 }
 
 declare module 'babylonjs-viewer/labs/viewerLabs' {
-    import { PBREnvironment } from "babylonjs-viewer/labs/environmentSerializer";
-    import { Scene } from "babylonjs/scene";
-    import { Vector3 } from "babylonjs/Maths/math";
-    import { ShadowLight } from "babylonjs/Lights/shadowLight";
-    /**
-        * The ViewerLabs class will hold functions that are not (!) backwards compatible.
-        * The APIs in all labs-related classes and configuration  might change.
-        * Once stable, lab features will be moved to the publis API and configuration object.
-        */
-    export class ViewerLabs {
-            constructor(_scene: Scene);
-            assetsRootURL: string;
-            environment: PBREnvironment;
-            /**
-                        * Loads an environment map from a given URL
-                        * @param url URL of environment map
-                        * @param onSuccess Callback fired after environment successfully applied to the scene
-                        * @param onProgress Callback fired at progress events while loading the environment map
-                        * @param onError Callback fired when the load fails
-                        */
-            loadEnvironment(url: string, onSuccess?: (env: PBREnvironment) => void, onProgress?: (bytesLoaded: number, bytesTotal: number) => void, onError?: (e: any) => void): void;
-            /**
-                * Loads an environment map from a given URL
-                * @param buffer ArrayBuffer containing environment map
-                * @param onSuccess Callback fired after environment successfully applied to the scene
-                * @param onProgress Callback fired at progress events while loading the environment map
-                * @param onError Callback fired when the load fails
-                */
-            loadEnvironment(buffer: ArrayBuffer, onSuccess?: (env: PBREnvironment) => void, onProgress?: (bytesLoaded: number, bytesTotal: number) => void, onError?: (e: any) => void): void;
-            /**
-                * Sets the environment to an already loaded environment
-                * @param env PBREnvironment instance
-                * @param onSuccess Callback fired after environment successfully applied to the scene
-                * @param onProgress Callback fired at progress events while loading the environment map
-                * @param onError Callback fired when the load fails
-                */
-            loadEnvironment(env: PBREnvironment, onSuccess?: (env: PBREnvironment) => void, onProgress?: (bytesLoaded: number, bytesTotal: number) => void, onError?: (e: any) => void): void;
-            /**
-                * Applies an `EnvironmentMapConfiguration` to the scene
-                * @param environmentMapConfiguration Environment map configuration to apply
-                */
-            applyEnvironmentMapConfiguration(rotationY?: number): void;
-            /**
-                * Get an environment asset url by using the configuration if the path is not absolute.
-                * @param url Asset url
-                * @returns The Asset url using the `environmentAssetsRootURL` if the url is not an absolute path.
-                */
-            getAssetUrl(url: string): string;
-            rotateShadowLight(shadowLight: ShadowLight, amount: number, point?: Vector3, axis?: Vector3, target?: Vector3): void;
-    }
+    
 }
 
 declare module 'babylonjs-viewer/configuration/interfaces/modelAnimationConfiguration' {
@@ -2433,297 +2383,3 @@ declare module 'babylonjs-viewer/configuration/interfaces/vrConfiguration' {
     }
 }
 
-declare module 'babylonjs-viewer/labs/environmentSerializer' {
-    import { Vector3 } from 'babylonjs/Maths/math';
-    import { TextureCube } from 'babylonjs-viewer/labs/texture';
-    /**
-        * Spherical polynomial coefficients (counter part to spherical harmonic coefficients used in shader irradiance calculation)
-        * @ignoreChildren
-        */
-    export interface SphericalPolynomalCoefficients {
-            x: Vector3;
-            y: Vector3;
-            z: Vector3;
-            xx: Vector3;
-            yy: Vector3;
-            zz: Vector3;
-            yz: Vector3;
-            zx: Vector3;
-            xy: Vector3;
-    }
-    /**
-        * Wraps data and maps required for environments with physically based rendering
-        */
-    export interface PBREnvironment {
-            /**
-                * Spherical Polynomial Coefficients representing an irradiance map
-                */
-            irradiancePolynomialCoefficients: SphericalPolynomalCoefficients;
-            /**
-                * Specular cubemap
-                */
-            specularTexture?: TextureCube;
-            /**
-                * A scale factor applied to RGB values after reading from environment maps
-                */
-            textureIntensityScale: number;
-    }
-    /**
-                        * Environment map representations: layouts, projections and approximations
-                        */
-    export type MapType = 'irradiance_sh_coefficients_9' | 'cubemap_faces';
-    /**
-        * Image type used for environment map
-        */
-    export type ImageType = 'png';
-    /**
-        * A generic field in JSON that report's its type
-        */
-    export interface TypedObject<T> {
-            type: T;
-    }
-    /**
-        * Describes a range of bytes starting at byte pos (inclusive) and finishing at byte pos + length - 1
-        */
-    export interface ByteRange {
-            pos: number;
-            length: number;
-    }
-    /**
-        * Complete Spectre Environment JSON Descriptor
-        */
-    export interface EnvJsonDescriptor {
-            radiance: TypedObject<MapType>;
-            irradiance: TypedObject<MapType>;
-            specular: TypedObject<MapType>;
-    }
-    /**
-        * Spherical harmonic coefficients to provide an irradiance map
-        */
-    export interface IrradianceSHCoefficients9 extends TypedObject<MapType> {
-            l00: Array<number>;
-            l1_1: Array<number>;
-            l10: Array<number>;
-            l11: Array<number>;
-            l2_2: Array<number>;
-            l2_1: Array<number>;
-            l20: Array<number>;
-            l21: Array<number>;
-            l22: Array<number>;
-    }
-    /**
-        * A generic set of images, where the image content is specified by byte ranges in the mipmaps field
-        */
-    export interface ImageSet<T> extends TypedObject<MapType> {
-            imageType: ImageType;
-            width: number;
-            height: number;
-            mipmaps: Array<T>;
-            multiplier: number;
-    }
-    /**
-        * A set of cubemap faces
-        */
-    export type CubemapFaces = ImageSet<Array<ByteRange>>;
-    /**
-        * A single image containing an atlas of equirectangular-projection maps across all mip levels
-        */
-    export type EquirectangularMipmapAtlas = ImageSet<ByteRange>;
-    /**
-        * A static class proving methods to aid parsing Spectre environment files
-        */
-    export class EnvironmentDeserializer {
-            /**
-                * Parses an arraybuffer into a new PBREnvironment object
-                * @param arrayBuffer The arraybuffer of the Spectre environment file
-                * @return a PBREnvironment object
-                */
-            static Parse(arrayBuffer: ArrayBuffer): PBREnvironment;
-    }
-}
-
-declare module 'babylonjs-viewer/labs/texture' {
-    import { Scene } from "babylonjs/scene";
-    import { CubeTexture } from "babylonjs/Materials/Textures/cubeTexture";
-    import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
-    /**
-        * WebGL Pixel Formats
-        */
-    export const enum PixelFormat {
-            DEPTH_COMPONENT = 6402,
-            ALPHA = 6406,
-            RGB = 6407,
-            RGBA = 6408,
-            LUMINANCE = 6409,
-            LUMINANCE_ALPHA = 6410
-    }
-    /**
-        * WebGL Pixel Types
-        */
-    export const enum PixelType {
-            UNSIGNED_BYTE = 5121,
-            UNSIGNED_SHORT_4_4_4_4 = 32819,
-            UNSIGNED_SHORT_5_5_5_1 = 32820,
-            UNSIGNED_SHORT_5_6_5 = 33635
-    }
-    /**
-        * WebGL Texture Magnification Filter
-        */
-    export const enum TextureMagFilter {
-            NEAREST = 9728,
-            LINEAR = 9729
-    }
-    /**
-        * WebGL Texture Minification Filter
-        */
-    export const enum TextureMinFilter {
-            NEAREST = 9728,
-            LINEAR = 9729,
-            NEAREST_MIPMAP_NEAREST = 9984,
-            LINEAR_MIPMAP_NEAREST = 9985,
-            NEAREST_MIPMAP_LINEAR = 9986,
-            LINEAR_MIPMAP_LINEAR = 9987
-    }
-    /**
-        * WebGL Texture Wrap Modes
-        */
-    export const enum TextureWrapMode {
-            REPEAT = 10497,
-            CLAMP_TO_EDGE = 33071,
-            MIRRORED_REPEAT = 33648
-    }
-    /**
-        * Raw texture data and descriptor sufficient for WebGL texture upload
-        */
-    export interface TextureData {
-            /**
-                * Width of image
-                */
-            width: number;
-            /**
-                * Height of image
-                */
-            height: number;
-            /**
-                * Format of pixels in data
-                */
-            format: PixelFormat;
-            /**
-                * Row byte alignment of pixels in data
-                */
-            alignment: number;
-            /**
-                * Pixel data
-                */
-            data: ArrayBufferView;
-    }
-    /**
-        * Wraps sampling parameters for a WebGL texture
-        */
-    export interface SamplingParameters {
-            /**
-                * Magnification mode when upsampling from a WebGL texture
-                */
-            magFilter?: TextureMagFilter;
-            /**
-                * Minification mode when upsampling from a WebGL texture
-                */
-            minFilter?: TextureMinFilter;
-            /**
-                * X axis wrapping mode when sampling out of a WebGL texture bounds
-                */
-            wrapS?: TextureWrapMode;
-            /**
-                * Y axis wrapping mode when sampling out of a WebGL texture bounds
-                */
-            wrapT?: TextureWrapMode;
-            /**
-             * Anisotropic filtering samples
-             */
-            maxAnisotropy?: number;
-    }
-    /**
-        * Represents a valid WebGL texture source for use in texImage2D
-        */
-    export type TextureSource = TextureData | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement;
-    /**
-        * A generic set of texture mipmaps (where index 0 has the largest dimension)
-        */
-    export type Mipmaps<T> = Array<T>;
-    /**
-        * A set of 6 cubemap arranged in the order [+x, -x, +y, -y, +z, -z]
-        */
-    export type Faces<T> = Array<T>;
-    /**
-        * A set of texture mipmaps specifically for 2D textures in WebGL (where index 0 has the largest dimension)
-        */
-    export type Mipmaps2D = Mipmaps<TextureSource>;
-    /**
-        * A set of texture mipmaps specifically for cubemap textures in WebGL (where index 0 has the largest dimension)
-        */
-    export type MipmapsCube = Mipmaps<Faces<TextureSource>>;
-    /**
-        * A minimal WebGL cubemap descriptor
-        */
-    export class TextureCube {
-            internalFormat: PixelFormat;
-            type: PixelType;
-            source: MipmapsCube;
-            /**
-                * Returns the width of a face of the texture or 0 if not available
-                */
-            readonly Width: number;
-            /**
-                * Returns the height of a face of the texture or 0 if not available
-                */
-            readonly Height: number;
-            /**
-                * constructor
-                * @param internalFormat WebGL pixel format for the texture on the GPU
-                * @param type WebGL pixel type of the supplied data and texture on the GPU
-                * @param source An array containing mipmap levels of faces, where each mipmap level is an array of faces and each face is a TextureSource object
-                */
-            constructor(internalFormat: PixelFormat, type: PixelType, source?: MipmapsCube);
-    }
-    /**
-                * A static class providing methods to aid working with Bablyon textures.
-                */
-    export class TextureUtils {
-            /**
-                * A prefix used when storing a babylon texture object reference on a Spectre texture object
-                */
-            static BabylonTextureKeyPrefix: string;
-            /**
-                * Controls anisotropic filtering for deserialized textures.
-                */
-            static MaxAnisotropy: number;
-            /**
-                * Returns a BabylonCubeTexture instance from a Spectre texture cube, subject to sampling parameters.
-                * If such a texture has already been requested in the past, this texture will be returned, otherwise a new one will be created.
-                * The advantage of this is to enable working with texture objects without the need to initialize on the GPU until desired.
-                * @param scene A Babylon Scene instance
-                * @param textureCube A Spectre TextureCube object
-                * @param parameters WebGL texture sampling parameters
-                * @param automaticMipmaps Pass true to enable automatic mipmap generation where possible (requires power of images)
-                * @param environment Specifies that the texture will be used as an environment
-                * @param singleLod Specifies that the texture will be a singleLod (for environment)
-                * @return Babylon cube texture
-                */
-            static GetBabylonCubeTexture(scene: Scene, textureCube: TextureCube, automaticMipmaps: boolean, environment?: boolean, singleLod?: boolean): CubeTexture;
-            /**
-                * Applies Spectre SamplingParameters to a Babylon texture by directly setting texture parameters on the internal WebGLTexture as well as setting Babylon fields
-                * @param babylonTexture Babylon texture to apply texture to (requires the Babylon texture has an initialize _texture field)
-                * @param parameters Spectre SamplingParameters to apply
-                */
-            static ApplySamplingParameters(babylonTexture: BaseTexture, parameters: SamplingParameters): void;
-            /**
-                * Environment preprocessing dedicated value (Internal Use or Advanced only).
-                */
-            static EnvironmentLODScale: number;
-            /**
-                * Environment preprocessing dedicated value (Internal Use or Advanced only)..
-                */
-            static EnvironmentLODOffset: number;
-    }
-}
-

+ 0 - 8
sandbox/index.js

@@ -213,14 +213,6 @@ if (BABYLON.Engine.isSupported()) {
         if (debugLayerEnabled) {
             currentScene.debugLayer.show();
         }
-
-        currentScene.meshes.forEach((mesh) => mesh.doNotSyncBoundingInfo = true);
-        currentScene.materials.forEach((mat) => mat.freeze());
-
-        currentScene.meshes.forEach((mesh) => mesh.ignoreNonUniformScaling = true);
-        currentScene.transformNodes.forEach((node) => node.ignoreNonUniformScaling = true);
-
-        currentScene.freezeActiveMeshes();
     };
 
     var sceneError = function(sceneFile, babylonScene, message) {

+ 4 - 6
src/Animations/runtimeAnimation.ts

@@ -240,8 +240,8 @@ export class RuntimeAnimation {
     }
 
     private _normalizationProcessor = (returnValue: boolean, range: number, ratio: number, from: number, to: number) => {
-        return (returnValue && range !== 0) ? from + ratio % range : to;;
-    };
+        return (returnValue && range !== 0) ? from + ratio % range : to;
+    }
     private _defaultNormalizationProcessor = (returnValue: boolean, range: number, ratio: number, from: number, to: number) => {
         const syncRoot = this._host.syncRoot;
         const hostNormalizedFrame = (syncRoot.masterFrame - syncRoot.fromFrame) / (syncRoot.toFrame - syncRoot.fromFrame);
@@ -346,8 +346,6 @@ export class RuntimeAnimation {
 
     /**
      * Apply the interpolated value to the target
-     * @param currentValue defines the value computed by the animation
-     * @param weight defines the weight to apply to this value (Defaults to 1.0)
      */
     public setValue: (currentValue: any, weight: number) => void;
 
@@ -434,7 +432,7 @@ export class RuntimeAnimation {
             this._scene._registerTargetForLateAnimationBinding(this, this._originalValue[targetIndex]);
         } else {
             destination[this._targetPath] = this._currentValue;
-       }
+        }
 
         if (target.markAsDirty) {
             target.markAsDirty(this._animation.targetProperty);
@@ -609,7 +607,7 @@ export class RuntimeAnimation {
                     }
                 }
             }
-       }
+        }
 
         const repeatCount = range === 0 ? 0 : (ratio / range) >> 0;
         const currentValue = this._interpolate(currentFrame, repeatCount, this._correctLoopMode, offsetValue, highLimitValue);

+ 1 - 1
src/Engines/engine.ts

@@ -6364,7 +6364,7 @@ export class Engine {
             if (uniform) {
                 this._boundUniforms[index] = uniform;
             }
-        }        
+        }
         this._currentEffect = null;
     }
 

+ 2 - 2
src/Materials/effect.ts

@@ -247,7 +247,7 @@ export class Effect {
     private _compilationError = "";
     private _attributesNames: string[];
     private _attributes: number[];
-    private _uniforms: {[key: string] :Nullable<WebGLUniformLocation>} = {};
+    private _uniforms: {[key: string] : Nullable<WebGLUniformLocation>} = {};
     /**
      * Key for the effect.
      * @hidden
@@ -854,7 +854,7 @@ export class Effect {
 
                 this._samplerList.forEach((name, index) => {
                     this._samplers[name] = index;
-                })
+                });
 
                 engine.bindSamplers(this);
 

+ 0 - 1
src/Meshes/transformNode.ts

@@ -108,7 +108,6 @@ export class TransformNode extends Node {
     @serialize()
     public scalingDeterminant = 1;
 
-
     @serialize("infiniteDistance")
     private _infiniteDistance = false;