@onerjs/core 8.27.2 → 8.27.4

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 (150) hide show
  1. package/Cameras/arcRotateCamera.js +7 -5
  2. package/Cameras/arcRotateCamera.js.map +1 -1
  3. package/Cameras/targetCamera.d.ts +12 -0
  4. package/Cameras/targetCamera.js +19 -5
  5. package/Cameras/targetCamera.js.map +1 -1
  6. package/Decorators/nodeDecorator.d.ts +7 -5
  7. package/Decorators/nodeDecorator.js +7 -5
  8. package/Decorators/nodeDecorator.js.map +1 -1
  9. package/Engines/abstractEngine.js +2 -2
  10. package/Engines/abstractEngine.js.map +1 -1
  11. package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.js +1 -1
  12. package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.js +1 -1
  13. package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js +1 -1
  14. package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.js +1 -1
  15. package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.js +2 -2
  16. package/FrameGraph/Node/Blocks/PostProcesses/imageProcessingPostProcessBlock.js +3 -3
  17. package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.js +1 -1
  18. package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js +3 -3
  19. package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.js +1 -1
  20. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js +22 -22
  21. package/FrameGraph/Node/Blocks/Textures/clearBlock.js +1 -1
  22. package/FrameGraph/Node/Blocks/index.d.ts +1 -0
  23. package/FrameGraph/Node/Blocks/index.js +1 -0
  24. package/FrameGraph/Node/Blocks/index.js.map +1 -1
  25. package/FrameGraph/Node/Blocks/inputBlock.js +1 -1
  26. package/FrameGraph/Node/Blocks/inputBlock.js.map +1 -1
  27. package/FrameGraph/Node/nodeRenderGraph.d.ts +2 -1
  28. package/FrameGraph/Node/nodeRenderGraph.js +8 -8
  29. package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
  30. package/FrameGraph/Passes/renderPass.js +3 -3
  31. package/FrameGraph/Passes/renderPass.js.map +1 -1
  32. package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js +7 -7
  33. package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js.map +1 -1
  34. package/FrameGraph/Tasks/Texture/clearTextureTask.js +1 -1
  35. package/FrameGraph/Tasks/Texture/clearTextureTask.js.map +1 -1
  36. package/FrameGraph/frameGraph.d.ts +4 -0
  37. package/FrameGraph/frameGraph.js +8 -0
  38. package/FrameGraph/frameGraph.js.map +1 -1
  39. package/FrameGraph/frameGraphRenderContext.d.ts +2 -1
  40. package/FrameGraph/frameGraphRenderContext.js +10 -3
  41. package/FrameGraph/frameGraphRenderContext.js.map +1 -1
  42. package/FrameGraph/frameGraphTextureManager.d.ts +32 -2
  43. package/FrameGraph/frameGraphTextureManager.js +139 -9
  44. package/FrameGraph/frameGraphTextureManager.js.map +1 -1
  45. package/Materials/Background/backgroundMaterial.js +1 -1
  46. package/Materials/Background/backgroundMaterial.js.map +1 -1
  47. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +1 -1
  48. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +4 -4
  49. package/Materials/Node/Blocks/conditionalBlock.js +1 -1
  50. package/Materials/Node/Blocks/curveBlock.js +1 -1
  51. package/Materials/Node/Blocks/meshAttributeExistsBlock.js +1 -1
  52. package/Materials/Node/Blocks/trigonometryBlock.js +1 -1
  53. package/Materials/Node/Blocks/waveBlock.js +1 -1
  54. package/Materials/PBR/openPbrMaterial.d.ts +2 -0
  55. package/Materials/PBR/openPbrMaterial.js +3 -1
  56. package/Materials/PBR/openPbrMaterial.js.map +1 -1
  57. package/Materials/PBR/pbrBaseMaterial.d.ts +2 -0
  58. package/Materials/PBR/pbrBaseMaterial.js +3 -1
  59. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  60. package/Materials/Textures/texture.js +13 -3
  61. package/Materials/Textures/texture.js.map +1 -1
  62. package/Materials/floatingOriginMatrixOverrides.js +11 -6
  63. package/Materials/floatingOriginMatrixOverrides.js.map +1 -1
  64. package/Materials/materialHelper.functions.d.ts +3 -3
  65. package/Materials/materialHelper.functions.js +3 -3
  66. package/Materials/materialHelper.functions.js.map +1 -1
  67. package/Materials/standardMaterial.d.ts +2 -0
  68. package/Materials/standardMaterial.js +3 -1
  69. package/Materials/standardMaterial.js.map +1 -1
  70. package/Maths/math.vector.functions.d.ts +17 -0
  71. package/Maths/math.vector.functions.js +27 -0
  72. package/Maths/math.vector.functions.js.map +1 -1
  73. package/Meshes/Node/Blocks/Set/aggregatorBlock.js +1 -1
  74. package/Meshes/Node/Blocks/Set/setUVsBlock.js +1 -1
  75. package/Meshes/Node/Blocks/booleanGeometryBlock.js +1 -1
  76. package/Meshes/Node/Blocks/conditionBlock.js +1 -1
  77. package/Meshes/Node/Blocks/geometryCurveBlock.js +1 -1
  78. package/Meshes/Node/Blocks/geometryEaseBlock.js +1 -1
  79. package/Meshes/Node/Blocks/geometryTrigonometryBlock.js +1 -1
  80. package/Meshes/Node/Blocks/mappingBlock.js +1 -1
  81. package/Meshes/Node/Blocks/mathBlock.js +1 -1
  82. package/Meshes/Node/Blocks/randomBlock.js +1 -1
  83. package/Meshes/abstractMesh.d.ts +4 -0
  84. package/Meshes/abstractMesh.js +7 -0
  85. package/Meshes/abstractMesh.js.map +1 -1
  86. package/Meshes/mesh.js +1 -1
  87. package/Meshes/mesh.js.map +1 -1
  88. package/Misc/screenshotTools.d.ts +63 -1
  89. package/Misc/screenshotTools.js +207 -4
  90. package/Misc/screenshotTools.js.map +1 -1
  91. package/Misc/textureTools.d.ts +6 -0
  92. package/Misc/textureTools.js +6 -1
  93. package/Misc/textureTools.js.map +1 -1
  94. package/Particles/Node/Blocks/Conditions/particleConditionBlock.js +1 -1
  95. package/Particles/Node/Blocks/Emitters/boxShapeBlock.js +1 -0
  96. package/Particles/Node/Blocks/Emitters/boxShapeBlock.js.map +1 -1
  97. package/Particles/Node/Blocks/Emitters/customShapeBlock.js +1 -0
  98. package/Particles/Node/Blocks/Emitters/customShapeBlock.js.map +1 -1
  99. package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.js +1 -0
  100. package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.js.map +1 -1
  101. package/Particles/Node/Blocks/Emitters/meshShapeBlock.js +1 -0
  102. package/Particles/Node/Blocks/Emitters/meshShapeBlock.js.map +1 -1
  103. package/Particles/Node/Blocks/Emitters/pointShapeBlock.js +1 -0
  104. package/Particles/Node/Blocks/Emitters/pointShapeBlock.js.map +1 -1
  105. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.js +1 -0
  106. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.js.map +1 -1
  107. package/Particles/Node/Blocks/index.d.ts +1 -0
  108. package/Particles/Node/Blocks/index.js +1 -0
  109. package/Particles/Node/Blocks/index.js.map +1 -1
  110. package/Particles/Node/Blocks/particleFresnelBlock.d.ts +34 -0
  111. package/Particles/Node/Blocks/particleFresnelBlock.js +74 -0
  112. package/Particles/Node/Blocks/particleFresnelBlock.js.map +1 -0
  113. package/Particles/Node/Blocks/particleInputBlock.js +2 -0
  114. package/Particles/Node/Blocks/particleInputBlock.js.map +1 -1
  115. package/Particles/Node/Blocks/particleLerpBlock.d.ts +1 -1
  116. package/Particles/Node/Blocks/particleLerpBlock.js +1 -1
  117. package/Particles/Node/Blocks/particleLerpBlock.js.map +1 -1
  118. package/Particles/Node/Blocks/particleLocalVariableBlock.js +1 -1
  119. package/Particles/Node/Blocks/particleMathBlock.js +1 -1
  120. package/Particles/Node/Blocks/particleRandomBlock.js +1 -1
  121. package/Particles/Node/Blocks/particleTrigonometryBlock.js +1 -1
  122. package/Particles/Node/Blocks/systemBlock.js +1 -1
  123. package/Particles/Node/Enums/nodeParticleContextualSources.d.ts +3 -1
  124. package/Particles/Node/Enums/nodeParticleContextualSources.js +2 -0
  125. package/Particles/Node/Enums/nodeParticleContextualSources.js.map +1 -1
  126. package/Particles/Node/Enums/nodeParticleSystemSources.d.ts +3 -1
  127. package/Particles/Node/Enums/nodeParticleSystemSources.js +2 -0
  128. package/Particles/Node/Enums/nodeParticleSystemSources.js.map +1 -1
  129. package/Particles/Node/nodeParticleBuildState.d.ts +1 -1
  130. package/Particles/Node/nodeParticleBuildState.js +4 -0
  131. package/Particles/Node/nodeParticleBuildState.js.map +1 -1
  132. package/Particles/gpuParticleSystem.js +1 -0
  133. package/Particles/gpuParticleSystem.js.map +1 -1
  134. package/Shaders/ShadersInclude/lightFragment.js +1 -1
  135. package/Shaders/ShadersInclude/lightFragment.js.map +1 -1
  136. package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js +1 -1
  137. package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
  138. package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js +1 -1
  139. package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
  140. package/ShadersWGSL/ShadersInclude/pbrFragmentExtraDeclaration.js +1 -1
  141. package/ShadersWGSL/ShadersInclude/pbrFragmentExtraDeclaration.js.map +1 -1
  142. package/ShadersWGSL/default.fragment.js +1 -1
  143. package/ShadersWGSL/default.fragment.js.map +1 -1
  144. package/ShadersWGSL/default.vertex.js +2 -2
  145. package/ShadersWGSL/default.vertex.js.map +1 -1
  146. package/ShadersWGSL/pbr.vertex.js +2 -2
  147. package/ShadersWGSL/pbr.vertex.js.map +1 -1
  148. package/node.js +4 -1
  149. package/node.js.map +1 -1
  150. package/package.json +1 -1
