@babylonjs/core 7.8.2 → 7.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Behaviors/Cameras/framingBehavior.d.ts +1 -1
- package/Behaviors/Cameras/framingBehavior.js +1 -1
- package/Behaviors/Cameras/framingBehavior.js.map +1 -1
- package/Behaviors/Meshes/baseSixDofDragBehavior.d.ts +5 -5
- package/Behaviors/Meshes/baseSixDofDragBehavior.js +4 -4
- package/Behaviors/Meshes/baseSixDofDragBehavior.js.map +1 -1
- package/Cameras/touchCamera.js +4 -2
- package/Cameras/touchCamera.js.map +1 -1
- package/Collisions/gpuPicker.d.ts +38 -0
- package/Collisions/gpuPicker.js +256 -0
- package/Collisions/gpuPicker.js.map +1 -0
- package/Collisions/index.d.ts +1 -0
- package/Collisions/index.js +1 -0
- package/Collisions/index.js.map +1 -1
- package/Debug/physicsViewer.d.ts +4 -2
- package/Debug/physicsViewer.js +16 -4
- package/Debug/physicsViewer.js.map +1 -1
- package/Engines/Extensions/engine.views.d.ts +1 -0
- package/Engines/Extensions/engine.views.js +3 -0
- package/Engines/Extensions/engine.views.js.map +1 -0
- package/Engines/abstractEngine.js +3 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/Engines/thinEngine.js +8 -7
- package/Engines/thinEngine.js.map +1 -1
- package/Gizmos/boundingBoxGizmo.d.ts +6 -5
- package/Gizmos/boundingBoxGizmo.js +5 -5
- package/Gizmos/boundingBoxGizmo.js.map +1 -1
- package/Gizmos/lightGizmo.js +1 -2
- package/Gizmos/lightGizmo.js.map +1 -1
- package/Helpers/environmentHelper.js +2 -0
- package/Helpers/environmentHelper.js.map +1 -1
- package/LensFlares/lensFlareSystem.js +2 -2
- package/LensFlares/lensFlareSystem.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +2 -2
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
- package/Materials/Node/nodeMaterial.d.ts +2 -2
- package/Materials/Node/nodeMaterial.js +6 -6
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/Textures/Procedurals/proceduralTexture.js +20 -8
- package/Materials/Textures/Procedurals/proceduralTexture.js.map +1 -1
- package/Materials/material.d.ts +1 -1
- package/Materials/material.js.map +1 -1
- package/Materials/pushMaterial.d.ts +1 -1
- package/Materials/pushMaterial.js.map +1 -1
- package/Materials/shaderMaterial.d.ts +6 -1
- package/Materials/shaderMaterial.js +8 -1
- package/Materials/shaderMaterial.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +0 -2
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Meshes/Node/Blocks/mergeGeometryBlock.js +15 -11
- package/Meshes/Node/Blocks/mergeGeometryBlock.js.map +1 -1
- package/Meshes/abstractMesh.d.ts +6 -16
- package/Meshes/abstractMesh.js +5 -21
- package/Meshes/abstractMesh.js.map +1 -1
- package/Meshes/mesh.vertexData.js +19 -1
- package/Meshes/mesh.vertexData.js.map +1 -1
- package/Meshes/trailMesh.d.ts +40 -1
- package/Meshes/trailMesh.js +50 -21
- package/Meshes/trailMesh.js.map +1 -1
- package/Meshes/transformNode.d.ts +14 -0
- package/Meshes/transformNode.js +20 -0
- package/Meshes/transformNode.js.map +1 -1
- package/Misc/dumpTools.js +3 -2
- package/Misc/dumpTools.js.map +1 -1
- package/Particles/EmitterTypes/coneParticleEmitter.d.ts +60 -0
- package/Particles/EmitterTypes/coneParticleEmitter.js +88 -0
- package/Particles/EmitterTypes/coneParticleEmitter.js.map +1 -1
- package/Particles/IParticleSystem.d.ts +4 -2
- package/Particles/IParticleSystem.js.map +1 -1
- package/Particles/baseParticleSystem.d.ts +2 -1
- package/Particles/baseParticleSystem.js +3 -0
- package/Particles/baseParticleSystem.js.map +1 -1
- package/Particles/gpuParticleSystem.d.ts +4 -2
- package/Particles/gpuParticleSystem.js +9 -3
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/particleSystem.d.ts +2 -1
- package/Particles/particleSystem.functions.d.ts +2 -1
- package/Particles/particleSystem.functions.js +4 -1
- package/Particles/particleSystem.functions.js.map +1 -1
- package/Particles/particleSystem.js +10 -2
- package/Particles/particleSystem.js.map +1 -1
- package/Particles/thinParticleSystem.d.ts +2 -1
- package/Particles/thinParticleSystem.js +3 -2
- package/Particles/thinParticleSystem.js.map +1 -1
- package/Physics/v2/IPhysicsEnginePlugin.d.ts +3 -0
- package/Physics/v2/IPhysicsEnginePlugin.js.map +1 -1
- package/Physics/v2/Plugins/havokPlugin.d.ts +14 -0
- package/Physics/v2/Plugins/havokPlugin.js +42 -18
- package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
- package/Physics/v2/physicsEngine.d.ts +14 -0
- package/Physics/v2/physicsEngine.js +20 -0
- package/Physics/v2/physicsEngine.js.map +1 -1
- package/Rendering/edgesRenderer.js +2 -1
- package/Rendering/edgesRenderer.js.map +1 -1
- package/Shaders/ShadersInclude/lineUboDeclaration.d.ts +7 -0
- package/Shaders/ShadersInclude/lineUboDeclaration.js +14 -0
- package/Shaders/ShadersInclude/lineUboDeclaration.js.map +1 -0
- package/Shaders/ShadersInclude/lineVertexDeclaration.d.ts +5 -0
- package/Shaders/ShadersInclude/lineVertexDeclaration.js +11 -0
- package/Shaders/ShadersInclude/lineVertexDeclaration.js.map +1 -0
- package/Shaders/gpuUpdateParticles.vertex.js +12 -2
- package/Shaders/gpuUpdateParticles.vertex.js.map +1 -1
- package/Shaders/line.vertex.d.ts +2 -0
- package/Shaders/line.vertex.js +5 -2
- package/Shaders/line.vertex.js.map +1 -1
- package/ShadersWGSL/gpuUpdateParticles.compute.js +11 -1
- package/ShadersWGSL/gpuUpdateParticles.compute.js.map +1 -1
- package/XR/features/WebXRControllerMovement.d.ts +14 -1
- package/XR/features/WebXRControllerMovement.js +21 -3
- package/XR/features/WebXRControllerMovement.js.map +1 -1
- package/XR/webXRInputSource.d.ts +1 -1
- package/XR/webXRInputSource.js +3 -3
- package/XR/webXRInputSource.js.map +1 -1
- package/package.json +1 -1
|
@@ -977,7 +977,25 @@ export class VertexData {
|
|
|
977
977
|
result.uvs6 = meshOrGeometry.getVerticesData(VertexBuffer.UV6Kind, copyWhenShared, forceCopy);
|
|
978
978
|
}
|
|
979
979
|
if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.ColorKind)) {
|
|
980
|
-
|
|
980
|
+
const geometry = meshOrGeometry.geometry || meshOrGeometry;
|
|
981
|
+
const vertexBuffer = geometry.getVertexBuffer(VertexBuffer.ColorKind);
|
|
982
|
+
const colors = geometry.getVerticesData(VertexBuffer.ColorKind, copyWhenShared, forceCopy);
|
|
983
|
+
if (vertexBuffer.getSize() === 3) {
|
|
984
|
+
const newColors = new Float32Array((colors.length * 4) / 3);
|
|
985
|
+
for (let i = 0, j = 0; i < colors.length; i += 3, j += 4) {
|
|
986
|
+
newColors[j] = colors[i];
|
|
987
|
+
newColors[j + 1] = colors[i + 1];
|
|
988
|
+
newColors[j + 2] = colors[i + 2];
|
|
989
|
+
newColors[j + 3] = 1;
|
|
990
|
+
}
|
|
991
|
+
result.colors = newColors;
|
|
992
|
+
}
|
|
993
|
+
else if (vertexBuffer.getSize() === 4) {
|
|
994
|
+
result.colors = colors;
|
|
995
|
+
}
|
|
996
|
+
else {
|
|
997
|
+
throw new Error(`Unexpected number of color components: ${vertexBuffer.getSize()}`);
|
|
998
|
+
}
|
|
981
999
|
}
|
|
982
1000
|
if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.MatricesIndicesKind)) {
|
|
983
1001
|
result.matricesIndices = meshOrGeometry.getVerticesData(VertexBuffer.MatricesIndicesKind, copyWhenShared, forceCopy);
|