@woosh/meep-engine 3.8.0 → 3.10.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 (735) hide show
  1. package/build/bundle-worker-image-decoder.js +1 -1
  2. package/build/bundle-worker-terrain.js +1 -1
  3. package/package.json +3 -2
  4. package/src/avif/encode_image_source.d.ts +70 -0
  5. package/src/avif/encode_image_source.d.ts.map +1 -0
  6. package/src/avif/encode_image_source.js +117 -0
  7. package/src/avif/encoder_worker.js +15 -126
  8. package/src/avif/index.d.ts +4 -2
  9. package/src/avif/index.js +21 -2
  10. package/src/avif/native/DECISIONS.md +537 -0
  11. package/src/avif/native/NOTICE.md +61 -0
  12. package/src/avif/native/api/AvifDecoder.d.ts +67 -0
  13. package/src/avif/native/api/AvifDecoder.d.ts.map +1 -0
  14. package/src/avif/native/api/AvifDecoder.js +121 -0
  15. package/src/avif/native/api/apply_transformations.d.ts +30 -0
  16. package/src/avif/native/api/apply_transformations.d.ts.map +1 -0
  17. package/src/avif/native/api/apply_transformations.js +120 -0
  18. package/src/avif/native/api/avif_to_sampler2d.d.ts +25 -0
  19. package/src/avif/native/api/avif_to_sampler2d.d.ts.map +1 -0
  20. package/src/avif/native/api/avif_to_sampler2d.js +42 -0
  21. package/src/avif/native/api/convert_to_rgba.d.ts +54 -0
  22. package/src/avif/native/api/convert_to_rgba.d.ts.map +1 -0
  23. package/src/avif/native/api/convert_to_rgba.js +204 -0
  24. package/src/avif/native/api/decode_avif.d.ts +24 -0
  25. package/src/avif/native/api/decode_avif.d.ts.map +1 -0
  26. package/src/avif/native/api/decode_avif.js +111 -0
  27. package/src/avif/native/api/decode_image_item.d.ts +18 -0
  28. package/src/avif/native/api/decode_image_item.d.ts.map +1 -0
  29. package/src/avif/native/api/decode_image_item.js +234 -0
  30. package/src/avif/native/api/encode_avif.d.ts +73 -0
  31. package/src/avif/native/api/encode_avif.d.ts.map +1 -0
  32. package/src/avif/native/api/encode_avif.js +488 -0
  33. package/src/avif/native/api/sampler2d_to_avif.d.ts +22 -0
  34. package/src/avif/native/api/sampler2d_to_avif.d.ts.map +1 -0
  35. package/src/avif/native/api/sampler2d_to_avif.js +108 -0
  36. package/src/avif/native/av1/decode/Av1FrameContext.d.ts +286 -0
  37. package/src/avif/native/av1/decode/Av1FrameContext.d.ts.map +1 -0
  38. package/src/avif/native/av1/decode/Av1FrameContext.js +622 -0
  39. package/src/avif/native/av1/decode/block_decoded.d.ts +27 -0
  40. package/src/avif/native/av1/decode/block_decoded.d.ts.map +1 -0
  41. package/src/avif/native/av1/decode/block_decoded.js +59 -0
  42. package/src/avif/native/av1/decode/decode_av1_still.d.ts +22 -0
  43. package/src/avif/native/av1/decode/decode_av1_still.d.ts.map +1 -0
  44. package/src/avif/native/av1/decode/decode_av1_still.js +309 -0
  45. package/src/avif/native/av1/decode/decode_coefficients.d.ts +20 -0
  46. package/src/avif/native/av1/decode/decode_coefficients.d.ts.map +1 -0
  47. package/src/avif/native/av1/decode/decode_coefficients.js +259 -0
  48. package/src/avif/native/av1/decode/decode_palette.d.ts +28 -0
  49. package/src/avif/native/av1/decode/decode_palette.d.ts.map +1 -0
  50. package/src/avif/native/av1/decode/decode_palette.js +442 -0
  51. package/src/avif/native/av1/decode/decode_tile.d.ts +14 -0
  52. package/src/avif/native/av1/decode/decode_tile.d.ts.map +1 -0
  53. package/src/avif/native/av1/decode/decode_tile.js +1213 -0
  54. package/src/avif/native/av1/decode/get_scan.d.ts +16 -0
  55. package/src/avif/native/av1/decode/get_scan.d.ts.map +1 -0
  56. package/src/avif/native/av1/decode/get_scan.js +138 -0
  57. package/src/avif/native/av1/decode/read_lr.d.ts +35 -0
  58. package/src/avif/native/av1/decode/read_lr.d.ts.map +1 -0
  59. package/src/avif/native/av1/decode/read_lr.js +277 -0
  60. package/src/avif/native/av1/decode/read_transform_type.d.ts +19 -0
  61. package/src/avif/native/av1/decode/read_transform_type.d.ts.map +1 -0
  62. package/src/avif/native/av1/decode/read_transform_type.js +92 -0
  63. package/src/avif/native/av1/decode/reconstruct.d.ts +36 -0
  64. package/src/avif/native/av1/decode/reconstruct.d.ts.map +1 -0
  65. package/src/avif/native/av1/decode/reconstruct.js +241 -0
  66. package/src/avif/native/av1/decode/transform_type.d.ts +49 -0
  67. package/src/avif/native/av1/decode/transform_type.d.ts.map +1 -0
  68. package/src/avif/native/av1/decode/transform_type.js +137 -0
  69. package/src/avif/native/av1/encode/Av1BlockSnapshot.d.ts +81 -0
  70. package/src/avif/native/av1/encode/Av1BlockSnapshot.d.ts.map +1 -0
  71. package/src/avif/native/av1/encode/Av1BlockSnapshot.js +299 -0
  72. package/src/avif/native/av1/encode/Av1EncodeContext.d.ts +384 -0
  73. package/src/avif/native/av1/encode/Av1EncodeContext.d.ts.map +1 -0
  74. package/src/avif/native/av1/encode/Av1EncodeContext.js +590 -0
  75. package/src/avif/native/av1/encode/build_headers.d.ts +50 -0
  76. package/src/avif/native/av1/encode/build_headers.d.ts.map +1 -0
  77. package/src/avif/native/av1/encode/build_headers.js +359 -0
  78. package/src/avif/native/av1/encode/choose_chroma_alpha.d.ts +26 -0
  79. package/src/avif/native/av1/encode/choose_chroma_alpha.d.ts.map +1 -0
  80. package/src/avif/native/av1/encode/choose_chroma_alpha.js +90 -0
  81. package/src/avif/native/av1/encode/choose_filters.d.ts +21 -0
  82. package/src/avif/native/av1/encode/choose_filters.d.ts.map +1 -0
  83. package/src/avif/native/av1/encode/choose_filters.js +318 -0
  84. package/src/avif/native/av1/encode/choose_restoration.d.ts +35 -0
  85. package/src/avif/native/av1/encode/choose_restoration.d.ts.map +1 -0
  86. package/src/avif/native/av1/encode/choose_restoration.js +616 -0
  87. package/src/avif/native/av1/encode/decode_effort.d.ts +57 -0
  88. package/src/avif/native/av1/encode/decode_effort.d.ts.map +1 -0
  89. package/src/avif/native/av1/encode/decode_effort.js +59 -0
  90. package/src/avif/native/av1/encode/encode_av1_still.d.ts +17 -0
  91. package/src/avif/native/av1/encode/encode_av1_still.d.ts.map +1 -0
  92. package/src/avif/native/av1/encode/encode_av1_still.js +194 -0
  93. package/src/avif/native/av1/encode/encode_effort.d.ts +56 -0
  94. package/src/avif/native/av1/encode/encode_effort.d.ts.map +1 -0
  95. package/src/avif/native/av1/encode/encode_effort.js +97 -0
  96. package/src/avif/native/av1/encode/encode_tile.d.ts +26 -0
  97. package/src/avif/native/av1/encode/encode_tile.d.ts.map +1 -0
  98. package/src/avif/native/av1/encode/encode_tile.js +2331 -0
  99. package/src/avif/native/av1/encode/quantise.d.ts +51 -0
  100. package/src/avif/native/av1/encode/quantise.d.ts.map +1 -0
  101. package/src/avif/native/av1/encode/quantise.js +212 -0
  102. package/src/avif/native/av1/encode/write_coefficients.d.ts +42 -0
  103. package/src/avif/native/av1/encode/write_coefficients.d.ts.map +1 -0
  104. package/src/avif/native/av1/encode/write_coefficients.js +367 -0
  105. package/src/avif/native/av1/encode/write_lr.d.ts +33 -0
  106. package/src/avif/native/av1/encode/write_lr.d.ts.map +1 -0
  107. package/src/avif/native/av1/encode/write_lr.js +174 -0
  108. package/src/avif/native/av1/encode/write_transform_type.d.ts +21 -0
  109. package/src/avif/native/av1/encode/write_transform_type.d.ts.map +1 -0
  110. package/src/avif/native/av1/encode/write_transform_type.js +70 -0
  111. package/src/avif/native/av1/entropy/CdfContext.d.ts +167 -0
  112. package/src/avif/native/av1/entropy/CdfContext.d.ts.map +1 -0
  113. package/src/avif/native/av1/entropy/CdfContext.js +433 -0
  114. package/src/avif/native/av1/entropy/SymbolReader.d.ts +103 -0
  115. package/src/avif/native/av1/entropy/SymbolReader.d.ts.map +1 -0
  116. package/src/avif/native/av1/entropy/SymbolReader.js +317 -0
  117. package/src/avif/native/av1/entropy/SymbolWriter.d.ts +107 -0
  118. package/src/avif/native/av1/entropy/SymbolWriter.d.ts.map +1 -0
  119. package/src/avif/native/av1/entropy/SymbolWriter.js +352 -0
  120. package/src/avif/native/av1/entropy/coefficient_context.d.ts +71 -0
  121. package/src/avif/native/av1/entropy/coefficient_context.d.ts.map +1 -0
  122. package/src/avif/native/av1/entropy/coefficient_context.js +325 -0
  123. package/src/avif/native/av1/entropy/partition_cdf.d.ts +54 -0
  124. package/src/avif/native/av1/entropy/partition_cdf.d.ts.map +1 -0
  125. package/src/avif/native/av1/entropy/partition_cdf.js +98 -0
  126. package/src/avif/native/av1/entropy/symbol_cost.d.ts +37 -0
  127. package/src/avif/native/av1/entropy/symbol_cost.d.ts.map +1 -0
  128. package/src/avif/native/av1/entropy/symbol_cost.js +76 -0
  129. package/src/avif/native/av1/filter/cdef.d.ts +15 -0
  130. package/src/avif/native/av1/filter/cdef.d.ts.map +1 -0
  131. package/src/avif/native/av1/filter/cdef.js +313 -0
  132. package/src/avif/native/av1/filter/loop_filter.d.ts +14 -0
  133. package/src/avif/native/av1/filter/loop_filter.d.ts.map +1 -0
  134. package/src/avif/native/av1/filter/loop_filter.js +377 -0
  135. package/src/avif/native/av1/filter/loop_restoration.d.ts +42 -0
  136. package/src/avif/native/av1/filter/loop_restoration.d.ts.map +1 -0
  137. package/src/avif/native/av1/filter/loop_restoration.js +451 -0
  138. package/src/avif/native/av1/filter/superres.d.ts +18 -0
  139. package/src/avif/native/av1/filter/superres.d.ts.map +1 -0
  140. package/src/avif/native/av1/filter/superres.js +86 -0
  141. package/src/avif/native/av1/grain/FilmGrainState.d.ts +62 -0
  142. package/src/avif/native/av1/grain/FilmGrainState.d.ts.map +1 -0
  143. package/src/avif/native/av1/grain/FilmGrainState.js +87 -0
  144. package/src/avif/native/av1/grain/film_grain.d.ts +16 -0
  145. package/src/avif/native/av1/grain/film_grain.d.ts.map +1 -0
  146. package/src/avif/native/av1/grain/film_grain.js +623 -0
  147. package/src/avif/native/av1/obu/FrameHeader.d.ts +248 -0
  148. package/src/avif/native/av1/obu/FrameHeader.d.ts.map +1 -0
  149. package/src/avif/native/av1/obu/FrameHeader.js +381 -0
  150. package/src/avif/native/av1/obu/ObuHeader.d.ts +53 -0
  151. package/src/avif/native/av1/obu/ObuHeader.d.ts.map +1 -0
  152. package/src/avif/native/av1/obu/ObuHeader.js +62 -0
  153. package/src/avif/native/av1/obu/SequenceHeader.d.ts +157 -0
  154. package/src/avif/native/av1/obu/SequenceHeader.d.ts.map +1 -0
  155. package/src/avif/native/av1/obu/SequenceHeader.js +225 -0
  156. package/src/avif/native/av1/obu/for_each_obu.d.ts +24 -0
  157. package/src/avif/native/av1/obu/for_each_obu.d.ts.map +1 -0
  158. package/src/avif/native/av1/obu/for_each_obu.js +50 -0
  159. package/src/avif/native/av1/obu/parse_frame_header.d.ts +18 -0
  160. package/src/avif/native/av1/obu/parse_frame_header.d.ts.map +1 -0
  161. package/src/avif/native/av1/obu/parse_frame_header.js +841 -0
  162. package/src/avif/native/av1/obu/parse_obu_header.d.ts +23 -0
  163. package/src/avif/native/av1/obu/parse_obu_header.d.ts.map +1 -0
  164. package/src/avif/native/av1/obu/parse_obu_header.js +69 -0
  165. package/src/avif/native/av1/obu/parse_sequence_header.d.ts +17 -0
  166. package/src/avif/native/av1/obu/parse_sequence_header.d.ts.map +1 -0
  167. package/src/avif/native/av1/obu/parse_sequence_header.js +263 -0
  168. package/src/avif/native/av1/obu/write_frame_header.d.ts +16 -0
  169. package/src/avif/native/av1/obu/write_frame_header.d.ts.map +1 -0
  170. package/src/avif/native/av1/obu/write_frame_header.js +579 -0
  171. package/src/avif/native/av1/obu/write_sequence_header.d.ts +17 -0
  172. package/src/avif/native/av1/obu/write_sequence_header.d.ts.map +1 -0
  173. package/src/avif/native/av1/obu/write_sequence_header.js +189 -0
  174. package/src/avif/native/av1/predict/IntraPredictionState.d.ts +49 -0
  175. package/src/avif/native/av1/predict/IntraPredictionState.d.ts.map +1 -0
  176. package/src/avif/native/av1/predict/IntraPredictionState.js +58 -0
  177. package/src/avif/native/av1/predict/intra_filter_type.d.ts +17 -0
  178. package/src/avif/native/av1/predict/intra_filter_type.d.ts.map +1 -0
  179. package/src/avif/native/av1/predict/intra_filter_type.js +79 -0
  180. package/src/avif/native/av1/predict/predict_chroma_from_luma.d.ts +50 -0
  181. package/src/avif/native/av1/predict/predict_chroma_from_luma.d.ts.map +1 -0
  182. package/src/avif/native/av1/predict/predict_chroma_from_luma.js +153 -0
  183. package/src/avif/native/av1/predict/predict_intra.d.ts +42 -0
  184. package/src/avif/native/av1/predict/predict_intra.d.ts.map +1 -0
  185. package/src/avif/native/av1/predict/predict_intra.js +803 -0
  186. package/src/avif/native/av1/predict/predict_palette.d.ts +23 -0
  187. package/src/avif/native/av1/predict/predict_palette.d.ts.map +1 -0
  188. package/src/avif/native/av1/predict/predict_palette.js +36 -0
  189. package/src/avif/native/av1/tables/av1_symbols.d.ts +411 -0
  190. package/src/avif/native/av1/tables/av1_symbols.d.ts.map +1 -0
  191. package/src/avif/native/av1/tables/av1_symbols.js +419 -0
  192. package/src/avif/native/av1/tables/block_tables.d.ts +181 -0
  193. package/src/avif/native/av1/tables/block_tables.d.ts.map +1 -0
  194. package/src/avif/native/av1/tables/block_tables.js +270 -0
  195. package/src/avif/native/av1/tables/cdf_tables.d.ts +961 -0
  196. package/src/avif/native/av1/tables/cdf_tables.d.ts.map +1 -0
  197. package/src/avif/native/av1/tables/cdf_tables.js +1893 -0
  198. package/src/avif/native/av1/tables/coefficient_tables.d.ts +41 -0
  199. package/src/avif/native/av1/tables/coefficient_tables.d.ts.map +1 -0
  200. package/src/avif/native/av1/tables/coefficient_tables.js +82 -0
  201. package/src/avif/native/av1/tables/derived_block_tables.d.ts +15 -0
  202. package/src/avif/native/av1/tables/derived_block_tables.d.ts.map +1 -0
  203. package/src/avif/native/av1/tables/derived_block_tables.js +23 -0
  204. package/src/avif/native/av1/tables/filter_tables.d.ts +171 -0
  205. package/src/avif/native/av1/tables/filter_tables.d.ts.map +1 -0
  206. package/src/avif/native/av1/tables/filter_tables.js +313 -0
  207. package/src/avif/native/av1/tables/grain_tables.d.ts +11 -0
  208. package/src/avif/native/av1/tables/grain_tables.d.ts.map +1 -0
  209. package/src/avif/native/av1/tables/grain_tables.js +190 -0
  210. package/src/avif/native/av1/tables/prediction_tables.d.ts +141 -0
  211. package/src/avif/native/av1/tables/prediction_tables.d.ts.map +1 -0
  212. package/src/avif/native/av1/tables/prediction_tables.js +223 -0
  213. package/src/avif/native/av1/tables/quantizer_matrix_tables.d.ts +21 -0
  214. package/src/avif/native/av1/tables/quantizer_matrix_tables.d.ts.map +1 -0
  215. package/src/avif/native/av1/tables/quantizer_matrix_tables.js +38 -0
  216. package/src/avif/native/av1/tables/quantizer_tables.d.ts +21 -0
  217. package/src/avif/native/av1/tables/quantizer_tables.d.ts.map +1 -0
  218. package/src/avif/native/av1/tables/quantizer_tables.js +160 -0
  219. package/src/avif/native/av1/tables/scan_tables.d.ts +321 -0
  220. package/src/avif/native/av1/tables/scan_tables.d.ts.map +1 -0
  221. package/src/avif/native/av1/tables/scan_tables.js +727 -0
  222. package/src/avif/native/av1/tables/segmentation_tables.d.ts +31 -0
  223. package/src/avif/native/av1/tables/segmentation_tables.d.ts.map +1 -0
  224. package/src/avif/native/av1/tables/segmentation_tables.js +48 -0
  225. package/src/avif/native/av1/tables/transform_tables.d.ts +91 -0
  226. package/src/avif/native/av1/tables/transform_tables.d.ts.map +1 -0
  227. package/src/avif/native/av1/tables/transform_tables.js +140 -0
  228. package/src/avif/native/av1/tables/unpack_table.d.ts +33 -0
  229. package/src/avif/native/av1/tables/unpack_table.d.ts.map +1 -0
  230. package/src/avif/native/av1/tables/unpack_table.js +73 -0
  231. package/src/avif/native/av1/transform/forward_transform_2d.d.ts +61 -0
  232. package/src/avif/native/av1/transform/forward_transform_2d.d.ts.map +1 -0
  233. package/src/avif/native/av1/transform/forward_transform_2d.js +574 -0
  234. package/src/avif/native/av1/transform/inverse_transform_1d.d.ts +76 -0
  235. package/src/avif/native/av1/transform/inverse_transform_1d.d.ts.map +1 -0
  236. package/src/avif/native/av1/transform/inverse_transform_1d.js +590 -0
  237. package/src/avif/native/av1/transform/inverse_transform_2d.d.ts +46 -0
  238. package/src/avif/native/av1/transform/inverse_transform_2d.d.ts.map +1 -0
  239. package/src/avif/native/av1/transform/inverse_transform_2d.js +180 -0
  240. package/src/avif/native/av1/util/ceil_log2.d.ts +13 -0
  241. package/src/avif/native/av1/util/ceil_log2.d.ts.map +1 -0
  242. package/src/avif/native/av1/util/ceil_log2.js +18 -0
  243. package/src/avif/native/av1/util/floor_log2.d.ts +20 -0
  244. package/src/avif/native/av1/util/floor_log2.d.ts.map +1 -0
  245. package/src/avif/native/av1/util/floor_log2.js +20 -0
  246. package/src/avif/native/av1/util/round2.d.ts +22 -0
  247. package/src/avif/native/av1/util/round2.d.ts.map +1 -0
  248. package/src/avif/native/av1/util/round2.js +27 -0
  249. package/src/avif/native/av1/util/round2_signed.d.ts +14 -0
  250. package/src/avif/native/av1/util/round2_signed.d.ts.map +1 -0
  251. package/src/avif/native/av1/util/round2_signed.js +17 -0
  252. package/src/avif/native/av1/util/tile_log2.d.ts +16 -0
  253. package/src/avif/native/av1/util/tile_log2.d.ts.map +1 -0
  254. package/src/avif/native/av1/util/tile_log2.js +23 -0
  255. package/src/avif/native/bitstream/BitReader.d.ts +174 -0
  256. package/src/avif/native/bitstream/BitReader.d.ts.map +1 -0
  257. package/src/avif/native/bitstream/BitReader.js +391 -0
  258. package/src/avif/native/bitstream/BitWriter.d.ts +122 -0
  259. package/src/avif/native/bitstream/BitWriter.d.ts.map +1 -0
  260. package/src/avif/native/bitstream/BitWriter.js +351 -0
  261. package/src/avif/native/color/ColourTransform.d.ts +62 -0
  262. package/src/avif/native/color/ColourTransform.d.ts.map +1 -0
  263. package/src/avif/native/color/ColourTransform.js +189 -0
  264. package/src/avif/native/color/YuvImage.d.ts +51 -0
  265. package/src/avif/native/color/YuvImage.d.ts.map +1 -0
  266. package/src/avif/native/color/YuvImage.js +66 -0
  267. package/src/avif/native/color/clamp_sample.d.ts +18 -0
  268. package/src/avif/native/color/clamp_sample.d.ts.map +1 -0
  269. package/src/avif/native/color/clamp_sample.js +25 -0
  270. package/src/avif/native/color/linear_to_transfer.d.ts +24 -0
  271. package/src/avif/native/color/linear_to_transfer.d.ts.map +1 -0
  272. package/src/avif/native/color/linear_to_transfer.js +126 -0
  273. package/src/avif/native/color/primaries.d.ts +20 -0
  274. package/src/avif/native/color/primaries.d.ts.map +1 -0
  275. package/src/avif/native/color/primaries.js +94 -0
  276. package/src/avif/native/color/rgb_row_to_ycbcr.d.ts +20 -0
  277. package/src/avif/native/color/rgb_row_to_ycbcr.d.ts.map +1 -0
  278. package/src/avif/native/color/rgb_row_to_ycbcr.js +78 -0
  279. package/src/avif/native/color/transfer_to_linear.d.ts +49 -0
  280. package/src/avif/native/color/transfer_to_linear.d.ts.map +1 -0
  281. package/src/avif/native/color/transfer_to_linear.js +171 -0
  282. package/src/avif/native/color/upsample_chroma_row.d.ts +35 -0
  283. package/src/avif/native/color/upsample_chroma_row.d.ts.map +1 -0
  284. package/src/avif/native/color/upsample_chroma_row.js +89 -0
  285. package/src/avif/native/color/ycbcr_row_to_rgb.d.ts +23 -0
  286. package/src/avif/native/color/ycbcr_row_to_rgb.d.ts.map +1 -0
  287. package/src/avif/native/color/ycbcr_row_to_rgb.js +78 -0
  288. package/src/avif/native/heif/AvifFile.d.ts +112 -0
  289. package/src/avif/native/heif/AvifFile.d.ts.map +1 -0
  290. package/src/avif/native/heif/AvifFile.js +142 -0
  291. package/src/avif/native/heif/ItemProperty.d.ts +244 -0
  292. package/src/avif/native/heif/ItemProperty.d.ts.map +1 -0
  293. package/src/avif/native/heif/ItemProperty.js +321 -0
  294. package/src/avif/native/heif/find_item_property.d.ts +17 -0
  295. package/src/avif/native/heif/find_item_property.d.ts.map +1 -0
  296. package/src/avif/native/heif/find_item_property.js +28 -0
  297. package/src/avif/native/heif/find_item_references.d.ts +16 -0
  298. package/src/avif/native/heif/find_item_references.d.ts.map +1 -0
  299. package/src/avif/native/heif/find_item_references.js +29 -0
  300. package/src/avif/native/heif/find_items_referencing.d.ts +17 -0
  301. package/src/avif/native/heif/find_items_referencing.d.ts.map +1 -0
  302. package/src/avif/native/heif/find_items_referencing.js +36 -0
  303. package/src/avif/native/heif/parse_avif_file.d.ts +15 -0
  304. package/src/avif/native/heif/parse_avif_file.d.ts.map +1 -0
  305. package/src/avif/native/heif/parse_avif_file.js +383 -0
  306. package/src/avif/native/heif/parse_image_grid.d.ts +18 -0
  307. package/src/avif/native/heif/parse_image_grid.d.ts.map +1 -0
  308. package/src/avif/native/heif/parse_image_grid.js +48 -0
  309. package/src/avif/native/heif/parse_item_property.d.ts +18 -0
  310. package/src/avif/native/heif/parse_item_property.d.ts.map +1 -0
  311. package/src/avif/native/heif/parse_item_property.js +243 -0
  312. package/src/avif/native/heif/read_item_data.d.ts +22 -0
  313. package/src/avif/native/heif/read_item_data.d.ts.map +1 -0
  314. package/src/avif/native/heif/read_item_data.js +97 -0
  315. package/src/avif/native/heif/write_avif_file.d.ts +50 -0
  316. package/src/avif/native/heif/write_avif_file.d.ts.map +1 -0
  317. package/src/avif/native/heif/write_avif_file.js +348 -0
  318. package/src/avif/native/heif/write_item_property.d.ts +16 -0
  319. package/src/avif/native/heif/write_item_property.d.ts.map +1 -0
  320. package/src/avif/native/heif/write_item_property.js +182 -0
  321. package/src/avif/native/index.d.ts +14 -0
  322. package/src/avif/native/index.d.ts.map +1 -0
  323. package/src/avif/native/index.js +56 -0
  324. package/src/avif/native/isobmff/BoxHeader.d.ts +50 -0
  325. package/src/avif/native/isobmff/BoxHeader.d.ts.map +1 -0
  326. package/src/avif/native/isobmff/BoxHeader.js +57 -0
  327. package/src/avif/native/isobmff/BoxWriter.d.ts +118 -0
  328. package/src/avif/native/isobmff/BoxWriter.d.ts.map +1 -0
  329. package/src/avif/native/isobmff/BoxWriter.js +264 -0
  330. package/src/avif/native/isobmff/ByteCursor.d.ts +125 -0
  331. package/src/avif/native/isobmff/ByteCursor.d.ts.map +1 -0
  332. package/src/avif/native/isobmff/ByteCursor.js +298 -0
  333. package/src/avif/native/isobmff/for_each_box.d.ts +23 -0
  334. package/src/avif/native/isobmff/for_each_box.d.ts.map +1 -0
  335. package/src/avif/native/isobmff/for_each_box.js +39 -0
  336. package/src/avif/native/isobmff/read_box_header.d.ts +22 -0
  337. package/src/avif/native/isobmff/read_box_header.d.ts.map +1 -0
  338. package/src/avif/native/isobmff/read_box_header.js +59 -0
  339. package/src/avif/native/isobmff/read_full_box_header.d.ts +26 -0
  340. package/src/avif/native/isobmff/read_full_box_header.d.ts.map +1 -0
  341. package/src/avif/native/isobmff/read_full_box_header.js +33 -0
  342. package/src/avif/threaded_image_encoder.d.ts +7 -2
  343. package/src/avif/threaded_image_encoder.d.ts.map +1 -1
  344. package/src/avif/threaded_image_encoder.js +107 -21
  345. package/src/core/binary/BinaryBuffer.d.ts +40 -0
  346. package/src/core/binary/BinaryBuffer.d.ts.map +1 -1
  347. package/src/core/binary/BinaryBuffer.js +100 -0
  348. package/src/core/binary/hash/crc32.d.ts +16 -0
  349. package/src/core/binary/hash/crc32.d.ts.map +1 -0
  350. package/src/core/binary/hash/crc32.js +96 -0
  351. package/src/core/binary/utf8/utf8_decode.d.ts +21 -0
  352. package/src/core/binary/utf8/utf8_decode.d.ts.map +1 -0
  353. package/src/core/binary/utf8/utf8_decode.js +43 -0
  354. package/src/core/binary/utf8/utf8_encode_into.d.ts +20 -0
  355. package/src/core/binary/utf8/utf8_encode_into.d.ts.map +1 -0
  356. package/src/core/binary/utf8/utf8_encode_into.js +48 -0
  357. package/src/core/binary/utf8/utf8_encoded_length.d.ts +14 -0
  358. package/src/core/binary/utf8/utf8_encoded_length.d.ts.map +1 -0
  359. package/src/core/binary/utf8/utf8_encoded_length.js +36 -0
  360. package/src/core/color/COLOR_FIX_PLAN_2026_08_28.md +417 -0
  361. package/src/core/color/COLOR_REVIEW_2026_08_28.md +779 -0
  362. package/src/core/color/Color.d.ts +128 -20
  363. package/src/core/color/Color.d.ts.map +1 -1
  364. package/src/core/color/Color.js +959 -866
  365. package/src/core/color/PQ/PQ_constants.d.ts +10 -0
  366. package/src/core/color/PQ/PQ_constants.d.ts.map +1 -1
  367. package/src/core/color/PQ/PQ_constants.js +10 -0
  368. package/src/core/color/PQ/linear_to_PQ.d.ts.map +1 -1
  369. package/src/core/color/PQ/linear_to_PQ.js +6 -0
  370. package/src/core/color/REC709_PRIMARIES.d.ts +50 -0
  371. package/src/core/color/REC709_PRIMARIES.d.ts.map +1 -0
  372. package/src/core/color/REC709_PRIMARIES.js +53 -0
  373. package/src/core/color/construct/color_from_hex.d.ts +21 -0
  374. package/src/core/color/construct/color_from_hex.d.ts.map +1 -0
  375. package/src/core/color/construct/color_from_hex.js +33 -0
  376. package/src/core/color/construct/color_from_temperature.d.ts +22 -0
  377. package/src/core/color/construct/color_from_temperature.d.ts.map +1 -0
  378. package/src/core/color/construct/color_from_temperature.js +33 -0
  379. package/src/core/color/construct/color_from_uint24.d.ts +19 -0
  380. package/src/core/color/construct/color_from_uint24.d.ts.map +1 -0
  381. package/src/core/color/construct/color_from_uint24.js +26 -0
  382. package/src/core/color/construct/color_from_uint32.d.ts +20 -0
  383. package/src/core/color/construct/color_from_uint32.d.ts.map +1 -0
  384. package/src/core/color/construct/color_from_uint32.js +39 -0
  385. package/src/core/color/construct/color_gray.d.ts +17 -0
  386. package/src/core/color/construct/color_gray.d.ts.map +1 -0
  387. package/src/core/color/construct/color_gray.js +22 -0
  388. package/src/core/color/hex/hex2rgb.d.ts +1 -11
  389. package/src/core/color/hex/hex2rgb.d.ts.map +1 -1
  390. package/src/core/color/hex/hex2rgb.js +7 -24
  391. package/src/core/color/hex/hex_to_rgb.d.ts +18 -0
  392. package/src/core/color/hex/hex_to_rgb.d.ts.map +1 -0
  393. package/src/core/color/hex/hex_to_rgb.js +62 -0
  394. package/src/core/color/hex/rgb2hex.d.ts +1 -8
  395. package/src/core/color/hex/rgb2hex.d.ts.map +1 -1
  396. package/src/core/color/hex/rgb2hex.js +7 -13
  397. package/src/core/color/hex/rgb_to_hex.d.ts +9 -0
  398. package/src/core/color/hex/rgb_to_hex.d.ts.map +1 -0
  399. package/src/core/color/hex/rgb_to_hex.js +13 -0
  400. package/src/core/color/hex/rgba_to_hex.d.ts +19 -0
  401. package/src/core/color/hex/rgba_to_hex.d.ts.map +1 -0
  402. package/src/core/color/hex/rgba_to_hex.js +23 -0
  403. package/src/core/color/hsv/hsv2rgb.d.ts +1 -12
  404. package/src/core/color/hsv/hsv2rgb.d.ts.map +1 -1
  405. package/src/core/color/hsv/hsv2rgb.js +8 -21
  406. package/src/core/color/hsv/hsv2rgb_float.d.ts +1 -12
  407. package/src/core/color/hsv/hsv2rgb_float.d.ts.map +1 -1
  408. package/src/core/color/hsv/hsv2rgb_float.js +8 -56
  409. package/src/core/color/hsv/hsv_to_rgb.d.ts +13 -0
  410. package/src/core/color/hsv/hsv_to_rgb.d.ts.map +1 -0
  411. package/src/core/color/hsv/hsv_to_rgb.js +39 -0
  412. package/src/core/color/hsv/hsv_to_rgb_uint8.d.ts +13 -0
  413. package/src/core/color/hsv/hsv_to_rgb_uint8.d.ts.map +1 -0
  414. package/src/core/color/hsv/hsv_to_rgb_uint8.js +21 -0
  415. package/src/core/color/hsv/hue_to_rgb_sextant.d.ts +24 -0
  416. package/src/core/color/hsv/hue_to_rgb_sextant.d.ts.map +1 -0
  417. package/src/core/color/hsv/hue_to_rgb_sextant.js +67 -0
  418. package/src/core/color/hsv/rgb2hsv.d.ts +1 -12
  419. package/src/core/color/hsv/rgb2hsv.d.ts.map +1 -1
  420. package/src/core/color/hsv/rgb2hsv.js +7 -42
  421. package/src/core/color/hsv/rgb_to_hsv.d.ts +13 -0
  422. package/src/core/color/hsv/rgb_to_hsv.d.ts.map +1 -0
  423. package/src/core/color/hsv/rgb_to_hsv.js +42 -0
  424. package/src/core/color/hunt/hpe_to_xyz.d.ts +2 -0
  425. package/src/core/color/hunt/hpe_to_xyz.d.ts.map +1 -0
  426. package/src/core/color/hunt/hpe_to_xyz.js +4 -0
  427. package/src/core/color/hunt/xyz_to_hpe.d.ts +1 -6
  428. package/src/core/color/hunt/xyz_to_hpe.d.ts.map +1 -1
  429. package/src/core/color/hunt/xyz_to_hpe.js +12 -15
  430. package/src/core/color/illuminant/D65_spd_tabulated.d.ts.map +1 -1
  431. package/src/core/color/illuminant/D65_spd_tabulated.js +107 -104
  432. package/src/core/color/int2rgb.d.ts +1 -10
  433. package/src/core/color/int2rgb.d.ts.map +1 -1
  434. package/src/core/color/int2rgb.js +7 -12
  435. package/src/core/color/int_to_rgb.d.ts +21 -0
  436. package/src/core/color/int_to_rgb.d.ts.map +1 -0
  437. package/src/core/color/int_to_rgb.js +33 -0
  438. package/src/core/color/kelvin/kelvin_to_rgb.d.ts.map +1 -1
  439. package/src/core/color/kelvin/kelvin_to_rgb.js +22 -2
  440. package/src/core/color/kelvin/rgb_to_kelvin.d.ts +22 -2
  441. package/src/core/color/kelvin/rgb_to_kelvin.d.ts.map +1 -1
  442. package/src/core/color/kelvin/rgb_to_kelvin.js +22 -2
  443. package/src/core/color/lab/lab_to_xyz.d.ts +20 -0
  444. package/src/core/color/lab/lab_to_xyz.d.ts.map +1 -0
  445. package/src/core/color/lab/lab_to_xyz.js +69 -0
  446. package/src/core/color/oklab/gamut_clip_adaptive_l0.d.ts +34 -0
  447. package/src/core/color/oklab/gamut_clip_adaptive_l0.d.ts.map +1 -0
  448. package/src/core/color/oklab/gamut_clip_adaptive_l0.js +46 -0
  449. package/src/core/color/oklab/gamut_clip_at_l0.d.ts +33 -0
  450. package/src/core/color/oklab/gamut_clip_at_l0.d.ts.map +1 -0
  451. package/src/core/color/oklab/gamut_clip_at_l0.js +84 -0
  452. package/src/core/color/oklab/gamut_clip_preserve_chroma.d.ts +24 -0
  453. package/src/core/color/oklab/gamut_clip_preserve_chroma.d.ts.map +1 -0
  454. package/src/core/color/oklab/gamut_clip_preserve_chroma.js +37 -0
  455. package/src/core/color/oklab/gamut_clip_project_to_lcusp.d.ts +23 -0
  456. package/src/core/color/oklab/gamut_clip_project_to_lcusp.d.ts.map +1 -0
  457. package/src/core/color/oklab/gamut_clip_project_to_lcusp.js +46 -0
  458. package/src/core/color/oklab/linear_srgb_to_okhsl.d.ts +19 -0
  459. package/src/core/color/oklab/linear_srgb_to_okhsl.d.ts.map +1 -0
  460. package/src/core/color/oklab/linear_srgb_to_okhsl.js +93 -0
  461. package/src/core/color/oklab/linear_srgb_to_okhsv.d.ts +12 -4
  462. package/src/core/color/oklab/linear_srgb_to_okhsv.d.ts.map +1 -1
  463. package/src/core/color/oklab/linear_srgb_to_okhsv.js +108 -84
  464. package/src/core/color/oklab/linear_srgb_to_oklab.d.ts +13 -4
  465. package/src/core/color/oklab/linear_srgb_to_oklab.d.ts.map +1 -1
  466. package/src/core/color/oklab/linear_srgb_to_oklab.js +28 -19
  467. package/src/core/color/oklab/okhsl_chroma_bounds.d.ts +51 -0
  468. package/src/core/color/oklab/okhsl_chroma_bounds.d.ts.map +1 -0
  469. package/src/core/color/oklab/okhsl_chroma_bounds.js +128 -0
  470. package/src/core/color/oklab/okhsl_to_linear_srgb.d.ts +19 -0
  471. package/src/core/color/oklab/okhsl_to_linear_srgb.d.ts.map +1 -0
  472. package/src/core/color/oklab/okhsl_to_linear_srgb.js +85 -0
  473. package/src/core/color/oklab/oklab_to_oklch.d.ts +24 -0
  474. package/src/core/color/oklab/oklab_to_oklch.d.ts.map +1 -0
  475. package/src/core/color/oklab/oklab_to_oklch.js +35 -0
  476. package/src/core/color/oklab/oklch_to_oklab.d.ts +18 -0
  477. package/src/core/color/oklab/oklch_to_oklab.d.ts.map +1 -0
  478. package/src/core/color/oklab/oklch_to_oklab.js +26 -0
  479. package/src/core/color/oklab/toe.d.ts +12 -0
  480. package/src/core/color/oklab/toe.d.ts.map +1 -1
  481. package/src/core/color/oklab/toe.js +34 -22
  482. package/src/core/color/operations/color_add.d.ts +21 -0
  483. package/src/core/color/operations/color_add.d.ts.map +1 -0
  484. package/src/core/color/operations/color_add.js +23 -0
  485. package/src/core/color/operations/color_add_scaled.d.ts +20 -0
  486. package/src/core/color/operations/color_add_scaled.d.ts.map +1 -0
  487. package/src/core/color/operations/color_add_scaled.js +30 -0
  488. package/src/core/color/operations/color_clamp.d.ts +22 -0
  489. package/src/core/color/operations/color_clamp.d.ts.map +1 -0
  490. package/src/core/color/operations/color_clamp.js +25 -0
  491. package/src/core/color/operations/color_darken.d.ts +2 -1
  492. package/src/core/color/operations/color_darken.d.ts.map +1 -1
  493. package/src/core/color/operations/color_darken.js +25 -24
  494. package/src/core/color/operations/color_desaturate.d.ts +2 -1
  495. package/src/core/color/operations/color_desaturate.d.ts.map +1 -1
  496. package/src/core/color/operations/color_desaturate.js +25 -24
  497. package/src/core/color/operations/color_get_hsl.d.ts +18 -0
  498. package/src/core/color/operations/color_get_hsl.d.ts.map +1 -0
  499. package/src/core/color/operations/color_get_hsl.js +60 -0
  500. package/src/core/color/operations/color_is_in_gamut.d.ts +20 -0
  501. package/src/core/color/operations/color_is_in_gamut.d.ts.map +1 -0
  502. package/src/core/color/operations/color_is_in_gamut.js +30 -0
  503. package/src/core/color/operations/color_lerp.d.ts +12 -3
  504. package/src/core/color/operations/color_lerp.d.ts.map +1 -1
  505. package/src/core/color/operations/color_lerp.js +55 -46
  506. package/src/core/color/operations/color_lighten.d.ts +9 -5
  507. package/src/core/color/operations/color_lighten.d.ts.map +1 -1
  508. package/src/core/color/operations/color_lighten.js +29 -24
  509. package/src/core/color/operations/color_mix_okhsv_channel.d.ts +24 -0
  510. package/src/core/color/operations/color_mix_okhsv_channel.d.ts.map +1 -0
  511. package/src/core/color/operations/color_mix_okhsv_channel.js +48 -0
  512. package/src/core/color/operations/color_multiply_rgb.d.ts +21 -0
  513. package/src/core/color/operations/color_multiply_rgb.d.ts.map +1 -0
  514. package/src/core/color/operations/color_multiply_rgb.js +26 -0
  515. package/src/core/color/operations/color_saturate.d.ts +9 -5
  516. package/src/core/color/operations/color_saturate.d.ts.map +1 -1
  517. package/src/core/color/operations/color_saturate.js +29 -24
  518. package/src/core/color/operations/color_scale_okhsv_channel.d.ts +1 -1
  519. package/src/core/color/operations/color_scale_okhsv_channel.d.ts.map +1 -1
  520. package/src/core/color/operations/color_scale_okhsv_channel.js +58 -45
  521. package/src/core/color/operations/color_srgb_apply.d.ts +28 -0
  522. package/src/core/color/operations/color_srgb_apply.d.ts.map +1 -0
  523. package/src/core/color/operations/color_srgb_apply.js +40 -0
  524. package/src/core/color/operations/color_sub.d.ts +16 -0
  525. package/src/core/color/operations/color_sub.d.ts.map +1 -0
  526. package/src/core/color/operations/color_sub.js +18 -0
  527. package/src/core/color/parse_color.d.ts +10 -1
  528. package/src/core/color/parse_color.d.ts.map +1 -1
  529. package/src/core/color/parse_color.js +100 -84
  530. package/src/core/color/parse_color_normalized.d.ts +24 -0
  531. package/src/core/color/parse_color_normalized.d.ts.map +1 -0
  532. package/src/core/color/parse_color_normalized.js +38 -0
  533. package/src/core/color/rgb2uint24.d.ts +1 -8
  534. package/src/core/color/rgb2uint24.d.ts.map +1 -1
  535. package/src/core/color/rgb2uint24.js +7 -20
  536. package/src/core/color/rgb2uint32.d.ts +1 -9
  537. package/src/core/color/rgb2uint32.d.ts.map +1 -1
  538. package/src/core/color/rgb2uint32.js +7 -18
  539. package/src/core/color/rgb_to_luminance.d.ts +14 -5
  540. package/src/core/color/rgb_to_luminance.d.ts.map +1 -1
  541. package/src/core/color/rgb_to_luminance.js +24 -13
  542. package/src/core/color/rgb_to_uint24.d.ts +9 -0
  543. package/src/core/color/rgb_to_uint24.d.ts.map +1 -0
  544. package/src/core/color/rgb_to_uint24.js +20 -0
  545. package/src/core/color/rgb_to_uint32.d.ts +10 -0
  546. package/src/core/color/rgb_to_uint32.d.ts.map +1 -0
  547. package/src/core/color/rgb_to_uint32.js +21 -0
  548. package/src/core/color/sRGB/linear_to_sRGB.d.ts +7 -0
  549. package/src/core/color/sRGB/linear_to_sRGB.d.ts.map +1 -1
  550. package/src/core/color/sRGB/linear_to_sRGB.js +39 -32
  551. package/src/core/color/xyz/hpe_to_xyz.d.ts +24 -0
  552. package/src/core/color/xyz/hpe_to_xyz.d.ts.map +1 -0
  553. package/src/core/color/xyz/hpe_to_xyz.js +39 -0
  554. package/src/core/color/xyz/rgb_to_xyz.d.ts +17 -2
  555. package/src/core/color/xyz/rgb_to_xyz.d.ts.map +1 -1
  556. package/src/core/color/xyz/rgb_to_xyz.js +44 -18
  557. package/src/core/color/xyz/xyz_cmf_tabulated.d.ts.map +1 -1
  558. package/src/core/color/xyz/xyz_cmf_tabulated.js +217 -211
  559. package/src/core/color/xyz/xyz_cmf_wyman.d.ts +4 -0
  560. package/src/core/color/xyz/xyz_cmf_wyman.d.ts.map +1 -1
  561. package/src/core/color/xyz/xyz_cmf_wyman.js +74 -65
  562. package/src/core/color/xyz/xyz_to_hpe.d.ts +18 -0
  563. package/src/core/color/xyz/xyz_to_hpe.d.ts.map +1 -0
  564. package/src/core/color/xyz/xyz_to_hpe.js +33 -0
  565. package/src/core/color/xyz/xyz_to_rgb.d.ts +17 -2
  566. package/src/core/color/xyz/xyz_to_rgb.d.ts.map +1 -1
  567. package/src/core/color/xyz/xyz_to_rgb.js +39 -16
  568. package/src/core/color/ycxcz/xyz_to_ycxcz.d.ts +7 -2
  569. package/src/core/color/ycxcz/xyz_to_ycxcz.d.ts.map +1 -1
  570. package/src/core/color/ycxcz/xyz_to_ycxcz.js +33 -28
  571. package/src/core/events/signal/Signal.js +820 -820
  572. package/src/core/math/clamp_index.d.ts +18 -0
  573. package/src/core/math/clamp_index.d.ts.map +1 -0
  574. package/src/core/math/clamp_index.js +23 -0
  575. package/src/engine/asset/loaders/image/IMAGE_CODEC_REVIEW_2026_08_28.md +803 -0
  576. package/src/engine/asset/loaders/image/jpeg/JpegFrame.d.ts +5 -3
  577. package/src/engine/asset/loaders/image/jpeg/JpegFrame.d.ts.map +1 -1
  578. package/src/engine/asset/loaders/image/jpeg/JpegFrame.js +5 -3
  579. package/src/engine/asset/loaders/image/jpeg/JpegFrameComponent.d.ts +2 -1
  580. package/src/engine/asset/loaders/image/jpeg/JpegFrameComponent.d.ts.map +1 -1
  581. package/src/engine/asset/loaders/image/jpeg/JpegFrameComponent.js +2 -1
  582. package/src/engine/asset/loaders/image/jpeg/JpegImage.d.ts +17 -0
  583. package/src/engine/asset/loaders/image/jpeg/JpegImage.d.ts.map +1 -1
  584. package/src/engine/asset/loaders/image/jpeg/JpegImage.js +197 -157
  585. package/src/engine/asset/loaders/image/jpeg/idct8x8_float.d.ts +0 -1
  586. package/src/engine/asset/loaders/image/jpeg/idct8x8_float.d.ts.map +1 -1
  587. package/src/engine/asset/loaders/image/jpeg/idct8x8_float.js +0 -1
  588. package/src/engine/asset/loaders/image/jpeg/jpeg_component_row.d.ts +28 -0
  589. package/src/engine/asset/loaders/image/jpeg/jpeg_component_row.d.ts.map +1 -0
  590. package/src/engine/asset/loaders/image/jpeg/jpeg_component_row.js +31 -0
  591. package/src/engine/asset/loaders/image/png/PNG.d.ts +3 -18
  592. package/src/engine/asset/loaders/image/png/PNG.d.ts.map +1 -1
  593. package/src/engine/asset/loaders/image/png/PNG.js +3 -139
  594. package/src/engine/asset/loaders/image/png/PNGReader.d.ts +16 -16
  595. package/src/engine/asset/loaders/image/png/PNGReader.d.ts.map +1 -1
  596. package/src/engine/asset/loaders/image/png/PNGReader.js +143 -160
  597. package/src/engine/asset/loaders/image/png/chunk/png_chunk_decode_iTXt.js +3 -3
  598. package/src/engine/asset/loaders/image/png/chunk/png_chunk_decode_zTXt.js +3 -3
  599. package/src/engine/asset/loaders/image/png/crc32.d.ts +1 -15
  600. package/src/engine/asset/loaders/image/png/crc32.d.ts.map +1 -1
  601. package/src/engine/asset/loaders/image/png/crc32.js +5 -89
  602. package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterNone.d.ts +12 -10
  603. package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterNone.d.ts.map +1 -1
  604. package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterNone.js +20 -45
  605. package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterSub.d.ts +2 -1
  606. package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterSub.d.ts.map +1 -1
  607. package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterSub.js +2 -0
  608. package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterUp.d.ts +2 -1
  609. package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterUp.d.ts.map +1 -1
  610. package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterUp.js +2 -0
  611. package/src/engine/asset/loaders/image/png/filter/png_unfilter.d.ts +22 -0
  612. package/src/engine/asset/loaders/image/png/filter/png_unfilter.d.ts.map +1 -0
  613. package/src/engine/asset/loaders/image/png/filter/png_unfilter.js +68 -0
  614. package/src/engine/asset/loaders/image/png/png_inflate.d.ts +20 -0
  615. package/src/engine/asset/loaders/image/png/png_inflate.d.ts.map +1 -0
  616. package/src/engine/asset/loaders/image/png/png_inflate.js +85 -0
  617. package/src/engine/asset/loaders/image/png/png_unpack_samples.d.ts +22 -0
  618. package/src/engine/asset/loaders/image/png/png_unpack_samples.d.ts.map +1 -0
  619. package/src/engine/asset/loaders/image/png/png_unpack_samples.js +38 -0
  620. package/src/engine/graphics/ecs/sprite/SpriteSystemPE.d.ts.map +1 -1
  621. package/src/engine/graphics/ecs/sprite/SpriteSystemPE.js +135 -132
  622. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts +16 -3
  623. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts.map +1 -1
  624. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +1157 -1149
  625. package/src/engine/graphics/render/frame_graph/FrameGraph.js +900 -900
  626. package/src/engine/physics/ecs/PhysicsSystem.d.ts +72 -81
  627. package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
  628. package/src/engine/physics/ecs/PhysicsSystem.js +86 -77
  629. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  630. package/src/shade/device/IMMEDIATE_DATA_PLAN_2026_08_28.md +451 -0
  631. package/src/shade/device/timing/GPU_PROFILER_PROPOSAL_2026_08_28.md +625 -0
  632. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
  633. package/src/shade/renderer/rasterize/native/oit/shader_oit_blend.d.ts.map +1 -1
  634. package/src/shade/renderer/rasterize/native/oit/shader_oit_blend.js +5 -4
  635. package/src/shade/renderer/scene/serialization/decode_image_source_hdr.d.ts +14 -3
  636. package/src/shade/renderer/scene/serialization/decode_image_source_hdr.d.ts.map +1 -1
  637. package/src/shade/renderer/scene/serialization/decode_image_source_hdr.js +50 -51
  638. package/src/shade/renderer/scene/serialization/deserialize_scene.d.ts.map +1 -1
  639. package/src/shade/renderer/scene/serialization/deserialize_scene.js +531 -521
  640. package/src/shade/renderer/scene/serialization/write_image_source.d.ts.map +1 -1
  641. package/src/shade/renderer/scene/serialization/write_image_source.js +6 -4
  642. package/src/shade/renderer/shader/chunk/color/chunk_rgb_to_luminance.d.ts.map +1 -1
  643. package/src/shade/renderer/shader/chunk/color/chunk_rgb_to_luminance.js +34 -32
  644. package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_eotf_st2084.d.ts +31 -0
  645. package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_eotf_st2084.d.ts.map +1 -1
  646. package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_eotf_st2084.js +62 -31
  647. package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_inverse_eotf_st2084.d.ts +10 -0
  648. package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_inverse_eotf_st2084.d.ts.map +1 -1
  649. package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_inverse_eotf_st2084.js +32 -22
  650. package/src/shade/renderer/shader/chunk/color/sRGB/chunk_sRGBTransferOETF.d.ts.map +1 -1
  651. package/src/shade/renderer/shader/chunk/color/sRGB/chunk_sRGBTransferOETF.js +22 -21
  652. package/src/shade/renderer/shader/chunk/color/tonemap/gt7/chunk_tonemap_gt7.d.ts +6 -0
  653. package/src/shade/renderer/shader/chunk/color/tonemap/gt7/chunk_tonemap_gt7.d.ts.map +1 -1
  654. package/src/shade/renderer/shader/chunk/color/tonemap/gt7/chunk_tonemap_gt7.js +110 -104
  655. package/src/shade/renderer/shader/chunk/color/xyz/chunk_rgb_to_xyz.d.ts.map +1 -1
  656. package/src/shade/renderer/shader/chunk/color/xyz/chunk_rgb_to_xyz.js +23 -21
  657. package/src/shade/renderer/shader/chunk/math/chunk_magnitude_floor.d.ts +9 -0
  658. package/src/shade/renderer/shader/chunk/math/chunk_magnitude_floor.d.ts.map +1 -0
  659. package/src/shade/renderer/shader/chunk/math/chunk_magnitude_floor.js +16 -0
  660. package/src/shade/renderer/shader/chunk/math/complex/chunk_complex_magnitude_floor.d.ts +10 -0
  661. package/src/shade/renderer/shader/chunk/math/complex/chunk_complex_magnitude_floor.d.ts.map +1 -0
  662. package/src/shade/renderer/shader/chunk/math/complex/chunk_complex_magnitude_floor.js +17 -0
  663. package/src/shade/renderer/shader/chunk/math/complex/chunk_complex_solve_cubic_blinn.d.ts.map +1 -1
  664. package/src/shade/renderer/shader/chunk/math/complex/chunk_complex_solve_cubic_blinn.js +7 -1
  665. package/src/shade/renderer/shader/chunk/math/complex/chunk_complex_square_root.d.ts.map +1 -1
  666. package/src/shade/renderer/shader/chunk/math/complex/chunk_complex_square_root.js +9 -3
  667. package/src/shade/renderer/shader/chunk/math/polynomial/chunk_solve_cubic.d.ts.map +1 -1
  668. package/src/shade/renderer/shader/chunk/math/polynomial/chunk_solve_cubic.js +13 -7
  669. package/src/shade/renderer/shader/chunk/math/polynomial/chunk_solve_cubic_blinn_smallest.d.ts.map +1 -1
  670. package/src/shade/renderer/shader/chunk/math/polynomial/chunk_solve_cubic_blinn_smallest.js +13 -4
  671. package/src/shade/renderer/shader/chunk/math/polynomial/chunk_solve_quadratic.d.ts.map +1 -1
  672. package/src/shade/renderer/shader/chunk/math/polynomial/chunk_solve_quadratic.js +20 -13
  673. package/src/shade/renderer/shader/chunk/math/polynomial/chunk_solve_quartic_neumark.d.ts.map +1 -1
  674. package/src/shade/renderer/shader/chunk/math/polynomial/chunk_solve_quartic_neumark.js +8 -4
  675. package/src/shade/renderer/shader/chunk/mboit/NOTES.md +35 -1
  676. package/src/shade/renderer/shader/chunk/mboit/moments/geometric/chunk_compute_transmittance_from_2_trigonometric_moments.d.ts.map +1 -1
  677. package/src/shade/renderer/shader/chunk/mboit/moments/geometric/chunk_compute_transmittance_from_2_trigonometric_moments.js +18 -5
  678. package/src/shade/renderer/shader/chunk/mboit/moments/geometric/chunk_compute_transmittance_from_3_trigonometric_moments.d.ts.map +1 -1
  679. package/src/shade/renderer/shader/chunk/mboit/moments/geometric/chunk_compute_transmittance_from_3_trigonometric_moments.js +21 -8
  680. package/src/shade/renderer/shader/chunk/mboit/moments/geometric/chunk_compute_transmittance_from_4_trigonometric_moments.d.ts.map +1 -1
  681. package/src/shade/renderer/shader/chunk/mboit/moments/geometric/chunk_compute_transmittance_from_4_trigonometric_moments.js +25 -12
  682. package/src/shade/renderer/shader/chunk/mboit/moments/geometric/chunk_generate_trigonometric_moments_4.d.ts +6 -2
  683. package/src/shade/renderer/shader/chunk/mboit/moments/geometric/chunk_generate_trigonometric_moments_4.d.ts.map +1 -1
  684. package/src/shade/renderer/shader/chunk/mboit/moments/geometric/chunk_generate_trigonometric_moments_4.js +42 -35
  685. package/src/shade/renderer/shader/chunk/mboit/moments/power/chunk_compute_transmittance_from_4_power_moments.d.ts.map +1 -1
  686. package/src/shade/renderer/shader/chunk/mboit/moments/power/chunk_compute_transmittance_from_4_power_moments.js +18 -5
  687. package/src/shade/renderer/shader/chunk/mboit/moments/power/chunk_compute_transmittance_from_6_power_moments.d.ts.map +1 -1
  688. package/src/shade/renderer/shader/chunk/mboit/moments/power/chunk_compute_transmittance_from_6_power_moments.js +24 -9
  689. package/src/shade/renderer/shader/chunk/mboit/moments/power/chunk_compute_transmittance_from_8_power_moments.d.ts.map +1 -1
  690. package/src/shade/renderer/shader/chunk/mboit/moments/power/chunk_compute_transmittance_from_8_power_moments.js +29 -13
  691. package/src/shade/renderer/shader/chunk/mboit/moments/power/chunk_generate_power_moments_4.d.ts +12 -0
  692. package/src/shade/renderer/shader/chunk/mboit/moments/power/chunk_generate_power_moments_4.d.ts.map +1 -1
  693. package/src/shade/renderer/shader/chunk/mboit/moments/power/chunk_generate_power_moments_4.js +38 -48
  694. package/src/view/elements/ColorPickerView.js +296 -296
  695. package/src/avif/codec/dec/Readme.md +0 -14
  696. package/src/avif/codec/dec/avif_dec.cpp +0 -234
  697. package/src/avif/codec/dec/avif_dec.d.ts +0 -3
  698. package/src/avif/codec/dec/avif_dec.d.ts.map +0 -1
  699. package/src/avif/codec/dec/avif_dec.js +0 -16
  700. package/src/avif/codec/dec/avif_dec.wasm +0 -0
  701. package/src/avif/codec/enc/README.md +0 -37
  702. package/src/avif/codec/enc/avif_enc.cpp +0 -216
  703. package/src/avif/codec/enc/avif_enc.d.ts +0 -3
  704. package/src/avif/codec/enc/avif_enc.d.ts.map +0 -1
  705. package/src/avif/codec/enc/avif_enc.js +0 -6144
  706. package/src/avif/codec/enc/avif_enc.wasm +0 -0
  707. package/src/avif/codec/enc/avif_enc_mt.d.ts +0 -3
  708. package/src/avif/codec/enc/avif_enc_mt.d.ts.map +0 -1
  709. package/src/avif/codec/enc/avif_enc_mt.js +0 -6811
  710. package/src/avif/codec/enc/avif_enc_mt.wasm +0 -0
  711. package/src/avif/codec/enc/avif_enc_mt.worker.d.mts +0 -2
  712. package/src/avif/codec/enc/avif_enc_mt.worker.d.mts.map +0 -1
  713. package/src/avif/codec/enc/avif_enc_mt.worker.d.ts +0 -11
  714. package/src/avif/codec/enc/avif_enc_mt.worker.d.ts.map +0 -1
  715. package/src/avif/codec/enc/avif_enc_mt.worker.js +0 -171
  716. package/src/avif/codec/enc/avif_enc_mt.worker.mjs +0 -1
  717. package/src/avif/decode.d.ts +0 -3
  718. package/src/avif/decode.d.ts.map +0 -1
  719. package/src/avif/decode.js +0 -42
  720. package/src/avif/encode.d.ts +0 -3
  721. package/src/avif/encode.d.ts.map +0 -1
  722. package/src/avif/encode.js +0 -75
  723. package/src/avif/meta.d.ts +0 -24
  724. package/src/avif/meta.d.ts.map +0 -1
  725. package/src/avif/meta.js +0 -23
  726. package/src/avif/tsconfig.tsbuildinfo +0 -1
  727. package/src/avif/utils.d.ts +0 -17
  728. package/src/avif/utils.d.ts.map +0 -1
  729. package/src/avif/utils.js +0 -31
  730. package/src/engine/asset/loaders/image/jpeg/idct8x8_fixed.d.ts +0 -23
  731. package/src/engine/asset/loaders/image/jpeg/idct8x8_fixed.d.ts.map +0 -1
  732. package/src/engine/asset/loaders/image/jpeg/idct8x8_fixed.js +0 -214
  733. package/src/engine/asset/loaders/image/png/inflate.d.ts +0 -7
  734. package/src/engine/asset/loaders/image/png/inflate.d.ts.map +0 -1
  735. package/src/engine/asset/loaders/image/png/inflate.js +0 -20
