@carbonenginejs/runtime 0.1.0-alpha.4 → 0.1.0-alpha.5

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 (384) hide show
  1. package/dist/global/blue/BlueClasses.js +200 -0
  2. package/dist/global/blue/BlueClasses.js.map +1 -0
  3. package/dist/global/blue/IBlueClasses.js +79 -0
  4. package/dist/global/blue/IBlueClasses.js.map +1 -0
  5. package/dist/global/blue/IBlueDynamicResourceConstructor.js +16 -0
  6. package/dist/global/blue/IBlueDynamicResourceConstructor.js.map +1 -1
  7. package/dist/global/blue/blue.js +8 -2
  8. package/dist/global/blue/blue.js.map +1 -1
  9. package/dist/global/blue/index.js +2 -0
  10. package/dist/global/blue/index.js.map +1 -1
  11. package/dist/global/consts/index.js +0 -1
  12. package/dist/global/consts/index.js.map +1 -1
  13. package/dist/global/consts/renderContext/formats.js +26 -25
  14. package/dist/global/consts/renderContext/formats.js.map +1 -1
  15. package/dist/{trinityal/Tr2BitmapDimensions.js → global/imageio/BitmapDimensions.js} +19 -15
  16. package/dist/global/imageio/BitmapDimensions.js.map +1 -0
  17. package/dist/global/imageio/Cutout.js +28 -0
  18. package/dist/global/imageio/Cutout.js.map +1 -0
  19. package/dist/global/imageio/HostBitmap.js +1106 -0
  20. package/dist/global/imageio/HostBitmap.js.map +1 -0
  21. package/dist/global/imageio/ImageIOResult.js +99 -0
  22. package/dist/global/imageio/ImageIOResult.js.map +1 -0
  23. package/dist/global/imageio/ImageUtility.js +205 -0
  24. package/dist/global/imageio/ImageUtility.js.map +1 -0
  25. package/dist/global/imageio/LoadParameters.js +86 -0
  26. package/dist/global/imageio/LoadParameters.js.map +1 -0
  27. package/dist/global/imageio/Metadata.js +22 -0
  28. package/dist/global/imageio/Metadata.js.map +1 -0
  29. package/dist/global/imageio/index.js +8 -0
  30. package/dist/global/{consts/webgpu → imageio}/index.js.map +1 -1
  31. package/dist/global/index.js +2 -1
  32. package/dist/global/index.js.map +1 -1
  33. package/dist/global/math/color.js +1 -1
  34. package/dist/global/math/color.js.map +1 -1
  35. package/dist/global/schema/CjsSchema.js +8 -0
  36. package/dist/global/schema/CjsSchema.js.map +1 -1
  37. package/dist/index.js +12 -4
  38. package/dist/index.js.map +1 -1
  39. package/dist/resource/CjsResMan.js +47 -7
  40. package/dist/resource/CjsResMan.js.map +1 -1
  41. package/dist/resource/Tr2LightProfileRes.js +37 -0
  42. package/dist/resource/Tr2LightProfileRes.js.map +1 -1
  43. package/dist/resource/format/CjsByteWriter.js +46 -46
  44. package/dist/resource/format/CjsByteWriter.js.map +1 -1
  45. package/dist/resource/format/CjsFormat.js +7 -8
  46. package/dist/resource/format/CjsFormat.js.map +1 -1
  47. package/dist/resource/format/CjsFormatStore.js +8 -8
  48. package/dist/resource/format/CjsFormatStore.js.map +1 -1
  49. package/dist/resource/format/CjsGeometryFormat.js +114 -0
  50. package/dist/resource/format/CjsGeometryFormat.js.map +1 -0
  51. package/dist/resource/format/CjsImageFormat.js +282 -0
  52. package/dist/resource/format/CjsImageFormat.js.map +1 -0
  53. package/dist/resource/format/CjsResourceProbe.js +12 -48
  54. package/dist/resource/format/CjsResourceProbe.js.map +1 -1
  55. package/dist/resource/format/CjsStringTable.js +37 -37
  56. package/dist/resource/format/CjsStringTable.js.map +1 -1
  57. package/dist/resource/format/carbonEffect/CjsCarbonEffectReader.js +10 -10
  58. package/dist/resource/format/carbonEffect/CjsCarbonEffectReader.js.map +1 -1
  59. package/dist/resource/format/carbonEffect/CjsCarbonEffectWriter.js +37 -37
  60. package/dist/resource/format/carbonEffect/CjsCarbonEffectWriter.js.map +1 -1
  61. package/dist/resource/format/carbonEffect/carbonEffectBackendBlock.js +35 -7
  62. package/dist/resource/format/carbonEffect/carbonEffectBackendBlock.js.map +1 -1
  63. package/dist/resource/format/index.js +3 -1
  64. package/dist/resource/format/index.js.map +1 -1
  65. package/dist/resource/formats/black/CjsBlackFormat.js +130 -137
  66. package/dist/resource/formats/black/CjsBlackFormat.js.map +1 -1
  67. package/dist/resource/formats/bnk/CjsBnkFormat.js +12 -19
  68. package/dist/resource/formats/bnk/CjsBnkFormat.js.map +1 -1
  69. package/dist/resource/formats/bnk/core/helpers.js +1 -3
  70. package/dist/resource/formats/bnk/core/helpers.js.map +1 -1
  71. package/dist/resource/formats/cmf/CjsCmfFormat.js +19 -82
  72. package/dist/resource/formats/cmf/CjsCmfFormat.js.map +1 -1
  73. package/dist/resource/formats/cmf/core/constants.js +1 -2
  74. package/dist/resource/formats/cmf/core/constants.js.map +1 -1
  75. package/dist/resource/formats/{stl/core/targets.js → cmf/core/flatShared.js} +9 -8
  76. package/dist/resource/formats/cmf/core/flatShared.js.map +1 -0
  77. package/dist/resource/formats/cmf/core/helpers.js +13 -13
  78. package/dist/resource/formats/cmf/core/helpers.js.map +1 -1
  79. package/dist/resource/formats/cmf/core/writer.js +24 -24
  80. package/dist/resource/formats/cmf/core/writer.js.map +1 -1
  81. package/dist/resource/formats/dds/CjsDdsFormat.js +134 -17
  82. package/dist/resource/formats/dds/CjsDdsFormat.js.map +1 -1
  83. package/dist/resource/formats/dds/core/helpers.js +125 -40
  84. package/dist/resource/formats/dds/core/helpers.js.map +1 -1
  85. package/dist/resource/formats/dxbc/CjsDxbcFormat.js +14 -16
  86. package/dist/resource/formats/dxbc/CjsDxbcFormat.js.map +1 -1
  87. package/dist/resource/formats/dxbc/core/{container.js → DxbcContainer.js} +2 -2
  88. package/dist/resource/formats/dxbc/core/DxbcContainer.js.map +1 -0
  89. package/dist/resource/formats/dxbc/core/{errors.js → DxbcReadError.js} +1 -1
  90. package/dist/resource/formats/dxbc/core/DxbcReadError.js.map +1 -0
  91. package/dist/resource/formats/dxbc/core/DxbcReader.js +1 -1
  92. package/dist/resource/formats/dxbc/core/DxbcReader.js.map +1 -1
  93. package/dist/resource/formats/dxbc/core/{program.js → DxbcShaderProgram.js} +2 -2
  94. package/dist/resource/formats/dxbc/core/DxbcShaderProgram.js.map +1 -0
  95. package/dist/resource/formats/dxbc/core/{signature.js → DxbcSignatureChunk.js} +2 -2
  96. package/dist/resource/formats/dxbc/core/DxbcSignatureChunk.js.map +1 -0
  97. package/dist/resource/formats/dxbc/core/decoder.js +2 -2
  98. package/dist/resource/formats/dxbc/core/decoder.js.map +1 -1
  99. package/dist/resource/formats/dxbc/core/helpers.js +3 -3
  100. package/dist/resource/formats/dxbc/core/helpers.js.map +1 -1
  101. package/dist/resource/formats/fbx/CjsFbxFormat.js +18 -20
  102. package/dist/resource/formats/fbx/CjsFbxFormat.js.map +1 -1
  103. package/dist/resource/formats/flac/CjsFlacFormat.js +7 -13
  104. package/dist/resource/formats/flac/CjsFlacFormat.js.map +1 -1
  105. package/dist/resource/formats/fsd/32/CjsFsd32Format.js +29 -29
  106. package/dist/resource/formats/fsd/32/CjsFsd32Format.js.map +1 -1
  107. package/dist/resource/formats/fsd/64/CjsFsd64Format.js +3 -3
  108. package/dist/resource/formats/fsd/64/CjsFsd64Format.js.map +1 -1
  109. package/dist/resource/formats/fsd/64/core/CjsFsd64Binary.js +23 -23
  110. package/dist/resource/formats/fsd/64/core/CjsFsd64Binary.js.map +1 -1
  111. package/dist/resource/formats/fsd/64/core/CjsFsd64Reader.js +8 -8
  112. package/dist/resource/formats/fsd/64/core/CjsFsd64Reader.js.map +1 -1
  113. package/dist/resource/formats/fsd/CjsFsdFormat.js +23 -23
  114. package/dist/resource/formats/fsd/CjsFsdFormat.js.map +1 -1
  115. package/dist/resource/formats/gif/CjsGifFormat.js +24 -15
  116. package/dist/resource/formats/gif/CjsGifFormat.js.map +1 -1
  117. package/dist/resource/formats/gltf/CjsGltfFormat.js +33 -98
  118. package/dist/resource/formats/gltf/CjsGltfFormat.js.map +1 -1
  119. package/dist/resource/formats/gltf/core/helpers.js +3 -12
  120. package/dist/resource/formats/gltf/core/helpers.js.map +1 -1
  121. package/dist/resource/formats/gr2/CjsGr2Format.js +27 -91
  122. package/dist/resource/formats/gr2/CjsGr2Format.js.map +1 -1
  123. package/dist/resource/formats/hlsl/CjsHlslFormat.js +22 -25
  124. package/dist/resource/formats/hlsl/CjsHlslFormat.js.map +1 -1
  125. package/dist/resource/formats/hlsl/core/carbonDescriptionToRuntime.js +1 -1
  126. package/dist/resource/formats/hlsl/core/carbonDescriptionToRuntime.js.map +1 -1
  127. package/dist/resource/formats/hlsl/core/tr2/shader/HlslEffectStageInput.js +3 -3
  128. package/dist/resource/formats/hlsl/core/tr2/shader/HlslEffectStageInput.js.map +1 -1
  129. package/dist/resource/formats/ies/CjsIESFormat.js +29 -29
  130. package/dist/resource/formats/ies/CjsIESFormat.js.map +1 -1
  131. package/dist/resource/formats/jpeg/CjsJpegFormat.js +24 -15
  132. package/dist/resource/formats/jpeg/CjsJpegFormat.js.map +1 -1
  133. package/dist/resource/formats/jpeg/core/helpers.js +3 -5
  134. package/dist/resource/formats/jpeg/core/helpers.js.map +1 -1
  135. package/dist/resource/formats/jpeg/core/jpeg.js +58 -58
  136. package/dist/resource/formats/jpeg/core/jpeg.js.map +1 -1
  137. package/dist/resource/formats/jsonl/CjsJsonlFormat.js +3 -3
  138. package/dist/resource/formats/jsonl/CjsJsonlFormat.js.map +1 -1
  139. package/dist/resource/formats/mp3/CjsMp3Format.js +7 -14
  140. package/dist/resource/formats/mp3/CjsMp3Format.js.map +1 -1
  141. package/dist/resource/formats/mp3/core/helpers.js +3 -5
  142. package/dist/resource/formats/mp3/core/helpers.js.map +1 -1
  143. package/dist/resource/formats/mp4/CjsMp4Format.js +7 -13
  144. package/dist/resource/formats/mp4/CjsMp4Format.js.map +1 -1
  145. package/dist/resource/formats/mp4/core/helpers.js +3 -5
  146. package/dist/resource/formats/mp4/core/helpers.js.map +1 -1
  147. package/dist/resource/formats/obj/CjsObjFormat.js +92 -157
  148. package/dist/resource/formats/obj/CjsObjFormat.js.map +1 -1
  149. package/dist/resource/formats/obj/core/helpers.js +5 -113
  150. package/dist/resource/formats/obj/core/helpers.js.map +1 -1
  151. package/dist/resource/formats/ogg/CjsOggFormat.js +7 -14
  152. package/dist/resource/formats/ogg/CjsOggFormat.js.map +1 -1
  153. package/dist/resource/formats/pickle/CjsPickleFormat.js +7 -12
  154. package/dist/resource/formats/pickle/CjsPickleFormat.js.map +1 -1
  155. package/dist/resource/formats/pickle/core/CjsPickleProtocol0Reader.js +7 -7
  156. package/dist/resource/formats/pickle/core/CjsPickleProtocol0Reader.js.map +1 -1
  157. package/dist/resource/formats/pickle/core/CjsPickleProtocol4Reader.js +7 -7
  158. package/dist/resource/formats/pickle/core/CjsPickleProtocol4Reader.js.map +1 -1
  159. package/dist/resource/formats/png/CjsPngFormat.js +40 -15
  160. package/dist/resource/formats/png/CjsPngFormat.js.map +1 -1
  161. package/dist/resource/formats/png/core/helpers.js +4 -6
  162. package/dist/resource/formats/png/core/helpers.js.map +1 -1
  163. package/dist/resource/formats/red/CjsRedFormat.js +22 -28
  164. package/dist/resource/formats/red/CjsRedFormat.js.map +1 -1
  165. package/dist/resource/formats/schemabound/CjsSchemaBoundFormat.js +3 -7
  166. package/dist/resource/formats/schemabound/CjsSchemaBoundFormat.js.map +1 -1
  167. package/dist/resource/formats/schemabound/core/schemaBoundValues.js +5 -0
  168. package/dist/resource/formats/schemabound/core/schemaBoundValues.js.map +1 -1
  169. package/dist/resource/formats/sqlite/CjsSqliteFormat.js +4 -9
  170. package/dist/resource/formats/sqlite/CjsSqliteFormat.js.map +1 -1
  171. package/dist/resource/formats/static/CjsStaticFormat.js +4 -4
  172. package/dist/resource/formats/static/CjsStaticFormat.js.map +1 -1
  173. package/dist/resource/formats/stl/CjsStlFormat.js +39 -104
  174. package/dist/resource/formats/stl/CjsStlFormat.js.map +1 -1
  175. package/dist/resource/formats/stl/core/helpers.js +5 -19
  176. package/dist/resource/formats/stl/core/helpers.js.map +1 -1
  177. package/dist/resource/formats/tga/CjsTgaFormat.js +26 -15
  178. package/dist/resource/formats/tga/CjsTgaFormat.js.map +1 -1
  179. package/dist/resource/formats/tga/core/helpers.js +3 -5
  180. package/dist/resource/formats/tga/core/helpers.js.map +1 -1
  181. package/dist/resource/formats/vta/CjsVtaFormat.js +8 -15
  182. package/dist/resource/formats/vta/CjsVtaFormat.js.map +1 -1
  183. package/dist/resource/formats/wav/CjsWavFormat.js +7 -14
  184. package/dist/resource/formats/wav/CjsWavFormat.js.map +1 -1
  185. package/dist/resource/formats/wav/core/helpers.js +3 -5
  186. package/dist/resource/formats/wav/core/helpers.js.map +1 -1
  187. package/dist/resource/formats/webgl/CjsWebglFormat.js +103 -105
  188. package/dist/resource/formats/webgl/CjsWebglFormat.js.map +1 -1
  189. package/dist/resource/formats/webgl/core/{errors.js → WebglReadError.js} +1 -1
  190. package/dist/resource/formats/webgl/core/WebglReadError.js.map +1 -0
  191. package/dist/resource/formats/webgl/core/effectPackage.js +1 -1
  192. package/dist/resource/formats/webgl/core/effectPackage.js.map +1 -1
  193. package/dist/resource/formats/webgl/core/glsl/DxbcGlslEmitter.js +3 -3
  194. package/dist/resource/formats/webgl/core/glsl/DxbcGlslEmitter.js.map +1 -1
  195. package/dist/resource/formats/webgl/core/glsl/{DxbcGlslHelpers.js → DxbcGlslHelperRegistry.js} +2 -2
  196. package/dist/resource/formats/webgl/core/glsl/DxbcGlslHelperRegistry.js.map +1 -0
  197. package/dist/resource/formats/webgl/core/glsl/DxbcGlslOperandFormatter.js +1 -1
  198. package/dist/resource/formats/webgl/core/glsl/DxbcGlslOperandFormatter.js.map +1 -1
  199. package/dist/resource/formats/webgl/core/glslBackendBlock.js +1 -1
  200. package/dist/resource/formats/webgl/core/glslBackendBlock.js.map +1 -1
  201. package/dist/resource/formats/webgl/core/helpers.js.map +1 -1
  202. package/dist/resource/formats/webgpu/CjsWebgpuFormat.js +28 -29
  203. package/dist/resource/formats/webgpu/CjsWebgpuFormat.js.map +1 -1
  204. package/dist/resource/formats/webgpu/core/{errors.js → WebgpuReadError.js} +1 -1
  205. package/dist/resource/formats/webgpu/core/WebgpuReadError.js.map +1 -0
  206. package/dist/resource/formats/webgpu/core/carbonWebgpu/validateContainer.js +1 -1
  207. package/dist/resource/formats/webgpu/core/carbonWebgpu/validateContainer.js.map +1 -1
  208. package/dist/resource/formats/webgpu/core/helpers.js +1 -1
  209. package/dist/resource/formats/webgpu/core/helpers.js.map +1 -1
  210. package/dist/resource/formats/webgpu/core/ir/lowerDxbcToIr.js +1 -1
  211. package/dist/resource/formats/webgpu/core/ir/lowerDxbcToIr.js.map +1 -1
  212. package/dist/resource/formats/webgpu/core/wgsl/buildWgslSet.js +18 -6
  213. package/dist/resource/formats/webgpu/core/wgsl/buildWgslSet.js.map +1 -1
  214. package/dist/resource/formats/webgpu/core/wgsl/lowerBindingLayout.js +39 -13
  215. package/dist/resource/formats/webgpu/core/wgsl/lowerBindingLayout.js.map +1 -1
  216. package/dist/resource/formats/webgpu/core/wgsl/lowerCreateHistogramsComputeProgram.js +16 -14
  217. package/dist/resource/formats/webgpu/core/wgsl/lowerCreateHistogramsComputeProgram.js.map +1 -1
  218. package/dist/resource/formats/webm/CjsWebmFormat.js +8 -13
  219. package/dist/resource/formats/webm/CjsWebmFormat.js.map +1 -1
  220. package/dist/resource/formats/webm/core/helpers.js +3 -5
  221. package/dist/resource/formats/webm/core/helpers.js.map +1 -1
  222. package/dist/resource/formats/webp/CjsWebpFormat.js +8 -12
  223. package/dist/resource/formats/webp/CjsWebpFormat.js.map +1 -1
  224. package/dist/resource/formats/wem/CjsWemFormat.js +9 -17
  225. package/dist/resource/formats/wem/CjsWemFormat.js.map +1 -1
  226. package/dist/resource/formats/wem/core/bitStream.js +35 -35
  227. package/dist/resource/formats/wem/core/bitStream.js.map +1 -1
  228. package/dist/resource/formats/wem/core/helpers.js +1 -3
  229. package/dist/resource/formats/wem/core/helpers.js.map +1 -1
  230. package/dist/resource/formats/yaml/CjsYamlFormat.js +28 -37
  231. package/dist/resource/formats/yaml/CjsYamlFormat.js.map +1 -1
  232. package/dist/resource/imageio/ImageIO.js +142 -0
  233. package/dist/resource/imageio/ImageIO.js.map +1 -0
  234. package/dist/resource/imageio/index.js +17 -0
  235. package/dist/resource/imageio/index.js.map +1 -0
  236. package/dist/resource/index.js +7 -0
  237. package/dist/resource/index.js.map +1 -1
  238. package/dist/resource/shader/reflection/Tr2EffectResource.js +24 -2
  239. package/dist/resource/shader/reflection/Tr2EffectResource.js.map +1 -1
  240. package/dist/resource/shader/reflection/Tr2Pass.js +76 -5
  241. package/dist/resource/shader/reflection/Tr2Pass.js.map +1 -1
  242. package/dist/resource/texture/CjsTextureArrayConstructor.js +97 -0
  243. package/dist/resource/texture/CjsTextureArrayConstructor.js.map +1 -0
  244. package/dist/resource/texture/CjsTexturePackConstructor.js +160 -0
  245. package/dist/resource/texture/CjsTexturePackConstructor.js.map +1 -0
  246. package/dist/resource/texture/CjsTexturePipelineStepArray.js +72 -0
  247. package/dist/resource/texture/CjsTexturePipelineStepArray.js.map +1 -0
  248. package/dist/resource/texture/CjsTexturePipelineStepConvert.js +73 -0
  249. package/dist/resource/texture/CjsTexturePipelineStepConvert.js.map +1 -0
  250. package/dist/resource/texture/CjsTexturePipelineStepPack.js +71 -0
  251. package/dist/resource/texture/CjsTexturePipelineStepPack.js.map +1 -0
  252. package/dist/resource/texture/CjsTexturePipelineStepResize.js +123 -0
  253. package/dist/resource/texture/CjsTexturePipelineStepResize.js.map +1 -0
  254. package/dist/resource/texture/SolidColorTextureConstructor.js +11 -1
  255. package/dist/resource/texture/SolidColorTextureConstructor.js.map +1 -1
  256. package/dist/resource/texture/Tr2ImageRes.js +100 -68
  257. package/dist/resource/texture/Tr2ImageRes.js.map +1 -1
  258. package/dist/resource/texture/Tr2TexturePipeline.js +45 -25
  259. package/dist/resource/texture/Tr2TexturePipeline.js.map +1 -1
  260. package/dist/resource/texture/Tr2TexturePipelineStepCompress.js +34 -1
  261. package/dist/resource/texture/Tr2TexturePipelineStepCompress.js.map +1 -1
  262. package/dist/resource/texture/Tr2TexturePipelineStepGenerateMips.js +30 -3
  263. package/dist/resource/texture/Tr2TexturePipelineStepGenerateMips.js.map +1 -1
  264. package/dist/resource/texture/Tr2TexturePipelineStepLimitSize.js +81 -1
  265. package/dist/resource/texture/Tr2TexturePipelineStepLimitSize.js.map +1 -1
  266. package/dist/resource/texture/Tr2TexturePipelineStepLoad.js +36 -1
  267. package/dist/resource/texture/Tr2TexturePipelineStepLoad.js.map +1 -1
  268. package/dist/resource/texture/Tr2TexturePipelineStepPack.js +146 -24
  269. package/dist/resource/texture/Tr2TexturePipelineStepPack.js.map +1 -1
  270. package/dist/resource/texture/TriTextureRes.js +151 -29
  271. package/dist/resource/texture/TriTextureRes.js.map +1 -1
  272. package/dist/resource/texture/index.js +7 -0
  273. package/dist/resource/texture/index.js.map +1 -1
  274. package/dist/resource/texture/registerTextureResources.js +83 -0
  275. package/dist/resource/texture/registerTextureResources.js.map +1 -0
  276. package/dist/resource/texture/solidColorTexture.js +10 -19
  277. package/dist/resource/texture/solidColorTexture.js.map +1 -1
  278. package/dist/sof/EveSOF.js +39 -7
  279. package/dist/sof/EveSOF.js.map +1 -1
  280. package/dist/trinity/core/Tr2GpuResourcePool/Tr2GpuResourcePool.js +2 -2
  281. package/dist/trinity/core/Tr2GpuResourcePool/Tr2GpuResourcePool.js.map +1 -1
  282. package/dist/trinity/core/Tr2ImageIOHelpers.js +80 -17
  283. package/dist/trinity/core/Tr2ImageIOHelpers.js.map +1 -1
  284. package/dist/trinity/core/Tr2RenderUtils.js +1 -1
  285. package/dist/trinity/core/Tr2TextureArray/Tr2TextureArray.js +49 -62
  286. package/dist/trinity/core/Tr2TextureArray/Tr2TextureArray.js.map +1 -1
  287. package/dist/trinity/core/Tr2TextureReference.js +114 -0
  288. package/dist/trinity/core/Tr2TextureReference.js.map +1 -0
  289. package/dist/trinity/core/device/Tr2DepthStencil.js +2 -2
  290. package/dist/trinity/core/device/Tr2DepthStencil.js.map +1 -1
  291. package/dist/trinity/core/device/Tr2RingBuffer/Tr2RingBuffer.js +1 -1
  292. package/dist/trinity/core/index.js +1 -0
  293. package/dist/trinity/core/index.js.map +1 -1
  294. package/dist/trinity/core/lighting/Tr2LightManager.js +5 -4
  295. package/dist/trinity/core/lighting/Tr2LightManager.js.map +1 -1
  296. package/dist/trinity/core/procedural/GradientTextureConstructor.js +5 -4
  297. package/dist/trinity/core/procedural/GradientTextureConstructor.js.map +1 -1
  298. package/dist/trinity/core/procedural/gradientTexture.js +10 -13
  299. package/dist/trinity/core/procedural/gradientTexture.js.map +1 -1
  300. package/dist/trinity/core/volumetrics/Tr2VolumetricsRenderer.js +1 -1
  301. package/dist/trinity/core/volumetrics/Tr2VolumetricsRenderer.js.map +1 -1
  302. package/dist/trinity/eve/EveImpactOverlay.js +102 -50
  303. package/dist/trinity/eve/EveImpactOverlay.js.map +1 -1
  304. package/dist/trinity/eve/EveModularObjectModifier.js +9 -18
  305. package/dist/trinity/eve/EveModularObjectModifier.js.map +1 -1
  306. package/dist/trinity/eve/attachment/turrets/EveTurretSet.js +175 -157
  307. package/dist/trinity/eve/attachment/turrets/EveTurretSet.js.map +1 -1
  308. package/dist/trinity/eve/attachment/turrets/EveTurretTarget.js +100 -83
  309. package/dist/trinity/eve/attachment/turrets/EveTurretTarget.js.map +1 -1
  310. package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMesh.js +26 -20
  311. package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMesh.js.map +1 -1
  312. package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshes.js +368 -179
  313. package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshes.js.map +1 -1
  314. package/dist/trinity/eve/child/EveChildMesh.js +242 -234
  315. package/dist/trinity/eve/child/EveChildMesh.js.map +1 -1
  316. package/dist/trinity/eve/child/EveChildTurret.js +57 -16
  317. package/dist/trinity/eve/child/EveChildTurret.js.map +1 -1
  318. package/dist/trinity/eve/child/EveSpaceObjectChild.js +28 -1
  319. package/dist/trinity/eve/child/EveSpaceObjectChild.js.map +1 -1
  320. package/dist/trinity/eve/index.js +2 -2
  321. package/dist/trinity/eve/overlays/EveDamageOverlay.js +5 -1
  322. package/dist/trinity/eve/overlays/EveDamageOverlay.js.map +1 -1
  323. package/dist/trinity/eve/scene/EveSpaceScene.js +234 -233
  324. package/dist/trinity/eve/scene/EveSpaceScene.js.map +1 -1
  325. package/dist/trinity/eve/scene/EveSpaceSceneRenderDriver.js +2 -0
  326. package/dist/trinity/eve/scene/EveSpaceSceneRenderDriver.js.map +1 -1
  327. package/dist/trinity/eve/spaceObject/EveSpaceObject2.js +492 -437
  328. package/dist/trinity/eve/spaceObject/EveSpaceObject2.js.map +1 -1
  329. package/dist/trinity/generated/index.js +0 -1
  330. package/dist/trinity/generated/index.js.map +1 -1
  331. package/dist/trinity/generated/trinityCore/index.js +0 -1
  332. package/dist/trinity/generated/trinityCore/index.js.map +1 -1
  333. package/dist/trinity/index.js +3 -3
  334. package/dist/trinity/particle/emitter/Tr2GpuSharedEmitter.js +10 -1
  335. package/dist/trinity/particle/emitter/Tr2GpuSharedEmitter.js.map +1 -1
  336. package/dist/trinity/shader/Tr2DataTextureManager.js +152 -66
  337. package/dist/trinity/shader/Tr2DataTextureManager.js.map +1 -1
  338. package/dist/trinity/shader/Tr2Material.js +1 -1
  339. package/dist/trinityal/Tr2HalHelperStructures/Tr2TextureSubresource.js +5 -5
  340. package/dist/trinityal/Tr2HalHelperStructures/Tr2TextureSubresource.js.map +1 -1
  341. package/dist/trinityal/index.js +1 -1
  342. package/dist/trinityal/stub/Tr2RenderContextALStub/Tr2RenderContextALStub.js +2 -2
  343. package/dist/trinityal/stub/Tr2RenderContextALStub/Tr2RenderContextALStub.js.map +1 -1
  344. package/dist/trinityal/stub/Tr2SwapChainALStub.js +45 -45
  345. package/dist/trinityal/stub/Tr2SwapChainALStub.js.map +1 -1
  346. package/dist/trinityal/stub/Tr2TextureALStub.js +170 -170
  347. package/dist/trinityal/stub/Tr2TextureALStub.js.map +1 -1
  348. package/dist/trinityal/webgpu/CjsWebgpuDevice.js +234 -164
  349. package/dist/trinityal/webgpu/CjsWebgpuDevice.js.map +1 -1
  350. package/dist/trinityal/webgpu/CjsWebgpuRenderContextAL.js +7 -0
  351. package/dist/trinityal/webgpu/CjsWebgpuRenderContextAL.js.map +1 -1
  352. package/dist/trinityal/webgpu/CjsWebgpuTextureAL.js +78 -14
  353. package/dist/trinityal/webgpu/CjsWebgpuTextureAL.js.map +1 -1
  354. package/dist/trinityal/webgpu/core/CjsWebgpuUtils.js +94 -0
  355. package/dist/trinityal/webgpu/core/CjsWebgpuUtils.js.map +1 -0
  356. package/dist/trinityal/webgpu/internal.js +1 -0
  357. package/dist/trinityal/webgpu/internal.js.map +1 -1
  358. package/docs/global/reference/classes/README.md +90 -0
  359. package/docs/resource/concepts/format-capabilities.md +3 -3
  360. package/docs/resource/formats/README.md +1 -1
  361. package/docs/resource/reference/classes/core.md +31 -1
  362. package/docs/resource/reference/classes/formats.md +7 -7
  363. package/docs/resource/reference/classes/resources.md +76 -16
  364. package/docs/trinity/reference/classes/generated.md +0 -10
  365. package/docs/trinity/reference/classes/trinity-core.md +1692 -1682
  366. package/docs/trinityal/reference/classes/README.md +0 -10
  367. package/docs/trinityal/webgpu/reference/classes/README.md +276 -266
  368. package/package.json +4 -3
  369. package/dist/global/consts/webgpu/index.js +0 -2
  370. package/dist/global/consts/webgpu/textureFormats.js +0 -180
  371. package/dist/global/consts/webgpu/textureFormats.js.map +0 -1
  372. package/dist/resource/formats/dxbc/core/container.js.map +0 -1
  373. package/dist/resource/formats/dxbc/core/errors.js.map +0 -1
  374. package/dist/resource/formats/dxbc/core/program.js.map +0 -1
  375. package/dist/resource/formats/dxbc/core/signature.js.map +0 -1
  376. package/dist/resource/formats/stl/core/targets.js.map +0 -1
  377. package/dist/resource/formats/webgl/core/errors.js.map +0 -1
  378. package/dist/resource/formats/webgl/core/glsl/DxbcGlslHelpers.js.map +0 -1
  379. package/dist/resource/formats/webgpu/core/errors.js.map +0 -1
  380. package/dist/resource/texture/texturePipelineBehavior.js +0 -332
  381. package/dist/resource/texture/texturePipelineBehavior.js.map +0 -1
  382. package/dist/trinity/generated/trinityCore/Tr2TextureReference.js +0 -40
  383. package/dist/trinity/generated/trinityCore/Tr2TextureReference.js.map +0 -1
  384. package/dist/trinityal/Tr2BitmapDimensions.js.map +0 -1
