@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,45 @@
|
|
|
1
|
+
import { NodeOptions3D, Vector3D } from '../types.js';
|
|
2
|
+
import { Nova3DCamera } from './Camera.js';
|
|
3
|
+
import { Nova3DNode } from './Node.js';
|
|
4
|
+
import { Nova3DScene } from './Scene.js';
|
|
5
|
+
/**
|
|
6
|
+
* Local reflections for PBR meshes inside a box (three.js CubeCamera + envMap,
|
|
7
|
+
* Babylon ReflectionProbe, PlayCanvas cubemap).
|
|
8
|
+
* @experimental
|
|
9
|
+
*/
|
|
10
|
+
export type ReflectionProbeOptions3D = Pick<NodeOptions3D, 'id' | 'position' | 'parent'> & {
|
|
11
|
+
/** Half extents of the influence box around the probe, world units. Default [5, 5, 5]. */
|
|
12
|
+
box?: Vector3D;
|
|
13
|
+
/** Capture face size, a power of two in [16, 512]. Default 128. */
|
|
14
|
+
resolution?: number;
|
|
15
|
+
near?: number;
|
|
16
|
+
far?: number;
|
|
17
|
+
/** Multiplies the captured light. Default 1. */
|
|
18
|
+
intensity?: number;
|
|
19
|
+
/** Parallax-corrects reflections to the box walls. Default true. */
|
|
20
|
+
boxProjection?: boolean;
|
|
21
|
+
/** Layer mask of what the capture sees. Default all. */
|
|
22
|
+
layers?: number;
|
|
23
|
+
};
|
|
24
|
+
export declare const reflectionProbeKeys3D: ReadonlySet<string>;
|
|
25
|
+
/** @experimental */
|
|
26
|
+
export declare class Nova3DReflectionProbe {
|
|
27
|
+
protected constructor();
|
|
28
|
+
private readonly _scene;
|
|
29
|
+
private readonly _unregister;
|
|
30
|
+
/** Group at the capture point; the six face cameras are its children. */
|
|
31
|
+
readonly node: Nova3DNode;
|
|
32
|
+
readonly cameras: readonly Nova3DCamera[];
|
|
33
|
+
readonly box: Vector3D;
|
|
34
|
+
readonly resolution: number;
|
|
35
|
+
readonly intensity: number;
|
|
36
|
+
readonly boxProjection: boolean;
|
|
37
|
+
readonly layers: number;
|
|
38
|
+
private _destroyed;
|
|
39
|
+
private _version;
|
|
40
|
+
private _captured;
|
|
41
|
+
get destroyed(): boolean;
|
|
42
|
+
/** Captures the scene again before the next frame that shows it. */
|
|
43
|
+
update(): void;
|
|
44
|
+
destroy(): void;
|
|
45
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ScreenSize3D } from '../types.js';
|
|
2
|
+
import { Nova3DTexture } from './Texture.js';
|
|
3
|
+
/**
|
|
4
|
+
* Options of `app.createRenderTarget`.
|
|
5
|
+
* @experimental
|
|
6
|
+
*/
|
|
7
|
+
export interface RenderTargetOptions3D {
|
|
8
|
+
/** Width in pixels. */
|
|
9
|
+
width: number;
|
|
10
|
+
/** Height in pixels. */
|
|
11
|
+
height: number;
|
|
12
|
+
/** `srgb8` stores encoded colour and blends in linear; `rgba16f` keeps linear HDR values. */
|
|
13
|
+
format?: 'srgb8' | 'rgba16f';
|
|
14
|
+
depth?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Offscreen colour (and optional depth) attachment that views can render into and
|
|
18
|
+
* materials can sample through `texture`.
|
|
19
|
+
* @experimental
|
|
20
|
+
*/
|
|
21
|
+
export declare class Nova3DRenderTarget {
|
|
22
|
+
protected constructor();
|
|
23
|
+
private readonly _maxSize;
|
|
24
|
+
private readonly _release;
|
|
25
|
+
readonly texture: Nova3DTexture;
|
|
26
|
+
readonly format: 'srgb8' | 'rgba16f';
|
|
27
|
+
readonly depth: boolean;
|
|
28
|
+
private _width;
|
|
29
|
+
private _height;
|
|
30
|
+
private _version;
|
|
31
|
+
private _destroyed;
|
|
32
|
+
get width(): number;
|
|
33
|
+
get height(): number;
|
|
34
|
+
get version(): number;
|
|
35
|
+
get destroyed(): boolean;
|
|
36
|
+
/** Resizes the attachments to `size` pixels, like `app.resize`. */
|
|
37
|
+
resize(size: ScreenSize3D): void;
|
|
38
|
+
destroy(): void;
|
|
39
|
+
private _validateSize;
|
|
40
|
+
private _assertAlive;
|
|
41
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { SkinBinding3D, Nova3DDeformedMesh } from '../deformation/DeformedMesh.js';
|
|
2
|
+
import { Nova3DApp } from '../Nova3DApp.js';
|
|
3
|
+
import { BackgroundOptions3D, FogOptions3D, NodeOptions3D, OrthographicCameraOptions3D, PerspectiveCameraOptions3D, Ray3D } from '../types.js';
|
|
4
|
+
import { Nova3DEnvironment } from './Environment.js';
|
|
5
|
+
import { InstancedMeshOptions3D, Nova3DInstancedMesh } from './InstancedMesh.js';
|
|
6
|
+
import { AmbientLightOptions3D, DirectionalLightOptions3D, HemisphereLightOptions3D, LightProbeOptions3D, PointLightOptions3D, SpotLightOptions3D, Nova3DLight } from './Light.js';
|
|
7
|
+
import { LODOptions3D, Nova3DLOD } from './LOD.js';
|
|
8
|
+
import { Hit3D, MeshOptions3D, Nova3DMesh } from './Mesh.js';
|
|
9
|
+
import { ReflectionProbeOptions3D, Nova3DReflectionProbe } from './ReflectionProbe.js';
|
|
10
|
+
import { Nova3DTexture } from './Texture.js';
|
|
11
|
+
import { Nova3DCamera } from './Camera.js';
|
|
12
|
+
import { Nova3DNode } from './Node.js';
|
|
13
|
+
export interface SceneBackground3D {
|
|
14
|
+
readonly options: BackgroundOptions3D;
|
|
15
|
+
/** sRGB RGBA for colour backgrounds. */
|
|
16
|
+
readonly color: readonly [number, number, number, number] | null;
|
|
17
|
+
/** Explicit environment; null uses the scene environment. */
|
|
18
|
+
readonly environment: Nova3DEnvironment | null;
|
|
19
|
+
/** Screen-filling 2D texture background. */
|
|
20
|
+
readonly texture: Nova3DTexture | null;
|
|
21
|
+
readonly intensity: number;
|
|
22
|
+
readonly blur: number;
|
|
23
|
+
}
|
|
24
|
+
export interface SceneFog3D {
|
|
25
|
+
readonly options: FogOptions3D;
|
|
26
|
+
readonly mode: 0 | 1 | 2;
|
|
27
|
+
readonly color: readonly [number, number, number];
|
|
28
|
+
/** near for linear fog, density for exp/exp2. */
|
|
29
|
+
readonly a: number;
|
|
30
|
+
/** far for linear fog, unused for exp/exp2. */
|
|
31
|
+
readonly b: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Options of `scene.setSpatialIndex`.
|
|
35
|
+
* @experimental
|
|
36
|
+
*/
|
|
37
|
+
export interface SpatialIndexOptions3D {
|
|
38
|
+
/** 'bvh' keeps a bounding-volume hierarchy for raycasts; 'none' (default) tests every mesh. */
|
|
39
|
+
type: 'none' | 'bvh';
|
|
40
|
+
}
|
|
41
|
+
/** @experimental */
|
|
42
|
+
export interface RaycastOptions3D {
|
|
43
|
+
precision?: 'bounds' | 'triangles';
|
|
44
|
+
filter?: (node: Nova3DMesh) => boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Only meshes whose layer mask shares a bit with this one. Default all layers.
|
|
47
|
+
* @experimental
|
|
48
|
+
*/
|
|
49
|
+
layers?: number;
|
|
50
|
+
maxDistance?: number;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Owns node identity, invalidation and CPU spatial queries.
|
|
54
|
+
* @experimental
|
|
55
|
+
*/
|
|
56
|
+
export declare class Nova3DScene {
|
|
57
|
+
protected constructor();
|
|
58
|
+
readonly id: string;
|
|
59
|
+
private readonly _change;
|
|
60
|
+
private readonly _release;
|
|
61
|
+
private readonly _releaseNode;
|
|
62
|
+
private readonly _nodes;
|
|
63
|
+
/** Meshes in registration order, as `_nodes` lists them: render collection skips joints and groups. */
|
|
64
|
+
private readonly _meshes;
|
|
65
|
+
/**
|
|
66
|
+
* Nodes whose world matrix is stale, in invalidation order; membership is the node's
|
|
67
|
+
* `_matrixDirty` flag (an unregistered node clears it and is skipped). An array and a
|
|
68
|
+
* flag instead of a Set: every animated joint is added and cleared each frame. The
|
|
69
|
+
* array keeps its capacity (`_dirtyLength` is its used part, the rest is undefined).
|
|
70
|
+
*/
|
|
71
|
+
private readonly _dirty;
|
|
72
|
+
private _dirtyLength;
|
|
73
|
+
/** Live (flagged) entries of `_dirty`. */
|
|
74
|
+
private _dirtyCount;
|
|
75
|
+
private _environment;
|
|
76
|
+
/** Replaced on every change, so renderers compare it by identity. */
|
|
77
|
+
private _fog;
|
|
78
|
+
private _background;
|
|
79
|
+
/** Retention key of the background environment, separate from the lighting one. */
|
|
80
|
+
private readonly _backgroundUser;
|
|
81
|
+
private readonly _lightNodes;
|
|
82
|
+
private readonly _probes;
|
|
83
|
+
private readonly _lodNodes;
|
|
84
|
+
private readonly _index;
|
|
85
|
+
private readonly _dirtyBounds;
|
|
86
|
+
private _indexType;
|
|
87
|
+
private readonly _jointUsers;
|
|
88
|
+
private _tearingDown;
|
|
89
|
+
private _nextId;
|
|
90
|
+
private _destroyed;
|
|
91
|
+
private _matrixUpdates;
|
|
92
|
+
/**
|
|
93
|
+
* Scratch of `_flushMatrices`: dirty nodes without a dirty ancestor, and the walk below
|
|
94
|
+
* them; both keep their capacity and are emptied to undefined after each flush.
|
|
95
|
+
*/
|
|
96
|
+
private readonly _flushRoots;
|
|
97
|
+
private readonly _flushStack;
|
|
98
|
+
private _flushTop;
|
|
99
|
+
/** World record of the scene root as parent of top-level nodes (never written). */
|
|
100
|
+
private readonly _sceneParent;
|
|
101
|
+
private readonly _pushChild;
|
|
102
|
+
get destroyed(): boolean;
|
|
103
|
+
get children(): readonly Nova3DNode[];
|
|
104
|
+
getNode(id: string): Nova3DNode | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Sets or clears scene fog.
|
|
107
|
+
* @experimental
|
|
108
|
+
*/
|
|
109
|
+
setFog(fog: FogOptions3D | null): void;
|
|
110
|
+
getFog(): FogOptions3D | null;
|
|
111
|
+
/**
|
|
112
|
+
* Sets or clears the scene background.
|
|
113
|
+
* @experimental
|
|
114
|
+
*/
|
|
115
|
+
setBackground(background: BackgroundOptions3D | null): void;
|
|
116
|
+
getBackground(): BackgroundOptions3D | null;
|
|
117
|
+
setEnvironment(environment: Nova3DEnvironment | null): void;
|
|
118
|
+
/** Owned by the scene: destroyed with it, its parent or the app. */
|
|
119
|
+
createGroup(options?: NodeOptions3D): Nova3DNode;
|
|
120
|
+
/** Owned by the scene: destroyed with it, its parent or the app. */
|
|
121
|
+
createMesh(options: MeshOptions3D): Nova3DMesh;
|
|
122
|
+
/** Owned by the scene: destroyed with it, its parent or the app. */
|
|
123
|
+
createInstancedMesh(options: InstancedMeshOptions3D): Nova3DInstancedMesh;
|
|
124
|
+
/** Owned by the scene: destroyed with it, its parent or the app. */
|
|
125
|
+
createLOD(options: LODOptions3D): Nova3DLOD;
|
|
126
|
+
/** Chooses the raycast acceleration structure. */
|
|
127
|
+
setSpatialIndex(options: SpatialIndexOptions3D): void;
|
|
128
|
+
private _flushIndex;
|
|
129
|
+
/** Owned by the scene: destroyed with it, its parent or the app. */
|
|
130
|
+
createDirectionalLight(options: DirectionalLightOptions3D): Nova3DLight;
|
|
131
|
+
/** Owned by the scene: destroyed with it, its parent or the app. */
|
|
132
|
+
createPointLight(options: PointLightOptions3D): Nova3DLight;
|
|
133
|
+
/** Owned by the scene: destroyed with it, its parent or the app. */
|
|
134
|
+
createSpotLight(options: SpotLightOptions3D): Nova3DLight;
|
|
135
|
+
/**
|
|
136
|
+
* Local reflection cube for PBR meshes inside its box; captured on creation and on update().
|
|
137
|
+
* Owned by the scene: destroyed with it or the app.
|
|
138
|
+
* @experimental
|
|
139
|
+
*/
|
|
140
|
+
createReflectionProbe(options?: ReflectionProbeOptions3D): Nova3DReflectionProbe;
|
|
141
|
+
/**
|
|
142
|
+
* Global spherical-harmonic light probe; see LightProbeOptions3D.
|
|
143
|
+
* Owned by the scene: destroyed with it, its parent or the app.
|
|
144
|
+
* @experimental
|
|
145
|
+
*/
|
|
146
|
+
createLightProbe(options: LightProbeOptions3D): Nova3DLight;
|
|
147
|
+
/**
|
|
148
|
+
* Adds uniform irradiance to PBR surfaces.
|
|
149
|
+
* Owned by the scene: destroyed with it, its parent or the app.
|
|
150
|
+
* @experimental
|
|
151
|
+
*/
|
|
152
|
+
createAmbientLight(options: AmbientLightOptions3D): Nova3DLight;
|
|
153
|
+
/**
|
|
154
|
+
* Adds sky/ground irradiance oriented by the node's local +Y to PBR surfaces.
|
|
155
|
+
* Owned by the scene: destroyed with it, its parent or the app.
|
|
156
|
+
* @experimental
|
|
157
|
+
*/
|
|
158
|
+
createHemisphereLight(options: HemisphereLightOptions3D): Nova3DLight;
|
|
159
|
+
/** Owned by the scene: destroyed with it, its parent or the app. */
|
|
160
|
+
createPerspectiveCamera(options: PerspectiveCameraOptions3D): Nova3DCamera;
|
|
161
|
+
/** Owned by the scene: destroyed with it, its parent or the app. */
|
|
162
|
+
createOrthographicCamera(options: OrthographicCameraOptions3D): Nova3DCamera;
|
|
163
|
+
raycast(ray: Ray3D, options?: RaycastOptions3D): Hit3D | null;
|
|
164
|
+
raycastAll(ray: Ray3D, options?: RaycastOptions3D): readonly Hit3D[];
|
|
165
|
+
destroy(): void;
|
|
166
|
+
private _clearDirty;
|
|
167
|
+
private _assertAlive;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* The app behind `scene`, for subpath factories that take only a scene; liveness
|
|
171
|
+
* is checked by the object being created. @internal
|
|
172
|
+
*/
|
|
173
|
+
export declare function sceneApp3D(scene: Nova3DScene): Nova3DApp;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/** @experimental */
|
|
2
|
+
export type TextureMinFilter3D = 'nearest' | 'linear' | 'nearest-mipmap-nearest' | 'linear-mipmap-nearest' | 'nearest-mipmap-linear' | 'linear-mipmap-linear';
|
|
3
|
+
/** @experimental */
|
|
4
|
+
export interface TextureOptions3D {
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
data: Uint8Array | Float32Array;
|
|
8
|
+
format?: 'rgba8' | 'rgba16f';
|
|
9
|
+
colorSpace?: 'srgb' | 'linear';
|
|
10
|
+
filter?: 'nearest' | 'linear';
|
|
11
|
+
minFilter?: TextureMinFilter3D;
|
|
12
|
+
magFilter?: 'nearest' | 'linear';
|
|
13
|
+
wrapS?: 'clamp' | 'repeat' | 'mirror';
|
|
14
|
+
wrapT?: 'clamp' | 'repeat' | 'mirror';
|
|
15
|
+
wrap?: 'clamp' | 'repeat' | 'mirror';
|
|
16
|
+
mipmaps?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* '2d' (default), '2d-array' (`depth` layers, sampler2DArray) or '3d' (`depth`
|
|
19
|
+
* slices, sampler3D). Arrays and volumes are read by shader materials.
|
|
20
|
+
* @experimental
|
|
21
|
+
*/
|
|
22
|
+
dimension?: '2d' | '2d-array' | '3d';
|
|
23
|
+
/** Layers or slices of an array or 3D texture; `data` holds width·height·depth texels. */
|
|
24
|
+
depth?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Maximum anisotropic samples, 1 to 16, clamped to the device limit. Applies only
|
|
27
|
+
* with `*-mipmap-linear` minification and linear magnification. Default 1.
|
|
28
|
+
* @experimental
|
|
29
|
+
*/
|
|
30
|
+
anisotropy?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Sampler options shared by data and image textures.
|
|
34
|
+
* @experimental
|
|
35
|
+
*/
|
|
36
|
+
export type TextureSamplerOptions3D = Pick<TextureOptions3D, 'colorSpace' | 'filter' | 'minFilter' | 'magFilter' | 'wrapS' | 'wrapT' | 'wrap' | 'mipmaps' | 'anisotropy'>;
|
|
37
|
+
/**
|
|
38
|
+
* A browser image source uploaded as RGBA8: canvas, OffscreenCanvas, ImageBitmap,
|
|
39
|
+
* image, video, ImageData or VideoFrame. Row 0 is the image top, as for data textures.
|
|
40
|
+
* Videos refresh on every presented frame; other sources after `update()`.
|
|
41
|
+
* @experimental
|
|
42
|
+
*/
|
|
43
|
+
export type ImageTextureOptions3D = TextureSamplerOptions3D & {
|
|
44
|
+
image: TexImageSource;
|
|
45
|
+
/**
|
|
46
|
+
* Uploads the image bottom row first, so the image top lands at v = 1 — upright on
|
|
47
|
+
* primitives, whose UV origin is bottom-left (three.js `flipY`). Default false, the
|
|
48
|
+
* glTF and data-texture convention. ImageBitmaps flip at creation instead
|
|
49
|
+
* (`imageOrientation: 'flipY'`).
|
|
50
|
+
*/
|
|
51
|
+
flipY?: boolean;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* What `getSource()` returns for an image texture: the GPU holds the only pixels, so
|
|
55
|
+
* the description has the decoded size and color space but no `data`. Narrow with
|
|
56
|
+
* `'kind' in source`. `width` and `height` are 0 while a video has no decodable frame.
|
|
57
|
+
* @experimental
|
|
58
|
+
*/
|
|
59
|
+
export interface ImageTextureSource3D {
|
|
60
|
+
readonly kind: 'image';
|
|
61
|
+
readonly width: number;
|
|
62
|
+
readonly height: number;
|
|
63
|
+
readonly colorSpace: 'srgb' | 'linear';
|
|
64
|
+
/** Encoded type of a loaded image (`image/png`, `image/jpeg`), when known. */
|
|
65
|
+
readonly mimeType?: string;
|
|
66
|
+
}
|
|
67
|
+
/** Keys of `TextureSamplerOptions3D`. */
|
|
68
|
+
export declare const textureSamplerKeys3D: ReadonlySet<string>;
|
|
69
|
+
/** Pixel rectangle marked for upload; `x1`/`y1` are exclusive. */
|
|
70
|
+
interface DirtyRegion3D {
|
|
71
|
+
x0: number;
|
|
72
|
+
y0: number;
|
|
73
|
+
x1: number;
|
|
74
|
+
y1: number;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* App-owned pixels (RGBA8 or RGBA16F) kept on the CPU, so the GPU copy can be
|
|
78
|
+
* restored after a context loss. Image textures keep a browser source instead of
|
|
79
|
+
* CPU pixels.
|
|
80
|
+
* @experimental
|
|
81
|
+
*/
|
|
82
|
+
export declare class Nova3DTexture {
|
|
83
|
+
protected constructor();
|
|
84
|
+
private _release;
|
|
85
|
+
private _source;
|
|
86
|
+
private _image;
|
|
87
|
+
private _flipY;
|
|
88
|
+
private _version;
|
|
89
|
+
/** Content revision: changes re-upload pixels into the same GPU storage. */
|
|
90
|
+
private _content;
|
|
91
|
+
/** Region changed since the last upload; null means the whole texture. */
|
|
92
|
+
private _dirty;
|
|
93
|
+
/** Content revision the GPU copy last received. */
|
|
94
|
+
private _uploaded;
|
|
95
|
+
private _videoActive;
|
|
96
|
+
private _videoTime;
|
|
97
|
+
private _documentWrite?;
|
|
98
|
+
private _destroyed;
|
|
99
|
+
private readonly _users;
|
|
100
|
+
/**
|
|
101
|
+
* The browser image source of an image texture, otherwise null.
|
|
102
|
+
* @experimental
|
|
103
|
+
*/
|
|
104
|
+
get image(): TexImageSource | null;
|
|
105
|
+
/**
|
|
106
|
+
* Whether an image source uploads flipped vertically.
|
|
107
|
+
* @experimental
|
|
108
|
+
*/
|
|
109
|
+
get flipY(): boolean;
|
|
110
|
+
setSource(options: TextureOptions3D | ImageTextureOptions3D): void;
|
|
111
|
+
/**
|
|
112
|
+
* A copy of the data texture's options and pixels, or, for an image texture (whose only
|
|
113
|
+
* pixels live on the GPU), an `ImageTextureSource3D` description without pixels. Render
|
|
114
|
+
* target textures have no CPU source and throw.
|
|
115
|
+
*/
|
|
116
|
+
getSource(): Readonly<Required<TextureOptions3D>> | ImageTextureSource3D;
|
|
117
|
+
/**
|
|
118
|
+
* Re-uploads the whole texture: after drawing into a canvas source or editing
|
|
119
|
+
* the data in place. Videos refresh by themselves.
|
|
120
|
+
* @experimental
|
|
121
|
+
*/
|
|
122
|
+
update(): void;
|
|
123
|
+
/**
|
|
124
|
+
* Replaces a rectangle of a data texture (`x`, `y` in pixels from the top-left,
|
|
125
|
+
* `data` packed rows of the texture format) and uploads only that region.
|
|
126
|
+
* @experimental
|
|
127
|
+
*/
|
|
128
|
+
updateRegion(x: number, y: number, width: number, height: number, data: Uint8Array | Float32Array): void;
|
|
129
|
+
destroy(): void;
|
|
130
|
+
private _notify;
|
|
131
|
+
private _assign;
|
|
132
|
+
/** Keeps a presentation-driven refresh loop running while a video texture is used. */
|
|
133
|
+
private _syncVideo;
|
|
134
|
+
private _scheduleVideo;
|
|
135
|
+
private readonly _onVideoFrame;
|
|
136
|
+
private _assertCpuSource;
|
|
137
|
+
private _assertAlive;
|
|
138
|
+
private static _validate;
|
|
139
|
+
get destroyed(): boolean;
|
|
140
|
+
get version(): number;
|
|
141
|
+
get byteLength(): number;
|
|
142
|
+
}
|
|
143
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Free functions of the material node graph. Import `@nova-lab/core/3d/nodes` as a
|
|
3
|
+
* namespace (`import * as nodes from …`, then `nodes.uv()`, `nodes.texture(map)`).
|
|
4
|
+
* Operators that are methods of `Nova3DShaderNode` (`add`, `mul`, `mix`, `clamp`,
|
|
5
|
+
* `swizzle`, …) are not repeated here: write `nodes.uv().mul(4).fract()`.
|
|
6
|
+
* @experimental
|
|
7
|
+
*/
|
|
8
|
+
export { abs, cameraPosition, ceil, checker, color, cos, cross, distance, exp, float, floor, fractalNoise, fragmentCoordinate, fresnel, join, log, max, min, mod, negate, noise, normalLocal, normalWorld, perturbNormal, positionLocal, positionWorld, reflect, remap, saturate, sign, sin, smoothstep, sqrt, step, texture, triplanar, uniform, uv, vec2, vec3, vec4, vertexColor, viewDirection, } from './ShaderNode.js';
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { Nova3DTexture } from '../model/Texture.js';
|
|
2
|
+
import { Color3D } from '../types.js';
|
|
3
|
+
/** @experimental */
|
|
4
|
+
export type NodeType3D = 'float' | 'vec2' | 'vec3' | 'vec4';
|
|
5
|
+
/**
|
|
6
|
+
* A number, a 2–4 component vector, or a node.
|
|
7
|
+
* @experimental
|
|
8
|
+
*/
|
|
9
|
+
export type NodeInput3D = Nova3DShaderNode | number | readonly number[];
|
|
10
|
+
/**
|
|
11
|
+
* One value of a material node graph (three.js TSL nodes, Babylon NodeMaterial
|
|
12
|
+
* blocks). Nodes are immutable; uniform nodes carry a mutable value. Methods chain:
|
|
13
|
+
* `uv().mul(4).fract()`.
|
|
14
|
+
* @experimental
|
|
15
|
+
*/
|
|
16
|
+
export declare class Nova3DShaderNode {
|
|
17
|
+
protected constructor();
|
|
18
|
+
readonly type: NodeType3D;
|
|
19
|
+
add(value: NodeInput3D): Nova3DShaderNode;
|
|
20
|
+
sub(value: NodeInput3D): Nova3DShaderNode;
|
|
21
|
+
mul(value: NodeInput3D): Nova3DShaderNode;
|
|
22
|
+
div(value: NodeInput3D): Nova3DShaderNode;
|
|
23
|
+
dot(value: NodeInput3D): Nova3DShaderNode;
|
|
24
|
+
mix(value: NodeInput3D, amount: NodeInput3D): Nova3DShaderNode;
|
|
25
|
+
clamp(low?: NodeInput3D, high?: NodeInput3D): Nova3DShaderNode;
|
|
26
|
+
pow(value: NodeInput3D): Nova3DShaderNode;
|
|
27
|
+
normalize(): Nova3DShaderNode;
|
|
28
|
+
length(): Nova3DShaderNode;
|
|
29
|
+
fract(): Nova3DShaderNode;
|
|
30
|
+
oneMinus(): Nova3DShaderNode;
|
|
31
|
+
/** Picks components by name: `'x'`, `'xy'`, `'rgb'`, `'zyx'`, … */
|
|
32
|
+
swizzle(components: string): Nova3DShaderNode;
|
|
33
|
+
get x(): Nova3DShaderNode;
|
|
34
|
+
get y(): Nova3DShaderNode;
|
|
35
|
+
get z(): Nova3DShaderNode;
|
|
36
|
+
get w(): Nova3DShaderNode;
|
|
37
|
+
get xy(): Nova3DShaderNode;
|
|
38
|
+
get xyz(): Nova3DShaderNode;
|
|
39
|
+
get rgb(): Nova3DShaderNode;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A uniform whose `value` may change every frame without recompiling.
|
|
43
|
+
* @experimental
|
|
44
|
+
*/
|
|
45
|
+
export declare class Nova3DUniformNode extends Nova3DShaderNode {
|
|
46
|
+
protected constructor();
|
|
47
|
+
private _value;
|
|
48
|
+
get value(): number | readonly number[];
|
|
49
|
+
set value(value: number | readonly number[]);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* A sampled 2D texture.
|
|
53
|
+
* @experimental
|
|
54
|
+
*/
|
|
55
|
+
export declare class Nova3DTextureNode extends Nova3DShaderNode {
|
|
56
|
+
protected constructor();
|
|
57
|
+
readonly texture: Nova3DTexture;
|
|
58
|
+
}
|
|
59
|
+
/** @experimental */
|
|
60
|
+
export declare function float(value: number): Nova3DShaderNode;
|
|
61
|
+
/** @experimental */
|
|
62
|
+
export declare function vec2(x: number, y?: number): Nova3DShaderNode;
|
|
63
|
+
/** @experimental */
|
|
64
|
+
export declare function vec3(x: number, y?: number, z?: number): Nova3DShaderNode;
|
|
65
|
+
/** @experimental */
|
|
66
|
+
export declare function vec4(x: number, y?: number, z?: number, w?: number): Nova3DShaderNode;
|
|
67
|
+
/**
|
|
68
|
+
* A linear RGB constant of an sRGB colour (hex string, name or sRGB components),
|
|
69
|
+
* decoded once; alpha is dropped. Use `vec3` for linear components.
|
|
70
|
+
* @experimental
|
|
71
|
+
*/
|
|
72
|
+
export declare function color(value: Color3D): Nova3DShaderNode;
|
|
73
|
+
/**
|
|
74
|
+
* Builds a vector from scalar or vector parts, as GLSL constructors do.
|
|
75
|
+
* @experimental
|
|
76
|
+
*/
|
|
77
|
+
export declare function join(...parts: NodeInput3D[]): Nova3DShaderNode;
|
|
78
|
+
/** @experimental */
|
|
79
|
+
export declare function uniform(value: number | readonly number[]): Nova3DUniformNode;
|
|
80
|
+
/**
|
|
81
|
+
* Samples a 2D texture at `coordinates` (default the first UV set).
|
|
82
|
+
* @experimental
|
|
83
|
+
*/
|
|
84
|
+
export declare function texture(source: Nova3DTexture, coordinates?: NodeInput3D, level?: NodeInput3D): Nova3DTextureNode;
|
|
85
|
+
/** @experimental */
|
|
86
|
+
export declare function uv(set?: 0 | 1): Nova3DShaderNode;
|
|
87
|
+
/**
|
|
88
|
+
* Object-space position (after morphs and the position offset in the fragment stage).
|
|
89
|
+
* @experimental
|
|
90
|
+
*/
|
|
91
|
+
export declare function positionLocal(): Nova3DShaderNode;
|
|
92
|
+
/**
|
|
93
|
+
* Object-space normal; vertex stage only.
|
|
94
|
+
* @experimental
|
|
95
|
+
*/
|
|
96
|
+
export declare function normalLocal(): Nova3DShaderNode;
|
|
97
|
+
/** @experimental */
|
|
98
|
+
export declare function positionWorld(): Nova3DShaderNode;
|
|
99
|
+
/**
|
|
100
|
+
* The interpolated world normal facing the viewer, before normal maps.
|
|
101
|
+
* @experimental
|
|
102
|
+
*/
|
|
103
|
+
export declare function normalWorld(): Nova3DShaderNode;
|
|
104
|
+
/**
|
|
105
|
+
* Unit vector from the surface toward the camera.
|
|
106
|
+
* @experimental
|
|
107
|
+
*/
|
|
108
|
+
export declare function viewDirection(): Nova3DShaderNode;
|
|
109
|
+
/** @experimental */
|
|
110
|
+
export declare function cameraPosition(): Nova3DShaderNode;
|
|
111
|
+
/**
|
|
112
|
+
* Geometry vertex colour, white when the geometry has none.
|
|
113
|
+
* @experimental
|
|
114
|
+
*/
|
|
115
|
+
export declare function vertexColor(): Nova3DShaderNode;
|
|
116
|
+
/**
|
|
117
|
+
* Window coordinates in device pixels.
|
|
118
|
+
* @experimental
|
|
119
|
+
*/
|
|
120
|
+
export declare function fragmentCoordinate(): Nova3DShaderNode;
|
|
121
|
+
/** @experimental */
|
|
122
|
+
export declare function min(a: NodeInput3D, b: NodeInput3D): Nova3DShaderNode;
|
|
123
|
+
/** @experimental */
|
|
124
|
+
export declare function max(a: NodeInput3D, b: NodeInput3D): Nova3DShaderNode;
|
|
125
|
+
/** @experimental */
|
|
126
|
+
export declare function mod(a: NodeInput3D, b: NodeInput3D): Nova3DShaderNode;
|
|
127
|
+
/** @experimental */
|
|
128
|
+
export declare function step(edge: NodeInput3D, value: NodeInput3D): Nova3DShaderNode;
|
|
129
|
+
/** @experimental */
|
|
130
|
+
export declare function smoothstep(low: NodeInput3D, high: NodeInput3D, value: NodeInput3D): Nova3DShaderNode;
|
|
131
|
+
/** @experimental */
|
|
132
|
+
export declare function saturate(value: NodeInput3D): Nova3DShaderNode;
|
|
133
|
+
/** @experimental */
|
|
134
|
+
export declare function abs(value: NodeInput3D): Nova3DShaderNode;
|
|
135
|
+
/** @experimental */
|
|
136
|
+
export declare function sign(value: NodeInput3D): Nova3DShaderNode;
|
|
137
|
+
/** @experimental */
|
|
138
|
+
export declare function floor(value: NodeInput3D): Nova3DShaderNode;
|
|
139
|
+
/** @experimental */
|
|
140
|
+
export declare function ceil(value: NodeInput3D): Nova3DShaderNode;
|
|
141
|
+
/** @experimental */
|
|
142
|
+
export declare function sqrt(value: NodeInput3D): Nova3DShaderNode;
|
|
143
|
+
/** @experimental */
|
|
144
|
+
export declare function exp(value: NodeInput3D): Nova3DShaderNode;
|
|
145
|
+
/** @experimental */
|
|
146
|
+
export declare function log(value: NodeInput3D): Nova3DShaderNode;
|
|
147
|
+
/** @experimental */
|
|
148
|
+
export declare function sin(value: NodeInput3D): Nova3DShaderNode;
|
|
149
|
+
/** @experimental */
|
|
150
|
+
export declare function cos(value: NodeInput3D): Nova3DShaderNode;
|
|
151
|
+
/** @experimental */
|
|
152
|
+
export declare function negate(value: NodeInput3D): Nova3DShaderNode;
|
|
153
|
+
/** @experimental */
|
|
154
|
+
export declare function distance(a: NodeInput3D, b: NodeInput3D): Nova3DShaderNode;
|
|
155
|
+
/** @experimental */
|
|
156
|
+
export declare function cross(a: NodeInput3D, b: NodeInput3D): Nova3DShaderNode;
|
|
157
|
+
/** @experimental */
|
|
158
|
+
export declare function reflect(incident: NodeInput3D, normal: NodeInput3D): Nova3DShaderNode;
|
|
159
|
+
/**
|
|
160
|
+
* Maps `value` from [inLow, inHigh] to [outLow, outHigh].
|
|
161
|
+
* @experimental
|
|
162
|
+
*/
|
|
163
|
+
export declare function remap(value: NodeInput3D, inLow: NodeInput3D, inHigh: NodeInput3D, outLow?: NodeInput3D, outHigh?: NodeInput3D): Nova3DShaderNode;
|
|
164
|
+
/**
|
|
165
|
+
* Schlick-style rim term (1 − N·V)^power. Fragment stage.
|
|
166
|
+
* @experimental
|
|
167
|
+
*/
|
|
168
|
+
export declare function fresnel(power?: NodeInput3D, normal?: NodeInput3D): Nova3DShaderNode;
|
|
169
|
+
/**
|
|
170
|
+
* 0/1 checkerboard of `uv` with `cells` squares per unit.
|
|
171
|
+
* @experimental
|
|
172
|
+
*/
|
|
173
|
+
export declare function checker(coordinates?: NodeInput3D, cells?: NodeInput3D): Nova3DShaderNode;
|
|
174
|
+
/**
|
|
175
|
+
* Smooth 3D gradient noise in [−1, 1].
|
|
176
|
+
* @experimental
|
|
177
|
+
*/
|
|
178
|
+
export declare function noise(position: NodeInput3D): Nova3DShaderNode;
|
|
179
|
+
/**
|
|
180
|
+
* Sums `octaves` (1–8) of noise with halving amplitude, roughly in [−1, 1].
|
|
181
|
+
* @experimental
|
|
182
|
+
*/
|
|
183
|
+
export declare function fractalNoise(position: NodeInput3D, octaves?: number): Nova3DShaderNode;
|
|
184
|
+
/**
|
|
185
|
+
* Applies a tangent-space normal (for example `texture(map).rgb.mul(2).sub(1)`) to the
|
|
186
|
+
* surface with a derivative-based frame, as the material normal map does. Fragment stage.
|
|
187
|
+
* @experimental
|
|
188
|
+
*/
|
|
189
|
+
export declare function perturbNormal(tangentNormal: NodeInput3D, coordinates?: NodeInput3D): Nova3DShaderNode;
|
|
190
|
+
/**
|
|
191
|
+
* Projects a texture along the world axes, blended by the normal (no UVs needed). Fragment stage.
|
|
192
|
+
* @experimental
|
|
193
|
+
*/
|
|
194
|
+
export declare function triplanar(source: Nova3DTexture, scale?: NodeInput3D, sharpness?: NodeInput3D): Nova3DShaderNode;
|
|
195
|
+
/**
|
|
196
|
+
* Material outputs a node graph may replace.
|
|
197
|
+
* @experimental
|
|
198
|
+
*/
|
|
199
|
+
export interface NodeSurface3D {
|
|
200
|
+
/** Linear RGB replacing base colour × map × vertex/instance colour. */
|
|
201
|
+
baseColor?: NodeInput3D;
|
|
202
|
+
/** Replaces base alpha (opacity still multiplies). */
|
|
203
|
+
opacity?: NodeInput3D;
|
|
204
|
+
metallic?: NodeInput3D;
|
|
205
|
+
roughness?: NodeInput3D;
|
|
206
|
+
/** World-space shading normal (see perturbNormal). */
|
|
207
|
+
normal?: NodeInput3D;
|
|
208
|
+
/** Linear emitted radiance, replacing emissive factor × map. */
|
|
209
|
+
emissive?: NodeInput3D;
|
|
210
|
+
/** Multiplies ambient, environment and light-map occlusion. */
|
|
211
|
+
occlusion?: NodeInput3D;
|
|
212
|
+
/** Object-space vertex displacement (colour pass only: shadows and picking use the undisplaced mesh). */
|
|
213
|
+
positionOffset?: NodeInput3D;
|
|
214
|
+
/** Outputs base colour + emission without lighting. */
|
|
215
|
+
unlit?: boolean;
|
|
216
|
+
}
|
|
217
|
+
/** WGSL snippets of a compiled node surface for the WebGPU lit shader. @internal */
|
|
218
|
+
export interface CompiledNodeWGSL3D {
|
|
219
|
+
/** Module-scope helper functions (one WGSL module holds both stages). */
|
|
220
|
+
readonly helpers: string;
|
|
221
|
+
readonly vertexBody: string;
|
|
222
|
+
readonly fragmentBody: string;
|
|
223
|
+
/** Node inputs the snippets read: uv0, uv1, positionLocal (fragment), vertexColor. */
|
|
224
|
+
readonly inputs: readonly string[];
|
|
225
|
+
}
|
|
226
|
+
/** A compiled, interned node surface. @internal */
|
|
227
|
+
export interface CompiledNodeSurface3D {
|
|
228
|
+
readonly id: number;
|
|
229
|
+
readonly defines: readonly string[];
|
|
230
|
+
readonly vertexDeclarations: string;
|
|
231
|
+
readonly vertexBody: string;
|
|
232
|
+
readonly fragmentDeclarations: string;
|
|
233
|
+
readonly fragmentBody: string;
|
|
234
|
+
readonly uniforms: readonly Nova3DUniformNode[];
|
|
235
|
+
readonly textures: readonly Nova3DTexture[];
|
|
236
|
+
/** The same graph in WGSL; equal GLSL implies equal WGSL, so `id` keys both. */
|
|
237
|
+
readonly wgsl: CompiledNodeWGSL3D;
|
|
238
|
+
}
|
|
239
|
+
/** Compiles a node surface to GLSL and WGSL snippets for the PBR programs and interns it. @internal */
|
|
240
|
+
export declare function compileNodeSurface3D(surface: NodeSurface3D | CompiledNodeSurface3D): CompiledNodeSurface3D;
|