@babylonjs/core 8.53.0 → 8.54.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/Animations/animatorAvatar.d.ts +5 -2
- package/Animations/animatorAvatar.js +40 -27
- package/Animations/animatorAvatar.js.map +1 -1
- package/Cameras/Inputs/geospatialCameraMouseWheelInput.d.ts +1 -2
- package/Cameras/Inputs/geospatialCameraMouseWheelInput.js +1 -2
- package/Cameras/Inputs/geospatialCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/geospatialCameraPointersInput.d.ts +0 -4
- package/Cameras/Inputs/geospatialCameraPointersInput.js +1 -5
- package/Cameras/Inputs/geospatialCameraPointersInput.js.map +1 -1
- package/Cameras/cameraMovement.d.ts +1 -4
- package/Cameras/cameraMovement.js +1 -4
- package/Cameras/cameraMovement.js.map +1 -1
- package/Cameras/geospatialCamera.d.ts +22 -4
- package/Cameras/geospatialCamera.js +27 -9
- package/Cameras/geospatialCamera.js.map +1 -1
- package/Cameras/geospatialCameraMovement.d.ts +3 -3
- package/Cameras/geospatialCameraMovement.js +18 -18
- package/Cameras/geospatialCameraMovement.js.map +1 -1
- package/Engines/AbstractEngine/abstractEngine.renderPass.js +1 -0
- package/Engines/AbstractEngine/abstractEngine.renderPass.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.debugging.js +35 -13
- package/Engines/WebGPU/Extensions/engine.debugging.js.map +1 -1
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/Engines/engineFeatures.d.ts +0 -2
- package/Engines/engineFeatures.js.map +1 -1
- package/Engines/nullEngine.js +0 -1
- package/Engines/nullEngine.js.map +1 -1
- package/Engines/thinEngine.js +0 -1
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/thinNativeEngine.js +0 -1
- package/Engines/thinNativeEngine.js.map +1 -1
- package/Engines/thinWebGPUEngine.d.ts +9 -4
- package/Engines/thinWebGPUEngine.js +32 -32
- package/Engines/thinWebGPUEngine.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +1 -0
- package/Engines/webgpuEngine.js +24 -165
- package/Engines/webgpuEngine.js.map +1 -1
- package/FrameGraph/Passes/renderPass.js +0 -3
- package/FrameGraph/Passes/renderPass.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/objectRendererTask.d.ts +2 -3
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js +5 -29
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
- package/FrameGraph/frameGraph.js +3 -0
- package/FrameGraph/frameGraph.js.map +1 -1
- package/FrameGraph/frameGraphContext.js +1 -1
- package/FrameGraph/frameGraphContext.js.map +1 -1
- package/FrameGraph/frameGraphTask.d.ts +0 -2
- package/FrameGraph/frameGraphTask.js +15 -17
- package/FrameGraph/frameGraphTask.js.map +1 -1
- package/FrameGraph/frameGraphTextureManager.js +1 -1
- package/FrameGraph/frameGraphTextureManager.js.map +1 -1
- package/Gizmos/axisScaleGizmo.js +2 -2
- package/Gizmos/axisScaleGizmo.js.map +1 -1
- package/Gizmos/cameraGizmo.d.ts +1 -1
- package/Gizmos/cameraGizmo.js +1 -1
- package/Gizmos/cameraGizmo.js.map +1 -1
- package/Gizmos/gizmo.d.ts +4 -4
- package/Gizmos/gizmo.js +5 -5
- package/Gizmos/gizmo.js.map +1 -1
- package/Gizmos/gizmoManager.d.ts +2 -2
- package/Gizmos/gizmoManager.js +1 -1
- package/Gizmos/gizmoManager.js.map +1 -1
- package/Gizmos/planeRotationGizmo.d.ts +2 -2
- package/Gizmos/planeRotationGizmo.js +2 -3
- package/Gizmos/planeRotationGizmo.js.map +1 -1
- package/Gizmos/positionGizmo.d.ts +1 -1
- package/Gizmos/positionGizmo.js +2 -2
- package/Gizmos/positionGizmo.js.map +1 -1
- package/Gizmos/rotationGizmo.d.ts +1 -1
- package/Gizmos/rotationGizmo.js +3 -3
- package/Gizmos/rotationGizmo.js.map +1 -1
- package/Gizmos/scaleGizmo.d.ts +1 -1
- package/Gizmos/scaleGizmo.js +1 -1
- package/Gizmos/scaleGizmo.js.map +1 -1
- package/Loading/Plugins/babylonFileLoader.js +44 -14
- package/Loading/Plugins/babylonFileLoader.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.d.ts +12 -3
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.js +33 -8
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.js.map +1 -1
- package/Materials/uniformBuffer.d.ts +0 -4
- package/Materials/uniformBuffer.js +0 -8
- package/Materials/uniformBuffer.js.map +1 -1
- package/Materials/vertexPullingHelper.functions.d.ts +4 -0
- package/Materials/vertexPullingHelper.functions.js +4 -2
- package/Materials/vertexPullingHelper.functions.js.map +1 -1
- package/Maths/index.d.ts +2 -0
- package/Maths/index.js +2 -0
- package/Maths/index.js.map +1 -1
- package/Maths/math.geospatial.d.ts +12 -0
- package/Maths/math.geospatial.functions.d.ts +19 -0
- package/Maths/math.geospatial.functions.js +27 -0
- package/Maths/math.geospatial.functions.js.map +1 -0
- package/Maths/math.geospatial.js +2 -0
- package/Maths/math.geospatial.js.map +1 -0
- package/Meshes/abstractMesh.d.ts +4 -0
- package/Meshes/abstractMesh.js +4 -0
- package/Meshes/abstractMesh.js.map +1 -1
- package/Meshes/mesh.d.ts +2 -0
- package/Meshes/mesh.js +20 -3
- package/Meshes/mesh.js.map +1 -1
- package/Navigation/INavigationEngine.d.ts +2 -2
- package/Navigation/INavigationEngine.js.map +1 -1
- package/Navigation/Plugins/recastJSPlugin.d.ts +2 -2
- package/Navigation/Plugins/recastJSPlugin.js +14 -5
- package/Navigation/Plugins/recastJSPlugin.js.map +1 -1
- package/Physics/castingResult.d.ts +4 -1
- package/Physics/castingResult.js +1 -1
- package/Physics/castingResult.js.map +1 -1
- package/Physics/joinedPhysicsEngineComponent.js +1 -1
- package/Physics/joinedPhysicsEngineComponent.js.map +1 -1
- package/Physics/physicsHelper.d.ts +8 -8
- package/Physics/physicsHelper.js +7 -7
- package/Physics/physicsHelper.js.map +1 -1
- package/Physics/shapeCastResult.d.ts +4 -0
- package/Physics/shapeCastResult.js +7 -0
- package/Physics/shapeCastResult.js.map +1 -1
- package/Physics/v2/IPhysicsEnginePlugin.d.ts +51 -4
- package/Physics/v2/IPhysicsEnginePlugin.js +12 -12
- package/Physics/v2/IPhysicsEnginePlugin.js.map +1 -1
- package/Physics/v2/characterController.js.map +1 -1
- package/Physics/v2/physicsBody.js.map +1 -1
- package/Physics/v2/physicsConstraint.d.ts +1 -1
- package/Physics/v2/physicsConstraint.js +1 -1
- package/Physics/v2/physicsConstraint.js.map +1 -1
- package/Physics/v2/physicsEngine.d.ts +0 -5
- package/Physics/v2/physicsEngine.js +0 -5
- package/Physics/v2/physicsEngine.js.map +1 -1
- package/Physics/v2/physicsEngineComponent.d.ts +1 -1
- package/Physics/v2/physicsEngineComponent.js.map +1 -1
- package/Physics/v2/physicsMaterial.d.ts +6 -0
- package/Physics/v2/physicsMaterial.js +2 -2
- package/Physics/v2/physicsMaterial.js.map +1 -1
- package/Physics/v2/ragdoll.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js +4 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js.map +1 -1
- package/Rendering/edgesRenderer.js +1 -0
- package/Rendering/edgesRenderer.js.map +1 -1
- package/Rendering/objectRenderer.js +8 -4
- package/Rendering/objectRenderer.js.map +1 -1
- package/Rendering/renderingGroup.d.ts +1 -1
- package/Rendering/renderingGroup.js +1 -1
- package/Rendering/renderingGroup.js.map +1 -1
- package/Rendering/renderingManager.d.ts +1 -1
- package/Rendering/renderingManager.js.map +1 -1
- package/Shaders/ShadersInclude/screenSpaceRayTrace.js +18 -8
- package/Shaders/ShadersInclude/screenSpaceRayTrace.js.map +1 -1
- package/Shaders/iblVoxelGrid.fragment.js +4 -1
- package/Shaders/iblVoxelGrid.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/screenSpaceRayTrace.js +18 -7
- package/ShadersWGSL/ShadersInclude/screenSpaceRayTrace.js.map +1 -1
- package/ShadersWGSL/background.vertex.js +8 -8
- package/ShadersWGSL/background.vertex.js.map +1 -1
- package/ShadersWGSL/boundingBoxRenderer.vertex.js +2 -2
- package/ShadersWGSL/boundingBoxRenderer.vertex.js.map +1 -1
- package/ShadersWGSL/clearQuad.vertex.js +1 -1
- package/ShadersWGSL/clearQuad.vertex.js.map +1 -1
- package/ShadersWGSL/color.vertex.js +1 -1
- package/ShadersWGSL/color.vertex.js.map +1 -1
- package/ShadersWGSL/depth.vertex.js +3 -3
- package/ShadersWGSL/depth.vertex.js.map +1 -1
- package/ShadersWGSL/fluidRenderingParticleDepth.vertex.js +2 -2
- package/ShadersWGSL/fluidRenderingParticleDepth.vertex.js.map +1 -1
- package/ShadersWGSL/fluidRenderingParticleDiffuse.vertex.js +2 -2
- package/ShadersWGSL/fluidRenderingParticleDiffuse.vertex.js.map +1 -1
- package/ShadersWGSL/fluidRenderingParticleThickness.vertex.js +2 -2
- package/ShadersWGSL/fluidRenderingParticleThickness.vertex.js.map +1 -1
- package/ShadersWGSL/fxaa.vertex.js +1 -1
- package/ShadersWGSL/fxaa.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplatting.vertex.js +3 -3
- package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js +3 -3
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js.map +1 -1
- package/ShadersWGSL/geometry.vertex.js +4 -4
- package/ShadersWGSL/geometry.vertex.js.map +1 -1
- package/ShadersWGSL/glowMapGeneration.vertex.js +4 -4
- package/ShadersWGSL/glowMapGeneration.vertex.js.map +1 -1
- package/ShadersWGSL/glowMapMerge.vertex.js +1 -1
- package/ShadersWGSL/glowMapMerge.vertex.js.map +1 -1
- package/ShadersWGSL/greasedLine.vertex.js +10 -4
- package/ShadersWGSL/greasedLine.vertex.js.map +1 -1
- package/ShadersWGSL/hdrFiltering.vertex.js +1 -1
- package/ShadersWGSL/hdrFiltering.vertex.js.map +1 -1
- package/ShadersWGSL/hdrIrradianceFiltering.vertex.js +1 -1
- package/ShadersWGSL/hdrIrradianceFiltering.vertex.js.map +1 -1
- package/ShadersWGSL/iblVoxelGrid.vertex.js +53 -44
- package/ShadersWGSL/iblVoxelGrid.vertex.js.map +1 -1
- package/ShadersWGSL/iblVoxelSlabDebug.vertex.js +1 -1
- package/ShadersWGSL/iblVoxelSlabDebug.vertex.js.map +1 -1
- package/ShadersWGSL/kernelBlur.vertex.js +2 -2
- package/ShadersWGSL/kernelBlur.vertex.js.map +1 -1
- package/ShadersWGSL/layer.vertex.js +1 -1
- package/ShadersWGSL/layer.vertex.js.map +1 -1
- package/ShadersWGSL/lensFlare.vertex.js +1 -1
- package/ShadersWGSL/lensFlare.vertex.js.map +1 -1
- package/ShadersWGSL/line.vertex.js +2 -2
- package/ShadersWGSL/line.vertex.js.map +1 -1
- package/ShadersWGSL/meshUVSpaceRenderer.vertex.js +2 -2
- package/ShadersWGSL/meshUVSpaceRenderer.vertex.js.map +1 -1
- package/ShadersWGSL/meshUVSpaceRendererFinaliser.vertex.js +1 -1
- package/ShadersWGSL/meshUVSpaceRendererFinaliser.vertex.js.map +1 -1
- package/ShadersWGSL/meshUVSpaceRendererMasker.vertex.js +1 -1
- package/ShadersWGSL/meshUVSpaceRendererMasker.vertex.js.map +1 -1
- package/ShadersWGSL/particles.vertex.js +9 -9
- package/ShadersWGSL/particles.vertex.js.map +1 -1
- package/ShadersWGSL/picking.vertex.js +2 -2
- package/ShadersWGSL/picking.vertex.js.map +1 -1
- package/ShadersWGSL/procedural.vertex.js +1 -1
- package/ShadersWGSL/procedural.vertex.js.map +1 -1
- package/ShadersWGSL/shadowMap.vertex.js +4 -4
- package/ShadersWGSL/shadowMap.vertex.js.map +1 -1
- package/ShadersWGSL/sprites.vertex.js +3 -3
- package/ShadersWGSL/sprites.vertex.js.map +1 -1
- package/XR/features/WebXRControllerPhysics.js +0 -2
- package/XR/features/WebXRControllerPhysics.js.map +1 -1
- package/XR/features/WebXRControllerTeleportation.js +1 -2
- package/XR/features/WebXRControllerTeleportation.js.map +1 -1
- package/XR/features/WebXRDepthSensing.js +1 -0
- package/XR/features/WebXRDepthSensing.js.map +1 -1
- package/XR/features/WebXRHandTracking.js +4 -7
- package/XR/features/WebXRHandTracking.js.map +1 -1
- package/XR/features/WebXRWalkingLocomotion.js +1 -1
- package/XR/features/WebXRWalkingLocomotion.js.map +1 -1
- package/XR/motionController/webXRMicrosoftMixedRealityController.js +1 -1
- package/XR/motionController/webXRMicrosoftMixedRealityController.js.map +1 -1
- package/XR/motionController/webXRMotionControllerManager.js +2 -2
- package/XR/motionController/webXRMotionControllerManager.js.map +1 -1
- package/XR/webXRCamera.d.ts +1 -0
- package/XR/webXRCamera.js +9 -7
- package/XR/webXRCamera.js.map +1 -1
- package/XR/webXRExperienceHelper.d.ts +4 -0
- package/XR/webXRExperienceHelper.js +25 -5
- package/XR/webXRExperienceHelper.js.map +1 -1
- package/XR/webXRInput.d.ts +1 -0
- package/XR/webXRInput.js +6 -0
- package/XR/webXRInput.js.map +1 -1
- package/XR/webXRSessionManager.js +5 -4
- package/XR/webXRSessionManager.js.map +1 -1
- package/package.json +1 -1
- package/scene.js +2 -1
- package/scene.js.map +1 -1
|
@@ -36,10 +36,12 @@ export function PrepareVertexPullingUniforms(geometry) {
|
|
|
36
36
|
const offset = vertexBuffer.byteOffset;
|
|
37
37
|
const stride = vertexBuffer.byteStride;
|
|
38
38
|
const type = vertexBuffer.type;
|
|
39
|
+
const normalized = vertexBuffer.normalized;
|
|
39
40
|
metadata.set(vb, {
|
|
40
41
|
offset: offset,
|
|
41
42
|
stride: stride,
|
|
42
43
|
type: type,
|
|
44
|
+
normalized: normalized,
|
|
43
45
|
});
|
|
44
46
|
}
|
|
45
47
|
}
|
|
@@ -53,8 +55,8 @@ export function PrepareVertexPullingUniforms(geometry) {
|
|
|
53
55
|
export function BindVertexPullingUniforms(effect, metadata) {
|
|
54
56
|
metadata.forEach((data, attribute) => {
|
|
55
57
|
const uniformName = `vp_${attribute}_info`;
|
|
56
|
-
// Pack into
|
|
57
|
-
effect.
|
|
58
|
+
// Pack into vec4: (offset, stride, type, normalized)
|
|
59
|
+
effect.setFloat4(uniformName, data.offset, data.stride, data.type, data.normalized ? 1 : 0);
|
|
58
60
|
});
|
|
59
61
|
}
|
|
60
62
|
//# sourceMappingURL=vertexPullingHelper.functions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vertexPullingHelper.functions.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/vertexPullingHelper.functions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vertexPullingHelper.functions.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/vertexPullingHelper.functions.ts"],"names":[],"mappings":"AA6BA,6CAA6C;AAC7C,MAAM,2BAA2B,GAAG,IAAI,OAAO,EAAiD,CAAC;AAEjG;;;;GAIG;AACH,MAAM,UAAU,4BAA4B,CAAC,QAAkB;IAC3D,MAAM,aAAa,GAAG,QAAQ,CAAC,gBAAgB,EAAE,CAAC;IAClD,IAAI,CAAC,aAAa,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,oBAAoB;IACpB,IAAI,QAAQ,GAAG,2BAA2B,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACzD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,QAAQ,GAAG,IAAI,GAAG,EAAkC,CAAC;QACrD,2BAA2B,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACxD,CAAC;SAAM,CAAC;QACJ,yDAAyD;QACzD,IAAI,WAAW,GAAG,KAAK,CAAC;QACxB,KAAK,MAAM,EAAE,IAAI,aAAa,EAAE,CAAC;YAC7B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;gBACpB,WAAW,GAAG,IAAI,CAAC;gBACnB,MAAM;YACV,CAAC;QACL,CAAC;QACD,IAAI,CAAC,WAAW,EAAE,CAAC;YACf,OAAO,QAAQ,CAAC;QACpB,CAAC;IACL,CAAC;IAED,2BAA2B;IAC3B,KAAK,MAAM,EAAE,IAAI,aAAa,EAAE,CAAC;QAC7B,MAAM,YAAY,GAAG,aAAa,CAAC,EAAE,CAAC,CAAC;QACvC,IAAI,YAAY,EAAE,CAAC;YACf,MAAM,MAAM,GAAG,YAAY,CAAC,UAAU,CAAC;YACvC,MAAM,MAAM,GAAG,YAAY,CAAC,UAAU,CAAC;YACvC,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;YAC/B,MAAM,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC;YAE3C,QAAQ,CAAC,GAAG,CAAC,EAAE,EAAE;gBACb,MAAM,EAAE,MAAM;gBACd,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,IAAI;gBACV,UAAU,EAAE,UAAU;aACzB,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AACpB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CAAC,MAAc,EAAE,QAA6C;IACnG,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE;QACjC,MAAM,WAAW,GAAG,MAAM,SAAS,OAAO,CAAC;QAC3C,qDAAqD;QACrD,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAChG,CAAC,CAAC,CAAC;AACP,CAAC","sourcesContent":["import type { Effect } from \"./effect\";\r\nimport type { Nullable } from \"../types\";\r\nimport type { Geometry } from \"../Meshes/geometry\";\r\n\r\n/**\r\n * Interface representing metadata for vertex pulling\r\n */\r\nexport interface IVertexPullingMetadata {\r\n /**\r\n * Offset in vertex buffer where data starts\r\n */\r\n offset: number;\r\n\r\n /**\r\n * Stride between elements in the vertex buffer\r\n */\r\n stride: number;\r\n\r\n /**\r\n * Type of the vertex buffer (e.g., float, int)\r\n */\r\n type: number; // VertexBuffer type constant\r\n\r\n /**\r\n * Whether integer data should be normalized when read\r\n */\r\n normalized: boolean;\r\n}\r\n\r\n// Store vertex pulling metadata per geometry\r\nconst _VertexPullingMetadataCache = new WeakMap<Geometry, Map<string, IVertexPullingMetadata>>();\r\n\r\n/**\r\n * Prepares vertex pulling uniforms for the given attributes and mesh\r\n * @param geometry The geometry containing the vertex buffers\r\n * @returns A map of attribute names to their metadata, or null if unavailable\r\n */\r\nexport function PrepareVertexPullingUniforms(geometry: Geometry): Nullable<Map<string, IVertexPullingMetadata>> {\r\n const vertexBuffers = geometry.getVertexBuffers();\r\n if (!vertexBuffers) {\r\n return null;\r\n }\r\n\r\n // Check cache first\r\n let metadata = _VertexPullingMetadataCache.get(geometry);\r\n if (!metadata) {\r\n metadata = new Map<string, IVertexPullingMetadata>();\r\n _VertexPullingMetadataCache.set(geometry, metadata);\r\n } else {\r\n // Return cached metadata if it exists and hasn't changed\r\n let needsUpdate = false;\r\n for (const vb in vertexBuffers) {\r\n if (!metadata.has(vb)) {\r\n needsUpdate = true;\r\n break;\r\n }\r\n }\r\n if (!needsUpdate) {\r\n return metadata;\r\n }\r\n }\r\n\r\n // Build or update metadata\r\n for (const vb in vertexBuffers) {\r\n const vertexBuffer = vertexBuffers[vb];\r\n if (vertexBuffer) {\r\n const offset = vertexBuffer.byteOffset;\r\n const stride = vertexBuffer.byteStride;\r\n const type = vertexBuffer.type;\r\n const normalized = vertexBuffer.normalized;\r\n\r\n metadata.set(vb, {\r\n offset: offset,\r\n stride: stride,\r\n type: type,\r\n normalized: normalized,\r\n });\r\n }\r\n }\r\n\r\n return metadata;\r\n}\r\n\r\n/**\r\n * Bind vertex pulling uniforms to the effect\r\n * @param effect The effect to bind the uniforms to\r\n * @param metadata The vertex pulling metadata\r\n */\r\nexport function BindVertexPullingUniforms(effect: Effect, metadata: Map<string, IVertexPullingMetadata>): void {\r\n metadata.forEach((data, attribute) => {\r\n const uniformName = `vp_${attribute}_info`;\r\n // Pack into vec4: (offset, stride, type, normalized)\r\n effect.setFloat4(uniformName, data.offset, data.stride, data.type, data.normalized ? 1 : 0);\r\n });\r\n}\r\n"]}
|
package/Maths/index.d.ts
CHANGED
package/Maths/index.js
CHANGED
|
@@ -9,4 +9,6 @@ export * from "./halton2DSequence.js";
|
|
|
9
9
|
export * from "./math.vector.functions.js";
|
|
10
10
|
export * from "./ThinMaths/index.js";
|
|
11
11
|
export * from "./math.scalar.functions.js";
|
|
12
|
+
export * from "./math.geospatial.js";
|
|
13
|
+
export * from "./math.geospatial.functions.js";
|
|
12
14
|
//# sourceMappingURL=index.js.map
|
package/Maths/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-restricted-imports */\r\nexport * from \"./math.scalar\";\r\nexport * from \"./math.functions\";\r\nexport * from \"./math.polar\";\r\nexport * from \"./math.like\";\r\nexport * from \"./math\";\r\nexport * from \"./sphericalPolynomial\";\r\nexport * from \"./halton2DSequence\";\r\nexport * from \"./math.vector.functions\";\r\nexport * from \"./ThinMaths/index\";\r\nexport * from \"./math.scalar.functions\";\r\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-restricted-imports */\r\nexport * from \"./math.scalar\";\r\nexport * from \"./math.functions\";\r\nexport * from \"./math.polar\";\r\nexport * from \"./math.like\";\r\nexport * from \"./math\";\r\nexport * from \"./sphericalPolynomial\";\r\nexport * from \"./halton2DSequence\";\r\nexport * from \"./math.vector.functions\";\r\nexport * from \"./ThinMaths/index\";\r\nexport * from \"./math.scalar.functions\";\r\nexport * from \"./math.geospatial\";\r\nexport * from \"./math.geospatial.functions\";\r\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Latitude and longitude in radians. */
|
|
2
|
+
export interface ILatLonLike {
|
|
3
|
+
/** Latitude in radians. */
|
|
4
|
+
lat: number;
|
|
5
|
+
/** Longitude in radians. */
|
|
6
|
+
lon: number;
|
|
7
|
+
}
|
|
8
|
+
/** Latitude and longitude in radians, and altitude in meters. */
|
|
9
|
+
export interface ILatLonAltLike extends ILatLonLike {
|
|
10
|
+
/** The height above the surface in meters. */
|
|
11
|
+
alt: number;
|
|
12
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { DeepImmutable } from "../types.js";
|
|
2
|
+
import type { ILatLonLike } from "./math.geospatial.js";
|
|
3
|
+
import type { IVector3Like } from "./math.like.js";
|
|
4
|
+
/**
|
|
5
|
+
* Converts the latitude and longitude specified in degrees to an {@link ILatLonLike} in radians.
|
|
6
|
+
* @param lat - The latitude in degrees
|
|
7
|
+
* @param lon - The longitude in degrees
|
|
8
|
+
* @param result - The resulting {@link ILatLonLike} in radians
|
|
9
|
+
* @returns The resulting {@link ILatLonLike} in radians
|
|
10
|
+
*/
|
|
11
|
+
export declare function LatLonFromDegreesToRef<T extends ILatLonLike>(lat: number, lon: number, result: T): T;
|
|
12
|
+
/**
|
|
13
|
+
* Computes the normal (up direction) in ECEF (Earth-Centered, Earth-Fixed) coordinates from the specified latitude and longitude in radians.
|
|
14
|
+
* Will clamp the latitude to -PI/2 to PI/2.
|
|
15
|
+
* @param latLon - The latitude and longitude in radians
|
|
16
|
+
* @param result - The resulting normal
|
|
17
|
+
* @returns The resulting normal
|
|
18
|
+
*/
|
|
19
|
+
export declare function LatLonToNormalToRef<T extends IVector3Like>(latLon: DeepImmutable<ILatLonLike>, result: T): T;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Clamp } from "./math.scalar.functions.js";
|
|
2
|
+
import { Vector3FromFloatsToRef } from "./math.vector.functions.js";
|
|
3
|
+
/**
|
|
4
|
+
* Converts the latitude and longitude specified in degrees to an {@link ILatLonLike} in radians.
|
|
5
|
+
* @param lat - The latitude in degrees
|
|
6
|
+
* @param lon - The longitude in degrees
|
|
7
|
+
* @param result - The resulting {@link ILatLonLike} in radians
|
|
8
|
+
* @returns The resulting {@link ILatLonLike} in radians
|
|
9
|
+
*/
|
|
10
|
+
export function LatLonFromDegreesToRef(lat, lon, result) {
|
|
11
|
+
result.lat = (lat * Math.PI) / 180;
|
|
12
|
+
result.lon = (lon * Math.PI) / 180;
|
|
13
|
+
return result;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Computes the normal (up direction) in ECEF (Earth-Centered, Earth-Fixed) coordinates from the specified latitude and longitude in radians.
|
|
17
|
+
* Will clamp the latitude to -PI/2 to PI/2.
|
|
18
|
+
* @param latLon - The latitude and longitude in radians
|
|
19
|
+
* @param result - The resulting normal
|
|
20
|
+
* @returns The resulting normal
|
|
21
|
+
*/
|
|
22
|
+
export function LatLonToNormalToRef(latLon, result) {
|
|
23
|
+
const lat = Clamp(latLon.lat, -Math.PI / 2, Math.PI / 2);
|
|
24
|
+
const cosLat = Math.cos(lat);
|
|
25
|
+
return Vector3FromFloatsToRef(cosLat * Math.cos(latLon.lon), cosLat * Math.sin(latLon.lon), Math.sin(lat), result);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=math.geospatial.functions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"math.geospatial.functions.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/math.geospatial.functions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAIhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CAAwB,GAAW,EAAE,GAAW,EAAE,MAAS;IAC7F,MAAM,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;IACnC,MAAM,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;IACnC,OAAO,MAAM,CAAC;AAClB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAyB,MAAkC,EAAE,MAAS;IACrG,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,OAAO,sBAAsB,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;AACvH,CAAC","sourcesContent":["import { Clamp } from \"./math.scalar.functions\";\r\nimport type { DeepImmutable } from \"../types\";\r\nimport type { ILatLonLike } from \"./math.geospatial\";\r\nimport type { IVector3Like } from \"./math.like\";\r\nimport { Vector3FromFloatsToRef } from \"./math.vector.functions\";\r\n\r\n/**\r\n * Converts the latitude and longitude specified in degrees to an {@link ILatLonLike} in radians.\r\n * @param lat - The latitude in degrees\r\n * @param lon - The longitude in degrees\r\n * @param result - The resulting {@link ILatLonLike} in radians\r\n * @returns The resulting {@link ILatLonLike} in radians\r\n */\r\nexport function LatLonFromDegreesToRef<T extends ILatLonLike>(lat: number, lon: number, result: T): T {\r\n result.lat = (lat * Math.PI) / 180;\r\n result.lon = (lon * Math.PI) / 180;\r\n return result;\r\n}\r\n\r\n/**\r\n * Computes the normal (up direction) in ECEF (Earth-Centered, Earth-Fixed) coordinates from the specified latitude and longitude in radians.\r\n * Will clamp the latitude to -PI/2 to PI/2.\r\n * @param latLon - The latitude and longitude in radians\r\n * @param result - The resulting normal\r\n * @returns The resulting normal\r\n */\r\nexport function LatLonToNormalToRef<T extends IVector3Like>(latLon: DeepImmutable<ILatLonLike>, result: T): T {\r\n const lat = Clamp(latLon.lat, -Math.PI / 2, Math.PI / 2);\r\n const cosLat = Math.cos(lat);\r\n return Vector3FromFloatsToRef(cosLat * Math.cos(latLon.lon), cosLat * Math.sin(latLon.lon), Math.sin(lat), result);\r\n}\r\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"math.geospatial.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/math.geospatial.ts"],"names":[],"mappings":"","sourcesContent":["/** Latitude and longitude in radians. */\r\nexport interface ILatLonLike {\r\n /** Latitude in radians. */\r\n lat: number;\r\n /** Longitude in radians. */\r\n lon: number;\r\n}\r\n\r\n/** Latitude and longitude in radians, and altitude in meters. */\r\nexport interface ILatLonAltLike extends ILatLonLike {\r\n /** The height above the surface in meters. */\r\n alt: number;\r\n}\r\n"]}
|
package/Meshes/abstractMesh.d.ts
CHANGED
|
@@ -574,6 +574,10 @@ export declare abstract class AbstractMesh extends TransformNode implements IDis
|
|
|
574
574
|
* @internal
|
|
575
575
|
*/
|
|
576
576
|
_getActionManagerForTrigger(trigger?: number, initialCall?: boolean): Nullable<AbstractActionManager>;
|
|
577
|
+
/**
|
|
578
|
+
* @internal
|
|
579
|
+
*/
|
|
580
|
+
_releaseRenderPassId(_id: number): void;
|
|
577
581
|
/**
|
|
578
582
|
* @internal
|
|
579
583
|
*/
|
package/Meshes/abstractMesh.js
CHANGED