@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,227 @@
|
|
|
1
|
+
import { c as v } from "./DeformedMesh-CPi0P_vc.js";
|
|
2
|
+
import { N as s } from "./Errors-B2ekO9bZ.js";
|
|
3
|
+
import { l as g } from "./Color-vuv9UnoY.js";
|
|
4
|
+
import { c as d, o as c } from "./Options-CajE7LLJ.js";
|
|
5
|
+
const m = c({ positions: !0, indices: !0, normals: !0, uvs: !0, uvs1: !0, tangents: !0, colors: !0, colorSpace: !0, topology: !0, usage: !0 }), f = c({ position: !0, normal: !0, uv: !0, uv1: !0, tangent: !0, color: !0 });
|
|
6
|
+
class x {
|
|
7
|
+
/** @internal */
|
|
8
|
+
constructor(e, t, i = () => {
|
|
9
|
+
}) {
|
|
10
|
+
if (this._release = i, this.owner = e, d(t, m, "geometry"), !(t.positions instanceof Float32Array) || t.positions.length % 3 !== 0)
|
|
11
|
+
throw new s("invalid-option", "[Nova3D] positions must be Float32Array triples.");
|
|
12
|
+
if (this._positions = t.positions.slice(), this.topology = t.topology ?? "triangles", this.usage = t.usage ?? "static", this.colorSpace = t.colorSpace ?? "srgb", !["triangles", "lines", "points"].includes(this.topology) || !["static", "dynamic"].includes(this.usage) || !["srgb", "linear"].includes(this.colorSpace))
|
|
13
|
+
throw new s("invalid-option", "[Nova3D] Unsupported topology, usage or colorSpace.");
|
|
14
|
+
this._validateFloats(this._positions);
|
|
15
|
+
const o = this._positions.length / 3;
|
|
16
|
+
for (const [r, l] of [["normals", 3], ["uvs", 2], ["uvs1", 2], ["tangents", 4], ["colors", 4]]) {
|
|
17
|
+
const a = t[r];
|
|
18
|
+
if (a !== void 0) {
|
|
19
|
+
if (!(a instanceof Float32Array) || a.length !== o * l)
|
|
20
|
+
throw new s("invalid-option", `[Nova3D] ${r} must match the vertex count.`);
|
|
21
|
+
this._validateFloats(a);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
if (this._normals = t.normals?.slice(), this._uvs = t.uvs?.slice(), this._uvs1 = t.uvs1?.slice(), t.tangents && (!t.normals || this.topology !== "triangles"))
|
|
25
|
+
throw new s("invalid-option", "[Nova3D] tangents require triangle geometry with normals.");
|
|
26
|
+
if (this._tangents = t.tangents?.slice(), t.colors && (this._validateColors(t.colors), this._colors = t.colors.slice(), this.colorSpace === "linear" ? this._linearColors = this._colors : (this._linearColors = new Float32Array(this._colors.length), _(this._colors, this._linearColors, 0, this._colors.length))), t.indices !== void 0) {
|
|
27
|
+
if (!(t.indices instanceof Uint16Array) && !(t.indices instanceof Uint32Array))
|
|
28
|
+
throw new s("invalid-option", "[Nova3D] indices must be Uint16Array or Uint32Array.");
|
|
29
|
+
if (t.indices.some((r) => r >= o))
|
|
30
|
+
throw new s("invalid-option", "[Nova3D] Index is outside the vertex range.");
|
|
31
|
+
this._indices = t.indices.slice();
|
|
32
|
+
}
|
|
33
|
+
this._drawCount = this._indices?.length ?? o;
|
|
34
|
+
const n = this.topology === "triangles" ? 3 : this.topology === "lines" ? 2 : 1;
|
|
35
|
+
if (this._drawCount % n !== 0)
|
|
36
|
+
throw new s("invalid-option", "[Nova3D] Incomplete primitive in geometry.");
|
|
37
|
+
}
|
|
38
|
+
_positions;
|
|
39
|
+
_normals;
|
|
40
|
+
_uvs;
|
|
41
|
+
_uvs1;
|
|
42
|
+
_tangents;
|
|
43
|
+
/** Input colours and their linear copy uploaded to the GPU (the same array for linear input). */
|
|
44
|
+
_colors;
|
|
45
|
+
_linearColors;
|
|
46
|
+
_indices;
|
|
47
|
+
_users = /* @__PURE__ */ new Map();
|
|
48
|
+
_changes = [];
|
|
49
|
+
_deformation;
|
|
50
|
+
_version = 1;
|
|
51
|
+
_bounds;
|
|
52
|
+
_documentWrite;
|
|
53
|
+
_destroyed = !1;
|
|
54
|
+
_drawStart = 0;
|
|
55
|
+
_drawCount;
|
|
56
|
+
/** Immutable draw range snapshot, replaced when the range changes. */
|
|
57
|
+
_drawRange;
|
|
58
|
+
_bufferRecord;
|
|
59
|
+
topology;
|
|
60
|
+
usage;
|
|
61
|
+
colorSpace;
|
|
62
|
+
/** App that created this object (a model asset's own token until its first instantiate); checked when objects are combined. @internal */
|
|
63
|
+
owner;
|
|
64
|
+
/**
|
|
65
|
+
* Moves a resource created by a model asset into the app of its first instance.
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
_adopt(e, t) {
|
|
69
|
+
this.owner = e, this._release = t;
|
|
70
|
+
}
|
|
71
|
+
/** @internal */
|
|
72
|
+
_setDeformation(e) {
|
|
73
|
+
if (this._assertAlive(), this._users.size || this._deformation)
|
|
74
|
+
throw new s("state", "[Nova3D] Deformation data must be assigned once before mesh references.");
|
|
75
|
+
this._deformation = v(e, this.vertexCount);
|
|
76
|
+
}
|
|
77
|
+
/** @internal */
|
|
78
|
+
_readDeformation() {
|
|
79
|
+
return this._deformation;
|
|
80
|
+
}
|
|
81
|
+
get version() {
|
|
82
|
+
return this._version;
|
|
83
|
+
}
|
|
84
|
+
get destroyed() {
|
|
85
|
+
return this._destroyed;
|
|
86
|
+
}
|
|
87
|
+
get vertexCount() {
|
|
88
|
+
return this._positions.length / 3;
|
|
89
|
+
}
|
|
90
|
+
get drawRange() {
|
|
91
|
+
return (this._drawRange?.start !== this._drawStart || this._drawRange.count !== this._drawCount) && (this._drawRange = Object.freeze({ start: this._drawStart, count: this._drawCount })), this._drawRange;
|
|
92
|
+
}
|
|
93
|
+
getBounds() {
|
|
94
|
+
if (this._assertAlive(), this.vertexCount === 0)
|
|
95
|
+
return null;
|
|
96
|
+
if (!this._bounds) {
|
|
97
|
+
const e = this._positions;
|
|
98
|
+
let t = 1 / 0, i = 1 / 0, o = 1 / 0, n = -1 / 0, r = -1 / 0, l = -1 / 0;
|
|
99
|
+
for (let a = 0; a < e.length; a += 3)
|
|
100
|
+
t = Math.min(t, e[a]), n = Math.max(n, e[a]), i = Math.min(i, e[a + 1]), r = Math.max(r, e[a + 1]), o = Math.min(o, e[a + 2]), l = Math.max(l, e[a + 2]);
|
|
101
|
+
this._bounds = { min: [t, i, o], max: [n, r, l] };
|
|
102
|
+
}
|
|
103
|
+
return { min: [...this._bounds.min], max: [...this._bounds.max] };
|
|
104
|
+
}
|
|
105
|
+
set(e, t) {
|
|
106
|
+
d(t, f, "vertex");
|
|
107
|
+
const i = {};
|
|
108
|
+
if (t.position !== void 0 && (i.positions = new Float32Array(t.position)), t.normal !== void 0 && (i.normals = new Float32Array(t.normal)), t.uv !== void 0 && (i.uvs = new Float32Array(t.uv)), t.uv1 !== void 0 && (i.uvs1 = new Float32Array(t.uv1)), t.tangent !== void 0 && (i.tangents = new Float32Array(t.tangent)), t.color !== void 0 && (i.colors = new Float32Array(t.color)), t.position && t.position.length !== 3 || t.normal && t.normal.length !== 3 || t.uv && t.uv.length !== 2 || t.uv1 && t.uv1.length !== 2 || t.tangent && t.tangent.length !== 4 || t.color && t.color.length !== 4)
|
|
109
|
+
throw new s("invalid-option", "[Nova3D] Invalid vertex patch width.");
|
|
110
|
+
this.updateRange(e, i);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Validates every column before writing; `start` counts vertices.
|
|
114
|
+
*/
|
|
115
|
+
updateRange(e, t) {
|
|
116
|
+
if (this._documentWrite?.(), this._assertAlive(), !Number.isInteger(e) || e < 0 || e > this.vertexCount)
|
|
117
|
+
throw new s("invalid-option", "[Nova3D] Vertex start is outside the geometry.");
|
|
118
|
+
const i = {};
|
|
119
|
+
let o;
|
|
120
|
+
for (const [n, r] of [["positions", 3], ["normals", 3], ["uvs", 2], ["uvs1", 2], ["tangents", 4], ["colors", 4]]) {
|
|
121
|
+
const l = t[n];
|
|
122
|
+
if (l === void 0)
|
|
123
|
+
continue;
|
|
124
|
+
if (!this._column(n) || !(l instanceof Float32Array) || l.length % r !== 0)
|
|
125
|
+
throw new s("invalid-option", `[Nova3D] Invalid ${n} update.`);
|
|
126
|
+
const h = l.length / r;
|
|
127
|
+
if (e + h > this.vertexCount || o !== void 0 && o !== h)
|
|
128
|
+
throw new s("invalid-option", "[Nova3D] Geometry columns must have matching, in-range vertex counts.");
|
|
129
|
+
this._validateFloats(l), n === "colors" && this._validateColors(l), o = h, h > 0 && (i[n] = { start: e * r, end: (e + h) * r });
|
|
130
|
+
}
|
|
131
|
+
if (Object.keys(i).length !== 0) {
|
|
132
|
+
for (const n of Object.keys(i))
|
|
133
|
+
this._column(n).set(t[n], i[n].start);
|
|
134
|
+
i.colors && this.colorSpace === "srgb" && _(this._colors, this._linearColors, i.colors.start, i.colors.end), i.positions && (this._bounds = void 0), this._changed(i);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
updateIndices(e, t) {
|
|
138
|
+
if (this._documentWrite?.(), this._assertAlive(), !this._indices || !Number.isInteger(e) || e < 0 || e + t.length > this._indices.length)
|
|
139
|
+
throw new s("invalid-option", "[Nova3D] Index update is outside the geometry.");
|
|
140
|
+
if (!(t instanceof Uint16Array) && !(t instanceof Uint32Array))
|
|
141
|
+
throw new s("invalid-option", "[Nova3D] Invalid index column.");
|
|
142
|
+
if (t.some((i) => i >= this.vertexCount || this._indices instanceof Uint16Array && i > 65535))
|
|
143
|
+
throw new s("invalid-option", "[Nova3D] Index is outside the vertex range.");
|
|
144
|
+
t.length !== 0 && (this._indices.set(t, e), this._changed({ indices: { start: e, end: e + t.length } }));
|
|
145
|
+
}
|
|
146
|
+
setDrawRange(e, t) {
|
|
147
|
+
this._documentWrite?.(), this._assertAlive();
|
|
148
|
+
const i = this.topology === "triangles" ? 3 : this.topology === "lines" ? 2 : 1;
|
|
149
|
+
if (!Number.isInteger(e) || !Number.isInteger(t) || e < 0 || t < 0 || e + t > (this._indices?.length ?? this.vertexCount) || e % i !== 0 || t % i !== 0)
|
|
150
|
+
throw new s("invalid-option", "[Nova3D] Invalid draw range.");
|
|
151
|
+
this._drawStart = e, this._drawCount = t, this._changed({});
|
|
152
|
+
}
|
|
153
|
+
destroy() {
|
|
154
|
+
if (!this._destroyed) {
|
|
155
|
+
if (this._documentWrite?.(), this._users.size > 0)
|
|
156
|
+
throw new s("state", "[Nova3D] Geometry is still referenced by a node.");
|
|
157
|
+
this._destroyed = !0, this._documentWrite = void 0, this._changes.length = 0, this._release();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
_column(e) {
|
|
161
|
+
return e === "positions" ? this._positions : e === "normals" ? this._normals : e === "uvs" ? this._uvs : e === "uvs1" ? this._uvs1 : e === "tangents" ? this._tangents : this._colors;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* @internal
|
|
165
|
+
*/
|
|
166
|
+
_buffers() {
|
|
167
|
+
return this._bufferRecord ??= { positions: this._positions, normals: this._normals, uvs: this._uvs, uvs1: this._uvs1, tangents: this._tangents, colors: this._linearColors, indices: this._indices }, this._bufferRecord;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* @internal
|
|
171
|
+
*/
|
|
172
|
+
_changesSince(e) {
|
|
173
|
+
return e === this._version ? [] : e < this._version - this._changes.length ? null : this._changes.filter((t) => t.version > e);
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* @internal
|
|
177
|
+
*/
|
|
178
|
+
_retain(e, t) {
|
|
179
|
+
this._assertAlive(), this._documentWrite?.(), this._users.set(e, t);
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* @internal
|
|
183
|
+
*/
|
|
184
|
+
_releaseUser(e) {
|
|
185
|
+
this._users.delete(e);
|
|
186
|
+
}
|
|
187
|
+
/** @internal */
|
|
188
|
+
_hasOtherUsers(e) {
|
|
189
|
+
return [...this._users.keys()].some((t) => !e.has(t));
|
|
190
|
+
}
|
|
191
|
+
/** @internal */
|
|
192
|
+
_assertDocumentUse() {
|
|
193
|
+
this._documentWrite?.();
|
|
194
|
+
}
|
|
195
|
+
/** @internal */
|
|
196
|
+
_guardDocument(e) {
|
|
197
|
+
if (this._documentWrite && this._documentWrite !== e)
|
|
198
|
+
throw new s("owner", "[Nova3D] Resource already has a document owner.");
|
|
199
|
+
this._documentWrite = e;
|
|
200
|
+
}
|
|
201
|
+
_assertAlive() {
|
|
202
|
+
if (this._destroyed)
|
|
203
|
+
throw new s("destroyed", "[Nova3D] Geometry is destroyed.");
|
|
204
|
+
}
|
|
205
|
+
_validateColors(e) {
|
|
206
|
+
for (let t = 0; t < e.length; t++)
|
|
207
|
+
if (!(e[t] >= 0 && e[t] <= 1))
|
|
208
|
+
throw new s("invalid-option", "[Nova3D] Vertex colours must be in [0,1].");
|
|
209
|
+
}
|
|
210
|
+
_validateFloats(e) {
|
|
211
|
+
for (let t = 0; t < e.length; t++)
|
|
212
|
+
if (!Number.isFinite(e[t]))
|
|
213
|
+
throw new s("invalid-option", "[Nova3D] Geometry contains a non-finite component.");
|
|
214
|
+
}
|
|
215
|
+
_changed(e) {
|
|
216
|
+
this._version++, this._changes.push({ version: this._version, attributes: e }), this._changes.length > 64 && this._changes.shift();
|
|
217
|
+
for (const t of this._users.values())
|
|
218
|
+
t();
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
function _(u, e, t, i) {
|
|
222
|
+
for (let o = t; o < i; o++)
|
|
223
|
+
e[o] = o % 4 === 3 ? u[o] : g(u[o]);
|
|
224
|
+
}
|
|
225
|
+
export {
|
|
226
|
+
x as N
|
|
227
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { N as a } from "./Errors-B2ekO9bZ.js";
|
|
2
|
+
async function h(f, w, t, e) {
|
|
3
|
+
if (typeof DecompressionStream > "u")
|
|
4
|
+
throw new a("unsupported", "[Nova3D] Compressed model data requires DecompressionStream.");
|
|
5
|
+
if (!Number.isSafeInteger(t) || t < 0)
|
|
6
|
+
throw new a("format", "[Nova3D] Invalid inflated size.");
|
|
7
|
+
e?.throwIfAborted();
|
|
8
|
+
const s = new Uint8Array(t), i = new DecompressionStream(w), c = i.writable.getWriter();
|
|
9
|
+
c.write(f).catch(() => {
|
|
10
|
+
}), c.close().catch(() => {
|
|
11
|
+
});
|
|
12
|
+
const o = i.readable.getReader(), d = () => {
|
|
13
|
+
o.cancel(e?.reason).catch(() => {
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
e?.addEventListener("abort", d, { once: !0 });
|
|
17
|
+
let n = 0;
|
|
18
|
+
try {
|
|
19
|
+
for (; ; ) {
|
|
20
|
+
let r;
|
|
21
|
+
try {
|
|
22
|
+
r = await o.read();
|
|
23
|
+
} catch {
|
|
24
|
+
throw e?.throwIfAborted(), new a("format", "[Nova3D] Compressed model data is corrupt.");
|
|
25
|
+
}
|
|
26
|
+
if (e?.throwIfAborted(), r.done)
|
|
27
|
+
break;
|
|
28
|
+
if (r.value.byteLength > t - n)
|
|
29
|
+
throw new a("format", "[Nova3D] Inflated data exceeds its declared size.");
|
|
30
|
+
s.set(r.value, n), n += r.value.byteLength;
|
|
31
|
+
}
|
|
32
|
+
} finally {
|
|
33
|
+
e?.removeEventListener("abort", d), await o.cancel().catch(() => {
|
|
34
|
+
}), o.releaseLock();
|
|
35
|
+
}
|
|
36
|
+
if (n !== t)
|
|
37
|
+
throw new a("format", "[Nova3D] Inflated data is shorter than its declared size.");
|
|
38
|
+
return s;
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
h as i
|
|
42
|
+
};
|