@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.
Files changed (501) hide show
  1. package/README.md +1035 -10
  2. package/THIRD_PARTY_NOTICES.md +26 -0
  3. package/dist/2d/accessibility.d.ts +2 -0
  4. package/dist/2d/accessibility.js +171 -0
  5. package/dist/2d/commands.d.ts +2 -0
  6. package/dist/2d/commands.js +80 -0
  7. package/dist/2d/effects.d.ts +10 -0
  8. package/dist/2d/effects.js +566 -0
  9. package/dist/2d/ktx2.d.ts +5 -0
  10. package/dist/2d/ktx2.js +542 -0
  11. package/dist/2d/lighting.d.ts +3 -0
  12. package/dist/2d/lighting.js +495 -0
  13. package/dist/2d/lottie.d.ts +3 -0
  14. package/dist/2d/lottie.js +254 -0
  15. package/dist/2d/meshes.d.ts +4 -0
  16. package/dist/2d/meshes.js +451 -0
  17. package/dist/2d/primitives.d.ts +3 -0
  18. package/dist/2d/primitives.js +85 -0
  19. package/dist/2d/render-textures.d.ts +3 -0
  20. package/dist/2d/render-textures.js +539 -0
  21. package/dist/2d/svg/documents.d.ts +5 -0
  22. package/dist/2d/svg/documents.js +7 -0
  23. package/dist/2d/svg/renderer.d.ts +3 -0
  24. package/dist/2d/svg/renderer.js +222 -0
  25. package/dist/2d/svg.d.ts +3 -0
  26. package/dist/2d/svg.js +4 -0
  27. package/dist/2d/tools.d.ts +2 -0
  28. package/dist/2d/tools.js +100 -0
  29. package/dist/2d/video.d.ts +5 -0
  30. package/dist/2d/video.js +90 -0
  31. package/dist/2d.d.ts +2 -0
  32. package/dist/2d.js +220 -0
  33. package/dist/3d/animation.d.ts +8 -0
  34. package/dist/3d/animation.js +1396 -0
  35. package/dist/3d/area-lights.d.ts +2 -0
  36. package/dist/3d/area-lights.js +19 -0
  37. package/dist/3d/audio.d.ts +4 -0
  38. package/dist/3d/audio.js +500 -0
  39. package/dist/3d/character.d.ts +2 -0
  40. package/dist/3d/character.js +136 -0
  41. package/dist/3d/collision.d.ts +3 -0
  42. package/dist/3d/collision.js +387 -0
  43. package/dist/3d/commands.d.ts +2 -0
  44. package/dist/3d/commands.js +108 -0
  45. package/dist/3d/controls.d.ts +8 -0
  46. package/dist/3d/controls.js +1041 -0
  47. package/dist/3d/documents.d.ts +5 -0
  48. package/dist/3d/documents.js +227 -0
  49. package/dist/3d/effects.d.ts +5 -0
  50. package/dist/3d/effects.js +1986 -0
  51. package/dist/3d/export.d.ts +4 -0
  52. package/dist/3d/export.js +347 -0
  53. package/dist/3d/fbx.d.ts +2 -0
  54. package/dist/3d/fbx.js +784 -0
  55. package/dist/3d/gltf.d.ts +2 -0
  56. package/dist/3d/gltf.js +5 -0
  57. package/dist/3d/helpers.d.ts +5 -0
  58. package/dist/3d/helpers.js +191 -0
  59. package/dist/3d/ik.d.ts +9 -0
  60. package/dist/3d/ik.js +777 -0
  61. package/dist/3d/loaders.d.ts +17 -0
  62. package/dist/3d/loaders.js +1406 -0
  63. package/dist/3d/nodes.d.ts +8 -0
  64. package/dist/3d/nodes.js +49 -0
  65. package/dist/3d/particles.d.ts +5 -0
  66. package/dist/3d/particles.js +1574 -0
  67. package/dist/3d/physics/backend.d.ts +7 -0
  68. package/dist/3d/physics/backend.js +1 -0
  69. package/dist/3d/physics/rapier.d.ts +3 -0
  70. package/dist/3d/physics/rapier.js +765 -0
  71. package/dist/3d/physics.d.ts +5 -0
  72. package/dist/3d/physics.js +3346 -0
  73. package/dist/3d/splats.d.ts +7 -0
  74. package/dist/3d/splats.js +862 -0
  75. package/dist/3d/text.d.ts +5 -0
  76. package/dist/3d/text.js +1043 -0
  77. package/dist/3d/tiles.d.ts +24 -0
  78. package/dist/3d/tiles.js +1705 -0
  79. package/dist/3d/tools.d.ts +12 -0
  80. package/dist/3d/tools.js +338 -0
  81. package/dist/3d/usdz.d.ts +2 -0
  82. package/dist/3d/usdz.js +634 -0
  83. package/dist/3d/xr.d.ts +2 -0
  84. package/dist/3d/xr.js +202 -0
  85. package/dist/3d-B4jWF8Qb.js +5591 -0
  86. package/dist/3d.d.ts +40 -0
  87. package/dist/3d.js +44 -0
  88. package/dist/Capsule-BFVpZfvc.js +44 -0
  89. package/dist/Clip-CAN7t03k.js +204 -0
  90. package/dist/Color-vuv9UnoY.js +34 -0
  91. package/dist/DeformedMesh-CPi0P_vc.js +280 -0
  92. package/dist/Document-DCVEZSvM.js +415 -0
  93. package/dist/Errors-B2ekO9bZ.js +30 -0
  94. package/dist/Features-BsjmePtc.js +557 -0
  95. package/dist/GLTFResourceIO-CYJyCUTt.js +124 -0
  96. package/dist/GPUParticleState-CQlNpoDa.js +545 -0
  97. package/dist/Geometry-DytO490z.js +227 -0
  98. package/dist/Inflate-DWw0V-Up.js +42 -0
  99. package/dist/InstancedMesh-DPrgrw5z.js +527 -0
  100. package/dist/Limits-Bw5XQdFr.js +20 -0
  101. package/dist/LineHelper-Ad0z9uDi.js +131 -0
  102. package/dist/LoaderIO-BwrM84OM.js +114 -0
  103. package/dist/Material-BpfLPmK9.js +777 -0
  104. package/dist/Mesh-BaRxAAJq.js +209 -0
  105. package/dist/Node-QfgAE2_v.js +877 -0
  106. package/dist/NovaAssetRegistry-p2QlCwvT.js +1168 -0
  107. package/dist/NovaNode-CBZ-Ol-W.js +2016 -0
  108. package/dist/NovaRenderCommandWriter-CWQRa42y.js +1949 -0
  109. package/dist/NovaTextSelectionService-CipuujCT.js +18526 -0
  110. package/dist/NovaWebGLProgram-BO250QNF.js +97 -0
  111. package/dist/Options-CajE7LLJ.js +15 -0
  112. package/dist/PolygonMesh-D4PnnfIo.js +657 -0
  113. package/dist/Ready-BzyhRtjD.js +21 -0
  114. package/dist/Scene-CDfNgf9I.js +911 -0
  115. package/dist/Shader-b6_HDndT.js +48 -0
  116. package/dist/SplatShader-wJ6GJ3vo.js +130 -0
  117. package/dist/Texture-dTKMlTpK.js +267 -0
  118. package/dist/TextureLoader-CfDzdy2m.js +411 -0
  119. package/dist/Textures-CGL4Kf-8.js +651 -0
  120. package/dist/ToneMapping-D9IWvN0u.js +46 -0
  121. package/dist/WebGPURenderer-DjD0IxVC.js +4921 -0
  122. package/dist/ZipReader-C-MSEsSr.js +84 -0
  123. package/dist/core.js +218 -24024
  124. package/dist/domain/types/base.types.d.ts +18 -9
  125. package/dist/domain/types/component.types.d.ts +5 -5
  126. package/dist/domain/types/cursor.types.d.ts +1 -1
  127. package/dist/domain/types/diagnostics.types.d.ts +2 -0
  128. package/dist/domain/types/export.types.d.ts +2 -2
  129. package/dist/domain/types/hit-test.types.d.ts +1 -1
  130. package/dist/domain/types/motion.types.d.ts +2 -2
  131. package/dist/domain/types/renderer.types.d.ts +88 -4
  132. package/dist/domain/types/rendering/index.d.ts +29 -4
  133. package/dist/domain/types/sound.types.d.ts +1 -1
  134. package/dist/domain/types/theme.types.d.ts +1 -1
  135. package/dist/domain/utils/bounds.d.ts +1 -1
  136. package/dist/domain/utils/nova-text.d.ts +9 -0
  137. package/dist/domain/utils/schemaBounds.d.ts +2 -2
  138. package/dist/export-svg-document-ChaNXMaG.js +668 -0
  139. package/dist/features/3d/Errors.d.ts +57 -0
  140. package/dist/features/3d/Nova3DApp.d.ts +429 -0
  141. package/dist/features/3d/animation/Animator.d.ts +260 -0
  142. package/dist/features/3d/animation/Clip.d.ts +74 -0
  143. package/dist/features/3d/animation/Graph.d.ts +158 -0
  144. package/dist/features/3d/animation/Mask.d.ts +40 -0
  145. package/dist/features/3d/audio/Audio.d.ts +114 -0
  146. package/dist/features/3d/audio/Sound.d.ts +133 -0
  147. package/dist/features/3d/character/CharacterController.d.ts +61 -0
  148. package/dist/features/3d/collision/Capsule.d.ts +25 -0
  149. package/dist/features/3d/collision/Octree.d.ts +94 -0
  150. package/dist/features/3d/controls/CameraMotionControls.d.ts +154 -0
  151. package/dist/features/3d/controls/CameraOrientation.d.ts +47 -0
  152. package/dist/features/3d/controls/OrbitControls.d.ts +73 -0
  153. package/dist/features/3d/controls/PointerGesture.d.ts +25 -0
  154. package/dist/features/3d/controls/PointerLock.d.ts +36 -0
  155. package/dist/features/3d/controls/Snapping.d.ts +32 -0
  156. package/dist/features/3d/controls/TransformGizmo.d.ts +79 -0
  157. package/dist/features/3d/deformation/DeformationGPU.d.ts +52 -0
  158. package/dist/features/3d/deformation/DeformationShader.d.ts +2 -0
  159. package/dist/features/3d/deformation/DeformedMesh.d.ts +36 -0
  160. package/dist/features/3d/deformation/GeometryDeformation.d.ts +25 -0
  161. package/dist/features/3d/documents/Document.d.ts +59 -0
  162. package/dist/features/3d/documents/DocumentCommands.d.ts +45 -0
  163. package/dist/features/3d/documents/DocumentSchema.d.ts +18 -0
  164. package/dist/features/3d/documents/DocumentTransform.d.ts +4 -0
  165. package/dist/features/3d/documents/DocumentTypes.d.ts +182 -0
  166. package/dist/features/3d/documents/DocumentValidation.d.ts +18 -0
  167. package/dist/features/3d/documents/Projection.d.ts +65 -0
  168. package/dist/features/3d/effects/CubeLUT.d.ts +24 -0
  169. package/dist/features/3d/effects/Effects.d.ts +32 -0
  170. package/dist/features/3d/effects/EffectsGPU.d.ts +80 -0
  171. package/dist/features/3d/effects/EffectsPlan.d.ts +268 -0
  172. package/dist/features/3d/effects/EffectsShaders.d.ts +35 -0
  173. package/dist/features/3d/export/GLTFExporter.d.ts +49 -0
  174. package/dist/features/3d/export/ThreeMFExporter.d.ts +19 -0
  175. package/dist/features/3d/export/ZipWriter.d.ts +9 -0
  176. package/dist/features/3d/fbx/FBXLoader.d.ts +26 -0
  177. package/dist/features/3d/fbx/FBXParser.d.ts +35 -0
  178. package/dist/features/3d/fbx/FBXScene.d.ts +20 -0
  179. package/dist/features/3d/gltf/GLTFLoader.d.ts +16 -0
  180. package/dist/features/3d/gltf/GLTFTypes.d.ts +64 -0
  181. package/dist/features/3d/gltf/services/GLTFBinary.d.ts +21 -0
  182. package/dist/features/3d/gltf/services/GLTFGeometry.d.ts +14 -0
  183. package/dist/features/3d/gltf/services/GLTFResourceIO.d.ts +64 -0
  184. package/dist/features/3d/helpers/LineHelper.d.ts +51 -0
  185. package/dist/features/3d/helpers/StaticHelpers.d.ts +47 -0
  186. package/dist/features/3d/helpers/TrackedHelpers.d.ts +84 -0
  187. package/dist/features/3d/ik/ChainIK.d.ts +44 -0
  188. package/dist/features/3d/ik/IKChain.d.ts +92 -0
  189. package/dist/features/3d/ik/IKMath.d.ts +49 -0
  190. package/dist/features/3d/ik/IKSolver.d.ts +97 -0
  191. package/dist/features/3d/ik/LookAtIK.d.ts +58 -0
  192. package/dist/features/3d/ik/TwoBoneIK.d.ts +57 -0
  193. package/dist/features/3d/import/ImportAnimation.d.ts +20 -0
  194. package/dist/features/3d/import/ImportMath.d.ts +42 -0
  195. package/dist/features/3d/import/ImportedModel.d.ts +135 -0
  196. package/dist/features/3d/import/Inflate.d.ts +5 -0
  197. package/dist/features/3d/import/ModelAsset.d.ts +149 -0
  198. package/dist/features/3d/import/PolygonMesh.d.ts +54 -0
  199. package/dist/features/3d/lights/AreaLightTables.d.ts +8 -0
  200. package/dist/features/3d/lights/AreaLights.d.ts +11 -0
  201. package/dist/features/3d/loaders/EXRCompression.d.ts +13 -0
  202. package/dist/features/3d/loaders/EXRLoader.d.ts +39 -0
  203. package/dist/features/3d/loaders/HDRLoader.d.ts +26 -0
  204. package/dist/features/3d/loaders/Limits.d.ts +70 -0
  205. package/dist/features/3d/loaders/LoaderBuffers.d.ts +42 -0
  206. package/dist/features/3d/loaders/LoaderIO.d.ts +81 -0
  207. package/dist/features/3d/loaders/LoaderModel.d.ts +80 -0
  208. package/dist/features/3d/loaders/LoaderText.d.ts +27 -0
  209. package/dist/features/3d/loaders/MTLLoader.d.ts +105 -0
  210. package/dist/features/3d/loaders/OBJLoader.d.ts +70 -0
  211. package/dist/features/3d/loaders/PLYLoader.d.ts +47 -0
  212. package/dist/features/3d/loaders/STLLoader.d.ts +27 -0
  213. package/dist/features/3d/model/Camera.d.ts +33 -0
  214. package/dist/features/3d/model/Environment.d.ts +31 -0
  215. package/dist/features/3d/model/Geometry.d.ts +59 -0
  216. package/dist/features/3d/model/InstancedMesh.d.ts +134 -0
  217. package/dist/features/3d/model/LOD.d.ts +31 -0
  218. package/dist/features/3d/model/Light.d.ts +200 -0
  219. package/dist/features/3d/model/Material.d.ts +308 -0
  220. package/dist/features/3d/model/MaterialExtensions.d.ts +200 -0
  221. package/dist/features/3d/model/Mesh.d.ts +92 -0
  222. package/dist/features/3d/model/Node.d.ts +87 -0
  223. package/dist/features/3d/model/ReflectionProbe.d.ts +45 -0
  224. package/dist/features/3d/model/RenderTarget.d.ts +41 -0
  225. package/dist/features/3d/model/Scene.d.ts +173 -0
  226. package/dist/features/3d/model/Texture.d.ts +143 -0
  227. package/dist/features/3d/nodes/Nodes.d.ts +8 -0
  228. package/dist/features/3d/nodes/ShaderNode.d.ts +240 -0
  229. package/dist/features/3d/particles/GPUParticleSchedule.d.ts +67 -0
  230. package/dist/features/3d/particles/GPUParticleShaders.d.ts +19 -0
  231. package/dist/features/3d/particles/GPUParticleState.d.ts +106 -0
  232. package/dist/features/3d/particles/GPUParticleSystem.d.ts +192 -0
  233. package/dist/features/3d/particles/ParticleCurves.d.ts +34 -0
  234. package/dist/features/3d/particles/ParticleOptions.d.ts +78 -0
  235. package/dist/features/3d/particles/ParticleSystem.d.ts +368 -0
  236. package/dist/features/3d/physics/PhysicsBackend.d.ts +352 -0
  237. package/dist/features/3d/physics/PhysicsDebug.d.ts +24 -0
  238. package/dist/features/3d/physics/PhysicsWorld.d.ts +352 -0
  239. package/dist/features/3d/physics/basic/BasicCollision.d.ts +75 -0
  240. package/dist/features/3d/physics/basic/BasicPhysics.d.ts +24 -0
  241. package/dist/features/3d/physics/basic/BasicShapes.d.ts +103 -0
  242. package/dist/features/3d/physics/rapier/ContactBuffer.d.ts +32 -0
  243. package/dist/features/3d/physics/rapier/RapierBackend.d.ts +17 -0
  244. package/dist/features/3d/physics/rapier/RapierShapes.d.ts +4 -0
  245. package/dist/features/3d/physics/rapier/RapierWorld.d.ts +198 -0
  246. package/dist/features/3d/physics/rapier/Validation.d.ts +8 -0
  247. package/dist/features/3d/services/Background.d.ts +22 -0
  248. package/dist/features/3d/services/BasicShader.d.ts +55 -0
  249. package/dist/features/3d/services/ClusteredLights.d.ts +69 -0
  250. package/dist/features/3d/services/DrawOrder.d.ts +37 -0
  251. package/dist/features/3d/services/EffectsProcessor.d.ts +38 -0
  252. package/dist/features/3d/services/EnvironmentBRDF.d.ts +35 -0
  253. package/dist/features/3d/services/EnvironmentMaps.d.ts +55 -0
  254. package/dist/features/3d/services/FogShader.d.ts +6 -0
  255. package/dist/features/3d/services/Frustum.d.ts +7 -0
  256. package/dist/features/3d/services/GLState.d.ts +86 -0
  257. package/dist/features/3d/services/GPUPicker.d.ts +31 -0
  258. package/dist/features/3d/services/InstanceShader.d.ts +3 -0
  259. package/dist/features/3d/services/LineProgram.d.ts +32 -0
  260. package/dist/features/3d/services/PBRProgram.d.ts +115 -0
  261. package/dist/features/3d/services/Renderer.d.ts +50 -0
  262. package/dist/features/3d/services/Shader.d.ts +22 -0
  263. package/dist/features/3d/services/ShaderProgram.d.ts +38 -0
  264. package/dist/features/3d/services/ShadowMaps.d.ts +97 -0
  265. package/dist/features/3d/services/SpatialIndex.d.ts +16 -0
  266. package/dist/features/3d/services/TextureLoader.d.ts +40 -0
  267. package/dist/features/3d/services/TextureMipmaps.d.ts +42 -0
  268. package/dist/features/3d/services/ToneMapping.d.ts +12 -0
  269. package/dist/features/3d/services/WebGLRenderer.d.ts +261 -0
  270. package/dist/features/3d/splats/SplatData.d.ts +136 -0
  271. package/dist/features/3d/splats/SplatLoaders.d.ts +64 -0
  272. package/dist/features/3d/splats/SplatShader.d.ts +14 -0
  273. package/dist/features/3d/splats/SplatSort.d.ts +69 -0
  274. package/dist/features/3d/splats/Splats.d.ts +116 -0
  275. package/dist/features/3d/text/FontAtlas.d.ts +246 -0
  276. package/dist/features/3d/text/SDF.d.ts +28 -0
  277. package/dist/features/3d/text/Text.d.ts +179 -0
  278. package/dist/features/3d/text/TextLayout.d.ts +73 -0
  279. package/dist/features/3d/text/TextShader.d.ts +12 -0
  280. package/dist/features/3d/tiles/BoundingVolume.d.ts +43 -0
  281. package/dist/features/3d/tiles/Geodesy.d.ts +106 -0
  282. package/dist/features/3d/tiles/GlobeControls.d.ts +147 -0
  283. package/dist/features/3d/tiles/TileContent.d.ts +35 -0
  284. package/dist/features/3d/tiles/TileFormats.d.ts +77 -0
  285. package/dist/features/3d/tiles/Tiles3D.d.ts +236 -0
  286. package/dist/features/3d/tiles/Tileset.d.ts +81 -0
  287. package/dist/features/3d/tools/BatchedMesh.d.ts +74 -0
  288. package/dist/features/3d/tools/CanvasSurface.d.ts +81 -0
  289. package/dist/features/3d/tools/Color.d.ts +11 -0
  290. package/dist/features/3d/tools/MergeGeometries.d.ts +22 -0
  291. package/dist/features/3d/tools/Options.d.ts +15 -0
  292. package/dist/features/3d/tools/Polyhedra.d.ts +30 -0
  293. package/dist/features/3d/tools/PrimitiveBuffers.d.ts +42 -0
  294. package/dist/features/3d/tools/Primitives.d.ts +164 -0
  295. package/dist/features/3d/tools/Ready.d.ts +12 -0
  296. package/dist/features/3d/tools/SpatialMath.d.ts +57 -0
  297. package/dist/features/3d/tools/SphericalHarmonics.d.ts +9 -0
  298. package/dist/features/3d/tools/math/mat3.d.ts +7 -0
  299. package/dist/features/3d/tools/math/mat4.d.ts +19 -0
  300. package/dist/features/3d/tools/math/quat.d.ts +6 -0
  301. package/dist/features/3d/tools/math/vec3.d.ts +16 -0
  302. package/dist/features/3d/tools/math/vec4.d.ts +5 -0
  303. package/dist/features/3d/types.d.ts +359 -0
  304. package/dist/features/3d/usdz/USDAParser.d.ts +50 -0
  305. package/dist/features/3d/usdz/USDScene.d.ts +20 -0
  306. package/dist/features/3d/usdz/USDZLoader.d.ts +27 -0
  307. package/dist/features/3d/usdz/ZipReader.d.ts +16 -0
  308. package/dist/features/3d/webgpu/Backend.d.ts +40 -0
  309. package/dist/features/3d/webgpu/BasicShader.d.ts +10 -0
  310. package/dist/features/3d/webgpu/Constants.d.ts +32 -0
  311. package/dist/features/3d/webgpu/Deformation.d.ts +71 -0
  312. package/dist/features/3d/webgpu/Environment.d.ts +66 -0
  313. package/dist/features/3d/webgpu/Features.d.ts +68 -0
  314. package/dist/features/3d/webgpu/Layouts.d.ts +27 -0
  315. package/dist/features/3d/webgpu/Lines.d.ts +40 -0
  316. package/dist/features/3d/webgpu/LitExtras.d.ts +46 -0
  317. package/dist/features/3d/webgpu/LitFeatures.d.ts +41 -0
  318. package/dist/features/3d/webgpu/LitScene.d.ts +60 -0
  319. package/dist/features/3d/webgpu/LitShader.d.ts +68 -0
  320. package/dist/features/3d/webgpu/Particles.d.ts +114 -0
  321. package/dist/features/3d/webgpu/Picking.d.ts +59 -0
  322. package/dist/features/3d/webgpu/PipelineKey.d.ts +33 -0
  323. package/dist/features/3d/webgpu/Points.d.ts +41 -0
  324. package/dist/features/3d/webgpu/Probes.d.ts +45 -0
  325. package/dist/features/3d/webgpu/ShaderChunks.d.ts +18 -0
  326. package/dist/features/3d/webgpu/ShaderMaterial.d.ts +57 -0
  327. package/dist/features/3d/webgpu/ShaderMaterialSource.d.ts +5 -0
  328. package/dist/features/3d/webgpu/Shadows.d.ts +49 -0
  329. package/dist/features/3d/webgpu/Splats.d.ts +47 -0
  330. package/dist/features/3d/webgpu/Textures.d.ts +52 -0
  331. package/dist/features/3d/webgpu/Transmission.d.ts +30 -0
  332. package/dist/features/3d/webgpu/UniformLayout.d.ts +30 -0
  333. package/dist/features/3d/webgpu/UtilityShaders.d.ts +38 -0
  334. package/dist/features/3d/webgpu/WebGPURenderer.d.ts +327 -0
  335. package/dist/features/3d/webgpu/effects/EffectsShaders.d.ts +74 -0
  336. package/dist/features/3d/webgpu/effects/WebGPUEffects.d.ts +140 -0
  337. package/dist/features/3d/xr/XR.d.ts +100 -0
  338. package/dist/gltf-By-n0qEg.js +960 -0
  339. package/dist/index.d.ts +86 -81
  340. package/dist/model/document-actions/document-commands.d.ts +18 -0
  341. package/dist/model/documents/svg/create-svg-document-renderer.d.ts +32 -0
  342. package/dist/model/documents/svg/export-svg-document.d.ts +5 -0
  343. package/dist/model/documents/svg/import-svg-document.d.ts +6 -0
  344. package/dist/model/documents/svg/svg-document.types.d.ts +111 -0
  345. package/dist/model/documents/svg/svg-values.d.ts +16 -0
  346. package/dist/model/documents/svg/svg-xml.d.ts +18 -0
  347. package/dist/model/input/NovaInputProxy_Adapter.d.ts +2 -1
  348. package/dist/model/input/NovaInputValidationController.d.ts +1 -1
  349. package/dist/model/input/NovaTextInputController.d.ts +1 -1
  350. package/dist/model/input/NovaTextLayoutEngine.d.ts +2 -6
  351. package/dist/model/input/index.d.ts +7 -7
  352. package/dist/model/input/nova-input.types.d.ts +1 -1
  353. package/dist/model/lighting/LightingRenderer2D.d.ts +58 -0
  354. package/dist/model/lighting/NovaLighting2D.d.ts +56 -0
  355. package/dist/model/lighting/lighting-shaders.d.ts +3 -0
  356. package/dist/model/lighting/lighting-state.d.ts +27 -0
  357. package/dist/model/lighting/lighting.types.d.ts +107 -0
  358. package/dist/model/lottie/LottieNode.d.ts +4 -0
  359. package/dist/model/lottie/lottie.types.d.ts +83 -0
  360. package/dist/model/lottie/prepare-lottie.d.ts +3 -0
  361. package/dist/model/lottie/sample-position.d.ts +9 -0
  362. package/dist/model/motion/NovaMotionEngine.d.ts +3 -3
  363. package/dist/model/motion/nova-motion-easing.d.ts +1 -1
  364. package/dist/model/motion/nova-motion-interpolation.d.ts +1 -1
  365. package/dist/model/motion/nova-motion-presets.d.ts +2 -2
  366. package/dist/model/motion/nova-motion-timeline.d.ts +1 -1
  367. package/dist/model/platform/NovaCanvas.d.ts +7 -6
  368. package/dist/model/primitives/NovaPrimitiveUnsupportedError.d.ts +13 -0
  369. package/dist/model/primitives/definePrimitive.d.ts +5 -0
  370. package/dist/model/primitives/primitive.types.d.ts +28 -0
  371. package/dist/model/render/backends/canvas2d/NovaCanvas2DTargetManager.d.ts +3 -3
  372. package/dist/model/render/backends/canvas2d/NovaRenderer2D.d.ts +61 -15
  373. package/dist/model/render/backends/canvas2d/nova-canvas-blend.d.ts +5 -0
  374. package/dist/model/render/backends/nova-render-backend-factory.d.ts +6 -6
  375. package/dist/model/render/backends/nova-render-backend.d.ts +8 -2
  376. package/dist/model/render/backends/webgl/NovaRendererWebGL.d.ts +32 -11
  377. package/dist/model/render/backends/webgl/NovaStreamCacheIdleLedger.d.ts +12 -1
  378. package/dist/model/render/backends/webgl/NovaWebGLBatcher.d.ts +1 -1
  379. package/dist/model/render/backends/webgl/NovaWebGLCircleImagePass.d.ts +23 -0
  380. package/dist/model/render/backends/webgl/NovaWebGLCompositionPass.d.ts +9 -0
  381. package/dist/model/render/backends/webgl/NovaWebGLDevice.d.ts +3 -1
  382. package/dist/model/render/backends/webgl/NovaWebGLDiagnostics.d.ts +1 -1
  383. package/dist/model/render/backends/webgl/NovaWebGLFrameRenderer.d.ts +162 -53
  384. package/dist/model/render/backends/webgl/NovaWebGLPathClipPass.d.ts +13 -0
  385. package/dist/model/render/backends/webgl/NovaWebGLPathUnion.d.ts +23 -0
  386. package/dist/model/render/compiler/NovaRenderBuilder.d.ts +24 -10
  387. package/dist/model/render/compiler/NovaRenderCommandWriter.d.ts +10 -5
  388. package/dist/model/render/compiler/NovaRenderCompiler.d.ts +7 -6
  389. package/dist/model/render/compiler/NovaRenderFrameBuilder.d.ts +4 -3
  390. package/dist/model/render/effects/blur.d.ts +8 -0
  391. package/dist/model/render/effects/color-matrix.d.ts +8 -0
  392. package/dist/model/render/effects/drop-shadow.d.ts +18 -0
  393. package/dist/model/render/effects/nova-effect-registry.d.ts +66 -0
  394. package/dist/model/render/effects/nova-gaussian-kernel.d.ts +7 -0
  395. package/dist/model/render/effects/nova-gaussian-textures.d.ts +11 -0
  396. package/dist/model/render/effects/shader-effect.d.ts +64 -0
  397. package/dist/model/render/geometry/nova-alpha-mask.d.ts +5 -0
  398. package/dist/model/render/geometry/nova-composition.d.ts +9 -0
  399. package/dist/model/render/geometry/nova-node-clip.d.ts +17 -0
  400. package/dist/model/render/geometry/nova-path-geometry.d.ts +24 -0
  401. package/dist/model/render/geometry/nova-path-tessellation.d.ts +7 -0
  402. package/dist/model/render/geometry/nova-polygon-triangulation.d.ts +1 -1
  403. package/dist/model/render/graph/NovaRectBatchBuffer.d.ts +58 -0
  404. package/dist/model/render/graph/NovaRenderGraph.d.ts +40 -6
  405. package/dist/model/render/graph/NovaRenderHitIndex.d.ts +1 -1
  406. package/dist/model/render/graph/nova-auto-rect.d.ts +1 -1
  407. package/dist/model/render/graph/nova-linear-rect-repack.d.ts +4 -4
  408. package/dist/model/render/graph/nova-linear-rect-transition.d.ts +2 -2
  409. package/dist/model/render/graph/nova-render-culling.d.ts +2 -2
  410. package/dist/model/render/graph/nova-render-dirty-items.d.ts +1 -1
  411. package/dist/model/render/graph/nova-render-group.d.ts +1 -1
  412. package/dist/model/render/graph/nova-render-item.d.ts +2 -2
  413. package/dist/model/render/graph/nova-render-layer.d.ts +1 -1
  414. package/dist/model/render/graph/nova-render-payload-snapshot.d.ts +3 -1
  415. package/dist/model/render/graph/nova-render-program.d.ts +5 -3
  416. package/dist/model/render/graph/nova-render-sequence.d.ts +1 -1
  417. package/dist/model/render/graph/nova-render-stream.d.ts +2 -2
  418. package/dist/model/render/ktx2/BasisSession.d.ts +45 -0
  419. package/dist/model/render/ktx2/KTX2Container.d.ts +26 -0
  420. package/dist/model/render/ktx2/KTX2Loader.d.ts +55 -0
  421. package/dist/model/render/meshes/MeshNode.d.ts +13 -0
  422. package/dist/model/render/meshes/NovaMeshWebGLDevice.d.ts +27 -0
  423. package/dist/model/render/meshes/geometry.d.ts +7 -0
  424. package/dist/model/render/meshes/mesh.d.ts +3 -0
  425. package/dist/model/render/meshes/mesh.types.d.ts +116 -0
  426. package/dist/model/render/meshes/nova-mesh-registry.d.ts +55 -0
  427. package/dist/model/render/orchestration/NovaRenderOrchestrator.d.ts +25 -3
  428. package/dist/model/render/policy/nova-render-policy.d.ts +1 -1
  429. package/dist/model/render/resources/NovaGlyphAtlasManager.d.ts +2 -2
  430. package/dist/model/render/resources/NovaTextAtlasManager.d.ts +3 -3
  431. package/dist/model/render/resources/NovaTextLayoutEngine.d.ts +1 -1
  432. package/dist/model/render/resources/nova-bitmap-upload.d.ts +10 -0
  433. package/dist/model/render/schema/NovaRenderContext.d.ts +6 -4
  434. package/dist/model/render/schema/nova-style-compiler.d.ts +5 -2
  435. package/dist/model/render/targets/NovaNodeRenderTextureSource.d.ts +29 -0
  436. package/dist/model/render/targets/NovaRenderTargetManager.d.ts +1 -1
  437. package/dist/model/render/targets/NovaRenderTexture.d.ts +57 -0
  438. package/dist/model/render/targets/nova-render-target-refs.d.ts +5 -0
  439. package/dist/model/render/targets/nova-render-target-resource.d.ts +1 -1
  440. package/dist/model/render/targets/nova-render-texture-runtime.d.ts +71 -0
  441. package/dist/model/render/textures/nova-compressed-image.d.ts +20 -0
  442. package/dist/model/render/utils/nova-icon-rendering.d.ts +3 -1
  443. package/dist/model/render/utils/nova-image-geometry.d.ts +11 -0
  444. package/dist/model/render/utils/nova-markdown-layout.d.ts +19 -0
  445. package/dist/model/render/utils/nova-text-paint.d.ts +26 -0
  446. package/dist/model/render/utils/nova-wrapped-text-layout.d.ts +19 -0
  447. package/dist/model/runtime/app/Nova.d.ts +35 -35
  448. package/dist/model/runtime/app/NovaApp.d.ts +58 -30
  449. package/dist/model/runtime/app/NovaRaphRuntime.d.ts +2 -2
  450. package/dist/model/runtime/app/createNovaRaphRuntime.d.ts +3 -3
  451. package/dist/model/runtime/assets/NovaAssetRegistry.d.ts +89 -2
  452. package/dist/model/runtime/assets/NovaVideoTexture.d.ts +38 -0
  453. package/dist/model/runtime/assets/nova-render-texture-image-identity.d.ts +4 -0
  454. package/dist/model/runtime/commands/NovaCommandBus.d.ts +1 -1
  455. package/dist/model/runtime/components/NovaComponentNode.d.ts +6 -6
  456. package/dist/model/runtime/components/NovaComponentRegistry.d.ts +1 -1
  457. package/dist/model/runtime/components/NovaSchemaRegistry.d.ts +7 -6
  458. package/dist/model/runtime/components/nova-component-metadata.d.ts +1 -1
  459. package/dist/model/runtime/components/nova-component.decorator.d.ts +2 -2
  460. package/dist/model/runtime/components/nova-defined-component.d.ts +3 -3
  461. package/dist/model/runtime/context/nova-context.d.ts +1 -1
  462. package/dist/model/runtime/cursor/NovaCursorManager.d.ts +3 -3
  463. package/dist/model/runtime/diagnostics/NovaDiagnostics_Module.d.ts +3 -3
  464. package/dist/model/runtime/interaction/NovaEvents.d.ts +16 -6
  465. package/dist/model/runtime/interaction/NovaHitIndex.d.ts +1 -1
  466. package/dist/model/runtime/interaction/NovaSpatialIndex.d.ts +2 -2
  467. package/dist/model/runtime/scene/NovaScene.d.ts +3 -3
  468. package/dist/model/runtime/scene/nova-scene-components.d.ts +6 -6
  469. package/dist/model/runtime/state/nova-store-decorators.d.ts +1 -1
  470. package/dist/model/runtime/state/nova-store-runtime.d.ts +1 -1
  471. package/dist/model/runtime/state/nova-store-tracking.d.ts +7 -3
  472. package/dist/model/runtime/sync/NovaSyncScope.d.ts +11 -2
  473. package/dist/model/runtime/sync/nova-sync-context.d.ts +2 -2
  474. package/dist/model/runtime/sync/nova-sync-ports.d.ts +2 -2
  475. package/dist/model/runtime/sync/nova-sync.types.d.ts +15 -3
  476. package/dist/model/runtime/template/NovaTemplateRuntime.d.ts +6 -6
  477. package/dist/model/runtime/tree/NovaContainer.d.ts +4 -4
  478. package/dist/model/runtime/tree/NovaNode.d.ts +58 -18
  479. package/dist/model/runtime/tree/NovaRaphNode.d.ts +8 -2
  480. package/dist/model/runtime/tree/NovaSurface.d.ts +32 -10
  481. package/dist/model/runtime/tree/nova-node-capture-invalidation.d.ts +11 -0
  482. package/dist/model/semantic/NovaSemanticService.d.ts +1 -1
  483. package/dist/model/semantic/browser/createAccessibilityBridge.d.ts +29 -0
  484. package/dist/model/sound/NovaSoundEngine.d.ts +3 -2
  485. package/dist/model/text-selection/NovaTextSelectionService.d.ts +2 -2
  486. package/dist/model/text-selection/index.d.ts +2 -2
  487. package/dist/model/text-selection/nova-text-selection.types.d.ts +1 -1
  488. package/dist/model/theme/NovaGlobalThemeRegistry.d.ts +2 -2
  489. package/dist/model/theme/NovaThemeService.d.ts +5 -3
  490. package/dist/model/theme/createTokenTheme.d.ts +15 -0
  491. package/dist/model/tools/transform-tools.d.ts +43 -0
  492. package/dist/nodes--Ds4IS2h.js +621 -0
  493. package/dist/nova-color-parser-BCN_rFRN.js +250 -0
  494. package/dist/nova-compressed-image-CE2Ya9Xa.js +46 -0
  495. package/dist/nova-mesh-registry-B7Xz5mhU.js +24 -0
  496. package/dist/nova-render-texture-image-identity-DQ09XFKs.js +15 -0
  497. package/dist/nova-text-paint-CcntsRjI.js +48 -0
  498. package/dist/tokens.d.ts +2 -0
  499. package/dist/tokens.js +50 -0
  500. package/dist/vec4-BTNv1fUp.js +20 -0
  501. package/package.json +223 -4
