@babylonjs/core 7.13.0 → 7.13.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.
Files changed (87) hide show
  1. package/Animations/animationGroupMask.d.ts +1 -1
  2. package/Animations/animationKey.d.ts +1 -1
  3. package/Behaviors/Meshes/handConstraintBehavior.d.ts +3 -3
  4. package/Buffers/bufferUtils.d.ts +13 -0
  5. package/Buffers/bufferUtils.js +42 -0
  6. package/Buffers/bufferUtils.js.map +1 -0
  7. package/Buffers/index.d.ts +1 -0
  8. package/Buffers/index.js +1 -0
  9. package/Buffers/index.js.map +1 -1
  10. package/Cameras/Inputs/flyCameraMouseInput.d.ts +0 -1
  11. package/Cameras/Inputs/flyCameraMouseInput.js +0 -1
  12. package/Cameras/Inputs/flyCameraMouseInput.js.map +1 -1
  13. package/Collisions/gpuPicker.d.ts +1 -0
  14. package/Collisions/gpuPicker.js +1 -0
  15. package/Collisions/gpuPicker.js.map +1 -1
  16. package/Debug/debugLayer.d.ts +1 -1
  17. package/Decorators/nodeDecorator.d.ts +1 -1
  18. package/DeviceInput/InputDevices/deviceEnums.d.ts +5 -5
  19. package/Engines/Extensions/engine.computeShader.d.ts +1 -1
  20. package/Engines/WebGPU/webgpuConstants.d.ts +39 -39
  21. package/Engines/abstractEngine.js +2 -2
  22. package/Engines/abstractEngine.js.map +1 -1
  23. package/Events/deviceInputEvents.d.ts +1 -1
  24. package/FlowGraph/flowGraph.d.ts +1 -1
  25. package/FlowGraph/flowGraphConnection.d.ts +1 -1
  26. package/Gamepads/dualShockGamepad.d.ts +2 -2
  27. package/Gamepads/xboxGamepad.d.ts +2 -2
  28. package/Gizmos/gizmo.d.ts +2 -2
  29. package/Loading/sceneLoader.d.ts +1 -1
  30. package/Materials/GreasedLine/greasedLineMaterialInterfaces.d.ts +3 -3
  31. package/Materials/Node/Blocks/meshAttributeExistsBlock.d.ts +1 -1
  32. package/Materials/Node/Blocks/waveBlock.d.ts +1 -1
  33. package/Materials/Node/Enums/nodeMaterialBlockConnectionPointMode.d.ts +1 -1
  34. package/Materials/Node/nodeMaterialBlockConnectionPoint.d.ts +2 -2
  35. package/Materials/Textures/internalTexture.d.ts +1 -1
  36. package/Materials/Textures/ktx2decoderTypes.d.ts +1 -1
  37. package/Materials/materialPluginEvent.d.ts +1 -1
  38. package/Materials/meshDebugPluginMaterial.d.ts +1 -1
  39. package/Materials/shaderLanguage.d.ts +1 -1
  40. package/Maths/math.axis.d.ts +2 -2
  41. package/Maths/math.path.d.ts +1 -1
  42. package/Maths/math.vector.js +32 -6
  43. package/Maths/math.vector.js.map +1 -1
  44. package/Meshes/Builders/greasedLineBuilder.d.ts +2 -2
  45. package/Meshes/GreasedLine/greasedLineBaseMesh.d.ts +3 -3
  46. package/Meshes/Node/nodeGeometryBlockConnectionPoint.d.ts +2 -2
  47. package/Meshes/abstractMesh.d.ts +49 -17
  48. package/Meshes/abstractMesh.js +126 -130
  49. package/Meshes/abstractMesh.js.map +1 -1
  50. package/Meshes/csg.js +12 -0
  51. package/Meshes/csg.js.map +1 -1
  52. package/Meshes/geometry.d.ts +8 -0
  53. package/Meshes/geometry.js +17 -0
  54. package/Meshes/geometry.js.map +1 -1
  55. package/Meshes/instancedMesh.d.ts +5 -8
  56. package/Meshes/instancedMesh.js +15 -9
  57. package/Meshes/instancedMesh.js.map +1 -1
  58. package/Meshes/mesh.d.ts +7 -3
  59. package/Meshes/mesh.js +20 -11
  60. package/Meshes/mesh.js.map +1 -1
  61. package/Meshes/meshSimplification.d.ts +1 -1
  62. package/Misc/assetsManager.d.ts +1 -1
  63. package/Misc/asyncLock.d.ts +24 -0
  64. package/Misc/asyncLock.js +32 -0
  65. package/Misc/asyncLock.js.map +1 -0
  66. package/Misc/copyTextureToTexture.d.ts +1 -1
  67. package/Misc/iInspectable.d.ts +1 -1
  68. package/Misc/index.d.ts +1 -0
  69. package/Misc/index.js +1 -0
  70. package/Misc/index.js.map +1 -1
  71. package/Misc/timer.d.ts +1 -1
  72. package/Misc/virtualJoystick.d.ts +1 -1
  73. package/Particles/gpuParticleSystem.js +1 -0
  74. package/Particles/gpuParticleSystem.js.map +1 -1
  75. package/Particles/pointsCloudSystem.d.ts +1 -1
  76. package/Particles/subEmitter.d.ts +1 -1
  77. package/Physics/physicsHelper.d.ts +2 -2
  78. package/Physics/v2/IPhysicsEnginePlugin.d.ts +8 -8
  79. package/Physics/v2/physicsMaterial.d.ts +1 -1
  80. package/PostProcesses/depthOfFieldEffect.d.ts +1 -1
  81. package/PostProcesses/tonemapPostProcess.d.ts +1 -1
  82. package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.d.ts +1 -1
  83. package/XR/features/WebXRHandTracking.d.ts +2 -2
  84. package/XR/features/WebXRNearInteraction.d.ts +1 -1
  85. package/XR/webXRTypes.d.ts +2 -2
  86. package/package.json +1 -1
  87. package/scene.d.ts +1 -1
