@nova-lab/core 1.0.0-dev.19 → 1.1.0-dev.229
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/README.md +1035 -10
- package/THIRD_PARTY_NOTICES.md +26 -0
- package/dist/2d/accessibility.d.ts +2 -0
- package/dist/2d/accessibility.js +171 -0
- package/dist/2d/commands.d.ts +2 -0
- package/dist/2d/commands.js +80 -0
- package/dist/2d/effects.d.ts +10 -0
- package/dist/2d/effects.js +566 -0
- package/dist/2d/ktx2.d.ts +5 -0
- package/dist/2d/ktx2.js +542 -0
- package/dist/2d/lighting.d.ts +3 -0
- package/dist/2d/lighting.js +495 -0
- package/dist/2d/lottie.d.ts +3 -0
- package/dist/2d/lottie.js +254 -0
- package/dist/2d/meshes.d.ts +4 -0
- package/dist/2d/meshes.js +451 -0
- package/dist/2d/primitives.d.ts +3 -0
- package/dist/2d/primitives.js +85 -0
- package/dist/2d/render-textures.d.ts +3 -0
- package/dist/2d/render-textures.js +539 -0
- package/dist/2d/svg/documents.d.ts +5 -0
- package/dist/2d/svg/documents.js +7 -0
- package/dist/2d/svg/renderer.d.ts +3 -0
- package/dist/2d/svg/renderer.js +222 -0
- package/dist/2d/svg.d.ts +3 -0
- package/dist/2d/svg.js +4 -0
- package/dist/2d/tools.d.ts +2 -0
- package/dist/2d/tools.js +100 -0
- package/dist/2d/video.d.ts +5 -0
- package/dist/2d/video.js +90 -0
- package/dist/2d.d.ts +2 -0
- package/dist/2d.js +220 -0
- package/dist/3d/animation.d.ts +8 -0
- package/dist/3d/animation.js +1396 -0
- package/dist/3d/area-lights.d.ts +2 -0
- package/dist/3d/area-lights.js +19 -0
- package/dist/3d/audio.d.ts +4 -0
- package/dist/3d/audio.js +500 -0
- package/dist/3d/character.d.ts +2 -0
- package/dist/3d/character.js +136 -0
- package/dist/3d/collision.d.ts +3 -0
- package/dist/3d/collision.js +387 -0
- package/dist/3d/commands.d.ts +2 -0
- package/dist/3d/commands.js +108 -0
- package/dist/3d/controls.d.ts +8 -0
- package/dist/3d/controls.js +1041 -0
- package/dist/3d/documents.d.ts +5 -0
- package/dist/3d/documents.js +227 -0
- package/dist/3d/effects.d.ts +5 -0
- package/dist/3d/effects.js +1986 -0
- package/dist/3d/export.d.ts +4 -0
- package/dist/3d/export.js +347 -0
- package/dist/3d/fbx.d.ts +2 -0
- package/dist/3d/fbx.js +784 -0
- package/dist/3d/gltf.d.ts +2 -0
- package/dist/3d/gltf.js +5 -0
- package/dist/3d/helpers.d.ts +5 -0
- package/dist/3d/helpers.js +191 -0
- package/dist/3d/ik.d.ts +9 -0
- package/dist/3d/ik.js +777 -0
- package/dist/3d/loaders.d.ts +17 -0
- package/dist/3d/loaders.js +1406 -0
- package/dist/3d/nodes.d.ts +8 -0
- package/dist/3d/nodes.js +49 -0
- package/dist/3d/particles.d.ts +5 -0
- package/dist/3d/particles.js +1574 -0
- package/dist/3d/physics/backend.d.ts +7 -0
- package/dist/3d/physics/backend.js +1 -0
- package/dist/3d/physics/rapier.d.ts +3 -0
- package/dist/3d/physics/rapier.js +765 -0
- package/dist/3d/physics.d.ts +5 -0
- package/dist/3d/physics.js +3346 -0
- package/dist/3d/splats.d.ts +7 -0
- package/dist/3d/splats.js +862 -0
- package/dist/3d/text.d.ts +5 -0
- package/dist/3d/text.js +1043 -0
- package/dist/3d/tiles.d.ts +24 -0
- package/dist/3d/tiles.js +1705 -0
- package/dist/3d/tools.d.ts +12 -0
- package/dist/3d/tools.js +338 -0
- package/dist/3d/usdz.d.ts +2 -0
- package/dist/3d/usdz.js +634 -0
- package/dist/3d/xr.d.ts +2 -0
- package/dist/3d/xr.js +202 -0
- package/dist/3d-B4jWF8Qb.js +5591 -0
- package/dist/3d.d.ts +40 -0
- package/dist/3d.js +44 -0
- package/dist/Capsule-BFVpZfvc.js +44 -0
- package/dist/Clip-CAN7t03k.js +204 -0
- package/dist/Color-vuv9UnoY.js +34 -0
- package/dist/DeformedMesh-CPi0P_vc.js +280 -0
- package/dist/Document-DCVEZSvM.js +415 -0
- package/dist/Errors-B2ekO9bZ.js +30 -0
- package/dist/Features-BsjmePtc.js +557 -0
- package/dist/GLTFResourceIO-CYJyCUTt.js +124 -0
- package/dist/GPUParticleState-CQlNpoDa.js +545 -0
- package/dist/Geometry-DytO490z.js +227 -0
- package/dist/Inflate-DWw0V-Up.js +42 -0
- package/dist/InstancedMesh-DPrgrw5z.js +527 -0
- package/dist/Limits-Bw5XQdFr.js +20 -0
- package/dist/LineHelper-Ad0z9uDi.js +131 -0
- package/dist/LoaderIO-BwrM84OM.js +114 -0
- package/dist/Material-BpfLPmK9.js +777 -0
- package/dist/Mesh-BaRxAAJq.js +209 -0
- package/dist/Node-QfgAE2_v.js +877 -0
- package/dist/NovaAssetRegistry-p2QlCwvT.js +1168 -0
- package/dist/NovaNode-CBZ-Ol-W.js +2016 -0
- package/dist/NovaRenderCommandWriter-CWQRa42y.js +1949 -0
- package/dist/NovaTextSelectionService-CipuujCT.js +18526 -0
- package/dist/NovaWebGLProgram-BO250QNF.js +97 -0
- package/dist/Options-CajE7LLJ.js +15 -0
- package/dist/PolygonMesh-D4PnnfIo.js +657 -0
- package/dist/Ready-BzyhRtjD.js +21 -0
- package/dist/Scene-CDfNgf9I.js +911 -0
- package/dist/Shader-b6_HDndT.js +48 -0
- package/dist/SplatShader-wJ6GJ3vo.js +130 -0
- package/dist/Texture-dTKMlTpK.js +267 -0
- package/dist/TextureLoader-CfDzdy2m.js +411 -0
- package/dist/Textures-CGL4Kf-8.js +651 -0
- package/dist/ToneMapping-D9IWvN0u.js +46 -0
- package/dist/WebGPURenderer-DjD0IxVC.js +4921 -0
- package/dist/ZipReader-C-MSEsSr.js +84 -0
- package/dist/core.js +218 -24024
- package/dist/domain/types/base.types.d.ts +18 -9
- package/dist/domain/types/component.types.d.ts +5 -5
- package/dist/domain/types/cursor.types.d.ts +1 -1
- package/dist/domain/types/diagnostics.types.d.ts +2 -0
- package/dist/domain/types/export.types.d.ts +2 -2
- package/dist/domain/types/hit-test.types.d.ts +1 -1
- package/dist/domain/types/motion.types.d.ts +2 -2
- package/dist/domain/types/renderer.types.d.ts +88 -4
- package/dist/domain/types/rendering/index.d.ts +29 -4
- package/dist/domain/types/sound.types.d.ts +1 -1
- package/dist/domain/types/theme.types.d.ts +1 -1
- package/dist/domain/utils/bounds.d.ts +1 -1
- package/dist/domain/utils/nova-text.d.ts +9 -0
- package/dist/domain/utils/schemaBounds.d.ts +2 -2
- package/dist/export-svg-document-ChaNXMaG.js +668 -0
- package/dist/features/3d/Errors.d.ts +57 -0
- package/dist/features/3d/Nova3DApp.d.ts +429 -0
- package/dist/features/3d/animation/Animator.d.ts +260 -0
- package/dist/features/3d/animation/Clip.d.ts +74 -0
- package/dist/features/3d/animation/Graph.d.ts +158 -0
- package/dist/features/3d/animation/Mask.d.ts +40 -0
- package/dist/features/3d/audio/Audio.d.ts +114 -0
- package/dist/features/3d/audio/Sound.d.ts +133 -0
- package/dist/features/3d/character/CharacterController.d.ts +61 -0
- package/dist/features/3d/collision/Capsule.d.ts +25 -0
- package/dist/features/3d/collision/Octree.d.ts +94 -0
- package/dist/features/3d/controls/CameraMotionControls.d.ts +154 -0
- package/dist/features/3d/controls/CameraOrientation.d.ts +47 -0
- package/dist/features/3d/controls/OrbitControls.d.ts +73 -0
- package/dist/features/3d/controls/PointerGesture.d.ts +25 -0
- package/dist/features/3d/controls/PointerLock.d.ts +36 -0
- package/dist/features/3d/controls/Snapping.d.ts +32 -0
- package/dist/features/3d/controls/TransformGizmo.d.ts +79 -0
- package/dist/features/3d/deformation/DeformationGPU.d.ts +52 -0
- package/dist/features/3d/deformation/DeformationShader.d.ts +2 -0
- package/dist/features/3d/deformation/DeformedMesh.d.ts +36 -0
- package/dist/features/3d/deformation/GeometryDeformation.d.ts +25 -0
- package/dist/features/3d/documents/Document.d.ts +59 -0
- package/dist/features/3d/documents/DocumentCommands.d.ts +45 -0
- package/dist/features/3d/documents/DocumentSchema.d.ts +18 -0
- package/dist/features/3d/documents/DocumentTransform.d.ts +4 -0
- package/dist/features/3d/documents/DocumentTypes.d.ts +182 -0
- package/dist/features/3d/documents/DocumentValidation.d.ts +18 -0
- package/dist/features/3d/documents/Projection.d.ts +65 -0
- package/dist/features/3d/effects/CubeLUT.d.ts +24 -0
- package/dist/features/3d/effects/Effects.d.ts +32 -0
- package/dist/features/3d/effects/EffectsGPU.d.ts +80 -0
- package/dist/features/3d/effects/EffectsPlan.d.ts +268 -0
- package/dist/features/3d/effects/EffectsShaders.d.ts +35 -0
- package/dist/features/3d/export/GLTFExporter.d.ts +49 -0
- package/dist/features/3d/export/ThreeMFExporter.d.ts +19 -0
- package/dist/features/3d/export/ZipWriter.d.ts +9 -0
- package/dist/features/3d/fbx/FBXLoader.d.ts +26 -0
- package/dist/features/3d/fbx/FBXParser.d.ts +35 -0
- package/dist/features/3d/fbx/FBXScene.d.ts +20 -0
- package/dist/features/3d/gltf/GLTFLoader.d.ts +16 -0
- package/dist/features/3d/gltf/GLTFTypes.d.ts +64 -0
- package/dist/features/3d/gltf/services/GLTFBinary.d.ts +21 -0
- package/dist/features/3d/gltf/services/GLTFGeometry.d.ts +14 -0
- package/dist/features/3d/gltf/services/GLTFResourceIO.d.ts +64 -0
- package/dist/features/3d/helpers/LineHelper.d.ts +51 -0
- package/dist/features/3d/helpers/StaticHelpers.d.ts +47 -0
- package/dist/features/3d/helpers/TrackedHelpers.d.ts +84 -0
- package/dist/features/3d/ik/ChainIK.d.ts +44 -0
- package/dist/features/3d/ik/IKChain.d.ts +92 -0
- package/dist/features/3d/ik/IKMath.d.ts +49 -0
- package/dist/features/3d/ik/IKSolver.d.ts +97 -0
- package/dist/features/3d/ik/LookAtIK.d.ts +58 -0
- package/dist/features/3d/ik/TwoBoneIK.d.ts +57 -0
- package/dist/features/3d/import/ImportAnimation.d.ts +20 -0
- package/dist/features/3d/import/ImportMath.d.ts +42 -0
- package/dist/features/3d/import/ImportedModel.d.ts +135 -0
- package/dist/features/3d/import/Inflate.d.ts +5 -0
- package/dist/features/3d/import/ModelAsset.d.ts +149 -0
- package/dist/features/3d/import/PolygonMesh.d.ts +54 -0
- package/dist/features/3d/lights/AreaLightTables.d.ts +8 -0
- package/dist/features/3d/lights/AreaLights.d.ts +11 -0
- package/dist/features/3d/loaders/EXRCompression.d.ts +13 -0
- package/dist/features/3d/loaders/EXRLoader.d.ts +39 -0
- package/dist/features/3d/loaders/HDRLoader.d.ts +26 -0
- package/dist/features/3d/loaders/Limits.d.ts +70 -0
- package/dist/features/3d/loaders/LoaderBuffers.d.ts +42 -0
- package/dist/features/3d/loaders/LoaderIO.d.ts +81 -0
- package/dist/features/3d/loaders/LoaderModel.d.ts +80 -0
- package/dist/features/3d/loaders/LoaderText.d.ts +27 -0
- package/dist/features/3d/loaders/MTLLoader.d.ts +105 -0
- package/dist/features/3d/loaders/OBJLoader.d.ts +70 -0
- package/dist/features/3d/loaders/PLYLoader.d.ts +47 -0
- package/dist/features/3d/loaders/STLLoader.d.ts +27 -0
- package/dist/features/3d/model/Camera.d.ts +33 -0
- package/dist/features/3d/model/Environment.d.ts +31 -0
- package/dist/features/3d/model/Geometry.d.ts +59 -0
- package/dist/features/3d/model/InstancedMesh.d.ts +134 -0
- package/dist/features/3d/model/LOD.d.ts +31 -0
- package/dist/features/3d/model/Light.d.ts +200 -0
- package/dist/features/3d/model/Material.d.ts +308 -0
- package/dist/features/3d/model/MaterialExtensions.d.ts +200 -0
- package/dist/features/3d/model/Mesh.d.ts +92 -0
- package/dist/features/3d/model/Node.d.ts +87 -0
- package/dist/features/3d/model/ReflectionProbe.d.ts +45 -0
- package/dist/features/3d/model/RenderTarget.d.ts +41 -0
- package/dist/features/3d/model/Scene.d.ts +173 -0
- package/dist/features/3d/model/Texture.d.ts +143 -0
- package/dist/features/3d/nodes/Nodes.d.ts +8 -0
- package/dist/features/3d/nodes/ShaderNode.d.ts +240 -0
- package/dist/features/3d/particles/GPUParticleSchedule.d.ts +67 -0
- package/dist/features/3d/particles/GPUParticleShaders.d.ts +19 -0
- package/dist/features/3d/particles/GPUParticleState.d.ts +106 -0
- package/dist/features/3d/particles/GPUParticleSystem.d.ts +192 -0
- package/dist/features/3d/particles/ParticleCurves.d.ts +34 -0
- package/dist/features/3d/particles/ParticleOptions.d.ts +78 -0
- package/dist/features/3d/particles/ParticleSystem.d.ts +368 -0
- package/dist/features/3d/physics/PhysicsBackend.d.ts +352 -0
- package/dist/features/3d/physics/PhysicsDebug.d.ts +24 -0
- package/dist/features/3d/physics/PhysicsWorld.d.ts +352 -0
- package/dist/features/3d/physics/basic/BasicCollision.d.ts +75 -0
- package/dist/features/3d/physics/basic/BasicPhysics.d.ts +24 -0
- package/dist/features/3d/physics/basic/BasicShapes.d.ts +103 -0
- package/dist/features/3d/physics/rapier/ContactBuffer.d.ts +32 -0
- package/dist/features/3d/physics/rapier/RapierBackend.d.ts +17 -0
- package/dist/features/3d/physics/rapier/RapierShapes.d.ts +4 -0
- package/dist/features/3d/physics/rapier/RapierWorld.d.ts +198 -0
- package/dist/features/3d/physics/rapier/Validation.d.ts +8 -0
- package/dist/features/3d/services/Background.d.ts +22 -0
- package/dist/features/3d/services/BasicShader.d.ts +55 -0
- package/dist/features/3d/services/ClusteredLights.d.ts +69 -0
- package/dist/features/3d/services/DrawOrder.d.ts +37 -0
- package/dist/features/3d/services/EffectsProcessor.d.ts +38 -0
- package/dist/features/3d/services/EnvironmentBRDF.d.ts +35 -0
- package/dist/features/3d/services/EnvironmentMaps.d.ts +55 -0
- package/dist/features/3d/services/FogShader.d.ts +6 -0
- package/dist/features/3d/services/Frustum.d.ts +7 -0
- package/dist/features/3d/services/GLState.d.ts +86 -0
- package/dist/features/3d/services/GPUPicker.d.ts +31 -0
- package/dist/features/3d/services/InstanceShader.d.ts +3 -0
- package/dist/features/3d/services/LineProgram.d.ts +32 -0
- package/dist/features/3d/services/PBRProgram.d.ts +115 -0
- package/dist/features/3d/services/Renderer.d.ts +50 -0
- package/dist/features/3d/services/Shader.d.ts +22 -0
- package/dist/features/3d/services/ShaderProgram.d.ts +38 -0
- package/dist/features/3d/services/ShadowMaps.d.ts +97 -0
- package/dist/features/3d/services/SpatialIndex.d.ts +16 -0
- package/dist/features/3d/services/TextureLoader.d.ts +40 -0
- package/dist/features/3d/services/TextureMipmaps.d.ts +42 -0
- package/dist/features/3d/services/ToneMapping.d.ts +12 -0
- package/dist/features/3d/services/WebGLRenderer.d.ts +261 -0
- package/dist/features/3d/splats/SplatData.d.ts +136 -0
- package/dist/features/3d/splats/SplatLoaders.d.ts +64 -0
- package/dist/features/3d/splats/SplatShader.d.ts +14 -0
- package/dist/features/3d/splats/SplatSort.d.ts +69 -0
- package/dist/features/3d/splats/Splats.d.ts +116 -0
- package/dist/features/3d/text/FontAtlas.d.ts +246 -0
- package/dist/features/3d/text/SDF.d.ts +28 -0
- package/dist/features/3d/text/Text.d.ts +179 -0
- package/dist/features/3d/text/TextLayout.d.ts +73 -0
- package/dist/features/3d/text/TextShader.d.ts +12 -0
- package/dist/features/3d/tiles/BoundingVolume.d.ts +43 -0
- package/dist/features/3d/tiles/Geodesy.d.ts +106 -0
- package/dist/features/3d/tiles/GlobeControls.d.ts +147 -0
- package/dist/features/3d/tiles/TileContent.d.ts +35 -0
- package/dist/features/3d/tiles/TileFormats.d.ts +77 -0
- package/dist/features/3d/tiles/Tiles3D.d.ts +236 -0
- package/dist/features/3d/tiles/Tileset.d.ts +81 -0
- package/dist/features/3d/tools/BatchedMesh.d.ts +74 -0
- package/dist/features/3d/tools/CanvasSurface.d.ts +81 -0
- package/dist/features/3d/tools/Color.d.ts +11 -0
- package/dist/features/3d/tools/MergeGeometries.d.ts +22 -0
- package/dist/features/3d/tools/Options.d.ts +15 -0
- package/dist/features/3d/tools/Polyhedra.d.ts +30 -0
- package/dist/features/3d/tools/PrimitiveBuffers.d.ts +42 -0
- package/dist/features/3d/tools/Primitives.d.ts +164 -0
- package/dist/features/3d/tools/Ready.d.ts +12 -0
- package/dist/features/3d/tools/SpatialMath.d.ts +57 -0
- package/dist/features/3d/tools/SphericalHarmonics.d.ts +9 -0
- package/dist/features/3d/tools/math/mat3.d.ts +7 -0
- package/dist/features/3d/tools/math/mat4.d.ts +19 -0
- package/dist/features/3d/tools/math/quat.d.ts +6 -0
- package/dist/features/3d/tools/math/vec3.d.ts +16 -0
- package/dist/features/3d/tools/math/vec4.d.ts +5 -0
- package/dist/features/3d/types.d.ts +359 -0
- package/dist/features/3d/usdz/USDAParser.d.ts +50 -0
- package/dist/features/3d/usdz/USDScene.d.ts +20 -0
- package/dist/features/3d/usdz/USDZLoader.d.ts +27 -0
- package/dist/features/3d/usdz/ZipReader.d.ts +16 -0
- package/dist/features/3d/webgpu/Backend.d.ts +40 -0
- package/dist/features/3d/webgpu/BasicShader.d.ts +10 -0
- package/dist/features/3d/webgpu/Constants.d.ts +32 -0
- package/dist/features/3d/webgpu/Deformation.d.ts +71 -0
- package/dist/features/3d/webgpu/Environment.d.ts +66 -0
- package/dist/features/3d/webgpu/Features.d.ts +68 -0
- package/dist/features/3d/webgpu/Layouts.d.ts +27 -0
- package/dist/features/3d/webgpu/Lines.d.ts +40 -0
- package/dist/features/3d/webgpu/LitExtras.d.ts +46 -0
- package/dist/features/3d/webgpu/LitFeatures.d.ts +41 -0
- package/dist/features/3d/webgpu/LitScene.d.ts +60 -0
- package/dist/features/3d/webgpu/LitShader.d.ts +68 -0
- package/dist/features/3d/webgpu/Particles.d.ts +114 -0
- package/dist/features/3d/webgpu/Picking.d.ts +59 -0
- package/dist/features/3d/webgpu/PipelineKey.d.ts +33 -0
- package/dist/features/3d/webgpu/Points.d.ts +41 -0
- package/dist/features/3d/webgpu/Probes.d.ts +45 -0
- package/dist/features/3d/webgpu/ShaderChunks.d.ts +18 -0
- package/dist/features/3d/webgpu/ShaderMaterial.d.ts +57 -0
- package/dist/features/3d/webgpu/ShaderMaterialSource.d.ts +5 -0
- package/dist/features/3d/webgpu/Shadows.d.ts +49 -0
- package/dist/features/3d/webgpu/Splats.d.ts +47 -0
- package/dist/features/3d/webgpu/Textures.d.ts +52 -0
- package/dist/features/3d/webgpu/Transmission.d.ts +30 -0
- package/dist/features/3d/webgpu/UniformLayout.d.ts +30 -0
- package/dist/features/3d/webgpu/UtilityShaders.d.ts +38 -0
- package/dist/features/3d/webgpu/WebGPURenderer.d.ts +327 -0
- package/dist/features/3d/webgpu/effects/EffectsShaders.d.ts +74 -0
- package/dist/features/3d/webgpu/effects/WebGPUEffects.d.ts +140 -0
- package/dist/features/3d/xr/XR.d.ts +100 -0
- package/dist/gltf-By-n0qEg.js +960 -0
- package/dist/index.d.ts +86 -81
- package/dist/model/document-actions/document-commands.d.ts +18 -0
- package/dist/model/documents/svg/create-svg-document-renderer.d.ts +32 -0
- package/dist/model/documents/svg/export-svg-document.d.ts +5 -0
- package/dist/model/documents/svg/import-svg-document.d.ts +6 -0
- package/dist/model/documents/svg/svg-document.types.d.ts +111 -0
- package/dist/model/documents/svg/svg-values.d.ts +16 -0
- package/dist/model/documents/svg/svg-xml.d.ts +18 -0
- package/dist/model/input/NovaInputProxy_Adapter.d.ts +2 -1
- package/dist/model/input/NovaInputValidationController.d.ts +1 -1
- package/dist/model/input/NovaTextInputController.d.ts +1 -1
- package/dist/model/input/NovaTextLayoutEngine.d.ts +2 -6
- package/dist/model/input/index.d.ts +7 -7
- package/dist/model/input/nova-input.types.d.ts +1 -1
- package/dist/model/lighting/LightingRenderer2D.d.ts +58 -0
- package/dist/model/lighting/NovaLighting2D.d.ts +56 -0
- package/dist/model/lighting/lighting-shaders.d.ts +3 -0
- package/dist/model/lighting/lighting-state.d.ts +27 -0
- package/dist/model/lighting/lighting.types.d.ts +107 -0
- package/dist/model/lottie/LottieNode.d.ts +4 -0
- package/dist/model/lottie/lottie.types.d.ts +83 -0
- package/dist/model/lottie/prepare-lottie.d.ts +3 -0
- package/dist/model/lottie/sample-position.d.ts +9 -0
- package/dist/model/motion/NovaMotionEngine.d.ts +3 -3
- package/dist/model/motion/nova-motion-easing.d.ts +1 -1
- package/dist/model/motion/nova-motion-interpolation.d.ts +1 -1
- package/dist/model/motion/nova-motion-presets.d.ts +2 -2
- package/dist/model/motion/nova-motion-timeline.d.ts +1 -1
- package/dist/model/platform/NovaCanvas.d.ts +7 -6
- package/dist/model/primitives/NovaPrimitiveUnsupportedError.d.ts +13 -0
- package/dist/model/primitives/definePrimitive.d.ts +5 -0
- package/dist/model/primitives/primitive.types.d.ts +28 -0
- package/dist/model/render/backends/canvas2d/NovaCanvas2DTargetManager.d.ts +3 -3
- package/dist/model/render/backends/canvas2d/NovaRenderer2D.d.ts +61 -15
- package/dist/model/render/backends/canvas2d/nova-canvas-blend.d.ts +5 -0
- package/dist/model/render/backends/nova-render-backend-factory.d.ts +6 -6
- package/dist/model/render/backends/nova-render-backend.d.ts +8 -2
- package/dist/model/render/backends/webgl/NovaRendererWebGL.d.ts +32 -11
- package/dist/model/render/backends/webgl/NovaStreamCacheIdleLedger.d.ts +12 -1
- package/dist/model/render/backends/webgl/NovaWebGLBatcher.d.ts +1 -1
- package/dist/model/render/backends/webgl/NovaWebGLCircleImagePass.d.ts +23 -0
- package/dist/model/render/backends/webgl/NovaWebGLCompositionPass.d.ts +9 -0
- package/dist/model/render/backends/webgl/NovaWebGLDevice.d.ts +3 -1
- package/dist/model/render/backends/webgl/NovaWebGLDiagnostics.d.ts +1 -1
- package/dist/model/render/backends/webgl/NovaWebGLFrameRenderer.d.ts +162 -53
- package/dist/model/render/backends/webgl/NovaWebGLPathClipPass.d.ts +13 -0
- package/dist/model/render/backends/webgl/NovaWebGLPathUnion.d.ts +23 -0
- package/dist/model/render/compiler/NovaRenderBuilder.d.ts +24 -10
- package/dist/model/render/compiler/NovaRenderCommandWriter.d.ts +10 -5
- package/dist/model/render/compiler/NovaRenderCompiler.d.ts +7 -6
- package/dist/model/render/compiler/NovaRenderFrameBuilder.d.ts +4 -3
- package/dist/model/render/effects/blur.d.ts +8 -0
- package/dist/model/render/effects/color-matrix.d.ts +8 -0
- package/dist/model/render/effects/drop-shadow.d.ts +18 -0
- package/dist/model/render/effects/nova-effect-registry.d.ts +66 -0
- package/dist/model/render/effects/nova-gaussian-kernel.d.ts +7 -0
- package/dist/model/render/effects/nova-gaussian-textures.d.ts +11 -0
- package/dist/model/render/effects/shader-effect.d.ts +64 -0
- package/dist/model/render/geometry/nova-alpha-mask.d.ts +5 -0
- package/dist/model/render/geometry/nova-composition.d.ts +9 -0
- package/dist/model/render/geometry/nova-node-clip.d.ts +17 -0
- package/dist/model/render/geometry/nova-path-geometry.d.ts +24 -0
- package/dist/model/render/geometry/nova-path-tessellation.d.ts +7 -0
- package/dist/model/render/geometry/nova-polygon-triangulation.d.ts +1 -1
- package/dist/model/render/graph/NovaRectBatchBuffer.d.ts +58 -0
- package/dist/model/render/graph/NovaRenderGraph.d.ts +40 -6
- package/dist/model/render/graph/NovaRenderHitIndex.d.ts +1 -1
- package/dist/model/render/graph/nova-auto-rect.d.ts +1 -1
- package/dist/model/render/graph/nova-linear-rect-repack.d.ts +4 -4
- package/dist/model/render/graph/nova-linear-rect-transition.d.ts +2 -2
- package/dist/model/render/graph/nova-render-culling.d.ts +2 -2
- package/dist/model/render/graph/nova-render-dirty-items.d.ts +1 -1
- package/dist/model/render/graph/nova-render-group.d.ts +1 -1
- package/dist/model/render/graph/nova-render-item.d.ts +2 -2
- package/dist/model/render/graph/nova-render-layer.d.ts +1 -1
- package/dist/model/render/graph/nova-render-payload-snapshot.d.ts +3 -1
- package/dist/model/render/graph/nova-render-program.d.ts +5 -3
- package/dist/model/render/graph/nova-render-sequence.d.ts +1 -1
- package/dist/model/render/graph/nova-render-stream.d.ts +2 -2
- package/dist/model/render/ktx2/BasisSession.d.ts +45 -0
- package/dist/model/render/ktx2/KTX2Container.d.ts +26 -0
- package/dist/model/render/ktx2/KTX2Loader.d.ts +55 -0
- package/dist/model/render/meshes/MeshNode.d.ts +13 -0
- package/dist/model/render/meshes/NovaMeshWebGLDevice.d.ts +27 -0
- package/dist/model/render/meshes/geometry.d.ts +7 -0
- package/dist/model/render/meshes/mesh.d.ts +3 -0
- package/dist/model/render/meshes/mesh.types.d.ts +116 -0
- package/dist/model/render/meshes/nova-mesh-registry.d.ts +55 -0
- package/dist/model/render/orchestration/NovaRenderOrchestrator.d.ts +25 -3
- package/dist/model/render/policy/nova-render-policy.d.ts +1 -1
- package/dist/model/render/resources/NovaGlyphAtlasManager.d.ts +2 -2
- package/dist/model/render/resources/NovaTextAtlasManager.d.ts +3 -3
- package/dist/model/render/resources/NovaTextLayoutEngine.d.ts +1 -1
- package/dist/model/render/resources/nova-bitmap-upload.d.ts +10 -0
- package/dist/model/render/schema/NovaRenderContext.d.ts +6 -4
- package/dist/model/render/schema/nova-style-compiler.d.ts +5 -2
- package/dist/model/render/targets/NovaNodeRenderTextureSource.d.ts +29 -0
- package/dist/model/render/targets/NovaRenderTargetManager.d.ts +1 -1
- package/dist/model/render/targets/NovaRenderTexture.d.ts +57 -0
- package/dist/model/render/targets/nova-render-target-refs.d.ts +5 -0
- package/dist/model/render/targets/nova-render-target-resource.d.ts +1 -1
- package/dist/model/render/targets/nova-render-texture-runtime.d.ts +71 -0
- package/dist/model/render/textures/nova-compressed-image.d.ts +20 -0
- package/dist/model/render/utils/nova-icon-rendering.d.ts +3 -1
- package/dist/model/render/utils/nova-image-geometry.d.ts +11 -0
- package/dist/model/render/utils/nova-markdown-layout.d.ts +19 -0
- package/dist/model/render/utils/nova-text-paint.d.ts +26 -0
- package/dist/model/render/utils/nova-wrapped-text-layout.d.ts +19 -0
- package/dist/model/runtime/app/Nova.d.ts +35 -35
- package/dist/model/runtime/app/NovaApp.d.ts +58 -30
- package/dist/model/runtime/app/NovaRaphRuntime.d.ts +2 -2
- package/dist/model/runtime/app/createNovaRaphRuntime.d.ts +3 -3
- package/dist/model/runtime/assets/NovaAssetRegistry.d.ts +89 -2
- package/dist/model/runtime/assets/NovaVideoTexture.d.ts +38 -0
- package/dist/model/runtime/assets/nova-render-texture-image-identity.d.ts +4 -0
- package/dist/model/runtime/commands/NovaCommandBus.d.ts +1 -1
- package/dist/model/runtime/components/NovaComponentNode.d.ts +6 -6
- package/dist/model/runtime/components/NovaComponentRegistry.d.ts +1 -1
- package/dist/model/runtime/components/NovaSchemaRegistry.d.ts +7 -6
- package/dist/model/runtime/components/nova-component-metadata.d.ts +1 -1
- package/dist/model/runtime/components/nova-component.decorator.d.ts +2 -2
- package/dist/model/runtime/components/nova-defined-component.d.ts +3 -3
- package/dist/model/runtime/context/nova-context.d.ts +1 -1
- package/dist/model/runtime/cursor/NovaCursorManager.d.ts +3 -3
- package/dist/model/runtime/diagnostics/NovaDiagnostics_Module.d.ts +3 -3
- package/dist/model/runtime/interaction/NovaEvents.d.ts +16 -6
- package/dist/model/runtime/interaction/NovaHitIndex.d.ts +1 -1
- package/dist/model/runtime/interaction/NovaSpatialIndex.d.ts +2 -2
- package/dist/model/runtime/scene/NovaScene.d.ts +3 -3
- package/dist/model/runtime/scene/nova-scene-components.d.ts +6 -6
- package/dist/model/runtime/state/nova-store-decorators.d.ts +1 -1
- package/dist/model/runtime/state/nova-store-runtime.d.ts +1 -1
- package/dist/model/runtime/state/nova-store-tracking.d.ts +7 -3
- package/dist/model/runtime/sync/NovaSyncScope.d.ts +11 -2
- package/dist/model/runtime/sync/nova-sync-context.d.ts +2 -2
- package/dist/model/runtime/sync/nova-sync-ports.d.ts +2 -2
- package/dist/model/runtime/sync/nova-sync.types.d.ts +15 -3
- package/dist/model/runtime/template/NovaTemplateRuntime.d.ts +6 -6
- package/dist/model/runtime/tree/NovaContainer.d.ts +4 -4
- package/dist/model/runtime/tree/NovaNode.d.ts +58 -18
- package/dist/model/runtime/tree/NovaRaphNode.d.ts +8 -2
- package/dist/model/runtime/tree/NovaSurface.d.ts +32 -10
- package/dist/model/runtime/tree/nova-node-capture-invalidation.d.ts +11 -0
- package/dist/model/semantic/NovaSemanticService.d.ts +1 -1
- package/dist/model/semantic/browser/createAccessibilityBridge.d.ts +29 -0
- package/dist/model/sound/NovaSoundEngine.d.ts +3 -2
- package/dist/model/text-selection/NovaTextSelectionService.d.ts +2 -2
- package/dist/model/text-selection/index.d.ts +2 -2
- package/dist/model/text-selection/nova-text-selection.types.d.ts +1 -1
- package/dist/model/theme/NovaGlobalThemeRegistry.d.ts +2 -2
- package/dist/model/theme/NovaThemeService.d.ts +5 -3
- package/dist/model/theme/createTokenTheme.d.ts +15 -0
- package/dist/model/tools/transform-tools.d.ts +43 -0
- package/dist/nodes--Ds4IS2h.js +621 -0
- package/dist/nova-color-parser-BCN_rFRN.js +250 -0
- package/dist/nova-compressed-image-CE2Ya9Xa.js +46 -0
- package/dist/nova-mesh-registry-B7Xz5mhU.js +24 -0
- package/dist/nova-render-texture-image-identity-DQ09XFKs.js +15 -0
- package/dist/nova-text-paint-CcntsRjI.js +48 -0
- package/dist/tokens.d.ts +2 -0
- package/dist/tokens.js +50 -0
- package/dist/vec4-BTNv1fUp.js +20 -0
- package/package.json +223 -4
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
import { Nova3DHelper } from '../helpers/LineHelper.js';
|
|
2
|
+
import { Nova3DScene } from '../model/Scene.js';
|
|
3
|
+
import { Nova3DApp } from '../Nova3DApp.js';
|
|
4
|
+
import { Clock3D, Color3D, Ray3D, TransformPatch3D, Vector3D } from '../types.js';
|
|
5
|
+
import { PhysicsBackend3D, PhysicsBackendWorld3D, PhysicsBodyHandle3D, PhysicsBodyType3D, PhysicsContactPhase3D, PhysicsJointHandle3D, PhysicsJointMotor3D, PhysicsJointType3D, PhysicsShape3D } from './PhysicsBackend.js';
|
|
6
|
+
import { Nova3DInstancedMesh } from '../model/InstancedMesh.js';
|
|
7
|
+
import { Nova3DNode } from '../model/Node.js';
|
|
8
|
+
/** @experimental */
|
|
9
|
+
export interface PhysicsWorldOptions3D {
|
|
10
|
+
backend: PhysicsBackend3D;
|
|
11
|
+
/** m/s²; default `[0, -9.81, 0]`. */
|
|
12
|
+
gravity?: Vector3D;
|
|
13
|
+
/** Simulation step in seconds, (0, 1]; default 1/60. */
|
|
14
|
+
fixedStep?: number;
|
|
15
|
+
/** Most fixed steps per update, 1…64; default 4. Time beyond them is dropped. */
|
|
16
|
+
maxSubSteps?: number;
|
|
17
|
+
/** Blends rendered poses between the last two steps by the accumulator remainder; default false. */
|
|
18
|
+
interpolate?: boolean;
|
|
19
|
+
/** `app` follows `app.onUpdate`; `manual` advances only through `update(deltaTime)`. Default `app`. */
|
|
20
|
+
clock?: Clock3D;
|
|
21
|
+
/** Also report `stay` contacts every step; default false. */
|
|
22
|
+
contactStay?: boolean;
|
|
23
|
+
/** Draws every collider as lines; default false. */
|
|
24
|
+
debug?: boolean | PhysicsDebugOptions3D;
|
|
25
|
+
}
|
|
26
|
+
/** @experimental */
|
|
27
|
+
export interface PhysicsDebugOptions3D {
|
|
28
|
+
/** sRGB line colour; defaults to #22ff88. */
|
|
29
|
+
color?: Color3D;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Patch of `body.set`: the surface material of a body.
|
|
33
|
+
* @experimental
|
|
34
|
+
*/
|
|
35
|
+
export interface PhysicsBodyPatch3D {
|
|
36
|
+
/** Coulomb friction coefficient, ≥ 0. */
|
|
37
|
+
friction?: number;
|
|
38
|
+
/** Restitution in [0, 1]. */
|
|
39
|
+
restitution?: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Body settings shared by node and instanced bodies; see `PhysicsBodyDesc3D`.
|
|
43
|
+
* @experimental
|
|
44
|
+
*/
|
|
45
|
+
export interface PhysicsBodyOptions3D {
|
|
46
|
+
/** Default `dynamic`. */
|
|
47
|
+
type?: PhysicsBodyType3D;
|
|
48
|
+
shape: PhysicsShape3D;
|
|
49
|
+
mass?: number;
|
|
50
|
+
linearDamping?: number;
|
|
51
|
+
angularDamping?: number;
|
|
52
|
+
friction?: number;
|
|
53
|
+
restitution?: number;
|
|
54
|
+
gravityScale?: number;
|
|
55
|
+
linearVelocity?: Vector3D;
|
|
56
|
+
angularVelocity?: Vector3D;
|
|
57
|
+
collisionGroup?: number;
|
|
58
|
+
collisionMask?: number;
|
|
59
|
+
sensor?: boolean;
|
|
60
|
+
canSleep?: boolean;
|
|
61
|
+
}
|
|
62
|
+
/** @experimental */
|
|
63
|
+
export interface PhysicsInstancedBodiesOptions3D extends PhysicsBodyOptions3D {
|
|
64
|
+
/** `dynamic` (default) or `static`. */
|
|
65
|
+
type?: 'dynamic' | 'static';
|
|
66
|
+
/** First instance index; default 0. */
|
|
67
|
+
start?: number;
|
|
68
|
+
/** Instance count from `start`; default the mesh count minus `start`. */
|
|
69
|
+
count?: number;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Who owns one side of a contact or ray hit.
|
|
73
|
+
* @experimental
|
|
74
|
+
*/
|
|
75
|
+
export interface PhysicsBodyRef3D {
|
|
76
|
+
readonly handle: PhysicsBodyHandle3D;
|
|
77
|
+
/** The node body, or null for an instance. */
|
|
78
|
+
readonly body: Nova3DPhysicsBody | null;
|
|
79
|
+
/** The instance group, or null for a node body. */
|
|
80
|
+
readonly instances: Nova3DPhysicsInstances | null;
|
|
81
|
+
/** Instance index, or −1 for a node body. */
|
|
82
|
+
readonly index: number;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Contact event; the record and its arrays are reused, so copy what you keep.
|
|
86
|
+
* @experimental
|
|
87
|
+
*/
|
|
88
|
+
export interface PhysicsContact3D {
|
|
89
|
+
readonly phase: PhysicsContactPhase3D;
|
|
90
|
+
readonly a: PhysicsBodyRef3D;
|
|
91
|
+
readonly b: PhysicsBodyRef3D;
|
|
92
|
+
/** World point; normal from `a` to `b`. */
|
|
93
|
+
readonly point: ArrayLike<number>;
|
|
94
|
+
readonly normal: ArrayLike<number>;
|
|
95
|
+
readonly impulse: number;
|
|
96
|
+
readonly sensor: boolean;
|
|
97
|
+
}
|
|
98
|
+
/** @experimental */
|
|
99
|
+
export interface PhysicsHit3D extends PhysicsBodyRef3D {
|
|
100
|
+
readonly point: Vector3D;
|
|
101
|
+
readonly normal: Vector3D;
|
|
102
|
+
readonly distance: number;
|
|
103
|
+
}
|
|
104
|
+
/** @experimental */
|
|
105
|
+
export interface PhysicsRaycastOptions3D {
|
|
106
|
+
maxDistance?: number;
|
|
107
|
+
/** Collision groups the ray sees; default all. */
|
|
108
|
+
mask?: number;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Joint between node bodies; anchors and axes are world-space at creation.
|
|
112
|
+
* @experimental
|
|
113
|
+
*/
|
|
114
|
+
export interface PhysicsJointOptions3D {
|
|
115
|
+
type: PhysicsJointType3D;
|
|
116
|
+
bodyA: Nova3DPhysicsBody;
|
|
117
|
+
/** Second body, or null/omitted for the world. */
|
|
118
|
+
bodyB?: Nova3DPhysicsBody | null;
|
|
119
|
+
/** World pivot; default the origin of `bodyA`. Distance joints use it on `bodyA`. */
|
|
120
|
+
anchor?: Vector3D;
|
|
121
|
+
/** Distance joints: world point on `bodyB` (or the world); default the origin of `bodyB` or the anchor. */
|
|
122
|
+
anchorB?: Vector3D;
|
|
123
|
+
/** Hinge and slider: world axis. Angles and motor speeds measure `bodyB` relative to `bodyA` (the world counts as `bodyB` when omitted). */
|
|
124
|
+
axis?: Vector3D;
|
|
125
|
+
/** Hinge: lower and upper angle in radians; slider: lower and upper offset in metres. */
|
|
126
|
+
limits?: readonly [number, number];
|
|
127
|
+
motor?: PhysicsJointMotor3D;
|
|
128
|
+
/** Distance joints: range in metres; default the current distance for both. */
|
|
129
|
+
minDistance?: number;
|
|
130
|
+
maxDistance?: number;
|
|
131
|
+
collideConnected?: boolean;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* A body bound to one Nova node. Dynamic bodies write the node; kinematic bodies read it.
|
|
135
|
+
* @experimental
|
|
136
|
+
*/
|
|
137
|
+
export declare class Nova3DPhysicsBody {
|
|
138
|
+
protected constructor();
|
|
139
|
+
readonly world: Nova3DPhysicsWorld;
|
|
140
|
+
readonly node: Nova3DNode;
|
|
141
|
+
readonly handle: PhysicsBodyHandle3D;
|
|
142
|
+
readonly shape: PhysicsShape3D;
|
|
143
|
+
private _destroyed;
|
|
144
|
+
private _friction;
|
|
145
|
+
private _restitution;
|
|
146
|
+
/** Coulomb friction coefficient. */
|
|
147
|
+
get friction(): number;
|
|
148
|
+
/** Restitution in [0, 1]. */
|
|
149
|
+
get restitution(): number;
|
|
150
|
+
get destroyed(): boolean;
|
|
151
|
+
get type(): PhysicsBodyType3D;
|
|
152
|
+
get sleeping(): boolean;
|
|
153
|
+
/** Switches the motion type; the node keeps its current pose. */
|
|
154
|
+
setType(type: PhysicsBodyType3D): void;
|
|
155
|
+
getLinearVelocity(): Vector3D;
|
|
156
|
+
setLinearVelocity(velocity: Vector3D): void;
|
|
157
|
+
getAngularVelocity(): Vector3D;
|
|
158
|
+
setAngularVelocity(velocity: Vector3D): void;
|
|
159
|
+
applyForce(force: Vector3D, point?: Vector3D): void;
|
|
160
|
+
applyImpulse(impulse: Vector3D, point?: Vector3D): void;
|
|
161
|
+
applyTorque(torque: Vector3D): void;
|
|
162
|
+
applyTorqueImpulse(impulse: Vector3D): void;
|
|
163
|
+
setMass(mass: number): void;
|
|
164
|
+
/** Patches the surface material; omitted fields keep their value. */
|
|
165
|
+
set(patch: PhysicsBodyPatch3D): void;
|
|
166
|
+
wake(): void;
|
|
167
|
+
/**
|
|
168
|
+
* Teleports body and node to a world pose (`rotation` or `quaternion`); omitted
|
|
169
|
+
* parts keep the current pose. `scale` changes only the node; the collider keeps
|
|
170
|
+
* its shape.
|
|
171
|
+
*/
|
|
172
|
+
setTransform(transform: TransformPatch3D): void;
|
|
173
|
+
/** Removes the body from the world; the node stays. */
|
|
174
|
+
destroy(): void;
|
|
175
|
+
private _backend;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Bodies bound to a range of `InstancedMesh` instances, synced with one `updatePoses` call.
|
|
179
|
+
* @experimental
|
|
180
|
+
*/
|
|
181
|
+
export declare class Nova3DPhysicsInstances {
|
|
182
|
+
protected constructor();
|
|
183
|
+
readonly world: Nova3DPhysicsWorld;
|
|
184
|
+
readonly mesh: Nova3DInstancedMesh;
|
|
185
|
+
readonly start: number;
|
|
186
|
+
readonly count: number;
|
|
187
|
+
readonly type: 'dynamic' | 'static';
|
|
188
|
+
readonly shape: PhysicsShape3D;
|
|
189
|
+
private _destroyed;
|
|
190
|
+
get destroyed(): boolean;
|
|
191
|
+
/** Backend handle of instance `start + offset`. */
|
|
192
|
+
handle(offset: number): PhysicsBodyHandle3D;
|
|
193
|
+
/** Whether the body of instance `start + offset` sleeps. */
|
|
194
|
+
getSleeping(offset: number): boolean;
|
|
195
|
+
applyImpulse(offset: number, impulse: Vector3D, point?: Vector3D): void;
|
|
196
|
+
setLinearVelocity(offset: number, velocity: Vector3D): void;
|
|
197
|
+
/**
|
|
198
|
+
* Teleports the body of instance `start + offset` to a world pose; omitted parts
|
|
199
|
+
* keep the current pose. `scale` changes only the instance; the collider keeps its shape.
|
|
200
|
+
*/
|
|
201
|
+
setTransform(offset: number, transform: TransformPatch3D): void;
|
|
202
|
+
destroy(): void;
|
|
203
|
+
private _check;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* A joint between node bodies.
|
|
207
|
+
* @experimental
|
|
208
|
+
*/
|
|
209
|
+
export declare class Nova3DPhysicsJoint {
|
|
210
|
+
protected constructor();
|
|
211
|
+
readonly world: Nova3DPhysicsWorld;
|
|
212
|
+
readonly type: PhysicsJointType3D;
|
|
213
|
+
readonly handle: PhysicsJointHandle3D;
|
|
214
|
+
readonly bodyA: Nova3DPhysicsBody;
|
|
215
|
+
readonly bodyB: Nova3DPhysicsBody | null;
|
|
216
|
+
private _destroyed;
|
|
217
|
+
get destroyed(): boolean;
|
|
218
|
+
/** Hinge and slider joints; null turns the motor off. */
|
|
219
|
+
setMotor(motor: PhysicsJointMotor3D | null): void;
|
|
220
|
+
destroy(): void;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Binds a physics backend world to a Nova scene: fixed-step accumulator on the app
|
|
224
|
+
* clock, optional interpolation, node and instance sync, contacts, raycasts and debug
|
|
225
|
+
* lines.
|
|
226
|
+
* @experimental
|
|
227
|
+
*/
|
|
228
|
+
export declare class Nova3DPhysicsWorld {
|
|
229
|
+
protected constructor();
|
|
230
|
+
private readonly _app;
|
|
231
|
+
readonly scene: Nova3DScene;
|
|
232
|
+
readonly backend: PhysicsBackend3D;
|
|
233
|
+
readonly fixedStep: number;
|
|
234
|
+
readonly maxSubSteps: number;
|
|
235
|
+
readonly interpolate: boolean;
|
|
236
|
+
readonly clock: Clock3D;
|
|
237
|
+
private _destroyed;
|
|
238
|
+
private _paused;
|
|
239
|
+
private _accumulator;
|
|
240
|
+
/** Time handed to `_advance`; a field so the call never boxes it. */
|
|
241
|
+
private _delta;
|
|
242
|
+
private _steps;
|
|
243
|
+
private _awake;
|
|
244
|
+
private _lease;
|
|
245
|
+
private readonly _cleanup;
|
|
246
|
+
private readonly _listeners;
|
|
247
|
+
/** Snapshot of `_listeners`, rebuilt on change, iterated without allocation. */
|
|
248
|
+
private _listenerList;
|
|
249
|
+
private _capacity;
|
|
250
|
+
private _bodies;
|
|
251
|
+
private _kinds;
|
|
252
|
+
private _previous;
|
|
253
|
+
private _current;
|
|
254
|
+
private _written;
|
|
255
|
+
private _kinematicStart;
|
|
256
|
+
private _kinematicEnd;
|
|
257
|
+
private readonly _freeSlots;
|
|
258
|
+
private _slotCount;
|
|
259
|
+
private _kinematicCount;
|
|
260
|
+
private readonly _instances;
|
|
261
|
+
private readonly _boundNodes;
|
|
262
|
+
/** Handle → owner index · 2²² + instance offset. */
|
|
263
|
+
private readonly _lookup;
|
|
264
|
+
private readonly _owners;
|
|
265
|
+
private readonly _freeOwners;
|
|
266
|
+
private _debug;
|
|
267
|
+
private readonly _matrix;
|
|
268
|
+
private readonly _inverse;
|
|
269
|
+
private readonly _rotation;
|
|
270
|
+
private readonly _pose;
|
|
271
|
+
/** Blend weight read by `blendPose`, kept in an array so no call boxes it. */
|
|
272
|
+
private readonly _weight;
|
|
273
|
+
private readonly _position;
|
|
274
|
+
private readonly _quaternion;
|
|
275
|
+
private readonly _patch;
|
|
276
|
+
private readonly _rayHit;
|
|
277
|
+
private readonly _refA;
|
|
278
|
+
private readonly _refB;
|
|
279
|
+
private readonly _contact;
|
|
280
|
+
private readonly _onEvent;
|
|
281
|
+
private readonly _onFrame;
|
|
282
|
+
get destroyed(): boolean;
|
|
283
|
+
get paused(): boolean;
|
|
284
|
+
/** Remainder of the accumulator as a fraction of `fixedStep`, the interpolation factor. */
|
|
285
|
+
get alpha(): number;
|
|
286
|
+
/** Fixed steps taken since creation. */
|
|
287
|
+
get stepCount(): number;
|
|
288
|
+
/** Debug line helper when the world was created with `debug`. */
|
|
289
|
+
get debug(): Nova3DHelper | null;
|
|
290
|
+
setPaused(paused: boolean): void;
|
|
291
|
+
getGravity(): Vector3D;
|
|
292
|
+
setGravity(gravity: Vector3D): void;
|
|
293
|
+
/**
|
|
294
|
+
* Binds a body to `node` at the node's world pose (scale is not applied to the shape).
|
|
295
|
+
* Dynamic bodies write the node's local position and rotation after every update;
|
|
296
|
+
* kinematic bodies follow the node; static bodies keep their pose until `setTransform`.
|
|
297
|
+
* Owned by the world: destroyed with it or with its node.
|
|
298
|
+
*/
|
|
299
|
+
createBody(node: Nova3DNode, options: PhysicsBodyOptions3D): Nova3DPhysicsBody;
|
|
300
|
+
/**
|
|
301
|
+
* Creates one body per instance of `mesh` in `[start, start + count)` at the current
|
|
302
|
+
* instance poses. After every update the poses are written back with one
|
|
303
|
+
* `updatePoses` call; instance scale is kept. No objects are created per body.
|
|
304
|
+
* Owned by the world: destroyed with it or with its node.
|
|
305
|
+
*/
|
|
306
|
+
createInstancedBodies(mesh: Nova3DInstancedMesh, options: PhysicsInstancedBodiesOptions3D): Nova3DPhysicsInstances;
|
|
307
|
+
/** Owned by the world: destroyed with it or with either body. */
|
|
308
|
+
createJoint(options: PhysicsJointOptions3D): Nova3DPhysicsJoint;
|
|
309
|
+
/** Listens to contact events after every fixed step; the record is reused between calls. */
|
|
310
|
+
onContact(listener: (contact: PhysicsContact3D) => void): () => void;
|
|
311
|
+
/** Nearest body hit along the ray, in world space. */
|
|
312
|
+
raycast(ray: Ray3D, options?: PhysicsRaycastOptions3D): PhysicsHit3D | null;
|
|
313
|
+
/** Manual clock: advances by `deltaTime` seconds through the fixed-step accumulator. */
|
|
314
|
+
update(deltaTime: number): void;
|
|
315
|
+
destroy(): void;
|
|
316
|
+
private _describe;
|
|
317
|
+
private _register;
|
|
318
|
+
private _unregister;
|
|
319
|
+
private _resolveRef;
|
|
320
|
+
private _reserve;
|
|
321
|
+
/** Runs whole fixed steps for the accumulated time, then syncs nodes and instances. */
|
|
322
|
+
private _advance;
|
|
323
|
+
/** Reads the world pose of every kinematic node once per update. */
|
|
324
|
+
private _readKinematicNodes;
|
|
325
|
+
/** Targets the share `t` of this update's kinematic motion. */
|
|
326
|
+
private _driveKinematic;
|
|
327
|
+
private _finishKinematic;
|
|
328
|
+
/** Reads dynamic poses into `previous` (before the last step) or `current`. */
|
|
329
|
+
private _readPoses;
|
|
330
|
+
/** Writes rendered poses to nodes and instance meshes, and refreshes debug lines. */
|
|
331
|
+
private _sync;
|
|
332
|
+
/** Converts a world pose to the node's local transform and writes position and rotation. */
|
|
333
|
+
private _writeNode;
|
|
334
|
+
/** World position and rotation of a node; scale is dropped. */
|
|
335
|
+
private _readNodePose;
|
|
336
|
+
/** Loads the mesh world matrix and its inverse; returns whether it is the identity. */
|
|
337
|
+
private _meshWorld;
|
|
338
|
+
/** Instance-local pose (10-stride) to a world pose, with the loaded mesh matrix. */
|
|
339
|
+
private _toWorld;
|
|
340
|
+
/** World pose to instance-local (10-stride), with the loaded inverse; returns whether it changed. */
|
|
341
|
+
private _toMesh;
|
|
342
|
+
private _syncLease;
|
|
343
|
+
private _assertBody;
|
|
344
|
+
private _assertAlive;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Creates a physics world for `scene`. The backend world is created and owned
|
|
348
|
+
* here; destroying the app or the scene destroys the world.
|
|
349
|
+
* Owned by the scene's app: destroyed with the scene or the app.
|
|
350
|
+
* @experimental
|
|
351
|
+
*/
|
|
352
|
+
export declare function createPhysicsWorld(scene: Nova3DScene, options: PhysicsWorldOptions3D): Nova3DPhysicsWorld;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Leaf3D } from './BasicShapes.js';
|
|
2
|
+
/**
|
|
3
|
+
* Leaf pose: position xyz, then the row-major rotation matrix. @internal
|
|
4
|
+
*/
|
|
5
|
+
export type LeafTransform3D = Float64Array;
|
|
6
|
+
/**
|
|
7
|
+
* Contact generation of the reference backend. Every routine appends points with a
|
|
8
|
+
* normal from the first collider to the second and a signed separation (negative
|
|
9
|
+
* when penetrating). Points within `margin` are kept as speculative contacts.
|
|
10
|
+
*
|
|
11
|
+
* Hot helpers exchange numbers through typed-array scratch and fields instead of
|
|
12
|
+
* double arguments and return values, so optimized code never boxes a number and a
|
|
13
|
+
* step allocates nothing.
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare class BasicNarrowphase {
|
|
17
|
+
/** Points of the last `collide` calls: position xyz, normal xyz, separation. */
|
|
18
|
+
count: number;
|
|
19
|
+
points: Float64Array<ArrayBuffer>;
|
|
20
|
+
/** Gap within which contacts are generated, metres. */
|
|
21
|
+
margin: number;
|
|
22
|
+
private readonly _hullA;
|
|
23
|
+
private readonly _hullB;
|
|
24
|
+
private _clipA;
|
|
25
|
+
private _clipB;
|
|
26
|
+
/** Reduction scratch: candidates (xyz, separation) collected before keeping four. */
|
|
27
|
+
private _candidates;
|
|
28
|
+
private readonly _stack;
|
|
29
|
+
private readonly _meshMin;
|
|
30
|
+
private readonly _meshMax;
|
|
31
|
+
/** −1 when the routine's first collider is the pair's second body. */
|
|
32
|
+
private _sign;
|
|
33
|
+
/** Radius of the current segment collider. */
|
|
34
|
+
private _radius;
|
|
35
|
+
/** Point to push: xyz, normal xyz, separation. */
|
|
36
|
+
private readonly _q;
|
|
37
|
+
/** Current segment collider: start xyz, end xyz. */
|
|
38
|
+
private readonly _s;
|
|
39
|
+
/** Closest-segments input p1 q1 p2 q2 and output c1 c2. */
|
|
40
|
+
private readonly _seg;
|
|
41
|
+
private readonly _c;
|
|
42
|
+
private readonly _axis;
|
|
43
|
+
private readonly _normal;
|
|
44
|
+
private readonly _clipPlane;
|
|
45
|
+
/** Collides two leaves with world poses `ta` and `tb`, appending to `points`. */
|
|
46
|
+
collide(a: Leaf3D, ta: LeafTransform3D, b: Leaf3D, tb: LeafTransform3D): void;
|
|
47
|
+
/** Grows clip buffers for hulls with `faceVertices` vertices on one face. */
|
|
48
|
+
reserve(faceVertices: number): void;
|
|
49
|
+
/** Appends `_q`, flipping the normal for swapped colliders. */
|
|
50
|
+
private _push;
|
|
51
|
+
private _loadSegment;
|
|
52
|
+
private _segmentSegment;
|
|
53
|
+
/** Closest points c1, c2 between segments p1q1 and p2q2 of `_seg` (Ericson 5.1.9). */
|
|
54
|
+
private _closestSegments;
|
|
55
|
+
/** Writes hull vertices `a`, `b` and the current segment into `_seg`. */
|
|
56
|
+
private _loadEdgeAndSegment;
|
|
57
|
+
/** Hull first, the loaded segment of `_radius` second. */
|
|
58
|
+
private _hullSegment;
|
|
59
|
+
/**
|
|
60
|
+
* Clips the loaded segment to the prism of a face and pushes its ends.
|
|
61
|
+
* Without any clipped point, pushes the deeper segment end when `fallback`.
|
|
62
|
+
*/
|
|
63
|
+
private _segmentOnFace;
|
|
64
|
+
/** Exact closest points when the segment core lies outside the hull. */
|
|
65
|
+
private _hullSegmentSeparated;
|
|
66
|
+
private _hullHull;
|
|
67
|
+
/** Clips the incident face of `incident` against reference face `face` of `reference`. */
|
|
68
|
+
private _faceContact;
|
|
69
|
+
private _reserveCandidates;
|
|
70
|
+
/** Pushes candidates sharing `_normal`, reduced to the deepest four that span the most area. */
|
|
71
|
+
private _pushReduced;
|
|
72
|
+
private _plane;
|
|
73
|
+
/** Triangles of a static mesh against a convex leaf; triangles act as the first collider. */
|
|
74
|
+
private _mesh;
|
|
75
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PhysicsBackend3D } from '../PhysicsBackend.js';
|
|
2
|
+
/**
|
|
3
|
+
* Tuning of the reference backend; the defaults suit metre-scale scenes at 60 Hz.
|
|
4
|
+
* @experimental
|
|
5
|
+
*/
|
|
6
|
+
export interface BasicPhysicsOptions3D {
|
|
7
|
+
/** Sequential-impulse iterations per step, 1…100; default 10. */
|
|
8
|
+
velocityIterations?: number;
|
|
9
|
+
/** Share of penetration removed per step by split impulses, (0, 1]; default 0.2. Joints use it as Baumgarte factor. */
|
|
10
|
+
positionCorrection?: number;
|
|
11
|
+
/** Penetration left unresolved to keep contacts persistent, metres; default 0.005. */
|
|
12
|
+
linearSlop?: number;
|
|
13
|
+
/** Gap within which contacts are generated ahead of impact, metres; default 0.02. */
|
|
14
|
+
speculativeDistance?: number;
|
|
15
|
+
/** Approach speed below which restitution is ignored, m/s; default 0.5. */
|
|
16
|
+
restitutionThreshold?: number;
|
|
17
|
+
/** Speeds below which a body counts as resting; defaults 0.05 m/s and 0.05 rad/s. */
|
|
18
|
+
sleepLinearVelocity?: number;
|
|
19
|
+
sleepAngularVelocity?: number;
|
|
20
|
+
/** Seconds an island must rest before it sleeps; default 0.5. */
|
|
21
|
+
timeToSleep?: number;
|
|
22
|
+
}
|
|
23
|
+
/** @experimental */
|
|
24
|
+
export declare function createBasicPhysics(options?: BasicPhysicsOptions3D): PhysicsBackend3D;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { PhysicsShape3D } from '../PhysicsBackend.js';
|
|
2
|
+
/** Leaf collider kinds of the reference backend. A sphere is a capsule of zero length. */
|
|
3
|
+
export declare const SPHERE = 0;
|
|
4
|
+
export declare const CAPSULE = 1;
|
|
5
|
+
export declare const HULL = 2;
|
|
6
|
+
export declare const PLANE = 3;
|
|
7
|
+
export declare const MESH = 4;
|
|
8
|
+
/**
|
|
9
|
+
* Convex polyhedron with outward faces (counter-clockwise loops seen from outside),
|
|
10
|
+
* unique undirected edges and unique edge directions (parallel edges share one).
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export interface Hull3D {
|
|
14
|
+
readonly vertexCount: number;
|
|
15
|
+
readonly vertices: Float64Array;
|
|
16
|
+
readonly faceCount: number;
|
|
17
|
+
readonly normals: Float64Array;
|
|
18
|
+
readonly offsets: Float64Array;
|
|
19
|
+
readonly faceStart: Int32Array;
|
|
20
|
+
readonly faceIndices: Int32Array;
|
|
21
|
+
readonly edgeCount: number;
|
|
22
|
+
readonly edges: Int32Array;
|
|
23
|
+
readonly edgeDirCount: number;
|
|
24
|
+
readonly edgeDirs: Float64Array;
|
|
25
|
+
/** Unique direction index per edge. */
|
|
26
|
+
readonly edgeDirOf: Int32Array;
|
|
27
|
+
readonly min: Float64Array;
|
|
28
|
+
readonly max: Float64Array;
|
|
29
|
+
}
|
|
30
|
+
/** Static triangle soup with a median-split AABB tree. @internal */
|
|
31
|
+
export interface TriMesh3D {
|
|
32
|
+
readonly positions: Float64Array;
|
|
33
|
+
readonly indices: Int32Array;
|
|
34
|
+
readonly triangleCount: number;
|
|
35
|
+
/** Per node: min xyz, max xyz. */
|
|
36
|
+
readonly nodeBounds: Float64Array;
|
|
37
|
+
/** Per node: the right child (inner; the left child is `node + 1`) or the first triangle slot (leaf). */
|
|
38
|
+
readonly nodeStart: Int32Array;
|
|
39
|
+
/** Per node: 0 for inner nodes, the triangle count for leaves. */
|
|
40
|
+
readonly nodeCount: Int32Array;
|
|
41
|
+
/** Triangle ids in leaf order. */
|
|
42
|
+
readonly order: Int32Array;
|
|
43
|
+
readonly min: Float64Array;
|
|
44
|
+
readonly max: Float64Array;
|
|
45
|
+
}
|
|
46
|
+
/** One convex or static collider in the body frame. @internal */
|
|
47
|
+
export interface Leaf3D {
|
|
48
|
+
readonly kind: number;
|
|
49
|
+
readonly radius: number;
|
|
50
|
+
readonly halfHeight: number;
|
|
51
|
+
readonly hull: Hull3D | null;
|
|
52
|
+
readonly mesh: TriMesh3D | null;
|
|
53
|
+
readonly planeNormal: Float64Array;
|
|
54
|
+
readonly planeOffset: number;
|
|
55
|
+
/** Offset and rotation in the body frame. */
|
|
56
|
+
readonly position: Float64Array;
|
|
57
|
+
readonly quaternion: Float64Array;
|
|
58
|
+
readonly identity: boolean;
|
|
59
|
+
/** Bounds in the leaf frame. */
|
|
60
|
+
readonly min: Float64Array;
|
|
61
|
+
readonly max: Float64Array;
|
|
62
|
+
readonly volume: number;
|
|
63
|
+
}
|
|
64
|
+
/** Built collider of one body description. @internal */
|
|
65
|
+
export interface BodyShape3D {
|
|
66
|
+
readonly type: PhysicsShape3D['type'];
|
|
67
|
+
readonly leaves: readonly Leaf3D[];
|
|
68
|
+
/** Inertia per unit mass about the body origin: xx yy zz xy xz yz. */
|
|
69
|
+
readonly unitInertia: Float64Array;
|
|
70
|
+
/** Contains a plane or a triangle mesh. */
|
|
71
|
+
readonly staticOnly: boolean;
|
|
72
|
+
/** Largest hull vertex count, for scratch sizing. */
|
|
73
|
+
readonly maxHullVertices: number;
|
|
74
|
+
readonly maxHullFaces: number;
|
|
75
|
+
readonly maxHullEdgeDirs: number;
|
|
76
|
+
}
|
|
77
|
+
/** Builds a hull from vertex loops; normals come from Newell's method and are oriented outward. */
|
|
78
|
+
export declare function buildHull(points: ArrayLike<number>, loops: readonly (readonly number[])[]): Hull3D;
|
|
79
|
+
export declare function boxHull(hx: number, hy: number, hz: number): Hull3D;
|
|
80
|
+
/** Prism approximation of a cylinder along +Y; the reference backend collides with it. */
|
|
81
|
+
export declare function cylinderHull(radius: number, halfHeight: number, segments?: number): Hull3D;
|
|
82
|
+
/** Incremental convex hull with coplanar triangles merged into polygons. */
|
|
83
|
+
export declare function convexHull(input: ArrayLike<number>): Hull3D;
|
|
84
|
+
export declare function buildTriMesh(positions: ArrayLike<number>, indices?: ArrayLike<number>): TriMesh3D;
|
|
85
|
+
/** Visits triangles whose bounds overlap the box, with a caller-owned stack. */
|
|
86
|
+
export declare function queryTriMesh(mesh: TriMesh3D, min: ArrayLike<number>, max: ArrayLike<number>, stack: Int32Array, visit: (triangle: number) => void): void;
|
|
87
|
+
/** Writes the row-major rotation matrix of a unit quaternion at `out[offset…offset + 8]`. */
|
|
88
|
+
export declare function quaternionMatrix(out: Float64Array, offset: number, x: number, y: number, z: number, w: number): void;
|
|
89
|
+
/** Builds and validates the collider of a body description. @internal */
|
|
90
|
+
export declare function buildBodyShape(shape: PhysicsShape3D): BodyShape3D;
|
|
91
|
+
/** Ray hit in a leaf frame. @internal */
|
|
92
|
+
export interface LocalRayHit3D {
|
|
93
|
+
t: number;
|
|
94
|
+
nx: number;
|
|
95
|
+
ny: number;
|
|
96
|
+
nz: number;
|
|
97
|
+
}
|
|
98
|
+
/** Ray against a sphere-swept segment from (0, −h, 0) to (0, h, 0). */
|
|
99
|
+
export declare function rayCapsule(ox: number, oy: number, oz: number, dx: number, dy: number, dz: number, radius: number, h: number, maxT: number, out: LocalRayHit3D): boolean;
|
|
100
|
+
/** Ray against a convex hull by clipping the ray with every face plane. */
|
|
101
|
+
export declare function rayHull(hull: Hull3D, ox: number, oy: number, oz: number, dx: number, dy: number, dz: number, maxT: number, out: LocalRayHit3D): boolean;
|
|
102
|
+
/** Möller–Trumbore against both triangle sides; the normal faces the ray origin. */
|
|
103
|
+
export declare function rayTriangle(mesh: TriMesh3D, triangle: number, ox: number, oy: number, oz: number, dx: number, dy: number, dz: number, maxT: number, out: LocalRayHit3D): boolean;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { PhysicsContactEvent3D } from '../PhysicsBackend.js';
|
|
2
|
+
export declare class ContactBuffer {
|
|
3
|
+
private readonly _limit;
|
|
4
|
+
private readonly _stay;
|
|
5
|
+
private readonly _state;
|
|
6
|
+
private readonly _seen;
|
|
7
|
+
private readonly _phase;
|
|
8
|
+
private readonly _a;
|
|
9
|
+
private readonly _b;
|
|
10
|
+
private readonly _data;
|
|
11
|
+
private readonly _sensor;
|
|
12
|
+
private readonly _order;
|
|
13
|
+
private readonly _active;
|
|
14
|
+
private _activeCount;
|
|
15
|
+
private readonly _point;
|
|
16
|
+
private readonly _normal;
|
|
17
|
+
private readonly _event;
|
|
18
|
+
private _count;
|
|
19
|
+
private _events;
|
|
20
|
+
private _overflow;
|
|
21
|
+
private readonly _mask;
|
|
22
|
+
constructor(_limit: number, _stay: boolean);
|
|
23
|
+
beginStep(): void;
|
|
24
|
+
touch(a: number, b: number, px: number, py: number, pz: number, nx: number, ny: number, nz: number, impulse: number, sensor: boolean): void;
|
|
25
|
+
finishStep(): void;
|
|
26
|
+
drain(visitor: (event: PhysicsContactEvent3D) => void): void;
|
|
27
|
+
removeBody(handle: number): void;
|
|
28
|
+
get size(): number;
|
|
29
|
+
private _greater;
|
|
30
|
+
private _swap;
|
|
31
|
+
private _sink;
|
|
32
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PhysicsBackend3D } from '../PhysicsBackend.js';
|
|
2
|
+
/**
|
|
3
|
+
* Настройки независимых миров, создаваемых бэкендом.
|
|
4
|
+
* @experimental
|
|
5
|
+
*/
|
|
6
|
+
export interface RapierBackendOptions3D {
|
|
7
|
+
/** Вместимость буфера пар одного мира; по умолчанию 8192. */
|
|
8
|
+
readonly maxContactPairs?: number;
|
|
9
|
+
/** CCD для динамических тел; по умолчанию true. */
|
|
10
|
+
readonly ccd?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Загружает Rapier/WASM по явному запросу и возвращает бэкенд для createPhysicsWorld.
|
|
14
|
+
* Каждый созданный мир владеет своими телами, памятью и жизненным циклом.
|
|
15
|
+
* @experimental
|
|
16
|
+
*/
|
|
17
|
+
export declare function createRapierBackend(options?: RapierBackendOptions3D): Promise<PhysicsBackend3D>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PhysicsShape3D } from '../PhysicsBackend.js';
|
|
2
|
+
import type * as Rapier from '@dimforge/rapier3d-compat';
|
|
3
|
+
export type RapierAPI = typeof Rapier;
|
|
4
|
+
export declare function colliderDescription(api: RapierAPI, shape: PhysicsShape3D, moving: boolean): Rapier.ColliderDesc;
|