@woosh/meep-engine 3.9.0 → 3.11.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 (832) hide show
  1. package/README.md +168 -152
  2. package/build/bundle-worker-image-decoder.js +1 -1
  3. package/build/bundle-worker-terrain.js +1 -1
  4. package/package.json +3 -2
  5. package/src/REVIEW_2026_08_06.md +610 -610
  6. package/src/avif/encode_image_source.d.ts +70 -0
  7. package/src/avif/encode_image_source.d.ts.map +1 -0
  8. package/src/avif/encode_image_source.js +117 -0
  9. package/src/avif/encoder_worker.js +15 -126
  10. package/src/avif/index.d.ts +4 -2
  11. package/src/avif/index.js +21 -2
  12. package/src/avif/native/DECISIONS.md +537 -0
  13. package/src/avif/native/NOTICE.md +61 -0
  14. package/src/avif/native/api/AvifDecoder.d.ts +67 -0
  15. package/src/avif/native/api/AvifDecoder.d.ts.map +1 -0
  16. package/src/avif/native/api/AvifDecoder.js +121 -0
  17. package/src/avif/native/api/apply_transformations.d.ts +30 -0
  18. package/src/avif/native/api/apply_transformations.d.ts.map +1 -0
  19. package/src/avif/native/api/apply_transformations.js +120 -0
  20. package/src/avif/native/api/avif_to_sampler2d.d.ts +25 -0
  21. package/src/avif/native/api/avif_to_sampler2d.d.ts.map +1 -0
  22. package/src/avif/native/api/avif_to_sampler2d.js +42 -0
  23. package/src/avif/native/api/convert_to_rgba.d.ts +54 -0
  24. package/src/avif/native/api/convert_to_rgba.d.ts.map +1 -0
  25. package/src/avif/native/api/convert_to_rgba.js +204 -0
  26. package/src/avif/native/api/decode_avif.d.ts +24 -0
  27. package/src/avif/native/api/decode_avif.d.ts.map +1 -0
  28. package/src/avif/native/api/decode_avif.js +111 -0
  29. package/src/avif/native/api/decode_image_item.d.ts +18 -0
  30. package/src/avif/native/api/decode_image_item.d.ts.map +1 -0
  31. package/src/avif/native/api/decode_image_item.js +234 -0
  32. package/src/avif/native/api/encode_avif.d.ts +73 -0
  33. package/src/avif/native/api/encode_avif.d.ts.map +1 -0
  34. package/src/avif/native/api/encode_avif.js +488 -0
  35. package/src/avif/native/api/sampler2d_to_avif.d.ts +22 -0
  36. package/src/avif/native/api/sampler2d_to_avif.d.ts.map +1 -0
  37. package/src/avif/native/api/sampler2d_to_avif.js +108 -0
  38. package/src/avif/native/av1/decode/Av1FrameContext.d.ts +286 -0
  39. package/src/avif/native/av1/decode/Av1FrameContext.d.ts.map +1 -0
  40. package/src/avif/native/av1/decode/Av1FrameContext.js +622 -0
  41. package/src/avif/native/av1/decode/block_decoded.d.ts +27 -0
  42. package/src/avif/native/av1/decode/block_decoded.d.ts.map +1 -0
  43. package/src/avif/native/av1/decode/block_decoded.js +59 -0
  44. package/src/avif/native/av1/decode/decode_av1_still.d.ts +22 -0
  45. package/src/avif/native/av1/decode/decode_av1_still.d.ts.map +1 -0
  46. package/src/avif/native/av1/decode/decode_av1_still.js +309 -0
  47. package/src/avif/native/av1/decode/decode_coefficients.d.ts +20 -0
  48. package/src/avif/native/av1/decode/decode_coefficients.d.ts.map +1 -0
  49. package/src/avif/native/av1/decode/decode_coefficients.js +259 -0
  50. package/src/avif/native/av1/decode/decode_palette.d.ts +28 -0
  51. package/src/avif/native/av1/decode/decode_palette.d.ts.map +1 -0
  52. package/src/avif/native/av1/decode/decode_palette.js +442 -0
  53. package/src/avif/native/av1/decode/decode_tile.d.ts +14 -0
  54. package/src/avif/native/av1/decode/decode_tile.d.ts.map +1 -0
  55. package/src/avif/native/av1/decode/decode_tile.js +1213 -0
  56. package/src/avif/native/av1/decode/get_scan.d.ts +16 -0
  57. package/src/avif/native/av1/decode/get_scan.d.ts.map +1 -0
  58. package/src/avif/native/av1/decode/get_scan.js +138 -0
  59. package/src/avif/native/av1/decode/read_lr.d.ts +35 -0
  60. package/src/avif/native/av1/decode/read_lr.d.ts.map +1 -0
  61. package/src/avif/native/av1/decode/read_lr.js +277 -0
  62. package/src/avif/native/av1/decode/read_transform_type.d.ts +19 -0
  63. package/src/avif/native/av1/decode/read_transform_type.d.ts.map +1 -0
  64. package/src/avif/native/av1/decode/read_transform_type.js +92 -0
  65. package/src/avif/native/av1/decode/reconstruct.d.ts +36 -0
  66. package/src/avif/native/av1/decode/reconstruct.d.ts.map +1 -0
  67. package/src/avif/native/av1/decode/reconstruct.js +241 -0
  68. package/src/avif/native/av1/decode/transform_type.d.ts +49 -0
  69. package/src/avif/native/av1/decode/transform_type.d.ts.map +1 -0
  70. package/src/avif/native/av1/decode/transform_type.js +137 -0
  71. package/src/avif/native/av1/encode/Av1BlockSnapshot.d.ts +81 -0
  72. package/src/avif/native/av1/encode/Av1BlockSnapshot.d.ts.map +1 -0
  73. package/src/avif/native/av1/encode/Av1BlockSnapshot.js +299 -0
  74. package/src/avif/native/av1/encode/Av1EncodeContext.d.ts +384 -0
  75. package/src/avif/native/av1/encode/Av1EncodeContext.d.ts.map +1 -0
  76. package/src/avif/native/av1/encode/Av1EncodeContext.js +590 -0
  77. package/src/avif/native/av1/encode/build_headers.d.ts +50 -0
  78. package/src/avif/native/av1/encode/build_headers.d.ts.map +1 -0
  79. package/src/avif/native/av1/encode/build_headers.js +359 -0
  80. package/src/avif/native/av1/encode/choose_chroma_alpha.d.ts +26 -0
  81. package/src/avif/native/av1/encode/choose_chroma_alpha.d.ts.map +1 -0
  82. package/src/avif/native/av1/encode/choose_chroma_alpha.js +90 -0
  83. package/src/avif/native/av1/encode/choose_filters.d.ts +21 -0
  84. package/src/avif/native/av1/encode/choose_filters.d.ts.map +1 -0
  85. package/src/avif/native/av1/encode/choose_filters.js +318 -0
  86. package/src/avif/native/av1/encode/choose_restoration.d.ts +35 -0
  87. package/src/avif/native/av1/encode/choose_restoration.d.ts.map +1 -0
  88. package/src/avif/native/av1/encode/choose_restoration.js +616 -0
  89. package/src/avif/native/av1/encode/decode_effort.d.ts +57 -0
  90. package/src/avif/native/av1/encode/decode_effort.d.ts.map +1 -0
  91. package/src/avif/native/av1/encode/decode_effort.js +59 -0
  92. package/src/avif/native/av1/encode/encode_av1_still.d.ts +17 -0
  93. package/src/avif/native/av1/encode/encode_av1_still.d.ts.map +1 -0
  94. package/src/avif/native/av1/encode/encode_av1_still.js +194 -0
  95. package/src/avif/native/av1/encode/encode_effort.d.ts +56 -0
  96. package/src/avif/native/av1/encode/encode_effort.d.ts.map +1 -0
  97. package/src/avif/native/av1/encode/encode_effort.js +97 -0
  98. package/src/avif/native/av1/encode/encode_tile.d.ts +26 -0
  99. package/src/avif/native/av1/encode/encode_tile.d.ts.map +1 -0
  100. package/src/avif/native/av1/encode/encode_tile.js +2331 -0
  101. package/src/avif/native/av1/encode/quantise.d.ts +51 -0
  102. package/src/avif/native/av1/encode/quantise.d.ts.map +1 -0
  103. package/src/avif/native/av1/encode/quantise.js +212 -0
  104. package/src/avif/native/av1/encode/write_coefficients.d.ts +42 -0
  105. package/src/avif/native/av1/encode/write_coefficients.d.ts.map +1 -0
  106. package/src/avif/native/av1/encode/write_coefficients.js +367 -0
  107. package/src/avif/native/av1/encode/write_lr.d.ts +33 -0
  108. package/src/avif/native/av1/encode/write_lr.d.ts.map +1 -0
  109. package/src/avif/native/av1/encode/write_lr.js +174 -0
  110. package/src/avif/native/av1/encode/write_transform_type.d.ts +21 -0
  111. package/src/avif/native/av1/encode/write_transform_type.d.ts.map +1 -0
  112. package/src/avif/native/av1/encode/write_transform_type.js +70 -0
  113. package/src/avif/native/av1/entropy/CdfContext.d.ts +167 -0
  114. package/src/avif/native/av1/entropy/CdfContext.d.ts.map +1 -0
  115. package/src/avif/native/av1/entropy/CdfContext.js +433 -0
  116. package/src/avif/native/av1/entropy/SymbolReader.d.ts +103 -0
  117. package/src/avif/native/av1/entropy/SymbolReader.d.ts.map +1 -0
  118. package/src/avif/native/av1/entropy/SymbolReader.js +317 -0
  119. package/src/avif/native/av1/entropy/SymbolWriter.d.ts +107 -0
  120. package/src/avif/native/av1/entropy/SymbolWriter.d.ts.map +1 -0
  121. package/src/avif/native/av1/entropy/SymbolWriter.js +352 -0
  122. package/src/avif/native/av1/entropy/coefficient_context.d.ts +71 -0
  123. package/src/avif/native/av1/entropy/coefficient_context.d.ts.map +1 -0
  124. package/src/avif/native/av1/entropy/coefficient_context.js +325 -0
  125. package/src/avif/native/av1/entropy/partition_cdf.d.ts +54 -0
  126. package/src/avif/native/av1/entropy/partition_cdf.d.ts.map +1 -0
  127. package/src/avif/native/av1/entropy/partition_cdf.js +98 -0
  128. package/src/avif/native/av1/entropy/symbol_cost.d.ts +37 -0
  129. package/src/avif/native/av1/entropy/symbol_cost.d.ts.map +1 -0
  130. package/src/avif/native/av1/entropy/symbol_cost.js +76 -0
  131. package/src/avif/native/av1/filter/cdef.d.ts +15 -0
  132. package/src/avif/native/av1/filter/cdef.d.ts.map +1 -0
  133. package/src/avif/native/av1/filter/cdef.js +313 -0
  134. package/src/avif/native/av1/filter/loop_filter.d.ts +14 -0
  135. package/src/avif/native/av1/filter/loop_filter.d.ts.map +1 -0
  136. package/src/avif/native/av1/filter/loop_filter.js +377 -0
  137. package/src/avif/native/av1/filter/loop_restoration.d.ts +42 -0
  138. package/src/avif/native/av1/filter/loop_restoration.d.ts.map +1 -0
  139. package/src/avif/native/av1/filter/loop_restoration.js +451 -0
  140. package/src/avif/native/av1/filter/superres.d.ts +18 -0
  141. package/src/avif/native/av1/filter/superres.d.ts.map +1 -0
  142. package/src/avif/native/av1/filter/superres.js +86 -0
  143. package/src/avif/native/av1/grain/FilmGrainState.d.ts +62 -0
  144. package/src/avif/native/av1/grain/FilmGrainState.d.ts.map +1 -0
  145. package/src/avif/native/av1/grain/FilmGrainState.js +87 -0
  146. package/src/avif/native/av1/grain/film_grain.d.ts +16 -0
  147. package/src/avif/native/av1/grain/film_grain.d.ts.map +1 -0
  148. package/src/avif/native/av1/grain/film_grain.js +623 -0
  149. package/src/avif/native/av1/obu/FrameHeader.d.ts +248 -0
  150. package/src/avif/native/av1/obu/FrameHeader.d.ts.map +1 -0
  151. package/src/avif/native/av1/obu/FrameHeader.js +381 -0
  152. package/src/avif/native/av1/obu/ObuHeader.d.ts +53 -0
  153. package/src/avif/native/av1/obu/ObuHeader.d.ts.map +1 -0
  154. package/src/avif/native/av1/obu/ObuHeader.js +62 -0
  155. package/src/avif/native/av1/obu/SequenceHeader.d.ts +157 -0
  156. package/src/avif/native/av1/obu/SequenceHeader.d.ts.map +1 -0
  157. package/src/avif/native/av1/obu/SequenceHeader.js +225 -0
  158. package/src/avif/native/av1/obu/for_each_obu.d.ts +24 -0
  159. package/src/avif/native/av1/obu/for_each_obu.d.ts.map +1 -0
  160. package/src/avif/native/av1/obu/for_each_obu.js +50 -0
  161. package/src/avif/native/av1/obu/parse_frame_header.d.ts +18 -0
  162. package/src/avif/native/av1/obu/parse_frame_header.d.ts.map +1 -0
  163. package/src/avif/native/av1/obu/parse_frame_header.js +841 -0
  164. package/src/avif/native/av1/obu/parse_obu_header.d.ts +23 -0
  165. package/src/avif/native/av1/obu/parse_obu_header.d.ts.map +1 -0
  166. package/src/avif/native/av1/obu/parse_obu_header.js +69 -0
  167. package/src/avif/native/av1/obu/parse_sequence_header.d.ts +17 -0
  168. package/src/avif/native/av1/obu/parse_sequence_header.d.ts.map +1 -0
  169. package/src/avif/native/av1/obu/parse_sequence_header.js +263 -0
  170. package/src/avif/native/av1/obu/write_frame_header.d.ts +16 -0
  171. package/src/avif/native/av1/obu/write_frame_header.d.ts.map +1 -0
  172. package/src/avif/native/av1/obu/write_frame_header.js +579 -0
  173. package/src/avif/native/av1/obu/write_sequence_header.d.ts +17 -0
  174. package/src/avif/native/av1/obu/write_sequence_header.d.ts.map +1 -0
  175. package/src/avif/native/av1/obu/write_sequence_header.js +189 -0
  176. package/src/avif/native/av1/predict/IntraPredictionState.d.ts +49 -0
  177. package/src/avif/native/av1/predict/IntraPredictionState.d.ts.map +1 -0
  178. package/src/avif/native/av1/predict/IntraPredictionState.js +58 -0
  179. package/src/avif/native/av1/predict/intra_filter_type.d.ts +17 -0
  180. package/src/avif/native/av1/predict/intra_filter_type.d.ts.map +1 -0
  181. package/src/avif/native/av1/predict/intra_filter_type.js +79 -0
  182. package/src/avif/native/av1/predict/predict_chroma_from_luma.d.ts +50 -0
  183. package/src/avif/native/av1/predict/predict_chroma_from_luma.d.ts.map +1 -0
  184. package/src/avif/native/av1/predict/predict_chroma_from_luma.js +153 -0
  185. package/src/avif/native/av1/predict/predict_intra.d.ts +42 -0
  186. package/src/avif/native/av1/predict/predict_intra.d.ts.map +1 -0
  187. package/src/avif/native/av1/predict/predict_intra.js +803 -0
  188. package/src/avif/native/av1/predict/predict_palette.d.ts +23 -0
  189. package/src/avif/native/av1/predict/predict_palette.d.ts.map +1 -0
  190. package/src/avif/native/av1/predict/predict_palette.js +36 -0
  191. package/src/avif/native/av1/tables/av1_symbols.d.ts +411 -0
  192. package/src/avif/native/av1/tables/av1_symbols.d.ts.map +1 -0
  193. package/src/avif/native/av1/tables/av1_symbols.js +419 -0
  194. package/src/avif/native/av1/tables/block_tables.d.ts +181 -0
  195. package/src/avif/native/av1/tables/block_tables.d.ts.map +1 -0
  196. package/src/avif/native/av1/tables/block_tables.js +270 -0
  197. package/src/avif/native/av1/tables/cdf_tables.d.ts +961 -0
  198. package/src/avif/native/av1/tables/cdf_tables.d.ts.map +1 -0
  199. package/src/avif/native/av1/tables/cdf_tables.js +1893 -0
  200. package/src/avif/native/av1/tables/coefficient_tables.d.ts +41 -0
  201. package/src/avif/native/av1/tables/coefficient_tables.d.ts.map +1 -0
  202. package/src/avif/native/av1/tables/coefficient_tables.js +82 -0
  203. package/src/avif/native/av1/tables/derived_block_tables.d.ts +15 -0
  204. package/src/avif/native/av1/tables/derived_block_tables.d.ts.map +1 -0
  205. package/src/avif/native/av1/tables/derived_block_tables.js +23 -0
  206. package/src/avif/native/av1/tables/filter_tables.d.ts +171 -0
  207. package/src/avif/native/av1/tables/filter_tables.d.ts.map +1 -0
  208. package/src/avif/native/av1/tables/filter_tables.js +313 -0
  209. package/src/avif/native/av1/tables/grain_tables.d.ts +11 -0
  210. package/src/avif/native/av1/tables/grain_tables.d.ts.map +1 -0
  211. package/src/avif/native/av1/tables/grain_tables.js +190 -0
  212. package/src/avif/native/av1/tables/prediction_tables.d.ts +141 -0
  213. package/src/avif/native/av1/tables/prediction_tables.d.ts.map +1 -0
  214. package/src/avif/native/av1/tables/prediction_tables.js +223 -0
  215. package/src/avif/native/av1/tables/quantizer_matrix_tables.d.ts +21 -0
  216. package/src/avif/native/av1/tables/quantizer_matrix_tables.d.ts.map +1 -0
  217. package/src/avif/native/av1/tables/quantizer_matrix_tables.js +38 -0
  218. package/src/avif/native/av1/tables/quantizer_tables.d.ts +21 -0
  219. package/src/avif/native/av1/tables/quantizer_tables.d.ts.map +1 -0
  220. package/src/avif/native/av1/tables/quantizer_tables.js +160 -0
  221. package/src/avif/native/av1/tables/scan_tables.d.ts +321 -0
  222. package/src/avif/native/av1/tables/scan_tables.d.ts.map +1 -0
  223. package/src/avif/native/av1/tables/scan_tables.js +727 -0
  224. package/src/avif/native/av1/tables/segmentation_tables.d.ts +31 -0
  225. package/src/avif/native/av1/tables/segmentation_tables.d.ts.map +1 -0
  226. package/src/avif/native/av1/tables/segmentation_tables.js +48 -0
  227. package/src/avif/native/av1/tables/transform_tables.d.ts +91 -0
  228. package/src/avif/native/av1/tables/transform_tables.d.ts.map +1 -0
  229. package/src/avif/native/av1/tables/transform_tables.js +140 -0
  230. package/src/avif/native/av1/tables/unpack_table.d.ts +33 -0
  231. package/src/avif/native/av1/tables/unpack_table.d.ts.map +1 -0
  232. package/src/avif/native/av1/tables/unpack_table.js +73 -0
  233. package/src/avif/native/av1/transform/forward_transform_2d.d.ts +61 -0
  234. package/src/avif/native/av1/transform/forward_transform_2d.d.ts.map +1 -0
  235. package/src/avif/native/av1/transform/forward_transform_2d.js +574 -0
  236. package/src/avif/native/av1/transform/inverse_transform_1d.d.ts +76 -0
  237. package/src/avif/native/av1/transform/inverse_transform_1d.d.ts.map +1 -0
  238. package/src/avif/native/av1/transform/inverse_transform_1d.js +590 -0
  239. package/src/avif/native/av1/transform/inverse_transform_2d.d.ts +46 -0
  240. package/src/avif/native/av1/transform/inverse_transform_2d.d.ts.map +1 -0
  241. package/src/avif/native/av1/transform/inverse_transform_2d.js +180 -0
  242. package/src/avif/native/av1/util/ceil_log2.d.ts +13 -0
  243. package/src/avif/native/av1/util/ceil_log2.d.ts.map +1 -0
  244. package/src/avif/native/av1/util/ceil_log2.js +18 -0
  245. package/src/avif/native/av1/util/floor_log2.d.ts +20 -0
  246. package/src/avif/native/av1/util/floor_log2.d.ts.map +1 -0
  247. package/src/avif/native/av1/util/floor_log2.js +20 -0
  248. package/src/avif/native/av1/util/round2.d.ts +22 -0
  249. package/src/avif/native/av1/util/round2.d.ts.map +1 -0
  250. package/src/avif/native/av1/util/round2.js +27 -0
  251. package/src/avif/native/av1/util/round2_signed.d.ts +14 -0
  252. package/src/avif/native/av1/util/round2_signed.d.ts.map +1 -0
  253. package/src/avif/native/av1/util/round2_signed.js +17 -0
  254. package/src/avif/native/av1/util/tile_log2.d.ts +16 -0
  255. package/src/avif/native/av1/util/tile_log2.d.ts.map +1 -0
  256. package/src/avif/native/av1/util/tile_log2.js +23 -0
  257. package/src/avif/native/bitstream/BitReader.d.ts +174 -0
  258. package/src/avif/native/bitstream/BitReader.d.ts.map +1 -0
  259. package/src/avif/native/bitstream/BitReader.js +391 -0
  260. package/src/avif/native/bitstream/BitWriter.d.ts +122 -0
  261. package/src/avif/native/bitstream/BitWriter.d.ts.map +1 -0
  262. package/src/avif/native/bitstream/BitWriter.js +351 -0
  263. package/src/avif/native/color/ColourTransform.d.ts +62 -0
  264. package/src/avif/native/color/ColourTransform.d.ts.map +1 -0
  265. package/src/avif/native/color/ColourTransform.js +189 -0
  266. package/src/avif/native/color/YuvImage.d.ts +51 -0
  267. package/src/avif/native/color/YuvImage.d.ts.map +1 -0
  268. package/src/avif/native/color/YuvImage.js +66 -0
  269. package/src/avif/native/color/clamp_sample.d.ts +18 -0
  270. package/src/avif/native/color/clamp_sample.d.ts.map +1 -0
  271. package/src/avif/native/color/clamp_sample.js +25 -0
  272. package/src/avif/native/color/linear_to_transfer.d.ts +24 -0
  273. package/src/avif/native/color/linear_to_transfer.d.ts.map +1 -0
  274. package/src/avif/native/color/linear_to_transfer.js +126 -0
  275. package/src/avif/native/color/primaries.d.ts +20 -0
  276. package/src/avif/native/color/primaries.d.ts.map +1 -0
  277. package/src/avif/native/color/primaries.js +94 -0
  278. package/src/avif/native/color/rgb_row_to_ycbcr.d.ts +20 -0
  279. package/src/avif/native/color/rgb_row_to_ycbcr.d.ts.map +1 -0
  280. package/src/avif/native/color/rgb_row_to_ycbcr.js +78 -0
  281. package/src/avif/native/color/transfer_to_linear.d.ts +49 -0
  282. package/src/avif/native/color/transfer_to_linear.d.ts.map +1 -0
  283. package/src/avif/native/color/transfer_to_linear.js +171 -0
  284. package/src/avif/native/color/upsample_chroma_row.d.ts +35 -0
  285. package/src/avif/native/color/upsample_chroma_row.d.ts.map +1 -0
  286. package/src/avif/native/color/upsample_chroma_row.js +89 -0
  287. package/src/avif/native/color/ycbcr_row_to_rgb.d.ts +23 -0
  288. package/src/avif/native/color/ycbcr_row_to_rgb.d.ts.map +1 -0
  289. package/src/avif/native/color/ycbcr_row_to_rgb.js +78 -0
  290. package/src/avif/native/heif/AvifFile.d.ts +112 -0
  291. package/src/avif/native/heif/AvifFile.d.ts.map +1 -0
  292. package/src/avif/native/heif/AvifFile.js +142 -0
  293. package/src/avif/native/heif/ItemProperty.d.ts +244 -0
  294. package/src/avif/native/heif/ItemProperty.d.ts.map +1 -0
  295. package/src/avif/native/heif/ItemProperty.js +321 -0
  296. package/src/avif/native/heif/find_item_property.d.ts +17 -0
  297. package/src/avif/native/heif/find_item_property.d.ts.map +1 -0
  298. package/src/avif/native/heif/find_item_property.js +28 -0
  299. package/src/avif/native/heif/find_item_references.d.ts +16 -0
  300. package/src/avif/native/heif/find_item_references.d.ts.map +1 -0
  301. package/src/avif/native/heif/find_item_references.js +29 -0
  302. package/src/avif/native/heif/find_items_referencing.d.ts +17 -0
  303. package/src/avif/native/heif/find_items_referencing.d.ts.map +1 -0
  304. package/src/avif/native/heif/find_items_referencing.js +36 -0
  305. package/src/avif/native/heif/parse_avif_file.d.ts +15 -0
  306. package/src/avif/native/heif/parse_avif_file.d.ts.map +1 -0
  307. package/src/avif/native/heif/parse_avif_file.js +383 -0
  308. package/src/avif/native/heif/parse_image_grid.d.ts +18 -0
  309. package/src/avif/native/heif/parse_image_grid.d.ts.map +1 -0
  310. package/src/avif/native/heif/parse_image_grid.js +48 -0
  311. package/src/avif/native/heif/parse_item_property.d.ts +18 -0
  312. package/src/avif/native/heif/parse_item_property.d.ts.map +1 -0
  313. package/src/avif/native/heif/parse_item_property.js +243 -0
  314. package/src/avif/native/heif/read_item_data.d.ts +22 -0
  315. package/src/avif/native/heif/read_item_data.d.ts.map +1 -0
  316. package/src/avif/native/heif/read_item_data.js +97 -0
  317. package/src/avif/native/heif/write_avif_file.d.ts +50 -0
  318. package/src/avif/native/heif/write_avif_file.d.ts.map +1 -0
  319. package/src/avif/native/heif/write_avif_file.js +348 -0
  320. package/src/avif/native/heif/write_item_property.d.ts +16 -0
  321. package/src/avif/native/heif/write_item_property.d.ts.map +1 -0
  322. package/src/avif/native/heif/write_item_property.js +182 -0
  323. package/src/avif/native/index.d.ts +14 -0
  324. package/src/avif/native/index.d.ts.map +1 -0
  325. package/src/avif/native/index.js +56 -0
  326. package/src/avif/native/isobmff/BoxHeader.d.ts +50 -0
  327. package/src/avif/native/isobmff/BoxHeader.d.ts.map +1 -0
  328. package/src/avif/native/isobmff/BoxHeader.js +57 -0
  329. package/src/avif/native/isobmff/BoxWriter.d.ts +118 -0
  330. package/src/avif/native/isobmff/BoxWriter.d.ts.map +1 -0
  331. package/src/avif/native/isobmff/BoxWriter.js +264 -0
  332. package/src/avif/native/isobmff/ByteCursor.d.ts +125 -0
  333. package/src/avif/native/isobmff/ByteCursor.d.ts.map +1 -0
  334. package/src/avif/native/isobmff/ByteCursor.js +298 -0
  335. package/src/avif/native/isobmff/for_each_box.d.ts +23 -0
  336. package/src/avif/native/isobmff/for_each_box.d.ts.map +1 -0
  337. package/src/avif/native/isobmff/for_each_box.js +39 -0
  338. package/src/avif/native/isobmff/read_box_header.d.ts +22 -0
  339. package/src/avif/native/isobmff/read_box_header.d.ts.map +1 -0
  340. package/src/avif/native/isobmff/read_box_header.js +59 -0
  341. package/src/avif/native/isobmff/read_full_box_header.d.ts +26 -0
  342. package/src/avif/native/isobmff/read_full_box_header.d.ts.map +1 -0
  343. package/src/avif/native/isobmff/read_full_box_header.js +33 -0
  344. package/src/avif/threaded_image_encoder.d.ts +7 -2
  345. package/src/avif/threaded_image_encoder.d.ts.map +1 -1
  346. package/src/avif/threaded_image_encoder.js +107 -21
  347. package/src/core/binary/BinaryBuffer.d.ts +40 -0
  348. package/src/core/binary/BinaryBuffer.d.ts.map +1 -1
  349. package/src/core/binary/BinaryBuffer.js +100 -0
  350. package/src/core/binary/hash/crc32.d.ts +16 -0
  351. package/src/core/binary/hash/crc32.d.ts.map +1 -0
  352. package/src/core/binary/hash/crc32.js +96 -0
  353. package/src/core/binary/utf8/utf8_decode.d.ts +21 -0
  354. package/src/core/binary/utf8/utf8_decode.d.ts.map +1 -0
  355. package/src/core/binary/utf8/utf8_decode.js +43 -0
  356. package/src/core/binary/utf8/utf8_encode_into.d.ts +20 -0
  357. package/src/core/binary/utf8/utf8_encode_into.d.ts.map +1 -0
  358. package/src/core/binary/utf8/utf8_encode_into.js +48 -0
  359. package/src/core/binary/utf8/utf8_encoded_length.d.ts +14 -0
  360. package/src/core/binary/utf8/utf8_encoded_length.d.ts.map +1 -0
  361. package/src/core/binary/utf8/utf8_encoded_length.js +36 -0
  362. package/src/core/color/COLOR_FIX_PLAN_2026_08_28.md +417 -0
  363. package/src/core/color/COLOR_REVIEW_2026_08_28.md +779 -0
  364. package/src/core/color/Color.d.ts +128 -20
  365. package/src/core/color/Color.d.ts.map +1 -1
  366. package/src/core/color/Color.js +959 -866
  367. package/src/core/color/PQ/PQ_constants.d.ts +10 -0
  368. package/src/core/color/PQ/PQ_constants.d.ts.map +1 -1
  369. package/src/core/color/PQ/PQ_constants.js +10 -0
  370. package/src/core/color/PQ/linear_to_PQ.d.ts.map +1 -1
  371. package/src/core/color/PQ/linear_to_PQ.js +6 -0
  372. package/src/core/color/REC709_PRIMARIES.d.ts +50 -0
  373. package/src/core/color/REC709_PRIMARIES.d.ts.map +1 -0
  374. package/src/core/color/REC709_PRIMARIES.js +53 -0
  375. package/src/core/color/construct/color_from_hex.d.ts +21 -0
  376. package/src/core/color/construct/color_from_hex.d.ts.map +1 -0
  377. package/src/core/color/construct/color_from_hex.js +33 -0
  378. package/src/core/color/construct/color_from_temperature.d.ts +22 -0
  379. package/src/core/color/construct/color_from_temperature.d.ts.map +1 -0
  380. package/src/core/color/construct/color_from_temperature.js +33 -0
  381. package/src/core/color/construct/color_from_uint24.d.ts +19 -0
  382. package/src/core/color/construct/color_from_uint24.d.ts.map +1 -0
  383. package/src/core/color/construct/color_from_uint24.js +26 -0
  384. package/src/core/color/construct/color_from_uint32.d.ts +20 -0
  385. package/src/core/color/construct/color_from_uint32.d.ts.map +1 -0
  386. package/src/core/color/construct/color_from_uint32.js +39 -0
  387. package/src/core/color/construct/color_gray.d.ts +17 -0
  388. package/src/core/color/construct/color_gray.d.ts.map +1 -0
  389. package/src/core/color/construct/color_gray.js +22 -0
  390. package/src/core/color/hex/hex2rgb.d.ts +1 -11
  391. package/src/core/color/hex/hex2rgb.d.ts.map +1 -1
  392. package/src/core/color/hex/hex2rgb.js +7 -24
  393. package/src/core/color/hex/hex_to_rgb.d.ts +18 -0
  394. package/src/core/color/hex/hex_to_rgb.d.ts.map +1 -0
  395. package/src/core/color/hex/hex_to_rgb.js +62 -0
  396. package/src/core/color/hex/rgb2hex.d.ts +1 -8
  397. package/src/core/color/hex/rgb2hex.d.ts.map +1 -1
  398. package/src/core/color/hex/rgb2hex.js +7 -13
  399. package/src/core/color/hex/rgb_to_hex.d.ts +9 -0
  400. package/src/core/color/hex/rgb_to_hex.d.ts.map +1 -0
  401. package/src/core/color/hex/rgb_to_hex.js +13 -0
  402. package/src/core/color/hex/rgba_to_hex.d.ts +19 -0
  403. package/src/core/color/hex/rgba_to_hex.d.ts.map +1 -0
  404. package/src/core/color/hex/rgba_to_hex.js +23 -0
  405. package/src/core/color/hsv/hsv2rgb.d.ts +1 -12
  406. package/src/core/color/hsv/hsv2rgb.d.ts.map +1 -1
  407. package/src/core/color/hsv/hsv2rgb.js +8 -21
  408. package/src/core/color/hsv/hsv2rgb_float.d.ts +1 -12
  409. package/src/core/color/hsv/hsv2rgb_float.d.ts.map +1 -1
  410. package/src/core/color/hsv/hsv2rgb_float.js +8 -56
  411. package/src/core/color/hsv/hsv_to_rgb.d.ts +13 -0
  412. package/src/core/color/hsv/hsv_to_rgb.d.ts.map +1 -0
  413. package/src/core/color/hsv/hsv_to_rgb.js +39 -0
  414. package/src/core/color/hsv/hsv_to_rgb_uint8.d.ts +13 -0
  415. package/src/core/color/hsv/hsv_to_rgb_uint8.d.ts.map +1 -0
  416. package/src/core/color/hsv/hsv_to_rgb_uint8.js +21 -0
  417. package/src/core/color/hsv/hue_to_rgb_sextant.d.ts +24 -0
  418. package/src/core/color/hsv/hue_to_rgb_sextant.d.ts.map +1 -0
  419. package/src/core/color/hsv/hue_to_rgb_sextant.js +67 -0
  420. package/src/core/color/hsv/rgb2hsv.d.ts +1 -12
  421. package/src/core/color/hsv/rgb2hsv.d.ts.map +1 -1
  422. package/src/core/color/hsv/rgb2hsv.js +7 -42
  423. package/src/core/color/hsv/rgb_to_hsv.d.ts +13 -0
  424. package/src/core/color/hsv/rgb_to_hsv.d.ts.map +1 -0
  425. package/src/core/color/hsv/rgb_to_hsv.js +42 -0
  426. package/src/core/color/hunt/hpe_to_xyz.d.ts +2 -0
  427. package/src/core/color/hunt/hpe_to_xyz.d.ts.map +1 -0
  428. package/src/core/color/hunt/hpe_to_xyz.js +4 -0
  429. package/src/core/color/hunt/xyz_to_hpe.d.ts +1 -6
  430. package/src/core/color/hunt/xyz_to_hpe.d.ts.map +1 -1
  431. package/src/core/color/hunt/xyz_to_hpe.js +12 -15
  432. package/src/core/color/illuminant/D65_spd_tabulated.d.ts.map +1 -1
  433. package/src/core/color/illuminant/D65_spd_tabulated.js +107 -104
  434. package/src/core/color/int2rgb.d.ts +1 -10
  435. package/src/core/color/int2rgb.d.ts.map +1 -1
  436. package/src/core/color/int2rgb.js +7 -12
  437. package/src/core/color/int_to_rgb.d.ts +21 -0
  438. package/src/core/color/int_to_rgb.d.ts.map +1 -0
  439. package/src/core/color/int_to_rgb.js +33 -0
  440. package/src/core/color/kelvin/kelvin_to_rgb.d.ts.map +1 -1
  441. package/src/core/color/kelvin/kelvin_to_rgb.js +22 -2
  442. package/src/core/color/kelvin/rgb_to_kelvin.d.ts +22 -2
  443. package/src/core/color/kelvin/rgb_to_kelvin.d.ts.map +1 -1
  444. package/src/core/color/kelvin/rgb_to_kelvin.js +22 -2
  445. package/src/core/color/lab/lab_to_xyz.d.ts +20 -0
  446. package/src/core/color/lab/lab_to_xyz.d.ts.map +1 -0
  447. package/src/core/color/lab/lab_to_xyz.js +69 -0
  448. package/src/core/color/oklab/gamut_clip_adaptive_l0.d.ts +34 -0
  449. package/src/core/color/oklab/gamut_clip_adaptive_l0.d.ts.map +1 -0
  450. package/src/core/color/oklab/gamut_clip_adaptive_l0.js +46 -0
  451. package/src/core/color/oklab/gamut_clip_at_l0.d.ts +33 -0
  452. package/src/core/color/oklab/gamut_clip_at_l0.d.ts.map +1 -0
  453. package/src/core/color/oklab/gamut_clip_at_l0.js +84 -0
  454. package/src/core/color/oklab/gamut_clip_preserve_chroma.d.ts +24 -0
  455. package/src/core/color/oklab/gamut_clip_preserve_chroma.d.ts.map +1 -0
  456. package/src/core/color/oklab/gamut_clip_preserve_chroma.js +37 -0
  457. package/src/core/color/oklab/gamut_clip_project_to_lcusp.d.ts +23 -0
  458. package/src/core/color/oklab/gamut_clip_project_to_lcusp.d.ts.map +1 -0
  459. package/src/core/color/oklab/gamut_clip_project_to_lcusp.js +46 -0
  460. package/src/core/color/oklab/linear_srgb_to_okhsl.d.ts +19 -0
  461. package/src/core/color/oklab/linear_srgb_to_okhsl.d.ts.map +1 -0
  462. package/src/core/color/oklab/linear_srgb_to_okhsl.js +93 -0
  463. package/src/core/color/oklab/linear_srgb_to_okhsv.d.ts +12 -4
  464. package/src/core/color/oklab/linear_srgb_to_okhsv.d.ts.map +1 -1
  465. package/src/core/color/oklab/linear_srgb_to_okhsv.js +108 -84
  466. package/src/core/color/oklab/linear_srgb_to_oklab.d.ts +13 -4
  467. package/src/core/color/oklab/linear_srgb_to_oklab.d.ts.map +1 -1
  468. package/src/core/color/oklab/linear_srgb_to_oklab.js +28 -19
  469. package/src/core/color/oklab/okhsl_chroma_bounds.d.ts +51 -0
  470. package/src/core/color/oklab/okhsl_chroma_bounds.d.ts.map +1 -0
  471. package/src/core/color/oklab/okhsl_chroma_bounds.js +128 -0
  472. package/src/core/color/oklab/okhsl_to_linear_srgb.d.ts +19 -0
  473. package/src/core/color/oklab/okhsl_to_linear_srgb.d.ts.map +1 -0
  474. package/src/core/color/oklab/okhsl_to_linear_srgb.js +85 -0
  475. package/src/core/color/oklab/oklab_to_oklch.d.ts +24 -0
  476. package/src/core/color/oklab/oklab_to_oklch.d.ts.map +1 -0
  477. package/src/core/color/oklab/oklab_to_oklch.js +35 -0
  478. package/src/core/color/oklab/oklch_to_oklab.d.ts +18 -0
  479. package/src/core/color/oklab/oklch_to_oklab.d.ts.map +1 -0
  480. package/src/core/color/oklab/oklch_to_oklab.js +26 -0
  481. package/src/core/color/oklab/toe.d.ts +12 -0
  482. package/src/core/color/oklab/toe.d.ts.map +1 -1
  483. package/src/core/color/oklab/toe.js +34 -22
  484. package/src/core/color/operations/color_add.d.ts +21 -0
  485. package/src/core/color/operations/color_add.d.ts.map +1 -0
  486. package/src/core/color/operations/color_add.js +23 -0
  487. package/src/core/color/operations/color_add_scaled.d.ts +20 -0
  488. package/src/core/color/operations/color_add_scaled.d.ts.map +1 -0
  489. package/src/core/color/operations/color_add_scaled.js +30 -0
  490. package/src/core/color/operations/color_clamp.d.ts +22 -0
  491. package/src/core/color/operations/color_clamp.d.ts.map +1 -0
  492. package/src/core/color/operations/color_clamp.js +25 -0
  493. package/src/core/color/operations/color_darken.d.ts +2 -1
  494. package/src/core/color/operations/color_darken.d.ts.map +1 -1
  495. package/src/core/color/operations/color_darken.js +25 -24
  496. package/src/core/color/operations/color_desaturate.d.ts +2 -1
  497. package/src/core/color/operations/color_desaturate.d.ts.map +1 -1
  498. package/src/core/color/operations/color_desaturate.js +25 -24
  499. package/src/core/color/operations/color_get_hsl.d.ts +18 -0
  500. package/src/core/color/operations/color_get_hsl.d.ts.map +1 -0
  501. package/src/core/color/operations/color_get_hsl.js +60 -0
  502. package/src/core/color/operations/color_is_in_gamut.d.ts +20 -0
  503. package/src/core/color/operations/color_is_in_gamut.d.ts.map +1 -0
  504. package/src/core/color/operations/color_is_in_gamut.js +30 -0
  505. package/src/core/color/operations/color_lerp.d.ts +12 -3
  506. package/src/core/color/operations/color_lerp.d.ts.map +1 -1
  507. package/src/core/color/operations/color_lerp.js +55 -46
  508. package/src/core/color/operations/color_lighten.d.ts +9 -5
  509. package/src/core/color/operations/color_lighten.d.ts.map +1 -1
  510. package/src/core/color/operations/color_lighten.js +29 -24
  511. package/src/core/color/operations/color_mix_okhsv_channel.d.ts +24 -0
  512. package/src/core/color/operations/color_mix_okhsv_channel.d.ts.map +1 -0
  513. package/src/core/color/operations/color_mix_okhsv_channel.js +48 -0
  514. package/src/core/color/operations/color_multiply_rgb.d.ts +21 -0
  515. package/src/core/color/operations/color_multiply_rgb.d.ts.map +1 -0
  516. package/src/core/color/operations/color_multiply_rgb.js +26 -0
  517. package/src/core/color/operations/color_saturate.d.ts +9 -5
  518. package/src/core/color/operations/color_saturate.d.ts.map +1 -1
  519. package/src/core/color/operations/color_saturate.js +29 -24
  520. package/src/core/color/operations/color_scale_okhsv_channel.d.ts +1 -1
  521. package/src/core/color/operations/color_scale_okhsv_channel.d.ts.map +1 -1
  522. package/src/core/color/operations/color_scale_okhsv_channel.js +58 -45
  523. package/src/core/color/operations/color_srgb_apply.d.ts +28 -0
  524. package/src/core/color/operations/color_srgb_apply.d.ts.map +1 -0
  525. package/src/core/color/operations/color_srgb_apply.js +40 -0
  526. package/src/core/color/operations/color_sub.d.ts +16 -0
  527. package/src/core/color/operations/color_sub.d.ts.map +1 -0
  528. package/src/core/color/operations/color_sub.js +18 -0
  529. package/src/core/color/parse_color.d.ts +10 -1
  530. package/src/core/color/parse_color.d.ts.map +1 -1
  531. package/src/core/color/parse_color.js +100 -84
  532. package/src/core/color/parse_color_normalized.d.ts +24 -0
  533. package/src/core/color/parse_color_normalized.d.ts.map +1 -0
  534. package/src/core/color/parse_color_normalized.js +38 -0
  535. package/src/core/color/rgb2uint24.d.ts +1 -8
  536. package/src/core/color/rgb2uint24.d.ts.map +1 -1
  537. package/src/core/color/rgb2uint24.js +7 -20
  538. package/src/core/color/rgb2uint32.d.ts +1 -9
  539. package/src/core/color/rgb2uint32.d.ts.map +1 -1
  540. package/src/core/color/rgb2uint32.js +7 -18
  541. package/src/core/color/rgb_to_luminance.d.ts +14 -5
  542. package/src/core/color/rgb_to_luminance.d.ts.map +1 -1
  543. package/src/core/color/rgb_to_luminance.js +24 -13
  544. package/src/core/color/rgb_to_uint24.d.ts +9 -0
  545. package/src/core/color/rgb_to_uint24.d.ts.map +1 -0
  546. package/src/core/color/rgb_to_uint24.js +20 -0
  547. package/src/core/color/rgb_to_uint32.d.ts +10 -0
  548. package/src/core/color/rgb_to_uint32.d.ts.map +1 -0
  549. package/src/core/color/rgb_to_uint32.js +21 -0
  550. package/src/core/color/sRGB/linear_to_sRGB.d.ts +7 -0
  551. package/src/core/color/sRGB/linear_to_sRGB.d.ts.map +1 -1
  552. package/src/core/color/sRGB/linear_to_sRGB.js +39 -32
  553. package/src/core/color/xyz/hpe_to_xyz.d.ts +24 -0
  554. package/src/core/color/xyz/hpe_to_xyz.d.ts.map +1 -0
  555. package/src/core/color/xyz/hpe_to_xyz.js +39 -0
  556. package/src/core/color/xyz/rgb_to_xyz.d.ts +17 -2
  557. package/src/core/color/xyz/rgb_to_xyz.d.ts.map +1 -1
  558. package/src/core/color/xyz/rgb_to_xyz.js +44 -18
  559. package/src/core/color/xyz/xyz_cmf_tabulated.d.ts.map +1 -1
  560. package/src/core/color/xyz/xyz_cmf_tabulated.js +217 -211
  561. package/src/core/color/xyz/xyz_cmf_wyman.d.ts +4 -0
  562. package/src/core/color/xyz/xyz_cmf_wyman.d.ts.map +1 -1
  563. package/src/core/color/xyz/xyz_cmf_wyman.js +74 -65
  564. package/src/core/color/xyz/xyz_to_hpe.d.ts +18 -0
  565. package/src/core/color/xyz/xyz_to_hpe.d.ts.map +1 -0
  566. package/src/core/color/xyz/xyz_to_hpe.js +33 -0
  567. package/src/core/color/xyz/xyz_to_rgb.d.ts +17 -2
  568. package/src/core/color/xyz/xyz_to_rgb.d.ts.map +1 -1
  569. package/src/core/color/xyz/xyz_to_rgb.js +39 -16
  570. package/src/core/color/ycxcz/xyz_to_ycxcz.d.ts +7 -2
  571. package/src/core/color/ycxcz/xyz_to_ycxcz.d.ts.map +1 -1
  572. package/src/core/color/ycxcz/xyz_to_ycxcz.js +33 -28
  573. package/src/core/events/signal/Signal.js +820 -820
  574. package/src/core/geom/3d/shape/ConvexHullShape3D.d.ts.map +1 -1
  575. package/src/core/geom/3d/shape/ConvexHullShape3D.js +28 -4
  576. package/src/core/math/clamp_index.d.ts +18 -0
  577. package/src/core/math/clamp_index.d.ts.map +1 -0
  578. package/src/core/math/clamp_index.js +23 -0
  579. package/src/engine/asset/loaders/image/IMAGE_CODEC_REVIEW_2026_08_28.md +803 -0
  580. package/src/engine/asset/loaders/image/jpeg/JpegFrame.d.ts +5 -3
  581. package/src/engine/asset/loaders/image/jpeg/JpegFrame.d.ts.map +1 -1
  582. package/src/engine/asset/loaders/image/jpeg/JpegFrame.js +5 -3
  583. package/src/engine/asset/loaders/image/jpeg/JpegFrameComponent.d.ts +2 -1
  584. package/src/engine/asset/loaders/image/jpeg/JpegFrameComponent.d.ts.map +1 -1
  585. package/src/engine/asset/loaders/image/jpeg/JpegFrameComponent.js +2 -1
  586. package/src/engine/asset/loaders/image/jpeg/JpegImage.d.ts +17 -0
  587. package/src/engine/asset/loaders/image/jpeg/JpegImage.d.ts.map +1 -1
  588. package/src/engine/asset/loaders/image/jpeg/JpegImage.js +197 -157
  589. package/src/engine/asset/loaders/image/jpeg/idct8x8_float.d.ts +0 -1
  590. package/src/engine/asset/loaders/image/jpeg/idct8x8_float.d.ts.map +1 -1
  591. package/src/engine/asset/loaders/image/jpeg/idct8x8_float.js +0 -1
  592. package/src/engine/asset/loaders/image/jpeg/jpeg_component_row.d.ts +28 -0
  593. package/src/engine/asset/loaders/image/jpeg/jpeg_component_row.d.ts.map +1 -0
  594. package/src/engine/asset/loaders/image/jpeg/jpeg_component_row.js +31 -0
  595. package/src/engine/asset/loaders/image/png/PNG.d.ts +3 -18
  596. package/src/engine/asset/loaders/image/png/PNG.d.ts.map +1 -1
  597. package/src/engine/asset/loaders/image/png/PNG.js +3 -139
  598. package/src/engine/asset/loaders/image/png/PNGReader.d.ts +16 -16
  599. package/src/engine/asset/loaders/image/png/PNGReader.d.ts.map +1 -1
  600. package/src/engine/asset/loaders/image/png/PNGReader.js +143 -160
  601. package/src/engine/asset/loaders/image/png/chunk/png_chunk_decode_iTXt.js +3 -3
  602. package/src/engine/asset/loaders/image/png/chunk/png_chunk_decode_zTXt.js +3 -3
  603. package/src/engine/asset/loaders/image/png/crc32.d.ts +1 -15
  604. package/src/engine/asset/loaders/image/png/crc32.d.ts.map +1 -1
  605. package/src/engine/asset/loaders/image/png/crc32.js +5 -89
  606. package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterNone.d.ts +12 -10
  607. package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterNone.d.ts.map +1 -1
  608. package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterNone.js +20 -45
  609. package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterSub.d.ts +2 -1
  610. package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterSub.d.ts.map +1 -1
  611. package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterSub.js +2 -0
  612. package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterUp.d.ts +2 -1
  613. package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterUp.d.ts.map +1 -1
  614. package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterUp.js +2 -0
  615. package/src/engine/asset/loaders/image/png/filter/png_unfilter.d.ts +22 -0
  616. package/src/engine/asset/loaders/image/png/filter/png_unfilter.d.ts.map +1 -0
  617. package/src/engine/asset/loaders/image/png/filter/png_unfilter.js +68 -0
  618. package/src/engine/asset/loaders/image/png/png_inflate.d.ts +20 -0
  619. package/src/engine/asset/loaders/image/png/png_inflate.d.ts.map +1 -0
  620. package/src/engine/asset/loaders/image/png/png_inflate.js +85 -0
  621. package/src/engine/asset/loaders/image/png/png_unpack_samples.d.ts +22 -0
  622. package/src/engine/asset/loaders/image/png/png_unpack_samples.d.ts.map +1 -0
  623. package/src/engine/asset/loaders/image/png/png_unpack_samples.js +38 -0
  624. package/src/engine/graphics/ecs/sprite/SpriteSystemPE.d.ts.map +1 -1
  625. package/src/engine/graphics/ecs/sprite/SpriteSystemPE.js +135 -132
  626. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts +16 -3
  627. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts.map +1 -1
  628. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +1157 -1149
  629. package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts +26 -0
  630. package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts.map +1 -1
  631. package/src/engine/graphics/render/frame_graph/FrameGraph.js +947 -900
  632. package/src/engine/physics/ecs/PhysicsSystem.d.ts +69 -81
  633. package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
  634. package/src/engine/physics/ecs/PhysicsSystem.js +83 -77
  635. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  636. package/src/shade/device/IMMEDIATE_DATA_PLAN_2026_08_28.md +451 -0
  637. package/src/shade/device/ShadeGPUCommandContext.d.ts +21 -0
  638. package/src/shade/device/ShadeGPUCommandContext.d.ts.map +1 -1
  639. package/src/shade/device/ShadeGPUCommandContext.js +940 -749
  640. package/src/shade/device/timing/GPUTimerArray.d.ts +22 -4
  641. package/src/shade/device/timing/GPUTimerArray.d.ts.map +1 -1
  642. package/src/shade/device/timing/GPUTimerArray.js +88 -14
  643. package/src/shade/device/timing/GPU_PROFILER_PROPOSAL_2026_08_28.md +876 -0
  644. package/src/shade/device/timing/profile/GPUFrameRecorder.d.ts +93 -0
  645. package/src/shade/device/timing/profile/GPUFrameRecorder.d.ts.map +1 -0
  646. package/src/shade/device/timing/profile/GPUFrameRecorder.js +297 -0
  647. package/src/shade/device/timing/profile/GPUProfileCapture.d.ts +62 -0
  648. package/src/shade/device/timing/profile/GPUProfileCapture.d.ts.map +1 -0
  649. package/src/shade/device/timing/profile/GPUProfileCapture.js +77 -0
  650. package/src/shade/device/timing/profile/GPUProfileFrame.d.ts +73 -0
  651. package/src/shade/device/timing/profile/GPUProfileFrame.d.ts.map +1 -0
  652. package/src/shade/device/timing/profile/GPUProfileFrame.js +88 -0
  653. package/src/shade/device/timing/profile/GPUProfileLevel.d.ts +20 -0
  654. package/src/shade/device/timing/profile/GPUProfileLevel.d.ts.map +1 -0
  655. package/src/shade/device/timing/profile/GPUProfileLevel.js +50 -0
  656. package/src/shade/device/timing/profile/GPUProfileMeta.d.ts +63 -0
  657. package/src/shade/device/timing/profile/GPUProfileMeta.d.ts.map +1 -0
  658. package/src/shade/device/timing/profile/GPUProfileMeta.js +73 -0
  659. package/src/shade/device/timing/profile/GPUProfileSession.d.ts +173 -0
  660. package/src/shade/device/timing/profile/GPUProfileSession.d.ts.map +1 -0
  661. package/src/shade/device/timing/profile/GPUProfileSession.js +470 -0
  662. package/src/shade/device/timing/profile/GPUProfileSpan.d.ts +60 -0
  663. package/src/shade/device/timing/profile/GPUProfileSpan.d.ts.map +1 -0
  664. package/src/shade/device/timing/profile/GPUProfileSpan.js +65 -0
  665. package/src/shade/device/timing/profile/GPUProfileSpanKind.d.ts +19 -0
  666. package/src/shade/device/timing/profile/GPUProfileSpanKind.d.ts.map +1 -0
  667. package/src/shade/device/timing/profile/GPUProfileSpanKind.js +25 -0
  668. package/src/shade/device/timing/profile/GPUProfileTopology.d.ts +159 -0
  669. package/src/shade/device/timing/profile/GPUProfileTopology.d.ts.map +1 -0
  670. package/src/shade/device/timing/profile/GPUProfileTopology.js +202 -0
  671. package/src/shade/device/timing/profile/GPUProfileWork.d.ts +90 -0
  672. package/src/shade/device/timing/profile/GPUProfileWork.d.ts.map +1 -0
  673. package/src/shade/device/timing/profile/GPUProfileWork.js +115 -0
  674. package/src/shade/device/timing/profile/SGPTDefect.d.ts +43 -0
  675. package/src/shade/device/timing/profile/SGPTDefect.d.ts.map +1 -0
  676. package/src/shade/device/timing/profile/SGPTDefect.js +65 -0
  677. package/src/shade/device/timing/profile/SGPTHeader.d.ts +38 -0
  678. package/src/shade/device/timing/profile/SGPTHeader.d.ts.map +1 -0
  679. package/src/shade/device/timing/profile/SGPTHeader.js +46 -0
  680. package/src/shade/device/timing/profile/SGPTRecordRef.d.ts +37 -0
  681. package/src/shade/device/timing/profile/SGPTRecordRef.d.ts.map +1 -0
  682. package/src/shade/device/timing/profile/SGPTRecordRef.js +45 -0
  683. package/src/shade/device/timing/profile/SGPTWriteStream.d.ts +103 -0
  684. package/src/shade/device/timing/profile/SGPTWriteStream.d.ts.map +1 -0
  685. package/src/shade/device/timing/profile/SGPTWriteStream.js +287 -0
  686. package/src/shade/device/timing/profile/SGPT_DEFECT.d.ts +19 -0
  687. package/src/shade/device/timing/profile/SGPT_DEFECT.d.ts.map +1 -0
  688. package/src/shade/device/timing/profile/SGPT_DEFECT.js +26 -0
  689. package/src/shade/device/timing/profile/SGPT_FLAG.d.ts +8 -0
  690. package/src/shade/device/timing/profile/SGPT_FLAG.d.ts.map +1 -0
  691. package/src/shade/device/timing/profile/SGPT_FLAG.js +15 -0
  692. package/src/shade/device/timing/profile/SGPT_FORMAT.md +345 -0
  693. package/src/shade/device/timing/profile/SGPT_FORMAT_VERSION.d.ts +10 -0
  694. package/src/shade/device/timing/profile/SGPT_FORMAT_VERSION.d.ts.map +1 -0
  695. package/src/shade/device/timing/profile/SGPT_FORMAT_VERSION.js +9 -0
  696. package/src/shade/device/timing/profile/SGPT_FRAME_SLACK.d.ts +17 -0
  697. package/src/shade/device/timing/profile/SGPT_FRAME_SLACK.d.ts.map +1 -0
  698. package/src/shade/device/timing/profile/SGPT_FRAME_SLACK.js +16 -0
  699. package/src/shade/device/timing/profile/SGPT_HEADER_CHECKSUM_COVERAGE.d.ts +16 -0
  700. package/src/shade/device/timing/profile/SGPT_HEADER_CHECKSUM_COVERAGE.d.ts.map +1 -0
  701. package/src/shade/device/timing/profile/SGPT_HEADER_CHECKSUM_COVERAGE.js +15 -0
  702. package/src/shade/device/timing/profile/SGPT_HEADER_OFFSET.d.ts +15 -0
  703. package/src/shade/device/timing/profile/SGPT_HEADER_OFFSET.d.ts.map +1 -0
  704. package/src/shade/device/timing/profile/SGPT_HEADER_OFFSET.js +29 -0
  705. package/src/shade/device/timing/profile/SGPT_HEADER_SIZE.d.ts +7 -0
  706. package/src/shade/device/timing/profile/SGPT_HEADER_SIZE.d.ts.map +1 -0
  707. package/src/shade/device/timing/profile/SGPT_HEADER_SIZE.js +6 -0
  708. package/src/shade/device/timing/profile/SGPT_MAGIC.d.ts +7 -0
  709. package/src/shade/device/timing/profile/SGPT_MAGIC.d.ts.map +1 -0
  710. package/src/shade/device/timing/profile/SGPT_MAGIC.js +6 -0
  711. package/src/shade/device/timing/profile/SGPT_MIN_READER_VERSION.d.ts +16 -0
  712. package/src/shade/device/timing/profile/SGPT_MIN_READER_VERSION.d.ts.map +1 -0
  713. package/src/shade/device/timing/profile/SGPT_MIN_READER_VERSION.js +15 -0
  714. package/src/shade/device/timing/profile/SGPT_RECORD_HEADER_SIZE.d.ts +7 -0
  715. package/src/shade/device/timing/profile/SGPT_RECORD_HEADER_SIZE.d.ts.map +1 -0
  716. package/src/shade/device/timing/profile/SGPT_RECORD_HEADER_SIZE.js +6 -0
  717. package/src/shade/device/timing/profile/SGPT_RECORD_OFFSET.d.ts +13 -0
  718. package/src/shade/device/timing/profile/SGPT_RECORD_OFFSET.d.ts.map +1 -0
  719. package/src/shade/device/timing/profile/SGPT_RECORD_OFFSET.js +23 -0
  720. package/src/shade/device/timing/profile/SGPT_RECORD_SYNC.d.ts +12 -0
  721. package/src/shade/device/timing/profile/SGPT_RECORD_SYNC.d.ts.map +1 -0
  722. package/src/shade/device/timing/profile/SGPT_RECORD_SYNC.js +11 -0
  723. package/src/shade/device/timing/profile/SGPT_RECORD_TYPE.d.ts +18 -0
  724. package/src/shade/device/timing/profile/SGPT_RECORD_TYPE.d.ts.map +1 -0
  725. package/src/shade/device/timing/profile/SGPT_RECORD_TYPE.js +46 -0
  726. package/src/shade/device/timing/profile/frame_graph_extract_topology.d.ts +20 -0
  727. package/src/shade/device/timing/profile/frame_graph_extract_topology.d.ts.map +1 -0
  728. package/src/shade/device/timing/profile/frame_graph_extract_topology.js +174 -0
  729. package/src/shade/device/timing/profile/make_profiling_pass_encoder.d.ts +21 -0
  730. package/src/shade/device/timing/profile/make_profiling_pass_encoder.d.ts.map +1 -0
  731. package/src/shade/device/timing/profile/make_profiling_pass_encoder.js +114 -0
  732. package/src/shade/device/timing/profile/parse_workgroup_size.d.ts +20 -0
  733. package/src/shade/device/timing/profile/parse_workgroup_size.d.ts.map +1 -0
  734. package/src/shade/device/timing/profile/parse_workgroup_size.js +43 -0
  735. package/src/shade/device/timing/profile/sgpt_fourcc.d.ts +18 -0
  736. package/src/shade/device/timing/profile/sgpt_fourcc.d.ts.map +1 -0
  737. package/src/shade/device/timing/profile/sgpt_fourcc.js +34 -0
  738. package/src/shade/device/timing/profile/sgpt_frame_codec.d.ts +42 -0
  739. package/src/shade/device/timing/profile/sgpt_frame_codec.d.ts.map +1 -0
  740. package/src/shade/device/timing/profile/sgpt_frame_codec.js +172 -0
  741. package/src/shade/device/timing/profile/sgpt_meta_codec.d.ts +20 -0
  742. package/src/shade/device/timing/profile/sgpt_meta_codec.d.ts.map +1 -0
  743. package/src/shade/device/timing/profile/sgpt_meta_codec.js +65 -0
  744. package/src/shade/device/timing/profile/sgpt_read_capture.d.ts +19 -0
  745. package/src/shade/device/timing/profile/sgpt_read_capture.d.ts.map +1 -0
  746. package/src/shade/device/timing/profile/sgpt_read_capture.js +134 -0
  747. package/src/shade/device/timing/profile/sgpt_read_header.d.ts +22 -0
  748. package/src/shade/device/timing/profile/sgpt_read_header.d.ts.map +1 -0
  749. package/src/shade/device/timing/profile/sgpt_read_header.js +94 -0
  750. package/src/shade/device/timing/profile/sgpt_read_records.d.ts +27 -0
  751. package/src/shade/device/timing/profile/sgpt_read_records.d.ts.map +1 -0
  752. package/src/shade/device/timing/profile/sgpt_read_records.js +153 -0
  753. package/src/shade/device/timing/profile/sgpt_topology_codec.d.ts +54 -0
  754. package/src/shade/device/timing/profile/sgpt_topology_codec.d.ts.map +1 -0
  755. package/src/shade/device/timing/profile/sgpt_topology_codec.js +329 -0
  756. package/src/shade/device/timing/profile/sgpt_write_header.d.ts +22 -0
  757. package/src/shade/device/timing/profile/sgpt_write_header.d.ts.map +1 -0
  758. package/src/shade/device/timing/profile/sgpt_write_header.js +47 -0
  759. package/src/shade/device/timing/profile/sgpt_write_record.d.ts +23 -0
  760. package/src/shade/device/timing/profile/sgpt_write_record.d.ts.map +1 -0
  761. package/src/shade/device/timing/profile/sgpt_write_record.js +62 -0
  762. package/src/shade/renderer/Renderer.d.ts +21 -0
  763. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  764. package/src/shade/renderer/Renderer.js +2513 -2455
  765. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
  766. package/src/shade/renderer/scene/serialization/decode_image_source_hdr.d.ts +14 -3
  767. package/src/shade/renderer/scene/serialization/decode_image_source_hdr.d.ts.map +1 -1
  768. package/src/shade/renderer/scene/serialization/decode_image_source_hdr.js +50 -51
  769. package/src/shade/renderer/scene/serialization/deserialize_scene.d.ts.map +1 -1
  770. package/src/shade/renderer/scene/serialization/deserialize_scene.js +531 -521
  771. package/src/shade/renderer/scene/serialization/write_image_source.d.ts.map +1 -1
  772. package/src/shade/renderer/scene/serialization/write_image_source.js +6 -4
  773. package/src/shade/renderer/shader/chunk/color/chunk_rgb_to_luminance.d.ts.map +1 -1
  774. package/src/shade/renderer/shader/chunk/color/chunk_rgb_to_luminance.js +34 -32
  775. package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_eotf_st2084.d.ts +31 -0
  776. package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_eotf_st2084.d.ts.map +1 -1
  777. package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_eotf_st2084.js +62 -31
  778. package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_inverse_eotf_st2084.d.ts +10 -0
  779. package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_inverse_eotf_st2084.d.ts.map +1 -1
  780. package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_inverse_eotf_st2084.js +32 -22
  781. package/src/shade/renderer/shader/chunk/color/sRGB/chunk_sRGBTransferOETF.d.ts.map +1 -1
  782. package/src/shade/renderer/shader/chunk/color/sRGB/chunk_sRGBTransferOETF.js +22 -21
  783. package/src/shade/renderer/shader/chunk/color/tonemap/gt7/chunk_tonemap_gt7.d.ts +6 -0
  784. package/src/shade/renderer/shader/chunk/color/tonemap/gt7/chunk_tonemap_gt7.d.ts.map +1 -1
  785. package/src/shade/renderer/shader/chunk/color/tonemap/gt7/chunk_tonemap_gt7.js +110 -104
  786. package/src/shade/renderer/shader/chunk/color/xyz/chunk_rgb_to_xyz.d.ts.map +1 -1
  787. package/src/shade/renderer/shader/chunk/color/xyz/chunk_rgb_to_xyz.js +23 -21
  788. package/src/view/elements/ColorPickerView.js +296 -296
  789. package/src/avif/codec/dec/Readme.md +0 -14
  790. package/src/avif/codec/dec/avif_dec.cpp +0 -234
  791. package/src/avif/codec/dec/avif_dec.d.ts +0 -3
  792. package/src/avif/codec/dec/avif_dec.d.ts.map +0 -1
  793. package/src/avif/codec/dec/avif_dec.js +0 -16
  794. package/src/avif/codec/dec/avif_dec.wasm +0 -0
  795. package/src/avif/codec/enc/README.md +0 -37
  796. package/src/avif/codec/enc/avif_enc.cpp +0 -216
  797. package/src/avif/codec/enc/avif_enc.d.ts +0 -3
  798. package/src/avif/codec/enc/avif_enc.d.ts.map +0 -1
  799. package/src/avif/codec/enc/avif_enc.js +0 -6144
  800. package/src/avif/codec/enc/avif_enc.wasm +0 -0
  801. package/src/avif/codec/enc/avif_enc_mt.d.ts +0 -3
  802. package/src/avif/codec/enc/avif_enc_mt.d.ts.map +0 -1
  803. package/src/avif/codec/enc/avif_enc_mt.js +0 -6811
  804. package/src/avif/codec/enc/avif_enc_mt.wasm +0 -0
  805. package/src/avif/codec/enc/avif_enc_mt.worker.d.mts +0 -2
  806. package/src/avif/codec/enc/avif_enc_mt.worker.d.mts.map +0 -1
  807. package/src/avif/codec/enc/avif_enc_mt.worker.d.ts +0 -11
  808. package/src/avif/codec/enc/avif_enc_mt.worker.d.ts.map +0 -1
  809. package/src/avif/codec/enc/avif_enc_mt.worker.js +0 -171
  810. package/src/avif/codec/enc/avif_enc_mt.worker.mjs +0 -1
  811. package/src/avif/decode.d.ts +0 -3
  812. package/src/avif/decode.d.ts.map +0 -1
  813. package/src/avif/decode.js +0 -42
  814. package/src/avif/encode.d.ts +0 -3
  815. package/src/avif/encode.d.ts.map +0 -1
  816. package/src/avif/encode.js +0 -75
  817. package/src/avif/meta.d.ts +0 -24
  818. package/src/avif/meta.d.ts.map +0 -1
  819. package/src/avif/meta.js +0 -23
  820. package/src/avif/tsconfig.tsbuildinfo +0 -1
  821. package/src/avif/utils.d.ts +0 -17
  822. package/src/avif/utils.d.ts.map +0 -1
  823. package/src/avif/utils.js +0 -31
  824. package/src/engine/asset/loaders/image/jpeg/idct8x8_fixed.d.ts +0 -23
  825. package/src/engine/asset/loaders/image/jpeg/idct8x8_fixed.d.ts.map +0 -1
  826. package/src/engine/asset/loaders/image/jpeg/idct8x8_fixed.js +0 -214
  827. package/src/engine/asset/loaders/image/png/inflate.d.ts +0 -7
  828. package/src/engine/asset/loaders/image/png/inflate.d.ts.map +0 -1
  829. package/src/engine/asset/loaders/image/png/inflate.js +0 -20
  830. package/src/engine/save/GameStateLoader.d.ts +0 -49
  831. package/src/engine/save/GameStateLoader.d.ts.map +0 -1
  832. package/src/engine/save/GameStateLoader.js +0 -168