@@ -16,6 +16,23 @@ export declare function Vector2ToFixed(vector: IVector2Like, decimalCount: numbe
16
16
  * @returns the dot product
17
17
  */
18
18
  export declare function Vector3Dot<T extends IVector3Like, U extends IVector3Like>(a: DeepImmutable<T>, b: DeepImmutable<U>): number;
19
+ /**
20
+ * Sets the given floats into the result.
21
+ * @param x defines the x coordinate
22
+ * @param y defines the y coordinate
23
+ * @param z defines the z coordinate
24
+ * @param result defines the target vector
25
+ * @returns the result vector
26
+ */
27
+ export declare function Vector3FromFloatsToRef<T extends IVector3Like>(x: number, y: number, z: number, result: T): T;
28
+ /**
29
+ * Stores the scaled values of a vector into the result.
30
+ * @param a defines the source vector
31
+ * @param scale defines the scale factor
32
+ * @param result defines the target vector
33
+ * @returns the scaled vector
34
+ */
35
+ export declare function Vector3ScaleToRef<T extends IVector3Like, ResultT extends IVector3Like>(a: DeepImmutable<T>, scale: number, result: ResultT): ResultT;
19
36
  /**
20
37
  * Creates a string representation of the Vector3
21
38
  * @param vector defines the Vector3 to stringify
@@ -18,6 +18,33 @@ export function Vector2ToFixed(vector, decimalCount) {
18
18
  export function Vector3Dot(a, b) {
19
19
  return a.x * b.x + a.y * b.y + a.z * b.z;
20
20
  }
21
+ /**
22
+ * Sets the given floats into the result.
23
+ * @param x defines the x coordinate
24
+ * @param y defines the y coordinate
25
+ * @param z defines the z coordinate
26
+ * @param result defines the target vector
27
+ * @returns the result vector
28
+ */
29
+ export function Vector3FromFloatsToRef(x, y, z, result) {
30
+ result.x = x;
31
+ result.y = y;
32
+ result.z = z;
33
+ return result;
34
+ }
35
+ /**
36
+ * Stores the scaled values of a vector into the result.
37
+ * @param a defines the source vector
38
+ * @param scale defines the scale factor
39
+ * @param result defines the target vector
40
+ * @returns the scaled vector
41
+ */
42
+ export function Vector3ScaleToRef(a, scale, result) {
43
+ result.x = a.x * scale;
44
+ result.y = a.y * scale;
45
+ result.z = a.z * scale;
46
+ return result;
47
+ }
21
48
  /**
22
49
  * Creates a string representation of the Vector3
23
50
  * @param vector defines the Vector3 to stringify
@@ -1 +1 @@
1
- {"version":3,"file":"math.vector.functions.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/math.vector.functions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MA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C,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AACxD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CAAoB,CAAmB,EAAE,CAAmB;IACnG,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;IAChC,gCAAgC,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;IAC/C,OAAO,MAAM,CAAC;AAClB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gCAAgC,CAAgD,CAAmB,EAAE,CAAmB,EAAE,MAAe;IACrJ,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACjC,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACxD,UAAU,CAAC,iBAAiB,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAClD,OAAO,MAAM,CAAC;AAClB,CAAC","sourcesContent":["import { Clamp } from \"./math.scalar.functions\";\r\nimport type { DeepImmutable } from \"../types\";\r\nimport type { IVector2Like, IVector3Like } from \"./math.like\";\r\nimport { Quaternion, Vector3 } from \"./math.vector\";\r\nimport type { Vector4 } from \"./math.vector\";\r\n\r\n/**\r\n * Creates a string representation of the IVector2Like\r\n * @param vector defines the IVector2Like to stringify\r\n * @param decimalCount defines the number of decimals to use\r\n * @returns a string with the IVector2Like coordinates.\r\n */\r\nexport function Vector2ToFixed(vector: IVector2Like, decimalCount: number): string {\r\n return `{X: ${vector.x.toFixed(decimalCount)} Y: ${vector.y.toFixed(decimalCount)}}`;\r\n}\r\n\r\n/**\r\n * Computes the dot product of two IVector3Like objects.\r\n * @param a defines the first vector\r\n * @param b defines the second vector\r\n * @returns the dot product\r\n */\r\nexport function Vector3Dot<T extends IVector3Like, U extends IVector3Like>(a: DeepImmutable<T>, b: DeepImmutable<U>) {\r\n return a.x * b.x + a.y * b.y + a.z * b.z;\r\n}\r\n\r\n/**\r\n * Creates a string representation of the Vector3\r\n * @param vector defines the Vector3 to stringify\r\n * @param decimalCount defines the number of decimals to use\r\n * @returns a string with the Vector3 coordinates.\r\n */\r\nexport function Vector3ToFixed(vector: Vector3, decimalCount: number): string {\r\n return `{X: ${vector._x.toFixed(decimalCount)} Y: ${vector._y.toFixed(decimalCount)} Z: ${vector._z.toFixed(decimalCount)}}`;\r\n}\r\n\r\n/**\r\n * Creates a string representation of the Vector4\r\n * @param vector defines the Vector4 to stringify\r\n * @param decimalCount defines the number of decimals to use\r\n * @returns a string with the Vector4 coordinates.\r\n */\r\nexport function Vector4ToFixed(vector: Vector4, decimalCount: number): string {\r\n return `{X: ${vector.x.toFixed(decimalCount)} Y: ${vector.y.toFixed(decimalCount)} Z: ${vector.z.toFixed(decimalCount)} W: ${vector.w.toFixed(decimalCount)}}`;\r\n}\r\n\r\n/**\r\n * Returns the angle in radians between two quaternions\r\n * @param q1 defines the first quaternion\r\n * @param q2 defines the second quaternion\r\n * @returns the angle in radians between the two quaternions\r\n */\r\nexport function GetAngleBetweenQuaternions(q1: DeepImmutable<Quaternion>, q2: DeepImmutable<Quaternion>): number {\r\n return Math.acos(Clamp(Quaternion.Dot(q1, q2))) * 2;\r\n}\r\n\r\n/**\r\n * Creates a quaternion from two direction vectors\r\n * @param a defines the first direction vector\r\n * @param b defines the second direction vector\r\n * @returns the target quaternion\r\n */\r\nexport function GetQuaternionFromDirections<T extends Vector3>(a: DeepImmutable<T>, b: DeepImmutable<T>): Quaternion {\r\n const result = new Quaternion();\r\n GetQuaternionFromDirectionsToRef(a, b, result);\r\n return result;\r\n}\r\n\r\n/**\r\n * Creates a quaternion from two direction vectors\r\n * @param a defines the first direction vector\r\n * @param b defines the second direction vector\r\n * @param result defines the target quaternion\r\n * @returns the target quaternion\r\n */\r\nexport function GetQuaternionFromDirectionsToRef<T extends Vector3, ResultT extends Quaternion>(a: DeepImmutable<T>, b: DeepImmutable<T>, result: ResultT): ResultT {\r\n const axis = Vector3.Cross(a, b);\r\n const angle = Math.acos(Clamp(Vector3Dot(a, b), -1, 1));\r\n Quaternion.RotationAxisToRef(axis, angle, result);\r\n return result;\r\n}\r\n"]}
1
+ {"version":3,"file":"math.vector.functions.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/math.vector.functions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAGhD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGpD;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,MAAoB,EAAE,YAAoB;IACrE,OAAO,OAAO,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC;AACzF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAiD,CAAmB,EAAE,CAAmB;IAC/G,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAAyB,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,MAAS;IACrG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,OAAO,MAAM,CAAC;AAClB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAuD,CAAmB,EAAE,KAAa,EAAE,MAAe;IACvI,MAAM,CAAC,CAAC,GAAG,CAAC,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,gCAAgC,CAAgD,CAAmB,EAAE,CAAmB,EAAE,MAAe;IACrJ,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACjC,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACxD,UAAU,CAAC,iBAAiB,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAClD,OAAO,MAAM,CAAC;AAClB,CAAC","sourcesContent":["import { Clamp } from \"./math.scalar.functions\";\r\nimport type { DeepImmutable } from \"../types\";\r\nimport type { IVector2Like, IVector3Like } from \"./math.like\";\r\nimport { Quaternion, Vector3 } from \"./math.vector\";\r\nimport type { Vector4 } from \"./math.vector\";\r\n\r\n/**\r\n * Creates a string representation of the IVector2Like\r\n * @param vector defines the IVector2Like to stringify\r\n * @param decimalCount defines the number of decimals to use\r\n * @returns a string with the IVector2Like coordinates.\r\n */\r\nexport function Vector2ToFixed(vector: IVector2Like, decimalCount: number): string {\r\n return `{X: ${vector.x.toFixed(decimalCount)} Y: ${vector.y.toFixed(decimalCount)}}`;\r\n}\r\n\r\n/**\r\n * Computes the dot product of two IVector3Like objects.\r\n * @param a defines the first vector\r\n * @param b defines the second vector\r\n * @returns the dot product\r\n */\r\nexport function Vector3Dot<T extends IVector3Like, U extends IVector3Like>(a: DeepImmutable<T>, b: DeepImmutable<U>) {\r\n return a.x * b.x + a.y * b.y + a.z * b.z;\r\n}\r\n\r\n/**\r\n * Sets the given floats into the result.\r\n * @param x defines the x coordinate\r\n * @param y defines the y coordinate\r\n * @param z defines the z coordinate\r\n * @param result defines the target vector\r\n * @returns the result vector\r\n */\r\nexport function Vector3FromFloatsToRef<T extends IVector3Like>(x: number, y: number, z: number, result: T): T {\r\n result.x = x;\r\n result.y = y;\r\n result.z = z;\r\n return result;\r\n}\r\n\r\n/**\r\n * Stores the scaled values of a vector into the result.\r\n * @param a defines the source vector\r\n * @param scale defines the scale factor\r\n * @param result defines the target vector\r\n * @returns the scaled vector\r\n */\r\nexport function Vector3ScaleToRef<T extends IVector3Like, ResultT extends IVector3Like>(a: DeepImmutable<T>, scale: number, result: ResultT): ResultT {\r\n result.x = a.x * scale;\r\n result.y = a.y * scale;\r\n result.z = a.z * scale;\r\n return result;\r\n}\r\n\r\n/**\r\n * Creates a string representation of the Vector3\r\n * @param vector defines the Vector3 to stringify\r\n * @param decimalCount defines the number of decimals to use\r\n * @returns a string with the Vector3 coordinates.\r\n */\r\nexport function Vector3ToFixed(vector: Vector3, decimalCount: number): string {\r\n return `{X: ${vector._x.toFixed(decimalCount)} Y: ${vector._y.toFixed(decimalCount)} Z: ${vector._z.toFixed(decimalCount)}}`;\r\n}\r\n\r\n/**\r\n * Creates a string representation of the Vector4\r\n * @param vector defines the Vector4 to stringify\r\n * @param decimalCount defines the number of decimals to use\r\n * @returns a string with the Vector4 coordinates.\r\n */\r\nexport function Vector4ToFixed(vector: Vector4, decimalCount: number): string {\r\n return `{X: ${vector.x.toFixed(decimalCount)} Y: ${vector.y.toFixed(decimalCount)} Z: ${vector.z.toFixed(decimalCount)} W: ${vector.w.toFixed(decimalCount)}}`;\r\n}\r\n\r\n/**\r\n * Returns the angle in radians between two quaternions\r\n * @param q1 defines the first quaternion\r\n * @param q2 defines the second quaternion\r\n * @returns the angle in radians between the two quaternions\r\n */\r\nexport function GetAngleBetweenQuaternions(q1: DeepImmutable<Quaternion>, q2: DeepImmutable<Quaternion>): number {\r\n return Math.acos(Clamp(Quaternion.Dot(q1, q2))) * 2;\r\n}\r\n\r\n/**\r\n * Creates a quaternion from two direction vectors\r\n * @param a defines the first direction vector\r\n * @param b defines the second direction vector\r\n * @returns the target quaternion\r\n */\r\nexport function GetQuaternionFromDirections<T extends Vector3>(a: DeepImmutable<T>, b: DeepImmutable<T>): Quaternion {\r\n const result = new Quaternion();\r\n GetQuaternionFromDirectionsToRef(a, b, result);\r\n return result;\r\n}\r\n\r\n/**\r\n * Creates a quaternion from two direction vectors\r\n * @param a defines the first direction vector\r\n * @param b defines the second direction vector\r\n * @param result defines the target quaternion\r\n * @returns the target quaternion\r\n */\r\nexport function GetQuaternionFromDirectionsToRef<T extends Vector3, ResultT extends Quaternion>(a: DeepImmutable<T>, b: DeepImmutable<T>, result: ResultT): ResultT {\r\n const axis = Vector3.Cross(a, b);\r\n const angle = Math.acos(Clamp(Vector3Dot(a, b), -1, 1));\r\n Quaternion.RotationAxisToRef(axis, angle, result);\r\n return result;\r\n}\r\n"]}
@@ -194,7 +194,7 @@ export class AggregatorBlock extends NodeGeometryBlock {
194
194
  }
195
195
  }
