@babylonjs/core 6.42.0 → 6.44.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.
Files changed (107) hide show
  1. package/Animations/animatable.js +2 -2
  2. package/Animations/animatable.js.map +1 -1
  3. package/Animations/animationGroup.d.ts +4 -2
  4. package/Animations/animationGroup.js +22 -2
  5. package/Animations/animationGroup.js.map +1 -1
  6. package/Cameras/arcRotateCamera.js +7 -1
  7. package/Cameras/arcRotateCamera.js.map +1 -1
  8. package/Culling/ray.d.ts +12 -1
  9. package/Culling/ray.js +20 -3
  10. package/Culling/ray.js.map +1 -1
  11. package/Debug/skeletonViewer.d.ts +2 -0
  12. package/Debug/skeletonViewer.js +111 -50
  13. package/Debug/skeletonViewer.js.map +1 -1
  14. package/Engines/engine.d.ts +14 -3
  15. package/Engines/engine.js +11 -0
  16. package/Engines/engine.js.map +1 -1
  17. package/Engines/nullEngine.d.ts +2 -0
  18. package/Engines/nullEngine.js +3 -0
  19. package/Engines/nullEngine.js.map +1 -1
  20. package/Engines/thinEngine.d.ts +4 -1
  21. package/Engines/thinEngine.js +2 -2
  22. package/Engines/thinEngine.js.map +1 -1
  23. package/Inputs/scene.inputManager.js +2 -2
  24. package/Inputs/scene.inputManager.js.map +1 -1
  25. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js +1 -1
  26. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js.map +1 -1
  27. package/Materials/Node/nodeMaterial.d.ts +50 -0
  28. package/Materials/Node/nodeMaterial.js +50 -0
  29. package/Materials/Node/nodeMaterial.js.map +1 -1
  30. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +1 -1
  31. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  32. package/Meshes/GreasedLine/greasedLineBaseMesh.d.ts +3 -1
  33. package/Meshes/GreasedLine/greasedLineBaseMesh.js +4 -2
  34. package/Meshes/GreasedLine/greasedLineBaseMesh.js.map +1 -1
  35. package/Meshes/Node/Blocks/geometryDistanceBlock.d.ts +30 -0
  36. package/Meshes/Node/Blocks/geometryDistanceBlock.js +63 -0
  37. package/Meshes/Node/Blocks/geometryDistanceBlock.js.map +1 -0
  38. package/Meshes/Node/Blocks/geometryDotBlock.d.ts +30 -0
  39. package/Meshes/Node/Blocks/geometryDotBlock.js +63 -0
  40. package/Meshes/Node/Blocks/geometryDotBlock.js.map +1 -0
  41. package/Meshes/Node/Blocks/geometryLengthBlock.d.ts +26 -0
  42. package/Meshes/Node/Blocks/geometryLengthBlock.js +52 -0
  43. package/Meshes/Node/Blocks/geometryLengthBlock.js.map +1 -0
  44. package/Meshes/Node/Blocks/geometryPosterizeBlock.d.ts +31 -0
  45. package/Meshes/Node/Blocks/geometryPosterizeBlock.js +63 -0
  46. package/Meshes/Node/Blocks/geometryPosterizeBlock.js.map +1 -0
  47. package/Meshes/Node/Blocks/geometryReplaceColorBlock.d.ts +38 -0
  48. package/Meshes/Node/Blocks/geometryReplaceColorBlock.js +88 -0
  49. package/Meshes/Node/Blocks/geometryReplaceColorBlock.js.map +1 -0
  50. package/Meshes/Node/Blocks/geometryRotate2dBlock.d.ts +30 -0
  51. package/Meshes/Node/Blocks/geometryRotate2dBlock.js +59 -0
  52. package/Meshes/Node/Blocks/geometryRotate2dBlock.js.map +1 -0
  53. package/Meshes/Node/index.d.ts +6 -0
  54. package/Meshes/Node/index.js +6 -0
  55. package/Meshes/Node/index.js.map +1 -1
  56. package/Meshes/mesh.js +10 -0
  57. package/Meshes/mesh.js.map +1 -1
  58. package/Meshes/trailMesh.js +24 -19
  59. package/Meshes/trailMesh.js.map +1 -1
  60. package/Physics/v2/Plugins/havokPlugin.d.ts +0 -1
  61. package/Physics/v2/Plugins/havokPlugin.js +3 -2
  62. package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
  63. package/Physics/v2/physicsEngine.d.ts +1 -0
  64. package/Physics/v2/physicsEngine.js +1 -0
  65. package/Physics/v2/physicsEngine.js.map +1 -1
  66. package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.d.ts +1 -1
  67. package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.js +10 -2
  68. package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.js.map +1 -1
  69. package/XR/features/Layers/WebXRCompositionLayer.d.ts +48 -0
  70. package/XR/features/Layers/WebXRCompositionLayer.js +94 -0
  71. package/XR/features/Layers/WebXRCompositionLayer.js.map +1 -0
  72. package/XR/features/Layers/WebXRProjectionLayer.d.ts +10 -0
  73. package/XR/features/Layers/WebXRProjectionLayer.js +51 -0
  74. package/XR/features/Layers/WebXRProjectionLayer.js.map +1 -0
  75. package/XR/features/WebXRControllerPointerSelection.js +4 -1
  76. package/XR/features/WebXRControllerPointerSelection.js.map +1 -1
  77. package/XR/features/WebXRControllerTeleportation.js +11 -10
  78. package/XR/features/WebXRControllerTeleportation.js.map +1 -1
  79. package/XR/features/WebXRHandTracking.d.ts +7 -1
  80. package/XR/features/WebXRHandTracking.js +28 -26
  81. package/XR/features/WebXRHandTracking.js.map +1 -1
  82. package/XR/features/WebXRLayers.d.ts +44 -26
  83. package/XR/features/WebXRLayers.js +204 -153
  84. package/XR/features/WebXRLayers.js.map +1 -1
  85. package/XR/features/WebXRNearInteraction.js +16 -1
  86. package/XR/features/WebXRNearInteraction.js.map +1 -1
  87. package/XR/webXRCamera.js +10 -0
  88. package/XR/webXRCamera.js.map +1 -1
  89. package/XR/webXRDefaultExperience.d.ts +9 -0
  90. package/XR/webXRDefaultExperience.js +8 -0
  91. package/XR/webXRDefaultExperience.js.map +1 -1
  92. package/XR/webXRExperienceHelper.js +1 -1
  93. package/XR/webXRExperienceHelper.js.map +1 -1
  94. package/XR/webXRFeaturesManager.js +8 -2
  95. package/XR/webXRFeaturesManager.js.map +1 -1
  96. package/XR/webXRLayerWrapper.d.ts +12 -3
  97. package/XR/webXRLayerWrapper.js +18 -2
  98. package/XR/webXRLayerWrapper.js.map +1 -1
  99. package/XR/webXRRenderTargetTextureProvider.js +0 -5
  100. package/XR/webXRRenderTargetTextureProvider.js.map +1 -1
  101. package/XR/webXRSessionManager.d.ts +9 -1
  102. package/XR/webXRSessionManager.js +24 -5
  103. package/XR/webXRSessionManager.js.map +1 -1
  104. package/package.json +1 -1
  105. package/scene.d.ts +9 -1
  106. package/scene.js +4 -4
  107. package/scene.js.map +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometryLengthBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryLengthBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,iBAAiB;IACtD;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,qCAAqC,CAAC,UAAU,CAAC,CAAC;QAC9E,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,qCAAqC,CAAC,KAAK,CAAC,CAAC;QAE3E,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC,qCAAqC,CAAC,KAAK,CAAC,CAAC;QAC/F,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC,qCAAqC,CAAC,MAAM,CAAC,CAAC;IACpG,CAAC;IAED;;;OAGG;IACI,YAAY;QACf,OAAO,qBAAqB,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IAES,WAAW;QACjB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;YACzB,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC;YACnC,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;YAChC,OAAO;SACV;QAED,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,KAAK,EAAE,EAAE;YACpC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAClD,OAAO,KAAK,CAAC,MAAM,EAAE,CAAC;QAC1B,CAAC,CAAC;QAEF,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAED,aAAa,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\n/**\r\n * Block used to get the length of a vector\r\n */\r\nexport class GeometryLengthBlock extends NodeGeometryBlock {\r\n /**\r\n * Creates a new GeometryLengthBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"value\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.Float);\r\n\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public getClassName() {\r\n return \"GeometryLengthBlock\";\r\n }\r\n\r\n /**\r\n * Gets the value input component\r\n */\r\n public get value(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected _buildBlock() {\r\n if (!this.value.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n this.output._storedFunction = (state) => {\r\n const value = this.value.getConnectedValue(state);\r\n return value.length();\r\n };\r\n\r\n return this;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryLengthBlock\", GeometryLengthBlock);\r\n"]}
@@ -0,0 +1,31 @@
1
+ import { NodeGeometryBlock } from "../nodeGeometryBlock";
2
+ import type { NodeGeometryConnectionPoint } from "../nodeGeometryBlockConnectionPoint";
3
+ /**
4
+ * Block used to posterize a value
5
+ * @see https://en.wikipedia.org/wiki/Posterization
6
+ */
7
+ export declare class GeometryPosterizeBlock extends NodeGeometryBlock {
8
+ /**
9
+ * Creates a new GeometryPosterizeBlock
10
+ * @param name defines the block name
11
+ */
12
+ constructor(name: string);
13
+ /**
14
+ * Gets the current class name
15
+ * @returns the class name
16
+ */
17
+ getClassName(): string;
18
+ /**
19
+ * Gets the value input component
20
+ */
21
+ get value(): NodeGeometryConnectionPoint;
22
+ /**
23
+ * Gets the steps input component
24
+ */
25
+ get steps(): NodeGeometryConnectionPoint;
26
+ /**
27
+ * Gets the output component
28
+ */
29
+ get output(): NodeGeometryConnectionPoint;
30
+ protected _buildBlock(): this | undefined;
31
+ }
@@ -0,0 +1,63 @@
1
+ import { RegisterClass } from "../../../Misc/typeStore.js";
2
+ import { NodeGeometryBlockConnectionPointTypes } from "../Enums/nodeGeometryConnectionPointTypes.js";
3
+ import { NodeGeometryBlock } from "../nodeGeometryBlock.js";
4
+ /**
5
+ * Block used to posterize a value
6
+ * @see https://en.wikipedia.org/wiki/Posterization
7
+ */
8
+ export class GeometryPosterizeBlock extends NodeGeometryBlock {
9
+ /**
10
+ * Creates a new GeometryPosterizeBlock
11
+ * @param name defines the block name
12
+ */
13
+ constructor(name) {
14
+ super(name);
15
+ this.registerInput("value", NodeGeometryBlockConnectionPointTypes.AutoDetect);
16
+ this.registerInput("steps", NodeGeometryBlockConnectionPointTypes.AutoDetect);
17
+ this.registerOutput("output", NodeGeometryBlockConnectionPointTypes.BasedOnInput);
18
+ this._outputs[0]._typeConnectionSource = this._inputs[0];
19
+ this._linkConnectionTypes(0, 1);
20
+ this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);
21
+ this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);
22
+ }
23
+ /**
24
+ * Gets the current class name
25
+ * @returns the class name
26
+ */
27
+ getClassName() {
28
+ return "GeometryPosterizeBlock";
29
+ }
30
+ /**
31
+ * Gets the value input component
32
+ */
33
+ get value() {
34
+ return this._inputs[0];
35
+ }
36
+ /**
37
+ * Gets the steps input component
38
+ */
39
+ get steps() {
40
+ return this._inputs[1];
41
+ }
42
+ /**
43
+ * Gets the output component
44
+ */
45
+ get output() {
46
+ return this._outputs[0];
47
+ }
48
+ _buildBlock() {
49
+ if (!this.value.isConnected || !this.steps.isConnected) {
50
+ this.output._storedFunction = null;
51
+ this.output._storedValue = null;
52
+ return;
53
+ }
54
+ this.output._storedFunction = (state) => {
55
+ const source = this.value.getConnectedValue(state);
56
+ const steps = this.steps.getConnectedValue(state);
57
+ return Math.floor((source / (1.0 / steps)) * (1.0 / steps));
58
+ };
59
+ return this;
60
+ }
61
+ }
62
+ RegisterClass("BABYLON.GeometryPosterizeBlock", GeometryPosterizeBlock);
63
+ //# sourceMappingURL=geometryPosterizeBlock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometryPosterizeBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryPosterizeBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,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WAAW;QACjB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;YACpD,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC;YACnC,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;YAChC,OAAO;SACV;QAED,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,KAAK,EAAE,EAAE;YACpC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACnD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAClD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC;QAChE,CAAC,CAAC;QAEF,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAED,aAAa,CAAC,gCAAgC,EAAE,sBAAsB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\n\r\n/**\r\n * Block used to posterize a value\r\n * @see https://en.wikipedia.org/wiki/Posterization\r\n */\r\nexport class GeometryPosterizeBlock extends NodeGeometryBlock {\r\n /**\r\n * Creates a new GeometryPosterizeBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"value\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"steps\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._linkConnectionTypes(0, 1);\r\n\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public getClassName() {\r\n return \"GeometryPosterizeBlock\";\r\n }\r\n\r\n /**\r\n * Gets the value input component\r\n */\r\n public get value(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the steps input component\r\n */\r\n public get steps(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected _buildBlock() {\r\n if (!this.value.isConnected || !this.steps.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n this.output._storedFunction = (state) => {\r\n const source = this.value.getConnectedValue(state);\r\n const steps = this.steps.getConnectedValue(state);\r\n return Math.floor((source / (1.0 / steps)) * (1.0 / steps));\r\n };\r\n\r\n return this;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryPosterizeBlock\", GeometryPosterizeBlock);\r\n"]}
@@ -0,0 +1,38 @@
1
+ import { NodeGeometryBlock } from "../nodeGeometryBlock";
2
+ import type { NodeGeometryConnectionPoint } from "../nodeGeometryBlockConnectionPoint";
3
+ /**
4
+ * Block used to replace a color by another one
5
+ */
6
+ export declare class GeometryReplaceColorBlock extends NodeGeometryBlock {
7
+ /**
8
+ * Creates a new GeometryReplaceColorBlock
9
+ * @param name defines the block name
10
+ */
11
+ constructor(name: string);
12
+ /**
13
+ * Gets the current class name
14
+ * @returns the class name
15
+ */
16
+ getClassName(): string;
17
+ /**
18
+ * Gets the value input component
19
+ */
20
+ get value(): NodeGeometryConnectionPoint;
21
+ /**
22
+ * Gets the reference input component
23
+ */
24
+ get reference(): NodeGeometryConnectionPoint;
25
+ /**
26
+ * Gets the distance input component
27
+ */
28
+ get distance(): NodeGeometryConnectionPoint;
29
+ /**
30
+ * Gets the replacement input component
31
+ */
32
+ get replacement(): NodeGeometryConnectionPoint;
33
+ /**
34
+ * Gets the output component
35
+ */
36
+ get output(): NodeGeometryConnectionPoint;
37
+ protected _buildBlock(): this | undefined;
38
+ }
@@ -0,0 +1,88 @@
1
+ import { RegisterClass } from "../../../Misc/typeStore.js";
2
+ import { NodeGeometryBlockConnectionPointTypes } from "../Enums/nodeGeometryConnectionPointTypes.js";
3
+ import { NodeGeometryBlock } from "../nodeGeometryBlock.js";
4
+ /**
5
+ * Block used to replace a color by another one
6
+ */
7
+ export class GeometryReplaceColorBlock extends NodeGeometryBlock {
8
+ /**
9
+ * Creates a new GeometryReplaceColorBlock
10
+ * @param name defines the block name
11
+ */
12
+ constructor(name) {
13
+ super(name);
14
+ this.registerInput("value", NodeGeometryBlockConnectionPointTypes.AutoDetect);
15
+ this.registerInput("reference", NodeGeometryBlockConnectionPointTypes.AutoDetect);
16
+ this.registerInput("distance", NodeGeometryBlockConnectionPointTypes.Float);
17
+ this.registerInput("replacement", NodeGeometryBlockConnectionPointTypes.AutoDetect);
18
+ this.registerOutput("output", NodeGeometryBlockConnectionPointTypes.BasedOnInput);
19
+ this._outputs[0]._typeConnectionSource = this._inputs[0];
20
+ this._linkConnectionTypes(0, 1);
21
+ this._linkConnectionTypes(0, 3);
22
+ this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);
23
+ this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);
24
+ this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);
25
+ this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);
26
+ this._inputs[3].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);
27
+ this._inputs[3].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);
28
+ }
29
+ /**
30
+ * Gets the current class name
31
+ * @returns the class name
32
+ */
33
+ getClassName() {
34
+ return "GeometryReplaceColorBlock";
35
+ }
36
+ /**
37
+ * Gets the value input component
38
+ */
39
+ get value() {
40
+ return this._inputs[0];
41
+ }
42
+ /**
43
+ * Gets the reference input component
44
+ */
45
+ get reference() {
46
+ return this._inputs[1];
47
+ }
48
+ /**
49
+ * Gets the distance input component
50
+ */
51
+ get distance() {
52
+ return this._inputs[2];
53
+ }
54
+ /**
55
+ * Gets the replacement input component
56
+ */
57
+ get replacement() {
58
+ return this._inputs[3];
59
+ }
60
+ /**
61
+ * Gets the output component
62
+ */
63
+ get output() {
64
+ return this._outputs[0];
65
+ }
66
+ _buildBlock() {
67
+ if (!this.value.isConnected || !this.reference.isConnected || !this.distance.isConnected || !this.replacement.isConnected) {
68
+ this.output._storedFunction = null;
69
+ this.output._storedValue = null;
70
+ return;
71
+ }
72
+ this.output._storedFunction = (state) => {
73
+ const value = this.value.getConnectedValue(state);
74
+ const reference = this.reference.getConnectedValue(state);
75
+ const distance = this.distance.getConnectedValue(state);
76
+ const replacement = this.replacement.getConnectedValue(state);
77
+ if (value.subtract(reference).length() < distance) {
78
+ return replacement;
79
+ }
80
+ else {
81
+ return value;
82
+ }
83
+ };
84
+ return this;
85
+ }
86
+ }
87
+ RegisterClass("BABYLON.GeometryReplaceColorBlock", GeometryReplaceColorBlock);
88
+ //# sourceMappingURL=geometryReplaceColorBlock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometryReplaceColorBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryReplaceColorBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,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AC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAClD,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAC1D,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACxD,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAE9D,IAAI,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,GAAG,QAAQ,EAAE;gBAC/C,OAAO,WAAW,CAAC;aACtB;iBAAM;gBACH,OAAO,KAAK,CAAC;aAChB;QACL,CAAC,CAAC;QAEF,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAED,aAAa,CAAC,mCAAmC,EAAE,yBAAyB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\n/**\r\n * Block used to replace a color by another one\r\n */\r\nexport class GeometryReplaceColorBlock extends NodeGeometryBlock {\r\n /**\r\n * Creates a new GeometryReplaceColorBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"value\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"reference\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"distance\", NodeGeometryBlockConnectionPointTypes.Float);\r\n this.registerInput(\"replacement\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._linkConnectionTypes(0, 1);\r\n this._linkConnectionTypes(0, 3);\r\n\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[3].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);\r\n this._inputs[3].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public getClassName() {\r\n return \"GeometryReplaceColorBlock\";\r\n }\r\n\r\n /**\r\n * Gets the value input component\r\n */\r\n public get value(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the reference input component\r\n */\r\n public get reference(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the distance input component\r\n */\r\n public get distance(): NodeGeometryConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the replacement input component\r\n */\r\n public get replacement(): NodeGeometryConnectionPoint {\r\n return this._inputs[3];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected _buildBlock() {\r\n if (!this.value.isConnected || !this.reference.isConnected || !this.distance.isConnected || !this.replacement.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n this.output._storedFunction = (state) => {\r\n const value = this.value.getConnectedValue(state);\r\n const reference = this.reference.getConnectedValue(state);\r\n const distance = this.distance.getConnectedValue(state);\r\n const replacement = this.replacement.getConnectedValue(state);\r\n\r\n if (value.subtract(reference).length() < distance) {\r\n return replacement;\r\n } else {\r\n return value;\r\n }\r\n };\r\n\r\n return this;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryReplaceColorBlock\", GeometryReplaceColorBlock);\r\n"]}
@@ -0,0 +1,30 @@
1
+ import { NodeGeometryBlock } from "../nodeGeometryBlock";
2
+ import type { NodeGeometryConnectionPoint } from "../nodeGeometryBlockConnectionPoint";
3
+ /**
4
+ * Block used to rotate a 2d vector by a given angle
5
+ */
6
+ export declare class GeometryRotate2dBlock extends NodeGeometryBlock {
7
+ /**
8
+ * Creates a new GeometryRotate2dBlock
9
+ * @param name defines the block name
10
+ */
11
+ constructor(name: string);
12
+ /**
13
+ * Gets the current class name
14
+ * @returns the class name
15
+ */
16
+ getClassName(): string;
17
+ /**
18
+ * Gets the input vector
19
+ */
20
+ get input(): NodeGeometryConnectionPoint;
21
+ /**
22
+ * Gets the input angle
23
+ */
24
+ get angle(): NodeGeometryConnectionPoint;
25
+ /**
26
+ * Gets the output component
27
+ */
28
+ get output(): NodeGeometryConnectionPoint;
29
+ protected _buildBlock(): this | undefined;
30
+ }
@@ -0,0 +1,59 @@
1
+ import { Vector2 } from "../../../Maths/math.vector.js";
2
+ import { RegisterClass } from "../../../Misc/typeStore.js";
3
+ import { NodeGeometryBlockConnectionPointTypes } from "../Enums/nodeGeometryConnectionPointTypes.js";
4
+ import { NodeGeometryBlock } from "../nodeGeometryBlock.js";
5
+ /**
6
+ * Block used to rotate a 2d vector by a given angle
7
+ */
8
+ export class GeometryRotate2dBlock extends NodeGeometryBlock {
9
+ /**
10
+ * Creates a new GeometryRotate2dBlock
11
+ * @param name defines the block name
12
+ */
13
+ constructor(name) {
14
+ super(name);
15
+ this.registerInput("input", NodeGeometryBlockConnectionPointTypes.Vector2);
16
+ this.registerInput("angle", NodeGeometryBlockConnectionPointTypes.Float);
17
+ this.registerOutput("output", NodeGeometryBlockConnectionPointTypes.Vector2);
18
+ }
19
+ /**
20
+ * Gets the current class name
21
+ * @returns the class name
22
+ */
23
+ getClassName() {
24
+ return "GeometryRotate2dBlock";
25
+ }
26
+ /**
27
+ * Gets the input vector
28
+ */
29
+ get input() {
30
+ return this._inputs[0];
31
+ }
32
+ /**
33
+ * Gets the input angle
34
+ */
35
+ get angle() {
36
+ return this._inputs[1];
37
+ }
38
+ /**
39
+ * Gets the output component
40
+ */
41
+ get output() {
42
+ return this._outputs[0];
43
+ }
44
+ _buildBlock() {
45
+ if (!this.angle.isConnected || !this.input.isConnected) {
46
+ this.output._storedFunction = null;
47
+ this.output._storedValue = null;
48
+ return;
49
+ }
50
+ this.output._storedFunction = (state) => {
51
+ const input = this.input.getConnectedValue(state);
52
+ const angle = this.angle.getConnectedValue(state);
53
+ return new Vector2(Math.cos(angle) * input.x - Math.sin(angle) * input.y, Math.sin(angle) * input.x + Math.cos(angle) * input.y);
54
+ };
55
+ return this;
56
+ }
57
+ }
58
+ RegisterClass("BABYLON.GeometryRotate2dBlock", GeometryRotate2dBlock);
59
+ //# sourceMappingURL=geometryRotate2dBlock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometryRotate2dBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryRotate2dBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,sCAA+B;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,iBAAiB;IACxD;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,qCAAqC,CAAC,OAAO,CAAC,CAAC;QAC3E,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,qCAAqC,CAAC,KAAK,CAAC,C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,IAAI,CAAC;IAChB,CAAC;CACJ;AAED,aAAa,CAAC,+BAA+B,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["import { Vector2 } from \"core/Maths/math.vector\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\n\r\n/**\r\n * Block used to rotate a 2d vector by a given angle\r\n */\r\nexport class GeometryRotate2dBlock extends NodeGeometryBlock {\r\n /**\r\n * Creates a new GeometryRotate2dBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"input\", NodeGeometryBlockConnectionPointTypes.Vector2);\r\n this.registerInput(\"angle\", NodeGeometryBlockConnectionPointTypes.Float);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.Vector2);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public getClassName() {\r\n return \"GeometryRotate2dBlock\";\r\n }\r\n\r\n /**\r\n * Gets the input vector\r\n */\r\n public get input(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the input angle\r\n */\r\n public get angle(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected _buildBlock() {\r\n if (!this.angle.isConnected || !this.input.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n this.output._storedFunction = (state) => {\r\n const input = this.input.getConnectedValue(state) as Vector2;\r\n const angle = this.angle.getConnectedValue(state);\r\n return new Vector2(Math.cos(angle) * input.x - Math.sin(angle) * input.y, Math.sin(angle) * input.x + Math.cos(angle) * input.y);\r\n };\r\n\r\n return this;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryRotate2dBlock\", GeometryRotate2dBlock);\r\n"]}
@@ -72,3 +72,9 @@ export * from "./Blocks/geometryClampBlock";
72
72
  export * from "./Blocks/geometryCrossBlock";
