@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,359 @@
|
|
|
1
|
+
import { Nova3DEnvironment } from './model/Environment.js';
|
|
2
|
+
import { Nova3DNode } from './model/Node.js';
|
|
3
|
+
import { Nova3DTexture } from './model/Texture.js';
|
|
4
|
+
/**
|
|
5
|
+
* Point or direction in world units (metres). Input values are copied; every angle
|
|
6
|
+
* of the 3D API is in radians.
|
|
7
|
+
* @experimental
|
|
8
|
+
*/
|
|
9
|
+
export type Vector3D = readonly [number, number, number];
|
|
10
|
+
/** @experimental */
|
|
11
|
+
export type Quaternion3D = readonly [number, number, number, number];
|
|
12
|
+
/** @experimental */
|
|
13
|
+
export interface Transform3D {
|
|
14
|
+
readonly position: Vector3D;
|
|
15
|
+
readonly quaternion: Quaternion3D;
|
|
16
|
+
readonly scale: Vector3D;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Partial local transform. `rotation` is Euler angles in radians applied in XYZ
|
|
20
|
+
* order (intrinsic; three.js 'XYZ'); `quaternion` is [x, y, z, w]. Give one of them.
|
|
21
|
+
* @experimental
|
|
22
|
+
*/
|
|
23
|
+
export type TransformPatch3D = {
|
|
24
|
+
position?: Vector3D;
|
|
25
|
+
scale?: Vector3D;
|
|
26
|
+
} & ({
|
|
27
|
+
rotation?: Vector3D;
|
|
28
|
+
quaternion?: never;
|
|
29
|
+
} | {
|
|
30
|
+
quaternion?: Quaternion3D;
|
|
31
|
+
rotation?: never;
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* Red, green and blue components in [0, 1].
|
|
35
|
+
* @experimental
|
|
36
|
+
*/
|
|
37
|
+
export type RGB3D = readonly [number, number, number];
|
|
38
|
+
/**
|
|
39
|
+
* Red, green, blue and alpha components in [0, 1].
|
|
40
|
+
* @experimental
|
|
41
|
+
*/
|
|
42
|
+
export type RGBA3D = readonly [number, number, number, number];
|
|
43
|
+
/**
|
|
44
|
+
* Colour in sRGB, the space of CSS and colour pickers: a hex string (`#rgb`, `#rgba`,
|
|
45
|
+
* `#rrggbb`, `#rrggbbaa`) or `white`, `black`, `red`, `green`, `blue`, `transparent`,
|
|
46
|
+
* or normalized sRGB components ([r, g, b] is opaque). Nova converts it to linear light
|
|
47
|
+
* when the value is set. Linear values only appear in fields named `*Factor` or
|
|
48
|
+
* `*Linear`. Fields without transparency document that they ignore alpha.
|
|
49
|
+
* @experimental
|
|
50
|
+
*/
|
|
51
|
+
export type Color3D = string | RGB3D | RGBA3D;
|
|
52
|
+
/**
|
|
53
|
+
* Who advances a time-driven object: 'app' (default) steps it with app frames and
|
|
54
|
+
* keeps frames coming while it runs; 'manual' waits for `update(deltaTime)` in seconds.
|
|
55
|
+
* @experimental
|
|
56
|
+
*/
|
|
57
|
+
export type Clock3D = 'app' | 'manual';
|
|
58
|
+
/**
|
|
59
|
+
* Size in CSS pixels.
|
|
60
|
+
* @experimental
|
|
61
|
+
*/
|
|
62
|
+
export interface ScreenSize3D {
|
|
63
|
+
readonly width: number;
|
|
64
|
+
readonly height: number;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* 4×4 matrix as 16 numbers in column-major order (WebGL and glTF layout), for
|
|
68
|
+
* example a `Float32Array(16)` or a `number[]`. Methods that return a matrix write
|
|
69
|
+
* into a caller-owned one when given.
|
|
70
|
+
* @experimental
|
|
71
|
+
*/
|
|
72
|
+
export interface Matrix3D extends Iterable<number> {
|
|
73
|
+
readonly length: number;
|
|
74
|
+
[index: number]: number;
|
|
75
|
+
}
|
|
76
|
+
/** @experimental */
|
|
77
|
+
export interface Bounds3D {
|
|
78
|
+
readonly min: Vector3D;
|
|
79
|
+
readonly max: Vector3D;
|
|
80
|
+
}
|
|
81
|
+
/** @experimental */
|
|
82
|
+
export interface Ray3D {
|
|
83
|
+
readonly origin: Vector3D;
|
|
84
|
+
readonly direction: Vector3D;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Point in CSS pixels from the top-left corner of the canvas or viewport.
|
|
88
|
+
* @experimental
|
|
89
|
+
*/
|
|
90
|
+
export interface ScreenPoint3D {
|
|
91
|
+
readonly x: number;
|
|
92
|
+
readonly y: number;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Screen point with a depth in [0, 1] (0 near plane, 1 far plane).
|
|
96
|
+
* @experimental
|
|
97
|
+
*/
|
|
98
|
+
export interface DepthPoint3D extends ScreenPoint3D {
|
|
99
|
+
readonly depth: number;
|
|
100
|
+
}
|
|
101
|
+
/** @experimental */
|
|
102
|
+
export interface ProjectedPoint3D extends ScreenPoint3D {
|
|
103
|
+
readonly depth: number;
|
|
104
|
+
readonly inFrustum: boolean;
|
|
105
|
+
}
|
|
106
|
+
/** @experimental */
|
|
107
|
+
export type NodeOptions3D = TransformPatch3D & {
|
|
108
|
+
id?: string;
|
|
109
|
+
visible?: boolean;
|
|
110
|
+
pickable?: boolean;
|
|
111
|
+
/** Live node of the same scene to create the node under. Default: the scene root. */
|
|
112
|
+
parent?: Nova3DNode;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Projection of a perspective camera.
|
|
116
|
+
* @experimental
|
|
117
|
+
*/
|
|
118
|
+
export interface PerspectiveProjection3D {
|
|
119
|
+
/** Vertical field of view in radians, in (0, π). */
|
|
120
|
+
fov: number;
|
|
121
|
+
/** Near plane distance in metres, above 0. */
|
|
122
|
+
near: number;
|
|
123
|
+
/** Far plane distance in metres, above `near`. */
|
|
124
|
+
far: number;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Projection of an orthographic camera.
|
|
128
|
+
* @experimental
|
|
129
|
+
*/
|
|
130
|
+
export interface OrthographicProjection3D {
|
|
131
|
+
/** Height of the view volume in metres; the width follows the aspect. */
|
|
132
|
+
verticalSize: number;
|
|
133
|
+
/** Near plane distance in metres, 0 or more. */
|
|
134
|
+
near: number;
|
|
135
|
+
/** Far plane distance in metres, above `near`. */
|
|
136
|
+
far: number;
|
|
137
|
+
}
|
|
138
|
+
/** @experimental */
|
|
139
|
+
export type PerspectiveCameraOptions3D = NodeOptions3D & PerspectiveProjection3D;
|
|
140
|
+
/** @experimental */
|
|
141
|
+
export type OrthographicCameraOptions3D = NodeOptions3D & OrthographicProjection3D;
|
|
142
|
+
/**
|
|
143
|
+
* Patch of a camera's projection (`camera.set`): the fields of its own kind.
|
|
144
|
+
* @experimental
|
|
145
|
+
*/
|
|
146
|
+
export type CameraPatch3D = Partial<PerspectiveProjection3D> | Partial<OrthographicProjection3D>;
|
|
147
|
+
/** @experimental */
|
|
148
|
+
export interface GeometryOptions3D {
|
|
149
|
+
positions: Float32Array;
|
|
150
|
+
indices?: Uint16Array | Uint32Array;
|
|
151
|
+
normals?: Float32Array;
|
|
152
|
+
uvs?: Float32Array;
|
|
153
|
+
/**
|
|
154
|
+
* Second UV set (glTF TEXCOORD_1), two components per vertex.
|
|
155
|
+
* @experimental
|
|
156
|
+
*/
|
|
157
|
+
uvs1?: Float32Array;
|
|
158
|
+
/**
|
|
159
|
+
* Per-vertex tangent frame (glTF TANGENT), four components per vertex: the tangent
|
|
160
|
+
* direction (+U in the normal map's UV set) and its handedness `w` (±1); the bitangent is
|
|
161
|
+
* `cross(normal, tangent.xyz) * w`. Normal maps of lit materials use it instead of the
|
|
162
|
+
* screen-derivative frame (three.js, Babylon.js); requires `normals` and triangles. Skinned
|
|
163
|
+
* and instanced meshes transform it with their skin and instance matrices; morph targets
|
|
164
|
+
* leave it unchanged.
|
|
165
|
+
* @experimental
|
|
166
|
+
*/
|
|
167
|
+
tangents?: Float32Array;
|
|
168
|
+
/** Per-vertex RGBA in [0,1] in `colorSpace`, four components per vertex; multiplies the base colour. */
|
|
169
|
+
colors?: Float32Array;
|
|
170
|
+
/**
|
|
171
|
+
* Space of the `colors` RGB, here and in later updates: 'srgb' (default), like every
|
|
172
|
+
* colour of the API, is linearised on upload; 'linear' (glTF COLOR_0) is used as is.
|
|
173
|
+
* Alpha is linear in both.
|
|
174
|
+
* @experimental
|
|
175
|
+
*/
|
|
176
|
+
colorSpace?: 'srgb' | 'linear';
|
|
177
|
+
topology?: 'triangles' | 'lines' | 'points';
|
|
178
|
+
usage?: 'static' | 'dynamic';
|
|
179
|
+
}
|
|
180
|
+
/** @experimental */
|
|
181
|
+
export interface GeometryColumns3D {
|
|
182
|
+
positions?: Float32Array;
|
|
183
|
+
normals?: Float32Array;
|
|
184
|
+
uvs?: Float32Array;
|
|
185
|
+
uvs1?: Float32Array;
|
|
186
|
+
/** Tangent xyz and handedness w per vertex, as `GeometryOptions3D.tangents`. */
|
|
187
|
+
tangents?: Float32Array;
|
|
188
|
+
/** Per-vertex RGBA in [0,1] in the geometry's colorSpace, four components per vertex. */
|
|
189
|
+
colors?: Float32Array;
|
|
190
|
+
}
|
|
191
|
+
/** @experimental */
|
|
192
|
+
export interface VertexPatch3D {
|
|
193
|
+
position?: Vector3D;
|
|
194
|
+
normal?: Vector3D;
|
|
195
|
+
uv?: readonly [number, number];
|
|
196
|
+
uv1?: readonly [number, number];
|
|
197
|
+
/** Tangent xyz and handedness w, as the `tangents` column. */
|
|
198
|
+
tangent?: readonly [number, number, number, number];
|
|
199
|
+
/** RGBA in [0, 1] in the geometry's `colorSpace`, as the `colors` column. */
|
|
200
|
+
color?: RGBA3D;
|
|
201
|
+
}
|
|
202
|
+
export interface GeometryDirtyRange3D {
|
|
203
|
+
readonly start: number;
|
|
204
|
+
readonly end: number;
|
|
205
|
+
}
|
|
206
|
+
/** @experimental */
|
|
207
|
+
export interface BasicMaterialOptions3D {
|
|
208
|
+
type: 'basic';
|
|
209
|
+
/** sRGB colour; alpha multiplies `opacity`. Default white. */
|
|
210
|
+
color?: Color3D;
|
|
211
|
+
opacity?: number;
|
|
212
|
+
side?: 'front' | 'back' | 'double';
|
|
213
|
+
alphaMode?: 'opaque' | 'mask' | 'blend';
|
|
214
|
+
alphaCutoff?: number;
|
|
215
|
+
map?: Nova3DTexture | null;
|
|
216
|
+
/**
|
|
217
|
+
* Applies scene fog; defaults to true.
|
|
218
|
+
* @experimental
|
|
219
|
+
*/
|
|
220
|
+
fog?: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* UV transform of `map`.
|
|
223
|
+
* @experimental
|
|
224
|
+
*/
|
|
225
|
+
mapTransform?: TextureTransform3D | null;
|
|
226
|
+
/**
|
|
227
|
+
* Blend equation of alphaMode 'blend' on premultiplied colour: normal (default),
|
|
228
|
+
* additive, multiply or subtractive, as three.js blending modes.
|
|
229
|
+
* @experimental
|
|
230
|
+
*/
|
|
231
|
+
blending?: 'normal' | 'additive' | 'multiply' | 'subtractive';
|
|
232
|
+
/**
|
|
233
|
+
* Depth testing; default true.
|
|
234
|
+
* @experimental
|
|
235
|
+
*/
|
|
236
|
+
depthTest?: boolean;
|
|
237
|
+
/**
|
|
238
|
+
* Depth writes; default true, false for alphaMode 'blend'.
|
|
239
|
+
* @experimental
|
|
240
|
+
*/
|
|
241
|
+
depthWrite?: boolean;
|
|
242
|
+
/**
|
|
243
|
+
* Alpha to coverage on multisampled targets: mask edges and alpha become sample
|
|
244
|
+
* coverage instead of a hard cutoff (three.js alphaToCoverage).
|
|
245
|
+
* @experimental
|
|
246
|
+
*/
|
|
247
|
+
alphaToCoverage?: boolean;
|
|
248
|
+
/**
|
|
249
|
+
* Point size in CSS pixels for 'points' geometry (three.js PointsMaterial.size). Default 1.
|
|
250
|
+
* @experimental
|
|
251
|
+
*/
|
|
252
|
+
pointSize?: number;
|
|
253
|
+
/**
|
|
254
|
+
* Scales points by perspective depth, size·(height/2)/depth, as three.js
|
|
255
|
+
* sizeAttenuation; orthographic views ignore it. Default false.
|
|
256
|
+
* @experimental
|
|
257
|
+
*/
|
|
258
|
+
sizeAttenuation?: boolean;
|
|
259
|
+
/**
|
|
260
|
+
* Faces each mesh or instance to the camera, using its local XY quad, world
|
|
261
|
+
* centre and XY scale: 'spherical' as three.js Sprite, 'vertical' turns about
|
|
262
|
+
* world Y only. Picking and culling still use the mesh orientation.
|
|
263
|
+
* @experimental
|
|
264
|
+
*/
|
|
265
|
+
billboard?: 'none' | 'spherical' | 'vertical';
|
|
266
|
+
/**
|
|
267
|
+
* Billboard rotation in the view plane, radians counter-clockwise. Instances add
|
|
268
|
+
* their own roll about local Z.
|
|
269
|
+
* @experimental
|
|
270
|
+
*/
|
|
271
|
+
billboardRotation?: number;
|
|
272
|
+
/**
|
|
273
|
+
* Draws one cell of an atlas map (three.js sprite-sheet offsets, Babylon sprite
|
|
274
|
+
* cells): frames run row by row from the top-left of the upright image.
|
|
275
|
+
* Instanced meshes created with `frames: true` choose the cell per instance.
|
|
276
|
+
* Ignored for points.
|
|
277
|
+
* @experimental
|
|
278
|
+
*/
|
|
279
|
+
spriteSheet?: SpriteSheet3D | null;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Atlas grid of a sprite sheet.
|
|
283
|
+
* @experimental
|
|
284
|
+
*/
|
|
285
|
+
export interface SpriteSheet3D {
|
|
286
|
+
readonly columns: number;
|
|
287
|
+
readonly rows: number;
|
|
288
|
+
/** Default 0. */
|
|
289
|
+
readonly frame?: number;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Render-state options shared by every material type.
|
|
293
|
+
* @experimental
|
|
294
|
+
*/
|
|
295
|
+
export type MaterialRenderOptions3D = Pick<BasicMaterialOptions3D, 'opacity' | 'side' | 'alphaMode' | 'alphaCutoff' | 'blending' | 'depthTest' | 'depthWrite' | 'alphaToCoverage'>;
|
|
296
|
+
/**
|
|
297
|
+
* UV transform of one material map with KHR_texture_transform semantics:
|
|
298
|
+
* uv' = translate(offset) · rotate(rotation) · scale(scale) · uv.
|
|
299
|
+
* @experimental
|
|
300
|
+
*/
|
|
301
|
+
export interface TextureTransform3D {
|
|
302
|
+
/** UV set the map samples: 0 `uvs`, 1 `uvs1`. Default 0. */
|
|
303
|
+
texCoord?: 0 | 1;
|
|
304
|
+
offset?: readonly [number, number];
|
|
305
|
+
/** Radians; rotates UVs counter-clockwise (the image clockwise), as in KHR_texture_transform. */
|
|
306
|
+
rotation?: number;
|
|
307
|
+
scale?: readonly [number, number];
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Scene fog; depth runs along the camera view direction.
|
|
311
|
+
* @experimental
|
|
312
|
+
*/
|
|
313
|
+
export type FogOptions3D = {
|
|
314
|
+
type: 'linear';
|
|
315
|
+
/** sRGB colour; alpha is ignored. */
|
|
316
|
+
color: Color3D;
|
|
317
|
+
/** Metres from the camera where fog starts. */
|
|
318
|
+
near: number;
|
|
319
|
+
/** Metres from the camera where fog is opaque. */
|
|
320
|
+
far: number;
|
|
321
|
+
} | {
|
|
322
|
+
type: 'exp' | 'exp2';
|
|
323
|
+
/** sRGB colour; alpha is ignored. */
|
|
324
|
+
color: Color3D;
|
|
325
|
+
/** Density per metre. */
|
|
326
|
+
density: number;
|
|
327
|
+
};
|
|
328
|
+
/**
|
|
329
|
+
* Scene background. A colour replaces the app clear colour for views of the
|
|
330
|
+
* scene; an environment draws a sky (sharp from the source, or blurred from
|
|
331
|
+
* the prefiltered cube when `blur` > 0) using the environment rotation.
|
|
332
|
+
* @experimental
|
|
333
|
+
*/
|
|
334
|
+
export type BackgroundOptions3D = {
|
|
335
|
+
type: 'color';
|
|
336
|
+
/** Opaque sRGB colour (alpha must be 1). */
|
|
337
|
+
color: Color3D;
|
|
338
|
+
} | {
|
|
339
|
+
type: 'environment';
|
|
340
|
+
/** Defaults to the scene environment at render time. */
|
|
341
|
+
environment?: Nova3DEnvironment | null;
|
|
342
|
+
/** Radiance multiplier, independent of the environment lighting intensity. Default 1. */
|
|
343
|
+
intensity?: number;
|
|
344
|
+
/** 0 sharp … 1 fully blurred. Default 0. */
|
|
345
|
+
blur?: number;
|
|
346
|
+
} | {
|
|
347
|
+
type: 'texture';
|
|
348
|
+
/** 2D texture stretched over the view; row 0 is the image top. */
|
|
349
|
+
texture: Nova3DTexture;
|
|
350
|
+
intensity?: number;
|
|
351
|
+
};
|
|
352
|
+
export interface FrameMetrics3D {
|
|
353
|
+
readonly drawCalls: number;
|
|
354
|
+
readonly triangles: number;
|
|
355
|
+
readonly uploadBytes: number;
|
|
356
|
+
readonly matrixUpdates: number;
|
|
357
|
+
readonly cpuMs: number;
|
|
358
|
+
readonly gpuMs: number | null;
|
|
359
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** Parsed USDA value: numbers, strings/tokens, flat numeric arrays and wrappers. */
|
|
2
|
+
export type USDValue3D = number | string | boolean | null | Float64Array | USDValue3D[] | USDAsset3D | USDPath3D | USDTimeSamples3D | USDDictionary3D;
|
|
3
|
+
export interface USDAsset3D {
|
|
4
|
+
readonly asset: string;
|
|
5
|
+
}
|
|
6
|
+
export interface USDPath3D {
|
|
7
|
+
readonly path: string;
|
|
8
|
+
}
|
|
9
|
+
export interface USDTimeSamples3D {
|
|
10
|
+
readonly samples: readonly {
|
|
11
|
+
time: number;
|
|
12
|
+
value: USDValue3D;
|
|
13
|
+
}[];
|
|
14
|
+
}
|
|
15
|
+
export interface USDDictionary3D {
|
|
16
|
+
readonly dictionary: Readonly<Record<string, USDValue3D>>;
|
|
17
|
+
}
|
|
18
|
+
export interface USDProperty3D {
|
|
19
|
+
name: string;
|
|
20
|
+
/** Type name, e.g. 'point3f[]', or 'rel'. */
|
|
21
|
+
type: string;
|
|
22
|
+
value?: USDValue3D;
|
|
23
|
+
/** Connection targets of `name.connect`. */
|
|
24
|
+
connect?: string[];
|
|
25
|
+
/** Relationship targets. */
|
|
26
|
+
targets?: string[];
|
|
27
|
+
timeSamples?: USDTimeSamples3D;
|
|
28
|
+
metadata: Record<string, USDValue3D>;
|
|
29
|
+
}
|
|
30
|
+
export interface USDPrim3D {
|
|
31
|
+
specifier: 'def' | 'over' | 'class';
|
|
32
|
+
type: string;
|
|
33
|
+
name: string;
|
|
34
|
+
path: string;
|
|
35
|
+
metadata: Record<string, USDValue3D>;
|
|
36
|
+
properties: Map<string, USDProperty3D>;
|
|
37
|
+
children: USDPrim3D[];
|
|
38
|
+
}
|
|
39
|
+
export interface USDLayer3D {
|
|
40
|
+
metadata: Record<string, USDValue3D>;
|
|
41
|
+
prims: USDPrim3D[];
|
|
42
|
+
}
|
|
43
|
+
export interface USDAParseLimits3D {
|
|
44
|
+
maxRecords: number;
|
|
45
|
+
/** Largest numeric array in bytes (as Float64). */
|
|
46
|
+
maxArrayBytes: number;
|
|
47
|
+
}
|
|
48
|
+
export declare function isUSDA3D(text: string): boolean;
|
|
49
|
+
/** Parses the USDA text subset used by USDZ assets (no composition). */
|
|
50
|
+
export declare function parseUSDA3D(text: string, limits: USDAParseLimits3D): USDLayer3D;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ImportScene3D, ImportTextureSource3D } from '../import/ImportedModel.js';
|
|
2
|
+
import { USDLayer3D } from './USDAParser.js';
|
|
3
|
+
export interface USDSceneOptions3D {
|
|
4
|
+
maxRecords: number;
|
|
5
|
+
maxDecompressedBytes: number;
|
|
6
|
+
maxNodes: number;
|
|
7
|
+
maxVertices: number;
|
|
8
|
+
maxPrimitives: number;
|
|
9
|
+
maxAnimationKeys: number;
|
|
10
|
+
convertUnits: boolean;
|
|
11
|
+
convertAxes: boolean;
|
|
12
|
+
/** Base URL for textures of a bare USDA layer. */
|
|
13
|
+
baseUrl?: string;
|
|
14
|
+
signal?: AbortSignal;
|
|
15
|
+
}
|
|
16
|
+
/** Reads a USDZ archive (or a bare USDA layer) into a format-neutral scene. */
|
|
17
|
+
export declare function usdzScene3D(bytes: Uint8Array, options: USDSceneOptions3D): Promise<ImportScene3D>;
|
|
18
|
+
type TextureLoader = (asset: string) => Promise<Omit<ImportTextureSource3D, 'label'> | null>;
|
|
19
|
+
export declare function interpretUSD3D(layer: USDLayer3D, options: USDSceneOptions3D, loadTexture: TextureLoader): Promise<ImportScene3D>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ModelLoadOptions3D, ModelParseOptions3D } from '../import/ImportedModel.js';
|
|
2
|
+
import { Nova3DModelAsset } from '../import/ModelAsset.js';
|
|
3
|
+
import { LoaderInput3D } from '../loaders/LoaderIO.js';
|
|
4
|
+
/**
|
|
5
|
+
* Options of `loadUSDZ`.
|
|
6
|
+
* @experimental
|
|
7
|
+
*/
|
|
8
|
+
export type USDZLoadOptions3D = ModelLoadOptions3D;
|
|
9
|
+
/**
|
|
10
|
+
* Options of `parseUSDZ`; `baseUrl` resolves textures of a bare USDA layer.
|
|
11
|
+
* @experimental
|
|
12
|
+
*/
|
|
13
|
+
export type USDZParseOptions3D = ModelParseOptions3D;
|
|
14
|
+
/**
|
|
15
|
+
* Parses a USDZ archive (stored or deflated entries) whose root layer is USDA,
|
|
16
|
+
* or a bare USDA layer, into an asset. Binary USDC layers are rejected.
|
|
17
|
+
* Converts to Y-up metres (metersPerUnit, default 0.01) unless disabled.
|
|
18
|
+
* Needs no app: the asset is bound to one by its first `instantiate`; cancel with `signal`.
|
|
19
|
+
* @experimental
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseUSDZ(data: LoaderInput3D, options?: USDZParseOptions3D): Promise<Nova3DModelAsset>;
|
|
22
|
+
/**
|
|
23
|
+
* Fetches a USDZ file with bounded streaming; textures resolve relative to it.
|
|
24
|
+
* Needs no app: the asset is bound to one by its first `instantiate`; cancel with `signal`.
|
|
25
|
+
* @experimental
|
|
26
|
+
*/
|
|
27
|
+
export declare function loadUSDZ(url: string | URL, options?: USDZLoadOptions3D): Promise<Nova3DModelAsset>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ByteBudget3D } from '../import/ImportedModel.js';
|
|
2
|
+
export interface ZipEntry3D {
|
|
3
|
+
name: string;
|
|
4
|
+
method: 0 | 8;
|
|
5
|
+
crc: number;
|
|
6
|
+
compressedSize: number;
|
|
7
|
+
size: number;
|
|
8
|
+
/** Offset of the entry data. */
|
|
9
|
+
offset: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function crc32(data: Uint8Array): number;
|
|
12
|
+
export declare function isZip3D(bytes: Uint8Array): boolean;
|
|
13
|
+
/** Reads the central directory of a single-disk, non-ZIP64, unencrypted archive. */
|
|
14
|
+
export declare function readZipDirectory3D(bytes: Uint8Array, maxEntries: number): ZipEntry3D[];
|
|
15
|
+
/** Returns the entry bytes, inflating and checking CRC-32. */
|
|
16
|
+
export declare function readZipEntry3D(bytes: Uint8Array, entry: ZipEntry3D, budget: ByteBudget3D, signal?: AbortSignal): Promise<Uint8Array>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BackendRequest3D } from './Features.js';
|
|
2
|
+
/** Adapter and device of a WebGPU app plus what it needs to re-request them after a loss. */
|
|
3
|
+
export interface WebGPUDevice3D {
|
|
4
|
+
readonly gpu: GPU;
|
|
5
|
+
readonly adapter: GPUAdapter;
|
|
6
|
+
readonly device: GPUDevice;
|
|
7
|
+
/** `navigator.gpu.getPreferredCanvasFormat()`. */
|
|
8
|
+
readonly format: GPUTextureFormat;
|
|
9
|
+
readonly powerPreference?: GPUPowerPreference;
|
|
10
|
+
}
|
|
11
|
+
/** Outcome of a device request: a device, or why WebGPU cannot be used. */
|
|
12
|
+
export type WebGPURequest3D = {
|
|
13
|
+
readonly device: WebGPUDevice3D;
|
|
14
|
+
readonly failure?: undefined;
|
|
15
|
+
} | {
|
|
16
|
+
readonly device?: undefined;
|
|
17
|
+
readonly failure: string;
|
|
18
|
+
};
|
|
19
|
+
/** Backend chosen by `createAppAsync`. */
|
|
20
|
+
export type BackendChoice3D = {
|
|
21
|
+
readonly backend: 'webgpu';
|
|
22
|
+
readonly gpu: WebGPUDevice3D;
|
|
23
|
+
} | {
|
|
24
|
+
readonly backend: 'webgl2';
|
|
25
|
+
readonly reason: string | null;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Requests an adapter and a device. Never throws: a missing `navigator.gpu`,
|
|
29
|
+
* a null adapter or a rejected device become a failure reason.
|
|
30
|
+
*/
|
|
31
|
+
export declare function requestWebGPU3D(navigator: {
|
|
32
|
+
readonly gpu?: GPU;
|
|
33
|
+
} | undefined, powerPreference?: GPUPowerPreference): Promise<WebGPURequest3D>;
|
|
34
|
+
/**
|
|
35
|
+
* Resolves the backend of an app: 'webgl2' never touches WebGPU, 'webgpu'
|
|
36
|
+
* throws when no device is available, 'auto' falls back to WebGL2 with the reason.
|
|
37
|
+
*/
|
|
38
|
+
export declare function selectBackend3D(request: BackendRequest3D | undefined, navigator: {
|
|
39
|
+
readonly gpu?: GPU;
|
|
40
|
+
} | undefined, powerPreference?: GPUPowerPreference): Promise<BackendChoice3D>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BasicVariant3D } from '../services/BasicShader.js';
|
|
2
|
+
/**
|
|
3
|
+
* Vertex attributes a basic variant reads: bit 0 position, 1 normal, 2 uv
|
|
4
|
+
* (location 2), 3 colour, 4 uv1 (location 8), 5 instance matrix, 6 instance
|
|
5
|
+
* colour, 7 instance frame. The variant key is basicVariantKey3D of the WebGL
|
|
6
|
+
* program; skinning, morphs and points are rejected before a key is built.
|
|
7
|
+
*/
|
|
8
|
+
export declare function basicAttributes3D(variant: BasicVariant3D): number;
|
|
9
|
+
/** WGSL of a basic variant: the BasicShader.ts math for colour, matcap, normal and depth shades. */
|
|
10
|
+
export declare function basicShaderSource3D(variant: BasicVariant3D): string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebGPU flag values from the specification. The DOM typings declare the flag
|
|
3
|
+
* types but not the global constant namespaces, and tests run without them.
|
|
4
|
+
*/
|
|
5
|
+
export declare const BufferUsage3D: Readonly<{
|
|
6
|
+
MAP_READ: 1;
|
|
7
|
+
MAP_WRITE: 2;
|
|
8
|
+
COPY_SRC: 4;
|
|
9
|
+
COPY_DST: 8;
|
|
10
|
+
INDEX: 16;
|
|
11
|
+
VERTEX: 32;
|
|
12
|
+
UNIFORM: 64;
|
|
13
|
+
STORAGE: 128;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const TextureUsage3D: Readonly<{
|
|
16
|
+
COPY_SRC: 1;
|
|
17
|
+
COPY_DST: 2;
|
|
18
|
+
TEXTURE_BINDING: 4;
|
|
19
|
+
STORAGE_BINDING: 8;
|
|
20
|
+
RENDER_ATTACHMENT: 16;
|
|
21
|
+
}>;
|
|
22
|
+
export declare const ShaderStage3D: Readonly<{
|
|
23
|
+
VERTEX: 1;
|
|
24
|
+
FRAGMENT: 2;
|
|
25
|
+
COMPUTE: 4;
|
|
26
|
+
}>;
|
|
27
|
+
export declare const MapMode3D: Readonly<{
|
|
28
|
+
READ: 1;
|
|
29
|
+
WRITE: 2;
|
|
30
|
+
}>;
|
|
31
|
+
/** Dynamic uniform offsets are multiples of the default `minUniformBufferOffsetAlignment`. */
|
|
32
|
+
export declare const uniformSlot3D = 256;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Nova3DGeometry } from '../model/Geometry.js';
|
|
2
|
+
import { Nova3DMesh } from '../model/Mesh.js';
|
|
3
|
+
import { Nova3DNode } from '../model/Node.js';
|
|
4
|
+
import { Nova3DDeformedMesh } from '../deformation/DeformedMesh.js';
|
|
5
|
+
/** Deformation shader bits: 1 skin, 2 morph targets, 4 flat normals (lit shaders only). */
|
|
6
|
+
export type DeformationKey3D = number;
|
|
7
|
+
export declare const deformSkin3D = 1;
|
|
8
|
+
export declare const deformMorph3D = 2;
|
|
9
|
+
export declare const deformFlat3D = 4;
|
|
10
|
+
/** Vertex attribute bit of the joint indices (location 11) and weights (location 12). */
|
|
11
|
+
export declare const deformationAttributes3D = 256;
|
|
12
|
+
/** Per-mesh block of group 3: morph weights, morph count, vertex count. */
|
|
13
|
+
export declare const deformationLayout3D: import('./UniformLayout.js').UniformLayout3D;
|
|
14
|
+
/** Deformation key of a mesh: 0 for meshes that are not skinned or morphed. */
|
|
15
|
+
export declare function deformationKey3D(node: Nova3DMesh): DeformationKey3D;
|
|
16
|
+
/**
|
|
17
|
+
* Adds skinning and morph targets to a generated scene shader (lit, basic or
|
|
18
|
+
* shadow caster, not instanced): the DeformationShader.ts math on joint
|
|
19
|
+
* attributes, a storage-buffer palette and storage-buffer morph deltas read by
|
|
20
|
+
* vertex index. `normals` names the normal transform: 'lit' uses the inverse
|
|
21
|
+
* transpose of the skin basis (PBRProgram.ts), 'basic' the basis itself
|
|
22
|
+
* (BasicShader.ts), null skips normals (casters, picking).
|
|
23
|
+
*/
|
|
24
|
+
export declare function deformedShaderSource3D(source: string, key: DeformationKey3D, normals: 'lit' | 'basic' | null): string;
|
|
25
|
+
/**
|
|
26
|
+
* Side culling of a skinned shadow caster: the skin parity decides the logical
|
|
27
|
+
* front face (ShadowMaps.ts cullInstance with hasSkin).
|
|
28
|
+
*/
|
|
29
|
+
export declare function skinnedCasterSource3D(source: string): string;
|
|
30
|
+
interface GeometryResident3D {
|
|
31
|
+
joints?: GPUBuffer;
|
|
32
|
+
weights?: GPUBuffer;
|
|
33
|
+
morph?: GPUBuffer;
|
|
34
|
+
bytes: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Deformation residency of one WebGPU device: geometry-owned joint and weight
|
|
38
|
+
* vertex buffers and morph deltas (uploaded once), and per-mesh skin palettes
|
|
39
|
+
* and morph weights rewritten only when the pose version changes.
|
|
40
|
+
*/
|
|
41
|
+
export declare class WebGPUDeformation3D {
|
|
42
|
+
private readonly _device;
|
|
43
|
+
readonly layout: GPUBindGroupLayout;
|
|
44
|
+
private readonly _geometry;
|
|
45
|
+
private readonly _poses;
|
|
46
|
+
private readonly _pipelineLayouts;
|
|
47
|
+
private readonly _shaders;
|
|
48
|
+
private _empty;
|
|
49
|
+
private _bytes;
|
|
50
|
+
uploads: number;
|
|
51
|
+
constructor(_device: GPUDevice);
|
|
52
|
+
get bytes(): number;
|
|
53
|
+
/** The groups of `base` with the object group (2) replaced by the deformed object group. */
|
|
54
|
+
pipelineLayout(base: GPUPipelineLayout, groups: readonly GPUBindGroupLayout[]): GPUPipelineLayout;
|
|
55
|
+
/** Shader cache of one deformation key, for variant keys that carry no deformation bits. */
|
|
56
|
+
shaders<T>(key: DeformationKey3D): Map<number, T>;
|
|
57
|
+
/** Uploads static columns on first use and the pose when its version changed. */
|
|
58
|
+
prepare(node: Nova3DDeformedMesh): void;
|
|
59
|
+
/** Object group (2) of a prepared mesh over the renderer's object uniform buffer `objects`. */
|
|
60
|
+
group(node: Nova3DMesh, objects: GPUBuffer): GPUBindGroup;
|
|
61
|
+
/** Joint and weight vertex buffers of a prepared skinned mesh's geometry. */
|
|
62
|
+
joints(geometry: Nova3DGeometry): GeometryResident3D;
|
|
63
|
+
releaseNode(node: Nova3DNode): void;
|
|
64
|
+
releaseGeometry(geometry: Nova3DGeometry): void;
|
|
65
|
+
/** Drops every resident; `lost` skips destroy calls on objects of a lost device. */
|
|
66
|
+
reset(lost: boolean): void;
|
|
67
|
+
private _buffer;
|
|
68
|
+
private _ensureGeometry;
|
|
69
|
+
private _createPose;
|
|
70
|
+
}
|
|
71
|
+
export {};
|