@@ -0,0 +1,345 @@
1
+ # The `.sgpt` container — format specification
2
+
3
+ **S**hade **G**PU **P**rofile **T**race, format version 2.
4
+
5
+ This document is the normative description of the file. It is written for somebody outside Company
6
+ Named who wants to read or write one without reading the engine's source. Every integer is
7
+ little-endian and unsigned unless stated otherwise.
8
+
9
+ ---
10
+
11
+ ## 1. What the format is for, and what it is not
12
+
13
+ A capture holds **what a renderer asked a GPU to do over a run of frames, and how long each piece
14
+ took**: pass timings, the frame graph's structure and dependencies, declared resource sizes, and
15
+ dispatch and draw counts.
16
+
17
+ It deliberately does **not** hold buffer or texture contents, shader source, or anything else that
18
+ scales with the size of the resources it describes. That exclusion is what keeps a frame record in
19
+ the kilobytes and makes an uncapped recording practical.
20
+
21
+ ### 1.1 Two properties the layout exists to provide
22
+
23
+ **A truncated capture is a capture.** A recording that ended when the tab did — which is the state
24
+ of every capture of a crash, a device loss, or a hang — must be readable up to the last intact
25
+ record. So every record is self-framed and checksummed, symbols travel inside the record that
26
+ introduces them, and the directory is an index over the stream rather than a prerequisite for
27
+ reading it.
28
+
29
+ **A reader may not understand everything, and must say so rather than fail.** Records carry a type
30
+ and a length; an unrecognised type is skipped by length. This is what lets a newer writer add record
31
+ types without a version bump, and what lets an older reader open the result and report honestly
32
+ which parts it could not show.
33
+
34
+ ---
35
+
36
+ ## 2. File header
37
+
38
+ Thirty-two bytes at offset 0.
39
+
40
+ | Offset | Size | Field | Notes |
41
+ |---|---|---|---|
42
+ | 0 | 4 | `magic` | `0x54504753` — the ASCII bytes `S`, `G`, `P`, `T` in that order |
43
+ | 4 | 2 | `format_version` | 2 for this document |
44
+ | 6 | 2 | `min_reader_version` | the oldest reader that can read this file correctly |
45
+ | 8 | 4 | `flags` | see below |
46
+ | 12 | 4 | `header_checksum` | CRC-32 over bytes `[0, 8)` **only** |
47
+ | 16 | 8 | `directory_offset` | absolute; **0 when there is no directory** |
48
+ | 24 | 8 | `directory_byte_length` | 0 when absent |
49
+
50
+ Records begin at offset 32.
51
+
52
+ ### 2.1 Flags
53
+
54
+ | Bit | Name | Meaning |
55
+ |---|---|---|
56
+ | 0 | `CLOSED` | the writer reached `stop()` and the file is complete as intended |
57
+
58
+ ### 2.2 Why the checksum stops at byte 8
59
+
60
+ Everything from `flags` onward is written twice: zeroed when the header is laid down, and patched
61
+ when the session stops. A checksum covering those fields would have to be recomputed at stop — fine
62
+ for a capture that stops, and exactly wrong for one that does not, which would then carry a checksum
63
+ over bytes that were never written and read as corrupt.
64
+
65
+ What remains under the checksum is what a reader must trust before it can do anything at all: *is
66
+ this an `.sgpt`, and can this build read it.* Those never change after the header is written.
67
+
68
+ **A reader must not treat a missing `CLOSED` flag or a zero `directory_offset` as damage.** Both are
69
+ the normal state of an interrupted session, and such a file is fully readable by §3.
70
+
71
+ ### 2.3 Version handling
72
+
73
+ A reader **must** refuse a file whose `min_reader_version` exceeds the highest format version it
74
+ implements, and **must** accept anything else. `min_reader_version` is raised only when a change
75
+ would make an older reader produce *wrong* answers rather than incomplete ones — a new record type
76
+ it would skip is incomplete; a reordered field is wrong.
77
+
78
+ Format version 2 keeps `min_reader_version` at 1: it added the `TOPO` record, which a version-1
79
+ reader skips by length, and appended a topology reference to the end of a frame's payload, which a
80
+ version-1 reader stops before.
81
+
82
+ ---
83
+
84
+ ## 3. Records
85
+
86
+ Every record, whatever its type, is framed identically.
87
+
88
+ | Offset | Size | Field |
89
+ |---|---|---|
90
+ | 0 | 4 | `sync` — `0x43455253`, the ASCII bytes `S`, `R`, `E`, `C` |
91
+ | 4 | 4 | `record_type` — a four-character tag as a u32 |
92
+ | 8 | 4 | `payload_byte_length` |
93
+ | 12 | 4 | `payload_checksum` — CRC-32 over the payload bytes only |
94
+ | 16 | … | payload |
95
+
96
+ `payload_byte_length` is a u32 rather than a u64 because no record describes anything that scales
97
+ with resource size (§1); four gigabytes is not a ceiling anything can approach.
98
+
99
+ ### 3.1 Reading, and resynchronising
100
+
101
+ The canonical read is a **forward scan from offset 32**, not a walk of the directory:
102
+
103
+ 1. At the current offset, a record is present if — and only if — all four hold: the sync marker
104
+ matches, at least 16 bytes remain, the payload fits within the file, and the payload's CRC-32
105
+ matches `payload_checksum`.
106
+ 2. If it does, decode or skip it by type and advance past its payload.
107
+ 3. If it does not, scan forward one byte at a time for the next offset where all four hold. Report
108
+ the skipped bytes as damage; do not stop.
109
+ 4. If the scan reaches the end without finding another record, the stream was truncated inside a
110
+ record. Report it. Everything already decoded stands.
111
+
112
+ **The sync marker alone is not sufficient and a reader must not treat it as such.** Four bytes of
113
+ payload can spell `SREC` — a pass label could — and resynchronising onto a false positive
114
+ desynchronises everything after it. The length and the checksum are what confirm a candidate.
115
+
116
+ ### 3.2 Record types
117
+
118
+ | Tag | u32 | Payload | Cardinality |
119
+ |---|---|---|---|
120
+ | `META` | `0x4154454D` | §4 | 1, immediately after the header |
121
+ | `SYMS` | `0x534D5953` | §5 | 0..n, always before the records referencing them |
122
+ | `TOPO` | `0x4F504F54` | §6 | 0..n |
123
+ | `FRAM` | `0x4D415246` | §7 | 0..n |
124
+ | `CNTR` | `0x52544E43` | reserved | 0..1 |
125
+ | `DIRE` | `0x45524944` | §8 | 0..1, last |
126
+
127
+ An unrecognised tag **must** be skipped using `payload_byte_length`.
128
+
129
+ ### 3.3 Primitive encodings
130
+
131
+ - `uintVar` — 7 bits per byte, low group first, high bit set on every byte but the last. Values are
132
+ limited to 2³¹−1.
133
+ - `utf8` — a `uintVar` byte length followed by that many UTF-8 bytes.
134
+ - `f64` — IEEE 754 binary64, little-endian.
135
+ - **Optional index** — a value of −1 meaning "none", written as `uintVar(value + 1)`. Zero means
136
+ none.
137
+
138
+ ---
139
+
140
+ ## 4. `META`
141
+
142
+ | Field | Type | Notes |
143
+ |---|---|---|
144
+ | `level` | u8 | 0 `TIMING`, 1 `STRUCTURE`, 2 `WORKLOAD`, 3 `VERBOSE` |
145
+ | `wall_clock_start_ms` | f64 | `Date.now()` at session start; for ordering captures, not for timing |
146
+ | `note` | utf8 | free text from whoever captured |
147
+ | `engine_version` | utf8 | |
148
+ | `adapter_vendor` | utf8 | from `GPUAdapterInfo`; empty where the browser withheld it |
149
+ | `adapter_architecture` | utf8 | |
150
+ | `adapter_device` | utf8 | |
151
+ | `adapter_description` | utf8 | |
152
+ | `feature_count` | uintVar | |
153
+ | `features` | utf8 × count | `GPUFeatureName`s the device was created with |
154
+
155
+ ### 4.1 On timestamp resolution — a deliberate absence
156
+
157
+ **There is no field here describing the device's timestamp quantum, and adding one is out of
158
+ scope.**
159
+
160
+ Browsers quantize WebGPU timestamps as a timing-attack mitigation; Chrome to 100 µs unless
161
+ `chrome://flags/#enable-webgpu-developer-features` is set. Most passes in a real renderer run below
162
+ that and are reported as exactly zero.
163
+
164
+ Recovering the quantum from the data — a GCD over observed timestamps, or any equivalent — *is* the
165
+ timing attack the mitigation exists to prevent, and doing it imperfectly applies a wrong correction
166
+ to every number in the file. So a capture records what the device reported, zeros included, and says
167
+ nothing further. A reader that wants to present this honestly should aggregate across many frames
168
+ rather than trust any single one, and should say so where the reader will see it.
169
+
170
+ ---
171
+
172
+ ## 5. `SYMS`
173
+
174
+ | Field | Type |
175
+ |---|---|
176
+ | `first_index` | uintVar |
177
+ | `count` | uintVar |
178
+ | `strings` | utf8 × count |
179
+
180
+ Strings occupy one index space across the whole file; a block declares where its run begins. Every
181
+ later reference is a `uintVar` index into that space.
182
+
183
+ A `SYMS` block **always precedes** the record that references its strings. A writer must not gather
184
+ symbols into one block at the end of the file: a capture truncated before that block would resolve
185
+ no names at all, which is precisely the capture of the crash somebody was trying to record.
186
+
187
+ ---
188
+
189
+ ## 6. `TOPO` — frame graph structure
190
+
191
+ Present at capture level `STRUCTURE` and above.
192
+
193
+ | Field | Type |
194
+ |---|---|
195
+ | `id` | uintVar — what a frame refers to |
196
+ | `name` | symbol index |
197
+ | `scope_count` | uintVar |
198
+ | **per scope** | `name` (symbol index), `parent` (optional index) |
199
+ | `pass_count` | uintVar |
200
+ | **per pass** | see §6.1 |
201
+ | `resource_count` | uintVar |
202
+ | **per resource** | see §6.2 |
203
+
204
+ A scope's parent always appears at a lower index than the scope itself, so a reader resolves the
205
+ chain in one forward pass.
206
+
207
+ ### 6.1 Pass
208
+
209
+ | Field | Type |
210
+ |---|---|
211
+ | `id` | uintVar |
212
+ | `name` | symbol index |
213
+ | `scope` | optional index |
214
+ | `flags` | u8 — bit 0 `CULLED`, bit 1 `HAS_SIDE_EFFECTS` |
215
+ | `ref_count` | uintVar |
216
+ | `reads` | uintVar count, then that many resource **node** ids |
217
+ | `writes` | same |
218
+ | `creates` | same |
219
+
220
+ ### 6.2 Resource
221
+
222
+ One entry per resource **node** — that is, per version. A pass records the node it touched rather
223
+ than the underlying resource, so a registry-keyed model would leave every reference past version 0
224
+ dangling.
225
+
226
+ | Field | Type |
227
+ |---|---|
228
+ | `id` | uintVar |
229
+ | `name` | symbol index |
230
+ | `version` | uintVar |
231
+ | `flags` | u8 — bit 2 `TRANSIENT`, bit 3 `IMPORTED` |
232
+ | `producer` | optional index — the pass that produced this version |
233
+ | `kind` | u8 — 0 none, 1 buffer, 2 texture |
234
+ | `usage` | uintVar — `GPUBufferUsage` / `GPUTextureUsage` bitmask |
235
+ | `byte_size` | uintVar — declared bytes, §6.3 |
236
+ | **if buffer** | `size` (uintVar) |
237
+ | **if texture** | `width`, `height`, `depth`, `mip_level_count`, `sample_count` (uintVar each), `format`, `dimension` (symbol indices) |
238
+
239
+ ### 6.3 `byte_size` is declared, and is computed by the writer
240
+
241
+ Declared, not allocated: a pooled allocator may serve a larger block, and an aliasing one may serve
242
+ the same block to two resources whose lifetimes do not overlap.
243
+
244
+ For a texture it covers the whole mip chain at the given sample count. **The writer computes it**
245
+ rather than leaving a reader to, because working it out needs the format's block dimensions — so a
246
+ reader never has to carry a copy of that table, and a format the reader has never heard of still
247
+ reports a size. A writer that cannot determine a size **must** write 0.
248
+
249
+ ---
250
+
251
+ ## 7. `FRAM` — one frame
252
+
253
+ | Field | Type |
254
+ |---|---|
255
+ | `frame_index` | uintVar — the renderer's own counter, not a position in the file |
256
+ | `cpu_begin_ms` | f64 — `performance.now()` when encoding began |
257
+ | `cpu_submit_ms` | f64 — `performance.now()` at submit |
258
+ | `gpu_epoch_ns` | u64 — the earliest GPU timestamp in this frame |
259
+ | `dropped_pass_count` | uintVar — passes that went untimed, §7.2 |
260
+ | `span_count` | uintVar |
261
+ | **per span** | §7.1 |
262
+ | `topology_id` | optional index — **appended last**, absent in a format-1 file |
263
+
264
+ ### 7.1 Span
265
+
266
+ | Field | Type |
267
+ |---|---|
268
+ | `label` | symbol index |
269
+ | `kind` | u8 — 0 compute, 1 render |
270
+ | `query_set_id` | u8 — §7.3 |
271
+ | `t_begin_ns` | u32 — nanoseconds from `gpu_epoch_ns` |
272
+ | `duration_ns` | uintVar |
273
+ | `graph_pass_id` | optional index — the frame graph pass that was executing when this pass opened |
274
+ | `has_work` | u8 — 1 if a workload block follows |
275
+ | **if `has_work`** | `dispatch_count`, `indirect_dispatch_count`, `workgroups_x/y/z`, `draw_count`, `indirect_draw_count`, `vertex_count`, `index_count`, `instance_count` (uintVar each), `pipeline` (symbol index), `workgroup_size_x/y/z` (uintVar each) |
276
+
277
+ `t_begin_ns` is a u32 of nanoseconds, holding 4.29 s — three orders of magnitude past any frame, and
278
+ enough to survive a stall rather than wrap. A writer **must** clamp rather than wrap, and **must**
279
+ write a duration of 0 where a device reports an end before its begin.
280
+
281
+ `has_work` is per span rather than per frame because a frame genuinely mixes the two: a pass opened
282
+ before the recorder was attached has no workload record, and a per-frame flag would have to lie
283
+ about one of them.
284
+
285
+ A `workgroup_size` of `[0, 0, 0]` means **unknown** — typically an override-expression size — and is
286
+ not the same as zero work. A reader must not compute an invocation count from it.
287
+
288
+ ### 7.2 `dropped_pass_count`
289
+
290
+ Passes the recorder could not time because the frame had more of them than its query set had slots.
291
+ Carried because an untimed pass reads downstream as a free one. A reader should surface a non-zero
292
+ value rather than presenting the frame as complete.
293
+
294
+ ### 7.3 `query_set_id`
295
+
296
+ Which of the frame's command contexts produced this span. Timestamps from two different
297
+ `GPUQuerySet`s are not specified to share a clock domain, and a frame ordinarily spans several.
298
+ Carried so that an anomaly following a query-set boundary is visible rather than unfalsifiable.
299
+
300
+ ### 7.4 The two clocks are not one clock
301
+
302
+ `cpu_*` come from `performance.now()`; `gpu_epoch_ns` and the spans come from the device. WebGPU
303
+ exposes no calibration between them, and this format carries none. Anything that places the two on
304
+ one axis is anchoring, not synchronising, and should say so.
305
+
306
+ ---
307
+
308
+ ## 8. `DIRE` — directory
309
+
310
+ | Field | Type |
311
+ |---|---|
312
+ | `record_count` | uintVar |
313
+ | **per record** | `type` (u32), `offset` (u64), `byte_length` (u32) |
314
+
315
+ Written last, and does not index itself.
316
+
317
+ **A reader must not require it, and must not prefer it to the records.** It exists so that a future
318
+ reader can seek instead of scan. A capture that never reached `stop()` has none, and is not thereby
319
+ a lesser capture.
320
+
321
+ ---
322
+
323
+ ## 9. Conformance summary
324
+
325
+ A conforming **reader**:
326
+
327
+ - refuses a file whose magic does not match or whose `min_reader_version` exceeds its own;
328
+ - reads by scanning records, and does not require a directory or the `CLOSED` flag;
329
+ - validates sync, length and checksum together before accepting a record;
330
+ - resynchronises past damage and reports it, rather than stopping;
331
+ - skips unrecognised record types by length and reports that it did;
332
+ - treats `[0, 0, 0]` workgroup sizes and absent workload blocks as *unknown*, never as zero.
333
+
334
+ A conforming **writer**:
335
+
336
+ - emits `META` first and `DIRE` last, and patches only `flags` and the directory fields;
337
+ - emits a `SYMS` block before any record referencing its strings;
338
+ - never gathers symbols into a single trailing block;
339
+ - clamps rather than wraps out-of-range span times, and writes 0 for an unknown size;
340
+ - records what the device reported, without correcting for timestamp quantization.
341
+
342
+ ---
343
+
344
+ *Company Named Limited (c) 2026. The format is documented for interoperability; the engine that
345
+ writes it is proprietary and source-available under its own licence.*
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Version of the `.sgpt` layout this build writes.
3
+ *
4
+ * Bump for any change to what a record's payload means. Adding a *new* record type is not such a
5
+ * change — readers skip unknown types by length — so it does not need one.
6
+ *
7
+ * @type {number}
8
+ */
9
+ export const SGPT_FORMAT_VERSION: number;
10
+ //# sourceMappingURL=SGPT_FORMAT_VERSION.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SGPT_FORMAT_VERSION.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/device/timing/profile/SGPT_FORMAT_VERSION.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,kCAFU,MAAM,CAEqB"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Version of the `.sgpt` layout this build writes.
3
+ *
4
+ * Bump for any change to what a record's payload means. Adding a *new* record type is not such a
5
+ * change — readers skip unknown types by length — so it does not need one.
6
+ *
7
+ * @type {number}
8
+ */
9
+ export const SGPT_FORMAT_VERSION = 2;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Bytes the writer reserves at each frame boundary, so that {@link BinaryBuffer} growth — an
3
+ * allocation and a copy — happens *between* frames rather than inside one.
4
+ *
5
+ * The cost of a grow was never CPU time; it is a memcpy that may evict some cache and make the next
6
+ * GPU upload marginally slower, which is a rounding error against what is being measured. This
7
+ * keeps even that out of the interval a frame's timings are taken over.
8
+ *
9
+ * 1 MiB against a level-2 frame record of a few kilobytes is three orders of magnitude of headroom,
10
+ * so a reservation actually forces a grow only once every few hundred frames. That ratio holds only
11
+ * because resource *contents* are out of scope: nothing in a record scales with the size of the
12
+ * buffers and textures it describes.
13
+ *
14
+ * @type {number}
15
+ */
16
+ export const SGPT_FRAME_SLACK: number;
17
+ //# sourceMappingURL=SGPT_FRAME_SLACK.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SGPT_FRAME_SLACK.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/device/timing/profile/SGPT_FRAME_SLACK.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,+BAFU,MAAM,CAE4B"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Bytes the writer reserves at each frame boundary, so that {@link BinaryBuffer} growth — an
3
+ * allocation and a copy — happens *between* frames rather than inside one.
4
+ *
5
+ * The cost of a grow was never CPU time; it is a memcpy that may evict some cache and make the next
6
+ * GPU upload marginally slower, which is a rounding error against what is being measured. This
7
+ * keeps even that out of the interval a frame's timings are taken over.
8
+ *
9
+ * 1 MiB against a level-2 frame record of a few kilobytes is three orders of magnitude of headroom,
10
+ * so a reservation actually forces a grow only once every few hundred frames. That ratio holds only
11
+ * because resource *contents* are out of scope: nothing in a record scales with the size of the
12
+ * buffers and textures it describes.
13
+ *
14
+ * @type {number}
15
+ */
16
+ export const SGPT_FRAME_SLACK = 1024 * 1024;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Bytes the header checksum covers: the magic and the two version fields, and nothing else.
3
+ *
4
+ * It stops short of `flags` on purpose. Everything from `flags` onward is patched at
5
+ * {@link GPUProfileSession#stop} — the CLOSED bit and the directory pointer — and a checksum
6
+ * covering them would have to be recomputed then. That is fine for a capture that stops, and
7
+ * exactly wrong for one that does not: the file would carry a checksum over bytes that were never
8
+ * written, and a reader would call the recoverable case corrupt.
9
+ *
10
+ * What is left under the checksum is what a reader must trust before it can do anything at all —
11
+ * is this an `.sgpt`, and can this build read it. Those never change after the header is written.
12
+ *
13
+ * @type {number}
14
+ */
15
+ export const SGPT_HEADER_CHECKSUM_COVERAGE: number;
16
+ //# sourceMappingURL=SGPT_HEADER_CHECKSUM_COVERAGE.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SGPT_HEADER_CHECKSUM_COVERAGE.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/device/timing/profile/SGPT_HEADER_CHECKSUM_COVERAGE.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,4CAFU,MAAM,CAE+B"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Bytes the header checksum covers: the magic and the two version fields, and nothing else.
3
+ *
4
+ * It stops short of `flags` on purpose. Everything from `flags` onward is patched at
5
+ * {@link GPUProfileSession#stop} — the CLOSED bit and the directory pointer — and a checksum
6
+ * covering them would have to be recomputed then. That is fine for a capture that stops, and
7
+ * exactly wrong for one that does not: the file would carry a checksum over bytes that were never
8
+ * written, and a reader would call the recoverable case corrupt.
9
+ *
10
+ * What is left under the checksum is what a reader must trust before it can do anything at all —
11
+ * is this an `.sgpt`, and can this build read it. Those never change after the header is written.
12
+ *
13
+ * @type {number}
14
+ */
15
+ export const SGPT_HEADER_CHECKSUM_COVERAGE = 8;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Byte offsets of the fields in an `.sgpt` file header. The header is the only fixed-layout region
3
+ * in the container; everything after it is records (see {@link SGPT_RECORD_OFFSET }).
4
+ */
5
+ export type SGPT_HEADER_OFFSET = number;
6
+ export namespace SGPT_HEADER_OFFSET {
7
+ let MAGIC: number;
8
+ let FORMAT_VERSION: number;
9
+ let MIN_READER_VERSION: number;
10
+ let FLAGS: number;
11
+ let HEADER_CHECKSUM: number;
12
+ let DIRECTORY_OFFSET: number;
13
+ let DIRECTORY_BYTE_LENGTH: number;
14
+ }
15
+ //# sourceMappingURL=SGPT_HEADER_OFFSET.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SGPT_HEADER_OFFSET.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/device/timing/profile/SGPT_HEADER_OFFSET.js"],"names":[],"mappings":";;;;iCAIU,MAAM"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Byte offsets of the fields in an `.sgpt` file header. The header is the only fixed-layout region
3
+ * in the container; everything after it is records (see {@link SGPT_RECORD_OFFSET}).
4
+ *
5
+ * @enum {number}
6
+ */
7
+ export const SGPT_HEADER_OFFSET = {
8
+ /** u32, {@link SGPT_MAGIC} */
9
+ MAGIC: 0,
10
+ /** u16, {@link SGPT_FORMAT_VERSION} */
11
+ FORMAT_VERSION: 4,
12
+ /** u16, {@link SGPT_MIN_READER_VERSION} */
13
+ MIN_READER_VERSION: 6,
14
+ /** u32, {@link SGPT_FLAG} bitmask */
15
+ FLAGS: 8,
16
+ /** u32, crc32 over bytes `[0, 12)` — the fields above, and nothing that is patched later */
17
+ HEADER_CHECKSUM: 12,
18
+ /**
19
+ * u64, absolute offset of the directory record.
20
+ *
21
+ * **Zero means there is no directory**, which is the state of every capture that never reached
22
+ * {@link GPUProfileSession.stop} — the tab closed, the device was lost. Such a file is still
23
+ * fully readable by scanning records, and a reader that treats a zero here as corruption is
24
+ * throwing away exactly the captures worth having.
25
+ */
26
+ DIRECTORY_OFFSET: 16,
27
+ /** u64, byte length of the directory record including its own framing. Zero when absent. */
28
+ DIRECTORY_BYTE_LENGTH: 24
29
+ };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Bytes occupied by the `.sgpt` file header. The first record starts here.
3
+ *
4
+ * @type {number}
5
+ */
6
+ export const SGPT_HEADER_SIZE: number;
7
+ //# sourceMappingURL=SGPT_HEADER_SIZE.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SGPT_HEADER_SIZE.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/device/timing/profile/SGPT_HEADER_SIZE.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,+BAFU,MAAM,CAEmB"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Bytes occupied by the `.sgpt` file header. The first record starts here.
3
+ *
4
+ * @type {number}
5
+ */
6
+ export const SGPT_HEADER_SIZE = 32;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * `'SGPT'` — Shade GPU Profile Trace — as a little-endian u32 at file offset 0.
3
+ *
4
+ * @type {number}
5
+ */
6
+ export const SGPT_MAGIC: number;
7
+ //# sourceMappingURL=SGPT_MAGIC.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SGPT_MAGIC.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/device/timing/profile/SGPT_MAGIC.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,yBAFU,MAAM,CAEqB"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * `'SGPT'` — Shade GPU Profile Trace — as a little-endian u32 at file offset 0.
3
+ *
4
+ * @type {number}
5
+ */
6
+ export const SGPT_MAGIC = 0x54504753;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The oldest reader that can still make sense of what this build writes.
3
+ *
4
+ * A reader refuses a file whose `min_reader_version` exceeds its own {@link SGPT_FORMAT_VERSION},
5
+ * and opens anything else. Raise this only when a change makes an older reader produce *wrong*
6
+ * answers rather than incomplete ones — a new record type it would skip is incomplete, a reordered
7
+ * field is wrong.
8
+ *
9
+ * Still 1 at format version 2: the topology link was appended to the end of a frame's payload and
10
+ * `TOPO` is a new record type, so a version-1 reader skips one by length and stops before the other.
11
+ * It sees a capture with no structure, which is incomplete rather than wrong.
12
+ *
13
+ * @type {number}
14
+ */
15
+ export const SGPT_MIN_READER_VERSION: number;
16
+ //# sourceMappingURL=SGPT_MIN_READER_VERSION.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SGPT_MIN_READER_VERSION.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/device/timing/profile/SGPT_MIN_READER_VERSION.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,sCAFU,MAAM,CAEyB"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The oldest reader that can still make sense of what this build writes.
3
+ *
4
+ * A reader refuses a file whose `min_reader_version` exceeds its own {@link SGPT_FORMAT_VERSION},
5
+ * and opens anything else. Raise this only when a change makes an older reader produce *wrong*
6
+ * answers rather than incomplete ones — a new record type it would skip is incomplete, a reordered
7
+ * field is wrong.
8
+ *
9
+ * Still 1 at format version 2: the topology link was appended to the end of a frame's payload and
10
+ * `TOPO` is a new record type, so a version-1 reader skips one by length and stops before the other.
11
+ * It sees a capture with no structure, which is incomplete rather than wrong.
12
+ *
13
+ * @type {number}
14
+ */
15
+ export const SGPT_MIN_READER_VERSION = 1;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Bytes of framing in front of every record's payload.
3
+ *
4
+ * @type {number}
5
+ */
6
+ export const SGPT_RECORD_HEADER_SIZE: number;
7
+ //# sourceMappingURL=SGPT_RECORD_HEADER_SIZE.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SGPT_RECORD_HEADER_SIZE.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/device/timing/profile/SGPT_RECORD_HEADER_SIZE.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,sCAFU,MAAM,CAE0B"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Bytes of framing in front of every record's payload.
3
+ *
4
+ * @type {number}
5
+ */
6
+ export const SGPT_RECORD_HEADER_SIZE = 16;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Byte offsets within a record's framing. Every record in the stream carries this same 16-byte head,
3
+ * whatever its type, which is what makes the stream scannable by a reader that understands none of
4
+ * the payloads.
5
+ */
6
+ export type SGPT_RECORD_OFFSET = number;
7
+ export namespace SGPT_RECORD_OFFSET {
8
+ let SYNC: number;
9
+ let TYPE: number;
10
+ let PAYLOAD_BYTE_LENGTH: number;
11
+ let PAYLOAD_CHECKSUM: number;
12
+ }
13
+ //# sourceMappingURL=SGPT_RECORD_OFFSET.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SGPT_RECORD_OFFSET.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/device/timing/profile/SGPT_RECORD_OFFSET.js"],"names":[],"mappings":";;;;;iCAKU,MAAM"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Byte offsets within a record's framing. Every record in the stream carries this same 16-byte head,
3
+ * whatever its type, which is what makes the stream scannable by a reader that understands none of
4
+ * the payloads.
5
+ *
6
+ * @enum {number}
7
+ */
8
+ export const SGPT_RECORD_OFFSET = {
9
+ /** u32, {@link SGPT_RECORD_SYNC} */
10
+ SYNC: 0,
11
+ /** u32, a {@link SGPT_RECORD_TYPE} */
12
+ TYPE: 4,
13
+ /**
14
+ * u32, payload bytes following this head.
15
+ *
16
+ * u32 rather than u64 deliberately: a record describes one frame's control flow, and buffer and
17
+ * texture *contents* are a non-goal of this format, so nothing in a record scales with the size
18
+ * of the resources it describes. Four gigabytes is not a ceiling anything can approach.
19
+ */
20
+ PAYLOAD_BYTE_LENGTH: 8,
21
+ /** u32, crc32 over the payload bytes only */
22
+ PAYLOAD_CHECKSUM: 12
23
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * `'SREC'`, the little-endian u32 that opens every record in the stream.
3
+ *
4
+ * A reader that has lost its place — corruption, a torn write, a capture that ended when the tab
5
+ * did — scans forward for this and resumes. It is not a guarantee on its own: four bytes of payload
6
+ * can spell `SREC` by accident. It is the cheap filter, and the record's length and checksum are
7
+ * what actually confirm the find. See {@link sgpt_read_records}.
8
+ *
9
+ * @type {number}
10
+ */
11
+ export const SGPT_RECORD_SYNC: number;
12
+ //# sourceMappingURL=SGPT_RECORD_SYNC.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SGPT_RECORD_SYNC.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/device/timing/profile/SGPT_RECORD_SYNC.js"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,+BAFU,MAAM,CAE2B"}