@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,67 @@
|
|
|
1
|
+
/** Columns of one emission segment. */
|
|
2
|
+
export declare const SEGMENT_STRIDE = 5;
|
|
3
|
+
/**
|
|
4
|
+
* Emission schedule of the GPU particle system: the rate and burst logic of the CPU
|
|
5
|
+
* system reduced to ranges of birth indices, as Babylon.js GPUParticleSystem maps
|
|
6
|
+
* emission to slot ranges. Birth `k` targets slot `k mod capacity` in generation
|
|
7
|
+
* `floor(k / capacity)`; the slot and the generation seed its random attributes.
|
|
8
|
+
* A step writes a few segments (rate windows and fired bursts), so the CPU cost per
|
|
9
|
+
* frame is independent of the particle count.
|
|
10
|
+
* @experimental
|
|
11
|
+
*/
|
|
12
|
+
export declare class GPUParticleSchedule {
|
|
13
|
+
readonly capacity: number;
|
|
14
|
+
private readonly _duration;
|
|
15
|
+
private readonly _loop;
|
|
16
|
+
private readonly _rate;
|
|
17
|
+
/** Burst columns: time, count min, count max, cycles, interval, probability. */
|
|
18
|
+
private readonly _bursts;
|
|
19
|
+
private readonly _seed;
|
|
20
|
+
/**
|
|
21
|
+
* Segment columns: first slot, generation (uint32), births that can land
|
|
22
|
+
* (at most the capacity), age at the step end of the first birth, and the age
|
|
23
|
+
* spacing of later births (younger by `spacing` each).
|
|
24
|
+
*/
|
|
25
|
+
segments: Float64Array<ArrayBuffer>;
|
|
26
|
+
segmentCount: number;
|
|
27
|
+
/** Seconds into the current emission cycle. */
|
|
28
|
+
time: number;
|
|
29
|
+
emitting: boolean;
|
|
30
|
+
/** Index of the next birth. */
|
|
31
|
+
emitted: number;
|
|
32
|
+
/** One past the highest slot that received a birth since the last clear. */
|
|
33
|
+
highWater: number;
|
|
34
|
+
private _accumulator;
|
|
35
|
+
private _random;
|
|
36
|
+
private readonly _burstFired;
|
|
37
|
+
constructor(capacity: number, _duration: number, _loop: boolean, _rate: number | Float32Array,
|
|
38
|
+
/** Burst columns: time, count min, count max, cycles, interval, probability. */
|
|
39
|
+
_bursts: Float64Array, _seed: number);
|
|
40
|
+
/** Starts a cycle at time 0 with every burst pending. */
|
|
41
|
+
start(): void;
|
|
42
|
+
/** Ends emission; planned births stop. */
|
|
43
|
+
halt(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Marks every slot free: the next birth starts the next generation at slot 0, so
|
|
46
|
+
* fresh particles never repeat the random attributes of cleared ones.
|
|
47
|
+
*/
|
|
48
|
+
clear(): void;
|
|
49
|
+
/** Clears and rewinds births and the random stream to the seed, as `restart`. */
|
|
50
|
+
rewind(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Positions the cycle `span` seconds before its end, with bursts before that
|
|
53
|
+
* point already fired, so simulating `span` seconds reaches steady state.
|
|
54
|
+
*/
|
|
55
|
+
prewarm(span: number): void;
|
|
56
|
+
/** Plans one burst of `count` births of age 0, whatever the emission state. */
|
|
57
|
+
burst(count: number): number;
|
|
58
|
+
/**
|
|
59
|
+
* Plans the births of the cycle window [time, time + step), wrapping loops, with
|
|
60
|
+
* ages measured to the end of the step; returns the number of segments.
|
|
61
|
+
*/
|
|
62
|
+
plan(step: number): number;
|
|
63
|
+
/** Appends births [emitted, emitted + count) as one segment. */
|
|
64
|
+
private _push;
|
|
65
|
+
/** Mulberry32, as the CPU system: deterministic uniform number in [0, 1). */
|
|
66
|
+
private _next;
|
|
67
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GLSL ES 3.00 stages of the GPU particle system. State texels hold
|
|
3
|
+
* A = (position, age) and B = (velocity, id); age −1 marks a free slot. The id is a
|
|
4
|
+
* 24-bit hash of the slot, its generation and the seed, so every random attribute
|
|
5
|
+
* is recomputed from it instead of being stored.
|
|
6
|
+
*/
|
|
7
|
+
/** Full-screen triangle without attributes. */
|
|
8
|
+
export declare const particlePassVertex3D = "#version 300 es\nvoid main(){\n vec2 corner=vec2(float((gl_VertexID<<1)&2),float(gl_VertexID&2));\n gl_Position=vec4(corner*2.0-1.0,0.0,1.0);\n}";
|
|
9
|
+
/** Emitter shape as `SHAPE` 0 point … 6 edge, the index order of particleShapeTypes. */
|
|
10
|
+
export declare function particleSimulationFragment3D(defines: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* One stage of a bitonic sorting network over draw positions: keys are view depths
|
|
13
|
+
* of the slots they hold, free slots sort last. `identity` writes position = slot.
|
|
14
|
+
*/
|
|
15
|
+
export declare const particleSortFragment3D = "#version 300 es\nprecision highp float;\nprecision highp int;\nprecision highp sampler2D;\nuniform sampler2D order;\nuniform sampler2D stateA;\nuniform int orderWidth;\nuniform int width;\nuniform int capacity;\nuniform int stageBlock;\nuniform int stageDistance;\nuniform bool identity;\n\nuniform vec3 forward;\nout vec4 result;\nfloat particleKey(int slot){\n if(slot>=capacity)return 3.0e38;\n vec4 a=texelFetch(stateA,ivec2(slot%width,slot/width),0);\n\n return a.w<0.0?3.0e38:-dot(a.xyz,forward);\n}\nvoid main(){\n ivec2 texel=ivec2(gl_FragCoord.xy);\n int position=texel.y*orderWidth+texel.x;\n if(identity){\n result=vec4(float(position),0.0,0.0,1.0);\n return;\n }\n int partner=position^stageDistance;\n int own=int(texelFetch(order,texel,0).r);\n int other=int(texelFetch(order,ivec2(partner%orderWidth,partner/orderWidth),0).r);\n float ownKey=particleKey(own);\n float otherKey=particleKey(other);\n\n bool smaller=(position<partner)==((position&stageBlock)==0);\n bool take=smaller?otherKey<ownKey:otherKey>ownKey;\n result=vec4(float(take?other:own),0.0,0.0,1.0);\n}";
|
|
16
|
+
/** Vertex stage of the shader material drawing one billboard per state texel. */
|
|
17
|
+
export declare const particleRenderVertex3D = "\nuniform sampler2D particleStateA;\nuniform sampler2D particleStateB;\nuniform sampler2D particleCurves;\n\nuniform sampler2D particleOrder;\nuniform float particleOrderWidth;\nuniform float particleSorted;\nuniform float particleWidth;\nuniform float particleCapacity;\n\nuniform vec4 particleRanges;\n\nuniform vec4 particleSpin;\nuniform vec4 particleColorA;\nuniform vec4 particleColorB;\n\nuniform vec4 particleColorConstant;\nuniform vec2 particleSizeAlpha;\n\nuniform vec4 particleSheet;\n\nuniform vec4 particleAtlas;\nout vec2 vParticleUv;\nout vec4 vParticleColor;\nout float vParticleDepth;\n\nuint particleHash(uint x){x^=x>>16u;x*=0x7feb352du;x^=x>>15u;x*=0x846ca68bu;x^=x>>16u;return x;}\nfloat particleRandom(uint id,uint channel){return float(particleHash(id|(channel<<24u))>>8u)*(1.0/16777216.0);}\n\n\nvec4 particleCurve(sampler2D table,int row,float t){\n float x=clamp(t,0.0,1.0)*255.0;\n int i=int(x);\n vec4 from=texelFetch(table,ivec2(i,row),0);\n return from+(texelFetch(table,ivec2(min(i+1,255),row),0)-from)*(x-float(i));\n}\n\nvec3 particleLinear(vec3 c){\n return mix(c/12.92,pow((c+0.055)/1.055,vec3(2.4)),step(vec3(0.04045),c));\n}\nvoid main(){\n\n int index=gl_VertexID>>2;\n int quadCorner=gl_VertexID&3;\n vec2 quadPosition=vec2(quadCorner==1||quadCorner==2?0.5:-0.5,quadCorner>=2?0.5:-0.5);\n if(particleSorted>0.5){\n int orderWidth=int(particleOrderWidth);\n index=int(texelFetch(particleOrder,ivec2(index%orderWidth,index/orderWidth),0).r);\n }\n int width=int(particleWidth);\n ivec2 texel=ivec2(index%width,index/width);\n vec4 a=texelFetch(particleStateA,texel,0);\n vParticleUv=vec2(0.0);\n vParticleColor=vec4(0.0);\n vParticleDepth=0.0;\n if(a.w<0.0||index>=int(particleCapacity)){\n\n gl_Position=vec4(0.0,0.0,2.0,1.0);\n return;\n }\n uint id=uint(texelFetch(particleStateB,texel,0).w);\n float t=a.w/mix(particleRanges.x,particleRanges.y,particleRandom(id,0u));\n float size=mix(particleRanges.z,particleRanges.w,particleRandom(id,2u));\n#ifdef PARTICLE_SIZE_CURVE\n size*=particleCurve(particleCurves,1,t).x;\n#else\n size*=particleSizeAlpha.x;\n#endif\n#ifdef PARTICLE_TWO_COLORS\n vec4 color=mix(particleColorA,particleColorB,particleRandom(id,5u));\n#else\n vec4 color=particleColorA;\n#endif\n#ifdef PARTICLE_COLOR_CURVE\n color*=particleCurve(particleCurves,0,t);\n#else\n color*=particleColorConstant;\n#endif\n#ifdef PARTICLE_ALPHA_CURVE\n color.a*=particleCurve(particleCurves,1,t).y;\n#else\n color.a*=particleSizeAlpha.y;\n#endif\n vParticleColor=vec4(particleLinear(color.rgb),color.a);\n#ifdef PARTICLE_MAP\n\n vec2 cornerUv=vec2(quadPosition.x+0.5,particleAtlas.w>0.5?quadPosition.y+0.5:0.5-quadPosition.y);\n#ifdef PARTICLE_SHEET\n float frame=particleSheet.x;\n#ifdef PARTICLE_ANIMATED\n\n float phase=particleSheet.w>0.5?a.w*particleSheet.z:clamp(t,0.0,0.999999)*particleSheet.z;\n float offset=particleAtlas.z>0.5?floor(particleRandom(id,6u)*particleSheet.y):0.0;\n frame+=mod(floor(phase)+offset,particleSheet.y);\n#endif\n frame=mod(floor(frame+0.5),particleAtlas.x*particleAtlas.y);\n float frameRow=floor(frame/particleAtlas.x);\n vec2 cell=vec2(frame-frameRow*particleAtlas.x,particleAtlas.w>0.5?particleAtlas.y-1.0-frameRow:frameRow);\n cornerUv=(cornerUv+cell)/particleAtlas.xy;\n#endif\n vParticleUv=cornerUv;\n#endif\n#ifdef PARTICLE_ROTATES\n float angle=mix(particleSpin.x,particleSpin.y,particleRandom(id,3u))+mix(particleSpin.z,particleSpin.w,particleRandom(id,4u))*a.w;\n vec2 turn=vec2(cos(angle),sin(angle));\n#else\n vec2 turn=vec2(1.0,0.0);\n#endif\n\n vec2 extent=size*vec2(length(modelMatrix[0].xyz),length(modelMatrix[1].xyz));\n vec2 corner=vec2(turn.x*quadPosition.x-turn.y*quadPosition.y,turn.y*quadPosition.x+turn.x*quadPosition.y)*extent;\n vec3 right=vec3(viewMatrix[0][0],viewMatrix[1][0],viewMatrix[2][0]);\n#ifdef PARTICLE_VERTICAL\n vec3 up=vec3(0.0,1.0,0.0);\n vec2 level=vec2(right.x,right.z);\n right=dot(level,level)>1e-12?normalize(vec3(level.x,0.0,level.y)):vec3(1.0,0.0,0.0);\n#else\n vec3 up=vec3(viewMatrix[0][1],viewMatrix[1][1],viewMatrix[2][1]);\n#endif\n vec4 placed=vec4((modelMatrix*vec4(a.xyz,1.0)).xyz+right*corner.x+up*corner.y,1.0);\n vParticleDepth=-(viewMatrix*placed).z;\n gl_Position=viewProjectionMatrix*placed;\n}";
|
|
18
|
+
/** Fragment stage: colour times the map, scene fog, then Nova's output path. */
|
|
19
|
+
export declare const particleRenderFragment3D = "\nin vec2 vParticleUv;\nin vec4 vParticleColor;\nin float vParticleDepth;\n#ifdef PARTICLE_MAP\nuniform sampler2D particleMap;\n#endif\n#ifdef PARTICLE_FOG\n\nuniform float particleFogMode;\nuniform vec3 particleFogColor;\nuniform vec2 particleFogParameters;\n#endif\nvoid main(){\n vec4 surface=vParticleColor;\n#ifdef PARTICLE_MAP\n surface*=texture(particleMap,vParticleUv);\n#endif\n#ifdef PARTICLE_FOG\n if(particleFogMode>0.5){\n float d=max(vParticleDepth,0.0);\n float f;\n if(particleFogMode<1.5){\n f=clamp((d-particleFogParameters.x)/(particleFogParameters.y-particleFogParameters.x),0.0,1.0);\n }\n else if(particleFogMode<2.5){\n f=1.0-exp(-particleFogParameters.x*d);\n }\n else{\n float k=particleFogParameters.x*d;\n f=1.0-exp(-k*k);\n }\n surface.rgb=mix(surface.rgb,particleFogColor,f);\n }\n#endif\n novaOutput(surface);\n}";
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { Nova3DMesh } from '../model/Mesh.js';
|
|
2
|
+
/** Width of the curve table, one texel per sample. */
|
|
3
|
+
export declare const GPU_PARTICLE_CURVE_WIDTH = 256;
|
|
4
|
+
/** Emission segments of one simulation pass. */
|
|
5
|
+
export declare const GPU_PARTICLE_SEGMENTS = 16;
|
|
6
|
+
/** Fixed simulation inputs of one GPU particle system. */
|
|
7
|
+
export interface GPUParticleConfig3D {
|
|
8
|
+
readonly capacity: number;
|
|
9
|
+
/** State rows are `width` slots wide; `height` rows hold the capacity. */
|
|
10
|
+
readonly width: number;
|
|
11
|
+
readonly height: number;
|
|
12
|
+
/** Sort network size (the capacity rounded up to a power of two) and its row width. */
|
|
13
|
+
readonly orderSize: number;
|
|
14
|
+
readonly orderWidth: number;
|
|
15
|
+
readonly seed: number;
|
|
16
|
+
/** Emitter shape index of particleShapeTypes. */
|
|
17
|
+
readonly shape: number;
|
|
18
|
+
readonly world: boolean;
|
|
19
|
+
readonly drag: number;
|
|
20
|
+
readonly speedCurve: boolean;
|
|
21
|
+
readonly velocityCurve: boolean;
|
|
22
|
+
/** Lifetime min, max; start speed min, max. */
|
|
23
|
+
readonly ranges: readonly [number, number, number, number];
|
|
24
|
+
/** Radius or length, thickness, cone angle or arc, randomize. */
|
|
25
|
+
readonly shapeValues: readonly [number, number, number, number];
|
|
26
|
+
readonly boxSize: readonly [number, number, number];
|
|
27
|
+
readonly speedConstant: number;
|
|
28
|
+
/** 256 × 3 RGBA32F curve table (bakeGPUParticleCurves). */
|
|
29
|
+
readonly curves: Float32Array;
|
|
30
|
+
}
|
|
31
|
+
/** Inputs of one simulation pass, reused by the system without allocation. */
|
|
32
|
+
export interface GPUParticlePass3D {
|
|
33
|
+
/** Ageing, its velocity damping, the step birth ages lie in, seconds after this step to the update end. */
|
|
34
|
+
readonly pass: Float32Array;
|
|
35
|
+
/** 1 / seconds of the whole update; 0 without emitter motion. */
|
|
36
|
+
inverseUpdate: number;
|
|
37
|
+
readonly gravity: Float32Array;
|
|
38
|
+
/** Previous minus current emitter translation. */
|
|
39
|
+
readonly emitterShift: Float32Array;
|
|
40
|
+
readonly emitter: Float32Array;
|
|
41
|
+
/** First slot, landing births, generation (×16). */
|
|
42
|
+
readonly segmentSlots: Uint32Array;
|
|
43
|
+
/** Age of the first birth at the step end, age spacing of later births (×16). */
|
|
44
|
+
readonly segmentAges: Float32Array;
|
|
45
|
+
segmentCount: number;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* GPU state of a particle system on one backend: ping-pong (WebGL2) or in-place
|
|
49
|
+
* (WebGPU) particle state, the curve table and the draw order of the
|
|
50
|
+
* approximate depth sort. Every slot starts free.
|
|
51
|
+
*/
|
|
52
|
+
export interface GPUParticleState3D {
|
|
53
|
+
/** Allocates the GPU objects of the current device or context generation. */
|
|
54
|
+
create: () => void;
|
|
55
|
+
/** Ages, moves and spawns the slots of the first `rows` state rows. */
|
|
56
|
+
simulate: (rows: number, input: GPUParticlePass3D) => void;
|
|
57
|
+
/** Ends a batch of passes. */
|
|
58
|
+
flush: () => void;
|
|
59
|
+
/** Frees every slot; an allocated draw order becomes the identity again. */
|
|
60
|
+
clear: () => void;
|
|
61
|
+
/** Allocates the draw order (identity) on first use; true when it was created now. */
|
|
62
|
+
ensureOrder: () => boolean;
|
|
63
|
+
readonly ordered: boolean;
|
|
64
|
+
/** Starts sort stages over `size` draw positions, keyed by depth along `forward` (simulation space). */
|
|
65
|
+
beginSort: (size: number, x: number, y: number, z: number) => void;
|
|
66
|
+
sortStage: (block: number, distance: number) => void;
|
|
67
|
+
endSort: () => void;
|
|
68
|
+
/** Live particles in the first `rows` rows (`slots` slots), read back without stalling; 0 after a loss. */
|
|
69
|
+
readCount: (rows: number, slots: number, current: () => boolean) => Promise<number>;
|
|
70
|
+
/** The mesh that draws this state. */
|
|
71
|
+
attach: (mesh: Nova3DMesh) => void;
|
|
72
|
+
/** Releases the GPU objects; `lost` skips calls on a lost device or context. */
|
|
73
|
+
destroy: (lost: boolean) => void;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* WebGL2 particle state: ping-pong RGBA32F textures updated by a full-screen
|
|
77
|
+
* fragment pass into two draw buffers, and R32F draw-order copies for the
|
|
78
|
+
* bitonic sort. The render material reads them as external textures.
|
|
79
|
+
*/
|
|
80
|
+
export declare class WebGLParticleState3D implements GPUParticleState3D {
|
|
81
|
+
private readonly _gl;
|
|
82
|
+
private readonly _invalidate;
|
|
83
|
+
private readonly _config;
|
|
84
|
+
private _resources;
|
|
85
|
+
private _current;
|
|
86
|
+
private _currentOrder;
|
|
87
|
+
private readonly _clearA;
|
|
88
|
+
private readonly _clearB;
|
|
89
|
+
constructor(_gl: WebGL2RenderingContext, _invalidate: () => void, _config: GPUParticleConfig3D);
|
|
90
|
+
get ordered(): boolean;
|
|
91
|
+
/** Current textures of the render material. */
|
|
92
|
+
texture(name: 'stateA' | 'stateB' | 'curves' | 'order'): WebGLTexture;
|
|
93
|
+
attach(): void;
|
|
94
|
+
create(): void;
|
|
95
|
+
simulate(rows: number, input: GPUParticlePass3D): void;
|
|
96
|
+
flush(): void;
|
|
97
|
+
clear(): void;
|
|
98
|
+
ensureOrder(): boolean;
|
|
99
|
+
beginSort(size: number, x: number, y: number, z: number): void;
|
|
100
|
+
sortStage(block: number, distance: number): void;
|
|
101
|
+
endSort(): void;
|
|
102
|
+
readCount(rows: number, slots: number, current: () => boolean): Promise<number>;
|
|
103
|
+
destroy(lost: boolean): void;
|
|
104
|
+
/** Writes draw position = slot into both order copies. */
|
|
105
|
+
private _identityOrder;
|
|
106
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { Nova3DCamera } from '../model/Camera.js';
|
|
2
|
+
import { Nova3DMesh } from '../model/Mesh.js';
|
|
3
|
+
import { Nova3DNode } from '../model/Node.js';
|
|
4
|
+
import { Nova3DScene } from '../model/Scene.js';
|
|
5
|
+
import { Nova3DApp } from '../Nova3DApp.js';
|
|
6
|
+
import { Bounds3D, Clock3D } from '../types.js';
|
|
7
|
+
import { ParticleSettings3D } from './ParticleOptions.js';
|
|
8
|
+
import { ParticleSystemOptions3D } from './ParticleSystem.js';
|
|
9
|
+
/**
|
|
10
|
+
* Options of the GPU particle system: the CPU option set, a larger capacity, a
|
|
11
|
+
* culling box and the sort budget.
|
|
12
|
+
* @experimental
|
|
13
|
+
*/
|
|
14
|
+
export type GPUParticleSystemOptions3D = ParticleSystemOptions3D & {
|
|
15
|
+
/**
|
|
16
|
+
* Fixed particle capacity, an integer in [1, 1048576]. GPU memory is 64 bytes per
|
|
17
|
+
* particle (two ping-pong copies of two RGBA32F texels), plus 8 with sorting.
|
|
18
|
+
*/
|
|
19
|
+
capacity: number;
|
|
20
|
+
/**
|
|
21
|
+
* Box in simulation space (world, or the emitter's local space) that contains every
|
|
22
|
+
* particle, for frustum culling; default null: never culled, as Babylon.js GPU particles.
|
|
23
|
+
*/
|
|
24
|
+
bounds?: Bounds3D | null;
|
|
25
|
+
/**
|
|
26
|
+
* Bitonic sorting stages run per rendered frame while `sortCamera` is set; a full
|
|
27
|
+
* sort of n particles takes log2(n)·(log2(n) + 1)/2 stages. Default 32.
|
|
28
|
+
*/
|
|
29
|
+
sortStagesPerFrame?: number;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Highest capacity: a 1024 × 1024 state texture.
|
|
33
|
+
* @experimental
|
|
34
|
+
*/
|
|
35
|
+
export declare const MAX_GPU_PARTICLES: number;
|
|
36
|
+
/**
|
|
37
|
+
* Bakes the curve table of the GPU system: 256 × 3 RGBA texels, row 0 the colour
|
|
38
|
+
* gradient (sRGB multipliers), row 1 size, alpha and speed, row 2 the velocity
|
|
39
|
+
* curves. Entry i holds t = i / 255, the samples of the CPU tables; constants fill
|
|
40
|
+
* their whole row.
|
|
41
|
+
* @experimental
|
|
42
|
+
*/
|
|
43
|
+
export declare function bakeGPUParticleCurves(settings: Pick<ParticleSettings3D, 'colorCurve' | 'sizeCurve' | 'alphaCurve' | 'speedCurve' | 'velocityCurves'>): Float32Array;
|
|
44
|
+
/**
|
|
45
|
+
* GPU particle system: particle state lives in ping-pong RGBA32F textures updated by
|
|
46
|
+
* a fragment pass, and one attribute-free instanced draw reads it in the vertex
|
|
47
|
+
* stage (Babylon.js GPUParticleSystem, PlayCanvas GPU particles); on WebGPU the
|
|
48
|
+
* state lives in storage buffers updated by compute passes. Emission follows
|
|
49
|
+
* the CPU system's rate, bursts and cycles, mapped to slot ranges; every random
|
|
50
|
+
* attribute derives from a hash of the slot and its generation, so the CPU work per
|
|
51
|
+
* frame does not depend on the particle count. Sorting is approximate (an
|
|
52
|
+
* incremental bitonic network). Requires EXT_color_buffer_float.
|
|
53
|
+
* @experimental
|
|
54
|
+
*/
|
|
55
|
+
export declare class Nova3DGPUParticleSystem {
|
|
56
|
+
protected constructor();
|
|
57
|
+
private readonly _app;
|
|
58
|
+
/** Emitter node: move it to move the emitter. */
|
|
59
|
+
readonly node: Nova3DNode;
|
|
60
|
+
/** Fixed particle capacity. */
|
|
61
|
+
readonly capacity: number;
|
|
62
|
+
readonly space: 'local' | 'world';
|
|
63
|
+
readonly clock: Clock3D;
|
|
64
|
+
private readonly _settings;
|
|
65
|
+
private readonly _schedule;
|
|
66
|
+
private readonly _gpuState;
|
|
67
|
+
private readonly _geometry;
|
|
68
|
+
private readonly _material;
|
|
69
|
+
private readonly _textures;
|
|
70
|
+
private readonly _cleanup;
|
|
71
|
+
private readonly _width;
|
|
72
|
+
private readonly _height;
|
|
73
|
+
private readonly _orderWidth;
|
|
74
|
+
private readonly _orderSize;
|
|
75
|
+
private readonly _curveTable;
|
|
76
|
+
private readonly _sortStages;
|
|
77
|
+
/** GPU objects exist for the current device or context generation. */
|
|
78
|
+
private _resident;
|
|
79
|
+
private _lease?;
|
|
80
|
+
private _destroyed;
|
|
81
|
+
private _lost;
|
|
82
|
+
private _state;
|
|
83
|
+
private _timeScale;
|
|
84
|
+
/** Seconds until every particle is surely dead once emission ended. */
|
|
85
|
+
private _drain;
|
|
86
|
+
private _sortCamera;
|
|
87
|
+
/** Bitonic network cursor: block size, compare distance, and the size it sorts. */
|
|
88
|
+
private _sortBlock;
|
|
89
|
+
private _sortDistance;
|
|
90
|
+
private _sortSize;
|
|
91
|
+
private _sorted;
|
|
92
|
+
private _fog;
|
|
93
|
+
/** Draw count written to the mesh, to skip unchanged writes. */
|
|
94
|
+
private _instances;
|
|
95
|
+
private readonly _frame;
|
|
96
|
+
private _hasPrevious;
|
|
97
|
+
private _updateLength;
|
|
98
|
+
private _untilEnd;
|
|
99
|
+
private readonly _input;
|
|
100
|
+
private readonly _onFrame;
|
|
101
|
+
private readonly _onRender;
|
|
102
|
+
/**
|
|
103
|
+
* Slots that may hold a live particle: the instance count of the draw (Babylon.js
|
|
104
|
+
* active count), an upper bound of the live particles; `readCount()` reads the
|
|
105
|
+
* exact number back from the GPU.
|
|
106
|
+
*/
|
|
107
|
+
get count(): number;
|
|
108
|
+
/** Seconds into the current emission cycle. */
|
|
109
|
+
get time(): number;
|
|
110
|
+
get playing(): boolean;
|
|
111
|
+
get paused(): boolean;
|
|
112
|
+
/** Whether the emitter still emits; false after `stop` or the end of a non-looping cycle. */
|
|
113
|
+
get emitting(): boolean;
|
|
114
|
+
/** Draw order within the blended group; see `Nova3DMesh.renderOrder`. */
|
|
115
|
+
get renderOrder(): number;
|
|
116
|
+
setRenderOrder(value: number): void;
|
|
117
|
+
/** Layer bit mask; see `Nova3DMesh.layers`. */
|
|
118
|
+
get layers(): number;
|
|
119
|
+
setLayers(mask: number): void;
|
|
120
|
+
get timeScale(): number;
|
|
121
|
+
get destroyed(): boolean;
|
|
122
|
+
/** GPU bytes of the state, curve and sort textures. */
|
|
123
|
+
get gpuBytes(): number;
|
|
124
|
+
/** Sets the multiplier of every clock advance, in [0, 1e6]. */
|
|
125
|
+
setTimeScale(value: number): void;
|
|
126
|
+
/**
|
|
127
|
+
* Sorts back to front along this camera's view direction, approximately: the
|
|
128
|
+
* bitonic network advances `sortStagesPerFrame` stages per rendered frame against
|
|
129
|
+
* the live positions. null turns sorting off.
|
|
130
|
+
*/
|
|
131
|
+
setSortCamera(camera: Nova3DCamera | null): void;
|
|
132
|
+
/**
|
|
133
|
+
* Starts a stopped system from cycle time 0 (prewarmed when configured), resumes a
|
|
134
|
+
* paused one, and restarts emission after `stop` without clearing.
|
|
135
|
+
*/
|
|
136
|
+
play(): void;
|
|
137
|
+
/** Freezes simulation and emission until `play`. */
|
|
138
|
+
pause(): void;
|
|
139
|
+
/** Stops emitting; live particles finish their lives unless `clear` removes them now. */
|
|
140
|
+
stop(clear?: boolean): void;
|
|
141
|
+
/** Clears, rewinds births and the random stream to the seed and plays again. */
|
|
142
|
+
restart(): void;
|
|
143
|
+
/** Emits `count` particles of age 0 now, whatever the emission state; a stopped system starts simulating. */
|
|
144
|
+
emitBurst(count: number): void;
|
|
145
|
+
/** Advances a manual-clock system by `deltaTime` seconds (scaled by timeScale). */
|
|
146
|
+
update(deltaTime: number): void;
|
|
147
|
+
/**
|
|
148
|
+
* Reads the number of live particles back from the GPU without stalling the frame
|
|
149
|
+
* (pixel pack buffer and fence); resolves to 0 when the context is lost meanwhile.
|
|
150
|
+
*/
|
|
151
|
+
readCount(): Promise<number>;
|
|
152
|
+
/** Releases the GPU state, node, mesh, geometry and material; a user texture is kept. */
|
|
153
|
+
destroy(): void;
|
|
154
|
+
/** Simulates `delta` seconds in equal steps of at most MAX_STEP. */
|
|
155
|
+
private _advance;
|
|
156
|
+
/** One ageing pass of `dt` seconds with the planned segments, then spawn-only passes for the rest. */
|
|
157
|
+
private _passes;
|
|
158
|
+
/** Runs the simulation pass over the used rows. */
|
|
159
|
+
private _pass;
|
|
160
|
+
/** Ends a batch of passes: draw count, renderer state, frame request and the loop lease. */
|
|
161
|
+
private _finish;
|
|
162
|
+
/** Writes the instance count of the particle draw. */
|
|
163
|
+
private _syncInstances;
|
|
164
|
+
/** Runs this frame's share of the bitonic network against the sort camera. */
|
|
165
|
+
private _sortPasses;
|
|
166
|
+
/** Mirrors the scene fog into the material uniforms when it changes. */
|
|
167
|
+
private _syncFog;
|
|
168
|
+
/** Reads the emitter world frame: matrix, local gravity and translation history. */
|
|
169
|
+
private _readFrame;
|
|
170
|
+
/** Simulates the tail of one previous cycle so the system starts in steady state. */
|
|
171
|
+
private _prewarmCycle;
|
|
172
|
+
/** Longest remaining life once births stop, with one step of margin for summed step rounding. */
|
|
173
|
+
private _drainTime;
|
|
174
|
+
/** Holds the app loop lease exactly while an app-clock system is playing. */
|
|
175
|
+
private _syncLease;
|
|
176
|
+
/** Frees every slot; the draw order restarts from the identity. */
|
|
177
|
+
private _clear;
|
|
178
|
+
/** After a context restore: new GPU objects, and the system restarts when it was emitting. */
|
|
179
|
+
private _restore;
|
|
180
|
+
private _deleteResources;
|
|
181
|
+
/** The shader material drawing the particles; GPU state is exposed as external textures. */
|
|
182
|
+
private _createMaterial;
|
|
183
|
+
private _assertAlive;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Creates a GPU particle system: ping-pong state textures, one simulation pass per
|
|
187
|
+
* step and one instanced draw. Throws on devices without EXT_color_buffer_float;
|
|
188
|
+
* `createParticleSystem` is the CPU fallback with the same options.
|
|
189
|
+
* Owned by the scene's app: destroyed with the scene or the app.
|
|
190
|
+
* @experimental
|
|
191
|
+
*/
|
|
192
|
+
export declare function createGPUParticleSystem(scene: Nova3DScene, options: GPUParticleSystemOptions3D): Nova3DGPUParticleSystem;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Color3D } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Scalar over normalized time: a constant, or piecewise-linear `[t, value]` keys with
|
|
4
|
+
* strictly increasing `t` in [0, 1]; values hold before the first and after the last key.
|
|
5
|
+
* @experimental
|
|
6
|
+
*/
|
|
7
|
+
export type ParticleCurve3D = number | readonly (readonly [number, number])[];
|
|
8
|
+
/**
|
|
9
|
+
* A constant colour or piecewise-linear `[t, colour]` keys interpolated in sRGB.
|
|
10
|
+
* @experimental
|
|
11
|
+
*/
|
|
12
|
+
export type ParticleGradient3D = Color3D | readonly (readonly [number, Color3D])[];
|
|
13
|
+
/**
|
|
14
|
+
* A constant or a uniform random `[min, max]` range.
|
|
15
|
+
* @experimental
|
|
16
|
+
*/
|
|
17
|
+
export type ParticleRange3D = number | readonly [number, number];
|
|
18
|
+
/** Samples per lookup table; entry `i` holds t = i / (CURVE_SAMPLES - 1), plus one padded entry. */
|
|
19
|
+
export declare const CURVE_SAMPLES = 256;
|
|
20
|
+
/** Reads a finite number in [min, max]. */
|
|
21
|
+
export declare function particleNumber(value: unknown, name: string, min: number, max: number): number;
|
|
22
|
+
/** Reads a constant or `[min, max]` range into `out[offset]`, `out[offset + 1]`. */
|
|
23
|
+
export declare function particleRange(value: ParticleRange3D, name: string, min: number, max: number, out: Float64Array, offset: number): void;
|
|
24
|
+
/**
|
|
25
|
+
* Bakes a scalar curve into a lookup table of CURVE_SAMPLES + 1 entries, or returns
|
|
26
|
+
* the constant when the curve is one. Values must lie in [min, max].
|
|
27
|
+
*/
|
|
28
|
+
export declare function bakeParticleCurve(curve: ParticleCurve3D, name: string, min: number, max: number): number | Float32Array;
|
|
29
|
+
/** Bakes an sRGB gradient into 4·(CURVE_SAMPLES + 1) floats, or returns the constant colour. */
|
|
30
|
+
export declare function bakeParticleGradient(gradient: ParticleGradient3D, name: string): [number, number, number, number] | Float32Array;
|
|
31
|
+
/** Parses one sRGB colour. */
|
|
32
|
+
export declare function particleColor(color: Color3D, name: string): [number, number, number, number];
|
|
33
|
+
/** Linear lookup of a baked table at `t` in [0, 1]. */
|
|
34
|
+
export declare function sampleParticleCurve(table: Float32Array, t: number): number;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Nova3DScene } from '../model/Scene.js';
|
|
2
|
+
import { Nova3DTexture } from '../model/Texture.js';
|
|
3
|
+
import { NodeOptions3D } from '../types.js';
|
|
4
|
+
import { ParticleBurst3D, ParticleShape3D, ParticleSystemOptions3D } from './ParticleSystem.js';
|
|
5
|
+
import { Nova3DCamera } from '../model/Camera.js';
|
|
6
|
+
import { Nova3DNode } from '../model/Node.js';
|
|
7
|
+
/** Emitter shapes in index order; shaders and the CPU sampler switch on the index. */
|
|
8
|
+
export declare const particleShapeTypes: readonly ["point", "sphere", "hemisphere", "cone", "box", "circle", "edge"];
|
|
9
|
+
/** Options shared by the CPU and GPU particle systems. */
|
|
10
|
+
export declare const particleOptionKeys: readonly ["id", "visible", "pickable", "position", "rotation", "quaternion", "scale", "capacity", "parent", "clock", "seed", "autoPlay", "duration", "loop", "prewarm", "space", "shape", "randomizeDirection", "rate", "bursts", "lifetime", "startSpeed", "startSize", "startRotation", "angularVelocity", "startColor", "gravity", "drag", "speedOverLife", "velocityOverLife", "sizeOverLife", "colorOverLife", "alphaOverLife", "sortCamera", "blending", "billboard", "texture", "spriteSheet", "depthTest", "fog", "renderOrder", "layers", "timeScale"];
|
|
11
|
+
/** Validated, normalized particle options; tables are baked once at creation. */
|
|
12
|
+
export interface ParticleSettings3D {
|
|
13
|
+
readonly capacity: number;
|
|
14
|
+
readonly clock: 'app' | 'manual';
|
|
15
|
+
readonly space: 'local' | 'world';
|
|
16
|
+
readonly seed: number;
|
|
17
|
+
readonly autoPlay: boolean;
|
|
18
|
+
readonly duration: number;
|
|
19
|
+
readonly loop: boolean;
|
|
20
|
+
readonly prewarm: boolean;
|
|
21
|
+
readonly timeScale: number;
|
|
22
|
+
/** Index into `particleShapeTypes`. */
|
|
23
|
+
readonly shape: number;
|
|
24
|
+
/** radius, thickness, angle or arc, box size xyz, edge length. */
|
|
25
|
+
readonly shapeValues: Float64Array;
|
|
26
|
+
readonly randomize: number;
|
|
27
|
+
readonly rate: number | Float32Array;
|
|
28
|
+
/** Ranges as [min, max] pairs: lifetime, speed, size, rotation, angular velocity. */
|
|
29
|
+
readonly ranges: Float64Array;
|
|
30
|
+
readonly colorA: Float64Array;
|
|
31
|
+
/** The same array as `colorA` without a second colour. */
|
|
32
|
+
readonly colorB: Float64Array;
|
|
33
|
+
readonly gravity: Float64Array;
|
|
34
|
+
readonly drag: number;
|
|
35
|
+
readonly speedCurve: number | Float32Array;
|
|
36
|
+
readonly velocityCurves: Array<number | Float32Array> | null;
|
|
37
|
+
readonly sizeCurve: number | Float32Array;
|
|
38
|
+
readonly colorCurve: [number, number, number, number] | Float32Array;
|
|
39
|
+
readonly alphaCurve: number | Float32Array;
|
|
40
|
+
readonly rotates: boolean;
|
|
41
|
+
/** Burst columns: time, count min, count max, cycles, interval, probability. */
|
|
42
|
+
readonly bursts: Float64Array;
|
|
43
|
+
readonly blending: 'normal' | 'additive' | 'multiply';
|
|
44
|
+
readonly billboard: 'spherical' | 'vertical';
|
|
45
|
+
readonly texture: Nova3DTexture | null;
|
|
46
|
+
readonly spriteSheet: {
|
|
47
|
+
columns: number;
|
|
48
|
+
rows: number;
|
|
49
|
+
frame: number;
|
|
50
|
+
} | null;
|
|
51
|
+
/** The atlas animates (frameCount above 1). */
|
|
52
|
+
readonly animated: boolean;
|
|
53
|
+
/** Start frame, frame count, frames per unit life (cycles mode) or per second, rate mode flag, random start. */
|
|
54
|
+
readonly sheet: Float64Array;
|
|
55
|
+
readonly parent: Nova3DNode | undefined;
|
|
56
|
+
readonly sortCamera: Nova3DCamera | null;
|
|
57
|
+
readonly depthTest: boolean;
|
|
58
|
+
readonly fog: boolean;
|
|
59
|
+
readonly nodeOptions: NodeOptions3D;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Validates the shared particle option set in a fixed order, so both simulations
|
|
63
|
+
* report the same error for the same mistake. `keys` lists every accepted option.
|
|
64
|
+
*/
|
|
65
|
+
export declare function readParticleSettings(scene: Nova3DScene, options: ParticleSystemOptions3D, maxParticles: number, keys: ReadonlySet<string>): ParticleSettings3D;
|
|
66
|
+
/** Reads an emitter shape into `values` (radius, thickness, angle or arc, box size xyz) and returns its index. */
|
|
67
|
+
export declare function readParticleShape(shape: ParticleShape3D, values: Float64Array): number;
|
|
68
|
+
export declare function readParticleBursts(bursts: readonly ParticleBurst3D[], duration: number, maxCount: number): Float64Array;
|
|
69
|
+
/**
|
|
70
|
+
* Reads a sprite sheet into `out` (start frame, frame count, frames per unit life or
|
|
71
|
+
* per second, rate mode flag, random start) and returns the material atlas, or null.
|
|
72
|
+
*/
|
|
73
|
+
export declare function readParticleSpriteSheet(sheet: ParticleSystemOptions3D['spriteSheet'], texture: Nova3DTexture | null, out: Float64Array): {
|
|
74
|
+
columns: number;
|
|
75
|
+
rows: number;
|
|
76
|
+
frame: number;
|
|
77
|
+
} | null;
|
|
78
|
+
export declare function checkParticleCamera(camera: Nova3DCamera, scene: Nova3DScene): void;
|