@@ -19,6 +19,7 @@ import { BLUELISTEVENT } from '#consts/blue';
19
19
  import { EveComponentType, ShouldReflect } from '../EveComponentTypes.js';
20
20
  import { ImpactConfiguration } from '../../generated/include/enums.js';
21
21
  import { EveLODHelper } from '../EveLODHelper.js';
22
+ import { EveDamageOverlay as _EveDamageOverlay } from '../overlays/EveDamageOverlay.js';
22
23
  import { TriBatchType, ReflectionMode } from '#consts/graphics';
23
24
  import { MatrixCopyFrom3x4 } from '../lights/lightConversion.js';
24
25
  import { getBoneList } from '../../core/animation/Tr2GrannyAnimation.js';
@@ -55,11 +56,11 @@ const TRANSPARENT_CENTER = vec3.create();
55
56
  const OVERLAY_TYPE_OPAQUEONLY = 0;
56
57
  const OVERLAY_TYPE_ALL = 1;
57
58
 
58
- /**
59
- * The hull of an EVE space object - its mesh, locators, locator sets, decals,
60
- * attachments, lights, effect children, overlay effects, impact overlay and
61
- * controllers - together with the curve-driven world transform, visibility, LOD
62
- * and batch submission that drive them each frame.
59
+ /**
60
+ * The hull of an EVE space object - its mesh, locators, locator sets, decals,
61
+ * attachments, lights, effect children, overlay effects, impact overlay and
62
+ * controllers - together with the curve-driven world transform, visibility, LOD
63
+ * and batch submission that drive them each frame.
63
64
  */
64
65
  let _EveSpaceObject;