@@ -29,6 +29,16 @@ export const PQ_MAX_NITS: number;
29
29
  * Luminance of SDR reference white, in nits, per ITU-R BT.2408. This is the engine's `1.0`, and it is
30
30
  * NOT PQ's `1.0`: converting between the two scales is the caller's job and needs
31
31
  * {@link PQ_SDR_WHITE_LINEAR} in one direction or its reciprocal in the other.
32
+ *
33
+ * It is also not the only number in the engine called a reference white, so: this one is a *renderer*
34
+ * convention, applied by callers of {@link linear_to_PQ} / {@link PQ_to_linear} rather than folded into
35
+ * them. The GPU's `chunk_eotfSt2084` folds 100 into its own transfer pair, but that 100 is GT7's "Standard
36
+ * 1.0 unit" shared with `chunk_tonemap_gt7`, not a competing SDR white. `avif/native/color/transfer_to_linear.js`
37
+ * uses a third 100, the reference display that H.273's SDR curves are defined against. The boundary where
38
+ * the conventions meet is named explicitly, as `linear_reference_nits`, in `sampler2d_to_avif` and
39
+ * `avif_to_sampler2d`.
40
+ *
41
+ * @see chunk_eotfSt2084 for the GPU side and the full comparison
32
42
  * @type {number}