73
73
  export * from "./Blocks/geometryCurveBlock";
74
74
  export * from "./Blocks/geometryDesaturateBlock";
75
+ export * from "./Blocks/geometryPosterizeBlock";
76
+ export * from "./Blocks/geometryReplaceColorBlock";
77
+ export * from "./Blocks/geometryDistanceBlock";
78
+ export * from "./Blocks/geometryDotBlock";
79
+ export * from "./Blocks/geometryLengthBlock";
80
+ export * from "./Blocks/geometryRotate2dBlock";
@@ -72,4 +72,10 @@ export * from "./Blocks/geometryClampBlock.js";
72
72
  export * from "./Blocks/geometryCrossBlock.js";
73
73
  export * from "./Blocks/geometryCurveBlock.js";
74
74
  export * from "./Blocks/geometryDesaturateBlock.js";
75
+ export * from "./Blocks/geometryPosterizeBlock.js";
76
+ export * from "./Blocks/geometryReplaceColorBlock.js";
77
+ export * from "./Blocks/geometryDistanceBlock.js";
78
+ export * from "./Blocks/geometryDotBlock.js";
79
+ export * from "./Blocks/geometryLengthBlock.js";
80
+ export * from "./Blocks/geometryRotate2dBlock.js";
75
81
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../dev/core/src/Meshes/Node/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0CAA0C,CAAC;AACzD,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,c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6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC","sourcesContent":["export * from \"./nodeGeometry\";\r\nexport * from \"./nodeGeometryBlock\";\r\nexport * from \"./nodeGeometryBlockConnectionPoint\";\r\nexport * from \"./nodeGeometryBuildState\";\r\nexport * from \"./Interfaces/nodeGeometryExecutionContext\";\r\nexport * from \"./Enums/nodeGeometryConnectionPointTypes\";\r\nexport * from \"./Enums/nodeGeometryContextualSources\";\r\nexport * from \"./Blocks/geometryOptimizeBlock\";\r\nexport * from \"./Blocks/geometryOutputBlock\";\r\nexport * from \"./Blocks/geometryInputBlock\";\r\nexport * from \"./Blocks/Sources/planeBlock\";\r\nexport * from \"./Blocks/Sources/boxBlock\";\r\nexport * from \"./Blocks/Sources/meshBlock\";\r\nexport * from \"./Blocks/Sources/icoSphereBlock\";\r\nexport * from \"./Blocks/Sources/sphereBlock\";\r\nexport * from \"./Blocks/Sources/gridBlock\";\r\nexport * from \"./Blocks/Sources/torusBlock\";\r\nexport * from \"./Blocks/Sources/cylinderBlock\";\r\nexport * from \"./Blocks/Sources/capsuleBlock\";\r\nexport * from \"./Blocks/Sources/discBlock\";\r\nexport * from \"./Blocks/Sources/nullBlock\";\r\nexport * from \"./Blocks/Set/setPositionsBlock\";\r\nexport * from \"./Blocks/Set/setNormalsBlock\";\r\nexport * from \"./Blocks/Set/setUVsBlock\";\r\nexport * from \"./Blocks/Set/setColorsBlock\";\r\nexport * from \"./Blocks/Set/setTangentsBlock\";\r\nexport * from \"./Blocks/mathBlock\";\r\nexport * from \"./Blocks/mapRangeBlock\";\r\nexport * from \"./Blocks/conditionBlock\";\r\nexport * from \"./Blocks/randomBlock\";\r\nexport * from \"./Blocks/noiseBlock\";\r\nexport * from \"./Blocks/mergeGeometryBlock\";\r\nexport * from \"./Blocks/geometryCollectionBlock\";\r\nexport * from \"./Blocks/geometryElbowBlock\";\r\nexport * from \"./Blocks/computeNormalsBlock\";\r\nexport * from \"./Blocks/vectorConverterBlock\";\r\nexport * from \"./Blocks/normalizeVectorBlock\";\r\nexport * from \"./Blocks/Set/setMaterialIDBlock\";\r\nexport * from \"./Blocks/geometryTrigonometryBlock\";\r\nexport * from \"./Blocks/geometryTransformBlock\";\r\nexport * from \"./Blocks/Matrices/rotationXBlock\";\r\nexport * from \"./Blocks/Matrices/rotationYBlock\";\r\nexport * from \"./Blocks/Matrices/rotationZBlock\";\r\nexport * from \"./Blocks/Matrices/scalingBlock\";\r\nexport * from \"./Blocks/Matrices/alignBlock\";\r\nexport * from \"./Blocks/Matrices/translationBlock\";\r\nexport * from \"./Blocks/Instances/instantiateOnVerticesBlock\";\r\nexport * from \"./Blocks/Instances/instantiateOnFacesBlock\";\r\nexport * from \"./Blocks/Instances/instantiateOnVolumeBlock\";\r\nexport * from \"./Blocks/Instances/instantiateBlock\";\r\nexport * from \"./Blocks/Instances/instantiateLinearBlock\";\r\nexport * from \"./Blocks/Instances/instantiateRadialBlock\";\r\nexport * from \"./Blocks/intFloatConverterBlock\";\r\nexport * from \"./Blocks/debugBlock\";\r\nexport * from \"./Blocks/geometryInfoBlock\";\r\nexport * from \"./Blocks/mappingBlock\";\r\nexport * from \"./Blocks/matrixComposeBlock\";\r\nexport * from \"./Blocks/Teleport/teleportInBlock\";\r\nexport * from \"./Blocks/Teleport/teleportOutBlock\";\r\nexport * from \"./Blocks/Textures/geometryTextureBlock\";\r\nexport * from \"./Blocks/Textures/geometryTextureFetchBlock\";\r\nexport * from \"./Blocks/boundingBlock\";\r\nexport * from \"./Blocks/booleanGeometryBlock\";\r\nexport * from \"./Blocks/geometryArcTan2Block\";\r\nexport * from \"./Blocks/geometryLerpBlock\";\r\nexport * from \"./Blocks/geometryNLerpBlock\";\r\nexport * from \"./Blocks/geometryStepBlock\";\r\nexport * from \"./Blocks/geometrySmoothStepBlock\";\r\nexport * from \"./Blocks/geometryModBlock\";\r\nexport * from \"./Blocks/geometryPowBlock\";\r\nexport * from \"./Blocks/geometryClampBlock\";\r\nexport * from \"./Blocks/geometryCrossBlock\";\r\nexport * from \"./Blocks/geometryCurveBlock\";\r\nexport * from \"./Blocks/geometryDesaturateBlock\";\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../dev/core/src/Meshes/Node/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0CAA0C,CAAC;AACzD,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,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CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC","sourcesContent":["export * from \"./nodeGeometry\";\r\nexport * from \"./nodeGeometryBlock\";\r\nexport * from \"./nodeGeometryBlockConnectionPoint\";\r\nexport * from \"./nodeGeometryBuildState\";\r\nexport * from \"./Interfaces/nodeGeometryExecutionContext\";\r\nexport * from \"./Enums/nodeGeometryConnectionPointTypes\";\r\nexport * from \"./Enums/nodeGeometryContextualSources\";\r\nexport * from \"./Blocks/geometryOptimizeBlock\";\r\nexport * from \"./Blocks/geometryOutputBlock\";\r\nexport * from \"./Blocks/geometryInputBlock\";\r\nexport * from \"./Blocks/Sources/planeBlock\";\r\nexport * from \"./Blocks/Sources/boxBlock\";\r\nexport * from \"./Blocks/Sources/meshBlock\";\r\nexport * from \"./Blocks/Sources/icoSphereBlock\";\r\nexport * from \"./Blocks/Sources/sphereBlock\";\r\nexport * from \"./Blocks/Sources/gridBlock\";\r\nexport * from \"./Blocks/Sources/torusBlock\";\r\nexport * from \"./Blocks/Sources/cylinderBlock\";\r\nexport * from \"./Blocks/Sources/capsuleBlock\";\r\nexport * from \"./Blocks/Sources/discBlock\";\r\nexport * from \"./Blocks/Sources/nullBlock\";\r\nexport * from \"./Blocks/Set/setPositionsBlock\";\r\nexport * from \"./Blocks/Set/setNormalsBlock\";\r\nexport * from \"./Blocks/Set/setUVsBlock\";\r\nexport * from \"./Blocks/Set/setColorsBlock\";\r\nexport * from \"./Blocks/Set/setTangentsBlock\";\r\nexport * from \"./Blocks/mathBlock\";\r\nexport * from \"./Blocks/mapRangeBlock\";\r\nexport * from \"./Blocks/conditionBlock\";\r\nexport * from \"./Blocks/randomBlock\";\r\nexport * from \"./Blocks/noiseBlock\";\r\nexport * from \"./Blocks/mergeGeometryBlock\";\r\nexport * from \"./Blocks/geometryCollectionBlock\";\r\nexport * from \"./Blocks/geometryElbowBlock\";\r\nexport * from \"./Blocks/computeNormalsBlock\";\r\nexport * from \"./Blocks/vectorConverterBlock\";\r\nexport * from \"./Blocks/normalizeVectorBlock\";\r\nexport * from \"./Blocks/Set/setMaterialIDBlock\";\r\nexport * from \"./Blocks/geometryTrigonometryBlock\";\r\nexport * from \"./Blocks/geometryTransformBlock\";\r\nexport * from \"./Blocks/Matrices/rotationXBlock\";\r\nexport * from \"./Blocks/Matrices/rotationYBlock\";\r\nexport * from \"./Blocks/Matrices/rotationZBlock\";\r\nexport * from \"./Blocks/Matrices/scalingBlock\";\r\nexport * from \"./Blocks/Matrices/alignBlock\";\r\nexport * from \"./Blocks/Matrices/translationBlock\";\r\nexport * from \"./Blocks/Instances/instantiateOnVerticesBlock\";\r\nexport * from \"./Blocks/Instances/instantiateOnFacesBlock\";\r\nexport * from \"./Blocks/Instances/instantiateOnVolumeBlock\";\r\nexport * from \"./Blocks/Instances/instantiateBlock\";\r\nexport * from \"./Blocks/Instances/instantiateLinearBlock\";\r\nexport * from \"./Blocks/Instances/instantiateRadialBlock\";\r\nexport * from \"./Blocks/intFloatConverterBlock\";\r\nexport * from \"./Blocks/debugBlock\";\r\nexport * from \"./Blocks/geometryInfoBlock\";\r\nexport * from \"./Blocks/mappingBlock\";\r\nexport * from \"./Blocks/matrixComposeBlock\";\r\nexport * from \"./Blocks/Teleport/teleportInBlock\";\r\nexport * from \"./Blocks/Teleport/teleportOutBlock\";\r\nexport * from \"./Blocks/Textures/geometryTextureBlock\";\r\nexport * from \"./Blocks/Textures/geometryTextureFetchBlock\";\r\nexport * from \"./Blocks/boundingBlock\";\r\nexport * from \"./Blocks/booleanGeometryBlock\";\r\nexport * from \"./Blocks/geometryArcTan2Block\";\r\nexport * from \"./Blocks/geometryLerpBlock\";\r\nexport * from \"./Blocks/geometryNLerpBlock\";\r\nexport * from \"./Blocks/geometryStepBlock\";\r\nexport * from \"./Blocks/geometrySmoothStepBlock\";\r\nexport * from \"./Blocks/geometryModBlock\";\r\nexport * from \"./Blocks/geometryPowBlock\";\r\nexport * from \"./Blocks/geometryClampBlock\";\r\nexport * from \"./Blocks/geometryCrossBlock\";\r\nexport * from \"./Blocks/geometryCurveBlock\";\r\nexport * from \"./Blocks/geometryDesaturateBlock\";\r\nexport * from \"./Blocks/geometryPosterizeBlock\";\r\nexport * from \"./Blocks/geometryReplaceColorBlock\";\r\nexport * from \"./Blocks/geometryDistanceBlock\";\r\nexport * from \"./Blocks/geometryDotBlock\";\r\nexport * from \"./Blocks/geometryLengthBlock\";\r\nexport * from \"./Blocks/geometryRotate2dBlock\";\r\n"]}
package/Meshes/mesh.js CHANGED
@@ -2255,6 +2255,16 @@ export class Mesh extends AbstractMesh {
2255
2255
  }
2256
2256
  this.setVerticesData(VertexBuffer.NormalKind, data, this.getVertexBuffer(VertexBuffer.NormalKind).isUpdatable());
2257
2257
  }
2258
+ // Tangents
2259
+ if (this.isVerticesDataPresent(VertexBuffer.TangentKind)) {
2260
+ data = this.getVerticesData(VertexBuffer.TangentKind);
2261
+ for (index = 0; index < data.length; index += 4) {
2262
+ Vector3.TransformNormalFromFloatsToRef(data[index], data[index + 1], data[index + 2], transform, temp)
2263
+ .normalize()
2264
+ .toArray(data, index);
2265
+ }
2266
+ this.setVerticesData(VertexBuffer.TangentKind, data, this.getVertexBuffer(VertexBuffer.TangentKind).isUpdatable());
2267
+ }
2258
2268
  // flip faces?
2259
2269
  if (transform.determinant() < 0) {
2260
2270
  this.flipFaces();