@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,14 @@
1
+ import { GeometryDeformationOptions3D } from '../../deformation/GeometryDeformation.js';
2
+ import { GeometryOptions3D } from '../../types.js';
3
+ interface AccessorValues3D {
4
+ values: Float64Array;
5
+ count: number;
6
+ components: number;
7
+ componentType: number;
8
+ normalized: boolean;
9
+ }
10
+ export type GLTFGeometryColumns3D = GeometryOptions3D & {
11
+ deformation?: GeometryDeformationOptions3D;
12
+ };
13
+ export declare function gltfGeometry3D(primitive: unknown, sharedAccessor: (index: unknown) => AccessorValues3D, maximumVertices: number): GLTFGeometryColumns3D;
14
+ export {};
@@ -0,0 +1,64 @@
1
+ import { Limits3D } from '../../loaders/Limits.js';
2
+ /**
3
+ * Resource request handed to `resolveResource`.
4
+ * @experimental
5
+ */
6
+ export interface ResolvedResource3D {
7
+ kind: 'buffer' | 'image' | 'container';
8
+ signal: AbortSignal;
9
+ baseUrl?: string;
10
+ maxBytes: number;
11
+ }
12
+ /** @experimental */
13
+ export type ResolveResource3D = (uri: string, options: ResolvedResource3D) => Promise<Uint8Array | ArrayBuffer>;
14
+ /**
15
+ * Resource options shared by the glTF, FBX and USDZ loaders. `limits` applies
16
+ * `maxJSONBytes`, `maxBufferBytes`, `maxAccessorBytes`, `maxEncodedImageBytes`,
17
+ * `maxDecodedImageBytes`, `maxImageDimension`, `maxNodes`, `maxParts` and `maxVertices`.
18
+ * @experimental
19
+ */
20
+ export interface GLTFIOOptions3D {
21
+ signal?: AbortSignal;
22
+ limits?: Limits3D;
23
+ resolveResource?: ResolveResource3D;
24
+ }
25
+ declare const defaults: Readonly<{
26
+ maxImageDimension: 8192;
27
+ maxNodes: 10000;
28
+ maxParts: 10000;
29
+ maxVertices: 1000000;
30
+ maxAccessorBytes: number;
31
+ maxEncodedImageBytes: number;
32
+ maxDecodedImageBytes: number;
33
+ maxJSONBytes: number;
34
+ maxBufferBytes: number;
35
+ }>;
36
+ /** glTF resource limits after defaults. */
37
+ export type GLTFLimits3D = {
38
+ readonly [K in keyof typeof defaults]: number;
39
+ };
40
+ /** Default glTF resource limits. @internal */
41
+ export declare const gltfDefaultLimits3D: GLTFLimits3D;
42
+ /** One bounded asynchronous load scope, aborted only by its `signal`. */
43
+ export declare class GLTFResourceIO3D {
44
+ private readonly _options;
45
+ readonly limits: GLTFLimits3D;
46
+ readonly signal: AbortSignal;
47
+ private readonly _controller;
48
+ private readonly _externalAbort;
49
+ private _bufferBytes;
50
+ private _imageEncodedBytes;
51
+ private _imageDecodedBytes;
52
+ private _accessorBytes;
53
+ constructor(_options: GLTFIOOptions3D);
54
+ check(): void;
55
+ wait<T>(work: Promise<T>): Promise<T>;
56
+ dispose(): void;
57
+ consumeBuffer(bytes: number): void;
58
+ consumeImageEncoded(bytes: number): void;
59
+ consumeImage(bytes: number): void;
60
+ consumeAccessor(bytes: number): void;
61
+ read(uri: string, kind: 'buffer' | 'image' | 'container', baseUrl?: string, maximum?: number): Promise<Uint8Array>;
62
+ private _consume;
63
+ }
64
+ export {};
@@ -0,0 +1,51 @@
1
+ import { mat4 as Matrix4 } from 'gl-matrix';
2
+ import { Nova3DGeometry } from '../model/Geometry.js';
3
+ import { Nova3DMaterial } from '../model/Material.js';
4
+ import { Nova3DMesh } from '../model/Mesh.js';
5
+ import { Nova3DNode } from '../model/Node.js';
6
+ import { Nova3DApp } from '../Nova3DApp.js';
7
+ import { Color3D } from '../types.js';
8
+ import { Nova3DScene } from '../model/Scene.js';
9
+ /** @internal */
10
+ export interface LinePart3D {
11
+ readonly geometry: Nova3DGeometry;
12
+ readonly material: Nova3DMaterial;
13
+ readonly mesh: Nova3DMesh;
14
+ /** Caller-owned scratch written by update() and uploaded as one partial range. */
15
+ readonly positions: Float32Array;
16
+ readonly columns: {
17
+ positions: Float32Array;
18
+ };
19
+ }
20
+ /** @internal */
21
+ export declare function helperOptions<T extends object>(options: T | undefined, name: string, keys: ReadonlySet<string>): Partial<T>;
22
+ /** @internal */
23
+ export declare function helperSize(value: number | undefined, fallback: number, name: string): number;
24
+ /** @internal */
25
+ export declare function helperColor(value: Color3D | undefined, fallback: Color3D): Color3D;
26
+ /** @internal */
27
+ export declare function sameMatrix(a: Matrix4 | Float32Array, b: Matrix4 | Float32Array): boolean;
28
+ /** Writes affine `matrix * point` for every xyz triple of `source` into `out`. @internal */
29
+ export declare function transformPoints(out: Float32Array, source: Float32Array, matrix: Matrix4): void;
30
+ /** Builds a closed circle of `segments` vertices in the plane spanned by axes `a` and `b`. @internal */
31
+ export declare function writeCircle(out: Float32Array, indices: Uint16Array, vertex: number, index: number, segments: number, radius: number, a: number, b: number, offset?: readonly [number, number, number]): void;
32
+ /**
33
+ * Base of every debug helper. Helpers render through the normal pipeline as unlit
34
+ * line meshes under one non-pickable `root` group placed at the scene root, and
35
+ * release their own nodes, geometry and materials, never the tracked object.
36
+ * @experimental
37
+ */
38
+ export declare abstract class Nova3DHelper {
39
+ protected constructor();
40
+ /** Root group of the helper; tracked helpers write world-space lines, so keep it at identity. */
41
+ readonly root: Nova3DNode;
42
+ private _destroyed;
43
+ private readonly _detach;
44
+ get visible(): boolean;
45
+ get destroyed(): boolean;
46
+ /** Recomputes lines from the tracked object; a no-op for static helpers. */
47
+ update(): void;
48
+ setVisible(visible: boolean): void;
49
+ /** Releases the helper's own nodes, geometry and materials, never the tracked object. */
50
+ destroy(): void;
51
+ }
@@ -0,0 +1,47 @@
1
+ import { Nova3DScene } from '../model/Scene.js';
2
+ import { Nova3DApp } from '../Nova3DApp.js';
3
+ import { Color3D } from '../types.js';
4
+ import { Nova3DHelper } from './LineHelper.js';
5
+ /** @experimental */
6
+ export interface AxesHelperOptions3D {
7
+ /** Length of every axis line in metres; defaults to 1. */
8
+ size?: number;
9
+ }
10
+ /** @experimental */
11
+ export interface GridHelperOptions3D {
12
+ /** Side length of the square grid in metres; defaults to 10. */
13
+ size?: number;
14
+ /** Number of cells per side, an integer in [1, 10000]; defaults to 10. */
15
+ divisions?: number;
16
+ /** sRGB line colour; defaults to #888888. */
17
+ color?: Color3D;
18
+ /** sRGB colour of the two lines through the centre; used only for even divisions. Defaults to #444444. */
19
+ centerColor?: Color3D;
20
+ }
21
+ /**
22
+ * X/Y/Z axis lines; see `createAxesHelper`.
23
+ * @experimental
24
+ */
25
+ export declare class Nova3DAxesHelper extends Nova3DHelper {
26
+ protected constructor();
27
+ }
28
+ /**
29
+ * Square line grid on the XZ plane; see `createGridHelper`.
30
+ * @experimental
31
+ */
32
+ export declare class Nova3DGridHelper extends Nova3DHelper {
33
+ protected constructor();
34
+ }
35
+ /**
36
+ * Creates X/Y/Z axis lines (red, green, blue) from the root origin, like Three `AxesHelper`.
37
+ * Move or reparent `root` to show the axes of another frame.
38
+ * Owned by the scene's app: destroyed with the scene or the app.
39
+ * @experimental
40
+ */
41
+ export declare function createAxesHelper(scene: Nova3DScene, options?: AxesHelperOptions3D): Nova3DAxesHelper;
42
+ /**
43
+ * Creates a square line grid on the XZ plane centred at the root origin, like Three `GridHelper`.
44
+ * Owned by the scene's app: destroyed with the scene or the app.
45
+ * @experimental
46
+ */
47
+ export declare function createGridHelper(scene: Nova3DScene, options?: GridHelperOptions3D): Nova3DGridHelper;
@@ -0,0 +1,84 @@
1
+ import { Nova3DApp } from '../Nova3DApp.js';
2
+ import { Color3D } from '../types.js';
3
+ import { Nova3DCamera } from '../model/Camera.js';
4
+ import { Nova3DLight } from '../model/Light.js';
5
+ import { Nova3DNode } from '../model/Node.js';
6
+ import { Nova3DHelper } from './LineHelper.js';
7
+ /** @experimental */
8
+ export interface BoundsHelperOptions3D {
9
+ /** sRGB line colour; defaults to #ffff00. */
10
+ color?: Color3D;
11
+ }
12
+ /** @experimental */
13
+ export interface CameraHelperOptions3D {
14
+ /** Viewport width / height used with `camera.getProjectionMatrix(aspect)`. */
15
+ aspect: number;
16
+ /** sRGB line colour; defaults to #ffaa00. */
17
+ color?: Color3D;
18
+ }
19
+ /** @experimental */
20
+ export interface LightHelperOptions3D {
21
+ /** Arrow length, circle radius or cone length in light-local metres; defaults to 1. */
22
+ size?: number;
23
+ /** sRGB line colour; defaults to the light colour. */
24
+ color?: Color3D;
25
+ }
26
+ /**
27
+ * World bounding box of a node and its subtree; see `createBoundsHelper`.
28
+ * @experimental
29
+ */
30
+ export declare class Nova3DBoundsHelper extends Nova3DHelper {
31
+ protected constructor();
32
+ private _part;
33
+ /** Last written min/max; NaN forces the first write. */
34
+ private readonly _last;
35
+ private _empty;
36
+ }
37
+ /**
38
+ * Frustum of a camera; see `createCameraHelper`.
39
+ * @experimental
40
+ */
41
+ export declare class Nova3DCameraHelper extends Nova3DHelper {
42
+ protected constructor();
43
+ private _part;
44
+ private readonly _world;
45
+ private readonly _projection;
46
+ private readonly _inverse;
47
+ private readonly _lastWorld;
48
+ private readonly _lastProjection;
49
+ private _aspect;
50
+ get aspect(): number;
51
+ /** Changes the aspect and recomputes the frustum. */
52
+ setAspect(aspect: number): void;
53
+ }
54
+ /**
55
+ * Gizmo of a light; see `createLightHelper`.
56
+ * @experimental
57
+ */
58
+ export declare class Nova3DLightHelper extends Nova3DHelper {
59
+ protected constructor();
60
+ private _part;
61
+ private readonly _local;
62
+ private readonly _world;
63
+ private readonly _lastWorld;
64
+ }
65
+ /**
66
+ * Draws the world AABB of `target` and its subtree, like Three `BoxHelper`.
67
+ * The box hides itself while the subtree has no bounds.
68
+ * Owned by the scene's app: destroyed with the scene or the app.
69
+ * @experimental
70
+ */
71
+ export declare function createBoundsHelper(target: Nova3DNode, options?: BoundsHelperOptions3D): Nova3DBoundsHelper;
72
+ /**
73
+ * Draws the camera frustum for `aspect` (12 edges) and lines from the camera origin to the near corners.
74
+ * Owned by the scene's app: destroyed with the scene or the app.
75
+ * @experimental
76
+ */
77
+ export declare function createCameraHelper(camera: Nova3DCamera, options: CameraHelperOptions3D): Nova3DCameraHelper;
78
+ /**
79
+ * Draws a light gizmo in light space: directional — square and arrow along −Z;
80
+ * point — three circles of radius `size`; spot — cone of length `size` by the outer angle.
81
+ * Owned by the scene's app: destroyed with the scene or the app.
82
+ * @experimental
83
+ */
84
+ export declare function createLightHelper(light: Nova3DLight, options?: LightHelperOptions3D): Nova3DLightHelper;
@@ -0,0 +1,44 @@
1
+ import { Nova3DApp } from '../Nova3DApp.js';
2
+ import { IKChainSolverOptions3D, Nova3DIKChainSolver } from './IKSolver.js';
3
+ /** @experimental */
4
+ export type CCDIKOptions3D = IKChainSolverOptions3D;
5
+ /** @experimental */
6
+ export type FABRIKOptions3D = IKChainSolverOptions3D;
7
+ /**
8
+ * Cyclic coordinate descent (Three CCDIKSolver): each iteration turns every enabled joint
9
+ * from the effector side toward the root so the effector points at the target, applying
10
+ * the joint limit after each turn; stops after `iterations` or within `tolerance`.
11
+ * @experimental
12
+ */
13
+ export declare class Nova3DCCDIK extends Nova3DIKChainSolver {
14
+ protected constructor();
15
+ readonly type: "ccd";
16
+ /** from 0, to 4, rotation 8, axis-angle 12, cross 16, previous world rotation 20, effector 24. */
17
+ private readonly _s;
18
+ }
19
+ /**
20
+ * FABRIK: a backward pass places joint points from the target toward the root on the bone
21
+ * lengths, then a forward pass turns each enabled joint toward its new point (applying joint
22
+ * limits, so cone, hinge and Euler limits hold) and recomputes the chain; stops after
23
+ * `iterations` or within `tolerance`. Linear per iteration in the chain length.
24
+ * @experimental
25
+ */
26
+ export declare class Nova3DFABRIK extends Nova3DIKChainSolver {
27
+ protected constructor();
28
+ readonly type: "fabrik";
29
+ private readonly _s;
30
+ private readonly _points;
31
+ private readonly _lengths;
32
+ /** Joint and effector world positions into `_points`. */
33
+ private _gather;
34
+ }
35
+ /**
36
+ * Owned by the app: destroyed with it.
37
+ * @experimental
38
+ */
39
+ export declare function createCCDIK(app: Nova3DApp, options: CCDIKOptions3D): Nova3DCCDIK;
40
+ /**
41
+ * Owned by the app: destroyed with it.
42
+ * @experimental
43
+ */
44
+ export declare function createFABRIK(app: Nova3DApp, options: FABRIKOptions3D): Nova3DFABRIK;
@@ -0,0 +1,92 @@
1
+ import { Quaternion3D, Vector3D } from '../types.js';
2
+ import { Nova3DNode } from '../model/Node.js';
3
+ /**
4
+ * Rotation limit of an IK joint, relative to the joint's rest rotation (`rest`, by default
5
+ * the node's base local rotation when the solver is created): the solved local rotation is
6
+ * `rest · relative`, and the limit applies to `relative`.
7
+ * - `euler`: intrinsic XYZ angles (radians, like `rotation` patches) clamped per axis.
8
+ * - `cone`: swing–twist about the bone axis (`axis`, by default the direction to the next
9
+ * chain node in joint space); swing at most `swing` radians, twist inside `twist`.
10
+ * - `hinge`: rotation only about `axis` (joint space), angle inside [`min`, `max`].
11
+ * @experimental
12
+ */
13
+ export type IKLimit3D = {
14
+ type: 'euler';
15
+ min: Vector3D;
16
+ max: Vector3D;
17
+ } | {
18
+ type: 'cone';
19
+ swing: number;
20
+ twist?: readonly [number, number];
21
+ axis?: Vector3D;
22
+ } | {
23
+ type: 'hinge';
24
+ axis: Vector3D;
25
+ min?: number;
26
+ max?: number;
27
+ };
28
+ /** @experimental */
29
+ export interface IKJointOptions3D {
30
+ node: Nova3DNode;
31
+ /** Disabled joints keep their animated rotation but stay part of the chain. Default true. */
32
+ enabled?: boolean;
33
+ limit?: IKLimit3D | null;
34
+ /** Reference rotation for limits; defaults to the node's base local rotation. */
35
+ rest?: Quaternion3D;
36
+ }
37
+ /**
38
+ * World pose (position 3, rotation 4, scale 3) of `node` composed from local transforms
39
+ * including other solvers' rotation layers, without flushing the scene and without allocating.
40
+ * Exact for uniform scale; non-uniform ancestor scale is approximated componentwise.
41
+ */
42
+ export declare function readWorldPose(node: Nova3DNode | null, out: Float64Array, o: number): void;
43
+ export declare function finiteVector(value: unknown, size: number, name: string): number[];
44
+ /**
45
+ * Cached node path of one solver: path node k lives at world slot k + 1, the root's parent
46
+ * at slot 0. Buffers are allocated once; `read`, `fk`, `rotateWorld`, `constrain` and
47
+ * `write` allocate nothing.
48
+ */
49
+ export declare class IKChain {
50
+ readonly path: readonly Nova3DNode[];
51
+ readonly size: number;
52
+ readonly jointCount: number;
53
+ /** Path index of each joint. */
54
+ readonly jointPath: Int32Array;
55
+ readonly enabled: Uint8Array;
56
+ /** Read pose per path node: position 3, pre-IK rotation 4, scale 3. */
57
+ readonly local: Float64Array;
58
+ /** Local rotation being solved per path node. */
59
+ readonly rotation: Float64Array;
60
+ readonly wp: Float64Array;
61
+ readonly wq: Float64Array;
62
+ readonly ws: Float64Array;
63
+ readonly rest: Float64Array;
64
+ readonly axis: Float64Array;
65
+ readonly limitKind: Uint8Array;
66
+ readonly limit: Float64Array;
67
+ /** Blend weight used by `write`. */
68
+ readonly weight: Float64Array<ArrayBuffer>;
69
+ private readonly _relative;
70
+ private readonly _out;
71
+ private readonly _vector;
72
+ constructor(joints: readonly IKJointOptions3D[], effector: Nova3DNode);
73
+ /** True while every path node is alive. */
74
+ alive(): boolean;
75
+ setLimit(joint: number, limit: IKLimit3D | null): void;
76
+ isHinge(joint: number): boolean;
77
+ /** Reads the pre-IK pose of the chain and its parent world, then runs forward kinematics. */
78
+ read(): void;
79
+ /** Forward kinematics for path nodes `from`..`to` from the world slot before `from`. */
80
+ fk(from: number, to: number): void;
81
+ /**
82
+ * Applies world rotation `r` to path node `index` (joint `joint`, -1 for none) about its
83
+ * pivot, applies the joint limit and refreshes its world rotation; descendants need `fk`.
84
+ */
85
+ rotateWorld(index: number, joint: number, r: Float64Array, ro: number): void;
86
+ /** Clamps the solving rotation of `joint` to its limit. */
87
+ constrain(joint: number): void;
88
+ /** Writes joint rotations blended from the pre-IK pose by `weight[0]`. */
89
+ write(owner: object): void;
90
+ claim(owner: object): void;
91
+ clear(owner: object, release?: boolean): void;
92
+ }
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Allocation-free vector and quaternion kernels for IK solvers. Every value lives in a
3
+ * Float64Array at an offset; quaternions are [x, y, z, w]. Outputs may alias inputs.
4
+ * Computed doubles never cross a call boundary as arguments: V8 boxes them into heap numbers
5
+ * when the callee is not inlined, so scalar inputs (angles, weights) are read from arrays.
6
+ */
7
+ export declare function copy(out: Float64Array, o: number, a: Float64Array, ao: number, size: number): void;
8
+ /**
9
+ * Normalizes the vector in place when its length exceeds `min` (pass a constant) and returns
10
+ * true; otherwise leaves it untouched and returns false.
11
+ */
12
+ export declare function unit3(a: Float64Array, o: number, min: number): boolean;
13
+ /** Removes the component along the unit vector at `u` from the vector at `v`, then normalizes it. */
14
+ export declare function perpendicular3(v: Float64Array, vo: number, u: Float64Array, uo: number, min: number): boolean;
15
+ export declare function sub3(out: Float64Array, o: number, a: Float64Array, ao: number, b: Float64Array, bo: number): void;
16
+ /** Writes the dot product of the vectors at a and b to out[oi]. */
17
+ export declare function dot3(out: Float64Array, oi: number, a: Float64Array, ao: number, b: Float64Array, bo: number): void;
18
+ /** Writes |a − b| to out[oi]. */
19
+ export declare function distance3(out: Float64Array, oi: number, a: Float64Array, ao: number, b: Float64Array, bo: number): void;
20
+ export declare function cross3(out: Float64Array, o: number, a: Float64Array, ao: number, b: Float64Array, bo: number): void;
21
+ export declare function identity4(out: Float64Array, o: number): void;
22
+ /** out = a * b (b applied first). */
23
+ export declare function qmul(out: Float64Array, o: number, a: Float64Array, ao: number, b: Float64Array, bo: number): void;
24
+ /** out = inverse(a) * b for unit a. */
25
+ export declare function qinvmul(out: Float64Array, o: number, a: Float64Array, ao: number, b: Float64Array, bo: number): void;
26
+ /** out = a * inverse(b) for unit b. */
27
+ export declare function qmulinv(out: Float64Array, o: number, a: Float64Array, ao: number, b: Float64Array, bo: number): void;
28
+ export declare function qnormalize(q: Float64Array, o: number): void;
29
+ /** out = q · v · q⁻¹ for unit q. */
30
+ export declare function qrotate(out: Float64Array, o: number, q: Float64Array, qo: number, v: Float64Array, vo: number): void;
31
+ /** out = inverse(q) · v for unit q. */
32
+ export declare function qrotateInverse(out: Float64Array, o: number, q: Float64Array, qo: number, v: Float64Array, vo: number): void;
33
+ /** Rotation about the unit axis v[vo..vo + 2] by the angle v[vo + 3] (radians). */
34
+ export declare function qaxis(out: Float64Array, o: number, v: Float64Array, vo: number): void;
35
+ /**
36
+ * Shortest arc rotating direction `a` onto direction `b` (any lengths). Returns false and
37
+ * writes identity when either vector is degenerate.
38
+ */
39
+ export declare function qfromTo(out: Float64Array, o: number, a: Float64Array, ao: number, b: Float64Array, bo: number): boolean;
40
+ /** Spherical interpolation by the factor tv[ti] along the shortest path; out may alias a or b. */
41
+ export declare function qslerp(out: Float64Array, o: number, a: Float64Array, ao: number, b: Float64Array, bo: number, tv: Float64Array, ti: number): void;
42
+ /** Rotation of the orthonormal 3 × 3 matrix stored column-major at m[mo..mo + 8]. */
43
+ export declare function qfromBasis(out: Float64Array, o: number, m: Float64Array, mo: number): void;
44
+ /** Intrinsic XYZ Euler angles (radians) of a unit quaternion, matching `rotation` patches. */
45
+ export declare function eulerFromQuat(out: Float64Array, o: number, q: Float64Array, qo: number): void;
46
+ /** Unit quaternion of the intrinsic XYZ Euler angles at e[eo..eo + 2]. */
47
+ export declare function quatFromEuler(out: Float64Array, o: number, angles: Float64Array, eo: number): void;
48
+ /** Writes the signed twist angle of q about the unit axis v[vo..vo + 2], in (-π, π], to out[oi]. */
49
+ export declare function twistAngle(out: Float64Array, oi: number, q: Float64Array, qo: number, v: Float64Array, vo: number): void;
@@ -0,0 +1,97 @@
1
+ import { Nova3DApp } from '../Nova3DApp.js';
2
+ import { Clock3D, Vector3D } from '../types.js';
3
+ import { IKChain, IKJointOptions3D, IKLimit3D } from './IKChain.js';
4
+ import { Nova3DNode } from '../model/Node.js';
5
+ /**
6
+ * A fixed world point or a node whose world position is followed every solve.
7
+ * @experimental
8
+ */
9
+ export type IKTarget3D = Vector3D | Nova3DNode;
10
+ /** @experimental */
11
+ export type IKSolverType3D = 'two-bone' | 'ccd' | 'fabrik' | 'look-at';
12
+ /** @experimental */
13
+ export interface IKSolverOptions3D {
14
+ target: IKTarget3D;
15
+ /** Blend between the animated pose (0) and the solved pose (1). Default 1. */
16
+ weight?: number;
17
+ /** Disabled solvers leave the animated pose untouched. Default true. */
18
+ enabled?: boolean;
19
+ /**
20
+ * 'app' (default) solves every rendered frame in the pose phase, after animation;
21
+ * 'manual' solves only in `update()`.
22
+ */
23
+ clock?: Clock3D;
24
+ }
25
+ /** Keys of `IKSolverOptions3D`, spread into each solver's key set. */
26
+ export declare const ikSolverKeyRecord3D: {
27
+ readonly target: true;
28
+ readonly weight: true;
29
+ readonly enabled: true;
30
+ readonly clock: true;
31
+ };
32
+ /**
33
+ * Base of every IK solver: target, weight, enable flag, frame or manual update and cleanup.
34
+ * The result is a post-animation rotation layer on the joint nodes: positions and scales stay
35
+ * animated, `getTransform()` keeps returning the animated pose and world matrices (rendering,
36
+ * skinning, `getWorldMatrix`) see the solved rotation.
37
+ * @experimental
38
+ */
39
+ export declare abstract class Nova3DIKSolver {
40
+ protected constructor();
41
+ abstract readonly type: IKSolverType3D;
42
+ private _targetNode;
43
+ private _weight;
44
+ private _enabled;
45
+ private _destroyed;
46
+ private readonly _clock;
47
+ private readonly _cleanup;
48
+ get weight(): number;
49
+ get enabled(): boolean;
50
+ /** 'app' solves every rendered frame; 'manual' only in `update()`. */
51
+ get clock(): Clock3D;
52
+ get destroyed(): boolean;
53
+ /** Distance (look-at: angle in radians) left after the last solve; NaN when skipped. */
54
+ get error(): number;
55
+ /** Joint nodes from root to tip. */
56
+ get joints(): readonly Nova3DNode[];
57
+ setWeight(weight: number): void;
58
+ setEnabled(enabled: boolean): void;
59
+ setTarget(target: IKTarget3D): void;
60
+ /** Current target world position. */
61
+ getTarget(): Vector3D;
62
+ /**
63
+ * Solves now from the current animated pose and writes the blended rotations; the residual
64
+ * is in `error`. With the 'app' clock it runs by itself every rendered frame. IK has
65
+ * no time step, so it takes no `deltaTime`.
66
+ */
67
+ update(): void;
68
+ destroy(): void;
69
+ private _run;
70
+ }
71
+ /** @experimental */
72
+ export interface IKChainSolverOptions3D extends IKSolverOptions3D {
73
+ /** Joints from the chain root toward the effector; each is an ancestor of the next. */
74
+ joints: ReadonlyArray<Nova3DNode | IKJointOptions3D>;
75
+ /** End node that should reach the target; a descendant of the last joint. */
76
+ effector: Nova3DNode;
77
+ /** Maximum iterations per solve (1..1000). Default 10. */
78
+ iterations?: number;
79
+ /** Stop once the effector is this close to the target (world units). Default 1e-4. */
80
+ tolerance?: number;
81
+ }
82
+ /**
83
+ * Iterative chain solvers (CCD, FABRIK): per-joint limits and enable flags.
84
+ * @experimental
85
+ */
86
+ export declare abstract class Nova3DIKChainSolver extends Nova3DIKSolver {
87
+ protected constructor();
88
+ get iterations(): number;
89
+ get tolerance(): number;
90
+ setIterations(iterations: number): void;
91
+ setTolerance(tolerance: number): void;
92
+ /** Enables or disables one joint (index from root); disabled joints keep the animated rotation. */
93
+ setJointEnabled(joint: number, enabled: boolean): void;
94
+ setJointLimit(joint: number, limit: IKLimit3D | null): void;
95
+ private _jointIndex;
96
+ }
97
+ export declare function jointOptions(joints: ReadonlyArray<Nova3DNode | IKJointOptions3D>): IKJointOptions3D[];
@@ -0,0 +1,58 @@
1
+ import { Nova3DNode } from '../model/Node.js';
2
+ import { Nova3DApp } from '../Nova3DApp.js';
3
+ import { Quaternion3D, Vector3D } from '../types.js';
4
+ import { IKSolverOptions3D, Nova3DIKSolver } from './IKSolver.js';
5
+ /**
6
+ * Yaw and pitch limits of a look-at solver in radians (`setLimits`, `limits`).
7
+ * @experimental
8
+ */
9
+ export interface LookAtLimits3D {
10
+ /** Yaw limits about `up`; positive turns toward `up × forward`. Default ±π. */
11
+ minYaw?: number;
12
+ maxYaw?: number;
13
+ /** Pitch limits; positive tilts toward `up`. Default ±π/2. */
14
+ minPitch?: number;
15
+ maxPitch?: number;
16
+ }
17
+ /** @experimental */
18
+ export interface LookAtIKOptions3D extends IKSolverOptions3D {
19
+ /** Head or eye node. */
20
+ node: Nova3DNode;
21
+ /** Local axis that should point at the target. Default [0, 0, 1] (glTF forward). */
22
+ forward?: Vector3D;
23
+ /** Local up axis: yaw turns about it, pitch tilts toward it. Default [0, 1, 0]. */
24
+ up?: Vector3D;
25
+ /** Yaw limits about `up`, radians; positive turns toward `up × forward`. Default ±π. */
26
+ minYaw?: number;
27
+ maxYaw?: number;
28
+ /** Pitch limits, radians; positive tilts toward `up`. Default ±π/2. */
29
+ minPitch?: number;
30
+ maxPitch?: number;
31
+ /** Reference rotation the limits are measured from; defaults to the node's base rotation. */
32
+ rest?: Quaternion3D;
33
+ }
34
+ /**
35
+ * Look-at controller (Babylon BoneLookController): turns a node so its forward axis points
36
+ * at the target with yaw and pitch measured in the frame `parent world · rest` and clamped
37
+ * to the limits; no roll is introduced. `error` is the remaining angle in radians.
38
+ * @experimental
39
+ */
40
+ export declare class Nova3DLookAtIK extends Nova3DIKSolver {
41
+ protected constructor();
42
+ readonly type: "look-at";
43
+ /** forward 0, up 3, right 6, frame 9, direction 13, yaw 17, pitch 21, axis-angle 25. */
44
+ private readonly _s;
45
+ private _minYaw;
46
+ private _maxYaw;
47
+ private _minPitch;
48
+ private _maxPitch;
49
+ get limits(): Required<LookAtLimits3D>;
50
+ /** Changes the given yaw and pitch limits (radians); omitted ones keep their values. */
51
+ setLimits(limits: LookAtLimits3D): void;
52
+ private _setLimits;
53
+ }
54
+ /**
55
+ * Owned by the app: destroyed with it.
56
+ * @experimental
57
+ */
58
+ export declare function createLookAtIK(app: Nova3DApp, options: LookAtIKOptions3D): Nova3DLookAtIK;
@@ -0,0 +1,57 @@
1
+ import { Nova3DNode } from '../model/Node.js';
2
+ import { Nova3DApp } from '../Nova3DApp.js';
3
+ import { Vector3D } from '../types.js';
4
+ import { IKSolverOptions3D, IKTarget3D, Nova3DIKSolver } from './IKSolver.js';
5
+ /** @experimental */
6
+ export interface TwoBoneIKOptions3D extends IKSolverOptions3D {
7
+ /** Upper joint (shoulder, hip). */
8
+ root: Nova3DNode;
9
+ /** Middle joint (elbow, knee); a descendant of `root`. */
10
+ mid: Nova3DNode;
11
+ /** End effector (wrist, ankle); a descendant of `mid`. Its own rotation is not changed. */
12
+ tip: Nova3DNode;
13
+ /** Point the middle joint bends toward; without it the animated bend plane is kept. */
14
+ pole?: IKTarget3D | null;
15
+ /** Rotation of the bend plane about the root → target axis, radians. Default 0. */
16
+ poleAngle?: number;
17
+ /**
18
+ * Hinge axis of `mid` in its local space, used without a pole when the animated arm is
19
+ * straight: the middle joint moves toward cross(root → target, axis). Default [0, 0, 1].
20
+ */
21
+ bendAxis?: Vector3D;
22
+ /** Largest reach as a fraction of the full chain length, (0, 1]. Default 1. */
23
+ maxReach?: number;
24
+ }
25
+ /**
26
+ * Analytic two-bone IK (Babylon BoneIKController): reaches any target inside the annulus
27
+ * [|l1 − l2|, maxReach · (l1 + l2)] exactly and stretches straight toward farther targets.
28
+ * The root rotation aligns both the bone and the bend plane, so the middle joint turns only
29
+ * about the plane normal (no knee twist).
30
+ * @experimental
31
+ */
32
+ export declare class Nova3DTwoBoneIK extends Nova3DIKSolver {
33
+ protected constructor();
34
+ readonly type: "two-bone";
35
+ private readonly _pole;
36
+ private _poleNode;
37
+ private _hasPole;
38
+ private _poleAngle;
39
+ private _maxReach;
40
+ private readonly _bendAxis;
41
+ /**
42
+ * ab 0, bc 3, at 6, u 9, n 12, v 15, x1 18, b1 21, tip 24, e0 27, e1 30, n0 33, b0 36,
43
+ * q 39, axis-angle 43, basis 47, upper length 56.
44
+ */
45
+ private readonly _s;
46
+ get poleAngle(): number;
47
+ get maxReach(): number;
48
+ setPole(pole: IKTarget3D | null): void;
49
+ setPoleAngle(angle: number): void;
50
+ setMaxReach(reach: number): void;
51
+ private _setPole;
52
+ }
53
+ /**
54
+ * Owned by the app: destroyed with it.
55
+ * @experimental
56
+ */
57
+ export declare function createTwoBoneIK(app: Nova3DApp, options: TwoBoneIKOptions3D): Nova3DTwoBoneIK;