@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,254 @@
|
|
|
1
|
+
import { mat3 as H } from "gl-matrix";
|
|
2
|
+
import { t as le } from "../nova-color-parser-BCN_rFRN.js";
|
|
3
|
+
import { N as C } from "../NovaNode-CBZ-Ol-W.js";
|
|
4
|
+
class ye extends Error {
|
|
5
|
+
constructor(c, a, i) {
|
|
6
|
+
super(`[Nova Lottie] ${c}${a === null ? "" : ` (layer ${a})`}: ${i}`), this.jsonPath = c, this.layer = a, this.feature = i, this.name = "NovaLottiePreparationError";
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
function oe(r, c, a) {
|
|
10
|
+
const i = 1 - r;
|
|
11
|
+
return 3 * i * i * r * c + 3 * i * r * r * a + r * r * r;
|
|
12
|
+
}
|
|
13
|
+
function he(r, c) {
|
|
14
|
+
if (r <= 0)
|
|
15
|
+
return 0;
|
|
16
|
+
if (r >= 1)
|
|
17
|
+
return 1;
|
|
18
|
+
let a = 0, i = 1;
|
|
19
|
+
for (let u = 0; u < 40; u++) {
|
|
20
|
+
const f = (a + i) / 2;
|
|
21
|
+
oe(f, c[0], c[2]) < r ? a = f : i = f;
|
|
22
|
+
}
|
|
23
|
+
return oe((a + i) / 2, c[1], c[3]);
|
|
24
|
+
}
|
|
25
|
+
function me(r, c) {
|
|
26
|
+
if ("value" in r)
|
|
27
|
+
return r.value;
|
|
28
|
+
const a = r.keys;
|
|
29
|
+
if (c <= a[0].frame)
|
|
30
|
+
return a[0].start;
|
|
31
|
+
if (c >= a.at(-1).frame)
|
|
32
|
+
return a.at(-1).start;
|
|
33
|
+
let i = 0, u = a.length - 1;
|
|
34
|
+
for (; u - i > 1; ) {
|
|
35
|
+
const n = i + u >>> 1;
|
|
36
|
+
a[n].frame <= c ? i = n : u = n;
|
|
37
|
+
}
|
|
38
|
+
const f = a[i], o = a[i + 1], g = he((c - f.frame) / (o.frame - f.frame), f.timing);
|
|
39
|
+
return [f.start[0] + (f.end[0] - f.start[0]) * g, f.start[1] + (f.end[1] - f.start[1]) * g];
|
|
40
|
+
}
|
|
41
|
+
function ne(r) {
|
|
42
|
+
if (typeof r != "number" || !Number.isFinite(r))
|
|
43
|
+
throw new TypeError("[Nova Lottie] timeMs must be a finite number");
|
|
44
|
+
return r;
|
|
45
|
+
}
|
|
46
|
+
function $e(r) {
|
|
47
|
+
if (!r || typeof r != "object" || Array.isArray(r))
|
|
48
|
+
throw new TypeError("[Nova Lottie] Props must be an object");
|
|
49
|
+
for (const c of Object.keys(r))
|
|
50
|
+
if (c !== "timeMs" && c !== "novaRefs")
|
|
51
|
+
throw new TypeError(`[Nova Lottie] Unsupported prop ${c}`);
|
|
52
|
+
return ne(Object.hasOwn(r, "timeMs") ? r.timeMs : 0);
|
|
53
|
+
}
|
|
54
|
+
function ge(r, c, a, i) {
|
|
55
|
+
const u = H.fromTranslation(H.create(), c);
|
|
56
|
+
return H.rotate(u, u, i), H.scale(u, u, [a[0] / 100, a[1] / 100]), le(r, u);
|
|
57
|
+
}
|
|
58
|
+
function R(r, c) {
|
|
59
|
+
r.options({ width: c.width, height: c.height }), r.setLocalRenderBounds(c);
|
|
60
|
+
}
|
|
61
|
+
class be extends C {
|
|
62
|
+
constructor(c, a, i) {
|
|
63
|
+
super(c, a), this._rectangle = i;
|
|
64
|
+
}
|
|
65
|
+
render() {
|
|
66
|
+
const c = this._rectangle;
|
|
67
|
+
this.renderer.rect({ x: c.x, y: c.y, width: c.width, height: c.height, styles: { background: c.color } });
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function Oe(r) {
|
|
71
|
+
class c extends C {
|
|
72
|
+
_timeMs;
|
|
73
|
+
_closed = !1;
|
|
74
|
+
_poses = [];
|
|
75
|
+
constructor(i, u, f = {}) {
|
|
76
|
+
const o = $e(f);
|
|
77
|
+
super(i, u), this._timeMs = o;
|
|
78
|
+
const g = [];
|
|
79
|
+
try {
|
|
80
|
+
this.runtime.batch(() => {
|
|
81
|
+
R(this, { x: 0, y: 0, width: r.width, height: r.height }), this.setClip({ x: 0, y: 0, width: r.width, height: r.height });
|
|
82
|
+
for (const n of [...r.layers].reverse()) {
|
|
83
|
+
const w = new be(i, u, n.rectangle);
|
|
84
|
+
g.push(w), R(w, n.rectangle);
|
|
85
|
+
const S = new C(i, u);
|
|
86
|
+
g.push(S), R(S, n.rectangle), S.options({ x: -n.group.anchor[0], y: -n.group.anchor[1] }), S.addChild(w);
|
|
87
|
+
const $ = { ...n.rectangle, x: n.rectangle.x - n.group.anchor[0], y: n.rectangle.y - n.group.anchor[1] }, l = new C(i, u);
|
|
88
|
+
g.push(l), R(l, $), l.options({ x: n.group.position[0], y: n.group.position[1], scaleX: n.group.scale[0] / 100, scaleY: n.group.scale[1] / 100, rotation: n.group.rotation }), l.addChild(S);
|
|
89
|
+
const y = ge($, n.group.position, n.group.scale, n.group.rotation), x = new C(i, u);
|
|
90
|
+
g.push(x), R(x, y), x.options({ x: -n.anchor[0], y: -n.anchor[1] }), x.addChild(l);
|
|
91
|
+
const M = new C(i, u);
|
|
92
|
+
g.push(M), R(M, { ...y, x: y.x - n.anchor[0], y: y.y - n.anchor[1] }), M.options({ scaleX: n.scale[0] / 100, scaleY: n.scale[1] / 100, rotation: n.rotation }), M.addChild(x), this.addChild(M), this._poses.push({ node: M, layer: n });
|
|
93
|
+
}
|
|
94
|
+
this._applyTime();
|
|
95
|
+
});
|
|
96
|
+
} catch (n) {
|
|
97
|
+
const w = [];
|
|
98
|
+
for (const S of [this, ...g.reverse()])
|
|
99
|
+
try {
|
|
100
|
+
S.dispose();
|
|
101
|
+
} catch ($) {
|
|
102
|
+
w.push($);
|
|
103
|
+
}
|
|
104
|
+
throw w.length ? new AggregateError([n, ...w], "[Nova Lottie] Construction failed with cleanup errors", { cause: n }) : n;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
get timeMs() {
|
|
108
|
+
return this._timeMs;
|
|
109
|
+
}
|
|
110
|
+
setProps(i) {
|
|
111
|
+
if (this._closed)
|
|
112
|
+
throw new Error("[Nova Lottie] Mounted component is destroyed");
|
|
113
|
+
if (!i || typeof i != "object" || Array.isArray(i))
|
|
114
|
+
throw new TypeError("[Nova Lottie] Props patch must be an object");
|
|
115
|
+
for (const f of Object.keys(i))
|
|
116
|
+
if (f !== "timeMs" && f !== "novaRefs")
|
|
117
|
+
throw new TypeError(`[Nova Lottie] Unsupported prop ${f}`);
|
|
118
|
+
if (!Object.hasOwn(i, "timeMs"))
|
|
119
|
+
return this;
|
|
120
|
+
const u = ne(i.timeMs);
|
|
121
|
+
return Object.is(u, this._timeMs) ? this : (this._timeMs = u, this.invalidate({ update: !0, flush: !0 }), this);
|
|
122
|
+
}
|
|
123
|
+
update() {
|
|
124
|
+
this._closed || this._applyTime();
|
|
125
|
+
}
|
|
126
|
+
dispose() {
|
|
127
|
+
this._closed = !0, this._poses.length = 0, super.dispose();
|
|
128
|
+
}
|
|
129
|
+
_applyTime() {
|
|
130
|
+
const i = (r.outFrame - r.inFrame) * 1e3 / r.frameRate, u = this._timeMs < 0 ? r.inFrame - 1 : this._timeMs >= i ? r.outFrame : r.inFrame + this._timeMs * r.frameRate / 1e3;
|
|
131
|
+
for (const { node: f, layer: o } of this._poses) {
|
|
132
|
+
const g = u >= o.inFrame && u < o.outFrame;
|
|
133
|
+
if (f.visible = g, g) {
|
|
134
|
+
const n = me(o.position, u);
|
|
135
|
+
f.options({ x: n[0], y: n[1] });
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return Object.freeze(c.prototype), Object.freeze(c);
|
|
141
|
+
}
|
|
142
|
+
const I = 262144, ke = 24, se = 8192, we = 32, je = 1024;
|
|
143
|
+
function xe(r, c) {
|
|
144
|
+
let a = null, i = 0, u = 0, f = 0;
|
|
145
|
+
const o = (e, t) => {
|
|
146
|
+
throw new ye(e, a, t);
|
|
147
|
+
};
|
|
148
|
+
c?.profile !== "shape-basic-v1" && o("$", "profile must be shape-basic-v1");
|
|
149
|
+
const g = (e, t) => {
|
|
150
|
+
e.length > I && o(t, "JSON byte bound262144"), u += new TextEncoder().encode(e).byteLength, u > I && o(t, "JSON byte bound262144");
|
|
151
|
+
}, n = (e, t, s) => {
|
|
152
|
+
if ((++i > se || s > ke) && o(t, "JSON depth/value bound24/8192"), e === null || typeof e == "boolean")
|
|
153
|
+
return u += 5, e;
|
|
154
|
+
if (typeof e == "number")
|
|
155
|
+
return Number.isFinite(e) || o(t, "finite JSON number required"), g(String(e), t), e;
|
|
156
|
+
if (typeof e == "string")
|
|
157
|
+
return g(e, t), e;
|
|
158
|
+
if ((!e || typeof e != "object") && o(t, "plain JSON value required"), Array.isArray(e)) {
|
|
159
|
+
e.length > se && o(t, "JSON array bound8192"), Reflect.ownKeys(e).some((p) => typeof p != "string" || p !== "length" && !/^(?:0|[1-9]\d*)$/.test(p)) && o(t, "non-JSON array property is unsupported");
|
|
160
|
+
const m = [];
|
|
161
|
+
for (let p = 0; p < e.length; p++) {
|
|
162
|
+
const O = Object.getOwnPropertyDescriptor(e, String(p));
|
|
163
|
+
(!O || !("value" in O)) && o(`${t}[${p}]`, "sparse/accessor JSON is unsupported"), m.push(n(O.value, `${t}[${p}]`, s + 1));
|
|
164
|
+
}
|
|
165
|
+
return Object.freeze(m);
|
|
166
|
+
}
|
|
167
|
+
const h = Object.getPrototypeOf(e);
|
|
168
|
+
h !== Object.prototype && h !== null && o(t, "non-JSON object is unsupported"), Object.getOwnPropertySymbols(e).length && o(t, "symbol JSON property is unsupported");
|
|
169
|
+
const d = /* @__PURE__ */ Object.create(null);
|
|
170
|
+
for (const [m, p] of Object.entries(Object.getOwnPropertyDescriptors(e)))
|
|
171
|
+
(!p.enumerable || !("value" in p)) && o(`${t}.${m}`, "accessor/nonenumerable JSON is unsupported"), g(m, t), d[m] = n(p.value, `${t}.${m}`, s + 1);
|
|
172
|
+
return Object.freeze(d);
|
|
173
|
+
};
|
|
174
|
+
let w = r;
|
|
175
|
+
if (typeof r == "string") {
|
|
176
|
+
(r.length > I || new TextEncoder().encode(r).byteLength > I) && o("$", "JSON byte bound262144");
|
|
177
|
+
try {
|
|
178
|
+
w = JSON.parse(r);
|
|
179
|
+
} catch {
|
|
180
|
+
o("$", "invalid JSON text");
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
w = n(w, "$", 0), u + i * 2 > I && o("$", "JSON byte bound262144");
|
|
184
|
+
const S = (e, t) => ((!e || typeof e != "object" || Array.isArray(e)) && o(t, "JSON object required"), e), $ = (e, t, s) => {
|
|
185
|
+
const h = S(e, t);
|
|
186
|
+
for (const d of Object.keys(h))
|
|
187
|
+
s.includes(d) || o(`${t}.${d}`, `unsupported field ${d}`);
|
|
188
|
+
return h.nm !== void 0 && (typeof h.nm != "string" || h.nm.length > 128) && o(`${t}.nm`, "name bound128"), h;
|
|
189
|
+
}, l = (e, t, s = -1e6, h = 1e6) => ((typeof e != "number" || !Number.isFinite(e) || e < s || e > h) && o(t, `number within${s}..${h} required`), e), y = (e, t, s, h) => {
|
|
190
|
+
e !== t && o(s, h);
|
|
191
|
+
}, x = (e, t, s = 0) => ((!Array.isArray(e) || e.length !== 2 && e.length !== 3) && o(t, "2D vector required"), e.length === 3 && y(e[2], s, `${t}[2]`, "3D value is unsupported"), Object.freeze([l(e[0], `${t}[0]`), l(e[1], `${t}[1]`)])), M = (e, t) => {
|
|
192
|
+
const s = $(e, t, ["a", "k"]);
|
|
193
|
+
return y(s.a, 0, `${t}.a`, "animated property is unsupported here"), s.k;
|
|
194
|
+
}, L = (e, t, s = -1e6, h = 1e6) => l(M(e, t), `${t}.k`, s, h), q = (e, t, s = 0) => x(M(e, t), `${t}.k`, s), ie = (e, t, s, h) => {
|
|
195
|
+
const d = $(e, t, ["a", "k"]);
|
|
196
|
+
if (d.a === 0)
|
|
197
|
+
return Object.freeze({ value: x(d.k, `${t}.k`) });
|
|
198
|
+
y(d.a, 1, `${t}.a`, "position animation flag must be0/1"), (!Array.isArray(d.k) || d.k.length < 2 || d.k.length > 256) && o(`${t}.k`, "position keyframe bound2..256"), f += d.k.length, f > je && o(t, "total position keyframe bound1024");
|
|
199
|
+
const m = d.k.map((p, O, v) => {
|
|
200
|
+
const j = `${t}.k[${O}]`, U = O === v.length - 1, E = $(p, j, U ? ["t", "s"] : ["t", "s", "e", "i", "o"]), K = l(E.t, `${j}.t`, s, h), z = x(E.s, `${j}.s`);
|
|
201
|
+
if (U)
|
|
202
|
+
return Object.freeze({ frame: K, start: z });
|
|
203
|
+
const P = $(E.i, `${j}.i`, ["x", "y"]), A = $(E.o, `${j}.o`, ["x", "y"]), _ = Object.freeze([l(A.x, `${j}.o.x`, 0, 1), l(A.y, `${j}.o.y`, 0, 1), l(P.x, `${j}.i.x`, 0, 1), l(P.y, `${j}.i.y`, 0, 1)]);
|
|
204
|
+
return Object.freeze({ frame: K, start: z, end: x(E.e, `${j}.e`), timing: _ });
|
|
205
|
+
});
|
|
206
|
+
y(m[0].frame, s, `${t}.k[0].t`, "first position key must match layer in-frame");
|
|
207
|
+
for (let p = 0; p < m.length - 1; p++)
|
|
208
|
+
m[p + 1].frame <= m[p].frame && o(`${t}.k[${p + 1}].t`, "strictly increasing keyframe time required"), m[p].end.some((O, v) => O !== m[p + 1].start[v]) && o(`${t}.k[${p}].e`, "end/start discontinuity is unsupported");
|
|
209
|
+
return Object.freeze({ keys: Object.freeze(m) });
|
|
210
|
+
}, b = $(w, "$", ["v", "fr", "ip", "op", "w", "h", "nm", "ddd", "assets", "layers"]);
|
|
211
|
+
(typeof b.v != "string" || !/^5\.\d+\.\d+$/.test(b.v)) && o("$.v", "only declared Lottie5 JSON profile"), y(b.ddd, 0, "$.ddd", "3D composition is unsupported"), (!Array.isArray(b.assets) || b.assets.length) && o("$.assets", "assets/precomps are unsupported");
|
|
212
|
+
const V = l(b.w, "$.w", 1, 8192), Q = l(b.h, "$.h", 1, 8192);
|
|
213
|
+
Number.isSafeInteger(V) || o("$.w", "integer composition dimensions required"), Number.isSafeInteger(Q) || o("$.h", "integer composition dimensions required");
|
|
214
|
+
const W = l(b.fr, "$.fr", 1e-3, 240), F = l(b.ip, "$.ip", 0), T = l(b.op, "$.op", F);
|
|
215
|
+
T > F || o("$.op", "out-frame must exceed in-frame"), (!Array.isArray(b.layers) || !b.layers.length || b.layers.length > we) && o("$.layers", "layer count bound1..32");
|
|
216
|
+
const Z = /* @__PURE__ */ new Set(), Y = b.layers.map((e, t) => {
|
|
217
|
+
const s = `$.layers[${t}]`;
|
|
218
|
+
a = null;
|
|
219
|
+
const h = S(e, s);
|
|
220
|
+
typeof h.ind == "number" && Number.isSafeInteger(h.ind) && (a = h.ind);
|
|
221
|
+
const d = $(h, s, ["ddd", "ind", "ty", "nm", "sr", "ao", "ip", "op", "st", "bm", "ks", "shapes"]);
|
|
222
|
+
a = l(d.ind, `${s}.ind`, 0), (!Number.isSafeInteger(a) || Z.has(a)) && o(`${s}.ind`, "unique integer layer ind required"), Z.add(a), y(d.ty, 4, `${s}.ty`, "only shape layer type4 is supported");
|
|
223
|
+
for (const k of ["ddd", "ao", "st", "bm"])
|
|
224
|
+
y(d[k], 0, `${s}.${k}`, `${k} feature is unsupported`);
|
|
225
|
+
y(d.sr, 1, `${s}.sr`, "time stretch is unsupported");
|
|
226
|
+
const m = l(d.ip, `${s}.ip`, F, T), p = l(d.op, `${s}.op`, m, T);
|
|
227
|
+
p > m || o(`${s}.op`, "layer interval must be nonempty");
|
|
228
|
+
const O = $(d.ks, `${s}.ks`, ["o", "r", "a", "s", "p"]), v = L(O.o, `${s}.ks.o`, 0, 100), j = L(O.r, `${s}.ks.r`, -36e3, 36e3) * Math.PI / 180, U = q(O.a, `${s}.ks.a`), E = q(O.s, `${s}.ks.s`, 100);
|
|
229
|
+
E.some((k) => Math.abs(k) > 1e4) && o(`${s}.ks.s`, "scale percent bound10000");
|
|
230
|
+
const K = ie(O.p, `${s}.ks.p`, m, p);
|
|
231
|
+
(!Array.isArray(d.shapes) || d.shapes.length !== 1) && o(`${s}.shapes`, "exactly one rectangle group per layer is supported");
|
|
232
|
+
const z = `${s}.shapes[0]`, P = $(d.shapes[0], z, ["ty", "nm", "it"]);
|
|
233
|
+
y(P.ty, "gr", `${z}.ty`, "only the declared rectangle group is supported"), (!Array.isArray(P.it) || P.it.length !== 3) && o(`${z}.it`, "exact rectangle/fill/transform triple required");
|
|
234
|
+
const A = `${z}.it[0]`, _ = `${z}.it[1]`, N = `${z}.it[2]`, B = $(P.it[0], A, ["ty", "d", "s", "p", "r"]);
|
|
235
|
+
y(B.ty, "rc", `${A}.ty`, "only rectangle shape is supported"), y(B.d, 1, `${A}.d`, "reversed rectangle direction is unsupported"), y(L(B.r, `${A}.r`), 0, `${A}.r`, "nonzero rectangle roundness is outside this corpus");
|
|
236
|
+
const X = q(B.s, `${A}.s`), ee = q(B.p, `${A}.p`);
|
|
237
|
+
X.some((k) => k <= 0 || k > 8192) && o(`${A}.s`, "positive rectangle dimensions bounded8192 required");
|
|
238
|
+
const G = $(P.it[1], _, ["ty", "c", "o", "r"]);
|
|
239
|
+
y(G.ty, "fl", `${_}.ty`, "only solid fill is supported"), y(G.r, 1, `${_}.r`, "fill rule outside declared corpus");
|
|
240
|
+
const D = M(G.c, `${_}.c`);
|
|
241
|
+
(!Array.isArray(D) || D.length !== 4) && o(`${_}.c.k`, "RGBA color tuple required"), D.forEach((k, de) => l(k, `${_}.c.k[${de}]`, 0, 1)), y(D[3], 1, `${_}.c.k[3]`, "color alpha must be1; use fill opacity");
|
|
242
|
+
const ue = L(G.o, `${_}.o`, 0, 100), J = $(P.it[2], N, ["ty", "p", "a", "s", "r", "o", "sk", "sa"]);
|
|
243
|
+
y(J.ty, "tr", `${N}.ty`, "group transform required"), y(L(J.sk, `${N}.sk`), 0, `${N}.sk`, "skew is unsupported"), y(L(J.sa, `${N}.sa`), 0, `${N}.sa`, "skew axis is unsupported");
|
|
244
|
+
const te = q(J.s, `${N}.s`, 100);
|
|
245
|
+
te.some((k) => Math.abs(k) > 1e4) && o(`${N}.s`, "scale percent bound10000");
|
|
246
|
+
const re = L(J.o, `${N}.o`, 0, 100), pe = Object.freeze({ position: q(J.p, `${N}.p`), anchor: q(J.a, `${N}.a`), scale: te, rotation: L(J.r, `${N}.r`, -36e3, 36e3) * Math.PI / 180, opacity: re }), fe = `rgba(${D.slice(0, 3).map((k) => Math.round(k * 255)).join(",")},${v * re * ue / 1e6})`;
|
|
247
|
+
return Object.freeze({ id: a, inFrame: m, outFrame: p, position: K, anchor: U, scale: E, rotation: j, group: pe, rectangle: Object.freeze({ x: ee[0] - X[0] / 2, y: ee[1] - X[1] / 2, width: X[0], height: X[1], color: fe }) });
|
|
248
|
+
}), ce = Object.freeze({ width: V, height: Q, frameRate: W, inFrame: F, outFrame: T, layers: Object.freeze(Y) }), ae = Oe(ce);
|
|
249
|
+
return Object.freeze({ profile: "shape-basic-v1", width: V, height: Q, frameRate: W, inFrame: F, outFrame: T, durationMs: (T - F) * 1e3 / W, counts: Object.freeze({ layers: Y.length, rectangles: Y.length, keyframes: f, nodesPerMount: 1 + Y.length * 5 }), component: ae });
|
|
250
|
+
}
|
|
251
|
+
export {
|
|
252
|
+
ye as NovaLottiePreparationError,
|
|
253
|
+
xe as prepareLottie
|
|
254
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { createGridGeometry, createMeshGeometry } from '../model/render/meshes/geometry.js';
|
|
2
|
+
export { defineMesh } from '../model/render/meshes/mesh.js';
|
|
3
|
+
export type { NovaGridGeometryInput, NovaMeshAtlasRegion, NovaMeshBatch, NovaMeshBatchOptions, NovaMeshDefinition, NovaMeshDefinitionOptions, NovaMeshDrawBatch, NovaMeshGeometry, NovaMeshGeometryInput, NovaMeshImage, NovaMeshInstanceInput, NovaMeshInstancePatch, NovaMeshInstanceState, NovaMeshTransform, NovaMeshUniformLayout, NovaMeshUniformType, NovaMeshUniformValues } from '../model/render/meshes/mesh.types.js';
|
|
4
|
+
export { MeshNode } from '../model/render/meshes/MeshNode.js';
|