@babylonjs/core 6.16.1 → 6.16.2
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/Debug/axesViewer.js +3 -3
- package/Debug/axesViewer.js.map +1 -1
- package/Engines/thinEngine.js +2 -2
- package/Engines/thinEngine.js.map +1 -1
- package/Meshes/Builders/textBuilder.d.ts +2 -0
- package/Meshes/Builders/textBuilder.js +5 -2
- package/Meshes/Builders/textBuilder.js.map +1 -1
- package/Meshes/Node/Blocks/conditionBlock.js +7 -4
- package/Meshes/Node/Blocks/conditionBlock.js.map +1 -1
- package/Meshes/Node/Blocks/debugBlock.js +1 -1
- package/Meshes/Node/Blocks/debugBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryInputBlock.js +1 -0
- package/Meshes/Node/Blocks/geometryInputBlock.js.map +1 -1
- package/package.json +1 -1
package/Debug/axesViewer.js
CHANGED
|
@@ -47,19 +47,19 @@ export class AxesViewer {
|
|
|
47
47
|
}
|
|
48
48
|
this.scaleLines = scaleLines;
|
|
49
49
|
if (!xAxis) {
|
|
50
|
-
const redColoredMaterial = new StandardMaterial("", scene);
|
|
50
|
+
const redColoredMaterial = new StandardMaterial("xAxisMaterial", scene);
|
|
51
51
|
redColoredMaterial.disableLighting = true;
|
|
52
52
|
redColoredMaterial.emissiveColor = Color3.Red().scale(0.5);
|
|
53
53
|
xAxis = AxisDragGizmo._CreateArrow(scene, redColoredMaterial, lineThickness);
|
|
54
54
|
}
|
|
55
55
|
if (!yAxis) {
|
|
56
|
-
const greenColoredMaterial = new StandardMaterial("", scene);
|
|
56
|
+
const greenColoredMaterial = new StandardMaterial("yAxisMaterial", scene);
|
|
57
57
|
greenColoredMaterial.disableLighting = true;
|
|
58
58
|
greenColoredMaterial.emissiveColor = Color3.Green().scale(0.5);
|
|
59
59
|
yAxis = AxisDragGizmo._CreateArrow(scene, greenColoredMaterial, lineThickness);
|
|
60
60
|
}
|
|
61
61
|
if (!zAxis) {
|
|
62
|
-
const blueColoredMaterial = new StandardMaterial("", scene);
|
|
62
|
+
const blueColoredMaterial = new StandardMaterial("zAxisMaterial", scene);
|
|
63
63
|
blueColoredMaterial.disableLighting = true;
|
|
64
64
|
blueColoredMaterial.emissiveColor = Color3.Blue().scale(0.5);
|
|
65
65
|
zAxis = AxisDragGizmo._CreateArrow(scene, blueColoredMaterial, lineThickness);
|
package/Debug/axesViewer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axesViewer.js","sourceRoot":"","sources":["../../../../dev/core/src/Debug/axesViewer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAI/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD;;;GAGG;AACH,MAAM,OAAO,UAAU;IAiBnB,oDAAoD;IACpD,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,oDAAoD;IACpD,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,oDAAoD;IACpD,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;OASG;IACH,YAAY,KAAa,EAAE,UAAU,GAAG,CAAC,EAAE,mBAAqC,CAAC,EAAE,KAAqB,EAAE,KAAqB,EAAE,KAAqB,EAAE,aAAa,GAAG,CAAC;QAtCjK,sBAAiB,GAAG,CAAC,CAAC;QACtB,eAAU,GAAG,KAAK,CAAC;QAE3B;;WAEG;QACI,UAAK,GAAoB,IAAI,CAAC;QAErC;;WAEG;QACI,eAAU,GAAG,CAAC,CAAC;QA4BlB,KAAK,G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CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAChD;QAED,IAAI,IAAI,CAAC,MAAM,EAAE;YACb,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAChD;QAED,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACtB,CAAC;IAEO,MAAM,CAAC,oBAAoB,CAAC,IAAmB,EAAE,EAAU;QAC/D,IAAI,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACnC,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC;QAC/B,CAAC,CAAC,CAAC;IACP,CAAC;CACJ","sourcesContent":["import { Vector3 } from \"../Maths/math.vector\";\r\nimport type { Nullable } from \"../types\";\r\nimport type { Scene } from \"../scene\";\r\nimport type { TransformNode } from \"../Meshes/transformNode\";\r\nimport { StandardMaterial } from \"../Materials/standardMaterial\";\r\nimport { AxisDragGizmo } from \"../Gizmos/axisDragGizmo\";\r\nimport { Color3 } from \"../Maths/math.color\";\r\nimport { EngineStore } from \"../Engines/engineStore\";\r\n\r\n/**\r\n * The Axes viewer will show 3 axes in a specific point in space\r\n * @see https://doc.babylonjs.com/toolsAndResources/utilities/World_Axes\r\n */\r\nexport class AxesViewer {\r\n private _xAxis: TransformNode;\r\n private _yAxis: TransformNode;\r\n private _zAxis: TransformNode;\r\n private _scaleLinesFactor = 4;\r\n private _instanced = false;\r\n\r\n /**\r\n * Gets the hosting scene\r\n */\r\n public scene: Nullable<Scene> = null;\r\n\r\n /**\r\n * Gets or sets a number used to scale line length\r\n */\r\n public scaleLines = 1;\r\n\r\n /** Gets the node hierarchy used to render x-axis */\r\n public get xAxis(): TransformNode {\r\n return this._xAxis;\r\n }\r\n\r\n /** Gets the node hierarchy used to render y-axis */\r\n public get yAxis(): TransformNode {\r\n return this._yAxis;\r\n }\r\n\r\n /** Gets the node hierarchy used to render z-axis */\r\n public get zAxis(): TransformNode {\r\n return this._zAxis;\r\n }\r\n\r\n /**\r\n * Creates a new AxesViewer\r\n * @param scene defines the hosting scene\r\n * @param scaleLines defines a number used to scale line length (1 by default)\r\n * @param renderingGroupId defines a number used to set the renderingGroupId of the meshes (2 by default)\r\n * @param xAxis defines the node hierarchy used to render the x-axis\r\n * @param yAxis defines the node hierarchy used to render the y-axis\r\n * @param zAxis defines the node hierarchy used to render the z-axis\r\n * @param lineThickness The line thickness to use when creating the arrow. defaults to 1.\r\n */\r\n constructor(scene?: Scene, scaleLines = 1, renderingGroupId: Nullable<number> = 2, xAxis?: TransformNode, yAxis?: TransformNode, zAxis?: TransformNode, lineThickness = 1) {\r\n scene = scene || <Scene>EngineStore.LastCreatedScene;\r\n if (!scene) {\r\n return;\r\n }\r\n this.scaleLines = scaleLines;\r\n\r\n if (!xAxis) {\r\n const redColoredMaterial = new StandardMaterial(\"\", scene);\r\n redColoredMaterial.disableLighting = true;\r\n redColoredMaterial.emissiveColor = Color3.Red().scale(0.5);\r\n xAxis = AxisDragGizmo._CreateArrow(scene, redColoredMaterial, lineThickness);\r\n }\r\n\r\n if (!yAxis) {\r\n const greenColoredMaterial = new StandardMaterial(\"\", scene);\r\n greenColoredMaterial.disableLighting = true;\r\n greenColoredMaterial.emissiveColor = Color3.Green().scale(0.5);\r\n yAxis = AxisDragGizmo._CreateArrow(scene, greenColoredMaterial, lineThickness);\r\n }\r\n\r\n if (!zAxis) {\r\n const blueColoredMaterial = new StandardMaterial(\"\", scene);\r\n blueColoredMaterial.disableLighting = true;\r\n blueColoredMaterial.emissiveColor = Color3.Blue().scale(0.5);\r\n zAxis = AxisDragGizmo._CreateArrow(scene, blueColoredMaterial, lineThickness);\r\n }\r\n\r\n this._xAxis = xAxis;\r\n this._xAxis.scaling.setAll(this.scaleLines * this._scaleLinesFactor);\r\n this._yAxis = yAxis;\r\n this._yAxis.scaling.setAll(this.scaleLines * this._scaleLinesFactor);\r\n this._zAxis = zAxis;\r\n this._zAxis.scaling.setAll(this.scaleLines * this._scaleLinesFactor);\r\n\r\n if (renderingGroupId != null) {\r\n AxesViewer._SetRenderingGroupId(this._xAxis, renderingGroupId);\r\n AxesViewer._SetRenderingGroupId(this._yAxis, renderingGroupId);\r\n AxesViewer._SetRenderingGroupId(this._zAxis, renderingGroupId);\r\n }\r\n\r\n this.scene = scene;\r\n this.update(new Vector3(), Vector3.Right(), Vector3.Up(), Vector3.Forward());\r\n }\r\n\r\n /**\r\n * Force the viewer to update\r\n * @param position defines the position of the viewer\r\n * @param xaxis defines the x axis of the viewer\r\n * @param yaxis defines the y axis of the viewer\r\n * @param zaxis defines the z axis of the viewer\r\n */\r\n public update(position: Vector3, xaxis: Vector3, yaxis: Vector3, zaxis: Vector3): void {\r\n this._xAxis.position.copyFrom(position);\r\n this._xAxis.setDirection(xaxis);\r\n this._xAxis.scaling.setAll(this.scaleLines * this._scaleLinesFactor);\r\n\r\n this._yAxis.position.copyFrom(position);\r\n this._yAxis.setDirection(yaxis);\r\n this._yAxis.scaling.setAll(this.scaleLines * this._scaleLinesFactor);\r\n\r\n this._zAxis.position.copyFrom(position);\r\n this._zAxis.setDirection(zaxis);\r\n this._zAxis.scaling.setAll(this.scaleLines * this._scaleLinesFactor);\r\n }\r\n\r\n /**\r\n * Creates an instance of this axes viewer.\r\n * @returns a new axes viewer with instanced meshes\r\n */\r\n public createInstance(): AxesViewer {\r\n const xAxis = AxisDragGizmo._CreateArrowInstance(this.scene!, this._xAxis);\r\n const yAxis = AxisDragGizmo._CreateArrowInstance(this.scene!, this._yAxis);\r\n const zAxis = AxisDragGizmo._CreateArrowInstance(this.scene!, this._zAxis);\r\n const axesViewer = new AxesViewer(this.scene!, this.scaleLines, null, xAxis, yAxis, zAxis);\r\n axesViewer._instanced = true;\r\n return axesViewer;\r\n }\r\n\r\n /** Releases resources */\r\n public dispose() {\r\n if (this._xAxis) {\r\n this._xAxis.dispose(false, !this._instanced);\r\n }\r\n\r\n if (this._yAxis) {\r\n this._yAxis.dispose(false, !this._instanced);\r\n }\r\n\r\n if (this._zAxis) {\r\n this._zAxis.dispose(false, !this._instanced);\r\n }\r\n\r\n this.scene = null;\r\n }\r\n\r\n private static _SetRenderingGroupId(node: TransformNode, id: number) {\r\n node.getChildMeshes().forEach((mesh) => {\r\n mesh.renderingGroupId = id;\r\n });\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"axesViewer.js","sourceRoot":"","sources":["../../../../dev/core/src/Debug/axesViewer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAI/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD;;;GAGG;AACH,MAAM,OAAO,UAAU;IAiBnB,oDAAoD;IACpD,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,oDAAoD;IACpD,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,oDAAoD;IACpD,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;OASG;IACH,YAAY,KAAa,EAAE,UAAU,GAAG,CAAC,EAAE,mBAAqC,CAAC,EAAE,KAAqB,EAAE,KAAqB,EAAE,KAAqB,EAAE,aAAa,GAAG,CAAC;QAtCjK,sBAAiB,GAAG,CAAC,CAAC;QACtB,eAAU,GAAG,KAAK,CAAC;QAE3B;;WAEG;QACI,UAAK,GAAoB,IAAI,CAAC;QAErC;;WAEG;QACI,eAAU,GAAG,CAAC,CAAC;QA4BlB,KAAK,GAAG,KAAK,IAAW,WAAW,CAAC,gBAAgB,CAAC;QACrD,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U,CAAC,CAAC;SAChD;QAED,IAAI,IAAI,CAAC,MAAM,EAAE;YACb,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAChD;QAED,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACtB,CAAC;IAEO,MAAM,CAAC,oBAAoB,CAAC,IAAmB,EAAE,EAAU;QAC/D,IAAI,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACnC,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC;QAC/B,CAAC,CAAC,CAAC;IACP,CAAC;CACJ","sourcesContent":["import { Vector3 } from \"../Maths/math.vector\";\r\nimport type { Nullable } from \"../types\";\r\nimport type { Scene } from \"../scene\";\r\nimport type { TransformNode } from \"../Meshes/transformNode\";\r\nimport { StandardMaterial } from \"../Materials/standardMaterial\";\r\nimport { AxisDragGizmo } from \"../Gizmos/axisDragGizmo\";\r\nimport { Color3 } from \"../Maths/math.color\";\r\nimport { EngineStore } from \"../Engines/engineStore\";\r\n\r\n/**\r\n * The Axes viewer will show 3 axes in a specific point in space\r\n * @see https://doc.babylonjs.com/toolsAndResources/utilities/World_Axes\r\n */\r\nexport class AxesViewer {\r\n private _xAxis: TransformNode;\r\n private _yAxis: TransformNode;\r\n private _zAxis: TransformNode;\r\n private _scaleLinesFactor = 4;\r\n private _instanced = false;\r\n\r\n /**\r\n * Gets the hosting scene\r\n */\r\n public scene: Nullable<Scene> = null;\r\n\r\n /**\r\n * Gets or sets a number used to scale line length\r\n */\r\n public scaleLines = 1;\r\n\r\n /** Gets the node hierarchy used to render x-axis */\r\n public get xAxis(): TransformNode {\r\n return this._xAxis;\r\n }\r\n\r\n /** Gets the node hierarchy used to render y-axis */\r\n public get yAxis(): TransformNode {\r\n return this._yAxis;\r\n }\r\n\r\n /** Gets the node hierarchy used to render z-axis */\r\n public get zAxis(): TransformNode {\r\n return this._zAxis;\r\n }\r\n\r\n /**\r\n * Creates a new AxesViewer\r\n * @param scene defines the hosting scene\r\n * @param scaleLines defines a number used to scale line length (1 by default)\r\n * @param renderingGroupId defines a number used to set the renderingGroupId of the meshes (2 by default)\r\n * @param xAxis defines the node hierarchy used to render the x-axis\r\n * @param yAxis defines the node hierarchy used to render the y-axis\r\n * @param zAxis defines the node hierarchy used to render the z-axis\r\n * @param lineThickness The line thickness to use when creating the arrow. defaults to 1.\r\n */\r\n constructor(scene?: Scene, scaleLines = 1, renderingGroupId: Nullable<number> = 2, xAxis?: TransformNode, yAxis?: TransformNode, zAxis?: TransformNode, lineThickness = 1) {\r\n scene = scene || <Scene>EngineStore.LastCreatedScene;\r\n if (!scene) {\r\n return;\r\n }\r\n this.scaleLines = scaleLines;\r\n\r\n if (!xAxis) {\r\n const redColoredMaterial = new StandardMaterial(\"xAxisMaterial\", scene);\r\n redColoredMaterial.disableLighting = true;\r\n redColoredMaterial.emissiveColor = Color3.Red().scale(0.5);\r\n xAxis = AxisDragGizmo._CreateArrow(scene, redColoredMaterial, lineThickness);\r\n }\r\n\r\n if (!yAxis) {\r\n const greenColoredMaterial = new StandardMaterial(\"yAxisMaterial\", scene);\r\n greenColoredMaterial.disableLighting = true;\r\n greenColoredMaterial.emissiveColor = Color3.Green().scale(0.5);\r\n yAxis = AxisDragGizmo._CreateArrow(scene, greenColoredMaterial, lineThickness);\r\n }\r\n\r\n if (!zAxis) {\r\n const blueColoredMaterial = new StandardMaterial(\"zAxisMaterial\", scene);\r\n blueColoredMaterial.disableLighting = true;\r\n blueColoredMaterial.emissiveColor = Color3.Blue().scale(0.5);\r\n zAxis = AxisDragGizmo._CreateArrow(scene, blueColoredMaterial, lineThickness);\r\n }\r\n\r\n this._xAxis = xAxis;\r\n this._xAxis.scaling.setAll(this.scaleLines * this._scaleLinesFactor);\r\n this._yAxis = yAxis;\r\n this._yAxis.scaling.setAll(this.scaleLines * this._scaleLinesFactor);\r\n this._zAxis = zAxis;\r\n this._zAxis.scaling.setAll(this.scaleLines * this._scaleLinesFactor);\r\n\r\n if (renderingGroupId != null) {\r\n AxesViewer._SetRenderingGroupId(this._xAxis, renderingGroupId);\r\n AxesViewer._SetRenderingGroupId(this._yAxis, renderingGroupId);\r\n AxesViewer._SetRenderingGroupId(this._zAxis, renderingGroupId);\r\n }\r\n\r\n this.scene = scene;\r\n this.update(new Vector3(), Vector3.Right(), Vector3.Up(), Vector3.Forward());\r\n }\r\n\r\n /**\r\n * Force the viewer to update\r\n * @param position defines the position of the viewer\r\n * @param xaxis defines the x axis of the viewer\r\n * @param yaxis defines the y axis of the viewer\r\n * @param zaxis defines the z axis of the viewer\r\n */\r\n public update(position: Vector3, xaxis: Vector3, yaxis: Vector3, zaxis: Vector3): void {\r\n this._xAxis.position.copyFrom(position);\r\n this._xAxis.setDirection(xaxis);\r\n this._xAxis.scaling.setAll(this.scaleLines * this._scaleLinesFactor);\r\n\r\n this._yAxis.position.copyFrom(position);\r\n this._yAxis.setDirection(yaxis);\r\n this._yAxis.scaling.setAll(this.scaleLines * this._scaleLinesFactor);\r\n\r\n this._zAxis.position.copyFrom(position);\r\n this._zAxis.setDirection(zaxis);\r\n this._zAxis.scaling.setAll(this.scaleLines * this._scaleLinesFactor);\r\n }\r\n\r\n /**\r\n * Creates an instance of this axes viewer.\r\n * @returns a new axes viewer with instanced meshes\r\n */\r\n public createInstance(): AxesViewer {\r\n const xAxis = AxisDragGizmo._CreateArrowInstance(this.scene!, this._xAxis);\r\n const yAxis = AxisDragGizmo._CreateArrowInstance(this.scene!, this._yAxis);\r\n const zAxis = AxisDragGizmo._CreateArrowInstance(this.scene!, this._zAxis);\r\n const axesViewer = new AxesViewer(this.scene!, this.scaleLines, null, xAxis, yAxis, zAxis);\r\n axesViewer._instanced = true;\r\n return axesViewer;\r\n }\r\n\r\n /** Releases resources */\r\n public dispose() {\r\n if (this._xAxis) {\r\n this._xAxis.dispose(false, !this._instanced);\r\n }\r\n\r\n if (this._yAxis) {\r\n this._yAxis.dispose(false, !this._instanced);\r\n }\r\n\r\n if (this._zAxis) {\r\n this._zAxis.dispose(false, !this._instanced);\r\n }\r\n\r\n this.scene = null;\r\n }\r\n\r\n private static _SetRenderingGroupId(node: TransformNode, id: number) {\r\n node.getChildMeshes().forEach((mesh) => {\r\n mesh.renderingGroupId = id;\r\n });\r\n }\r\n}\r\n"]}
|
package/Engines/thinEngine.js
CHANGED
|
@@ -34,13 +34,13 @@ export class ThinEngine {
|
|
|
34
34
|
*/
|
|
35
35
|
// Not mixed with Version for tooling purpose.
|
|
36
36
|
static get NpmPackage() {
|
|
37
|
-
return "babylonjs@6.16.
|
|
37
|
+
return "babylonjs@6.16.2";
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Returns the current version of the framework
|
|
41
41
|
*/
|
|
42
42
|
static get Version() {
|
|
43
|
-
return "6.16.
|
|
43
|
+
return "6.16.2";
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* Returns a string describing the current engine
|