@onerjs/core 8.41.5 → 8.41.6
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/Inputs/geospatialCameraPointersInput.d.ts +16 -0
- package/Cameras/Inputs/geospatialCameraPointersInput.js +19 -3
- package/Cameras/Inputs/geospatialCameraPointersInput.js.map +1 -1
- package/Cameras/Limits/geospatialLimits.d.ts +0 -6
- package/Cameras/Limits/geospatialLimits.js +0 -6
- package/Cameras/Limits/geospatialLimits.js.map +1 -1
- package/Cameras/geospatialCamera.d.ts +5 -0
- package/Cameras/geospatialCamera.js +38 -10
- package/Cameras/geospatialCamera.js.map +1 -1
- package/Engines/abstractEngine.d.ts +2 -2
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +1 -4
- package/Engines/webgpuEngine.js +8 -6
- package/Engines/webgpuEngine.js.map +1 -1
- package/FrameGraph/frameGraphContext.js +1 -1
- package/FrameGraph/frameGraphContext.js.map +1 -1
- package/FrameGraph/frameGraphRenderContext.js +2 -2
- package/FrameGraph/frameGraphRenderContext.js.map +1 -1
- package/Lights/Shadows/cascadedShadowGenerator.js +1 -1
- package/Lights/Shadows/cascadedShadowGenerator.js.map +1 -1
- package/Lights/Shadows/shadowGenerator.js +1 -1
- package/Lights/Shadows/shadowGenerator.js.map +1 -1
- package/Lights/lightingVolume.js +1 -1
- package/Lights/lightingVolume.js.map +1 -1
- package/Materials/Textures/Procedurals/proceduralTexture.js +1 -1
- package/Materials/Textures/Procedurals/proceduralTexture.js.map +1 -1
- package/Meshes/Builders/capsuleBuilder.js +0 -3
- package/Meshes/Builders/capsuleBuilder.js.map +1 -1
- package/Meshes/Builders/cylinderBuilder.d.ts +1 -1
- package/Meshes/Builders/cylinderBuilder.js +1 -2
- package/Meshes/Builders/cylinderBuilder.js.map +1 -1
- package/Meshes/Builders/decalBuilder.js +2 -0
- package/Meshes/Builders/decalBuilder.js.map +1 -1
- package/Meshes/Builders/discBuilder.js +0 -1
- package/Meshes/Builders/discBuilder.js.map +1 -1
- package/Meshes/Builders/groundBuilder.d.ts +50 -54
- package/Meshes/Builders/groundBuilder.js +50 -54
- package/Meshes/Builders/groundBuilder.js.map +1 -1
- package/Meshes/Builders/tiledBoxBuilder.d.ts +0 -26
- package/Meshes/Builders/tiledBoxBuilder.js +0 -26
- package/Meshes/Builders/tiledBoxBuilder.js.map +1 -1
- package/Meshes/Builders/tiledPlaneBuilder.d.ts +0 -25
- package/Meshes/Builders/tiledPlaneBuilder.js +0 -25
- package/Meshes/Builders/tiledPlaneBuilder.js.map +1 -1
- package/Meshes/Builders/torusBuilder.d.ts +0 -13
- package/Meshes/Builders/torusBuilder.js +0 -13
- package/Meshes/Builders/torusBuilder.js.map +1 -1
- package/Meshes/Builders/torusKnotBuilder.d.ts +0 -19
- package/Meshes/Builders/torusKnotBuilder.js +0 -19
- package/Meshes/Builders/torusKnotBuilder.js.map +1 -1
- package/Meshes/Compression/dracoCompressionWorker.js.map +1 -1
- package/Meshes/Compression/dracoDecoder.js.map +1 -1
- package/Meshes/Compression/dracoDecoder.types.d.ts +11 -0
- package/Meshes/Compression/dracoDecoder.types.js.map +1 -1
- package/Meshes/Compression/dracoEncoder.js.map +1 -1
- package/Meshes/Compression/meshoptCompression.js +0 -2
- package/Meshes/Compression/meshoptCompression.js.map +1 -1
- package/Meshes/GreasedLine/greasedLineRibbonMesh.js +0 -8
- package/Meshes/GreasedLine/greasedLineRibbonMesh.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.js +1 -0
- package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.js +1 -0
- package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.js +1 -0
- package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.js +1 -0
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Matrices/scalingBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/Matrices/scalingBlock.js +1 -0
- package/Meshes/Node/Blocks/Matrices/scalingBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Matrices/translationBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/Matrices/translationBlock.js +1 -0
- package/Meshes/Node/Blocks/Matrices/translationBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/aggregatorBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/Set/aggregatorBlock.js +1 -0
- package/Meshes/Node/Blocks/Set/aggregatorBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/latticeBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/Set/latticeBlock.js +1 -0
- package/Meshes/Node/Blocks/Set/latticeBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setColorsBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/Set/setColorsBlock.js +1 -0
- package/Meshes/Node/Blocks/Set/setColorsBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setMaterialIDBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/Set/setMaterialIDBlock.js +1 -0
- package/Meshes/Node/Blocks/Set/setMaterialIDBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setNormalsBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/Set/setNormalsBlock.js +1 -0
- package/Meshes/Node/Blocks/Set/setNormalsBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setPositionsBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/Set/setPositionsBlock.js +1 -0
- package/Meshes/Node/Blocks/Set/setPositionsBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setTangentsBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/Set/setTangentsBlock.js +1 -0
- package/Meshes/Node/Blocks/Set/setTangentsBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setUVsBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/Set/setUVsBlock.js +1 -0
- package/Meshes/Node/Blocks/Set/setUVsBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/boxBlock.d.ts +2 -0
- package/Meshes/Node/Blocks/Sources/boxBlock.js +2 -0
- package/Meshes/Node/Blocks/Sources/boxBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/capsuleBlock.d.ts +2 -0
- package/Meshes/Node/Blocks/Sources/capsuleBlock.js +2 -0
- package/Meshes/Node/Blocks/Sources/capsuleBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/cylinderBlock.d.ts +2 -0
- package/Meshes/Node/Blocks/Sources/cylinderBlock.js +2 -0
- package/Meshes/Node/Blocks/Sources/cylinderBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/discBlock.d.ts +2 -0
- package/Meshes/Node/Blocks/Sources/discBlock.js +2 -0
- package/Meshes/Node/Blocks/Sources/discBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/gridBlock.d.ts +2 -0
- package/Meshes/Node/Blocks/Sources/gridBlock.js +2 -0
- package/Meshes/Node/Blocks/Sources/gridBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/icoSphereBlock.d.ts +2 -0
- package/Meshes/Node/Blocks/Sources/icoSphereBlock.js +2 -0
- package/Meshes/Node/Blocks/Sources/icoSphereBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/meshBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/Sources/meshBlock.js +1 -0
- package/Meshes/Node/Blocks/Sources/meshBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/planeBlock.d.ts +2 -0
- package/Meshes/Node/Blocks/Sources/planeBlock.js +2 -0
- package/Meshes/Node/Blocks/Sources/planeBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/pointListBlock.d.ts +2 -1
- package/Meshes/Node/Blocks/Sources/pointListBlock.js +2 -1
- package/Meshes/Node/Blocks/Sources/pointListBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/sphereBlock.d.ts +2 -0
- package/Meshes/Node/Blocks/Sources/sphereBlock.js +2 -0
- package/Meshes/Node/Blocks/Sources/sphereBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/torusBlock.d.ts +2 -0
- package/Meshes/Node/Blocks/Sources/torusBlock.js +2 -0
- package/Meshes/Node/Blocks/Sources/torusBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Teleport/teleportInBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/Teleport/teleportInBlock.js +1 -0
- package/Meshes/Node/Blocks/Teleport/teleportInBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Teleport/teleportOutBlock.d.ts +3 -0
- package/Meshes/Node/Blocks/Teleport/teleportOutBlock.js +3 -0
- package/Meshes/Node/Blocks/Teleport/teleportOutBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Textures/geometryTextureBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js +1 -1
- package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.js +1 -0
- package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.js.map +1 -1
- package/Meshes/Node/Blocks/booleanGeometryBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/booleanGeometryBlock.js +1 -1
- package/Meshes/Node/Blocks/booleanGeometryBlock.js.map +1 -1
- package/Meshes/Node/Blocks/cleanGeometryBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/cleanGeometryBlock.js +1 -0
- package/Meshes/Node/Blocks/cleanGeometryBlock.js.map +1 -1
- package/Meshes/Node/Blocks/conditionBlock.d.ts +2 -0
- package/Meshes/Node/Blocks/conditionBlock.js +2 -0
- package/Meshes/Node/Blocks/conditionBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryClampBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/geometryClampBlock.js +1 -0
- package/Meshes/Node/Blocks/geometryClampBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryCollectionBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/geometryCollectionBlock.js +1 -0
- package/Meshes/Node/Blocks/geometryCollectionBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryCurveBlock.d.ts +2 -0
- package/Meshes/Node/Blocks/geometryCurveBlock.js +2 -0
- package/Meshes/Node/Blocks/geometryCurveBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryEaseBlock.d.ts +2 -0
- package/Meshes/Node/Blocks/geometryEaseBlock.js +2 -0
- package/Meshes/Node/Blocks/geometryEaseBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryInputBlock.d.ts +3 -0
- package/Meshes/Node/Blocks/geometryInputBlock.js +3 -0
- package/Meshes/Node/Blocks/geometryInputBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryOptimizeBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/geometryOptimizeBlock.js +1 -0
- package/Meshes/Node/Blocks/geometryOptimizeBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryTransformBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/geometryTransformBlock.js +1 -0
- package/Meshes/Node/Blocks/geometryTransformBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryTrigonometryBlock.d.ts +2 -0
- package/Meshes/Node/Blocks/geometryTrigonometryBlock.js +2 -0
- package/Meshes/Node/Blocks/geometryTrigonometryBlock.js.map +1 -1
- package/Meshes/Node/Blocks/mappingBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/mappingBlock.js +1 -0
- package/Meshes/Node/Blocks/mappingBlock.js.map +1 -1
- package/Meshes/Node/Blocks/mathBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/mathBlock.js +1 -0
- package/Meshes/Node/Blocks/mathBlock.js.map +1 -1
- package/Meshes/Node/Blocks/mergeGeometryBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/mergeGeometryBlock.js +1 -0
- package/Meshes/Node/Blocks/mergeGeometryBlock.js.map +1 -1
- package/Meshes/Node/Blocks/randomBlock.d.ts +2 -0
- package/Meshes/Node/Blocks/randomBlock.js +2 -0
- package/Meshes/Node/Blocks/randomBlock.js.map +1 -1
- package/Meshes/Node/Blocks/subdivideBlock.d.ts +1 -0
- package/Meshes/Node/Blocks/subdivideBlock.js +1 -0
- package/Meshes/Node/Blocks/subdivideBlock.js.map +1 -1
- package/Meshes/Node/Interfaces/nodeGeometryTextureData.d.ts +3 -0
- package/Meshes/Node/Interfaces/nodeGeometryTextureData.js.map +1 -1
- package/Meshes/Node/nodeGeometry.js +0 -2
- package/Meshes/Node/nodeGeometry.js.map +1 -1
- package/Meshes/Node/nodeGeometryBlockConnectionPoint.js +0 -1
- package/Meshes/Node/nodeGeometryBlockConnectionPoint.js.map +1 -1
- package/Meshes/Node/nodeGeometryBuildState.js +0 -1
- package/Meshes/Node/nodeGeometryBuildState.js.map +1 -1
- package/Meshes/WebGL/webGLDataBuffer.d.ts +2 -0
- package/Meshes/WebGL/webGLDataBuffer.js +2 -0
- package/Meshes/WebGL/webGLDataBuffer.js.map +1 -1
- package/Meshes/WebGPU/webgpuDataBuffer.d.ts +4 -0
- package/Meshes/WebGPU/webgpuDataBuffer.js +4 -0
- package/Meshes/WebGPU/webgpuDataBuffer.js.map +1 -1
- package/Meshes/abstractMesh.d.ts +1 -0
- package/Meshes/abstractMesh.decalMap.d.ts +1 -0
- package/Meshes/abstractMesh.decalMap.js.map +1 -1
- package/Meshes/abstractMesh.js +1 -6
- package/Meshes/abstractMesh.js.map +1 -1
- package/Meshes/csg.js +0 -6
- package/Meshes/csg.js.map +1 -1
- package/Meshes/csg2.js +1 -2
- package/Meshes/csg2.js.map +1 -1
- package/Meshes/geodesicMesh.d.ts +26 -0
- package/Meshes/geodesicMesh.js +18 -3
- package/Meshes/geodesicMesh.js.map +1 -1
- package/Meshes/groundMesh.d.ts +1 -0
- package/Meshes/groundMesh.js +1 -0
- package/Meshes/groundMesh.js.map +1 -1
- package/Meshes/index.js +0 -2
- package/Meshes/index.js.map +1 -1
- package/Meshes/instancedMesh.d.ts +18 -3
- package/Meshes/instancedMesh.js +10 -3
- package/Meshes/instancedMesh.js.map +1 -1
- package/Meshes/mesh.d.ts +286 -204
- package/Meshes/mesh.js +251 -197
- package/Meshes/mesh.js.map +1 -1
- package/Meshes/mesh.vertexData.d.ts +15 -19
- package/Meshes/mesh.vertexData.js +15 -19
- package/Meshes/mesh.vertexData.js.map +1 -1
- package/Meshes/meshSimplification.d.ts +0 -1
- package/Meshes/meshSimplification.js +6 -1
- package/Meshes/meshSimplification.js.map +1 -1
- package/Meshes/meshSimplificationSceneComponent.d.ts +2 -0
- package/Meshes/meshSimplificationSceneComponent.js.map +1 -1
- package/Meshes/meshUVSpaceRenderer.d.ts +1 -0
- package/Meshes/meshUVSpaceRenderer.js.map +1 -1
- package/Meshes/polygonMesh.js +4 -0
- package/Meshes/polygonMesh.js.map +1 -1
- package/Meshes/subMesh.project.d.ts +1 -0
- package/Meshes/subMesh.project.js.map +1 -1
- package/Meshes/thinInstanceMesh.d.ts +5 -0
- package/Meshes/thinInstanceMesh.js.map +1 -1
- package/Meshes/transformNode.d.ts +1 -1
- package/Meshes/transformNode.js +1 -1
- package/Meshes/transformNode.js.map +1 -1
- package/Physics/v2/Plugins/havokPlugin.d.ts +75 -2
- package/Physics/v2/Plugins/havokPlugin.js +243 -52
- package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
- package/Probes/reflectionProbe.js +1 -1
- package/Probes/reflectionProbe.js.map +1 -1
- package/Rendering/depthRenderer.js +1 -1
- package/Rendering/depthRenderer.js.map +1 -1
- package/package.json +1 -1
- package/scene.d.ts +0 -3
- package/scene.js +18 -5
- package/scene.js.map +1 -1
package/Meshes/mesh.js
CHANGED
|
@@ -32,8 +32,11 @@ export class _CreationDataStorage {
|
|
|
32
32
|
**/
|
|
33
33
|
class _InstanceDataStorageRenderPass {
|
|
34
34
|
constructor() {
|
|
35
|
+
/** @internal */
|
|
35
36
|
this.batchCache = new _InstancesBatch(this);
|
|
37
|
+
/** @internal */
|
|
36
38
|
this.batchCacheReplacementModeInFrozenMode = new _InstancesBatch(this);
|
|
39
|
+
/** @internal */
|
|
37
40
|
this.instancesBufferSize = 32 * 16 * 4; // let's start with a maximum of 32 instances
|
|
38
41
|
}
|
|
39
42
|
}
|
|
@@ -42,6 +45,7 @@ class _InstanceDataStorageRenderPass {
|
|
|
42
45
|
**/
|
|
43
46
|
class _InstanceDataStorage {
|
|
44
47
|
constructor() {
|
|
48
|
+
/** @internal */
|
|
45
49
|
this.renderPasses = {};
|
|
46
50
|
}
|
|
47
51
|
}
|
|
@@ -49,11 +53,16 @@ class _InstanceDataStorage {
|
|
|
49
53
|
* @internal
|
|
50
54
|
**/
|
|
51
55
|
export class _InstancesBatch {
|
|
56
|
+
/** @internal */
|
|
52
57
|
constructor(parent) {
|
|
53
58
|
this.parent = parent;
|
|
59
|
+
/** @internal */
|
|
54
60
|
this.mustReturn = false;
|
|
61
|
+
/** @internal */
|
|
55
62
|
this.visibleInstances = new Array();
|
|
63
|
+
/** @internal */
|
|
56
64
|
this.renderSelf = [];
|
|
65
|
+
/** @internal */
|
|
57
66
|
this.hardwareInstancedRendering = [];
|
|
58
67
|
}
|
|
59
68
|
}
|
|
@@ -62,12 +71,19 @@ export class _InstancesBatch {
|
|
|
62
71
|
**/
|
|
63
72
|
class _ThinInstanceDataStorage {
|
|
64
73
|
constructor() {
|
|
74
|
+
/** @internal */
|
|
65
75
|
this.instancesCount = 0;
|
|
76
|
+
/** @internal */
|
|
66
77
|
this.matrixBuffer = null;
|
|
78
|
+
/** @internal */
|
|
67
79
|
this.previousMatrixBuffer = null;
|
|
80
|
+
/** @internal */
|
|
68
81
|
this.matrixBufferSize = 32 * 16; // let's start with a maximum of 32 thin instances
|
|
82
|
+
/** @internal */
|
|
69
83
|
this.matrixData = null;
|
|
84
|
+
/** @internal */
|
|
70
85
|
this.boundingVectors = [];
|
|
86
|
+
/** @internal */
|
|
71
87
|
this.worldMatrices = null;
|
|
72
88
|
}
|
|
73
89
|
}
|
|
@@ -121,9 +137,11 @@ export class Mesh extends AbstractMesh {
|
|
|
121
137
|
this._internalMeshDataInfo._useLODScreenCoverage = value;
|
|
122
138
|
this._sortLODLevels();
|
|
123
139
|
}
|
|
140
|
+
/** {@inheritDoc} */
|
|
124
141
|
get computeBonesUsingShaders() {
|
|
125
142
|
return this._internalAbstractMeshDataInfo._computeBonesUsingShaders;
|
|
126
143
|
}
|
|
144
|
+
/** {@inheritDoc} */
|
|
127
145
|
set computeBonesUsingShaders(value) {
|
|
128
146
|
if (this._internalAbstractMeshDataInfo._computeBonesUsingShaders === value) {
|
|
129
147
|
return;
|
|
@@ -194,9 +212,11 @@ export class Mesh extends AbstractMesh {
|
|
|
194
212
|
}
|
|
195
213
|
this._onBeforeDrawObserver = this.onBeforeDrawObservable.add(callback);
|
|
196
214
|
}
|
|
215
|
+
/** {@inheritDoc} */
|
|
197
216
|
get hasInstances() {
|
|
198
217
|
return this.instances.length > 0;
|
|
199
218
|
}
|
|
219
|
+
/** {@inheritDoc} */
|
|
200
220
|
get hasThinInstances() {
|
|
201
221
|
return (this.forcedInstanceCount || this._thinInstanceDataStorage.instancesCount || 0) > 0;
|
|
202
222
|
}
|
|
@@ -251,9 +271,11 @@ export class Mesh extends AbstractMesh {
|
|
|
251
271
|
set overrideRenderingFillMode(fillMode) {
|
|
252
272
|
this._internalMeshDataInfo._overrideRenderingFillMode = fillMode;
|
|
253
273
|
}
|
|
274
|
+
/** {@inheritDoc} */
|
|
254
275
|
get material() {
|
|
255
276
|
return this._internalAbstractMeshDataInfo._material;
|
|
256
277
|
}
|
|
278
|
+
/** {@inheritDoc} */
|
|
257
279
|
set material(value) {
|
|
258
280
|
if (value && ((this.material && this.material.sideOrientation === null) || this._internalAbstractMeshDataInfo._sideOrientationHint)) {
|
|
259
281
|
value.sideOrientation = null;
|
|
@@ -581,6 +603,13 @@ export class Mesh extends AbstractMesh {
|
|
|
581
603
|
source.onClonedObservable.notifyObservers(this);
|
|
582
604
|
}
|
|
583
605
|
}
|
|
606
|
+
/**
|
|
607
|
+
* Instantiate (when possible) or clone that node with its hierarchy
|
|
608
|
+
* @param newParent defines the new parent to use for the instance (or clone)
|
|
609
|
+
* @param options defines options to configure how copy is done
|
|
610
|
+
* @param onNewNodeCreated defines an option callback to call when a clone or an instance is created
|
|
611
|
+
* @returns an instance (or a clone) of the current node with its hierarchy
|
|
612
|
+
*/
|
|
584
613
|
instantiateHierarchy(newParent = null, options, onNewNodeCreated) {
|
|
585
614
|
const instance = this.getTotalVertices() === 0 || (options && options.doNotInstantiate && (options.doNotInstantiate === true || options.doNotInstantiate(this)))
|
|
586
615
|
? this.clone("Clone of " + (this.name || this.id), newParent || this.parent, true)
|
|
@@ -843,11 +872,35 @@ export class Mesh extends AbstractMesh {
|
|
|
843
872
|
}
|
|
844
873
|
return data;
|
|
845
874
|
}
|
|
875
|
+
/**
|
|
876
|
+
* Copies the requested vertex data kind into the given vertex data map. Float data is constructed if the map doesn't have the data.
|
|
877
|
+
* @param kind defines the vertex data kind to use
|
|
878
|
+
* @param vertexData defines the map that stores the resulting data
|
|
879
|
+
*/
|
|
846
880
|
copyVerticesData(kind, vertexData) {
|
|
847
881
|
if (this._geometry) {
|
|
848
882
|
this._geometry.copyVerticesData(kind, vertexData);
|
|
849
883
|
}
|
|
850
884
|
}
|
|
885
|
+
/**
|
|
886
|
+
* Returns the mesh VertexBuffer object from the requested `kind`
|
|
887
|
+
* @param kind defines which buffer to read from (positions, indices, normals, etc). Possible `kind` values :
|
|
888
|
+
* - VertexBuffer.PositionKind
|
|
889
|
+
* - VertexBuffer.NormalKind
|
|
890
|
+
* - VertexBuffer.UVKind
|
|
891
|
+
* - VertexBuffer.UV2Kind
|
|
892
|
+
* - VertexBuffer.UV3Kind
|
|
893
|
+
* - VertexBuffer.UV4Kind
|
|
894
|
+
* - VertexBuffer.UV5Kind
|
|
895
|
+
* - VertexBuffer.UV6Kind
|
|
896
|
+
* - VertexBuffer.ColorKind
|
|
897
|
+
* - VertexBuffer.MatricesIndicesKind
|
|
898
|
+
* - VertexBuffer.MatricesIndicesExtraKind
|
|
899
|
+
* - VertexBuffer.MatricesWeightsKind
|
|
900
|
+
* - VertexBuffer.MatricesWeightsExtraKind
|
|
901
|
+
* @param bypassInstanceData defines a boolean indicating that the function should not take into account the instance data (applies only if the mesh has instances). Default: false
|
|
902
|
+
* @returns a FloatArray or null if the mesh has no vertex buffer for this kind.
|
|
903
|
+
*/
|
|
851
904
|
getVertexBuffer(kind, bypassInstanceData) {
|
|
852
905
|
if (!this._geometry) {
|
|
853
906
|
return null;
|
|
@@ -962,6 +1015,7 @@ export class Mesh extends AbstractMesh {
|
|
|
962
1015
|
}
|
|
963
1016
|
return this._geometry.getIndices(copyWhenShared, forceCopy);
|
|
964
1017
|
}
|
|
1018
|
+
/** {@inheritDoc} */
|
|
965
1019
|
get isBlocked() {
|
|
966
1020
|
return this._masterMesh !== null && this._masterMesh !== undefined;
|
|
967
1021
|
}
|
|
@@ -3954,7 +4008,7 @@ export class Mesh extends AbstractMesh {
|
|
|
3954
4008
|
* Merge the array of meshes into a single mesh for performance reasons.
|
|
3955
4009
|
* @param meshes array of meshes with the vertices to merge. Entries cannot be empty meshes.
|
|
3956
4010
|
* @param disposeSource when true (default), dispose of the vertices from the source meshes.
|
|
3957
|
-
* @param allow32BitsIndices when the sum of the vertices
|
|
4011
|
+
* @param allow32BitsIndices when the sum of the vertices \> 64k, this must be set to true.
|
|
3958
4012
|
* @param meshSubclass (optional) can be set to a Mesh where the merged vertices will be inserted.
|
|
3959
4013
|
* @param subdivideWithSubMeshes when true (false default), subdivide mesh into subMeshes.
|
|
3960
4014
|
* @param multiMultiMaterials when true (false default), subdivide mesh into subMeshes with multiple materials, ignores subdivideWithSubMeshes.
|
|
@@ -3967,7 +4021,7 @@ export class Mesh extends AbstractMesh {
|
|
|
3967
4021
|
* Merge the array of meshes into a single mesh for performance reasons.
|
|
3968
4022
|
* @param meshes array of meshes with the vertices to merge. Entries cannot be empty meshes.
|
|
3969
4023
|
* @param disposeSource when true (default), dispose of the vertices from the source meshes.
|
|
3970
|
-
* @param allow32BitsIndices when the sum of the vertices
|
|
4024
|
+
* @param allow32BitsIndices when the sum of the vertices \> 64k, this must be set to true.
|
|
3971
4025
|
* @param meshSubclass (optional) can be set to a Mesh where the merged vertices will be inserted.
|
|
3972
4026
|
* @param subdivideWithSubMeshes when true (false default), subdivide mesh into subMeshes.
|
|
3973
4027
|
* @param multiMultiMaterials when true (false default), subdivide mesh into subMeshes with multiple materials, ignores subdivideWithSubMeshes.
|
|
@@ -4178,152 +4232,152 @@ export class Mesh extends AbstractMesh {
|
|
|
4178
4232
|
/**
|
|
4179
4233
|
* Creates a ribbon mesh.
|
|
4180
4234
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param
|
|
4181
|
-
* @param
|
|
4182
|
-
* @param
|
|
4183
|
-
* @param
|
|
4184
|
-
* @param
|
|
4185
|
-
* @param
|
|
4186
|
-
* @param
|
|
4187
|
-
* @param
|
|
4188
|
-
* @param
|
|
4189
|
-
* @param
|
|
4235
|
+
* @param _name defines the name of the mesh to create
|
|
4236
|
+
* @param _pathArray is a required array of paths, what are each an array of successive Vector3. The pathArray parameter depicts the ribbon geometry.
|
|
4237
|
+
* @param _closeArray creates a seam between the first and the last paths of the path array (default is false)
|
|
4238
|
+
* @param _closePath creates a seam between the first and the last points of each path of the path array
|
|
4239
|
+
* @param _offset is taken in account only if the `pathArray` is containing a single path
|
|
4240
|
+
* @param _scene defines the hosting scene
|
|
4241
|
+
* @param _updatable defines if the mesh must be flagged as updatable
|
|
4242
|
+
* @param _sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)
|
|
4243
|
+
* @param _instance defines an instance of an existing Ribbon object to be updated with the passed `pathArray` parameter (https://doc.babylonjs.com/how_to/How_to_dynamically_morph_a_mesh#ribbon)
|
|
4190
4244
|
* @returns a new Mesh
|
|
4191
4245
|
* @deprecated Please use MeshBuilder instead
|
|
4192
4246
|
*/
|
|
4193
|
-
static CreateRibbon(
|
|
4247
|
+
static CreateRibbon(_name, _pathArray, _closeArray, _closePath, _offset, _scene, _updatable, _sideOrientation, _instance) {
|
|
4194
4248
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4195
4249
|
}
|
|
4196
4250
|
/**
|
|
4197
4251
|
* Creates a plane polygonal mesh. By default, this is a disc.
|
|
4198
|
-
* @param
|
|
4199
|
-
* @param
|
|
4200
|
-
* @param
|
|
4201
|
-
* @param
|
|
4202
|
-
* @param
|
|
4203
|
-
* @param
|
|
4252
|
+
* @param _name defines the name of the mesh to create
|
|
4253
|
+
* @param _radius sets the radius size (float) of the polygon (default 0.5)
|
|
4254
|
+
* @param _tessellation sets the number of polygon sides (positive integer, default 64). So a tessellation valued to 3 will build a triangle, to 4 a square, etc
|
|
4255
|
+
* @param _scene defines the hosting scene
|
|
4256
|
+
* @param _updatable defines if the mesh must be flagged as updatable
|
|
4257
|
+
* @param _sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)
|
|
4204
4258
|
* @returns a new Mesh
|
|
4205
4259
|
* @deprecated Please use MeshBuilder instead
|
|
4206
4260
|
*/
|
|
4207
|
-
static CreateDisc(
|
|
4261
|
+
static CreateDisc(_name, _radius, _tessellation, _scene, _updatable, _sideOrientation) {
|
|
4208
4262
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4209
4263
|
}
|
|
4210
4264
|
/**
|
|
4211
4265
|
* Creates a box mesh.
|
|
4212
|
-
* @param
|
|
4213
|
-
* @param
|
|
4214
|
-
* @param
|
|
4215
|
-
* @param
|
|
4216
|
-
* @param
|
|
4266
|
+
* @param _name defines the name of the mesh to create
|
|
4267
|
+
* @param _size sets the size (float) of each box side (default 1)
|
|
4268
|
+
* @param _scene defines the hosting scene
|
|
4269
|
+
* @param _updatable defines if the mesh must be flagged as updatable
|
|
4270
|
+
* @param _sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)
|
|
4217
4271
|
* @returns a new Mesh
|
|
4218
4272
|
* @deprecated Please use MeshBuilder instead
|
|
4219
4273
|
*/
|
|
4220
|
-
static CreateBox(
|
|
4274
|
+
static CreateBox(_name, _size, _scene, _updatable, _sideOrientation) {
|
|
4221
4275
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4222
4276
|
}
|
|
4223
4277
|
/**
|
|
4224
4278
|
* Creates a sphere mesh.
|
|
4225
|
-
* @param
|
|
4226
|
-
* @param
|
|
4227
|
-
* @param
|
|
4228
|
-
* @param
|
|
4229
|
-
* @param
|
|
4230
|
-
* @param
|
|
4279
|
+
* @param _name defines the name of the mesh to create
|
|
4280
|
+
* @param _segments sets the sphere number of horizontal stripes (positive integer, default 32)
|
|
4281
|
+
* @param _diameter sets the diameter size (float) of the sphere (default 1)
|
|
4282
|
+
* @param _scene defines the hosting scene
|
|
4283
|
+
* @param _updatable defines if the mesh must be flagged as updatable
|
|
4284
|
+
* @param _sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)
|
|
4231
4285
|
* @returns a new Mesh
|
|
4232
4286
|
* @deprecated Please use MeshBuilder instead
|
|
4233
4287
|
*/
|
|
4234
|
-
static CreateSphere(
|
|
4288
|
+
static CreateSphere(_name, _segments, _diameter, _scene, _updatable, _sideOrientation) {
|
|
4235
4289
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4236
4290
|
}
|
|
4237
4291
|
/**
|
|
4238
4292
|
* Creates a hemisphere mesh.
|
|
4239
|
-
* @param
|
|
4240
|
-
* @param
|
|
4241
|
-
* @param
|
|
4242
|
-
* @param
|
|
4293
|
+
* @param _name defines the name of the mesh to create
|
|
4294
|
+
* @param _segments sets the sphere number of horizontal stripes (positive integer, default 32)
|
|
4295
|
+
* @param _diameter sets the diameter size (float) of the sphere (default 1)
|
|
4296
|
+
* @param _scene defines the hosting scene
|
|
4243
4297
|
* @returns a new Mesh
|
|
4244
4298
|
* @deprecated Please use MeshBuilder instead
|
|
4245
4299
|
*/
|
|
4246
|
-
static CreateHemisphere(
|
|
4300
|
+
static CreateHemisphere(_name, _segments, _diameter, _scene) {
|
|
4247
4301
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4248
4302
|
}
|
|
4249
4303
|
/**
|
|
4250
4304
|
* Creates a cylinder or a cone mesh.
|
|
4251
|
-
* @param
|
|
4252
|
-
* @param
|
|
4253
|
-
* @param
|
|
4254
|
-
* @param
|
|
4255
|
-
* @param
|
|
4256
|
-
* @param
|
|
4257
|
-
* @param
|
|
4258
|
-
* @param
|
|
4259
|
-
* @param
|
|
4305
|
+
* @param _name defines the name of the mesh to create
|
|
4306
|
+
* @param _height sets the height size (float) of the cylinder/cone (float, default 2)
|
|
4307
|
+
* @param _diameterTop set the top cap diameter (floats, default 1)
|
|
4308
|
+
* @param _diameterBottom set the bottom cap diameter (floats, default 1). This value can't be zero
|
|
4309
|
+
* @param _tessellation sets the number of cylinder sides (positive integer, default 24). Set it to 3 to get a prism for instance
|
|
4310
|
+
* @param _subdivisions sets the number of rings along the cylinder height (positive integer, default 1)
|
|
4311
|
+
* @param _scene defines the hosting scene
|
|
4312
|
+
* @param _updatable defines if the mesh must be flagged as updatable
|
|
4313
|
+
* @param _sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)
|
|
4260
4314
|
* @returns a new Mesh
|
|
4261
4315
|
* @deprecated Please use MeshBuilder instead
|
|
4262
4316
|
*/
|
|
4263
|
-
static CreateCylinder(
|
|
4317
|
+
static CreateCylinder(_name, _height, _diameterTop, _diameterBottom, _tessellation, _subdivisions, _scene, _updatable, _sideOrientation) {
|
|
4264
4318
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4265
4319
|
}
|
|
4266
4320
|
// Torus (Code from SharpDX.org)
|
|
4267
4321
|
/**
|
|
4268
4322
|
* Creates a torus mesh.
|
|
4269
|
-
* @param
|
|
4270
|
-
* @param
|
|
4271
|
-
* @param
|
|
4272
|
-
* @param
|
|
4273
|
-
* @param
|
|
4274
|
-
* @param
|
|
4275
|
-
* @param
|
|
4323
|
+
* @param _name defines the name of the mesh to create
|
|
4324
|
+
* @param _diameter sets the diameter size (float) of the torus (default 1)
|
|
4325
|
+
* @param _thickness sets the diameter size of the tube of the torus (float, default 0.5)
|
|
4326
|
+
* @param _tessellation sets the number of torus sides (positive integer, default 16)
|
|
4327
|
+
* @param _scene defines the hosting scene
|
|
4328
|
+
* @param _updatable defines if the mesh must be flagged as updatable
|
|
4329
|
+
* @param _sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)
|
|
4276
4330
|
* @returns a new Mesh
|
|
4277
4331
|
* @deprecated Please use MeshBuilder instead
|
|
4278
4332
|
*/
|
|
4279
|
-
static CreateTorus(
|
|
4333
|
+
static CreateTorus(_name, _diameter, _thickness, _tessellation, _scene, _updatable, _sideOrientation) {
|
|
4280
4334
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4281
4335
|
}
|
|
4282
4336
|
/**
|
|
4283
4337
|
* Creates a torus knot mesh.
|
|
4284
|
-
* @param
|
|
4285
|
-
* @param
|
|
4286
|
-
* @param
|
|
4287
|
-
* @param
|
|
4288
|
-
* @param
|
|
4289
|
-
* @param
|
|
4290
|
-
* @param
|
|
4291
|
-
* @param
|
|
4292
|
-
* @param
|
|
4293
|
-
* @param
|
|
4338
|
+
* @param _name defines the name of the mesh to create
|
|
4339
|
+
* @param _radius sets the global radius size (float) of the torus knot (default 2)
|
|
4340
|
+
* @param _tube sets the diameter size of the tube of the torus (float, default 0.5)
|
|
4341
|
+
* @param _radialSegments sets the number of sides on each tube segments (positive integer, default 32)
|
|
4342
|
+
* @param _tubularSegments sets the number of tubes to decompose the knot into (positive integer, default 32)
|
|
4343
|
+
* @param _p the number of windings on X axis (positive integers, default 2)
|
|
4344
|
+
* @param _q the number of windings on Y axis (positive integers, default 3)
|
|
4345
|
+
* @param _scene defines the hosting scene
|
|
4346
|
+
* @param _updatable defines if the mesh must be flagged as updatable
|
|
4347
|
+
* @param _sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)
|
|
4294
4348
|
* @returns a new Mesh
|
|
4295
4349
|
* @deprecated Please use MeshBuilder instead
|
|
4296
4350
|
*/
|
|
4297
|
-
static CreateTorusKnot(
|
|
4351
|
+
static CreateTorusKnot(_name, _radius, _tube, _radialSegments, _tubularSegments, _p, _q, _scene, _updatable, _sideOrientation) {
|
|
4298
4352
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4299
4353
|
}
|
|
4300
4354
|
/**
|
|
4301
4355
|
* Creates a line mesh..
|
|
4302
|
-
* @param
|
|
4303
|
-
* @param
|
|
4304
|
-
* @param
|
|
4305
|
-
* @param
|
|
4306
|
-
* @param
|
|
4356
|
+
* @param _name defines the name of the mesh to create
|
|
4357
|
+
* @param _points is an array successive Vector3
|
|
4358
|
+
* @param _scene defines the hosting scene
|
|
4359
|
+
* @param _updatable defines if the mesh must be flagged as updatable
|
|
4360
|
+
* @param _instance is an instance of an existing LineMesh object to be updated with the passed `points` parameter (https://doc.babylonjs.com/how_to/How_to_dynamically_morph_a_mesh#lines-and-dashedlines).
|
|
4307
4361
|
* @returns a new Mesh
|
|
4308
4362
|
* @deprecated Please use MeshBuilder instead
|
|
4309
4363
|
*/
|
|
4310
|
-
static CreateLines(
|
|
4364
|
+
static CreateLines(_name, _points, _scene, _updatable, _instance) {
|
|
4311
4365
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4312
4366
|
}
|
|
4313
4367
|
/**
|
|
4314
4368
|
* Creates a dashed line mesh.
|
|
4315
|
-
* @param
|
|
4316
|
-
* @param
|
|
4317
|
-
* @param
|
|
4318
|
-
* @param
|
|
4319
|
-
* @param
|
|
4320
|
-
* @param
|
|
4321
|
-
* @param
|
|
4322
|
-
* @param
|
|
4369
|
+
* @param _name defines the name of the mesh to create
|
|
4370
|
+
* @param _points is an array successive Vector3
|
|
4371
|
+
* @param _dashSize is the size of the dashes relatively the dash number (positive float, default 3)
|
|
4372
|
+
* @param _gapSize is the size of the gap between two successive dashes relatively the dash number (positive float, default 1)
|
|
4373
|
+
* @param _dashNb is the intended total number of dashes (positive integer, default 200)
|
|
4374
|
+
* @param _scene defines the hosting scene
|
|
4375
|
+
* @param _updatable defines if the mesh must be flagged as updatable
|
|
4376
|
+
* @param _instance is an instance of an existing LineMesh object to be updated with the passed `points` parameter (https://doc.babylonjs.com/how_to/How_to_dynamically_morph_a_mesh#lines-and-dashedlines)
|
|
4323
4377
|
* @returns a new Mesh
|
|
4324
4378
|
* @deprecated Please use MeshBuilder instead
|
|
4325
4379
|
*/
|
|
4326
|
-
static CreateDashedLines(
|
|
4380
|
+
static CreateDashedLines(_name, _points, _dashSize, _gapSize, _dashNb, _scene, _updatable, _instance) {
|
|
4327
4381
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4328
4382
|
}
|
|
4329
4383
|
/**
|
|
@@ -4334,34 +4388,34 @@ export class Mesh extends AbstractMesh {
|
|
|
4334
4388
|
* The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created.
|
|
4335
4389
|
* Remember you can only change the shape positions, not their number when updating a polygon.
|
|
4336
4390
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#non-regular-polygon
|
|
4337
|
-
* @param
|
|
4338
|
-
* @param
|
|
4339
|
-
* @param
|
|
4340
|
-
* @param
|
|
4341
|
-
* @param
|
|
4342
|
-
* @param
|
|
4343
|
-
* @param
|
|
4391
|
+
* @param _name defines the name of the mesh to create
|
|
4392
|
+
* @param _shape is a required array of successive Vector3 representing the corners of the polygon in th XoZ plane, that is y = 0 for all vectors
|
|
4393
|
+
* @param _scene defines the hosting scene
|
|
4394
|
+
* @param _holes is a required array of arrays of successive Vector3 used to defines holes in the polygon
|
|
4395
|
+
* @param _updatable defines if the mesh must be flagged as updatable
|
|
4396
|
+
* @param _sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)
|
|
4397
|
+
* @param _earcutInjection can be used to inject your own earcut reference
|
|
4344
4398
|
* @returns a new Mesh
|
|
4345
4399
|
* @deprecated Please use MeshBuilder instead
|
|
4346
4400
|
*/
|
|
4347
|
-
static CreatePolygon(
|
|
4401
|
+
static CreatePolygon(_name, _shape, _scene, _holes, _updatable, _sideOrientation, _earcutInjection) {
|
|
4348
4402
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4349
4403
|
}
|
|
4350
4404
|
/**
|
|
4351
4405
|
* Creates an extruded polygon mesh, with depth in the Y direction..
|
|
4352
4406
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#extruded-non-regular-polygon
|
|
4353
|
-
* @param
|
|
4354
|
-
* @param
|
|
4355
|
-
* @param
|
|
4356
|
-
* @param
|
|
4357
|
-
* @param
|
|
4358
|
-
* @param
|
|
4359
|
-
* @param
|
|
4360
|
-
* @param
|
|
4407
|
+
* @param _name defines the name of the mesh to create
|
|
4408
|
+
* @param _shape is a required array of successive Vector3 representing the corners of the polygon in th XoZ plane, that is y = 0 for all vectors
|
|
4409
|
+
* @param _depth defines the height of extrusion
|
|
4410
|
+
* @param _scene defines the hosting scene
|
|
4411
|
+
* @param _holes is a required array of arrays of successive Vector3 used to defines holes in the polygon
|
|
4412
|
+
* @param _updatable defines if the mesh must be flagged as updatable
|
|
4413
|
+
* @param _sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)
|
|
4414
|
+
* @param _earcutInjection can be used to inject your own earcut reference
|
|
4361
4415
|
* @returns a new Mesh
|
|
4362
4416
|
* @deprecated Please use MeshBuilder instead
|
|
4363
4417
|
*/
|
|
4364
|
-
static ExtrudePolygon(
|
|
4418
|
+
static ExtrudePolygon(_name, _shape, _depth, _scene, _holes, _updatable, _sideOrientation, _earcutInjection) {
|
|
4365
4419
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4366
4420
|
}
|
|
4367
4421
|
/**
|
|
@@ -4369,20 +4423,20 @@ export class Mesh extends AbstractMesh {
|
|
|
4369
4423
|
* The extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.
|
|
4370
4424
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param
|
|
4371
4425
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#extruded-shapes
|
|
4372
|
-
* @param
|
|
4373
|
-
* @param
|
|
4374
|
-
* @param
|
|
4375
|
-
* @param
|
|
4376
|
-
* @param
|
|
4377
|
-
* @param
|
|
4378
|
-
* @param
|
|
4379
|
-
* @param
|
|
4380
|
-
* @param
|
|
4381
|
-
* @param
|
|
4426
|
+
* @param _name defines the name of the mesh to create
|
|
4427
|
+
* @param _shape is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis
|
|
4428
|
+
* @param _path is a required array of successive Vector3. This is the axis curve the shape is extruded along
|
|
4429
|
+
* @param _scale is the value to scale the shape
|
|
4430
|
+
* @param _rotation is the angle value to rotate the shape each step (each path point), from the former step (so rotation added each step) along the curve
|
|
4431
|
+
* @param _cap sets the way the extruded shape is capped. Possible values : Mesh.NO_CAP (default), Mesh.CAP_START, Mesh.CAP_END, Mesh.CAP_ALL
|
|
4432
|
+
* @param _scene defines the hosting scene
|
|
4433
|
+
* @param _updatable defines if the mesh must be flagged as updatable
|
|
4434
|
+
* @param _sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)
|
|
4435
|
+
* @param _instance is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters (https://doc.babylonjs.com/how_to/How_to_dynamically_morph_a_mesh#extruded-shape)
|
|
4382
4436
|
* @returns a new Mesh
|
|
4383
4437
|
* @deprecated Please use MeshBuilder instead
|
|
4384
4438
|
*/
|
|
4385
|
-
static ExtrudeShape(
|
|
4439
|
+
static ExtrudeShape(_name, _shape, _path, _scale, _rotation, _cap, _scene, _updatable, _sideOrientation, _instance) {
|
|
4386
4440
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4387
4441
|
}
|
|
4388
4442
|
/**
|
|
@@ -4391,102 +4445,102 @@ export class Mesh extends AbstractMesh {
|
|
|
4391
4445
|
* It has no predefined shape. Its final shape will depend on the input parameters.
|
|
4392
4446
|
*
|
|
4393
4447
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param#extruded-shapes
|
|
4394
|
-
* @param
|
|
4395
|
-
* @param
|
|
4396
|
-
* @param
|
|
4397
|
-
* @param
|
|
4398
|
-
* @param
|
|
4399
|
-
* @param
|
|
4400
|
-
* @param
|
|
4401
|
-
* @param
|
|
4402
|
-
* @param
|
|
4403
|
-
* @param
|
|
4404
|
-
* @param
|
|
4405
|
-
* @param
|
|
4448
|
+
* @param _name defines the name of the mesh to create
|
|
4449
|
+
* @param _shape is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis
|
|
4450
|
+
* @param _path is a required array of successive Vector3. This is the axis curve the shape is extruded along
|
|
4451
|
+
* @param _scaleFunction is a custom Javascript function called on each path point
|
|
4452
|
+
* @param _rotationFunction is a custom Javascript function called on each path point
|
|
4453
|
+
* @param _ribbonCloseArray forces the extrusion underlying ribbon to close all the paths in its `pathArray`
|
|
4454
|
+
* @param _ribbonClosePath forces the extrusion underlying ribbon to close its `pathArray`
|
|
4455
|
+
* @param _cap sets the way the extruded shape is capped. Possible values : Mesh.NO_CAP (default), Mesh.CAP_START, Mesh.CAP_END, Mesh.CAP_ALL
|
|
4456
|
+
* @param _scene defines the hosting scene
|
|
4457
|
+
* @param _updatable defines if the mesh must be flagged as updatable
|
|
4458
|
+
* @param _sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)
|
|
4459
|
+
* @param _instance is an instance of an existing ExtrudedShape object to be updated with the passed `shape`, `path`, `scale` or `rotation` parameters (https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#extruded-shape)
|
|
4406
4460
|
* @returns a new Mesh
|
|
4407
4461
|
* @deprecated Please use MeshBuilder instead
|
|
4408
4462
|
*/
|
|
4409
|
-
static ExtrudeShapeCustom(
|
|
4463
|
+
static ExtrudeShapeCustom(_name, _shape, _path, _scaleFunction, _rotationFunction, _ribbonCloseArray, _ribbonClosePath, _cap, _scene, _updatable, _sideOrientation, _instance) {
|
|
4410
4464
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4411
4465
|
}
|
|
4412
4466
|
/**
|
|
4413
4467
|
* Creates lathe mesh.
|
|
4414
4468
|
* The lathe is a shape with a symmetry axis : a 2D model shape is rotated around this axis to design the lathe.
|
|
4415
|
-
* @param
|
|
4416
|
-
* @param
|
|
4417
|
-
* @param
|
|
4418
|
-
* @param
|
|
4419
|
-
* @param
|
|
4420
|
-
* @param
|
|
4421
|
-
* @param
|
|
4469
|
+
* @param _name defines the name of the mesh to create
|
|
4470
|
+
* @param _shape is a required array of successive Vector3. This array depicts the shape to be rotated in its local space : the shape must be designed in the xOy plane and will be rotated around the Y axis. It's usually a 2D shape, so the Vector3 z coordinates are often set to zero
|
|
4471
|
+
* @param _radius is the radius value of the lathe
|
|
4472
|
+
* @param _tessellation is the side number of the lathe.
|
|
4473
|
+
* @param _scene defines the hosting scene
|
|
4474
|
+
* @param _updatable defines if the mesh must be flagged as updatable
|
|
4475
|
+
* @param _sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)
|
|
4422
4476
|
* @returns a new Mesh
|
|
4423
4477
|
* @deprecated Please use MeshBuilder instead
|
|
4424
4478
|
*/
|
|
4425
|
-
static CreateLathe(
|
|
4479
|
+
static CreateLathe(_name, _shape, _radius, _tessellation, _scene, _updatable, _sideOrientation) {
|
|
4426
4480
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4427
4481
|
}
|
|
4428
4482
|
/**
|
|
4429
4483
|
* Creates a plane mesh.
|
|
4430
|
-
* @param
|
|
4431
|
-
* @param
|
|
4432
|
-
* @param
|
|
4433
|
-
* @param
|
|
4434
|
-
* @param
|
|
4484
|
+
* @param _name defines the name of the mesh to create
|
|
4485
|
+
* @param _size sets the size (float) of both sides of the plane at once (default 1)
|
|
4486
|
+
* @param _scene defines the hosting scene
|
|
4487
|
+
* @param _updatable defines if the mesh must be flagged as updatable
|
|
4488
|
+
* @param _sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)
|
|
4435
4489
|
* @returns a new Mesh
|
|
4436
4490
|
* @deprecated Please use MeshBuilder instead
|
|
4437
4491
|
*/
|
|
4438
|
-
static CreatePlane(
|
|
4492
|
+
static CreatePlane(_name, _size, _scene, _updatable, _sideOrientation) {
|
|
4439
4493
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4440
4494
|
}
|
|
4441
4495
|
/**
|
|
4442
4496
|
* Creates a ground mesh.
|
|
4443
|
-
* @param
|
|
4444
|
-
* @param
|
|
4445
|
-
* @param
|
|
4446
|
-
* @param
|
|
4447
|
-
* @param
|
|
4448
|
-
* @param
|
|
4497
|
+
* @param _name defines the name of the mesh to create
|
|
4498
|
+
* @param _width set the width of the ground
|
|
4499
|
+
* @param _height set the height of the ground
|
|
4500
|
+
* @param _subdivisions sets the number of subdivisions per side
|
|
4501
|
+
* @param _scene defines the hosting scene
|
|
4502
|
+
* @param _updatable defines if the mesh must be flagged as updatable
|
|
4449
4503
|
* @returns a new Mesh
|
|
4450
4504
|
* @deprecated Please use MeshBuilder instead
|
|
4451
4505
|
*/
|
|
4452
|
-
static CreateGround(
|
|
4506
|
+
static CreateGround(_name, _width, _height, _subdivisions, _scene, _updatable) {
|
|
4453
4507
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4454
4508
|
}
|
|
4455
4509
|
/**
|
|
4456
4510
|
* Creates a tiled ground mesh.
|
|
4457
|
-
* @param
|
|
4458
|
-
* @param
|
|
4459
|
-
* @param
|
|
4460
|
-
* @param
|
|
4461
|
-
* @param
|
|
4462
|
-
* @param
|
|
4463
|
-
* @param
|
|
4464
|
-
* @param
|
|
4465
|
-
* @param
|
|
4511
|
+
* @param _name defines the name of the mesh to create
|
|
4512
|
+
* @param _xmin set the ground minimum X coordinate
|
|
4513
|
+
* @param _zmin set the ground minimum Y coordinate
|
|
4514
|
+
* @param _xmax set the ground maximum X coordinate
|
|
4515
|
+
* @param _zmax set the ground maximum Z coordinate
|
|
4516
|
+
* @param _subdivisions is an object `{w: positive integer, h: positive integer}` (default `{w: 6, h: 6}`). `w` and `h` are the numbers of subdivisions on the ground width and height. Each subdivision is called a tile
|
|
4517
|
+
* @param _precision is an object `{w: positive integer, h: positive integer}` (default `{w: 2, h: 2}`). `w` and `h` are the numbers of subdivisions on the ground width and height of each tile
|
|
4518
|
+
* @param _scene defines the hosting scene
|
|
4519
|
+
* @param _updatable defines if the mesh must be flagged as updatable
|
|
4466
4520
|
* @returns a new Mesh
|
|
4467
4521
|
* @deprecated Please use MeshBuilder instead
|
|
4468
4522
|
*/
|
|
4469
|
-
static CreateTiledGround(
|
|
4523
|
+
static CreateTiledGround(_name, _xmin, _zmin, _xmax, _zmax, _subdivisions, _precision, _scene, _updatable) {
|
|
4470
4524
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4471
4525
|
}
|
|
4472
4526
|
/**
|
|
4473
4527
|
* Creates a ground mesh from a height map.
|
|
4474
4528
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set/height_map
|
|
4475
|
-
* @param
|
|
4476
|
-
* @param
|
|
4477
|
-
* @param
|
|
4478
|
-
* @param
|
|
4479
|
-
* @param
|
|
4480
|
-
* @param
|
|
4481
|
-
* @param
|
|
4482
|
-
* @param
|
|
4483
|
-
* @param
|
|
4484
|
-
* @param
|
|
4485
|
-
* @param
|
|
4529
|
+
* @param _name defines the name of the mesh to create
|
|
4530
|
+
* @param _url sets the URL of the height map image resource
|
|
4531
|
+
* @param _width set the ground width size
|
|
4532
|
+
* @param _height set the ground height size
|
|
4533
|
+
* @param _subdivisions sets the number of subdivision per side
|
|
4534
|
+
* @param _minHeight is the minimum altitude on the ground
|
|
4535
|
+
* @param _maxHeight is the maximum altitude on the ground
|
|
4536
|
+
* @param _scene defines the hosting scene
|
|
4537
|
+
* @param _updatable defines if the mesh must be flagged as updatable
|
|
4538
|
+
* @param _onReady is a callback function that will be called once the mesh is built (the height map download can last some time)
|
|
4539
|
+
* @param _alphaFilter will filter any data where the alpha channel is below this value, defaults 0 (all data visible)
|
|
4486
4540
|
* @returns a new Mesh
|
|
4487
4541
|
* @deprecated Please use MeshBuilder instead
|
|
4488
4542
|
*/
|
|
4489
|
-
static CreateGroundFromHeightMap(
|
|
4543
|
+
static CreateGroundFromHeightMap(_name, _url, _width, _height, _subdivisions, _minHeight, _maxHeight, _scene, _updatable, _onReady, _alphaFilter) {
|
|
4490
4544
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4491
4545
|
}
|
|
4492
4546
|
/**
|
|
@@ -4495,20 +4549,20 @@ export class Mesh extends AbstractMesh {
|
|
|
4495
4549
|
* It has no predefined shape. Its final shape will depend on the input parameters.
|
|
4496
4550
|
*
|
|
4497
4551
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param
|
|
4498
|
-
* @param
|
|
4499
|
-
* @param
|
|
4500
|
-
* @param
|
|
4501
|
-
* @param
|
|
4502
|
-
* @param
|
|
4503
|
-
* @param
|
|
4504
|
-
* @param
|
|
4505
|
-
* @param
|
|
4506
|
-
* @param
|
|
4507
|
-
* @param
|
|
4552
|
+
* @param _name defines the name of the mesh to create
|
|
4553
|
+
* @param _path is a required array of successive Vector3. It is the curve used as the axis of the tube
|
|
4554
|
+
* @param _radius sets the tube radius size
|
|
4555
|
+
* @param _tessellation is the number of sides on the tubular surface
|
|
4556
|
+
* @param _radiusFunction is a custom function. If it is not null, it overrides the parameter `radius`. This function is called on each point of the tube path and is passed the index `i` of the i-th point and the distance of this point from the first point of the path
|
|
4557
|
+
* @param _cap sets the way the extruded shape is capped. Possible values : Mesh.NO_CAP (default), Mesh.CAP_START, Mesh.CAP_END, Mesh.CAP_ALL
|
|
4558
|
+
* @param _scene defines the hosting scene
|
|
4559
|
+
* @param _updatable defines if the mesh must be flagged as updatable
|
|
4560
|
+
* @param _sideOrientation defines the mesh side orientation (https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation)
|
|
4561
|
+
* @param _instance is an instance of an existing Tube object to be updated with the passed `pathArray` parameter (https://doc.babylonjs.com/how_to/How_to_dynamically_morph_a_mesh#tube)
|
|
4508
4562
|
* @returns a new Mesh
|
|
4509
4563
|
* @deprecated Please use MeshBuilder instead
|
|
4510
4564
|
*/
|
|
4511
|
-
static CreateTube(
|
|
4565
|
+
static CreateTube(_name, _path, _radius, _tessellation, _radiusFunction, _cap, _scene, _updatable, _sideOrientation, _instance) {
|
|
4512
4566
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4513
4567
|
}
|
|
4514
4568
|
/**
|
|
@@ -4525,13 +4579,13 @@ export class Mesh extends AbstractMesh {
|
|
|
4525
4579
|
* * You can also set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
|
|
4526
4580
|
* * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation
|
|
4527
4581
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
4528
|
-
* @param
|
|
4529
|
-
* @param
|
|
4530
|
-
* @param
|
|
4582
|
+
* @param _name defines the name of the mesh to create
|
|
4583
|
+
* @param _options defines the options used to create the mesh
|
|
4584
|
+
* @param _scene defines the hosting scene
|
|
4531
4585
|
* @returns a new Mesh
|
|
4532
4586
|
* @deprecated Please use MeshBuilder instead
|
|
4533
4587
|
*/
|
|
4534
|
-
static CreatePolyhedron(
|
|
4588
|
+
static CreatePolyhedron(_name, _options, _scene) {
|
|
4535
4589
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4536
4590
|
}
|
|
4537
4591
|
/**
|
|
@@ -4544,50 +4598,50 @@ export class Mesh extends AbstractMesh {
|
|
|
4544
4598
|
* * If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters `frontUVs` and `backUVs` (Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation
|
|
4545
4599
|
* * The mesh can be set to updatable with the boolean parameter `updatable` (default false) if its internal geometry is supposed to change once created
|
|
4546
4600
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/polyhedra#icosphere
|
|
4547
|
-
* @param
|
|
4548
|
-
* @param
|
|
4549
|
-
* @param
|
|
4601
|
+
* @param _name defines the name of the mesh
|
|
4602
|
+
* @param _options defines the options used to create the mesh
|
|
4603
|
+
* @param _scene defines the hosting scene
|
|
4550
4604
|
* @returns a new Mesh
|
|
4551
4605
|
* @deprecated Please use MeshBuilder instead
|
|
4552
4606
|
*/
|
|
4553
|
-
static CreateIcoSphere(
|
|
4607
|
+
static CreateIcoSphere(_name, _options, _scene) {
|
|
4554
4608
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4555
4609
|
}
|
|
4556
4610
|
/**
|
|
4557
4611
|
* Creates a decal mesh.
|
|
4558
4612
|
*.
|
|
4559
4613
|
* A decal is a mesh usually applied as a model onto the surface of another mesh
|
|
4560
|
-
* @param
|
|
4561
|
-
* @param
|
|
4562
|
-
* @param
|
|
4563
|
-
* @param
|
|
4564
|
-
* @param
|
|
4565
|
-
* @param
|
|
4614
|
+
* @param _name defines the name of the mesh
|
|
4615
|
+
* @param _sourceMesh defines the mesh receiving the decal
|
|
4616
|
+
* @param _position sets the position of the decal in world coordinates
|
|
4617
|
+
* @param _normal sets the normal of the mesh where the decal is applied onto in world coordinates
|
|
4618
|
+
* @param _size sets the decal scaling
|
|
4619
|
+
* @param _angle sets the angle to rotate the decal
|
|
4566
4620
|
* @returns a new Mesh
|
|
4567
4621
|
* @deprecated Please use MeshBuilder instead
|
|
4568
4622
|
*/
|
|
4569
|
-
static CreateDecal(
|
|
4623
|
+
static CreateDecal(_name, _sourceMesh, _position, _normal, _size, _angle) {
|
|
4570
4624
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4571
4625
|
}
|
|
4572
4626
|
/** Creates a Capsule Mesh
|
|
4573
|
-
* @param
|
|
4574
|
-
* @param
|
|
4575
|
-
* @param
|
|
4627
|
+
* @param _name defines the name of the mesh.
|
|
4628
|
+
* @param _options the constructors options used to shape the mesh.
|
|
4629
|
+
* @param _scene defines the scene the mesh is scoped to.
|
|
4576
4630
|
* @returns the capsule mesh
|
|
4577
4631
|
* @see https://doc.babylonjs.com/how_to/capsule_shape
|
|
4578
4632
|
* @deprecated Please use MeshBuilder instead
|
|
4579
4633
|
*/
|
|
4580
|
-
static CreateCapsule(
|
|
4634
|
+
static CreateCapsule(_name, _options, _scene) {
|
|
4581
4635
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4582
4636
|
}
|
|
4583
4637
|
/**
|
|
4584
4638
|
* Extends a mesh to a Goldberg mesh
|
|
4585
4639
|
* Warning the mesh to convert MUST be an import of a perviously exported Goldberg mesh
|
|
4586
|
-
* @param
|
|
4640
|
+
* @param _mesh the mesh to convert
|
|
4587
4641
|
* @returns the extended mesh
|
|
4588
4642
|
* @deprecated Please use ExtendMeshToGoldberg instead
|
|
4589
4643
|
*/
|
|
4590
|
-
static ExtendToGoldberg(
|
|
4644
|
+
static ExtendToGoldberg(_mesh) {
|
|
4591
4645
|
throw new Error("Import MeshBuilder to populate this function");
|
|
4592
4646
|
}
|
|
4593
4647
|
}
|