@nova-lab/core 1.0.0-dev.19 → 1.1.0-dev.229
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1035 -10
- package/THIRD_PARTY_NOTICES.md +26 -0
- package/dist/2d/accessibility.d.ts +2 -0
- package/dist/2d/accessibility.js +171 -0
- package/dist/2d/commands.d.ts +2 -0
- package/dist/2d/commands.js +80 -0
- package/dist/2d/effects.d.ts +10 -0
- package/dist/2d/effects.js +566 -0
- package/dist/2d/ktx2.d.ts +5 -0
- package/dist/2d/ktx2.js +542 -0
- package/dist/2d/lighting.d.ts +3 -0
- package/dist/2d/lighting.js +495 -0
- package/dist/2d/lottie.d.ts +3 -0
- package/dist/2d/lottie.js +254 -0
- package/dist/2d/meshes.d.ts +4 -0
- package/dist/2d/meshes.js +451 -0
- package/dist/2d/primitives.d.ts +3 -0
- package/dist/2d/primitives.js +85 -0
- package/dist/2d/render-textures.d.ts +3 -0
- package/dist/2d/render-textures.js +539 -0
- package/dist/2d/svg/documents.d.ts +5 -0
- package/dist/2d/svg/documents.js +7 -0
- package/dist/2d/svg/renderer.d.ts +3 -0
- package/dist/2d/svg/renderer.js +222 -0
- package/dist/2d/svg.d.ts +3 -0
- package/dist/2d/svg.js +4 -0
- package/dist/2d/tools.d.ts +2 -0
- package/dist/2d/tools.js +100 -0
- package/dist/2d/video.d.ts +5 -0
- package/dist/2d/video.js +90 -0
- package/dist/2d.d.ts +2 -0
- package/dist/2d.js +220 -0
- package/dist/3d/animation.d.ts +8 -0
- package/dist/3d/animation.js +1396 -0
- package/dist/3d/area-lights.d.ts +2 -0
- package/dist/3d/area-lights.js +19 -0
- package/dist/3d/audio.d.ts +4 -0
- package/dist/3d/audio.js +500 -0
- package/dist/3d/character.d.ts +2 -0
- package/dist/3d/character.js +136 -0
- package/dist/3d/collision.d.ts +3 -0
- package/dist/3d/collision.js +387 -0
- package/dist/3d/commands.d.ts +2 -0
- package/dist/3d/commands.js +108 -0
- package/dist/3d/controls.d.ts +8 -0
- package/dist/3d/controls.js +1041 -0
- package/dist/3d/documents.d.ts +5 -0
- package/dist/3d/documents.js +227 -0
- package/dist/3d/effects.d.ts +5 -0
- package/dist/3d/effects.js +1986 -0
- package/dist/3d/export.d.ts +4 -0
- package/dist/3d/export.js +347 -0
- package/dist/3d/fbx.d.ts +2 -0
- package/dist/3d/fbx.js +784 -0
- package/dist/3d/gltf.d.ts +2 -0
- package/dist/3d/gltf.js +5 -0
- package/dist/3d/helpers.d.ts +5 -0
- package/dist/3d/helpers.js +191 -0
- package/dist/3d/ik.d.ts +9 -0
- package/dist/3d/ik.js +777 -0
- package/dist/3d/loaders.d.ts +17 -0
- package/dist/3d/loaders.js +1406 -0
- package/dist/3d/nodes.d.ts +8 -0
- package/dist/3d/nodes.js +49 -0
- package/dist/3d/particles.d.ts +5 -0
- package/dist/3d/particles.js +1574 -0
- package/dist/3d/physics/backend.d.ts +7 -0
- package/dist/3d/physics/backend.js +1 -0
- package/dist/3d/physics/rapier.d.ts +3 -0
- package/dist/3d/physics/rapier.js +765 -0
- package/dist/3d/physics.d.ts +5 -0
- package/dist/3d/physics.js +3346 -0
- package/dist/3d/splats.d.ts +7 -0
- package/dist/3d/splats.js +862 -0
- package/dist/3d/text.d.ts +5 -0
- package/dist/3d/text.js +1043 -0
- package/dist/3d/tiles.d.ts +24 -0
- package/dist/3d/tiles.js +1705 -0
- package/dist/3d/tools.d.ts +12 -0
- package/dist/3d/tools.js +338 -0
- package/dist/3d/usdz.d.ts +2 -0
- package/dist/3d/usdz.js +634 -0
- package/dist/3d/xr.d.ts +2 -0
- package/dist/3d/xr.js +202 -0
- package/dist/3d-B4jWF8Qb.js +5591 -0
- package/dist/3d.d.ts +40 -0
- package/dist/3d.js +44 -0
- package/dist/Capsule-BFVpZfvc.js +44 -0
- package/dist/Clip-CAN7t03k.js +204 -0
- package/dist/Color-vuv9UnoY.js +34 -0
- package/dist/DeformedMesh-CPi0P_vc.js +280 -0
- package/dist/Document-DCVEZSvM.js +415 -0
- package/dist/Errors-B2ekO9bZ.js +30 -0
- package/dist/Features-BsjmePtc.js +557 -0
- package/dist/GLTFResourceIO-CYJyCUTt.js +124 -0
- package/dist/GPUParticleState-CQlNpoDa.js +545 -0
- package/dist/Geometry-DytO490z.js +227 -0
- package/dist/Inflate-DWw0V-Up.js +42 -0
- package/dist/InstancedMesh-DPrgrw5z.js +527 -0
- package/dist/Limits-Bw5XQdFr.js +20 -0
- package/dist/LineHelper-Ad0z9uDi.js +131 -0
- package/dist/LoaderIO-BwrM84OM.js +114 -0
- package/dist/Material-BpfLPmK9.js +777 -0
- package/dist/Mesh-BaRxAAJq.js +209 -0
- package/dist/Node-QfgAE2_v.js +877 -0
- package/dist/NovaAssetRegistry-p2QlCwvT.js +1168 -0
- package/dist/NovaNode-CBZ-Ol-W.js +2016 -0
- package/dist/NovaRenderCommandWriter-CWQRa42y.js +1949 -0
- package/dist/NovaTextSelectionService-CipuujCT.js +18526 -0
- package/dist/NovaWebGLProgram-BO250QNF.js +97 -0
- package/dist/Options-CajE7LLJ.js +15 -0
- package/dist/PolygonMesh-D4PnnfIo.js +657 -0
- package/dist/Ready-BzyhRtjD.js +21 -0
- package/dist/Scene-CDfNgf9I.js +911 -0
- package/dist/Shader-b6_HDndT.js +48 -0
- package/dist/SplatShader-wJ6GJ3vo.js +130 -0
- package/dist/Texture-dTKMlTpK.js +267 -0
- package/dist/TextureLoader-CfDzdy2m.js +411 -0
- package/dist/Textures-CGL4Kf-8.js +651 -0
- package/dist/ToneMapping-D9IWvN0u.js +46 -0
- package/dist/WebGPURenderer-DjD0IxVC.js +4921 -0
- package/dist/ZipReader-C-MSEsSr.js +84 -0
- package/dist/core.js +218 -24024
- package/dist/domain/types/base.types.d.ts +18 -9
- package/dist/domain/types/component.types.d.ts +5 -5
- package/dist/domain/types/cursor.types.d.ts +1 -1
- package/dist/domain/types/diagnostics.types.d.ts +2 -0
- package/dist/domain/types/export.types.d.ts +2 -2
- package/dist/domain/types/hit-test.types.d.ts +1 -1
- package/dist/domain/types/motion.types.d.ts +2 -2
- package/dist/domain/types/renderer.types.d.ts +88 -4
- package/dist/domain/types/rendering/index.d.ts +29 -4
- package/dist/domain/types/sound.types.d.ts +1 -1
- package/dist/domain/types/theme.types.d.ts +1 -1
- package/dist/domain/utils/bounds.d.ts +1 -1
- package/dist/domain/utils/nova-text.d.ts +9 -0
- package/dist/domain/utils/schemaBounds.d.ts +2 -2
- package/dist/export-svg-document-ChaNXMaG.js +668 -0
- package/dist/features/3d/Errors.d.ts +57 -0
- package/dist/features/3d/Nova3DApp.d.ts +429 -0
- package/dist/features/3d/animation/Animator.d.ts +260 -0
- package/dist/features/3d/animation/Clip.d.ts +74 -0
- package/dist/features/3d/animation/Graph.d.ts +158 -0
- package/dist/features/3d/animation/Mask.d.ts +40 -0
- package/dist/features/3d/audio/Audio.d.ts +114 -0
- package/dist/features/3d/audio/Sound.d.ts +133 -0
- package/dist/features/3d/character/CharacterController.d.ts +61 -0
- package/dist/features/3d/collision/Capsule.d.ts +25 -0
- package/dist/features/3d/collision/Octree.d.ts +94 -0
- package/dist/features/3d/controls/CameraMotionControls.d.ts +154 -0
- package/dist/features/3d/controls/CameraOrientation.d.ts +47 -0
- package/dist/features/3d/controls/OrbitControls.d.ts +73 -0
- package/dist/features/3d/controls/PointerGesture.d.ts +25 -0
- package/dist/features/3d/controls/PointerLock.d.ts +36 -0
- package/dist/features/3d/controls/Snapping.d.ts +32 -0
- package/dist/features/3d/controls/TransformGizmo.d.ts +79 -0
- package/dist/features/3d/deformation/DeformationGPU.d.ts +52 -0
- package/dist/features/3d/deformation/DeformationShader.d.ts +2 -0
- package/dist/features/3d/deformation/DeformedMesh.d.ts +36 -0
- package/dist/features/3d/deformation/GeometryDeformation.d.ts +25 -0
- package/dist/features/3d/documents/Document.d.ts +59 -0
- package/dist/features/3d/documents/DocumentCommands.d.ts +45 -0
- package/dist/features/3d/documents/DocumentSchema.d.ts +18 -0
- package/dist/features/3d/documents/DocumentTransform.d.ts +4 -0
- package/dist/features/3d/documents/DocumentTypes.d.ts +182 -0
- package/dist/features/3d/documents/DocumentValidation.d.ts +18 -0
- package/dist/features/3d/documents/Projection.d.ts +65 -0
- package/dist/features/3d/effects/CubeLUT.d.ts +24 -0
- package/dist/features/3d/effects/Effects.d.ts +32 -0
- package/dist/features/3d/effects/EffectsGPU.d.ts +80 -0
- package/dist/features/3d/effects/EffectsPlan.d.ts +268 -0
- package/dist/features/3d/effects/EffectsShaders.d.ts +35 -0
- package/dist/features/3d/export/GLTFExporter.d.ts +49 -0
- package/dist/features/3d/export/ThreeMFExporter.d.ts +19 -0
- package/dist/features/3d/export/ZipWriter.d.ts +9 -0
- package/dist/features/3d/fbx/FBXLoader.d.ts +26 -0
- package/dist/features/3d/fbx/FBXParser.d.ts +35 -0
- package/dist/features/3d/fbx/FBXScene.d.ts +20 -0
- package/dist/features/3d/gltf/GLTFLoader.d.ts +16 -0
- package/dist/features/3d/gltf/GLTFTypes.d.ts +64 -0
- package/dist/features/3d/gltf/services/GLTFBinary.d.ts +21 -0
- package/dist/features/3d/gltf/services/GLTFGeometry.d.ts +14 -0
- package/dist/features/3d/gltf/services/GLTFResourceIO.d.ts +64 -0
- package/dist/features/3d/helpers/LineHelper.d.ts +51 -0
- package/dist/features/3d/helpers/StaticHelpers.d.ts +47 -0
- package/dist/features/3d/helpers/TrackedHelpers.d.ts +84 -0
- package/dist/features/3d/ik/ChainIK.d.ts +44 -0
- package/dist/features/3d/ik/IKChain.d.ts +92 -0
- package/dist/features/3d/ik/IKMath.d.ts +49 -0
- package/dist/features/3d/ik/IKSolver.d.ts +97 -0
- package/dist/features/3d/ik/LookAtIK.d.ts +58 -0
- package/dist/features/3d/ik/TwoBoneIK.d.ts +57 -0
- package/dist/features/3d/import/ImportAnimation.d.ts +20 -0
- package/dist/features/3d/import/ImportMath.d.ts +42 -0
- package/dist/features/3d/import/ImportedModel.d.ts +135 -0
- package/dist/features/3d/import/Inflate.d.ts +5 -0
- package/dist/features/3d/import/ModelAsset.d.ts +149 -0
- package/dist/features/3d/import/PolygonMesh.d.ts +54 -0
- package/dist/features/3d/lights/AreaLightTables.d.ts +8 -0
- package/dist/features/3d/lights/AreaLights.d.ts +11 -0
- package/dist/features/3d/loaders/EXRCompression.d.ts +13 -0
- package/dist/features/3d/loaders/EXRLoader.d.ts +39 -0
- package/dist/features/3d/loaders/HDRLoader.d.ts +26 -0
- package/dist/features/3d/loaders/Limits.d.ts +70 -0
- package/dist/features/3d/loaders/LoaderBuffers.d.ts +42 -0
- package/dist/features/3d/loaders/LoaderIO.d.ts +81 -0
- package/dist/features/3d/loaders/LoaderModel.d.ts +80 -0
- package/dist/features/3d/loaders/LoaderText.d.ts +27 -0
- package/dist/features/3d/loaders/MTLLoader.d.ts +105 -0
- package/dist/features/3d/loaders/OBJLoader.d.ts +70 -0
- package/dist/features/3d/loaders/PLYLoader.d.ts +47 -0
- package/dist/features/3d/loaders/STLLoader.d.ts +27 -0
- package/dist/features/3d/model/Camera.d.ts +33 -0
- package/dist/features/3d/model/Environment.d.ts +31 -0
- package/dist/features/3d/model/Geometry.d.ts +59 -0
- package/dist/features/3d/model/InstancedMesh.d.ts +134 -0
- package/dist/features/3d/model/LOD.d.ts +31 -0
- package/dist/features/3d/model/Light.d.ts +200 -0
- package/dist/features/3d/model/Material.d.ts +308 -0
- package/dist/features/3d/model/MaterialExtensions.d.ts +200 -0
- package/dist/features/3d/model/Mesh.d.ts +92 -0
- package/dist/features/3d/model/Node.d.ts +87 -0
- package/dist/features/3d/model/ReflectionProbe.d.ts +45 -0
- package/dist/features/3d/model/RenderTarget.d.ts +41 -0
- package/dist/features/3d/model/Scene.d.ts +173 -0
- package/dist/features/3d/model/Texture.d.ts +143 -0
- package/dist/features/3d/nodes/Nodes.d.ts +8 -0
- package/dist/features/3d/nodes/ShaderNode.d.ts +240 -0
- package/dist/features/3d/particles/GPUParticleSchedule.d.ts +67 -0
- package/dist/features/3d/particles/GPUParticleShaders.d.ts +19 -0
- package/dist/features/3d/particles/GPUParticleState.d.ts +106 -0
- package/dist/features/3d/particles/GPUParticleSystem.d.ts +192 -0
- package/dist/features/3d/particles/ParticleCurves.d.ts +34 -0
- package/dist/features/3d/particles/ParticleOptions.d.ts +78 -0
- package/dist/features/3d/particles/ParticleSystem.d.ts +368 -0
- package/dist/features/3d/physics/PhysicsBackend.d.ts +352 -0
- package/dist/features/3d/physics/PhysicsDebug.d.ts +24 -0
- package/dist/features/3d/physics/PhysicsWorld.d.ts +352 -0
- package/dist/features/3d/physics/basic/BasicCollision.d.ts +75 -0
- package/dist/features/3d/physics/basic/BasicPhysics.d.ts +24 -0
- package/dist/features/3d/physics/basic/BasicShapes.d.ts +103 -0
- package/dist/features/3d/physics/rapier/ContactBuffer.d.ts +32 -0
- package/dist/features/3d/physics/rapier/RapierBackend.d.ts +17 -0
- package/dist/features/3d/physics/rapier/RapierShapes.d.ts +4 -0
- package/dist/features/3d/physics/rapier/RapierWorld.d.ts +198 -0
- package/dist/features/3d/physics/rapier/Validation.d.ts +8 -0
- package/dist/features/3d/services/Background.d.ts +22 -0
- package/dist/features/3d/services/BasicShader.d.ts +55 -0
- package/dist/features/3d/services/ClusteredLights.d.ts +69 -0
- package/dist/features/3d/services/DrawOrder.d.ts +37 -0
- package/dist/features/3d/services/EffectsProcessor.d.ts +38 -0
- package/dist/features/3d/services/EnvironmentBRDF.d.ts +35 -0
- package/dist/features/3d/services/EnvironmentMaps.d.ts +55 -0
- package/dist/features/3d/services/FogShader.d.ts +6 -0
- package/dist/features/3d/services/Frustum.d.ts +7 -0
- package/dist/features/3d/services/GLState.d.ts +86 -0
- package/dist/features/3d/services/GPUPicker.d.ts +31 -0
- package/dist/features/3d/services/InstanceShader.d.ts +3 -0
- package/dist/features/3d/services/LineProgram.d.ts +32 -0
- package/dist/features/3d/services/PBRProgram.d.ts +115 -0
- package/dist/features/3d/services/Renderer.d.ts +50 -0
- package/dist/features/3d/services/Shader.d.ts +22 -0
- package/dist/features/3d/services/ShaderProgram.d.ts +38 -0
- package/dist/features/3d/services/ShadowMaps.d.ts +97 -0
- package/dist/features/3d/services/SpatialIndex.d.ts +16 -0
- package/dist/features/3d/services/TextureLoader.d.ts +40 -0
- package/dist/features/3d/services/TextureMipmaps.d.ts +42 -0
- package/dist/features/3d/services/ToneMapping.d.ts +12 -0
- package/dist/features/3d/services/WebGLRenderer.d.ts +261 -0
- package/dist/features/3d/splats/SplatData.d.ts +136 -0
- package/dist/features/3d/splats/SplatLoaders.d.ts +64 -0
- package/dist/features/3d/splats/SplatShader.d.ts +14 -0
- package/dist/features/3d/splats/SplatSort.d.ts +69 -0
- package/dist/features/3d/splats/Splats.d.ts +116 -0
- package/dist/features/3d/text/FontAtlas.d.ts +246 -0
- package/dist/features/3d/text/SDF.d.ts +28 -0
- package/dist/features/3d/text/Text.d.ts +179 -0
- package/dist/features/3d/text/TextLayout.d.ts +73 -0
- package/dist/features/3d/text/TextShader.d.ts +12 -0
- package/dist/features/3d/tiles/BoundingVolume.d.ts +43 -0
- package/dist/features/3d/tiles/Geodesy.d.ts +106 -0
- package/dist/features/3d/tiles/GlobeControls.d.ts +147 -0
- package/dist/features/3d/tiles/TileContent.d.ts +35 -0
- package/dist/features/3d/tiles/TileFormats.d.ts +77 -0
- package/dist/features/3d/tiles/Tiles3D.d.ts +236 -0
- package/dist/features/3d/tiles/Tileset.d.ts +81 -0
- package/dist/features/3d/tools/BatchedMesh.d.ts +74 -0
- package/dist/features/3d/tools/CanvasSurface.d.ts +81 -0
- package/dist/features/3d/tools/Color.d.ts +11 -0
- package/dist/features/3d/tools/MergeGeometries.d.ts +22 -0
- package/dist/features/3d/tools/Options.d.ts +15 -0
- package/dist/features/3d/tools/Polyhedra.d.ts +30 -0
- package/dist/features/3d/tools/PrimitiveBuffers.d.ts +42 -0
- package/dist/features/3d/tools/Primitives.d.ts +164 -0
- package/dist/features/3d/tools/Ready.d.ts +12 -0
- package/dist/features/3d/tools/SpatialMath.d.ts +57 -0
- package/dist/features/3d/tools/SphericalHarmonics.d.ts +9 -0
- package/dist/features/3d/tools/math/mat3.d.ts +7 -0
- package/dist/features/3d/tools/math/mat4.d.ts +19 -0
- package/dist/features/3d/tools/math/quat.d.ts +6 -0
- package/dist/features/3d/tools/math/vec3.d.ts +16 -0
- package/dist/features/3d/tools/math/vec4.d.ts +5 -0
- package/dist/features/3d/types.d.ts +359 -0
- package/dist/features/3d/usdz/USDAParser.d.ts +50 -0
- package/dist/features/3d/usdz/USDScene.d.ts +20 -0
- package/dist/features/3d/usdz/USDZLoader.d.ts +27 -0
- package/dist/features/3d/usdz/ZipReader.d.ts +16 -0
- package/dist/features/3d/webgpu/Backend.d.ts +40 -0
- package/dist/features/3d/webgpu/BasicShader.d.ts +10 -0
- package/dist/features/3d/webgpu/Constants.d.ts +32 -0
- package/dist/features/3d/webgpu/Deformation.d.ts +71 -0
- package/dist/features/3d/webgpu/Environment.d.ts +66 -0
- package/dist/features/3d/webgpu/Features.d.ts +68 -0
- package/dist/features/3d/webgpu/Layouts.d.ts +27 -0
- package/dist/features/3d/webgpu/Lines.d.ts +40 -0
- package/dist/features/3d/webgpu/LitExtras.d.ts +46 -0
- package/dist/features/3d/webgpu/LitFeatures.d.ts +41 -0
- package/dist/features/3d/webgpu/LitScene.d.ts +60 -0
- package/dist/features/3d/webgpu/LitShader.d.ts +68 -0
- package/dist/features/3d/webgpu/Particles.d.ts +114 -0
- package/dist/features/3d/webgpu/Picking.d.ts +59 -0
- package/dist/features/3d/webgpu/PipelineKey.d.ts +33 -0
- package/dist/features/3d/webgpu/Points.d.ts +41 -0
- package/dist/features/3d/webgpu/Probes.d.ts +45 -0
- package/dist/features/3d/webgpu/ShaderChunks.d.ts +18 -0
- package/dist/features/3d/webgpu/ShaderMaterial.d.ts +57 -0
- package/dist/features/3d/webgpu/ShaderMaterialSource.d.ts +5 -0
- package/dist/features/3d/webgpu/Shadows.d.ts +49 -0
- package/dist/features/3d/webgpu/Splats.d.ts +47 -0
- package/dist/features/3d/webgpu/Textures.d.ts +52 -0
- package/dist/features/3d/webgpu/Transmission.d.ts +30 -0
- package/dist/features/3d/webgpu/UniformLayout.d.ts +30 -0
- package/dist/features/3d/webgpu/UtilityShaders.d.ts +38 -0
- package/dist/features/3d/webgpu/WebGPURenderer.d.ts +327 -0
- package/dist/features/3d/webgpu/effects/EffectsShaders.d.ts +74 -0
- package/dist/features/3d/webgpu/effects/WebGPUEffects.d.ts +140 -0
- package/dist/features/3d/xr/XR.d.ts +100 -0
- package/dist/gltf-By-n0qEg.js +960 -0
- package/dist/index.d.ts +86 -81
- package/dist/model/document-actions/document-commands.d.ts +18 -0
- package/dist/model/documents/svg/create-svg-document-renderer.d.ts +32 -0
- package/dist/model/documents/svg/export-svg-document.d.ts +5 -0
- package/dist/model/documents/svg/import-svg-document.d.ts +6 -0
- package/dist/model/documents/svg/svg-document.types.d.ts +111 -0
- package/dist/model/documents/svg/svg-values.d.ts +16 -0
- package/dist/model/documents/svg/svg-xml.d.ts +18 -0
- package/dist/model/input/NovaInputProxy_Adapter.d.ts +2 -1
- package/dist/model/input/NovaInputValidationController.d.ts +1 -1
- package/dist/model/input/NovaTextInputController.d.ts +1 -1
- package/dist/model/input/NovaTextLayoutEngine.d.ts +2 -6
- package/dist/model/input/index.d.ts +7 -7
- package/dist/model/input/nova-input.types.d.ts +1 -1
- package/dist/model/lighting/LightingRenderer2D.d.ts +58 -0
- package/dist/model/lighting/NovaLighting2D.d.ts +56 -0
- package/dist/model/lighting/lighting-shaders.d.ts +3 -0
- package/dist/model/lighting/lighting-state.d.ts +27 -0
- package/dist/model/lighting/lighting.types.d.ts +107 -0
- package/dist/model/lottie/LottieNode.d.ts +4 -0
- package/dist/model/lottie/lottie.types.d.ts +83 -0
- package/dist/model/lottie/prepare-lottie.d.ts +3 -0
- package/dist/model/lottie/sample-position.d.ts +9 -0
- package/dist/model/motion/NovaMotionEngine.d.ts +3 -3
- package/dist/model/motion/nova-motion-easing.d.ts +1 -1
- package/dist/model/motion/nova-motion-interpolation.d.ts +1 -1
- package/dist/model/motion/nova-motion-presets.d.ts +2 -2
- package/dist/model/motion/nova-motion-timeline.d.ts +1 -1
- package/dist/model/platform/NovaCanvas.d.ts +7 -6
- package/dist/model/primitives/NovaPrimitiveUnsupportedError.d.ts +13 -0
- package/dist/model/primitives/definePrimitive.d.ts +5 -0
- package/dist/model/primitives/primitive.types.d.ts +28 -0
- package/dist/model/render/backends/canvas2d/NovaCanvas2DTargetManager.d.ts +3 -3
- package/dist/model/render/backends/canvas2d/NovaRenderer2D.d.ts +61 -15
- package/dist/model/render/backends/canvas2d/nova-canvas-blend.d.ts +5 -0
- package/dist/model/render/backends/nova-render-backend-factory.d.ts +6 -6
- package/dist/model/render/backends/nova-render-backend.d.ts +8 -2
- package/dist/model/render/backends/webgl/NovaRendererWebGL.d.ts +32 -11
- package/dist/model/render/backends/webgl/NovaStreamCacheIdleLedger.d.ts +12 -1
- package/dist/model/render/backends/webgl/NovaWebGLBatcher.d.ts +1 -1
- package/dist/model/render/backends/webgl/NovaWebGLCircleImagePass.d.ts +23 -0
- package/dist/model/render/backends/webgl/NovaWebGLCompositionPass.d.ts +9 -0
- package/dist/model/render/backends/webgl/NovaWebGLDevice.d.ts +3 -1
- package/dist/model/render/backends/webgl/NovaWebGLDiagnostics.d.ts +1 -1
- package/dist/model/render/backends/webgl/NovaWebGLFrameRenderer.d.ts +162 -53
- package/dist/model/render/backends/webgl/NovaWebGLPathClipPass.d.ts +13 -0
- package/dist/model/render/backends/webgl/NovaWebGLPathUnion.d.ts +23 -0
- package/dist/model/render/compiler/NovaRenderBuilder.d.ts +24 -10
- package/dist/model/render/compiler/NovaRenderCommandWriter.d.ts +10 -5
- package/dist/model/render/compiler/NovaRenderCompiler.d.ts +7 -6
- package/dist/model/render/compiler/NovaRenderFrameBuilder.d.ts +4 -3
- package/dist/model/render/effects/blur.d.ts +8 -0
- package/dist/model/render/effects/color-matrix.d.ts +8 -0
- package/dist/model/render/effects/drop-shadow.d.ts +18 -0
- package/dist/model/render/effects/nova-effect-registry.d.ts +66 -0
- package/dist/model/render/effects/nova-gaussian-kernel.d.ts +7 -0
- package/dist/model/render/effects/nova-gaussian-textures.d.ts +11 -0
- package/dist/model/render/effects/shader-effect.d.ts +64 -0
- package/dist/model/render/geometry/nova-alpha-mask.d.ts +5 -0
- package/dist/model/render/geometry/nova-composition.d.ts +9 -0
- package/dist/model/render/geometry/nova-node-clip.d.ts +17 -0
- package/dist/model/render/geometry/nova-path-geometry.d.ts +24 -0
- package/dist/model/render/geometry/nova-path-tessellation.d.ts +7 -0
- package/dist/model/render/geometry/nova-polygon-triangulation.d.ts +1 -1
- package/dist/model/render/graph/NovaRectBatchBuffer.d.ts +58 -0
- package/dist/model/render/graph/NovaRenderGraph.d.ts +40 -6
- package/dist/model/render/graph/NovaRenderHitIndex.d.ts +1 -1
- package/dist/model/render/graph/nova-auto-rect.d.ts +1 -1
- package/dist/model/render/graph/nova-linear-rect-repack.d.ts +4 -4
- package/dist/model/render/graph/nova-linear-rect-transition.d.ts +2 -2
- package/dist/model/render/graph/nova-render-culling.d.ts +2 -2
- package/dist/model/render/graph/nova-render-dirty-items.d.ts +1 -1
- package/dist/model/render/graph/nova-render-group.d.ts +1 -1
- package/dist/model/render/graph/nova-render-item.d.ts +2 -2
- package/dist/model/render/graph/nova-render-layer.d.ts +1 -1
- package/dist/model/render/graph/nova-render-payload-snapshot.d.ts +3 -1
- package/dist/model/render/graph/nova-render-program.d.ts +5 -3
- package/dist/model/render/graph/nova-render-sequence.d.ts +1 -1
- package/dist/model/render/graph/nova-render-stream.d.ts +2 -2
- package/dist/model/render/ktx2/BasisSession.d.ts +45 -0
- package/dist/model/render/ktx2/KTX2Container.d.ts +26 -0
- package/dist/model/render/ktx2/KTX2Loader.d.ts +55 -0
- package/dist/model/render/meshes/MeshNode.d.ts +13 -0
- package/dist/model/render/meshes/NovaMeshWebGLDevice.d.ts +27 -0
- package/dist/model/render/meshes/geometry.d.ts +7 -0
- package/dist/model/render/meshes/mesh.d.ts +3 -0
- package/dist/model/render/meshes/mesh.types.d.ts +116 -0
- package/dist/model/render/meshes/nova-mesh-registry.d.ts +55 -0
- package/dist/model/render/orchestration/NovaRenderOrchestrator.d.ts +25 -3
- package/dist/model/render/policy/nova-render-policy.d.ts +1 -1
- package/dist/model/render/resources/NovaGlyphAtlasManager.d.ts +2 -2
- package/dist/model/render/resources/NovaTextAtlasManager.d.ts +3 -3
- package/dist/model/render/resources/NovaTextLayoutEngine.d.ts +1 -1
- package/dist/model/render/resources/nova-bitmap-upload.d.ts +10 -0
- package/dist/model/render/schema/NovaRenderContext.d.ts +6 -4
- package/dist/model/render/schema/nova-style-compiler.d.ts +5 -2
- package/dist/model/render/targets/NovaNodeRenderTextureSource.d.ts +29 -0
- package/dist/model/render/targets/NovaRenderTargetManager.d.ts +1 -1
- package/dist/model/render/targets/NovaRenderTexture.d.ts +57 -0
- package/dist/model/render/targets/nova-render-target-refs.d.ts +5 -0
- package/dist/model/render/targets/nova-render-target-resource.d.ts +1 -1
- package/dist/model/render/targets/nova-render-texture-runtime.d.ts +71 -0
- package/dist/model/render/textures/nova-compressed-image.d.ts +20 -0
- package/dist/model/render/utils/nova-icon-rendering.d.ts +3 -1
- package/dist/model/render/utils/nova-image-geometry.d.ts +11 -0
- package/dist/model/render/utils/nova-markdown-layout.d.ts +19 -0
- package/dist/model/render/utils/nova-text-paint.d.ts +26 -0
- package/dist/model/render/utils/nova-wrapped-text-layout.d.ts +19 -0
- package/dist/model/runtime/app/Nova.d.ts +35 -35
- package/dist/model/runtime/app/NovaApp.d.ts +58 -30
- package/dist/model/runtime/app/NovaRaphRuntime.d.ts +2 -2
- package/dist/model/runtime/app/createNovaRaphRuntime.d.ts +3 -3
- package/dist/model/runtime/assets/NovaAssetRegistry.d.ts +89 -2
- package/dist/model/runtime/assets/NovaVideoTexture.d.ts +38 -0
- package/dist/model/runtime/assets/nova-render-texture-image-identity.d.ts +4 -0
- package/dist/model/runtime/commands/NovaCommandBus.d.ts +1 -1
- package/dist/model/runtime/components/NovaComponentNode.d.ts +6 -6
- package/dist/model/runtime/components/NovaComponentRegistry.d.ts +1 -1
- package/dist/model/runtime/components/NovaSchemaRegistry.d.ts +7 -6
- package/dist/model/runtime/components/nova-component-metadata.d.ts +1 -1
- package/dist/model/runtime/components/nova-component.decorator.d.ts +2 -2
- package/dist/model/runtime/components/nova-defined-component.d.ts +3 -3
- package/dist/model/runtime/context/nova-context.d.ts +1 -1
- package/dist/model/runtime/cursor/NovaCursorManager.d.ts +3 -3
- package/dist/model/runtime/diagnostics/NovaDiagnostics_Module.d.ts +3 -3
- package/dist/model/runtime/interaction/NovaEvents.d.ts +16 -6
- package/dist/model/runtime/interaction/NovaHitIndex.d.ts +1 -1
- package/dist/model/runtime/interaction/NovaSpatialIndex.d.ts +2 -2
- package/dist/model/runtime/scene/NovaScene.d.ts +3 -3
- package/dist/model/runtime/scene/nova-scene-components.d.ts +6 -6
- package/dist/model/runtime/state/nova-store-decorators.d.ts +1 -1
- package/dist/model/runtime/state/nova-store-runtime.d.ts +1 -1
- package/dist/model/runtime/state/nova-store-tracking.d.ts +7 -3
- package/dist/model/runtime/sync/NovaSyncScope.d.ts +11 -2
- package/dist/model/runtime/sync/nova-sync-context.d.ts +2 -2
- package/dist/model/runtime/sync/nova-sync-ports.d.ts +2 -2
- package/dist/model/runtime/sync/nova-sync.types.d.ts +15 -3
- package/dist/model/runtime/template/NovaTemplateRuntime.d.ts +6 -6
- package/dist/model/runtime/tree/NovaContainer.d.ts +4 -4
- package/dist/model/runtime/tree/NovaNode.d.ts +58 -18
- package/dist/model/runtime/tree/NovaRaphNode.d.ts +8 -2
- package/dist/model/runtime/tree/NovaSurface.d.ts +32 -10
- package/dist/model/runtime/tree/nova-node-capture-invalidation.d.ts +11 -0
- package/dist/model/semantic/NovaSemanticService.d.ts +1 -1
- package/dist/model/semantic/browser/createAccessibilityBridge.d.ts +29 -0
- package/dist/model/sound/NovaSoundEngine.d.ts +3 -2
- package/dist/model/text-selection/NovaTextSelectionService.d.ts +2 -2
- package/dist/model/text-selection/index.d.ts +2 -2
- package/dist/model/text-selection/nova-text-selection.types.d.ts +1 -1
- package/dist/model/theme/NovaGlobalThemeRegistry.d.ts +2 -2
- package/dist/model/theme/NovaThemeService.d.ts +5 -3
- package/dist/model/theme/createTokenTheme.d.ts +15 -0
- package/dist/model/tools/transform-tools.d.ts +43 -0
- package/dist/nodes--Ds4IS2h.js +621 -0
- package/dist/nova-color-parser-BCN_rFRN.js +250 -0
- package/dist/nova-compressed-image-CE2Ya9Xa.js +46 -0
- package/dist/nova-mesh-registry-B7Xz5mhU.js +24 -0
- package/dist/nova-render-texture-image-identity-DQ09XFKs.js +15 -0
- package/dist/nova-text-paint-CcntsRjI.js +48 -0
- package/dist/tokens.d.ts +2 -0
- package/dist/tokens.js +50 -0
- package/dist/vec4-BTNv1fUp.js +20 -0
- package/package.json +223 -4
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
import { Nova3DEnvironment } from '../model/Environment.js';
|
|
2
|
+
import { Nova3DGeometry } from '../model/Geometry.js';
|
|
3
|
+
import { Nova3DMesh } from '../model/Mesh.js';
|
|
4
|
+
import { Nova3DNode } from '../model/Node.js';
|
|
5
|
+
import { Nova3DRenderTarget } from '../model/RenderTarget.js';
|
|
6
|
+
import { Nova3DTexture } from '../model/Texture.js';
|
|
7
|
+
import { GPUParticleConfig3D } from '../particles/GPUParticleState.js';
|
|
8
|
+
import { Renderer3D } from '../services/Renderer.js';
|
|
9
|
+
import { ToneMapping3D } from '../services/ToneMapping.js';
|
|
10
|
+
import { Color3DTuple, RenderView3D } from '../services/WebGLRenderer.js';
|
|
11
|
+
import { FrameMetrics3D } from '../types.js';
|
|
12
|
+
import { WebGPUDevice3D } from './Backend.js';
|
|
13
|
+
import { WebGPUEffectsProcessor3D } from './effects/WebGPUEffects.js';
|
|
14
|
+
import { TextureResident3D } from './Textures.js';
|
|
15
|
+
import { WebGPUParticleState3D } from './Particles.js';
|
|
16
|
+
/**
|
|
17
|
+
* WebGPU backend of a Nova3D app: the WebGL renderer's frame (view
|
|
18
|
+
* preparation, sorting, shadow atlas, prefiltered environments, direct or
|
|
19
|
+
* linear canvas path) with hand-written WGSL that mirrors the GLSL math.
|
|
20
|
+
* Per-frame work reuses its records, typed arrays and bind groups.
|
|
21
|
+
*/
|
|
22
|
+
export declare class Nova3DWebGPURenderer implements Renderer3D {
|
|
23
|
+
protected constructor();
|
|
24
|
+
private readonly _canvas;
|
|
25
|
+
readonly backend: "webgpu";
|
|
26
|
+
private _device;
|
|
27
|
+
private readonly _context;
|
|
28
|
+
private readonly _format;
|
|
29
|
+
private readonly _samples;
|
|
30
|
+
private _gpu;
|
|
31
|
+
private _textures;
|
|
32
|
+
private _shadows;
|
|
33
|
+
private _environments;
|
|
34
|
+
private _deformation;
|
|
35
|
+
private _points;
|
|
36
|
+
private _lines;
|
|
37
|
+
private _picker;
|
|
38
|
+
private _splats;
|
|
39
|
+
private _particles;
|
|
40
|
+
/** Device and draw registry of WebGPU particle states, stable across device restoration. */
|
|
41
|
+
private readonly _particleHost;
|
|
42
|
+
/** Lighting and material features beyond phase 1 (see LitScene, LitExtras, Transmission, Probes, ShaderMaterial). */
|
|
43
|
+
private _litScene;
|
|
44
|
+
private _extras;
|
|
45
|
+
private _transmission;
|
|
46
|
+
private _probes;
|
|
47
|
+
private _shaderMaterials;
|
|
48
|
+
private readonly _sceneClustered;
|
|
49
|
+
private readonly _sceneUniformLights;
|
|
50
|
+
private readonly _sceneProbes;
|
|
51
|
+
private readonly _probeStates;
|
|
52
|
+
private readonly _probeViews;
|
|
53
|
+
private readonly _probeViewport;
|
|
54
|
+
private readonly _captureResidents;
|
|
55
|
+
/** Encoder, pass descriptor and single-sampled colour source of the pass being encoded (transmission copies split it). */
|
|
56
|
+
private _encoder;
|
|
57
|
+
private _passDescriptor;
|
|
58
|
+
private _passSource;
|
|
59
|
+
private readonly _shaderVariant;
|
|
60
|
+
private readonly _describe;
|
|
61
|
+
private _shaderStateKey;
|
|
62
|
+
/** Secondary key of the last _litKey variant. */
|
|
63
|
+
private _extraKey;
|
|
64
|
+
private readonly _viewOf;
|
|
65
|
+
private readonly _samplerOf;
|
|
66
|
+
private readonly _geometry;
|
|
67
|
+
private readonly _instances;
|
|
68
|
+
private readonly _targets;
|
|
69
|
+
private _materials;
|
|
70
|
+
private readonly _objectSlots;
|
|
71
|
+
private readonly _freeSlots;
|
|
72
|
+
private _objectCount;
|
|
73
|
+
private _objectCapacity;
|
|
74
|
+
private _objectData;
|
|
75
|
+
private _objectBuffer;
|
|
76
|
+
private _objectGroup;
|
|
77
|
+
private _dirtyStart;
|
|
78
|
+
private _dirtyEnd;
|
|
79
|
+
private readonly _viewStride;
|
|
80
|
+
private _viewCapacity;
|
|
81
|
+
private _viewData;
|
|
82
|
+
private _viewBuffer;
|
|
83
|
+
private readonly _viewGroups;
|
|
84
|
+
private _shadowCapacity;
|
|
85
|
+
private _shadowData;
|
|
86
|
+
private _shadowBuffer;
|
|
87
|
+
private _shadowGroup;
|
|
88
|
+
private _displayBuffer;
|
|
89
|
+
private _displayStamp;
|
|
90
|
+
private _displayGroup;
|
|
91
|
+
private readonly _litShaders;
|
|
92
|
+
private readonly _extendedShaders;
|
|
93
|
+
private readonly _basicShaders;
|
|
94
|
+
private readonly _casterShaders;
|
|
95
|
+
private readonly _utility;
|
|
96
|
+
/** Vertex attributes of the pipeline last selected by _litPipeline/_basicPipeline. */
|
|
97
|
+
private _attributes;
|
|
98
|
+
private _layouts;
|
|
99
|
+
private _dummies;
|
|
100
|
+
private _backgroundGroups;
|
|
101
|
+
private _canvasTargets?;
|
|
102
|
+
private _linearTargets?;
|
|
103
|
+
private _directFrames;
|
|
104
|
+
/** Optional post-processing of the canvas path (the /3d/effects addon). */
|
|
105
|
+
private _effects?;
|
|
106
|
+
private _effectsFrame?;
|
|
107
|
+
/** Pass the effects outline draws into; bindings are reset when it changes. */
|
|
108
|
+
private _effectsPass;
|
|
109
|
+
private readonly _jitterSaved;
|
|
110
|
+
private readonly _viewStates;
|
|
111
|
+
private readonly _frameScenes;
|
|
112
|
+
private readonly _sceneLights;
|
|
113
|
+
private readonly _sceneTiles;
|
|
114
|
+
private readonly _sceneCasters;
|
|
115
|
+
private readonly _sceneAmbient;
|
|
116
|
+
private readonly _ambientBuffers;
|
|
117
|
+
private readonly _shadowLights;
|
|
118
|
+
private readonly _shadowCamera;
|
|
119
|
+
private readonly _casterScratch;
|
|
120
|
+
/** Culled meshes of the view being prepared, before `orderView3D` orders them. */
|
|
121
|
+
private readonly _culled;
|
|
122
|
+
private readonly _offsets;
|
|
123
|
+
private readonly _boundBuffers;
|
|
124
|
+
private readonly _litVariant;
|
|
125
|
+
private readonly _basicVariant;
|
|
126
|
+
private readonly _state;
|
|
127
|
+
private readonly _metrics;
|
|
128
|
+
private readonly _counts;
|
|
129
|
+
private readonly _canvasCounts;
|
|
130
|
+
private readonly _range;
|
|
131
|
+
/** Pass descriptors reused every frame; beginRenderPass reads them synchronously. */
|
|
132
|
+
private readonly _colorAttachment;
|
|
133
|
+
private readonly _depthAttachment;
|
|
134
|
+
private readonly _colorPass;
|
|
135
|
+
private readonly _depthPass;
|
|
136
|
+
private readonly _shadowPass;
|
|
137
|
+
private _currentPipeline;
|
|
138
|
+
private _currentMaterial;
|
|
139
|
+
private _boundIndices;
|
|
140
|
+
private _bytes;
|
|
141
|
+
private _targetEpoch;
|
|
142
|
+
private _uploads;
|
|
143
|
+
private _exposure;
|
|
144
|
+
private _toneMapping;
|
|
145
|
+
private _displayVersion;
|
|
146
|
+
private _pixelRatio;
|
|
147
|
+
private _bufferWidth;
|
|
148
|
+
private _bufferHeight;
|
|
149
|
+
private _generation;
|
|
150
|
+
private _lost;
|
|
151
|
+
private _destroyed;
|
|
152
|
+
private _viewStamp;
|
|
153
|
+
/** Called once per device loss that was not caused by destroy(). */
|
|
154
|
+
onLost: ((info: GPUDeviceLostInfo) => void) | null;
|
|
155
|
+
/** Validation and out-of-memory errors the device reports asynchronously. */
|
|
156
|
+
onError: ((error: unknown) => void) | null;
|
|
157
|
+
get maxSize(): number;
|
|
158
|
+
get generation(): number;
|
|
159
|
+
get device(): GPUDevice;
|
|
160
|
+
get lost(): boolean;
|
|
161
|
+
get environmentBytes(): number;
|
|
162
|
+
get shadowBytes(): number;
|
|
163
|
+
get targetBytes(): number;
|
|
164
|
+
get estimatedGpuBytes(): number;
|
|
165
|
+
get geometryCount(): number;
|
|
166
|
+
get textureCount(): number;
|
|
167
|
+
configureDisplay(options: {
|
|
168
|
+
exposure?: number;
|
|
169
|
+
toneMapping?: ToneMapping3D;
|
|
170
|
+
blending?: 'linear' | 'display';
|
|
171
|
+
}): void;
|
|
172
|
+
validateSize(width: number, height: number): void;
|
|
173
|
+
/** Installs or removes the canvas post-processing; the processor validates its budget first. */
|
|
174
|
+
installEffects(processor: WebGPUEffectsProcessor3D | undefined): void;
|
|
175
|
+
syncDrawingBuffer(pixelRatio?: number): void;
|
|
176
|
+
/**
|
|
177
|
+
* GPU pick at `pixel` (device pixels from the view's top-left) of a view of
|
|
178
|
+
* `size` device pixels; resolves after an asynchronous readback.
|
|
179
|
+
*/
|
|
180
|
+
pickGPU(view: RenderView3D, pixel: readonly [number, number], size: readonly [number, number]): Promise<{
|
|
181
|
+
node: Nova3DMesh;
|
|
182
|
+
instance: number;
|
|
183
|
+
point: [number, number, number];
|
|
184
|
+
} | null>;
|
|
185
|
+
render(views: readonly RenderView3D[], clearColor: Color3DTuple): FrameMetrics3D | null;
|
|
186
|
+
clear(color: Color3DTuple): void;
|
|
187
|
+
releaseNode(node: Nova3DNode): void;
|
|
188
|
+
releaseGeometry(geometry: Nova3DGeometry): void;
|
|
189
|
+
releaseTexture(texture: Nova3DTexture): void;
|
|
190
|
+
releaseEnvironment(environment: Nova3DEnvironment): void;
|
|
191
|
+
releaseRenderTarget(target: Nova3DRenderTarget): void;
|
|
192
|
+
destroy(): void;
|
|
193
|
+
/**
|
|
194
|
+
* Requests a new adapter and device after a loss and recreates everything
|
|
195
|
+
* from the CPU sources on the next frame.
|
|
196
|
+
* @experimental
|
|
197
|
+
*/
|
|
198
|
+
restore(): Promise<void>;
|
|
199
|
+
private _initDevice;
|
|
200
|
+
/** Forgets every GPU object of the current device; `lost` skips destroy calls. */
|
|
201
|
+
private _dropDevice;
|
|
202
|
+
private _renderViews;
|
|
203
|
+
private _sceneHdr;
|
|
204
|
+
/** Rectangle, view-projection, visible meshes, validation and uploads of one view. */
|
|
205
|
+
private _prepareView;
|
|
206
|
+
/** Rejects what WebGPU cannot draw yet and uploads the mesh's buffers, textures and uniforms. */
|
|
207
|
+
private _prepareNode;
|
|
208
|
+
private _checkUV;
|
|
209
|
+
/** Shadow casters of a scene: their geometry, instances, caster bindings and object slots. */
|
|
210
|
+
private _prepareCasters;
|
|
211
|
+
private _createBuffer;
|
|
212
|
+
/** Writes a whole typed array; 16-bit index arrays of odd length are padded to 4 bytes. */
|
|
213
|
+
private _writeWhole;
|
|
214
|
+
private _ensureGeometry;
|
|
215
|
+
private _ensureInstances;
|
|
216
|
+
private _ensureTarget;
|
|
217
|
+
/** GPU view and sampler of a material texture: a render-target attachment or an uploaded source. */
|
|
218
|
+
private _textureView;
|
|
219
|
+
private _touch;
|
|
220
|
+
private _textureEpoch;
|
|
221
|
+
private _materialResident;
|
|
222
|
+
private _ensureLitMaterial;
|
|
223
|
+
private _ensureBasicMaterial;
|
|
224
|
+
private _ensureCaster;
|
|
225
|
+
/** Assigns a persistent uniform slot and rewrites it when the world matrix or flags change. */
|
|
226
|
+
private _ensureObject;
|
|
227
|
+
private _growObjects;
|
|
228
|
+
private _flushObjects;
|
|
229
|
+
private _ensureViewCapacity;
|
|
230
|
+
/** Group 0 of a view: its uniform slot plus the scene's shadow atlas and environment cubes. */
|
|
231
|
+
private _viewGroup;
|
|
232
|
+
/** Writes the view block of `view`: camera, display, fog, lights, shadows, ambient, environment, background. */
|
|
233
|
+
private _writeView;
|
|
234
|
+
/** Group 3 slots of a view: projection, environment, clusters, probe boxes and the transmission copy. */
|
|
235
|
+
private _writeLitScene;
|
|
236
|
+
private _ensureEnvironment;
|
|
237
|
+
/** Lights and shadow slots of PBRProgram._uploadFrame. */
|
|
238
|
+
private _writeLights;
|
|
239
|
+
/** Rectangle light of PBRProgram._uploadFrame: half extents along its X and Y axes in the direction and cone slots. */
|
|
240
|
+
private _writeRectLight;
|
|
241
|
+
/**
|
|
242
|
+
* Beyond 16 lights, ranged unshadowed point and spot lights move into clusters
|
|
243
|
+
* (WebGLRenderer); returns the uniform lights. Lists are reused per scene.
|
|
244
|
+
*/
|
|
245
|
+
private _clusterLights;
|
|
246
|
+
private _writeBackground;
|
|
247
|
+
private _targetFormat;
|
|
248
|
+
private _pipelineDescriptor;
|
|
249
|
+
/**
|
|
250
|
+
* Lit pipeline of the variant `_litKey` wrote (key `shaderKey`, secondary key
|
|
251
|
+
* `extraKey`), a state key and a deformation key; `_attributes` receives its
|
|
252
|
+
* vertex attributes. Deformed variants have their own caches and swap the
|
|
253
|
+
* object group for the deformation object group.
|
|
254
|
+
*/
|
|
255
|
+
private _litPipeline;
|
|
256
|
+
/** Basic pipeline of a variant; `_attributes` receives its vertex attributes. */
|
|
257
|
+
private _basicPipeline;
|
|
258
|
+
/** Clear-quad pipeline writing colour and/or depth for a pass. */
|
|
259
|
+
private _clearPipeline;
|
|
260
|
+
private _backgroundPipeline;
|
|
261
|
+
private _displayPipeline;
|
|
262
|
+
private _encodeShadows;
|
|
263
|
+
private readonly _faceFrustum;
|
|
264
|
+
private _drawCaster;
|
|
265
|
+
private _resetBindings;
|
|
266
|
+
/** Sets vertex buffer `index` unless already bound; returns the next index. */
|
|
267
|
+
private _bind;
|
|
268
|
+
/** Binds the object slot and vertex buffers of `attributes`, then draws. */
|
|
269
|
+
private _drawGeometry;
|
|
270
|
+
/**
|
|
271
|
+
* Draws one prepared view's meshes, sky and clears into an open pass and
|
|
272
|
+
* returns the pass that is open afterwards (a transmission copy splits it).
|
|
273
|
+
*/
|
|
274
|
+
private _drawView;
|
|
275
|
+
/** Wide lines and Gaussian splats: quads built in the vertex stage per instance, without culling. */
|
|
276
|
+
private _drawProcedural;
|
|
277
|
+
private readonly _particleDescriptor;
|
|
278
|
+
private readonly _particleSampled;
|
|
279
|
+
private readonly _particleMap;
|
|
280
|
+
private readonly _particleFallback;
|
|
281
|
+
private readonly _splatDescriptor;
|
|
282
|
+
private readonly _lineDescriptor;
|
|
283
|
+
private _litKey;
|
|
284
|
+
private _basicKey;
|
|
285
|
+
private _drawBackground;
|
|
286
|
+
/** Copies the view's clear colour (as written into its block) into the reused attachment. */
|
|
287
|
+
private _clearValue;
|
|
288
|
+
private _encodeTargetView;
|
|
289
|
+
private _encodeCanvas;
|
|
290
|
+
/** Linear canvas target cost; `sampled` keeps a depth24plus texture (and its resolve) for effects. */
|
|
291
|
+
private _linearLayout;
|
|
292
|
+
private _validateEffects;
|
|
293
|
+
/** Copies the first canvas view's camera into the reused effects frame record. */
|
|
294
|
+
private _writeEffectsFrame;
|
|
295
|
+
/** Draws a mesh prepared this frame (current object slot and buffers) for the outline mask. */
|
|
296
|
+
private _drawEffectsMesh;
|
|
297
|
+
private _encodeDisplay;
|
|
298
|
+
private _ensureCanvasTargets;
|
|
299
|
+
private _ensureLinearTargets;
|
|
300
|
+
/** MSAA colour (when antialiased), the sampled resolve of linear targets, and depth. */
|
|
301
|
+
private _createTargets;
|
|
302
|
+
private _releaseCanvasTargets;
|
|
303
|
+
/** Releases the linear target after a run of direct frames, as the WebGL renderer does. */
|
|
304
|
+
private _trackDirectFrame;
|
|
305
|
+
/** Ends the pass, copies its colour for transmission and reopens it on the stored attachments. */
|
|
306
|
+
private _grabTransmission;
|
|
307
|
+
/**
|
|
308
|
+
* Binds the smallest reflection probe box holding the mesh origin (or the
|
|
309
|
+
* scene environment, −1) unless `current` already is that probe.
|
|
310
|
+
*/
|
|
311
|
+
private _bindProbe;
|
|
312
|
+
/** Validates and uploads a WGSL shader-material mesh (GLSL-only materials are refused). */
|
|
313
|
+
private _prepareShaderNode;
|
|
314
|
+
private _shaderBindGroup;
|
|
315
|
+
private _shaderPipeline;
|
|
316
|
+
/** Shader materials read every attribute: missing ones bind the (0, 0, 0, 1) default with stride 0. */
|
|
317
|
+
private _drawShaderGeometry;
|
|
318
|
+
/**
|
|
319
|
+
* Lists the captured reflection probes of each lit scene and prepares six face
|
|
320
|
+
* views for every probe that is new or pending (WebGLRenderer._updateProbes).
|
|
321
|
+
* Returns the number of face views, encoded by _encodeProbes this frame.
|
|
322
|
+
*/
|
|
323
|
+
private _prepareProbes;
|
|
324
|
+
/** Draws the pending probe faces into their cubes and prefilters each probe after its sixth face. */
|
|
325
|
+
private _encodeProbes;
|
|
326
|
+
}
|
|
327
|
+
export type { TextureResident3D };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WGSL ports of `effects/EffectsShaders.ts`. Every pass works in the GLSL
|
|
3
|
+
* coordinates: `uv` and `fragCoord` have a bottom-left origin, and the helpers
|
|
4
|
+
* flip rows when they read the top-down WebGPU textures, so each formula,
|
|
5
|
+
* sample position and noise seed is the GLSL one and both backends produce
|
|
6
|
+
* the same image.
|
|
7
|
+
*/
|
|
8
|
+
/** Texture binding kinds of a full-screen pass (bindings 2…). */
|
|
9
|
+
export type EffectTexture3D = 'float' | 'depth' | 'lut';
|
|
10
|
+
/** Uniform block shared by every pass: one 512-byte slot each. */
|
|
11
|
+
export declare const effectBlockWGSL3D = "\nstruct Effect {\n inverseProjection: mat4x4f,\n projection: mat4x4f,\n matrix: mat4x4f,\n // xy: output size in pixels, zw: inverse size.\n size: vec4f,\n a: vec4f,\n b: vec4f,\n c: vec4f,\n d: vec4f,\n e: vec4f,\n}\n";
|
|
12
|
+
/** Float offsets of the `Effect` fields. */
|
|
13
|
+
export declare const effectFloats3D: {
|
|
14
|
+
readonly inverseProjection: 0;
|
|
15
|
+
readonly projection: 16;
|
|
16
|
+
readonly matrix: 32;
|
|
17
|
+
readonly size: 48;
|
|
18
|
+
readonly a: 52;
|
|
19
|
+
readonly b: 56;
|
|
20
|
+
readonly c: 60;
|
|
21
|
+
readonly d: 64;
|
|
22
|
+
readonly e: 68;
|
|
23
|
+
};
|
|
24
|
+
/** Bytes the `Effect` struct occupies; slots are 512 bytes apart. */
|
|
25
|
+
export declare const effectBlockBytes3D = 288;
|
|
26
|
+
export declare const effectSlotBytes3D = 512;
|
|
27
|
+
/** SAO-style spiral obscurance; a = (radius, intensity, bias). */
|
|
28
|
+
export declare function ssaoShader3D(samples: number): string;
|
|
29
|
+
/** Depth-aware 9-tap blur of the occlusion; `apply` multiplies the scene colour. a.x radius, b.xy offset. */
|
|
30
|
+
export declare function ssaoBlurShader3D(apply: boolean): string;
|
|
31
|
+
/** View-space ray march with binary refinement; a = (maxDistance, thickness, intensity, edgeFade). */
|
|
32
|
+
export declare function ssrShader3D(steps: number): string;
|
|
33
|
+
/** Thin-lens circle of confusion with a spiral gather; a = (focusDistance, cocScale, maxBlur). */
|
|
34
|
+
export declare function dofShader3D(samples: number): string;
|
|
35
|
+
/** Camera-only blur along the depth reprojection; matrix = reprojection, a.x intensity. */
|
|
36
|
+
export declare function motionBlurShader3D(samples: number): string;
|
|
37
|
+
/** Temporal antialiasing; matrix = reprojection, a = (feedback, resetHistory). */
|
|
38
|
+
export declare const taaShader3D: string;
|
|
39
|
+
/** Separable bright-pass Gaussian; a = (threshold, extractBright), b.xy offset. */
|
|
40
|
+
export declare const bloomBlurShader3D: string;
|
|
41
|
+
/** a.x strength. */
|
|
42
|
+
export declare const bloomCompositeShader3D: string;
|
|
43
|
+
/** Separable max dilation; composite blends c (visible) or d (hidden) colour. a.x thickness, b.xy offset. */
|
|
44
|
+
export declare function outlineShader3D(composite: boolean): string;
|
|
45
|
+
/**
|
|
46
|
+
* Selection mask of the outline: 1 where the mesh is visible, 0.5 behind the
|
|
47
|
+
* scene depth. Drawn with the renderer's object block (group 2); clip z is
|
|
48
|
+
* mapped as in the scene pipelines, so it compares with the scene depth.
|
|
49
|
+
*/
|
|
50
|
+
export declare function outlineMaskShader3D(instanced: boolean): string;
|
|
51
|
+
/**
|
|
52
|
+
* Display conversion fused with the finishing effects. Feature bits:
|
|
53
|
+
* 1 aberration, 2 sharpen, 4 LUT, 8 vignette, 16 grain.
|
|
54
|
+
* a = (aberration, sharpen, grain, seed), b = (vignette intensity, radius, softness, LUT intensity),
|
|
55
|
+
* c = (vignette colour, exposure), d = (LUT scale, tone mapping), e = (LUT offset).
|
|
56
|
+
*/
|
|
57
|
+
export declare function finishShader3D(features: number): string;
|
|
58
|
+
/** Plain display conversion (no finish stage); c.w exposure, d.w tone mapping. */
|
|
59
|
+
export declare const displayShader3D: string;
|
|
60
|
+
/** Directional FXAA on the encoded premultiplied image. */
|
|
61
|
+
export declare const fxaaShader3D: string;
|
|
62
|
+
/** SMAA luma edges (r left, g bottom); a.x threshold. */
|
|
63
|
+
export declare const smaaEdgesShader3D: string;
|
|
64
|
+
/** Blend weights from line-end search and analytic MLAA areas (rg: left edge, ba: bottom edge). */
|
|
65
|
+
export declare const smaaWeightsShader3D: string;
|
|
66
|
+
/** Neighbourhood blending along the dominant edge direction. */
|
|
67
|
+
export declare const smaaBlendShader3D: string;
|
|
68
|
+
/**
|
|
69
|
+
* Pixel-centre depth of the 4× multisampled scene. The standard sample pattern
|
|
70
|
+
* is point-symmetric about the centre, so on one plane s0 + s3 = s1 + s2 and the
|
|
71
|
+
* mean is the centre depth; across a silhouette sample 0 is kept, as the
|
|
72
|
+
* WebGL depth blit does.
|
|
73
|
+
*/
|
|
74
|
+
export declare const depthResolveShader3D = "@group(0) @binding(0) var source: texture_depth_multisampled_2d;\n@vertex\nfn vertexMain(@builtin(vertex_index) index: u32) -> @builtin(position) vec4f {\n let p = vec2f(f32((index << 1u) & 2u), f32(index & 2u));\n return vec4f(p * 2.0 - 1.0, 0.0, 1.0);\n}\n@fragment\nfn fragmentMain(@builtin(position) position: vec4f) -> @builtin(frag_depth) f32 {\n let p = vec2i(position.xy);\n let s0 = textureLoad(source, p, 0);\n let s1 = textureLoad(source, p, 1);\n let s2 = textureLoad(source, p, 2);\n let s3 = textureLoad(source, p, 3);\n if (abs(s0 + s3 - s1 - s2) <= 2e-6) {\n return (s0 + s1 + s2 + s3) * 0.25;\n }\n return s0;\n}\n";
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { EffectsPlan3D } from '../../effects/EffectsPlan.js';
|
|
2
|
+
import { Nova3DMesh } from '../../model/Mesh.js';
|
|
3
|
+
import { Nova3DScene } from '../../model/Scene.js';
|
|
4
|
+
/** Per-frame inputs the WebGPU renderer hands to the effects processor; one record reused every frame. */
|
|
5
|
+
export interface WebGPUEffectsFrame3D {
|
|
6
|
+
device: GPUDevice;
|
|
7
|
+
/** Single-sample scene depth (depth24plus, WebGL window depth values), null unless the processor asked for depth. */
|
|
8
|
+
depth: GPUTextureView | null;
|
|
9
|
+
/** Multisampled scene depth that `depth` must be resolved from first, or null. */
|
|
10
|
+
depthSource: GPUTextureView | null;
|
|
11
|
+
/** Camera data of the first canvas view, unjittered; meaningful while `scene` is not null. */
|
|
12
|
+
readonly projection: Float32Array;
|
|
13
|
+
readonly view: Float32Array;
|
|
14
|
+
readonly viewProjection: Float32Array;
|
|
15
|
+
/** Changes whenever the view-projection above changes. */
|
|
16
|
+
stamp: number;
|
|
17
|
+
scene: Nova3DScene | null;
|
|
18
|
+
exposure: number;
|
|
19
|
+
/** Index in `toneMappings3D`. */
|
|
20
|
+
toneMapping: number;
|
|
21
|
+
/** Canvas texture of this frame and its format. */
|
|
22
|
+
output: GPUTextureView;
|
|
23
|
+
format: GPUTextureFormat;
|
|
24
|
+
/** Layout of the renderer's per-mesh block (group 2 of scene pipelines). */
|
|
25
|
+
objectLayout: GPUBindGroupLayout;
|
|
26
|
+
/**
|
|
27
|
+
* Binds group 2 and the vertex buffers (positions, then instance matrices) of a
|
|
28
|
+
* mesh prepared this frame and draws it; false when the mesh was not prepared.
|
|
29
|
+
*/
|
|
30
|
+
readonly draw: (pass: GPURenderPassEncoder, node: Nova3DMesh) => boolean;
|
|
31
|
+
}
|
|
32
|
+
/** Internal lifecycle bridge between the WebGPU renderer and the /3d/effects addon. */
|
|
33
|
+
export interface WebGPUEffectsProcessor3D {
|
|
34
|
+
readonly bytes: number;
|
|
35
|
+
readonly depth: boolean;
|
|
36
|
+
validateSize: (width: number, height: number, baseBytes: number, baseColors: number, depthBytes: number) => void;
|
|
37
|
+
/** Encodes every stage from the linear scene colour to `frame.output`; returns the draw count. */
|
|
38
|
+
present: (encoder: GPUCommandEncoder, source: GPUTextureView, width: number, height: number, frame: WebGPUEffectsFrame3D) => number;
|
|
39
|
+
/** `lost` skips destroy calls on objects of a lost device. */
|
|
40
|
+
reset: (lost: boolean) => void;
|
|
41
|
+
jitter?: () => Float32Array | null;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* WebGPU twin of `EffectsGPU3D`: the same plan, stage order, targets, budget
|
|
45
|
+
* and formulas as WGSL render passes. Pipelines, bind groups and the uniform
|
|
46
|
+
* buffer are cached; a frame only writes its uniform slots and encodes passes.
|
|
47
|
+
*/
|
|
48
|
+
export declare class WebGPUEffects3D implements WebGPUEffectsProcessor3D {
|
|
49
|
+
private _plan;
|
|
50
|
+
private _device;
|
|
51
|
+
private readonly _targets;
|
|
52
|
+
private readonly _pipelines;
|
|
53
|
+
private readonly _modules;
|
|
54
|
+
private readonly _layouts;
|
|
55
|
+
/** Bind groups by layout, uniform slot and texture views. */
|
|
56
|
+
private _groups;
|
|
57
|
+
private _buffer;
|
|
58
|
+
private _sampler;
|
|
59
|
+
private readonly _data;
|
|
60
|
+
private _mask?;
|
|
61
|
+
private _resolve?;
|
|
62
|
+
private _lut?;
|
|
63
|
+
private readonly _attachment;
|
|
64
|
+
private readonly _pass;
|
|
65
|
+
private readonly _depthAttachment;
|
|
66
|
+
private readonly _depthPass;
|
|
67
|
+
private _sourceView;
|
|
68
|
+
private _depthView;
|
|
69
|
+
private _bytes;
|
|
70
|
+
private _basePerPixel;
|
|
71
|
+
private _depthPerPixel;
|
|
72
|
+
private _baseColors;
|
|
73
|
+
private _width;
|
|
74
|
+
private _height;
|
|
75
|
+
/** Size of the last validated canvas; configure() checks plans against it. */
|
|
76
|
+
private _validWidth;
|
|
77
|
+
private _validHeight;
|
|
78
|
+
private _layoutPlan?;
|
|
79
|
+
private _layoutBase;
|
|
80
|
+
private _canvasFormat;
|
|
81
|
+
private _cameraStamp;
|
|
82
|
+
private readonly _inverseProjection;
|
|
83
|
+
private readonly _previous;
|
|
84
|
+
private _previousStamp;
|
|
85
|
+
private readonly _reprojection;
|
|
86
|
+
/** Projection of the current camera, a view of the renderer's frame record. */
|
|
87
|
+
private _projection;
|
|
88
|
+
private _grainFrame;
|
|
89
|
+
private _selection;
|
|
90
|
+
private _jitterIndex;
|
|
91
|
+
private readonly _jitter;
|
|
92
|
+
private _historyParity;
|
|
93
|
+
private _historyValid;
|
|
94
|
+
private readonly _taaPrevious;
|
|
95
|
+
private readonly _taaReprojection;
|
|
96
|
+
constructor(_plan: EffectsPlan3D);
|
|
97
|
+
get bytes(): number;
|
|
98
|
+
get depth(): boolean;
|
|
99
|
+
/** Sub-pixel projection offset for the next frame (device pixels), or null without TAA. */
|
|
100
|
+
jitter(): Float32Array | null;
|
|
101
|
+
validateSize(width: number, height: number, baseBytes: number, baseColors: number, depthBytes: number): void;
|
|
102
|
+
configure(plan: EffectsPlan3D): void;
|
|
103
|
+
/** Replaces the outline selection; the array is owned by the caller's copy. */
|
|
104
|
+
select(meshes: readonly Nova3DMesh[]): void;
|
|
105
|
+
present(encoder: GPUCommandEncoder, source: GPUTextureView, width: number, height: number, frame: WebGPUEffectsFrame3D): number;
|
|
106
|
+
reset(lost: boolean): void;
|
|
107
|
+
/** Linear ping-pong target that does not hold `current`. */
|
|
108
|
+
private _next;
|
|
109
|
+
private _baseBytes;
|
|
110
|
+
/** Writes the output size of a slot (xy) and its inverse (zw). */
|
|
111
|
+
private _uniforms;
|
|
112
|
+
private _vector;
|
|
113
|
+
private _matrix;
|
|
114
|
+
private _module;
|
|
115
|
+
private _layout;
|
|
116
|
+
private _pipeline;
|
|
117
|
+
/** Cached bind group of a layout, uniform slot and up to three texture views. */
|
|
118
|
+
private _group;
|
|
119
|
+
private _branch;
|
|
120
|
+
/** One full-screen pass into `output`. */
|
|
121
|
+
private _run;
|
|
122
|
+
private _resolveDepth;
|
|
123
|
+
private _ssao;
|
|
124
|
+
private _ssr;
|
|
125
|
+
private _dof;
|
|
126
|
+
private _taa;
|
|
127
|
+
/** Updates the reprojection; false when the camera did not move since the last frame. */
|
|
128
|
+
private _motion;
|
|
129
|
+
private _motionBlur;
|
|
130
|
+
private _bloom;
|
|
131
|
+
private _outline;
|
|
132
|
+
private _maskPipelines;
|
|
133
|
+
private _maskGroup;
|
|
134
|
+
private _finish;
|
|
135
|
+
/** 3D copy of the LUT texture (the scene texture cache holds 2D textures only). */
|
|
136
|
+
private _lutView;
|
|
137
|
+
private _smaa;
|
|
138
|
+
private _releaseStale;
|
|
139
|
+
private _ensureTargets;
|
|
140
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Nova3DNode } from '../model/Node.js';
|
|
2
|
+
import { Nova3DScene } from '../model/Scene.js';
|
|
3
|
+
import { Nova3DApp } from '../Nova3DApp.js';
|
|
4
|
+
import { Matrix3D } from '../types.js';
|
|
5
|
+
/** @experimental */
|
|
6
|
+
export type XRMode3D = 'immersive-vr' | 'immersive-ar';
|
|
7
|
+
/** @experimental */
|
|
8
|
+
export interface XRStartOptions3D {
|
|
9
|
+
/** Default 'local-floor' for VR and 'local' for AR. */
|
|
10
|
+
referenceSpace?: 'local' | 'local-floor' | 'bounded-floor' | 'unbounded' | 'viewer';
|
|
11
|
+
requiredFeatures?: string[];
|
|
12
|
+
optionalFeatures?: string[];
|
|
13
|
+
/** XRWebGLLayer framebuffer scale. Default 1. */
|
|
14
|
+
framebufferScale?: number;
|
|
15
|
+
/** Requests a viewer hit-test source (AR). */
|
|
16
|
+
hitTest?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* One tracked input source: target-ray and grip poses as nodes under the rig.
|
|
20
|
+
* @experimental
|
|
21
|
+
*/
|
|
22
|
+
export interface XRController3D {
|
|
23
|
+
readonly handedness: string;
|
|
24
|
+
readonly targetRay: Nova3DNode;
|
|
25
|
+
readonly grip: Nova3DNode | null;
|
|
26
|
+
}
|
|
27
|
+
/** @experimental */
|
|
28
|
+
export interface XRSelectEvent3D {
|
|
29
|
+
readonly type: 'selectstart' | 'select' | 'selectend' | 'squeezestart' | 'squeeze' | 'squeezeend';
|
|
30
|
+
readonly controller: XRController3D;
|
|
31
|
+
}
|
|
32
|
+
/** @experimental */
|
|
33
|
+
export interface XROptions3D {
|
|
34
|
+
scene: Nova3DScene;
|
|
35
|
+
/**
|
|
36
|
+
* Origin of the tracked space: eye cameras and controllers are its children, so
|
|
37
|
+
* moving the rig moves the player (three.js camera rig, Babylon/PlayCanvas XR origin).
|
|
38
|
+
*/
|
|
39
|
+
rig: Nova3DNode;
|
|
40
|
+
/** Near and far planes requested from the session. Defaults 0.1 and 1000. */
|
|
41
|
+
near?: number;
|
|
42
|
+
far?: number;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* WebXR sessions for a Nova app (three.js WebXRManager, Babylon WebXRExperienceHelper,
|
|
46
|
+
* PlayCanvas XrManager): stereo eye views from the session drive the app frames,
|
|
47
|
+
* controllers become nodes, AR hit tests yield poses. Effects anti-aliasing stages
|
|
48
|
+
* are not used inside a session.
|
|
49
|
+
* @experimental
|
|
50
|
+
*/
|
|
51
|
+
export declare class Nova3DXR {
|
|
52
|
+
protected constructor();
|
|
53
|
+
private readonly _app;
|
|
54
|
+
private readonly _options;
|
|
55
|
+
private _session;
|
|
56
|
+
private _space;
|
|
57
|
+
private _hitSource;
|
|
58
|
+
private _frameHandle;
|
|
59
|
+
private _lastTime;
|
|
60
|
+
private _startTime;
|
|
61
|
+
private readonly _eyes;
|
|
62
|
+
private _savedViews;
|
|
63
|
+
/** Last layer size, view count and normalized viewports, compared without allocating. */
|
|
64
|
+
private readonly _layout;
|
|
65
|
+
private readonly _seen;
|
|
66
|
+
private readonly _controllers;
|
|
67
|
+
private readonly _selectListeners;
|
|
68
|
+
private readonly _sessionListeners;
|
|
69
|
+
private readonly _hit;
|
|
70
|
+
private _hasHit;
|
|
71
|
+
private _destroyed;
|
|
72
|
+
private readonly _detach;
|
|
73
|
+
private readonly _onInput;
|
|
74
|
+
private readonly _inputHandlers;
|
|
75
|
+
private readonly _ended;
|
|
76
|
+
/** Whether the browser offers `mode`. */
|
|
77
|
+
static isSupported(mode: XRMode3D): Promise<boolean>;
|
|
78
|
+
get active(): boolean;
|
|
79
|
+
get controllers(): readonly XRController3D[];
|
|
80
|
+
/** Latest hit-test pose (column-major world matrix relative to the rig), or null. */
|
|
81
|
+
/** Column-major pose matrix of the last AR hit in the reference space (rig-local), or null; reused between frames. */
|
|
82
|
+
get hitPose(): Matrix3D | null;
|
|
83
|
+
onSelect(listener: (event: XRSelectEvent3D) => void): () => void;
|
|
84
|
+
onSessionChange(listener: (active: boolean) => void): () => void;
|
|
85
|
+
/** Starts an immersive session; it must be called from a user gesture in browsers. */
|
|
86
|
+
start(mode: XRMode3D, options?: XRStartOptions3D): Promise<void>;
|
|
87
|
+
end(): Promise<void>;
|
|
88
|
+
get destroyed(): boolean;
|
|
89
|
+
destroy(): void;
|
|
90
|
+
private readonly _frame;
|
|
91
|
+
private _trackInputs;
|
|
92
|
+
private _finish;
|
|
93
|
+
private _assertAlive;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Creates the WebXR controller of `app`. Owned by the app: `app.destroy()` ends its
|
|
97
|
+
* session and destroys it.
|
|
98
|
+
* @experimental
|
|
99
|
+
*/
|
|
100
|
+
export declare function createXR(app: Nova3DApp, options: XROptions3D): Nova3DXR;
|