@babylonjs/core 7.35.2 → 7.37.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/Collisions/gpuPicker.js.map +1 -1
- package/Engines/Extensions/engine.multiRender.d.ts +11 -0
- package/Engines/Extensions/engine.multiRender.js +71 -32
- package/Engines/Extensions/engine.multiRender.js.map +1 -1
- package/Engines/Extensions/engine.rawTexture.d.ts +8 -8
- package/Engines/Extensions/engine.rawTexture.js.map +1 -1
- package/Engines/Extensions/engine.renderTarget.js +1 -13
- package/Engines/Extensions/engine.renderTarget.js.map +1 -1
- package/Engines/Extensions/engine.renderTargetCube.js.map +1 -1
- package/Engines/WebGL/webGLRenderTargetWrapper.d.ts +2 -0
- package/Engines/WebGL/webGLRenderTargetWrapper.js +37 -7
- package/Engines/WebGL/webGLRenderTargetWrapper.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.multiRender.d.ts +11 -0
- package/Engines/WebGPU/Extensions/engine.multiRender.js +30 -11
- package/Engines/WebGPU/Extensions/engine.multiRender.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.rawTexture.d.ts +9 -9
- package/Engines/WebGPU/Extensions/engine.rawTexture.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.renderTarget.js +2 -5
- package/Engines/WebGPU/Extensions/engine.renderTarget.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.renderTargetCube.js.map +1 -1
- package/Engines/WebGPU/webgpuCacheRenderPipeline.js +3 -2
- package/Engines/WebGPU/webgpuCacheRenderPipeline.js.map +1 -1
- package/Engines/WebGPU/webgpuConstants.d.ts +6 -0
- package/Engines/WebGPU/webgpuConstants.js +6 -0
- package/Engines/WebGPU/webgpuConstants.js.map +1 -1
- package/Engines/WebGPU/webgpuHardwareTexture.d.ts +3 -1
- package/Engines/WebGPU/webgpuHardwareTexture.js +5 -4
- package/Engines/WebGPU/webgpuHardwareTexture.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureHelper.js +18 -0
- package/Engines/WebGPU/webgpuTextureHelper.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureManager.js +8 -2
- package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
- package/Engines/abstractEngine.d.ts +12 -1
- package/Engines/abstractEngine.js +4 -4
- package/Engines/abstractEngine.js.map +1 -1
- package/Engines/constants.d.ts +17 -1
- package/Engines/constants.js +17 -1
- package/Engines/constants.js.map +1 -1
- package/Engines/engine.d.ts +31 -1
- package/Engines/engine.js +17 -1
- package/Engines/engine.js.map +1 -1
- package/Engines/engineCapabilities.d.ts +2 -0
- package/Engines/engineCapabilities.js.map +1 -1
- package/Engines/nativeEngine.js +1 -0
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/nullEngine.d.ts +2 -2
- package/Engines/nullEngine.js +3 -2
- package/Engines/nullEngine.js.map +1 -1
- package/Engines/renderTargetWrapper.d.ts +33 -1
- package/Engines/renderTargetWrapper.js +64 -4
- package/Engines/renderTargetWrapper.js.map +1 -1
- package/Engines/thinEngine.d.ts +13 -1
- package/Engines/thinEngine.functions.d.ts +4 -0
- package/Engines/thinEngine.functions.js +17 -0
- package/Engines/thinEngine.functions.js.map +1 -1
- package/Engines/thinEngine.js +151 -32
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/thinWebGPUEngine.d.ts +2 -0
- package/Engines/thinWebGPUEngine.js +7 -0
- package/Engines/thinWebGPUEngine.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +12 -3
- package/Engines/webgpuEngine.js +40 -9
- package/Engines/webgpuEngine.js.map +1 -1
- package/FrameGraph/Node/Blocks/Textures/clearBlock.d.ts +8 -0
- package/FrameGraph/Node/Blocks/Textures/clearBlock.js +22 -1
- package/FrameGraph/Node/Blocks/Textures/clearBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/inputBlock.d.ts +4 -9
- package/FrameGraph/Node/Blocks/inputBlock.js +15 -25
- package/FrameGraph/Node/Blocks/inputBlock.js.map +1 -1
- package/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.js +10 -2
- package/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.js.map +1 -1
- package/FrameGraph/Passes/renderPass.d.ts +10 -10
- package/FrameGraph/Passes/renderPass.js +10 -10
- package/FrameGraph/Passes/renderPass.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/bloomTask.d.ts +10 -5
- package/FrameGraph/Tasks/PostProcesses/bloomTask.js +29 -14
- package/FrameGraph/Tasks/PostProcesses/bloomTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.js +4 -0
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.d.ts +11 -6
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.js +30 -13
- package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/postProcessTask.js +4 -6
- package/FrameGraph/Tasks/PostProcesses/postProcessTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/cullObjectsTask.d.ts +1 -1
- package/FrameGraph/Tasks/Rendering/cullObjectsTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.d.ts +3 -3
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +33 -32
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/objectRendererTask.d.ts +4 -2
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js +8 -12
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js +13 -18
- package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js.map +1 -1
- package/FrameGraph/Tasks/Texture/clearTextureTask.d.ts +15 -2
- package/FrameGraph/Tasks/Texture/clearTextureTask.js +17 -4
- package/FrameGraph/Tasks/Texture/clearTextureTask.js.map +1 -1
- package/FrameGraph/Tasks/Texture/copyToTextureTask.js +2 -2
- package/FrameGraph/Tasks/Texture/copyToTextureTask.js.map +1 -1
- package/FrameGraph/Tasks/Texture/generateMipMapsTask.js +3 -3
- package/FrameGraph/Tasks/Texture/generateMipMapsTask.js.map +1 -1
- package/FrameGraph/frameGraph.d.ts +11 -74
- package/FrameGraph/frameGraph.js +12 -126
- package/FrameGraph/frameGraph.js.map +1 -1
- package/FrameGraph/frameGraphRenderContext.d.ts +17 -8
- package/FrameGraph/frameGraphRenderContext.js +55 -43
- package/FrameGraph/frameGraphRenderContext.js.map +1 -1
- package/FrameGraph/frameGraphRenderTarget.d.ts +16 -0
- package/FrameGraph/frameGraphRenderTarget.js +67 -0
- package/FrameGraph/frameGraphRenderTarget.js.map +1 -0
- package/FrameGraph/frameGraphTask.d.ts +4 -3
- package/FrameGraph/frameGraphTask.js +41 -8
- package/FrameGraph/frameGraphTask.js.map +1 -1
- package/FrameGraph/frameGraphTextureManager.d.ts +130 -22
- package/FrameGraph/frameGraphTextureManager.js +312 -130
- package/FrameGraph/frameGraphTextureManager.js.map +1 -1
- package/FrameGraph/frameGraphTypes.d.ts +28 -13
- package/FrameGraph/frameGraphTypes.js.map +1 -1
- package/FrameGraph/index.d.ts +1 -0
- package/FrameGraph/index.js +1 -0
- package/FrameGraph/index.js.map +1 -1
- package/Helpers/environmentHelper.js.map +1 -1
- package/Layers/effectLayer.d.ts +1 -1
- package/Layers/effectLayer.js.map +1 -1
- package/Layers/glowLayer.d.ts +1 -1
- package/Layers/glowLayer.js.map +1 -1
- package/Layers/highlightLayer.d.ts +1 -1
- package/Layers/highlightLayer.js.map +1 -1
- package/Lights/Shadows/shadowGenerator.js.map +1 -1
- package/Materials/Node/Blocks/conditionalBlock.d.ts +2 -0
- package/Materials/Node/Blocks/conditionalBlock.js +13 -0
- package/Materials/Node/Blocks/conditionalBlock.js.map +1 -1
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/Node/nodeMaterialBlockConnectionPoint.js +12 -4
- package/Materials/Node/nodeMaterialBlockConnectionPoint.js.map +1 -1
- package/Materials/Textures/MultiviewRenderTarget.js.map +1 -1
- package/Materials/Textures/Procedurals/proceduralTexture.js.map +1 -1
- package/Materials/Textures/baseTexture.js.map +1 -1
- package/Materials/Textures/colorGradingTexture.js.map +1 -1
- package/Materials/Textures/internalTexture.d.ts +20 -0
- package/Materials/Textures/internalTexture.js +48 -0
- package/Materials/Textures/internalTexture.js.map +1 -1
- package/Materials/Textures/mirrorTexture.js.map +1 -1
- package/Materials/Textures/multiRenderTarget.d.ts +5 -0
- package/Materials/Textures/multiRenderTarget.js.map +1 -1
- package/Materials/Textures/rawCubeTexture.d.ts +2 -2
- package/Materials/Textures/rawCubeTexture.js +2 -2
- package/Materials/Textures/rawCubeTexture.js.map +1 -1
- package/Materials/Textures/rawTexture.js.map +1 -1
- package/Materials/Textures/rawTexture2DArray.d.ts +1 -1
- package/Materials/Textures/rawTexture2DArray.js +1 -1
- package/Materials/Textures/rawTexture2DArray.js.map +1 -1
- package/Materials/Textures/rawTexture3D.d.ts +1 -1
- package/Materials/Textures/rawTexture3D.js +1 -1
- package/Materials/Textures/rawTexture3D.js.map +1 -1
- package/Materials/Textures/renderTargetTexture.js.map +1 -1
- package/Materials/Textures/textureCreationOptions.d.ts +6 -6
- package/Materials/Textures/textureCreationOptions.js.map +1 -1
- package/Materials/drawWrapper.d.ts +6 -1
- package/Materials/drawWrapper.js +18 -2
- package/Materials/drawWrapper.js.map +1 -1
- package/Materials/effect.d.ts +6 -1
- package/Materials/effect.functions.d.ts +5 -0
- package/Materials/effect.functions.js +19 -0
- package/Materials/effect.functions.js.map +1 -1
- package/Materials/effect.js +22 -20
- package/Materials/effect.js.map +1 -1
- package/Materials/effect.webgl.functions.js +12 -4
- package/Materials/effect.webgl.functions.js.map +1 -1
- package/Maths/math.color.d.ts +16 -0
- package/Maths/math.color.js +16 -0
- package/Maths/math.color.js.map +1 -1
- package/Maths/math.vector.d.ts +32 -0
- package/Maths/math.vector.js +32 -0
- package/Maths/math.vector.js.map +1 -1
- package/Meshes/Compression/dracoCompression.d.ts +3 -1
- package/Meshes/Compression/dracoCompression.js +5 -2
- package/Meshes/Compression/dracoCompression.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +2 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Meshes/Node/Blocks/Matrices/rotationXBlock.d.ts +0 -1
- package/Meshes/Node/Blocks/Matrices/rotationXBlock.js +1 -9
- package/Meshes/Node/Blocks/Matrices/rotationXBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Matrices/rotationYBlock.d.ts +0 -1
- package/Meshes/Node/Blocks/Matrices/rotationYBlock.js +1 -9
- package/Meshes/Node/Blocks/Matrices/rotationYBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Matrices/rotationZBlock.d.ts +0 -1
- package/Meshes/Node/Blocks/Matrices/rotationZBlock.js +1 -9
- package/Meshes/Node/Blocks/Matrices/rotationZBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/latticeBlock.js +3 -1
- package/Meshes/Node/Blocks/Set/latticeBlock.js.map +1 -1
- package/Meshes/Node/Blocks/conditionBlock.d.ts +2 -0
- package/Meshes/Node/Blocks/conditionBlock.js +15 -0
- package/Meshes/Node/Blocks/conditionBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryClampBlock.d.ts +4 -4
- package/Meshes/Node/Blocks/geometryClampBlock.js +16 -25
- package/Meshes/Node/Blocks/geometryClampBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryLerpBlock.js +2 -2
- package/Meshes/Node/Blocks/geometryLerpBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryNLerpBlock.js +2 -2
- package/Meshes/Node/Blocks/geometryNLerpBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryReplaceColorBlock.js +2 -2
- package/Meshes/Node/Blocks/geometryReplaceColorBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryRotate2dBlock.js +2 -2
- package/Meshes/Node/Blocks/geometryRotate2dBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometrySmoothStepBlock.js +3 -3
- package/Meshes/Node/Blocks/geometrySmoothStepBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryStepBlock.js +2 -2
- package/Meshes/Node/Blocks/geometryStepBlock.js.map +1 -1
- package/Meshes/Node/nodeGeometry.js +1 -1
- package/Meshes/Node/nodeGeometry.js.map +1 -1
- package/Meshes/Node/nodeGeometryBlock.d.ts +3 -1
- package/Meshes/Node/nodeGeometryBlock.js +2 -1
- package/Meshes/Node/nodeGeometryBlock.js.map +1 -1
- package/Meshes/Node/nodeGeometryBlockConnectionPoint.js +10 -2
- package/Meshes/Node/nodeGeometryBlockConnectionPoint.js.map +1 -1
- package/Meshes/abstractMesh.d.ts +5 -3
- package/Meshes/abstractMesh.js +9 -7
- package/Meshes/abstractMesh.js.map +1 -1
- package/Meshes/subMesh.d.ts +5 -3
- package/Meshes/subMesh.js +9 -7
- package/Meshes/subMesh.js.map +1 -1
- package/Misc/HighDynamicRange/cubemapToSphericalPolynomial.js.map +1 -1
- package/Misc/dds.d.ts +1 -1
- package/Misc/dds.js.map +1 -1
- package/Misc/environmentTextureTools.js.map +1 -1
- package/Misc/observable.d.ts +1 -3
- package/Misc/observable.js +9 -7
- package/Misc/observable.js.map +1 -1
- package/Misc/screenshotTools.js.map +1 -1
- package/Misc/snapshotRenderingHelper.js +3 -0
- package/Misc/snapshotRenderingHelper.js.map +1 -1
- package/Misc/textureTools.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.d.ts +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js.map +1 -1
- package/PostProcesses/bloomMergePostProcess.js.map +1 -1
- package/PostProcesses/blurPostProcess.js.map +1 -1
- package/PostProcesses/chromaticAberrationPostProcess.js.map +1 -1
- package/PostProcesses/circleOfConfusionPostProcess.js.map +1 -1
- package/PostProcesses/convolutionPostProcess.js.map +1 -1
- package/PostProcesses/depthOfFieldBlurPostProcess.js.map +1 -1
- package/PostProcesses/depthOfFieldMergePostProcess.js.map +1 -1
- package/PostProcesses/extractHighlightsPostProcess.js.map +1 -1
- package/PostProcesses/fxaaPostProcess.js.map +1 -1
- package/PostProcesses/grainPostProcess.js.map +1 -1
- package/PostProcesses/highlightsPostProcess.d.ts +1 -1
- package/PostProcesses/highlightsPostProcess.js +1 -1
- package/PostProcesses/highlightsPostProcess.js.map +1 -1
- package/PostProcesses/imageProcessingPostProcess.js.map +1 -1
- package/PostProcesses/motionBlurPostProcess.js.map +1 -1
- package/PostProcesses/passPostProcess.js.map +1 -1
- package/PostProcesses/postProcess.d.ts +1 -1
- package/PostProcesses/postProcess.js.map +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.js.map +1 -1
- package/PostProcesses/screenSpaceReflectionPostProcess.js.map +1 -1
- package/PostProcesses/sharpenPostProcess.js.map +1 -1
- package/PostProcesses/subSurfaceScatteringPostProcess.js.map +1 -1
- package/PostProcesses/tonemapPostProcess.d.ts +1 -1
- package/PostProcesses/tonemapPostProcess.js +1 -1
- package/PostProcesses/tonemapPostProcess.js.map +1 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsImportanceSamplingRenderer.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsSpatialBlurPass.js.map +1 -1
- package/Rendering/prePassRenderer.js.map +1 -1
- package/ShadersWGSL/pbr.fragment.js +4 -3
- package/ShadersWGSL/pbr.fragment.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeGeometryBlockConnectionPoint.js","sourceRoot":"","sources":["../../../../../dev/core/src/Meshes/Node/nodeGeometryBlockConnectionPoint.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,qCAAqC,EAAE,MAAM,0CAA0C,CAAC;AAIjG;;GAEG;AACH,MAAM,CAAN,IAAkB,8CAOjB;AAPD,WAAkB,8CAA8C;IAC5D,6BAA6B;IAC7B,+HAAU,CAAA;IACV,qDAAqD;IACrD,2IAAgB,CAAA;IAChB,sEAAsE;IACtE,uIAAc,CAAA;AAClB,CAAC,EAPiB,8CAA8C,KAA9C,8CAA8C,QAO/D;AAED;;GAEG;AACH,MAAM,CAAN,IAAkB,oCAKjB;AALD,WAAkB,oCAAoC;IAClD,YAAY;IACZ,iGAAK,CAAA;IACL,aAAa;IACb,mGAAM,CAAA;AACV,CAAC,EALiB,oCAAoC,KAApC,oCAAoC,QAKrD;AAED;;GAEG;AACH,MAAM,OAAO,2BAA2B;IA0BpC,sCAAsC;IACtC,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAoDD;;OAEG;IACH,IAAW,IAAI;QACX,IAAI,IAAI,CAAC,KAAK,KAAK,qCAAqC,CAAC,UAAU,EAAE,CAAC;YAClE,IAAI,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;gBAC3B,OAAQ,IAAI,CAAC,WAAkC,CAAC,IAAI,CAAC;YACzD,CAAC;YAED,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;gBACvB,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;YACrC,CAAC;YAED,IAAI,IAAI,CAAC,uBAAuB,IAAI,IAAI,CAAC,uBAAuB,CAAC,WAAW,EAAE,CAAC;gBAC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I,CAAC,mBAAmB,IAAI,CAAC,EAAE,CAAC;YACzD,mBAAmB,CAAC,gBAAgB,GAAG,IAAI,CAAC;YAC5C,mBAAmB,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC;QACvE,CAAC;QAED,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAED;;OAEG;IACI,OAAO;QACV,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,CAAC;QACpC,IAAI,CAAC,yBAAyB,CAAC,KAAK,EAAE,CAAC;IAC3C,CAAC;CACJ","sourcesContent":["import type { Nullable } from \"../../types\";\r\nimport type { NodeGeometryBlock } from \"./nodeGeometryBlock\";\r\nimport { Observable } from \"../../Misc/observable\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"./Enums/nodeGeometryConnectionPointTypes\";\r\nimport type { GeometryInputBlock } from \"./Blocks/geometryInputBlock\";\r\nimport type { NodeGeometryBuildState } from \"./nodeGeometryBuildState\";\r\n\r\n/**\r\n * Enum used to define the compatibility state between two connection points\r\n */\r\nexport const enum NodeGeometryConnectionPointCompatibilityStates {\r\n /** Points are compatibles */\r\n Compatible,\r\n /** Points are incompatible because of their types */\r\n TypeIncompatible,\r\n /** Points are incompatible because they are in the same hierarchy **/\r\n HierarchyIssue,\r\n}\r\n\r\n/**\r\n * Defines the direction of a connection point\r\n */\r\nexport const enum NodeGeometryConnectionPointDirection {\r\n /** Input */\r\n Input,\r\n /** Output */\r\n Output,\r\n}\r\n\r\n/**\r\n * Defines a connection point for a block\r\n */\r\nexport class NodeGeometryConnectionPoint {\r\n /** @internal */\r\n public _ownerBlock: NodeGeometryBlock;\r\n /** @internal */\r\n public _connectedPoint: Nullable<NodeGeometryConnectionPoint> = null;\r\n /** @internal */\r\n public _storedValue: any = null;\r\n /** @internal */\r\n public _storedFunction: Nullable<(state: NodeGeometryBuildState) => any> = null;\r\n\r\n /** @internal */\r\n public _acceptedConnectionPointType: Nullable<NodeGeometryConnectionPoint> = null;\r\n\r\n private _endpoints = new Array<NodeGeometryConnectionPoint>();\r\n private _direction: NodeGeometryConnectionPointDirection;\r\n private _type = NodeGeometryBlockConnectionPointTypes.Geometry;\r\n\r\n /** @internal */\r\n public _linkedConnectionSource: Nullable<NodeGeometryConnectionPoint> = null;\r\n\r\n /** @internal */\r\n public _typeConnectionSource: Nullable<NodeGeometryConnectionPoint> = null;\r\n\r\n /** @internal */\r\n public _defaultConnectionPointType: Nullable<NodeGeometryBlockConnectionPointTypes> = null;\r\n\r\n /** Gets the direction of the point */\r\n public get direction() {\r\n return this._direction;\r\n }\r\n\r\n /**\r\n * Gets or sets the additional types supported by this connection point\r\n */\r\n public acceptedConnectionPointTypes: NodeGeometryBlockConnectionPointTypes[] = [];\r\n\r\n /**\r\n * Gets or sets the additional types excluded by this connection point\r\n */\r\n public excludedConnectionPointTypes: NodeGeometryBlockConnectionPointTypes[] = [];\r\n\r\n /**\r\n * Observable triggered when this point is connected\r\n */\r\n public onConnectionObservable = new Observable<NodeGeometryConnectionPoint>();\r\n\r\n /**\r\n * Observable triggered when this point is disconnected\r\n */\r\n public onDisconnectionObservable = new Observable<NodeGeometryConnectionPoint>();\r\n\r\n /**\r\n * Gets or sets a boolean indicating that this connection point is exposed on a frame\r\n */\r\n public isExposedOnFrame: boolean = false;\r\n\r\n /**\r\n * Gets or sets number indicating the position that the port is exposed to on a frame\r\n */\r\n public exposedPortPosition: number = -1;\r\n\r\n /**\r\n * Gets the default value used for this point at creation time\r\n */\r\n public defaultValue: Nullable<any> = null;\r\n\r\n /**\r\n * Gets or sets the default value used for this point if nothing is connected\r\n */\r\n public value: Nullable<any> = null;\r\n\r\n /**\r\n * Gets or sets the min value accepted for this point if nothing is connected\r\n */\r\n public valueMin: Nullable<any> = null;\r\n\r\n /**\r\n * Gets or sets the max value accepted for this point if nothing is connected\r\n */\r\n public valueMax: Nullable<any> = null;\r\n\r\n /**\r\n * Gets or sets the connection point type (default is float)\r\n */\r\n public get type(): NodeGeometryBlockConnectionPointTypes {\r\n if (this._type === NodeGeometryBlockConnectionPointTypes.AutoDetect) {\r\n if (this._ownerBlock.isInput) {\r\n return (this._ownerBlock as GeometryInputBlock).type;\r\n }\r\n\r\n if (this._connectedPoint) {\r\n return this._connectedPoint.type;\r\n }\r\n\r\n if (this._linkedConnectionSource && this._linkedConnectionSource.isConnected) {\r\n return this._linkedConnectionSource.type;\r\n }\r\n }\r\n\r\n if (this._type === NodeGeometryBlockConnectionPointTypes.BasedOnInput) {\r\n if (this._typeConnectionSource) {\r\n if (!this._typeConnectionSource.isConnected && this._defaultConnectionPointType) {\r\n return this._defaultConnectionPointType;\r\n }\r\n return this._typeConnectionSource.type;\r\n } else if (this._defaultConnectionPointType) {\r\n return this._defaultConnectionPointType;\r\n }\r\n }\r\n\r\n return this._type;\r\n }\r\n\r\n public set type(value: NodeGeometryBlockConnectionPointTypes) {\r\n this._type = value;\r\n }\r\n\r\n /**\r\n * Gets or sets the connection point name\r\n */\r\n public name: string;\r\n\r\n /**\r\n * Gets or sets the connection point display name\r\n */\r\n public displayName: string;\r\n\r\n /**\r\n * Gets or sets a boolean indicating that this connection point can be omitted\r\n */\r\n public isOptional: boolean;\r\n\r\n /**\r\n * Gets a boolean indicating that the current point is connected to another NodeMaterialBlock\r\n */\r\n public get isConnected(): boolean {\r\n return this.connectedPoint !== null || this.hasEndpoints;\r\n }\r\n\r\n /** Get the other side of the connection (if any) */\r\n public get connectedPoint(): Nullable<NodeGeometryConnectionPoint> {\r\n return this._connectedPoint;\r\n }\r\n\r\n /** Get the block that owns this connection point */\r\n public get ownerBlock(): NodeGeometryBlock {\r\n return this._ownerBlock;\r\n }\r\n\r\n /** Get the block connected on the other side of this connection (if any) */\r\n public get sourceBlock(): Nullable<NodeGeometryBlock> {\r\n if (!this._connectedPoint) {\r\n return null;\r\n }\r\n\r\n return this._connectedPoint.ownerBlock;\r\n }\r\n\r\n /** Get the block connected on the endpoints of this connection (if any) */\r\n public get connectedBlocks(): Array<NodeGeometryBlock> {\r\n if (this._endpoints.length === 0) {\r\n return [];\r\n }\r\n\r\n return this._endpoints.map((e) => e.ownerBlock);\r\n }\r\n\r\n /** Gets the list of connected endpoints */\r\n public get endpoints() {\r\n return this._endpoints;\r\n }\r\n\r\n /** Gets a boolean indicating if that output point is connected to at least one input */\r\n public get hasEndpoints(): boolean {\r\n return this._endpoints && this._endpoints.length > 0;\r\n }\r\n\r\n /** Get the inner type (ie AutoDetect for instance instead of the inferred one) */\r\n public get innerType() {\r\n if (this._linkedConnectionSource && this._linkedConnectionSource.isConnected) {\r\n return this.type;\r\n }\r\n return this._type;\r\n }\r\n\r\n /** @internal */\r\n public _callCount = 0;\r\n\r\n /** @internal */\r\n public _executionCount = 0;\r\n\r\n /** @internal */\r\n public _resetCounters() {\r\n this._callCount = 0;\r\n this._executionCount = 0;\r\n }\r\n\r\n /**\r\n * Gets the number of times this point was called\r\n */\r\n public get callCount() {\r\n return this._callCount;\r\n }\r\n\r\n /**\r\n * Gets the number of times this point was executed\r\n */\r\n public get executionCount() {\r\n return this._executionCount;\r\n }\r\n\r\n /**\r\n * Gets the value represented by this connection point\r\n * @param state current evaluation state\r\n * @returns the connected value or the value if nothing is connected\r\n */\r\n public getConnectedValue(state: NodeGeometryBuildState) {\r\n if (this.isConnected) {\r\n if (this._connectedPoint?._storedFunction) {\r\n this._connectedPoint!._callCount++;\r\n this._connectedPoint!._executionCount++;\r\n return this._connectedPoint!._storedFunction(state);\r\n }\r\n this._connectedPoint!._callCount++;\r\n this._connectedPoint!._executionCount = 1;\r\n return this._connectedPoint!._storedValue;\r\n }\r\n this._callCount++;\r\n this._executionCount = 1;\r\n return this.value;\r\n }\r\n\r\n /**\r\n * Creates a new connection point\r\n * @param name defines the connection point name\r\n * @param ownerBlock defines the block hosting this connection point\r\n * @param direction defines the direction of the connection point\r\n */\r\n public constructor(name: string, ownerBlock: NodeGeometryBlock, direction: NodeGeometryConnectionPointDirection) {\r\n this._ownerBlock = ownerBlock;\r\n this.name = name;\r\n this._direction = direction;\r\n }\r\n\r\n /**\r\n * Gets the current class name e.g. \"NodeMaterialConnectionPoint\"\r\n * @returns the class name\r\n */\r\n public getClassName(): string {\r\n return \"NodeGeometryConnectionPoint\";\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating if the current point can be connected to another point\r\n * @param connectionPoint defines the other connection point\r\n * @returns a boolean\r\n */\r\n public canConnectTo(connectionPoint: NodeGeometryConnectionPoint) {\r\n return this.checkCompatibilityState(connectionPoint) === NodeGeometryConnectionPointCompatibilityStates.Compatible;\r\n }\r\n\r\n /**\r\n * Gets a number indicating if the current point can be connected to another point\r\n * @param connectionPoint defines the other connection point\r\n * @returns a number defining the compatibility state\r\n */\r\n public checkCompatibilityState(connectionPoint: NodeGeometryConnectionPoint): NodeGeometryConnectionPointCompatibilityStates {\r\n const ownerBlock = this._ownerBlock;\r\n const otherBlock = connectionPoint.ownerBlock;\r\n\r\n if (this.type !== connectionPoint.type && connectionPoint.innerType !== NodeGeometryBlockConnectionPointTypes.AutoDetect) {\r\n // Accepted types\r\n if (connectionPoint.acceptedConnectionPointTypes && connectionPoint.acceptedConnectionPointTypes.indexOf(this.type) !== -1) {\r\n return NodeGeometryConnectionPointCompatibilityStates.Compatible;\r\n } else {\r\n return NodeGeometryConnectionPointCompatibilityStates.TypeIncompatible;\r\n }\r\n }\r\n\r\n // Excluded\r\n if (connectionPoint.excludedConnectionPointTypes && connectionPoint.excludedConnectionPointTypes.indexOf(this.type) !== -1) {\r\n return NodeGeometryConnectionPointCompatibilityStates.TypeIncompatible;\r\n }\r\n\r\n // Check hierarchy\r\n let targetBlock = otherBlock;\r\n let sourceBlock = ownerBlock;\r\n if (this.direction === NodeGeometryConnectionPointDirection.Input) {\r\n targetBlock = ownerBlock;\r\n sourceBlock = otherBlock;\r\n }\r\n\r\n if (targetBlock.isAnAncestorOf(sourceBlock)) {\r\n return NodeGeometryConnectionPointCompatibilityStates.HierarchyIssue;\r\n }\r\n\r\n return NodeGeometryConnectionPointCompatibilityStates.Compatible;\r\n }\r\n\r\n /**\r\n * Connect this point to another connection point\r\n * @param connectionPoint defines the other connection point\r\n * @param ignoreConstraints defines if the system will ignore connection type constraints (default is false)\r\n * @returns the current connection point\r\n */\r\n public connectTo(connectionPoint: NodeGeometryConnectionPoint, ignoreConstraints = false): NodeGeometryConnectionPoint {\r\n if (!ignoreConstraints && !this.canConnectTo(connectionPoint)) {\r\n // eslint-disable-next-line no-throw-literal\r\n throw \"Cannot connect these two connectors.\";\r\n }\r\n\r\n this._endpoints.push(connectionPoint);\r\n connectionPoint._connectedPoint = this;\r\n\r\n this.onConnectionObservable.notifyObservers(connectionPoint);\r\n connectionPoint.onConnectionObservable.notifyObservers(this);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Disconnect this point from one of his endpoint\r\n * @param endpoint defines the other connection point\r\n * @returns the current connection point\r\n */\r\n public disconnectFrom(endpoint: NodeGeometryConnectionPoint): NodeGeometryConnectionPoint {\r\n const index = this._endpoints.indexOf(endpoint);\r\n\r\n if (index === -1) {\r\n return this;\r\n }\r\n\r\n this._endpoints.splice(index, 1);\r\n endpoint._connectedPoint = null;\r\n\r\n this.onDisconnectionObservable.notifyObservers(endpoint);\r\n endpoint.onDisconnectionObservable.notifyObservers(this);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Fill the list of excluded connection point types with all types other than those passed in the parameter\r\n * @param mask Types (ORed values of NodeMaterialBlockConnectionPointTypes) that are allowed, and thus will not be pushed to the excluded list\r\n */\r\n public addExcludedConnectionPointFromAllowedTypes(mask: number): void {\r\n let bitmask = 1;\r\n while (bitmask < NodeGeometryBlockConnectionPointTypes.All) {\r\n if (!(mask & bitmask)) {\r\n this.excludedConnectionPointTypes.push(bitmask);\r\n }\r\n bitmask = bitmask << 1;\r\n }\r\n }\r\n\r\n /**\r\n * Serializes this point in a JSON representation\r\n * @param isInput defines if the connection point is an input (default is true)\r\n * @returns the serialized point object\r\n */\r\n public serialize(isInput = true): any {\r\n const serializationObject: any = {};\r\n\r\n serializationObject.name = this.name;\r\n serializationObject.displayName = this.displayName;\r\n if (this.value !== undefined && this.value !== null) {\r\n if (this.value.asArray) {\r\n serializationObject.valueType = \"BABYLON.\" + this.value.getClassName();\r\n serializationObject.value = this.value.asArray();\r\n } else {\r\n serializationObject.valueType = \"number\";\r\n serializationObject.value = this.value;\r\n }\r\n }\r\n\r\n if (isInput && this.connectedPoint) {\r\n serializationObject.inputName = this.name;\r\n serializationObject.targetBlockId = this.connectedPoint.ownerBlock.uniqueId;\r\n serializationObject.targetConnectionName = this.connectedPoint.name;\r\n serializationObject.isExposedOnFrame = true;\r\n serializationObject.exposedPortPosition = this.exposedPortPosition;\r\n }\r\n\r\n if (this.isExposedOnFrame || this.exposedPortPosition >= 0) {\r\n serializationObject.isExposedOnFrame = true;\r\n serializationObject.exposedPortPosition = this.exposedPortPosition;\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Release resources\r\n */\r\n public dispose() {\r\n this.onConnectionObservable.clear();\r\n this.onDisconnectionObservable.clear();\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"nodeGeometryBlockConnectionPoint.js","sourceRoot":"","sources":["../../../../../dev/core/src/Meshes/Node/nodeGeometryBlockConnectionPoint.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,qCAAqC,EAAE,MAAM,0CAA0C,CAAC;AAIjG;;GAEG;AACH,MAAM,CAAN,IAAkB,8CAOjB;AAPD,WAAkB,8CAA8C;IAC5D,6BAA6B;IAC7B,+HAAU,CAAA;IACV,qDAAqD;IACrD,2IAAgB,CAAA;IAChB,sEAAsE;IACtE,uIAAc,CAAA;AAClB,CAAC,EAPiB,8CAA8C,KAA9C,8CAA8C,QAO/D;AAED;;GAEG;AACH,MAAM,CAAN,IAAkB,oCAKjB;AALD,WAAkB,oCAAoC;IAClD,YAAY;IACZ,iGAAK,CAAA;IACL,aAAa;IACb,mGAAM,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\"./nodeGeometryBlock\";\r\nimport { Observable } from \"../../Misc/observable\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"./Enums/nodeGeometryConnectionPointTypes\";\r\nimport type { GeometryInputBlock } from \"./Blocks/geometryInputBlock\";\r\nimport type { NodeGeometryBuildState } from \"./nodeGeometryBuildState\";\r\n\r\n/**\r\n * Enum used to define the compatibility state between two connection points\r\n */\r\nexport const enum NodeGeometryConnectionPointCompatibilityStates {\r\n /** Points are compatibles */\r\n Compatible,\r\n /** Points are incompatible because of their types */\r\n TypeIncompatible,\r\n /** Points are incompatible because they are in the same hierarchy **/\r\n HierarchyIssue,\r\n}\r\n\r\n/**\r\n * Defines the direction of a connection point\r\n */\r\nexport const enum NodeGeometryConnectionPointDirection {\r\n /** Input */\r\n Input,\r\n /** Output */\r\n Output,\r\n}\r\n\r\n/**\r\n * Defines a connection point for a block\r\n */\r\nexport class NodeGeometryConnectionPoint {\r\n /** @internal */\r\n public _ownerBlock: NodeGeometryBlock;\r\n /** @internal */\r\n public _connectedPoint: Nullable<NodeGeometryConnectionPoint> = null;\r\n /** @internal */\r\n public _storedValue: any = null;\r\n /** @internal */\r\n public _storedFunction: Nullable<(state: NodeGeometryBuildState) => any> = null;\r\n\r\n /** @internal */\r\n public _acceptedConnectionPointType: Nullable<NodeGeometryConnectionPoint> = null;\r\n\r\n private _endpoints = new Array<NodeGeometryConnectionPoint>();\r\n private _direction: NodeGeometryConnectionPointDirection;\r\n private _type = NodeGeometryBlockConnectionPointTypes.Geometry;\r\n\r\n /** @internal */\r\n public _linkedConnectionSource: Nullable<NodeGeometryConnectionPoint> = null;\r\n\r\n /** @internal */\r\n public _typeConnectionSource: Nullable<NodeGeometryConnectionPoint> = null;\r\n\r\n /** @internal */\r\n public _defaultConnectionPointType: Nullable<NodeGeometryBlockConnectionPointTypes> = null;\r\n\r\n /** Gets the direction of the point */\r\n public get direction() {\r\n return this._direction;\r\n }\r\n\r\n /**\r\n * Gets or sets the additional types supported by this connection point\r\n */\r\n public acceptedConnectionPointTypes: NodeGeometryBlockConnectionPointTypes[] = [];\r\n\r\n /**\r\n * Gets or sets the additional types excluded by this connection point\r\n */\r\n public excludedConnectionPointTypes: NodeGeometryBlockConnectionPointTypes[] = [];\r\n\r\n /**\r\n * Observable triggered when this point is connected\r\n */\r\n public onConnectionObservable = new Observable<NodeGeometryConnectionPoint>();\r\n\r\n /**\r\n * Observable triggered when this point is disconnected\r\n */\r\n public onDisconnectionObservable = new Observable<NodeGeometryConnectionPoint>();\r\n\r\n /**\r\n * Gets or sets a boolean indicating that this connection point is exposed on a frame\r\n */\r\n public isExposedOnFrame: boolean = false;\r\n\r\n /**\r\n * Gets or sets number indicating the position that the port is exposed to on a frame\r\n */\r\n public exposedPortPosition: number = -1;\r\n\r\n /**\r\n * Gets the default value used for this point at creation time\r\n */\r\n public defaultValue: Nullable<any> = null;\r\n\r\n /**\r\n * Gets or sets the default value used for this point if nothing is connected\r\n */\r\n public value: Nullable<any> = null;\r\n\r\n /**\r\n * Gets or sets the min value accepted for this point if nothing is connected\r\n */\r\n public valueMin: Nullable<any> = null;\r\n\r\n /**\r\n * Gets or sets the max value accepted for this point if nothing is connected\r\n */\r\n public valueMax: Nullable<any> = null;\r\n\r\n /**\r\n * Gets or sets the connection point type (default is float)\r\n */\r\n public get type(): NodeGeometryBlockConnectionPointTypes {\r\n if (this._type === NodeGeometryBlockConnectionPointTypes.AutoDetect) {\r\n if (this._ownerBlock.isInput) {\r\n return (this._ownerBlock as GeometryInputBlock).type;\r\n }\r\n\r\n if (this._connectedPoint) {\r\n return this._connectedPoint.type;\r\n }\r\n\r\n if (this._linkedConnectionSource) {\r\n if (this._linkedConnectionSource.isConnected) {\r\n return this._linkedConnectionSource.type;\r\n }\r\n if (this._linkedConnectionSource._defaultConnectionPointType) {\r\n return this._linkedConnectionSource._defaultConnectionPointType;\r\n }\r\n }\r\n\r\n if (this._defaultConnectionPointType) {\r\n return this._defaultConnectionPointType;\r\n }\r\n }\r\n\r\n if (this._type === NodeGeometryBlockConnectionPointTypes.BasedOnInput) {\r\n if (this._typeConnectionSource) {\r\n if (!this._typeConnectionSource.isConnected && this._defaultConnectionPointType) {\r\n return this._defaultConnectionPointType;\r\n }\r\n return this._typeConnectionSource.type;\r\n } else if (this._defaultConnectionPointType) {\r\n return this._defaultConnectionPointType;\r\n }\r\n }\r\n\r\n return this._type;\r\n }\r\n\r\n public set type(value: NodeGeometryBlockConnectionPointTypes) {\r\n this._type = value;\r\n }\r\n\r\n /**\r\n * Gets or sets the connection point name\r\n */\r\n public name: string;\r\n\r\n /**\r\n * Gets or sets the connection point display name\r\n */\r\n public displayName: string;\r\n\r\n /**\r\n * Gets or sets a boolean indicating that this connection point can be omitted\r\n */\r\n public isOptional: boolean;\r\n\r\n /**\r\n * Gets a boolean indicating that the current point is connected to another NodeMaterialBlock\r\n */\r\n public get isConnected(): boolean {\r\n return this.connectedPoint !== null || this.hasEndpoints;\r\n }\r\n\r\n /** Get the other side of the connection (if any) */\r\n public get connectedPoint(): Nullable<NodeGeometryConnectionPoint> {\r\n return this._connectedPoint;\r\n }\r\n\r\n /** Get the block that owns this connection point */\r\n public get ownerBlock(): NodeGeometryBlock {\r\n return this._ownerBlock;\r\n }\r\n\r\n /** Get the block connected on the other side of this connection (if any) */\r\n public get sourceBlock(): Nullable<NodeGeometryBlock> {\r\n if (!this._connectedPoint) {\r\n return null;\r\n }\r\n\r\n return this._connectedPoint.ownerBlock;\r\n }\r\n\r\n /** Get the block connected on the endpoints of this connection (if any) */\r\n public get connectedBlocks(): Array<NodeGeometryBlock> {\r\n if (this._endpoints.length === 0) {\r\n return [];\r\n }\r\n\r\n return this._endpoints.map((e) => e.ownerBlock);\r\n }\r\n\r\n /** Gets the list of connected endpoints */\r\n public get endpoints() {\r\n return this._endpoints;\r\n }\r\n\r\n /** Gets a boolean indicating if that output point is connected to at least one input */\r\n public get hasEndpoints(): boolean {\r\n return this._endpoints && this._endpoints.length > 0;\r\n }\r\n\r\n /** Get the inner type (ie AutoDetect for instance instead of the inferred one) */\r\n public get innerType() {\r\n if (this._linkedConnectionSource && this._linkedConnectionSource.isConnected) {\r\n return this.type;\r\n }\r\n return this._type;\r\n }\r\n\r\n /** @internal */\r\n public _callCount = 0;\r\n\r\n /** @internal */\r\n public _executionCount = 0;\r\n\r\n /** @internal */\r\n public _resetCounters() {\r\n this._callCount = 0;\r\n this._executionCount = 0;\r\n }\r\n\r\n /**\r\n * Gets the number of times this point was called\r\n */\r\n public get callCount() {\r\n return this._callCount;\r\n }\r\n\r\n /**\r\n * Gets the number of times this point was executed\r\n */\r\n public get executionCount() {\r\n return this._executionCount;\r\n }\r\n\r\n /**\r\n * Gets the value represented by this connection point\r\n * @param state current evaluation state\r\n * @returns the connected value or the value if nothing is connected\r\n */\r\n public getConnectedValue(state: NodeGeometryBuildState) {\r\n if (this.isConnected) {\r\n if (this._connectedPoint?._storedFunction) {\r\n this._connectedPoint!._callCount++;\r\n this._connectedPoint!._executionCount++;\r\n return this._connectedPoint!._storedFunction(state);\r\n }\r\n this._connectedPoint!._callCount++;\r\n this._connectedPoint!._executionCount = 1;\r\n return this._connectedPoint!._storedValue;\r\n }\r\n this._callCount++;\r\n this._executionCount = 1;\r\n return this.value;\r\n }\r\n\r\n /**\r\n * Creates a new connection point\r\n * @param name defines the connection point name\r\n * @param ownerBlock defines the block hosting this connection point\r\n * @param direction defines the direction of the connection point\r\n */\r\n public constructor(name: string, ownerBlock: NodeGeometryBlock, direction: NodeGeometryConnectionPointDirection) {\r\n this._ownerBlock = ownerBlock;\r\n this.name = name;\r\n this._direction = direction;\r\n }\r\n\r\n /**\r\n * Gets the current class name e.g. \"NodeMaterialConnectionPoint\"\r\n * @returns the class name\r\n */\r\n public getClassName(): string {\r\n return \"NodeGeometryConnectionPoint\";\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating if the current point can be connected to another point\r\n * @param connectionPoint defines the other connection point\r\n * @returns a boolean\r\n */\r\n public canConnectTo(connectionPoint: NodeGeometryConnectionPoint) {\r\n return this.checkCompatibilityState(connectionPoint) === NodeGeometryConnectionPointCompatibilityStates.Compatible;\r\n }\r\n\r\n /**\r\n * Gets a number indicating if the current point can be connected to another point\r\n * @param connectionPoint defines the other connection point\r\n * @returns a number defining the compatibility state\r\n */\r\n public checkCompatibilityState(connectionPoint: NodeGeometryConnectionPoint): NodeGeometryConnectionPointCompatibilityStates {\r\n const ownerBlock = this._ownerBlock;\r\n const otherBlock = connectionPoint.ownerBlock;\r\n\r\n if (this.type !== connectionPoint.type && connectionPoint.innerType !== NodeGeometryBlockConnectionPointTypes.AutoDetect) {\r\n // Accepted types\r\n if (connectionPoint.acceptedConnectionPointTypes && connectionPoint.acceptedConnectionPointTypes.indexOf(this.type) !== -1) {\r\n return NodeGeometryConnectionPointCompatibilityStates.Compatible;\r\n } else {\r\n return NodeGeometryConnectionPointCompatibilityStates.TypeIncompatible;\r\n }\r\n }\r\n\r\n // Excluded\r\n if (connectionPoint.excludedConnectionPointTypes && connectionPoint.excludedConnectionPointTypes.indexOf(this.type) !== -1) {\r\n return NodeGeometryConnectionPointCompatibilityStates.TypeIncompatible;\r\n }\r\n\r\n // Check hierarchy\r\n let targetBlock = otherBlock;\r\n let sourceBlock = ownerBlock;\r\n if (this.direction === NodeGeometryConnectionPointDirection.Input) {\r\n targetBlock = ownerBlock;\r\n sourceBlock = otherBlock;\r\n }\r\n\r\n if (targetBlock.isAnAncestorOf(sourceBlock)) {\r\n return NodeGeometryConnectionPointCompatibilityStates.HierarchyIssue;\r\n }\r\n\r\n return NodeGeometryConnectionPointCompatibilityStates.Compatible;\r\n }\r\n\r\n /**\r\n * Connect this point to another connection point\r\n * @param connectionPoint defines the other connection point\r\n * @param ignoreConstraints defines if the system will ignore connection type constraints (default is false)\r\n * @returns the current connection point\r\n */\r\n public connectTo(connectionPoint: NodeGeometryConnectionPoint, ignoreConstraints = false): NodeGeometryConnectionPoint {\r\n if (!ignoreConstraints && !this.canConnectTo(connectionPoint)) {\r\n // eslint-disable-next-line no-throw-literal\r\n throw \"Cannot connect these two connectors.\";\r\n }\r\n\r\n this._endpoints.push(connectionPoint);\r\n connectionPoint._connectedPoint = this;\r\n\r\n this.onConnectionObservable.notifyObservers(connectionPoint);\r\n connectionPoint.onConnectionObservable.notifyObservers(this);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Disconnect this point from one of his endpoint\r\n * @param endpoint defines the other connection point\r\n * @returns the current connection point\r\n */\r\n public disconnectFrom(endpoint: NodeGeometryConnectionPoint): NodeGeometryConnectionPoint {\r\n const index = this._endpoints.indexOf(endpoint);\r\n\r\n if (index === -1) {\r\n return this;\r\n }\r\n\r\n this._endpoints.splice(index, 1);\r\n endpoint._connectedPoint = null;\r\n\r\n this.onDisconnectionObservable.notifyObservers(endpoint);\r\n endpoint.onDisconnectionObservable.notifyObservers(this);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Fill the list of excluded connection point types with all types other than those passed in the parameter\r\n * @param mask Types (ORed values of NodeMaterialBlockConnectionPointTypes) that are allowed, and thus will not be pushed to the excluded list\r\n */\r\n public addExcludedConnectionPointFromAllowedTypes(mask: number): void {\r\n let bitmask = 1;\r\n while (bitmask < NodeGeometryBlockConnectionPointTypes.All) {\r\n if (!(mask & bitmask)) {\r\n this.excludedConnectionPointTypes.push(bitmask);\r\n }\r\n bitmask = bitmask << 1;\r\n }\r\n }\r\n\r\n /**\r\n * Serializes this point in a JSON representation\r\n * @param isInput defines if the connection point is an input (default is true)\r\n * @returns the serialized point object\r\n */\r\n public serialize(isInput = true): any {\r\n const serializationObject: any = {};\r\n\r\n serializationObject.name = this.name;\r\n serializationObject.displayName = this.displayName;\r\n if (this.value !== undefined && this.value !== null) {\r\n if (this.value.asArray) {\r\n serializationObject.valueType = \"BABYLON.\" + this.value.getClassName();\r\n serializationObject.value = this.value.asArray();\r\n } else {\r\n serializationObject.valueType = \"number\";\r\n serializationObject.value = this.value;\r\n }\r\n }\r\n\r\n if (isInput && this.connectedPoint) {\r\n serializationObject.inputName = this.name;\r\n serializationObject.targetBlockId = this.connectedPoint.ownerBlock.uniqueId;\r\n serializationObject.targetConnectionName = this.connectedPoint.name;\r\n serializationObject.isExposedOnFrame = true;\r\n serializationObject.exposedPortPosition = this.exposedPortPosition;\r\n }\r\n\r\n if (this.isExposedOnFrame || this.exposedPortPosition >= 0) {\r\n serializationObject.isExposedOnFrame = true;\r\n serializationObject.exposedPortPosition = this.exposedPortPosition;\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Release resources\r\n */\r\n public dispose() {\r\n this.onConnectionObservable.clear();\r\n this.onDisconnectionObservable.clear();\r\n }\r\n}\r\n"]}
|
package/Meshes/abstractMesh.d.ts
CHANGED
|
@@ -614,8 +614,9 @@ export declare abstract class AbstractMesh extends TransformNode implements IDis
|
|
|
614
614
|
/**
|
|
615
615
|
* Resets the draw wrappers cache for all submeshes of this abstract mesh
|
|
616
616
|
* @param passId If provided, releases only the draw wrapper corresponding to this render pass id
|
|
617
|
+
* @param immediate If true, the effect will be released immediately, otherwise it will be released at the next frame
|
|
617
618
|
*/
|
|
618
|
-
resetDrawCache(passId?: number): void;
|
|
619
|
+
resetDrawCache(passId?: number, immediate?: boolean): void;
|
|
619
620
|
/**
|
|
620
621
|
* Returns true if the mesh is blocked. Implemented by child classes
|
|
621
622
|
*/
|
|
@@ -966,10 +967,11 @@ export declare abstract class AbstractMesh extends TransformNode implements IDis
|
|
|
966
967
|
*/
|
|
967
968
|
clone(name: string, newParent: Nullable<Node>, doNotCloneChildren?: boolean): Nullable<AbstractMesh>;
|
|
968
969
|
/**
|
|
969
|
-
* Disposes all the submeshes of the current
|
|
970
|
+
* Disposes all the submeshes of the current mesh
|
|
971
|
+
* @param immediate should dispose the effects immediately or not
|
|
970
972
|
* @returns the current mesh
|
|
971
973
|
*/
|
|
972
|
-
releaseSubMeshes(): AbstractMesh;
|
|
974
|
+
releaseSubMeshes(immediate?: boolean): AbstractMesh;
|
|
973
975
|
/**
|
|
974
976
|
* Releases resources associated with this abstract mesh.
|
|
975
977
|
* @param doNotRecurse Set to true to not recurse into each children (recurse into each children by default)
|
package/Meshes/abstractMesh.js
CHANGED
|
@@ -409,7 +409,7 @@ export class AbstractMesh extends TransformNode {
|
|
|
409
409
|
if (!this.subMeshes) {
|
|
410
410
|
return;
|
|
411
411
|
}
|
|
412
|
-
this.resetDrawCache();
|
|
412
|
+
this.resetDrawCache(undefined, value == null);
|
|
413
413
|
this._unBindEffect();
|
|
414
414
|
}
|
|
415
415
|
/**
|
|
@@ -969,13 +969,14 @@ export class AbstractMesh extends TransformNode {
|
|
|
969
969
|
/**
|
|
970
970
|
* Resets the draw wrappers cache for all submeshes of this abstract mesh
|
|
971
971
|
* @param passId If provided, releases only the draw wrapper corresponding to this render pass id
|
|
972
|
+
* @param immediate If true, the effect will be released immediately, otherwise it will be released at the next frame
|
|
972
973
|
*/
|
|
973
|
-
resetDrawCache(passId) {
|
|
974
|
+
resetDrawCache(passId, immediate = false) {
|
|
974
975
|
if (!this.subMeshes) {
|
|
975
976
|
return;
|
|
976
977
|
}
|
|
977
978
|
for (const subMesh of this.subMeshes) {
|
|
978
|
-
subMesh.resetDrawCache(passId);
|
|
979
|
+
subMesh.resetDrawCache(passId, immediate);
|
|
979
980
|
}
|
|
980
981
|
}
|
|
981
982
|
// Methods
|
|
@@ -1702,13 +1703,14 @@ export class AbstractMesh extends TransformNode {
|
|
|
1702
1703
|
return null;
|
|
1703
1704
|
}
|
|
1704
1705
|
/**
|
|
1705
|
-
* Disposes all the submeshes of the current
|
|
1706
|
+
* Disposes all the submeshes of the current mesh
|
|
1707
|
+
* @param immediate should dispose the effects immediately or not
|
|
1706
1708
|
* @returns the current mesh
|
|
1707
1709
|
*/
|
|
1708
|
-
releaseSubMeshes() {
|
|
1710
|
+
releaseSubMeshes(immediate = false) {
|
|
1709
1711
|
if (this.subMeshes) {
|
|
1710
1712
|
while (this.subMeshes.length) {
|
|
1711
|
-
this.subMeshes[0].dispose();
|
|
1713
|
+
this.subMeshes[0].dispose(immediate);
|
|
1712
1714
|
}
|
|
1713
1715
|
}
|
|
1714
1716
|
else {
|
|
@@ -1787,7 +1789,7 @@ export class AbstractMesh extends TransformNode {
|
|
|
1787
1789
|
});
|
|
1788
1790
|
// SubMeshes
|
|
1789
1791
|
if (this.getClassName() !== "InstancedMesh" || this.getClassName() !== "InstancedLinesMesh") {
|
|
1790
|
-
this.releaseSubMeshes();
|
|
1792
|
+
this.releaseSubMeshes(true);
|
|
1791
1793
|
}
|
|
1792
1794
|
// Query
|
|
1793
1795
|
const engine = scene.getEngine();
|