@adobe/ecs 0.0.0-stage → 0.1.0

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 (2801) hide show
  1. package/LICENSE +21 -0
  2. package/dist/implementation/compiler/access.d.ts +6 -0
  3. package/dist/implementation/compiler/access.js +155 -0
  4. package/dist/implementation/compiler/access.js.map +1 -0
  5. package/dist/implementation/compiler/assign.d.ts +7 -0
  6. package/dist/implementation/compiler/assign.js +162 -0
  7. package/dist/implementation/compiler/assign.js.map +1 -0
  8. package/dist/implementation/compiler/bind.d.ts +9 -0
  9. package/dist/implementation/compiler/bind.js +82 -0
  10. package/dist/implementation/compiler/bind.js.map +1 -0
  11. package/dist/implementation/compiler/body-access.d.ts +15 -0
  12. package/dist/implementation/compiler/body-access.js +377 -0
  13. package/dist/implementation/compiler/body-access.js.map +1 -0
  14. package/dist/implementation/compiler/booleans.d.ts +8 -0
  15. package/dist/implementation/compiler/booleans.js +35 -0
  16. package/dist/implementation/compiler/booleans.js.map +1 -0
  17. package/dist/implementation/compiler/branches.d.ts +16 -0
  18. package/dist/implementation/compiler/branches.js +38 -0
  19. package/dist/implementation/compiler/branches.js.map +1 -0
  20. package/dist/implementation/compiler/calls.d.ts +6 -0
  21. package/dist/implementation/compiler/calls.js +390 -0
  22. package/dist/implementation/compiler/calls.js.map +1 -0
  23. package/dist/implementation/compiler/columns.d.ts +20 -0
  24. package/dist/implementation/compiler/columns.js +37 -0
  25. package/dist/implementation/compiler/columns.js.map +1 -0
  26. package/dist/implementation/compiler/compile-kernel.d.ts +14 -0
  27. package/dist/implementation/compiler/compile-kernel.js +139 -0
  28. package/dist/implementation/compiler/compile-kernel.js.map +1 -0
  29. package/dist/implementation/compiler/data.d.ts +30 -0
  30. package/dist/implementation/compiler/data.js +77 -0
  31. package/dist/implementation/compiler/data.js.map +1 -0
  32. package/dist/implementation/compiler/estree.d.ts +18 -0
  33. package/dist/implementation/compiler/estree.js +62 -0
  34. package/dist/implementation/compiler/estree.js.map +1 -0
  35. package/dist/implementation/compiler/exact.d.ts +24 -0
  36. package/dist/implementation/compiler/exact.js +64 -0
  37. package/dist/implementation/compiler/exact.js.map +1 -0
  38. package/dist/implementation/compiler/expression.d.ts +6 -0
  39. package/dist/implementation/compiler/expression.js +129 -0
  40. package/dist/implementation/compiler/expression.js.map +1 -0
  41. package/dist/implementation/compiler/failure.d.ts +27 -0
  42. package/dist/implementation/compiler/failure.js +24 -0
  43. package/dist/implementation/compiler/failure.js.map +1 -0
  44. package/dist/implementation/compiler/identify.d.ts +33 -0
  45. package/dist/implementation/compiler/identify.js +149 -0
  46. package/dist/implementation/compiler/identify.js.map +1 -0
  47. package/dist/implementation/compiler/index.d.ts +1 -0
  48. package/dist/implementation/compiler/index.js +2 -0
  49. package/dist/implementation/compiler/index.js.map +1 -0
  50. package/dist/implementation/compiler/ir.d.ts +214 -0
  51. package/dist/implementation/compiler/ir.js +28 -0
  52. package/dist/implementation/compiler/ir.js.map +1 -0
  53. package/dist/implementation/compiler/kernel-id.d.ts +17 -0
  54. package/dist/implementation/compiler/kernel-id.js +27 -0
  55. package/dist/implementation/compiler/kernel-id.js.map +1 -0
  56. package/dist/implementation/compiler/key.d.ts +21 -0
  57. package/dist/implementation/compiler/key.js +21 -0
  58. package/dist/implementation/compiler/key.js.map +1 -0
  59. package/dist/implementation/compiler/link.d.ts +70 -0
  60. package/dist/implementation/compiler/link.js +169 -0
  61. package/dist/implementation/compiler/link.js.map +1 -0
  62. package/dist/implementation/compiler/lists.d.ts +39 -0
  63. package/dist/implementation/compiler/lists.js +189 -0
  64. package/dist/implementation/compiler/lists.js.map +1 -0
  65. package/dist/implementation/compiler/lookups.d.ts +24 -0
  66. package/dist/implementation/compiler/lookups.js +118 -0
  67. package/dist/implementation/compiler/lookups.js.map +1 -0
  68. package/dist/implementation/compiler/math.d.ts +3 -0
  69. package/dist/implementation/compiler/math.js +9 -0
  70. package/dist/implementation/compiler/math.js.map +1 -0
  71. package/dist/implementation/compiler/module-scope.d.ts +53 -0
  72. package/dist/implementation/compiler/module-scope.js +121 -0
  73. package/dist/implementation/compiler/module-scope.js.map +1 -0
  74. package/dist/implementation/compiler/module-value.d.ts +15 -0
  75. package/dist/implementation/compiler/module-value.js +124 -0
  76. package/dist/implementation/compiler/module-value.js.map +1 -0
  77. package/dist/implementation/compiler/out.d.ts +4 -0
  78. package/dist/implementation/compiler/out.js +2 -0
  79. package/dist/implementation/compiler/out.js.map +1 -0
  80. package/dist/implementation/compiler/paths.d.ts +14 -0
  81. package/dist/implementation/compiler/paths.js +29 -0
  82. package/dist/implementation/compiler/paths.js.map +1 -0
  83. package/dist/implementation/compiler/plugin.d.ts +2 -0
  84. package/dist/implementation/compiler/plugin.js +225 -0
  85. package/dist/implementation/compiler/plugin.js.map +1 -0
  86. package/dist/implementation/compiler/print.d.ts +12 -0
  87. package/dist/implementation/compiler/print.js +96 -0
  88. package/dist/implementation/compiler/print.js.map +1 -0
  89. package/dist/implementation/compiler/program.d.ts +10 -0
  90. package/dist/implementation/compiler/program.js +255 -0
  91. package/dist/implementation/compiler/program.js.map +1 -0
  92. package/dist/implementation/compiler/scalar.d.ts +8 -0
  93. package/dist/implementation/compiler/scalar.js +47 -0
  94. package/dist/implementation/compiler/scalar.js.map +1 -0
  95. package/dist/implementation/compiler/scope.d.ts +24 -0
  96. package/dist/implementation/compiler/scope.js +4 -0
  97. package/dist/implementation/compiler/scope.js.map +1 -0
  98. package/dist/implementation/compiler/serialize.d.ts +2 -0
  99. package/dist/implementation/compiler/serialize.js +14 -0
  100. package/dist/implementation/compiler/serialize.js.map +1 -0
  101. package/dist/implementation/compiler/signature.d.ts +45 -0
  102. package/dist/implementation/compiler/signature.js +150 -0
  103. package/dist/implementation/compiler/signature.js.map +1 -0
  104. package/dist/implementation/compiler/snapshot.d.ts +21 -0
  105. package/dist/implementation/compiler/snapshot.js +18 -0
  106. package/dist/implementation/compiler/snapshot.js.map +1 -0
  107. package/dist/implementation/compiler/source-map.d.ts +34 -0
  108. package/dist/implementation/compiler/source-map.js +130 -0
  109. package/dist/implementation/compiler/source-map.js.map +1 -0
  110. package/dist/implementation/compiler/spawns.d.ts +29 -0
  111. package/dist/implementation/compiler/spawns.js +102 -0
  112. package/dist/implementation/compiler/spawns.js.map +1 -0
  113. package/dist/implementation/compiler/stamps.d.ts +6 -0
  114. package/dist/implementation/compiler/stamps.js +25 -0
  115. package/dist/implementation/compiler/stamps.js.map +1 -0
  116. package/dist/implementation/compiler/statement.d.ts +7 -0
  117. package/dist/implementation/compiler/statement.js +112 -0
  118. package/dist/implementation/compiler/statement.js.map +1 -0
  119. package/dist/implementation/compiler/terminal.d.ts +8 -0
  120. package/dist/implementation/compiler/terminal.js +51 -0
  121. package/dist/implementation/compiler/terminal.js.map +1 -0
  122. package/dist/implementation/compiler/transform.d.ts +31 -0
  123. package/dist/implementation/compiler/transform.js +227 -0
  124. package/dist/implementation/compiler/transform.js.map +1 -0
  125. package/dist/implementation/compiler/unit.d.ts +91 -0
  126. package/dist/implementation/compiler/unit.js +39 -0
  127. package/dist/implementation/compiler/unit.js.map +1 -0
  128. package/dist/implementation/compiler/value.d.ts +115 -0
  129. package/dist/implementation/compiler/value.js +9 -0
  130. package/dist/implementation/compiler/value.js.map +1 -0
  131. package/dist/implementation/index.d.ts +2 -0
  132. package/dist/implementation/index.js +3 -0
  133. package/dist/implementation/index.js.map +1 -0
  134. package/dist/implementation/world/activate.d.ts +21 -0
  135. package/dist/implementation/world/activate.js +132 -0
  136. package/dist/implementation/world/activate.js.map +1 -0
  137. package/dist/implementation/world/archetype.d.ts +136 -0
  138. package/dist/implementation/world/archetype.js +313 -0
  139. package/dist/implementation/world/archetype.js.map +1 -0
  140. package/dist/implementation/world/arrays.d.ts +24 -0
  141. package/dist/implementation/world/arrays.js +31 -0
  142. package/dist/implementation/world/arrays.js.map +1 -0
  143. package/dist/implementation/world/attach-kernel.d.ts +9 -0
  144. package/dist/implementation/world/attach-kernel.js +22 -0
  145. package/dist/implementation/world/attach-kernel.js.map +1 -0
  146. package/dist/implementation/world/batches.d.ts +15 -0
  147. package/dist/implementation/world/batches.js +144 -0
  148. package/dist/implementation/world/batches.js.map +1 -0
  149. package/dist/implementation/world/buffer.d.ts +60 -0
  150. package/dist/implementation/world/buffer.js +105 -0
  151. package/dist/implementation/world/buffer.js.map +1 -0
  152. package/dist/implementation/world/cascade.d.ts +28 -0
  153. package/dist/implementation/world/cascade.js +139 -0
  154. package/dist/implementation/world/cascade.js.map +1 -0
  155. package/dist/implementation/world/cells.d.ts +7 -0
  156. package/dist/implementation/world/cells.js +22 -0
  157. package/dist/implementation/world/cells.js.map +1 -0
  158. package/dist/implementation/world/check-kernel.d.ts +10 -0
  159. package/dist/implementation/world/check-kernel.js +102 -0
  160. package/dist/implementation/world/check-kernel.js.map +1 -0
  161. package/dist/implementation/world/claims.d.ts +13 -0
  162. package/dist/implementation/world/claims.js +50 -0
  163. package/dist/implementation/world/claims.js.map +1 -0
  164. package/dist/implementation/world/closure.d.ts +12 -0
  165. package/dist/implementation/world/closure.js +43 -0
  166. package/dist/implementation/world/closure.js.map +1 -0
  167. package/dist/implementation/world/command-ring.d.ts +97 -0
  168. package/dist/implementation/world/command-ring.js +438 -0
  169. package/dist/implementation/world/command-ring.js.map +1 -0
  170. package/dist/implementation/world/commands.d.ts +25 -0
  171. package/dist/implementation/world/commands.js +74 -0
  172. package/dist/implementation/world/commands.js.map +1 -0
  173. package/dist/implementation/world/create.d.ts +61 -0
  174. package/dist/implementation/world/create.js +787 -0
  175. package/dist/implementation/world/create.js.map +1 -0
  176. package/dist/implementation/world/directories.d.ts +28 -0
  177. package/dist/implementation/world/directories.js +67 -0
  178. package/dist/implementation/world/directories.js.map +1 -0
  179. package/dist/implementation/world/entities.d.ts +77 -0
  180. package/dist/implementation/world/entities.js +137 -0
  181. package/dist/implementation/world/entities.js.map +1 -0
  182. package/dist/implementation/world/execute.d.ts +36 -0
  183. package/dist/implementation/world/execute.js +616 -0
  184. package/dist/implementation/world/execute.js.map +1 -0
  185. package/dist/implementation/world/failures.d.ts +10 -0
  186. package/dist/implementation/world/failures.js +5 -0
  187. package/dist/implementation/world/failures.js.map +1 -0
  188. package/dist/implementation/world/finalizers.d.ts +63 -0
  189. package/dist/implementation/world/finalizers.js +408 -0
  190. package/dist/implementation/world/finalizers.js.map +1 -0
  191. package/dist/implementation/world/gpu.d.ts +64 -0
  192. package/dist/implementation/world/gpu.js +317 -0
  193. package/dist/implementation/world/gpu.js.map +1 -0
  194. package/dist/implementation/world/holders.d.ts +21 -0
  195. package/dist/implementation/world/holders.js +65 -0
  196. package/dist/implementation/world/holders.js.map +1 -0
  197. package/dist/implementation/world/index-build.d.ts +88 -0
  198. package/dist/implementation/world/index-build.js +404 -0
  199. package/dist/implementation/world/index-build.js.map +1 -0
  200. package/dist/implementation/world/index-hash.d.ts +99 -0
  201. package/dist/implementation/world/index-hash.js +440 -0
  202. package/dist/implementation/world/index-hash.js.map +1 -0
  203. package/dist/implementation/world/index-keys.d.ts +75 -0
  204. package/dist/implementation/world/index-keys.js +251 -0
  205. package/dist/implementation/world/index-keys.js.map +1 -0
  206. package/dist/implementation/world/index-lookups.d.ts +76 -0
  207. package/dist/implementation/world/index-lookups.js +567 -0
  208. package/dist/implementation/world/index-lookups.js.map +1 -0
  209. package/dist/implementation/world/index-order.d.ts +21 -0
  210. package/dist/implementation/world/index-order.js +174 -0
  211. package/dist/implementation/world/index-order.js.map +1 -0
  212. package/dist/implementation/world/index-readers.d.ts +101 -0
  213. package/dist/implementation/world/index-readers.js +341 -0
  214. package/dist/implementation/world/index-readers.js.map +1 -0
  215. package/dist/implementation/world/index-sorted.d.ts +120 -0
  216. package/dist/implementation/world/index-sorted.js +631 -0
  217. package/dist/implementation/world/index-sorted.js.map +1 -0
  218. package/dist/implementation/world/indexes.d.ts +139 -0
  219. package/dist/implementation/world/indexes.js +1174 -0
  220. package/dist/implementation/world/indexes.js.map +1 -0
  221. package/dist/implementation/world/input.d.ts +3 -0
  222. package/dist/implementation/world/input.js +17 -0
  223. package/dist/implementation/world/input.js.map +1 -0
  224. package/dist/implementation/world/intrinsics.d.ts +5 -0
  225. package/dist/implementation/world/intrinsics.js +33 -0
  226. package/dist/implementation/world/intrinsics.js.map +1 -0
  227. package/dist/implementation/world/join.d.ts +23 -0
  228. package/dist/implementation/world/join.js +709 -0
  229. package/dist/implementation/world/join.js.map +1 -0
  230. package/dist/implementation/world/joined-observer.d.ts +179 -0
  231. package/dist/implementation/world/joined-observer.js +758 -0
  232. package/dist/implementation/world/joined-observer.js.map +1 -0
  233. package/dist/implementation/world/joining.d.ts +338 -0
  234. package/dist/implementation/world/joining.js +143 -0
  235. package/dist/implementation/world/joining.js.map +1 -0
  236. package/dist/implementation/world/journal.d.ts +21 -0
  237. package/dist/implementation/world/journal.js +22 -0
  238. package/dist/implementation/world/journal.js.map +1 -0
  239. package/dist/implementation/world/kernel-indexes.d.ts +30 -0
  240. package/dist/implementation/world/kernel-indexes.js +172 -0
  241. package/dist/implementation/world/kernel-indexes.js.map +1 -0
  242. package/dist/implementation/world/kernel.d.ts +358 -0
  243. package/dist/implementation/world/kernel.js +3 -0
  244. package/dist/implementation/world/kernel.js.map +1 -0
  245. package/dist/implementation/world/kernels.d.ts +80 -0
  246. package/dist/implementation/world/kernels.js +284 -0
  247. package/dist/implementation/world/kernels.js.map +1 -0
  248. package/dist/implementation/world/layout-directory.d.ts +107 -0
  249. package/dist/implementation/world/layout-directory.js +218 -0
  250. package/dist/implementation/world/layout-directory.js.map +1 -0
  251. package/dist/implementation/world/lists.d.ts +56 -0
  252. package/dist/implementation/world/lists.js +118 -0
  253. package/dist/implementation/world/lists.js.map +1 -0
  254. package/dist/implementation/world/lookup-keys.d.ts +19 -0
  255. package/dist/implementation/world/lookup-keys.js +48 -0
  256. package/dist/implementation/world/lookup-keys.js.map +1 -0
  257. package/dist/implementation/world/loop.d.ts +73 -0
  258. package/dist/implementation/world/loop.js +253 -0
  259. package/dist/implementation/world/loop.js.map +1 -0
  260. package/dist/implementation/world/memory.d.ts +40 -0
  261. package/dist/implementation/world/memory.js +64 -0
  262. package/dist/implementation/world/memory.js.map +1 -0
  263. package/dist/implementation/world/mirror.d.ts +112 -0
  264. package/dist/implementation/world/mirror.js +542 -0
  265. package/dist/implementation/world/mirror.js.map +1 -0
  266. package/dist/implementation/world/move-log.d.ts +107 -0
  267. package/dist/implementation/world/move-log.js +165 -0
  268. package/dist/implementation/world/move-log.js.map +1 -0
  269. package/dist/implementation/world/observer.d.ts +16 -0
  270. package/dist/implementation/world/observer.js +131 -0
  271. package/dist/implementation/world/observer.js.map +1 -0
  272. package/dist/implementation/world/order.d.ts +38 -0
  273. package/dist/implementation/world/order.js +323 -0
  274. package/dist/implementation/world/order.js.map +1 -0
  275. package/dist/implementation/world/plan.d.ts +50 -0
  276. package/dist/implementation/world/plan.js +20 -0
  277. package/dist/implementation/world/plan.js.map +1 -0
  278. package/dist/implementation/world/pool.d.ts +70 -0
  279. package/dist/implementation/world/pool.js +263 -0
  280. package/dist/implementation/world/pool.js.map +1 -0
  281. package/dist/implementation/world/port.d.ts +61 -0
  282. package/dist/implementation/world/port.js +104 -0
  283. package/dist/implementation/world/port.js.map +1 -0
  284. package/dist/implementation/world/prepared-lookup.d.ts +11 -0
  285. package/dist/implementation/world/prepared-lookup.js +98 -0
  286. package/dist/implementation/world/prepared-lookup.js.map +1 -0
  287. package/dist/implementation/world/prepared-spawn.d.ts +39 -0
  288. package/dist/implementation/world/prepared-spawn.js +115 -0
  289. package/dist/implementation/world/prepared-spawn.js.map +1 -0
  290. package/dist/implementation/world/program.d.ts +11 -0
  291. package/dist/implementation/world/program.js +12 -0
  292. package/dist/implementation/world/program.js.map +1 -0
  293. package/dist/implementation/world/protocol.d.ts +185 -0
  294. package/dist/implementation/world/protocol.js +41 -0
  295. package/dist/implementation/world/protocol.js.map +1 -0
  296. package/dist/implementation/world/publish.d.ts +9 -0
  297. package/dist/implementation/world/publish.js +28 -0
  298. package/dist/implementation/world/publish.js.map +1 -0
  299. package/dist/implementation/world/ranges.d.ts +11 -0
  300. package/dist/implementation/world/ranges.js +47 -0
  301. package/dist/implementation/world/ranges.js.map +1 -0
  302. package/dist/implementation/world/reductions.d.ts +32 -0
  303. package/dist/implementation/world/reductions.js +92 -0
  304. package/dist/implementation/world/reductions.js.map +1 -0
  305. package/dist/implementation/world/register.d.ts +64 -0
  306. package/dist/implementation/world/register.js +368 -0
  307. package/dist/implementation/world/register.js.map +1 -0
  308. package/dist/implementation/world/remote-systems.d.ts +139 -0
  309. package/dist/implementation/world/remote-systems.js +551 -0
  310. package/dist/implementation/world/remote-systems.js.map +1 -0
  311. package/dist/implementation/world/remote.d.ts +25 -0
  312. package/dist/implementation/world/remote.js +137 -0
  313. package/dist/implementation/world/remote.js.map +1 -0
  314. package/dist/implementation/world/reports.d.ts +63 -0
  315. package/dist/implementation/world/reports.js +180 -0
  316. package/dist/implementation/world/reports.js.map +1 -0
  317. package/dist/implementation/world/resources.d.ts +20 -0
  318. package/dist/implementation/world/resources.js +63 -0
  319. package/dist/implementation/world/resources.js.map +1 -0
  320. package/dist/implementation/world/rows.d.ts +108 -0
  321. package/dist/implementation/world/rows.js +479 -0
  322. package/dist/implementation/world/rows.js.map +1 -0
  323. package/dist/implementation/world/runner.d.ts +123 -0
  324. package/dist/implementation/world/runner.js +1014 -0
  325. package/dist/implementation/world/runner.js.map +1 -0
  326. package/dist/implementation/world/sharing.d.ts +47 -0
  327. package/dist/implementation/world/sharing.js +548 -0
  328. package/dist/implementation/world/sharing.js.map +1 -0
  329. package/dist/implementation/world/staging.d.ts +60 -0
  330. package/dist/implementation/world/staging.js +169 -0
  331. package/dist/implementation/world/staging.js.map +1 -0
  332. package/dist/implementation/world/state.d.ts +261 -0
  333. package/dist/implementation/world/state.js +335 -0
  334. package/dist/implementation/world/state.js.map +1 -0
  335. package/dist/implementation/world/stop-lists.d.ts +114 -0
  336. package/dist/implementation/world/stop-lists.js +250 -0
  337. package/dist/implementation/world/stop-lists.js.map +1 -0
  338. package/dist/implementation/world/strings.d.ts +48 -0
  339. package/dist/implementation/world/strings.js +213 -0
  340. package/dist/implementation/world/strings.js.map +1 -0
  341. package/dist/implementation/world/structure.d.ts +39 -0
  342. package/dist/implementation/world/structure.js +39 -0
  343. package/dist/implementation/world/structure.js.map +1 -0
  344. package/dist/implementation/world/synchronize.d.ts +32 -0
  345. package/dist/implementation/world/synchronize.js +868 -0
  346. package/dist/implementation/world/synchronize.js.map +1 -0
  347. package/dist/implementation/world/tail-blocks.d.ts +40 -0
  348. package/dist/implementation/world/tail-blocks.js +54 -0
  349. package/dist/implementation/world/tail-blocks.js.map +1 -0
  350. package/dist/implementation/world/tails.d.ts +114 -0
  351. package/dist/implementation/world/tails.js +441 -0
  352. package/dist/implementation/world/tails.js.map +1 -0
  353. package/dist/implementation/world/terminal.d.ts +7 -0
  354. package/dist/implementation/world/terminal.js +12 -0
  355. package/dist/implementation/world/terminal.js.map +1 -0
  356. package/dist/implementation/world/thread-directory.d.ts +66 -0
  357. package/dist/implementation/world/thread-directory.js +173 -0
  358. package/dist/implementation/world/thread-directory.js.map +1 -0
  359. package/dist/implementation/world/thread-finalizers.d.ts +52 -0
  360. package/dist/implementation/world/thread-finalizers.js +266 -0
  361. package/dist/implementation/world/thread-finalizers.js.map +1 -0
  362. package/dist/implementation/world/thread-indexes.d.ts +26 -0
  363. package/dist/implementation/world/thread-indexes.js +71 -0
  364. package/dist/implementation/world/thread-indexes.js.map +1 -0
  365. package/dist/implementation/world/thread-observer.d.ts +41 -0
  366. package/dist/implementation/world/thread-observer.js +181 -0
  367. package/dist/implementation/world/thread-observer.js.map +1 -0
  368. package/dist/implementation/world/thread-systems.d.ts +113 -0
  369. package/dist/implementation/world/thread-systems.js +1169 -0
  370. package/dist/implementation/world/thread-systems.js.map +1 -0
  371. package/dist/implementation/world/thread-tasks.d.ts +61 -0
  372. package/dist/implementation/world/thread-tasks.js +69 -0
  373. package/dist/implementation/world/thread-tasks.js.map +1 -0
  374. package/dist/implementation/world/transfers.d.ts +30 -0
  375. package/dist/implementation/world/transfers.js +101 -0
  376. package/dist/implementation/world/transfers.js.map +1 -0
  377. package/dist/implementation/world/up.d.ts +32 -0
  378. package/dist/implementation/world/up.js +723 -0
  379. package/dist/implementation/world/up.js.map +1 -0
  380. package/dist/implementation/world/wasm.d.ts +112 -0
  381. package/dist/implementation/world/wasm.js +2159 -0
  382. package/dist/implementation/world/wasm.js.map +1 -0
  383. package/dist/implementation/world/wgsl.d.ts +20 -0
  384. package/dist/implementation/world/wgsl.js +485 -0
  385. package/dist/implementation/world/wgsl.js.map +1 -0
  386. package/dist/implementation/world/worker-platform.d.ts +37 -0
  387. package/dist/implementation/world/worker-platform.js +80 -0
  388. package/dist/implementation/world/worker-platform.js.map +1 -0
  389. package/dist/implementation/world/worker.d.ts +1 -0
  390. package/dist/implementation/world/worker.js +510 -0
  391. package/dist/implementation/world/worker.js.map +1 -0
  392. package/dist/index.d.ts +15 -0
  393. package/dist/index.js +9 -0
  394. package/dist/index.js.map +1 -0
  395. package/dist/interface/archetype/archetype.d.ts +2 -0
  396. package/dist/interface/archetype/archetype.js +2 -0
  397. package/dist/interface/archetype/archetype.js.map +1 -0
  398. package/dist/interface/archetype/create.d.ts +7 -0
  399. package/dist/interface/archetype/create.js +11 -0
  400. package/dist/interface/archetype/create.js.map +1 -0
  401. package/dist/interface/archetype/index.d.ts +1 -0
  402. package/dist/interface/archetype/index.js +2 -0
  403. package/dist/interface/archetype/index.js.map +1 -0
  404. package/dist/interface/archetype/values-of.d.ts +17 -0
  405. package/dist/interface/archetype/values-of.js +2 -0
  406. package/dist/interface/archetype/values-of.js.map +1 -0
  407. package/dist/interface/component/component.d.ts +2 -0
  408. package/dist/interface/component/component.js +2 -0
  409. package/dist/interface/component/component.js.map +1 -0
  410. package/dist/interface/component/declaration.d.ts +74 -0
  411. package/dist/interface/component/declaration.js +2 -0
  412. package/dist/interface/component/declaration.js.map +1 -0
  413. package/dist/interface/component/index.d.ts +3 -0
  414. package/dist/interface/component/index.js +2 -0
  415. package/dist/interface/component/index.js.map +1 -0
  416. package/dist/interface/component/key.d.ts +2 -0
  417. package/dist/interface/component/key.js +2 -0
  418. package/dist/interface/component/key.js.map +1 -0
  419. package/dist/interface/component/register.d.ts +23 -0
  420. package/dist/interface/component/register.js +6 -0
  421. package/dist/interface/component/register.js.map +1 -0
  422. package/dist/interface/component/types.d.ts +6 -0
  423. package/dist/interface/component/types.js +2 -0
  424. package/dist/interface/component/types.js.map +1 -0
  425. package/dist/interface/component/value.d.ts +34 -0
  426. package/dist/interface/component/value.js +2 -0
  427. package/dist/interface/component/value.js.map +1 -0
  428. package/dist/interface/component/values.d.ts +6 -0
  429. package/dist/interface/component/values.js +2 -0
  430. package/dist/interface/component/values.js.map +1 -0
  431. package/dist/interface/entity/entity.d.ts +9 -0
  432. package/dist/interface/entity/entity.js +2 -0
  433. package/dist/interface/entity/entity.js.map +1 -0
  434. package/dist/interface/entity/index.d.ts +8 -0
  435. package/dist/interface/entity/index.js +5 -0
  436. package/dist/interface/entity/index.js.map +1 -0
  437. package/dist/interface/finalizer/body.d.ts +50 -0
  438. package/dist/interface/finalizer/body.js +2 -0
  439. package/dist/interface/finalizer/body.js.map +1 -0
  440. package/dist/interface/finalizer/create.d.ts +43 -0
  441. package/dist/interface/finalizer/create.js +97 -0
  442. package/dist/interface/finalizer/create.js.map +1 -0
  443. package/dist/interface/finalizer/created.d.ts +16 -0
  444. package/dist/interface/finalizer/created.js +2 -0
  445. package/dist/interface/finalizer/created.js.map +1 -0
  446. package/dist/interface/finalizer/declaration.d.ts +38 -0
  447. package/dist/interface/finalizer/declaration.js +2 -0
  448. package/dist/interface/finalizer/declaration.js.map +1 -0
  449. package/dist/interface/finalizer/finalizer.d.ts +8 -0
  450. package/dist/interface/finalizer/finalizer.js +2 -0
  451. package/dist/interface/finalizer/finalizer.js.map +1 -0
  452. package/dist/interface/finalizer/index.d.ts +1 -0
  453. package/dist/interface/finalizer/index.js +2 -0
  454. package/dist/interface/finalizer/index.js.map +1 -0
  455. package/dist/interface/finalizer/name.d.ts +6 -0
  456. package/dist/interface/finalizer/name.js +2 -0
  457. package/dist/interface/finalizer/name.js.map +1 -0
  458. package/dist/interface/gpu/accessors.d.ts +14 -0
  459. package/dist/interface/gpu/accessors.js +70 -0
  460. package/dist/interface/gpu/accessors.js.map +1 -0
  461. package/dist/interface/gpu/gpu.d.ts +3 -0
  462. package/dist/interface/gpu/gpu.js +2 -0
  463. package/dist/interface/gpu/gpu.js.map +1 -0
  464. package/dist/interface/gpu/index.d.ts +2 -0
  465. package/dist/interface/gpu/index.js +3 -0
  466. package/dist/interface/gpu/index.js.map +1 -0
  467. package/dist/interface/gpu/layout.d.ts +5 -0
  468. package/dist/interface/gpu/layout.js +21 -0
  469. package/dist/interface/gpu/layout.js.map +1 -0
  470. package/dist/interface/gpu/record.d.ts +5 -0
  471. package/dist/interface/gpu/record.js +6 -0
  472. package/dist/interface/gpu/record.js.map +1 -0
  473. package/dist/interface/gpu/wgsl.d.ts +8 -0
  474. package/dist/interface/gpu/wgsl.js +20 -0
  475. package/dist/interface/gpu/wgsl.js.map +1 -0
  476. package/dist/interface/index.d.ts +19 -0
  477. package/dist/interface/index.js +14 -0
  478. package/dist/interface/index.js.map +1 -0
  479. package/dist/interface/indexes/create.d.ts +30 -0
  480. package/dist/interface/indexes/create.js +79 -0
  481. package/dist/interface/indexes/create.js.map +1 -0
  482. package/dist/interface/indexes/created.d.ts +7 -0
  483. package/dist/interface/indexes/created.js +2 -0
  484. package/dist/interface/indexes/created.js.map +1 -0
  485. package/dist/interface/indexes/declaration.d.ts +13 -0
  486. package/dist/interface/indexes/declaration.js +2 -0
  487. package/dist/interface/indexes/declaration.js.map +1 -0
  488. package/dist/interface/indexes/index-type.d.ts +12 -0
  489. package/dist/interface/indexes/index-type.js +2 -0
  490. package/dist/interface/indexes/index-type.js.map +1 -0
  491. package/dist/interface/indexes/index.d.ts +1 -0
  492. package/dist/interface/indexes/index.js +2 -0
  493. package/dist/interface/indexes/index.js.map +1 -0
  494. package/dist/interface/indexes/name.d.ts +5 -0
  495. package/dist/interface/indexes/name.js +2 -0
  496. package/dist/interface/indexes/name.js.map +1 -0
  497. package/dist/interface/math/f32/index.d.ts +2 -0
  498. package/dist/interface/math/f32/index.js +2 -0
  499. package/dist/interface/math/f32/index.js.map +1 -0
  500. package/dist/interface/math/f32/public.d.ts +1 -0
  501. package/dist/interface/math/f32/public.js +2 -0
  502. package/dist/interface/math/f32/public.js.map +1 -0
  503. package/dist/interface/math/f32/round-half-even.d.ts +2 -0
  504. package/dist/interface/math/f32/round-half-even.js +6 -0
  505. package/dist/interface/math/f32/round-half-even.js.map +1 -0
  506. package/dist/interface/math/f32/schema.d.ts +4 -0
  507. package/dist/interface/math/f32/schema.js +2 -0
  508. package/dist/interface/math/f32/schema.js.map +1 -0
  509. package/dist/interface/math/i32/index.d.ts +3 -0
  510. package/dist/interface/math/i32/index.js +2 -0
  511. package/dist/interface/math/i32/index.js.map +1 -0
  512. package/dist/interface/math/i32/public.d.ts +2 -0
  513. package/dist/interface/math/i32/public.js +3 -0
  514. package/dist/interface/math/i32/public.js.map +1 -0
  515. package/dist/interface/math/i32/schema.d.ts +5 -0
  516. package/dist/interface/math/i32/schema.js +2 -0
  517. package/dist/interface/math/i32/schema.js.map +1 -0
  518. package/dist/interface/math/i32/shift-right.d.ts +2 -0
  519. package/dist/interface/math/i32/shift-right.js +2 -0
  520. package/dist/interface/math/i32/shift-right.js.map +1 -0
  521. package/dist/interface/math/index.d.ts +8 -0
  522. package/dist/interface/math/index.js +9 -0
  523. package/dist/interface/math/index.js.map +1 -0
  524. package/dist/interface/math/intrinsic.d.ts +13 -0
  525. package/dist/interface/math/intrinsic.js +10 -0
  526. package/dist/interface/math/intrinsic.js.map +1 -0
  527. package/dist/interface/math/mat4x4/add.d.ts +2 -0
  528. package/dist/interface/math/mat4x4/add.js +8 -0
  529. package/dist/interface/math/mat4x4/add.js.map +1 -0
  530. package/dist/interface/math/mat4x4/determinant.d.ts +2 -0
  531. package/dist/interface/math/mat4x4/determinant.js +18 -0
  532. package/dist/interface/math/mat4x4/determinant.js.map +1 -0
  533. package/dist/interface/math/mat4x4/identity.d.ts +2 -0
  534. package/dist/interface/math/mat4x4/identity.js +7 -0
  535. package/dist/interface/math/mat4x4/identity.js.map +1 -0
  536. package/dist/interface/math/mat4x4/index.d.ts +24 -0
  537. package/dist/interface/math/mat4x4/index.js +24 -0
  538. package/dist/interface/math/mat4x4/index.js.map +1 -0
  539. package/dist/interface/math/mat4x4/inverse.d.ts +2 -0
  540. package/dist/interface/math/mat4x4/inverse.js +40 -0
  541. package/dist/interface/math/mat4x4/inverse.js.map +1 -0
  542. package/dist/interface/math/mat4x4/look-at.d.ts +3 -0
  543. package/dist/interface/math/mat4x4/look-at.js +22 -0
  544. package/dist/interface/math/mat4x4/look-at.js.map +1 -0
  545. package/dist/interface/math/mat4x4/multiply-vec3.d.ts +3 -0
  546. package/dist/interface/math/mat4x4/multiply-vec3.js +6 -0
  547. package/dist/interface/math/mat4x4/multiply-vec3.js.map +1 -0
  548. package/dist/interface/math/mat4x4/multiply-vec4.d.ts +3 -0
  549. package/dist/interface/math/mat4x4/multiply-vec4.js +8 -0
  550. package/dist/interface/math/mat4x4/multiply-vec4.js.map +1 -0
  551. package/dist/interface/math/mat4x4/multiply.d.ts +3 -0
  552. package/dist/interface/math/mat4x4/multiply.js +21 -0
  553. package/dist/interface/math/mat4x4/multiply.js.map +1 -0
  554. package/dist/interface/math/mat4x4/orthographic.d.ts +2 -0
  555. package/dist/interface/math/mat4x4/orthographic.js +12 -0
  556. package/dist/interface/math/mat4x4/orthographic.js.map +1 -0
  557. package/dist/interface/math/mat4x4/perspective.d.ts +2 -0
  558. package/dist/interface/math/mat4x4/perspective.js +22 -0
  559. package/dist/interface/math/mat4x4/perspective.js.map +1 -0
  560. package/dist/interface/math/mat4x4/public.d.ts +20 -0
  561. package/dist/interface/math/mat4x4/public.js +21 -0
  562. package/dist/interface/math/mat4x4/public.js.map +1 -0
  563. package/dist/interface/math/mat4x4/rotation-x.d.ts +2 -0
  564. package/dist/interface/math/mat4x4/rotation-x.js +11 -0
  565. package/dist/interface/math/mat4x4/rotation-x.js.map +1 -0
  566. package/dist/interface/math/mat4x4/rotation-y.d.ts +2 -0
  567. package/dist/interface/math/mat4x4/rotation-y.js +11 -0
  568. package/dist/interface/math/mat4x4/rotation-y.js.map +1 -0
  569. package/dist/interface/math/mat4x4/rotation-z.d.ts +2 -0
  570. package/dist/interface/math/mat4x4/rotation-z.js +11 -0
  571. package/dist/interface/math/mat4x4/rotation-z.js.map +1 -0
  572. package/dist/interface/math/mat4x4/scale.d.ts +2 -0
  573. package/dist/interface/math/mat4x4/scale.js +8 -0
  574. package/dist/interface/math/mat4x4/scale.js.map +1 -0
  575. package/dist/interface/math/mat4x4/scaling.d.ts +2 -0
  576. package/dist/interface/math/mat4x4/scaling.js +7 -0
  577. package/dist/interface/math/mat4x4/scaling.js.map +1 -0
  578. package/dist/interface/math/mat4x4/schema.d.ts +9 -0
  579. package/dist/interface/math/mat4x4/schema.js +3 -0
  580. package/dist/interface/math/mat4x4/schema.js.map +1 -0
  581. package/dist/interface/math/mat4x4/subtract.d.ts +2 -0
  582. package/dist/interface/math/mat4x4/subtract.js +8 -0
  583. package/dist/interface/math/mat4x4/subtract.js.map +1 -0
  584. package/dist/interface/math/mat4x4/translation.d.ts +2 -0
  585. package/dist/interface/math/mat4x4/translation.js +7 -0
  586. package/dist/interface/math/mat4x4/translation.js.map +1 -0
  587. package/dist/interface/math/mat4x4/transpose.d.ts +2 -0
  588. package/dist/interface/math/mat4x4/transpose.js +8 -0
  589. package/dist/interface/math/mat4x4/transpose.js.map +1 -0
  590. package/dist/interface/math/mat4x4/zero.d.ts +2 -0
  591. package/dist/interface/math/mat4x4/zero.js +7 -0
  592. package/dist/interface/math/mat4x4/zero.js.map +1 -0
  593. package/dist/interface/math/quat/add.d.ts +2 -0
  594. package/dist/interface/math/quat/add.js +8 -0
  595. package/dist/interface/math/quat/add.js.map +1 -0
  596. package/dist/interface/math/quat/align-to.d.ts +12 -0
  597. package/dist/interface/math/quat/align-to.js +42 -0
  598. package/dist/interface/math/quat/align-to.js.map +1 -0
  599. package/dist/interface/math/quat/conjugate.d.ts +2 -0
  600. package/dist/interface/math/quat/conjugate.js +2 -0
  601. package/dist/interface/math/quat/conjugate.js.map +1 -0
  602. package/dist/interface/math/quat/distance.d.ts +2 -0
  603. package/dist/interface/math/quat/distance.js +4 -0
  604. package/dist/interface/math/quat/distance.js.map +1 -0
  605. package/dist/interface/math/quat/dot.d.ts +2 -0
  606. package/dist/interface/math/quat/dot.js +3 -0
  607. package/dist/interface/math/quat/dot.js.map +1 -0
  608. package/dist/interface/math/quat/from-axis-angle.d.ts +3 -0
  609. package/dist/interface/math/quat/from-axis-angle.js +13 -0
  610. package/dist/interface/math/quat/from-axis-angle.js.map +1 -0
  611. package/dist/interface/math/quat/from-euler.d.ts +2 -0
  612. package/dist/interface/math/quat/from-euler.js +15 -0
  613. package/dist/interface/math/quat/from-euler.js.map +1 -0
  614. package/dist/interface/math/quat/identity.d.ts +2 -0
  615. package/dist/interface/math/quat/identity.js +2 -0
  616. package/dist/interface/math/quat/identity.js.map +1 -0
  617. package/dist/interface/math/quat/index.d.ts +2 -0
  618. package/dist/interface/math/quat/index.js +2 -0
  619. package/dist/interface/math/quat/index.js.map +1 -0
  620. package/dist/interface/math/quat/inverse.d.ts +2 -0
  621. package/dist/interface/math/quat/inverse.js +10 -0
  622. package/dist/interface/math/quat/inverse.js.map +1 -0
  623. package/dist/interface/math/quat/length-squared.d.ts +2 -0
  624. package/dist/interface/math/quat/length-squared.js +2 -0
  625. package/dist/interface/math/quat/length-squared.js.map +1 -0
  626. package/dist/interface/math/quat/length.d.ts +2 -0
  627. package/dist/interface/math/quat/length.js +3 -0
  628. package/dist/interface/math/quat/length.js.map +1 -0
  629. package/dist/interface/math/quat/lerp.d.ts +2 -0
  630. package/dist/interface/math/quat/lerp.js +7 -0
  631. package/dist/interface/math/quat/lerp.js.map +1 -0
  632. package/dist/interface/math/quat/look-at.d.ts +3 -0
  633. package/dist/interface/math/quat/look-at.js +49 -0
  634. package/dist/interface/math/quat/look-at.js.map +1 -0
  635. package/dist/interface/math/quat/multiply.d.ts +2 -0
  636. package/dist/interface/math/quat/multiply.js +7 -0
  637. package/dist/interface/math/quat/multiply.js.map +1 -0
  638. package/dist/interface/math/quat/negate.d.ts +2 -0
  639. package/dist/interface/math/quat/negate.js +3 -0
  640. package/dist/interface/math/quat/negate.js.map +1 -0
  641. package/dist/interface/math/quat/normalize.d.ts +2 -0
  642. package/dist/interface/math/quat/normalize.js +7 -0
  643. package/dist/interface/math/quat/normalize.js.map +1 -0
  644. package/dist/interface/math/quat/public.d.ts +24 -0
  645. package/dist/interface/math/quat/public.js +25 -0
  646. package/dist/interface/math/quat/public.js.map +1 -0
  647. package/dist/interface/math/quat/rotate-vec3.d.ts +3 -0
  648. package/dist/interface/math/quat/rotate-vec3.js +14 -0
  649. package/dist/interface/math/quat/rotate-vec3.js.map +1 -0
  650. package/dist/interface/math/quat/scale.d.ts +2 -0
  651. package/dist/interface/math/quat/scale.js +3 -0
  652. package/dist/interface/math/quat/scale.js.map +1 -0
  653. package/dist/interface/math/quat/schema.d.ts +9 -0
  654. package/dist/interface/math/quat/schema.js +3 -0
  655. package/dist/interface/math/quat/schema.js.map +1 -0
  656. package/dist/interface/math/quat/slerp.d.ts +2 -0
  657. package/dist/interface/math/quat/slerp.js +21 -0
  658. package/dist/interface/math/quat/slerp.js.map +1 -0
  659. package/dist/interface/math/quat/subtract.d.ts +2 -0
  660. package/dist/interface/math/quat/subtract.js +8 -0
  661. package/dist/interface/math/quat/subtract.js.map +1 -0
  662. package/dist/interface/math/quat/to-axis-angle.d.ts +6 -0
  663. package/dist/interface/math/quat/to-axis-angle.js +12 -0
  664. package/dist/interface/math/quat/to-axis-angle.js.map +1 -0
  665. package/dist/interface/math/quat/to-euler.d.ts +3 -0
  666. package/dist/interface/math/quat/to-euler.js +21 -0
  667. package/dist/interface/math/quat/to-euler.js.map +1 -0
  668. package/dist/interface/math/quat/to-mat4.d.ts +8 -0
  669. package/dist/interface/math/quat/to-mat4.js +24 -0
  670. package/dist/interface/math/quat/to-mat4.js.map +1 -0
  671. package/dist/interface/math/u32/count-leading-zeros.d.ts +2 -0
  672. package/dist/interface/math/u32/count-leading-zeros.js +3 -0
  673. package/dist/interface/math/u32/count-leading-zeros.js.map +1 -0
  674. package/dist/interface/math/u32/count-one-bits.d.ts +2 -0
  675. package/dist/interface/math/u32/count-one-bits.js +9 -0
  676. package/dist/interface/math/u32/count-one-bits.js.map +1 -0
  677. package/dist/interface/math/u32/count-trailing-zeros.d.ts +2 -0
  678. package/dist/interface/math/u32/count-trailing-zeros.js +6 -0
  679. package/dist/interface/math/u32/count-trailing-zeros.js.map +1 -0
  680. package/dist/interface/math/u32/index.d.ts +3 -0
  681. package/dist/interface/math/u32/index.js +2 -0
  682. package/dist/interface/math/u32/index.js.map +1 -0
  683. package/dist/interface/math/u32/public.d.ts +6 -0
  684. package/dist/interface/math/u32/public.js +7 -0
  685. package/dist/interface/math/u32/public.js.map +1 -0
  686. package/dist/interface/math/u32/reverse-bits.d.ts +2 -0
  687. package/dist/interface/math/u32/reverse-bits.js +10 -0
  688. package/dist/interface/math/u32/reverse-bits.js.map +1 -0
  689. package/dist/interface/math/u32/schema.d.ts +5 -0
  690. package/dist/interface/math/u32/schema.js +2 -0
  691. package/dist/interface/math/u32/schema.js.map +1 -0
  692. package/dist/interface/math/u32/shift-right.d.ts +2 -0
  693. package/dist/interface/math/u32/shift-right.js +2 -0
  694. package/dist/interface/math/u32/shift-right.js.map +1 -0
  695. package/dist/interface/math/vec2/f32/abs.d.ts +2 -0
  696. package/dist/interface/math/vec2/f32/abs.js +3 -0
  697. package/dist/interface/math/vec2/f32/abs.js.map +1 -0
  698. package/dist/interface/math/vec2/f32/acos.d.ts +2 -0
  699. package/dist/interface/math/vec2/f32/acos.js +3 -0
  700. package/dist/interface/math/vec2/f32/acos.js.map +1 -0
  701. package/dist/interface/math/vec2/f32/acosh.d.ts +2 -0
  702. package/dist/interface/math/vec2/f32/acosh.js +3 -0
  703. package/dist/interface/math/vec2/f32/acosh.js.map +1 -0
  704. package/dist/interface/math/vec2/f32/add.d.ts +2 -0
  705. package/dist/interface/math/vec2/f32/add.js +3 -0
  706. package/dist/interface/math/vec2/f32/add.js.map +1 -0
  707. package/dist/interface/math/vec2/f32/asin.d.ts +2 -0
  708. package/dist/interface/math/vec2/f32/asin.js +3 -0
  709. package/dist/interface/math/vec2/f32/asin.js.map +1 -0
  710. package/dist/interface/math/vec2/f32/asinh.d.ts +2 -0
  711. package/dist/interface/math/vec2/f32/asinh.js +3 -0
  712. package/dist/interface/math/vec2/f32/asinh.js.map +1 -0
  713. package/dist/interface/math/vec2/f32/atan.d.ts +2 -0
  714. package/dist/interface/math/vec2/f32/atan.js +3 -0
  715. package/dist/interface/math/vec2/f32/atan.js.map +1 -0
  716. package/dist/interface/math/vec2/f32/atanh.d.ts +2 -0
  717. package/dist/interface/math/vec2/f32/atanh.js +3 -0
  718. package/dist/interface/math/vec2/f32/atanh.js.map +1 -0
  719. package/dist/interface/math/vec2/f32/ceil.d.ts +2 -0
  720. package/dist/interface/math/vec2/f32/ceil.js +3 -0
  721. package/dist/interface/math/vec2/f32/ceil.js.map +1 -0
  722. package/dist/interface/math/vec2/f32/clamp.d.ts +2 -0
  723. package/dist/interface/math/vec2/f32/clamp.js +5 -0
  724. package/dist/interface/math/vec2/f32/clamp.js.map +1 -0
  725. package/dist/interface/math/vec2/f32/cos.d.ts +2 -0
  726. package/dist/interface/math/vec2/f32/cos.js +3 -0
  727. package/dist/interface/math/vec2/f32/cos.js.map +1 -0
  728. package/dist/interface/math/vec2/f32/cosh.d.ts +2 -0
  729. package/dist/interface/math/vec2/f32/cosh.js +3 -0
  730. package/dist/interface/math/vec2/f32/cosh.js.map +1 -0
  731. package/dist/interface/math/vec2/f32/distance.d.ts +2 -0
  732. package/dist/interface/math/vec2/f32/distance.js +5 -0
  733. package/dist/interface/math/vec2/f32/distance.js.map +1 -0
  734. package/dist/interface/math/vec2/f32/dot.d.ts +2 -0
  735. package/dist/interface/math/vec2/f32/dot.js +3 -0
  736. package/dist/interface/math/vec2/f32/dot.js.map +1 -0
  737. package/dist/interface/math/vec2/f32/equals.d.ts +2 -0
  738. package/dist/interface/math/vec2/f32/equals.js +2 -0
  739. package/dist/interface/math/vec2/f32/equals.js.map +1 -0
  740. package/dist/interface/math/vec2/f32/exp.d.ts +2 -0
  741. package/dist/interface/math/vec2/f32/exp.js +3 -0
  742. package/dist/interface/math/vec2/f32/exp.js.map +1 -0
  743. package/dist/interface/math/vec2/f32/exp2.d.ts +2 -0
  744. package/dist/interface/math/vec2/f32/exp2.js +3 -0
  745. package/dist/interface/math/vec2/f32/exp2.js.map +1 -0
  746. package/dist/interface/math/vec2/f32/f32.d.ts +2 -0
  747. package/dist/interface/math/vec2/f32/f32.js +2 -0
  748. package/dist/interface/math/vec2/f32/f32.js.map +1 -0
  749. package/dist/interface/math/vec2/f32/faceforward.d.ts +2 -0
  750. package/dist/interface/math/vec2/f32/faceforward.js +5 -0
  751. package/dist/interface/math/vec2/f32/faceforward.js.map +1 -0
  752. package/dist/interface/math/vec2/f32/floor.d.ts +2 -0
  753. package/dist/interface/math/vec2/f32/floor.js +3 -0
  754. package/dist/interface/math/vec2/f32/floor.js.map +1 -0
  755. package/dist/interface/math/vec2/f32/fract.d.ts +2 -0
  756. package/dist/interface/math/vec2/f32/fract.js +3 -0
  757. package/dist/interface/math/vec2/f32/fract.js.map +1 -0
  758. package/dist/interface/math/vec2/f32/length.d.ts +2 -0
  759. package/dist/interface/math/vec2/f32/length.js +3 -0
  760. package/dist/interface/math/vec2/f32/length.js.map +1 -0
  761. package/dist/interface/math/vec2/f32/log.d.ts +2 -0
  762. package/dist/interface/math/vec2/f32/log.js +3 -0
  763. package/dist/interface/math/vec2/f32/log.js.map +1 -0
  764. package/dist/interface/math/vec2/f32/log2.d.ts +2 -0
  765. package/dist/interface/math/vec2/f32/log2.js +3 -0
  766. package/dist/interface/math/vec2/f32/log2.js.map +1 -0
  767. package/dist/interface/math/vec2/f32/max.d.ts +2 -0
  768. package/dist/interface/math/vec2/f32/max.js +3 -0
  769. package/dist/interface/math/vec2/f32/max.js.map +1 -0
  770. package/dist/interface/math/vec2/f32/min.d.ts +2 -0
  771. package/dist/interface/math/vec2/f32/min.js +3 -0
  772. package/dist/interface/math/vec2/f32/min.js.map +1 -0
  773. package/dist/interface/math/vec2/f32/mix.d.ts +2 -0
  774. package/dist/interface/math/vec2/f32/mix.js +6 -0
  775. package/dist/interface/math/vec2/f32/mix.js.map +1 -0
  776. package/dist/interface/math/vec2/f32/mod.d.ts +2 -0
  777. package/dist/interface/math/vec2/f32/mod.js +2 -0
  778. package/dist/interface/math/vec2/f32/mod.js.map +1 -0
  779. package/dist/interface/math/vec2/f32/modf.d.ts +5 -0
  780. package/dist/interface/math/vec2/f32/modf.js +5 -0
  781. package/dist/interface/math/vec2/f32/modf.js.map +1 -0
  782. package/dist/interface/math/vec2/f32/negate.d.ts +2 -0
  783. package/dist/interface/math/vec2/f32/negate.js +3 -0
  784. package/dist/interface/math/vec2/f32/negate.js.map +1 -0
  785. package/dist/interface/math/vec2/f32/normalize.d.ts +2 -0
  786. package/dist/interface/math/vec2/f32/normalize.js +5 -0
  787. package/dist/interface/math/vec2/f32/normalize.js.map +1 -0
  788. package/dist/interface/math/vec2/f32/pow.d.ts +3 -0
  789. package/dist/interface/math/vec2/f32/pow.js +7 -0
  790. package/dist/interface/math/vec2/f32/pow.js.map +1 -0
  791. package/dist/interface/math/vec2/f32/public.d.ts +47 -0
  792. package/dist/interface/math/vec2/f32/public.js +48 -0
  793. package/dist/interface/math/vec2/f32/public.js.map +1 -0
  794. package/dist/interface/math/vec2/f32/reflect.d.ts +2 -0
  795. package/dist/interface/math/vec2/f32/reflect.js +9 -0
  796. package/dist/interface/math/vec2/f32/reflect.js.map +1 -0
  797. package/dist/interface/math/vec2/f32/refract.d.ts +2 -0
  798. package/dist/interface/math/vec2/f32/refract.js +14 -0
  799. package/dist/interface/math/vec2/f32/refract.js.map +1 -0
  800. package/dist/interface/math/vec2/f32/round.d.ts +2 -0
  801. package/dist/interface/math/vec2/f32/round.js +4 -0
  802. package/dist/interface/math/vec2/f32/round.js.map +1 -0
  803. package/dist/interface/math/vec2/f32/scale.d.ts +2 -0
  804. package/dist/interface/math/vec2/f32/scale.js +3 -0
  805. package/dist/interface/math/vec2/f32/scale.js.map +1 -0
  806. package/dist/interface/math/vec2/f32/schema.d.ts +9 -0
  807. package/dist/interface/math/vec2/f32/schema.js +3 -0
  808. package/dist/interface/math/vec2/f32/schema.js.map +1 -0
  809. package/dist/interface/math/vec2/f32/sign.d.ts +2 -0
  810. package/dist/interface/math/vec2/f32/sign.js +3 -0
  811. package/dist/interface/math/vec2/f32/sign.js.map +1 -0
  812. package/dist/interface/math/vec2/f32/sin.d.ts +2 -0
  813. package/dist/interface/math/vec2/f32/sin.js +3 -0
  814. package/dist/interface/math/vec2/f32/sin.js.map +1 -0
  815. package/dist/interface/math/vec2/f32/sinh.d.ts +2 -0
  816. package/dist/interface/math/vec2/f32/sinh.js +3 -0
  817. package/dist/interface/math/vec2/f32/sinh.js.map +1 -0
  818. package/dist/interface/math/vec2/f32/smoothstep.d.ts +2 -0
  819. package/dist/interface/math/vec2/f32/smoothstep.js +7 -0
  820. package/dist/interface/math/vec2/f32/smoothstep.js.map +1 -0
  821. package/dist/interface/math/vec2/f32/sqrt.d.ts +2 -0
  822. package/dist/interface/math/vec2/f32/sqrt.js +3 -0
  823. package/dist/interface/math/vec2/f32/sqrt.js.map +1 -0
  824. package/dist/interface/math/vec2/f32/step.d.ts +2 -0
  825. package/dist/interface/math/vec2/f32/step.js +6 -0
  826. package/dist/interface/math/vec2/f32/step.js.map +1 -0
  827. package/dist/interface/math/vec2/f32/subtract.d.ts +2 -0
  828. package/dist/interface/math/vec2/f32/subtract.js +3 -0
  829. package/dist/interface/math/vec2/f32/subtract.js.map +1 -0
  830. package/dist/interface/math/vec2/f32/tan.d.ts +2 -0
  831. package/dist/interface/math/vec2/f32/tan.js +3 -0
  832. package/dist/interface/math/vec2/f32/tan.js.map +1 -0
  833. package/dist/interface/math/vec2/f32/tanh.d.ts +2 -0
  834. package/dist/interface/math/vec2/f32/tanh.js +3 -0
  835. package/dist/interface/math/vec2/f32/tanh.js.map +1 -0
  836. package/dist/interface/math/vec2/f32/trunc.d.ts +2 -0
  837. package/dist/interface/math/vec2/f32/trunc.js +3 -0
  838. package/dist/interface/math/vec2/f32/trunc.js.map +1 -0
  839. package/dist/interface/math/vec2/f32/zero.d.ts +2 -0
  840. package/dist/interface/math/vec2/f32/zero.js +2 -0
  841. package/dist/interface/math/vec2/f32/zero.js.map +1 -0
  842. package/dist/interface/math/vec2/i32/abs.d.ts +2 -0
  843. package/dist/interface/math/vec2/i32/abs.js +3 -0
  844. package/dist/interface/math/vec2/i32/abs.js.map +1 -0
  845. package/dist/interface/math/vec2/i32/add.d.ts +2 -0
  846. package/dist/interface/math/vec2/i32/add.js +3 -0
  847. package/dist/interface/math/vec2/i32/add.js.map +1 -0
  848. package/dist/interface/math/vec2/i32/bitwise-and.d.ts +2 -0
  849. package/dist/interface/math/vec2/i32/bitwise-and.js +3 -0
  850. package/dist/interface/math/vec2/i32/bitwise-and.js.map +1 -0
  851. package/dist/interface/math/vec2/i32/bitwise-not.d.ts +2 -0
  852. package/dist/interface/math/vec2/i32/bitwise-not.js +3 -0
  853. package/dist/interface/math/vec2/i32/bitwise-not.js.map +1 -0
  854. package/dist/interface/math/vec2/i32/bitwise-or.d.ts +2 -0
  855. package/dist/interface/math/vec2/i32/bitwise-or.js +3 -0
  856. package/dist/interface/math/vec2/i32/bitwise-or.js.map +1 -0
  857. package/dist/interface/math/vec2/i32/bitwise-xor.d.ts +2 -0
  858. package/dist/interface/math/vec2/i32/bitwise-xor.js +3 -0
  859. package/dist/interface/math/vec2/i32/bitwise-xor.js.map +1 -0
  860. package/dist/interface/math/vec2/i32/clamp.d.ts +2 -0
  861. package/dist/interface/math/vec2/i32/clamp.js +5 -0
  862. package/dist/interface/math/vec2/i32/clamp.js.map +1 -0
  863. package/dist/interface/math/vec2/i32/count-leading-zeros.d.ts +2 -0
  864. package/dist/interface/math/vec2/i32/count-leading-zeros.js +7 -0
  865. package/dist/interface/math/vec2/i32/count-leading-zeros.js.map +1 -0
  866. package/dist/interface/math/vec2/i32/count-one-bits.d.ts +2 -0
  867. package/dist/interface/math/vec2/i32/count-one-bits.js +7 -0
  868. package/dist/interface/math/vec2/i32/count-one-bits.js.map +1 -0
  869. package/dist/interface/math/vec2/i32/count-trailing-zeros.d.ts +2 -0
  870. package/dist/interface/math/vec2/i32/count-trailing-zeros.js +7 -0
  871. package/dist/interface/math/vec2/i32/count-trailing-zeros.js.map +1 -0
  872. package/dist/interface/math/vec2/i32/equals.d.ts +2 -0
  873. package/dist/interface/math/vec2/i32/equals.js +2 -0
  874. package/dist/interface/math/vec2/i32/equals.js.map +1 -0
  875. package/dist/interface/math/vec2/i32/i32.d.ts +3 -0
  876. package/dist/interface/math/vec2/i32/i32.js +2 -0
  877. package/dist/interface/math/vec2/i32/i32.js.map +1 -0
  878. package/dist/interface/math/vec2/i32/max.d.ts +2 -0
  879. package/dist/interface/math/vec2/i32/max.js +3 -0
  880. package/dist/interface/math/vec2/i32/max.js.map +1 -0
  881. package/dist/interface/math/vec2/i32/min.d.ts +2 -0
  882. package/dist/interface/math/vec2/i32/min.js +3 -0
  883. package/dist/interface/math/vec2/i32/min.js.map +1 -0
  884. package/dist/interface/math/vec2/i32/negate.d.ts +2 -0
  885. package/dist/interface/math/vec2/i32/negate.js +3 -0
  886. package/dist/interface/math/vec2/i32/negate.js.map +1 -0
  887. package/dist/interface/math/vec2/i32/public.d.ts +21 -0
  888. package/dist/interface/math/vec2/i32/public.js +22 -0
  889. package/dist/interface/math/vec2/i32/public.js.map +1 -0
  890. package/dist/interface/math/vec2/i32/reverse-bits.d.ts +2 -0
  891. package/dist/interface/math/vec2/i32/reverse-bits.js +4 -0
  892. package/dist/interface/math/vec2/i32/reverse-bits.js.map +1 -0
  893. package/dist/interface/math/vec2/i32/scale.d.ts +3 -0
  894. package/dist/interface/math/vec2/i32/scale.js +3 -0
  895. package/dist/interface/math/vec2/i32/scale.js.map +1 -0
  896. package/dist/interface/math/vec2/i32/schema.d.ts +10 -0
  897. package/dist/interface/math/vec2/i32/schema.js +3 -0
  898. package/dist/interface/math/vec2/i32/schema.js.map +1 -0
  899. package/dist/interface/math/vec2/i32/shift-left.d.ts +2 -0
  900. package/dist/interface/math/vec2/i32/shift-left.js +2 -0
  901. package/dist/interface/math/vec2/i32/shift-left.js.map +1 -0
  902. package/dist/interface/math/vec2/i32/shift-right.d.ts +2 -0
  903. package/dist/interface/math/vec2/i32/shift-right.js +6 -0
  904. package/dist/interface/math/vec2/i32/shift-right.js.map +1 -0
  905. package/dist/interface/math/vec2/i32/subtract.d.ts +2 -0
  906. package/dist/interface/math/vec2/i32/subtract.js +3 -0
  907. package/dist/interface/math/vec2/i32/subtract.js.map +1 -0
  908. package/dist/interface/math/vec2/i32/zero.d.ts +2 -0
  909. package/dist/interface/math/vec2/i32/zero.js +2 -0
  910. package/dist/interface/math/vec2/i32/zero.js.map +1 -0
  911. package/dist/interface/math/vec2/index.d.ts +4 -0
  912. package/dist/interface/math/vec2/index.js +2 -0
  913. package/dist/interface/math/vec2/index.js.map +1 -0
  914. package/dist/interface/math/vec2/public.d.ts +4 -0
  915. package/dist/interface/math/vec2/public.js +5 -0
  916. package/dist/interface/math/vec2/public.js.map +1 -0
  917. package/dist/interface/math/vec2/u32/add.d.ts +2 -0
  918. package/dist/interface/math/vec2/u32/add.js +6 -0
  919. package/dist/interface/math/vec2/u32/add.js.map +1 -0
  920. package/dist/interface/math/vec2/u32/bitwise-and.d.ts +2 -0
  921. package/dist/interface/math/vec2/u32/bitwise-and.js +6 -0
  922. package/dist/interface/math/vec2/u32/bitwise-and.js.map +1 -0
  923. package/dist/interface/math/vec2/u32/bitwise-not.d.ts +2 -0
  924. package/dist/interface/math/vec2/u32/bitwise-not.js +3 -0
  925. package/dist/interface/math/vec2/u32/bitwise-not.js.map +1 -0
  926. package/dist/interface/math/vec2/u32/bitwise-or.d.ts +2 -0
  927. package/dist/interface/math/vec2/u32/bitwise-or.js +6 -0
  928. package/dist/interface/math/vec2/u32/bitwise-or.js.map +1 -0
  929. package/dist/interface/math/vec2/u32/bitwise-xor.d.ts +2 -0
  930. package/dist/interface/math/vec2/u32/bitwise-xor.js +6 -0
  931. package/dist/interface/math/vec2/u32/bitwise-xor.js.map +1 -0
  932. package/dist/interface/math/vec2/u32/clamp.d.ts +2 -0
  933. package/dist/interface/math/vec2/u32/clamp.js +5 -0
  934. package/dist/interface/math/vec2/u32/clamp.js.map +1 -0
  935. package/dist/interface/math/vec2/u32/count-leading-zeros.d.ts +2 -0
  936. package/dist/interface/math/vec2/u32/count-leading-zeros.js +7 -0
  937. package/dist/interface/math/vec2/u32/count-leading-zeros.js.map +1 -0
  938. package/dist/interface/math/vec2/u32/count-one-bits.d.ts +2 -0
  939. package/dist/interface/math/vec2/u32/count-one-bits.js +7 -0
  940. package/dist/interface/math/vec2/u32/count-one-bits.js.map +1 -0
  941. package/dist/interface/math/vec2/u32/count-trailing-zeros.d.ts +2 -0
  942. package/dist/interface/math/vec2/u32/count-trailing-zeros.js +7 -0
  943. package/dist/interface/math/vec2/u32/count-trailing-zeros.js.map +1 -0
  944. package/dist/interface/math/vec2/u32/equals.d.ts +2 -0
  945. package/dist/interface/math/vec2/u32/equals.js +2 -0
  946. package/dist/interface/math/vec2/u32/equals.js.map +1 -0
  947. package/dist/interface/math/vec2/u32/max.d.ts +2 -0
  948. package/dist/interface/math/vec2/u32/max.js +6 -0
  949. package/dist/interface/math/vec2/u32/max.js.map +1 -0
  950. package/dist/interface/math/vec2/u32/min.d.ts +2 -0
  951. package/dist/interface/math/vec2/u32/min.js +6 -0
  952. package/dist/interface/math/vec2/u32/min.js.map +1 -0
  953. package/dist/interface/math/vec2/u32/negate.d.ts +2 -0
  954. package/dist/interface/math/vec2/u32/negate.js +2 -0
  955. package/dist/interface/math/vec2/u32/negate.js.map +1 -0
  956. package/dist/interface/math/vec2/u32/public.d.ts +20 -0
  957. package/dist/interface/math/vec2/u32/public.js +21 -0
  958. package/dist/interface/math/vec2/u32/public.js.map +1 -0
  959. package/dist/interface/math/vec2/u32/reverse-bits.d.ts +2 -0
  960. package/dist/interface/math/vec2/u32/reverse-bits.js +7 -0
  961. package/dist/interface/math/vec2/u32/reverse-bits.js.map +1 -0
  962. package/dist/interface/math/vec2/u32/scale.d.ts +3 -0
  963. package/dist/interface/math/vec2/u32/scale.js +3 -0
  964. package/dist/interface/math/vec2/u32/scale.js.map +1 -0
  965. package/dist/interface/math/vec2/u32/schema.d.ts +10 -0
  966. package/dist/interface/math/vec2/u32/schema.js +3 -0
  967. package/dist/interface/math/vec2/u32/schema.js.map +1 -0
  968. package/dist/interface/math/vec2/u32/shift-left.d.ts +2 -0
  969. package/dist/interface/math/vec2/u32/shift-left.js +2 -0
  970. package/dist/interface/math/vec2/u32/shift-left.js.map +1 -0
  971. package/dist/interface/math/vec2/u32/shift-right.d.ts +2 -0
  972. package/dist/interface/math/vec2/u32/shift-right.js +6 -0
  973. package/dist/interface/math/vec2/u32/shift-right.js.map +1 -0
  974. package/dist/interface/math/vec2/u32/subtract.d.ts +2 -0
  975. package/dist/interface/math/vec2/u32/subtract.js +6 -0
  976. package/dist/interface/math/vec2/u32/subtract.js.map +1 -0
  977. package/dist/interface/math/vec2/u32/u32.d.ts +3 -0
  978. package/dist/interface/math/vec2/u32/u32.js +2 -0
  979. package/dist/interface/math/vec2/u32/u32.js.map +1 -0
  980. package/dist/interface/math/vec2/u32/zero.d.ts +2 -0
  981. package/dist/interface/math/vec2/u32/zero.js +2 -0
  982. package/dist/interface/math/vec2/u32/zero.js.map +1 -0
  983. package/dist/interface/math/vec3/f32/abs.d.ts +2 -0
  984. package/dist/interface/math/vec3/f32/abs.js +3 -0
  985. package/dist/interface/math/vec3/f32/abs.js.map +1 -0
  986. package/dist/interface/math/vec3/f32/acos.d.ts +2 -0
  987. package/dist/interface/math/vec3/f32/acos.js +3 -0
  988. package/dist/interface/math/vec3/f32/acos.js.map +1 -0
  989. package/dist/interface/math/vec3/f32/acosh.d.ts +2 -0
  990. package/dist/interface/math/vec3/f32/acosh.js +3 -0
  991. package/dist/interface/math/vec3/f32/acosh.js.map +1 -0
  992. package/dist/interface/math/vec3/f32/add.d.ts +2 -0
  993. package/dist/interface/math/vec3/f32/add.js +7 -0
  994. package/dist/interface/math/vec3/f32/add.js.map +1 -0
  995. package/dist/interface/math/vec3/f32/asin.d.ts +2 -0
  996. package/dist/interface/math/vec3/f32/asin.js +3 -0
  997. package/dist/interface/math/vec3/f32/asin.js.map +1 -0
  998. package/dist/interface/math/vec3/f32/asinh.d.ts +2 -0
  999. package/dist/interface/math/vec3/f32/asinh.js +3 -0
  1000. package/dist/interface/math/vec3/f32/asinh.js.map +1 -0
  1001. package/dist/interface/math/vec3/f32/atan.d.ts +2 -0
  1002. package/dist/interface/math/vec3/f32/atan.js +3 -0
  1003. package/dist/interface/math/vec3/f32/atan.js.map +1 -0
  1004. package/dist/interface/math/vec3/f32/atanh.d.ts +2 -0
  1005. package/dist/interface/math/vec3/f32/atanh.js +3 -0
  1006. package/dist/interface/math/vec3/f32/atanh.js.map +1 -0
  1007. package/dist/interface/math/vec3/f32/ceil.d.ts +2 -0
  1008. package/dist/interface/math/vec3/f32/ceil.js +3 -0
  1009. package/dist/interface/math/vec3/f32/ceil.js.map +1 -0
  1010. package/dist/interface/math/vec3/f32/clamp.d.ts +2 -0
  1011. package/dist/interface/math/vec3/f32/clamp.js +5 -0
  1012. package/dist/interface/math/vec3/f32/clamp.js.map +1 -0
  1013. package/dist/interface/math/vec3/f32/cos.d.ts +2 -0
  1014. package/dist/interface/math/vec3/f32/cos.js +3 -0
  1015. package/dist/interface/math/vec3/f32/cos.js.map +1 -0
  1016. package/dist/interface/math/vec3/f32/cosh.d.ts +2 -0
  1017. package/dist/interface/math/vec3/f32/cosh.js +3 -0
  1018. package/dist/interface/math/vec3/f32/cosh.js.map +1 -0
  1019. package/dist/interface/math/vec3/f32/cross.d.ts +2 -0
  1020. package/dist/interface/math/vec3/f32/cross.js +7 -0
  1021. package/dist/interface/math/vec3/f32/cross.js.map +1 -0
  1022. package/dist/interface/math/vec3/f32/distance-squared.d.ts +2 -0
  1023. package/dist/interface/math/vec3/f32/distance-squared.js +7 -0
  1024. package/dist/interface/math/vec3/f32/distance-squared.js.map +1 -0
  1025. package/dist/interface/math/vec3/f32/distance.d.ts +2 -0
  1026. package/dist/interface/math/vec3/f32/distance.js +5 -0
  1027. package/dist/interface/math/vec3/f32/distance.js.map +1 -0
  1028. package/dist/interface/math/vec3/f32/dot.d.ts +2 -0
  1029. package/dist/interface/math/vec3/f32/dot.js +3 -0
  1030. package/dist/interface/math/vec3/f32/dot.js.map +1 -0
  1031. package/dist/interface/math/vec3/f32/equals.d.ts +2 -0
  1032. package/dist/interface/math/vec3/f32/equals.js +2 -0
  1033. package/dist/interface/math/vec3/f32/equals.js.map +1 -0
  1034. package/dist/interface/math/vec3/f32/exp.d.ts +2 -0
  1035. package/dist/interface/math/vec3/f32/exp.js +3 -0
  1036. package/dist/interface/math/vec3/f32/exp.js.map +1 -0
  1037. package/dist/interface/math/vec3/f32/exp2.d.ts +2 -0
  1038. package/dist/interface/math/vec3/f32/exp2.js +3 -0
  1039. package/dist/interface/math/vec3/f32/exp2.js.map +1 -0
  1040. package/dist/interface/math/vec3/f32/f32.d.ts +2 -0
  1041. package/dist/interface/math/vec3/f32/f32.js +2 -0
  1042. package/dist/interface/math/vec3/f32/f32.js.map +1 -0
  1043. package/dist/interface/math/vec3/f32/faceforward.d.ts +2 -0
  1044. package/dist/interface/math/vec3/f32/faceforward.js +5 -0
  1045. package/dist/interface/math/vec3/f32/faceforward.js.map +1 -0
  1046. package/dist/interface/math/vec3/f32/floor.d.ts +2 -0
  1047. package/dist/interface/math/vec3/f32/floor.js +3 -0
  1048. package/dist/interface/math/vec3/f32/floor.js.map +1 -0
  1049. package/dist/interface/math/vec3/f32/fract.d.ts +2 -0
  1050. package/dist/interface/math/vec3/f32/fract.js +7 -0
  1051. package/dist/interface/math/vec3/f32/fract.js.map +1 -0
  1052. package/dist/interface/math/vec3/f32/length-squared.d.ts +2 -0
  1053. package/dist/interface/math/vec3/f32/length-squared.js +3 -0
  1054. package/dist/interface/math/vec3/f32/length-squared.js.map +1 -0
  1055. package/dist/interface/math/vec3/f32/length.d.ts +2 -0
  1056. package/dist/interface/math/vec3/f32/length.js +3 -0
  1057. package/dist/interface/math/vec3/f32/length.js.map +1 -0
  1058. package/dist/interface/math/vec3/f32/log.d.ts +2 -0
  1059. package/dist/interface/math/vec3/f32/log.js +3 -0
  1060. package/dist/interface/math/vec3/f32/log.js.map +1 -0
  1061. package/dist/interface/math/vec3/f32/log2.d.ts +2 -0
  1062. package/dist/interface/math/vec3/f32/log2.js +3 -0
  1063. package/dist/interface/math/vec3/f32/log2.js.map +1 -0
  1064. package/dist/interface/math/vec3/f32/max.d.ts +2 -0
  1065. package/dist/interface/math/vec3/f32/max.js +7 -0
  1066. package/dist/interface/math/vec3/f32/max.js.map +1 -0
  1067. package/dist/interface/math/vec3/f32/min.d.ts +2 -0
  1068. package/dist/interface/math/vec3/f32/min.js +7 -0
  1069. package/dist/interface/math/vec3/f32/min.js.map +1 -0
  1070. package/dist/interface/math/vec3/f32/mix.d.ts +2 -0
  1071. package/dist/interface/math/vec3/f32/mix.js +7 -0
  1072. package/dist/interface/math/vec3/f32/mix.js.map +1 -0
  1073. package/dist/interface/math/vec3/f32/mod.d.ts +2 -0
  1074. package/dist/interface/math/vec3/f32/mod.js +6 -0
  1075. package/dist/interface/math/vec3/f32/mod.js.map +1 -0
  1076. package/dist/interface/math/vec3/f32/modf.d.ts +5 -0
  1077. package/dist/interface/math/vec3/f32/modf.js +5 -0
  1078. package/dist/interface/math/vec3/f32/modf.js.map +1 -0
  1079. package/dist/interface/math/vec3/f32/multiply.d.ts +5 -0
  1080. package/dist/interface/math/vec3/f32/multiply.js +10 -0
  1081. package/dist/interface/math/vec3/f32/multiply.js.map +1 -0
  1082. package/dist/interface/math/vec3/f32/negate.d.ts +2 -0
  1083. package/dist/interface/math/vec3/f32/negate.js +3 -0
  1084. package/dist/interface/math/vec3/f32/negate.js.map +1 -0
  1085. package/dist/interface/math/vec3/f32/normalize.d.ts +2 -0
  1086. package/dist/interface/math/vec3/f32/normalize.js +5 -0
  1087. package/dist/interface/math/vec3/f32/normalize.js.map +1 -0
  1088. package/dist/interface/math/vec3/f32/one.d.ts +2 -0
  1089. package/dist/interface/math/vec3/f32/one.js +2 -0
  1090. package/dist/interface/math/vec3/f32/one.js.map +1 -0
  1091. package/dist/interface/math/vec3/f32/pow.d.ts +3 -0
  1092. package/dist/interface/math/vec3/f32/pow.js +8 -0
  1093. package/dist/interface/math/vec3/f32/pow.js.map +1 -0
  1094. package/dist/interface/math/vec3/f32/public.d.ts +53 -0
  1095. package/dist/interface/math/vec3/f32/public.js +54 -0
  1096. package/dist/interface/math/vec3/f32/public.js.map +1 -0
  1097. package/dist/interface/math/vec3/f32/random.d.ts +2 -0
  1098. package/dist/interface/math/vec3/f32/random.js +4 -0
  1099. package/dist/interface/math/vec3/f32/random.js.map +1 -0
  1100. package/dist/interface/math/vec3/f32/reflect.d.ts +2 -0
  1101. package/dist/interface/math/vec3/f32/reflect.js +9 -0
  1102. package/dist/interface/math/vec3/f32/reflect.js.map +1 -0
  1103. package/dist/interface/math/vec3/f32/refract.d.ts +2 -0
  1104. package/dist/interface/math/vec3/f32/refract.js +14 -0
  1105. package/dist/interface/math/vec3/f32/refract.js.map +1 -0
  1106. package/dist/interface/math/vec3/f32/round.d.ts +2 -0
  1107. package/dist/interface/math/vec3/f32/round.js +8 -0
  1108. package/dist/interface/math/vec3/f32/round.js.map +1 -0
  1109. package/dist/interface/math/vec3/f32/scale.d.ts +2 -0
  1110. package/dist/interface/math/vec3/f32/scale.js +3 -0
  1111. package/dist/interface/math/vec3/f32/scale.js.map +1 -0
  1112. package/dist/interface/math/vec3/f32/schema.d.ts +9 -0
  1113. package/dist/interface/math/vec3/f32/schema.js +3 -0
  1114. package/dist/interface/math/vec3/f32/schema.js.map +1 -0
  1115. package/dist/interface/math/vec3/f32/sign.d.ts +2 -0
  1116. package/dist/interface/math/vec3/f32/sign.js +3 -0
  1117. package/dist/interface/math/vec3/f32/sign.js.map +1 -0
  1118. package/dist/interface/math/vec3/f32/sin.d.ts +2 -0
  1119. package/dist/interface/math/vec3/f32/sin.js +3 -0
  1120. package/dist/interface/math/vec3/f32/sin.js.map +1 -0
  1121. package/dist/interface/math/vec3/f32/sinh.d.ts +2 -0
  1122. package/dist/interface/math/vec3/f32/sinh.js +3 -0
  1123. package/dist/interface/math/vec3/f32/sinh.js.map +1 -0
  1124. package/dist/interface/math/vec3/f32/smoothstep.d.ts +2 -0
  1125. package/dist/interface/math/vec3/f32/smoothstep.js +12 -0
  1126. package/dist/interface/math/vec3/f32/smoothstep.js.map +1 -0
  1127. package/dist/interface/math/vec3/f32/sqrt.d.ts +2 -0
  1128. package/dist/interface/math/vec3/f32/sqrt.js +3 -0
  1129. package/dist/interface/math/vec3/f32/sqrt.js.map +1 -0
  1130. package/dist/interface/math/vec3/f32/step.d.ts +2 -0
  1131. package/dist/interface/math/vec3/f32/step.js +7 -0
  1132. package/dist/interface/math/vec3/f32/step.js.map +1 -0
  1133. package/dist/interface/math/vec3/f32/subtract.d.ts +2 -0
  1134. package/dist/interface/math/vec3/f32/subtract.js +7 -0
  1135. package/dist/interface/math/vec3/f32/subtract.js.map +1 -0
  1136. package/dist/interface/math/vec3/f32/tan.d.ts +2 -0
  1137. package/dist/interface/math/vec3/f32/tan.js +3 -0
  1138. package/dist/interface/math/vec3/f32/tan.js.map +1 -0
  1139. package/dist/interface/math/vec3/f32/tanh.d.ts +2 -0
  1140. package/dist/interface/math/vec3/f32/tanh.js +3 -0
  1141. package/dist/interface/math/vec3/f32/tanh.js.map +1 -0
  1142. package/dist/interface/math/vec3/f32/trunc.d.ts +2 -0
  1143. package/dist/interface/math/vec3/f32/trunc.js +3 -0
  1144. package/dist/interface/math/vec3/f32/trunc.js.map +1 -0
  1145. package/dist/interface/math/vec3/f32/zero.d.ts +2 -0
  1146. package/dist/interface/math/vec3/f32/zero.js +2 -0
  1147. package/dist/interface/math/vec3/f32/zero.js.map +1 -0
  1148. package/dist/interface/math/vec3/i32/abs.d.ts +2 -0
  1149. package/dist/interface/math/vec3/i32/abs.js +7 -0
  1150. package/dist/interface/math/vec3/i32/abs.js.map +1 -0
  1151. package/dist/interface/math/vec3/i32/add.d.ts +2 -0
  1152. package/dist/interface/math/vec3/i32/add.js +7 -0
  1153. package/dist/interface/math/vec3/i32/add.js.map +1 -0
  1154. package/dist/interface/math/vec3/i32/bitwise-and.d.ts +2 -0
  1155. package/dist/interface/math/vec3/i32/bitwise-and.js +7 -0
  1156. package/dist/interface/math/vec3/i32/bitwise-and.js.map +1 -0
  1157. package/dist/interface/math/vec3/i32/bitwise-not.d.ts +2 -0
  1158. package/dist/interface/math/vec3/i32/bitwise-not.js +3 -0
  1159. package/dist/interface/math/vec3/i32/bitwise-not.js.map +1 -0
  1160. package/dist/interface/math/vec3/i32/bitwise-or.d.ts +2 -0
  1161. package/dist/interface/math/vec3/i32/bitwise-or.js +7 -0
  1162. package/dist/interface/math/vec3/i32/bitwise-or.js.map +1 -0
  1163. package/dist/interface/math/vec3/i32/bitwise-xor.d.ts +2 -0
  1164. package/dist/interface/math/vec3/i32/bitwise-xor.js +7 -0
  1165. package/dist/interface/math/vec3/i32/bitwise-xor.js.map +1 -0
  1166. package/dist/interface/math/vec3/i32/clamp.d.ts +2 -0
  1167. package/dist/interface/math/vec3/i32/clamp.js +5 -0
  1168. package/dist/interface/math/vec3/i32/clamp.js.map +1 -0
  1169. package/dist/interface/math/vec3/i32/count-leading-zeros.d.ts +2 -0
  1170. package/dist/interface/math/vec3/i32/count-leading-zeros.js +8 -0
  1171. package/dist/interface/math/vec3/i32/count-leading-zeros.js.map +1 -0
  1172. package/dist/interface/math/vec3/i32/count-one-bits.d.ts +2 -0
  1173. package/dist/interface/math/vec3/i32/count-one-bits.js +8 -0
  1174. package/dist/interface/math/vec3/i32/count-one-bits.js.map +1 -0
  1175. package/dist/interface/math/vec3/i32/count-trailing-zeros.d.ts +2 -0
  1176. package/dist/interface/math/vec3/i32/count-trailing-zeros.js +8 -0
  1177. package/dist/interface/math/vec3/i32/count-trailing-zeros.js.map +1 -0
  1178. package/dist/interface/math/vec3/i32/equals.d.ts +2 -0
  1179. package/dist/interface/math/vec3/i32/equals.js +2 -0
  1180. package/dist/interface/math/vec3/i32/equals.js.map +1 -0
  1181. package/dist/interface/math/vec3/i32/i32.d.ts +3 -0
  1182. package/dist/interface/math/vec3/i32/i32.js +2 -0
  1183. package/dist/interface/math/vec3/i32/i32.js.map +1 -0
  1184. package/dist/interface/math/vec3/i32/max.d.ts +2 -0
  1185. package/dist/interface/math/vec3/i32/max.js +7 -0
  1186. package/dist/interface/math/vec3/i32/max.js.map +1 -0
  1187. package/dist/interface/math/vec3/i32/min.d.ts +2 -0
  1188. package/dist/interface/math/vec3/i32/min.js +7 -0
  1189. package/dist/interface/math/vec3/i32/min.js.map +1 -0
  1190. package/dist/interface/math/vec3/i32/multiply.d.ts +2 -0
  1191. package/dist/interface/math/vec3/i32/multiply.js +7 -0
  1192. package/dist/interface/math/vec3/i32/multiply.js.map +1 -0
  1193. package/dist/interface/math/vec3/i32/negate.d.ts +2 -0
  1194. package/dist/interface/math/vec3/i32/negate.js +7 -0
  1195. package/dist/interface/math/vec3/i32/negate.js.map +1 -0
  1196. package/dist/interface/math/vec3/i32/one.d.ts +2 -0
  1197. package/dist/interface/math/vec3/i32/one.js +2 -0
  1198. package/dist/interface/math/vec3/i32/one.js.map +1 -0
  1199. package/dist/interface/math/vec3/i32/public.d.ts +23 -0
  1200. package/dist/interface/math/vec3/i32/public.js +24 -0
  1201. package/dist/interface/math/vec3/i32/public.js.map +1 -0
  1202. package/dist/interface/math/vec3/i32/reverse-bits.d.ts +2 -0
  1203. package/dist/interface/math/vec3/i32/reverse-bits.js +8 -0
  1204. package/dist/interface/math/vec3/i32/reverse-bits.js.map +1 -0
  1205. package/dist/interface/math/vec3/i32/scale.d.ts +3 -0
  1206. package/dist/interface/math/vec3/i32/scale.js +7 -0
  1207. package/dist/interface/math/vec3/i32/scale.js.map +1 -0
  1208. package/dist/interface/math/vec3/i32/schema.d.ts +10 -0
  1209. package/dist/interface/math/vec3/i32/schema.js +3 -0
  1210. package/dist/interface/math/vec3/i32/schema.js.map +1 -0
  1211. package/dist/interface/math/vec3/i32/shift-left.d.ts +2 -0
  1212. package/dist/interface/math/vec3/i32/shift-left.js +2 -0
  1213. package/dist/interface/math/vec3/i32/shift-left.js.map +1 -0
  1214. package/dist/interface/math/vec3/i32/shift-right.d.ts +2 -0
  1215. package/dist/interface/math/vec3/i32/shift-right.js +7 -0
  1216. package/dist/interface/math/vec3/i32/shift-right.js.map +1 -0
  1217. package/dist/interface/math/vec3/i32/subtract.d.ts +2 -0
  1218. package/dist/interface/math/vec3/i32/subtract.js +7 -0
  1219. package/dist/interface/math/vec3/i32/subtract.js.map +1 -0
  1220. package/dist/interface/math/vec3/i32/zero.d.ts +2 -0
  1221. package/dist/interface/math/vec3/i32/zero.js +2 -0
  1222. package/dist/interface/math/vec3/i32/zero.js.map +1 -0
  1223. package/dist/interface/math/vec3/index.d.ts +4 -0
  1224. package/dist/interface/math/vec3/index.js +2 -0
  1225. package/dist/interface/math/vec3/index.js.map +1 -0
  1226. package/dist/interface/math/vec3/public.d.ts +4 -0
  1227. package/dist/interface/math/vec3/public.js +5 -0
  1228. package/dist/interface/math/vec3/public.js.map +1 -0
  1229. package/dist/interface/math/vec3/u32/add.d.ts +2 -0
  1230. package/dist/interface/math/vec3/u32/add.js +7 -0
  1231. package/dist/interface/math/vec3/u32/add.js.map +1 -0
  1232. package/dist/interface/math/vec3/u32/bitwise-and.d.ts +2 -0
  1233. package/dist/interface/math/vec3/u32/bitwise-and.js +7 -0
  1234. package/dist/interface/math/vec3/u32/bitwise-and.js.map +1 -0
  1235. package/dist/interface/math/vec3/u32/bitwise-not.d.ts +2 -0
  1236. package/dist/interface/math/vec3/u32/bitwise-not.js +3 -0
  1237. package/dist/interface/math/vec3/u32/bitwise-not.js.map +1 -0
  1238. package/dist/interface/math/vec3/u32/bitwise-or.d.ts +2 -0
  1239. package/dist/interface/math/vec3/u32/bitwise-or.js +7 -0
  1240. package/dist/interface/math/vec3/u32/bitwise-or.js.map +1 -0
  1241. package/dist/interface/math/vec3/u32/bitwise-xor.d.ts +2 -0
  1242. package/dist/interface/math/vec3/u32/bitwise-xor.js +7 -0
  1243. package/dist/interface/math/vec3/u32/bitwise-xor.js.map +1 -0
  1244. package/dist/interface/math/vec3/u32/clamp.d.ts +2 -0
  1245. package/dist/interface/math/vec3/u32/clamp.js +5 -0
  1246. package/dist/interface/math/vec3/u32/clamp.js.map +1 -0
  1247. package/dist/interface/math/vec3/u32/count-leading-zeros.d.ts +2 -0
  1248. package/dist/interface/math/vec3/u32/count-leading-zeros.js +8 -0
  1249. package/dist/interface/math/vec3/u32/count-leading-zeros.js.map +1 -0
  1250. package/dist/interface/math/vec3/u32/count-one-bits.d.ts +2 -0
  1251. package/dist/interface/math/vec3/u32/count-one-bits.js +8 -0
  1252. package/dist/interface/math/vec3/u32/count-one-bits.js.map +1 -0
  1253. package/dist/interface/math/vec3/u32/count-trailing-zeros.d.ts +2 -0
  1254. package/dist/interface/math/vec3/u32/count-trailing-zeros.js +8 -0
  1255. package/dist/interface/math/vec3/u32/count-trailing-zeros.js.map +1 -0
  1256. package/dist/interface/math/vec3/u32/equals.d.ts +2 -0
  1257. package/dist/interface/math/vec3/u32/equals.js +2 -0
  1258. package/dist/interface/math/vec3/u32/equals.js.map +1 -0
  1259. package/dist/interface/math/vec3/u32/max.d.ts +2 -0
  1260. package/dist/interface/math/vec3/u32/max.js +7 -0
  1261. package/dist/interface/math/vec3/u32/max.js.map +1 -0
  1262. package/dist/interface/math/vec3/u32/min.d.ts +2 -0
  1263. package/dist/interface/math/vec3/u32/min.js +7 -0
  1264. package/dist/interface/math/vec3/u32/min.js.map +1 -0
  1265. package/dist/interface/math/vec3/u32/multiply.d.ts +2 -0
  1266. package/dist/interface/math/vec3/u32/multiply.js +7 -0
  1267. package/dist/interface/math/vec3/u32/multiply.js.map +1 -0
  1268. package/dist/interface/math/vec3/u32/negate.d.ts +2 -0
  1269. package/dist/interface/math/vec3/u32/negate.js +2 -0
  1270. package/dist/interface/math/vec3/u32/negate.js.map +1 -0
  1271. package/dist/interface/math/vec3/u32/one.d.ts +2 -0
  1272. package/dist/interface/math/vec3/u32/one.js +2 -0
  1273. package/dist/interface/math/vec3/u32/one.js.map +1 -0
  1274. package/dist/interface/math/vec3/u32/public.d.ts +23 -0
  1275. package/dist/interface/math/vec3/u32/public.js +24 -0
  1276. package/dist/interface/math/vec3/u32/public.js.map +1 -0
  1277. package/dist/interface/math/vec3/u32/reverse-bits.d.ts +2 -0
  1278. package/dist/interface/math/vec3/u32/reverse-bits.js +8 -0
  1279. package/dist/interface/math/vec3/u32/reverse-bits.js.map +1 -0
  1280. package/dist/interface/math/vec3/u32/scale.d.ts +3 -0
  1281. package/dist/interface/math/vec3/u32/scale.js +7 -0
  1282. package/dist/interface/math/vec3/u32/scale.js.map +1 -0
  1283. package/dist/interface/math/vec3/u32/schema.d.ts +10 -0
  1284. package/dist/interface/math/vec3/u32/schema.js +3 -0
  1285. package/dist/interface/math/vec3/u32/schema.js.map +1 -0
  1286. package/dist/interface/math/vec3/u32/shift-left.d.ts +2 -0
  1287. package/dist/interface/math/vec3/u32/shift-left.js +6 -0
  1288. package/dist/interface/math/vec3/u32/shift-left.js.map +1 -0
  1289. package/dist/interface/math/vec3/u32/shift-right.d.ts +2 -0
  1290. package/dist/interface/math/vec3/u32/shift-right.js +7 -0
  1291. package/dist/interface/math/vec3/u32/shift-right.js.map +1 -0
  1292. package/dist/interface/math/vec3/u32/subtract.d.ts +2 -0
  1293. package/dist/interface/math/vec3/u32/subtract.js +7 -0
  1294. package/dist/interface/math/vec3/u32/subtract.js.map +1 -0
  1295. package/dist/interface/math/vec3/u32/u32.d.ts +3 -0
  1296. package/dist/interface/math/vec3/u32/u32.js +2 -0
  1297. package/dist/interface/math/vec3/u32/u32.js.map +1 -0
  1298. package/dist/interface/math/vec3/u32/volume.d.ts +2 -0
  1299. package/dist/interface/math/vec3/u32/volume.js +2 -0
  1300. package/dist/interface/math/vec3/u32/volume.js.map +1 -0
  1301. package/dist/interface/math/vec3/u32/zero.d.ts +2 -0
  1302. package/dist/interface/math/vec3/u32/zero.js +2 -0
  1303. package/dist/interface/math/vec3/u32/zero.js.map +1 -0
  1304. package/dist/interface/math/vec4/f32/abs.d.ts +2 -0
  1305. package/dist/interface/math/vec4/f32/abs.js +3 -0
  1306. package/dist/interface/math/vec4/f32/abs.js.map +1 -0
  1307. package/dist/interface/math/vec4/f32/acos.d.ts +2 -0
  1308. package/dist/interface/math/vec4/f32/acos.js +3 -0
  1309. package/dist/interface/math/vec4/f32/acos.js.map +1 -0
  1310. package/dist/interface/math/vec4/f32/acosh.d.ts +2 -0
  1311. package/dist/interface/math/vec4/f32/acosh.js +3 -0
  1312. package/dist/interface/math/vec4/f32/acosh.js.map +1 -0
  1313. package/dist/interface/math/vec4/f32/add.d.ts +2 -0
  1314. package/dist/interface/math/vec4/f32/add.js +8 -0
  1315. package/dist/interface/math/vec4/f32/add.js.map +1 -0
  1316. package/dist/interface/math/vec4/f32/asin.d.ts +2 -0
  1317. package/dist/interface/math/vec4/f32/asin.js +3 -0
  1318. package/dist/interface/math/vec4/f32/asin.js.map +1 -0
  1319. package/dist/interface/math/vec4/f32/asinh.d.ts +2 -0
  1320. package/dist/interface/math/vec4/f32/asinh.js +3 -0
  1321. package/dist/interface/math/vec4/f32/asinh.js.map +1 -0
  1322. package/dist/interface/math/vec4/f32/atan.d.ts +2 -0
  1323. package/dist/interface/math/vec4/f32/atan.js +3 -0
  1324. package/dist/interface/math/vec4/f32/atan.js.map +1 -0
  1325. package/dist/interface/math/vec4/f32/atanh.d.ts +2 -0
  1326. package/dist/interface/math/vec4/f32/atanh.js +3 -0
  1327. package/dist/interface/math/vec4/f32/atanh.js.map +1 -0
  1328. package/dist/interface/math/vec4/f32/ceil.d.ts +2 -0
  1329. package/dist/interface/math/vec4/f32/ceil.js +3 -0
  1330. package/dist/interface/math/vec4/f32/ceil.js.map +1 -0
  1331. package/dist/interface/math/vec4/f32/clamp.d.ts +2 -0
  1332. package/dist/interface/math/vec4/f32/clamp.js +5 -0
  1333. package/dist/interface/math/vec4/f32/clamp.js.map +1 -0
  1334. package/dist/interface/math/vec4/f32/cos.d.ts +2 -0
  1335. package/dist/interface/math/vec4/f32/cos.js +3 -0
  1336. package/dist/interface/math/vec4/f32/cos.js.map +1 -0
  1337. package/dist/interface/math/vec4/f32/cosh.d.ts +2 -0
  1338. package/dist/interface/math/vec4/f32/cosh.js +3 -0
  1339. package/dist/interface/math/vec4/f32/cosh.js.map +1 -0
  1340. package/dist/interface/math/vec4/f32/distance.d.ts +2 -0
  1341. package/dist/interface/math/vec4/f32/distance.js +5 -0
  1342. package/dist/interface/math/vec4/f32/distance.js.map +1 -0
  1343. package/dist/interface/math/vec4/f32/dot.d.ts +2 -0
  1344. package/dist/interface/math/vec4/f32/dot.js +3 -0
  1345. package/dist/interface/math/vec4/f32/dot.js.map +1 -0
  1346. package/dist/interface/math/vec4/f32/exp.d.ts +2 -0
  1347. package/dist/interface/math/vec4/f32/exp.js +3 -0
  1348. package/dist/interface/math/vec4/f32/exp.js.map +1 -0
  1349. package/dist/interface/math/vec4/f32/exp2.d.ts +2 -0
  1350. package/dist/interface/math/vec4/f32/exp2.js +3 -0
  1351. package/dist/interface/math/vec4/f32/exp2.js.map +1 -0
  1352. package/dist/interface/math/vec4/f32/f32.d.ts +2 -0
  1353. package/dist/interface/math/vec4/f32/f32.js +2 -0
  1354. package/dist/interface/math/vec4/f32/f32.js.map +1 -0
  1355. package/dist/interface/math/vec4/f32/faceforward.d.ts +2 -0
  1356. package/dist/interface/math/vec4/f32/faceforward.js +5 -0
  1357. package/dist/interface/math/vec4/f32/faceforward.js.map +1 -0
  1358. package/dist/interface/math/vec4/f32/floor.d.ts +2 -0
  1359. package/dist/interface/math/vec4/f32/floor.js +3 -0
  1360. package/dist/interface/math/vec4/f32/floor.js.map +1 -0
  1361. package/dist/interface/math/vec4/f32/fract.d.ts +2 -0
  1362. package/dist/interface/math/vec4/f32/fract.js +8 -0
  1363. package/dist/interface/math/vec4/f32/fract.js.map +1 -0
  1364. package/dist/interface/math/vec4/f32/length.d.ts +2 -0
  1365. package/dist/interface/math/vec4/f32/length.js +3 -0
  1366. package/dist/interface/math/vec4/f32/length.js.map +1 -0
  1367. package/dist/interface/math/vec4/f32/log.d.ts +2 -0
  1368. package/dist/interface/math/vec4/f32/log.js +3 -0
  1369. package/dist/interface/math/vec4/f32/log.js.map +1 -0
  1370. package/dist/interface/math/vec4/f32/log2.d.ts +2 -0
  1371. package/dist/interface/math/vec4/f32/log2.js +3 -0
  1372. package/dist/interface/math/vec4/f32/log2.js.map +1 -0
  1373. package/dist/interface/math/vec4/f32/max.d.ts +2 -0
  1374. package/dist/interface/math/vec4/f32/max.js +8 -0
  1375. package/dist/interface/math/vec4/f32/max.js.map +1 -0
  1376. package/dist/interface/math/vec4/f32/min.d.ts +2 -0
  1377. package/dist/interface/math/vec4/f32/min.js +8 -0
  1378. package/dist/interface/math/vec4/f32/min.js.map +1 -0
  1379. package/dist/interface/math/vec4/f32/mix.d.ts +2 -0
  1380. package/dist/interface/math/vec4/f32/mix.js +8 -0
  1381. package/dist/interface/math/vec4/f32/mix.js.map +1 -0
  1382. package/dist/interface/math/vec4/f32/mod.d.ts +2 -0
  1383. package/dist/interface/math/vec4/f32/mod.js +7 -0
  1384. package/dist/interface/math/vec4/f32/mod.js.map +1 -0
  1385. package/dist/interface/math/vec4/f32/modf.d.ts +5 -0
  1386. package/dist/interface/math/vec4/f32/modf.js +5 -0
  1387. package/dist/interface/math/vec4/f32/modf.js.map +1 -0
  1388. package/dist/interface/math/vec4/f32/multiply.d.ts +2 -0
  1389. package/dist/interface/math/vec4/f32/multiply.js +8 -0
  1390. package/dist/interface/math/vec4/f32/multiply.js.map +1 -0
  1391. package/dist/interface/math/vec4/f32/negate.d.ts +2 -0
  1392. package/dist/interface/math/vec4/f32/negate.js +3 -0
  1393. package/dist/interface/math/vec4/f32/negate.js.map +1 -0
  1394. package/dist/interface/math/vec4/f32/normalize.d.ts +2 -0
  1395. package/dist/interface/math/vec4/f32/normalize.js +5 -0
  1396. package/dist/interface/math/vec4/f32/normalize.js.map +1 -0
  1397. package/dist/interface/math/vec4/f32/pow.d.ts +3 -0
  1398. package/dist/interface/math/vec4/f32/pow.js +9 -0
  1399. package/dist/interface/math/vec4/f32/pow.js.map +1 -0
  1400. package/dist/interface/math/vec4/f32/public.d.ts +46 -0
  1401. package/dist/interface/math/vec4/f32/public.js +47 -0
  1402. package/dist/interface/math/vec4/f32/public.js.map +1 -0
  1403. package/dist/interface/math/vec4/f32/reflect.d.ts +2 -0
  1404. package/dist/interface/math/vec4/f32/reflect.js +9 -0
  1405. package/dist/interface/math/vec4/f32/reflect.js.map +1 -0
  1406. package/dist/interface/math/vec4/f32/refract.d.ts +2 -0
  1407. package/dist/interface/math/vec4/f32/refract.js +14 -0
  1408. package/dist/interface/math/vec4/f32/refract.js.map +1 -0
  1409. package/dist/interface/math/vec4/f32/round.d.ts +2 -0
  1410. package/dist/interface/math/vec4/f32/round.js +9 -0
  1411. package/dist/interface/math/vec4/f32/round.js.map +1 -0
  1412. package/dist/interface/math/vec4/f32/scale.d.ts +2 -0
  1413. package/dist/interface/math/vec4/f32/scale.js +3 -0
  1414. package/dist/interface/math/vec4/f32/scale.js.map +1 -0
  1415. package/dist/interface/math/vec4/f32/schema.d.ts +9 -0
  1416. package/dist/interface/math/vec4/f32/schema.js +3 -0
  1417. package/dist/interface/math/vec4/f32/schema.js.map +1 -0
  1418. package/dist/interface/math/vec4/f32/sign.d.ts +2 -0
  1419. package/dist/interface/math/vec4/f32/sign.js +3 -0
  1420. package/dist/interface/math/vec4/f32/sign.js.map +1 -0
  1421. package/dist/interface/math/vec4/f32/sin.d.ts +2 -0
  1422. package/dist/interface/math/vec4/f32/sin.js +3 -0
  1423. package/dist/interface/math/vec4/f32/sin.js.map +1 -0
  1424. package/dist/interface/math/vec4/f32/sinh.d.ts +2 -0
  1425. package/dist/interface/math/vec4/f32/sinh.js +3 -0
  1426. package/dist/interface/math/vec4/f32/sinh.js.map +1 -0
  1427. package/dist/interface/math/vec4/f32/smoothstep.d.ts +2 -0
  1428. package/dist/interface/math/vec4/f32/smoothstep.js +14 -0
  1429. package/dist/interface/math/vec4/f32/smoothstep.js.map +1 -0
  1430. package/dist/interface/math/vec4/f32/sqrt.d.ts +2 -0
  1431. package/dist/interface/math/vec4/f32/sqrt.js +3 -0
  1432. package/dist/interface/math/vec4/f32/sqrt.js.map +1 -0
  1433. package/dist/interface/math/vec4/f32/step.d.ts +2 -0
  1434. package/dist/interface/math/vec4/f32/step.js +8 -0
  1435. package/dist/interface/math/vec4/f32/step.js.map +1 -0
  1436. package/dist/interface/math/vec4/f32/subtract.d.ts +2 -0
  1437. package/dist/interface/math/vec4/f32/subtract.js +8 -0
  1438. package/dist/interface/math/vec4/f32/subtract.js.map +1 -0
  1439. package/dist/interface/math/vec4/f32/tan.d.ts +2 -0
  1440. package/dist/interface/math/vec4/f32/tan.js +3 -0
  1441. package/dist/interface/math/vec4/f32/tan.js.map +1 -0
  1442. package/dist/interface/math/vec4/f32/tanh.d.ts +2 -0
  1443. package/dist/interface/math/vec4/f32/tanh.js +3 -0
  1444. package/dist/interface/math/vec4/f32/tanh.js.map +1 -0
  1445. package/dist/interface/math/vec4/f32/trunc.d.ts +2 -0
  1446. package/dist/interface/math/vec4/f32/trunc.js +3 -0
  1447. package/dist/interface/math/vec4/f32/trunc.js.map +1 -0
  1448. package/dist/interface/math/vec4/i32/abs.d.ts +2 -0
  1449. package/dist/interface/math/vec4/i32/abs.js +8 -0
  1450. package/dist/interface/math/vec4/i32/abs.js.map +1 -0
  1451. package/dist/interface/math/vec4/i32/add.d.ts +2 -0
  1452. package/dist/interface/math/vec4/i32/add.js +8 -0
  1453. package/dist/interface/math/vec4/i32/add.js.map +1 -0
  1454. package/dist/interface/math/vec4/i32/bitwise-and.d.ts +2 -0
  1455. package/dist/interface/math/vec4/i32/bitwise-and.js +8 -0
  1456. package/dist/interface/math/vec4/i32/bitwise-and.js.map +1 -0
  1457. package/dist/interface/math/vec4/i32/bitwise-not.d.ts +2 -0
  1458. package/dist/interface/math/vec4/i32/bitwise-not.js +3 -0
  1459. package/dist/interface/math/vec4/i32/bitwise-not.js.map +1 -0
  1460. package/dist/interface/math/vec4/i32/bitwise-or.d.ts +2 -0
  1461. package/dist/interface/math/vec4/i32/bitwise-or.js +8 -0
  1462. package/dist/interface/math/vec4/i32/bitwise-or.js.map +1 -0
  1463. package/dist/interface/math/vec4/i32/bitwise-xor.d.ts +2 -0
  1464. package/dist/interface/math/vec4/i32/bitwise-xor.js +8 -0
  1465. package/dist/interface/math/vec4/i32/bitwise-xor.js.map +1 -0
  1466. package/dist/interface/math/vec4/i32/clamp.d.ts +2 -0
  1467. package/dist/interface/math/vec4/i32/clamp.js +5 -0
  1468. package/dist/interface/math/vec4/i32/clamp.js.map +1 -0
  1469. package/dist/interface/math/vec4/i32/count-leading-zeros.d.ts +2 -0
  1470. package/dist/interface/math/vec4/i32/count-leading-zeros.js +9 -0
  1471. package/dist/interface/math/vec4/i32/count-leading-zeros.js.map +1 -0
  1472. package/dist/interface/math/vec4/i32/count-one-bits.d.ts +2 -0
  1473. package/dist/interface/math/vec4/i32/count-one-bits.js +9 -0
  1474. package/dist/interface/math/vec4/i32/count-one-bits.js.map +1 -0
  1475. package/dist/interface/math/vec4/i32/count-trailing-zeros.d.ts +2 -0
  1476. package/dist/interface/math/vec4/i32/count-trailing-zeros.js +9 -0
  1477. package/dist/interface/math/vec4/i32/count-trailing-zeros.js.map +1 -0
  1478. package/dist/interface/math/vec4/i32/equals.d.ts +2 -0
  1479. package/dist/interface/math/vec4/i32/equals.js +2 -0
  1480. package/dist/interface/math/vec4/i32/equals.js.map +1 -0
  1481. package/dist/interface/math/vec4/i32/i32.d.ts +3 -0
  1482. package/dist/interface/math/vec4/i32/i32.js +2 -0
  1483. package/dist/interface/math/vec4/i32/i32.js.map +1 -0
  1484. package/dist/interface/math/vec4/i32/max.d.ts +2 -0
  1485. package/dist/interface/math/vec4/i32/max.js +8 -0
  1486. package/dist/interface/math/vec4/i32/max.js.map +1 -0
  1487. package/dist/interface/math/vec4/i32/min.d.ts +2 -0
  1488. package/dist/interface/math/vec4/i32/min.js +8 -0
  1489. package/dist/interface/math/vec4/i32/min.js.map +1 -0
  1490. package/dist/interface/math/vec4/i32/multiply.d.ts +2 -0
  1491. package/dist/interface/math/vec4/i32/multiply.js +8 -0
  1492. package/dist/interface/math/vec4/i32/multiply.js.map +1 -0
  1493. package/dist/interface/math/vec4/i32/negate.d.ts +2 -0
  1494. package/dist/interface/math/vec4/i32/negate.js +8 -0
  1495. package/dist/interface/math/vec4/i32/negate.js.map +1 -0
  1496. package/dist/interface/math/vec4/i32/one.d.ts +2 -0
  1497. package/dist/interface/math/vec4/i32/one.js +2 -0
  1498. package/dist/interface/math/vec4/i32/one.js.map +1 -0
  1499. package/dist/interface/math/vec4/i32/public.d.ts +23 -0
  1500. package/dist/interface/math/vec4/i32/public.js +24 -0
  1501. package/dist/interface/math/vec4/i32/public.js.map +1 -0
  1502. package/dist/interface/math/vec4/i32/reverse-bits.d.ts +2 -0
  1503. package/dist/interface/math/vec4/i32/reverse-bits.js +9 -0
  1504. package/dist/interface/math/vec4/i32/reverse-bits.js.map +1 -0
  1505. package/dist/interface/math/vec4/i32/scale.d.ts +3 -0
  1506. package/dist/interface/math/vec4/i32/scale.js +8 -0
  1507. package/dist/interface/math/vec4/i32/scale.js.map +1 -0
  1508. package/dist/interface/math/vec4/i32/schema.d.ts +10 -0
  1509. package/dist/interface/math/vec4/i32/schema.js +3 -0
  1510. package/dist/interface/math/vec4/i32/schema.js.map +1 -0
  1511. package/dist/interface/math/vec4/i32/shift-left.d.ts +2 -0
  1512. package/dist/interface/math/vec4/i32/shift-left.js +2 -0
  1513. package/dist/interface/math/vec4/i32/shift-left.js.map +1 -0
  1514. package/dist/interface/math/vec4/i32/shift-right.d.ts +2 -0
  1515. package/dist/interface/math/vec4/i32/shift-right.js +8 -0
  1516. package/dist/interface/math/vec4/i32/shift-right.js.map +1 -0
  1517. package/dist/interface/math/vec4/i32/subtract.d.ts +2 -0
  1518. package/dist/interface/math/vec4/i32/subtract.js +8 -0
  1519. package/dist/interface/math/vec4/i32/subtract.js.map +1 -0
  1520. package/dist/interface/math/vec4/i32/zero.d.ts +2 -0
  1521. package/dist/interface/math/vec4/i32/zero.js +2 -0
  1522. package/dist/interface/math/vec4/i32/zero.js.map +1 -0
  1523. package/dist/interface/math/vec4/index.d.ts +4 -0
  1524. package/dist/interface/math/vec4/index.js +2 -0
  1525. package/dist/interface/math/vec4/index.js.map +1 -0
  1526. package/dist/interface/math/vec4/public.d.ts +4 -0
  1527. package/dist/interface/math/vec4/public.js +5 -0
  1528. package/dist/interface/math/vec4/public.js.map +1 -0
  1529. package/dist/interface/math/vec4/u32/add.d.ts +2 -0
  1530. package/dist/interface/math/vec4/u32/add.js +8 -0
  1531. package/dist/interface/math/vec4/u32/add.js.map +1 -0
  1532. package/dist/interface/math/vec4/u32/bitwise-and.d.ts +2 -0
  1533. package/dist/interface/math/vec4/u32/bitwise-and.js +8 -0
  1534. package/dist/interface/math/vec4/u32/bitwise-and.js.map +1 -0
  1535. package/dist/interface/math/vec4/u32/bitwise-not.d.ts +2 -0
  1536. package/dist/interface/math/vec4/u32/bitwise-not.js +3 -0
  1537. package/dist/interface/math/vec4/u32/bitwise-not.js.map +1 -0
  1538. package/dist/interface/math/vec4/u32/bitwise-or.d.ts +2 -0
  1539. package/dist/interface/math/vec4/u32/bitwise-or.js +8 -0
  1540. package/dist/interface/math/vec4/u32/bitwise-or.js.map +1 -0
  1541. package/dist/interface/math/vec4/u32/bitwise-xor.d.ts +2 -0
  1542. package/dist/interface/math/vec4/u32/bitwise-xor.js +8 -0
  1543. package/dist/interface/math/vec4/u32/bitwise-xor.js.map +1 -0
  1544. package/dist/interface/math/vec4/u32/clamp.d.ts +2 -0
  1545. package/dist/interface/math/vec4/u32/clamp.js +5 -0
  1546. package/dist/interface/math/vec4/u32/clamp.js.map +1 -0
  1547. package/dist/interface/math/vec4/u32/count-leading-zeros.d.ts +2 -0
  1548. package/dist/interface/math/vec4/u32/count-leading-zeros.js +9 -0
  1549. package/dist/interface/math/vec4/u32/count-leading-zeros.js.map +1 -0
  1550. package/dist/interface/math/vec4/u32/count-one-bits.d.ts +2 -0
  1551. package/dist/interface/math/vec4/u32/count-one-bits.js +9 -0
  1552. package/dist/interface/math/vec4/u32/count-one-bits.js.map +1 -0
  1553. package/dist/interface/math/vec4/u32/count-trailing-zeros.d.ts +2 -0
  1554. package/dist/interface/math/vec4/u32/count-trailing-zeros.js +9 -0
  1555. package/dist/interface/math/vec4/u32/count-trailing-zeros.js.map +1 -0
  1556. package/dist/interface/math/vec4/u32/equals.d.ts +2 -0
  1557. package/dist/interface/math/vec4/u32/equals.js +2 -0
  1558. package/dist/interface/math/vec4/u32/equals.js.map +1 -0
  1559. package/dist/interface/math/vec4/u32/max.d.ts +2 -0
  1560. package/dist/interface/math/vec4/u32/max.js +8 -0
  1561. package/dist/interface/math/vec4/u32/max.js.map +1 -0
  1562. package/dist/interface/math/vec4/u32/min.d.ts +2 -0
  1563. package/dist/interface/math/vec4/u32/min.js +8 -0
  1564. package/dist/interface/math/vec4/u32/min.js.map +1 -0
  1565. package/dist/interface/math/vec4/u32/multiply.d.ts +2 -0
  1566. package/dist/interface/math/vec4/u32/multiply.js +8 -0
  1567. package/dist/interface/math/vec4/u32/multiply.js.map +1 -0
  1568. package/dist/interface/math/vec4/u32/negate.d.ts +2 -0
  1569. package/dist/interface/math/vec4/u32/negate.js +2 -0
  1570. package/dist/interface/math/vec4/u32/negate.js.map +1 -0
  1571. package/dist/interface/math/vec4/u32/one.d.ts +2 -0
  1572. package/dist/interface/math/vec4/u32/one.js +2 -0
  1573. package/dist/interface/math/vec4/u32/one.js.map +1 -0
  1574. package/dist/interface/math/vec4/u32/public.d.ts +22 -0
  1575. package/dist/interface/math/vec4/u32/public.js +23 -0
  1576. package/dist/interface/math/vec4/u32/public.js.map +1 -0
  1577. package/dist/interface/math/vec4/u32/reverse-bits.d.ts +2 -0
  1578. package/dist/interface/math/vec4/u32/reverse-bits.js +9 -0
  1579. package/dist/interface/math/vec4/u32/reverse-bits.js.map +1 -0
  1580. package/dist/interface/math/vec4/u32/scale.d.ts +3 -0
  1581. package/dist/interface/math/vec4/u32/scale.js +8 -0
  1582. package/dist/interface/math/vec4/u32/scale.js.map +1 -0
  1583. package/dist/interface/math/vec4/u32/schema.d.ts +10 -0
  1584. package/dist/interface/math/vec4/u32/schema.js +3 -0
  1585. package/dist/interface/math/vec4/u32/schema.js.map +1 -0
  1586. package/dist/interface/math/vec4/u32/shift-left.d.ts +2 -0
  1587. package/dist/interface/math/vec4/u32/shift-left.js +7 -0
  1588. package/dist/interface/math/vec4/u32/shift-left.js.map +1 -0
  1589. package/dist/interface/math/vec4/u32/shift-right.d.ts +2 -0
  1590. package/dist/interface/math/vec4/u32/shift-right.js +8 -0
  1591. package/dist/interface/math/vec4/u32/shift-right.js.map +1 -0
  1592. package/dist/interface/math/vec4/u32/subtract.d.ts +2 -0
  1593. package/dist/interface/math/vec4/u32/subtract.js +8 -0
  1594. package/dist/interface/math/vec4/u32/subtract.js.map +1 -0
  1595. package/dist/interface/math/vec4/u32/u32.d.ts +3 -0
  1596. package/dist/interface/math/vec4/u32/u32.js +2 -0
  1597. package/dist/interface/math/vec4/u32/u32.js.map +1 -0
  1598. package/dist/interface/math/vec4/u32/zero.d.ts +2 -0
  1599. package/dist/interface/math/vec4/u32/zero.js +2 -0
  1600. package/dist/interface/math/vec4/u32/zero.js.map +1 -0
  1601. package/dist/interface/platform/platform.d.ts +28 -0
  1602. package/dist/interface/platform/platform.js +2 -0
  1603. package/dist/interface/platform/platform.js.map +1 -0
  1604. package/dist/interface/registry/archetypes.d.ts +7 -0
  1605. package/dist/interface/registry/archetypes.js +22 -0
  1606. package/dist/interface/registry/archetypes.js.map +1 -0
  1607. package/dist/interface/registry/declarations.d.ts +25 -0
  1608. package/dist/interface/registry/declarations.js +107 -0
  1609. package/dist/interface/registry/declarations.js.map +1 -0
  1610. package/dist/interface/registry/finalizer-order.d.ts +6 -0
  1611. package/dist/interface/registry/finalizer-order.js +66 -0
  1612. package/dist/interface/registry/finalizer-order.js.map +1 -0
  1613. package/dist/interface/registry/ids.d.ts +12 -0
  1614. package/dist/interface/registry/ids.js +28 -0
  1615. package/dist/interface/registry/ids.js.map +1 -0
  1616. package/dist/interface/registry/index.d.ts +29 -0
  1617. package/dist/interface/registry/index.js +16 -0
  1618. package/dist/interface/registry/index.js.map +1 -0
  1619. package/dist/interface/registry/indexes.d.ts +38 -0
  1620. package/dist/interface/registry/indexes.js +63 -0
  1621. package/dist/interface/registry/indexes.js.map +1 -0
  1622. package/dist/interface/registry/items.d.ts +43 -0
  1623. package/dist/interface/registry/items.js +108 -0
  1624. package/dist/interface/registry/items.js.map +1 -0
  1625. package/dist/interface/registry/layout.d.ts +59 -0
  1626. package/dist/interface/registry/layout.js +312 -0
  1627. package/dist/interface/registry/layout.js.map +1 -0
  1628. package/dist/interface/registry/names.d.ts +38 -0
  1629. package/dist/interface/registry/names.js +136 -0
  1630. package/dist/interface/registry/names.js.map +1 -0
  1631. package/dist/interface/registry/program.d.ts +36 -0
  1632. package/dist/interface/registry/program.js +96 -0
  1633. package/dist/interface/registry/program.js.map +1 -0
  1634. package/dist/interface/registry/reduction.d.ts +5 -0
  1635. package/dist/interface/registry/reduction.js +5 -0
  1636. package/dist/interface/registry/reduction.js.map +1 -0
  1637. package/dist/interface/registry/schedule.d.ts +32 -0
  1638. package/dist/interface/registry/schedule.js +207 -0
  1639. package/dist/interface/registry/schedule.js.map +1 -0
  1640. package/dist/interface/registry/schemas.d.ts +13 -0
  1641. package/dist/interface/registry/schemas.js +57 -0
  1642. package/dist/interface/registry/schemas.js.map +1 -0
  1643. package/dist/interface/registry/strata.d.ts +29 -0
  1644. package/dist/interface/registry/strata.js +94 -0
  1645. package/dist/interface/registry/strata.js.map +1 -0
  1646. package/dist/interface/registry/threads.d.ts +34 -0
  1647. package/dist/interface/registry/threads.js +52 -0
  1648. package/dist/interface/registry/threads.js.map +1 -0
  1649. package/dist/interface/registry/traits.d.ts +4 -0
  1650. package/dist/interface/registry/traits.js +10 -0
  1651. package/dist/interface/registry/traits.js.map +1 -0
  1652. package/dist/interface/registry/written.d.ts +4 -0
  1653. package/dist/interface/registry/written.js +13 -0
  1654. package/dist/interface/registry/written.js.map +1 -0
  1655. package/dist/interface/report/components.d.ts +38 -0
  1656. package/dist/interface/report/components.js +48 -0
  1657. package/dist/interface/report/components.js.map +1 -0
  1658. package/dist/interface/report/failure.d.ts +29 -0
  1659. package/dist/interface/report/failure.js +2 -0
  1660. package/dist/interface/report/failure.js.map +1 -0
  1661. package/dist/interface/report/index.d.ts +5 -0
  1662. package/dist/interface/report/index.js +6 -0
  1663. package/dist/interface/report/index.js.map +1 -0
  1664. package/dist/interface/report/report.d.ts +12 -0
  1665. package/dist/interface/report/report.js +2 -0
  1666. package/dist/interface/report/report.js.map +1 -0
  1667. package/dist/interface/resource/condition.d.ts +8 -0
  1668. package/dist/interface/resource/condition.js +2 -0
  1669. package/dist/interface/resource/condition.js.map +1 -0
  1670. package/dist/interface/resource/declaration.d.ts +31 -0
  1671. package/dist/interface/resource/declaration.js +2 -0
  1672. package/dist/interface/resource/declaration.js.map +1 -0
  1673. package/dist/interface/resource/index.d.ts +3 -0
  1674. package/dist/interface/resource/index.js +2 -0
  1675. package/dist/interface/resource/index.js.map +1 -0
  1676. package/dist/interface/resource/key.d.ts +2 -0
  1677. package/dist/interface/resource/key.js +2 -0
  1678. package/dist/interface/resource/key.js.map +1 -0
  1679. package/dist/interface/resource/reduction.d.ts +14 -0
  1680. package/dist/interface/resource/reduction.js +2 -0
  1681. package/dist/interface/resource/reduction.js.map +1 -0
  1682. package/dist/interface/resource/register.d.ts +13 -0
  1683. package/dist/interface/resource/register.js +6 -0
  1684. package/dist/interface/resource/register.js.map +1 -0
  1685. package/dist/interface/resource/resource.d.ts +2 -0
  1686. package/dist/interface/resource/resource.js +2 -0
  1687. package/dist/interface/resource/resource.js.map +1 -0
  1688. package/dist/interface/resource/types.d.ts +3 -0
  1689. package/dist/interface/resource/types.js +2 -0
  1690. package/dist/interface/resource/types.js.map +1 -0
  1691. package/dist/interface/resource/value.d.ts +21 -0
  1692. package/dist/interface/resource/value.js +2 -0
  1693. package/dist/interface/resource/value.js.map +1 -0
  1694. package/dist/interface/resource/written.d.ts +3 -0
  1695. package/dist/interface/resource/written.js +2 -0
  1696. package/dist/interface/resource/written.js.map +1 -0
  1697. package/dist/interface/resources/always.d.ts +9 -0
  1698. package/dist/interface/resources/always.js +5 -0
  1699. package/dist/interface/resources/always.js.map +1 -0
  1700. package/dist/interface/resources/cadence.d.ts +21 -0
  1701. package/dist/interface/resources/cadence.js +17 -0
  1702. package/dist/interface/resources/cadence.js.map +1 -0
  1703. package/dist/interface/resources/clock.d.ts +16 -0
  1704. package/dist/interface/resources/clock.js +10 -0
  1705. package/dist/interface/resources/clock.js.map +1 -0
  1706. package/dist/interface/resources/gpu-device.d.ts +13 -0
  1707. package/dist/interface/resources/gpu-device.js +9 -0
  1708. package/dist/interface/resources/gpu-device.js.map +1 -0
  1709. package/dist/interface/resources/index.d.ts +6 -0
  1710. package/dist/interface/resources/index.js +7 -0
  1711. package/dist/interface/resources/index.js.map +1 -0
  1712. package/dist/interface/resources/wake.d.ts +13 -0
  1713. package/dist/interface/resources/wake.js +8 -0
  1714. package/dist/interface/resources/wake.js.map +1 -0
  1715. package/dist/interface/resources/workers.d.ts +9 -0
  1716. package/dist/interface/resources/workers.js +5 -0
  1717. package/dist/interface/resources/workers.js.map +1 -0
  1718. package/dist/interface/rule/create.d.ts +9 -0
  1719. package/dist/interface/rule/create.js +25 -0
  1720. package/dist/interface/rule/create.js.map +1 -0
  1721. package/dist/interface/rule/created.d.ts +7 -0
  1722. package/dist/interface/rule/created.js +2 -0
  1723. package/dist/interface/rule/created.js.map +1 -0
  1724. package/dist/interface/rule/declaration.d.ts +13 -0
  1725. package/dist/interface/rule/declaration.js +2 -0
  1726. package/dist/interface/rule/declaration.js.map +1 -0
  1727. package/dist/interface/rule/index.d.ts +1 -0
  1728. package/dist/interface/rule/index.js +2 -0
  1729. package/dist/interface/rule/index.js.map +1 -0
  1730. package/dist/interface/rule/name.d.ts +6 -0
  1731. package/dist/interface/rule/name.js +2 -0
  1732. package/dist/interface/rule/name.js.map +1 -0
  1733. package/dist/interface/rule/rule.d.ts +2 -0
  1734. package/dist/interface/rule/rule.js +2 -0
  1735. package/dist/interface/rule/rule.js.map +1 -0
  1736. package/dist/interface/schema/is-data.d.ts +19 -0
  1737. package/dist/interface/schema/is-data.js +2 -0
  1738. package/dist/interface/schema/is-data.js.map +1 -0
  1739. package/dist/interface/schema/is-struct.d.ts +28 -0
  1740. package/dist/interface/schema/is-struct.js +2 -0
  1741. package/dist/interface/schema/is-struct.js.map +1 -0
  1742. package/dist/interface/schema/schema.d.ts +151 -0
  1743. package/dist/interface/schema/schema.js +2 -0
  1744. package/dist/interface/schema/schema.js.map +1 -0
  1745. package/dist/interface/system/access.d.ts +71 -0
  1746. package/dist/interface/system/access.js +2 -0
  1747. package/dist/interface/system/access.js.map +1 -0
  1748. package/dist/interface/system/body.d.ts +56 -0
  1749. package/dist/interface/system/body.js +2 -0
  1750. package/dist/interface/system/body.js.map +1 -0
  1751. package/dist/interface/system/check.d.ts +14 -0
  1752. package/dist/interface/system/check.js +256 -0
  1753. package/dist/interface/system/check.js.map +1 -0
  1754. package/dist/interface/system/commands.d.ts +25 -0
  1755. package/dist/interface/system/commands.js +2 -0
  1756. package/dist/interface/system/commands.js.map +1 -0
  1757. package/dist/interface/system/composite-declaration.d.ts +13 -0
  1758. package/dist/interface/system/composite-declaration.js +2 -0
  1759. package/dist/interface/system/composite-declaration.js.map +1 -0
  1760. package/dist/interface/system/composite.d.ts +8 -0
  1761. package/dist/interface/system/composite.js +2 -0
  1762. package/dist/interface/system/composite.js.map +1 -0
  1763. package/dist/interface/system/create.d.ts +212 -0
  1764. package/dist/interface/system/create.js +29 -0
  1765. package/dist/interface/system/create.js.map +1 -0
  1766. package/dist/interface/system/declaration.d.ts +71 -0
  1767. package/dist/interface/system/declaration.js +2 -0
  1768. package/dist/interface/system/declaration.js.map +1 -0
  1769. package/dist/interface/system/definition.d.ts +4 -0
  1770. package/dist/interface/system/definition.js +2 -0
  1771. package/dist/interface/system/definition.js.map +1 -0
  1772. package/dist/interface/system/index.d.ts +3 -0
  1773. package/dist/interface/system/index.js +3 -0
  1774. package/dist/interface/system/index.js.map +1 -0
  1775. package/dist/interface/system/input.d.ts +28 -0
  1776. package/dist/interface/system/input.js +2 -0
  1777. package/dist/interface/system/input.js.map +1 -0
  1778. package/dist/interface/system/leaf.d.ts +12 -0
  1779. package/dist/interface/system/leaf.js +2 -0
  1780. package/dist/interface/system/leaf.js.map +1 -0
  1781. package/dist/interface/system/name.d.ts +6 -0
  1782. package/dist/interface/system/name.js +2 -0
  1783. package/dist/interface/system/name.js.map +1 -0
  1784. package/dist/interface/system/property.d.ts +4 -0
  1785. package/dist/interface/system/property.js +2 -0
  1786. package/dist/interface/system/property.js.map +1 -0
  1787. package/dist/interface/system/render.d.ts +65 -0
  1788. package/dist/interface/system/render.js +32 -0
  1789. package/dist/interface/system/render.js.map +1 -0
  1790. package/dist/interface/system/struct.d.ts +11 -0
  1791. package/dist/interface/system/struct.js +2 -0
  1792. package/dist/interface/system/struct.js.map +1 -0
  1793. package/dist/interface/system/system.d.ts +10 -0
  1794. package/dist/interface/system/system.js +2 -0
  1795. package/dist/interface/system/system.js.map +1 -0
  1796. package/dist/interface/system/threads.d.ts +46 -0
  1797. package/dist/interface/system/threads.js +2 -0
  1798. package/dist/interface/system/threads.js.map +1 -0
  1799. package/dist/interface/system/values.d.ts +73 -0
  1800. package/dist/interface/system/values.js +2 -0
  1801. package/dist/interface/system/values.js.map +1 -0
  1802. package/dist/interface/thread/of.d.ts +9 -0
  1803. package/dist/interface/thread/of.js +2 -0
  1804. package/dist/interface/thread/of.js.map +1 -0
  1805. package/dist/interface/thread/thread.d.ts +12 -0
  1806. package/dist/interface/thread/thread.js +2 -0
  1807. package/dist/interface/thread/thread.js.map +1 -0
  1808. package/dist/interface/trait/index.d.ts +1 -0
  1809. package/dist/interface/trait/index.js +2 -0
  1810. package/dist/interface/trait/index.js.map +1 -0
  1811. package/dist/interface/trait/key.d.ts +4 -0
  1812. package/dist/interface/trait/key.js +2 -0
  1813. package/dist/interface/trait/key.js.map +1 -0
  1814. package/dist/interface/trait/register.d.ts +7 -0
  1815. package/dist/interface/trait/register.js +8 -0
  1816. package/dist/interface/trait/register.js.map +1 -0
  1817. package/dist/interface/trait/required.d.ts +10 -0
  1818. package/dist/interface/trait/required.js +2 -0
  1819. package/dist/interface/trait/required.js.map +1 -0
  1820. package/dist/interface/trait/symbol-keys.d.ts +16 -0
  1821. package/dist/interface/trait/symbol-keys.js +2 -0
  1822. package/dist/interface/trait/symbol-keys.js.map +1 -0
  1823. package/dist/interface/trait/trait.d.ts +2 -0
  1824. package/dist/interface/trait/trait.js +2 -0
  1825. package/dist/interface/trait/trait.js.map +1 -0
  1826. package/dist/interface/trait/types.d.ts +56 -0
  1827. package/dist/interface/trait/types.js +2 -0
  1828. package/dist/interface/trait/types.js.map +1 -0
  1829. package/dist/interface/world/create.d.ts +15 -0
  1830. package/dist/interface/world/create.js +2 -0
  1831. package/dist/interface/world/create.js.map +1 -0
  1832. package/dist/interface/world/filter.d.ts +8 -0
  1833. package/dist/interface/world/filter.js +2 -0
  1834. package/dist/interface/world/filter.js.map +1 -0
  1835. package/dist/interface/world/index.d.ts +1 -0
  1836. package/dist/interface/world/index.js +2 -0
  1837. package/dist/interface/world/index.js.map +1 -0
  1838. package/dist/interface/world/join.d.ts +11 -0
  1839. package/dist/interface/world/join.js +2 -0
  1840. package/dist/interface/world/join.js.map +1 -0
  1841. package/dist/interface/world/world.d.ts +59 -0
  1842. package/dist/interface/world/world.js +2 -0
  1843. package/dist/interface/world/world.js.map +1 -0
  1844. package/package.json +66 -3
  1845. package/src/exports.test.ts +171 -0
  1846. package/src/guide/01-resources.test.ts +44 -0
  1847. package/src/guide/02-entities.test.ts +57 -0
  1848. package/src/guide/03-systems.test.ts +87 -0
  1849. package/src/guide/04-ticks.test.ts +73 -0
  1850. package/src/guide/05-scheduling.test.ts +60 -0
  1851. package/src/guide/06-sync-points.test.ts +59 -0
  1852. package/src/guide/07-change-filters.test.ts +87 -0
  1853. package/src/guide/08-input.test.ts +47 -0
  1854. package/src/guide/09-rules.test.ts +57 -0
  1855. package/src/guide/10-finalizers.test.ts +64 -0
  1856. package/src/guide/11-traits.test.ts +58 -0
  1857. package/src/guide/11-traits.type-test.ts +27 -0
  1858. package/src/guide/13-indexes.test.ts +95 -0
  1859. package/src/guide/CLAUDE.md +34 -0
  1860. package/src/guide/guide.md +551 -0
  1861. package/src/implementation/compiler/access.ts +143 -0
  1862. package/src/implementation/compiler/assign.ts +167 -0
  1863. package/src/implementation/compiler/bind.ts +87 -0
  1864. package/src/implementation/compiler/body-access.ts +332 -0
  1865. package/src/implementation/compiler/booleans.ts +38 -0
  1866. package/src/implementation/compiler/branches.ts +45 -0
  1867. package/src/implementation/compiler/calls.ts +384 -0
  1868. package/src/implementation/compiler/columns.ts +46 -0
  1869. package/src/implementation/compiler/compile-kernel.ts +139 -0
  1870. package/src/implementation/compiler/data.ts +94 -0
  1871. package/src/implementation/compiler/estree.ts +63 -0
  1872. package/src/implementation/compiler/exact.ts +77 -0
  1873. package/src/implementation/compiler/expression.ts +124 -0
  1874. package/src/implementation/compiler/failure.ts +37 -0
  1875. package/src/implementation/compiler/hygiene.test.ts +73 -0
  1876. package/src/implementation/compiler/identify.test.ts +155 -0
  1877. package/src/implementation/compiler/identify.ts +155 -0
  1878. package/src/implementation/compiler/index.ts +1 -0
  1879. package/src/implementation/compiler/ir.ts +101 -0
  1880. package/src/implementation/compiler/kernel-id.ts +33 -0
  1881. package/src/implementation/compiler/key.ts +32 -0
  1882. package/src/implementation/compiler/link.test.ts +70 -0
  1883. package/src/implementation/compiler/link.ts +202 -0
  1884. package/src/implementation/compiler/lists.ts +202 -0
  1885. package/src/implementation/compiler/lookups.ts +120 -0
  1886. package/src/implementation/compiler/math.ts +9 -0
  1887. package/src/implementation/compiler/module-scope.ts +140 -0
  1888. package/src/implementation/compiler/module-value.ts +121 -0
  1889. package/src/implementation/compiler/out.ts +6 -0
  1890. package/src/implementation/compiler/paths.ts +43 -0
  1891. package/src/implementation/compiler/plugin.test.ts +375 -0
  1892. package/src/implementation/compiler/plugin.ts +223 -0
  1893. package/src/implementation/compiler/print.ts +104 -0
  1894. package/src/implementation/compiler/program.ts +232 -0
  1895. package/src/implementation/compiler/scalar.ts +46 -0
  1896. package/src/implementation/compiler/scope.ts +27 -0
  1897. package/src/implementation/compiler/serialize.ts +10 -0
  1898. package/src/implementation/compiler/signature.ts +170 -0
  1899. package/src/implementation/compiler/snapshot.ts +34 -0
  1900. package/src/implementation/compiler/source-map.test.ts +40 -0
  1901. package/src/implementation/compiler/source-map.ts +134 -0
  1902. package/src/implementation/compiler/spawns.ts +114 -0
  1903. package/src/implementation/compiler/stamps.ts +24 -0
  1904. package/src/implementation/compiler/statement.ts +102 -0
  1905. package/src/implementation/compiler/subset.md +82 -0
  1906. package/src/implementation/compiler/terminal.ts +49 -0
  1907. package/src/implementation/compiler/transform.test.ts +1421 -0
  1908. package/src/implementation/compiler/transform.ts +239 -0
  1909. package/src/implementation/compiler/unit.ts +114 -0
  1910. package/src/implementation/compiler/value.ts +60 -0
  1911. package/src/implementation/index.ts +2 -0
  1912. package/src/implementation/world/activate.ts +127 -0
  1913. package/src/implementation/world/archetype.ts +387 -0
  1914. package/src/implementation/world/arrays.test.ts +24 -0
  1915. package/src/implementation/world/arrays.ts +43 -0
  1916. package/src/implementation/world/async-loading.test.ts +101 -0
  1917. package/src/implementation/world/attach-kernel.test.ts +9 -0
  1918. package/src/implementation/world/attach-kernel.ts +24 -0
  1919. package/src/implementation/world/batches.test.ts +129 -0
  1920. package/src/implementation/world/batches.ts +126 -0
  1921. package/src/implementation/world/buffer.ts +145 -0
  1922. package/src/implementation/world/builtins.test.ts +92 -0
  1923. package/src/implementation/world/cascade.ts +144 -0
  1924. package/src/implementation/world/cells.ts +24 -0
  1925. package/src/implementation/world/changes-finalizers.test.ts +40 -0
  1926. package/src/implementation/world/check-kernel.ts +86 -0
  1927. package/src/implementation/world/claims.test.ts +41 -0
  1928. package/src/implementation/world/claims.ts +50 -0
  1929. package/src/implementation/world/closure.test.ts +39 -0
  1930. package/src/implementation/world/closure.ts +40 -0
  1931. package/src/implementation/world/command-ring.ts +474 -0
  1932. package/src/implementation/world/command-rings.cases.ts +45 -0
  1933. package/src/implementation/world/command-rings.fixture.ts +189 -0
  1934. package/src/implementation/world/commands.test.ts +344 -0
  1935. package/src/implementation/world/commands.ts +78 -0
  1936. package/src/implementation/world/composite-input.test.ts +37 -0
  1937. package/src/implementation/world/conditions.test.ts +124 -0
  1938. package/src/implementation/world/create.test.ts +383 -0
  1939. package/src/implementation/world/create.ts +825 -0
  1940. package/src/implementation/world/directories.ts +86 -0
  1941. package/src/implementation/world/directory.test.ts +54 -0
  1942. package/src/implementation/world/dispatch.cases.ts +32 -0
  1943. package/src/implementation/world/dispatch.fixture.ts +172 -0
  1944. package/src/implementation/world/entities.ts +189 -0
  1945. package/src/implementation/world/entity-lookup-workers.cases.ts +18 -0
  1946. package/src/implementation/world/entity-lookup-workers.fixture.ts +109 -0
  1947. package/src/implementation/world/entity-lookups.browser.test.ts +57 -0
  1948. package/src/implementation/world/entity-lookups.test-helper.ts +201 -0
  1949. package/src/implementation/world/entity-lookups.test.ts +112 -0
  1950. package/src/implementation/world/execute.ts +609 -0
  1951. package/src/implementation/world/failures.ts +14 -0
  1952. package/src/implementation/world/finalizers.test.ts +318 -0
  1953. package/src/implementation/world/finalizers.ts +419 -0
  1954. package/src/implementation/world/fixtures.test-helper.ts +19 -0
  1955. package/src/implementation/world/generated-code.md +140 -0
  1956. package/src/implementation/world/gpu.browser.test.ts +693 -0
  1957. package/src/implementation/world/gpu.ts +393 -0
  1958. package/src/implementation/world/holders.ts +68 -0
  1959. package/src/implementation/world/ids.test.ts +68 -0
  1960. package/src/implementation/world/imported-lists.test-helper.ts +22 -0
  1961. package/src/implementation/world/imported-lists.test.ts +45 -0
  1962. package/src/implementation/world/index-build-csp.test.ts +59 -0
  1963. package/src/implementation/world/index-build.cases.ts +20 -0
  1964. package/src/implementation/world/index-build.fixture.ts +125 -0
  1965. package/src/implementation/world/index-build.ts +458 -0
  1966. package/src/implementation/world/index-changed.test.ts +242 -0
  1967. package/src/implementation/world/index-hash.ts +478 -0
  1968. package/src/implementation/world/index-joined.test.ts +293 -0
  1969. package/src/implementation/world/index-kernels.test.ts +204 -0
  1970. package/src/implementation/world/index-keyless.test.ts +278 -0
  1971. package/src/implementation/world/index-keys.ts +271 -0
  1972. package/src/implementation/world/index-lookups-csp.test.ts +44 -0
  1973. package/src/implementation/world/index-lookups.ts +623 -0
  1974. package/src/implementation/world/index-order.test.ts +154 -0
  1975. package/src/implementation/world/index-order.ts +182 -0
  1976. package/src/implementation/world/index-readers.ts +324 -0
  1977. package/src/implementation/world/index-sorted.test.ts +75 -0
  1978. package/src/implementation/world/index-sorted.ts +651 -0
  1979. package/src/implementation/world/index-workers.cases.ts +17 -0
  1980. package/src/implementation/world/index-workers.fixture.ts +191 -0
  1981. package/src/implementation/world/indexes.test.ts +731 -0
  1982. package/src/implementation/world/indexes.ts +1209 -0
  1983. package/src/implementation/world/input.ts +14 -0
  1984. package/src/implementation/world/intrinsics-coverage.test.ts +25 -0
  1985. package/src/implementation/world/intrinsics.browser.test.ts +584 -0
  1986. package/src/implementation/world/intrinsics.ts +40 -0
  1987. package/src/implementation/world/join.test.ts +170 -0
  1988. package/src/implementation/world/join.ts +676 -0
  1989. package/src/implementation/world/join.type-test.ts +27 -0
  1990. package/src/implementation/world/joined-observer.ts +809 -0
  1991. package/src/implementation/world/joining-worker.fixture.ts +69 -0
  1992. package/src/implementation/world/joining.cases.ts +52 -0
  1993. package/src/implementation/world/joining.fixture.ts +138 -0
  1994. package/src/implementation/world/joining.test-helper.ts +92 -0
  1995. package/src/implementation/world/joining.ts +309 -0
  1996. package/src/implementation/world/journal.ts +36 -0
  1997. package/src/implementation/world/kernel-imports-sparks.test-helper.ts +17 -0
  1998. package/src/implementation/world/kernel-imports-steer.test-helper.ts +9 -0
  1999. package/src/implementation/world/kernel-imports.test.ts +73 -0
  2000. package/src/implementation/world/kernel-indexes.ts +165 -0
  2001. package/src/implementation/world/kernel-lookup.test-helper.ts +30 -0
  2002. package/src/implementation/world/kernel-path.test-helper.ts +20 -0
  2003. package/src/implementation/world/kernel-spawns.test.ts +159 -0
  2004. package/src/implementation/world/kernel.ts +244 -0
  2005. package/src/implementation/world/kernels-csp.test.ts +42 -0
  2006. package/src/implementation/world/kernels.test.ts +78 -0
  2007. package/src/implementation/world/kernels.ts +329 -0
  2008. package/src/implementation/world/layout-directory.browser.test.ts +205 -0
  2009. package/src/implementation/world/layout-directory.cases.ts +37 -0
  2010. package/src/implementation/world/layout-directory.fixture.ts +186 -0
  2011. package/src/implementation/world/layout-directory.ts +230 -0
  2012. package/src/implementation/world/lifetime.cases.ts +18 -0
  2013. package/src/implementation/world/lifetime.fixture.ts +77 -0
  2014. package/src/implementation/world/lifetime.test-helper.ts +78 -0
  2015. package/src/implementation/world/lifetime.test.ts +87 -0
  2016. package/src/implementation/world/lists.ts +152 -0
  2017. package/src/implementation/world/lookup-keys.ts +48 -0
  2018. package/src/implementation/world/loop.test.ts +182 -0
  2019. package/src/implementation/world/loop.ts +295 -0
  2020. package/src/implementation/world/memory.test.ts +41 -0
  2021. package/src/implementation/world/memory.ts +89 -0
  2022. package/src/implementation/world/mirror.ts +603 -0
  2023. package/src/implementation/world/move-log.test.ts +326 -0
  2024. package/src/implementation/world/move-log.ts +215 -0
  2025. package/src/implementation/world/names.test.ts +80 -0
  2026. package/src/implementation/world/observe-cases.browser.test.ts +97 -0
  2027. package/src/implementation/world/observe-cases.test.ts +798 -0
  2028. package/src/implementation/world/observe-factories.test.ts +303 -0
  2029. package/src/implementation/world/observe-joined-cases.test.ts +232 -0
  2030. package/src/implementation/world/observe-ticks-cases.test.ts +213 -0
  2031. package/src/implementation/world/observe.test-helper.ts +13 -0
  2032. package/src/implementation/world/observed-workers.cases.ts +12 -0
  2033. package/src/implementation/world/observed-workers.fixture.ts +55 -0
  2034. package/src/implementation/world/observer-contained-worker.fixture.ts +40 -0
  2035. package/src/implementation/world/observer-contained.browser.test.ts +4 -0
  2036. package/src/implementation/world/observer-contained.cases.ts +16 -0
  2037. package/src/implementation/world/observer-contained.fixture.ts +125 -0
  2038. package/src/implementation/world/observer-contained.test-helper.ts +43 -0
  2039. package/src/implementation/world/observer-contained.test.ts +96 -0
  2040. package/src/implementation/world/observer-joined-worker.fixture.ts +80 -0
  2041. package/src/implementation/world/observer-joined.cases.ts +28 -0
  2042. package/src/implementation/world/observer-joined.fixture.ts +286 -0
  2043. package/src/implementation/world/observer-joined.test-helper.ts +180 -0
  2044. package/src/implementation/world/observer-joined.test.ts +350 -0
  2045. package/src/implementation/world/observer.browser.test.ts +73 -0
  2046. package/src/implementation/world/observer.test.ts +301 -0
  2047. package/src/implementation/world/observer.ts +139 -0
  2048. package/src/implementation/world/order.ts +351 -0
  2049. package/src/implementation/world/perf.md +356 -0
  2050. package/src/implementation/world/plan.md +81 -0
  2051. package/src/implementation/world/plan.ts +71 -0
  2052. package/src/implementation/world/platforms.test-helper.ts +67 -0
  2053. package/src/implementation/world/pool-size.cases.ts +23 -0
  2054. package/src/implementation/world/pool-size.fixture.ts +66 -0
  2055. package/src/implementation/world/pool.cases.ts +30 -0
  2056. package/src/implementation/world/pool.fixture.ts +54 -0
  2057. package/src/implementation/world/pool.ts +323 -0
  2058. package/src/implementation/world/port.ts +141 -0
  2059. package/src/implementation/world/ports.cases.ts +37 -0
  2060. package/src/implementation/world/ports.fixture.ts +107 -0
  2061. package/src/implementation/world/ports.type-test.ts +14 -0
  2062. package/src/implementation/world/prepared-lookup.ts +95 -0
  2063. package/src/implementation/world/prepared-spawn.ts +161 -0
  2064. package/src/implementation/world/program.ts +13 -0
  2065. package/src/implementation/world/protocol.ts +127 -0
  2066. package/src/implementation/world/publish.ts +28 -0
  2067. package/src/implementation/world/ranges.ts +44 -0
  2068. package/src/implementation/world/reads.test-helper.ts +29 -0
  2069. package/src/implementation/world/reductions.cases.ts +22 -0
  2070. package/src/implementation/world/reductions.fixture.ts +65 -0
  2071. package/src/implementation/world/reductions.test.ts +279 -0
  2072. package/src/implementation/world/reductions.ts +105 -0
  2073. package/src/implementation/world/reevaluation.test-helper.ts +16 -0
  2074. package/src/implementation/world/reevaluation.test.ts +32 -0
  2075. package/src/implementation/world/register.ts +412 -0
  2076. package/src/implementation/world/remote-finalizers-worker.fixture.ts +44 -0
  2077. package/src/implementation/world/remote-finalizers.cases.ts +24 -0
  2078. package/src/implementation/world/remote-finalizers.fixture.ts +140 -0
  2079. package/src/implementation/world/remote-finalizers.test-helper.ts +160 -0
  2080. package/src/implementation/world/remote-finalizers.test.ts +188 -0
  2081. package/src/implementation/world/remote-objects-worker.fixture.ts +20 -0
  2082. package/src/implementation/world/remote-objects.cases.ts +16 -0
  2083. package/src/implementation/world/remote-objects.fixture.ts +59 -0
  2084. package/src/implementation/world/remote-objects.test-helper.ts +107 -0
  2085. package/src/implementation/world/remote-systems.ts +627 -0
  2086. package/src/implementation/world/remote.test.ts +186 -0
  2087. package/src/implementation/world/remote.ts +125 -0
  2088. package/src/implementation/world/removal-worker.fixture.ts +20 -0
  2089. package/src/implementation/world/removal.cases.ts +16 -0
  2090. package/src/implementation/world/removal.fixture.ts +95 -0
  2091. package/src/implementation/world/remove-joined.test.ts +181 -0
  2092. package/src/implementation/world/remove.test-helper.ts +84 -0
  2093. package/src/implementation/world/remove.test.ts +194 -0
  2094. package/src/implementation/world/reports.test-helper.ts +117 -0
  2095. package/src/implementation/world/reports.test.ts +167 -0
  2096. package/src/implementation/world/reports.ts +203 -0
  2097. package/src/implementation/world/resources.ts +67 -0
  2098. package/src/implementation/world/rows.test.ts +78 -0
  2099. package/src/implementation/world/rows.ts +515 -0
  2100. package/src/implementation/world/rules.test.ts +243 -0
  2101. package/src/implementation/world/runner.ts +1073 -0
  2102. package/src/implementation/world/schedule.test.ts +124 -0
  2103. package/src/implementation/world/semantics.test.ts +100 -0
  2104. package/src/implementation/world/share.test.ts +17 -0
  2105. package/src/implementation/world/sharing.ts +588 -0
  2106. package/src/implementation/world/staging.ts +196 -0
  2107. package/src/implementation/world/state.ts +521 -0
  2108. package/src/implementation/world/stop-lists.ts +308 -0
  2109. package/src/implementation/world/strings.test.ts +200 -0
  2110. package/src/implementation/world/strings.ts +246 -0
  2111. package/src/implementation/world/structure.ts +70 -0
  2112. package/src/implementation/world/synchronize.test.ts +54 -0
  2113. package/src/implementation/world/synchronize.ts +762 -0
  2114. package/src/implementation/world/tail-blocks.ts +74 -0
  2115. package/src/implementation/world/tails-worker.fixture.ts +66 -0
  2116. package/src/implementation/world/tails.cases.ts +44 -0
  2117. package/src/implementation/world/tails.fixture.ts +254 -0
  2118. package/src/implementation/world/tails.test-helper.ts +166 -0
  2119. package/src/implementation/world/tails.test.ts +114 -0
  2120. package/src/implementation/world/tails.ts +477 -0
  2121. package/src/implementation/world/target.test.ts +73 -0
  2122. package/src/implementation/world/terminal.ts +13 -0
  2123. package/src/implementation/world/thread-directory.ts +210 -0
  2124. package/src/implementation/world/thread-finalizers.ts +318 -0
  2125. package/src/implementation/world/thread-indexes.ts +90 -0
  2126. package/src/implementation/world/thread-observer.ts +234 -0
  2127. package/src/implementation/world/thread-systems-worker.fixture.ts +70 -0
  2128. package/src/implementation/world/thread-systems.cases.ts +41 -0
  2129. package/src/implementation/world/thread-systems.fixture.ts +205 -0
  2130. package/src/implementation/world/thread-systems.test-helper.ts +325 -0
  2131. package/src/implementation/world/thread-systems.test.ts +120 -0
  2132. package/src/implementation/world/thread-systems.ts +1200 -0
  2133. package/src/implementation/world/thread-tasks.ts +75 -0
  2134. package/src/implementation/world/threads.browser.test.ts +46 -0
  2135. package/src/implementation/world/threads.test.ts +73 -0
  2136. package/src/implementation/world/ticks.browser.test.ts +44 -0
  2137. package/src/implementation/world/ticks.test.ts +34 -0
  2138. package/src/implementation/world/traits.test.ts +66 -0
  2139. package/src/implementation/world/transfers-worker.fixture.ts +114 -0
  2140. package/src/implementation/world/transfers.cases.ts +30 -0
  2141. package/src/implementation/world/transfers.fixture.ts +147 -0
  2142. package/src/implementation/world/transfers.test-helper.ts +111 -0
  2143. package/src/implementation/world/transfers.test.ts +157 -0
  2144. package/src/implementation/world/transfers.ts +104 -0
  2145. package/src/implementation/world/up-tree.test.ts +152 -0
  2146. package/src/implementation/world/up-workers.cases.ts +13 -0
  2147. package/src/implementation/world/up-workers.fixture.ts +67 -0
  2148. package/src/implementation/world/up.browser.test.ts +78 -0
  2149. package/src/implementation/world/up.test.ts +284 -0
  2150. package/src/implementation/world/up.ts +684 -0
  2151. package/src/implementation/world/wasm-kernels.test.ts +269 -0
  2152. package/src/implementation/world/wasm.test.ts +381 -0
  2153. package/src/implementation/world/wasm.ts +2093 -0
  2154. package/src/implementation/world/wgsl.test.ts +41 -0
  2155. package/src/implementation/world/wgsl.ts +464 -0
  2156. package/src/implementation/world/worker-platform.ts +105 -0
  2157. package/src/implementation/world/worker.ts +560 -0
  2158. package/src/implementation/world/workers.cases.ts +59 -0
  2159. package/src/implementation/world/workers.fixture.ts +261 -0
  2160. package/src/implementation/world/world-host.fixture.ts +10 -0
  2161. package/src/index.ts +16 -0
  2162. package/src/interface/CLAUDE.md +33 -0
  2163. package/src/interface/archetype/archetype.ts +3 -0
  2164. package/src/interface/archetype/archetype.type-test.ts +37 -0
  2165. package/src/interface/archetype/create.test.ts +40 -0
  2166. package/src/interface/archetype/create.ts +12 -0
  2167. package/src/interface/archetype/index.ts +1 -0
  2168. package/src/interface/archetype/values-of.ts +16 -0
  2169. package/src/interface/component/component.ts +4 -0
  2170. package/src/interface/component/declaration.ts +67 -0
  2171. package/src/interface/component/declaration.type-test.ts +87 -0
  2172. package/src/interface/component/index.ts +3 -0
  2173. package/src/interface/component/key.ts +3 -0
  2174. package/src/interface/component/key.type-test.ts +31 -0
  2175. package/src/interface/component/register.test.ts +124 -0
  2176. package/src/interface/component/register.ts +28 -0
  2177. package/src/interface/component/types.ts +6 -0
  2178. package/src/interface/component/value.ts +34 -0
  2179. package/src/interface/component/values.ts +5 -0
  2180. package/src/interface/entity/entity.ts +9 -0
  2181. package/src/interface/entity/index.ts +8 -0
  2182. package/src/interface/finalizer/body.ts +51 -0
  2183. package/src/interface/finalizer/create.test.ts +148 -0
  2184. package/src/interface/finalizer/create.ts +128 -0
  2185. package/src/interface/finalizer/created.ts +21 -0
  2186. package/src/interface/finalizer/declaration.ts +29 -0
  2187. package/src/interface/finalizer/finalizer.ts +7 -0
  2188. package/src/interface/finalizer/index.ts +1 -0
  2189. package/src/interface/finalizer/name.ts +6 -0
  2190. package/src/interface/gpu/accessors.ts +72 -0
  2191. package/src/interface/gpu/gpu.ts +4 -0
  2192. package/src/interface/gpu/gpu.type-test.ts +27 -0
  2193. package/src/interface/gpu/index.ts +2 -0
  2194. package/src/interface/gpu/layout.ts +22 -0
  2195. package/src/interface/gpu/record.ts +5 -0
  2196. package/src/interface/gpu/wgsl.ts +20 -0
  2197. package/src/interface/index.ts +19 -0
  2198. package/src/interface/index.type-test.ts +55 -0
  2199. package/src/interface/indexes/create.test.ts +145 -0
  2200. package/src/interface/indexes/create.ts +80 -0
  2201. package/src/interface/indexes/created.ts +4 -0
  2202. package/src/interface/indexes/declaration.ts +11 -0
  2203. package/src/interface/indexes/index-type.ts +12 -0
  2204. package/src/interface/indexes/index.ts +1 -0
  2205. package/src/interface/indexes/index.type-test.ts +293 -0
  2206. package/src/interface/indexes/name.ts +5 -0
  2207. package/src/interface/math/f32/index.ts +3 -0
  2208. package/src/interface/math/f32/public.ts +1 -0
  2209. package/src/interface/math/f32/round-half-even.ts +5 -0
  2210. package/src/interface/math/f32/schema.ts +3 -0
  2211. package/src/interface/math/i32/index.ts +4 -0
  2212. package/src/interface/math/i32/public.ts +2 -0
  2213. package/src/interface/math/i32/schema.ts +3 -0
  2214. package/src/interface/math/i32/shift-right.ts +3 -0
  2215. package/src/interface/math/index.ts +8 -0
  2216. package/src/interface/math/intrinsic.ts +18 -0
  2217. package/src/interface/math/mat4x4/add.ts +9 -0
  2218. package/src/interface/math/mat4x4/determinant.ts +26 -0
  2219. package/src/interface/math/mat4x4/identity.ts +8 -0
  2220. package/src/interface/math/mat4x4/index.ts +26 -0
  2221. package/src/interface/math/mat4x4/inverse.ts +49 -0
  2222. package/src/interface/math/mat4x4/look-at.test.ts +13 -0
  2223. package/src/interface/math/mat4x4/look-at.ts +26 -0
  2224. package/src/interface/math/mat4x4/multiply-vec3.ts +8 -0
  2225. package/src/interface/math/mat4x4/multiply-vec4.ts +10 -0
  2226. package/src/interface/math/mat4x4/multiply.ts +22 -0
  2227. package/src/interface/math/mat4x4/orthographic.ts +20 -0
  2228. package/src/interface/math/mat4x4/perspective.ts +20 -0
  2229. package/src/interface/math/mat4x4/public.ts +20 -0
  2230. package/src/interface/math/mat4x4/rotation-x.ts +12 -0
  2231. package/src/interface/math/mat4x4/rotation-y.ts +12 -0
  2232. package/src/interface/math/mat4x4/rotation-z.ts +12 -0
  2233. package/src/interface/math/mat4x4/rotation.test.ts +16 -0
  2234. package/src/interface/math/mat4x4/scale.ts +9 -0
  2235. package/src/interface/math/mat4x4/scaling.ts +8 -0
  2236. package/src/interface/math/mat4x4/schema.ts +4 -0
  2237. package/src/interface/math/mat4x4/subtract.ts +9 -0
  2238. package/src/interface/math/mat4x4/translation.ts +8 -0
  2239. package/src/interface/math/mat4x4/transpose.ts +9 -0
  2240. package/src/interface/math/mat4x4/zero.ts +8 -0
  2241. package/src/interface/math/math.type-test.ts +20 -0
  2242. package/src/interface/math/quat/add.ts +9 -0
  2243. package/src/interface/math/quat/align-to.ts +44 -0
  2244. package/src/interface/math/quat/conjugate.ts +3 -0
  2245. package/src/interface/math/quat/distance.ts +5 -0
  2246. package/src/interface/math/quat/dot.ts +5 -0
  2247. package/src/interface/math/quat/from-axis-angle.ts +14 -0
  2248. package/src/interface/math/quat/from-euler.ts +17 -0
  2249. package/src/interface/math/quat/identity.ts +3 -0
  2250. package/src/interface/math/quat/index.ts +3 -0
  2251. package/src/interface/math/quat/inverse.ts +10 -0
  2252. package/src/interface/math/quat/length-squared.ts +3 -0
  2253. package/src/interface/math/quat/length.ts +4 -0
  2254. package/src/interface/math/quat/lerp.ts +8 -0
  2255. package/src/interface/math/quat/look-at.ts +52 -0
  2256. package/src/interface/math/quat/multiply.ts +8 -0
  2257. package/src/interface/math/quat/negate.ts +4 -0
  2258. package/src/interface/math/quat/normalize.ts +8 -0
  2259. package/src/interface/math/quat/public.ts +24 -0
  2260. package/src/interface/math/quat/rotate-vec3.ts +16 -0
  2261. package/src/interface/math/quat/scale.ts +4 -0
  2262. package/src/interface/math/quat/schema.ts +4 -0
  2263. package/src/interface/math/quat/slerp.ts +26 -0
  2264. package/src/interface/math/quat/subtract.ts +9 -0
  2265. package/src/interface/math/quat/to-axis-angle.ts +14 -0
  2266. package/src/interface/math/quat/to-euler.ts +25 -0
  2267. package/src/interface/math/quat/to-mat4.ts +27 -0
  2268. package/src/interface/math/semantics.test.ts +50 -0
  2269. package/src/interface/math/u32/count-leading-zeros.ts +4 -0
  2270. package/src/interface/math/u32/count-one-bits.ts +10 -0
  2271. package/src/interface/math/u32/count-trailing-zeros.ts +7 -0
  2272. package/src/interface/math/u32/index.ts +4 -0
  2273. package/src/interface/math/u32/public.ts +6 -0
  2274. package/src/interface/math/u32/reverse-bits.ts +11 -0
  2275. package/src/interface/math/u32/schema.ts +3 -0
  2276. package/src/interface/math/u32/shift-right.ts +3 -0
  2277. package/src/interface/math/vec2/f32/abs.ts +4 -0
  2278. package/src/interface/math/vec2/f32/acos.ts +4 -0
  2279. package/src/interface/math/vec2/f32/acosh.ts +4 -0
  2280. package/src/interface/math/vec2/f32/add.ts +4 -0
  2281. package/src/interface/math/vec2/f32/asin.ts +4 -0
  2282. package/src/interface/math/vec2/f32/asinh.ts +4 -0
  2283. package/src/interface/math/vec2/f32/atan.ts +4 -0
  2284. package/src/interface/math/vec2/f32/atanh.ts +4 -0
  2285. package/src/interface/math/vec2/f32/ceil.ts +4 -0
  2286. package/src/interface/math/vec2/f32/clamp.ts +6 -0
  2287. package/src/interface/math/vec2/f32/cos.ts +4 -0
  2288. package/src/interface/math/vec2/f32/cosh.ts +4 -0
  2289. package/src/interface/math/vec2/f32/distance.ts +6 -0
  2290. package/src/interface/math/vec2/f32/dot.ts +4 -0
  2291. package/src/interface/math/vec2/f32/equals.ts +3 -0
  2292. package/src/interface/math/vec2/f32/exp.ts +4 -0
  2293. package/src/interface/math/vec2/f32/exp2.ts +4 -0
  2294. package/src/interface/math/vec2/f32/f32.ts +3 -0
  2295. package/src/interface/math/vec2/f32/faceforward.ts +7 -0
  2296. package/src/interface/math/vec2/f32/floor.ts +4 -0
  2297. package/src/interface/math/vec2/f32/fract.ts +4 -0
  2298. package/src/interface/math/vec2/f32/length.ts +4 -0
  2299. package/src/interface/math/vec2/f32/log.ts +4 -0
  2300. package/src/interface/math/vec2/f32/log2.ts +4 -0
  2301. package/src/interface/math/vec2/f32/max.ts +4 -0
  2302. package/src/interface/math/vec2/f32/min.ts +4 -0
  2303. package/src/interface/math/vec2/f32/mix.ts +7 -0
  2304. package/src/interface/math/vec2/f32/mod.ts +3 -0
  2305. package/src/interface/math/vec2/f32/modf.ts +7 -0
  2306. package/src/interface/math/vec2/f32/negate.ts +4 -0
  2307. package/src/interface/math/vec2/f32/normalize.ts +6 -0
  2308. package/src/interface/math/vec2/f32/pow.ts +8 -0
  2309. package/src/interface/math/vec2/f32/public.ts +47 -0
  2310. package/src/interface/math/vec2/f32/reflect.ts +10 -0
  2311. package/src/interface/math/vec2/f32/refract.ts +15 -0
  2312. package/src/interface/math/vec2/f32/round.ts +5 -0
  2313. package/src/interface/math/vec2/f32/scale.ts +4 -0
  2314. package/src/interface/math/vec2/f32/schema.ts +4 -0
  2315. package/src/interface/math/vec2/f32/sign.ts +4 -0
  2316. package/src/interface/math/vec2/f32/sin.ts +4 -0
  2317. package/src/interface/math/vec2/f32/sinh.ts +4 -0
  2318. package/src/interface/math/vec2/f32/smoothstep.ts +8 -0
  2319. package/src/interface/math/vec2/f32/sqrt.ts +4 -0
  2320. package/src/interface/math/vec2/f32/step.ts +7 -0
  2321. package/src/interface/math/vec2/f32/subtract.ts +4 -0
  2322. package/src/interface/math/vec2/f32/tan.ts +4 -0
  2323. package/src/interface/math/vec2/f32/tanh.ts +4 -0
  2324. package/src/interface/math/vec2/f32/trunc.ts +4 -0
  2325. package/src/interface/math/vec2/f32/zero.ts +3 -0
  2326. package/src/interface/math/vec2/i32/abs.ts +4 -0
  2327. package/src/interface/math/vec2/i32/add.ts +4 -0
  2328. package/src/interface/math/vec2/i32/bitwise-and.ts +4 -0
  2329. package/src/interface/math/vec2/i32/bitwise-not.ts +4 -0
  2330. package/src/interface/math/vec2/i32/bitwise-or.ts +4 -0
  2331. package/src/interface/math/vec2/i32/bitwise-xor.ts +4 -0
  2332. package/src/interface/math/vec2/i32/clamp.ts +6 -0
  2333. package/src/interface/math/vec2/i32/count-leading-zeros.ts +8 -0
  2334. package/src/interface/math/vec2/i32/count-one-bits.ts +8 -0
  2335. package/src/interface/math/vec2/i32/count-trailing-zeros.ts +8 -0
  2336. package/src/interface/math/vec2/i32/equals.ts +3 -0
  2337. package/src/interface/math/vec2/i32/i32.ts +4 -0
  2338. package/src/interface/math/vec2/i32/max.ts +4 -0
  2339. package/src/interface/math/vec2/i32/min.ts +4 -0
  2340. package/src/interface/math/vec2/i32/negate.ts +4 -0
  2341. package/src/interface/math/vec2/i32/public.ts +21 -0
  2342. package/src/interface/math/vec2/i32/reverse-bits.ts +5 -0
  2343. package/src/interface/math/vec2/i32/scale.ts +5 -0
  2344. package/src/interface/math/vec2/i32/schema.ts +4 -0
  2345. package/src/interface/math/vec2/i32/shift-left.ts +3 -0
  2346. package/src/interface/math/vec2/i32/shift-right.ts +7 -0
  2347. package/src/interface/math/vec2/i32/subtract.ts +4 -0
  2348. package/src/interface/math/vec2/i32/zero.ts +3 -0
  2349. package/src/interface/math/vec2/index.ts +6 -0
  2350. package/src/interface/math/vec2/public.ts +4 -0
  2351. package/src/interface/math/vec2/u32/add.ts +7 -0
  2352. package/src/interface/math/vec2/u32/bitwise-and.ts +7 -0
  2353. package/src/interface/math/vec2/u32/bitwise-not.ts +4 -0
  2354. package/src/interface/math/vec2/u32/bitwise-or.ts +7 -0
  2355. package/src/interface/math/vec2/u32/bitwise-xor.ts +7 -0
  2356. package/src/interface/math/vec2/u32/clamp.ts +6 -0
  2357. package/src/interface/math/vec2/u32/count-leading-zeros.ts +8 -0
  2358. package/src/interface/math/vec2/u32/count-one-bits.ts +8 -0
  2359. package/src/interface/math/vec2/u32/count-trailing-zeros.ts +8 -0
  2360. package/src/interface/math/vec2/u32/equals.ts +3 -0
  2361. package/src/interface/math/vec2/u32/max.ts +7 -0
  2362. package/src/interface/math/vec2/u32/min.ts +7 -0
  2363. package/src/interface/math/vec2/u32/negate.ts +3 -0
  2364. package/src/interface/math/vec2/u32/public.ts +20 -0
  2365. package/src/interface/math/vec2/u32/reverse-bits.ts +8 -0
  2366. package/src/interface/math/vec2/u32/scale.ts +5 -0
  2367. package/src/interface/math/vec2/u32/schema.ts +4 -0
  2368. package/src/interface/math/vec2/u32/shift-left.ts +3 -0
  2369. package/src/interface/math/vec2/u32/shift-right.ts +7 -0
  2370. package/src/interface/math/vec2/u32/subtract.ts +7 -0
  2371. package/src/interface/math/vec2/u32/u32.ts +4 -0
  2372. package/src/interface/math/vec2/u32/zero.ts +3 -0
  2373. package/src/interface/math/vec3/f32/abs.ts +4 -0
  2374. package/src/interface/math/vec3/f32/acos.ts +4 -0
  2375. package/src/interface/math/vec3/f32/acosh.ts +4 -0
  2376. package/src/interface/math/vec3/f32/add.ts +8 -0
  2377. package/src/interface/math/vec3/f32/asin.ts +4 -0
  2378. package/src/interface/math/vec3/f32/asinh.ts +4 -0
  2379. package/src/interface/math/vec3/f32/atan.ts +4 -0
  2380. package/src/interface/math/vec3/f32/atanh.ts +4 -0
  2381. package/src/interface/math/vec3/f32/ceil.ts +4 -0
  2382. package/src/interface/math/vec3/f32/clamp.ts +6 -0
  2383. package/src/interface/math/vec3/f32/cos.ts +4 -0
  2384. package/src/interface/math/vec3/f32/cosh.ts +4 -0
  2385. package/src/interface/math/vec3/f32/cross.ts +8 -0
  2386. package/src/interface/math/vec3/f32/distance-squared.ts +8 -0
  2387. package/src/interface/math/vec3/f32/distance.ts +6 -0
  2388. package/src/interface/math/vec3/f32/dot.ts +5 -0
  2389. package/src/interface/math/vec3/f32/equals.ts +3 -0
  2390. package/src/interface/math/vec3/f32/exp.ts +4 -0
  2391. package/src/interface/math/vec3/f32/exp2.ts +4 -0
  2392. package/src/interface/math/vec3/f32/f32.ts +3 -0
  2393. package/src/interface/math/vec3/f32/faceforward.ts +7 -0
  2394. package/src/interface/math/vec3/f32/floor.ts +4 -0
  2395. package/src/interface/math/vec3/f32/fract.ts +8 -0
  2396. package/src/interface/math/vec3/f32/length-squared.ts +4 -0
  2397. package/src/interface/math/vec3/f32/length.ts +4 -0
  2398. package/src/interface/math/vec3/f32/log.ts +4 -0
  2399. package/src/interface/math/vec3/f32/log2.ts +4 -0
  2400. package/src/interface/math/vec3/f32/max.ts +8 -0
  2401. package/src/interface/math/vec3/f32/min.ts +8 -0
  2402. package/src/interface/math/vec3/f32/mix.ts +8 -0
  2403. package/src/interface/math/vec3/f32/mod.ts +7 -0
  2404. package/src/interface/math/vec3/f32/modf.ts +7 -0
  2405. package/src/interface/math/vec3/f32/multiply.ts +11 -0
  2406. package/src/interface/math/vec3/f32/negate.ts +4 -0
  2407. package/src/interface/math/vec3/f32/normalize.ts +6 -0
  2408. package/src/interface/math/vec3/f32/one.ts +3 -0
  2409. package/src/interface/math/vec3/f32/pow.ts +9 -0
  2410. package/src/interface/math/vec3/f32/public.ts +53 -0
  2411. package/src/interface/math/vec3/f32/random.ts +5 -0
  2412. package/src/interface/math/vec3/f32/reflect.ts +10 -0
  2413. package/src/interface/math/vec3/f32/refract.ts +15 -0
  2414. package/src/interface/math/vec3/f32/round.ts +9 -0
  2415. package/src/interface/math/vec3/f32/scale.ts +4 -0
  2416. package/src/interface/math/vec3/f32/schema.ts +4 -0
  2417. package/src/interface/math/vec3/f32/sign.ts +4 -0
  2418. package/src/interface/math/vec3/f32/sin.ts +4 -0
  2419. package/src/interface/math/vec3/f32/sinh.ts +4 -0
  2420. package/src/interface/math/vec3/f32/smoothstep.ts +13 -0
  2421. package/src/interface/math/vec3/f32/sqrt.ts +4 -0
  2422. package/src/interface/math/vec3/f32/step.ts +8 -0
  2423. package/src/interface/math/vec3/f32/subtract.ts +8 -0
  2424. package/src/interface/math/vec3/f32/tan.ts +4 -0
  2425. package/src/interface/math/vec3/f32/tanh.ts +4 -0
  2426. package/src/interface/math/vec3/f32/trunc.ts +4 -0
  2427. package/src/interface/math/vec3/f32/zero.ts +3 -0
  2428. package/src/interface/math/vec3/i32/abs.ts +8 -0
  2429. package/src/interface/math/vec3/i32/add.ts +8 -0
  2430. package/src/interface/math/vec3/i32/bitwise-and.ts +8 -0
  2431. package/src/interface/math/vec3/i32/bitwise-not.ts +4 -0
  2432. package/src/interface/math/vec3/i32/bitwise-or.ts +8 -0
  2433. package/src/interface/math/vec3/i32/bitwise-xor.ts +8 -0
  2434. package/src/interface/math/vec3/i32/clamp.ts +6 -0
  2435. package/src/interface/math/vec3/i32/count-leading-zeros.ts +9 -0
  2436. package/src/interface/math/vec3/i32/count-one-bits.ts +9 -0
  2437. package/src/interface/math/vec3/i32/count-trailing-zeros.ts +9 -0
  2438. package/src/interface/math/vec3/i32/equals.ts +3 -0
  2439. package/src/interface/math/vec3/i32/i32.ts +4 -0
  2440. package/src/interface/math/vec3/i32/max.ts +8 -0
  2441. package/src/interface/math/vec3/i32/min.ts +8 -0
  2442. package/src/interface/math/vec3/i32/multiply.ts +8 -0
  2443. package/src/interface/math/vec3/i32/negate.ts +8 -0
  2444. package/src/interface/math/vec3/i32/one.ts +3 -0
  2445. package/src/interface/math/vec3/i32/public.ts +23 -0
  2446. package/src/interface/math/vec3/i32/reverse-bits.ts +9 -0
  2447. package/src/interface/math/vec3/i32/scale.ts +9 -0
  2448. package/src/interface/math/vec3/i32/schema.ts +4 -0
  2449. package/src/interface/math/vec3/i32/shift-left.ts +3 -0
  2450. package/src/interface/math/vec3/i32/shift-right.ts +8 -0
  2451. package/src/interface/math/vec3/i32/subtract.ts +8 -0
  2452. package/src/interface/math/vec3/i32/zero.ts +3 -0
  2453. package/src/interface/math/vec3/index.ts +6 -0
  2454. package/src/interface/math/vec3/public.ts +4 -0
  2455. package/src/interface/math/vec3/u32/add.ts +8 -0
  2456. package/src/interface/math/vec3/u32/bitwise-and.ts +8 -0
  2457. package/src/interface/math/vec3/u32/bitwise-not.ts +4 -0
  2458. package/src/interface/math/vec3/u32/bitwise-or.ts +8 -0
  2459. package/src/interface/math/vec3/u32/bitwise-xor.ts +8 -0
  2460. package/src/interface/math/vec3/u32/clamp.ts +6 -0
  2461. package/src/interface/math/vec3/u32/count-leading-zeros.ts +9 -0
  2462. package/src/interface/math/vec3/u32/count-one-bits.ts +9 -0
  2463. package/src/interface/math/vec3/u32/count-trailing-zeros.ts +9 -0
  2464. package/src/interface/math/vec3/u32/equals.ts +3 -0
  2465. package/src/interface/math/vec3/u32/max.ts +8 -0
  2466. package/src/interface/math/vec3/u32/min.ts +8 -0
  2467. package/src/interface/math/vec3/u32/multiply.ts +8 -0
  2468. package/src/interface/math/vec3/u32/negate.ts +3 -0
  2469. package/src/interface/math/vec3/u32/one.ts +3 -0
  2470. package/src/interface/math/vec3/u32/public.ts +23 -0
  2471. package/src/interface/math/vec3/u32/reverse-bits.ts +9 -0
  2472. package/src/interface/math/vec3/u32/scale.ts +9 -0
  2473. package/src/interface/math/vec3/u32/schema.ts +4 -0
  2474. package/src/interface/math/vec3/u32/shift-left.ts +7 -0
  2475. package/src/interface/math/vec3/u32/shift-right.ts +8 -0
  2476. package/src/interface/math/vec3/u32/subtract.ts +8 -0
  2477. package/src/interface/math/vec3/u32/u32.ts +4 -0
  2478. package/src/interface/math/vec3/u32/volume.ts +3 -0
  2479. package/src/interface/math/vec3/u32/zero.ts +3 -0
  2480. package/src/interface/math/vec4/f32/abs.ts +4 -0
  2481. package/src/interface/math/vec4/f32/acos.ts +4 -0
  2482. package/src/interface/math/vec4/f32/acosh.ts +4 -0
  2483. package/src/interface/math/vec4/f32/add.ts +9 -0
  2484. package/src/interface/math/vec4/f32/asin.ts +4 -0
  2485. package/src/interface/math/vec4/f32/asinh.ts +4 -0
  2486. package/src/interface/math/vec4/f32/atan.ts +4 -0
  2487. package/src/interface/math/vec4/f32/atanh.ts +4 -0
  2488. package/src/interface/math/vec4/f32/ceil.ts +4 -0
  2489. package/src/interface/math/vec4/f32/clamp.ts +6 -0
  2490. package/src/interface/math/vec4/f32/cos.ts +4 -0
  2491. package/src/interface/math/vec4/f32/cosh.ts +4 -0
  2492. package/src/interface/math/vec4/f32/distance.ts +6 -0
  2493. package/src/interface/math/vec4/f32/dot.ts +5 -0
  2494. package/src/interface/math/vec4/f32/exp.ts +4 -0
  2495. package/src/interface/math/vec4/f32/exp2.ts +4 -0
  2496. package/src/interface/math/vec4/f32/f32.ts +3 -0
  2497. package/src/interface/math/vec4/f32/faceforward.ts +7 -0
  2498. package/src/interface/math/vec4/f32/floor.ts +4 -0
  2499. package/src/interface/math/vec4/f32/fract.ts +9 -0
  2500. package/src/interface/math/vec4/f32/length.ts +4 -0
  2501. package/src/interface/math/vec4/f32/log.ts +4 -0
  2502. package/src/interface/math/vec4/f32/log2.ts +4 -0
  2503. package/src/interface/math/vec4/f32/max.ts +9 -0
  2504. package/src/interface/math/vec4/f32/min.ts +9 -0
  2505. package/src/interface/math/vec4/f32/mix.ts +9 -0
  2506. package/src/interface/math/vec4/f32/mod.ts +8 -0
  2507. package/src/interface/math/vec4/f32/modf.ts +7 -0
  2508. package/src/interface/math/vec4/f32/multiply.ts +9 -0
  2509. package/src/interface/math/vec4/f32/negate.ts +4 -0
  2510. package/src/interface/math/vec4/f32/normalize.ts +6 -0
  2511. package/src/interface/math/vec4/f32/pow.ts +10 -0
  2512. package/src/interface/math/vec4/f32/public.ts +46 -0
  2513. package/src/interface/math/vec4/f32/reflect.ts +10 -0
  2514. package/src/interface/math/vec4/f32/refract.ts +15 -0
  2515. package/src/interface/math/vec4/f32/round.ts +10 -0
  2516. package/src/interface/math/vec4/f32/scale.ts +4 -0
  2517. package/src/interface/math/vec4/f32/schema.ts +4 -0
  2518. package/src/interface/math/vec4/f32/sign.ts +4 -0
  2519. package/src/interface/math/vec4/f32/sin.ts +4 -0
  2520. package/src/interface/math/vec4/f32/sinh.ts +4 -0
  2521. package/src/interface/math/vec4/f32/smoothstep.ts +15 -0
  2522. package/src/interface/math/vec4/f32/sqrt.ts +4 -0
  2523. package/src/interface/math/vec4/f32/step.ts +9 -0
  2524. package/src/interface/math/vec4/f32/subtract.ts +9 -0
  2525. package/src/interface/math/vec4/f32/tan.ts +4 -0
  2526. package/src/interface/math/vec4/f32/tanh.ts +4 -0
  2527. package/src/interface/math/vec4/f32/trunc.ts +4 -0
  2528. package/src/interface/math/vec4/i32/abs.ts +9 -0
  2529. package/src/interface/math/vec4/i32/add.ts +9 -0
  2530. package/src/interface/math/vec4/i32/bitwise-and.ts +9 -0
  2531. package/src/interface/math/vec4/i32/bitwise-not.ts +4 -0
  2532. package/src/interface/math/vec4/i32/bitwise-or.ts +9 -0
  2533. package/src/interface/math/vec4/i32/bitwise-xor.ts +9 -0
  2534. package/src/interface/math/vec4/i32/clamp.ts +6 -0
  2535. package/src/interface/math/vec4/i32/count-leading-zeros.ts +10 -0
  2536. package/src/interface/math/vec4/i32/count-one-bits.ts +10 -0
  2537. package/src/interface/math/vec4/i32/count-trailing-zeros.ts +10 -0
  2538. package/src/interface/math/vec4/i32/equals.ts +4 -0
  2539. package/src/interface/math/vec4/i32/i32.ts +4 -0
  2540. package/src/interface/math/vec4/i32/max.ts +9 -0
  2541. package/src/interface/math/vec4/i32/min.ts +9 -0
  2542. package/src/interface/math/vec4/i32/multiply.ts +9 -0
  2543. package/src/interface/math/vec4/i32/negate.ts +9 -0
  2544. package/src/interface/math/vec4/i32/one.ts +3 -0
  2545. package/src/interface/math/vec4/i32/public.ts +23 -0
  2546. package/src/interface/math/vec4/i32/reverse-bits.ts +10 -0
  2547. package/src/interface/math/vec4/i32/scale.ts +10 -0
  2548. package/src/interface/math/vec4/i32/schema.ts +4 -0
  2549. package/src/interface/math/vec4/i32/shift-left.ts +3 -0
  2550. package/src/interface/math/vec4/i32/shift-right.ts +9 -0
  2551. package/src/interface/math/vec4/i32/subtract.ts +9 -0
  2552. package/src/interface/math/vec4/i32/zero.ts +3 -0
  2553. package/src/interface/math/vec4/index.ts +6 -0
  2554. package/src/interface/math/vec4/public.ts +4 -0
  2555. package/src/interface/math/vec4/u32/add.ts +9 -0
  2556. package/src/interface/math/vec4/u32/bitwise-and.ts +9 -0
  2557. package/src/interface/math/vec4/u32/bitwise-not.ts +4 -0
  2558. package/src/interface/math/vec4/u32/bitwise-or.ts +9 -0
  2559. package/src/interface/math/vec4/u32/bitwise-xor.ts +9 -0
  2560. package/src/interface/math/vec4/u32/clamp.ts +6 -0
  2561. package/src/interface/math/vec4/u32/count-leading-zeros.ts +10 -0
  2562. package/src/interface/math/vec4/u32/count-one-bits.ts +10 -0
  2563. package/src/interface/math/vec4/u32/count-trailing-zeros.ts +10 -0
  2564. package/src/interface/math/vec4/u32/equals.ts +4 -0
  2565. package/src/interface/math/vec4/u32/max.ts +9 -0
  2566. package/src/interface/math/vec4/u32/min.ts +9 -0
  2567. package/src/interface/math/vec4/u32/multiply.ts +9 -0
  2568. package/src/interface/math/vec4/u32/negate.ts +3 -0
  2569. package/src/interface/math/vec4/u32/one.ts +3 -0
  2570. package/src/interface/math/vec4/u32/public.ts +22 -0
  2571. package/src/interface/math/vec4/u32/reverse-bits.ts +10 -0
  2572. package/src/interface/math/vec4/u32/scale.ts +10 -0
  2573. package/src/interface/math/vec4/u32/schema.ts +4 -0
  2574. package/src/interface/math/vec4/u32/shift-left.ts +8 -0
  2575. package/src/interface/math/vec4/u32/shift-right.ts +9 -0
  2576. package/src/interface/math/vec4/u32/subtract.ts +9 -0
  2577. package/src/interface/math/vec4/u32/u32.ts +4 -0
  2578. package/src/interface/math/vec4/u32/zero.ts +3 -0
  2579. package/src/interface/platform/platform.ts +35 -0
  2580. package/src/interface/registry/archetypes.ts +23 -0
  2581. package/src/interface/registry/declarations.ts +102 -0
  2582. package/src/interface/registry/finalizer-order.ts +52 -0
  2583. package/src/interface/registry/ids.test-helper.ts +14 -0
  2584. package/src/interface/registry/ids.test.ts +124 -0
  2585. package/src/interface/registry/ids.ts +30 -0
  2586. package/src/interface/registry/index.ts +29 -0
  2587. package/src/interface/registry/indexes.ts +73 -0
  2588. package/src/interface/registry/items.ts +125 -0
  2589. package/src/interface/registry/layout.test.ts +86 -0
  2590. package/src/interface/registry/layout.ts +364 -0
  2591. package/src/interface/registry/names.test.ts +75 -0
  2592. package/src/interface/registry/names.ts +154 -0
  2593. package/src/interface/registry/program.ts +111 -0
  2594. package/src/interface/registry/reduction.ts +7 -0
  2595. package/src/interface/registry/schedule.ts +215 -0
  2596. package/src/interface/registry/schemas.ts +61 -0
  2597. package/src/interface/registry/strata.ts +93 -0
  2598. package/src/interface/registry/threads.ts +73 -0
  2599. package/src/interface/registry/traits.ts +12 -0
  2600. package/src/interface/registry/written.ts +14 -0
  2601. package/src/interface/report/components.ts +69 -0
  2602. package/src/interface/report/failure.ts +26 -0
  2603. package/src/interface/report/index.ts +8 -0
  2604. package/src/interface/report/report.ts +11 -0
  2605. package/src/interface/report/report.type-test.ts +63 -0
  2606. package/src/interface/resource/condition.ts +8 -0
  2607. package/src/interface/resource/declaration.ts +29 -0
  2608. package/src/interface/resource/declaration.type-test.ts +89 -0
  2609. package/src/interface/resource/index.ts +3 -0
  2610. package/src/interface/resource/key.ts +3 -0
  2611. package/src/interface/resource/reduction.ts +11 -0
  2612. package/src/interface/resource/register.test.ts +107 -0
  2613. package/src/interface/resource/register.ts +18 -0
  2614. package/src/interface/resource/resource.ts +4 -0
  2615. package/src/interface/resource/types.ts +3 -0
  2616. package/src/interface/resource/value.ts +20 -0
  2617. package/src/interface/resource/written.ts +4 -0
  2618. package/src/interface/resources/always.ts +12 -0
  2619. package/src/interface/resources/cadence.ts +27 -0
  2620. package/src/interface/resources/clock.ts +17 -0
  2621. package/src/interface/resources/gpu-device.ts +16 -0
  2622. package/src/interface/resources/index.ts +6 -0
  2623. package/src/interface/resources/wake.ts +15 -0
  2624. package/src/interface/resources/workers.ts +12 -0
  2625. package/src/interface/rule/create.ts +25 -0
  2626. package/src/interface/rule/created.ts +4 -0
  2627. package/src/interface/rule/declaration.ts +11 -0
  2628. package/src/interface/rule/index.ts +1 -0
  2629. package/src/interface/rule/name.ts +6 -0
  2630. package/src/interface/rule/rule.ts +3 -0
  2631. package/src/interface/rule/rule.type-test.ts +117 -0
  2632. package/src/interface/schema/is-data.ts +25 -0
  2633. package/src/interface/schema/is-struct.ts +24 -0
  2634. package/src/interface/schema/schema.ts +168 -0
  2635. package/src/interface/schema/schema.type-test.ts +153 -0
  2636. package/src/interface/schema/schemas.type-test.ts +12 -0
  2637. package/src/interface/system/access.ts +67 -0
  2638. package/src/interface/system/body.ts +49 -0
  2639. package/src/interface/system/check.ts +227 -0
  2640. package/src/interface/system/commands.ts +26 -0
  2641. package/src/interface/system/commands.type-test.ts +93 -0
  2642. package/src/interface/system/composite-declaration.ts +14 -0
  2643. package/src/interface/system/composite-input.type-test.ts +63 -0
  2644. package/src/interface/system/composite.ts +5 -0
  2645. package/src/interface/system/conditions.type-test.ts +68 -0
  2646. package/src/interface/system/create.test.ts +230 -0
  2647. package/src/interface/system/create.ts +181 -0
  2648. package/src/interface/system/declaration.ts +65 -0
  2649. package/src/interface/system/definition.ts +5 -0
  2650. package/src/interface/system/index.ts +3 -0
  2651. package/src/interface/system/input.ts +28 -0
  2652. package/src/interface/system/leaf.ts +13 -0
  2653. package/src/interface/system/name.ts +6 -0
  2654. package/src/interface/system/property.ts +4 -0
  2655. package/src/interface/system/render.ts +81 -0
  2656. package/src/interface/system/struct.ts +9 -0
  2657. package/src/interface/system/system.ts +9 -0
  2658. package/src/interface/system/system.type-test.ts +460 -0
  2659. package/src/interface/system/threads.ts +46 -0
  2660. package/src/interface/system/threads.type-test.ts +114 -0
  2661. package/src/interface/system/up.type-test.ts +80 -0
  2662. package/src/interface/system/values.ts +70 -0
  2663. package/src/interface/thread/of.ts +8 -0
  2664. package/src/interface/thread/thread.ts +13 -0
  2665. package/src/interface/thread/thread.type-test.ts +140 -0
  2666. package/src/interface/trait/index.ts +1 -0
  2667. package/src/interface/trait/key.ts +6 -0
  2668. package/src/interface/trait/register.ts +9 -0
  2669. package/src/interface/trait/required.ts +7 -0
  2670. package/src/interface/trait/symbol-keys.ts +19 -0
  2671. package/src/interface/trait/symbol-keys.type-test.ts +14 -0
  2672. package/src/interface/trait/trait.ts +3 -0
  2673. package/src/interface/trait/trait.type-test.ts +158 -0
  2674. package/src/interface/trait/types.ts +56 -0
  2675. package/src/interface/tsconfig.json +28 -0
  2676. package/src/interface/world/create.ts +15 -0
  2677. package/src/interface/world/filter.ts +9 -0
  2678. package/src/interface/world/index.ts +2 -0
  2679. package/src/interface/world/join.ts +10 -0
  2680. package/src/interface/world/loop.type-test.ts +67 -0
  2681. package/src/interface/world/share.type-test.ts +25 -0
  2682. package/src/interface/world/world.ts +58 -0
  2683. package/src/interface/world/world.type-test.ts +81 -0
  2684. package/src/observe/compare.ts +86 -0
  2685. package/src/observe/entity.ts +224 -0
  2686. package/src/observe/index.ts +1 -0
  2687. package/src/observe/members.ts +42 -0
  2688. package/src/observe/observe.ts +24 -0
  2689. package/src/observe/observe.type-test.ts +88 -0
  2690. package/src/observe/plans.ts +272 -0
  2691. package/src/observe/query.ts +26 -0
  2692. package/src/observe/resource.ts +80 -0
  2693. package/src/observe/select.ts +648 -0
  2694. package/src/observe/to-promise.ts +22 -0
  2695. package/src/observe/tsconfig.json +31 -0
  2696. package/src/observe/values.ts +9 -0
  2697. package/src/observe/world-state.ts +414 -0
  2698. package/src/observe-imports.test.ts +48 -0
  2699. package/src/perftest/benchmark.ts +106 -0
  2700. package/src/perftest/benchmarks.ts +692 -0
  2701. package/src/perftest/finalized.ts +122 -0
  2702. package/src/perftest/flat.ts +67 -0
  2703. package/src/perftest/growth.ts +55 -0
  2704. package/src/perftest/handoff.ts +154 -0
  2705. package/src/perftest/hierarchy.ts +132 -0
  2706. package/src/perftest/indexes.ts +691 -0
  2707. package/src/perftest/joined.ts +95 -0
  2708. package/src/perftest/keys.ts +100 -0
  2709. package/src/perftest/log.ts +126 -0
  2710. package/src/perftest/loop.ts +49 -0
  2711. package/src/perftest/observed-gpu.ts +58 -0
  2712. package/src/perftest/observed.ts +298 -0
  2713. package/src/perftest/observer.ts +57 -0
  2714. package/src/perftest/particles.ts +76 -0
  2715. package/src/perftest/placed.ts +177 -0
  2716. package/src/perftest/reads.ts +210 -0
  2717. package/src/perftest/remote.ts +364 -0
  2718. package/src/perftest/run.ts +43 -0
  2719. package/src/perftest/strings.ts +133 -0
  2720. package/src/perftest/structural.ts +164 -0
  2721. package/src/perftest/suite.perf-browser-test.ts +133 -0
  2722. package/src/perftest/suite.perf-test.ts +7 -0
  2723. package/src/perftest/suite.ts +232 -0
  2724. package/src/perftest/systems.ts +134 -0
  2725. package/src/perftest/tails.ts +306 -0
  2726. package/src/perftest/transfers.ts +93 -0
  2727. package/src/perftest/uploads.ts +82 -0
  2728. package/src/perftest/values.ts +111 -0
  2729. package/src/perftest/wake.ts +40 -0
  2730. package/src/samples/particles/build.test.ts +23 -0
  2731. package/src/samples/particles/gpu/main.ts +96 -0
  2732. package/src/samples/particles/gpu/particles.ts +138 -0
  2733. package/src/samples/particles/index.html +22 -0
  2734. package/src/samples/particles/particles.test.ts +31 -0
  2735. package/src/samples/particles/particles.ts +85 -0
  2736. package/src/samples/particles/particles.type-test.ts +7 -0
  2737. package/src/samples/todo/README.md +174 -0
  2738. package/src/samples/todo/app/app.browser.test.ts +215 -0
  2739. package/src/samples/todo/app/app.ts +30 -0
  2740. package/src/samples/todo/app/log-failures.test.ts +28 -0
  2741. package/src/samples/todo/app/log-failures.ts +7 -0
  2742. package/src/samples/todo/app/main.ts +4 -0
  2743. package/src/samples/todo/app/profile.perf-browser-test.ts +100 -0
  2744. package/src/samples/todo/app/proportional.browser.test.ts +157 -0
  2745. package/src/samples/todo/app/todo.perf-browser-test.ts +207 -0
  2746. package/src/samples/todo/build.test.ts +23 -0
  2747. package/src/samples/todo/features/completion/data.ts +5 -0
  2748. package/src/samples/todo/features/completion/dom.browser.test.ts +53 -0
  2749. package/src/samples/todo/features/completion/dom.ts +39 -0
  2750. package/src/samples/todo/features/completion/elements/elements.browser.test.ts +68 -0
  2751. package/src/samples/todo/features/completion/elements/todo-summary.ts +82 -0
  2752. package/src/samples/todo/features/completion/elements/todo-toggle-all.ts +69 -0
  2753. package/src/samples/todo/features/completion/events.ts +7 -0
  2754. package/src/samples/todo/features/completion/feature.ts +13 -0
  2755. package/src/samples/todo/features/completion/model.test.ts +40 -0
  2756. package/src/samples/todo/features/completion/model.ts +21 -0
  2757. package/src/samples/todo/features/filter/data.ts +16 -0
  2758. package/src/samples/todo/features/filter/dom.browser.test.ts +84 -0
  2759. package/src/samples/todo/features/filter/dom.ts +63 -0
  2760. package/src/samples/todo/features/filter/elements/elements.browser.test.ts +43 -0
  2761. package/src/samples/todo/features/filter/elements/todo-filters.ts +70 -0
  2762. package/src/samples/todo/features/filter/events.ts +4 -0
  2763. package/src/samples/todo/features/filter/feature.ts +12 -0
  2764. package/src/samples/todo/features/filter/model.test.ts +18 -0
  2765. package/src/samples/todo/features/filter/model.ts +10 -0
  2766. package/src/samples/todo/features/generate/elements/elements.browser.test.ts +18 -0
  2767. package/src/samples/todo/features/generate/elements/todo-generate.ts +36 -0
  2768. package/src/samples/todo/features/generate/events.ts +4 -0
  2769. package/src/samples/todo/features/generate/feature.ts +11 -0
  2770. package/src/samples/todo/features/generate/model.test.ts +13 -0
  2771. package/src/samples/todo/features/generate/model.ts +19 -0
  2772. package/src/samples/todo/features/index.ts +4 -0
  2773. package/src/samples/todo/features/todos/data.ts +31 -0
  2774. package/src/samples/todo/features/todos/dom.browser.test.ts +205 -0
  2775. package/src/samples/todo/features/todos/dom.ts +90 -0
  2776. package/src/samples/todo/features/todos/elements/elements.browser.test.ts +211 -0
  2777. package/src/samples/todo/features/todos/elements/todo-entry.ts +45 -0
  2778. package/src/samples/todo/features/todos/elements/todo-list.ts +93 -0
  2779. package/src/samples/todo/features/todos/elements/todo-row.ts +138 -0
  2780. package/src/samples/todo/features/todos/events.ts +11 -0
  2781. package/src/samples/todo/features/todos/feature.ts +14 -0
  2782. package/src/samples/todo/features/todos/model.test.ts +77 -0
  2783. package/src/samples/todo/features/todos/model.ts +80 -0
  2784. package/src/samples/todo/features/todos/todos.test-helper.ts +34 -0
  2785. package/src/samples/todo/imports.test.ts +113 -0
  2786. package/src/samples/todo/index.html +51 -0
  2787. package/src/samples/todo/shared/attach.browser.test.ts +73 -0
  2788. package/src/samples/todo/shared/attach.ts +32 -0
  2789. package/src/samples/todo/shared/connect.ts +21 -0
  2790. package/src/samples/todo/shared/elements/define.ts +7 -0
  2791. package/src/samples/todo/shared/elements/elements.test-helper.ts +28 -0
  2792. package/src/samples/todo/shared/feature.ts +20 -0
  2793. package/src/samples/todo/shared/ticks.test-helper.ts +25 -0
  2794. package/src/samples/transfers/build.test.ts +22 -0
  2795. package/src/samples/transfers/index.html +18 -0
  2796. package/src/samples/transfers/loader.ts +42 -0
  2797. package/src/samples/transfers/main.ts +46 -0
  2798. package/src/samples/transfers/sprites.ts +96 -0
  2799. package/src/samples/transfers/world.ts +11 -0
  2800. package/src/world.test.ts +46 -0
  2801. package/README.md +0 -3
