@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,260 @@
|
|
|
1
|
+
import { Nova3DNode } from '../model/Node.js';
|
|
2
|
+
import { Nova3DApp } from '../Nova3DApp.js';
|
|
3
|
+
import { Clock3D } from '../types.js';
|
|
4
|
+
import { AnimationChannel3D, AnimationTrack3D, TrackCursor3D, Nova3DAnimationClip } from './Clip.js';
|
|
5
|
+
import { Nova3DAnimationMask } from './Mask.js';
|
|
6
|
+
/** @experimental */
|
|
7
|
+
export interface AnimatorOptions3D {
|
|
8
|
+
/** Subtree whose nodes the clips animate (tracks name nodes by id). */
|
|
9
|
+
root: Nova3DNode;
|
|
10
|
+
/** 'app' (default) advances with app frames; 'manual' waits for `update(deltaTime)`. */
|
|
11
|
+
clock?: Clock3D;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* `once` clamps, `repeat` wraps, `ping-pong` alternates direction each repetition.
|
|
15
|
+
* @experimental
|
|
16
|
+
*/
|
|
17
|
+
export type AnimationLoopMode3D = 'once' | 'repeat' | 'ping-pong';
|
|
18
|
+
/**
|
|
19
|
+
* `overwrite` blends toward the clip pose, `additive` adds clip deltas on top.
|
|
20
|
+
* @experimental
|
|
21
|
+
*/
|
|
22
|
+
export type AnimationBlendMode3D = 'overwrite' | 'additive';
|
|
23
|
+
/** @experimental */
|
|
24
|
+
export interface AnimationPlayOptions3D {
|
|
25
|
+
/** `true` = `repeat`, `false` = `once`; default `repeat`. */
|
|
26
|
+
loop?: boolean | AnimationLoopMode3D;
|
|
27
|
+
/** Repetitions for `repeat`/`ping-pong` (positive integer or Infinity, default Infinity). */
|
|
28
|
+
repetitions?: number;
|
|
29
|
+
/** Keep the last pose after finishing (default true); otherwise the action contributes no weight. */
|
|
30
|
+
clampWhenFinished?: boolean;
|
|
31
|
+
speed?: number;
|
|
32
|
+
weight?: number;
|
|
33
|
+
fadeIn?: number;
|
|
34
|
+
/** Blend layer 0..1023; higher layers are applied on top of lower ones (default 0). */
|
|
35
|
+
layer?: number;
|
|
36
|
+
blend?: AnimationBlendMode3D;
|
|
37
|
+
/** Restricts the action to the channels accepted by the mask. */
|
|
38
|
+
mask?: Nova3DAnimationMask;
|
|
39
|
+
}
|
|
40
|
+
/** @experimental */
|
|
41
|
+
export interface AnimationCrossFadeOptions3D {
|
|
42
|
+
/** Warps both time scales so the clip durations meet during the fade (three.js `warp`). */
|
|
43
|
+
warp?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Options of `action.stop`.
|
|
47
|
+
* @experimental
|
|
48
|
+
*/
|
|
49
|
+
export interface AnimationStopOptions3D {
|
|
50
|
+
/** Seconds to fade the weight out before the action ends; default 0 (at once). */
|
|
51
|
+
fadeOut?: number;
|
|
52
|
+
}
|
|
53
|
+
/** Hook used by graphs to update action state on each animator advance. @internal */
|
|
54
|
+
export interface AnimationDriver3D {
|
|
55
|
+
}
|
|
56
|
+
interface ChannelSlot3D {
|
|
57
|
+
readonly node: Nova3DNode;
|
|
58
|
+
readonly channel: AnimationChannel3D;
|
|
59
|
+
/** Channel as a number: 0 position, 1 quaternion, 2 scale, 3 morph weights. */
|
|
60
|
+
readonly code: number;
|
|
61
|
+
/** Running blend result; holds the logical base once `based` equals the evaluation. */
|
|
62
|
+
readonly value: Float64Array;
|
|
63
|
+
/** Evaluation whose base (or a full overwrite) `value` holds. */
|
|
64
|
+
based: number;
|
|
65
|
+
readonly sum: Float64Array;
|
|
66
|
+
readonly morphBase?: Float64Array;
|
|
67
|
+
reference?: Float64Array;
|
|
68
|
+
weight: number;
|
|
69
|
+
stamp: number;
|
|
70
|
+
contributed: boolean;
|
|
71
|
+
}
|
|
72
|
+
interface TrackBinding3D {
|
|
73
|
+
readonly node: Nova3DNode;
|
|
74
|
+
readonly track: AnimationTrack3D;
|
|
75
|
+
readonly sample: Float64Array;
|
|
76
|
+
readonly cursor: TrackCursor3D;
|
|
77
|
+
slot?: ChannelSlot3D;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* One independently anchored clip action, with explicit fades, warps and pause state.
|
|
81
|
+
* @experimental
|
|
82
|
+
*/
|
|
83
|
+
export declare class Nova3DAnimationAction {
|
|
84
|
+
protected constructor();
|
|
85
|
+
private readonly _animator;
|
|
86
|
+
private readonly _clip;
|
|
87
|
+
private _anchorTime;
|
|
88
|
+
private _anchorClip;
|
|
89
|
+
private _paused?;
|
|
90
|
+
private _speed;
|
|
91
|
+
private _weight;
|
|
92
|
+
private _loop;
|
|
93
|
+
private _repetitions;
|
|
94
|
+
private readonly _clamp;
|
|
95
|
+
private _fadeFrom;
|
|
96
|
+
private _fadeTo;
|
|
97
|
+
private _fadeStart;
|
|
98
|
+
private _fadeDuration;
|
|
99
|
+
private _terminal;
|
|
100
|
+
private _warping;
|
|
101
|
+
private _warpFrom;
|
|
102
|
+
private _warpTo;
|
|
103
|
+
private _warpStart;
|
|
104
|
+
private _warpDuration;
|
|
105
|
+
private _iteration;
|
|
106
|
+
private _finishedSeen;
|
|
107
|
+
private _loopListeners;
|
|
108
|
+
private _finishedListeners;
|
|
109
|
+
private _ended;
|
|
110
|
+
/** Immutable clip played by this action. */
|
|
111
|
+
get clip(): Nova3DAnimationClip;
|
|
112
|
+
/** Current clip time in seconds after loop mapping. */
|
|
113
|
+
get time(): number;
|
|
114
|
+
/** Requested weight before fades. */
|
|
115
|
+
get weight(): number;
|
|
116
|
+
/** Weight after fades and finish handling at the animator time. */
|
|
117
|
+
get effectiveWeight(): number;
|
|
118
|
+
get speed(): number;
|
|
119
|
+
get layer(): number;
|
|
120
|
+
get blend(): AnimationBlendMode3D;
|
|
121
|
+
get loop(): AnimationLoopMode3D;
|
|
122
|
+
get repetitions(): number;
|
|
123
|
+
get paused(): boolean;
|
|
124
|
+
/** Whether the final repetition has been reached at the animator time. */
|
|
125
|
+
get finished(): boolean;
|
|
126
|
+
pause(): void;
|
|
127
|
+
resume(): void;
|
|
128
|
+
/** Sets the unwrapped action time; repetitions count from 0. Events are re-synced silently. */
|
|
129
|
+
seek(time: number): void;
|
|
130
|
+
setWeight(weight: number): void;
|
|
131
|
+
setSpeed(speed: number): void;
|
|
132
|
+
/**
|
|
133
|
+
* Changes loop mode and repetitions while keeping the unwrapped time.
|
|
134
|
+
* @experimental
|
|
135
|
+
*/
|
|
136
|
+
setLoop(loop: boolean | AnimationLoopMode3D, repetitions?: number): void;
|
|
137
|
+
/**
|
|
138
|
+
* Fades the envelope from its current value to 1 (non-terminal).
|
|
139
|
+
* @experimental
|
|
140
|
+
*/
|
|
141
|
+
fadeIn(duration: number): void;
|
|
142
|
+
/**
|
|
143
|
+
* Fades the envelope to 0 but keeps the action and its channels (non-terminal).
|
|
144
|
+
* @experimental
|
|
145
|
+
*/
|
|
146
|
+
fadeOut(duration: number): void;
|
|
147
|
+
/**
|
|
148
|
+
* Fades this action out (from its current envelope) and `next` in from zero over
|
|
149
|
+
* `duration` seconds on the animator clock; neither action is stopped. With `warp`, time scales
|
|
150
|
+
* meet as three.js `crossFadeTo(next, duration, true)`.
|
|
151
|
+
* @experimental
|
|
152
|
+
*/
|
|
153
|
+
crossFadeTo(next: Nova3DAnimationAction, duration: number, options?: AnimationCrossFadeOptions3D): void;
|
|
154
|
+
/**
|
|
155
|
+
* Linearly changes the time-scale multiplier from `start` to `end` over `duration`.
|
|
156
|
+
* @experimental
|
|
157
|
+
*/
|
|
158
|
+
warp(start: number, end: number, duration: number): void;
|
|
159
|
+
/**
|
|
160
|
+
* Freezes the current warp multiplier into the speed and ends the warp.
|
|
161
|
+
* @experimental
|
|
162
|
+
*/
|
|
163
|
+
stopWarping(): void;
|
|
164
|
+
/**
|
|
165
|
+
* Each repetition change (`repeat` and `ping-pong` loops); returns unsubscribe.
|
|
166
|
+
* @experimental
|
|
167
|
+
*/
|
|
168
|
+
onLoop(listener: (action: Nova3DAnimationAction) => void): () => void;
|
|
169
|
+
/**
|
|
170
|
+
* The action reached its end (`once`, or the last repetition); returns unsubscribe.
|
|
171
|
+
* @experimental
|
|
172
|
+
*/
|
|
173
|
+
onFinished(listener: (action: Nova3DAnimationAction) => void): () => void;
|
|
174
|
+
private _listen;
|
|
175
|
+
stop(options?: AnimationStopOptions3D): void;
|
|
176
|
+
private _syncEvents;
|
|
177
|
+
private _reanchor;
|
|
178
|
+
private _fade;
|
|
179
|
+
private _setFade;
|
|
180
|
+
private _setWarp;
|
|
181
|
+
private _envelope;
|
|
182
|
+
private _warpScale;
|
|
183
|
+
/** Integral of the warp multiplier from the warp start to `time` (closed form, deterministic). */
|
|
184
|
+
private _warpIntegral;
|
|
185
|
+
private _rawTime;
|
|
186
|
+
private _clipTime;
|
|
187
|
+
private _iterationOf;
|
|
188
|
+
private _isFinished;
|
|
189
|
+
private _assertAlive;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Owns evaluated transform channels and borrows the existing Raph app loop.
|
|
193
|
+
* @experimental
|
|
194
|
+
*/
|
|
195
|
+
export declare class Nova3DAnimator {
|
|
196
|
+
protected constructor();
|
|
197
|
+
private readonly _app;
|
|
198
|
+
private readonly _list;
|
|
199
|
+
private _ordered;
|
|
200
|
+
private _groupEnds;
|
|
201
|
+
private _poses;
|
|
202
|
+
private _morphSlots;
|
|
203
|
+
private _touched;
|
|
204
|
+
private readonly _morphClaimed;
|
|
205
|
+
private readonly _claimed;
|
|
206
|
+
private readonly _drivers;
|
|
207
|
+
private readonly _eventActions;
|
|
208
|
+
private readonly _eventKinds;
|
|
209
|
+
private readonly _cleanup;
|
|
210
|
+
private _lease?;
|
|
211
|
+
private _time;
|
|
212
|
+
private _timeScale;
|
|
213
|
+
private _stamp;
|
|
214
|
+
private _evaluation;
|
|
215
|
+
/** Scene hierarchy version at which every evaluated target was last found inside the root. */
|
|
216
|
+
private _checkedHierarchy;
|
|
217
|
+
private _destroyed;
|
|
218
|
+
private readonly _root;
|
|
219
|
+
private readonly _clock;
|
|
220
|
+
private readonly _applyPoses;
|
|
221
|
+
/** 'app' advances with app frames; 'manual' waits for `update(deltaTime)`. */
|
|
222
|
+
get clock(): Clock3D;
|
|
223
|
+
/** Global multiplier applied to every clock advance (`update` and app frames), not to `seek`. */
|
|
224
|
+
get timeScale(): number;
|
|
225
|
+
/** Current animator time in seconds. */
|
|
226
|
+
get time(): number;
|
|
227
|
+
play(clip: Nova3DAnimationClip, options?: AnimationPlayOptions3D): Nova3DAnimationAction;
|
|
228
|
+
/**
|
|
229
|
+
* Sets the global time scale (0..1e6) used by `update` and the app clock.
|
|
230
|
+
* @experimental
|
|
231
|
+
*/
|
|
232
|
+
setTimeScale(scale: number): void;
|
|
233
|
+
seek(time: number): void;
|
|
234
|
+
update(deltaTime: number): void;
|
|
235
|
+
stopAll(): void;
|
|
236
|
+
get destroyed(): boolean;
|
|
237
|
+
destroy(): void;
|
|
238
|
+
/** `delta` is the scaled step given to drivers; backward seeks give 0 (graphs never rewind). */
|
|
239
|
+
private _advance;
|
|
240
|
+
private _dispatchEvents;
|
|
241
|
+
private _endAll;
|
|
242
|
+
private _channelMap;
|
|
243
|
+
/** Structural pass: claims channels and rebuilds the preallocated evaluation slots. */
|
|
244
|
+
private _reconcile;
|
|
245
|
+
/** Allocation-free evaluation over the slots prepared by `_reconcile`. */
|
|
246
|
+
private _evaluate;
|
|
247
|
+
/** Weighted overwrite blend of one layer: rest weight keeps the lower result, excess normalizes. */
|
|
248
|
+
private _overwriteGroup;
|
|
249
|
+
/** Copies the node's logical base into `slot.value` once per evaluation, when a blend reads it. */
|
|
250
|
+
private _base;
|
|
251
|
+
/** Additive layer: vectors add weighted deltas, quaternions post-multiply slerp(identity, delta, weight). */
|
|
252
|
+
private _addGroup;
|
|
253
|
+
private _syncLease;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Owned by the app: destroyed with it.
|
|
257
|
+
* @experimental
|
|
258
|
+
*/
|
|
259
|
+
export declare function createAnimator(app: Nova3DApp, options: AnimatorOptions3D): Nova3DAnimator;
|
|
260
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/** @experimental */
|
|
2
|
+
export type AnimationChannel3D = 'position' | 'quaternion' | 'scale' | 'weights';
|
|
3
|
+
/** @experimental */
|
|
4
|
+
export type AnimationSamples3D = readonly number[] | Float32Array | Float64Array;
|
|
5
|
+
/** @experimental */
|
|
6
|
+
export interface AnimationTrackOptions3D {
|
|
7
|
+
target: string;
|
|
8
|
+
channel: AnimationChannel3D;
|
|
9
|
+
times: AnimationSamples3D;
|
|
10
|
+
values: AnimationSamples3D;
|
|
11
|
+
interpolation?: 'step' | 'linear' | 'cubic-spline';
|
|
12
|
+
valueSize?: number;
|
|
13
|
+
}
|
|
14
|
+
/** @experimental */
|
|
15
|
+
export interface AnimationClipOptions3D {
|
|
16
|
+
name?: string;
|
|
17
|
+
duration: number;
|
|
18
|
+
tracks: readonly AnimationTrackOptions3D[];
|
|
19
|
+
}
|
|
20
|
+
export interface AnimationTrack3D {
|
|
21
|
+
readonly target: string;
|
|
22
|
+
readonly channel: AnimationChannel3D;
|
|
23
|
+
readonly times: Float64Array;
|
|
24
|
+
readonly values: Float64Array;
|
|
25
|
+
readonly interpolation: 'step' | 'linear' | 'cubic-spline';
|
|
26
|
+
readonly size: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Pure copied CPU clip; sampling never creates app/device/scheduling state.
|
|
30
|
+
* @experimental
|
|
31
|
+
*/
|
|
32
|
+
export declare class Nova3DAnimationClip {
|
|
33
|
+
protected constructor();
|
|
34
|
+
readonly name: string;
|
|
35
|
+
readonly duration: number;
|
|
36
|
+
private readonly _tracks;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Plain data with no GPU resources: nothing to destroy.
|
|
40
|
+
* @experimental
|
|
41
|
+
*/
|
|
42
|
+
export declare function createAnimationClip(options: AnimationClipOptions3D): Nova3DAnimationClip;
|
|
43
|
+
/** @experimental */
|
|
44
|
+
export interface AdditiveClipOptions3D {
|
|
45
|
+
/** Clip that provides the reference pose; defaults to the source clip. */
|
|
46
|
+
reference?: Nova3DAnimationClip;
|
|
47
|
+
/** Reference time in seconds inside the reference clip; defaults to 0. */
|
|
48
|
+
referenceTime?: number;
|
|
49
|
+
name?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Derives an additive clip whose samples are deltas from a reference pose,
|
|
53
|
+
* following three.js `AnimationUtils.makeClipAdditive`: position, scale and morph weights
|
|
54
|
+
* subtract the reference, quaternions are left-multiplied by the reference conjugate.
|
|
55
|
+
* Cubic-spline tangents of quaternion tracks are transformed by the same rotation.
|
|
56
|
+
* @experimental
|
|
57
|
+
*/
|
|
58
|
+
export declare function toAdditiveClip(clip: Nova3DAnimationClip, options?: AdditiveClipOptions3D): Nova3DAnimationClip;
|
|
59
|
+
/** @internal */
|
|
60
|
+
export declare function sampleAnimationTrack3D(track: AnimationTrack3D, time: number): Float64Array;
|
|
61
|
+
/**
|
|
62
|
+
* Per-binding sampling state: the key found by the previous sample (playback moves forward
|
|
63
|
+
* a key at a time, so the search starts there) and, for linear quaternion tracks, the
|
|
64
|
+
* slerp terms of each key pair, which depend on the keys only. @internal
|
|
65
|
+
*/
|
|
66
|
+
export interface TrackCursor3D {
|
|
67
|
+
key: number;
|
|
68
|
+
/** Per key k: sign, clamped |dot|, theta = acos(|dot|) and sin(theta) of keys k and k + 1. */
|
|
69
|
+
readonly slerp: Float64Array | null;
|
|
70
|
+
}
|
|
71
|
+
/** Sampling state for one bound track. @internal */
|
|
72
|
+
export declare function trackCursor3D(track: AnimationTrack3D): TrackCursor3D;
|
|
73
|
+
/** Samples one track into a caller-owned buffer without allocating. @internal */
|
|
74
|
+
export declare function sampleAnimationTrackInto3D(track: AnimationTrack3D, time: number, out: Float64Array, cursor?: TrackCursor3D): Float64Array;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { AnimationBlendMode3D, Nova3DAnimator } from './Animator.js';
|
|
2
|
+
import { Nova3DAnimationClip } from './Clip.js';
|
|
3
|
+
import { Nova3DAnimationMask } from './Mask.js';
|
|
4
|
+
/** @experimental */
|
|
5
|
+
export type AnimationParameterType3D = 'float' | 'int' | 'bool' | 'trigger';
|
|
6
|
+
/** @experimental */
|
|
7
|
+
export interface AnimationParameterOptions3D {
|
|
8
|
+
type: AnimationParameterType3D;
|
|
9
|
+
/** Initial value: number for float/int, boolean for bool/trigger (default 0/false). */
|
|
10
|
+
value?: number | boolean;
|
|
11
|
+
}
|
|
12
|
+
/** @experimental */
|
|
13
|
+
export type AnimationConditionOperator3D = '>' | '>=' | '<' | '<=' | '==' | '!=';
|
|
14
|
+
/** @experimental */
|
|
15
|
+
export interface AnimationConditionOptions3D {
|
|
16
|
+
parameter: string;
|
|
17
|
+
/** Required for float/int; `==`/`!=` for bool; triggers only test being set. */
|
|
18
|
+
operator?: AnimationConditionOperator3D;
|
|
19
|
+
/** Number for float/int, boolean for bool (default true). */
|
|
20
|
+
value?: number | boolean;
|
|
21
|
+
}
|
|
22
|
+
/** @experimental */
|
|
23
|
+
export interface AnimationBlendChild1DOptions3D {
|
|
24
|
+
clip: Nova3DAnimationClip;
|
|
25
|
+
threshold: number;
|
|
26
|
+
}
|
|
27
|
+
/** @experimental */
|
|
28
|
+
export interface AnimationBlendChild2DOptions3D {
|
|
29
|
+
clip: Nova3DAnimationClip;
|
|
30
|
+
position: readonly [number, number];
|
|
31
|
+
}
|
|
32
|
+
/** @experimental */
|
|
33
|
+
export type AnimationBlendTreeOptions3D = {
|
|
34
|
+
type: '1d';
|
|
35
|
+
parameter: string;
|
|
36
|
+
children: readonly AnimationBlendChild1DOptions3D[];
|
|
37
|
+
} | {
|
|
38
|
+
/** Polar gradient-band interpolation (PlayCanvas `2D directional`). */
|
|
39
|
+
type: '2d-directional';
|
|
40
|
+
parameters: readonly [string, string];
|
|
41
|
+
children: readonly AnimationBlendChild2DOptions3D[];
|
|
42
|
+
};
|
|
43
|
+
/** @experimental */
|
|
44
|
+
export interface AnimationStateOptions3D {
|
|
45
|
+
name: string;
|
|
46
|
+
clip?: Nova3DAnimationClip;
|
|
47
|
+
blendTree?: AnimationBlendTreeOptions3D;
|
|
48
|
+
/** Playback speed 0..1e6 (default 1). */
|
|
49
|
+
speed?: number;
|
|
50
|
+
/** Float/int parameter multiplied into the speed (negative values count as 0). */
|
|
51
|
+
speedParameter?: string;
|
|
52
|
+
/** Default true; non-looping states clamp the pose while normalized time keeps growing. */
|
|
53
|
+
loop?: boolean;
|
|
54
|
+
}
|
|
55
|
+
/** @experimental */
|
|
56
|
+
export type AnimationInterruptionSource3D = 'none' | 'current' | 'next';
|
|
57
|
+
/** @experimental */
|
|
58
|
+
export interface AnimationTransitionOptions3D {
|
|
59
|
+
/** Source state name or `$any`. */
|
|
60
|
+
from: string;
|
|
61
|
+
/** Destination state name or `$exit` (returns to the layer entry state). */
|
|
62
|
+
to: string;
|
|
63
|
+
/** Cross-fade duration in seconds (default 0). */
|
|
64
|
+
duration?: number;
|
|
65
|
+
/** Normalized source time that must be crossed during the update; below 1 repeats per loop. */
|
|
66
|
+
exitTime?: number;
|
|
67
|
+
/** Normalized destination start time when the destination is not already playing. */
|
|
68
|
+
offset?: number;
|
|
69
|
+
conditions?: readonly AnimationConditionOptions3D[];
|
|
70
|
+
/** Which transitions may interrupt this one while it blends (default `none`). */
|
|
71
|
+
interruptionSource?: AnimationInterruptionSource3D;
|
|
72
|
+
/** Lower values are tested first; ties test `$any` transitions first, then declaration order. */
|
|
73
|
+
priority?: number;
|
|
74
|
+
}
|
|
75
|
+
/** @experimental */
|
|
76
|
+
export interface AnimationLayerOptions3D {
|
|
77
|
+
name: string;
|
|
78
|
+
/** Layer influence 0..1 (default 1). */
|
|
79
|
+
weight?: number;
|
|
80
|
+
blend?: AnimationBlendMode3D;
|
|
81
|
+
mask?: Nova3DAnimationMask;
|
|
82
|
+
entry: string;
|
|
83
|
+
states: readonly AnimationStateOptions3D[];
|
|
84
|
+
transitions?: readonly AnimationTransitionOptions3D[];
|
|
85
|
+
}
|
|
86
|
+
/** @experimental */
|
|
87
|
+
export interface AnimationGraphOptions3D {
|
|
88
|
+
parameters?: Readonly<Record<string, AnimationParameterOptions3D>>;
|
|
89
|
+
layers: readonly AnimationLayerOptions3D[];
|
|
90
|
+
}
|
|
91
|
+
/** @experimental */
|
|
92
|
+
export declare class Nova3DAnimationGraph {
|
|
93
|
+
protected constructor();
|
|
94
|
+
private readonly _animator;
|
|
95
|
+
private readonly _parameterIndex;
|
|
96
|
+
private readonly _parameterTypes;
|
|
97
|
+
private readonly _parameters;
|
|
98
|
+
private readonly _layers;
|
|
99
|
+
private readonly _layerIndex;
|
|
100
|
+
private readonly _actions;
|
|
101
|
+
private readonly _events;
|
|
102
|
+
private _eventCount;
|
|
103
|
+
private _enterListeners;
|
|
104
|
+
private _exitListeners;
|
|
105
|
+
private _destroyed;
|
|
106
|
+
get destroyed(): boolean;
|
|
107
|
+
/** Layer names in evaluation order. */
|
|
108
|
+
get layers(): readonly string[];
|
|
109
|
+
setFloat(parameter: string, value: number): void;
|
|
110
|
+
setInt(parameter: string, value: number): void;
|
|
111
|
+
setBool(parameter: string, value: boolean): void;
|
|
112
|
+
/** Sets a trigger until a transition that tests it fires (consumed once). */
|
|
113
|
+
setTrigger(parameter: string): void;
|
|
114
|
+
resetTrigger(parameter: string): void;
|
|
115
|
+
getParameter(parameter: string): number | boolean;
|
|
116
|
+
setLayerWeight(layer: string, weight: number): void;
|
|
117
|
+
getLayerWeight(layer: string): number;
|
|
118
|
+
/** Active (destination) state of a layer. */
|
|
119
|
+
getCurrentState(layer: string): string;
|
|
120
|
+
/** Whether the layer is cross-fading between two states. */
|
|
121
|
+
getTransitioning(layer: string): boolean;
|
|
122
|
+
/** Normalized weight of a state inside its layer (0..1, sums to 1 per layer). */
|
|
123
|
+
getStateWeight(layer: string, state: string): number;
|
|
124
|
+
/** Normalized time of the active state (cycles since entry, unwrapped). */
|
|
125
|
+
getStateTime(layer: string): number;
|
|
126
|
+
/** Subscribes to state entries (fired when a transition starts); returns unsubscribe. */
|
|
127
|
+
onStateEnter(listener: (layer: string, state: string) => void): () => void;
|
|
128
|
+
/** Subscribes to state exits (fired when a transition leaves the active state); returns unsubscribe. */
|
|
129
|
+
onStateExit(listener: (layer: string, state: string) => void): () => void;
|
|
130
|
+
/** Stops the graph actions and releases their channels. */
|
|
131
|
+
destroy(): void;
|
|
132
|
+
private _listen;
|
|
133
|
+
private _assertAlive;
|
|
134
|
+
private _parameter;
|
|
135
|
+
private _layer;
|
|
136
|
+
private _set;
|
|
137
|
+
private _coerce;
|
|
138
|
+
private _createLayer;
|
|
139
|
+
private _createState;
|
|
140
|
+
private _numericParameter;
|
|
141
|
+
private _createTransition;
|
|
142
|
+
private _updateLayer;
|
|
143
|
+
private _exitReached;
|
|
144
|
+
private _conditionsMet;
|
|
145
|
+
private _start;
|
|
146
|
+
private _queue;
|
|
147
|
+
/** Normalized cycles per second of a state from its weighted child durations. */
|
|
148
|
+
private _rate;
|
|
149
|
+
private _blend;
|
|
150
|
+
/** Writes state weights and times into the preallocated actions. */
|
|
151
|
+
private _apply;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Builds a state graph that drives preallocated actions of `animator`.
|
|
155
|
+
* Owned by the animator: destroyed with it (and with the app).
|
|
156
|
+
* @experimental
|
|
157
|
+
*/
|
|
158
|
+
export declare function createAnimationGraph(animator: Nova3DAnimator, options: AnimationGraphOptions3D): Nova3DAnimationGraph;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AnimationChannel3D } from './Clip.js';
|
|
2
|
+
import { Nova3DNode } from '../model/Node.js';
|
|
3
|
+
/** @experimental */
|
|
4
|
+
export type AnimationMaskMode3D = 'include' | 'exclude';
|
|
5
|
+
/** @experimental */
|
|
6
|
+
export interface AnimationMaskOptions3D {
|
|
7
|
+
/** `include` keeps only matching channels, `exclude` drops them (Babylon `AnimationGroupMask` modes). */
|
|
8
|
+
mode?: AnimationMaskMode3D;
|
|
9
|
+
/** Exact target nodes (or node ids). */
|
|
10
|
+
nodes?: readonly (string | Nova3DNode)[];
|
|
11
|
+
/** Subtree roots (or ids); every descendant and the root itself match. */
|
|
12
|
+
subtrees?: readonly (string | Nova3DNode)[];
|
|
13
|
+
/** Restricts the match to these channels; all channels when omitted. */
|
|
14
|
+
channels?: readonly AnimationChannel3D[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Immutable filter over animated node channels. A binding matches when its node
|
|
18
|
+
* is listed (or lies in a listed subtree; no lists means every node) and its channel is listed
|
|
19
|
+
* (no list means every channel). Applied once when an action is played, never per frame.
|
|
20
|
+
* @experimental
|
|
21
|
+
*/
|
|
22
|
+
export declare class Nova3DAnimationMask {
|
|
23
|
+
protected constructor();
|
|
24
|
+
readonly mode: AnimationMaskMode3D;
|
|
25
|
+
private readonly _nodes;
|
|
26
|
+
private readonly _subtrees;
|
|
27
|
+
private readonly _channels;
|
|
28
|
+
/** Node ids listed exactly. */
|
|
29
|
+
get nodes(): readonly string[];
|
|
30
|
+
/** Subtree root ids. */
|
|
31
|
+
get subtrees(): readonly string[];
|
|
32
|
+
/** Listed channels; empty means every channel. */
|
|
33
|
+
get channels(): readonly AnimationChannel3D[];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Creates an immutable include/exclude animation mask.
|
|
37
|
+
* Plain data with no GPU resources: nothing to destroy.
|
|
38
|
+
* @experimental
|
|
39
|
+
*/
|
|
40
|
+
export declare function createAnimationMask(options?: AnimationMaskOptions3D): Nova3DAnimationMask;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { Nova3DNode } from '../model/Node.js';
|
|
2
|
+
import { Nova3DApp } from '../Nova3DApp.js';
|
|
3
|
+
import { Clock3D } from '../types.js';
|
|
4
|
+
import { PositionalSoundOptions3D, SoundOptions3D, Nova3DPositionalSound, Nova3DSound } from './Sound.js';
|
|
5
|
+
/**
|
|
6
|
+
* Options of `createAudio`.
|
|
7
|
+
* @experimental
|
|
8
|
+
*/
|
|
9
|
+
export interface AudioOptions3D {
|
|
10
|
+
/**
|
|
11
|
+
* Existing context (an `AudioContext` or an `OfflineAudioContext`). Nova never closes
|
|
12
|
+
* a context it did not create. Without it Nova creates an `AudioContext`.
|
|
13
|
+
*/
|
|
14
|
+
context?: BaseAudioContext;
|
|
15
|
+
/** Node the listener follows, usually the view camera. `null` keeps the listener at its last pose. */
|
|
16
|
+
listener?: Nova3DNode | null;
|
|
17
|
+
/** Master linear gain, `>= 0`. Default 1. */
|
|
18
|
+
volume?: number;
|
|
19
|
+
muted?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* `'app'` (default) syncs positions before every rendered frame;
|
|
22
|
+
* `'manual'` only in `update()`.
|
|
23
|
+
*/
|
|
24
|
+
clock?: Clock3D;
|
|
25
|
+
/**
|
|
26
|
+
* Time constant (seconds) for position and orientation changes; 0 (default) writes
|
|
27
|
+
* them at the current context time without smoothing.
|
|
28
|
+
*/
|
|
29
|
+
smoothing?: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Options of `audio.loadBuffer`.
|
|
33
|
+
* @experimental
|
|
34
|
+
*/
|
|
35
|
+
export interface AudioLoadOptions3D {
|
|
36
|
+
signal?: AbortSignal;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Audio system of one app: master gain, a listener following a node and the sounds
|
|
40
|
+
* it created. Positions reach Web Audio once per rendered frame and only for nodes
|
|
41
|
+
* whose world matrix changed.
|
|
42
|
+
* @experimental
|
|
43
|
+
*/
|
|
44
|
+
export declare class Nova3DAudio {
|
|
45
|
+
protected constructor();
|
|
46
|
+
private readonly _app;
|
|
47
|
+
readonly context: BaseAudioContext;
|
|
48
|
+
private readonly _master;
|
|
49
|
+
private readonly _ownsContext;
|
|
50
|
+
private readonly _clock;
|
|
51
|
+
private readonly _smoothing;
|
|
52
|
+
private readonly _sounds;
|
|
53
|
+
private readonly _positional;
|
|
54
|
+
private readonly _loads;
|
|
55
|
+
private readonly _cleanup;
|
|
56
|
+
private readonly _matrix;
|
|
57
|
+
/** Last written listener matrix; NaN forces the next write. */
|
|
58
|
+
private readonly _listenerWritten;
|
|
59
|
+
private _listener;
|
|
60
|
+
private _volume;
|
|
61
|
+
private _muted;
|
|
62
|
+
private _destroyed;
|
|
63
|
+
private readonly _frame;
|
|
64
|
+
get destroyed(): boolean;
|
|
65
|
+
get clock(): Clock3D;
|
|
66
|
+
get listener(): Nova3DNode | null;
|
|
67
|
+
get volume(): number;
|
|
68
|
+
get muted(): boolean;
|
|
69
|
+
/** Every live sound (order not guaranteed). */
|
|
70
|
+
get sounds(): readonly Nova3DSound[];
|
|
71
|
+
/** Follows `node` from the next update; `null` keeps the last listener pose. */
|
|
72
|
+
setListener(node: Nova3DNode | null): void;
|
|
73
|
+
setVolume(volume: number): void;
|
|
74
|
+
setMuted(muted: boolean): void;
|
|
75
|
+
/**
|
|
76
|
+
* Resumes a suspended realtime context; call it from a user gesture to unlock autoplay.
|
|
77
|
+
* Offline contexts are left to `startRendering()`.
|
|
78
|
+
*/
|
|
79
|
+
resume(): Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* Creates a non-positional sound (three.js `Audio`).
|
|
82
|
+
* Owned by the audio system: destroyed with it (and with the app).
|
|
83
|
+
*/
|
|
84
|
+
createSound(options?: SoundOptions3D): Nova3DSound;
|
|
85
|
+
/**
|
|
86
|
+
* Creates a sound emitted from `options.node` (three.js `PositionalAudio`).
|
|
87
|
+
* Owned by the audio system: destroyed with it (and with the app).
|
|
88
|
+
*/
|
|
89
|
+
createPositionalSound(options: PositionalSoundOptions3D): Nova3DPositionalSound;
|
|
90
|
+
/**
|
|
91
|
+
* Fetches (string or URL) or copies (ArrayBuffer) encoded audio and decodes it with
|
|
92
|
+
* this context. Aborts with `options.signal` and when the audio system is destroyed.
|
|
93
|
+
*/
|
|
94
|
+
loadBuffer(source: string | URL | ArrayBuffer, options?: AudioLoadOptions3D): Promise<AudioBuffer>;
|
|
95
|
+
/**
|
|
96
|
+
* Writes the listener and playing positional sounds whose world matrix changed since
|
|
97
|
+
* the last write. Runs automatically before each rendered frame with the `'app'` clock;
|
|
98
|
+
* takes no time step, since Web Audio schedules at its own context time.
|
|
99
|
+
* Allocation-free; O(playing positional sounds).
|
|
100
|
+
*/
|
|
101
|
+
update(): void;
|
|
102
|
+
/** Stops every sound, aborts loads, disconnects owned nodes and closes an owned context. */
|
|
103
|
+
destroy(): void;
|
|
104
|
+
private _syncListener;
|
|
105
|
+
private _checkVolume;
|
|
106
|
+
private _checkMuted;
|
|
107
|
+
private _assertAlive;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Creates the audio system of `app`. It is destroyed with the app.
|
|
111
|
+
* Owned by the app: destroyed with it.
|
|
112
|
+
* @experimental
|
|
113
|
+
*/
|
|
114
|
+
export declare function createAudio(app: Nova3DApp, options?: AudioOptions3D): Nova3DAudio;
|