@babylonjs/core 6.48.0 → 6.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Behaviors/Meshes/baseSixDofDragBehavior.js +6 -6
- package/Behaviors/Meshes/baseSixDofDragBehavior.js.map +1 -1
- package/Behaviors/Meshes/sixDofDragBehavior.d.ts +1 -0
- package/Behaviors/Meshes/sixDofDragBehavior.js +5 -1
- package/Behaviors/Meshes/sixDofDragBehavior.js.map +1 -1
- package/Engines/ICanvas.d.ts +10 -0
- package/Engines/ICanvas.js.map +1 -1
- package/Engines/Native/nativeDataStream.d.ts +2 -1
- package/Engines/Native/nativeDataStream.js.map +1 -1
- package/Engines/Native/nativePipelineContext.js.map +1 -1
- package/Engines/WebGL/webGLPipelineContext.js.map +1 -1
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js +6 -4
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js.map +1 -1
- package/Engines/nativeEngine.d.ts +2 -2
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/thinEngine.d.ts +2 -2
- package/Engines/thinEngine.js +2 -2
- package/Engines/thinEngine.js.map +1 -1
- package/Materials/PBR/pbrSubSurfaceConfiguration.js +6 -0
- package/Materials/PBR/pbrSubSurfaceConfiguration.js.map +1 -1
- package/Maths/math.like.d.ts +2 -2
- package/Maths/math.like.js.map +1 -1
- package/Maths/math.vector.d.ts +1 -1
- package/Maths/math.vector.js.map +1 -1
- package/Maths/tensor.d.ts +12 -8
- package/Maths/tensor.js.map +1 -1
- package/Meshes/Compression/dracoCompression.d.ts +12 -0
- package/Meshes/Compression/dracoCompression.js +20 -14
- package/Meshes/Compression/dracoCompression.js.map +1 -1
- package/Meshes/Node/Blocks/geometryDistanceBlock.js +1 -0
- package/Meshes/Node/Blocks/geometryDistanceBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryDotBlock.js +1 -0
- package/Meshes/Node/Blocks/geometryDotBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryLengthBlock.js +1 -0
- package/Meshes/Node/Blocks/geometryLengthBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryTrigonometryBlock.js +1 -0
- package/Meshes/Node/Blocks/geometryTrigonometryBlock.js.map +1 -1
- package/Meshes/abstractMesh.d.ts +5 -2
- package/Meshes/abstractMesh.js +5 -2
- package/Meshes/abstractMesh.js.map +1 -1
- package/Meshes/thinInstanceMesh.d.ts +9 -0
- package/Meshes/thinInstanceMesh.js +31 -4
- package/Meshes/thinInstanceMesh.js.map +1 -1
- package/Particles/pointsCloudSystem.js +26 -29
- package/Particles/pointsCloudSystem.js.map +1 -1
- package/Rendering/GlobalIllumination/giRSMManager.d.ts +1 -1
- package/Rendering/GlobalIllumination/giRSMManager.js +1 -1
- package/Rendering/GlobalIllumination/giRSMManager.js.map +1 -1
- package/Rendering/reflectiveShadowMap.d.ts +5 -4
- package/Rendering/reflectiveShadowMap.js +1 -1
- package/Rendering/reflectiveShadowMap.js.map +1 -1
- package/Shaders/ShadersInclude/pbrDebug.js +1 -1
- package/Shaders/ShadersInclude/pbrDebug.js.map +1 -1
- package/Shaders/pbr.vertex.js +1 -1
- package/Shaders/pbr.vertex.js.map +1 -1
- package/XR/features/WebXRControllerPointerSelection.js +11 -0
- package/XR/features/WebXRControllerPointerSelection.js.map +1 -1
- package/assets/Basis/basis_transcoder.wasm +0 -0
- package/assets/Draco/draco_decoder_gltf.wasm +0 -0
- package/package.json +2 -1
- package/types.d.ts +1 -1
- package/types.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometryTrigonometryBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryTrigonometryBlock.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MA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C,CAAC,GAAG,EAAE;YAChE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,mCAAmC,CAAC,GAAG,EAAE;YAChE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,mCAAmC,CAAC,MAAM,EAAE;YACtE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,mCAAmC,CAAC,MAAM,EAAE;YACtE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,mCAAmC,CAAC,MAAM,EAAE;YACtE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,mCAAmC,CAAC,IAAI,EAAE;YAClE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,mCAAmC,CAAC,MAAM,EAAE;YACtE,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,mCAAmC,CAAC,QAAQ,EAAE;YAC1E,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,mCAAmC,CAAC,UAAU,EAAE;YAC9E,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,mCAAmC,CAAC,SAAS,EAAE;YAC5E,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,mCAAmC,CAAC,SAAS,EAAE;SAC/E;KACJ,CAAC;4DACyD;AAuM/D,aAAa,CAAC,mCAAmC,EAAE,yBAAyB,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"../../../types\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport type { NodeGeometryBuildState } from \"../nodeGeometryBuildState\";\r\nimport { Vector2, Vector3, Vector4 } from \"../../../Maths/math.vector\";\r\nimport { PropertyTypeForEdition, editableInPropertyPage } from \"../../../Decorators/nodeDecorator\";\r\n\r\n/**\r\n * Operations supported by the Trigonometry block\r\n */\r\nexport enum GeometryTrigonometryBlockOperations {\r\n /** Cos */\r\n Cos,\r\n /** Sin */\r\n Sin,\r\n /** Abs */\r\n Abs,\r\n /** Exp */\r\n Exp,\r\n /** Round */\r\n Round,\r\n /** Floor */\r\n Floor,\r\n /** Ceiling */\r\n Ceiling,\r\n /** Square root */\r\n Sqrt,\r\n /** Log */\r\n Log,\r\n /** Tangent */\r\n Tan,\r\n /** Arc tangent */\r\n ArcTan,\r\n /** Arc cosinus */\r\n ArcCos,\r\n /** Arc sinus */\r\n ArcSin,\r\n /** Sign */\r\n Sign,\r\n /** Negate */\r\n Negate,\r\n /** OneMinus */\r\n OneMinus,\r\n /** Reciprocal */\r\n Reciprocal,\r\n /** ToDegrees */\r\n ToDegrees,\r\n /** ToRadians */\r\n ToRadians,\r\n /** Fract */\r\n Fract,\r\n /** Exp2 */\r\n Exp2,\r\n}\r\n\r\n/**\r\n * Block used to apply trigonometry operation to floats\r\n */\r\nexport class GeometryTrigonometryBlock extends NodeGeometryBlock {\r\n /**\r\n * Gets or sets the operation applied by the block\r\n */\r\n @editableInPropertyPage(\"Operation\", PropertyTypeForEdition.List, \"ADVANCED\", {\r\n notifiers: { rebuild: true },\r\n options: [\r\n { label: \"Cos\", value: GeometryTrigonometryBlockOperations.Cos },\r\n { label: \"Sin\", value: GeometryTrigonometryBlockOperations.Sin },\r\n { label: \"Abs\", value: GeometryTrigonometryBlockOperations.Abs },\r\n { label: \"Exp\", value: GeometryTrigonometryBlockOperations.Exp },\r\n { label: \"Exp2\", value: GeometryTrigonometryBlockOperations.Exp2 },\r\n { label: \"Round\", value: GeometryTrigonometryBlockOperations.Round },\r\n { label: \"Floor\", value: GeometryTrigonometryBlockOperations.Floor },\r\n { label: \"Ceiling\", value: GeometryTrigonometryBlockOperations.Ceiling },\r\n { label: \"Sqrt\", value: GeometryTrigonometryBlockOperations.Sqrt },\r\n { label: \"Log\", value: GeometryTrigonometryBlockOperations.Log },\r\n { label: \"Tan\", value: GeometryTrigonometryBlockOperations.Tan },\r\n { label: \"ArcTan\", value: GeometryTrigonometryBlockOperations.ArcTan },\r\n { label: \"ArcCos\", value: GeometryTrigonometryBlockOperations.ArcCos },\r\n { label: \"ArcSin\", value: GeometryTrigonometryBlockOperations.ArcSin },\r\n { label: \"Sign\", value: GeometryTrigonometryBlockOperations.Sign },\r\n { label: \"Negate\", value: GeometryTrigonometryBlockOperations.Negate },\r\n { label: \"OneMinus\", value: GeometryTrigonometryBlockOperations.OneMinus },\r\n { label: \"Reciprocal\", value: GeometryTrigonometryBlockOperations.Reciprocal },\r\n { label: \"ToDegrees\", value: GeometryTrigonometryBlockOperations.ToDegrees },\r\n { label: \"ToRadians\", value: GeometryTrigonometryBlockOperations.ToRadians },\r\n ],\r\n })\r\n public operation = GeometryTrigonometryBlockOperations.Cos;\r\n\r\n /**\r\n * Creates a new GeometryTrigonometryBlock\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.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Geometry);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Texture);\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 \"GeometryTrigonometryBlock\";\r\n }\r\n\r\n /**\r\n * Gets the input component\r\n */\r\n public get input(): 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(state: NodeGeometryBuildState) {\r\n super._buildBlock(state);\r\n let func: Nullable<(value: number) => number> = null;\r\n\r\n switch (this.operation) {\r\n case GeometryTrigonometryBlockOperations.Cos: {\r\n func = (value: number) => Math.cos(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Sin: {\r\n func = (value: number) => Math.sin(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Abs: {\r\n func = (value: number) => Math.abs(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Exp: {\r\n func = (value: number) => Math.exp(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Exp2: {\r\n func = (value: number) => Math.pow(2, value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Round: {\r\n func = (value: number) => Math.round(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Floor: {\r\n func = (value: number) => Math.floor(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Ceiling: {\r\n func = (value: number) => Math.ceil(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Sqrt: {\r\n func = (value: number) => Math.sqrt(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Log: {\r\n func = (value: number) => Math.log(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Tan: {\r\n func = (value: number) => Math.tan(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.ArcTan: {\r\n func = (value: number) => Math.atan(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.ArcCos: {\r\n func = (value: number) => Math.acos(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.ArcSin: {\r\n func = (value: number) => Math.asin(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Sign: {\r\n func = (value: number) => Math.sign(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Negate: {\r\n func = (value: number) => -value;\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.OneMinus: {\r\n func = (value: number) => 1 - value;\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Reciprocal: {\r\n func = (value: number) => 1 / value;\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.ToRadians: {\r\n func = (value: number) => (value * Math.PI) / 180;\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.ToDegrees: {\r\n func = (value: number) => (value * 180) / Math.PI;\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Fract: {\r\n func = (value: number) => {\r\n if (value >= 0) {\r\n return value - Math.floor(value);\r\n } else {\r\n return value - Math.ceil(value);\r\n }\r\n };\r\n break;\r\n }\r\n }\r\n if (!func) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n switch (this.input.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Int:\r\n case NodeGeometryBlockConnectionPointTypes.Float: {\r\n this.output._storedFunction = (state) => {\r\n const source = this.input.getConnectedValue(state);\r\n return func!(source);\r\n };\r\n break;\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector2: {\r\n this.output._storedFunction = (state) => {\r\n const source = this.input.getConnectedValue(state);\r\n return new Vector2(func!(source.x), func!(source.y));\r\n };\r\n break;\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector3: {\r\n this.output._storedFunction = (state) => {\r\n const source = this.input.getConnectedValue(state);\r\n return new Vector3(func!(source.x), func!(source.y), func!(source.z));\r\n };\r\n break;\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector4: {\r\n this.output._storedFunction = (state) => {\r\n const source = this.input.getConnectedValue(state);\r\n return new Vector4(func!(source.x), func!(source.y), func!(source.z), func!(source.w));\r\n };\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n public serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.operation = this.operation;\r\n\r\n return serializationObject;\r\n }\r\n\r\n public _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this.operation = serializationObject.operation;\r\n }\r\n\r\n protected _dumpPropertiesCode() {\r\n const codeString =\r\n super._dumpPropertiesCode() +\r\n `${this._codeVariableName}.operation = BABYLON.GeometryTrigonometryBlockOperations.${GeometryTrigonometryBlockOperations[this.operation]};\\n`;\r\n return codeString;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryTrigonometryBlock\", GeometryTrigonometryBlock);\r\n"]}
|
|
1
|
+
{"version":3,"file":"geometryTrigonometryBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryTrigonometryBlock.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAEnG;;GAEG;AACH,MAAM,CAAN,IAAY,mCA2CX;AA3CD,WAAY,mCAAmC;IAC3C,UAAU;IACV,2FAAG,CAAA;IACH,UAAU;IACV,2FAAG,CAAA;IACH,UAAU;IACV,2FAAG,CAAA;IACH,UAAU;IACV,2FAAG,CAAA;IACH,YAAY;IACZ,+FAAK,CAAA;IACL,YAAY;IACZ,+FAAK,CAAA;IACL,cAAc;IACd,mGAAO,CAAA;IACP,kBAAkB;IAClB,6FAAI,CAAA;IACJ,UAAU;IACV,2FAAG,CAAA;IACH,cAAc;IACd,2FAAG,CAAA;IACH,kBAAkB;IAClB,kGAAM,CAAA;IACN,kBAAkB;IAClB,kGAAM,CAAA;IACN,gBAAgB;IAChB,kGAAM,CAAA;IACN,WAAW;IACX,8FAAI,CAAA;IACJ,aAAa;IACb,k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,mCAAmC,CAAC,SAAS,EAAE;YAC5E,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,mCAAmC,CAAC,SAAS,EAAE;YAC5E,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,mCAAmC,CAAC,KAAK,EAAE;SACvE;KACJ,CAAC;4DACyD;AAuM/D,aAAa,CAAC,mCAAmC,EAAE,yBAAyB,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"../../../types\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport type { NodeGeometryBuildState } from \"../nodeGeometryBuildState\";\r\nimport { Vector2, Vector3, Vector4 } from \"../../../Maths/math.vector\";\r\nimport { PropertyTypeForEdition, editableInPropertyPage } from \"../../../Decorators/nodeDecorator\";\r\n\r\n/**\r\n * Operations supported by the Trigonometry block\r\n */\r\nexport enum GeometryTrigonometryBlockOperations {\r\n /** Cos */\r\n Cos,\r\n /** Sin */\r\n Sin,\r\n /** Abs */\r\n Abs,\r\n /** Exp */\r\n Exp,\r\n /** Round */\r\n Round,\r\n /** Floor */\r\n Floor,\r\n /** Ceiling */\r\n Ceiling,\r\n /** Square root */\r\n Sqrt,\r\n /** Log */\r\n Log,\r\n /** Tangent */\r\n Tan,\r\n /** Arc tangent */\r\n ArcTan,\r\n /** Arc cosinus */\r\n ArcCos,\r\n /** Arc sinus */\r\n ArcSin,\r\n /** Sign */\r\n Sign,\r\n /** Negate */\r\n Negate,\r\n /** OneMinus */\r\n OneMinus,\r\n /** Reciprocal */\r\n Reciprocal,\r\n /** ToDegrees */\r\n ToDegrees,\r\n /** ToRadians */\r\n ToRadians,\r\n /** Fract */\r\n Fract,\r\n /** Exp2 */\r\n Exp2,\r\n}\r\n\r\n/**\r\n * Block used to apply trigonometry operation to floats\r\n */\r\nexport class GeometryTrigonometryBlock extends NodeGeometryBlock {\r\n /**\r\n * Gets or sets the operation applied by the block\r\n */\r\n @editableInPropertyPage(\"Operation\", PropertyTypeForEdition.List, \"ADVANCED\", {\r\n notifiers: { rebuild: true },\r\n options: [\r\n { label: \"Cos\", value: GeometryTrigonometryBlockOperations.Cos },\r\n { label: \"Sin\", value: GeometryTrigonometryBlockOperations.Sin },\r\n { label: \"Abs\", value: GeometryTrigonometryBlockOperations.Abs },\r\n { label: \"Exp\", value: GeometryTrigonometryBlockOperations.Exp },\r\n { label: \"Exp2\", value: GeometryTrigonometryBlockOperations.Exp2 },\r\n { label: \"Round\", value: GeometryTrigonometryBlockOperations.Round },\r\n { label: \"Floor\", value: GeometryTrigonometryBlockOperations.Floor },\r\n { label: \"Ceiling\", value: GeometryTrigonometryBlockOperations.Ceiling },\r\n { label: \"Sqrt\", value: GeometryTrigonometryBlockOperations.Sqrt },\r\n { label: \"Log\", value: GeometryTrigonometryBlockOperations.Log },\r\n { label: \"Tan\", value: GeometryTrigonometryBlockOperations.Tan },\r\n { label: \"ArcTan\", value: GeometryTrigonometryBlockOperations.ArcTan },\r\n { label: \"ArcCos\", value: GeometryTrigonometryBlockOperations.ArcCos },\r\n { label: \"ArcSin\", value: GeometryTrigonometryBlockOperations.ArcSin },\r\n { label: \"Sign\", value: GeometryTrigonometryBlockOperations.Sign },\r\n { label: \"Negate\", value: GeometryTrigonometryBlockOperations.Negate },\r\n { label: \"OneMinus\", value: GeometryTrigonometryBlockOperations.OneMinus },\r\n { label: \"Reciprocal\", value: GeometryTrigonometryBlockOperations.Reciprocal },\r\n { label: \"ToDegrees\", value: GeometryTrigonometryBlockOperations.ToDegrees },\r\n { label: \"ToRadians\", value: GeometryTrigonometryBlockOperations.ToRadians },\r\n { label: \"Fract\", value: GeometryTrigonometryBlockOperations.Fract },\r\n ],\r\n })\r\n public operation = GeometryTrigonometryBlockOperations.Cos;\r\n\r\n /**\r\n * Creates a new GeometryTrigonometryBlock\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.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Geometry);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Texture);\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 \"GeometryTrigonometryBlock\";\r\n }\r\n\r\n /**\r\n * Gets the input component\r\n */\r\n public get input(): 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(state: NodeGeometryBuildState) {\r\n super._buildBlock(state);\r\n let func: Nullable<(value: number) => number> = null;\r\n\r\n switch (this.operation) {\r\n case GeometryTrigonometryBlockOperations.Cos: {\r\n func = (value: number) => Math.cos(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Sin: {\r\n func = (value: number) => Math.sin(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Abs: {\r\n func = (value: number) => Math.abs(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Exp: {\r\n func = (value: number) => Math.exp(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Exp2: {\r\n func = (value: number) => Math.pow(2, value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Round: {\r\n func = (value: number) => Math.round(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Floor: {\r\n func = (value: number) => Math.floor(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Ceiling: {\r\n func = (value: number) => Math.ceil(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Sqrt: {\r\n func = (value: number) => Math.sqrt(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Log: {\r\n func = (value: number) => Math.log(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Tan: {\r\n func = (value: number) => Math.tan(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.ArcTan: {\r\n func = (value: number) => Math.atan(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.ArcCos: {\r\n func = (value: number) => Math.acos(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.ArcSin: {\r\n func = (value: number) => Math.asin(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Sign: {\r\n func = (value: number) => Math.sign(value);\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Negate: {\r\n func = (value: number) => -value;\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.OneMinus: {\r\n func = (value: number) => 1 - value;\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Reciprocal: {\r\n func = (value: number) => 1 / value;\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.ToRadians: {\r\n func = (value: number) => (value * Math.PI) / 180;\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.ToDegrees: {\r\n func = (value: number) => (value * 180) / Math.PI;\r\n break;\r\n }\r\n case GeometryTrigonometryBlockOperations.Fract: {\r\n func = (value: number) => {\r\n if (value >= 0) {\r\n return value - Math.floor(value);\r\n } else {\r\n return value - Math.ceil(value);\r\n }\r\n };\r\n break;\r\n }\r\n }\r\n if (!func) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n switch (this.input.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Int:\r\n case NodeGeometryBlockConnectionPointTypes.Float: {\r\n this.output._storedFunction = (state) => {\r\n const source = this.input.getConnectedValue(state);\r\n return func!(source);\r\n };\r\n break;\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector2: {\r\n this.output._storedFunction = (state) => {\r\n const source = this.input.getConnectedValue(state);\r\n return new Vector2(func!(source.x), func!(source.y));\r\n };\r\n break;\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector3: {\r\n this.output._storedFunction = (state) => {\r\n const source = this.input.getConnectedValue(state);\r\n return new Vector3(func!(source.x), func!(source.y), func!(source.z));\r\n };\r\n break;\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector4: {\r\n this.output._storedFunction = (state) => {\r\n const source = this.input.getConnectedValue(state);\r\n return new Vector4(func!(source.x), func!(source.y), func!(source.z), func!(source.w));\r\n };\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n public serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.operation = this.operation;\r\n\r\n return serializationObject;\r\n }\r\n\r\n public _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this.operation = serializationObject.operation;\r\n }\r\n\r\n protected _dumpPropertiesCode() {\r\n const codeString =\r\n super._dumpPropertiesCode() +\r\n `${this._codeVariableName}.operation = BABYLON.GeometryTrigonometryBlockOperations.${GeometryTrigonometryBlockOperations[this.operation]};\\n`;\r\n return codeString;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryTrigonometryBlock\", GeometryTrigonometryBlock);\r\n"]}
|
package/Meshes/abstractMesh.d.ts
CHANGED
|
@@ -286,11 +286,14 @@ export declare class AbstractMesh extends TransformNode implements IDisposable,
|
|
|
286
286
|
*/
|
|
287
287
|
isPickable: boolean;
|
|
288
288
|
/**
|
|
289
|
-
* Gets or sets a boolean indicating if the mesh can be near picked. Default is false
|
|
289
|
+
* Gets or sets a boolean indicating if the mesh can be near picked (touched by the XR controller or hands). Default is false
|
|
290
290
|
*/
|
|
291
291
|
isNearPickable: boolean;
|
|
292
292
|
/**
|
|
293
|
-
* Gets or sets a boolean indicating if the mesh can be
|
|
293
|
+
* Gets or sets a boolean indicating if the mesh can be grabbed. Default is false.
|
|
294
|
+
* Setting this to true, while using the XR near interaction feature, will trigger a pointer event when the mesh is grabbed.
|
|
295
|
+
* Grabbing means that the controller is using the squeeze or main trigger button to grab the mesh.
|
|
296
|
+
* This is different from nearPickable which only triggers the event when the mesh is touched by the controller
|
|
294
297
|
*/
|
|
295
298
|
isNearGrabbable: boolean;
|
|
296
299
|
/** Gets or sets a boolean indicating that bounding boxes of subMeshes must be rendered as well (false by default) */
|
package/Meshes/abstractMesh.js
CHANGED
|
@@ -552,11 +552,14 @@ export class AbstractMesh extends TransformNode {
|
|
|
552
552
|
*/
|
|
553
553
|
this.isPickable = true;
|
|
554
554
|
/**
|
|
555
|
-
* Gets or sets a boolean indicating if the mesh can be near picked. Default is false
|
|
555
|
+
* Gets or sets a boolean indicating if the mesh can be near picked (touched by the XR controller or hands). Default is false
|
|
556
556
|
*/
|
|
557
557
|
this.isNearPickable = false;
|
|
558
558
|
/**
|
|
559
|
-
* Gets or sets a boolean indicating if the mesh can be
|
|
559
|
+
* Gets or sets a boolean indicating if the mesh can be grabbed. Default is false.
|
|
560
|
+
* Setting this to true, while using the XR near interaction feature, will trigger a pointer event when the mesh is grabbed.
|
|
561
|
+
* Grabbing means that the controller is using the squeeze or main trigger button to grab the mesh.
|
|
562
|
+
* This is different from nearPickable which only triggers the event when the mesh is touched by the controller
|
|
560
563
|
*/
|
|
561
564
|
this.isNearGrabbable = false;
|
|
562
565
|
/** Gets or sets a boolean indicating that bounding boxes of subMeshes must be rendered as well (false by default) */
|