@babylonjs/core 5.38.0 → 5.40.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/Audio/audioSceneComponent.d.ts +11 -6
- package/Audio/audioSceneComponent.js +78 -52
- package/Audio/audioSceneComponent.js.map +1 -1
- package/Audio/sound.js +6 -4
- package/Audio/sound.js.map +1 -1
- package/Culling/ray.d.ts +1 -1
- package/Culling/ray.js.map +1 -1
- package/Engines/Extensions/engine.renderTarget.js +3 -3
- package/Engines/Extensions/engine.renderTarget.js.map +1 -1
- package/Engines/nativeEngine.js +2 -1
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/thinEngine.js +2 -2
- package/Engines/thinEngine.js.map +1 -1
- package/Gizmos/gizmo.d.ts +1 -0
- package/Gizmos/gizmo.js +1 -0
- package/Gizmos/gizmo.js.map +1 -1
- package/Gizmos/positionGizmo.d.ts +4 -0
- package/Gizmos/positionGizmo.js +4 -0
- package/Gizmos/positionGizmo.js.map +1 -1
- package/Gizmos/rotationGizmo.d.ts +4 -0
- package/Gizmos/rotationGizmo.js +4 -0
- package/Gizmos/rotationGizmo.js.map +1 -1
- package/Layers/glowLayer.d.ts +3 -3
- package/Layers/glowLayer.js +2 -1
- package/Layers/glowLayer.js.map +1 -1
- package/Materials/Node/Blocks/index.d.ts +2 -0
- package/Materials/Node/Blocks/index.js +2 -0
- package/Materials/Node/Blocks/index.js.map +1 -1
- package/Materials/Node/Blocks/matrixDeterminantBlock.d.ts +27 -0
- package/Materials/Node/Blocks/matrixDeterminantBlock.js +46 -0
- package/Materials/Node/Blocks/matrixDeterminantBlock.js.map +1 -0
- package/Materials/Node/Blocks/matrixTransposeBlock.d.ts +27 -0
- package/Materials/Node/Blocks/matrixTransposeBlock.js +46 -0
- package/Materials/Node/Blocks/matrixTransposeBlock.js.map +1 -0
- package/Materials/Textures/renderTargetTexture.d.ts +32 -28
- package/Materials/Textures/renderTargetTexture.js +13 -9
- package/Materials/Textures/renderTargetTexture.js.map +1 -1
- package/Materials/materialPluginManager.js +25 -4
- package/Materials/materialPluginManager.js.map +1 -1
- package/Maths/math.vector.d.ts +101 -9
- package/Maths/math.vector.js +101 -9
- package/Maths/math.vector.js.map +1 -1
- package/Meshes/linesMesh.d.ts +3 -1
- package/Meshes/linesMesh.js +8 -2
- package/Meshes/linesMesh.js.map +1 -1
- package/Meshes/subMesh.js +2 -2
- package/Meshes/subMesh.js.map +1 -1
- package/Misc/screenshotTools.d.ts +5 -2
- package/Misc/screenshotTools.js +7 -3
- package/Misc/screenshotTools.js.map +1 -1
- package/Particles/solidParticleSystem.d.ts +67 -63
- package/Particles/solidParticleSystem.js.map +1 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.d.ts +5 -0
- package/PostProcesses/volumetricLightScatteringPostProcess.js +9 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.js.map +1 -1
- package/Rendering/boundingBoxRenderer.js +2 -0
- package/Rendering/boundingBoxRenderer.js.map +1 -1
- package/Rendering/depthRendererSceneComponent.d.ts +2 -1
- package/Rendering/depthRendererSceneComponent.js +2 -2
- package/Rendering/depthRendererSceneComponent.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBlockFinalColorComposition.js +3 -3
- package/Shaders/ShadersInclude/pbrBlockFinalColorComposition.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import type { Nullable } from "../types";
|
|
1
|
+
import type { Nullable, IndicesArray } from "../types";
|
|
2
|
+
import { Vector3 } from "../Maths/math.vector";
|
|
3
|
+
import { Color4 } from "../Maths/math.color";
|
|
2
4
|
import { Mesh } from "../Meshes/mesh";
|
|
3
5
|
import type { Scene, IDisposable } from "../scene";
|
|
4
|
-
import { DepthSortedParticle, SolidParticle, SolidParticleVertex } from "./solidParticle";
|
|
6
|
+
import { DepthSortedParticle, SolidParticle, ModelShape, SolidParticleVertex } from "./solidParticle";
|
|
7
|
+
import type { TargetCamera } from "../Cameras/targetCamera";
|
|
8
|
+
import { BoundingInfo } from "../Culling/boundingInfo";
|
|
5
9
|
import type { Material } from "../Materials/material";
|
|
6
10
|
import { MultiMaterial } from "../Materials/multiMaterial";
|
|
7
11
|
import type { PickingInfo } from "../Collisions/pickingInfo";
|
|
@@ -94,55 +98,55 @@ export declare class SolidParticleSystem implements IDisposable {
|
|
|
94
98
|
* @internal
|
|
95
99
|
*/
|
|
96
100
|
_bSphereRadiusFactor: number;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
101
|
+
protected _scene: Scene;
|
|
102
|
+
protected _positions: number[];
|
|
103
|
+
protected _indices: number[];
|
|
104
|
+
protected _normals: number[];
|
|
105
|
+
protected _colors: number[];
|
|
106
|
+
protected _uvs: number[];
|
|
107
|
+
protected _indices32: IndicesArray;
|
|
108
|
+
protected _positions32: Float32Array;
|
|
109
|
+
protected _normals32: Float32Array;
|
|
110
|
+
protected _fixedNormal32: Float32Array;
|
|
111
|
+
protected _colors32: Float32Array;
|
|
112
|
+
protected _uvs32: Float32Array;
|
|
113
|
+
protected _index: number;
|
|
114
|
+
protected _updatable: boolean;
|
|
115
|
+
protected _pickable: boolean;
|
|
116
|
+
protected _isVisibilityBoxLocked: boolean;
|
|
117
|
+
protected _alwaysVisible: boolean;
|
|
118
|
+
protected _depthSort: boolean;
|
|
119
|
+
protected _expandable: boolean;
|
|
120
|
+
protected _shapeCounter: number;
|
|
121
|
+
protected _copy: SolidParticle;
|
|
122
|
+
protected _color: Color4;
|
|
123
|
+
protected _computeParticleColor: boolean;
|
|
124
|
+
protected _computeParticleTexture: boolean;
|
|
125
|
+
protected _computeParticleRotation: boolean;
|
|
126
|
+
protected _computeParticleVertex: boolean;
|
|
127
|
+
protected _computeBoundingBox: boolean;
|
|
128
|
+
protected _autoFixFaceOrientation: boolean;
|
|
129
|
+
protected _depthSortParticles: boolean;
|
|
130
|
+
protected _camera: TargetCamera;
|
|
131
|
+
protected _mustUnrotateFixedNormals: boolean;
|
|
132
|
+
protected _particlesIntersect: boolean;
|
|
133
|
+
protected _needs32Bits: boolean;
|
|
134
|
+
protected _isNotBuilt: boolean;
|
|
135
|
+
protected _lastParticleId: number;
|
|
136
|
+
protected _idxOfId: number[];
|
|
137
|
+
protected _multimaterialEnabled: boolean;
|
|
138
|
+
protected _useModelMaterial: boolean;
|
|
139
|
+
protected _indicesByMaterial: number[];
|
|
140
|
+
protected _materialIndexes: number[];
|
|
141
|
+
protected _depthSortFunction: (p1: DepthSortedParticle, p2: DepthSortedParticle) => number;
|
|
142
|
+
protected _materialSortFunction: (p1: DepthSortedParticle, p2: DepthSortedParticle) => number;
|
|
143
|
+
protected _materials: Material[];
|
|
144
|
+
protected _multimaterial: MultiMaterial;
|
|
145
|
+
protected _materialIndexesById: any;
|
|
146
|
+
protected _defaultMaterial: Material;
|
|
147
|
+
protected _autoUpdateSubMeshes: boolean;
|
|
148
|
+
protected _tmpVertex: SolidParticleVertex;
|
|
149
|
+
protected _recomputeInvisibles: boolean;
|
|
146
150
|
/**
|
|
147
151
|
* Creates a SPS (Solid Particle System) object.
|
|
148
152
|
* @param name (String) is the SPS name, this will be the underlying mesh name.
|
|
@@ -216,12 +220,12 @@ export declare class SolidParticleSystem implements IDisposable {
|
|
|
216
220
|
* Unrotate the fixed normals in case the mesh was built with pre-rotated particles, ex : use of positionFunction in addShape()
|
|
217
221
|
* @internal
|
|
218
222
|
*/
|
|
219
|
-
|
|
223
|
+
protected _unrotateFixedNormals(): void;
|
|
220
224
|
/**
|
|
221
225
|
* Resets the temporary working copy particle
|
|
222
226
|
* @internal
|
|
223
227
|
*/
|
|
224
|
-
|
|
228
|
+
protected _resetCopy(): void;
|
|
225
229
|
/**
|
|
226
230
|
* Inserts the shape model geometry in the global SPS mesh by updating the positions, indices, normals, colors, uvs arrays
|
|
227
231
|
* @param p the current index in the positions array to be updated
|
|
@@ -243,21 +247,21 @@ export declare class SolidParticleSystem implements IDisposable {
|
|
|
243
247
|
* @model the particle model
|
|
244
248
|
* @internal
|
|
245
249
|
*/
|
|
246
|
-
|
|
250
|
+
protected _meshBuilder(p: number, ind: number, shape: Vector3[], positions: number[], meshInd: IndicesArray, indices: number[], meshUV: number[] | Float32Array, uvs: number[], meshCol: number[] | Float32Array, colors: number[], meshNor: number[] | Float32Array, normals: number[], idx: number, idxInShape: number, options: any, model: ModelShape): SolidParticle;
|
|
247
251
|
/**
|
|
248
252
|
* Returns a shape Vector3 array from positions float array
|
|
249
253
|
* @param positions float array
|
|
250
254
|
* @returns a vector3 array
|
|
251
255
|
* @internal
|
|
252
256
|
*/
|
|
253
|
-
|
|
257
|
+
protected _posToShape(positions: number[] | Float32Array): Vector3[];
|
|
254
258
|
/**
|
|
255
259
|
* Returns a shapeUV array from a float uvs (array deep copy)
|
|
256
260
|
* @param uvs as a float array
|
|
257
261
|
* @returns a shapeUV array
|
|
258
262
|
* @internal
|
|
259
263
|
*/
|
|
260
|
-
|
|
264
|
+
protected _uvsToShapeUV(uvs: number[] | Float32Array): number[];
|
|
261
265
|
/**
|
|
262
266
|
* Adds a new particle object in the particles array
|
|
263
267
|
* @param idx particle index in particles array
|
|
@@ -271,7 +275,7 @@ export declare class SolidParticleSystem implements IDisposable {
|
|
|
271
275
|
* @param storage target storage array, if any
|
|
272
276
|
* @internal
|
|
273
277
|
*/
|
|
274
|
-
|
|
278
|
+
protected _addParticle(idx: number, id: number, idxpos: number, idxind: number, model: ModelShape, shapeId: number, idxInShape: number, bInfo?: Nullable<BoundingInfo>, storage?: Nullable<[]>): SolidParticle;
|
|
275
279
|
/**
|
|
276
280
|
* Adds some particles to the SPS from the model shape. Returns the shape id.
|
|
277
281
|
* Please read the doc : https://doc.babylonjs.com/features/featuresDeepDive/particles/solid_particle_system/immutable_sps
|
|
@@ -294,7 +298,7 @@ export declare class SolidParticleSystem implements IDisposable {
|
|
|
294
298
|
* Rebuilds a particle back to its just built status : if needed, recomputes the custom positions and vertices
|
|
295
299
|
* @internal
|
|
296
300
|
*/
|
|
297
|
-
|
|
301
|
+
protected _rebuildParticle(particle: SolidParticle, reset?: boolean): void;
|
|
298
302
|
/**
|
|
299
303
|
* Rebuilds the whole mesh and updates the VBO : custom positions and vertices are recomputed if needed.
|
|
300
304
|
* @param reset boolean, default false : if the particles must be reset at position and rotation zero, scaling 1, color white, initial UVs and not parented.
|
|
@@ -336,7 +340,7 @@ export declare class SolidParticleSystem implements IDisposable {
|
|
|
336
340
|
* @options addShape() passed options
|
|
337
341
|
* @internal
|
|
338
342
|
*/
|
|
339
|
-
|
|
343
|
+
protected _insertNewParticle(idx: number, i: number, modelShape: ModelShape, shape: Vector3[], meshInd: IndicesArray, meshUV: number[] | Float32Array, meshCol: number[] | Float32Array, meshNor: number[] | Float32Array, bbInfo: Nullable<BoundingInfo>, storage: Nullable<[]>, options: any): Nullable<SolidParticle>;
|
|
340
344
|
/**
|
|
341
345
|
* Sets all the particles : this method actually really updates the mesh according to the particle positions, rotations, colors, textures, etc.
|
|
342
346
|
* This method calls `updateParticle()` for each particle of the SPS.
|
|
@@ -396,23 +400,23 @@ export declare class SolidParticleSystem implements IDisposable {
|
|
|
396
400
|
* @returns the SPS
|
|
397
401
|
* @internal
|
|
398
402
|
*/
|
|
399
|
-
|
|
403
|
+
protected _sortParticlesByMaterial(): SolidParticleSystem;
|
|
400
404
|
/**
|
|
401
405
|
* Sets the material indexes by id materialIndexesById[id] = materialIndex
|
|
402
406
|
* @internal
|
|
403
407
|
*/
|
|
404
|
-
|
|
408
|
+
protected _setMaterialIndexesById(): void;
|
|
405
409
|
/**
|
|
406
410
|
* Returns an array with unique values of Materials from the passed array
|
|
407
411
|
* @param array the material array to be checked and filtered
|
|
408
412
|
* @internal
|
|
409
413
|
*/
|
|
410
|
-
|
|
414
|
+
protected _filterUniqueMaterialId(array: Material[]): Material[];
|
|
411
415
|
/**
|
|
412
416
|
* Sets a new Standard Material as _defaultMaterial if not already set.
|
|
413
417
|
* @internal
|
|
414
418
|
*/
|
|
415
|
-
|
|
419
|
+
protected _setDefaultMaterial(): Material;
|
|
416
420
|
/**
|
|
417
421
|
* Visibility helper : Recomputes the visible size according to the mesh bounding box
|
|
418
422
|
* doc : https://doc.babylonjs.com/features/featuresDeepDive/particles/solid_particle_system/sps_visibility
|