65
66
  new class extends _identity {
@@ -71,7 +72,7 @@ new class extends _identity {
71
72
  } = _applyDecs2311(this, [type.define({
72
73
  className: "EveSpaceObject2",
73
74
  family: "eve/spaceObject"
74
- }), carbon.inherit(ITr2BoundingBox, ITr2Renderable, IEveSpaceObject2, IEveInheritPropertiesOwner)], [[[edit, edit.notify, edit, edit.persist, type, type.int32, void 0, type.enum("trinity.EntityComponents.ReflectionMode")], 16, "reflectionMode"], [[edit, edit.persist, void 0, type.list("IEveSpaceObjectChild")], 16, "effectChildren"], [[edit, edit.persist, void 0, type.list("IEveTransform")], 16, "children"], [[edit, edit.notify, edit, edit.persist, type, type.string], 16, "name"], [[edit, edit.notify, edit, edit.readwrite, type, type.boolean], 16, "mute"], [[edit, edit.readwrite, void 0, type.objectRef("EveChildInheritProperties")], 16, "inheritProperties"], [[edit, edit.persist, void 0, type.list("EveCustomMask")], 16, "customMasks"], [[edit, edit.persist, void 0, type.list("EveMeshOverlayEffect")], 16, "overlayEffects"], [[edit, edit.read, void 0, type.objectRef("Tr2BindingVector3")], 16, "positionDelta"], [[edit, edit.read, type, type.int32, void 0, type.enum("trinity.Tr2Lod")], 16, "lodLevel"], [[edit, edit.persist, void 0, type.list("TriCurveSet")], 16, "curveSets"], [[edit, edit.readwrite, type, type.boolean], 16, "isPickable"], [[edit, edit.read, type, type.float32], 16, "estimatedPixelDiameter"], [[edit, edit.read, type, type.float32], 16, "estimatedPixelDiameterWithChildren"], [[edit, edit.read, type, type.vec3], 16, "generatedShapeEllipsoidCenter"], [[edit, edit.read, type, type.vec3], 16, "generatedShapeEllipsoidRadius"], [[edit, edit.read, void 0, type.objectRef("Tr2GrannyAnimation")], 16, "animationUpdater"], [[edit, edit.persist, type, type.string], 16, "dna"], [[edit, edit.notify, edit, edit.persist, type, type.boolean], 16, "castShadow"], [[edit, edit.persist, type, type.boolean], 16, "isAnimated"], [[edit, edit.persist, type, type.boolean], 16, "dynamicBoundingSphereEnabled"], [[edit, edit.persist, void 0, type.list("IEveSpaceObjectAttachment")], 16, "attachments"], [[edit, edit.persist, void 0, type.list("EveSpaceObjectDecal")], 16, "decals"], [[edit, edit.notify, edit, edit.persist, void 0, type.list("Tr2Light")], 16, "lights"], [[edit, edit.persist, void 0, type.list("Tr2ExternalParameter")], 16, "externalParameters"], [[edit, edit.persist, void 0, type.list("ITr2Controller")], 16, "controllers"], [[edit, edit.persist, void 0, type.list("EveLocator2")], 16, "locators"], [[edit, edit.persist, void 0, type.objectRef("Tr2MeshBase")], 16, "mesh"], [[edit, edit.persist, void 0, type.objectRef("EveImpactOverlay")], 16, "impactOverlay"], [[edit, edit.persist, type, type.vec3], 16, "clipSphereCenter"], [[edit, edit.notify, edit, edit.readwrite, type, type.float32], 16, "clipSphereFactor2"], [[edit, edit.notify, edit, edit.readwrite, type, type.float32], 16, "clipSphereFactor"], [[edit, edit.persist, void 0, type.list("TriObserverLocal")], 16, "observers"], [[edit, edit.read, type, type.vec3], 16, "worldPosition"], [[edit, edit.persist, void 0, type.objectRef("ITriQuaternionFunction")], 16, "rotationCurve"], [[edit, edit.read, type, type.quat], 16, "worldRotation"], [[edit, edit.persist, type, type.float32], 16, "modelScale"], [[edit, edit.persist, void 0, type.list("EveLocatorSets")], 16, "locatorSets"], [[edit, edit.readwrite, type, type.float32], 16, "activationStrength"], [[edit, edit.readwrite, type, type.color], 16, "albedoColor"], [[edit, edit.notify, edit, edit.persist, type, type.boolean], 16, "display"], [[edit, edit.persist, type, type.boolean], 16, "update"], [[edit, edit.read, type, type.float32], 16, "secondaryLightingSphereRadius"], [[edit, edit.persist, type, type.vec3], 16, "boundingSphereCenter"], [[edit, edit.notify, edit, edit.readwrite, type, type.float32], 16, "dirtLevel"], [[edit, edit.readwrite, type, type.vec4], 16, "customShaderData"], [[edit, edit.read, type, type.vec4], 16, "spaceObjectShipData"], [[edit, edit.read, type, type.int32], 16, "lastDamageLocatorHit"], [[edit, edit.notify, edit, edit.readwrite, type, type.boolean], 16, "damageLocatorAutoFilterEnabled"], [[edit, edit.persist, type, type.float32], 16, "boundingSphereRadius"], [[edit, edit.read, type, type.vec3], 16, "modelWorldPosition"], [[edit, edit.persist, void 0, type.objectRef("ITriVectorFunction")], 16, "modelTranslationCurve"], [[edit, edit.persist, void 0, type.objectRef("ITriQuaternionFunction")], 16, "modelRotationCurve"], [[edit, edit.persist, type, type.vec3], 16, "shapeEllipsoidCenter"], [[edit, edit.persist, type, type.vec3], 16, "shapeEllipsoidRadius"], [[edit, edit.persist, void 0, type.objectRef("ITriVectorFunction")], 16, "translationCurve"], [[edit, edit.read, type, type.mat4], 16, "worldTransform"], [[edit, edit.read, type, type.mat4], 16, "inverseWorldTransform"], [[edit, edit.read, type, type.mat4], 16, "lastWorldTransform"], [[edit, edit.read, type, type.vec3], 16, "worldVelocity"], [[edit, edit.readwrite, void 0, type.objectRef("ITr2AudGeometry")], 16, "audioGeometry"], [[type, type.boolean], 16, "isVisible"], [[carbon, carbon.method, impl, impl.adapted], 18, "Initialize"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetMesh"], [[carbon, carbon.method, impl, impl.adapted], 18, "SetMesh"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetOverlayEffects"], [[carbon, carbon.method, impl, impl.adapted], 18, "AddController"], [[carbon, carbon.method, impl, impl.implemented], 18, "AddObserver"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetInheritProperties"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetEffectChildByName"], [[carbon, carbon.method, impl, impl.implemented], 18, "OnListModified"], [[carbon, carbon.method, impl, impl.adapted], 18, "AddToEffectChildrenList"], [[carbon, carbon.method, impl, impl.implemented], 18, "AddLight"], [[carbon, carbon.method, impl, impl.implemented], 18, "ClearLights"], [[carbon, carbon.method, impl, impl.implemented], 18, "RemoveFromEffectChildrenList"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetModelRotationCurve"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetModelRotationCurve"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetModelTranslationCurve"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetModelTranslationCurve"], [[carbon, carbon.method, impl, impl.adapted], 18, "UpdateWorldTransform"], [[carbon, carbon.method, impl, impl.implemented], 18, "UpdateWorldBounds"], [[carbon, carbon.method, impl, impl.implemented], 18, "PrepareShaderData"], [[carbon, carbon.method, impl, impl.implemented], 18, "UpdateShLighting"], [[carbon, carbon.method, impl, impl.implemented], 18, "ClearShLighting"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetParentData"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetPerObjectStructs"], [[carbon, carbon.method, impl, impl.adapted], 18, "UpdateSyncronous"], [[carbon, carbon.method, impl, impl.adapted], 18, "UpdateAsyncronous"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Native impostor, raytracing, and audio-emitter realization are not ported yet; graph visibility and LOD state are preserved.")], 18, "UpdateVisibility"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Impostor submission and decal mesh caches are not ported yet; Trinity returns the backend-neutral renderable graph.")], 18, "GetRenderables"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Overlay area-block batches are deferred; the view position arrives via the appended render-context argument instead of Carbon's renderer global.")], 18, "GetBatches"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Carbon rebuilds from the geometry-resource notify callback; the GPU-free port rebuilds lazily on first batch use from the mesh areas alone.")], 18, "RebuildCachedData"], [[carbon, carbon.method, impl, impl.implemented], 18, "ReleaseCachedData"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetPickingBatches"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetID"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("LOD draw args are left as a geometry source descriptor and primitive-count gating is not ported yet; Carbon bakes both here.")], 18, "GetShadowBatches"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Overlay selection is fully represented in the CPU graph; realized-LOD draw arguments are not ported yet.")], 18, "GetBatchesFromOverlayVector"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Portable mesh area access replaces Carbon's native mesh-area vectors.")], 18, "HasTransparentBatches"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Carbon reads the Tr2Renderer view-position global; the relocated camera state arrives via the threaded render context.")], 18, "GetSortValue"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Trinity retains and fills persistent VS/PS RawData; the engine owns device buffers, GPU-derived offsets, upload, and binding.")], 18, "GetPerObjectData"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetShadowPerObjectData"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLights"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("The optional length-one array replaces Carbon's float& sizeInShadow out-parameter.")], 18, "IsCastingShadow"], [[carbon, carbon.method, impl, impl.implemented], 18, "RegisterComponents"], [[carbon, carbon.method, impl, impl.implemented], 18, "UnRegisterComponents"], [[carbon, carbon.method, impl, impl.implemented], 18, "DisplayChildren"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetObserverTransform"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLocalToWorldTransform"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetModelCenterWorldPosition"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetWorldPosition"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetWorldRotation"], [[carbon, carbon.method, impl, impl.implemented], 18, "FindSoundEmitter"], [[carbon, carbon.method, impl, impl.adapted], 18, "SetMute"], [[carbon, carbon.method, impl, impl.adapted], 18, "PlayAnimationEx"], [[carbon, carbon.method, impl, impl.adapted], 18, "CalculateSkinnedBoundingBoxFromTransform"], [[carbon, carbon.method, impl, impl.adapted], 18, "CalculateSkinnedBoundingSphere"], [[carbon, carbon.method, impl, impl.implemented], 18, "InvalidateMergedLocators"], [[carbon, carbon.method, impl, impl.adapted], 18, "EnsureChildLocatorMerged"], [[carbon, carbon.method, impl, impl.implemented], 18, "UpdateDamageLocatorFilter"], [[carbon, carbon.method, impl, impl.implemented], 18, "RunDamageLocatorFilter"], [[carbon, carbon.method, impl, impl.implemented], 18, "ClearImpactDamage"], [[carbon, carbon.method, impl, impl.implemented], 18, "ClearAnimations"], [[carbon, carbon.method, impl, impl.implemented], 18, "CreateImpactFromPosition"], [[carbon, carbon.method, impl, impl.adapted], 18, "CreateImpact"], [[carbon, carbon.method, impl, impl.implemented], 18, "EndAnimation"], [[carbon, carbon.method, impl, impl.implemented], 18, "FreezeHighDetailMesh"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetDamageLocatorCount"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLocatorCount"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLocatorsForSet"], [[carbon, carbon.method, impl, impl.implemented], 18, "MergeToLocatorSet"], [[carbon, carbon.method, impl, impl.implemented], 18, "AddLocatorSet"], [[carbon, carbon.method, impl, impl.implemented], 18, "ClearLocatorSets"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetCloseLocatorIndex"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetGoodLocatorIndex"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetDamageLocatorDirection"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("CarbonEngineJS keeps output parameters last and returns a validity flag for targetable callers.")], 18, "GetDamageLocatorPosition"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetDamageLocatorBindPosition"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetClosestDamageLocatorIndex"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("TriRand is represented by Math.random; all locator scoring remains source-faithful.")], 18, "GetGoodDamageLocatorIndex"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetRadius"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetMissPosition"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetImpactConfiguration"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetImpactOverlay"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetImpactOverlay"], [[carbon, carbon.method, impl, impl.implemented], 18, "HasImpactConfigurationShield"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("CarbonEngineJS uses an out-last signature; the ellipsoid intersection is otherwise source-faithful CPU math.")], 18, "GetImpactPosition"], [[carbon, carbon.method, impl, impl.implemented], 18, "UpdateImpact"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetDamageLocator"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetTransformedDamageLocator"], [[carbon, carbon.method, impl, impl.adapted], 18, "IsImpostor"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLocatorPositionFromSet"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLocatorRotationFromSet"], [[carbon, carbon.method, impl, impl.implemented], 18, "HandleControllerEvent"], [[carbon, carbon.method, impl, impl.adapted], 18, "PlayAnimation"], [[carbon, carbon.method, impl, impl.implemented], 18, "ChainAnimation"], [[carbon, carbon.method, impl, impl.implemented], 18, "ChainAnimationEx"], [[carbon, carbon.method, impl, impl.adapted], 18, "RebuildBoundingSphereInformation"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Carbon's CcpMath::Sphere is represented by core-math sph3; object-shaped center/radius input is accepted at adapter boundaries.")], 18, "SetBoundingSphereInformation"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetControllerVariables"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Geometry resources without multi-LOD support expose their sole browser LOD as index zero.")], 18, "GetLastUsedMeshLod"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetLocatorTransform"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetLocalBoundingBox"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetWorldBoundingBox"], [[carbon, carbon.method, impl, impl.implemented], 18, "IsBoundingBoxReady"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetBoundingSphere"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("TriFrustum is supplied structurally by the active engine; both exact and estimated browser frustum methods are supported.")], 18, "EstimatePixelDiameter"], [[carbon, carbon.method, impl, impl.implemented], 18, "IsInFrustum"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetBoundingSphereCenter"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetBoundingSphereRadius"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetBoneCount"], [[carbon, carbon.method, impl, impl.adapted], 18, "SetImpactDamageState"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetImpactAnimation"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetControllerVariable"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetProceduralContainerVariable"], [[carbon, carbon.method, impl, impl.implemented], 18, "StartControllers"], [[carbon, carbon.method, impl, impl.adapted], 18, "TransformLocators"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLocatorInObjectSpace"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetShapeEllipsoid"]], 0, void 0, _EveEntity));
75
+ }), carbon.inherit(ITr2BoundingBox, ITr2Renderable, IEveSpaceObject2, IEveInheritPropertiesOwner)], [[[edit, edit.notify, edit, edit.persist, type, type.int32, void 0, type.enum("trinity.EntityComponents.ReflectionMode")], 16, "reflectionMode"], [[edit, edit.persist, void 0, type.list("IEveSpaceObjectChild")], 16, "effectChildren"], [[edit, edit.persist, void 0, type.list("IEveTransform")], 16, "children"], [[edit, edit.notify, edit, edit.persist, type, type.string], 16, "name"], [[edit, edit.notify, edit, edit.readwrite, type, type.boolean], 16, "mute"], [[edit, edit.readwrite, void 0, type.objectRef("EveChildInheritProperties")], 16, "inheritProperties"], [[edit, edit.persist, void 0, type.list("EveCustomMask")], 16, "customMasks"], [[edit, edit.persist, void 0, type.list("EveMeshOverlayEffect")], 16, "overlayEffects"], [[edit, edit.read, void 0, type.objectRef("Tr2BindingVector3")], 16, "positionDelta"], [[edit, edit.read, type, type.int32, void 0, type.enum("trinity.Tr2Lod")], 16, "lodLevel"], [[edit, edit.persist, void 0, type.list("TriCurveSet")], 16, "curveSets"], [[edit, edit.readwrite, type, type.boolean], 16, "isPickable"], [[edit, edit.read, type, type.float32], 16, "estimatedPixelDiameter"], [[edit, edit.read, type, type.float32], 16, "estimatedPixelDiameterWithChildren"], [[edit, edit.read, type, type.vec3], 16, "generatedShapeEllipsoidCenter"], [[edit, edit.read, type, type.vec3], 16, "generatedShapeEllipsoidRadius"], [[edit, edit.read, void 0, type.objectRef("Tr2GrannyAnimation")], 16, "animationUpdater"], [[edit, edit.persist, type, type.string], 16, "dna"], [[edit, edit.notify, edit, edit.persist, type, type.boolean], 16, "castShadow"], [[edit, edit.persist, type, type.boolean], 16, "isAnimated"], [[edit, edit.persist, type, type.boolean], 16, "dynamicBoundingSphereEnabled"], [[edit, edit.persist, void 0, type.list("IEveSpaceObjectAttachment")], 16, "attachments"], [[edit, edit.persist, void 0, type.list("EveSpaceObjectDecal")], 16, "decals"], [[edit, edit.notify, edit, edit.persist, void 0, type.list("Tr2Light")], 16, "lights"], [[edit, edit.persist, void 0, type.list("Tr2ExternalParameter")], 16, "externalParameters"], [[edit, edit.persist, void 0, type.list("ITr2Controller")], 16, "controllers"], [[edit, edit.persist, void 0, type.list("EveLocator2")], 16, "locators"], [[edit, edit.persist, void 0, type.objectRef("Tr2MeshBase")], 16, "mesh"], [[edit, edit.persist, void 0, type.objectRef("EveImpactOverlay")], 16, "impactOverlay"], [[edit, edit.persist, type, type.vec3], 16, "clipSphereCenter"], [[edit, edit.notify, edit, edit.readwrite, type, type.float32], 16, "clipSphereFactor2"], [[edit, edit.notify, edit, edit.readwrite, type, type.float32], 16, "clipSphereFactor"], [[edit, edit.persist, void 0, type.list("TriObserverLocal")], 16, "observers"], [[edit, edit.read, type, type.vec3], 16, "worldPosition"], [[edit, edit.persist, void 0, type.objectRef("ITriQuaternionFunction")], 16, "rotationCurve"], [[edit, edit.read, type, type.quat], 16, "worldRotation"], [[edit, edit.persist, type, type.float32], 16, "modelScale"], [[edit, edit.persist, void 0, type.list("EveLocatorSets")], 16, "locatorSets"], [[edit, edit.readwrite, type, type.float32], 16, "activationStrength"], [[edit, edit.readwrite, type, type.color], 16, "albedoColor"], [[edit, edit.notify, edit, edit.persist, type, type.boolean], 16, "display"], [[edit, edit.persist, type, type.boolean], 16, "update"], [[edit, edit.read, type, type.float32], 16, "secondaryLightingSphereRadius"], [[edit, edit.persist, type, type.vec3], 16, "boundingSphereCenter"], [[edit, edit.notify, edit, edit.readwrite, type, type.float32], 16, "dirtLevel"], [[edit, edit.readwrite, type, type.vec4], 16, "customShaderData"], [[edit, edit.read, type, type.vec4], 16, "spaceObjectShipData"], [[edit, edit.read, type, type.int32], 16, "lastDamageLocatorHit"], [[edit, edit.notify, edit, edit.readwrite, type, type.boolean], 16, "damageLocatorAutoFilterEnabled"], [[edit, edit.persist, type, type.float32], 16, "boundingSphereRadius"], [[edit, edit.read, type, type.vec3], 16, "modelWorldPosition"], [[edit, edit.persist, void 0, type.objectRef("ITriVectorFunction")], 16, "modelTranslationCurve"], [[edit, edit.persist, void 0, type.objectRef("ITriQuaternionFunction")], 16, "modelRotationCurve"], [[edit, edit.persist, type, type.vec3], 16, "shapeEllipsoidCenter"], [[edit, edit.persist, type, type.vec3], 16, "shapeEllipsoidRadius"], [[edit, edit.persist, void 0, type.objectRef("ITriVectorFunction")], 16, "translationCurve"], [[edit, edit.read, type, type.mat4], 16, "worldTransform"], [[edit, edit.read, type, type.mat4], 16, "inverseWorldTransform"], [[edit, edit.read, type, type.mat4], 16, "lastWorldTransform"], [[edit, edit.read, type, type.vec3], 16, "worldVelocity"], [[edit, edit.readwrite, void 0, type.objectRef("ITr2AudGeometry")], 16, "audioGeometry"], [[type, type.boolean], 16, "isVisible"], [[carbon, carbon.method, impl, impl.adapted], 18, "Initialize"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetMesh"], [[carbon, carbon.method, impl, impl.adapted], 18, "SetMesh"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetOverlayEffects"], [[carbon, carbon.method, impl, impl.adapted], 18, "AddController"], [[carbon, carbon.method, impl, impl.implemented], 18, "AddObserver"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetInheritProperties"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetEffectChildByName"], [[carbon, carbon.method, impl, impl.implemented], 18, "OnListModified"], [[carbon, carbon.method, impl, impl.adapted], 18, "AddToEffectChildrenList"], [[carbon, carbon.method, impl, impl.implemented], 18, "AddLight"], [[carbon, carbon.method, impl, impl.implemented], 18, "ClearLights"], [[carbon, carbon.method, impl, impl.implemented], 18, "RemoveFromEffectChildrenList"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetModelRotationCurve"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetModelRotationCurve"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetModelTranslationCurve"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetModelTranslationCurve"], [[carbon, carbon.method, impl, impl.adapted], 18, "UpdateWorldTransform"], [[carbon, carbon.method, impl, impl.implemented], 18, "UpdateWorldBounds"], [[carbon, carbon.method, impl, impl.implemented], 18, "PrepareShaderData"], [[carbon, carbon.method, impl, impl.implemented], 18, "UpdateShLighting"], [[carbon, carbon.method, impl, impl.implemented], 18, "ClearShLighting"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetParentData"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetPerObjectStructs"], [[carbon, carbon.method, impl, impl.adapted], 18, "UpdateSyncronous"], [[carbon, carbon.method, impl, impl.adapted], 18, "UpdateAsyncronous"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Native impostor, raytracing, and audio-emitter realization are not ported yet; graph visibility and LOD state are preserved.")], 18, "UpdateVisibility"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Impostor submission and decal mesh caches are not ported yet; Trinity returns the backend-neutral renderable graph.")], 18, "GetRenderables"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Overlay area-block batches are deferred; the view position arrives via the appended render-context argument instead of Carbon's renderer global.")], 18, "GetBatches"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Carbon rebuilds from the geometry-resource notify callback; the GPU-free port rebuilds lazily on first batch use from the mesh areas alone.")], 18, "RebuildCachedData"], [[carbon, carbon.method, impl, impl.implemented], 18, "ReleaseCachedData"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetPickingBatches"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetID"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("LOD draw args are left as a geometry source descriptor and primitive-count gating is not ported yet; Carbon bakes both here.")], 18, "GetShadowBatches"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Overlay selection is fully represented in the CPU graph; realized-LOD draw arguments are not ported yet.")], 18, "GetBatchesFromOverlayVector"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Portable mesh area access replaces Carbon's native mesh-area vectors.")], 18, "HasTransparentBatches"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Carbon reads the Tr2Renderer view-position global; the relocated camera state arrives via the threaded render context.")], 18, "GetSortValue"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Trinity retains and fills persistent VS/PS RawData; the engine owns device buffers, GPU-derived offsets, upload, and binding.")], 18, "GetPerObjectData"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetShadowPerObjectData"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLights"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("The optional length-one array replaces Carbon's float& sizeInShadow out-parameter.")], 18, "IsCastingShadow"], [[carbon, carbon.method, impl, impl.implemented], 18, "RegisterComponents"], [[carbon, carbon.method, impl, impl.implemented], 18, "UnRegisterComponents"], [[carbon, carbon.method, impl, impl.implemented], 18, "DisplayChildren"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetObserverTransform"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLocalToWorldTransform"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetModelCenterWorldPosition"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetWorldPosition"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetWorldRotation"], [[carbon, carbon.method, impl, impl.implemented], 18, "FindSoundEmitter"], [[carbon, carbon.method, impl, impl.adapted], 18, "SetMute"], [[carbon, carbon.method, impl, impl.adapted], 18, "PlayAnimationEx"], [[carbon, carbon.method, impl, impl.adapted], 18, "CalculateSkinnedBoundingBoxFromTransform"], [[carbon, carbon.method, impl, impl.adapted], 18, "CalculateSkinnedBoundingSphere"], [[carbon, carbon.method, impl, impl.implemented], 18, "InvalidateMergedLocators"], [[carbon, carbon.method, impl, impl.adapted], 18, "EnsureChildLocatorMerged"], [[carbon, carbon.method, impl, impl.implemented], 18, "UpdateDamageLocatorFilter"], [[carbon, carbon.method, impl, impl.implemented], 18, "RunDamageLocatorFilter"], [[carbon, carbon.method, impl, impl.implemented], 18, "ClearImpactDamage"], [[carbon, carbon.method, impl, impl.implemented], 18, "ClearAnimations"], [[carbon, carbon.method, impl, impl.implemented], 18, "CreateImpactFromPosition"], [[carbon, carbon.method, impl, impl.adapted], 18, "CreateImpact"], [[carbon, carbon.method, impl, impl.implemented], 18, "EndAnimation"], [[carbon, carbon.method, impl, impl.implemented], 18, "FreezeHighDetailMesh"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetDamageLocatorCount"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLocatorCount"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLocatorsForSet"], [[carbon, carbon.method, impl, impl.implemented], 18, "MergeToLocatorSet"], [[carbon, carbon.method, impl, impl.implemented], 18, "AddLocatorSet"], [[carbon, carbon.method, impl, impl.implemented], 18, "ClearLocatorSets"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetCloseLocatorIndex"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetGoodLocatorIndex"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetDamageLocatorDirection"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("CarbonEngineJS keeps output parameters last and returns a validity flag for targetable callers.")], 18, "GetDamageLocatorPosition"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetDamageLocatorBindPosition"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetClosestDamageLocatorIndex"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("TriRand is represented by Math.random; all locator scoring remains source-faithful.")], 18, "GetGoodDamageLocatorIndex"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetRadius"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetMissPosition"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetImpactConfiguration"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetImpactOverlay"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetImpactOverlay"], [[carbon, carbon.method, impl, impl.implemented], 18, "HasImpactConfigurationShield"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("CarbonEngineJS uses an out-last signature; the ellipsoid intersection is otherwise source-faithful CPU math.")], 18, "GetImpactPosition"], [[carbon, carbon.method, impl, impl.implemented], 18, "UpdateImpact"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetDamageLocator"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetTransformedDamageLocator"], [[carbon, carbon.method, impl, impl.adapted], 18, "IsImpostor"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLocatorPositionFromSet"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLocatorRotationFromSet"], [[carbon, carbon.method, impl, impl.implemented], 18, "HandleControllerEvent"], [[carbon, carbon.method, impl, impl.adapted], 18, "PlayAnimation"], [[carbon, carbon.method, impl, impl.implemented], 18, "ChainAnimation"], [[carbon, carbon.method, impl, impl.implemented], 18, "ChainAnimationEx"], [[carbon, carbon.method, impl, impl.adapted], 18, "RebuildBoundingSphereInformation"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Carbon's CcpMath::Sphere is represented by core-math sph3; object-shaped center/radius input is accepted at adapter boundaries.")], 18, "SetBoundingSphereInformation"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetControllerVariables"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Geometry resources without multi-LOD support expose their sole browser LOD as index zero.")], 18, "GetLastUsedMeshLod"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetLocatorTransform"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetLocalBoundingBox"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetWorldBoundingBox"], [[carbon, carbon.method, impl, impl.implemented], 18, "IsBoundingBoxReady"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetBoundingSphere"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("TriFrustum is supplied structurally by the active engine; both exact and estimated browser frustum methods are supported.")], 18, "EstimatePixelDiameter"], [[carbon, carbon.method, impl, impl.implemented], 18, "IsInFrustum"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetBoundingSphereCenter"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetBoundingSphereRadius"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetBoneCount"], [[carbon, carbon.method, impl, impl.adapted], 18, "SetImpactDamageState"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetImpactAnimation"], [[carbon, carbon.method, impl, impl.implemented], 18, "CollectPartDamageOverlays"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetControllerVariable"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetProceduralContainerVariable"], [[carbon, carbon.method, impl, impl.implemented], 18, "StartControllers"], [[carbon, carbon.method, impl, impl.adapted], 18, "TransformLocators"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetTransformedLocatorsFromSet"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLocatorInObjectSpace"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetShapeEllipsoid"]], 0, void 0, _EveEntity));
75
76
  }
