@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,74 @@
|
|
|
1
|
+
import { Nova3DGeometry } from '../model/Geometry.js';
|
|
2
|
+
import { Nova3DMaterial } from '../model/Material.js';
|
|
3
|
+
import { Hit3D } from '../model/Mesh.js';
|
|
4
|
+
import { Nova3DNode } from '../model/Node.js';
|
|
5
|
+
import { Nova3DScene } from '../model/Scene.js';
|
|
6
|
+
import { Color3D, NodeOptions3D, TransformPatch3D } from '../types.js';
|
|
7
|
+
/** @experimental */
|
|
8
|
+
export type BatchedMeshOptions3D = NodeOptions3D & {
|
|
9
|
+
material: Nova3DMaterial;
|
|
10
|
+
/** Per-instance colours (`setColor`). Default false. */
|
|
11
|
+
colors?: boolean;
|
|
12
|
+
renderOrder?: number;
|
|
13
|
+
layers?: number;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Many objects of different geometries sharing one material (three.js
|
|
17
|
+
* BatchedMesh, Babylon thin instances across meshes): one instanced draw per
|
|
18
|
+
* geometry instead of one per object, with per-instance transforms, colours,
|
|
19
|
+
* visibility and deletion. Hidden instances move past the drawn prefix, so they
|
|
20
|
+
* cost nothing; ids stay stable. Picking reports the internal instanced mesh —
|
|
21
|
+
* `instanceOf(hit)` maps it back.
|
|
22
|
+
* @experimental
|
|
23
|
+
*/
|
|
24
|
+
export declare class Nova3DBatchedMesh {
|
|
25
|
+
protected constructor();
|
|
26
|
+
private readonly _options;
|
|
27
|
+
/** Group holding one instanced mesh per geometry. */
|
|
28
|
+
readonly node: Nova3DNode;
|
|
29
|
+
private readonly _batches;
|
|
30
|
+
/** Geometry id and slot per instance id; −1 geometry marks a free id. */
|
|
31
|
+
private _geometryOf;
|
|
32
|
+
private _slotOf;
|
|
33
|
+
private readonly _free;
|
|
34
|
+
private _nextId;
|
|
35
|
+
private _count;
|
|
36
|
+
private _destroyed;
|
|
37
|
+
/** True after `destroy()` or once its node, scene or app is destroyed. */
|
|
38
|
+
get destroyed(): boolean;
|
|
39
|
+
/** Live instances, visible or not. */
|
|
40
|
+
get count(): number;
|
|
41
|
+
/** Instances all geometries can hold: the sum of their `addGeometry` capacities. */
|
|
42
|
+
get capacity(): number;
|
|
43
|
+
/** Adds a geometry with room for `capacity` instances and returns its id. */
|
|
44
|
+
addGeometry(geometry: Nova3DGeometry, capacity: number): number;
|
|
45
|
+
/** Adds a visible instance of a geometry and returns its stable id. */
|
|
46
|
+
addInstance(geometryId: number, transform?: TransformPatch3D): number;
|
|
47
|
+
setTransform(id: number, transform: TransformPatch3D): void;
|
|
48
|
+
/** Sets the sRGB colour of an instance; needs `colors: true`. */
|
|
49
|
+
setColor(id: number, color: Color3D): void;
|
|
50
|
+
/** Whether an instance is drawn. */
|
|
51
|
+
getVisible(id: number): boolean;
|
|
52
|
+
setVisible(id: number, visible: boolean): void;
|
|
53
|
+
/** Removes an instance; its id may be reused by a later `addInstance`. */
|
|
54
|
+
deleteInstance(id: number): void;
|
|
55
|
+
/** Removes a geometry with all its instances. */
|
|
56
|
+
deleteGeometry(geometryId: number): void;
|
|
57
|
+
/** Instance id of a pick hit on this batch, or null. */
|
|
58
|
+
instanceOf(hit: Hit3D | null): number | null;
|
|
59
|
+
destroy(): void;
|
|
60
|
+
private _show;
|
|
61
|
+
private _hide;
|
|
62
|
+
/** Swaps two slots of a batch and their ids. */
|
|
63
|
+
private _move;
|
|
64
|
+
private _grow;
|
|
65
|
+
private _batch;
|
|
66
|
+
private _instance;
|
|
67
|
+
private _assertAlive;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Creates a batched mesh in `scene` drawing many objects of one material. Owned
|
|
71
|
+
* by the scene's app: destroyed with the scene or the app.
|
|
72
|
+
* @experimental
|
|
73
|
+
*/
|
|
74
|
+
export declare function createBatchedMesh(scene: Nova3DScene, options: BatchedMeshOptions3D): Nova3DBatchedMesh;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Hit3D, Nova3DMesh } from '../model/Mesh.js';
|
|
2
|
+
import { Nova3DTexture, TextureSamplerOptions3D } from '../model/Texture.js';
|
|
3
|
+
import { Nova3DApp } from '../Nova3DApp.js';
|
|
4
|
+
import { ScreenPoint3D } from '../types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Pointer event types forwarded to a surface; `pointerleave` fires when the hover leaves it.
|
|
7
|
+
* @experimental
|
|
8
|
+
*/
|
|
9
|
+
export type SurfacePointerType3D = 'pointerdown' | 'pointermove' | 'pointerup' | 'pointercancel' | 'wheel' | 'pointerleave';
|
|
10
|
+
/**
|
|
11
|
+
* A pointer event mapped onto the surface canvas.
|
|
12
|
+
* @experimental
|
|
13
|
+
*/
|
|
14
|
+
export interface SurfacePointer3D {
|
|
15
|
+
readonly type: SurfacePointerType3D;
|
|
16
|
+
/** Canvas pixels from the top-left of the source canvas. */
|
|
17
|
+
readonly x: number;
|
|
18
|
+
readonly y: number;
|
|
19
|
+
/** The 3D hit; null for `pointerleave` and for captured events off the surface. */
|
|
20
|
+
readonly hit: Hit3D | null;
|
|
21
|
+
readonly originalEvent: Event;
|
|
22
|
+
}
|
|
23
|
+
/** @experimental */
|
|
24
|
+
export interface CanvasSurfaceOptions3D {
|
|
25
|
+
/** Canvas the 2D interface draws into: a 2D context, a Nova 2D app, or any other drawer. */
|
|
26
|
+
canvas: HTMLCanvasElement | OffscreenCanvas;
|
|
27
|
+
/** Meshes showing the surface; more can be attached later. */
|
|
28
|
+
nodes?: readonly Nova3DMesh[];
|
|
29
|
+
/** Re-uploads the canvas on every update of a running loop (animated UI). Default false: call `invalidate()` after drawing. */
|
|
30
|
+
live?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Re-dispatches mapped PointerEvents and WheelEvents onto this element (for example
|
|
33
|
+
* the in-DOM canvas of a 2D UI app), with client coordinates over its bounding box.
|
|
34
|
+
*/
|
|
35
|
+
dispatchTo?: Element;
|
|
36
|
+
/** Sampler options of the surface texture; colour space defaults to sRGB. */
|
|
37
|
+
sampler?: TextureSamplerOptions3D;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A 2D interface on 3D meshes (Babylon GUI `AdvancedDynamicTexture.CreateForMesh`,
|
|
41
|
+
* three.js `HTMLMesh` with `InteractiveGroup`, PlayCanvas world-space screens): the
|
|
42
|
+
* canvas becomes an upright texture (`flipY`) and pointer input on the app canvas is
|
|
43
|
+
* raycast, mapped through the hit UV to canvas pixels and forwarded. Occluders in
|
|
44
|
+
* front of the surface block input. A pointer pressed on the surface stays captured
|
|
45
|
+
* until release, so the 2D interface always sees the matching `pointerup`. Texture
|
|
46
|
+
* transforms on the material are not applied to the mapping.
|
|
47
|
+
* @experimental
|
|
48
|
+
*/
|
|
49
|
+
export declare class Nova3DCanvasSurface {
|
|
50
|
+
protected constructor();
|
|
51
|
+
private readonly _app;
|
|
52
|
+
private readonly _options;
|
|
53
|
+
readonly texture: Nova3DTexture;
|
|
54
|
+
private readonly _nodes;
|
|
55
|
+
private readonly _pointerListeners;
|
|
56
|
+
private readonly _cleanup;
|
|
57
|
+
/** Last canvas point per captured pointer id. */
|
|
58
|
+
private readonly _captured;
|
|
59
|
+
private _hovering;
|
|
60
|
+
private _destroyed;
|
|
61
|
+
get destroyed(): boolean;
|
|
62
|
+
/** Pointer events mapped to canvas pixels. Returns the unsubscribe function. */
|
|
63
|
+
onPointer(listener: (event: SurfacePointer3D) => void): () => void;
|
|
64
|
+
/** Forwards input that hits `node` to this surface. */
|
|
65
|
+
attach(node: Nova3DMesh): void;
|
|
66
|
+
detach(node: Nova3DMesh): void;
|
|
67
|
+
/** Uploads the canvas again before the next frame; repeated calls coalesce. */
|
|
68
|
+
invalidate(): void;
|
|
69
|
+
/** Canvas pixel under a hit on an attached mesh, or null. */
|
|
70
|
+
toCanvas(hit: Hit3D | null): ScreenPoint3D | null;
|
|
71
|
+
destroy(): void;
|
|
72
|
+
private _forward;
|
|
73
|
+
private _emit;
|
|
74
|
+
private _assertAlive;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Creates a 2D canvas surface on 3D meshes of `app`: a texture plus pointer input
|
|
78
|
+
* mapped onto the canvas. Owned by the app: destroyed with it.
|
|
79
|
+
* @experimental
|
|
80
|
+
*/
|
|
81
|
+
export declare function createCanvasSurface(app: Nova3DApp, options: CanvasSurfaceOptions3D): Nova3DCanvasSurface;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Color3D } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Normalized sRGB RGBA of a `Color3D`; `undefined` gives `fallback` (default white).
|
|
4
|
+
* An [r, g, b] triple is opaque.
|
|
5
|
+
*/
|
|
6
|
+
export declare function parseColor3D(input: Color3D | undefined, fallback?: readonly [number, number, number, number]): [number, number, number, number];
|
|
7
|
+
/** sRGB RGB of a `Color3D` whose alpha has no meaning (lights, fog, tints); alpha is ignored. */
|
|
8
|
+
export declare function parseOpaqueColor3D(input: Color3D | undefined, fallback?: readonly [number, number, number]): [number, number, number];
|
|
9
|
+
export declare function linearChannel3D(value: number): number;
|
|
10
|
+
/** Linear RGB of an sRGB colour, converted once when the value is set. */
|
|
11
|
+
export declare function linearColor3D(color: readonly number[]): [number, number, number];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GeometryOptions3D, TransformPatch3D } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* One part of a merge: geometry data and an optional transform baked into it.
|
|
4
|
+
* @experimental
|
|
5
|
+
*/
|
|
6
|
+
export interface MergePart3D {
|
|
7
|
+
geometry: GeometryOptions3D;
|
|
8
|
+
/** Position, rotation/quaternion and scale applied to the part. */
|
|
9
|
+
transform?: TransformPatch3D;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Merges geometry data into one geometry for static batching (three.js
|
|
13
|
+
* BufferGeometryUtils.mergeGeometries with baked transforms, Babylon
|
|
14
|
+
* Mesh.MergeMeshes): one draw instead of one per part. Topologies must match;
|
|
15
|
+
* an attribute present in some parts is filled (zero normals and UVs, white
|
|
16
|
+
* colours) in the others, except tangents, kept only when every part has them;
|
|
17
|
+
* coloured parts must share one colorSpace; indices are
|
|
18
|
+
* generated for unindexed parts and become 32-bit when the merged vertex count
|
|
19
|
+
* exceeds 65535.
|
|
20
|
+
* @experimental
|
|
21
|
+
*/
|
|
22
|
+
export declare function mergeGeometries(parts: readonly MergePart3D[]): GeometryOptions3D;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Key set of an options type: TypeScript checks that `keys` lists every key of `T`
|
|
3
|
+
* and nothing else, so the set stays exhaustive when the type grows.
|
|
4
|
+
*/
|
|
5
|
+
export declare function optionKeys3D<T>(keys: {
|
|
6
|
+
readonly [K in keyof Required<T>]: true;
|
|
7
|
+
}): ReadonlySet<string>;
|
|
8
|
+
/**
|
|
9
|
+
* Rejects anything but a plain options object and every own key outside `keys`,
|
|
10
|
+
* naming the first unknown key. Runs when an object is created or patched, never per
|
|
11
|
+
* frame. `label` names the option set in the message ("pbr material", "light shadow").
|
|
12
|
+
*/
|
|
13
|
+
export declare function checkOptionKeys3D(value: unknown, keys: ReadonlySet<string>, label: string): void;
|
|
14
|
+
/** `checkOptionKeys3D` for an optional options argument: undefined passes. */
|
|
15
|
+
export declare function checkOptionalKeys3D(value: unknown, keys: ReadonlySet<string>, label: string): void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { GeometryOptions3D } from '../types.js';
|
|
2
|
+
/** @experimental */
|
|
3
|
+
export interface PolyhedronGeometryOptions3D {
|
|
4
|
+
/** Circumscribed sphere radius. Default 1. */
|
|
5
|
+
radius?: number;
|
|
6
|
+
/** Splits every base edge into `detail + 1` parts and projects new points onto the sphere, 0…128. Default 0. */
|
|
7
|
+
detail?: number;
|
|
8
|
+
/** `flat` (default) gives every triangle its face normal; `smooth` uses the sphere normal. */
|
|
9
|
+
shading?: 'flat' | 'smooth';
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Tetrahedron inscribed in a sphere of `radius`; `detail` subdivides the faces and projects them onto the sphere.
|
|
13
|
+
* @experimental
|
|
14
|
+
*/
|
|
15
|
+
export declare function tetrahedronGeometry(options?: PolyhedronGeometryOptions3D): GeometryOptions3D;
|
|
16
|
+
/**
|
|
17
|
+
* Octahedron inscribed in a sphere of `radius`; `detail` subdivides the faces and projects them onto the sphere.
|
|
18
|
+
* @experimental
|
|
19
|
+
*/
|
|
20
|
+
export declare function octahedronGeometry(options?: PolyhedronGeometryOptions3D): GeometryOptions3D;
|
|
21
|
+
/**
|
|
22
|
+
* Icosahedron inscribed in a sphere of `radius`; `detail` subdivides the faces and projects them onto the sphere.
|
|
23
|
+
* @experimental
|
|
24
|
+
*/
|
|
25
|
+
export declare function icosahedronGeometry(options?: PolyhedronGeometryOptions3D): GeometryOptions3D;
|
|
26
|
+
/**
|
|
27
|
+
* Dodecahedron inscribed in a sphere of `radius`; `detail` subdivides the faces and projects them onto the sphere.
|
|
28
|
+
* @experimental
|
|
29
|
+
*/
|
|
30
|
+
export declare function dodecahedronGeometry(options?: PolyhedronGeometryOptions3D): GeometryOptions3D;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { GeometryOptions3D } from '../types.js';
|
|
2
|
+
/** Upper bound for any segment count of a procedural primitive. */
|
|
3
|
+
export declare const MAX_PRIMITIVE_SEGMENTS = 4096;
|
|
4
|
+
export declare const TAU: number;
|
|
5
|
+
/** Tolerance for angles that should be treated as a full turn or a pole. */
|
|
6
|
+
export declare const ANGLE_EPSILON = 1e-9;
|
|
7
|
+
/**
|
|
8
|
+
* Typed arrays of one primitive, sized up front and filled by cursor.
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export interface PrimitiveWriter3D {
|
|
12
|
+
readonly positions: Float32Array;
|
|
13
|
+
readonly normals: Float32Array;
|
|
14
|
+
readonly uvs: Float32Array;
|
|
15
|
+
readonly indices: Uint16Array | Uint32Array;
|
|
16
|
+
vertex: number;
|
|
17
|
+
index: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Allocates exactly sized primitive arrays and picks the narrowest safe index type.
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare function createPrimitiveWriter(vertexCount: number, indexCount: number): PrimitiveWriter3D;
|
|
24
|
+
/** @internal */
|
|
25
|
+
export declare function finishPrimitive(writer: PrimitiveWriter3D): GeometryOptions3D;
|
|
26
|
+
/** @internal */
|
|
27
|
+
export declare function positiveOption(value: unknown, fallback: number, name: string): number;
|
|
28
|
+
/** @internal */
|
|
29
|
+
export declare function nonNegativeOption(value: unknown, fallback: number, name: string): number;
|
|
30
|
+
/** @internal */
|
|
31
|
+
export declare function angleOption(value: unknown, fallback: number, name: string): number;
|
|
32
|
+
/**
|
|
33
|
+
* Validates an angular length in (0, max]; values within ANGLE_EPSILON above max are clamped.
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
export declare function arcOption(value: unknown, fallback: number, max: number, name: string, maxLabel?: string): number;
|
|
37
|
+
/** @internal */
|
|
38
|
+
export declare function segmentOption(value: unknown, fallback: number, min: number, max: number, name: string): number;
|
|
39
|
+
/** @internal */
|
|
40
|
+
export declare function booleanOption(value: unknown, fallback: boolean, name: string): boolean;
|
|
41
|
+
/** @internal */
|
|
42
|
+
export declare function optionsObject<T extends object>(value: T | undefined, name: string, keys: ReadonlySet<string>): Partial<T>;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { GeometryOptions3D, Vector3D } from '../types.js';
|
|
2
|
+
export { dodecahedronGeometry, icosahedronGeometry, octahedronGeometry, tetrahedronGeometry } from './Polyhedra.js';
|
|
3
|
+
export type { PolyhedronGeometryOptions3D } from './Polyhedra.js';
|
|
4
|
+
/**
|
|
5
|
+
* Options of `boxGeometry`.
|
|
6
|
+
* @experimental
|
|
7
|
+
*/
|
|
8
|
+
export interface BoxGeometryOptions3D {
|
|
9
|
+
/** Size along X, Y and Z. Default `[1, 1, 1]`. */
|
|
10
|
+
size?: Vector3D;
|
|
11
|
+
}
|
|
12
|
+
/** @experimental */
|
|
13
|
+
export interface PlaneGeometryOptions3D {
|
|
14
|
+
/** Width along X and height along Y. Default `[1, 1]`. */
|
|
15
|
+
size?: readonly [number, number];
|
|
16
|
+
/** Grid cells along X and Y, integers 1…4096. Default `[1, 1]`. */
|
|
17
|
+
segments?: readonly [number, number];
|
|
18
|
+
}
|
|
19
|
+
/** @experimental */
|
|
20
|
+
export interface SphereGeometryOptions3D {
|
|
21
|
+
/** Default 1. */
|
|
22
|
+
radius?: number;
|
|
23
|
+
/** Columns around +Y, 3…4096. Default 32. */
|
|
24
|
+
widthSegments?: number;
|
|
25
|
+
/** Rows from the north pole, 2…4096. Default 16. */
|
|
26
|
+
heightSegments?: number;
|
|
27
|
+
/** Start longitude, radians; 0 is −X, increasing counter-clockwise around +Y. Default 0. */
|
|
28
|
+
phiStart?: number;
|
|
29
|
+
/** Longitude span in radians, (0, 2π]. Default 2π. */
|
|
30
|
+
phiLength?: number;
|
|
31
|
+
/** Start latitude from +Y in radians, [0, π). Default 0. */
|
|
32
|
+
thetaStart?: number;
|
|
33
|
+
/** Latitude span in radians, (0, π − thetaStart]. Default π − thetaStart. */
|
|
34
|
+
thetaLength?: number;
|
|
35
|
+
}
|
|
36
|
+
/** @experimental */
|
|
37
|
+
export interface CylinderGeometryOptions3D {
|
|
38
|
+
/** Radius at +Y, ≥ 0. Default 1. */
|
|
39
|
+
radiusTop?: number;
|
|
40
|
+
/** Radius at −Y, ≥ 0. Default 1. At least one radius must be positive. */
|
|
41
|
+
radiusBottom?: number;
|
|
42
|
+
/** Default 1. */
|
|
43
|
+
height?: number;
|
|
44
|
+
/** Columns around +Y, 3…4096. Default 32. */
|
|
45
|
+
radialSegments?: number;
|
|
46
|
+
/** Rows along Y, 1…4096. Default 1. */
|
|
47
|
+
heightSegments?: number;
|
|
48
|
+
/** Skips both caps. Default false. */
|
|
49
|
+
openEnded?: boolean;
|
|
50
|
+
/** Start angle, radians; 0 is +Z, increasing toward +X. Default 0. */
|
|
51
|
+
thetaStart?: number;
|
|
52
|
+
/** Angular span in radians, (0, 2π]. Default 2π. */
|
|
53
|
+
thetaLength?: number;
|
|
54
|
+
}
|
|
55
|
+
/** @experimental */
|
|
56
|
+
export interface ConeGeometryOptions3D {
|
|
57
|
+
/** Base radius. Default 1. */
|
|
58
|
+
radius?: number;
|
|
59
|
+
height?: number;
|
|
60
|
+
radialSegments?: number;
|
|
61
|
+
heightSegments?: number;
|
|
62
|
+
openEnded?: boolean;
|
|
63
|
+
thetaStart?: number;
|
|
64
|
+
thetaLength?: number;
|
|
65
|
+
}
|
|
66
|
+
/** @experimental */
|
|
67
|
+
export interface TorusGeometryOptions3D {
|
|
68
|
+
/** Distance from the torus center to the tube center. Default 1. */
|
|
69
|
+
radius?: number;
|
|
70
|
+
/** Tube radius. Default 0.4. */
|
|
71
|
+
tube?: number;
|
|
72
|
+
/** Segments around the tube, 3…4096. Default 12. */
|
|
73
|
+
radialSegments?: number;
|
|
74
|
+
/** Segments along the ring, 3…4096. Default 48. */
|
|
75
|
+
tubularSegments?: number;
|
|
76
|
+
/** Ring span in radians, (0, 2π]. Default 2π. */
|
|
77
|
+
arc?: number;
|
|
78
|
+
}
|
|
79
|
+
/** @experimental */
|
|
80
|
+
export interface CapsuleGeometryOptions3D {
|
|
81
|
+
/** Cap and body radius. Default 1. */
|
|
82
|
+
radius?: number;
|
|
83
|
+
/** Length of the cylindrical body, ≥ 0; total height is `length + 2 * radius`. Default 1. */
|
|
84
|
+
length?: number;
|
|
85
|
+
/** Rows per hemispherical cap, 1…4096. Default 4. */
|
|
86
|
+
capSegments?: number;
|
|
87
|
+
/** Columns around +Y, 3…4096. Default 8. */
|
|
88
|
+
radialSegments?: number;
|
|
89
|
+
/** Rows along the body, 1…4096. Default 1. */
|
|
90
|
+
heightSegments?: number;
|
|
91
|
+
}
|
|
92
|
+
/** @experimental */
|
|
93
|
+
export interface CircleGeometryOptions3D {
|
|
94
|
+
/** Default 1. */
|
|
95
|
+
radius?: number;
|
|
96
|
+
/** 3…4096. Default 32. */
|
|
97
|
+
segments?: number;
|
|
98
|
+
/** Start angle in radians from +X toward +Y. Default 0. */
|
|
99
|
+
thetaStart?: number;
|
|
100
|
+
/** Angular span in radians, (0, 2π]. Default 2π. */
|
|
101
|
+
thetaLength?: number;
|
|
102
|
+
}
|
|
103
|
+
/** @experimental */
|
|
104
|
+
export interface RingGeometryOptions3D {
|
|
105
|
+
/** ≥ 0. Default 0.5. */
|
|
106
|
+
innerRadius?: number;
|
|
107
|
+
/** Greater than innerRadius. Default 1. */
|
|
108
|
+
outerRadius?: number;
|
|
109
|
+
/** Segments around, 3…4096. Default 32. */
|
|
110
|
+
thetaSegments?: number;
|
|
111
|
+
/** Segments from inner to outer radius, 1…4096. Default 1. */
|
|
112
|
+
phiSegments?: number;
|
|
113
|
+
thetaStart?: number;
|
|
114
|
+
thetaLength?: number;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Indexed box with separate face normals and UVs.
|
|
118
|
+
* @experimental
|
|
119
|
+
*/
|
|
120
|
+
export declare function boxGeometry(options?: BoxGeometryOptions3D): GeometryOptions3D;
|
|
121
|
+
/**
|
|
122
|
+
* Plane facing local +Z; `segments` divides it into a grid.
|
|
123
|
+
* @experimental
|
|
124
|
+
*/
|
|
125
|
+
export declare function planeGeometry(options?: PlaneGeometryOptions3D): GeometryOptions3D;
|
|
126
|
+
/**
|
|
127
|
+
* UV sphere (as three.js SphereGeometry): smooth normals, a duplicated longitude seam and
|
|
128
|
+
* no degenerate triangles at the poles.
|
|
129
|
+
* @experimental
|
|
130
|
+
*/
|
|
131
|
+
export declare function sphereGeometry(options?: SphereGeometryOptions3D): GeometryOptions3D;
|
|
132
|
+
/**
|
|
133
|
+
* Cylinder or truncated cone along +Y centred at the origin (as three.js CylinderGeometry):
|
|
134
|
+
* smooth sides and flat caps with their own vertices.
|
|
135
|
+
* @experimental
|
|
136
|
+
*/
|
|
137
|
+
export declare function cylinderGeometry(options?: CylinderGeometryOptions3D): GeometryOptions3D;
|
|
138
|
+
/**
|
|
139
|
+
* Cone: a cylinder with a zero top radius; the apex makes no degenerate triangles.
|
|
140
|
+
* @experimental
|
|
141
|
+
*/
|
|
142
|
+
export declare function coneGeometry(options?: ConeGeometryOptions3D): GeometryOptions3D;
|
|
143
|
+
/**
|
|
144
|
+
* Capsule along +Y: a cylinder of `length` with hemispheres of `radius` at the ends
|
|
145
|
+
* (as three.js CapsuleGeometry); V follows the arc length of the profile.
|
|
146
|
+
* @experimental
|
|
147
|
+
*/
|
|
148
|
+
export declare function capsuleGeometry(options?: CapsuleGeometryOptions3D): GeometryOptions3D;
|
|
149
|
+
/**
|
|
150
|
+
* Torus in the XY plane around +Z (as three.js TorusGeometry); both seams are duplicated.
|
|
151
|
+
* @experimental
|
|
152
|
+
*/
|
|
153
|
+
export declare function torusGeometry(options?: TorusGeometryOptions3D): GeometryOptions3D;
|
|
154
|
+
/**
|
|
155
|
+
* Disc (or sector) in the XY plane facing +Z, as three.js CircleGeometry.
|
|
156
|
+
* @experimental
|
|
157
|
+
*/
|
|
158
|
+
export declare function circleGeometry(options?: CircleGeometryOptions3D): GeometryOptions3D;
|
|
159
|
+
/**
|
|
160
|
+
* Ring in the XY plane facing +Z, as three.js RingGeometry;
|
|
161
|
+
* with `innerRadius: 0` the centre makes no degenerate triangles.
|
|
162
|
+
* @experimental
|
|
163
|
+
*/
|
|
164
|
+
export declare function ringGeometry(options?: RingGeometryOptions3D): GeometryOptions3D;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options of every `whenReady`.
|
|
3
|
+
* @experimental
|
|
4
|
+
*/
|
|
5
|
+
export interface ReadyOptions3D {
|
|
6
|
+
/** Stops waiting (the object keeps loading): the promise rejects with the signal's reason. */
|
|
7
|
+
signal?: AbortSignal;
|
|
8
|
+
}
|
|
9
|
+
/** Checks `whenReady` options; undefined passes. */
|
|
10
|
+
export declare function readyOptions3D(options: ReadyOptions3D | undefined, label: string): ReadyOptions3D;
|
|
11
|
+
/** `promise`, or a rejection with the signal's reason once `signal` aborts first. */
|
|
12
|
+
export declare function waitFor3D<T>(promise: Promise<T>, signal?: AbortSignal): Promise<T>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { mat3 as Matrix3, mat4 as Matrix4, vec3 as Vector3 } from 'gl-matrix';
|
|
2
|
+
import { Bounds3D, Quaternion3D, Ray3D, Transform3D, TransformPatch3D, Vector3D } from '../types.js';
|
|
3
|
+
export declare function finite(value: number, name: string): number;
|
|
4
|
+
export declare function vector(value: readonly number[], size: number, name: string): number[];
|
|
5
|
+
/**
|
|
6
|
+
* Rejects keys outside `TransformPatch3D` without allocating, so per-frame transform
|
|
7
|
+
* writes stay cheap.
|
|
8
|
+
*/
|
|
9
|
+
export declare function checkTransformPatch3D(patch: TransformPatch3D): void;
|
|
10
|
+
export declare function identityTransform(): Transform3D;
|
|
11
|
+
/**
|
|
12
|
+
* Quaternion of Euler angles in radians applied in intrinsic XYZ order (three.js
|
|
13
|
+
* 'XYZ'), independent of gl-matrix settings.
|
|
14
|
+
*/
|
|
15
|
+
export declare function eulerQuaternion(rotation: Vector3D): Quaternion3D;
|
|
16
|
+
export declare function patchTransform(previous: Transform3D, patch: TransformPatch3D): Transform3D;
|
|
17
|
+
export declare function transformMatrix(value: Transform3D): Matrix4;
|
|
18
|
+
/**
|
|
19
|
+
* Refuses a world-preserving reparent that would lose precision before the hierarchy changes.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Normal matrix for drawing: the inverse transpose of the upper 3×3 or, for a singular
|
|
23
|
+
* (zero-scale) transform, its cofactor matrix, which is proportional to the inverse
|
|
24
|
+
* transpose and keeps the plane normal of a flattened mesh; shaders normalise the result.
|
|
25
|
+
* A transform of rank ≤ 1 draws no area and gets the identity.
|
|
26
|
+
*/
|
|
27
|
+
export declare function drawNormalMatrix3D(out: Matrix3, world: ArrayLike<number>): Matrix3;
|
|
28
|
+
export declare function decomposeTransform(matrix: Matrix4): Transform3D;
|
|
29
|
+
export declare function transformBounds(bounds: Bounds3D, matrix: Matrix4, output?: {
|
|
30
|
+
min: [number, number, number];
|
|
31
|
+
max: [number, number, number];
|
|
32
|
+
}): Bounds3D;
|
|
33
|
+
export declare function normalizedRay(ray: Ray3D): Ray3D;
|
|
34
|
+
/**
|
|
35
|
+
* Intersects a ray with bounds, including parallel axes and a ray starting inside.
|
|
36
|
+
*/
|
|
37
|
+
export declare function intersectBounds(ray: Ray3D, bounds: Bounds3D): number | null;
|
|
38
|
+
/**
|
|
39
|
+
* Möller–Trumbore in local space without normalizing the direction.
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* UV0 at a local point inside triangle `start` (first index of its three
|
|
43
|
+
* corners) by barycentric interpolation; undefined without UVs.
|
|
44
|
+
*/
|
|
45
|
+
export declare function triangleUV3D(data: {
|
|
46
|
+
positions: Float32Array;
|
|
47
|
+
uvs?: Float32Array;
|
|
48
|
+
indices?: Uint16Array | Uint32Array;
|
|
49
|
+
}, start: number, origin: Vector3, direction: Vector3, t: number): [number, number] | undefined;
|
|
50
|
+
export declare function intersectTriangle(origin: Vector3, direction: Vector3, a: Vector3, b: Vector3, c: Vector3): number | null;
|
|
51
|
+
/**
|
|
52
|
+
* Bit-identical to `Math.hypot(x, y, z, w)` on every engine: the allocation-free version
|
|
53
|
+
* where the engine uses the same algorithm (V8), the builtin elsewhere (JavaScriptCore
|
|
54
|
+
* rounds differently).
|
|
55
|
+
* @internal
|
|
56
|
+
*/
|
|
57
|
+
export declare const hypot4: (x: number, y: number, z: number, w: number) => number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Projects an equirectangular radiance image (row 0 at the top, as Nova data
|
|
3
|
+
* textures and the environment sampler) onto 9 RGB spherical-harmonic
|
|
4
|
+
* coefficients in the three.js LightProbe order: L00, L1−1 (y), L10 (z), L11 (x),
|
|
5
|
+
* L2−2 (xy), L2−1 (yz), L20, L21 (xz), L22 (x² − y²). Weighted by solid angle;
|
|
6
|
+
* `stride` is 3 (RGB) or 4 (RGBA).
|
|
7
|
+
* @experimental
|
|
8
|
+
*/
|
|
9
|
+
export declare function sphericalHarmonicsFromEquirect(data: ArrayLike<number>, width: number, height: number, stride?: 3 | 4): Float32Array;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { mat3 as Mat3, ReadonlyMat3, ReadonlyMat4 } from 'gl-matrix';
|
|
2
|
+
export declare function create(): Mat3;
|
|
3
|
+
export declare function fromMat4(out: Mat3, a: ReadonlyMat4): Mat3;
|
|
4
|
+
export declare function fromValues(m00: number, m01: number, m02: number, m10: number, m11: number, m12: number, m20: number, m21: number, m22: number): Mat3;
|
|
5
|
+
export declare function identity(out: Mat3): Mat3;
|
|
6
|
+
export declare function invert(out: Mat3, a: ReadonlyMat3): Mat3 | null;
|
|
7
|
+
export declare function normalFromMat4(out: Mat3, a: ReadonlyMat4): Mat3 | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { mat4 as Mat4, quat as Quat, ReadonlyMat4, ReadonlyVec3, vec3 as Vec3 } from 'gl-matrix';
|
|
2
|
+
export declare function copy(out: Mat4, a: ReadonlyMat4): Mat4;
|
|
3
|
+
export declare function create(): Mat4;
|
|
4
|
+
export declare function determinant(a: ReadonlyMat4): number;
|
|
5
|
+
export declare function fromRotation(out: Mat4, rad: number, axis: ReadonlyVec3): Mat4 | null;
|
|
6
|
+
export declare function fromRotationTranslationScale(out: Mat4, q: Quat, v: ReadonlyVec3, s: ReadonlyVec3): Mat4;
|
|
7
|
+
export declare function fromTranslation(out: Mat4, v: ReadonlyVec3): Mat4;
|
|
8
|
+
export declare function fromValues(m00: number, m01: number, m02: number, m03: number, m10: number, m11: number, m12: number, m13: number, m20: number, m21: number, m22: number, m23: number, m30: number, m31: number, m32: number, m33: number): Mat4;
|
|
9
|
+
export declare function getRotation(out: Quat, mat: ReadonlyMat4): Quat;
|
|
10
|
+
export declare function getScaling(out: Vec3, mat: ReadonlyMat4): Vec3;
|
|
11
|
+
export declare function getTranslation(out: Vec3, mat: ReadonlyMat4): Vec3;
|
|
12
|
+
export declare function identity(out: Mat4): Mat4;
|
|
13
|
+
export declare function invert(out: Mat4, a: ReadonlyMat4): Mat4 | null;
|
|
14
|
+
export declare function lookAt(out: Mat4, eye: ReadonlyVec3, center: ReadonlyVec3, up: ReadonlyVec3): Mat4;
|
|
15
|
+
export declare function multiply(out: Mat4, a: ReadonlyMat4, b: ReadonlyMat4): Mat4;
|
|
16
|
+
export declare function ortho(out: Mat4, left: number, right: number, bottom: number, top: number, near: number, far: number): Mat4;
|
|
17
|
+
export declare function perspective(out: Mat4, fovy: number, aspect: number, near: number, far: number): Mat4;
|
|
18
|
+
export declare function scale(out: Mat4, a: ReadonlyMat4, v: ReadonlyVec3): Mat4;
|
|
19
|
+
export declare function targetTo(out: Mat4, eye: ReadonlyVec3, target: ReadonlyVec3, up: ReadonlyVec3): Mat4;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { quat as Quat, ReadonlyMat3, ReadonlyQuat, ReadonlyVec3, ReadonlyVec4, vec4 as Vec4 } from 'gl-matrix';
|
|
2
|
+
export declare function create(): Quat;
|
|
3
|
+
export declare function fromMat3(out: Quat, m: ReadonlyMat3): Quat;
|
|
4
|
+
export declare function multiply(out: Quat, a: ReadonlyQuat, b: ReadonlyQuat): Quat;
|
|
5
|
+
export declare function normalize(out: Vec4, a: ReadonlyVec4): Vec4;
|
|
6
|
+
export declare function setAxisAngle(out: Quat, axis: ReadonlyVec3, rad: number): Quat;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReadonlyMat3, ReadonlyMat4, ReadonlyVec3, vec3 as Vec3 } from 'gl-matrix';
|
|
2
|
+
export declare function add(out: Vec3, a: ReadonlyVec3, b: ReadonlyVec3): Vec3;
|
|
3
|
+
export declare function clone(a: ReadonlyVec3): Vec3;
|
|
4
|
+
export declare function create(): Vec3;
|
|
5
|
+
export declare function cross(out: Vec3, a: ReadonlyVec3, b: ReadonlyVec3): Vec3;
|
|
6
|
+
export declare function distance(a: ReadonlyVec3, b: ReadonlyVec3): number;
|
|
7
|
+
export declare function dot(a: ReadonlyVec3, b: ReadonlyVec3): number;
|
|
8
|
+
export declare function fromValues(x: number, y: number, z: number): Vec3;
|
|
9
|
+
export declare function length(a: ReadonlyVec3): number;
|
|
10
|
+
export declare function normalize(out: Vec3, a: ReadonlyVec3): Vec3;
|
|
11
|
+
export declare function scale(out: Vec3, a: ReadonlyVec3, b: number): Vec3;
|
|
12
|
+
export declare function scaleAndAdd(out: Vec3, a: ReadonlyVec3, b: ReadonlyVec3, scale: number): Vec3;
|
|
13
|
+
export declare function set(out: Vec3, x: number, y: number, z: number): Vec3;
|
|
14
|
+
export declare function subtract(out: Vec3, a: ReadonlyVec3, b: ReadonlyVec3): Vec3;
|
|
15
|
+
export declare function transformMat3(out: Vec3, a: ReadonlyVec3, m: ReadonlyMat3): Vec3;
|
|
16
|
+
export declare function transformMat4(out: Vec3, a: ReadonlyVec3, m: ReadonlyMat4): Vec3;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ReadonlyMat4, ReadonlyVec4, vec4 as Vec4 } from 'gl-matrix';
|
|
2
|
+
export declare function create(): Vec4;
|
|
3
|
+
export declare function normalize(out: Vec4, a: ReadonlyVec4): Vec4;
|
|
4
|
+
export declare function set(out: Vec4, x: number, y: number, z: number, w: number): Vec4;
|
|
5
|
+
export declare function transformMat4(out: Vec4, a: ReadonlyVec4, m: ReadonlyMat4): Vec4;
|