@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.
- package/Cameras/arcRotateCamera.js +7 -5
- package/Cameras/arcRotateCamera.js.map +1 -1
- package/Cameras/targetCamera.d.ts +12 -0
- package/Cameras/targetCamera.js +19 -5
- package/Cameras/targetCamera.js.map +1 -1
- package/Decorators/nodeDecorator.d.ts +7 -5
- package/Decorators/nodeDecorator.js +7 -5
- package/Decorators/nodeDecorator.js.map +1 -1
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.js +1 -1
- package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.js +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.js +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.js +2 -2
- package/FrameGraph/Node/Blocks/PostProcesses/imageProcessingPostProcessBlock.js +3 -3
- package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.js +1 -1
- package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js +3 -3
- package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.js +1 -1
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js +22 -22
- package/FrameGraph/Node/Blocks/Textures/clearBlock.js +1 -1
- package/FrameGraph/Node/Blocks/index.d.ts +1 -0
- package/FrameGraph/Node/Blocks/index.js +1 -0
- package/FrameGraph/Node/Blocks/index.js.map +1 -1
- package/FrameGraph/Node/Blocks/inputBlock.js +1 -1
- package/FrameGraph/Node/Blocks/inputBlock.js.map +1 -1
- package/FrameGraph/Node/nodeRenderGraph.d.ts +2 -1
- package/FrameGraph/Node/nodeRenderGraph.js +8 -8
- package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
- package/FrameGraph/Passes/renderPass.js +3 -3
- package/FrameGraph/Passes/renderPass.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js +7 -7
- package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js.map +1 -1
- package/FrameGraph/Tasks/Texture/clearTextureTask.js +1 -1
- package/FrameGraph/Tasks/Texture/clearTextureTask.js.map +1 -1
- package/FrameGraph/frameGraph.d.ts +4 -0
- package/FrameGraph/frameGraph.js +8 -0
- package/FrameGraph/frameGraph.js.map +1 -1
- package/FrameGraph/frameGraphRenderContext.d.ts +2 -1
- package/FrameGraph/frameGraphRenderContext.js +10 -3
- package/FrameGraph/frameGraphRenderContext.js.map +1 -1
- package/FrameGraph/frameGraphTextureManager.d.ts +32 -2
- package/FrameGraph/frameGraphTextureManager.js +139 -9
- package/FrameGraph/frameGraphTextureManager.js.map +1 -1
- package/Materials/Background/backgroundMaterial.js +1 -1
- package/Materials/Background/backgroundMaterial.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +4 -4
- package/Materials/Node/Blocks/conditionalBlock.js +1 -1
- package/Materials/Node/Blocks/curveBlock.js +1 -1
- package/Materials/Node/Blocks/meshAttributeExistsBlock.js +1 -1
- package/Materials/Node/Blocks/trigonometryBlock.js +1 -1
- package/Materials/Node/Blocks/waveBlock.js +1 -1
- package/Materials/PBR/openPbrMaterial.d.ts +2 -0
- package/Materials/PBR/openPbrMaterial.js +3 -1
- package/Materials/PBR/openPbrMaterial.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.d.ts +2 -0
- package/Materials/PBR/pbrBaseMaterial.js +3 -1
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/Textures/texture.js +13 -3
- package/Materials/Textures/texture.js.map +1 -1
- package/Materials/floatingOriginMatrixOverrides.js +11 -6
- package/Materials/floatingOriginMatrixOverrides.js.map +1 -1
- package/Materials/materialHelper.functions.d.ts +3 -3
- package/Materials/materialHelper.functions.js +3 -3
- package/Materials/materialHelper.functions.js.map +1 -1
- package/Materials/standardMaterial.d.ts +2 -0
- package/Materials/standardMaterial.js +3 -1
- package/Materials/standardMaterial.js.map +1 -1
- package/Maths/math.vector.functions.d.ts +17 -0
- package/Maths/math.vector.functions.js +27 -0
- package/Maths/math.vector.functions.js.map +1 -1
- package/Meshes/Node/Blocks/Set/aggregatorBlock.js +1 -1
- package/Meshes/Node/Blocks/Set/setUVsBlock.js +1 -1
- package/Meshes/Node/Blocks/booleanGeometryBlock.js +1 -1
- package/Meshes/Node/Blocks/conditionBlock.js +1 -1
- package/Meshes/Node/Blocks/geometryCurveBlock.js +1 -1
- package/Meshes/Node/Blocks/geometryEaseBlock.js +1 -1
- package/Meshes/Node/Blocks/geometryTrigonometryBlock.js +1 -1
- package/Meshes/Node/Blocks/mappingBlock.js +1 -1
- package/Meshes/Node/Blocks/mathBlock.js +1 -1
- package/Meshes/Node/Blocks/randomBlock.js +1 -1
- package/Meshes/abstractMesh.d.ts +4 -0
- package/Meshes/abstractMesh.js +7 -0
- package/Meshes/abstractMesh.js.map +1 -1
- package/Meshes/mesh.js +1 -1
- package/Meshes/mesh.js.map +1 -1
- package/Misc/screenshotTools.d.ts +63 -1
- package/Misc/screenshotTools.js +207 -4
- package/Misc/screenshotTools.js.map +1 -1
- package/Misc/textureTools.d.ts +6 -0
- package/Misc/textureTools.js +6 -1
- package/Misc/textureTools.js.map +1 -1
- package/Particles/Node/Blocks/Conditions/particleConditionBlock.js +1 -1
- package/Particles/Node/Blocks/Emitters/boxShapeBlock.js +1 -0
- package/Particles/Node/Blocks/Emitters/boxShapeBlock.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/customShapeBlock.js +1 -0
- package/Particles/Node/Blocks/Emitters/customShapeBlock.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.js +1 -0
- package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/meshShapeBlock.js +1 -0
- package/Particles/Node/Blocks/Emitters/meshShapeBlock.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/pointShapeBlock.js +1 -0
- package/Particles/Node/Blocks/Emitters/pointShapeBlock.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/sphereShapeBlock.js +1 -0
- package/Particles/Node/Blocks/Emitters/sphereShapeBlock.js.map +1 -1
- package/Particles/Node/Blocks/index.d.ts +1 -0
- package/Particles/Node/Blocks/index.js +1 -0
- package/Particles/Node/Blocks/index.js.map +1 -1
- package/Particles/Node/Blocks/particleFresnelBlock.d.ts +34 -0
- package/Particles/Node/Blocks/particleFresnelBlock.js +74 -0
- package/Particles/Node/Blocks/particleFresnelBlock.js.map +1 -0
- package/Particles/Node/Blocks/particleInputBlock.js +2 -0
- package/Particles/Node/Blocks/particleInputBlock.js.map +1 -1
- package/Particles/Node/Blocks/particleLerpBlock.d.ts +1 -1
- package/Particles/Node/Blocks/particleLerpBlock.js +1 -1
- package/Particles/Node/Blocks/particleLerpBlock.js.map +1 -1
- package/Particles/Node/Blocks/particleLocalVariableBlock.js +1 -1
- package/Particles/Node/Blocks/particleMathBlock.js +1 -1
- package/Particles/Node/Blocks/particleRandomBlock.js +1 -1
- package/Particles/Node/Blocks/particleTrigonometryBlock.js +1 -1
- package/Particles/Node/Blocks/systemBlock.js +1 -1
- package/Particles/Node/Enums/nodeParticleContextualSources.d.ts +3 -1
- package/Particles/Node/Enums/nodeParticleContextualSources.js +2 -0
- package/Particles/Node/Enums/nodeParticleContextualSources.js.map +1 -1
- package/Particles/Node/Enums/nodeParticleSystemSources.d.ts +3 -1
- package/Particles/Node/Enums/nodeParticleSystemSources.js +2 -0
- package/Particles/Node/Enums/nodeParticleSystemSources.js.map +1 -1
- package/Particles/Node/nodeParticleBuildState.d.ts +1 -1
- package/Particles/Node/nodeParticleBuildState.js +4 -0
- package/Particles/Node/nodeParticleBuildState.js.map +1 -1
- package/Particles/gpuParticleSystem.js +1 -0
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Shaders/ShadersInclude/lightFragment.js +1 -1
- package/Shaders/ShadersInclude/lightFragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js +1 -1
- package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrFragmentExtraDeclaration.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrFragmentExtraDeclaration.js.map +1 -1
- package/ShadersWGSL/default.fragment.js +1 -1
- package/ShadersWGSL/default.fragment.js.map +1 -1
- package/ShadersWGSL/default.vertex.js +2 -2
- package/ShadersWGSL/default.vertex.js.map +1 -1
- package/ShadersWGSL/pbr.vertex.js +2 -2
- package/ShadersWGSL/pbr.vertex.js.map +1 -1
- package/node.js +4 -1
- package/node.js.map +1 -1
- 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.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AO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,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,EAA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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 * 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",
|
|
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",
|
|
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",
|
|
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",
|
|
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",
|
|
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",
|
|
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",
|
|
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",
|
|
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",
|
|
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",
|
|
171
|
+
editableInPropertyPage("LockMode", 5 /* PropertyTypeForEdition.List */, "ADVANCED", {
|
|
172
172
|
notifiers: { rebuild: true },
|
|
173
173
|
embedded: true,
|
|
174
174
|
options: [
|
package/Meshes/abstractMesh.d.ts
CHANGED
|
@@ -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
|
package/Meshes/abstractMesh.js
CHANGED
|
@@ -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
|