@babylonjs/core 5.8.2 → 5.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Buffers/buffer.js +2 -3
- package/Buffers/buffer.js.map +1 -1
- package/Culling/ray.js.map +1 -1
- package/Engines/IPipelineContext.d.ts +7 -1
- package/Engines/IPipelineContext.js.map +1 -1
- package/Engines/Processors/shaderCodeNode.js +3 -4
- package/Engines/Processors/shaderCodeNode.js.map +1 -1
- package/Engines/WebGL/webGLPipelineContext.d.ts +7 -1
- package/Engines/WebGL/webGLPipelineContext.js +12 -0
- package/Engines/WebGL/webGLPipelineContext.js.map +1 -1
- package/Engines/WebGPU/webgpuPipelineContext.d.ts +7 -1
- package/Engines/WebGPU/webgpuPipelineContext.js +8 -0
- package/Engines/WebGPU/webgpuPipelineContext.js.map +1 -1
- package/Engines/engine.js +1 -0
- package/Engines/engine.js.map +1 -1
- package/Engines/nativeEngine.js +12 -0
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/thinEngine.js +2 -2
- package/Engines/thinEngine.js.map +1 -1
- package/Inputs/scene.inputManager.js +4 -8
- package/Inputs/scene.inputManager.js.map +1 -1
- package/Lights/shadowLight.d.ts +2 -0
- package/Lights/shadowLight.js +8 -0
- package/Lights/shadowLight.js.map +1 -1
- package/Loading/Plugins/babylonFileLoader.js +5 -2
- package/Loading/Plugins/babylonFileLoader.js.map +1 -1
- package/Loading/sceneLoader.js +1 -2
- package/Loading/sceneLoader.js.map +1 -1
- package/Materials/Node/nodeMaterialBuildState.js +2 -3
- package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
- package/Materials/PBR/pbrMaterial.js +4 -0
- package/Materials/PBR/pbrMaterial.js.map +1 -1
- package/Materials/PBR/pbrMetallicRoughnessMaterial.js +4 -0
- package/Materials/PBR/pbrMetallicRoughnessMaterial.js.map +1 -1
- package/Materials/PBR/pbrSpecularGlossinessMaterial.js +4 -0
- package/Materials/PBR/pbrSpecularGlossinessMaterial.js.map +1 -1
- package/Materials/Textures/Loaders/basisTextureLoader.js +1 -2
- package/Materials/Textures/Loaders/basisTextureLoader.js.map +1 -1
- package/Materials/Textures/Loaders/ddsTextureLoader.js +1 -2
- package/Materials/Textures/Loaders/ddsTextureLoader.js.map +1 -1
- package/Materials/Textures/Loaders/envTextureLoader.js +1 -2
- package/Materials/Textures/Loaders/envTextureLoader.js.map +1 -1
- package/Materials/Textures/Loaders/hdrTextureLoader.js +1 -2
- package/Materials/Textures/Loaders/hdrTextureLoader.js.map +1 -1
- package/Materials/Textures/Loaders/ktxTextureLoader.js +1 -2
- package/Materials/Textures/Loaders/ktxTextureLoader.js.map +1 -1
- package/Materials/Textures/Loaders/tgaTextureLoader.js +1 -2
- package/Materials/Textures/Loaders/tgaTextureLoader.js.map +1 -1
- package/Materials/Textures/cubeTexture.d.ts +2 -1
- package/Materials/Textures/cubeTexture.js +2 -2
- package/Materials/Textures/cubeTexture.js.map +1 -1
- package/Materials/Textures/texture.d.ts +5 -2
- package/Materials/Textures/texture.js +15 -11
- package/Materials/Textures/texture.js.map +1 -1
- package/Materials/effect.d.ts +8 -1
- package/Materials/effect.js +10 -0
- package/Materials/effect.js.map +1 -1
- package/Maths/math.like.d.ts +6 -0
- package/Maths/math.like.js.map +1 -1
- package/Maths/math.vector.d.ts +45 -0
- package/Maths/math.vector.js +92 -7
- package/Maths/math.vector.js.map +1 -1
- package/Meshes/abstractMesh.js +2 -3
- package/Meshes/abstractMesh.js.map +1 -1
- package/Meshes/geometry.js +3 -3
- package/Meshes/geometry.js.map +1 -1
- package/Meshes/instancedMesh.js +11 -9
- package/Meshes/instancedMesh.js.map +1 -1
- package/Meshes/linesMesh.js +3 -0
- package/Meshes/linesMesh.js.map +1 -1
- package/Meshes/mesh.js +2 -2
- package/Meshes/mesh.js.map +1 -1
- package/Misc/computePressure.js +3 -1
- package/Misc/computePressure.js.map +1 -1
- package/Misc/deepCopier.js +1 -2
- package/Misc/deepCopier.js.map +1 -1
- package/Misc/index.d.ts +0 -1
- package/Misc/index.js +0 -1
- package/Misc/index.js.map +1 -1
- package/Misc/reflector.js +1 -2
- package/Misc/reflector.js.map +1 -1
- package/Misc/sceneSerializer.js +7 -2
- package/Misc/sceneSerializer.js.map +1 -1
- package/Misc/stringTools.d.ts +2 -0
- package/Misc/stringTools.js +4 -2
- package/Misc/stringTools.js.map +1 -1
- package/Misc/tools.d.ts +0 -17
- package/Misc/tools.js +0 -25
- package/Misc/tools.js.map +1 -1
- package/Particles/solidParticleSystem.js +6 -7
- package/Particles/solidParticleSystem.js.map +1 -1
- package/Rendering/edgesRenderer.js +1 -2
- package/Rendering/edgesRenderer.js.map +1 -1
- package/Rendering/utilityLayerRenderer.js +0 -4
- package/Rendering/utilityLayerRenderer.js.map +1 -1
- package/Shaders/extractHighlights.fragment.js +1 -1
- package/Shaders/extractHighlights.fragment.js.map +1 -1
- package/abstractScene.d.ts +1 -0
- package/abstractScene.js +1 -0
- package/abstractScene.js.map +1 -1
- package/package.json +1 -1
- package/scene.d.ts +2 -0
- package/scene.js +4 -6
- package/scene.js.map +1 -1
- package/Misc/promise.d.ts +0 -11
- package/Misc/promise.js +0 -230
- package/Misc/promise.js.map +0 -1
- package/Misc/sliceTools.d.ts +0 -22
- package/Misc/sliceTools.js +0 -37
- package/Misc/sliceTools.js.map +0 -1
package/abstractScene.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstractScene.js","sourceRoot":"","sources":["../../../../lts/core/generated/abstractScene.ts"],"names":[],"mappings":"AAiCA;;;;GAIG;AACH;IAAA;QAsEI;;WAEG;QACI,cAAS,GAAG,IAAI,KAAK,EAAQ,CAAC;QAErC;;WAEG;QACI,YAAO,GAAG,IAAI,KAAK,EAAU,CAAC;QAErC;;;WAGG;QACI,WAAM,GAAG,IAAI,KAAK,EAAS,CAAC;QAEnC;;WAEG;QACI,WAAM,GAAG,IAAI,KAAK,EAAgB,CAAC;QAE1C;;;WAGG;QACI,cA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AAC,KAAK,CAAC,CAAC,EAAtC,CAAsC,CAAC,CAAC;QAC7E,OAAO,KAAK,CAAC;IACjB,CAAC;IA7LD;;OAEG;IACY,iCAAmB,GAAyC,EAAE,CAAC;IAE9E;;OAEG;IACY,2CAA6B,GAAmD,EAAE,CAAC;IAsLtG,oBAAC;CAAA,AA/LD,IA+LC;SA/LqB,aAAa","sourcesContent":["import type { Scene } from \"./scene\";\r\nimport type { Nullable } from \"./types\";\r\nimport type { AbstractMesh } from \"./Meshes/abstractMesh\";\r\nimport type { TransformNode } from \"./Meshes/transformNode\";\r\nimport type { Geometry } from \"./Meshes/geometry\";\r\nimport type { Skeleton } from \"./Bones/skeleton\";\r\nimport type { MorphTargetManager } from \"./Morph/morphTargetManager\";\r\nimport type { AssetContainer } from \"./assetContainer\";\r\nimport type { IParticleSystem } from \"./Particles/IParticleSystem\";\r\nimport type { AnimationGroup } from \"./Animations/animationGroup\";\r\nimport type { BaseTexture } from \"./Materials/Textures/baseTexture\";\r\nimport type { Material } from \"./Materials/material\";\r\nimport type { MultiMaterial } from \"./Materials/multiMaterial\";\r\nimport type { AbstractActionManager } from \"./Actions/abstractActionManager\";\r\nimport type { Camera } from \"./Cameras/camera\";\r\nimport type { Light } from \"./Lights/light\";\r\nimport type { Node } from \"./node\";\r\n\r\ndeclare type Animation = import(\"./Animations/animation\").Animation;\r\ndeclare type PostProcess = import(\"./PostProcesses/postProcess\").PostProcess;\r\n\r\n/**\r\n * Defines how the parser contract is defined.\r\n * These parsers are used to parse a list of specific assets (like particle systems, etc..)\r\n */\r\nexport type BabylonFileParser = (parsedData: any, scene: Scene, container: AssetContainer, rootUrl: string) => void;\r\n\r\n/**\r\n * Defines how the individual parser contract is defined.\r\n * These parser can parse an individual asset\r\n */\r\nexport type IndividualBabylonFileParser = (parsedData: any, scene: Scene, rootUrl: string) => any;\r\n\r\n/**\r\n * Base class of the scene acting as a container for the different elements composing a scene.\r\n * This class is dynamically extended by the different components of the scene increasing\r\n * flexibility and reducing coupling\r\n */\r\nexport abstract class AbstractScene {\r\n /**\r\n * Stores the list of available parsers in the application.\r\n */\r\n private static _BabylonFileParsers: { [key: string]: BabylonFileParser } = {};\r\n\r\n /**\r\n * Stores the list of available individual parsers in the application.\r\n */\r\n private static _IndividualBabylonFileParsers: { [key: string]: IndividualBabylonFileParser } = {};\r\n\r\n /**\r\n * Adds a parser in the list of available ones\r\n * @param name Defines the name of the parser\r\n * @param parser Defines the parser to add\r\n */\r\n public static AddParser(name: string, parser: BabylonFileParser): void {\r\n this._BabylonFileParsers[name] = parser;\r\n }\r\n\r\n /**\r\n * Gets a general parser from the list of available ones\r\n * @param name Defines the name of the parser\r\n * @returns the requested parser or null\r\n */\r\n public static GetParser(name: string): Nullable<BabylonFileParser> {\r\n if (this._BabylonFileParsers[name]) {\r\n return this._BabylonFileParsers[name];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Adds n individual parser in the list of available ones\r\n * @param name Defines the name of the parser\r\n * @param parser Defines the parser to add\r\n */\r\n public static AddIndividualParser(name: string, parser: IndividualBabylonFileParser): void {\r\n this._IndividualBabylonFileParsers[name] = parser;\r\n }\r\n\r\n /**\r\n * Gets an individual parser from the list of available ones\r\n * @param name Defines the name of the parser\r\n * @returns the requested parser or null\r\n */\r\n public static GetIndividualParser(name: string): Nullable<IndividualBabylonFileParser> {\r\n if (this._IndividualBabylonFileParsers[name]) {\r\n return this._IndividualBabylonFileParsers[name];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Parser json data and populate both a scene and its associated container object\r\n * @param jsonData Defines the data to parse\r\n * @param scene Defines the scene to parse the data for\r\n * @param container Defines the container attached to the parsing sequence\r\n * @param rootUrl Defines the root url of the data\r\n */\r\n public static Parse(jsonData: any, scene: Scene, container: AssetContainer, rootUrl: string): void {\r\n for (const parserName in this._BabylonFileParsers) {\r\n if (Object.prototype.hasOwnProperty.call(this._BabylonFileParsers, parserName)) {\r\n this._BabylonFileParsers[parserName](jsonData, scene, container, rootUrl);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets the list of root nodes (ie. nodes with no parent)\r\n */\r\n public rootNodes = new Array<Node>();\r\n\r\n /** All of the cameras added to this scene\r\n * @see https://doc.babylonjs.com/babylon101/cameras\r\n */\r\n public cameras = new Array<Camera>();\r\n\r\n /**\r\n * All of the lights added to this scene\r\n * @see https://doc.babylonjs.com/babylon101/lights\r\n */\r\n public lights = new Array<Light>();\r\n\r\n /**\r\n * All of the (abstract) meshes added to this scene\r\n */\r\n public meshes = new Array<AbstractMesh>();\r\n\r\n /**\r\n * The list of skeletons added to the scene\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_bones_and_skeletons\r\n */\r\n public skeletons = new Array<Skeleton>();\r\n\r\n /**\r\n * All of the particle systems added to this scene\r\n * @see https://doc.babylonjs.com/babylon101/particles\r\n */\r\n public particleSystems = new Array<IParticleSystem>();\r\n\r\n /**\r\n * Gets a list of Animations associated with the scene\r\n */\r\n public animations: Animation[] = [];\r\n\r\n /**\r\n * All of the animation groups added to this scene\r\n * @see https://doc.babylonjs.com/divingDeeper/animation/groupAnimations\r\n */\r\n public animationGroups = new Array<AnimationGroup>();\r\n\r\n /**\r\n * All of the multi-materials added to this scene\r\n * @see https://doc.babylonjs.com/how_to/multi_materials\r\n */\r\n public multiMaterials = new Array<MultiMaterial>();\r\n\r\n /**\r\n * All of the materials added to this scene\r\n * In the context of a Scene, it is not supposed to be modified manually.\r\n * Any addition or removal should be done using the addMaterial and removeMaterial Scene methods.\r\n * Note also that the order of the Material within the array is not significant and might change.\r\n * @see https://doc.babylonjs.com/babylon101/materials\r\n */\r\n public materials = new Array<Material>();\r\n\r\n /**\r\n * The list of morph target managers added to the scene\r\n * @see https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh\r\n */\r\n public morphTargetManagers = new Array<MorphTargetManager>();\r\n\r\n /**\r\n * The list of geometries used in the scene.\r\n */\r\n public geometries = new Array<Geometry>();\r\n\r\n /**\r\n * All of the transform nodes added to this scene\r\n * In the context of a Scene, it is not supposed to be modified manually.\r\n * Any addition or removal should be done using the addTransformNode and removeTransformNode Scene methods.\r\n * Note also that the order of the TransformNode within the array is not significant and might change.\r\n * @see https://doc.babylonjs.com/how_to/transformnode\r\n */\r\n public transformNodes = new Array<TransformNode>();\r\n\r\n /**\r\n * ActionManagers available on the scene.\r\n */\r\n public actionManagers = new Array<AbstractActionManager>();\r\n\r\n /**\r\n * Textures to keep.\r\n */\r\n public textures = new Array<BaseTexture>();\r\n\r\n /** @hidden */\r\n protected _environmentTexture: Nullable<BaseTexture> = null;\r\n /**\r\n * Texture used in all pbr material as the reflection texture.\r\n * As in the majority of the scene they are the same (exception for multi room and so on),\r\n * this is easier to reference from here than from all the materials.\r\n */\r\n public get environmentTexture(): Nullable<BaseTexture> {\r\n return this._environmentTexture;\r\n }\r\n\r\n public set environmentTexture(value: Nullable<BaseTexture>) {\r\n this._environmentTexture = value;\r\n }\r\n\r\n /**\r\n * The list of postprocesses added to the scene\r\n */\r\n public postProcesses = new Array<PostProcess>();\r\n\r\n /**\r\n * @returns all meshes, lights, cameras, transformNodes and bones\r\n */\r\n public getNodes(): Array<Node> {\r\n let nodes = new Array<Node>();\r\n nodes = nodes.concat(this.meshes);\r\n nodes = nodes.concat(this.lights);\r\n nodes = nodes.concat(this.cameras);\r\n nodes = nodes.concat(this.transformNodes); // dummies\r\n this.skeletons.forEach((skeleton) => (nodes = nodes.concat(skeleton.bones)));\r\n return nodes;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"abstractScene.js","sourceRoot":"","sources":["../../../../lts/core/generated/abstractScene.ts"],"names":[],"mappings":"AAiCA;;;;GAIG;AACH;IAAA;QAsEI;;WAEG;QACI,cAAS,GAAG,IAAI,KAAK,EAAQ,CAAC;QAErC;;WAEG;QACI,YAAO,GAAG,IAAI,KAAK,EAAU,CAAC;QAErC;;;WAGG;QACI,WAAM,GAAG,IAAI,KAAK,EAAS,CAAC;QAEnC;;WA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QAAQ,IAAK,OAAA,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAtC,CAAsC,CAAC,CAAC;QAC7E,OAAO,KAAK,CAAC;IACjB,CAAC;IA9LD;;OAEG;IACY,iCAAmB,GAAyC,EAAE,CAAC;IAE9E;;OAEG;IACY,2CAA6B,GAAmD,EAAE,CAAC;IAuLtG,oBAAC;CAAA,AAhMD,IAgMC;SAhMqB,aAAa","sourcesContent":["import type { Scene } from \"./scene\";\r\nimport type { Nullable } from \"./types\";\r\nimport type { AbstractMesh } from \"./Meshes/abstractMesh\";\r\nimport type { TransformNode } from \"./Meshes/transformNode\";\r\nimport type { Geometry } from \"./Meshes/geometry\";\r\nimport type { Skeleton } from \"./Bones/skeleton\";\r\nimport type { MorphTargetManager } from \"./Morph/morphTargetManager\";\r\nimport type { AssetContainer } from \"./assetContainer\";\r\nimport type { IParticleSystem } from \"./Particles/IParticleSystem\";\r\nimport type { AnimationGroup } from \"./Animations/animationGroup\";\r\nimport type { BaseTexture } from \"./Materials/Textures/baseTexture\";\r\nimport type { Material } from \"./Materials/material\";\r\nimport type { MultiMaterial } from \"./Materials/multiMaterial\";\r\nimport type { AbstractActionManager } from \"./Actions/abstractActionManager\";\r\nimport type { Camera } from \"./Cameras/camera\";\r\nimport type { Light } from \"./Lights/light\";\r\nimport type { Node } from \"./node\";\r\n\r\ndeclare type Animation = import(\"./Animations/animation\").Animation;\r\ndeclare type PostProcess = import(\"./PostProcesses/postProcess\").PostProcess;\r\n\r\n/**\r\n * Defines how the parser contract is defined.\r\n * These parsers are used to parse a list of specific assets (like particle systems, etc..)\r\n */\r\nexport type BabylonFileParser = (parsedData: any, scene: Scene, container: AssetContainer, rootUrl: string) => void;\r\n\r\n/**\r\n * Defines how the individual parser contract is defined.\r\n * These parser can parse an individual asset\r\n */\r\nexport type IndividualBabylonFileParser = (parsedData: any, scene: Scene, rootUrl: string) => any;\r\n\r\n/**\r\n * Base class of the scene acting as a container for the different elements composing a scene.\r\n * This class is dynamically extended by the different components of the scene increasing\r\n * flexibility and reducing coupling\r\n */\r\nexport abstract class AbstractScene {\r\n /**\r\n * Stores the list of available parsers in the application.\r\n */\r\n private static _BabylonFileParsers: { [key: string]: BabylonFileParser } = {};\r\n\r\n /**\r\n * Stores the list of available individual parsers in the application.\r\n */\r\n private static _IndividualBabylonFileParsers: { [key: string]: IndividualBabylonFileParser } = {};\r\n\r\n /**\r\n * Adds a parser in the list of available ones\r\n * @param name Defines the name of the parser\r\n * @param parser Defines the parser to add\r\n */\r\n public static AddParser(name: string, parser: BabylonFileParser): void {\r\n this._BabylonFileParsers[name] = parser;\r\n }\r\n\r\n /**\r\n * Gets a general parser from the list of available ones\r\n * @param name Defines the name of the parser\r\n * @returns the requested parser or null\r\n */\r\n public static GetParser(name: string): Nullable<BabylonFileParser> {\r\n if (this._BabylonFileParsers[name]) {\r\n return this._BabylonFileParsers[name];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Adds n individual parser in the list of available ones\r\n * @param name Defines the name of the parser\r\n * @param parser Defines the parser to add\r\n */\r\n public static AddIndividualParser(name: string, parser: IndividualBabylonFileParser): void {\r\n this._IndividualBabylonFileParsers[name] = parser;\r\n }\r\n\r\n /**\r\n * Gets an individual parser from the list of available ones\r\n * @param name Defines the name of the parser\r\n * @returns the requested parser or null\r\n */\r\n public static GetIndividualParser(name: string): Nullable<IndividualBabylonFileParser> {\r\n if (this._IndividualBabylonFileParsers[name]) {\r\n return this._IndividualBabylonFileParsers[name];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Parser json data and populate both a scene and its associated container object\r\n * @param jsonData Defines the data to parse\r\n * @param scene Defines the scene to parse the data for\r\n * @param container Defines the container attached to the parsing sequence\r\n * @param rootUrl Defines the root url of the data\r\n */\r\n public static Parse(jsonData: any, scene: Scene, container: AssetContainer, rootUrl: string): void {\r\n for (const parserName in this._BabylonFileParsers) {\r\n if (Object.prototype.hasOwnProperty.call(this._BabylonFileParsers, parserName)) {\r\n this._BabylonFileParsers[parserName](jsonData, scene, container, rootUrl);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets the list of root nodes (ie. nodes with no parent)\r\n */\r\n public rootNodes = new Array<Node>();\r\n\r\n /** All of the cameras added to this scene\r\n * @see https://doc.babylonjs.com/babylon101/cameras\r\n */\r\n public cameras = new Array<Camera>();\r\n\r\n /**\r\n * All of the lights added to this scene\r\n * @see https://doc.babylonjs.com/babylon101/lights\r\n */\r\n public lights = new Array<Light>();\r\n\r\n /**\r\n * All of the (abstract) meshes added to this scene\r\n */\r\n public meshes = new Array<AbstractMesh>();\r\n\r\n /**\r\n * The list of skeletons added to the scene\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_bones_and_skeletons\r\n */\r\n public skeletons = new Array<Skeleton>();\r\n\r\n /**\r\n * All of the particle systems added to this scene\r\n * @see https://doc.babylonjs.com/babylon101/particles\r\n */\r\n public particleSystems = new Array<IParticleSystem>();\r\n\r\n /**\r\n * Gets a list of Animations associated with the scene\r\n */\r\n public animations: Animation[] = [];\r\n\r\n /**\r\n * All of the animation groups added to this scene\r\n * @see https://doc.babylonjs.com/divingDeeper/animation/groupAnimations\r\n */\r\n public animationGroups = new Array<AnimationGroup>();\r\n\r\n /**\r\n * All of the multi-materials added to this scene\r\n * @see https://doc.babylonjs.com/how_to/multi_materials\r\n */\r\n public multiMaterials = new Array<MultiMaterial>();\r\n\r\n /**\r\n * All of the materials added to this scene\r\n * In the context of a Scene, it is not supposed to be modified manually.\r\n * Any addition or removal should be done using the addMaterial and removeMaterial Scene methods.\r\n * Note also that the order of the Material within the array is not significant and might change.\r\n * @see https://doc.babylonjs.com/babylon101/materials\r\n */\r\n public materials = new Array<Material>();\r\n\r\n /**\r\n * The list of morph target managers added to the scene\r\n * @see https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh\r\n */\r\n public morphTargetManagers = new Array<MorphTargetManager>();\r\n\r\n /**\r\n * The list of geometries used in the scene.\r\n */\r\n public geometries = new Array<Geometry>();\r\n\r\n /**\r\n * All of the transform nodes added to this scene\r\n * In the context of a Scene, it is not supposed to be modified manually.\r\n * Any addition or removal should be done using the addTransformNode and removeTransformNode Scene methods.\r\n * Note also that the order of the TransformNode within the array is not significant and might change.\r\n * @see https://doc.babylonjs.com/how_to/transformnode\r\n */\r\n public transformNodes = new Array<TransformNode>();\r\n\r\n /**\r\n * ActionManagers available on the scene.\r\n * @deprecated\r\n */\r\n public actionManagers = new Array<AbstractActionManager>();\r\n\r\n /**\r\n * Textures to keep.\r\n */\r\n public textures = new Array<BaseTexture>();\r\n\r\n /** @hidden */\r\n protected _environmentTexture: Nullable<BaseTexture> = null;\r\n /**\r\n * Texture used in all pbr material as the reflection texture.\r\n * As in the majority of the scene they are the same (exception for multi room and so on),\r\n * this is easier to reference from here than from all the materials.\r\n */\r\n public get environmentTexture(): Nullable<BaseTexture> {\r\n return this._environmentTexture;\r\n }\r\n\r\n public set environmentTexture(value: Nullable<BaseTexture>) {\r\n this._environmentTexture = value;\r\n }\r\n\r\n /**\r\n * The list of postprocesses added to the scene\r\n */\r\n public postProcesses = new Array<PostProcess>();\r\n\r\n /**\r\n * @returns all meshes, lights, cameras, transformNodes and bones\r\n */\r\n public getNodes(): Array<Node> {\r\n let nodes = new Array<Node>();\r\n nodes = nodes.concat(this.meshes);\r\n nodes = nodes.concat(this.lights);\r\n nodes = nodes.concat(this.cameras);\r\n nodes = nodes.concat(this.transformNodes); // dummies\r\n this.skeletons.forEach((skeleton) => (nodes = nodes.concat(skeleton.bones)));\r\n return nodes;\r\n }\r\n}\r\n"]}
|
package/package.json
CHANGED
package/scene.d.ts
CHANGED
|
@@ -1380,6 +1380,7 @@ export declare class Scene extends AbstractScene implements IAnimatable, IClipPl
|
|
|
1380
1380
|
removeMaterial(toRemove: Material): number;
|
|
1381
1381
|
/**
|
|
1382
1382
|
* Removes the given action manager from this scene.
|
|
1383
|
+
* @deprecated
|
|
1383
1384
|
* @param toRemove The action manager to remove
|
|
1384
1385
|
* @returns The index of the removed action manager
|
|
1385
1386
|
*/
|
|
@@ -1446,6 +1447,7 @@ export declare class Scene extends AbstractScene implements IAnimatable, IClipPl
|
|
|
1446
1447
|
addGeometry(newGeometry: Geometry): void;
|
|
1447
1448
|
/**
|
|
1448
1449
|
* Adds the given action manager to this scene
|
|
1450
|
+
* @deprecated
|
|
1449
1451
|
* @param newActionManager The action manager to add
|
|
1450
1452
|
*/
|
|
1451
1453
|
addActionManager(newActionManager: AbstractActionManager): void;
|
package/scene.js
CHANGED
|
@@ -26,7 +26,6 @@ import { UniqueIdGenerator } from "./Misc/uniqueIdGenerator.js";
|
|
|
26
26
|
import { ReadFile, RequestFile, LoadFile } from "./Misc/fileTools.js";
|
|
27
27
|
import { LightConstants } from "./Lights/lightConstants.js";
|
|
28
28
|
import { ComputePressureObserverWrapper } from "./Misc/computePressure.js";
|
|
29
|
-
import { SliceTools } from "./Misc/sliceTools.js";
|
|
30
29
|
/**
|
|
31
30
|
* Represents a scene to be rendered by the engine.
|
|
32
31
|
* @see https://doc.babylonjs.com/features/scene
|
|
@@ -1738,15 +1737,12 @@ var Scene = /** @class */ (function (_super) {
|
|
|
1738
1737
|
* @param checkRenderTargets true to also check that the meshes rendered as part of a render target are ready (default: false)
|
|
1739
1738
|
*/
|
|
1740
1739
|
Scene.prototype.executeWhenReady = function (func, checkRenderTargets) {
|
|
1741
|
-
var _this = this;
|
|
1742
1740
|
if (checkRenderTargets === void 0) { checkRenderTargets = false; }
|
|
1743
1741
|
this.onReadyObservable.add(func);
|
|
1744
1742
|
if (this._executeWhenReadyTimeoutId !== null) {
|
|
1745
1743
|
return;
|
|
1746
1744
|
}
|
|
1747
|
-
this.
|
|
1748
|
-
_this._checkIsReady(checkRenderTargets);
|
|
1749
|
-
}, 150);
|
|
1745
|
+
this._checkIsReady(checkRenderTargets);
|
|
1750
1746
|
};
|
|
1751
1747
|
/**
|
|
1752
1748
|
* Returns a promise that resolves when the scene is ready
|
|
@@ -2155,6 +2151,7 @@ var Scene = /** @class */ (function (_super) {
|
|
|
2155
2151
|
};
|
|
2156
2152
|
/**
|
|
2157
2153
|
* Removes the given action manager from this scene.
|
|
2154
|
+
* @deprecated
|
|
2158
2155
|
* @param toRemove The action manager to remove
|
|
2159
2156
|
* @returns The index of the removed action manager
|
|
2160
2157
|
*/
|
|
@@ -2316,6 +2313,7 @@ var Scene = /** @class */ (function (_super) {
|
|
|
2316
2313
|
};
|
|
2317
2314
|
/**
|
|
2318
2315
|
* Adds the given action manager to this scene
|
|
2316
|
+
* @deprecated
|
|
2319
2317
|
* @param newActionManager The action manager to add
|
|
2320
2318
|
*/
|
|
2321
2319
|
Scene.prototype.addActionManager = function (newActionManager) {
|
|
@@ -4037,7 +4035,7 @@ var Scene = /** @class */ (function (_super) {
|
|
|
4037
4035
|
this._isDisposed = true;
|
|
4038
4036
|
};
|
|
4039
4037
|
Scene.prototype._disposeList = function (items, callback) {
|
|
4040
|
-
var itemsCopy =
|
|
4038
|
+
var itemsCopy = items.slice(0);
|
|
4041
4039
|
callback = callback !== null && callback !== void 0 ? callback : (function (item) { return item.dispose(); });
|
|
4042
4040
|
for (var _i = 0, itemsCopy_1 = itemsCopy; _i < itemsCopy_1.length; _i++) {
|
|
4043
4041
|
var item = itemsCopy_1[_i];
|