@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,368 @@
|
|
|
1
|
+
import { Nova3DCamera } from '../model/Camera.js';
|
|
2
|
+
import { Nova3DInstancedMesh } from '../model/InstancedMesh.js';
|
|
3
|
+
import { Nova3DNode } from '../model/Node.js';
|
|
4
|
+
import { Nova3DScene } from '../model/Scene.js';
|
|
5
|
+
import { Nova3DTexture } from '../model/Texture.js';
|
|
6
|
+
import { Nova3DApp } from '../Nova3DApp.js';
|
|
7
|
+
import { Clock3D, Color3D, NodeOptions3D, Vector3D } from '../types.js';
|
|
8
|
+
import { ParticleCurve3D, ParticleGradient3D, ParticleRange3D } from './ParticleCurves.js';
|
|
9
|
+
/**
|
|
10
|
+
* Emitter shape in the emitter's local space; +Y is the main emission direction of
|
|
11
|
+
* cone, hemisphere, box and edge, as Babylon.js. `radiusThickness` 0 emits from the
|
|
12
|
+
* surface or rim, 1 (default) from the whole volume or disc.
|
|
13
|
+
* @experimental
|
|
14
|
+
*/
|
|
15
|
+
export type ParticleShape3D = {
|
|
16
|
+
type: 'point';
|
|
17
|
+
} | {
|
|
18
|
+
type: 'sphere';
|
|
19
|
+
radius?: number;
|
|
20
|
+
radiusThickness?: number;
|
|
21
|
+
} | {
|
|
22
|
+
type: 'hemisphere';
|
|
23
|
+
radius?: number;
|
|
24
|
+
radiusThickness?: number;
|
|
25
|
+
}
|
|
26
|
+
/** `angle` is the half-angle in radians [0, π/2]; directions tilt with the distance from the axis. */
|
|
27
|
+
| {
|
|
28
|
+
type: 'cone';
|
|
29
|
+
angle?: number;
|
|
30
|
+
radius?: number;
|
|
31
|
+
radiusThickness?: number;
|
|
32
|
+
} | {
|
|
33
|
+
type: 'box';
|
|
34
|
+
size?: Vector3D;
|
|
35
|
+
}
|
|
36
|
+
/** Disc in the XZ plane emitting radially; `arc` in radians from +X toward +Z. */
|
|
37
|
+
| {
|
|
38
|
+
type: 'circle';
|
|
39
|
+
radius?: number;
|
|
40
|
+
radiusThickness?: number;
|
|
41
|
+
arc?: number;
|
|
42
|
+
}
|
|
43
|
+
/** Segment along X emitting toward +Y. */
|
|
44
|
+
| {
|
|
45
|
+
type: 'edge';
|
|
46
|
+
length?: number;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Burst at `time` seconds of every cycle, repeated `cycles` times `interval` seconds apart.
|
|
50
|
+
* @experimental
|
|
51
|
+
*/
|
|
52
|
+
export interface ParticleBurst3D {
|
|
53
|
+
time: number;
|
|
54
|
+
count: ParticleRange3D;
|
|
55
|
+
/** Repetitions per cycle, an integer ≥ 1; default 1. */
|
|
56
|
+
cycles?: number;
|
|
57
|
+
/** Seconds between repetitions; default 0. */
|
|
58
|
+
interval?: number;
|
|
59
|
+
/** Chance in [0, 1] that each repetition fires; default 1. */
|
|
60
|
+
probability?: number;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Texture atlas cells of a particle system, row-major from the image top-left (Babylon
|
|
64
|
+
* sprite cells, PlayCanvas animTiles). `frameCount` above 1 animates from `frame` over
|
|
65
|
+
* each particle's life `cycles` times (default 1), or at `frameRate` frames per second;
|
|
66
|
+
* `randomStartFrame` offsets each particle's first frame.
|
|
67
|
+
* @experimental
|
|
68
|
+
*/
|
|
69
|
+
export interface ParticleSpriteSheet3D {
|
|
70
|
+
columns: number;
|
|
71
|
+
rows: number;
|
|
72
|
+
frame?: number;
|
|
73
|
+
frameCount?: number;
|
|
74
|
+
cycles?: number;
|
|
75
|
+
frameRate?: number;
|
|
76
|
+
randomStartFrame?: boolean;
|
|
77
|
+
}
|
|
78
|
+
/** @experimental */
|
|
79
|
+
export type ParticleSystemOptions3D = NodeOptions3D & {
|
|
80
|
+
/** Fixed particle capacity, an integer in [1, 262144]; storage never grows. */
|
|
81
|
+
capacity: number;
|
|
82
|
+
/** Parent of the emitter node; default the scene root. */
|
|
83
|
+
parent?: Nova3DNode;
|
|
84
|
+
/** 'app' advances with app frames and keeps them coming while playing; 'manual' needs `update`. Default 'app'. */
|
|
85
|
+
clock?: Clock3D;
|
|
86
|
+
/** Unsigned 32-bit seed of the deterministic random stream; `restart` replays it. */
|
|
87
|
+
seed?: number;
|
|
88
|
+
/** Starts playing at creation; default true. */
|
|
89
|
+
autoPlay?: boolean;
|
|
90
|
+
/** Seconds of one emission cycle; default 5. */
|
|
91
|
+
duration?: number;
|
|
92
|
+
/** Repeats the cycle; default true. */
|
|
93
|
+
loop?: boolean;
|
|
94
|
+
/** Starts as if one full cycle had already run; requires `loop`. Default false. */
|
|
95
|
+
prewarm?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* 'world' (default): emitted particles stay in the world when the emitter moves;
|
|
98
|
+
* 'local': particles move with the emitter node.
|
|
99
|
+
*/
|
|
100
|
+
space?: 'local' | 'world';
|
|
101
|
+
/** Default point. */
|
|
102
|
+
shape?: ParticleShape3D;
|
|
103
|
+
/** Blends every shape direction toward a uniform random one, in [0, 1]; default 0. */
|
|
104
|
+
randomizeDirection?: number;
|
|
105
|
+
/** Particles per second over the normalized cycle time; default 10. */
|
|
106
|
+
rate?: ParticleCurve3D;
|
|
107
|
+
bursts?: readonly ParticleBurst3D[];
|
|
108
|
+
/** Seconds; default 2. */
|
|
109
|
+
lifetime?: ParticleRange3D;
|
|
110
|
+
/** Start speed in m/s along the shape direction; default 1. */
|
|
111
|
+
startSpeed?: ParticleRange3D;
|
|
112
|
+
/** Start quad width in metres; default 1. */
|
|
113
|
+
startSize?: ParticleRange3D;
|
|
114
|
+
/** Start rotation in the view plane in radians; default 0. */
|
|
115
|
+
startRotation?: ParticleRange3D;
|
|
116
|
+
/** Radians per second; default 0. */
|
|
117
|
+
angularVelocity?: ParticleRange3D;
|
|
118
|
+
/** sRGB start colour, or two colours mixed by one random factor per particle; default white. */
|
|
119
|
+
startColor?: Color3D | readonly [Color3D, Color3D];
|
|
120
|
+
/** World acceleration in m/s²; default zero. */
|
|
121
|
+
gravity?: Vector3D;
|
|
122
|
+
/** Exponential velocity damping per second, v·e^(−drag·t); default 0. */
|
|
123
|
+
drag?: number;
|
|
124
|
+
/** Multiplies the displacement by velocity over the normalized age. */
|
|
125
|
+
speedOverLife?: ParticleCurve3D;
|
|
126
|
+
/** Velocity in m/s added over the normalized age, per axis of the simulation space. */
|
|
127
|
+
velocityOverLife?: readonly [ParticleCurve3D, ParticleCurve3D, ParticleCurve3D];
|
|
128
|
+
/** Multiplies the start size over the normalized age. */
|
|
129
|
+
sizeOverLife?: ParticleCurve3D;
|
|
130
|
+
/** Multiplies the start colour over the normalized age. */
|
|
131
|
+
colorOverLife?: ParticleGradient3D;
|
|
132
|
+
/** Multiplies the alpha over the normalized age. */
|
|
133
|
+
alphaOverLife?: ParticleCurve3D;
|
|
134
|
+
/** Sorts particles back to front along this camera's view direction on every update; default none. */
|
|
135
|
+
sortCamera?: Nova3DCamera | null;
|
|
136
|
+
/** Default 'normal' (alpha blending); 'additive' suits fire and sparks. */
|
|
137
|
+
blending?: 'normal' | 'additive' | 'multiply';
|
|
138
|
+
/** Default 'spherical'. */
|
|
139
|
+
billboard?: 'spherical' | 'vertical';
|
|
140
|
+
texture?: Nova3DTexture | null;
|
|
141
|
+
spriteSheet?: ParticleSpriteSheet3D;
|
|
142
|
+
depthTest?: boolean;
|
|
143
|
+
fog?: boolean;
|
|
144
|
+
renderOrder?: number;
|
|
145
|
+
layers?: number;
|
|
146
|
+
/** Multiplies every clock advance; default 1. */
|
|
147
|
+
timeScale?: number;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* CPU particle system drawn as one billboarded instanced mesh, as Babylon.js
|
|
151
|
+
* ParticleSystem and PlayCanvas ParticleSystemComponent (CPU). Particles live in
|
|
152
|
+
* fixed structure-of-arrays storage; dead ones are swap-removed and every update
|
|
153
|
+
* uploads the live prefix once.
|
|
154
|
+
* @experimental
|
|
155
|
+
*/
|
|
156
|
+
export declare class Nova3DParticleSystem {
|
|
157
|
+
protected constructor();
|
|
158
|
+
private readonly _app;
|
|
159
|
+
/** Emitter node: move it to move the emitter. */
|
|
160
|
+
readonly node: Nova3DNode;
|
|
161
|
+
/** Fixed particle capacity. */
|
|
162
|
+
readonly capacity: number;
|
|
163
|
+
readonly space: 'local' | 'world';
|
|
164
|
+
readonly clock: Clock3D;
|
|
165
|
+
private readonly _geometry;
|
|
166
|
+
private readonly _material;
|
|
167
|
+
private readonly _cleanup;
|
|
168
|
+
private _lease?;
|
|
169
|
+
private _destroyed;
|
|
170
|
+
private _state;
|
|
171
|
+
private _emitting;
|
|
172
|
+
private _count;
|
|
173
|
+
private _written;
|
|
174
|
+
private _time;
|
|
175
|
+
private _accumulator;
|
|
176
|
+
private _timeScale;
|
|
177
|
+
private readonly _seed;
|
|
178
|
+
private _random;
|
|
179
|
+
private _sortCamera;
|
|
180
|
+
private readonly _duration;
|
|
181
|
+
private readonly _loop;
|
|
182
|
+
private readonly _prewarm;
|
|
183
|
+
private readonly _shape;
|
|
184
|
+
/** radius, thickness, angle or arc, box size xyz, edge length. */
|
|
185
|
+
private readonly _shapeValues;
|
|
186
|
+
private readonly _randomize;
|
|
187
|
+
private readonly _rate;
|
|
188
|
+
/** Ranges as [min, max] pairs: lifetime, speed, size, rotation, angular velocity. */
|
|
189
|
+
private readonly _ranges;
|
|
190
|
+
private readonly _colorA;
|
|
191
|
+
private readonly _colorB;
|
|
192
|
+
private readonly _gravity;
|
|
193
|
+
private readonly _drag;
|
|
194
|
+
private readonly _speedCurve;
|
|
195
|
+
private readonly _velocityCurves;
|
|
196
|
+
private readonly _sizeCurve;
|
|
197
|
+
private readonly _colorCurve;
|
|
198
|
+
private readonly _alphaCurve;
|
|
199
|
+
private readonly _rotates;
|
|
200
|
+
/** A colour or alpha curve: the colour of a particle changes over its life. */
|
|
201
|
+
private readonly _colorVaries;
|
|
202
|
+
/** An angular velocity: the roll of a particle changes over its life. */
|
|
203
|
+
private readonly _spins;
|
|
204
|
+
/** Burst columns: time, count min, count max, cycles, interval, probability. */
|
|
205
|
+
private readonly _bursts;
|
|
206
|
+
private readonly _burstFired;
|
|
207
|
+
private readonly _position;
|
|
208
|
+
private readonly _velocity;
|
|
209
|
+
private readonly _age;
|
|
210
|
+
private readonly _inverseLife;
|
|
211
|
+
private readonly _size;
|
|
212
|
+
private readonly _angle;
|
|
213
|
+
private readonly _spin;
|
|
214
|
+
private readonly _color;
|
|
215
|
+
/** Animated atlas: first frame offset per particle; null when static. */
|
|
216
|
+
private readonly _frameOffset;
|
|
217
|
+
private readonly _frames;
|
|
218
|
+
/** Mesh-space union of the written particle boxes (min xyz, max xyz). */
|
|
219
|
+
private readonly _bounds;
|
|
220
|
+
/** Instance matrices written beside the poses. */
|
|
221
|
+
private readonly _matrices;
|
|
222
|
+
/** WebGL only: compact quad records the renderer uploads instead of matrices (see InstancedMesh._quadRecords). */
|
|
223
|
+
private readonly _records;
|
|
224
|
+
/** Floats per record: centre and scale, the roll texel (`_recordRoll`), the colour texel (no `_recordColor`). */
|
|
225
|
+
private readonly _recordFloats;
|
|
226
|
+
/** Records carry a roll and frame texel: rotating or animated systems. */
|
|
227
|
+
private readonly _recordRoll;
|
|
228
|
+
/** Linear colour shared by every particle (one start colour, no colour or alpha curve); records then omit colour. */
|
|
229
|
+
private readonly _recordColor;
|
|
230
|
+
/**
|
|
231
|
+
* The life-independent record fields (scale, roll and colour that never change over a
|
|
232
|
+
* particle's life) sit at the particle's own slot: spawns write them and swap-removals move
|
|
233
|
+
* them, so an unsorted write refreshes only what changes. A sorted write breaks this.
|
|
234
|
+
*/
|
|
235
|
+
private _aligned;
|
|
236
|
+
/** Sort order of the last write (null: unsorted); lazy poses follow it. */
|
|
237
|
+
private _writtenOrder;
|
|
238
|
+
/**
|
|
239
|
+
* Only centres change and one size gives one box reach: the last integration step of an
|
|
240
|
+
* unsorted update can copy centres and their bounds itself (`_fusing`), leaving `_write`
|
|
241
|
+
* nothing per particle (`_fused`).
|
|
242
|
+
*/
|
|
243
|
+
private readonly _fusable;
|
|
244
|
+
private _fusing;
|
|
245
|
+
private _fused;
|
|
246
|
+
/** Start frame, frame count, frames per unit life (cycles mode) or per second, rate mode flag, random start. */
|
|
247
|
+
private readonly _sheet;
|
|
248
|
+
private readonly _poses;
|
|
249
|
+
private readonly _colors;
|
|
250
|
+
private _depth?;
|
|
251
|
+
private _depthBits?;
|
|
252
|
+
private _keys?;
|
|
253
|
+
private _order?;
|
|
254
|
+
private _histogram?;
|
|
255
|
+
/** Local gravity, emitter translation now and at the previous update. */
|
|
256
|
+
private readonly _frame;
|
|
257
|
+
private _hasPrevious;
|
|
258
|
+
private _updateLength;
|
|
259
|
+
private _untilEnd;
|
|
260
|
+
private readonly _sample;
|
|
261
|
+
private readonly _onFrame;
|
|
262
|
+
/** Live particles. */
|
|
263
|
+
get count(): number;
|
|
264
|
+
/** Resolves to `count`; the GPU system reads its count back from the GPU, this one has it at once. */
|
|
265
|
+
readCount(): Promise<number>;
|
|
266
|
+
/** Seconds into the current emission cycle. */
|
|
267
|
+
get time(): number;
|
|
268
|
+
get playing(): boolean;
|
|
269
|
+
get paused(): boolean;
|
|
270
|
+
/** Whether the emitter still emits; false after `stop` or the end of a non-looping cycle. */
|
|
271
|
+
get emitting(): boolean;
|
|
272
|
+
/** GPU bytes of the per-particle instance data uploaded for drawing. */
|
|
273
|
+
get gpuBytes(): number;
|
|
274
|
+
/** Draw order within the blended group; see `Nova3DMesh.renderOrder`. */
|
|
275
|
+
get renderOrder(): number;
|
|
276
|
+
setRenderOrder(value: number): void;
|
|
277
|
+
/** Layer bit mask; see `Nova3DMesh.layers`. */
|
|
278
|
+
get layers(): number;
|
|
279
|
+
setLayers(mask: number): void;
|
|
280
|
+
get timeScale(): number;
|
|
281
|
+
get destroyed(): boolean;
|
|
282
|
+
/** Sets the multiplier of every clock advance, in [0, 1e6]. */
|
|
283
|
+
setTimeScale(value: number): void;
|
|
284
|
+
/** Sorts back to front along this camera's view direction, or turns sorting off. */
|
|
285
|
+
setSortCamera(camera: Nova3DCamera | null): void;
|
|
286
|
+
/**
|
|
287
|
+
* Starts a stopped system from cycle time 0 (prewarmed when configured), resumes a
|
|
288
|
+
* paused one, and restarts emission after `stop` without clearing.
|
|
289
|
+
*/
|
|
290
|
+
play(): void;
|
|
291
|
+
/** Freezes simulation and emission until `play`. */
|
|
292
|
+
pause(): void;
|
|
293
|
+
/** Stops emitting; live particles finish their lives unless `clear` removes them now. */
|
|
294
|
+
stop(clear?: boolean): void;
|
|
295
|
+
/** Clears, rewinds the random stream to the seed and plays again. */
|
|
296
|
+
restart(): void;
|
|
297
|
+
/** Emits `count` particles now, whatever the emission state; a stopped system starts simulating. */
|
|
298
|
+
emitBurst(count: number): void;
|
|
299
|
+
/** Advances a manual-clock system by `deltaTime` seconds (scaled by timeScale). */
|
|
300
|
+
update(deltaTime: number): void;
|
|
301
|
+
/** Releases the node, mesh, geometry and material; a user texture is kept. */
|
|
302
|
+
destroy(): void;
|
|
303
|
+
/** Simulates `delta` seconds in equal steps of at most MAX_STEP and uploads once. */
|
|
304
|
+
private _advance;
|
|
305
|
+
/** One integration step: age and move live particles, then emit for the step. */
|
|
306
|
+
private _step;
|
|
307
|
+
/** Emits rate and bursts for the cycle window [time, time + step), wrapping loops. */
|
|
308
|
+
private _emit;
|
|
309
|
+
/** Spawns one particle born `age` seconds before the end of a step of length `step`. */
|
|
310
|
+
private _spawnAt;
|
|
311
|
+
/** Initializes the next free slot and integrates it over its `age`. */
|
|
312
|
+
private _spawn;
|
|
313
|
+
/** Writes the life-independent record fields of particle `index` into its own slot. */
|
|
314
|
+
private _seedRecord;
|
|
315
|
+
/** Linear record colour of the single start colour without curves, as the per-particle path rounds it. */
|
|
316
|
+
private _sharedColor;
|
|
317
|
+
/** Writes a shape position and unit direction into `_sample`. */
|
|
318
|
+
private _shapeSample;
|
|
319
|
+
/** Uniform random unit vector into `_sample[3..5]`. */
|
|
320
|
+
private _unit;
|
|
321
|
+
/** Uniform sample of range `slot` (pair offset). */
|
|
322
|
+
private _range;
|
|
323
|
+
/** Mulberry32: deterministic uniform number in [0, 1). */
|
|
324
|
+
private _next;
|
|
325
|
+
/** Swap-removes: moves particle `from` into slot `to`. */
|
|
326
|
+
private _move;
|
|
327
|
+
/** Reads the emitter world frame: local gravity and translation history. */
|
|
328
|
+
private _readFrame;
|
|
329
|
+
/** Uploads the live prefix, sorted when a camera is set: WebGL records or WebGPU poses and colours. */
|
|
330
|
+
private _write;
|
|
331
|
+
/**
|
|
332
|
+
* Full record write of every live particle in draw order: the reference of the
|
|
333
|
+
* specialised unsorted write, and the sorted path.
|
|
334
|
+
*/
|
|
335
|
+
private _writeRecords;
|
|
336
|
+
/**
|
|
337
|
+
* Unsorted write of what changes over life: centres always, then scale, roll, frame and
|
|
338
|
+
* colour only when a curve, a rotation or an animated atlas drives them. The rest was
|
|
339
|
+
* written at spawn and follows swap-removals (`_seedRecord`, `_move`). Same floats as
|
|
340
|
+
* `_writeRecords`.
|
|
341
|
+
*/
|
|
342
|
+
private _writeChanging;
|
|
343
|
+
/** Lazily derived mesh poses of the last records write. */
|
|
344
|
+
private readonly _poseSource;
|
|
345
|
+
/** Packed poses (position, view-plane roll quaternion, uniform scale) in draw order. */
|
|
346
|
+
private _writePoses;
|
|
347
|
+
/** WebGPU: poses, matrices, sRGB colours and frames through the mesh's owner path. */
|
|
348
|
+
private _writeOwned;
|
|
349
|
+
/** Back-to-front order by view depth, or null when sorting is off. */
|
|
350
|
+
private _sortOrder;
|
|
351
|
+
/** Holds the app loop lease exactly while an app-clock system is playing. */
|
|
352
|
+
private _syncLease;
|
|
353
|
+
/** Simulates the tail of one previous cycle so the system starts in steady state. */
|
|
354
|
+
private _prewarmCycle;
|
|
355
|
+
private _assertAlive;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Allocation-free LSD radix sort (3 passes of 11 bits) of Float32 values given by
|
|
359
|
+
* their bit patterns, largest first. `keys` and `order` hold two halves of
|
|
360
|
+
* `capacity` entries; the permutation ends in the second half (`order[capacity + i]`).
|
|
361
|
+
*/
|
|
362
|
+
export declare function sortDescending(count: number, bits: Uint32Array, keys: Uint32Array, order: Uint32Array, histogram: Uint32Array): void;
|
|
363
|
+
/**
|
|
364
|
+
* Creates a CPU particle system owning one instanced mesh, its geometry and material.
|
|
365
|
+
* Owned by the scene's app: destroyed with the scene or the app.
|
|
366
|
+
* @experimental
|
|
367
|
+
*/
|
|
368
|
+
export declare function createParticleSystem(scene: Nova3DScene, options: ParticleSystemOptions3D): Nova3DParticleSystem;
|