@onerjs/core 8.32.7 → 8.32.9
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/Audio/sound.js +0 -1
- package/Audio/sound.js.map +1 -1
- package/AudioV2/abstractAudio/abstractSoundSource.js +12 -4
- package/AudioV2/abstractAudio/abstractSoundSource.js.map +1 -1
- package/AudioV2/webAudio/webAudioStaticSound.js +10 -3
- package/AudioV2/webAudio/webAudioStaticSound.js.map +1 -1
- package/Engines/Extensions/engine.prefilteredCubeTexture.js +1 -1
- package/Engines/Extensions/engine.prefilteredCubeTexture.js.map +1 -1
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/baseWithPropertiesPostProcessBlock.js +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/baseWithPropertiesPostProcessBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.d.ts +18 -0
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +105 -15
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js +7 -7
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.js +1 -1
- package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.js.map +1 -1
- package/FrameGraph/Passes/pass.d.ts +11 -2
- package/FrameGraph/Passes/pass.js +14 -2
- package/FrameGraph/Passes/pass.js.map +1 -1
- package/FrameGraph/Passes/renderPass.d.ts +4 -2
- package/FrameGraph/Passes/renderPass.js +5 -2
- package/FrameGraph/Passes/renderPass.js.map +1 -1
- package/FrameGraph/Tasks/Layers/baseLayerTask.js +27 -31
- package/FrameGraph/Tasks/Layers/baseLayerTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/objectRendererTask.d.ts +41 -1
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js +122 -0
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
- package/FrameGraph/Tasks/Texture/clearTextureTask.js +6 -4
- package/FrameGraph/Tasks/Texture/clearTextureTask.js.map +1 -1
- package/FrameGraph/frameGraph.js +3 -0
- package/FrameGraph/frameGraph.js.map +1 -1
- package/FrameGraph/frameGraphRenderTarget.js +1 -0
- package/FrameGraph/frameGraphRenderTarget.js.map +1 -1
- package/FrameGraph/frameGraphTask.d.ts +2 -0
- package/FrameGraph/frameGraphTask.js +11 -0
- package/FrameGraph/frameGraphTask.js.map +1 -1
- package/FrameGraph/frameGraphTypes.d.ts +8 -0
- package/FrameGraph/frameGraphTypes.js.map +1 -1
- package/Layers/effectLayer.d.ts +1 -1
- package/Layers/effectLayer.js.map +1 -1
- package/Layers/glowLayer.js +2 -0
- package/Layers/glowLayer.js.map +1 -1
- package/Layers/highlightLayer.js +2 -0
- package/Layers/highlightLayer.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.d.ts +9 -0
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +66 -22
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.js +3 -6
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.js.map +1 -1
- package/Materials/materialHelper.functions.js +2 -8
- package/Materials/materialHelper.functions.js.map +1 -1
- package/Materials/shaderMaterial.js +2 -2
- package/Materials/shaderMaterial.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +16 -6
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +37 -33
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Misc/snapshotRenderingHelper.js +10 -0
- package/Misc/snapshotRenderingHelper.js.map +1 -1
- package/Rendering/depthPeelingRenderer.d.ts +7 -78
- package/Rendering/depthPeelingRenderer.js +12 -398
- package/Rendering/depthPeelingRenderer.js.map +1 -1
- package/Rendering/depthPeelingSceneComponent.d.ts +3 -3
- package/Rendering/depthPeelingSceneComponent.js.map +1 -1
- package/Rendering/depthRenderer.js +9 -1
- package/Rendering/depthRenderer.js.map +1 -1
- package/Rendering/index.d.ts +1 -0
- package/Rendering/index.js +1 -0
- package/Rendering/index.js.map +1 -1
- package/Rendering/objectRenderer.d.ts +20 -0
- package/Rendering/objectRenderer.js +17 -1
- package/Rendering/objectRenderer.js.map +1 -1
- package/Rendering/renderingGroup.d.ts +10 -3
- package/Rendering/renderingGroup.js +24 -13
- package/Rendering/renderingGroup.js.map +1 -1
- package/Rendering/renderingManager.d.ts +6 -2
- package/Rendering/renderingManager.js +8 -2
- package/Rendering/renderingManager.js.map +1 -1
- package/Rendering/thinDepthPeelingRenderer.d.ts +120 -0
- package/Rendering/thinDepthPeelingRenderer.js +469 -0
- package/Rendering/thinDepthPeelingRenderer.js.map +1 -0
- package/Shaders/ShadersInclude/gaussianSplatting.js +1 -1
- package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/Shaders/gaussianSplatting.vertex.js +2 -2
- package/Shaders/gaussianSplatting.vertex.js.map +1 -1
- package/Shaders/gaussianSplattingDepth.fragment.js +9 -2
- package/Shaders/gaussianSplattingDepth.fragment.js.map +1 -1
- package/Shaders/gaussianSplattingDepth.vertex.js +13 -2
- package/Shaders/gaussianSplattingDepth.vertex.js.map +1 -1
- package/Shaders/oitFinalSimpleBlend.fragment.d.ts +5 -0
- package/Shaders/oitFinalSimpleBlend.fragment.js +12 -0
- package/Shaders/oitFinalSimpleBlend.fragment.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +1 -5
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/ShadersWGSL/gaussianSplatting.vertex.js +2 -2
- package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplattingDepth.fragment.js +12 -3
- package/ShadersWGSL/gaussianSplattingDepth.fragment.js.map +1 -1
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js +13 -2
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js.map +1 -1
- package/ShadersWGSL/iblVoxelGrid.vertex.d.ts +1 -0
- package/ShadersWGSL/iblVoxelGrid.vertex.js +15 -8
- package/ShadersWGSL/iblVoxelGrid.vertex.js.map +1 -1
- package/ShadersWGSL/oitFinalSimpleBlend.fragment.d.ts +5 -0
- package/ShadersWGSL/oitFinalSimpleBlend.fragment.js +13 -0
- package/ShadersWGSL/oitFinalSimpleBlend.fragment.js.map +1 -0
- package/node.d.ts +2 -0
- package/node.js +5 -0
- package/node.js.map +1 -1
- package/package.json +1 -1
package/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../../dev/core/src/node.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAS9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAQtE,gBAAgB;AAChB,MAAM,qBAAqB;IAA3B;QACW,oBAAe,GAAG,KAAK,CAAC;QACxB,gBAAW,GAAG,KAAK,CAAC;QACpB,yBAAoB,GAAG,CAAC,CAAC,CAAC;QAC1B,eAAU,GAAG,IAAI,CAAC;QAClB,qBAAgB,GAAG,IAAI,CAAC;QACxB,aAAQ,GAAG,IAAI,CAAC;QAChB,qCAAgC,GAAG,IAAI,UAAU,EAAW,CAAC;QAC7D,wBAAmB,GAAG,IAAI,UAAU,EAAQ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AAsB,GAAG,CAAC,KAAa,EAAE,KAAa,EAAE,GAAW,EAAkB,EAAE;IACjG,MAAM,WAAW,CAAC,gBAAgB,CAAC,CAAC;AACxC,CAAC,AAFmC,CAElC;AAEa,sBAAiB,GAA2B,EAAE,AAA7B,CAA8B;AAmCvD;IADN,SAAS,EAAE;kCACQ;AAMb;IADN,SAAS,EAAE;gCACM;AAMX;IADN,SAAS,EAAE;sCACY;AAMjB;IADN,SAAS,EAAE;mCACM;AAMX;IADN,SAAS,EAAE;sCACgB","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\r\nimport type { Scene } from \"./scene\";\r\nimport type { Nullable } from \"./types\";\r\nimport { Matrix, Vector3 } from \"./Maths/math.vector\";\r\nimport type { AbstractEngine } from \"./Engines/abstractEngine\";\r\nimport type { IBehaviorAware, Behavior } from \"./Behaviors/behavior\";\r\nimport { serialize } from \"./Misc/decorators\";\r\nimport type { Observer } from \"./Misc/observable\";\r\nimport { Observable } from \"./Misc/observable\";\r\nimport { EngineStore } from \"./Engines/engineStore\";\r\nimport { _WarnImport } from \"./Misc/devTools\";\r\nimport type { AbstractActionManager } from \"./Actions/abstractActionManager\";\r\nimport type { IInspectable } from \"./Misc/iInspectable\";\r\nimport type { IAccessibilityTag } from \"./IAccessibilityTag\";\r\nimport type { AnimationRange } from \"./Animations/animationRange\";\r\nimport type { AnimationPropertiesOverride } from \"./Animations/animationPropertiesOverride\";\r\nimport type { AbstractMesh } from \"./Meshes/abstractMesh\";\r\nimport type { Animation } from \"./Animations/animation\";\r\nimport type { Animatable } from \"./Animations/animatable.core\";\r\nimport { SerializationHelper } from \"./Misc/decorators.serialization\";\r\nimport type { IAssetContainer } from \"./IAssetContainer\";\r\n\r\n/**\r\n * Defines how a node can be built from a string name.\r\n */\r\nexport type NodeConstructor = (name: string, scene: Scene, options?: any) => () => Node;\r\n\r\n/** @internal */\r\nclass _InternalNodeDataInfo {\r\n public _doNotSerialize = false;\r\n public _isDisposed = false;\r\n public _sceneRootNodesIndex = -1;\r\n public _isEnabled = true;\r\n public _isParentEnabled = true;\r\n public _isReady = true;\r\n public _onEnabledStateChangedObservable = new Observable<boolean>();\r\n public _onClonedObservable = new Observable<Node>();\r\n public _inheritVisibility = false;\r\n public _isVisible = true;\r\n}\r\n\r\n/**\r\n * Node is the basic class for all scene objects (Mesh, Light, Camera.)\r\n */\r\nexport class Node implements IBehaviorAware<Node> {\r\n protected _isDirty = false;\r\n\r\n /**\r\n * @internal\r\n */\r\n public static _AnimationRangeFactory = (_name: string, _from: number, _to: number): AnimationRange => {\r\n throw _WarnImport(\"AnimationRange\");\r\n };\r\n\r\n private static _NodeConstructors: { [key: string]: any } = {};\r\n\r\n /**\r\n * Add a new node constructor\r\n * @param type defines the type name of the node to construct\r\n * @param constructorFunc defines the constructor function\r\n */\r\n public static AddNodeConstructor(type: string, constructorFunc: NodeConstructor) {\r\n this._NodeConstructors[type] = constructorFunc;\r\n }\r\n\r\n /**\r\n * Returns a node constructor based on type name\r\n * @param type defines the type name\r\n * @param name defines the new node name\r\n * @param scene defines the hosting scene\r\n * @param options defines optional options to transmit to constructors\r\n * @returns the new constructor or null\r\n */\r\n public static Construct(type: string, name: string, scene: Scene, options?: any): Nullable<() => Node> {\r\n const constructorFunc = this._NodeConstructors[type];\r\n\r\n if (!constructorFunc) {\r\n return null;\r\n }\r\n\r\n return constructorFunc(name, scene, options) as Nullable<() => Node>;\r\n }\r\n\r\n private _nodeDataStorage = new _InternalNodeDataInfo();\r\n\r\n /**\r\n * Gets or sets the name of the node\r\n */\r\n @serialize()\r\n public name: string;\r\n\r\n /**\r\n * Gets or sets the id of the node\r\n */\r\n @serialize()\r\n public id: string;\r\n\r\n /**\r\n * Gets or sets the unique id of the node\r\n */\r\n @serialize()\r\n public uniqueId: number;\r\n\r\n /**\r\n * Gets or sets a string used to store user defined state for the node\r\n */\r\n @serialize()\r\n public state = \"\";\r\n\r\n /**\r\n * Gets or sets an object used to store user defined information for the node\r\n */\r\n @serialize()\r\n public metadata: any = null;\r\n\r\n /** @internal */\r\n public _internalMetadata: any;\r\n\r\n /**\r\n * For internal use only. Please do not use.\r\n */\r\n public reservedDataStore: any = null;\r\n\r\n /**\r\n * List of inspectable custom properties (used by the Inspector)\r\n * @see https://doc.babylonjs.com/toolsAndResources/inspector#extensibility\r\n */\r\n public inspectableCustomProperties: IInspectable[];\r\n\r\n /**\r\n * Gets or sets the accessibility tag to describe the node for accessibility purpose.\r\n */\r\n public set accessibilityTag(value: Nullable<IAccessibilityTag>) {\r\n this._accessibilityTag = value;\r\n this.onAccessibilityTagChangedObservable.notifyObservers(value);\r\n }\r\n\r\n public get accessibilityTag() {\r\n return this._accessibilityTag;\r\n }\r\n\r\n protected _accessibilityTag: Nullable<IAccessibilityTag> = null;\r\n\r\n /**\r\n * Observable fired when an accessibility tag is changed\r\n */\r\n public onAccessibilityTagChangedObservable = new Observable<Nullable<IAccessibilityTag>>();\r\n\r\n /**\r\n * Gets or sets a boolean used to define if the node must be serialized\r\n */\r\n public get doNotSerialize() {\r\n if (this._nodeDataStorage._doNotSerialize) {\r\n return true;\r\n }\r\n\r\n if (this._parentNode) {\r\n return this._parentNode.doNotSerialize;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public set doNotSerialize(value: boolean) {\r\n this._nodeDataStorage._doNotSerialize = value;\r\n }\r\n\r\n /** @internal */\r\n public _parentContainer: Nullable<IAssetContainer> = null;\r\n\r\n /**\r\n * Gets a list of Animations associated with the node\r\n */\r\n public animations: Animation[] = [];\r\n protected _ranges: { [name: string]: Nullable<AnimationRange> } = {};\r\n\r\n /**\r\n * Callback raised when the node is ready to be used\r\n */\r\n public onReady: Nullable<(node: Node) => void> = null;\r\n\r\n /** @internal */\r\n public _currentRenderId = -1;\r\n private _parentUpdateId = -1;\r\n /** @internal */\r\n public _childUpdateId = -1;\r\n\r\n /** @internal */\r\n public _waitingParentId: Nullable<string> = null;\r\n /** @internal */\r\n public _waitingParentInstanceIndex: Nullable<string> = null;\r\n /** @internal */\r\n public _waitingParsedUniqueId: Nullable<number> = null;\r\n /** @internal */\r\n public _scene: Scene;\r\n /** @internal */\r\n public _cache: any = {};\r\n\r\n protected _parentNode: Nullable<Node> = null;\r\n\r\n /** @internal */\r\n protected _children: Nullable<Node[]> = null;\r\n\r\n /** @internal */\r\n public _worldMatrix = Matrix.Identity();\r\n /** @internal */\r\n public _worldMatrixDeterminant = 0;\r\n /** @internal */\r\n public _worldMatrixDeterminantIsDirty = true;\r\n\r\n /**\r\n * Gets a boolean indicating if the node has been disposed\r\n * @returns true if the node was disposed\r\n */\r\n public isDisposed(): boolean {\r\n return this._nodeDataStorage._isDisposed;\r\n }\r\n\r\n /**\r\n * Gets or sets the parent of the node (without keeping the current position in the scene)\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/parent_pivot/parent\r\n */\r\n public set parent(parent: Nullable<Node>) {\r\n if (this._parentNode === parent) {\r\n return;\r\n }\r\n\r\n const previousParentNode = this._parentNode;\r\n\r\n // Remove self from list of children of parent\r\n if (this._parentNode && this._parentNode._children !== undefined && this._parentNode._children !== null) {\r\n const index = this._parentNode._children.indexOf(this);\r\n if (index !== -1) {\r\n this._parentNode._children.splice(index, 1);\r\n }\r\n\r\n if (!parent && !this._nodeDataStorage._isDisposed) {\r\n this._addToSceneRootNodes();\r\n }\r\n }\r\n\r\n // Store new parent\r\n this._parentNode = parent;\r\n this._isDirty = true;\r\n\r\n // Add as child to new parent\r\n if (this._parentNode) {\r\n if (this._parentNode._children === undefined || this._parentNode._children === null) {\r\n this._parentNode._children = new Array<Node>();\r\n }\r\n this._parentNode._children.push(this);\r\n\r\n if (!previousParentNode) {\r\n this._removeFromSceneRootNodes();\r\n }\r\n }\r\n\r\n // Enabled state\r\n this._syncParentEnabledState();\r\n }\r\n\r\n public get parent(): Nullable<Node> {\r\n return this._parentNode;\r\n }\r\n\r\n /**\r\n * Control if the mesh is visible by system define\r\n */\r\n public _isSystemVisible = true;\r\n\r\n /**\r\n * If set to true, this node, when renderable, will only be visible if its parent(s) are also visible.\r\n * @default false\r\n */\r\n public get inheritVisibility(): boolean {\r\n return this._nodeDataStorage._inheritVisibility;\r\n }\r\n\r\n public set inheritVisibility(value: boolean) {\r\n this._nodeDataStorage._inheritVisibility = value;\r\n }\r\n\r\n /**\r\n * Gets or sets a boolean indicating whether this node is visible, either this node itself when it is renderable or its renderable child nodes when `inheritVisibility` is true.\r\n * @default true\r\n */\r\n public get isVisible(): boolean {\r\n if (!this._isSystemVisible) {\r\n return false;\r\n }\r\n if (this.inheritVisibility && this._parentNode && !this._parentNode.isVisible) {\r\n return false;\r\n }\r\n\r\n return this._nodeDataStorage._isVisible;\r\n }\r\n\r\n public set isVisible(value: boolean) {\r\n this._nodeDataStorage._isVisible = value;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _serializeAsParent(serializationObject: any): void {\r\n serializationObject.parentId = this.uniqueId;\r\n }\r\n\r\n /** @internal */\r\n public _addToSceneRootNodes() {\r\n if (this._nodeDataStorage._sceneRootNodesIndex === -1) {\r\n this._nodeDataStorage._sceneRootNodesIndex = this._scene.rootNodes.length;\r\n this._scene.rootNodes.push(this);\r\n }\r\n }\r\n\r\n /** @internal */\r\n public _removeFromSceneRootNodes() {\r\n if (this._nodeDataStorage._sceneRootNodesIndex !== -1) {\r\n const rootNodes = this._scene.rootNodes;\r\n const lastIdx = rootNodes.length - 1;\r\n rootNodes[this._nodeDataStorage._sceneRootNodesIndex] = rootNodes[lastIdx];\r\n rootNodes[this._nodeDataStorage._sceneRootNodesIndex]._nodeDataStorage._sceneRootNodesIndex = this._nodeDataStorage._sceneRootNodesIndex;\r\n this._scene.rootNodes.pop();\r\n this._nodeDataStorage._sceneRootNodesIndex = -1;\r\n }\r\n }\r\n\r\n private _animationPropertiesOverride: Nullable<AnimationPropertiesOverride> = null;\r\n\r\n /**\r\n * Gets or sets the animation properties override\r\n */\r\n public get animationPropertiesOverride(): Nullable<AnimationPropertiesOverride> {\r\n if (!this._animationPropertiesOverride) {\r\n return this._scene.animationPropertiesOverride;\r\n }\r\n return this._animationPropertiesOverride;\r\n }\r\n\r\n public set animationPropertiesOverride(value: Nullable<AnimationPropertiesOverride>) {\r\n this._animationPropertiesOverride = value;\r\n }\r\n\r\n /**\r\n * Gets a string identifying the name of the class\r\n * @returns \"Node\" string\r\n */\r\n public getClassName(): string {\r\n return \"Node\";\r\n }\r\n\r\n /** @internal */\r\n public readonly _isNode = true;\r\n\r\n /**\r\n * An event triggered when the mesh is disposed\r\n */\r\n public onDisposeObservable = new Observable<Node>();\r\n\r\n private _onDisposeObserver: Nullable<Observer<Node>> = null;\r\n /**\r\n * Sets a callback that will be raised when the node will be disposed\r\n */\r\n public set onDispose(callback: () => void) {\r\n if (this._onDisposeObserver) {\r\n this.onDisposeObservable.remove(this._onDisposeObserver);\r\n }\r\n this._onDisposeObserver = this.onDisposeObservable.add(callback);\r\n }\r\n\r\n /**\r\n * An event triggered when the enabled state of the node changes\r\n */\r\n public get onEnabledStateChangedObservable(): Observable<boolean> {\r\n return this._nodeDataStorage._onEnabledStateChangedObservable;\r\n }\r\n\r\n /**\r\n * An event triggered when the node is cloned\r\n */\r\n public get onClonedObservable(): Observable<Node> {\r\n return this._nodeDataStorage._onClonedObservable;\r\n }\r\n\r\n /**\r\n * Creates a new Node\r\n * @param name the name and id to be given to this node\r\n * @param scene the scene this node will be added to\r\n * @param isPure indicates this Node is just a Node, and not a derived class like Mesh or Camera\r\n */\r\n public constructor(name: string, scene: Nullable<Scene> = null, isPure = true) {\r\n this.name = name;\r\n this.id = name;\r\n this._scene = <Scene>(scene || EngineStore.LastCreatedScene);\r\n this.uniqueId = this._scene.getUniqueId();\r\n this._initCache();\r\n\r\n if (isPure) {\r\n this._addToSceneRootNodes();\r\n }\r\n }\r\n\r\n /**\r\n * Gets the scene of the node\r\n * @returns a scene\r\n */\r\n public getScene(): Scene {\r\n return this._scene;\r\n }\r\n\r\n /**\r\n * Gets the engine of the node\r\n * @returns a Engine\r\n */\r\n public getEngine(): AbstractEngine {\r\n return this._scene.getEngine();\r\n }\r\n\r\n // Behaviors\r\n private _behaviors = new Array<Behavior<Node>>();\r\n\r\n /**\r\n * Attach a behavior to the node\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors\r\n * @param behavior defines the behavior to attach\r\n * @param attachImmediately defines that the behavior must be attached even if the scene is still loading\r\n * @returns the current Node\r\n */\r\n public addBehavior(behavior: Behavior<Node>, attachImmediately = false): Node {\r\n const index = this._behaviors.indexOf(behavior);\r\n\r\n if (index !== -1) {\r\n return this;\r\n }\r\n\r\n behavior.init();\r\n if (this._scene.isLoading && !attachImmediately) {\r\n // We defer the attach when the scene will be loaded\r\n this._scene.onDataLoadedObservable.addOnce(() => {\r\n // Make sure the behavior has not been removed.\r\n if (this._behaviors.includes(behavior)) {\r\n behavior.attach(this);\r\n }\r\n });\r\n } else {\r\n behavior.attach(this);\r\n }\r\n this._behaviors.push(behavior);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Remove an attached behavior\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors\r\n * @param behavior defines the behavior to attach\r\n * @returns the current Node\r\n */\r\n public removeBehavior(behavior: Behavior<Node>): Node {\r\n const index = this._behaviors.indexOf(behavior);\r\n\r\n if (index === -1) {\r\n return this;\r\n }\r\n\r\n this._behaviors[index].detach();\r\n this._behaviors.splice(index, 1);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets the list of attached behaviors\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors\r\n */\r\n public get behaviors(): Behavior<Node>[] {\r\n return this._behaviors;\r\n }\r\n\r\n /**\r\n * Gets an attached behavior by name\r\n * @param name defines the name of the behavior to look for\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors\r\n * @returns null if behavior was not found else the requested behavior\r\n */\r\n public getBehaviorByName(name: string): Nullable<Behavior<Node>> {\r\n for (const behavior of this._behaviors) {\r\n if (behavior.name === name) {\r\n return behavior;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Returns the latest update of the World matrix\r\n * @returns a Matrix\r\n */\r\n public getWorldMatrix(): Matrix {\r\n if (this._currentRenderId !== this._scene.getRenderId()) {\r\n this.computeWorldMatrix();\r\n }\r\n return this._worldMatrix;\r\n }\r\n\r\n /** @internal */\r\n public _getWorldMatrixDeterminant(): number {\r\n if (this._worldMatrixDeterminantIsDirty) {\r\n this._worldMatrixDeterminantIsDirty = false;\r\n this._worldMatrixDeterminant = this._worldMatrix.determinant();\r\n }\r\n return this._worldMatrixDeterminant;\r\n }\r\n\r\n /**\r\n * Returns directly the latest state of the mesh World matrix.\r\n * A Matrix is returned.\r\n */\r\n public get worldMatrixFromCache(): Matrix {\r\n return this._worldMatrix;\r\n }\r\n\r\n // override it in derived class if you add new variables to the cache\r\n // and call the parent class method\r\n /** @internal */\r\n public _initCache() {\r\n this._cache = {};\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public updateCache(force?: boolean): void {\r\n if (!force && this.isSynchronized()) {\r\n return;\r\n }\r\n\r\n this._updateCache();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _getActionManagerForTrigger(trigger?: number, _initialCall = true): Nullable<AbstractActionManager> {\r\n if (!this.parent) {\r\n return null;\r\n }\r\n\r\n return this.parent._getActionManagerForTrigger(trigger, false);\r\n }\r\n\r\n // override it in derived class if you add new variables to the cache\r\n // and call the parent class method if !ignoreParentClass\r\n /**\r\n * @internal\r\n */\r\n public _updateCache(_ignoreParentClass?: boolean): void {}\r\n\r\n // override it in derived class if you add new variables to the cache\r\n /** @internal */\r\n public _isSynchronized(): boolean {\r\n return true;\r\n }\r\n\r\n /** @internal */\r\n public _markSyncedWithParent() {\r\n if (this._parentNode) {\r\n this._parentUpdateId = this._parentNode._childUpdateId;\r\n }\r\n }\r\n\r\n /** @internal */\r\n public isSynchronizedWithParent(): boolean {\r\n if (!this._parentNode) {\r\n return true;\r\n }\r\n\r\n if (this._parentNode._isDirty || this._parentUpdateId !== this._parentNode._childUpdateId) {\r\n return false;\r\n }\r\n\r\n return this._parentNode.isSynchronized();\r\n }\r\n\r\n /** @internal */\r\n public isSynchronized(): boolean {\r\n if (this._parentNode && !this.isSynchronizedWithParent()) {\r\n return false;\r\n }\r\n\r\n return this._isSynchronized();\r\n }\r\n\r\n /**\r\n * Is this node ready to be used/rendered\r\n * @param _completeCheck defines if a complete check (including materials and lights) has to be done (false by default)\r\n * @returns true if the node is ready\r\n */\r\n public isReady(_completeCheck = false): boolean {\r\n return this._nodeDataStorage._isReady;\r\n }\r\n\r\n /**\r\n * Flag the node as dirty (Forcing it to update everything)\r\n * @param _property helps children apply precise \"dirtyfication\"\r\n * @returns this node\r\n */\r\n public markAsDirty(_property?: string): Node {\r\n this._currentRenderId = Number.MAX_VALUE;\r\n this._isDirty = true;\r\n return this;\r\n }\r\n\r\n /**\r\n * Is this node enabled?\r\n * If the node has a parent, all ancestors will be checked and false will be returned if any are false (not enabled), otherwise will return true\r\n * @param checkAncestors indicates if this method should check the ancestors. The default is to check the ancestors. If set to false, the method will return the value of this node without checking ancestors\r\n * @returns whether this node (and its parent) is enabled\r\n */\r\n public isEnabled(checkAncestors: boolean = true): boolean {\r\n if (checkAncestors === false) {\r\n return this._nodeDataStorage._isEnabled;\r\n }\r\n\r\n if (!this._nodeDataStorage._isEnabled) {\r\n return false;\r\n }\r\n\r\n return this._nodeDataStorage._isParentEnabled;\r\n }\r\n\r\n /** @internal */\r\n protected _syncParentEnabledState() {\r\n this._nodeDataStorage._isParentEnabled = this._parentNode ? this._parentNode.isEnabled() : true;\r\n\r\n if (this._children) {\r\n for (const c of this._children) {\r\n c._syncParentEnabledState(); // Force children to update accordingly\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Set the enabled state of this node\r\n * @param value defines the new enabled state\r\n */\r\n public setEnabled(value: boolean): void {\r\n if (this._nodeDataStorage._isEnabled === value) {\r\n return;\r\n }\r\n this._nodeDataStorage._isEnabled = value;\r\n this._syncParentEnabledState();\r\n this._nodeDataStorage._onEnabledStateChangedObservable.notifyObservers(value);\r\n }\r\n\r\n /**\r\n * Is this node a descendant of the given node?\r\n * The function will iterate up the hierarchy until the ancestor was found or no more parents defined\r\n * @param ancestor defines the parent node to inspect\r\n * @returns a boolean indicating if this node is a descendant of the given node\r\n */\r\n public isDescendantOf(ancestor: Node): boolean {\r\n if (this.parent) {\r\n if (this.parent === ancestor) {\r\n return true;\r\n }\r\n\r\n return this.parent.isDescendantOf(ancestor);\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _getDescendants(results: Node[], directDescendantsOnly: boolean = false, predicate?: (node: Node) => boolean): void {\r\n if (!this._children) {\r\n return;\r\n }\r\n\r\n for (let index = 0; index < this._children.length; index++) {\r\n const item = this._children[index];\r\n\r\n if (!predicate || predicate(item)) {\r\n results.push(item);\r\n }\r\n\r\n if (!directDescendantsOnly) {\r\n item._getDescendants(results, false, predicate);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Will return all nodes that have this node as ascendant\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns all children nodes of all types\r\n */\r\n public getDescendants<T extends Node>(directDescendantsOnly?: boolean, predicate?: (node: Node) => node is T): T[];\r\n\r\n /**\r\n * Will return all nodes that have this node as ascendant\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns all children nodes of all types\r\n */\r\n public getDescendants(directDescendantsOnly?: boolean, predicate?: (node: Node) => boolean): Node[];\r\n\r\n /**\r\n * Will return all nodes that have this node as ascendant\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns all children nodes of all types\r\n */\r\n public getDescendants(directDescendantsOnly?: boolean, predicate?: (node: Node) => boolean): Node[] {\r\n const results: Node[] = [];\r\n\r\n this._getDescendants(results, directDescendantsOnly, predicate);\r\n\r\n return results;\r\n }\r\n\r\n /**\r\n * Get all child-meshes of this node\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: false)\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns an array of AbstractMesh\r\n */\r\n public getChildMeshes<T extends AbstractMesh>(directDescendantsOnly?: boolean, predicate?: (node: Node) => node is T): T[];\r\n\r\n /**\r\n * Get all child-meshes of this node\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: false)\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns an array of AbstractMesh\r\n */\r\n public getChildMeshes(directDescendantsOnly?: boolean, predicate?: (node: Node) => boolean): AbstractMesh[];\r\n\r\n /**\r\n * Get all child-meshes of this node\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: false)\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns an array of AbstractMesh\r\n */\r\n public getChildMeshes(directDescendantsOnly?: boolean, predicate?: (node: Node) => boolean): AbstractMesh[] {\r\n const results: Array<AbstractMesh> = [];\r\n this._getDescendants(results, directDescendantsOnly, (node: Node) => {\r\n return (!predicate || predicate(node)) && (<AbstractMesh>node).cullingStrategy !== undefined;\r\n });\r\n return results;\r\n }\r\n\r\n /**\r\n * Get all direct children of this node\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: true)\r\n * @returns an array of Node\r\n */\r\n public getChildren<T extends Node>(predicate?: (node: Node) => node is T, directDescendantsOnly?: boolean): T[];\r\n\r\n /**\r\n * Get all direct children of this node\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: true)\r\n * @returns an array of Node\r\n */\r\n public getChildren(predicate?: (node: Node) => boolean, directDescendantsOnly?: boolean): Node[];\r\n\r\n /**\r\n * Get all direct children of this node\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: true)\r\n * @returns an array of Node\r\n */\r\n public getChildren(predicate?: (node: Node) => boolean, directDescendantsOnly = true): Node[] {\r\n return this.getDescendants(directDescendantsOnly, predicate);\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _setReady(state: boolean): void {\r\n if (state === this._nodeDataStorage._isReady) {\r\n return;\r\n }\r\n\r\n if (!state) {\r\n this._nodeDataStorage._isReady = false;\r\n return;\r\n }\r\n\r\n if (this.onReady) {\r\n this.onReady(this);\r\n }\r\n this._nodeDataStorage._isReady = true;\r\n }\r\n\r\n /**\r\n * Get an animation by name\r\n * @param name defines the name of the animation to look for\r\n * @returns null if not found else the requested animation\r\n */\r\n public getAnimationByName(name: string): Nullable<Animation> {\r\n for (let i = 0; i < this.animations.length; i++) {\r\n const animation = this.animations[i];\r\n\r\n if (animation.name === name) {\r\n return animation;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Creates an animation range for this node\r\n * @param name defines the name of the range\r\n * @param from defines the starting key\r\n * @param to defines the end key\r\n */\r\n public createAnimationRange(name: string, from: number, to: number): void {\r\n // check name not already in use\r\n if (!this._ranges[name]) {\r\n this._ranges[name] = Node._AnimationRangeFactory(name, from, to);\r\n for (let i = 0, nAnimations = this.animations.length; i < nAnimations; i++) {\r\n if (this.animations[i]) {\r\n this.animations[i].createRange(name, from, to);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Delete a specific animation range\r\n * @param name defines the name of the range to delete\r\n * @param deleteFrames defines if animation frames from the range must be deleted as well\r\n */\r\n public deleteAnimationRange(name: string, deleteFrames = true): void {\r\n for (let i = 0, nAnimations = this.animations.length; i < nAnimations; i++) {\r\n if (this.animations[i]) {\r\n this.animations[i].deleteRange(name, deleteFrames);\r\n }\r\n }\r\n this._ranges[name] = null; // said much faster than 'delete this._range[name]'\r\n }\r\n\r\n /**\r\n * Get an animation range by name\r\n * @param name defines the name of the animation range to look for\r\n * @returns null if not found else the requested animation range\r\n */\r\n public getAnimationRange(name: string): Nullable<AnimationRange> {\r\n return this._ranges[name] || null;\r\n }\r\n\r\n /**\r\n * Clone the current node\r\n * @param name Name of the new clone\r\n * @param newParent New parent for the clone\r\n * @param doNotCloneChildren Do not clone children hierarchy\r\n * @returns the new transform node\r\n */\r\n public clone(name: string, newParent: Nullable<Node>, doNotCloneChildren?: boolean): Nullable<Node> {\r\n const result = SerializationHelper.Clone(() => new Node(name, this.getScene()), this);\r\n\r\n if (newParent) {\r\n result.parent = newParent;\r\n }\r\n\r\n if (!doNotCloneChildren) {\r\n // Children\r\n const directDescendants = this.getDescendants(true);\r\n for (let index = 0; index < directDescendants.length; index++) {\r\n const child = directDescendants[index];\r\n\r\n child.clone(name + \".\" + child.name, result);\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the list of all animation ranges defined on this node\r\n * @returns an array\r\n */\r\n public getAnimationRanges(): Nullable<AnimationRange>[] {\r\n const animationRanges: Nullable<AnimationRange>[] = [];\r\n let name: string;\r\n for (name in this._ranges) {\r\n animationRanges.push(this._ranges[name]);\r\n }\r\n return animationRanges;\r\n }\r\n\r\n /**\r\n * Will start the animation sequence\r\n * @param name defines the range frames for animation sequence\r\n * @param loop defines if the animation should loop (false by default)\r\n * @param speedRatio defines the speed factor in which to run the animation (1 by default)\r\n * @param onAnimationEnd defines a function to be executed when the animation ended (undefined by default)\r\n * @returns the object created for this animation. If range does not exist, it will return null\r\n */\r\n public beginAnimation(name: string, loop?: boolean, speedRatio?: number, onAnimationEnd?: () => void): Nullable<Animatable> {\r\n const range = this.getAnimationRange(name);\r\n\r\n if (!range) {\r\n return null;\r\n }\r\n\r\n return this._scene.beginAnimation(this, range.from, range.to, loop, speedRatio, onAnimationEnd);\r\n }\r\n\r\n /**\r\n * Serialize animation ranges into a JSON compatible object\r\n * @returns serialization object\r\n */\r\n public serializeAnimationRanges(): any {\r\n const serializationRanges = [];\r\n for (const name in this._ranges) {\r\n const localRange = this._ranges[name];\r\n if (!localRange) {\r\n continue;\r\n }\r\n const range: any = {};\r\n range.name = name;\r\n range.from = localRange.from;\r\n range.to = localRange.to;\r\n serializationRanges.push(range);\r\n }\r\n return serializationRanges;\r\n }\r\n\r\n /**\r\n * Computes the world matrix of the node\r\n * @param _force defines if the cache version should be invalidated forcing the world matrix to be created from scratch\r\n * @returns the world matrix\r\n */\r\n public computeWorldMatrix(_force?: boolean): Matrix {\r\n if (!this._worldMatrix) {\r\n this._worldMatrix = Matrix.Identity();\r\n }\r\n return this._worldMatrix;\r\n }\r\n\r\n public getMetadata(): any {\r\n if (!this.metadata) {\r\n this.metadata = {};\r\n }\r\n return this.metadata;\r\n }\r\n\r\n public getMetadataByKey(key: string): any {\r\n const metadata = this.getMetadata();\r\n return metadata[key];\r\n }\r\n\r\n /**\r\n * Releases resources associated with this node.\r\n * @param doNotRecurse Set to true to not recurse into each children (recurse into each children by default)\r\n * @param disposeMaterialAndTextures Set to true to also dispose referenced materials and textures (false by default)\r\n */\r\n public dispose(doNotRecurse?: boolean, disposeMaterialAndTextures = false): void {\r\n this._nodeDataStorage._isDisposed = true;\r\n\r\n if (!doNotRecurse) {\r\n const nodes = this.getDescendants(true);\r\n for (const node of nodes) {\r\n node.dispose(doNotRecurse, disposeMaterialAndTextures);\r\n }\r\n }\r\n\r\n if (!this.parent) {\r\n this._removeFromSceneRootNodes();\r\n } else {\r\n this.parent = null;\r\n }\r\n\r\n // Callback\r\n this.onDisposeObservable.notifyObservers(this);\r\n this.onDisposeObservable.clear();\r\n\r\n this.onEnabledStateChangedObservable.clear();\r\n this.onClonedObservable.clear();\r\n\r\n // Behaviors\r\n for (const behavior of this._behaviors) {\r\n behavior.detach();\r\n }\r\n\r\n this._behaviors.length = 0;\r\n\r\n this.metadata = null;\r\n }\r\n\r\n /**\r\n * Parse animation range data from a serialization object and store them into a given node\r\n * @param node defines where to store the animation ranges\r\n * @param parsedNode defines the serialization object to read data from\r\n * @param _scene defines the hosting scene\r\n */\r\n public static ParseAnimationRanges(node: Node, parsedNode: any, _scene: Scene): void {\r\n if (parsedNode.ranges) {\r\n for (let index = 0; index < parsedNode.ranges.length; index++) {\r\n const data = parsedNode.ranges[index];\r\n node.createAnimationRange(data.name, data.from, data.to);\r\n }\r\n }\r\n }\r\n /**\r\n * Return the minimum and maximum world vectors of the entire hierarchy under current node\r\n * @param includeDescendants Include bounding info from descendants as well (true by default)\r\n * @param predicate defines a callback function that can be customize to filter what meshes should be included in the list used to compute the bounding vectors\r\n * @returns the new bounding vectors\r\n */\r\n public getHierarchyBoundingVectors(includeDescendants = true, predicate: Nullable<(abstractMesh: AbstractMesh) => boolean> = null): { min: Vector3; max: Vector3 } {\r\n // Ensures that all world matrix will be recomputed.\r\n this.getScene().incrementRenderId();\r\n\r\n this.computeWorldMatrix(true);\r\n\r\n let min: Vector3;\r\n let max: Vector3;\r\n\r\n const thisAbstractMesh = this as Node as AbstractMesh;\r\n if (thisAbstractMesh.getBoundingInfo && thisAbstractMesh.subMeshes) {\r\n // If this is an abstract mesh get its bounding info\r\n const boundingInfo = thisAbstractMesh.getBoundingInfo();\r\n min = boundingInfo.boundingBox.minimumWorld.clone();\r\n max = boundingInfo.boundingBox.maximumWorld.clone();\r\n } else {\r\n min = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\r\n max = new Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\r\n }\r\n\r\n if (includeDescendants) {\r\n const descendants = this.getDescendants(false);\r\n\r\n for (const descendant of descendants) {\r\n const childMesh = <AbstractMesh>descendant;\r\n childMesh.computeWorldMatrix(true);\r\n\r\n // Filters meshes based on custom predicate function.\r\n if (predicate && !predicate(childMesh)) {\r\n continue;\r\n }\r\n\r\n //make sure we have the needed params to get mix and max\r\n if (!childMesh.getBoundingInfo || childMesh.getTotalVertices() === 0) {\r\n continue;\r\n }\r\n\r\n const childBoundingInfo = childMesh.getBoundingInfo();\r\n const boundingBox = childBoundingInfo.boundingBox;\r\n\r\n const minBox = boundingBox.minimumWorld;\r\n const maxBox = boundingBox.maximumWorld;\r\n\r\n Vector3.CheckExtends(minBox, min, max);\r\n Vector3.CheckExtends(maxBox, min, max);\r\n }\r\n }\r\n\r\n return {\r\n min: min,\r\n max: max,\r\n };\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../../dev/core/src/node.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;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ED,wDAAwD;gBACxD,IAAI,CAAC,SAAS,CAAC,eAAe,IAAI,SAAS,CAAC,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC;oBACnE,SAAS;gBACb,CAAC;gBAED,MAAM,iBAAiB,GAAG,SAAS,CAAC,eAAe,EAAE,CAAC;gBACtD,MAAM,WAAW,GAAG,iBAAiB,CAAC,WAAW,CAAC;gBAElD,MAAM,MAAM,GAAG,WAAW,CAAC,YAAY,CAAC;gBACxC,MAAM,MAAM,GAAG,WAAW,CAAC,YAAY,CAAC;gBAExC,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;gBACvC,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;YAC3C,CAAC;QACL,CAAC;QAED,OAAO;YACH,GAAG,EAAE,GAAG;YACR,GAAG,EAAE,GAAG;SACX,CAAC;IACN,CAAC;;AApgCD;;GAEG;AACW,2BAAsB,GAAG,CAAC,KAAa,EAAE,KAAa,EAAE,GAAW,EAAkB,EAAE;IACjG,MAAM,WAAW,CAAC,gBAAgB,CAAC,CAAC;AACxC,CAAC,AAFmC,CAElC;AAEa,sBAAiB,GAA2B,EAAE,AAA7B,CAA8B;AAmCvD;IADN,SAAS,EAAE;kCACQ;AAMb;IADN,SAAS,EAAE;gCACM;AAMX;IADN,SAAS,EAAE;sCACY;AAMjB;IADN,SAAS,EAAE;mCACM;AAMX;IADN,SAAS,EAAE;sCACgB","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\r\nimport type { Scene } from \"./scene\";\r\nimport type { Nullable } from \"./types\";\r\nimport { Matrix, Vector3 } from \"./Maths/math.vector\";\r\nimport type { AbstractEngine } from \"./Engines/abstractEngine\";\r\nimport type { IBehaviorAware, Behavior } from \"./Behaviors/behavior\";\r\nimport { serialize } from \"./Misc/decorators\";\r\nimport type { Observer } from \"./Misc/observable\";\r\nimport { Observable } from \"./Misc/observable\";\r\nimport { EngineStore } from \"./Engines/engineStore\";\r\nimport { _WarnImport } from \"./Misc/devTools\";\r\nimport type { AbstractActionManager } from \"./Actions/abstractActionManager\";\r\nimport type { IInspectable } from \"./Misc/iInspectable\";\r\nimport type { IAccessibilityTag } from \"./IAccessibilityTag\";\r\nimport type { AnimationRange } from \"./Animations/animationRange\";\r\nimport type { AnimationPropertiesOverride } from \"./Animations/animationPropertiesOverride\";\r\nimport type { AbstractMesh } from \"./Meshes/abstractMesh\";\r\nimport type { Animation } from \"./Animations/animation\";\r\nimport type { Animatable } from \"./Animations/animatable.core\";\r\nimport { SerializationHelper } from \"./Misc/decorators.serialization\";\r\nimport type { IAssetContainer } from \"./IAssetContainer\";\r\n\r\n/**\r\n * Defines how a node can be built from a string name.\r\n */\r\nexport type NodeConstructor = (name: string, scene: Scene, options?: any) => () => Node;\r\n\r\n/** @internal */\r\nclass _InternalNodeDataInfo {\r\n public _doNotSerialize = false;\r\n public _isDisposed = false;\r\n public _sceneRootNodesIndex = -1;\r\n public _isEnabled = true;\r\n public _isParentEnabled = true;\r\n public _isReady = true;\r\n public _onEnabledStateChangedObservable = new Observable<boolean>();\r\n public _onClonedObservable = new Observable<Node>();\r\n public _inheritVisibility = false;\r\n public _isVisible = true;\r\n}\r\n\r\n/**\r\n * Node is the basic class for all scene objects (Mesh, Light, Camera.)\r\n */\r\nexport class Node implements IBehaviorAware<Node> {\r\n protected _isDirty = false;\r\n\r\n /**\r\n * @internal\r\n */\r\n public static _AnimationRangeFactory = (_name: string, _from: number, _to: number): AnimationRange => {\r\n throw _WarnImport(\"AnimationRange\");\r\n };\r\n\r\n private static _NodeConstructors: { [key: string]: any } = {};\r\n\r\n /**\r\n * Add a new node constructor\r\n * @param type defines the type name of the node to construct\r\n * @param constructorFunc defines the constructor function\r\n */\r\n public static AddNodeConstructor(type: string, constructorFunc: NodeConstructor) {\r\n this._NodeConstructors[type] = constructorFunc;\r\n }\r\n\r\n /**\r\n * Returns a node constructor based on type name\r\n * @param type defines the type name\r\n * @param name defines the new node name\r\n * @param scene defines the hosting scene\r\n * @param options defines optional options to transmit to constructors\r\n * @returns the new constructor or null\r\n */\r\n public static Construct(type: string, name: string, scene: Scene, options?: any): Nullable<() => Node> {\r\n const constructorFunc = this._NodeConstructors[type];\r\n\r\n if (!constructorFunc) {\r\n return null;\r\n }\r\n\r\n return constructorFunc(name, scene, options) as Nullable<() => Node>;\r\n }\r\n\r\n private _nodeDataStorage = new _InternalNodeDataInfo();\r\n\r\n /**\r\n * Gets or sets the name of the node\r\n */\r\n @serialize()\r\n public name: string;\r\n\r\n /**\r\n * Gets or sets the id of the node\r\n */\r\n @serialize()\r\n public id: string;\r\n\r\n /**\r\n * Gets or sets the unique id of the node\r\n */\r\n @serialize()\r\n public uniqueId: number;\r\n\r\n /**\r\n * Gets or sets a string used to store user defined state for the node\r\n */\r\n @serialize()\r\n public state = \"\";\r\n\r\n /**\r\n * Gets or sets an object used to store user defined information for the node\r\n */\r\n @serialize()\r\n public metadata: any = null;\r\n\r\n /** @internal */\r\n public _internalMetadata: any;\r\n\r\n /**\r\n * For internal use only. Please do not use.\r\n */\r\n public reservedDataStore: any = null;\r\n\r\n /**\r\n * List of inspectable custom properties (used by the Inspector)\r\n * @see https://doc.babylonjs.com/toolsAndResources/inspector#extensibility\r\n */\r\n public inspectableCustomProperties: IInspectable[];\r\n /** @internal */\r\n public _internalEnabled = true;\r\n\r\n /**\r\n * Gets or sets the accessibility tag to describe the node for accessibility purpose.\r\n */\r\n public set accessibilityTag(value: Nullable<IAccessibilityTag>) {\r\n this._accessibilityTag = value;\r\n this.onAccessibilityTagChangedObservable.notifyObservers(value);\r\n }\r\n\r\n public get accessibilityTag() {\r\n return this._accessibilityTag;\r\n }\r\n\r\n protected _accessibilityTag: Nullable<IAccessibilityTag> = null;\r\n\r\n /**\r\n * Observable fired when an accessibility tag is changed\r\n */\r\n public onAccessibilityTagChangedObservable = new Observable<Nullable<IAccessibilityTag>>();\r\n\r\n /**\r\n * Gets or sets a boolean used to define if the node must be serialized\r\n */\r\n public get doNotSerialize() {\r\n if (this._nodeDataStorage._doNotSerialize) {\r\n return true;\r\n }\r\n\r\n if (this._parentNode) {\r\n return this._parentNode.doNotSerialize;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public set doNotSerialize(value: boolean) {\r\n this._nodeDataStorage._doNotSerialize = value;\r\n }\r\n\r\n /** @internal */\r\n public _parentContainer: Nullable<IAssetContainer> = null;\r\n\r\n /**\r\n * Gets a list of Animations associated with the node\r\n */\r\n public animations: Animation[] = [];\r\n protected _ranges: { [name: string]: Nullable<AnimationRange> } = {};\r\n\r\n /**\r\n * Callback raised when the node is ready to be used\r\n */\r\n public onReady: Nullable<(node: Node) => void> = null;\r\n\r\n /** @internal */\r\n public _currentRenderId = -1;\r\n private _parentUpdateId = -1;\r\n /** @internal */\r\n public _childUpdateId = -1;\r\n\r\n /** @internal */\r\n public _waitingParentId: Nullable<string> = null;\r\n /** @internal */\r\n public _waitingParentInstanceIndex: Nullable<string> = null;\r\n /** @internal */\r\n public _waitingParsedUniqueId: Nullable<number> = null;\r\n /** @internal */\r\n public _scene: Scene;\r\n /** @internal */\r\n public _cache: any = {};\r\n\r\n protected _parentNode: Nullable<Node> = null;\r\n\r\n /** @internal */\r\n protected _children: Nullable<Node[]> = null;\r\n\r\n /** @internal */\r\n public _worldMatrix = Matrix.Identity();\r\n /** @internal */\r\n public _worldMatrixDeterminant = 0;\r\n /** @internal */\r\n public _worldMatrixDeterminantIsDirty = true;\r\n\r\n /**\r\n * Gets a boolean indicating if the node has been disposed\r\n * @returns true if the node was disposed\r\n */\r\n public isDisposed(): boolean {\r\n return this._nodeDataStorage._isDisposed;\r\n }\r\n\r\n /**\r\n * Gets or sets the parent of the node (without keeping the current position in the scene)\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/parent_pivot/parent\r\n */\r\n public set parent(parent: Nullable<Node>) {\r\n if (this._parentNode === parent) {\r\n return;\r\n }\r\n\r\n const previousParentNode = this._parentNode;\r\n\r\n // Remove self from list of children of parent\r\n if (this._parentNode && this._parentNode._children !== undefined && this._parentNode._children !== null) {\r\n const index = this._parentNode._children.indexOf(this);\r\n if (index !== -1) {\r\n this._parentNode._children.splice(index, 1);\r\n }\r\n\r\n if (!parent && !this._nodeDataStorage._isDisposed) {\r\n this._addToSceneRootNodes();\r\n }\r\n }\r\n\r\n // Store new parent\r\n this._parentNode = parent;\r\n this._isDirty = true;\r\n\r\n // Add as child to new parent\r\n if (this._parentNode) {\r\n if (this._parentNode._children === undefined || this._parentNode._children === null) {\r\n this._parentNode._children = new Array<Node>();\r\n }\r\n this._parentNode._children.push(this);\r\n\r\n if (!previousParentNode) {\r\n this._removeFromSceneRootNodes();\r\n }\r\n }\r\n\r\n // Enabled state\r\n this._syncParentEnabledState();\r\n }\r\n\r\n public get parent(): Nullable<Node> {\r\n return this._parentNode;\r\n }\r\n\r\n /**\r\n * Control if the mesh is visible by system define\r\n */\r\n public _isSystemVisible = true;\r\n\r\n /**\r\n * If set to true, this node, when renderable, will only be visible if its parent(s) are also visible.\r\n * @default false\r\n */\r\n public get inheritVisibility(): boolean {\r\n return this._nodeDataStorage._inheritVisibility;\r\n }\r\n\r\n public set inheritVisibility(value: boolean) {\r\n this._nodeDataStorage._inheritVisibility = value;\r\n }\r\n\r\n /**\r\n * Gets or sets a boolean indicating whether this node is visible, either this node itself when it is renderable or its renderable child nodes when `inheritVisibility` is true.\r\n * @default true\r\n */\r\n public get isVisible(): boolean {\r\n if (!this._isSystemVisible) {\r\n return false;\r\n }\r\n if (this.inheritVisibility && this._parentNode && !this._parentNode.isVisible) {\r\n return false;\r\n }\r\n\r\n return this._nodeDataStorage._isVisible;\r\n }\r\n\r\n public set isVisible(value: boolean) {\r\n this._nodeDataStorage._isVisible = value;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _serializeAsParent(serializationObject: any): void {\r\n serializationObject.parentId = this.uniqueId;\r\n }\r\n\r\n /** @internal */\r\n public _addToSceneRootNodes() {\r\n if (this._nodeDataStorage._sceneRootNodesIndex === -1) {\r\n this._nodeDataStorage._sceneRootNodesIndex = this._scene.rootNodes.length;\r\n this._scene.rootNodes.push(this);\r\n }\r\n }\r\n\r\n /** @internal */\r\n public _removeFromSceneRootNodes() {\r\n if (this._nodeDataStorage._sceneRootNodesIndex !== -1) {\r\n const rootNodes = this._scene.rootNodes;\r\n const lastIdx = rootNodes.length - 1;\r\n rootNodes[this._nodeDataStorage._sceneRootNodesIndex] = rootNodes[lastIdx];\r\n rootNodes[this._nodeDataStorage._sceneRootNodesIndex]._nodeDataStorage._sceneRootNodesIndex = this._nodeDataStorage._sceneRootNodesIndex;\r\n this._scene.rootNodes.pop();\r\n this._nodeDataStorage._sceneRootNodesIndex = -1;\r\n }\r\n }\r\n\r\n private _animationPropertiesOverride: Nullable<AnimationPropertiesOverride> = null;\r\n\r\n /**\r\n * Gets or sets the animation properties override\r\n */\r\n public get animationPropertiesOverride(): Nullable<AnimationPropertiesOverride> {\r\n if (!this._animationPropertiesOverride) {\r\n return this._scene.animationPropertiesOverride;\r\n }\r\n return this._animationPropertiesOverride;\r\n }\r\n\r\n public set animationPropertiesOverride(value: Nullable<AnimationPropertiesOverride>) {\r\n this._animationPropertiesOverride = value;\r\n }\r\n\r\n /**\r\n * Gets a string identifying the name of the class\r\n * @returns \"Node\" string\r\n */\r\n public getClassName(): string {\r\n return \"Node\";\r\n }\r\n\r\n /** @internal */\r\n public readonly _isNode = true;\r\n\r\n /**\r\n * An event triggered when the mesh is disposed\r\n */\r\n public onDisposeObservable = new Observable<Node>();\r\n\r\n private _onDisposeObserver: Nullable<Observer<Node>> = null;\r\n /**\r\n * Sets a callback that will be raised when the node will be disposed\r\n */\r\n public set onDispose(callback: () => void) {\r\n if (this._onDisposeObserver) {\r\n this.onDisposeObservable.remove(this._onDisposeObserver);\r\n }\r\n this._onDisposeObserver = this.onDisposeObservable.add(callback);\r\n }\r\n\r\n /**\r\n * An event triggered when the enabled state of the node changes\r\n */\r\n public get onEnabledStateChangedObservable(): Observable<boolean> {\r\n return this._nodeDataStorage._onEnabledStateChangedObservable;\r\n }\r\n\r\n /**\r\n * An event triggered when the node is cloned\r\n */\r\n public get onClonedObservable(): Observable<Node> {\r\n return this._nodeDataStorage._onClonedObservable;\r\n }\r\n\r\n /**\r\n * Creates a new Node\r\n * @param name the name and id to be given to this node\r\n * @param scene the scene this node will be added to\r\n * @param isPure indicates this Node is just a Node, and not a derived class like Mesh or Camera\r\n */\r\n public constructor(name: string, scene: Nullable<Scene> = null, isPure = true) {\r\n this.name = name;\r\n this.id = name;\r\n this._scene = <Scene>(scene || EngineStore.LastCreatedScene);\r\n this.uniqueId = this._scene.getUniqueId();\r\n this._initCache();\r\n\r\n if (isPure) {\r\n this._addToSceneRootNodes();\r\n }\r\n }\r\n\r\n /**\r\n * Gets the scene of the node\r\n * @returns a scene\r\n */\r\n public getScene(): Scene {\r\n return this._scene;\r\n }\r\n\r\n /**\r\n * Gets the engine of the node\r\n * @returns a Engine\r\n */\r\n public getEngine(): AbstractEngine {\r\n return this._scene.getEngine();\r\n }\r\n\r\n // Behaviors\r\n private _behaviors = new Array<Behavior<Node>>();\r\n\r\n /**\r\n * Attach a behavior to the node\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors\r\n * @param behavior defines the behavior to attach\r\n * @param attachImmediately defines that the behavior must be attached even if the scene is still loading\r\n * @returns the current Node\r\n */\r\n public addBehavior(behavior: Behavior<Node>, attachImmediately = false): Node {\r\n const index = this._behaviors.indexOf(behavior);\r\n\r\n if (index !== -1) {\r\n return this;\r\n }\r\n\r\n behavior.init();\r\n if (this._scene.isLoading && !attachImmediately) {\r\n // We defer the attach when the scene will be loaded\r\n this._scene.onDataLoadedObservable.addOnce(() => {\r\n // Make sure the behavior has not been removed.\r\n if (this._behaviors.includes(behavior)) {\r\n behavior.attach(this);\r\n }\r\n });\r\n } else {\r\n behavior.attach(this);\r\n }\r\n this._behaviors.push(behavior);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Remove an attached behavior\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors\r\n * @param behavior defines the behavior to attach\r\n * @returns the current Node\r\n */\r\n public removeBehavior(behavior: Behavior<Node>): Node {\r\n const index = this._behaviors.indexOf(behavior);\r\n\r\n if (index === -1) {\r\n return this;\r\n }\r\n\r\n this._behaviors[index].detach();\r\n this._behaviors.splice(index, 1);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets the list of attached behaviors\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors\r\n */\r\n public get behaviors(): Behavior<Node>[] {\r\n return this._behaviors;\r\n }\r\n\r\n /**\r\n * Gets an attached behavior by name\r\n * @param name defines the name of the behavior to look for\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors\r\n * @returns null if behavior was not found else the requested behavior\r\n */\r\n public getBehaviorByName(name: string): Nullable<Behavior<Node>> {\r\n for (const behavior of this._behaviors) {\r\n if (behavior.name === name) {\r\n return behavior;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Returns the latest update of the World matrix\r\n * @returns a Matrix\r\n */\r\n public getWorldMatrix(): Matrix {\r\n if (this._currentRenderId !== this._scene.getRenderId()) {\r\n this.computeWorldMatrix();\r\n }\r\n return this._worldMatrix;\r\n }\r\n\r\n /** @internal */\r\n public _getWorldMatrixDeterminant(): number {\r\n if (this._worldMatrixDeterminantIsDirty) {\r\n this._worldMatrixDeterminantIsDirty = false;\r\n this._worldMatrixDeterminant = this._worldMatrix.determinant();\r\n }\r\n return this._worldMatrixDeterminant;\r\n }\r\n\r\n /**\r\n * Returns directly the latest state of the mesh World matrix.\r\n * A Matrix is returned.\r\n */\r\n public get worldMatrixFromCache(): Matrix {\r\n return this._worldMatrix;\r\n }\r\n\r\n // override it in derived class if you add new variables to the cache\r\n // and call the parent class method\r\n /** @internal */\r\n public _initCache() {\r\n this._cache = {};\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public updateCache(force?: boolean): void {\r\n if (!force && this.isSynchronized()) {\r\n return;\r\n }\r\n\r\n this._updateCache();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _getActionManagerForTrigger(trigger?: number, _initialCall = true): Nullable<AbstractActionManager> {\r\n if (!this.parent) {\r\n return null;\r\n }\r\n\r\n return this.parent._getActionManagerForTrigger(trigger, false);\r\n }\r\n\r\n // override it in derived class if you add new variables to the cache\r\n // and call the parent class method if !ignoreParentClass\r\n /**\r\n * @internal\r\n */\r\n public _updateCache(_ignoreParentClass?: boolean): void {}\r\n\r\n // override it in derived class if you add new variables to the cache\r\n /** @internal */\r\n public _isSynchronized(): boolean {\r\n return true;\r\n }\r\n\r\n /** @internal */\r\n public _markSyncedWithParent() {\r\n if (this._parentNode) {\r\n this._parentUpdateId = this._parentNode._childUpdateId;\r\n }\r\n }\r\n\r\n /** @internal */\r\n public isSynchronizedWithParent(): boolean {\r\n if (!this._parentNode) {\r\n return true;\r\n }\r\n\r\n if (this._parentNode._isDirty || this._parentUpdateId !== this._parentNode._childUpdateId) {\r\n return false;\r\n }\r\n\r\n return this._parentNode.isSynchronized();\r\n }\r\n\r\n /** @internal */\r\n public isSynchronized(): boolean {\r\n if (this._parentNode && !this.isSynchronizedWithParent()) {\r\n return false;\r\n }\r\n\r\n return this._isSynchronized();\r\n }\r\n\r\n /**\r\n * Is this node ready to be used/rendered\r\n * @param _completeCheck defines if a complete check (including materials and lights) has to be done (false by default)\r\n * @returns true if the node is ready\r\n */\r\n public isReady(_completeCheck = false): boolean {\r\n return this._nodeDataStorage._isReady;\r\n }\r\n\r\n /**\r\n * Flag the node as dirty (Forcing it to update everything)\r\n * @param _property helps children apply precise \"dirtyfication\"\r\n * @returns this node\r\n */\r\n public markAsDirty(_property?: string): Node {\r\n this._currentRenderId = Number.MAX_VALUE;\r\n this._isDirty = true;\r\n return this;\r\n }\r\n\r\n /**\r\n * Is this node enabled?\r\n * If the node has a parent, all ancestors will be checked and false will be returned if any are false (not enabled), otherwise will return true\r\n * @param checkAncestors indicates if this method should check the ancestors. The default is to check the ancestors. If set to false, the method will return the value of this node without checking ancestors\r\n * @returns whether this node (and its parent) is enabled\r\n */\r\n public isEnabled(checkAncestors: boolean = true): boolean {\r\n if (!this._internalEnabled) {\r\n return false;\r\n }\r\n if (checkAncestors === false) {\r\n return this._nodeDataStorage._isEnabled;\r\n }\r\n\r\n if (!this._nodeDataStorage._isEnabled) {\r\n return false;\r\n }\r\n\r\n return this._nodeDataStorage._isParentEnabled;\r\n }\r\n\r\n /** @internal */\r\n protected _syncParentEnabledState() {\r\n this._nodeDataStorage._isParentEnabled = this._parentNode ? this._parentNode.isEnabled() : true;\r\n\r\n if (this._children) {\r\n for (const c of this._children) {\r\n c._syncParentEnabledState(); // Force children to update accordingly\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Set the enabled state of this node\r\n * @param value defines the new enabled state\r\n */\r\n public setEnabled(value: boolean): void {\r\n if (this._nodeDataStorage._isEnabled === value) {\r\n return;\r\n }\r\n this._nodeDataStorage._isEnabled = value;\r\n this._syncParentEnabledState();\r\n this._nodeDataStorage._onEnabledStateChangedObservable.notifyObservers(value);\r\n }\r\n\r\n /**\r\n * Is this node a descendant of the given node?\r\n * The function will iterate up the hierarchy until the ancestor was found or no more parents defined\r\n * @param ancestor defines the parent node to inspect\r\n * @returns a boolean indicating if this node is a descendant of the given node\r\n */\r\n public isDescendantOf(ancestor: Node): boolean {\r\n if (this.parent) {\r\n if (this.parent === ancestor) {\r\n return true;\r\n }\r\n\r\n return this.parent.isDescendantOf(ancestor);\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _getDescendants(results: Node[], directDescendantsOnly: boolean = false, predicate?: (node: Node) => boolean): void {\r\n if (!this._children) {\r\n return;\r\n }\r\n\r\n for (let index = 0; index < this._children.length; index++) {\r\n const item = this._children[index];\r\n\r\n if (!predicate || predicate(item)) {\r\n results.push(item);\r\n }\r\n\r\n if (!directDescendantsOnly) {\r\n item._getDescendants(results, false, predicate);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Will return all nodes that have this node as ascendant\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns all children nodes of all types\r\n */\r\n public getDescendants<T extends Node>(directDescendantsOnly?: boolean, predicate?: (node: Node) => node is T): T[];\r\n\r\n /**\r\n * Will return all nodes that have this node as ascendant\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns all children nodes of all types\r\n */\r\n public getDescendants(directDescendantsOnly?: boolean, predicate?: (node: Node) => boolean): Node[];\r\n\r\n /**\r\n * Will return all nodes that have this node as ascendant\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns all children nodes of all types\r\n */\r\n public getDescendants(directDescendantsOnly?: boolean, predicate?: (node: Node) => boolean): Node[] {\r\n const results: Node[] = [];\r\n\r\n this._getDescendants(results, directDescendantsOnly, predicate);\r\n\r\n return results;\r\n }\r\n\r\n /**\r\n * Get all child-meshes of this node\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: false)\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns an array of AbstractMesh\r\n */\r\n public getChildMeshes<T extends AbstractMesh>(directDescendantsOnly?: boolean, predicate?: (node: Node) => node is T): T[];\r\n\r\n /**\r\n * Get all child-meshes of this node\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: false)\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns an array of AbstractMesh\r\n */\r\n public getChildMeshes(directDescendantsOnly?: boolean, predicate?: (node: Node) => boolean): AbstractMesh[];\r\n\r\n /**\r\n * Get all child-meshes of this node\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: false)\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns an array of AbstractMesh\r\n */\r\n public getChildMeshes(directDescendantsOnly?: boolean, predicate?: (node: Node) => boolean): AbstractMesh[] {\r\n const results: Array<AbstractMesh> = [];\r\n this._getDescendants(results, directDescendantsOnly, (node: Node) => {\r\n return (!predicate || predicate(node)) && (<AbstractMesh>node).cullingStrategy !== undefined;\r\n });\r\n return results;\r\n }\r\n\r\n /**\r\n * Get all direct children of this node\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: true)\r\n * @returns an array of Node\r\n */\r\n public getChildren<T extends Node>(predicate?: (node: Node) => node is T, directDescendantsOnly?: boolean): T[];\r\n\r\n /**\r\n * Get all direct children of this node\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: true)\r\n * @returns an array of Node\r\n */\r\n public getChildren(predicate?: (node: Node) => boolean, directDescendantsOnly?: boolean): Node[];\r\n\r\n /**\r\n * Get all direct children of this node\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: true)\r\n * @returns an array of Node\r\n */\r\n public getChildren(predicate?: (node: Node) => boolean, directDescendantsOnly = true): Node[] {\r\n return this.getDescendants(directDescendantsOnly, predicate);\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _setReady(state: boolean): void {\r\n if (state === this._nodeDataStorage._isReady) {\r\n return;\r\n }\r\n\r\n if (!state) {\r\n this._nodeDataStorage._isReady = false;\r\n return;\r\n }\r\n\r\n if (this.onReady) {\r\n this.onReady(this);\r\n }\r\n this._nodeDataStorage._isReady = true;\r\n }\r\n\r\n /**\r\n * Get an animation by name\r\n * @param name defines the name of the animation to look for\r\n * @returns null if not found else the requested animation\r\n */\r\n public getAnimationByName(name: string): Nullable<Animation> {\r\n for (let i = 0; i < this.animations.length; i++) {\r\n const animation = this.animations[i];\r\n\r\n if (animation.name === name) {\r\n return animation;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Creates an animation range for this node\r\n * @param name defines the name of the range\r\n * @param from defines the starting key\r\n * @param to defines the end key\r\n */\r\n public createAnimationRange(name: string, from: number, to: number): void {\r\n // check name not already in use\r\n if (!this._ranges[name]) {\r\n this._ranges[name] = Node._AnimationRangeFactory(name, from, to);\r\n for (let i = 0, nAnimations = this.animations.length; i < nAnimations; i++) {\r\n if (this.animations[i]) {\r\n this.animations[i].createRange(name, from, to);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Delete a specific animation range\r\n * @param name defines the name of the range to delete\r\n * @param deleteFrames defines if animation frames from the range must be deleted as well\r\n */\r\n public deleteAnimationRange(name: string, deleteFrames = true): void {\r\n for (let i = 0, nAnimations = this.animations.length; i < nAnimations; i++) {\r\n if (this.animations[i]) {\r\n this.animations[i].deleteRange(name, deleteFrames);\r\n }\r\n }\r\n this._ranges[name] = null; // said much faster than 'delete this._range[name]'\r\n }\r\n\r\n /**\r\n * Get an animation range by name\r\n * @param name defines the name of the animation range to look for\r\n * @returns null if not found else the requested animation range\r\n */\r\n public getAnimationRange(name: string): Nullable<AnimationRange> {\r\n return this._ranges[name] || null;\r\n }\r\n\r\n /**\r\n * Clone the current node\r\n * @param name Name of the new clone\r\n * @param newParent New parent for the clone\r\n * @param doNotCloneChildren Do not clone children hierarchy\r\n * @returns the new transform node\r\n */\r\n public clone(name: string, newParent: Nullable<Node>, doNotCloneChildren?: boolean): Nullable<Node> {\r\n const result = SerializationHelper.Clone(() => new Node(name, this.getScene()), this);\r\n\r\n if (newParent) {\r\n result.parent = newParent;\r\n }\r\n\r\n if (!doNotCloneChildren) {\r\n // Children\r\n const directDescendants = this.getDescendants(true);\r\n for (let index = 0; index < directDescendants.length; index++) {\r\n const child = directDescendants[index];\r\n\r\n child.clone(name + \".\" + child.name, result);\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the list of all animation ranges defined on this node\r\n * @returns an array\r\n */\r\n public getAnimationRanges(): Nullable<AnimationRange>[] {\r\n const animationRanges: Nullable<AnimationRange>[] = [];\r\n let name: string;\r\n for (name in this._ranges) {\r\n animationRanges.push(this._ranges[name]);\r\n }\r\n return animationRanges;\r\n }\r\n\r\n /**\r\n * Will start the animation sequence\r\n * @param name defines the range frames for animation sequence\r\n * @param loop defines if the animation should loop (false by default)\r\n * @param speedRatio defines the speed factor in which to run the animation (1 by default)\r\n * @param onAnimationEnd defines a function to be executed when the animation ended (undefined by default)\r\n * @returns the object created for this animation. If range does not exist, it will return null\r\n */\r\n public beginAnimation(name: string, loop?: boolean, speedRatio?: number, onAnimationEnd?: () => void): Nullable<Animatable> {\r\n const range = this.getAnimationRange(name);\r\n\r\n if (!range) {\r\n return null;\r\n }\r\n\r\n return this._scene.beginAnimation(this, range.from, range.to, loop, speedRatio, onAnimationEnd);\r\n }\r\n\r\n /**\r\n * Serialize animation ranges into a JSON compatible object\r\n * @returns serialization object\r\n */\r\n public serializeAnimationRanges(): any {\r\n const serializationRanges = [];\r\n for (const name in this._ranges) {\r\n const localRange = this._ranges[name];\r\n if (!localRange) {\r\n continue;\r\n }\r\n const range: any = {};\r\n range.name = name;\r\n range.from = localRange.from;\r\n range.to = localRange.to;\r\n serializationRanges.push(range);\r\n }\r\n return serializationRanges;\r\n }\r\n\r\n /**\r\n * Computes the world matrix of the node\r\n * @param _force defines if the cache version should be invalidated forcing the world matrix to be created from scratch\r\n * @returns the world matrix\r\n */\r\n public computeWorldMatrix(_force?: boolean): Matrix {\r\n if (!this._worldMatrix) {\r\n this._worldMatrix = Matrix.Identity();\r\n }\r\n return this._worldMatrix;\r\n }\r\n\r\n public getMetadata(): any {\r\n if (!this.metadata) {\r\n this.metadata = {};\r\n }\r\n return this.metadata;\r\n }\r\n\r\n public getMetadataByKey(key: string): any {\r\n const metadata = this.getMetadata();\r\n return metadata[key];\r\n }\r\n\r\n /**\r\n * Releases resources associated with this node.\r\n * @param doNotRecurse Set to true to not recurse into each children (recurse into each children by default)\r\n * @param disposeMaterialAndTextures Set to true to also dispose referenced materials and textures (false by default)\r\n */\r\n public dispose(doNotRecurse?: boolean, disposeMaterialAndTextures = false): void {\r\n this._nodeDataStorage._isDisposed = true;\r\n\r\n if (!doNotRecurse) {\r\n const nodes = this.getDescendants(true);\r\n for (const node of nodes) {\r\n node.dispose(doNotRecurse, disposeMaterialAndTextures);\r\n }\r\n }\r\n\r\n if (!this.parent) {\r\n this._removeFromSceneRootNodes();\r\n } else {\r\n this.parent = null;\r\n }\r\n\r\n // Callback\r\n this.onDisposeObservable.notifyObservers(this);\r\n this.onDisposeObservable.clear();\r\n\r\n this.onEnabledStateChangedObservable.clear();\r\n this.onClonedObservable.clear();\r\n\r\n // Behaviors\r\n for (const behavior of this._behaviors) {\r\n behavior.detach();\r\n }\r\n\r\n this._behaviors.length = 0;\r\n\r\n this.metadata = null;\r\n }\r\n\r\n /**\r\n * Parse animation range data from a serialization object and store them into a given node\r\n * @param node defines where to store the animation ranges\r\n * @param parsedNode defines the serialization object to read data from\r\n * @param _scene defines the hosting scene\r\n */\r\n public static ParseAnimationRanges(node: Node, parsedNode: any, _scene: Scene): void {\r\n if (parsedNode.ranges) {\r\n for (let index = 0; index < parsedNode.ranges.length; index++) {\r\n const data = parsedNode.ranges[index];\r\n node.createAnimationRange(data.name, data.from, data.to);\r\n }\r\n }\r\n }\r\n /**\r\n * Return the minimum and maximum world vectors of the entire hierarchy under current node\r\n * @param includeDescendants Include bounding info from descendants as well (true by default)\r\n * @param predicate defines a callback function that can be customize to filter what meshes should be included in the list used to compute the bounding vectors\r\n * @returns the new bounding vectors\r\n */\r\n public getHierarchyBoundingVectors(includeDescendants = true, predicate: Nullable<(abstractMesh: AbstractMesh) => boolean> = null): { min: Vector3; max: Vector3 } {\r\n // Ensures that all world matrix will be recomputed.\r\n this.getScene().incrementRenderId();\r\n\r\n this.computeWorldMatrix(true);\r\n\r\n let min: Vector3;\r\n let max: Vector3;\r\n\r\n const thisAbstractMesh = this as Node as AbstractMesh;\r\n if (thisAbstractMesh.getBoundingInfo && thisAbstractMesh.subMeshes) {\r\n // If this is an abstract mesh get its bounding info\r\n const boundingInfo = thisAbstractMesh.getBoundingInfo();\r\n min = boundingInfo.boundingBox.minimumWorld.clone();\r\n max = boundingInfo.boundingBox.maximumWorld.clone();\r\n } else {\r\n min = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\r\n max = new Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\r\n }\r\n\r\n if (includeDescendants) {\r\n const descendants = this.getDescendants(false);\r\n\r\n for (const descendant of descendants) {\r\n const childMesh = <AbstractMesh>descendant;\r\n childMesh.computeWorldMatrix(true);\r\n\r\n // Filters meshes based on custom predicate function.\r\n if (predicate && !predicate(childMesh)) {\r\n continue;\r\n }\r\n\r\n //make sure we have the needed params to get mix and max\r\n if (!childMesh.getBoundingInfo || childMesh.getTotalVertices() === 0) {\r\n continue;\r\n }\r\n\r\n const childBoundingInfo = childMesh.getBoundingInfo();\r\n const boundingBox = childBoundingInfo.boundingBox;\r\n\r\n const minBox = boundingBox.minimumWorld;\r\n const maxBox = boundingBox.maximumWorld;\r\n\r\n Vector3.CheckExtends(minBox, min, max);\r\n Vector3.CheckExtends(maxBox, min, max);\r\n }\r\n }\r\n\r\n return {\r\n min: min,\r\n max: max,\r\n };\r\n }\r\n}\r\n"]}
|