196
196
  __decorate([
197
- editableInPropertyPage("Aggregation", 4 /* PropertyTypeForEdition.List */, "ADVANCED", {
197
+ editableInPropertyPage("Aggregation", 5 /* PropertyTypeForEdition.List */, "ADVANCED", {
198
198
  notifiers: { rebuild: true },
199
199
  embedded: true,
200
200
  options: [
@@ -161,7 +161,7 @@ __decorate([
161
161
  editableInPropertyPage("Evaluate context", 0 /* PropertyTypeForEdition.Boolean */, "ADVANCED", { embedded: true, notifiers: { rebuild: true } })
162
162
  ], SetUVsBlock.prototype, "evaluateContext", void 0);
163
163
  __decorate([
164
- editableInPropertyPage("Texture coordinates index", 4 /* PropertyTypeForEdition.List */, "ADVANCED", {
164
+ editableInPropertyPage("Texture coordinates index", 5 /* PropertyTypeForEdition.List */, "ADVANCED", {
165
165
  notifiers: { update: true },
166
166
  embedded: true,
167
167
  options: [
@@ -181,7 +181,7 @@ __decorate([
181
181
  editableInPropertyPage("Evaluate context", 0 /* PropertyTypeForEdition.Boolean */, "ADVANCED", { embedded: true, notifiers: { rebuild: true } })
182
182
  ], BooleanGeometryBlock.prototype, "evaluateContext", void 0);
183
183
  __decorate([
184
- editableInPropertyPage("Operation", 4 /* PropertyTypeForEdition.List */, "ADVANCED", {
184
+ editableInPropertyPage("Operation", 5 /* PropertyTypeForEdition.List */, "ADVANCED", {
185
185
  notifiers: { rebuild: true },
186
186
  embedded: true,
187
187
  options: [
@@ -181,7 +181,7 @@ export class ConditionBlock extends NodeGeometryBlock {
181
181
  }
182
182
  }
183
183
  __decorate([
184
- editableInPropertyPage("Test", 4 /* PropertyTypeForEdition.List */, "ADVANCED", {
184
+ editableInPropertyPage("Test", 5 /* PropertyTypeForEdition.List */, "ADVANCED", {
185
185
  notifiers: { rebuild: true },
186
186
  embedded: true,
187
187
  options: [
@@ -255,7 +255,7 @@ export class GeometryCurveBlock extends NodeGeometryBlock {
255
255
  }
256
256
  }
257
257
  __decorate([
258
- editableInPropertyPage("Type", 4 /* PropertyTypeForEdition.List */, "ADVANCED", {
258
+ editableInPropertyPage("Type", 5 /* PropertyTypeForEdition.List */, "ADVANCED", {
259
259
  notifiers: { rebuild: true },
260
260
  embedded: true,
261
261
  options: [
@@ -280,7 +280,7 @@ export class GeometryEaseBlock extends NodeGeometryBlock {
280
280
  }
281
281
  }
282
282
  __decorate([
283
- editableInPropertyPage("Type", 4 /* PropertyTypeForEdition.List */, "ADVANCED", {
283
+ editableInPropertyPage("Type", 5 /* PropertyTypeForEdition.List */, "ADVANCED", {
284
284
  notifiers: { rebuild: true },
285
285
  embedded: true,
286
286
  options: [
@@ -242,7 +242,7 @@ export class GeometryTrigonometryBlock extends NodeGeometryBlock {
242
242
  }
243
243
  }
244
244
  __decorate([
245
- editableInPropertyPage("Operation", 4 /* PropertyTypeForEdition.List */, "ADVANCED", {
245
+ editableInPropertyPage("Operation", 5 /* PropertyTypeForEdition.List */, "ADVANCED", {
246
246
  embedded: true,
247
247
  notifiers: { rebuild: true },
248
248
  options: [
@@ -147,7 +147,7 @@ export class MappingBlock extends NodeGeometryBlock {
147
147
  }
148
148
  }
149
149
  __decorate([
150
- editableInPropertyPage("Mapping", 4 /* PropertyTypeForEdition.List */, "ADVANCED", {
150
+ editableInPropertyPage("Mapping", 5 /* PropertyTypeForEdition.List */, "ADVANCED", {
151
151
  notifiers: { rebuild: true },
152
152
  embedded: true,
153
153
  options: [
@@ -298,7 +298,7 @@ export class MathBlock extends NodeGeometryBlock {
298
298
  }
299
299
  }
300
300
  __decorate([
301
- editableInPropertyPage("Operation", 4 /* PropertyTypeForEdition.List */, "ADVANCED", {
301
+ editableInPropertyPage("Operation", 5 /* PropertyTypeForEdition.List */, "ADVANCED", {
302
302
  notifiers: { rebuild: true },
303
303
  embedded: true,
304
304
  options: [
@@ -168,7 +168,7 @@ export class RandomBlock extends NodeGeometryBlock {
168
168
  }
169
169
  }
170
170
  __decorate([
171
- editableInPropertyPage("LockMode", 4 /* PropertyTypeForEdition.List */, "ADVANCED", {
171
+ editableInPropertyPage("LockMode", 5 /* PropertyTypeForEdition.List */, "ADVANCED", {
172
172
  notifiers: { rebuild: true },
173
173
  embedded: true,
174
174
  options: [
@@ -326,6 +326,10 @@ export declare abstract class AbstractMesh extends TransformNode implements IDis
326
326
  */
327
327
  get inheritVisibility(): boolean;
328
328
  set inheritVisibility(value: boolean);
329
+ /**
330
+ * Control if the mesh is visible by system define
331
+ */
332
+ _isSystemVisible: boolean;
329
333
  private _isVisible;
330
334
  /**
331
335
  * Gets or sets a boolean indicating if the mesh is visible (renderable). Default is true
@@ -356,6 +356,9 @@ export class AbstractMesh extends TransformNode {
356
356
  * Gets or sets a boolean indicating if the mesh is visible (renderable). Default is true
357
357
  */
358
358
  get isVisible() {
359
+ if (!this._isSystemVisible) {
360
+ return false;
361
+ }
359
362
  if (!this._isVisible || !this.inheritVisibility || !this._parentNode) {
360
363
  return this._isVisible;
361
364
  }
@@ -672,6 +675,10 @@ export class AbstractMesh extends TransformNode {
672
675
  * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/advanced/transparent_rendering#alpha-index
673
676
  */
674
677
  this.alphaIndex = Number.MAX_VALUE;
678
+ /**
679
+ * Control if the mesh is visible by system define
680
+ */
681
+ this._isSystemVisible = true;
675
682
  this._isVisible = true;
676
683
  /**
677
684
  * Gets or sets a boolean indicating if the mesh can be picked (by scene.pick for instance or through actions). Default is true