@nova-lab/core 1.0.0-dev.19 → 1.1.1-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 +229 -4
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Category of a `Nova3DError`.
|
|
3
|
+
* - `budget`: a resource or input limit was exceeded (`limits` options, capacities).
|
|
4
|
+
* - `unsupported`: the backend, browser or file uses a feature Nova does not support.
|
|
5
|
+
* - `destroyed`: the object, or the app that owns it, is destroyed.
|
|
6
|
+
* - `owner`: an object belongs to another app, scene or owner.
|
|
7
|
+
* - `state`: the call is not valid in the object's current state (still in use, already started).
|
|
8
|
+
* - `invalid-option`: an argument or option has the wrong type, key or value.
|
|
9
|
+
* - `format`: file or document content is malformed.
|
|
10
|
+
* - `network`: a request failed or returned an error status.
|
|
11
|
+
* - `gpu`: the GPU failed an allocation, upload, shader compile or frame (out of memory, lost context).
|
|
12
|
+
* @experimental
|
|
13
|
+
*/
|
|
14
|
+
export type Nova3DErrorCode = 'budget' | 'unsupported' | 'destroyed' | 'owner' | 'state' | 'invalid-option' | 'format' | 'network' | 'gpu';
|
|
15
|
+
/**
|
|
16
|
+
* Options of `Nova3DError`.
|
|
17
|
+
* @experimental
|
|
18
|
+
*/
|
|
19
|
+
export interface Nova3DErrorOptions {
|
|
20
|
+
/** Underlying error, as the standard `Error` `cause`. */
|
|
21
|
+
cause?: unknown;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Error thrown or rejected by every Nova 3D call; `code` tells the category.
|
|
25
|
+
* Cancellation is not a `Nova3DError`: an aborted call rejects with the signal's
|
|
26
|
+
* reason, by default a `DOMException` named `AbortError`, as `fetch` does.
|
|
27
|
+
* @experimental
|
|
28
|
+
*/
|
|
29
|
+
export declare class Nova3DError extends Error {
|
|
30
|
+
protected constructor();
|
|
31
|
+
readonly code: Nova3DErrorCode;
|
|
32
|
+
}
|
|
33
|
+
/** Code of a parser failure message: `budget` when it names a limit or budget, else `format`. */
|
|
34
|
+
export declare function parseErrorCode3D(message: string): Nova3DErrorCode;
|
|
35
|
+
/**
|
|
36
|
+
* A parser's view of a shared validator's failure: inside a parser, a value the
|
|
37
|
+
* validator calls an invalid option is malformed file content.
|
|
38
|
+
*/
|
|
39
|
+
export declare function asFormatError3D(error: unknown): unknown;
|
|
40
|
+
/** `fetch` whose failures other than an abort reject with a `network` error (the platform error is the cause). */
|
|
41
|
+
export declare function fetch3D(input: URL | string, init: RequestInit): Promise<Response>;
|
|
42
|
+
/**
|
|
43
|
+
* Category of a `Nova3DWarning`.
|
|
44
|
+
* @experimental
|
|
45
|
+
*/
|
|
46
|
+
export type Nova3DWarningCode = 'unsupported' | 'skipped' | 'approximated' | 'clamped' | 'generated' | 'ignored';
|
|
47
|
+
/**
|
|
48
|
+
* Non-fatal note of a load, parse or export: the result is usable, but something was
|
|
49
|
+
* skipped, approximated or generated.
|
|
50
|
+
* @experimental
|
|
51
|
+
*/
|
|
52
|
+
export interface Nova3DWarning {
|
|
53
|
+
readonly code: Nova3DWarningCode;
|
|
54
|
+
readonly message: string;
|
|
55
|
+
}
|
|
56
|
+
/** Frozen warning record. */
|
|
57
|
+
export declare function warning3D(code: Nova3DWarningCode, message: string): Nova3DWarning;
|
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
import { Nova3DCamera } from './model/Camera.js';
|
|
2
|
+
import { EnvironmentOptions3D, Nova3DEnvironment } from './model/Environment.js';
|
|
3
|
+
import { MaterialOptions3D, Nova3DMaterial } from './model/Material.js';
|
|
4
|
+
import { Hit3D } from './model/Mesh.js';
|
|
5
|
+
import { RenderTargetOptions3D, Nova3DRenderTarget } from './model/RenderTarget.js';
|
|
6
|
+
import { RaycastOptions3D, Nova3DScene } from './model/Scene.js';
|
|
7
|
+
import { ImageTextureOptions3D, TextureOptions3D, Nova3DTexture } from './model/Texture.js';
|
|
8
|
+
import { EffectsProcessor3D } from './services/EffectsProcessor.js';
|
|
9
|
+
import { TextureLoadOptions3D } from './services/TextureLoader.js';
|
|
10
|
+
import { ToneMapping3D } from './services/ToneMapping.js';
|
|
11
|
+
import { Color3D, DepthPoint3D, GeometryOptions3D, ProjectedPoint3D, Ray3D, ScreenPoint3D, Vector3D } from './types.js';
|
|
12
|
+
import { WebGPUDevice3D } from './webgpu/Backend.js';
|
|
13
|
+
import { WebGPUEffectsProcessor3D } from './webgpu/effects/WebGPUEffects.js';
|
|
14
|
+
import { Backend3D, BackendFeatures3D, BackendRequest3D } from './webgpu/Features.js';
|
|
15
|
+
import { Nova3DWebGPURenderer } from './webgpu/WebGPURenderer.js';
|
|
16
|
+
import { Nova3DGeometry } from './model/Geometry.js';
|
|
17
|
+
/**
|
|
18
|
+
* Canvas size in CSS pixels and the device-pixel ratio of its drawing buffer.
|
|
19
|
+
* @experimental
|
|
20
|
+
*/
|
|
21
|
+
export interface CanvasSizeOptions3D {
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
/** Highest device-pixel ratio used. Default 2. */
|
|
25
|
+
maxDpr?: number;
|
|
26
|
+
/** Device-pixel ratio. Default the window's `devicePixelRatio`. */
|
|
27
|
+
dpr?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Patch of the canvas size (`app.resize`).
|
|
31
|
+
* @experimental
|
|
32
|
+
*/
|
|
33
|
+
export type ResizeOptions3D = Partial<CanvasSizeOptions3D>;
|
|
34
|
+
/**
|
|
35
|
+
* Current canvas size (`app.size`): CSS pixels and the applied device-pixel ratio.
|
|
36
|
+
* @experimental
|
|
37
|
+
*/
|
|
38
|
+
export interface AppSize3D {
|
|
39
|
+
readonly width: number;
|
|
40
|
+
readonly height: number;
|
|
41
|
+
readonly dpr: number;
|
|
42
|
+
}
|
|
43
|
+
/** @experimental */
|
|
44
|
+
export interface AppOptions3D {
|
|
45
|
+
target: HTMLCanvasElement;
|
|
46
|
+
/** Rendering backend. `createApp` runs only on 'webgl2' (the default); use `createAppAsync` for WebGPU. */
|
|
47
|
+
backend?: 'webgl2';
|
|
48
|
+
size: CanvasSizeOptions3D;
|
|
49
|
+
/** sRGB colour the canvas clears to; alpha shows the page behind. Default transparent black. */
|
|
50
|
+
clearColor?: Color3D;
|
|
51
|
+
antialias?: boolean;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Patch of `app.setRenderer` and the result of `app.getRenderer()`.
|
|
55
|
+
* @experimental
|
|
56
|
+
*/
|
|
57
|
+
export interface RendererOptions3D {
|
|
58
|
+
/** sRGB colour the canvas clears to; alpha shows the page behind. */
|
|
59
|
+
clearColor?: Color3D;
|
|
60
|
+
/** Linear exposure multiplier before tone mapping. Default 1. */
|
|
61
|
+
exposure?: number;
|
|
62
|
+
toneMapping?: ToneMapping3D;
|
|
63
|
+
/**
|
|
64
|
+
* Where transparent materials blend. 'linear' (default) blends in linear light: a frame with
|
|
65
|
+
* transparent meshes renders into an offscreen target and is then displayed. 'display' blends
|
|
66
|
+
* the encoded output colour, as three.js does, so such frames keep drawing straight to the
|
|
67
|
+
* canvas. Only the WebGL2 backend reads it; post-processing and transmission still use the
|
|
68
|
+
* linear target.
|
|
69
|
+
* @experimental
|
|
70
|
+
*/
|
|
71
|
+
blending?: 'linear' | 'display';
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Options of `app.createScene`.
|
|
75
|
+
* @experimental
|
|
76
|
+
*/
|
|
77
|
+
export interface SceneOptions3D {
|
|
78
|
+
/** Unique id within the app. Default `scene:N`. */
|
|
79
|
+
id?: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Options of `app.exportImage`.
|
|
83
|
+
* @experimental
|
|
84
|
+
*/
|
|
85
|
+
export interface ImageExportOptions3D {
|
|
86
|
+
/** Default 'png'. */
|
|
87
|
+
format?: 'png' | 'jpeg' | 'webp';
|
|
88
|
+
/** Quality in [0, 1] for 'jpeg' and 'webp'; the browser default when omitted. */
|
|
89
|
+
quality?: number;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Options of `app.destroy`.
|
|
93
|
+
* @experimental
|
|
94
|
+
*/
|
|
95
|
+
export interface DestroyOptions3D {
|
|
96
|
+
/**
|
|
97
|
+
* Loses the WebGL context on purpose (`WEBGL_lose_context`) so the browser can
|
|
98
|
+
* reclaim it at once. Default false: the canvas keeps its context.
|
|
99
|
+
*/
|
|
100
|
+
releaseContext?: boolean;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Options of `createAppAsync`: the synchronous options with any backend.
|
|
104
|
+
* 'auto' (default) uses WebGPU when an adapter and device are available and
|
|
105
|
+
* falls back to WebGL2 otherwise.
|
|
106
|
+
* @experimental
|
|
107
|
+
*/
|
|
108
|
+
export interface AsyncAppOptions3D extends Omit<AppOptions3D, 'backend'> {
|
|
109
|
+
backend?: BackendRequest3D;
|
|
110
|
+
powerPreference?: GPUPowerPreference;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* What `app.diagnostics.snapshot()` returns: counters of the app and of its last rendered frame.
|
|
114
|
+
* @experimental
|
|
115
|
+
*/
|
|
116
|
+
export interface DiagnosticsSnapshot3D {
|
|
117
|
+
readonly destroyed: boolean;
|
|
118
|
+
/** Renderer generation; grows when the GPU context or device is rebuilt. */
|
|
119
|
+
readonly generation: number;
|
|
120
|
+
readonly scenes: number;
|
|
121
|
+
/** Work of the last rendered frame. */
|
|
122
|
+
readonly render: {
|
|
123
|
+
readonly drawCalls: number;
|
|
124
|
+
readonly triangles: number;
|
|
125
|
+
readonly uploadBytes: number;
|
|
126
|
+
readonly matrixUpdates: number;
|
|
127
|
+
};
|
|
128
|
+
readonly resources: {
|
|
129
|
+
readonly geometry: number;
|
|
130
|
+
readonly materials: number;
|
|
131
|
+
readonly textures: number;
|
|
132
|
+
readonly environments: number;
|
|
133
|
+
readonly environmentBytes: number;
|
|
134
|
+
readonly shadowBytes: number;
|
|
135
|
+
readonly pendingLoaders: number;
|
|
136
|
+
readonly estimatedGpuBytes: number;
|
|
137
|
+
readonly gpuGeometry: number;
|
|
138
|
+
readonly gpuTextures: number;
|
|
139
|
+
readonly targetBytes: number;
|
|
140
|
+
};
|
|
141
|
+
readonly frame: {
|
|
142
|
+
/** Rendered frames since creation. */
|
|
143
|
+
readonly count: number;
|
|
144
|
+
/** CPU time of the last frame in milliseconds. */
|
|
145
|
+
readonly cpuMs: number;
|
|
146
|
+
/** GPU time of the last frame in milliseconds, or null when it was not measured. */
|
|
147
|
+
readonly gpuMs: number | null;
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
/** WebGPU device and renderer factory handed from createAppAsync to the app. */
|
|
151
|
+
interface WebGPUHost3D {
|
|
152
|
+
readonly gpu: WebGPUDevice3D;
|
|
153
|
+
readonly create: (canvas: HTMLCanvasElement, gpu: WebGPUDevice3D, antialias: boolean) => Nova3DWebGPURenderer;
|
|
154
|
+
}
|
|
155
|
+
/** @experimental */
|
|
156
|
+
export interface Viewport3D {
|
|
157
|
+
/** Normalized rectangle with a top-left origin, like canvas points. */
|
|
158
|
+
readonly x: number;
|
|
159
|
+
readonly y: number;
|
|
160
|
+
readonly width: number;
|
|
161
|
+
readonly height: number;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Clearing of a view (`View3D.clear`).
|
|
165
|
+
* @experimental
|
|
166
|
+
*/
|
|
167
|
+
export interface ViewClear3D {
|
|
168
|
+
/** sRGB colour replacing the app clear colour, or false to keep the colour buffer. */
|
|
169
|
+
readonly color?: Color3D | false;
|
|
170
|
+
/** Clears depth. Default true. */
|
|
171
|
+
readonly depth?: boolean;
|
|
172
|
+
}
|
|
173
|
+
/** @experimental */
|
|
174
|
+
export interface View3D {
|
|
175
|
+
readonly scene: Nova3DScene;
|
|
176
|
+
readonly camera: Nova3DCamera;
|
|
177
|
+
/**
|
|
178
|
+
* Defaults to the whole canvas or render target.
|
|
179
|
+
* @experimental
|
|
180
|
+
*/
|
|
181
|
+
readonly viewport?: Viewport3D;
|
|
182
|
+
/**
|
|
183
|
+
* Renders into this target instead of the canvas.
|
|
184
|
+
* @experimental
|
|
185
|
+
*/
|
|
186
|
+
readonly target?: Nova3DRenderTarget;
|
|
187
|
+
/**
|
|
188
|
+
* How the view clears its rectangle before drawing.
|
|
189
|
+
* @experimental
|
|
190
|
+
*/
|
|
191
|
+
readonly clear?: ViewClear3D;
|
|
192
|
+
/**
|
|
193
|
+
* Layer bit mask: the view draws and picks meshes sharing a bit. Default all layers.
|
|
194
|
+
* @experimental
|
|
195
|
+
*/
|
|
196
|
+
readonly layers?: number;
|
|
197
|
+
}
|
|
198
|
+
/** @experimental */
|
|
199
|
+
export interface Update3D {
|
|
200
|
+
readonly deltaTime: number;
|
|
201
|
+
readonly elapsedTime: number;
|
|
202
|
+
}
|
|
203
|
+
/** @experimental */
|
|
204
|
+
export interface Input3D {
|
|
205
|
+
readonly originalEvent: Event;
|
|
206
|
+
readonly canvasPoint: ScreenPoint3D;
|
|
207
|
+
}
|
|
208
|
+
/** @experimental */
|
|
209
|
+
export interface FrameSubmission3D {
|
|
210
|
+
readonly id: number;
|
|
211
|
+
readonly startedAt: number;
|
|
212
|
+
readonly finishedAt: number;
|
|
213
|
+
readonly durationMs: number;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* A background failure (`app.onError`). `document`: a document projection could not apply its snapshot.
|
|
217
|
+
* @experimental
|
|
218
|
+
*/
|
|
219
|
+
export interface Error3D {
|
|
220
|
+
readonly source: 'update' | 'render' | 'input' | 'context' | 'document';
|
|
221
|
+
readonly error: unknown;
|
|
222
|
+
}
|
|
223
|
+
/** @experimental */
|
|
224
|
+
export interface ContextState3D {
|
|
225
|
+
readonly state: 'lost' | 'restored' | 'destroyed';
|
|
226
|
+
readonly generation: number;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Owns one canvas, its Raph runtime, the scenes and the GPU resource generation.
|
|
230
|
+
* @experimental
|
|
231
|
+
*/
|
|
232
|
+
export declare class Nova3DApp {
|
|
233
|
+
protected constructor();
|
|
234
|
+
private readonly _owner;
|
|
235
|
+
private readonly _scenes;
|
|
236
|
+
private readonly _geometry;
|
|
237
|
+
private readonly _materials;
|
|
238
|
+
private readonly _environments;
|
|
239
|
+
private readonly _textures;
|
|
240
|
+
private readonly _loaders;
|
|
241
|
+
private readonly _updates;
|
|
242
|
+
private readonly _submissions;
|
|
243
|
+
private readonly _input;
|
|
244
|
+
private readonly _attachments;
|
|
245
|
+
private readonly _beforeRenderListeners;
|
|
246
|
+
/** Pose phase: after update listeners (animation), before `_beforeRenderListeners`. */
|
|
247
|
+
private readonly _poseListeners;
|
|
248
|
+
private readonly _controlOwners;
|
|
249
|
+
private _touchAction;
|
|
250
|
+
private _inputOwner?;
|
|
251
|
+
private readonly _cleanup;
|
|
252
|
+
private readonly _runtime;
|
|
253
|
+
private _effectsOwner?;
|
|
254
|
+
private readonly _renderer;
|
|
255
|
+
private readonly _views;
|
|
256
|
+
/** Renderer records rebuilt only when views change. */
|
|
257
|
+
private readonly _renderViews;
|
|
258
|
+
private readonly _targets;
|
|
259
|
+
private _request;
|
|
260
|
+
/**
|
|
261
|
+
* A frame request is written and the render effect has not run since: further requests
|
|
262
|
+
* would only re-mark the same scheduled effect (every animated joint asks per frame).
|
|
263
|
+
*/
|
|
264
|
+
private _requestPending;
|
|
265
|
+
private readonly _errors;
|
|
266
|
+
private readonly _contextStates;
|
|
267
|
+
private _synchronousDepth;
|
|
268
|
+
/** Open `batch` calls of this app (the runtime batch is opened by the outermost one). */
|
|
269
|
+
private _batchDepth;
|
|
270
|
+
/** Set by every frame so renderOnce knows whether the flush already rendered. */
|
|
271
|
+
private _rendered;
|
|
272
|
+
private readonly _renderFrame;
|
|
273
|
+
private _destroyed;
|
|
274
|
+
private _width;
|
|
275
|
+
private _height;
|
|
276
|
+
private _dpr;
|
|
277
|
+
private _maxDpr;
|
|
278
|
+
private _clearColor;
|
|
279
|
+
private _exposure;
|
|
280
|
+
private _toneMapping;
|
|
281
|
+
private _blending;
|
|
282
|
+
private _sequence;
|
|
283
|
+
private _frame;
|
|
284
|
+
private _last;
|
|
285
|
+
readonly target: HTMLCanvasElement;
|
|
286
|
+
readonly diagnostics: {
|
|
287
|
+
snapshot: () => DiagnosticsSnapshot3D;
|
|
288
|
+
};
|
|
289
|
+
get destroyed(): boolean;
|
|
290
|
+
/**
|
|
291
|
+
* Rendering backend: 'webgl2', or 'webgpu' for apps from createAppAsync.
|
|
292
|
+
* @experimental
|
|
293
|
+
*/
|
|
294
|
+
get backend(): Backend3D;
|
|
295
|
+
/**
|
|
296
|
+
* What the backend can draw; unsupported features throw a clear error.
|
|
297
|
+
* @experimental
|
|
298
|
+
*/
|
|
299
|
+
get backendFeatures(): BackendFeatures3D;
|
|
300
|
+
get view(): Readonly<View3D> | undefined;
|
|
301
|
+
/**
|
|
302
|
+
* All active views in render order.
|
|
303
|
+
* @experimental
|
|
304
|
+
*/
|
|
305
|
+
get views(): readonly Readonly<View3D>[];
|
|
306
|
+
get size(): AppSize3D;
|
|
307
|
+
private _listenInput;
|
|
308
|
+
/** Owned by the app: destroyed with it. */
|
|
309
|
+
createScene(options?: SceneOptions3D): Nova3DScene;
|
|
310
|
+
/** Owned by the app: destroyed with it. */
|
|
311
|
+
createGeometry(options: GeometryOptions3D): Nova3DGeometry;
|
|
312
|
+
/** Owned by the app: destroyed with it. */
|
|
313
|
+
createTexture(options: TextureOptions3D | ImageTextureOptions3D): Nova3DTexture;
|
|
314
|
+
/**
|
|
315
|
+
* Fetches and decodes an image into a texture. Failure only rejects (never `onError`);
|
|
316
|
+
* cancel with `signal` (an app destroy cancels it too). Owned by the app: destroyed with it.
|
|
317
|
+
*/
|
|
318
|
+
loadTexture(url: string | URL, options?: TextureLoadOptions3D): Promise<Nova3DTexture>;
|
|
319
|
+
/** Owned by the app: destroyed with it. */
|
|
320
|
+
createEnvironment(options: EnvironmentOptions3D): Nova3DEnvironment;
|
|
321
|
+
/** Owned by the app: destroyed with it. */
|
|
322
|
+
createMaterial(options: MaterialOptions3D): Nova3DMaterial;
|
|
323
|
+
setView(view: View3D): void;
|
|
324
|
+
/**
|
|
325
|
+
* Replaces all views. Render-target views render first, then canvas views, each in list order.
|
|
326
|
+
* @experimental
|
|
327
|
+
*/
|
|
328
|
+
setViews(views: readonly View3D[]): void;
|
|
329
|
+
/**
|
|
330
|
+
* Creates an offscreen target whose `texture` can be sampled by materials.
|
|
331
|
+
* Owned by the app: destroyed with it.
|
|
332
|
+
* @experimental
|
|
333
|
+
*/
|
|
334
|
+
createRenderTarget(options: RenderTargetOptions3D): Nova3DRenderTarget;
|
|
335
|
+
private _validateView;
|
|
336
|
+
private _setViews;
|
|
337
|
+
private _rebuildRenderViews;
|
|
338
|
+
/** The first canvas view: the reference for project/unproject/screenRay. */
|
|
339
|
+
private _primaryView;
|
|
340
|
+
/** Canvas rectangle of a view in CSS pixels. */
|
|
341
|
+
private _viewRect;
|
|
342
|
+
/** Resizes the canvas (CSS pixels) and its drawing buffer; omitted fields keep their value. */
|
|
343
|
+
resize(size: ResizeOptions3D): void;
|
|
344
|
+
/** Patches the display options: clear colour, exposure and tone mapping. */
|
|
345
|
+
setRenderer(patch: RendererOptions3D): void;
|
|
346
|
+
/** The display options; the clear colour as normalized sRGB RGBA. */
|
|
347
|
+
getRenderer(): Readonly<RendererOptions3D>;
|
|
348
|
+
project(point: Vector3D): ProjectedPoint3D;
|
|
349
|
+
unproject(point: DepthPoint3D): Vector3D;
|
|
350
|
+
screenRay(point: ScreenPoint3D): Ray3D;
|
|
351
|
+
/**
|
|
352
|
+
* Picks on the GPU in the topmost canvas view under `point`: the nearest
|
|
353
|
+
* rendered surface with depth testing, alpha masks, skinning, morphs and
|
|
354
|
+
* instances, without triangle tests on the CPU. Resolves asynchronously (no GPU
|
|
355
|
+
* stall); the hit has no normal. Billboards, lines and points are not pickable
|
|
356
|
+
* this way.
|
|
357
|
+
* @experimental
|
|
358
|
+
*/
|
|
359
|
+
pickGPU(point: ScreenPoint3D): Promise<Hit3D | null>;
|
|
360
|
+
/** Picks in the topmost canvas view under `point`. */
|
|
361
|
+
pick(point: ScreenPoint3D, options?: RaycastOptions3D): Hit3D | null;
|
|
362
|
+
batch<T>(operation: () => T): T;
|
|
363
|
+
onUpdate(listener: (frame: Update3D) => void): () => void;
|
|
364
|
+
onFrameSubmitted(listener: (frame: FrameSubmission3D) => void): () => void;
|
|
365
|
+
/**
|
|
366
|
+
* Runs `listener` at the start of every rendered frame, before the renderer reads
|
|
367
|
+
* the scenes: the place to sync derived state (audio, helpers, followers).
|
|
368
|
+
* @experimental
|
|
369
|
+
*/
|
|
370
|
+
onBeforeRender(listener: () => void): () => void;
|
|
371
|
+
/** Pointer pressed on the canvas; `canvasPoint` is in canvas CSS pixels. */
|
|
372
|
+
onPointerDown(listener: (event: Input3D) => void): () => void;
|
|
373
|
+
onPointerMove(listener: (event: Input3D) => void): () => void;
|
|
374
|
+
onPointerUp(listener: (event: Input3D) => void): () => void;
|
|
375
|
+
onPointerCancel(listener: (event: Input3D) => void): () => void;
|
|
376
|
+
/** Wheel over the canvas; the listener may call `originalEvent.preventDefault()` (the DOM listener is not passive). */
|
|
377
|
+
onWheel(listener: (event: Input3D) => void): () => void;
|
|
378
|
+
/** Key pressed while the canvas has focus (give it a `tabindex`). */
|
|
379
|
+
onKeyDown(listener: (event: Input3D) => void): () => void;
|
|
380
|
+
onKeyUp(listener: (event: Input3D) => void): () => void;
|
|
381
|
+
/**
|
|
382
|
+
* Background failures only: frame update and render callbacks, input listeners,
|
|
383
|
+
* context loss and rebuilds, document projections. A call you await reports its
|
|
384
|
+
* failure by rejecting and never here; 3D Tiles report to `tiles.onError`.
|
|
385
|
+
*/
|
|
386
|
+
onError(listener: (event: Error3D) => void): () => void;
|
|
387
|
+
onContextStateChange(listener: (event: ContextState3D) => void): () => void;
|
|
388
|
+
startLoop(): void;
|
|
389
|
+
stopLoop(): void;
|
|
390
|
+
renderOnce(): void;
|
|
391
|
+
exportImage(options?: ImageExportOptions3D): Promise<Blob>;
|
|
392
|
+
/**
|
|
393
|
+
* Destroys the app and everything created from it (scenes, resources, add-ons,
|
|
394
|
+
* controls, XR). The canvas belongs to the caller and keeps its WebGL context
|
|
395
|
+
* unless `releaseContext` is true: then the context is lost on purpose
|
|
396
|
+
* (`WEBGL_lose_context`), so browsers can reclaim it at once; the app's own
|
|
397
|
+
* context-loss handling is detached first and never reacts. WebGPU apps always
|
|
398
|
+
* unconfigure the canvas and destroy their device. Repeated calls do nothing.
|
|
399
|
+
*/
|
|
400
|
+
destroy(options?: DestroyOptions3D): void;
|
|
401
|
+
/** The WebGL renderer, for services that exist only on WebGL2. */
|
|
402
|
+
private _webgl;
|
|
403
|
+
/** Reports device loss as a context loss, then requests a new device and restores. */
|
|
404
|
+
private _watchDevice;
|
|
405
|
+
private _render;
|
|
406
|
+
private _applySize;
|
|
407
|
+
private _validateSize;
|
|
408
|
+
private _deliver;
|
|
409
|
+
private _emitError;
|
|
410
|
+
private _emitContext;
|
|
411
|
+
private _reportError;
|
|
412
|
+
private _requireView;
|
|
413
|
+
private _assertAlive;
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Creates a 3D app on WebGL2 for `options.target`.
|
|
417
|
+
* Owned by the caller: `app.destroy()` releases everything created from it.
|
|
418
|
+
* @experimental
|
|
419
|
+
*/
|
|
420
|
+
export declare function createApp(options: AppOptions3D): Nova3DApp;
|
|
421
|
+
/**
|
|
422
|
+
* Creates an app on WebGPU or WebGL2 (`backend`, default 'auto'). 'webgpu'
|
|
423
|
+
* rejects when no device is available; 'auto' falls back to WebGL2. Read
|
|
424
|
+
* `app.backend` and `app.backendFeatures` for the result.
|
|
425
|
+
* Owned by the caller: `app.destroy()` releases everything created from it.
|
|
426
|
+
* @experimental
|
|
427
|
+
*/
|
|
428
|
+
export declare function createAppAsync(options: AsyncAppOptions3D): Promise<Nova3DApp>;
|
|
429
|
+
export {};
|