@@ -0,0 +1,13 @@
1
+ /** zlib inflate through DecompressionStream into exactly `expected` bytes. */
2
+ export declare function exrInflate3D(source: Uint8Array, expected: number): Promise<Uint8Array>;
3
+ /** ZIP and ZIPS: zlib, then predictor and interleave. */
4
+ export declare function exrZip3D(source: Uint8Array, expected: number): Promise<Uint8Array>;
5
+ /** RLE: signed counts (negative: literal run), then predictor and interleave. */
6
+ export declare function exrRLE3D(source: Uint8Array, expected: number): Uint8Array;
7
+ /**
8
+ * PXR24: zlib of per-channel byte planes with horizontal differences; floats
9
+ * keep their top 24 bits. `types`: 0 uint, 1 half, 2 float per channel.
10
+ */
11
+ export declare function exrPXR24(source: Uint8Array, width: number, lines: number, types: readonly number[], expected: number): Promise<Uint8Array>;
12
+ /** PIZ block; `words`: 16-bit words per sample of each channel (1 half, 2 float/uint). */
13
+ export declare function exrPIZ3D(source: Uint8Array, width: number, lines: number, words: readonly number[], expected: number): Uint8Array;
@@ -0,0 +1,39 @@
1
+ import { Nova3DWarning } from '../Errors.js';
2
+ import { HDRImage3D, LoaderInput3D, LoaderLoadOptions3D, LoaderParseOptions3D } from './LoaderIO.js';
3
+ /**
4
+ * EXR compression names.
5
+ * @experimental
6
+ */
7
+ export type EXRCompression3D = 'none' | 'rle' | 'zips' | 'zip' | 'piz' | 'pxr24';
8
+ /**
9
+ * Parsed OpenEXR image.
10
+ * @experimental
11
+ */
12
+ export interface EXRImage3D extends HDRImage3D {
13
+ /** Channel names in file order. */
14
+ readonly channels: readonly string[];
15
+ readonly compression: EXRCompression3D;
16
+ /** Channels outside R, G, B, A and Y, which the parser skips. */
17
+ readonly warnings: readonly Nova3DWarning[];
18
+ }
19
+ /**
20
+ * EXR parser options.
21
+ * @experimental
22
+ */
23
+ export interface EXRParseOptions3D extends LoaderParseOptions3D {
24
+ signal?: AbortSignal;
25
+ }
26
+ /**
27
+ * Parses a single-part scanline OpenEXR file: UINT, HALF and FLOAT channels,
28
+ * RGB(A) or Y, compressions NONE, RLE, ZIPS, ZIP, PIZ and PXR24. ZIP and PXR24
29
+ * inflate through DecompressionStream, so parsing is asynchronous. Output is
30
+ * linear RGBA float32, row 0 at the data-window top; a missing alpha is 1.
31
+ * Tiled, deep, multi-part, subsampled and B44/DWA files are rejected.
32
+ * @experimental
33
+ */
34
+ export declare function parseEXR(data: LoaderInput3D, options?: EXRParseOptions3D): Promise<EXRImage3D>;
35
+ /**
36
+ * Fetches and parses an OpenEXR file.
37
+ * @experimental
38
+ */
39
+ export declare function loadEXR(url: string | URL, options?: LoaderLoadOptions3D): Promise<EXRImage3D>;
@@ -0,0 +1,26 @@
1
+ import { Nova3DWarning } from '../Errors.js';
2
+ import { HDRImage3D, LoaderInput3D, LoaderLoadOptions3D, LoaderParseOptions3D } from './LoaderIO.js';
3
+ /**
4
+ * Parsed Radiance RGBE image.
5
+ * @experimental
6
+ */
7
+ export interface RGBEImage3D extends HDRImage3D {
8
+ /** `EXPOSURE=` product, 1 when absent; pixels are not rescaled. */
9
+ readonly exposure: number;
10
+ /** `GAMMA=`, 1 when absent. */
11
+ readonly gamma: number;
12
+ /** Always empty: Radiance HDR has nothing the parser skips. Present like on every load result. */
13
+ readonly warnings: readonly Nova3DWarning[];
14
+ }
15
+ /**
16
+ * Parses a Radiance `.hdr` (RGBE, `-Y h +X w` or `+Y h +X w`) with adaptive RLE
17
+ * or flat scanlines into linear RGBA float32, row 0 at the image top. XYZE and
18
+ * old-style RLE are rejected.
19
+ * @experimental
20
+ */
21
+ export declare function parseHDR(data: LoaderInput3D, options?: LoaderParseOptions3D): Promise<RGBEImage3D>;
22
+ /**
23
+ * Fetches and parses a Radiance `.hdr` file.
24
+ * @experimental
25
+ */
26
+ export declare function loadHDR(url: string | URL, options?: LoaderLoadOptions3D): Promise<RGBEImage3D>;
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Budgets every loader checks before it allocates, against hostile or oversized
3
+ * input. One type for all loaders: each reads the fields it applies and ignores the
4
+ * rest; the defaults per loader are listed on each field. All values are positive
5
+ * safe integers.
6
+ * @experimental
7
+ */
8
+ export interface Limits3D {
9
+ /**
10
+ * Bytes of the input file, archive or text (text counts UTF-16 code units).
11
+ * Default 256 MiB (OBJ, STL, PLY, MTL, HDR, EXR, FBX, USDZ), 1 GiB (splats),
12
+ * 16 MiB (documents).
13
+ */
14
+ maxInputBytes?: number;
15
+ /** Bytes of the glTF JSON (or GLB JSON chunk). Default 8 MiB. */
16
+ maxJSONBytes?: number;
17
+ /** Bytes of all glTF buffers together. Default 256 MiB. */
18
+ maxBufferBytes?: number;
19
+ /** Bytes of all accessor data a glTF asset reads. Default 256 MiB. */
20
+ maxAccessorBytes?: number;
21
+ /** Encoded bytes of all images together (one image for `loadTexture`). Default 256 MiB. */
22
+ maxEncodedImageBytes?: number;
23
+ /**
24
+ * Decoded bytes of all images together: RGBA8 is 4 bytes per pixel, HDR and EXR 16.
25
+ * Default 512 MiB (glTF, FBX, USDZ, textures, HDR, EXR), 8 MiB (document textures).
26
+ */
27
+ maxDecodedImageBytes?: number;
28
+ /** Image width or height in pixels. Default 8192 (glTF, FBX, USDZ, textures), 16384 (HDR, EXR). */
29
+ maxImageDimension?: number;
30
+ /** Scene nodes (glTF nodes, cameras, lights, skins, scenes; document nodes). Default 10 000. */
31
+ maxNodes?: number;
32
+ /**
33
+ * Geometry parts: glTF mesh primitives (also the count of meshes, images, textures,
34
+ * samplers and materials), OBJ objects or groups, STL solids. Default 10 000.
35
+ */
36
+ maxParts?: number;
37
+ /** Output vertices of all parts. Default 1 000 000 (glTF, FBX, USDZ), 4 000 000 (OBJ, STL, PLY). */
38
+ maxVertices?: number;
39
+ /** Output triangles, line segments and points of all parts (OBJ, STL, PLY). Default 8 000 000. */
40
+ maxPrimitives?: number;
41
+ /** FBX node records, USD prims plus properties, or ZIP entries. Default 2 000 000. */
42
+ maxRecords?: number;
43
+ /** Bytes of inflated FBX arrays, splat files and archive entries together. Default 512 MiB. */
44
+ maxDecompressedBytes?: number;
45
+ /** Sampled animation keys of FBX and USDZ. Default 4 000 000. */
46
+ maxAnimationKeys?: number;
47
+ /** Gaussian splats. Default 4 194 304 (2048²); never above `MAX_SPLATS`. */
48
+ maxSplats?: number;
49
+ /** Document resources. Default 2048. */
50
+ maxResources?: number;
51
+ /** Depth of the document node tree. Default 128. */
52
+ maxDepth?: number;
53
+ /** Numbers of all document geometry arrays together. Default 2 000 000. */
54
+ maxGeometryValues?: number;
55
+ }
56
+ export declare const limitKeys3D: ReadonlySet<string>;
57
+ /** Default image budgets shared by glTF, FBX, USDZ and `loadTexture`: the Khronos FlightHelmet loads with them. */
58
+ export declare const defaultImageLimits3D: Readonly<{
59
+ maxEncodedImageBytes: number;
60
+ maxDecodedImageBytes: number;
61
+ }>;
62
+ /**
63
+ * Validates `limits` (known keys, positive safe integers) and returns `defaults`
64
+ * with the given values applied; a loader passes the defaults of the fields it reads.
65
+ */
66
+ export declare function resolveLimits3D<K extends keyof Limits3D>(limits: Limits3D | undefined, defaults: {
67
+ readonly [P in K]: number;
68
+ }, label?: string): {
69
+ [P in K]: number;
70
+ };
@@ -0,0 +1,42 @@
1
+ /** Growable float32 column. */
2
+ export declare class FloatList3D {
3
+ data: Float32Array;
4
+ length: number;
5
+ constructor(capacity?: number);
6
+ reserve(extra: number): void;
7
+ push2(a: number, b: number): void;
8
+ push3(a: number, b: number, c: number): void;
9
+ push4(a: number, b: number, c: number, d: number): void;
10
+ /** Appends `count` copies of a value. */
11
+ fill(value: number, count: number): void;
12
+ /** Exact-size copy. */
13
+ take(): Float32Array;
14
+ }
15
+ /** Growable uint32 column. */
16
+ export declare class IndexList3D {
17
+ data: Uint32Array;
18
+ length: number;
19
+ constructor(capacity?: number);
20
+ push(value: number): void;
21
+ }
22
+ /**
23
+ * Open-addressing map from an integer triple (each ≥ -1) to a vertex index.
24
+ * Grows at 50% load, so probes stay short.
25
+ */
26
+ export declare class TripleMap3D {
27
+ private _keys;
28
+ private _values;
29
+ private _mask;
30
+ private _size;
31
+ constructor(capacity?: number);
32
+ /** Index stored for the triple, or the new `value` after inserting it. */
33
+ getOrSet(a: number, b: number, c: number, value: number): number;
34
+ private _hash;
35
+ private _grow;
36
+ }
37
+ /** 16-bit indices when every index fits, otherwise 32-bit; always a copy. */
38
+ export declare function packIndices3D(source: Uint32Array, length: number, vertexCount: number): Uint16Array | Uint32Array;
39
+ /** Area-weighted smooth normals of an indexed or plain triangle list. */
40
+ export declare function smoothNormals3D(positions: Float32Array, indices: ArrayLike<number> | null, count: number): Float32Array;
41
+ /** Normalizes xyz triples in place; zero vectors become +Z. */
42
+ export declare function normalize3D(normals: Float32Array, start: number, end: number): void;
@@ -0,0 +1,81 @@
1
+ import { GeometryOptions3D } from '../types.js';
2
+ import { Limits3D } from './Limits.js';
3
+ /**
4
+ * Options shared by every pure parser. The OBJ, STL, PLY, MTL, HDR and EXR parsers
5
+ * read `maxInputBytes`, `maxVertices`, `maxPrimitives`, `maxParts`,
6
+ * `maxDecodedImageBytes` and `maxImageDimension` of `limits`.
7
+ * @experimental
8
+ */
9
+ export interface LoaderParseOptions3D {
10
+ limits?: Limits3D;
11
+ }
12
+ /**
13
+ * Options shared by every URL loader.
14
+ * @experimental
15
+ */
16
+ export interface LoaderLoadOptions3D extends LoaderParseOptions3D {
17
+ signal?: AbortSignal;
18
+ }
19
+ export declare const parseKeys3D: ReadonlySet<string>;
20
+ export declare const loadKeys3D: ReadonlySet<string>;
21
+ /** Checks the keys of parser or loader options; `undefined` passes. */
22
+ export declare function loaderOptions3D<T extends object>(options: T | undefined, keys: ReadonlySet<string>, label: string): T;
23
+ /**
24
+ * One geometry of a parsed model with the material it names.
25
+ * @experimental
26
+ */
27
+ export interface MeshPart3D {
28
+ /** Group, object or solid name; empty when the file has none. */
29
+ readonly name: string;
30
+ /** Material name (OBJ `usemtl`), or null. */
31
+ readonly material: string | null;
32
+ readonly geometry: GeometryOptions3D;
33
+ }
34
+ /**
35
+ * Parsed model: geometry parts for `createModelAsset`.
36
+ * @experimental
37
+ */
38
+ export interface MeshData3D {
39
+ readonly parts: readonly MeshPart3D[];
40
+ }
41
+ /**
42
+ * Linear HDR image: RGBA float32, row 0 is the image top. Values are the file
43
+ * values and may exceed the half-float range; `createHDRTexture` clamps.
44
+ * @experimental
45
+ */
46
+ export interface HDRImage3D {
47
+ readonly width: number;
48
+ readonly height: number;
49
+ readonly data: Float32Array;
50
+ }
51
+ /** @experimental */
52
+ export type LoaderInput3D = string | Uint8Array | ArrayBuffer;
53
+ declare const defaults: Readonly<{
54
+ maxInputBytes: number;
55
+ maxVertices: 4000000;
56
+ maxPrimitives: 8000000;
57
+ maxParts: 10000;
58
+ maxDecodedImageBytes: number;
59
+ maxImageDimension: 16384;
60
+ }>;
61
+ /** Limits of the file loaders after defaults. */
62
+ export type LoaderLimits3D = {
63
+ readonly [K in keyof typeof defaults]: number;
64
+ };
65
+ /** Validated limits with defaults. */
66
+ export declare function loaderLimits3D(limits: Limits3D | undefined): LoaderLimits3D;
67
+ /** Whether the input is a Uint8Array or ArrayBuffer of any realm. */
68
+ export declare function isBytes3D(data: unknown): data is Uint8Array | ArrayBuffer;
69
+ /** Bytes as a view of this realm; a foreign Uint8Array (iframe) is copied so internal type checks hold. */
70
+ export declare function byteView3D(data: Uint8Array | ArrayBuffer): Uint8Array;
71
+ /** Byte view of the input without copying; text is UTF-8 encoded. */
72
+ export declare function loaderBytes3D(data: LoaderInput3D, maxBytes: number, format: string): Uint8Array;
73
+ /** Text of a text-format input, bounded before decoding. */
74
+ export declare function loaderText3D(data: LoaderInput3D, maxBytes: number, format: string): string;
75
+ /** Absolute URL of a load request, resolved against the document base when present. */
76
+ export declare function loaderURL3D(url: string | URL, base?: string): URL;
77
+ /** Fetches a resource with a streaming byte budget and abort support. */
78
+ export declare function loaderFetch3D(url: URL, maxBytes: number, signal: AbortSignal | undefined, format: string): Promise<Uint8Array>;
79
+ /** Checks float RGBA image dimensions (16 bytes per pixel) against the image limits before allocation. */
80
+ export declare function loaderImageSize3D(width: number, height: number, limits: LoaderLimits3D, format: string): void;
81
+ export {};
@@ -0,0 +1,80 @@
1
+ import { Nova3DEnvironment } from '../model/Environment.js';
2
+ import { MaterialOptions3D } from '../model/Material.js';
3
+ import { ImageTextureOptions3D, Nova3DTexture, TextureOptions3D, TextureSamplerOptions3D } from '../model/Texture.js';
4
+ import { Nova3DApp } from '../Nova3DApp.js';
5
+ import { Limits3D } from './Limits.js';
6
+ import { HDRImage3D, MeshData3D } from './LoaderIO.js';
7
+ import { MTLData3D } from './MTLLoader.js';
8
+ import { Nova3DModelAsset } from '../import/ModelAsset.js';
9
+ /**
10
+ * Texture data of `createModelAsset` and `loadMTLTextures`: pixels or a browser image.
11
+ * @experimental
12
+ */
13
+ export type TextureSource3D = TextureOptions3D | ImageTextureOptions3D;
14
+ /**
15
+ * Options of `createModelAsset`.
16
+ * @experimental
17
+ */
18
+ export interface ModelAssetOptions3D {
19
+ /**
20
+ * Material of triangle parts without an MTL material; default Phong white. Its maps
21
+ * must be textures of no app: pass map pixels through `textures` and an MTL library instead.
22
+ */
23
+ material?: MaterialOptions3D;
24
+ /** MTL library of OBJ parts; default `data.materials` of an OBJ. */
25
+ materials?: MTLData3D;
26
+ /** Texture sources by MTL path, e.g. from `loadMTLTextures`; the asset creates and owns the textures. */
27
+ textures?: ReadonlyMap<string, TextureSource3D>;
28
+ }
29
+ /**
30
+ * Options of `loadMTLTextures`.
31
+ * @experimental
32
+ */
33
+ export interface MTLTextureLoadOptions3D {
34
+ /** Base of relative paths; default `materials.baseUrl`, then the document. */
35
+ baseUrl?: string;
36
+ signal?: AbortSignal;
37
+ /** Image budgets of each texture, as for `app.loadTexture`. */
38
+ limits?: Limits3D;
39
+ }
40
+ /**
41
+ * Options of `createHDREnvironment`.
42
+ * @experimental
43
+ */
44
+ export interface HDREnvironmentOptions3D {
45
+ intensity?: number;
46
+ /** Rotation about world Y in radians. */
47
+ rotation?: number;
48
+ sampler?: TextureSamplerOptions3D;
49
+ }
50
+ /**
51
+ * Model asset of parsed parts (OBJ, STL, PLY or your own `MeshData3D`): one node per
52
+ * part under the model root. Triangle parts of an OBJ use its MTL materials (through
53
+ * `mtlMaterialOptions`, maps from `textures`), other triangle parts `options.material`
54
+ * (default Phong); line and point parts use unlit basic materials. Needs no app: the
55
+ * first `instantiate` binds the asset to the scene's app.
56
+ * @experimental
57
+ */
58
+ export declare function createModelAsset(data: MeshData3D, options?: ModelAssetOptions3D): Nova3DModelAsset;
59
+ /**
60
+ * Loads and decodes every texture an MTL library names, once per path: colour maps as
61
+ * sRGB, data maps as linear. Needs no app: pass the result to `createModelAsset`.
62
+ * Fails as a whole; cancel with `signal`.
63
+ * @experimental
64
+ */
65
+ export declare function loadMTLTextures(materials: MTLData3D, options?: MTLTextureLoadOptions3D): Promise<Map<string, TextureOptions3D>>;
66
+ /**
67
+ * RGBA16F linear texture of an HDR or EXR image. Defaults suit an equirectangular
68
+ * source: linear filtering, no mipmaps, repeat in U and clamp in V.
69
+ * The texture is owned by the app: destroyed with it.
70
+ * @experimental
71
+ */
72
+ export declare function createHDRTexture(app: Nova3DApp, image: HDRImage3D, options?: TextureSamplerOptions3D): Nova3DTexture;
73
+ /**
74
+ * Environment lit by an equirectangular HDR or EXR image. The environment keeps
75
+ * its source texture (`environment.source`); destroy the environment first, then
76
+ * the texture.
77
+ * The environment and its source texture are owned by the app: destroyed with it.
78
+ * @experimental
79
+ */
80
+ export declare function createHDREnvironment(app: Nova3DApp, image: HDRImage3D, options?: HDREnvironmentOptions3D): Nova3DEnvironment;
@@ -0,0 +1,27 @@
1
+ /** Splits text into lines of whitespace-separated tokens without per-token strings. */
2
+ export declare class TextLines3D {
3
+ readonly text: string;
4
+ private readonly _format;
5
+ private readonly _comments;
6
+ /** 1-based number of the current line. */
7
+ line: number;
8
+ /** Tokens on the current line. */
9
+ count: number;
10
+ starts: Int32Array<ArrayBuffer>;
11
+ ends: Int32Array<ArrayBuffer>;
12
+ private _position;
13
+ private _lineEnd;
14
+ constructor(text: string, _format: string, _comments?: boolean, start?: number);
15
+ /** Character offset after the current line. */
16
+ get position(): number;
17
+ /** Moves to the next line with tokens; false at the end of the text. */
18
+ next(): boolean;
19
+ token(index: number): string;
20
+ /** Case-insensitive comparison with a lower-case ASCII word. */
21
+ is(index: number, word: string): boolean;
22
+ /** Remaining text of the line from a token, trimmed. */
23
+ rest(index: number): string;
24
+ /** Finite number token. */
25
+ number(index: number): number;
26
+ fail(message: string): never;
27
+ }
@@ -0,0 +1,105 @@
1
+ import { Nova3DWarning } from '../Errors.js';
2
+ import { MaterialOptions3D } from '../model/Material.js';
3
+ import { Nova3DTexture } from '../model/Texture.js';
4
+ import { Vector3D } from '../types.js';
5
+ import { LoaderInput3D, LoaderLoadOptions3D, LoaderParseOptions3D } from './LoaderIO.js';
6
+ /**
7
+ * One MTL texture statement.
8
+ * @experimental
9
+ */
10
+ export interface MTLTexture3D {
11
+ /** Path as written, with `\` turned into `/`. */
12
+ readonly path: string;
13
+ /** `-o u v`; default [0, 0]. */
14
+ readonly offset: readonly [number, number];
15
+ /** `-s u v`; default [1, 1]. */
16
+ readonly scale: readonly [number, number];
17
+ /** `-bm`; default 1. */
18
+ readonly bumpScale: number;
19
+ /** `-clamp on`. */
20
+ readonly clamp: boolean;
21
+ }
22
+ /**
23
+ * MTL texture slots.
24
+ * @experimental
25
+ */
26
+ export type MTLMapSlot3D = 'diffuse' | 'ambient' | 'specular' | 'emissive' | 'shininess' | 'alpha' | 'bump' | 'normal' | 'displacement' | 'roughness' | 'metalness';
27
+ /**
28
+ * One `newmtl` block; colours are the file values (sRGB, as three.js reads them).
29
+ * @experimental
30
+ */
31
+ export interface MTLMaterial3D {
32
+ readonly name: string;
33
+ readonly ambient?: Vector3D;
34
+ readonly diffuse?: Vector3D;
35
+ readonly specular?: Vector3D;
36
+ readonly emissive?: Vector3D;
37
+ /** `Ns`. */
38
+ readonly shininess?: number;
39
+ /** `d`, or 1 − `Tr`. */
40
+ readonly opacity?: number;
41
+ /** `Ni`. */
42
+ readonly ior?: number;
43
+ readonly illum?: number;
44
+ /** `Pr` (PBR extension). */
45
+ readonly roughness?: number;
46
+ /** `Pm` (PBR extension). */
47
+ readonly metalness?: number;
48
+ readonly maps: Readonly<Partial<Record<MTLMapSlot3D, MTLTexture3D>>>;
49
+ }
50
+ /**
51
+ * Parsed MTL library.
52
+ * @experimental
53
+ */
54
+ export interface MTLData3D {
55
+ readonly materials: ReadonlyMap<string, MTLMaterial3D>;
56
+ /** Base URL of texture paths, set by `loadMTL`/`loadOBJ` or the parse option. */
57
+ readonly baseUrl?: string;
58
+ /** Statements the parser ignored. */
59
+ readonly warnings: readonly Nova3DWarning[];
60
+ }
61
+ /**
62
+ * MTL parser options.
63
+ * @experimental
64
+ */
65
+ export interface MTLParseOptions3D extends LoaderParseOptions3D {
66
+ baseUrl?: string;
67
+ }
68
+ /**
69
+ * Options of `mtlMaterialOptions`.
70
+ * @experimental
71
+ */
72
+ export interface MTLConversionOptions3D {
73
+ /** Map transforms for UVs stored with v' = 1 − v (the OBJ parser default). Default true. */
74
+ flipV?: boolean;
75
+ }
76
+ /**
77
+ * Textures of an MTL library keyed by `MTLTexture3D.path`.
78
+ * @experimental
79
+ */
80
+ export type MTLTextures3D = ReadonlyMap<string, Nova3DTexture>;
81
+ /**
82
+ * Parses an MTL library: Ka, Kd, Ks, Ke, Ns, Ni, d, Tr, illum, Pr, Pm and the
83
+ * map_Kd, map_Ka, map_Ks, map_Ke, map_Ns, map_d, map_Bump/bump, norm, disp,
84
+ * map_Pr and map_Pm textures with -o/-s/-bm/-clamp.
85
+ * @experimental
86
+ */
87
+ export declare function parseMTL(data: LoaderInput3D, options?: MTLParseOptions3D): Promise<MTLData3D>;
88
+ /**
89
+ * Fetches and parses an MTL library; texture paths resolve next to it.
90
+ * @experimental
91
+ */
92
+ export declare function loadMTL(url: string | URL, options?: LoaderLoadOptions3D): Promise<MTLData3D>;
93
+ /** Merges libraries; later names replace earlier ones. */
94
+ export declare function mergeMTL3D(libraries: readonly MTLData3D[]): MTLData3D;
95
+ /**
96
+ * Nova material options of an MTL material. Phong (three.js MeshPhongMaterial,
97
+ * Babylon StandardMaterial) unless the PBR extension (Pr, Pm, map_Pr, map_Pm) is
98
+ * present, then PBR. Kd and Ke are sRGB and become linear factors, Ks the sRGB `specularColor`; `d`/`Tr` < 1 or
99
+ * map_d blends using the base map alpha; map_Bump/bump/norm feed the normal map
100
+ * (Babylon semantics); map_Pr/map_Pm feed the metal-rough map only when they name
101
+ * one file (glTF packing: G roughness, B metalness); illum 0/1 drop specular.
102
+ * Textures are looked up by path; missing ones are skipped.
103
+ * @experimental
104
+ */
105
+ export declare function mtlMaterialOptions(material: MTLMaterial3D, textures?: MTLTextures3D, options?: MTLConversionOptions3D): MaterialOptions3D;
@@ -0,0 +1,70 @@
1
+ import { Nova3DWarning } from '../Errors.js';
2
+ import { LoaderInput3D, LoaderLoadOptions3D, LoaderParseOptions3D, MeshData3D, MeshPart3D } from './LoaderIO.js';
3
+ import { MTLData3D } from './MTLLoader.js';
4
+ /**
5
+ * OBJ parser options.
6
+ * @experimental
7
+ */
8
+ export interface OBJParseOptions3D extends LoaderParseOptions3D {
9
+ /**
10
+ * Stores v' = 1 − v so bottom-origin OBJ UVs sample row-0-top Nova textures
11
+ * upright (Babylon INVERT_TEXTURE_Y). Default true.
12
+ */
13
+ flipV?: boolean;
14
+ /**
15
+ * Normals of face corners without `vn`: 'flat' per polygon (default, as three.js),
16
+ * 'smooth' area-weighted per shared vertex (as Babylon), or 'none'.
17
+ */
18
+ normals?: 'flat' | 'smooth' | 'none';
19
+ /**
20
+ * 'group' (default): one part per object, group, material and topology.
21
+ * 'material': groups sharing a material merge into one part (fewer draw calls).
22
+ */
23
+ split?: 'group' | 'material';
24
+ }
25
+ /**
26
+ * OBJ load options.
27
+ * @experimental
28
+ */
29
+ export interface OBJLoadOptions3D extends OBJParseOptions3D, LoaderLoadOptions3D {
30
+ /** Fetches and parses the `mtllib` files next to the OBJ. Default true. */
31
+ materials?: boolean;
32
+ }
33
+ /**
34
+ * One OBJ geometry part.
35
+ * @experimental
36
+ */
37
+ export interface OBJPart3D extends MeshPart3D {
38
+ /** Last `o` name, or empty. */
39
+ readonly object: string;
40
+ /** Last `g` name, or empty. */
41
+ readonly group: string;
42
+ }
43
+ /**
44
+ * Parsed OBJ.
45
+ * @experimental
46
+ */
47
+ export interface OBJData3D extends MeshData3D {
48
+ readonly parts: readonly OBJPart3D[];
49
+ /** `mtllib` paths in file order. */
50
+ readonly materialLibraries: readonly string[];
51
+ /** Whether V was flipped; MTL texture offsets follow it. */
52
+ readonly flipV: boolean;
53
+ /** Materials fetched by `loadOBJ`. */
54
+ readonly materials?: MTLData3D;
55
+ /** Statements the parser ignored. */
56
+ readonly warnings: readonly Nova3DWarning[];
57
+ }
58
+ /**
59
+ * Parses Wavefront OBJ text: v (with optional r g b), vt, vn, f (negative
60
+ * indices, polygons as fans), l, p, o, g, usemtl and mtllib. Vertices are shared
61
+ * per part by their v/vt/vn triple; indices are 16-bit when they fit.
62
+ * @experimental
63
+ */
64
+ export declare function parseOBJ(data: LoaderInput3D, options?: OBJParseOptions3D): Promise<OBJData3D>;
65
+ /**
66
+ * Fetches and parses an OBJ; with `materials` (default) also its `mtllib` files,
67
+ * resolved next to the OBJ.
68
+ * @experimental
69
+ */
70
+ export declare function loadOBJ(url: string | URL, options?: OBJLoadOptions3D): Promise<OBJData3D>;
@@ -0,0 +1,47 @@
1
+ import { Nova3DWarning } from '../Errors.js';
2
+ import { LoaderInput3D, LoaderParseOptions3D, MeshData3D } from './LoaderIO.js';
3
+ /**
4
+ * PLY parser options.
5
+ * @experimental
6
+ */
7
+ export interface PLYParseOptions3D extends LoaderParseOptions3D {
8
+ /** Stores v' = 1 − v for row-0-top textures, as for OBJ. Default true. */
9
+ flipV?: boolean;
10
+ /** Normals of meshes without nx/ny/nz: 'smooth' (default) or 'none'. */
11
+ normals?: 'smooth' | 'none';
12
+ }
13
+ /**
14
+ * PLY load options: the parser options and an abort signal.
15
+ * @experimental
16
+ */
17
+ export interface PLYLoadOptions3D extends PLYParseOptions3D {
18
+ signal?: AbortSignal;
19
+ }
20
+ /**
21
+ * Parsed PLY.
22
+ * @experimental
23
+ */
24
+ export interface PLYData3D extends MeshData3D {
25
+ readonly format: 'ascii' | 'binary_little_endian' | 'binary_big_endian';
26
+ readonly comments: readonly string[];
27
+ /** Declared elements in file order. */
28
+ readonly elements: readonly {
29
+ readonly name: string;
30
+ readonly count: number;
31
+ }[];
32
+ /** Elements and properties the parser skips. */
33
+ readonly warnings: readonly Nova3DWarning[];
34
+ }
35
+ /**
36
+ * Parses PLY (ascii, binary_little_endian, binary_big_endian): vertex x y z,
37
+ * nx ny nz, s t / u v, red green blue alpha, and face vertex_indices lists of any
38
+ * integer type as fans. Other elements (edges, materials) are skipped. Without
39
+ * faces the result is a point cloud.
40
+ * @experimental
41
+ */
42
+ export declare function parsePLY(data: LoaderInput3D, options?: PLYParseOptions3D): Promise<PLYData3D>;
43
+ /**
44
+ * Fetches and parses a PLY file.
45
+ * @experimental
46
+ */
47
+ export declare function loadPLY(url: string | URL, options?: PLYLoadOptions3D): Promise<PLYData3D>;
@@ -0,0 +1,27 @@
1
+ import { Nova3DWarning } from '../Errors.js';
2
+ import { LoaderInput3D, LoaderLoadOptions3D, LoaderParseOptions3D, MeshData3D } from './LoaderIO.js';
3
+ /**
4
+ * Parsed STL.
5
+ * @experimental
6
+ */
7
+ export interface STLData3D extends MeshData3D {
8
+ readonly format: 'ascii' | 'binary';
9
+ /** Binary files with VisCAM/SolidView or Magics face colours carry vertex colours. */
10
+ readonly hasColors: boolean;
11
+ /** Always empty: STL has nothing the parser skips. Present like on every load result. */
12
+ readonly warnings: readonly Nova3DWarning[];
13
+ /** Magics `COLOR=` default colour (sRGB RGBA), when present. */
14
+ readonly defaultColor?: readonly [number, number, number, number];
15
+ }
16
+ /**
17
+ * Parses STL: binary (detected by its exact size, with VisCAM/SolidView or Magics
18
+ * face colours) or ASCII (one part per solid). Triangles are not shared; normals
19
+ * are flat, from the vertices, falling back to the file normal.
20
+ * @experimental
21
+ */
22
+ export declare function parseSTL(data: LoaderInput3D, options?: LoaderParseOptions3D): Promise<STLData3D>;
23
+ /**
24
+ * Fetches and parses an STL file.
25
+ * @experimental
26
+ */
27
+ export declare function loadSTL(url: string | URL, options?: LoaderLoadOptions3D): Promise<STLData3D>;
@@ -0,0 +1,33 @@
1
+ import { mat4 as Matrix4 } from 'gl-matrix';
2
+ import { CameraPatch3D, DepthPoint3D, Matrix3D, OrthographicCameraOptions3D, OrthographicProjection3D, PerspectiveCameraOptions3D, PerspectiveProjection3D, ProjectedPoint3D, Ray3D, ScreenPoint3D, ScreenSize3D, Vector3D } from '../types.js';
3
+ import { Nova3DScene } from './Scene.js';
4
+ import { Nova3DNode } from './Node.js';
5
+ /** @experimental */
6
+ export declare class Nova3DCamera extends Nova3DNode {
7
+ protected constructor();
8
+ readonly kind: 'perspective' | 'orthographic';
9
+ private _projection;
10
+ /** Patches the projection options of the camera's kind. */
11
+ set(patch: CameraPatch3D): void;
12
+ /** The projection options of the camera's kind. */
13
+ getOptions(): Readonly<PerspectiveProjection3D | OrthographicProjection3D>;
14
+ /** Explicit projection, e.g. a WebXR view's; null returns to the options. */
15
+ private _matrix;
16
+ /**
17
+ * Replaces the projection with an explicit column-major matrix (WebXR eyes, off-axis
18
+ * projections); the aspect is then ignored. Near and far follow the matrix for a
19
+ * perspective camera. null restores the option-driven projection.
20
+ * @experimental
21
+ */
22
+ setProjectionMatrix(matrix: Matrix3D | null): void;
23
+ getProjectionMatrix(aspect: number, out?: Matrix3D): Matrix3D;
24
+ getViewProjection(aspect: number): Matrix3D;
25
+ /** Projects a world point into `viewport` pixels (top-left origin). */
26
+ project(point: Vector3D, viewport: ScreenSize3D): ProjectedPoint3D;
27
+ /** World point of a `viewport` pixel at a depth in [0, 1]. */
28
+ unproject(point: DepthPoint3D, viewport: ScreenSize3D): Vector3D;
29
+ /** Ray from the near plane through a `viewport` pixel. */
30
+ screenRay(point: ScreenPoint3D, viewport: ScreenSize3D): Ray3D;
31
+ private _viewport;
32
+ private static _validate;
33
+ }