76
77
  /** m_reflectionMode (EntityComponents::ReflectionMode - enum ReflectionMode) [READWRITE, PERSIST, NOTIFY, ENUM] */
77
78
  reflectionMode = (_initProto(this), _init_reflectionMode(this, 3));
@@ -211,10 +212,10 @@ new class extends _identity {
211
212
  /** m_psData.customData (Vector4) [READWRITE] - script/SOF-driven custom shader data. */
212
213
  customShaderData = (_init_extra_dirtLevel(this), _init_customShaderData(this, vec4.create()));
213
214
 
214
- /**
215
- * m_spaceObjectShipData (Vector4) [READ] - the packed shader ship data:
216
- * .y activation strength, .z dirt level, .w bounding-sphere radius
217
- * (PrepareShaderData, cpp:734-744). .x is authored elsewhere and left alone.
215
+ /**
216
+ * m_spaceObjectShipData (Vector4) [READ] - the packed shader ship data:
217
+ * .y activation strength, .z dirt level, .w bounding-sphere radius
218
+ * (PrepareShaderData, cpp:734-744). .x is authored elsewhere and left alone.
218
219
  */
219
220
  spaceObjectShipData = (_init_extra_customShaderData(this), _init_spaceObjectShipData(this, vec4.create()));
220
221
 
@@ -301,10 +302,10 @@ new class extends _identity {
301
302
 
302
303
  /** EVE_SPACEOBJECT_CUSTOWMASK_MAX (EveSpaceObject2.h:49) - custom-mask slots. */
303
304
 
304
- /**
305
- * Carbon g_secondaryLightingRadiusCutoffFactor (cpp:52), a registered engine
306
- * setting defaulting to 0.3. It scales this hull's bounding radius into the
307
- * cutoff below which a secondary light source is too small to matter.
305
+ /**
306
+ * Carbon g_secondaryLightingRadiusCutoffFactor (cpp:52), a registered engine
307
+ * setting defaulting to 0.3. It scales this hull's bounding radius into the
308
+ * cutoff below which a secondary light source is too small to matter.
308
309
  */
309
310
 
310
311
  /** Scratch for the per-frame shader-data fill; never allocate in it. */
@@ -315,7 +316,7 @@ new class extends _identity {
315
316
  // (cpp:3747 takes the world translation out of the STORED transposed matrix).
316
317
  // Carbon's paired m_perObjectDataVs/m_perObjectDataPs GPU buffers are the
317
318
  // engine's business; Invalidate on these records carries the same signal.
318
- /** The ParentData Carbon builds on the stack for the decal pass
319
+ /** The ParentData Carbon builds on the stack for the decal pass
319
320
  * (EveSpaceObject2.cpp:1696), held here so the pass does not allocate. */
320
321
  #decalParentData = new IEveSpaceObject2ParentData();
321
322
  #vsData = RawData.create("EveSpaceObjectVSData");
@@ -331,12 +332,12 @@ new class extends _identity {
331
332
  this.mesh = mesh ?? null;
332
333
  }
333
334
 
334
- /**
335
- * Links the authored controllers, pushes authored inherit properties down to
336
- * the effect children and lights, and derives the impact overlay's damage
337
- * locator count from the "damage" locator set - which Carbon does at build
338
- * time - so a field-populated graph reaches the same live state as the
339
- * authoring path.
335
+ /**
336
+ * Links the authored controllers, pushes authored inherit properties down to
337
+ * the effect children and lights, and derives the impact overlay's damage
338
+ * locator count from the "damage" locator set - which Carbon does at build
339
+ * time - so a field-populated graph reaches the same live state as the
340
+ * authoring path.
340
341
  */
341
342
  Initialize() {
342
343
  for (const controller of this.controllers) {
@@ -367,9 +368,9 @@ new class extends _identity {
367
368
  return this.mesh;
368
369
  }
369
370
 
370
- /**
371
- * Replaces the hull mesh; the cached area blocks are only rebuilt on the next
372
- * batch call.
371
+ /**
372
+ * Replaces the hull mesh; the cached area blocks are only rebuilt on the next
373
+ * batch call.
373
374
  */
374
375
  SetMesh(mesh) {
375
376
  this.mesh = mesh ?? null;
@@ -380,9 +381,9 @@ new class extends _identity {
380
381
  return this.overlayEffects;
381
382
  }
382
383
 
383
- /**
384
- * Appends a controller, links it to this object when it is not already linked,
385
- * and replays the current controller variables onto it.
384
+ /**
385
+ * Appends a controller, links it to this object when it is not already linked,
386
+ * and replays the current controller variables onto it.
386
387
  */
387
388
  AddController(controller) {
388
389
  // The link and the variable replay are the INSERTED arm's (cpp:297-311).
@@ -390,20 +391,20 @@ new class extends _identity {
390
391
  return controller;
391
392
  }
392
393
 
393
- /**
394
- * Appends a placement observer, which is repositioned from the observer
395
- * transform on every synchronous update; the observer is returned for
396
- * chaining.
394
+ /**
395
+ * Appends a placement observer, which is repositioned from the observer
396
+ * transform on every synchronous update; the observer is returned for
397
+ * chaining.
397
398
  */
398
399
  AddObserver(observer) {
399
400
  this.observers.push(observer);
400
401
  return observer;
401
402
  }
402
403
 
403
- /**
404
- * Sets the colour set that effect children and lights inherit, creating the
405
- * inherit-properties holder on first use, and pushes it to the existing
406
- * children and lights.
404
+ /**
405
+ * Sets the colour set that effect children and lights inherit, creating the
406
+ * inherit-properties holder on first use, and pushes it to the existing
407
+ * children and lights.
407
408
  */
408
409
  SetInheritProperties(colorSet) {
409
410
  if (!this.inheritProperties) {
@@ -424,9 +425,9 @@ new class extends _identity {
424
425
  }
425
426
  }
426
427
 
427
- /**
428
- * Returns the first effect child with the given name, or null when none
429
- * matches.
428
+ /**
429
+ * Returns the first effect child with the given name, or null when none
430
+ * matches.
430
431
  */
431
432
  GetEffectChildByName(name) {
432
433
  const target = String(name ?? "");
@@ -438,20 +439,20 @@ new class extends _identity {
438
439
  return null;
439
440
  }
440
441
 
441
- /**
442
- * Carbon OnListModified (EveSpaceObject2.cpp:291-469), the owner reacting to
443
- * its own lists. Carbon installs itself on six of them at cpp:217-222 and the
444
- * lists notify it; a JavaScript array has no notify slot, so the managed child
445
- * mutation drives the same call.
446
- *
447
- * Controllers link and replay the recorded variables on insert, unlink on
448
- * remove, and unlink every one on unload. Effect children take ownership,
449
- * replay variables and register with the component registry; removal
450
- * unregisters and clears ownership. Overlay effects replay variables only.
451
- * Inherited properties reach a newly inserted child or light. The LightOwner
452
- * component follows the list edges: registered on the first light, dropped on
453
- * the last removal or an unload. Decals renumber their priorities, which is
454
- * the one arm needing SWAPPED and MOVED.
442
+ /**
443
+ * Carbon OnListModified (EveSpaceObject2.cpp:291-469), the owner reacting to
444
+ * its own lists. Carbon installs itself on six of them at cpp:217-222 and the
445
+ * lists notify it; a JavaScript array has no notify slot, so the managed child
446
+ * mutation drives the same call.
447
+ *
448
+ * Controllers link and replay the recorded variables on insert, unlink on
449
+ * remove, and unlink every one on unload. Effect children take ownership,
450
+ * replay variables and register with the component registry; removal
451
+ * unregisters and clears ownership. Overlay effects replay variables only.
452
+ * Inherited properties reach a newly inserted child or light. The LightOwner
453
+ * component follows the list edges: registered on the first light, dropped on
454
+ * the last removal or an unload. Decals renumber their priorities, which is
455
+ * the one arm needing SWAPPED and MOVED.
455
456
  */
456
457
  OnListModified(event, key = 0, key2 = 0, value = null, list = null) {
457
458
  const masked = event & BLUELISTEVENT.BELIST_EVENTMASK;
@@ -495,10 +496,10 @@ new class extends _identity {
495
496
  if (list === this.decals) this.#OnDecalListModified(masked, key, key2);
496
497
  }
497
498
 
498
- /**
499
- * Carbon cpp:413-431: the LightOwner component follows the list EDGES - the
500
- * first light registers it, the last removal or an unload drops it. The same
501
- * size rule RegisterComponents applies at registration time.
499
+ /**
500
+ * Carbon cpp:413-431: the LightOwner component follows the list EDGES - the
501
+ * first light registers it, the last removal or an unload drops it. The same
502
+ * size rule RegisterComponents applies at registration time.
502
503
  */
503
504
  #OnLightListModified(masked) {
504
505
  const registry = this.GetComponentRegistry();
@@ -510,11 +511,11 @@ new class extends _identity {
510
511
  }
511
512
  }
512
513
 
513
- /**
514
- * Carbon cpp:433-468: a decal's priority IS its index, so every structural
515
- * change renumbers from the affected position. The append special case is
516
- * Carbon's own comment - "in case someone calls the append function of
517
- * bluelist from python" - and it renumbers the last entry alone.
514
+ /**
515
+ * Carbon cpp:433-468: a decal's priority IS its index, so every structural
516
+ * change renumbers from the affected position. The append special case is
517
+ * Carbon's own comment - "in case someone calls the append function of
518
+ * bluelist from python" - and it renumbers the last entry alone.
518
519
  */
519
520
  #OnDecalListModified(masked, key, key2) {
520
521
  const decals = this.decals;
@@ -538,10 +539,10 @@ new class extends _identity {
538
539
  }
539
540
  }
540
541
 
541
- /**
542
- * Appends an effect child, first giving it the hull's inherited properties and
543
- * then replaying the current controller variables onto it, so a late addition
544
- * starts in the same state as the rest.
542
+ /**
543
+ * Appends an effect child, first giving it the hull's inherited properties and
544
+ * then replaying the current controller variables onto it, so a late addition
545
+ * starts in the same state as the rest.
545
546
  */
546
547
  AddToEffectChildrenList(child) {
547
548
  // The ownership, the inherited properties and the variable replay are the
@@ -558,9 +559,9 @@ new class extends _identity {
558
559
  CjsModel.addChild(this, "lights", light);
559
560
  }
560
561
 
561
- /**
562
- * Drops every light from the hull; component registration is not revisited
563
- * here.
562
+ /**
563
+ * Drops every light from the hull; component registration is not revisited
564
+ * here.
564
565
  */
565
566
  ClearLights() {
566
567
  // UNLOADSTART, which is what drops the LightOwner component registration
@@ -568,9 +569,9 @@ new class extends _identity {
568
569
  CjsModel.clearChildren(this, "lights");
569
570
  }
570
571
 
571
- /**
572
- * Removes an effect child, returning false when it is not attached to this
573
- * hull.
572
+ /**
573
+ * Removes an effect child, returning false when it is not attached to this
574
+ * hull.
574
575
  */
575
576
  RemoveFromEffectChildrenList(child) {
576
577
  // The unregister and the cleared ownership are the REMOVED arm's
@@ -580,9 +581,9 @@ new class extends _identity {
580
581
  return true;
581
582
  }
582
583
 
583
- /**
584
- * Sets the curve that rotates the model within the hull's ball rotation, or
585
- * clears it when passed nothing.
584
+ /**
585
+ * Sets the curve that rotates the model within the hull's ball rotation, or
586
+ * clears it when passed nothing.
586
587
  */
587
588
  SetModelRotationCurve(curve) {
588
589
  this.modelRotationCurve = curve ?? null;
@@ -593,9 +594,9 @@ new class extends _identity {
593
594
  return this.modelRotationCurve;
594
595
  }
595
596
 
596
- /**
597
- * Sets the curve that offsets the model within the hull's ball position, or
598
- * clears it when passed nothing.
597
+ /**
598
+ * Sets the curve that offsets the model within the hull's ball position, or
599
+ * clears it when passed nothing.
599
600
  */
600
601
  SetModelTranslationCurve(curve) {
601
602
  this.modelTranslationCurve = curve ?? null;
@@ -606,10 +607,10 @@ new class extends _identity {
606
607
  return this.modelTranslationCurve;
607
608
  }
608
609
 
609
- /**
610
- * Rebuilds the hull world transform for a frame from the ball position and rotation curves plus the optional model translation and rotation curves, applies modelScale as a uniform scale, then refreshes the inverse transform and the world bounds; the previous world transform is kept for motion vectors and the world velocity comes from the position curve's derivative.
611
- * @param {number} time Frame time; repeating the previous call's time is a no-op.
612
- * @returns {boolean} False when the transform had already been built for this time.
610
+ /**
611
+ * Rebuilds the hull world transform for a frame from the ball position and rotation curves plus the optional model translation and rotation curves, applies modelScale as a uniform scale, then refreshes the inverse transform and the world bounds; the previous world transform is kept for motion vectors and the world velocity comes from the position curve's derivative.
612
+ * @param {number} time Frame time; repeating the previous call's time is a no-op.
613
+ * @returns {boolean} False when the transform had already been built for this time.
613
614
  */
614
615
  UpdateWorldTransform(time) {
615
616
  const nextTime = Number(time) || 0;
@@ -663,9 +664,9 @@ new class extends _identity {
663
664
  return true;
664
665
  }
665
666
 
666
- /**
667
- * Refreshes Carbon's realized world-space sphere from the dynamic skinned
668
- * sphere when available, otherwise from the authored local sphere.
667
+ /**
668
+ * Refreshes Carbon's realized world-space sphere from the dynamic skinned
669
+ * sphere when available, otherwise from the authored local sphere.
669
670
  */
670
671
  UpdateWorldBounds() {
671
672
  const updater = this.animationUpdater;
@@ -683,10 +684,10 @@ new class extends _identity {
683
684
  }
684
685
  }
685
686
 
686
- /**
687
- * Carbon EveSpaceObject2::PrepareShaderData (cpp:734-763): refreshes the
688
- * world bounds, packs the ship data, and derives the clip-sphere dissolve
689
- * values into the persistent per-object records.
687
+ /**
688
+ * Carbon EveSpaceObject2::PrepareShaderData (cpp:734-763): refreshes the
689
+ * world bounds, packs the ship data, and derives the clip-sphere dissolve
690
+ * values into the persistent per-object records.
690
691
  */
691
692
  PrepareShaderData(updateContext = null) {
692
693
  this.UpdateWorldBounds();
@@ -716,14 +717,14 @@ new class extends _identity {
716
717
  this.#psData.Set("clipSphereFactor2", [this.clipSphereFactor2]);
717
718
  }
718
719
 
719
- /**
720
- * Carbon EveSpaceObject2::UpdateShLighting (cpp:1411-1421): asks the scene's
721
- * SH lighting manager for this hull's secondary-lighting coefficients, faded
722
- * in across the low-detail threshold so a hull entering that range does not
723
- * pop. The coefficients are cleared first, which is also what leaves the
724
- * unwritten tail zero on the L1 path.
725
- * @param {Object} manager - Tr2ShLightingManager
726
- * @param {Object} [updateContext] - frame context, for the detail thresholds
720
+ /**
721
+ * Carbon EveSpaceObject2::UpdateShLighting (cpp:1411-1421): asks the scene's
722
+ * SH lighting manager for this hull's secondary-lighting coefficients, faded
723
+ * in across the low-detail threshold so a hull entering that range does not
724
+ * pop. The coefficients are cleared first, which is also what leaves the
725
+ * unwritten tail zero on the L1 path.
726
+ * @param {Object} manager - Tr2ShLightingManager
727
+ * @param {Object} [updateContext] - frame context, for the detail thresholds
727
728
  */
728
729
  UpdateShLighting(manager, updateContext = null) {
729
730
  const coefficients = this.#psData.Get("shLightingCoefficients");
@@ -739,21 +740,21 @@ new class extends _identity {
739
740
  return true;
740
741
  }
741
742
 
742
- /**
743
- * Carbon EveSpaceObject2::ClearShLighting (cpp:1423-1426): drops this hull's
744
- * secondary-lighting contribution back to nothing.
743
+ /**
744
+ * Carbon EveSpaceObject2::ClearShLighting (cpp:1423-1426): drops this hull's
745
+ * secondary-lighting contribution back to nothing.
745
746
  */
746
747
  ClearShLighting() {
747
748
  this.#psData.Get("shLightingCoefficients").fill(0);
748
749
  return true;
749
750
  }
750
751
 
751
- /**
752
- * Carbon EveSpaceObject2::GetParentData (cpp:1872-1885): the values an
753
- * attachment needs from its hull. `shLighting` is a LIVE view into the PS
754
- * record, exactly as Carbon hands out a raw pointer into m_psData - an
755
- * attachment reading it sees the hull's current coefficients.
756
- * @param {Object} [out] - caller-owned record, refreshed in place
752
+ /**
753
+ * Carbon EveSpaceObject2::GetParentData (cpp:1872-1885): the values an
754
+ * attachment needs from its hull. `shLighting` is a LIVE view into the PS
755
+ * record, exactly as Carbon hands out a raw pointer into m_psData - an
756
+ * attachment reading it sees the hull's current coefficients.
757
+ * @param {Object} [out] - caller-owned record, refreshed in place
757
758
  */
758
759
  GetParentData(out = new IEveSpaceObject2ParentData()) {
759
760
  mat4.copy(out.transform, this.worldTransform);
@@ -770,11 +771,11 @@ new class extends _identity {
770
771
  return out;
771
772
  }
772
773
 
773
- /**
774
- * Carbon EveSpaceObject2::GetPerObjectStructs (cpp:1485-1490): hands a copy
775
- * of both records to a caller, with the VS record's customData taken from the
776
- * PS record as Carbon does.
777
- * @returns {{vs: RawData, ps: RawData}} independent copies, not live records
774
+ /**
775
+ * Carbon EveSpaceObject2::GetPerObjectStructs (cpp:1485-1490): hands a copy
776
+ * of both records to a caller, with the VS record's customData taken from the
777
+ * PS record as Carbon does.
778
+ * @returns {{vs: RawData, ps: RawData}} independent copies, not live records
778
779
  */
779
780
  GetPerObjectStructs(vsData = RawData.create("EveSpaceObjectVSData"), psData = RawData.create("EveSpaceObjectPSData")) {
780
781
  vsData.CopyFrom(this.#vsData);
@@ -786,9 +787,9 @@ new class extends _identity {
786
787
  };
787
788
  }
788
789
 
789
- /**
790
- * Refreshes the world transform, then - when the update flag is on - places the observers, stamps the LOD-gated curve clock while advancing the overlay effects, runs the effect children's synchronous pass with the current placement, and updates the impact overlay; the overlay effects receive the context time as both clocks, as Carbon does.
791
- * @returns {boolean} False when the update flag is off; the world transform is refreshed either way.
790
+ /**
791
+ * Refreshes the world transform, then - when the update flag is on - places the observers, stamps the LOD-gated curve clock while advancing the overlay effects, runs the effect children's synchronous pass with the current placement, and updates the impact overlay; the overlay effects receive the context time as both clocks, as Carbon does.
792
+ * @returns {boolean} False when the update flag is off; the world transform is refreshed either way.
792
793
  */
793
794
  UpdateSyncronous(updateContext = null) {
794
795
  const time = _EveSpaceObject.#GetContextValue(updateContext, "GetTime", "currentTime", "time");
@@ -829,9 +830,9 @@ new class extends _identity {
829
830
  return true;
830
831
  }
831
832
 
832
- /**
833
- * Runs the controllers at a frequency derived from the hull's estimated pixel diameter against the context's high-detail threshold, advances the object curve sets only on frames the synchronous LOD gate stamped, then updates the transform children, the effect children and the impact overlay.
834
- * @returns {number} The controller update frequency in 0..1, which is also handed to the effect children; 0 when the hull is not visible or the update flag is off.
833
+ /**
834
+ * Runs the controllers at a frequency derived from the hull's estimated pixel diameter against the context's high-detail threshold, advances the object curve sets only on frames the synchronous LOD gate stamped, then updates the transform children, the effect children and the impact overlay.
835
+ * @returns {number} The controller update frequency in 0..1, which is also handed to the effect children; 0 when the hull is not visible or the update flag is off.
835
836
  */
836
837
  UpdateAsyncronous(updateContext = null) {
837
838
  if (!this.update) {
@@ -908,9 +909,9 @@ new class extends _identity {
908
909
  return frequency;
909
910
  }
910
911
 
911
- /**
912
- * Updates Carbon's visibility, pixel-size, and mesh-LOD state, then forwards
913
- * visibility to the explicitly owned visual branches.
912
+ /**
913
+ * Updates Carbon's visibility, pixel-size, and mesh-LOD state, then forwards
914
+ * visibility to the explicitly owned visual branches.
914
915
  */
915
916
  UpdateVisibility(updateContext = null, _parentTransform = _EveSpaceObject.#identityTransform) {
916
917
  this.isVisible = false;
@@ -981,10 +982,13 @@ new class extends _identity {
981
982
  decal.UpdateVisibility(updateContext, parentData);
982
983
  }
983
984
  }
985
+
986
+ // Carbon EveSpaceObject2.cpp:1715-1716 sizes EVERY object, mesh or not: a
987
+ // mesh-less modular object still draws its impacts at this LOD.
988
+ _EveSpaceObject.#SetSphere(_EveSpaceObject.#worldSphere, this.modelWorldPosition, this.#boundingSphereWorldRadius);
989
+ this.#meshScreenSize = _EveSpaceObject.#GetEstimatedPixelSize(frustum, _EveSpaceObject.#worldSphere) * lodFactor;
990
+ if (!this.#allowLodSelection) this.#meshScreenSize = Infinity;
984
991
  if (this.mesh && this.#boundingSphereWorldRadius > 0) {
985
- _EveSpaceObject.#SetSphere(_EveSpaceObject.#worldSphere, this.modelWorldPosition, this.#boundingSphereWorldRadius);
986
- this.#meshScreenSize = _EveSpaceObject.#GetEstimatedPixelSize(frustum, _EveSpaceObject.#worldSphere) * lodFactor;
987
- if (!this.#allowLodSelection) this.#meshScreenSize = Infinity;
988
992
  this.mesh.UseWithScreenSize?.(this.#meshScreenSize, this.#boundingSphereWorldRadius);
989
993
  }
990
994
  return this.isVisible;
@@ -998,6 +1002,10 @@ new class extends _identity {
998
1002
  }
999
1003
  if (this.mesh && this.#isMeshVisible && this.mesh.IsLoading?.() !== true) {
1000
1004
  out.push(this);
1005
+ } else if (!this.mesh && this.impactOverlay && this.#isMeshVisible) {
1006
+ // A mesh-less modular object still draws its impacts (Carbon
1007
+ // EveSpaceObject2.cpp:1545-1548).
1008
+ out.push(this);
1001
1009
  }
1002
1010
  if (this.DisplayChildren()) {
1003
1011
  for (const child of this.children) child?.GetRenderables(out);
@@ -1019,13 +1027,18 @@ new class extends _identity {
1019
1027
  return out;
1020
1028
  }
1021
1029
 
1022
- /** Carbon ITr2Renderable contract (EveSpaceObject2.cpp:1097-1140): activated
1023
- * attachments recurse, the impact overlay contributes, the hull mesh delegates
1024
- * per batch type, and TRANSPARENT routes through the distance-sorted area
1025
- * path. GetBatchesFromOverlayVector (precomputed overlay area blocks) is
1030
+ /** Carbon ITr2Renderable contract (EveSpaceObject2.cpp:1097-1140): activated
1031
+ * attachments recurse, the impact overlay contributes, the hull mesh delegates
1032
+ * per batch type, and TRANSPARENT routes through the distance-sorted area
1033
+ * path. GetBatchesFromOverlayVector (precomputed overlay area blocks) is
1026
1034
  * deferred with the overlay realization work. */
1027
1035
  GetBatches(batches, batchType, perObjectData, reason, renderContext = null) {
1028
- if (!this.mesh) return false;
1036
+ if (!this.mesh) {
1037
+ // Mesh-less objects (modular ships) still render their impact effects
1038
+ // (Carbon EveSpaceObject2.cpp:1127-1135).
1039
+ if (!this.impactOverlay) return false;
1040
+ return this.impactOverlay.GetBatches(batches, batchType, perObjectData, this.#meshScreenSize);
1041
+ }
1029
1042
  if (this.mesh.display === false) return false;
1030
1043
 
1031
1044
  // Returns whether any batch was committed (JS addition; Carbon returns
@@ -1062,11 +1075,11 @@ new class extends _identity {
1062
1075
  // from the geometry resource when it exposes them; a failed lookup keeps
1063
1076
  // Carbon's origin-center fallback.
1064
1077
 
1065
- /**
1066
- * Commits the mesh's transparent areas back-to-front, ordering them by the
1067
- * squared distance from the view position to each area's world-space
1068
- * bounding-box center and falling back to the object origin when the geometry
1069
- * resource cannot supply a box.
1078
+ /**
1079
+ * Commits the mesh's transparent areas back-to-front, ordering them by the
1080
+ * squared distance from the view position to each area's world-space
1081
+ * bounding-box center and falling back to the object origin when the geometry
1082
+ * resource cannot supply a box.
1070
1083
  */
1071
1084
  #GetSortedTransparentBatches(areas, batches, perObjectData, renderContext) {
1072
1085
  const geometry = this.mesh.GetGeometryResource() ?? null;
@@ -1104,10 +1117,10 @@ new class extends _identity {
1104
1117
  }
1105
1118
  }
1106
1119
 
1107
- /** Rebuilds the cached overlay/shadow area-block lists from the current mesh
1108
- * (Carbon RebuildCachedData, EveSpaceObject2.cpp:2077-2097, triggered there by
1109
- * the geometry-resource load callback). TYPE_ALL = shadow-casting OPAQUE +
1110
- * TRANSPARENT + DECAL areas; TYPE_OPAQUEONLY = shadow-casting OPAQUE; the
1120
+ /** Rebuilds the cached overlay/shadow area-block lists from the current mesh
1121
+ * (Carbon RebuildCachedData, EveSpaceObject2.cpp:2077-2097, triggered there by
1122
+ * the geometry-resource load callback). TYPE_ALL = shadow-casting OPAQUE +
1123
+ * TRANSPARENT + DECAL areas; TYPE_OPAQUEONLY = shadow-casting OPAQUE; the
1111
1124
  * shadow list groups OPAQUE areas by shared material. All coalesced. */
1112
1125
  RebuildCachedData() {
1113
1126
  this.ReleaseCachedData();
@@ -1127,9 +1140,9 @@ new class extends _identity {
1127
1140
  this.#cachedAreaBlocksBuilt = true;
1128
1141
  }
1129
1142
 
1130
- /**
1131
- * Drops the cached overlay and shadow area-block lists so the next batch call
1132
- * rebuilds them from the current mesh.
1143
+ /**
1144
+ * Drops the cached overlay and shadow area-block lists so the next batch call
1145
+ * rebuilds them from the current mesh.
1133
1146
  */
1134
1147
  ReleaseCachedData() {
1135
1148
  for (const blocks of this.#overlayMeshAreaBlocks) {
@@ -1139,25 +1152,25 @@ new class extends _identity {
1139
1152
  this.#cachedAreaBlocksBuilt = false;
1140
1153
  }
1141
1154
 
1142
- /**
1143
- * Rebuilds the cached area blocks on first use when a mesh is attached; Carbon
1144
- * instead rebuilds them from the geometry-resource load callback.
1155
+ /**
1156
+ * Rebuilds the cached area blocks on first use when a mesh is attached; Carbon
1157
+ * instead rebuilds them from the geometry-resource load callback.
1145
1158
  */
1146
1159
  #EnsureCachedAreaBlocks() {
1147
1160
  if (!this.#cachedAreaBlocksBuilt && this.mesh) this.RebuildCachedData();
1148
1161
  }
1149
1162
 
1150
- /**
1151
- * Carbon EveSpaceObject2::GetPickingBatches (cpp:3645-3675): collects the
1152
- * geometry a pick pass should test, by mask. It is ordinary batch collection
1153
- * - the pick itself is an engine pass that renders these and reads IDs back.
1154
- *
1155
- * The OPAQUE bit deliberately pulls in the transparent and additive OVERLAY
1156
- * effects too, so a cloaking hull stays pickable.
1157
- *
1158
- * @param {Object} batches - the picking accumulator
1159
- * @param {Number} pickTypes - a Tr2PickType mask
1160
- * @param {Object} perObjectData - this hull's per-object record
1163
+ /**
1164
+ * Carbon EveSpaceObject2::GetPickingBatches (cpp:3645-3675): collects the
1165
+ * geometry a pick pass should test, by mask. It is ordinary batch collection
1166
+ * - the pick itself is an engine pass that renders these and reads IDs back.
1167
+ *
1168
+ * The OPAQUE bit deliberately pulls in the transparent and additive OVERLAY
1169
+ * effects too, so a cloaking hull stays pickable.
1170
+ *
1171
+ * @param {Object} batches - the picking accumulator
1172
+ * @param {Number} pickTypes - a Tr2PickType mask
1173
+ * @param {Object} perObjectData - this hull's per-object record
1161
1174
  */
1162
1175
  GetPickingBatches(batches, pickTypes = TR2_PICK_TYPE_DEFAULT, perObjectData = null) {
1163
1176
  if (pickTypes & Tr2PickType.PICK_TYPE_PICKING) {
@@ -1186,20 +1199,20 @@ new class extends _identity {
1186
1199
  return true;
1187
1200
  }
1188
1201
 
1189
- /**
1190
- * Carbon EveSpaceObject2::GetID (cpp:3640-3643): a picked area resolves to
1191
- * the hull itself, so the area index is deliberately ignored.
1192
- * @param {Number} [_areaID] - the picked area, unused by this class
1193
- * @returns {EveSpaceObject2} this
1202
+ /**
1203
+ * Carbon EveSpaceObject2::GetID (cpp:3640-3643): a picked area resolves to
1204
+ * the hull itself, so the area index is deliberately ignored.
1205
+ * @param {Number} [_areaID] - the picked area, unused by this class
1206
+ * @returns {EveSpaceObject2} this
1194
1207
  */
1195
1208
  GetID(_areaID = 0) {
1196
1209
  return this;
1197
1210
  }
1198
1211
 
1199
- /** Carbon GetShadowBatches (EveSpaceObject2.cpp:1143-1184): one batch per
1200
- * cached shared-material OPAQUE area block, using the area's own material.
1201
- * Carbon bakes LOD draw args at this point; doing the same is not ported, so
1202
- * they travel as a geometry source descriptor and shadowPixelSize goes unused
1212
+ /** Carbon GetShadowBatches (EveSpaceObject2.cpp:1143-1184): one batch per
1213
+ * cached shared-material OPAQUE area block, using the area's own material.
1214
+ * Carbon bakes LOD draw args at this point; doing the same is not ported, so
1215
+ * they travel as a geometry source descriptor and shadowPixelSize goes unused
1203
1216
  * until LOD selection is ported. */
1204
1217
  GetShadowBatches(batches, perObjectData, _shadowPixelSize) {
1205
1218
  if (!this.mesh || this.mesh.display === false) return false;
@@ -1222,10 +1235,10 @@ new class extends _identity {
1222
1235
  return committed;
1223
1236
  }
1224
1237
 
1225
- /** Carbon GetBatchesFromOverlayVector (EveSpaceObject2.cpp:1199-1285): the
1226
- * impact overlay's armor-damage shader draws over the TYPE_ALL blocks at
1227
- * maximum priority; each displayed overlay effect draws its per-batch-type
1228
- * effects over its overlay-type blocks (OPAQUE -> TYPE_OPAQUEONLY, everything
1238
+ /** Carbon GetBatchesFromOverlayVector (EveSpaceObject2.cpp:1199-1285): the
1239
+ * impact overlay's armor-damage shader draws over the TYPE_ALL blocks at
1240
+ * maximum priority; each displayed overlay effect draws its per-batch-type
1241
+ * effects over its overlay-type blocks (OPAQUE -> TYPE_OPAQUEONLY, everything
1229
1242
  * else -> TYPE_ALL). */
1230
1243
  GetBatchesFromOverlayVector(batches, perObjectData, batchType, mesh) {
1231
1244
  const impactEffect = this.impactOverlay?.GetArmorDamageShader?.(batchType) ?? null;
@@ -1270,10 +1283,10 @@ new class extends _identity {
1270
1283
  return (batches.GetBatchCount?.() ?? 0) > committedBefore;
1271
1284
  }
1272
1285
 
1273
- /**
1274
- * Builds and commits one render batch drawing a single cached area block with
1275
- * the given material and optional priority, skipping the block when the
1276
- * material yields no valid batch.
1286
+ /**
1287
+ * Builds and commits one render batch drawing a single cached area block with
1288
+ * the given material and optional priority, skipping the block when the
1289
+ * material yields no valid batch.
1277
1290
  */
1278
1291
  #CommitBlockBatch(batches, material, geometry, meshIndex, block, perObjectData, priority, lod, vertexDeclaration) {
1279
1292
  const batch = new Tr2RenderBatch();
@@ -1291,18 +1304,18 @@ new class extends _identity {
1291
1304
 
1292
1305
  // EveMeshOverlayEffect::GetEffects (display-gated, per batch type).
1293
1306
 
1294
- /**
1295
- * Returns an overlay effect's display-gated effect list for a batch type, or
1296
- * null when it contributes none.
1307
+ /**
1308
+ * Returns an overlay effect's display-gated effect list for a batch type, or
1309
+ * null when it contributes none.
1297
1310
  */
1298
1311
  #OverlayEffectsFor(overlay, batchType) {
1299
1312
  return overlay?.GetEffects?.(batchType) ?? null;
1300
1313
  }
1301
1314
 
1302
- /**
1303
- * Reports whether the hull mesh has transparent areas or any overlay effect
1304
- * does, which tells the renderer to route this object through the sorted
1305
- * transparent pass.
1315
+ /**
1316
+ * Reports whether the hull mesh has transparent areas or any overlay effect
1317
+ * does, which tells the renderer to route this object through the sorted
1318
+ * transparent pass.
1306
1319
  */
1307
1320
  HasTransparentBatches() {
1308
1321
  if (!this.mesh) return false;
@@ -1313,9 +1326,9 @@ new class extends _identity {
1313
1326
  return false;
1314
1327
  }
1315
1328
 
1316
- /**
1317
- * Returns the distance from the render context's view position to the hull
1318
- * world translation, used to order transparent renderables back-to-front.
1329
+ /**
1330
+ * Returns the distance from the render context's view position to the hull
1331
+ * world translation, used to order transparent renderables back-to-front.
1319
1332
  */
1320
1333
  GetSortValue(renderContext = null) {
1321
1334
  const viewPosition = renderContext?.GetViewPosition();
@@ -1325,9 +1338,9 @@ new class extends _identity {
1325
1338
  return Math.hypot(x, y, z);
1326
1339
  }
1327
1340
 
1328
- /** Carbon allocates Tr2PerObjectDataWithPersistentBuffers<EveSpaceObject2>.
1329
- * This port retains persistent VS/PS RawData and returns those records
1330
- * directly. GPU-derived bone-ring offsets remain at their CPU defaults until
1341
+ /** Carbon allocates Tr2PerObjectDataWithPersistentBuffers<EveSpaceObject2>.
1342
+ * This port retains persistent VS/PS RawData and returns those records
1343
+ * directly. GPU-derived bone-ring offsets remain at their CPU defaults until
1331
1344
  * an engine supplies them; other CPU-known values are already encoded. */
1332
1345
  GetPerObjectData(_accumulator = null) {
1333
1346
  // Carbon cpp:1437-1445: the bone ring is uploaded and its OFFSETS stamped
@@ -1351,13 +1364,13 @@ new class extends _identity {
1351
1364
  return this.GetPerObjectData(accumulator);
1352
1365
  }
1353
1366
 
1354
- /** Carbon EveSpaceObject2::GetLights (cpp:3536-3555): display gate only
1355
- * (no lights-empty early-out, unlike EveChildMesh), then per light
1356
- * AddLight(manager, worldTransform, 1, bones, boneCount) FOLLOWED by
1357
- * SetBrightnessMultiplier(m_activationStrength) - the order is contract:
1358
- * the submission uses the multiplier stamped on the PREVIOUS pass (first
1359
- * pass uses the Tr2Light default 1) - one frame of activation-strength
1360
- * lag, preserved verbatim. cpp:3554's dead `DisplayChildren()` local is
1367
+ /** Carbon EveSpaceObject2::GetLights (cpp:3536-3555): display gate only
1368
+ * (no lights-empty early-out, unlike EveChildMesh), then per light
1369
+ * AddLight(manager, worldTransform, 1, bones, boneCount) FOLLOWED by
1370
+ * SetBrightnessMultiplier(m_activationStrength) - the order is contract:
1371
+ * the submission uses the multiplier stamped on the PREVIOUS pass (first
1372
+ * pass uses the Tr2Light default 1) - one frame of activation-strength
1373
+ * lag, preserved verbatim. cpp:3554's dead `DisplayChildren()` local is
1361
1374
  * not ported. */
1362
1375
  GetLights(lightManager) {
1363
1376
  if (!this.display) {
@@ -1376,11 +1389,11 @@ new class extends _identity {
1376
1389
  }
1377
1390
  }
1378
1391
 
1379
- /**
1380
- * Carbon EveSpaceObject2::IsCastingShadow (cpp:2252-2274): applies the
1381
- * display, world-sphere and reflection gates, then tests the realized sphere
1382
- * against the supplied shadow frustum. Carbon's float& result is represented
1383
- * by an optional length-one array.
1392
+ /**
1393
+ * Carbon EveSpaceObject2::IsCastingShadow (cpp:2252-2274): applies the
1394
+ * display, world-sphere and reflection gates, then tests the realized sphere
1395
+ * against the supplied shadow frustum. Carbon's float& result is represented
1396
+ * by an optional length-one array.
1384
1397
  */
1385
1398
  IsCastingShadow(cameraFrustum, shadowFrustum, renderReason, sizeInShadowOut = null) {
1386
1399
  if (!this.display || this.#boundingSphereWorldRadius <= 0) {
@@ -1403,9 +1416,9 @@ new class extends _identity {
1403
1416
  return sizeInShadow > 15;
1404
1417
  }
1405
1418
 
1406
- /** Carbon EveSpaceObject2::RegisterComponents (cpp:3568-3609): registers its
1407
- * own components and its children with the scene registration container "so
1408
- * we don't have to traverse the tree every frame". RegisterAudioGeometry
1419
+ /** Carbon EveSpaceObject2::RegisterComponents (cpp:3568-3609): registers its
1420
+ * own components and its children with the scene registration container "so
1421
+ * we don't have to traverse the tree every frame". RegisterAudioGeometry
1409
1422
  * (cpp:3572-3575) is audio-engine-owned and unported. Gate m_display. */
1410
1423
  RegisterComponents() {
1411
1424
  const registry = this.GetComponentRegistry();
@@ -1428,10 +1441,10 @@ new class extends _identity {
1428
1441
  }
1429
1442
  }
1430
1443
 
1431
- /** Carbon EveSpaceObject2::UnRegisterComponents (cpp:3615-3638): forwards
1432
- * the un-registration to the children only - EveEntity::UnRegister already
1433
- * called UnRegisterAllComponents(this) first (EveEntity.cpp:90) - and does
1434
- * not re-check display. UnregisterAudioGeometry (cpp:3617) is
1444
+ /** Carbon EveSpaceObject2::UnRegisterComponents (cpp:3615-3638): forwards
1445
+ * the un-registration to the children only - EveEntity::UnRegister already
1446
+ * called UnRegisterAllComponents(this) first (EveEntity.cpp:90) - and does
1447
+ * not re-check display. UnregisterAudioGeometry (cpp:3617) is
1435
1448
  * audio-engine-owned and unported. */
1436
1449
  UnRegisterComponents() {
1437
1450
  const registry = this.GetComponentRegistry();
@@ -1445,25 +1458,25 @@ new class extends _identity {
1445
1458
  }
1446
1459
  }
1447
1460
 
1448
- /**
1449
- * Reports whether children and effect children should be shown; always true on
1450
- * the base hull, subclasses gate it on activation state.
1461
+ /**
1462
+ * Reports whether children and effect children should be shown; always true on
1463
+ * the base hull, subclasses gate it on activation state.
1451
1464
  */
1452
1465
  DisplayChildren() {
1453
1466
  return true;
1454
1467
  }
1455
1468
 
1456
- /**
1457
- * Returns the transform placement observers are attached to - the live hull
1458
- * world transform.
1469
+ /**
1470
+ * Returns the transform placement observers are attached to - the live hull
1471
+ * world transform.
1459
1472
  */
1460
1473
  GetObserverTransform() {
1461
1474
  return this.worldTransform;
1462
1475
  }
1463
1476
 
1464
- /**
1465
- * Returns the transform effect children are placed against - the live hull
1466
- * world transform, not a copy.
1477
+ /**
1478
+ * Returns the transform effect children are placed against - the live hull
1479
+ * world transform, not a copy.
1467
1480
  */
1468
1481
  GetLocalToWorldTransform() {
1469
1482
  return this.worldTransform;
@@ -1474,26 +1487,26 @@ new class extends _identity {
1474
1487
  vec3.transformMat4(out, this.boundingSphereCenter, this.worldTransform);
1475
1488
  }
1476
1489
 
1477
- /**
1478
- * Returns the live curve-sampled ball position; the array is the object's own
1479
- * field and is rewritten by the next transform update.
1490
+ /**
1491
+ * Returns the live curve-sampled ball position; the array is the object's own
1492
+ * field and is rewritten by the next transform update.
1480
1493
  */
1481
1494
  GetWorldPosition() {
1482
1495
  return this.worldPosition;
1483
1496
  }
1484
1497
 
1485
- /**
1486
- * Returns the live curve-sampled ball rotation, which excludes the model
1487
- * rotation curve; the quaternion is the object's own field and is rewritten by
1488
- * the next transform update.
1498
+ /**
1499
+ * Returns the live curve-sampled ball rotation, which excludes the model
1500
+ * rotation curve; the quaternion is the object's own field and is rewritten by
1501
+ * the next transform update.
1489
1502
  */
1490
1503
  GetWorldRotation() {
1491
1504
  return this.worldRotation;
1492
1505
  }
1493
1506
 
1494
- /**
1495
- * Finds a sound emitter by observer name on this hull and then recursively in
1496
- * the effect children, returning null when no emitter carries the name.
1507
+ /**
1508
+ * Finds a sound emitter by observer name on this hull and then recursively in
1509
+ * the effect children, returning null when no emitter carries the name.
1497
1510
  */
1498
1511
  FindSoundEmitter(name) {
1499
1512
  const target = String(name ?? "");
@@ -1511,9 +1524,9 @@ new class extends _identity {
1511
1524
  return null;
1512
1525
  }
1513
1526
 
1514
- /**
1515
- * Sets the mute flag and pushes it to every effect child and placement
1516
- * observer.
1527
+ /**
1528
+ * Sets the mute flag and pushes it to every effect child and placement
1529
+ * observer.
1517
1530
  */
1518
1531
  SetMute(mute) {
1519
1532
  this.mute = !!mute;
@@ -1525,19 +1538,19 @@ new class extends _identity {
1525
1538
  }
1526
1539
  }
1527
1540
 
1528
- /**
1529
- * Plays an animation with explicit loop, start, and speed settings
1530
- * (Carbon PlayAnimationEx, MAP_METHOD_AND_WRAP_OPTIONAL_ARGS).
1541
+ /**
1542
+ * Plays an animation with explicit loop, start, and speed settings
1543
+ * (Carbon PlayAnimationEx, MAP_METHOD_AND_WRAP_OPTIONAL_ARGS).
1531
1544
  */
1532
1545
  PlayAnimationEx(animName, loopCount, start, speed, clearWhenDone = true) {
1533
1546
  this.#PlayAnimation(animName, true, loopCount, start, speed, clearWhenDone);
1534
1547
  }
1535
1548
 
1536
- /**
1537
- * Calculates the skinned bounding box under a transform (CMF path: the
1538
- * local box corners transformed with perspective divide). The granny path
1539
- * is unported. Returns an inverted-empty { min, max } box when dynamic
1540
- * bounds are disabled, as Carbon's BoundingBoxInitialize does.
1549
+ /**
1550
+ * Calculates the skinned bounding box under a transform (CMF path: the
1551
+ * local box corners transformed with perspective divide). The granny path
1552
+ * is unported. Returns an inverted-empty { min, max } box when dynamic
1553
+ * bounds are disabled, as Carbon's BoundingBoxInitialize does.
1541
1554
  */
1542
1555
  CalculateSkinnedBoundingBoxFromTransform(transform) {
1543
1556
  const min = vec3.fromValues(Infinity, Infinity, Infinity);
@@ -1561,10 +1574,10 @@ new class extends _identity {
1561
1574
  };
1562
1575
  }
1563
1576
 
1564
- /**
1565
- * Calculates the skinned bounding sphere (CMF path: the current bounding
1566
- * sphere; granny path unported). Returns (0,0,0,-1) when dynamic bounds
1567
- * are disabled.
1577
+ /**
1578
+ * Calculates the skinned bounding sphere (CMF path: the current bounding
1579
+ * sphere; granny path unported). Returns (0,0,0,-1) when dynamic bounds
1580
+ * are disabled.
1568
1581
  */
1569
1582
  CalculateSkinnedBoundingSphere(out = vec4.create()) {
1570
1583
  if (this.dynamicBoundingSphereEnabled && this.mesh?.GetGeometryResource()?.IsUsingCMF?.()) {
@@ -1583,9 +1596,9 @@ new class extends _identity {
1583
1596
  }
1584
1597
  }
1585
1598
 
1586
- /**
1587
- * Rebuilds the locator sets visible on this object from its own authored sets
1588
- * plus the sets owned by child meshes and nested child containers.
1599
+ /**
1600
+ * Rebuilds the locator sets visible on this object from its own authored sets
1601
+ * plus the sets owned by child meshes and nested child containers.
1589
1602
  */
1590
1603
  EnsureChildLocatorMerged() {
1591
1604
  if (!this.#mergedLocatorSetsDirty) return;
@@ -1628,10 +1641,12 @@ new class extends _identity {
1628
1641
  if (sourceSet.HasName(_EveSpaceObject.#damageLocatorSetName)) {
1629
1642
  this.#mergedDamageLocatorSources.push({
1630
1643
  owner: source.owner,
1631
- partTag: source.owner.GetPartTag(),
1644
+ // The SOURCE's tag, not the owner's (Carbon EveSpaceObject2.cpp:1941):
1645
+ // one shared instanced child owns many parts' sets.
1646
+ partTag: source.partTag,
1632
1647
  start,
1633
1648
  count: sourceSet.GetLocators().length,
1634
- // Carbon LocatorSourceRange.childToObject (EveSpaceObject2.cpp:1938):
1649
+ // Carbon LocatorSourceRange.childToObject (EveSpaceObject2.cpp:1944):
1635
1650
  // lets GetLocatorInObjectSpace pose merged damage locators against
1636
1651
  // the owning child's skeleton, then lift them into object space.
1637
1652
  childToObject: source.childToObject
@@ -1649,11 +1664,11 @@ new class extends _identity {
1649
1664
  this.#damageFilterAreas.length = 0;
1650
1665
  }
1651
1666
 
1652
- /**
1653
- * Collects prepared hull and child geometry and opens raycast sessions
1654
- * (Carbon CollectOccluders, EveSpaceObject2.cpp:1960-2028): occluders carry
1655
- * areaStart/areaCount ranges into the shared #damageFilterAreas pool, and
1656
- * records with no matching areas are skipped rather than raycast whole.
1667
+ /**
1668
+ * Collects prepared hull and child geometry and opens raycast sessions
1669
+ * (Carbon CollectOccluders, EveSpaceObject2.cpp:1960-2028): occluders carry
1670
+ * areaStart/areaCount ranges into the shared #damageFilterAreas pool, and
1671
+ * records with no matching areas are skipped rather than raycast whole.
1657
1672
  */
1658
1673
  #CollectDamageFilterOccluders() {
1659
1674
  this.#damageFilterOccluders.length = 0;
@@ -1800,35 +1815,35 @@ new class extends _identity {
1800
1815
  if (this.#damageFilterState === 0) this.#damageFilterState = 1;
1801
1816
  }
1802
1817
 
1803
- /**
1804
- * Clears all impact and damage effects on the impact overlay.
1818
+ /**
1819
+ * Clears all impact and damage effects on the impact overlay.
1805
1820
  */
1806
1821
  ClearImpactDamage() {
1807
1822
  if (this.impactOverlay) this.impactOverlay.Clear();
1808
1823
  this.EnsureChildLocatorMerged();
1809
1824
  for (const range of this.#mergedDamageLocatorSources) {
1810
- const overlay = range.owner.GetDamageOverlay();
1825
+ const overlay = range.owner.GetPartDamageOverlay(range.partTag);
1811
1826
  if (overlay) overlay.Clear();
1812
1827
  }
1813
1828
  }
1814
1829
 
1815
- /**
1816
- * Clears all animations on the animation updater.
1830
+ /**
1831
+ * Clears all animations on the animation updater.
1817
1832
  */
1818
1833
  ClearAnimations() {
1819
1834
  this.animationUpdater?.ClearAnimations?.();
1820
1835
  }
1821
1836
 
1822
- /**
1823
- * Creates an impact facing a position on the closest facing damage locator.
1837
+ /**
1838
+ * Creates an impact facing a position on the closest facing damage locator.
1824
1839
  */
1825
1840
  CreateImpactFromPosition(position, direction, lifeTime, size) {
1826
1841
  const closestDamageLocator = this.#GetClosestLocatorIndex(position, _EveSpaceObject.#damageLocatorSetName);
1827
1842
  return this.CreateImpact(closestDamageLocator, direction, lifeTime, size);
1828
1843
  }
1829
1844
 
1830
- /**
1831
- * Creates an impact effect on a damage locator through the impact overlay.
1845
+ /**
1846
+ * Creates an impact effect on a damage locator through the impact overlay.
1832
1847
  */
1833
1848
  CreateImpact(damageLocatorIndex, direction, lifeTime, size) {
1834
1849
  if (this.impactOverlay) {
@@ -1837,7 +1852,10 @@ new class extends _identity {
1837
1852
  this.EnsureChildLocatorMerged();
1838
1853
  for (const range of this.#mergedDamageLocatorSources) {
1839
1854
  if (damageLocatorIndex < range.start || damageLocatorIndex >= range.start + range.count) continue;
1840
- return this.#EnsureChildDamageOverlay(range).CreateImpact(damageLocatorIndex - range.start, size, false);
1855
+ // Carbon EveSpaceObject2.cpp:3644-3651: parts honour the impact
1856
+ // switch here, and spawn debris except at low LOD.
1857
+ if (!_EveDamageOverlay.impactEffectEnabled) return -1;
1858
+ return this.#EnsureChildDamageOverlay(range).CreateImpact(damageLocatorIndex - range.start, size, this.lodLevel !== Tr2Lod.TR2_LOD_LOW);
1841
1859
  }
1842
1860
  }
1843
1861
  return this.impactOverlay.CreateImpact(damageLocatorIndex, direction, lifeTime, size, 1, this.lodLevel, this);
@@ -1845,16 +1863,16 @@ new class extends _identity {
1845
1863
  return -1;
1846
1864
  }
1847
1865
 
1848
- /**
1849
- * Ends the current animation on the animation updater.
1866
+ /**
1867
+ * Ends the current animation on the animation updater.
1850
1868
  */
1851
1869
  EndAnimation() {
1852
1870
  this.animationUpdater?.EndAnimation?.();
1853
1871
  }
1854
1872
 
1855
- /**
1856
- * Freezes LOD selection at the current mesh and marks decal geometry
1857
- * frozen.
1873
+ /**
1874
+ * Freezes LOD selection at the current mesh and marks decal geometry
1875
+ * frozen.
1858
1876
  */
1859
1877
  FreezeHighDetailMesh() {
1860
1878
  this.#allowLodSelection = false;
@@ -1863,23 +1881,23 @@ new class extends _identity {
1863
1881
  }
1864
1882
  }
1865
1883
 
1866
- /**
1867
- * Gets the number of damage locators on this object.
1884
+ /**
1885
+ * Gets the number of damage locators on this object.
1868
1886
  */
1869
1887
  GetDamageLocatorCount() {
1870
1888
  return this.GetLocatorCount(_EveSpaceObject.#damageLocatorSetName);
1871
1889
  }
1872
1890
 
1873
- /**
1874
- * Gets the number of locators in a named locator set.
1891
+ /**
1892
+ * Gets the number of locators in a named locator set.
1875
1893
  */
1876
1894
  GetLocatorCount(locatorSetName) {
1877
1895
  return this.#GetLocatorsForSet(locatorSetName)?.length ?? 0;
1878
1896
  }
1879
1897
 
1880
- /**
1881
- * Gets the first locator list whose set has the requested Carbon name.
1882
- * The returned list remains owned by the locator set.
1898
+ /**
1899
+ * Gets the first locator list whose set has the requested Carbon name.
1900
+ * The returned list remains owned by the locator set.
1883
1901
  */
1884
1902
  GetLocatorsForSet(locatorSetName) {
1885
1903
  return this.#GetLocatorsForSet(locatorSetName);
@@ -1913,9 +1931,9 @@ new class extends _identity {
1913
1931
  this.InvalidateMergedLocators("structure");
1914
1932
  }
1915
1933
 
1916
- /**
1917
- * Gets the closest locator in a set to a world position, ignoring locator
1918
- * facing. Returns -1 when the set is missing or empty.
1934
+ /**
1935
+ * Gets the closest locator in a set to a world position, ignoring locator
1936
+ * facing. Returns -1 when the set is missing or empty.
1919
1937
  */
1920
1938
  GetCloseLocatorIndex(position, locatorSetName) {
1921
1939
  const locators = this.#GetLocatorsForSet(locatorSetName);
@@ -1939,19 +1957,19 @@ new class extends _identity {
1939
1957
  return closestIndex;
1940
1958
  }
1941
1959
 
1942
- /**
1943
- * Carbon's script surface maps GetGoodLocatorIndex to GetCloseLocatorIndex
1944
- * (EveSpaceObject2_Blue.cpp); the internal randomized fit heuristic is not
1945
- * script-exposed.
1960
+ /**
1961
+ * Carbon's script surface maps GetGoodLocatorIndex to GetCloseLocatorIndex
1962
+ * (EveSpaceObject2_Blue.cpp); the internal randomized fit heuristic is not
1963
+ * script-exposed.
1946
1964
  */
1947
1965
  GetGoodLocatorIndex(position, locatorSetName) {
1948
1966
  return this.GetCloseLocatorIndex(position, locatorSetName);
1949
1967
  }
1950
1968
 
1951
- /**
1952
- * Gets the local direction of an indexed damage locator, (0,0,0) for
1953
- * indices out of range (Carbon script GetDamageLocatorDirection maps to
1954
- * GetDamageLocatorDirectionLocal).
1969
+ /**
1970
+ * Gets the local direction of an indexed damage locator, (0,0,0) for
1971
+ * indices out of range (Carbon script GetDamageLocatorDirection maps to
1972
+ * GetDamageLocatorDirectionLocal).
1955
1973
  */
1956
1974
  GetDamageLocatorDirection(index, inWorldSpaceOrOut = vec3.create(), out = vec3.create()) {
1957
1975
  const targetableCall = typeof inWorldSpaceOrOut === "boolean";
@@ -1980,10 +1998,10 @@ new class extends _identity {
1980
1998
  return true;
1981
1999
  }
1982
2000
 
1983
- /**
1984
- * Gets a damage locator's BIND position in object space - the merged set's
1985
- * authored position, no animation (Carbon EveSpaceObject2.cpp:2785-2796).
1986
- * Impact overlays seed decals here so they stay put on animated parts.
2001
+ /**
2002
+ * Gets a damage locator's BIND position in object space - the merged set's
2003
+ * authored position, no animation (Carbon EveSpaceObject2.cpp:2785-2796).
2004
+ * Impact overlays seed decals here so they stay put on animated parts.
1987
2005
  */
1988
2006
  GetDamageLocatorBindPosition(index, out = vec3.create()) {
1989
2007
  const locators = this.#GetLocatorsForSet(_EveSpaceObject.#damageLocatorSetName);
@@ -2118,15 +2136,15 @@ new class extends _identity {
2118
2136
  if (this.impactOverlay.UpdateImpact(out, direction, impactIndex)) return true;
2119
2137
  this.EnsureChildLocatorMerged();
2120
2138
  for (const range of this.#mergedDamageLocatorSources) {
2121
- const overlay = range.owner.GetDamageOverlay();
2139
+ const overlay = range.owner.GetPartDamageOverlay(range.partTag);
2122
2140
  if (overlay && overlay.HasImpact(impactIndex)) return true;
2123
2141
  }
2124
2142
  return false;
2125
2143
  }
2126
2144
 
2127
- /**
2128
- * Gets the local position of an indexed damage locator, (0,0,0) for
2129
- * indices out of range.
2145
+ /**
2146
+ * Gets the local position of an indexed damage locator, (0,0,0) for
2147
+ * indices out of range.
2130
2148
  */
2131
2149
  GetDamageLocator(index, out = vec3.create()) {
2132
2150
  const locators = this.#GetLocatorsForSet(_EveSpaceObject.#damageLocatorSetName);
@@ -2138,9 +2156,9 @@ new class extends _identity {
2138
2156
  return out;
2139
2157
  }
2140
2158
 
2141
- /**
2142
- * Gets the world-space position of an indexed damage locator, (0,0,0) for
2143
- * indices out of range (returned untransformed, as Carbon does).
2159
+ /**
2160
+ * Gets the world-space position of an indexed damage locator, (0,0,0) for
2161
+ * indices out of range (returned untransformed, as Carbon does).
2144
2162
  */
2145
2163
  GetTransformedDamageLocator(index, out = vec3.create()) {
2146
2164
  const locators = this.#GetLocatorsForSet(_EveSpaceObject.#damageLocatorSetName);
@@ -2152,18 +2170,18 @@ new class extends _identity {
2152
2170
  return vec3.transformMat4(out, out, this.worldTransform);
2153
2171
  }
2154
2172
 
2155
- /**
2156
- * Checks whether this object is in impostor mode. The impostor system that
2157
- * raises the flag is unported, so this reports the default until then.
2173
+ /**
2174
+ * Checks whether this object is in impostor mode. The impostor system that
2175
+ * raises the flag is unported, so this reports the default until then.
2158
2176
  */
2159
2177
  IsImpostor() {
2160
2178
  return this.#impostorMode;
2161
2179
  }
2162
2180
 
2163
- /**
2164
- * Gets a locator position from a named set. Out-of-range or missing-set
2165
- * queries return the world translation in world space and (0,0,0) in
2166
- * object space, as Carbon does.
2181
+ /**
2182
+ * Gets a locator position from a named set. Out-of-range or missing-set
2183
+ * queries return the world translation in world space and (0,0,0) in
2184
+ * object space, as Carbon does.
2167
2185
  */
2168
2186
  GetLocatorPositionFromSet(index, inWorldSpace, locatorSetName, out = vec3.create()) {
2169
2187
  const locators = this.#GetLocatorsForSet(locatorSetName);
@@ -2181,9 +2199,9 @@ new class extends _identity {
2181
2199
  return out;
2182
2200
  }
2183
2201
 
2184
- /**
2185
- * Gets a locator direction from a named set. Out-of-range or missing-set
2186
- * queries return (0,1,0), as Carbon does.
2202
+ /**
2203
+ * Gets a locator direction from a named set. Out-of-range or missing-set
2204
+ * queries return (0,1,0), as Carbon does.
2187
2205
  */
2188
2206
  GetLocatorRotationFromSet(index, inWorldSpace, locatorSetName, out = vec3.create()) {
2189
2207
  const locators = this.#GetLocatorsForSet(locatorSetName);
@@ -2198,9 +2216,9 @@ new class extends _identity {
2198
2216
  return out;
2199
2217
  }
2200
2218
 
2201
- /**
2202
- * Raises a named controller event on this hull's controllers and forwards it
2203
- * to the effect children and overlay effects.
2219
+ /**
2220
+ * Raises a named controller event on this hull's controllers and forwards it
2221
+ * to the effect children and overlay effects.
2204
2222
  */
2205
2223
  HandleControllerEvent(name) {
2206
2224
  const eventName = String(name ?? "");
@@ -2215,24 +2233,24 @@ new class extends _identity {
2215
2233
  }
2216
2234
  }
2217
2235
 
2218
- /**
2219
- * Plays an animation once, replacing the current one
2220
- * (Carbon script PlayAnimation maps to PlayAnimationOnce).
2236
+ /**
2237
+ * Plays an animation once, replacing the current one
2238
+ * (Carbon script PlayAnimation maps to PlayAnimationOnce).
2221
2239
  */
2222
2240
  PlayAnimation(animName) {
2223
2241
  this.#PlayAnimation(animName, true, 1, 0, 1, true);
2224
2242
  }
2225
2243
 
2226
- /**
2227
- * Chains an animation once after the current one (Carbon ChainAnimation).
2244
+ /**
2245
+ * Chains an animation once after the current one (Carbon ChainAnimation).
2228
2246
  */
2229
2247
  ChainAnimation(animName) {
2230
2248
  this.#PlayAnimation(animName, false, 1, 0, 1, true);
2231
2249
  }
2232
2250
 
2233
- /**
2234
- * Chains an animation with explicit loop, start, and speed settings
2235
- * (Carbon ChainAnimationEx).
2251
+ /**
2252
+ * Chains an animation with explicit loop, start, and speed settings
2253
+ * (Carbon ChainAnimationEx).
2236
2254
  */
2237
2255
  ChainAnimationEx(animName, loopCount, start, speed) {
2238
2256
  this.#PlayAnimation(animName, false, loopCount, start, speed, true);
@@ -2242,17 +2260,17 @@ new class extends _identity {
2242
2260
  // into the animation updater, which owns playback state; a missing updater
2243
2261
  // is a Carbon-faithful no-op.
2244
2262
 
2245
- /**
2246
- * Forwards a playback request to the animation updater, which owns all
2247
- * animation state; a hull without an updater does nothing, as in Carbon.
2263
+ /**
2264
+ * Forwards a playback request to the animation updater, which owns all
2265
+ * animation state; a hull without an updater does nothing, as in Carbon.
2248
2266
  */
2249
2267
  #PlayAnimation(animName, replace, loopCount, delay, speed, clearWhenDone) {
2250
2268
  this.animationUpdater?.PlayAnimation?.(String(animName ?? ""), replace, loopCount, delay, speed, clearWhenDone);
2251
2269
  }
2252
2270
 
2253
- /**
2254
- * Recalculates the authored bounding sphere from the mesh geometry
2255
- * resource. Fails when no mesh or ready geometry resource is attached.
2271
+ /**
2272
+ * Recalculates the authored bounding sphere from the mesh geometry
2273
+ * resource. Fails when no mesh or ready geometry resource is attached.
2256
2274
  */
2257
2275
  RebuildBoundingSphereInformation() {
2258
2276
  const mesh = this.mesh;
@@ -2282,9 +2300,9 @@ new class extends _identity {
2282
2300
  return this;
2283
2301
  }
2284
2302
 
2285
- /**
2286
- * Returns a plain-object snapshot of the controller variables currently
2287
- * stamped on this hull.
2303
+ /**
2304
+ * Returns a plain-object snapshot of the controller variables currently
2305
+ * stamped on this hull.
2288
2306
  */
2289
2307
  GetControllerVariables() {
2290
2308
  return Object.fromEntries(this.#controllerVariables);
@@ -2298,11 +2316,11 @@ new class extends _identity {
2298
2316
  return geometryResource.GetLodIndexForScreenSize?.(this.mesh?.GetMeshIndex?.() ?? 0, this.#meshScreenSize) ?? 0;
2299
2317
  }
2300
2318
 
2301
- /**
2302
- * Gets a named locator's transform (Carbon script GetLocatorTransform maps
2303
- * to GetEveLocatorTransform): the identity for unknown names, the animated
2304
- * bone world transform when the animation updater resolves the name, else
2305
- * the authored locator transform.
2319
+ /**
2320
+ * Gets a named locator's transform (Carbon script GetLocatorTransform maps
2321
+ * to GetEveLocatorTransform): the identity for unknown names, the animated
2322
+ * bone world transform when the animation updater resolves the name, else
2323
+ * the authored locator transform.
2306
2324
  */
2307
2325
  GetLocatorTransform(name, out = mat4.create()) {
2308
2326
  const target = String(name ?? "");
@@ -2322,11 +2340,11 @@ new class extends _identity {
2322
2340
  return mat4.copy(out, locator.GetTransform());
2323
2341
  }
2324
2342
 
2325
- /**
2326
- * Gets the local axis-aligned bounding box: dynamic skinned bounds when
2327
- * enabled, else the mesh box, else the cached box (at worst it lags one
2328
- * frame). With out arguments it fills them and returns true; without, it
2329
- * returns { min, max }.
2343
+ /**
2344
+ * Gets the local axis-aligned bounding box: dynamic skinned bounds when
2345
+ * enabled, else the mesh box, else the cached box (at worst it lags one
2346
+ * frame). With out arguments it fills them and returns true; without, it
2347
+ * returns { min, max }.
2330
2348
  */
2331
2349
  GetLocalBoundingBox(minBounds, maxBounds) {
2332
2350
  const min = vec3.create();
@@ -2376,9 +2394,9 @@ new class extends _identity {
2376
2394
  return geometryResource ? geometryResource.IsGood() : false;
2377
2395
  }
2378
2396
 
2379
- /**
2380
- * Gets Carbon's realized world sphere, optionally accumulated with transform
2381
- * and effect children when query is EVE_BOUNDS_WITH_CHILDREN.
2397
+ /**
2398
+ * Gets Carbon's realized world sphere, optionally accumulated with transform
2399
+ * and effect children when query is EVE_BOUNDS_WITH_CHILDREN.
2382
2400
  */
2383
2401
  GetBoundingSphere(out = sph3.create(), query = 0) {
2384
2402
  if (this.boundingSphereRadius <= 0 && this.#dynamicBoundingSphere[3] <= 0) return false;
@@ -2414,9 +2432,9 @@ new class extends _identity {
2414
2432
  return this.#isInFrustum;
2415
2433
  }
2416
2434
 
2417
- /**
2418
- * Gets the bounding sphere center, preferring the dynamic skinned sphere
2419
- * when one is published.
2435
+ /**
2436
+ * Gets the bounding sphere center, preferring the dynamic skinned sphere
2437
+ * when one is published.
2420
2438
  */
2421
2439
  GetBoundingSphereCenter(out = vec3.create()) {
2422
2440
  if (this.#dynamicBoundingSphere[3] !== -1) {
@@ -2425,9 +2443,9 @@ new class extends _identity {
2425
2443
  return vec3.copy(out, this.boundingSphereCenter);
2426
2444
  }
2427
2445
 
2428
- /**
2429
- * Gets the model-scaled bounding sphere radius, preferring the dynamic
2430
- * skinned sphere when one is published.
2446
+ /**
2447
+ * Gets the model-scaled bounding sphere radius, preferring the dynamic
2448
+ * skinned sphere when one is published.
2431
2449
  */
2432
2450
  GetBoundingSphereRadius() {
2433
2451
  if (this.#dynamicBoundingSphere[3] !== -1) {
@@ -2436,9 +2454,9 @@ new class extends _identity {
2436
2454
  return this.modelScale * this.boundingSphereRadius;
2437
2455
  }
2438
2456
 
2439
- /**
2440
- * Gets the number of mesh-bound bones. Carbon dereferences the animation
2441
- * updater unchecked; CarbonEngineJS reports 0 when none is attached.
2457
+ /**
2458
+ * Gets the number of mesh-bound bones. Carbon dereferences the animation
2459
+ * updater unchecked; CarbonEngineJS reports 0 when none is attached.
2442
2460
  */
2443
2461
  GetBoneCount() {
2444
2462
  const updater = this.animationUpdater;
@@ -2454,10 +2472,10 @@ new class extends _identity {
2454
2472
  return updater.GetMeshBindingBoneCount?.() ?? 0;
2455
2473
  }
2456
2474
 
2457
- /**
2458
- * Pushes shield, armor and hull damage levels to the impact overlay and
2459
- * mirrors them into the ShieldDamage, ArmorDamage and HullDamage controller
2460
- * variables so bound effects follow.
2475
+ /**
2476
+ * Pushes shield, armor and hull damage levels to the impact overlay and
2477
+ * mirrors them into the ShieldDamage, ArmorDamage and HullDamage controller
2478
+ * variables so bound effects follow.
2461
2479
  */
2462
2480
  SetImpactDamageState(shield, armor, hull, doCreateArmorImpacts = true) {
2463
2481
  if (this.impactOverlay) {
@@ -2473,8 +2491,8 @@ new class extends _identity {
2473
2491
  this.SetControllerVariable("HullDamage", hull);
2474
2492
  }
2475
2493
 
2476
- /**
2477
- * Toggles a named impact-overlay animation (boosters, hardeners, ...).
2494
+ /**
2495
+ * Toggles a named impact-overlay animation (boosters, hardeners, ...).
2478
2496
  */
2479
2497
  SetImpactAnimation(name, enable, duration) {
2480
2498
  if (!this.impactOverlay) return;
@@ -2488,17 +2506,19 @@ new class extends _identity {
2488
2506
 
2489
2507
  /** Creates and synchronizes the damage overlay owned by one child-locator range. */
2490
2508
  #EnsureChildDamageOverlay(range) {
2491
- let overlay = range.owner.GetDamageOverlay();
2509
+ let overlay = range.owner.GetPartDamageOverlay(range.partTag);
2492
2510
  if (!overlay) {
2493
- overlay = range.owner.EnsureDamageOverlay();
2511
+ // Carbon EveSpaceObject2.cpp:3529-3555: the child creates the part's
2512
+ // overlay, then it is fetched back by the same part tag.
2513
+ range.owner.CreatePartDamageOverlay(range.partTag);
2514
+ overlay = range.owner.GetPartDamageOverlay(range.partTag);
2494
2515
  const shipDamage = this.impactOverlay.GetDamageOverlay();
2495
- // The part's OWN armour shader (Carbon EveSpaceObject2.cpp:3529, commit
2496
- // 6975d9f1): an animated part needs the skinned variant, which the
2497
- // ship-wide effect is not.
2498
- overlay.SetArmorDamageShaderEffect(range.owner.GetArmorDamageShaderEffect());
2516
+ // The part's OWN armour shader (commit 6975d9f1): an animated part
2517
+ // needs the skinned variant, which the ship-wide effect is not.
2518
+ overlay.SetArmorDamageShaderEffect(range.owner.GetPartArmorDamageShaderEffect(range.partTag));
2499
2519
  const flicker = shipDamage.GetHullDamageFlickerCurve();
2500
2520
  if (flicker) overlay.SetHullDamageFlickerCurve(_TriPerlinCurve.from(flicker.GetValues()));
2501
- overlay.SetSeed(shipDamage.GetSeed() + range.owner.GetPartTag());
2521
+ overlay.SetSeed(shipDamage.GetSeed() + range.partTag);
2502
2522
  }
2503
2523
  overlay.SetDamageLocatorCount(range.count);
2504
2524
  overlay.SetEnabledDamageLocators(this.#damageLocatorEnabled.slice(range.start, range.start + range.count));
@@ -2506,10 +2526,25 @@ new class extends _identity {
2506
2526
  return overlay;
2507
2527
  }
2508
2528
 
2509
- /**
2510
- * Stores a controller variable on the hull and pushes it to the controllers,
2511
- * effect children and overlay effects; the stored value is replayed onto
2512
- * controllers and children added later.
2529
+ /**
2530
+ * Appends every part's existing damage overlay with its range start in the
2531
+ * merged damage locator set, as [overlay, start] pairs (Carbon
2532
+ * EveSpaceObject2.cpp:3561-3574).
2533
+ */
2534
+ CollectPartDamageOverlays(out = []) {
2535
+ this.EnsureChildLocatorMerged();
2536
+ for (const range of this.#mergedDamageLocatorSources) {
2537
+ if (!range.owner) continue;
2538
+ const overlay = range.owner.GetPartDamageOverlay(range.partTag);
2539
+ if (overlay) out.push([overlay, range.start]);
2540
+ }
2541
+ return out;
2542
+ }
2543
+
2544
+ /**
2545
+ * Stores a controller variable on the hull and pushes it to the controllers,
2546
+ * effect children and overlay effects; the stored value is replayed onto
2547
+ * controllers and children added later.
2513
2548
  */
2514
2549
  SetControllerVariable(name, value) {
2515
2550
  const key = String(name ?? "");
@@ -2526,9 +2561,9 @@ new class extends _identity {
2526
2561
  }
2527
2562
  }
2528
2563
 
2529
- /**
2530
- * Forwards a procedural-container variable to every effect child; the hull
2531
- * itself keeps no copy.
2564
+ /**
2565
+ * Forwards a procedural-container variable to every effect child; the hull
2566
+ * itself keeps no copy.
2532
2567
  */
2533
2568
  SetProceduralContainerVariable(name, value) {
2534
2569
  for (const child of this.effectChildren) {
@@ -2536,9 +2571,9 @@ new class extends _identity {
2536
2571
  }
2537
2572
  }
2538
2573
 
2539
- /**
2540
- * Starts this hull's controllers and those of its effect children and overlay
2541
- * effects.
2574
+ /**
2575
+ * Starts this hull's controllers and those of its effect children and overlay
2576
+ * effects.
2542
2577
  */
2543
2578
  StartControllers() {
2544
2579
  for (const controller of this.controllers) {
@@ -2552,13 +2587,13 @@ new class extends _identity {
2552
2587
  }
2553
2588
  }
2554
2589
 
2555
- /**
2556
- * Applies bone and model transforms to locators and returns
2557
- * [position, rotation, boneIndex] tuples, as the Carbon script surface
2558
- * does (TransformLocators maps to PyTransformLocators). Accepts either
2559
- * locator records ({ position, direction, boneIndex }, Carbon's
2560
- * LocatorStructureList shape) or the same [position, rotation, boneIndex]
2561
- * tuple shape it returns.
2590
+ /**
2591
+ * Applies bone and model transforms to locators and returns
2592
+ * [position, rotation, boneIndex] tuples, as the Carbon script surface
2593
+ * does (TransformLocators maps to PyTransformLocators). Accepts either
2594
+ * locator records ({ position, direction, boneIndex }, Carbon's
2595
+ * LocatorStructureList shape) or the same [position, rotation, boneIndex]
2596
+ * tuple shape it returns.
2562
2597
  */
2563
2598
  TransformLocators(locators = []) {
2564
2599
  const result = [];
@@ -2584,13 +2619,33 @@ new class extends _identity {
2584
2619
  return result;
2585
2620
  }
2586
2621
 
2622
+ /**
2623
+ * Returns the named set's locators - including those merged in from parts -
2624
+ * posed by the current bones and model curves, as [position, rotation,
2625
+ * boneIndex] tuples (Carbon script GetTransformedLocatorsFromSet maps to
2626
+ * PyGetTransformedLocatorsFromSet, EveSpaceObject2_Blue.cpp:146-181).
2627
+ */
2628
+ GetTransformedLocatorsFromSet(locatorSetName) {
2629
+ const result = [];
2630
+ for (const locator of this.GetLocatorsForSet(locatorSetName) ?? []) {
2631
+ const position = vec3.clone(locator.position);
2632
+ const rotation = quat.clone(locator.direction);
2633
+ this.#TransformLocator(position, rotation, locator.boneIndex);
2634
+ if (this.modelTranslationCurve || this.modelRotationCurve) {
2635
+ this.#ApplyModelTransform(position, rotation);
2636
+ }
2637
+ result.push([position, rotation, locator.boneIndex]);
2638
+ }
2639
+ return result;
2640
+ }
2641
+
2587
2642
  // Carbon Blue TransformLocator: bone-attached records pick up the mesh
2588
2643
  // bone matrix; without bone data the authored values pass through.
2589
2644
 
2590
- /**
2591
- * Applies the mesh bone matrix to a locator position and rotation for
2592
- * bone-attached locators; the authored values pass through unchanged when
2593
- * there is no usable bone data.
2645
+ /**
2646
+ * Applies the mesh bone matrix to a locator position and rotation for
2647
+ * bone-attached locators; the authored values pass through unchanged when
2648
+ * there is no usable bone data.
2594
2649
  */
2595
2650
  #TransformLocator(position, rotation, boneIndex) {
2596
2651
  const updater = this.animationUpdater;
@@ -2610,10 +2665,10 @@ new class extends _identity {
2610
2665
  // origin (pure GetValueAt, no playback advance): translation adds, model
2611
2666
  // rotation rotates the position and pre-multiplies.
2612
2667
 
2613
- /**
2614
- * Applies the model translation and rotation curves sampled at time 0 to a
2615
- * locator position and rotation, matching Carbon's Blue locator surface, which
2616
- * reads the curves without advancing playback.
2668
+ /**
2669
+ * Applies the model translation and rotation curves sampled at time 0 to a
2670
+ * locator position and rotation, matching Carbon's Blue locator surface, which
2671
+ * reads the curves without advancing playback.
2617
2672
  */
2618
2673
  #ApplyModelTransform(position, rotation) {
2619
2674
  if (this.modelTranslationCurve) {
@@ -2631,9 +2686,9 @@ new class extends _identity {
2631
2686
 
2632
2687
  // Carbon GetLocatorsForSet: first set matching the name wins.
2633
2688
 
2634
- /**
2635
- * Returns the locator list of the first locator set carrying the name, or null
2636
- * when no set matches; the list stays owned by the locator set.
2689
+ /**
2690
+ * Returns the locator list of the first locator set carrying the name, or null
2691
+ * when no set matches; the list stays owned by the locator set.
2637
2692
  */
2638
2693
  #GetLocatorsForSet(locatorSetName) {
2639
2694
  const target = String(locatorSetName ?? "");
@@ -2646,26 +2701,26 @@ new class extends _identity {
2646
2701
  return null;
2647
2702
  }
2648
2703
 
2649
- /**
2650
- * Writes a locator's object-space position and direction (Carbon
2651
- * EveSpaceObject2.cpp:3751-3772, rewritten upstream by 3d988b1d).
2652
- *
2653
- * A merged damage locator (mergedDamageIndex >= 0, indexing the merged
2654
- * damage set) delegates to the owning child's animated pose - the locator's
2655
- * boneIndex addresses the CHILD's skeleton, never this object's - then
2656
- * lifts the result through the range's childToObject transform; Carbon
2657
- * normalizes the direction HERE but not in EveGetLocatorPose, and that
2658
- * asymmetry is preserved. Every other locator resolves against this
2659
- * object's own animation updater.
2660
- *
2661
- * Overridable on purpose: Carbon's EveSwarm overrides this.
2704
+ /**
2705
+ * Writes a locator's object-space position and direction (Carbon
2706
+ * EveSpaceObject2.cpp:3784-3805, rewritten upstream by 3d988b1d).
2707
+ *
2708
+ * A merged damage locator (mergedDamageIndex >= 0, indexing the merged
2709
+ * damage set) delegates to the owning child's animated pose - the locator's
2710
+ * boneIndex addresses the CHILD's skeleton, never this object's - then
2711
+ * lifts the result through the range's childToObject transform; Carbon
2712
+ * normalizes the direction HERE but not in EveGetLocatorPose, and that
2713
+ * asymmetry is preserved. Every other locator resolves against this
2714
+ * object's own animation updater.
2715
+ *
2716
+ * Overridable on purpose: Carbon's EveSwarm overrides this.
2662
2717
  */
2663
2718
  GetLocatorInObjectSpace(outPosition, outDirection, locator, mergedDamageIndex = -1) {
2664
2719
  if (mergedDamageIndex >= 0) {
2665
2720
  this.EnsureChildLocatorMerged();
2666
2721
  for (const range of this.#mergedDamageLocatorSources) {
2667
2722
  if (range.owner && mergedDamageIndex >= range.start && mergedDamageIndex < range.start + range.count) {
2668
- if (range.owner.GetDamageLocatorAnimatedLocal(mergedDamageIndex - range.start, outPosition, outDirection)) {
2723
+ if (range.owner.GetPartDamageLocatorAnimatedLocal(range.partTag, mergedDamageIndex - range.start, outPosition, outDirection)) {
2669
2724
  vec3.transformMat4(outPosition, outPosition, range.childToObject);
2670
2725
  _EveSpaceObject.#TransformNormal(outDirection, outDirection, range.childToObject);
2671
2726
  vec3.normalize(outDirection, outDirection);
@@ -2681,10 +2736,10 @@ new class extends _identity {
2681
2736
  // Carbon GetClosestLocatorIndex: facing-gated closest search; 0 when the
2682
2737
  // set is missing, -1 when no locator faces the position.
2683
2738
 
2684
- /**
2685
- * Returns the index of the nearest locator in a named set that faces the given
2686
- * world position - 0 when the set is missing, -1 when no locator faces the
2687
- * position.
2739
+ /**
2740
+ * Returns the index of the nearest locator in a named set that faces the given
2741
+ * world position - 0 when the set is missing, -1 when no locator faces the
2742
+ * position.
2688
2743
  */
2689
2744
  #GetClosestLocatorIndex(position, locatorSetName) {
2690
2745
  const locators = this.#GetLocatorsForSet(locatorSetName);
@@ -2711,9 +2766,9 @@ new class extends _identity {
2711
2766
  return closestIndex;
2712
2767
  }
2713
2768
 
2714
- /**
2715
- * Reports whether a locator faces a position, by testing that stepping the
2716
- * object-space position back along the locator direction shortens it.
2769
+ /**
2770
+ * Reports whether a locator faces a position, by testing that stepping the
2771
+ * object-space position back along the locator direction shortens it.
2717
2772
  */
2718
2773
 
2719
2774
  /** Rotates a direction by a matrix's rotation basis, ignoring its translation. */
@@ -2737,15 +2792,15 @@ new class extends _identity {
2737
2792
  vec3.copy(this.generatedShapeEllipsoidRadius, outRadii);
2738
2793
  }
2739
2794
 
2740
- /**
2741
- * Maps the negated dot product of a locator direction and an offset direction
2742
- * onto Carbon's square-root fit score, the ranking used to pick a varied
2743
- * damage locator.
2795
+ /**
2796
+ * Maps the negated dot product of a locator direction and an offset direction
2797
+ * onto Carbon's square-root fit score, the ranking used to pick a varied
2798
+ * damage locator.
2744
2799
  */
2745
2800
 
2746
- /**
2747
- * Intersects a ray with an axis-aligned ellipsoid in the ellipsoid's own space and writes the hit point into out.
2748
- * @returns {number|null} The ray parameter at the hit, or null when the ray is degenerate or misses.
2801
+ /**
2802
+ * Intersects a ray with an axis-aligned ellipsoid in the ellipsoid's own space and writes the hit point into out.
2803
+ * @returns {number|null} The ray parameter at the hit, or null when the ray is degenerate or misses.
2749
2804
  */
2750
2805
 
2751
2806
  /** Reports whether a point lies inside an axis-aligned ellipsoid. */
@@ -2753,42 +2808,42 @@ new class extends _identity {
2753
2808
  // Mesh bone matrices come from the animation updater; only mat4-shaped
2754
2809
  // entries are usable.
2755
2810
 
2756
- /**
2757
- * Unpacks one bone from the updater's palette into a mat4, or null when the
2758
- * index is out of range.
2759
- *
2760
- * The palette is Carbon's storage - one contiguous Float4x3 buffer, stride
2761
- * 12 - so a bone is expanded rather than borrowed. Carbon does the same at
2762
- * every read site with TriMatrixCopyFrom3x4.
2811
+ /**
2812
+ * Unpacks one bone from the updater's palette into a mat4, or null when the
2813
+ * index is out of range.
2814
+ *
2815
+ * The palette is Carbon's storage - one contiguous Float4x3 buffer, stride
2816
+ * 12 - so a bone is expanded rather than borrowed. Carbon does the same at
2817
+ * every read site with TriMatrixCopyFrom3x4.
2763
2818
  */
2764
2819
 
2765
- /**
2766
- * Replays every stored controller variable onto a newly added controller or
2767
- * effect child through the named setter, so late additions start with the same
2768
- * state.
2820
+ /**
2821
+ * Replays every stored controller variable onto a newly added controller or
2822
+ * effect child through the named setter, so late additions start with the same
2823
+ * state.
2769
2824
  */
2770
2825
 
2771
- /**
2772
- * Samples a curve into out through whichever of Update or GetValueAt it
2773
- * exposes, writing the fallback when there is no curve and copying back curves
2774
- * that return a new array instead of filling out.
2826
+ /**
2827
+ * Samples a curve into out through whichever of Update or GetValueAt it
2828
+ * exposes, writing the fallback when there is no curve and copying back curves
2829
+ * that return a new array instead of filling out.
2775
2830
  */
2776
2831
 
2777
- /**
2778
- * Reads a numeric value from the update context, preferring a getter method
2779
- * and falling back to the named properties, and yields 0 when nothing supplies
2780
- * it.
2832
+ /**
2833
+ * Reads a numeric value from the update context, preferring a getter method
2834
+ * and falling back to the named properties, and yields 0 when nothing supplies
2835
+ * it.
2781
2836
  */
2782
2837
 
2783
- /**
2784
- * Returns a world sphere's on-screen diameter in pixels from the frustum's
2785
- * exact query, or 0 when the frustum does not expose it.
2838
+ /**
2839
+ * Returns a world sphere's on-screen diameter in pixels from the frustum's
2840
+ * exact query, or 0 when the frustum does not expose it.
2786
2841
  */
2787
2842
 
2788
- /**
2789
- * Returns a world sphere's on-screen diameter in pixels, preferring the
2790
- * frustum's cheaper estimated query and falling back to the exact one, or 0
2791
- * when the frustum exposes neither.
2843
+ /**
2844
+ * Returns a world sphere's on-screen diameter in pixels, preferring the
2845
+ * frustum's cheaper estimated query and falling back to the exact one, or 0
2846
+ * when the frustum exposes neither.
2792
2847
  */
2793
2848
 
2794
2849
  /** Writes a center and radius into a caller-owned sph3. */