33
43
  */
34
44
  export const SDR_WHITE_NITS: number;
@@ -1 +1 @@
1
- {"version":3,"file":"PQ_constants.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/PQ/PQ_constants.js"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,kCAAkC;AAClC,oBADW,MAAM,CACoB;AAErC,+BAA+B;AAC/B,oBADW,MAAM,CACa;AAE9B,iCAAiC;AACjC,oBADW,MAAM,CACc;AAE/B,gCAAgC;AAChC,oBADW,MAAM,CACe;AAEhC,gCAAgC;AAChC,oBADW,MAAM,CACY;AAE7B;;;;;GAKG;AACH,0BAFU,MAAM,CAEiB;AAEjC;;;;;GAKG;AACH,6BAFU,MAAM,CAEkB;AAElC;;;;;;GAMG;AACH,kCAFU,MAAM,CAEgD"}
1
+ {"version":3,"file":"PQ_constants.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/PQ/PQ_constants.js"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,kCAAkC;AAClC,oBADW,MAAM,CACoB;AAErC,+BAA+B;AAC/B,oBADW,MAAM,CACa;AAE9B,iCAAiC;AACjC,oBADW,MAAM,CACc;AAE/B,gCAAgC;AAChC,oBADW,MAAM,CACe;AAEhC,gCAAgC;AAChC,oBADW,MAAM,CACY;AAE7B;;;;;GAKG;AACH,0BAFU,MAAM,CAEiB;AAEjC;;;;;;;;;;;;;;;GAeG;AACH,6BAFU,MAAM,CAEkB;AAElC;;;;;;GAMG;AACH,kCAFU,MAAM,CAEgD"}
@@ -36,6 +36,16 @@ export const PQ_MAX_NITS = 10000;
36
36
  * Luminance of SDR reference white, in nits, per ITU-R BT.2408. This is the engine's `1.0`, and it is
37
37
  * NOT PQ's `1.0`: converting between the two scales is the caller's job and needs
38
38
  * {@link PQ_SDR_WHITE_LINEAR} in one direction or its reciprocal in the other.
39
+ *
40
+ * It is also not the only number in the engine called a reference white, so: this one is a *renderer*
41
+ * convention, applied by callers of {@link linear_to_PQ} / {@link PQ_to_linear} rather than folded into
42
+ * them. The GPU's `chunk_eotfSt2084` folds 100 into its own transfer pair, but that 100 is GT7's "Standard
43
+ * 1.0 unit" shared with `chunk_tonemap_gt7`, not a competing SDR white. `avif/native/color/transfer_to_linear.js`
44
+ * uses a third 100, the reference display that H.273's SDR curves are defined against. The boundary where
45
+ * the conventions meet is named explicitly, as `linear_reference_nits`, in `sampler2d_to_avif` and
46
+ * `avif_to_sampler2d`.
47
+ *
48
+ * @see chunk_eotfSt2084 for the GPU side and the full comparison
39
49
  * @type {number}
40
50
  */
41
51
  export const SDR_WHITE_NITS = 203;
@@ -1 +1 @@
1
- {"version":3,"file":"linear_to_PQ.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/PQ/linear_to_PQ.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qCAPW,MAAM,GACJ,MAAM,CAUlB"}
1
+ {"version":3,"file":"linear_to_PQ.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/PQ/linear_to_PQ.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qCAPW,MAAM,GACJ,MAAM,CAelB"}
@@ -1,3 +1,4 @@
1
+ import { assert } from "../../assert.js";
1
2
  import { PQ_C1, PQ_C2, PQ_C3, PQ_M1, PQ_M2 } from "./PQ_constants.js";
2
3
 
3
4
  /**
@@ -26,6 +27,11 @@ import { PQ_C1, PQ_C2, PQ_C3, PQ_M1, PQ_M2 } from "./PQ_constants.js";
26
27
  * @copyright Company Named Limited (c) 2026
27
28
  */
28
29
  export function linear_to_PQ(linear) {
30
+ // validated per the package rule: a non-finite input has no encoding, while a negative one does have a
31
+ // defined answer and is clamped below rather than rejected
32
+ assert.isNumber(linear, 'linear');
33
+ assert.isFinite(linear, 'linear');
34
+
29
35
  const y = Math.pow(Math.max(linear, 0), PQ_M1);
30
36
 
31
37
  return Math.pow((PQ_C1 + PQ_C2 * y) / (1 + PQ_C3 * y), PQ_M2);
@@ -0,0 +1,50 @@
1
+ /**
2
+ * The Rec.709 / sRGB primaries, as coefficients, in one place.
3
+ *
4
+ * These numbers previously appeared at three different precisions in three files — 4 significant digits in
5
+ * `rgb_to_luminance`, 15 in the WGSL `chunk_rgb_to_luminance`, and 20 in `rgb_to_xyz`'s middle row — which is
6
+ * how a single quantity comes to look like three quantities. Nothing was wrong with any of them; the problem
7
+ * is that there was no way to tell whether a future edit to one was meant to apply to the others.
8
+ *
9
+ * They are *derived* values, not the rounded ones quoted in IEC 61966-2-1. Deriving them from the chromaticity
10
+ * coordinates below rather than quoting `0.2126 / 0.7152 / 0.0722` is what makes linear white land on
11
+ * `Y = 1` and on `L* = 100, a* = 0, b* = 0` exactly, which the rest of this package relies on:
12
+ *
13
+ * ```
14
+ * xr, yr = 0.6400, 0.3300
15
+ * xg, yg = 0.3000, 0.6000
16
+ * xb, yb = 0.1500, 0.0600
17
+ * xw, yw = 0.3127, 0.3290 (D65)
18
+ * ```
19
+ *
20
+ * The difference from the rounded spec values is ~1e-4 — below an 8-bit quantum, and below f32 rounding in
21
+ * the WGSL twins, so aligning on these costs nothing and settles which spelling is normative.
22
+ *
23
+ * @see chunk_rgb_to_luminance the WGSL twin, which must carry the same digits
24
+ * @see https://en.wikipedia.org/wiki/Luminance
25
+ */
26
+ /**
27
+ * Red's contribution to relative luminance.
28
+ * @type {number}
29
+ */
30
+ export const REC709_LUMINANCE_R: number;
31
+ /**
32
+ * Green's contribution to relative luminance.
33
+ * @type {number}
34
+ */
35
+ export const REC709_LUMINANCE_G: number;
36
+ /**
37
+ * Blue's contribution to relative luminance.
38
+ * @type {number}
39
+ */
40
+ export const REC709_LUMINANCE_B: number;
41
+ /**
42
+ * Exponent of the sRGB OETF's power segment, `1 / 2.4`.
43
+ *
44
+ * Written out rather than computed so that the WGSL twin can carry the identical literal; the two used to
45
+ * differ in their trailing digits (`0.41666666666` against `0.4166666666666667`) for no reason anyone
46
+ * recorded.
47
+ * @type {number}
48
+ */
49
+ export const SRGB_OETF_EXPONENT: number;
50
+ //# sourceMappingURL=REC709_PRIMARIES.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"REC709_PRIMARIES.d.ts","sourceRoot":"","sources":["../../../../src/core/color/REC709_PRIMARIES.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;GAGG;AACH,iCAFU,MAAM,CAEyC;AAEzD;;;GAGG;AACH,iCAFU,MAAM,CAEyC;AAEzD;;;GAGG;AACH,iCAFU,MAAM,CAEyC;AAEzD;;;;;;;GAOG;AACH,iCAFU,MAAM,CAEqC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * The Rec.709 / sRGB primaries, as coefficients, in one place.
3
+ *
4
+ * These numbers previously appeared at three different precisions in three files — 4 significant digits in
5
+ * `rgb_to_luminance`, 15 in the WGSL `chunk_rgb_to_luminance`, and 20 in `rgb_to_xyz`'s middle row — which is
6
+ * how a single quantity comes to look like three quantities. Nothing was wrong with any of them; the problem
7
+ * is that there was no way to tell whether a future edit to one was meant to apply to the others.
8
+ *
9
+ * They are *derived* values, not the rounded ones quoted in IEC 61966-2-1. Deriving them from the chromaticity
10
+ * coordinates below rather than quoting `0.2126 / 0.7152 / 0.0722` is what makes linear white land on
11
+ * `Y = 1` and on `L* = 100, a* = 0, b* = 0` exactly, which the rest of this package relies on:
12
+ *
13
+ * ```
14
+ * xr, yr = 0.6400, 0.3300
15
+ * xg, yg = 0.3000, 0.6000
16
+ * xb, yb = 0.1500, 0.0600
17
+ * xw, yw = 0.3127, 0.3290 (D65)
18
+ * ```
19
+ *
20
+ * The difference from the rounded spec values is ~1e-4 — below an 8-bit quantum, and below f32 rounding in
21
+ * the WGSL twins, so aligning on these costs nothing and settles which spelling is normative.
22
+ *
23
+ * @see chunk_rgb_to_luminance the WGSL twin, which must carry the same digits
24
+ * @see https://en.wikipedia.org/wiki/Luminance
25
+ */
26
+
27
+ /**
28
+ * Red's contribution to relative luminance.
29
+ * @type {number}
30
+ */
31
+ export const REC709_LUMINANCE_R = 0.21263900587151035754;
32
+
33
+ /**
34
+ * Green's contribution to relative luminance.
35
+ * @type {number}
36
+ */
37
+ export const REC709_LUMINANCE_G = 0.71516867876775592746;
38
+
39
+ /**
40
+ * Blue's contribution to relative luminance.
41
+ * @type {number}
42
+ */
43
+ export const REC709_LUMINANCE_B = 0.07219231536073371500;
44
+
45
+ /**
46
+ * Exponent of the sRGB OETF's power segment, `1 / 2.4`.
47
+ *
48
+ * Written out rather than computed so that the WGSL twin can carry the identical literal; the two used to
49
+ * differ in their trailing digits (`0.41666666666` against `0.4166666666666667`) for no reason anyone
50
+ * recorded.
51
+ * @type {number}
52
+ */
53
+ export const SRGB_OETF_EXPONENT = 0.4166666666666667;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Build a `Color` from a CSS hex literal.
3
+ *
4
+ * Accepts all four forms — `#RGB`, `#RGBA`, `#RRGGBB`, `#RRGGBBAA` — and throws on anything else, naming the
5
+ * offending string.
6
+ *
7
+ * The result holds **encoded** sRGB, because that is what a hex literal is. Decode with
8
+ * {@link Color.from_sRGB_to_linear} before handing it to anything in `operations/`, or use
9
+ * {@link color_srgb_apply}.
10
+ *
11
+ * @param {string} hex
12
+ * @param {Color} [output]
13
+ * @returns {Color} `output`, holding **encoded** sRGB
14
+ * @throws Error if `hex` is not one of the four accepted forms
15
+ *
16
+ * @author Alex Goldring
17
+ * @copyright Company Named Limited (c) 2026
18
+ */
19
+ export function color_from_hex(hex: string, output?: Color): Color;
20
+ import { Color } from "../Color.js";
21
+ //# sourceMappingURL=color_from_hex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color_from_hex.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/construct/color_from_hex.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AACH,oCARW,MAAM,WACN,KAAK,GACH,KAAK,CAgBjB;sBA/BqB,aAAa"}
@@ -0,0 +1,33 @@
1
+ import { uint8_to_float } from "../../binary/uint8_to_float.js";
2
+ import { Color } from "../Color.js";
3
+ import { hex_to_rgb } from "../hex/hex_to_rgb.js";
4
+
5
+ /**
6
+ * Build a `Color` from a CSS hex literal.
7
+ *
8
+ * Accepts all four forms — `#RGB`, `#RGBA`, `#RRGGBB`, `#RRGGBBAA` — and throws on anything else, naming the
9
+ * offending string.
10
+ *
11
+ * The result holds **encoded** sRGB, because that is what a hex literal is. Decode with
12
+ * {@link Color.from_sRGB_to_linear} before handing it to anything in `operations/`, or use
13
+ * {@link color_srgb_apply}.
14
+ *
15
+ * @param {string} hex
16
+ * @param {Color} [output]
17
+ * @returns {Color} `output`, holding **encoded** sRGB
18
+ * @throws Error if `hex` is not one of the four accepted forms
19
+ *
20
+ * @author Alex Goldring
21
+ * @copyright Company Named Limited (c) 2026
22
+ */
23
+ export function color_from_hex(hex, output = new Color()) {
24
+
25
+ const { r, g, b, a } = hex_to_rgb(hex);
26
+
27
+ return output.set(
28
+ uint8_to_float(r),
29
+ uint8_to_float(g),
30
+ uint8_to_float(b),
31
+ uint8_to_float(a)
32
+ );
33
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Build a `Color` from a blackbody colour temperature.
3
+ *
4
+ * `kelvin_to_rgb` has been here all along with no `Color`-shaped way to reach it.
5
+ *
6
+ * The result holds **encoded** sRGB — `kelvin_to_rgb`'s own contract, and the one place in the package where
7
+ * that was already stated. Convert with {@link Color.from_sRGB_to_linear} before mixing it with anything.
8
+ *
9
+ * Alpha is set to 1. Useful range is roughly 1000 K to 40000 K; below the Draper point the result fades to
10
+ * black, which is the physically sensible answer rather than an error.
11
+ *
12
+ * @param {number} kelvin colour temperature
13
+ * @param {Color} [output]
14
+ * @returns {Color} `output`, holding **encoded** sRGB
15
+ *
16
+ * @see kelvin_to_rgb
17
+ * @author Alex Goldring
18
+ * @copyright Company Named Limited (c) 2026
19
+ */
20
+ export function color_from_temperature(kelvin: number, output?: Color): Color;
21
+ import { Color } from "../Color.js";
22
+ //# sourceMappingURL=color_from_temperature.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color_from_temperature.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/construct/color_from_temperature.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;GAkBG;AACH,+CARW,MAAM,WACN,KAAK,GACH,KAAK,CAWjB;sBAhCqB,aAAa"}
@@ -0,0 +1,33 @@
1
+ import { Color } from "../Color.js";
2
+ import { kelvin_to_rgb } from "../kelvin/kelvin_to_rgb.js";
3
+
4
+ /**
5
+ * @type {number[]}
6
+ */
7
+ const scratch = [0, 0, 0];
8
+
9
+ /**
10
+ * Build a `Color` from a blackbody colour temperature.
11
+ *
12
+ * `kelvin_to_rgb` has been here all along with no `Color`-shaped way to reach it.
13
+ *
14
+ * The result holds **encoded** sRGB — `kelvin_to_rgb`'s own contract, and the one place in the package where
15
+ * that was already stated. Convert with {@link Color.from_sRGB_to_linear} before mixing it with anything.
16
+ *
17
+ * Alpha is set to 1. Useful range is roughly 1000 K to 40000 K; below the Draper point the result fades to
18
+ * black, which is the physically sensible answer rather than an error.
19
+ *
20
+ * @param {number} kelvin colour temperature
21
+ * @param {Color} [output]
22
+ * @returns {Color} `output`, holding **encoded** sRGB
23
+ *
24
+ * @see kelvin_to_rgb
25
+ * @author Alex Goldring
26
+ * @copyright Company Named Limited (c) 2026
27
+ */
28
+ export function color_from_temperature(kelvin, output = new Color()) {
29
+
30
+ kelvin_to_rgb(scratch, 0, kelvin);
31
+
32
+ return output.set(scratch[0], scratch[1], scratch[2], 1);
33
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Build a `Color` from a packed 24-bit `0xRRGGBB` value. Alpha is set to 1.
3
+ *
4
+ * `Color.fromUint` exists as an instance method; constructing from a packed integer took two lines because
5
+ * there was no static. This is that static, as a free function.
6
+ *
7
+ * Values outside `[0, 0xFFFFFF]` throw rather than being truncated — see {@link int_to_rgb}.
8
+ *
9
+ * @param {number} value 24-bit `0xRRGGBB`
10
+ * @param {Color} [output]
11
+ * @returns {Color} `output`
12
+ * @throws Error if `value` is not an integer in `[0, 0xFFFFFF]`
13
+ *
14
+ * @author Alex Goldring
15
+ * @copyright Company Named Limited (c) 2026
16
+ */
17
+ export function color_from_uint24(value: number, output?: Color): Color;
18
+ import { Color } from "../Color.js";
19
+ //# sourceMappingURL=color_from_uint24.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color_from_uint24.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/construct/color_from_uint24.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,yCARW,MAAM,WACN,KAAK,GACH,KAAK,CAWjB;sBAxBqB,aAAa"}
@@ -0,0 +1,26 @@
1
+ import { uint8_to_float } from "../../binary/uint8_to_float.js";
2
+ import { Color } from "../Color.js";
3
+ import { int_to_rgb } from "../int_to_rgb.js";
4
+
5
+ /**
6
+ * Build a `Color` from a packed 24-bit `0xRRGGBB` value. Alpha is set to 1.
7
+ *
8
+ * `Color.fromUint` exists as an instance method; constructing from a packed integer took two lines because
9
+ * there was no static. This is that static, as a free function.
10
+ *
11
+ * Values outside `[0, 0xFFFFFF]` throw rather than being truncated — see {@link int_to_rgb}.
12
+ *
13
+ * @param {number} value 24-bit `0xRRGGBB`
14
+ * @param {Color} [output]
15
+ * @returns {Color} `output`
16
+ * @throws Error if `value` is not an integer in `[0, 0xFFFFFF]`
17
+ *
18
+ * @author Alex Goldring
19
+ * @copyright Company Named Limited (c) 2026
20
+ */
21
+ export function color_from_uint24(value, output = new Color()) {
22
+
23
+ const { r, g, b } = int_to_rgb(value);
24
+
25
+ return output.set(uint8_to_float(r), uint8_to_float(g), uint8_to_float(b), 1);
26
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Build a `Color` from a packed 32-bit `0xRRGGBBAA` value.
3
+ *
4
+ * The byte order is {@link Color#toUint32}'s, which is what `serialize_scene` writes — red in the most
5
+ * significant byte, alpha in the least. Note that this is *not* the `0xAARRGGBB` that some tooling uses;
6
+ * there is no way to tell the two apart from the bits, which is why {@link parse_color} refuses 32-bit input
7
+ * entirely rather than guessing.
8
+ *
9
+ * @param {number} value 32-bit `0xRRGGBBAA`
10
+ * @param {Color} [output]
11
+ * @returns {Color} `output`
12
+ * @throws Error if `value` is not an integer in `[0, 0xFFFFFFFF]`
13
+ *
14
+ * @see Color#toUint32
15
+ * @author Alex Goldring
16
+ * @copyright Company Named Limited (c) 2026
17
+ */
18
+ export function color_from_uint32(value: number, output?: Color): Color;
19
+ import { Color } from "../Color.js";
20
+ //# sourceMappingURL=color_from_uint32.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color_from_uint32.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/construct/color_from_uint32.js"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;GAgBG;AACH,yCATW,MAAM,WACN,KAAK,GACH,KAAK,CAmBjB;sBArCqB,aAAa"}
@@ -0,0 +1,39 @@
1
+ import { uint8_to_float } from "../../binary/uint8_to_float.js";
2
+ import { Color } from "../Color.js";
3
+
4
+ /**
5
+ * Largest value that fits in four packed bytes.
6
+ * @type {number}
7
+ */
8
+ const UINT32_MAX = 0xFFFFFFFF;
9
+
10
+ /**
11
+ * Build a `Color` from a packed 32-bit `0xRRGGBBAA` value.
12
+ *
13
+ * The byte order is {@link Color#toUint32}'s, which is what `serialize_scene` writes — red in the most
14
+ * significant byte, alpha in the least. Note that this is *not* the `0xAARRGGBB` that some tooling uses;
15
+ * there is no way to tell the two apart from the bits, which is why {@link parse_color} refuses 32-bit input
16
+ * entirely rather than guessing.
17
+ *
18
+ * @param {number} value 32-bit `0xRRGGBBAA`
19
+ * @param {Color} [output]
20
+ * @returns {Color} `output`
21
+ * @throws Error if `value` is not an integer in `[0, 0xFFFFFFFF]`
22
+ *
23
+ * @see Color#toUint32
24
+ * @author Alex Goldring
25
+ * @copyright Company Named Limited (c) 2026
26
+ */
27
+ export function color_from_uint32(value, output = new Color()) {
28
+
29
+ if (!Number.isInteger(value) || value < 0 || value > UINT32_MAX) {
30
+ throw new Error(`Failed to decode color '${value}', expected an integer in [0, 0xFFFFFFFF]`);
31
+ }
32
+
33
+ return output.set(
34
+ uint8_to_float((value >>> 24) & 0xFF),
35
+ uint8_to_float((value >>> 16) & 0xFF),
36
+ uint8_to_float((value >>> 8) & 0xFF),
37
+ uint8_to_float(value & 0xFF)
38
+ );
39
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Build a neutral `Color` with all three channels at `value`.
3
+ *
4
+ * Space-agnostic like the class itself: a linear 0.5 and an encoded 0.5 are different greys, and this writes
5
+ * whichever one you hand it without comment.
6
+ *
7
+ * @param {number} value
8
+ * @param {number} [alpha]
9
+ * @param {Color} [output]
10
+ * @returns {Color} `output`
11
+ *
12
+ * @author Alex Goldring
13
+ * @copyright Company Named Limited (c) 2026
14
+ */
15
+ export function color_gray(value: number, alpha?: number, output?: Color): Color;
16
+ import { Color } from "../Color.js";
17
+ //# sourceMappingURL=color_gray.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color_gray.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/construct/color_gray.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;GAaG;AACH,kCARW,MAAM,UACN,MAAM,WACN,KAAK,GACH,KAAK,CASjB;sBApBqB,aAAa"}
@@ -0,0 +1,22 @@
1
+ import { assert } from "../../assert.js";
2
+ import { Color } from "../Color.js";
3
+
4
+ /**
5
+ * Build a neutral `Color` with all three channels at `value`.
6
+ *
7
+ * Space-agnostic like the class itself: a linear 0.5 and an encoded 0.5 are different greys, and this writes
8
+ * whichever one you hand it without comment.
9
+ *
10
+ * @param {number} value
11
+ * @param {number} [alpha]
12
+ * @param {Color} [output]
13
+ * @returns {Color} `output`
14
+ *
15
+ * @author Alex Goldring
16
+ * @copyright Company Named Limited (c) 2026
17
+ */
18
+ export function color_gray(value, alpha = 1, output = new Color()) {
19
+ assert.isNumber(value, 'value');
20
+
21
+ return output.set(value, value, value, alpha);
22
+ }
@@ -1,12 +1,2 @@
1
- /**
2
- *
3
- * @param {string} hex expect form #FFFFFF or #FFFFFFFF for RGBA
4
- * @returns {{r: number, g: number, b: number, a:number}} rgb
5
- */
6
- export function hex2rgb(hex: string): {
7
- r: number;
8
- g: number;
9
- b: number;
10
- a: number;
11
- };
1
+ export { hex_to_rgb as hex2rgb } from "./hex_to_rgb.js";
12
2
  //# sourceMappingURL=hex2rgb.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hex2rgb.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/hex/hex2rgb.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,6BAHW,MAAM,GACJ;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAC,MAAM,CAAA;CAAC,CAkBvD"}
1
+ {"version":3,"file":"hex2rgb.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/hex/hex2rgb.js"],"names":[],"mappings":""}
@@ -1,24 +1,7 @@
1
- import { hex2dec } from "../../binary/hex2dec.js";
2
-
3
- /**
4
- *
5
- * @param {string} hex expect form #FFFFFF or #FFFFFFFF for RGBA
6
- * @returns {{r: number, g: number, b: number, a:number}} rgb
7
- */
8
- export function hex2rgb(hex) {
9
-
10
-
11
- const result = {
12
- r: hex2dec(hex.slice(1, 3)),
13
- g: hex2dec(hex.slice(3, 5)),
14
- b: hex2dec(hex.slice(5, 7))
15
- };
16
-
17
- if (hex.length > 7) {
18
- result.a = hex2dec(hex.slice(7, 9));
19
- }else{
20
- result.a = 0xFF;
21
- }
22
-
23
- return result;
24
- }
1
+ /**
2
+ * @deprecated Renamed to `hex_to_rgb`, following the package's `name_to_name` convention.
3
+ *
4
+ * Kept as a re-export rather than removed: this is a library, and an import path is as much a published
5
+ * interface as a function signature.
6
+ */
7
+ export { hex_to_rgb as hex2rgb } from "./hex_to_rgb.js";
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Decode a CSS hex colour.
3
+ *
4
+ * Accepts all four CSS forms: `#RGB`, `#RGBA`, `#RRGGBB` and `#RRGGBBAA`. Anything else throws, naming the
5
+ * offending string — the short forms are the two most common ways to write a colour by hand, and decoding
6
+ * them by fixed byte offsets used to yield a `NaN` blue rather than an error.
7
+ *
8
+ * @param {string} hex `#RGB`, `#RGBA`, `#RRGGBB` or `#RRGGBBAA`
9
+ * @returns {{r: number, g: number, b: number, a:number}} channels in the Uint8 range (0...255)
10
+ * @throws Error if `hex` is not one of the four accepted forms
11
+ */
12
+ export function hex_to_rgb(hex: string): {
13
+ r: number;
14
+ g: number;
15
+ b: number;
16
+ a: number;
17
+ };
18
+ //# sourceMappingURL=hex_to_rgb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hex_to_rgb.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/hex/hex_to_rgb.js"],"names":[],"mappings":"AA4BA;;;;;;;;;;GAUG;AACH,gCAJW,MAAM,GACJ;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAC,MAAM,CAAA;CAAC,CAyBvD"}
@@ -0,0 +1,62 @@
1
+ import { hex2dec } from "../../binary/hex2dec.js";
2
+
3
+ /**
4
+ * The four CSS hex forms, and nothing else.
5
+ *
6
+ * Validating up front rather than letting {@link hex2dec} run on a bad slice: `parseInt` returns `NaN` for
7
+ * an out-of-range slice, and a `NaN` channel only surfaces several frames later, inside whichever consumer
8
+ * happens to assert. Worse, that consumer's guard is an `assert`, so a build with asserts stripped
9
+ * propagates the `NaN` instead of throwing.
10
+ *
11
+ * @type {RegExp}
12
+ */
13
+ const HEX_COLOR = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
14
+
15
+ /**
16
+ * Expand a single hex nibble to a byte, the way CSS does: `f` → `ff`, `3` → `33`.
17
+ *
18
+ * Duplicating the nibble rather than shifting it keeps the endpoints exact — `f` must land on 255, not 240.
19
+ *
20
+ * @param {string} nibble
21
+ * @returns {number}
22
+ */
23
+ function expand_nibble(nibble) {
24
+ const v = hex2dec(nibble);
25
+
26
+ return v * 0x11;
27
+ }
28
+
29
+ /**
30
+ * Decode a CSS hex colour.
31
+ *
32
+ * Accepts all four CSS forms: `#RGB`, `#RGBA`, `#RRGGBB` and `#RRGGBBAA`. Anything else throws, naming the
33
+ * offending string — the short forms are the two most common ways to write a colour by hand, and decoding
34
+ * them by fixed byte offsets used to yield a `NaN` blue rather than an error.
35
+ *
36
+ * @param {string} hex `#RGB`, `#RGBA`, `#RRGGBB` or `#RRGGBBAA`
37
+ * @returns {{r: number, g: number, b: number, a:number}} channels in the Uint8 range (0...255)
38
+ * @throws Error if `hex` is not one of the four accepted forms
39
+ */
40
+ export function hex_to_rgb(hex) {
41
+
42
+ if (typeof hex !== "string" || !HEX_COLOR.test(hex)) {
43
+ throw new Error(`Failed to decode hex color '${hex}', expected #RGB, #RGBA, #RRGGBB or #RRGGBBAA`);
44
+ }
45
+
46
+ if (hex.length <= 5) {
47
+ // short form, one nibble per channel
48
+ return {
49
+ r: expand_nibble(hex.charAt(1)),
50
+ g: expand_nibble(hex.charAt(2)),
51
+ b: expand_nibble(hex.charAt(3)),
52
+ a: hex.length === 5 ? expand_nibble(hex.charAt(4)) : 0xFF
53
+ };
54
+ }
55
+
56
+ return {
57
+ r: hex2dec(hex.slice(1, 3)),
58
+ g: hex2dec(hex.slice(3, 5)),
59
+ b: hex2dec(hex.slice(5, 7)),
60
+ a: hex.length === 9 ? hex2dec(hex.slice(7, 9)) : 0xFF
61
+ };
62
+ }
@@ -1,9 +1,2 @@
1
- /**
2
- * Takes values in 0..255 range
3
- * @param {number} r
4
- * @param {number} g
5
- * @param {number} b
6
- * @returns {string}
7
- */
8
- export function rgb2hex(r: number, g: number, b: number): string;
1
+ export { rgb_to_hex as rgb2hex } from "./rgb_to_hex.js";
9
2
  //# sourceMappingURL=rgb2hex.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rgb2hex.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/hex/rgb2hex.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,2BALW,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,CAKlB"}
1
+ {"version":3,"file":"rgb2hex.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/hex/rgb2hex.js"],"names":[],"mappings":""}
@@ -1,13 +1,7 @@
1
- import { dec2hex } from "../../binary/dec2hex.js";
2
-
3
- /**
4
- * Takes values in 0..255 range
5
- * @param {number} r
6
- * @param {number} g
7
- * @param {number} b
8
- * @returns {string}
9
- */
10
- export function rgb2hex(r, g, b) {
11
-
12
- return dec2hex(r) + dec2hex(g) + dec2hex(b);
13
- }
1
+ /**
2
+ * @deprecated Renamed to `rgb_to_hex`, following the package's `name_to_name` convention.
3
+ *
4
+ * Kept as a re-export rather than removed: this is a library, and an import path is as much a published
5
+ * interface as a function signature.
6
+ */
7
+ export { rgb_to_hex as rgb2hex } from "./rgb_to_hex.js";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Takes values in 0..255 range
3
+ * @param {number} r
4
+ * @param {number} g
5
+ * @param {number} b
6
+ * @returns {string}
7
+ */
8
+ export function rgb_to_hex(r: number, g: number, b: number): string;
9
+ //# sourceMappingURL=rgb_to_hex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rgb_to_hex.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/hex/rgb_to_hex.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,8BALW,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,CAKlB"}