@@ -0,0 +1,250 @@
1
+ import { logFinalizedWord, logStopsWord } from './move-log.js';
2
+ // Stop lists (threads.md, "Finalizers on other threads"): what a joined thread's finalizers need of the entities a sync
3
+ // point stops, written by the world's thread before it applies, one block per sync point with stops, which the thread
4
+ // reads as it replays that sync and acknowledges by the sync it finalized through.
5
+ //
6
+ // A block's words: its sync, modulo 2^32; the next block's offset, stored once it's written, 0 until then; its groups;
7
+ // its bytes. Then a group per finalizer with stops, in the world's finalizer order: its index on the thread, its stops,
8
+ // its bytes; then as columns, each on 8 bytes, every stop's entity (f64), its archetype and row before apply (u32), the
9
+ // tag of each object it reads (u32), and the value of each linear struct it reads in that component's layout, or for a
10
+ // string, the handle of a copy of its record, freed with the block, since the thread may read it sync points later.
11
+ export const blockSyncWord = 0;
12
+ export const blockNextWord = 1;
13
+ export const blockGroupsWord = 2;
14
+ export const blockBytesWord = 3;
15
+ export const blockHeaderBytes = 16;
16
+ export const groupIndexWord = 0;
17
+ export const groupCountWord = 1;
18
+ export const groupBytesWord = 2;
19
+ export const groupHeaderBytes = 16;
20
+ const align = (bytes) => (bytes + 7) & ~7;
21
+ /** Where a group of `count` stops keeps its entities, archetypes and rows, past its header. */
22
+ export const entitiesAt = (group) => group + groupHeaderBytes;
23
+ export const archetypesAt = (group, count) => group + groupHeaderBytes + 8 * count;
24
+ export const rowsAt = (group, count) => group + groupHeaderBytes + 12 * count;
25
+ /** Where a group's tags of its `object`th object read start. */
26
+ export const tagsAt = (group, count, object) => group + groupHeaderBytes + 16 * count + object * align(4 * count);
27
+ /** Where a group's linear values start, after the tags of its `objects` object reads. */
28
+ export const valuesAt = (group, count, objects) => tagsAt(group, count, objects);
29
+ /** Bytes of one linear read's column of `count` values of `stride` bytes. */
30
+ export const columnBytes = (count, stride) => align(count * stride);
31
+ /** Bytes of a group of `count` stops of a finalizer reading `objects` objects and linear values of `strides` bytes. */
32
+ const groupBytes = (count, objects, strides) => {
33
+ let bytes = valuesAt(0, count, objects);
34
+ for (const stride of strides)
35
+ bytes += columnBytes(count, stride);
36
+ return bytes;
37
+ };
38
+ export const createStopWriter = (memory, log, strings) => ({ memory, log, strings, staged: [], written: [], unwoken: false });
39
+ export const createHolds = () => ({ counts: new Int32Array(0), size: 0 });
40
+ const hold = (holds, index) => {
41
+ if (index >= holds.counts.length) {
42
+ const counts = new Int32Array(Math.max(index + 1, 2 * holds.counts.length, 1024));
43
+ counts.set(holds.counts);
44
+ holds.counts = counts;
45
+ }
46
+ if (holds.counts[index]++ === 0)
47
+ holds.size++;
48
+ };
49
+ /**
50
+ * Writes the handles of copies of a string's records at word `at`, for a group's `count` stops at the archetypes and
51
+ * rows its words there name, keeping each copy in `copied`. Copying may grow the memory, which leaves `u32` over the
52
+ * block as it was: it's shared.
53
+ */
54
+ const copyStrings = (strings, copied, u32, at, count, archetypeWords, rowWords, id, archetypes) => {
55
+ let archetype = -1;
56
+ let handles;
57
+ for (let i = 0; i < count; i++) {
58
+ if (u32[archetypeWords + i] !== archetype) {
59
+ archetype = u32[archetypeWords + i];
60
+ handles = archetypes[archetype].storageById[id]?.views.u32;
61
+ }
62
+ if (handles === undefined)
63
+ continue;
64
+ const copy = strings.copy(handles[u32[rowWords + i]]);
65
+ copied.push(copy);
66
+ u32[at + i] = copy;
67
+ }
68
+ };
69
+ /**
70
+ * Writes the block of a sync point's staged stops, before it applies: entities, archetypes and rows, tags and linear
71
+ * values, copied from the rows they're at, a column at a time; despawned entities' indexes held. Links it after the
72
+ * last block.
73
+ */
74
+ export const writeStops = (writer, sync, source) => {
75
+ const { staged, memory } = writer;
76
+ if (staged.length === 0)
77
+ return;
78
+ let bytes = blockHeaderBytes;
79
+ for (const stops of staged)
80
+ bytes += groupBytes(stops.entries.length, stops.objects.length, stops.strides);
81
+ const offset = memory.allocate(bytes);
82
+ const buffer = memory.memory.buffer;
83
+ const u8 = new Uint8Array(buffer);
84
+ const u32 = new Uint32Array(buffer);
85
+ const f64 = new Float64Array(buffer);
86
+ const held = [];
87
+ const stopped = [];
88
+ const copied = [];
89
+ u32[(offset >> 2) + blockSyncWord] = sync >>> 0;
90
+ u32[(offset >> 2) + blockNextWord] = 0;
91
+ u32[(offset >> 2) + blockGroupsWord] = staged.length;
92
+ u32[(offset >> 2) + blockBytesWord] = bytes;
93
+ let group = offset + blockHeaderBytes;
94
+ const { entity, from, despawned, archetypes, row: rows, holds } = source;
95
+ for (const stops of staged) {
96
+ const { entries, objects, linear, strides, copies } = stops;
97
+ const count = entries.length;
98
+ const size = groupBytes(count, objects.length, strides);
99
+ u32[(group >> 2) + groupIndexWord] = stops.index;
100
+ u32[(group >> 2) + groupCountWord] = count;
101
+ u32[(group >> 2) + groupBytesWord] = size;
102
+ const entityWords = entitiesAt(group) >> 3;
103
+ const archetypeWords = archetypesAt(group, count) >> 2;
104
+ const rowWords = rowsAt(group, count) >> 2;
105
+ for (let i = 0; i < count; i++) {
106
+ const entry = entries[i];
107
+ const stoppedEntity = entity[entry];
108
+ const index = stoppedEntity >>> 0;
109
+ f64[entityWords + i] = stoppedEntity;
110
+ u32[archetypeWords + i] = from[entry];
111
+ u32[rowWords + i] = rows[index];
112
+ if (despawned[entry] === 1) {
113
+ hold(holds, index);
114
+ held.push(index);
115
+ }
116
+ }
117
+ for (let k = 0; k < objects.length; k++) {
118
+ const tagWords = tagsAt(group, count, k) >> 2;
119
+ const id = objects[k];
120
+ let archetype = -1;
121
+ let tags;
122
+ for (let i = 0; i < count; i++) {
123
+ if (u32[archetypeWords + i] !== archetype) {
124
+ archetype = u32[archetypeWords + i];
125
+ tags = archetypes[archetype].storageById[id]?.tags;
126
+ }
127
+ u32[tagWords + i] = tags?.[u32[rowWords + i]] ?? 0;
128
+ }
129
+ }
130
+ let column = valuesAt(group, count, objects.length);
131
+ for (let k = 0; k < linear.length; k++) {
132
+ const stride = strides[k];
133
+ const id = linear[k];
134
+ const words = (stride & 3) === 0 ? stride >> 2 : 0;
135
+ let archetype = -1;
136
+ let values;
137
+ if (copies[k] && writer.strings !== null) {
138
+ copyStrings(writer.strings, copied, u32, column >> 2, count, archetypeWords, rowWords, id, archetypes);
139
+ column += columnBytes(count, stride);
140
+ continue;
141
+ }
142
+ for (let i = 0; i < count; i++) {
143
+ if (u32[archetypeWords + i] !== archetype) {
144
+ archetype = u32[archetypeWords + i];
145
+ values = archetypes[archetype].storageById[id]?.views;
146
+ }
147
+ if (values === undefined)
148
+ continue;
149
+ const row = u32[rowWords + i];
150
+ if (words > 0) {
151
+ const source = values.u32;
152
+ const target = (column >> 2) + i * words;
153
+ for (let w = 0; w < words; w++)
154
+ u32[target + w] = source[row * words + w];
155
+ }
156
+ else {
157
+ const source = values.u8;
158
+ const target = column + i * stride;
159
+ for (let b = 0; b < stride; b++)
160
+ u8[target + b] = source[row * stride + b];
161
+ }
162
+ }
163
+ column += columnBytes(count, stride);
164
+ }
165
+ stopped.push([stops.finalizer, count]);
166
+ group += size;
167
+ entries.length = 0;
168
+ }
169
+ staged.length = 0;
170
+ const last = writer.written.at(-1);
171
+ // Stored last, so the thread reads the block only once it's whole.
172
+ if (last === undefined)
173
+ Atomics.store(writer.log.header, logStopsWord, offset);
174
+ else
175
+ Atomics.store(u32, (last.offset >> 2) + blockNextWord, offset);
176
+ writer.written.push({ offset, bytes, sync: sync >>> 0, held, stopped, strings: copied, acknowledged: false });
177
+ writer.unwoken = true;
178
+ };
179
+ /** Lets go of the copies of strings' records a block's stops hold. */
180
+ const letGo = (writer, block) => {
181
+ const { strings } = writer;
182
+ if (strings !== null)
183
+ for (let k = 0; k < block.strings.length; k++)
184
+ strings.retire(block.strings[k]);
185
+ block.strings.length = 0;
186
+ };
187
+ /** Returns a held index once no thread finalizes it any more: it's reusable after the sync point. */
188
+ const unhold = (holds, released, held) => {
189
+ const { counts } = holds;
190
+ for (const index of held) {
191
+ if (--counts[index] !== 0)
192
+ continue;
193
+ holds.size--;
194
+ released.push(index);
195
+ }
196
+ };
197
+ /**
198
+ * Takes up what the thread acknowledged: blocks through the sync it finalized through return their held indexes, and
199
+ * all but the newest of them are freed, since the thread reads the next block's offset from that one.
200
+ */
201
+ export const settleStops = (writer, holds, released) => {
202
+ const { written, memory } = writer;
203
+ if (written.length === 0)
204
+ return;
205
+ const finalized = Atomics.load(writer.log.header, logFinalizedWord) >>> 0;
206
+ let newest = -1;
207
+ for (let k = 0; k < written.length; k++) {
208
+ const block = written[k];
209
+ if (((finalized - block.sync) | 0) < 0)
210
+ break;
211
+ if (!block.acknowledged) {
212
+ block.acknowledged = true;
213
+ unhold(holds, released, block.held);
214
+ letGo(writer, block);
215
+ }
216
+ newest = k;
217
+ }
218
+ for (let k = 0; k < newest; k++)
219
+ memory.free(written[k].offset, written[k].bytes);
220
+ if (newest > 0)
221
+ written.splice(0, newest);
222
+ };
223
+ /**
224
+ * Once the thread is gone: every held index returns, and each finalizer with stops it never acknowledged is a `"thread"`
225
+ * failure, for the next sync point's report.
226
+ */
227
+ export const endStops = (writer, holds, released, label) => {
228
+ settleStops(writer, holds, released);
229
+ const missed = new Map();
230
+ for (const block of writer.written) {
231
+ if (block.acknowledged)
232
+ continue;
233
+ block.acknowledged = true;
234
+ unhold(holds, released, block.held);
235
+ letGo(writer, block);
236
+ for (const [finalizer, count] of block.stopped)
237
+ missed.set(finalizer, (missed.get(finalizer) ?? 0) + count);
238
+ }
239
+ return [...missed].map(([finalizer, count]) => ({
240
+ finalizer, kind: "thread",
241
+ error: new Error(`Thread "${label}" is gone, so ${count === 1 ? "a stop" : `${count} stops`} of finalizer "${finalizer.name}" didn't run there.`),
242
+ }));
243
+ };
244
+ /** Frees every block once the thread left: one that died may still be reading them. */
245
+ export const freeStops = (writer) => {
246
+ for (const block of writer.written)
247
+ writer.memory.free(block.offset, block.bytes);
248
+ writer.written.length = 0;
249
+ };
250
+ //# sourceMappingURL=stop-lists.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stop-lists.js","sourceRoot":"","sources":["../../../src/implementation/world/stop-lists.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAgB,MAAM,eAAe,CAAC;AAE7E,wHAAwH;AACxH,sHAAsH;AACtH,mFAAmF;AACnF,EAAE;AACF,uHAAuH;AACvH,wHAAwH;AACxH,wHAAwH;AACxH,uHAAuH;AACvH,oHAAoH;AAEpH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC;AAC/B,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC;AAC/B,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AACjC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC;AAChC,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC;AAChC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC;AAChC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC;AAChC,MAAM,CAAC,MAAM,gBAAgB,G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CAAC,EAAE,EAAE,CAAC,CAAC;QAC5C,SAAS,EAAE,IAAI,EAAE,QAAQ;QACzB,KAAK,EAAE,IAAI,KAAK,CAAC,WAAW,KAAK,iBAAiB,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,KAAK,QAAQ,kBAAkB,SAAS,CAAC,IAAI,qBAAqB,CAAC;KACpJ,CAAC,CAAC,CAAC;AACR,CAAC,CAAC;AAEF,uFAAuF;AACvF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,MAAkB,EAAQ,EAAE;IAClD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,OAAO;QAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAClF,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;AAC9B,CAAC,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { type Memory } from './memory.js';
2
+ /** A thread's records: reading them, and on the world's thread, writing and freeing them. */
3
+ export type StringStore = {
4
+ /** Whether this thread writes records: only the world's does. */
5
+ readonly writes: boolean;
6
+ /** Whether the world keeps records of its strings, while a joined thread may read them. */
7
+ active: boolean;
8
+ /** The text of the record `handle` names, decoded once per record and kept while its generation is the same. */
9
+ readonly read: (handle: number) => string;
10
+ /** A new record holding `text`, by its handle. */
11
+ readonly write: (text: string) => number;
12
+ /** A new record of the same text, 0 for 0, for a copy a reader on another thread holds past its row's sync points. */
13
+ readonly copy: (handle: number) => number;
14
+ /** Lets a record go, 0 for none: it's freed at the end of the second sync point from now, when no reader holds it. */
15
+ readonly retire: (handle: number) => void;
16
+ /** At the end of each sync point: frees the records let go before the last one. */
17
+ readonly settle: () => void;
18
+ };
19
+ /** A joined thread's store over `memory`: it reads records, and writes none. */
20
+ export declare const createStringReader: (memory: WebAssembly.Memory) => StringStore;
21
+ /** The world's store over its arena, which only the world's thread writes. */
22
+ export declare const createStrings: (memory: Memory) => StringStore;
23
+ /** What holds strings: a string's column of handles, its values on the world's thread, and its records. */
24
+ type Column = {
25
+ readonly views: {
26
+ readonly u32: Uint32Array;
27
+ };
28
+ readonly values: unknown[];
29
+ readonly strings: StringStore | null;
30
+ };
31
+ /** A string column's value at `row`: as the world's thread holds it, or out of its record on another, `null` for 0. */
32
+ export declare const readString: (column: Column, row: number) => unknown;
33
+ /** Replaces a string column's value at `row`, and while records are kept, its record, letting the old one go. */
34
+ export declare const writeString: (column: Column, row: number, value: unknown) => void;
35
+ /** Archetypes as records are kept for them: their string storages, each row's value and handle. */
36
+ type Held = {
37
+ readonly count: number;
38
+ readonly storages: readonly (Column & {
39
+ readonly layout: {
40
+ readonly kind: string;
41
+ };
42
+ })[];
43
+ };
44
+ /** Starts keeping records, once a thread may read them: one for each value the world holds now. */
45
+ export declare const keepRecords: (strings: StringStore, archetypes: readonly Held[]) => void;
46
+ /** Stops keeping records, once no thread reads them: every one is let go. */
47
+ export declare const dropRecords: (strings: StringStore, archetypes: readonly Held[]) => void;
48
+ export {};
@@ -0,0 +1,213 @@
1
+ import { coveringBuffer } from './memory.js';
2
+ /** Code units decoded by one call of `String.fromCharCode`, which takes them as arguments. */
3
+ const decodeChunk = 4096;
4
+ const decode = (units, start, length) => {
5
+ if (length <= 8) {
6
+ let text = "";
7
+ for (let i = 0; i < length; i++)
8
+ text += String.fromCharCode(units[start + i]);
9
+ return text;
10
+ }
11
+ let text = "";
12
+ for (let at = 0; at < length; at += decodeChunk) {
13
+ const chunk = Reflect.apply(String.fromCharCode, null, units.subarray(start + at, start + Math.min(length, at + decodeChunk)));
14
+ text += chunk;
15
+ }
16
+ return text;
17
+ };
18
+ /** A record's bytes for `length` code units: its two words, then its units, rounded up to 8. */
19
+ const recordBytes = (length) => (8 + 2 * length + 7) & ~7;
20
+ /** Records at most this many bytes are carved from slabs, by power-of-two size from 16; larger ones are the arena's blocks. */
21
+ const slabbed = 512;
22
+ const slabBytes = 65536;
23
+ /** Slab size classes, 16 to 512 bytes. */
24
+ const classes = 6;
25
+ /** A slabbed record's size class: its bytes rounded up to a power of two, from 16. */
26
+ const classOf = (bytes) => Math.max(0, 28 - Math.clz32(bytes - 1));
27
+ /** Views of the whole buffer, or the same ones while they cover `bytes`; `buffer` gives one covering them. */
28
+ const cover = (views, buffer, bytes) => {
29
+ if (views.units.byteLength >= bytes)
30
+ return;
31
+ const latest = buffer(bytes);
32
+ views.words = new Uint32Array(latest);
33
+ views.units = new Uint16Array(latest);
34
+ };
35
+ const readOf = (views, buffer) => (handle) => {
36
+ const word = handle << 1;
37
+ cover(views, buffer, handle * 8 + 8);
38
+ const { words } = views;
39
+ const generation = words[word + 1];
40
+ const cached = views.cache.get(handle);
41
+ if (cached !== undefined && cached.generation === generation)
42
+ return cached.text;
43
+ const length = words[word];
44
+ cover(views, buffer, handle * 8 + 8 + 2 * length);
45
+ const text = decode(views.units, (handle << 2) + 4, length);
46
+ if (cached === undefined)
47
+ views.cache.set(handle, { generation, text });
48
+ else {
49
+ cached.generation = generation;
50
+ cached.text = text;
51
+ }
52
+ return text;
53
+ };
54
+ const unwritten = () => {
55
+ throw new Error("A string is written on the world's thread only.");
56
+ };
57
+ /** A joined thread's store over `memory`: it reads records, and writes none. */
58
+ export const createStringReader = (memory) => {
59
+ const views = { words: new Uint32Array(0), units: new Uint16Array(0), cache: new Map() };
60
+ return {
61
+ writes: false,
62
+ active: true,
63
+ read: readOf(views, bytes => coveringBuffer(memory, bytes)),
64
+ write: unwritten,
65
+ copy: unwritten,
66
+ retire: unwritten,
67
+ settle: () => { },
68
+ };
69
+ };
70
+ /** The world's store over its arena, which only the world's thread writes. */
71
+ export const createStrings = (memory) => {
72
+ const views = { words: new Uint32Array(0), units: new Uint16Array(0), cache: new Map() };
73
+ // The world's thread grows the memory itself, so its buffer covers every record.
74
+ const buffer = () => memory.memory.buffer;
75
+ const read = readOf(views, buffer);
76
+ /** By slab size class: freed handles, and the rest of the slab being carved. */
77
+ const free = Array.from({ length: classes }, () => []);
78
+ const next = new Array(classes).fill(0);
79
+ const end = new Array(classes).fill(0);
80
+ let generation = 0;
81
+ let pending = [];
82
+ let previous = [];
83
+ const allocate = (bytes) => {
84
+ if (bytes > slabbed)
85
+ return memory.allocate(bytes) >> 3;
86
+ const size = classOf(bytes);
87
+ const reused = free[size].pop();
88
+ if (reused !== undefined)
89
+ return reused;
90
+ if (next[size] === end[size]) {
91
+ const slab = memory.allocate(slabBytes);
92
+ next[size] = slab;
93
+ end[size] = slab + slabBytes;
94
+ }
95
+ // Carved by its class's size, so any record of the class fits the slot once it's freed.
96
+ const offset = next[size];
97
+ next[size] += 16 << size;
98
+ return offset >> 3;
99
+ };
100
+ /** A record of `length` units, its words written and its units left to the caller. */
101
+ const record = (length) => {
102
+ const bytes = recordBytes(length);
103
+ const handle = allocate(bytes);
104
+ cover(views, buffer, handle * 8 + bytes);
105
+ generation = (generation + 1) >>> 0;
106
+ views.words[handle << 1] = length;
107
+ views.words[(handle << 1) + 1] = generation;
108
+ return handle;
109
+ };
110
+ const release = (handle) => {
111
+ const bytes = recordBytes(views.words[handle << 1]);
112
+ if (bytes > slabbed)
113
+ memory.free(handle << 3, bytes);
114
+ else
115
+ free[classOf(bytes)].push(handle);
116
+ };
117
+ return {
118
+ writes: true,
119
+ active: false,
120
+ read,
121
+ write: text => {
122
+ const { length } = text;
123
+ const handle = record(length);
124
+ const { units } = views;
125
+ const start = (handle << 2) + 4;
126
+ for (let i = 0; i < length; i++)
127
+ units[start + i] = text.charCodeAt(i);
128
+ return handle;
129
+ },
130
+ copy: source => {
131
+ if (source === 0)
132
+ return 0;
133
+ const length = views.words[source << 1];
134
+ const handle = record(length);
135
+ const start = (source << 2) + 4;
136
+ views.units.copyWithin((handle << 2) + 4, start, start + length);
137
+ return handle;
138
+ },
139
+ retire: handle => {
140
+ if (handle !== 0)
141
+ pending.push(handle);
142
+ },
143
+ settle: () => {
144
+ if (previous.length === 0 && pending.length === 0)
145
+ return;
146
+ for (let k = 0; k < previous.length; k++)
147
+ release(previous[k]);
148
+ previous.length = 0;
149
+ const freed = previous;
150
+ previous = pending;
151
+ pending = freed;
152
+ },
153
+ };
154
+ };
155
+ /** A string column's value at `row`: as the world's thread holds it, or out of its record on another, `null` for 0. */
156
+ export const readString = (column, row) => {
157
+ const value = column.values[row];
158
+ if (value !== undefined)
159
+ return value;
160
+ const { strings } = column;
161
+ if (strings === null)
162
+ throw new Error("A string column has no records to read.");
163
+ const handle = column.views.u32[row];
164
+ return handle === 0 ? null : strings.read(handle);
165
+ };
166
+ /** Replaces a string column's value at `row`, and while records are kept, its record, letting the old one go. */
167
+ export const writeString = (column, row, value) => {
168
+ const { strings } = column;
169
+ if (strings === null || !strings.writes)
170
+ throw new Error("A string is written on the world's thread only.");
171
+ column.values[row] = value;
172
+ if (!strings.active)
173
+ return;
174
+ const handles = column.views.u32;
175
+ const old = handles[row];
176
+ handles[row] = value === null ? 0 : strings.write(typeof value === "string" ? value : String(value));
177
+ strings.retire(old);
178
+ };
179
+ /** Starts keeping records, once a thread may read them: one for each value the world holds now. */
180
+ export const keepRecords = (strings, archetypes) => {
181
+ if (strings.active)
182
+ return;
183
+ strings.active = true;
184
+ for (const archetype of archetypes) {
185
+ for (const storage of archetype.storages) {
186
+ if (storage.layout.kind !== "string")
187
+ continue;
188
+ const handles = storage.views.u32;
189
+ for (let row = 0; row < archetype.count; row++) {
190
+ const value = storage.values[row];
191
+ handles[row] = value === null || value === undefined ? 0 : strings.write(typeof value === "string" ? value : String(value));
192
+ }
193
+ }
194
+ }
195
+ };
196
+ /** Stops keeping records, once no thread reads them: every one is let go. */
197
+ export const dropRecords = (strings, archetypes) => {
198
+ if (!strings.active)
199
+ return;
200
+ strings.active = false;
201
+ for (const archetype of archetypes) {
202
+ for (const storage of archetype.storages) {
203
+ if (storage.layout.kind !== "string")
204
+ continue;
205
+ const handles = storage.views.u32;
206
+ for (let row = 0; row < archetype.count; row++) {
207
+ strings.retire(handles[row]);
208
+ handles[row] = 0;
209
+ }
210
+ }
211
+ }
212
+ };
213
+ //# sourceMappingURL=strings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strings.js","sourceRoot":"","sources":["../../../src/implementation/world/strings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAe,MAAM,aAAa,CAAC;AA8B1D,8FAA8F;AAC9F,MAAM,WAAW,GAAG,IAAI,CAAC;AAEzB,MAAM,MAAM,GAAG,CAAC,KAAkB,EAAE,KAAa,EAAE,MAAc,EAAU,EAAE;IACzE,IAAI,MAAM,IAAI,CAAC,EAAE,CAAC;QACd,IAAI,IAAI,GAAG,EAAE,CAAC;QACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE;YAAE,IAAI,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;QAC/E,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,IAAI,WAAW,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAW,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,GAAG,EAAE,EAAE,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QACvI,IAAI,IAAI,KAAK,CAAC;IAClB,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC;AAEF,gGAAgG;AAChG,MAAM,WAAW,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAE1E,+HAA+H;AAC/H,MAAM,OAAO,GA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AAC,CAAC;YAChI,CAAC;QACL,CAAC;IACL,CAAC;AACL,CAAC,CAAC;AAEF,6EAA6E;AAC7E,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,OAAoB,EAAE,UAA2B,EAAQ,EAAE;IACnF,IAAI,CAAC,OAAO,CAAC,MAAM;QAAE,OAAO;IAC5B,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC;IACvB,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACjC,KAAK,MAAM,OAAO,IAAI,SAAS,CAAC,QAAQ,EAAE,CAAC;YACvC,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,QAAQ;gBAAE,SAAS;YAC/C,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC;YAClC,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC;gBAC7C,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;gBAC7B,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACrB,CAAC;QACL,CAAC;IACL,CAAC;AACL,CAAC,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { Archetype } from './archetype.js';
2
+ import type { Holders } from './holders.js';
3
+ import { type RuleFacts, type Strata } from '../../interface/registry/strata.js';
4
+ /**
5
+ * A world's structural derivation: its rules and `within` declarations as strata, the closure each archetype maps to,
6
+ * and its references, with the holders of each target. Empty until rules, `within` or references are used, and every
7
+ * sync-point step it adds is gated on that.
8
+ */
9
+ export type Structure = {
10
+ rules: readonly RuleFacts[];
11
+ strata: Strata;
12
+ /** By component id: the host of a component declared within one, or -1. */
13
+ readonly hosts: number[];
14
+ /** By host id: the components declared within it. */
15
+ readonly dependents: number[][];
16
+ /** By component id: 0, or the kind of reference it holds (`owner`, then `weak`). */
17
+ readonly references: number[];
18
+ /** Components holding references. */
19
+ readonly referenceIds: number[];
20
+ /** By reference component id: the holders of each target. */
21
+ readonly holders: (Holders | undefined)[];
22
+ /** By archetype id: the archetype id of its closure, or -1 until computed. */
23
+ closures: number[];
24
+ /** By `from + 1` and `to` archetype ids: the derived components an entity gains moving between them. */
25
+ readonly gains: Map<number, readonly number[]>;
26
+ /** Whether the next sync point re-derives every entity, after rules were registered. */
27
+ rederive: boolean;
28
+ };
29
+ export declare const owner = 1;
30
+ export declare const weak = 2;
31
+ export declare const createStructure: () => Structure;
32
+ /** Whether the closure can differ from the archetype: some rule or `within` declaration exists. */
33
+ export declare const derives: (structure: Structure) => boolean;
34
+ /** Recomputes the strata, throwing for a cycle; on success the cached closures are dropped. */
35
+ export declare const restratify: (structure: Structure, rules: readonly RuleFacts[], hosts: readonly number[], nameOf: (id: number) => string) => void;
36
+ /** The archetype an entity with `archetype`'s components ends up in once derived. Computed once per archetype, at sync points. */
37
+ export declare const closureOf: (structure: Structure, derived: readonly boolean[], archetype: Archetype, archetypeOf: (components: readonly number[]) => Archetype, archetypes: readonly Archetype[]) => Archetype;
38
+ /** The derived components an entity gains moving from `from` (null when spawned) to `to`. */
39
+ export declare const gainsOf: (structure: Structure, derived: readonly boolean[], from: Archetype | null, to: Archetype) => readonly number[];
@@ -0,0 +1,39 @@
1
+ import { strataOf } from '../../interface/registry/strata.js';
2
+ import { closedComponents } from './closure.js';
3
+ export const owner = 1;
4
+ export const weak = 2;
5
+ export const createStructure = () => ({
6
+ rules: [], strata: [], hosts: [], dependents: [], references: [], referenceIds: [], holders: [], closures: [], gains: new Map(), rederive: false,
7
+ });
8
+ /** Whether the closure can differ from the archetype: some rule or `within` declaration exists. */
9
+ export const derives = (structure) => structure.strata.length > 0;
10
+ /** Recomputes the strata, throwing for a cycle; on success the cached closures are dropped. */
11
+ export const restratify = (structure, rules, hosts, nameOf) => {
12
+ const strata = strataOf(rules, hosts, nameOf);
13
+ structure.rules = rules;
14
+ structure.strata = strata;
15
+ structure.closures = [];
16
+ structure.gains.clear();
17
+ };
18
+ /** The archetype an entity with `archetype`'s components ends up in once derived. Computed once per archetype, at sync points. */
19
+ export const closureOf = (structure, derived, archetype, archetypeOf, archetypes) => {
20
+ if (archetype.resource || structure.strata.length === 0)
21
+ return archetype;
22
+ const cached = structure.closures[archetype.id] ?? -1;
23
+ if (cached >= 0)
24
+ return archetypes[cached];
25
+ const closed = archetypeOf(closedComponents(archetype.components, derived, structure.hosts, structure.strata));
26
+ structure.closures[archetype.id] = closed.id;
27
+ return closed;
28
+ };
29
+ /** The derived components an entity gains moving from `from` (null when spawned) to `to`. */
30
+ export const gainsOf = (structure, derived, from, to) => {
31
+ const key = ((from?.id ?? -1) + 1) * 0x200000 + to.id;
32
+ let gains = structure.gains.get(key);
33
+ if (gains === undefined) {
34
+ gains = to.components.filter(id => derived[id] === true && from?.storageById[id] === undefined);
35
+ structure.gains.set(key, gains);
36
+ }
37
+ return gains;
38
+ };
39
+ //# sourceMappingURL=structure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structure.js","sourceRoot":"","sources":["../../../src/implementation/world/structure.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAA+B,MAAM,oCAAoC,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AA4BhD,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC;AACvB,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC;AAEtB,MAAM,CAAC,MAAM,eAAe,GAAG,GAAc,EAAE,CAAC,CAAC;IAC7C,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,GAAG,EAAE,EAAE,QAAQ,EAAE,KAAK;CACnJ,CAAC,CAAC;AAEH,mGAAm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