@@ -2,7 +2,7 @@ import type { PointerInput } from "../DeviceInput/InputDevices/deviceEnums";
2
2
  /**
3
3
  * Event Types
4
4
  */
5
- export declare const enum DeviceInputEventType {
5
+ export declare enum DeviceInputEventType {
6
6
  /** PointerMove */
7
7
  PointerMove = 0,
8
8
  /** PointerDown */
@@ -7,7 +7,7 @@ import type { FlowGraphSignalConnection } from "./flowGraphSignalConnection";
7
7
  import type { FlowGraphDataConnection } from "./flowGraphDataConnection";
8
8
  import type { ISerializedFlowGraph, IObjectAccessor } from "./typeDefinitions";
9
9
  import type { IPathToObjectConverter } from "../ObjectModel/objectModelInterfaces";
10
- export declare const enum FlowGraphState {
10
+ export declare enum FlowGraphState {
11
11
  /**
12
12
  * The graph is stopped
13
13
  */
@@ -3,7 +3,7 @@ import type { FlowGraphBlock } from "./flowGraphBlock";
3
3
  * @experimental
4
4
  * The type of a connection point - inpput or output.
5
5
  */
6
- export declare const enum FlowGraphConnectionType {
6
+ export declare enum FlowGraphConnectionType {
7
7
  Input = 0,
8
8
  Output = 1
9
9
  }
@@ -3,7 +3,7 @@ import { Gamepad } from "./gamepad";
3
3
  /**
4
4
  * Defines supported buttons for DualShock compatible gamepads
5
5
  */
6
- export declare const enum DualShockButton {
6
+ export declare enum DualShockButton {
7
7
  /** Cross */
8
8
  Cross = 0,
9
9
  /** Circle */
@@ -26,7 +26,7 @@ export declare const enum DualShockButton {
26
26
  RightStick = 11
27
27
  }
28
28
  /** Defines values for DualShock DPad */
29
- export declare const enum DualShockDpad {
29
+ export declare enum DualShockDpad {
30
30
  /** Up */
31
31
  Up = 12,
32
32
  /** Down */
@@ -3,7 +3,7 @@ import { Gamepad } from "../Gamepads/gamepad";
3
3
  /**
4
4
  * Defines supported buttons for XBox360 compatible gamepads
5
5
  */
6
- export declare const enum Xbox360Button {
6
+ export declare enum Xbox360Button {
7
7
  /** A */
8
8
  A = 0,
9
9
  /** B */
@@ -26,7 +26,7 @@ export declare const enum Xbox360Button {
26
26
  RightStick = 11
27
27
  }
28
28
  /** Defines values for XBox360 DPad */
29
- export declare const enum Xbox360Dpad {
29
+ export declare enum Xbox360Dpad {
30
30
  /** Up */
31
31
  Up = 12,
32
32
  /** Down */
package/Gizmos/gizmo.d.ts CHANGED
@@ -32,7 +32,7 @@ export interface GizmoAxisCache {
32
32
  /**
33
33
  * Anchor options where the Gizmo can be positioned in relation to its anchored node
34
34
  */
35
- export declare const enum GizmoAnchorPoint {
35
+ export declare enum GizmoAnchorPoint {
36
36
  /** The origin of the attached node */
37
37
  Origin = 0,
38
38
  /** The pivot point of the attached node*/
@@ -41,7 +41,7 @@ export declare const enum GizmoAnchorPoint {
41
41
  /**
42
42
  * Coordinates mode: Local or World. Defines how axis is aligned: either on world axis or transform local axis
43
43
  */
44
- export declare const enum GizmoCoordinatesMode {
44
+ export declare enum GizmoCoordinatesMode {
45
45
  World = 0,
46
46
  Local = 1
47
47
  }
@@ -224,7 +224,7 @@ export interface ISceneLoaderPluginAsync extends ISceneLoaderPluginBase {
224
224
  /**
225
225
  * Mode that determines how to handle old animation groups before loading new ones.
226
226
  */
227
- export declare const enum SceneLoaderAnimationGroupLoadingMode {
227
+ export declare enum SceneLoaderAnimationGroupLoadingMode {
228
228
  /**
229
229
  * Reset all old animations to initial state then dispose them.
230
230
  */
@@ -98,7 +98,7 @@ export interface IGreasedLineMaterial {
98
98
  * Material types for GreasedLine
99
99
  * {@link https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param/greased_line#materialtype}
100
100
  */
101
- export declare const enum GreasedLineMeshMaterialType {
101
+ export declare enum GreasedLineMeshMaterialType {
102
102
  /**
103
103
  * StandardMaterial
104
104
  */
@@ -116,7 +116,7 @@ export declare const enum GreasedLineMeshMaterialType {
116
116
  * Color blending mode of the @see GreasedLineMaterial and the base material
117
117
  * {@link https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param/greased_line#colormode}
118
118
  */
119
- export declare const enum GreasedLineMeshColorMode {
119
+ export declare enum GreasedLineMeshColorMode {
120
120
  /**
121
121
  * Color blending mode SET
122
122
  */
@@ -135,7 +135,7 @@ export declare const enum GreasedLineMeshColorMode {
135
135
  * {@link https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param/greased_line#colordistributiontype}
136
136
  *
137
137
  */
138
- export declare const enum GreasedLineMeshColorDistributionType {
138
+ export declare enum GreasedLineMeshColorDistributionType {
139
139
  /**
140
140
  * Colors distributed between segments of the line
141
141
  */
@@ -2,7 +2,7 @@ import { NodeMaterialBlock } from "../nodeMaterialBlock";
2
2
  import type { NodeMaterialBuildState } from "../nodeMaterialBuildState";
3
3
  import type { NodeMaterialConnectionPoint } from "../nodeMaterialBlockConnectionPoint";
4
4
  import type { Scene } from "../../../scene.js";
5
- export declare const enum MeshAttributeExistsBlockTypes {
5
+ export declare enum MeshAttributeExistsBlockTypes {
6
6
  None = 0,
7
7
  Normal = 1,
8
8
  Tangent = 2,
@@ -5,7 +5,7 @@ import type { Scene } from "../../../scene";
5
5
  /**
6
6
  * Operations supported by the Wave block
7
7
  */
8
- export declare const enum WaveBlockKind {
8
+ export declare enum WaveBlockKind {
9
9
  /** SawTooth */
10
10
  SawTooth = 0,
11
11
  /** Square */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Enum defining the mode of a NodeMaterialBlockConnectionPoint
3
3
  */
4
- export declare const enum NodeMaterialBlockConnectionPointMode {
4
+ export declare enum NodeMaterialBlockConnectionPointMode {
5
5
  /** Value is an uniform */
6
6
  Uniform = 0,
7
7
  /** Value is a mesh attribute */
@@ -7,7 +7,7 @@ import type { NodeMaterialBlock } from "./nodeMaterialBlock";
7
7
  /**
8
8
  * Enum used to define the compatibility state between two connection points
9
9
  */
10
- export declare const enum NodeMaterialConnectionPointCompatibilityStates {
10
+ export declare enum NodeMaterialConnectionPointCompatibilityStates {
11
11
  /** Points are compatibles */
12
12
  Compatible = 0,
13
13
  /** Points are incompatible because of their types */
@@ -20,7 +20,7 @@ export declare const enum NodeMaterialConnectionPointCompatibilityStates {
20
20
  /**
21
21
  * Defines the direction of a connection point
22
22
  */
23
- export declare const enum NodeMaterialConnectionPointDirection {
23
+ export declare enum NodeMaterialConnectionPointDirection {
24
24
  /** Input */
25
25
  Input = 0,
26
26
  /** Output */
@@ -9,7 +9,7 @@ import type { SphericalPolynomial } from "../../Maths/sphericalPolynomial";
9
9
  /**
10
10
  * Defines the source of the internal texture
11
11
  */
12
- export declare const enum InternalTextureSource {
12
+ export declare enum InternalTextureSource {
13
13
  /**
14
14
  * The source of the texture data is unknown
15
15
  */
@@ -15,7 +15,7 @@ export declare enum TranscodeTarget {
15
15
  R8 = 9,
16
16
  RG8 = 10
17
17
  }
18
- export declare const enum EngineFormat {
18
+ export declare enum EngineFormat {
19
19
  COMPRESSED_RGBA_BPTC_UNORM_EXT = 36492,
20
20
  COMPRESSED_RGBA_ASTC_4X4_KHR = 37808,
21
21
  COMPRESSED_RGB_S3TC_DXT1_EXT = 33776,
@@ -83,7 +83,7 @@ export type MaterialPluginHardBindForSubMesh = {
83
83
  /**
84
84
  * @internal
85
85
  */
86
- export declare const enum MaterialPluginEvent {
86
+ export declare enum MaterialPluginEvent {
87
87
  Created = 1,
88
88
  Disposed = 2,
89
89
  GetDefineNames = 4,
@@ -11,7 +11,7 @@ import type { AbstractMesh } from "../Meshes/abstractMesh.js";
11
11
  /**
12
12
  * Supported visualizations of MeshDebugPluginMaterial
13
13
  */
14
- export declare const enum MeshDebugMode {
14
+ export declare enum MeshDebugMode {
15
15
  /**
16
16
  * Material without any mesh debug visualization
17
17
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Language of the shader code
3
3
  */
4
- export declare const enum ShaderLanguage {
4
+ export declare enum ShaderLanguage {
5
5
  /** language is GLSL (used by WebGL) */
6
6
  GLSL = 0,
7
7
  /** language is WGSL (used by WebGPU) */
@@ -1,6 +1,6 @@
1
1
  import { Vector3 } from "./math.vector";
2
2
  /** Defines supported spaces */
3
- export declare const enum Space {
3
+ export declare enum Space {
4
4
  /** Local (object) space */
5
5
  LOCAL = 0,
6
6
  /** World space */
@@ -20,7 +20,7 @@ export declare class Axis {
20
20
  /**
21
21
  * Defines cartesian components.
22
22
  */
23
- export declare const enum Coordinate {
23
+ export declare enum Coordinate {
24
24
  /** X axis */
25
25
  X = 0,
26
26
  /** Y axis */
@@ -4,7 +4,7 @@ import type { Vector4 } from "./math.vector";
4
4
  /**
5
5
  * Defines potential orientation for back face culling
6
6
  */
7
- export declare const enum Orientation {
7
+ export declare enum Orientation {
8
8
  /**
9
9
  * Clockwise
10
10
  */
@@ -5376,9 +5376,22 @@ export class Matrix {
5376
5376
  addToSelf(other) {
5377
5377
  const m = this._m;
5378
5378
  const otherM = other.m;
5379
- for (let index = 0; index < 16; index++) {
5380
- m[index] += otherM[index];
5381
- }
5379
+ m[0] += otherM[0];
5380
+ m[1] += otherM[1];
5381
+ m[2] += otherM[2];
5382
+ m[3] += otherM[3];
5383
+ m[4] += otherM[4];
5384
+ m[5] += otherM[5];
5385
+ m[6] += otherM[6];
5386
+ m[7] += otherM[7];
5387
+ m[8] += otherM[8];
5388
+ m[9] += otherM[9];
5389
+ m[10] += otherM[10];
5390
+ m[11] += otherM[11];
5391
+ m[12] += otherM[12];
5392
+ m[13] += otherM[13];
5393
+ m[14] += otherM[14];
5394
+ m[15] += otherM[15];
5382
5395
  this.markAsUpdated();
5383
5396
  return this;
5384
5397
  }
@@ -6205,9 +6218,22 @@ export class Matrix {
6205
6218
  * @returns result input
6206
6219
  */
6207
6220
  static FromFloat32ArrayToRefScaled(array, offset, scale, result) {
6208
- for (let index = 0; index < 16; index++) {
6209
- result._m[index] = array[index + offset] * scale;
6210
- }
6221
+ result._m[0] = array[0 + offset] * scale;
6222
+ result._m[1] = array[1 + offset] * scale;
6223
+ result._m[2] = array[2 + offset] * scale;
6224
+ result._m[3] = array[3 + offset] * scale;
6225
+ result._m[4] = array[4 + offset] * scale;
6226
+ result._m[5] = array[5 + offset] * scale;
6227
+ result._m[6] = array[6 + offset] * scale;
6228
+ result._m[7] = array[7 + offset] * scale;
6229
+ result._m[8] = array[8 + offset] * scale;
6230
+ result._m[9] = array[9 + offset] * scale;
6231
+ result._m[10] = array[10 + offset] * scale;
6232
+ result._m[11] = array[11 + offset] * scale;
6233
+ result._m[12] = array[12 + offset] * scale;
6234
+ result._m[13] = array[13 + offset] * scale;
6235
+ result._m[14] = array[14 + offset] * scale;
6236
+ result._m[15] = array[15 + offset] * scale;
6211
6237
  result.markAsUpdated();
6212
6238
  return result;
6213
6239
  }