@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
@@ -6,10 +6,17 @@ import { ImpactConfiguration } from '../../../generated/include/enums.js';
6
6
 
7
7
  let _initProto, _initClass, _init_targetPosition, _init_extra_targetPosition, _init_behaviour, _init_extra_behaviour, _init_positionOldInfluence, _init_extra_positionOldInfluence, _init_position, _init_extra_position, _init_positionOld, _init_extra_positionOld, _init_locator, _init_extra_locator;
8
8
 
9
- /**
10
- * Tracks what a turret set is shooting at: the chosen damage locator, the
11
- * resolved impact and miss positions, and the queue of hit/miss results the
12
- * server has sent.
9
+ /**
10
+ * Maximum firing-time offset between turrets; godma reads it back through
11
+ * GetShotTimeVariance as the window grouping shots into one damage message
12
+ * (Carbon EveTurretTarget.h:9-11, moved from EveTurretSet.h in trinity 89f5a177).
13
+ */
14
+ const EVE_TURRET_RANDOM_DELAY_MAX = 0.6;
15
+
16
+ /**
17
+ * Tracks what a turret set is shooting at: the chosen damage locator, the
18
+ * resolved impact and miss positions, and the queue of hit/miss results the
19
+ * server has sent.
13
20
  */
14
21
  let _EveTurretTarget;
15
22
  new class extends _identity {
@@ -21,7 +28,7 @@ new class extends _identity {
21
28
  } = _applyDecs2311(this, [type.define({
22
29
  className: "EveTurretTarget",
23
30
  family: "eve/attachment/turrets"
24
- })], [[[edit, edit.read, type, type.vec3], 16, "targetPosition"], [[edit, edit.read, type, type.int32, void 0, type.enum("ImpactBehaviour")], 16, "behaviour"], [[edit, edit.read, type, type.float32], 16, "positionOldInfluence"], [[edit, edit.read, type, type.vec3], 16, "position"], [[edit, edit.read, type, type.vec3], 16, "positionOld"], [[edit, edit.read, type, type.int32], 16, "locator"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetTargetable"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Carbon QueryInterface checks are represented by validating the targetable's required duck-typed position surface.")], 18, "SetTargetable"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLocator"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetFadeOnLocatorChange"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Carbon's random helpers map to Math.random; targetable calls use the org-standard out-last convention.")], 18, "StartFireAtLocator"], [[carbon, carbon.method, impl, impl.implemented], 18, "StopFireAtLocator"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Targetable output parameters use CarbonEngineJS's out-last calling convention.")], 18, "GetImpactPosition"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Targetable output parameters use CarbonEngineJS's out-last calling convention.")], 18, "Update"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetTrackingPosition"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetTargetPosition"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Targetable output parameters use CarbonEngineJS's out-last calling convention.")], 18, "FindClosestLocator"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Targetable output parameters use CarbonEngineJS's out-last calling convention.")], 18, "FindRandomValidLocator"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetBehaviour"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetImpactBehaviour"], [[carbon, carbon.method, impl, impl.implemented], 18, "PopShotMissed"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetShotMissed"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("An optional timestamp supports deterministic tests; otherwise browser wall-clock seconds replace BeOS actual time.")], 18, "SetShotMissed"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLastShotTime"], [[carbon, carbon.method, impl, impl.implemented], 18, "MissQueueSize"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetRadius"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetImpactConfiguration"], [[carbon, carbon.method, impl, impl.implemented], 18, "ShowDestObject"]], 0, void 0, CjsModel));
31
+ })], [[[edit, edit.read, type, type.vec3], 16, "targetPosition"], [[edit, edit.read, type, type.int32, void 0, type.enum("ImpactBehaviour")], 16, "behaviour"], [[edit, edit.read, type, type.float32], 16, "positionOldInfluence"], [[edit, edit.read, type, type.vec3], 16, "position"], [[edit, edit.read, type, type.vec3], 16, "positionOld"], [[edit, edit.read, type, type.int32], 16, "locator"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetTargetable"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Carbon QueryInterface checks are represented by validating the targetable's required duck-typed position surface.")], 18, "SetTargetable"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLocator"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetFadeOnLocatorChange"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Carbon's random helpers map to Math.random; targetable calls use the org-standard out-last convention.")], 18, "StartFireAtLocator"], [[carbon, carbon.method, impl, impl.implemented], 18, "StopFireAtLocator"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Targetable output parameters use CarbonEngineJS's out-last calling convention.")], 18, "GetImpactPosition"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Targetable output parameters use CarbonEngineJS's out-last calling convention.")], 18, "Update"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetTrackingPosition"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetTargetPosition"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Targetable output parameters use CarbonEngineJS's out-last calling convention.")], 18, "FindClosestLocator"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Targetable output parameters use CarbonEngineJS's out-last calling convention.")], 18, "FindRandomValidLocator"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetBehaviour"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetImpactBehaviour"], [[carbon, carbon.method, impl, impl.implemented], 18, "PopShotMissed"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetShotMissed"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("An optional timestamp supports deterministic tests; otherwise browser wall-clock seconds replace BeOS actual time.")], 18, "SetShotMissed"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLastShotTime"], [[carbon, carbon.method, impl, impl.implemented], 18, "MissQueueSize"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetShotTimeVariance"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetRadius"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetImpactConfiguration"], [[carbon, carbon.method, impl, impl.implemented], 18, "ShowDestObject"]], 0, void 0, CjsModel));
25
32
  }
26
33
  targetPosition = (_initProto(this), _init_targetPosition(this, vec3.create()));
27
34
  behaviour = (_init_extra_targetPosition(this), _init_behaviour(this, 0));
@@ -44,26 +51,31 @@ new class extends _identity {
44
51
  #randomMissDistanceOffset = 0.5;
45
52
  #randomMissPositionOffset = vec3.create();
46
53
 
47
- // Carbon m_fadeOnLocatorChange (EveTurretTarget.h:84) - default off; only
54
+ // Carbon m_fadeOnLocatorChange (EveTurretTarget.h:92) - default off; only
48
55
  // EveChildTurret enables it, so ship turrets keep the snap behaviour.
49
56
  #fadeOnLocatorChange = false;
50
57
 
51
- /**
52
- * The targetable record this tracker is following, or null when it has no
53
- * target.
58
+ /**
59
+ * The targetable record this tracker is following, or null when it has no
60
+ * target.
54
61
  */
55
62
  GetTargetable() {
56
63
  return this.#targetable;
57
64
  }
58
65
 
59
- /**
60
- * Accepts an object as the target only when it exposes both an impact or
61
- * damage-locator surface and a world-position surface; a change to a different
62
- * object seeds the position blend so tracking eases off the previous target.
63
- * Returns whether the object was accepted.
66
+ /**
67
+ * Accepts an object as the target only when it exposes both an impact or
68
+ * damage-locator surface and a world-position surface; a change to a different
69
+ * object seeds the position blend so tracking eases off the previous target.
70
+ * Null clears the target (Carbon EveTurretTarget.cpp:62-67). Returns whether
71
+ * the object was accepted.
64
72
  */
65
73
  SetTargetable(object) {
66
- if (!object) return false;
74
+ if (!object) {
75
+ this.#targetable = null;
76
+ this.#worldPositionObject = null;
77
+ return true;
78
+ }
67
79
  const hasTargetSurface = typeof object.GetDamageLocatorPosition === "function" || typeof object.GetImpactPosition === "function";
68
80
  const hasPositionSurface = typeof object.GetWorldPosition === "function" || object.worldPosition?.length >= 3 || object.position?.length >= 3;
69
81
  if (!(hasTargetSurface && hasPositionSurface)) return false;
@@ -81,24 +93,24 @@ new class extends _identity {
81
93
  return this.locator;
82
94
  }
83
95
 
84
- /**
85
- * Smooths the aim over locator changes instead of snapping (Carbon
86
- * EveTurretTarget.cpp:98-105): firing at or leaving a locator seeds the
87
- * position blend from the current tracking position.
96
+ /**
97
+ * Smooths the aim over locator changes instead of snapping (Carbon
98
+ * EveTurretTarget.cpp:104-111): firing at or leaving a locator seeds the
99
+ * position blend from the current tracking position.
88
100
  */
89
101
  SetFadeOnLocatorChange(fade) {
90
102
  this.#fadeOnLocatorChange = !!fade;
91
103
  }
92
104
 
93
- /**
94
- * Begins a shot at a locator: rolls this burst's random miss distance and
95
- * offset, and, when the shot is not a queued miss and an impact size is
96
- * authored, either creates the impact immediately (zero delay under
97
- * damage-locator behaviour) or arms it to be created once delay elapses.
105
+ /**
106
+ * Begins a shot at a locator: rolls this burst's random miss distance and
107
+ * offset, and, when the shot is not a queued miss and an impact size is
108
+ * authored, either creates the impact immediately (zero delay under
109
+ * damage-locator behaviour) or arms it to be created once delay elapses.
98
110
  */
99
111
  StartFireAtLocator(locator, delay, length, source = _EveTurretTarget.#zero) {
100
112
  this.locator = Number(locator) | 0;
101
- // Carbon EveTurretTarget.cpp:116-120: fading turrets blend out of the
113
+ // Carbon EveTurretTarget.cpp:122-126: fading turrets blend out of the
102
114
  // CURRENT tracking position when the locator changes.
103
115
  if (this.#fadeOnLocatorChange) {
104
116
  vec3.copy(this.positionOld, this.position);
@@ -126,13 +138,13 @@ new class extends _identity {
126
138
  }
127
139
  }
128
140
 
129
- /**
130
- * Ends firing: clears the locator, the position blend, the current miss state
131
- * and every queued shot result.
141
+ /**
142
+ * Ends firing: clears the locator, the position blend, the current miss state
143
+ * and every queued shot result.
132
144
  */
133
145
  StopFireAtLocator() {
134
146
  this.locator = -1;
135
- // Carbon EveTurretTarget.cpp:166-174: fading turrets ease out of the
147
+ // Carbon EveTurretTarget.cpp:172-180: fading turrets ease out of the
136
148
  // last tracking position; others snap by disabling the blend.
137
149
  if (this.#fadeOnLocatorChange) {
138
150
  vec3.copy(this.positionOld, this.position);
@@ -144,11 +156,11 @@ new class extends _identity {
144
156
  this.#missQueue.length = 0;
145
157
  }
146
158
 
147
- /**
148
- * Resolves the world impact point for the current locator into out according
149
- * to the impact behaviour - the damage locator, the target's centre, or the
150
- * target's own shield-ellipsoid solution - falling back to the target's world
151
- * position when the locator gives no usable or finite position.
159
+ /**
160
+ * Resolves the world impact point for the current locator into out according
161
+ * to the impact behaviour - the damage locator, the target's centre, or the
162
+ * target's own shield-ellipsoid solution - falling back to the target's world
163
+ * position when the locator gives no usable or finite position.
152
164
  */
153
165
  GetImpactPosition(source = _EveTurretTarget.#zero, out = vec3.create()) {
154
166
  if (!this.#targetable) return out;
@@ -165,13 +177,13 @@ new class extends _identity {
165
177
  return out;
166
178
  }
167
179
 
168
- /**
169
- * Advances the target for the frame: recomputes the impact point, extends the
170
- * miss point far past the target along the miss direction (a fixed 250 km for
171
- * lasers, distance-relative otherwise), maintains an in-flight impact under
172
- * damage-locator behaviour, and blends the tracking position out of the
173
- * previous target. Returns the live position buffer, valid until the next
174
- * Update.
180
+ /**
181
+ * Advances the target for the frame: recomputes the impact point, extends the
182
+ * miss point far past the target along the miss direction (a fixed 250 km for
183
+ * lasers, distance-relative otherwise), maintains an in-flight impact under
184
+ * damage-locator behaviour, and blends the tracking position out of the
185
+ * previous target. Returns the live position buffer, valid until the next
186
+ * Update.
175
187
  */
176
188
  Update(deltaTime, source = _EveTurretTarget.#zero) {
177
189
  const dt = Number(deltaTime) || 0;
@@ -208,28 +220,28 @@ new class extends _identity {
208
220
  return this.position;
209
221
  }
210
222
 
211
- /**
212
- * The point the turrets aim at - the miss point when the last shot missed,
213
- * otherwise the blended target position. Copies into out when one is given,
214
- * otherwise returns the live buffer.
223
+ /**
224
+ * The point the turrets aim at - the miss point when the last shot missed,
225
+ * otherwise the blended target position. Copies into out when one is given,
226
+ * otherwise returns the live buffer.
215
227
  */
216
228
  GetTrackingPosition(out) {
217
229
  return copyOrReturn(this.GetShotMissed() ? this.#positionMiss : this.position, out);
218
230
  }
219
231
 
220
- /**
221
- * The point the firing effect terminates at - the miss point when the last
222
- * shot missed, otherwise the resolved impact point. Copies into out when one
223
- * is given, otherwise returns the live buffer.
232
+ /**
233
+ * The point the firing effect terminates at - the miss point when the last
234
+ * shot missed, otherwise the resolved impact point. Copies into out when one
235
+ * is given, otherwise returns the live buffer.
224
236
  */
225
237
  GetTargetPosition(out) {
226
238
  return copyOrReturn(this.GetShotMissed() ? this.#positionMiss : this.targetPosition, out);
227
239
  }
228
240
 
229
- /**
230
- * The index of the target's damage locator nearest source, with its world
231
- * position written into out; -1 when there is no target or the locator has no
232
- * position.
241
+ /**
242
+ * The index of the target's damage locator nearest source, with its world
243
+ * position written into out; -1 when there is no target or the locator has no
244
+ * position.
233
245
  */
234
246
  FindClosestLocator(source, out = vec3.create()) {
235
247
  if (!this.#targetable) return -1;
@@ -237,9 +249,9 @@ new class extends _identity {
237
249
  return this.#targetable.GetDamageLocatorPosition?.(locator, true, out) === false ? -1 : locator;
238
250
  }
239
251
 
240
- /**
241
- * A locator drawn from the target's 'good' set, falling back to the closest
242
- * one, with its world position written into out; -1 when neither resolves.
252
+ /**
253
+ * A locator drawn from the target's 'good' set, falling back to the closest
254
+ * one, with its world position written into out; -1 when neither resolves.
243
255
  */
244
256
  FindRandomValidLocator(source, out = vec3.create()) {
245
257
  if (!this.#targetable) return -1;
@@ -249,10 +261,10 @@ new class extends _identity {
249
261
  return this.#targetable.GetDamageLocatorPosition?.(locator, true, out) === false ? -1 : locator;
250
262
  }
251
263
 
252
- /**
253
- * Sets how misses and impacts are handled: laser versus projectile miss
254
- * behaviour, the impact size (zero suppresses impacts entirely) and the
255
- * impact-position behaviour.
264
+ /**
265
+ * Sets how misses and impacts are handled: laser versus projectile miss
266
+ * behaviour, the impact size (zero suppresses impacts entirely) and the
267
+ * impact-position behaviour.
256
268
  */
257
269
  SetBehaviour(laserMiss, projectileMiss, impactSize, impactBehaviour) {
258
270
  this.#laserMissBehaviour = !!laserMiss;
@@ -260,36 +272,36 @@ new class extends _identity {
260
272
  this.SetImpactBehaviour(impactSize, impactBehaviour);
261
273
  }
262
274
 
263
- /**
264
- * Sets only the impact configuration, leaving miss behaviour untouched
265
- * (Carbon EveTurretTarget.cpp:365-369, split out for EveChildTurret).
275
+ /**
276
+ * Sets only the impact configuration, leaving miss behaviour untouched
277
+ * (Carbon EveTurretTarget.cpp:371-375, split out for EveChildTurret).
266
278
  */
267
279
  SetImpactBehaviour(impactSize, impactBehaviour) {
268
280
  this.#impactSize = Number(impactSize);
269
281
  this.behaviour = Number(impactBehaviour) | 0;
270
282
  }
271
283
 
272
- /**
273
- * Takes the next queued shot result and makes it the current miss state; an
274
- * empty queue counts as a hit.
284
+ /**
285
+ * Takes the next queued shot result and makes it the current miss state; an
286
+ * empty queue counts as a hit.
275
287
  */
276
288
  PopShotMissed() {
277
289
  this.#lastShotMissed = this.#missQueue.length ? this.#missQueue.shift() : false;
278
290
  return this.#lastShotMissed;
279
291
  }
280
292
 
281
- /**
282
- * Whether the most recently popped shot result was a miss, which is what
283
- * selects the miss position for tracking and targeting.
293
+ /**
294
+ * Whether the most recently popped shot result was a miss, which is what
295
+ * selects the miss position for tracking and targeting.
284
296
  */
285
297
  GetShotMissed() {
286
298
  return this.#lastShotMissed;
287
299
  }
288
300
 
289
- /**
290
- * Queues a hit/miss result for a future shot and stamps the shot time; the queue keeps at most four entries, dropping the oldest.
291
- * @param {boolean} missed Whether that shot will miss.
292
- * @param {number} [timestamp] Shot time in seconds; defaults to wall-clock time, and may be supplied for determinism.
301
+ /**
302
+ * Queues a hit/miss result for a future shot and stamps the shot time; the queue keeps at most four entries, dropping the oldest.
303
+ * @param {boolean} missed Whether that shot will miss.
304
+ * @param {number} [timestamp] Shot time in seconds; defaults to wall-clock time, and may be supplied for determinism.
293
305
  */
294
306
  SetShotMissed(missed, timestamp = Date.now() / 1000) {
295
307
  this.#missQueue.push(!!missed);
@@ -307,25 +319,30 @@ new class extends _identity {
307
319
  return this.#missQueue.length;
308
320
  }
309
321
 
310
- /**
311
- * The target's radius, which scales the firing effect; -1 when there is no
312
- * target.
322
+ /** The maximum firing-time variance between turrets (Carbon EveTurretTarget.h:62-65). */
323
+ GetShotTimeVariance() {
324
+ return EVE_TURRET_RANDOM_DELAY_MAX;
325
+ }
326
+
327
+ /**
328
+ * The target's radius, which scales the firing effect; -1 when there is no
329
+ * target.
313
330
  */
314
331
  GetRadius() {
315
332
  return Number(this.#targetable?.GetRadius?.() ?? -1);
316
333
  }
317
334
 
318
- /**
319
- * The surface the target currently presents - shield, armor or hull -
320
- * IMPACT_INVALID when the target does not report one.
335
+ /**
336
+ * The surface the target currently presents - shield, armor or hull -
337
+ * IMPACT_INVALID when the target does not report one.
321
338
  */
322
339
  GetImpactConfiguration() {
323
340
  return this.#targetable?.GetImpactConfiguration?.() ?? _EveTurretTarget.ImpactConfiguration.IMPACT_INVALID;
324
341
  }
325
342
 
326
- /**
327
- * Whether the firing effect should draw its impact end: false only when the
328
- * shot missed and projectile miss behaviour is set.
343
+ /**
344
+ * Whether the firing effect should draw its impact end: false only when the
345
+ * shot missed and projectile miss behaviour is set.
329
346
  */
330
347
  ShowDestObject() {
331
348
  return !(this.#projectileMissBehaviour && this.GetShotMissed());
@@ -354,5 +371,5 @@ function copyOrReturn(value, out) {
354
371
  return out ? vec3.copy(out, value) : value;
355
372
  }
356
373
 
357
- export { _EveTurretTarget as EveTurretTarget };
374
+ export { EVE_TURRET_RANDOM_DELAY_MAX, _EveTurretTarget as EveTurretTarget };
358
375
  //# sourceMappingURL=EveTurretTarget.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EveTurretTarget.js","sources":["../../../../../../src/trinity/eve/attachment/turrets/EveTurretTarget.js"],"sourcesContent":["// Source: trinity/trinity/Eve/Turret/EveTurretTarget.h\r\n// Source: trinity/trinity/Eve/Turret/EveTurretTarget.cpp\r\nimport { vec3 } from \"#math/vec3\";\r\nimport { CjsModel } from \"#model\";\r\nimport { carbon, impl, edit, type } from \"#schema\";\r\nimport { ImpactConfiguration } from \"../../../generated/include/enums.js\";\r\n\r\n\r\n/**\r\n * Tracks what a turret set is shooting at: the chosen damage locator, the\r\n * resolved impact and miss positions, and the queue of hit/miss results the\r\n * server has sent.\r\n */\r\n@type.define({ className: \"EveTurretTarget\", family: \"eve/attachment/turrets\" })\r\nexport class EveTurretTarget extends CjsModel\r\n{\r\n @edit.read @type.vec3 targetPosition = vec3.create();\r\n @edit.read @type.int32 @type.enum(\"ImpactBehaviour\") behaviour = 0;\r\n @edit.read @type.float32 positionOldInfluence = -1;\r\n @edit.read @type.vec3 position = vec3.create();\r\n @edit.read @type.vec3 positionOld = vec3.create();\r\n @edit.read @type.int32 locator = -1;\r\n\r\n #targetable = null;\r\n #worldPositionObject = null;\r\n #impactLength = -1;\r\n #impactDelay = -1;\r\n #impactID = -1;\r\n #positionMiss = vec3.create();\r\n #missQueue = [];\r\n #lastShotMissed = false;\r\n #lastShotTime = 0;\r\n #laserMissBehaviour = false;\r\n #projectileMissBehaviour = false;\r\n #impactSize = 0;\r\n #randomMissDistanceOffset = 0.5;\r\n #randomMissPositionOffset = vec3.create();\r\n\r\n // Carbon m_fadeOnLocatorChange (EveTurretTarget.h:84) - default off; only\r\n // EveChildTurret enables it, so ship turrets keep the snap behaviour.\r\n #fadeOnLocatorChange = false;\r\n\r\n /**\r\n * The targetable record this tracker is following, or null when it has no\r\n * target.\r\n */\r\n @carbon.method @impl.implemented\r\n GetTargetable()\r\n {\r\n return this.#targetable;\r\n }\r\n\r\n /**\r\n * Accepts an object as the target only when it exposes both an impact or\r\n * damage-locator surface and a world-position surface; a change to a different\r\n * object seeds the position blend so tracking eases off the previous target.\r\n * Returns whether the object was accepted.\r\n */\r\n @carbon.method @impl.adapted\r\n @impl.reason(\"Carbon QueryInterface checks are represented by validating the targetable's required duck-typed position surface.\")\r\n SetTargetable(object)\r\n {\r\n if (!object) return false;\r\n const hasTargetSurface = typeof object.GetDamageLocatorPosition === \"function\" || typeof object.GetImpactPosition === \"function\";\r\n const hasPositionSurface = typeof object.GetWorldPosition === \"function\" || object.worldPosition?.length >= 3 || object.position?.length >= 3;\r\n if (!(hasTargetSurface && hasPositionSurface)) return false;\r\n if (object !== this.#targetable)\r\n {\r\n this.#targetable = object;\r\n this.#worldPositionObject = object;\r\n vec3.copy(this.positionOld, this.position);\r\n this.positionOldInfluence = 1;\r\n }\r\n return true;\r\n }\r\n\r\n /** The damage locator index currently being fired at, or -1 when not firing. */\r\n @carbon.method @impl.implemented\r\n GetLocator()\r\n {\r\n return this.locator;\r\n }\r\n\r\n /**\r\n * Smooths the aim over locator changes instead of snapping (Carbon\r\n * EveTurretTarget.cpp:98-105): firing at or leaving a locator seeds the\r\n * position blend from the current tracking position.\r\n */\r\n @carbon.method @impl.implemented\r\n SetFadeOnLocatorChange(fade)\r\n {\r\n this.#fadeOnLocatorChange = !!fade;\r\n }\r\n\r\n /**\r\n * Begins a shot at a locator: rolls this burst's random miss distance and\r\n * offset, and, when the shot is not a queued miss and an impact size is\r\n * authored, either creates the impact immediately (zero delay under\r\n * damage-locator behaviour) or arms it to be created once delay elapses.\r\n */\r\n @carbon.method @impl.adapted\r\n @impl.reason(\"Carbon's random helpers map to Math.random; targetable calls use the org-standard out-last convention.\")\r\n StartFireAtLocator(locator, delay, length, source = EveTurretTarget.#zero)\r\n {\r\n this.locator = Number(locator) | 0;\r\n // Carbon EveTurretTarget.cpp:116-120: fading turrets blend out of the\r\n // CURRENT tracking position when the locator changes.\r\n if (this.#fadeOnLocatorChange)\r\n {\r\n vec3.copy(this.positionOld, this.position);\r\n this.positionOldInfluence = 1;\r\n }\r\n this.#randomMissDistanceOffset = Math.random();\r\n const u = Math.random();\r\n const v = Math.random();\r\n const phi = u * Math.PI * 2;\r\n const theta = Math.acos(1 - Math.sqrt(v)) * 2;\r\n const sinPhi = Math.sin(phi) * 3;\r\n vec3.set(this.#randomMissPositionOffset, sinPhi * Math.cos(theta), Math.cos(phi) * 3, sinPhi * Math.sin(theta));\r\n this.#impactID = -1;\r\n\r\n if (!this.PopShotMissed() && this.#impactSize > 0 && this.#targetable)\r\n {\r\n this.#impactLength = Math.max(Number(length), 0);\r\n this.#impactDelay = Number(delay);\r\n if (this.#impactDelay === 0)\r\n {\r\n this.GetImpactPosition(source, this.targetPosition);\r\n if (this.behaviour === EveTurretTarget.ImpactBehaviour.DAMAGE_LOCATOR)\r\n {\r\n vec3.subtract(EveTurretTarget.#direction, source, this.targetPosition);\r\n this.#impactID = Number(this.#targetable.CreateImpact?.(this.locator, EveTurretTarget.#direction, this.#impactLength, this.#impactSize) ?? -1) | 0;\r\n this.#impactDelay = -1;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Ends firing: clears the locator, the position blend, the current miss state\r\n * and every queued shot result.\r\n */\r\n @carbon.method @impl.implemented\r\n StopFireAtLocator()\r\n {\r\n this.locator = -1;\r\n // Carbon EveTurretTarget.cpp:166-174: fading turrets ease out of the\r\n // last tracking position; others snap by disabling the blend.\r\n if (this.#fadeOnLocatorChange)\r\n {\r\n vec3.copy(this.positionOld, this.position);\r\n this.positionOldInfluence = 1;\r\n }\r\n else\r\n {\r\n this.positionOldInfluence = -1;\r\n }\r\n this.#lastShotMissed = false;\r\n this.#missQueue.length = 0;\r\n }\r\n\r\n /**\r\n * Resolves the world impact point for the current locator into out according\r\n * to the impact behaviour - the damage locator, the target's centre, or the\r\n * target's own shield-ellipsoid solution - falling back to the target's world\r\n * position when the locator gives no usable or finite position.\r\n */\r\n @carbon.method @impl.adapted\r\n @impl.reason(\"Targetable output parameters use CarbonEngineJS's out-last calling convention.\")\r\n GetImpactPosition(source = EveTurretTarget.#zero, out = vec3.create())\r\n {\r\n if (!this.#targetable) return out;\r\n if (this.behaviour === EveTurretTarget.ImpactBehaviour.DAMAGE_LOCATOR)\r\n {\r\n const valid = this.#targetable.GetDamageLocatorPosition?.(this.locator, true, out);\r\n if (valid === false || vec3.squaredLength(out) > 2.2379561604e22) getWorldPosition(this.#worldPositionObject, out);\r\n }\r\n else if (this.behaviour === EveTurretTarget.ImpactBehaviour.CENTER)\r\n {\r\n getWorldPosition(this.#worldPositionObject, out);\r\n }\r\n else\r\n {\r\n getWorldPosition(this.#worldPositionObject, EveTurretTarget.#worldPosition);\r\n const valid = this.#targetable.GetImpactPosition?.(this.locator, source, EveTurretTarget.#worldPosition, 0, out);\r\n if (valid === false) this.#targetable.GetDamageLocatorPosition?.(this.locator, true, out);\r\n }\r\n return out;\r\n }\r\n\r\n /**\r\n * Advances the target for the frame: recomputes the impact point, extends the\r\n * miss point far past the target along the miss direction (a fixed 250 km for\r\n * lasers, distance-relative otherwise), maintains an in-flight impact under\r\n * damage-locator behaviour, and blends the tracking position out of the\r\n * previous target. Returns the live position buffer, valid until the next\r\n * Update.\r\n */\r\n @carbon.method @impl.adapted\r\n @impl.reason(\"Targetable output parameters use CarbonEngineJS's out-last calling convention.\")\r\n Update(deltaTime, source = EveTurretTarget.#zero)\r\n {\r\n const dt = Number(deltaTime) || 0;\r\n if (this.#targetable)\r\n {\r\n this.GetImpactPosition(source, this.targetPosition);\r\n vec3.subtract(EveTurretTarget.#direction, source, this.targetPosition);\r\n const missResult = this.#targetable.GetMissPosition?.(this.targetPosition, source, this.#positionMiss);\r\n if (missResult?.length >= 3) vec3.copy(this.#positionMiss, missResult);\r\n else if (missResult === undefined && !this.#targetable.GetMissPosition) vec3.copy(this.#positionMiss, this.targetPosition);\r\n vec3.add(this.#positionMiss, this.#positionMiss, this.#randomMissPositionOffset);\r\n vec3.subtract(EveTurretTarget.#missDirection, this.#positionMiss, source);\r\n const distance = vec3.length(EveTurretTarget.#missDirection);\r\n if (distance) vec3.scale(EveTurretTarget.#missDirection, EveTurretTarget.#missDirection, 1 / distance);\r\n if (this.#laserMissBehaviour)\r\n {\r\n vec3.scaleAndAdd(this.#positionMiss, this.#positionMiss, EveTurretTarget.#missDirection, 250000);\r\n }\r\n else\r\n {\r\n vec3.scaleAndAdd(this.#positionMiss, this.#positionMiss, EveTurretTarget.#missDirection, (distance + 5000) * (1 + 0.5 * this.#randomMissDistanceOffset));\r\n }\r\n\r\n if (this.behaviour === EveTurretTarget.ImpactBehaviour.DAMAGE_LOCATOR)\r\n {\r\n if (this.#impactID !== -1) this.#targetable.UpdateImpact?.(this.targetPosition, EveTurretTarget.#direction, this.#impactID);\r\n if (this.#impactDelay > 0 && this.#impactSize > 0)\r\n {\r\n this.#impactDelay -= dt;\r\n if (this.#impactDelay < 0)\r\n {\r\n this.#impactID = Number(this.#targetable.CreateImpact?.(this.locator, EveTurretTarget.#direction, this.#impactLength, this.#impactSize) ?? -1) | 0;\r\n this.#impactDelay = -1;\r\n }\r\n }\r\n }\r\n }\r\n\r\n vec3.copy(this.position, this.targetPosition);\r\n if (this.positionOldInfluence > 0)\r\n {\r\n vec3.lerp(this.position, this.targetPosition, this.positionOld, this.positionOldInfluence);\r\n this.positionOldInfluence -= dt;\r\n }\r\n return this.position;\r\n }\r\n\r\n /**\r\n * The point the turrets aim at - the miss point when the last shot missed,\r\n * otherwise the blended target position. Copies into out when one is given,\r\n * otherwise returns the live buffer.\r\n */\r\n @carbon.method @impl.implemented\r\n GetTrackingPosition(out)\r\n {\r\n return copyOrReturn(this.GetShotMissed() ? this.#positionMiss : this.position, out);\r\n }\r\n\r\n /**\r\n * The point the firing effect terminates at - the miss point when the last\r\n * shot missed, otherwise the resolved impact point. Copies into out when one\r\n * is given, otherwise returns the live buffer.\r\n */\r\n @carbon.method @impl.implemented\r\n GetTargetPosition(out)\r\n {\r\n return copyOrReturn(this.GetShotMissed() ? this.#positionMiss : this.targetPosition, out);\r\n }\r\n\r\n /**\r\n * The index of the target's damage locator nearest source, with its world\r\n * position written into out; -1 when there is no target or the locator has no\r\n * position.\r\n */\r\n @carbon.method @impl.adapted\r\n @impl.reason(\"Targetable output parameters use CarbonEngineJS's out-last calling convention.\")\r\n FindClosestLocator(source, out = vec3.create())\r\n {\r\n if (!this.#targetable) return -1;\r\n const locator = Number(this.#targetable.GetClosestDamageLocatorIndex?.(source) ?? -1) | 0;\r\n return this.#targetable.GetDamageLocatorPosition?.(locator, true, out) === false ? -1 : locator;\r\n }\r\n\r\n /**\r\n * A locator drawn from the target's 'good' set, falling back to the closest\r\n * one, with its world position written into out; -1 when neither resolves.\r\n */\r\n @carbon.method @impl.adapted\r\n @impl.reason(\"Targetable output parameters use CarbonEngineJS's out-last calling convention.\")\r\n FindRandomValidLocator(source, out = vec3.create())\r\n {\r\n if (!this.#targetable) return -1;\r\n let locator = Number(this.#targetable.GetGoodDamageLocatorIndex?.(source) ?? -1) | 0;\r\n if (this.#targetable.GetDamageLocatorPosition?.(locator, true, out) !== false) return locator;\r\n locator = Number(this.#targetable.GetClosestDamageLocatorIndex?.(source) ?? -1) | 0;\r\n return this.#targetable.GetDamageLocatorPosition?.(locator, true, out) === false ? -1 : locator;\r\n }\r\n\r\n /**\r\n * Sets how misses and impacts are handled: laser versus projectile miss\r\n * behaviour, the impact size (zero suppresses impacts entirely) and the\r\n * impact-position behaviour.\r\n */\r\n @carbon.method @impl.implemented\r\n SetBehaviour(laserMiss, projectileMiss, impactSize, impactBehaviour)\r\n {\r\n this.#laserMissBehaviour = !!laserMiss;\r\n this.#projectileMissBehaviour = !!projectileMiss;\r\n this.SetImpactBehaviour(impactSize, impactBehaviour);\r\n }\r\n\r\n /**\r\n * Sets only the impact configuration, leaving miss behaviour untouched\r\n * (Carbon EveTurretTarget.cpp:365-369, split out for EveChildTurret).\r\n */\r\n @carbon.method @impl.implemented\r\n SetImpactBehaviour(impactSize, impactBehaviour)\r\n {\r\n this.#impactSize = Number(impactSize);\r\n this.behaviour = Number(impactBehaviour) | 0;\r\n }\r\n\r\n /**\r\n * Takes the next queued shot result and makes it the current miss state; an\r\n * empty queue counts as a hit.\r\n */\r\n @carbon.method @impl.implemented\r\n PopShotMissed()\r\n {\r\n this.#lastShotMissed = this.#missQueue.length ? this.#missQueue.shift() : false;\r\n return this.#lastShotMissed;\r\n }\r\n\r\n /**\r\n * Whether the most recently popped shot result was a miss, which is what\r\n * selects the miss position for tracking and targeting.\r\n */\r\n @carbon.method @impl.implemented\r\n GetShotMissed()\r\n {\r\n return this.#lastShotMissed;\r\n }\r\n\r\n /**\r\n * Queues a hit/miss result for a future shot and stamps the shot time; the queue keeps at most four entries, dropping the oldest.\r\n * @param {boolean} missed Whether that shot will miss.\r\n * @param {number} [timestamp] Shot time in seconds; defaults to wall-clock time, and may be supplied for determinism.\r\n */\r\n @carbon.method @impl.adapted\r\n @impl.reason(\"An optional timestamp supports deterministic tests; otherwise browser wall-clock seconds replace BeOS actual time.\")\r\n SetShotMissed(missed, timestamp = Date.now() / 1000)\r\n {\r\n this.#missQueue.push(!!missed);\r\n this.#lastShotTime = Number(timestamp);\r\n while (this.#missQueue.length > 4) this.#missQueue.shift();\r\n }\r\n\r\n /** The timestamp stamped by the most recent SetShotMissed, in seconds. */\r\n @carbon.method @impl.implemented\r\n GetLastShotTime()\r\n {\r\n return this.#lastShotTime;\r\n }\r\n\r\n /** The number of queued shot results not yet popped. */\r\n @carbon.method @impl.implemented\r\n MissQueueSize()\r\n {\r\n return this.#missQueue.length;\r\n }\r\n\r\n /**\r\n * The target's radius, which scales the firing effect; -1 when there is no\r\n * target.\r\n */\r\n @carbon.method @impl.implemented\r\n GetRadius()\r\n {\r\n return Number(this.#targetable?.GetRadius?.() ?? -1);\r\n }\r\n\r\n /**\r\n * The surface the target currently presents - shield, armor or hull -\r\n * IMPACT_INVALID when the target does not report one.\r\n */\r\n @carbon.method @impl.implemented\r\n GetImpactConfiguration()\r\n {\r\n return this.#targetable?.GetImpactConfiguration?.() ?? EveTurretTarget.ImpactConfiguration.IMPACT_INVALID;\r\n }\r\n\r\n /**\r\n * Whether the firing effect should draw its impact end: false only when the\r\n * shot missed and projectile miss behaviour is set.\r\n */\r\n @carbon.method @impl.implemented\r\n ShowDestObject()\r\n {\r\n return !(this.#projectileMissBehaviour && this.GetShotMissed());\r\n }\r\n\r\n static ImpactBehaviour = Object.freeze({ DAMAGE_LOCATOR: 0, SHIELD_ELLIPSOID: 1, CENTER: 2 });\r\n static ImpactConfiguration = ImpactConfiguration;\r\n static #zero = vec3.create();\r\n static #direction = vec3.create();\r\n static #missDirection = vec3.create();\r\n static #worldPosition = vec3.create();\r\n}\r\n\r\nfunction getWorldPosition(object, out)\r\n{\r\n const value = object?.GetWorldPosition?.(out) ?? object?.worldPosition ?? object?.position;\r\n if (value?.length >= 3 && value !== out) vec3.copy(out, value);\r\n return out;\r\n}\r\n\r\nfunction copyOrReturn(value, out)\r\n{\r\n return out ? vec3.copy(out, value) : value;\r\n}\r\n"],"names":["_EveTurretTarget","_identity","EveTurretTarget","CjsModel","e","_init_targetPosition","_init_extra_targetPosition","_init_behaviour","_init_extra_behaviour","_init_positionOldInfluence","_init_extra_positionOldInfluence","_init_position","_init_extra_position","_init_positionOld","_init_extra_positionOld","_init_locator","_init_extra_locator","_initProto","c","_initClass","_applyDecs","type","define","className","family","edit","read","vec3","int32","enum","float32","carbon","method","impl","implemented","adapted","reason","targetPosition","create","behaviour","positionOldInfluence","position","positionOld","locator","GetTargetable","SetTargetable","object","hasTargetSurface","GetDamageLocatorPosition","GetImpactPosition","hasPositionSurface","GetWorldPosition","worldPosition","length","copy","GetLocator","SetFadeOnLocatorChange","fade","StartFireAtLocator","delay","source","Number","Math","random","u","v","phi","PI","theta","acos","sqrt","sinPhi","sin","set","cos","PopShotMissed","max","ImpactBehaviour","DAMAGE_LOCATOR","subtract","CreateImpact","StopFireAtLocator","out","valid","squaredLength","getWorldPosition","CENTER","Update","deltaTime","dt","missResult","GetMissPosition","undefined","add","distance","scale","scaleAndAdd","UpdateImpact","lerp","GetTrackingPosition","copyOrReturn","GetShotMissed","GetTargetPosition","FindClosestLocator","GetClosestDamageLocatorIndex","FindRandomValidLocator","GetGoodDamageLocatorIndex","SetBehaviour","laserMiss","projectileMiss","impactSize","impactBehaviour","SetImpactBehaviour","shift","SetShotMissed","missed","timestamp","Date","now","push","GetLastShotTime","MissQueueSize","GetRadius","GetImpactConfiguration","ImpactConfiguration","IMPACT_INVALID","ShowDestObject","Object","freeze","SHIELD_ELLIPSOID","constructor","value"],"mappings":";;;;;;;;AAQA;AACA;AACA;AACA;AACA;AAJA,IAAAA;AAAA,IAAA,cAAAC,SAAA,CAAA;AAAA,EAAA,QAKA,MAAAC,eAAA,SACqCC,QAAQ,CAC7C;AAAA,IAAA;AAAA,MAAA,CAAA;QAAAC,CAAA,EAAA,CAAAC,oBAAA,EAAAC,0BAAA,EAAAC,eAAA,EAAAC,qBAAA,EAAAC,0BAAA,EAAAC,gCAAA,EAAAC,cAAA,EAAAC,oBAAA,EAAAC,iBAAA,EAAAC,uBAAA,EAAAC,aAAA,EAAAC,mBAAA,EAAAC,UAAA,CAAA;QAAAC,CAAA,EAAA,CAAAlB,gBAAA,EAAAmB,UAAA;AAAA,OAAA,GAAAC,cAAA,CAAA,IAAA,EAAA,CAFCC,IAAI,CAACC,MAAM,CAAC;AAAEC,QAAAA,SAAS,EAAE,iBAAiB;AAAEC,QAAAA,MAAM,EAAE;OAA0B,CAAC,MAG7EC,IAAI,EAAJA,IAAI,CAACC,IAAI,EAAEL,IAAI,EAAJA,IAAI,CAACM,IAAI,4BACpBF,IAAI,EAAJA,IAAI,CAACC,IAAI,EAAEL,IAAI,EAAJA,IAAI,CAACO,KAAK,UAAEP,IAAI,CAACQ,IAAI,CAAC,iBAAiB,CAAC,CAAA,EAAA,EAAA,EAAA,WAAA,CAAA,EAAA,CAAA,CACnDJ,IAAI,EAAJA,IAAI,CAACC,IAAI,EAAEL,I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AA,MAAMiD,KAAK,GAAGrF,MAAM,EAAEK,gBAAgB,GAAG+B,GAAG,CAAC,IAAIpC,MAAM,EAAEM,aAAa,IAAIN,MAAM,EAAEL,QAAQ;AAC1F,EAAA,IAAI0F,KAAK,EAAE9E,MAAM,IAAI,CAAC,IAAI8E,KAAK,KAAKjD,GAAG,EAAEvD,IAAI,CAAC2B,IAAI,CAAC4B,GAAG,EAAEiD,KAAK,CAAC;AAC9D,EAAA,OAAOjD,GAAG;AACZ;AAEA,SAASkB,YAAYA,CAAC+B,KAAK,EAAEjD,GAAG,EAChC;EACE,OAAOA,GAAG,GAAGvD,IAAI,CAAC2B,IAAI,CAAC4B,GAAG,EAAEiD,KAAK,CAAC,GAAGA,KAAK;AAC5C;;;;"}
1
+ {"version":3,"file":"EveTurretTarget.js","sources":["../../../../../../src/trinity/eve/attachment/turrets/EveTurretTarget.js"],"sourcesContent":["// Source: trinity/trinity/Eve/Turret/EveTurretTarget.h\n// Source: trinity/trinity/Eve/Turret/EveTurretTarget.cpp\nimport { vec3 } from \"#math/vec3\";\nimport { CjsModel } from \"#model\";\nimport { carbon, impl, edit, type } from \"#schema\";\nimport { ImpactConfiguration } from \"../../../generated/include/enums.js\";\n\n\n/**\n * Maximum firing-time offset between turrets; godma reads it back through\n * GetShotTimeVariance as the window grouping shots into one damage message\n * (Carbon EveTurretTarget.h:9-11, moved from EveTurretSet.h in trinity 89f5a177).\n */\nexport const EVE_TURRET_RANDOM_DELAY_MAX = 0.6;\n\n\n/**\n * Tracks what a turret set is shooting at: the chosen damage locator, the\n * resolved impact and miss positions, and the queue of hit/miss results the\n * server has sent.\n */\n@type.define({ className: \"EveTurretTarget\", family: \"eve/attachment/turrets\" })\nexport class EveTurretTarget extends CjsModel\n{\n @edit.read @type.vec3 targetPosition = vec3.create();\n @edit.read @type.int32 @type.enum(\"ImpactBehaviour\") behaviour = 0;\n @edit.read @type.float32 positionOldInfluence = -1;\n @edit.read @type.vec3 position = vec3.create();\n @edit.read @type.vec3 positionOld = vec3.create();\n @edit.read @type.int32 locator = -1;\n\n #targetable = null;\n #worldPositionObject = null;\n #impactLength = -1;\n #impactDelay = -1;\n #impactID = -1;\n #positionMiss = vec3.create();\n #missQueue = [];\n #lastShotMissed = false;\n #lastShotTime = 0;\n #laserMissBehaviour = false;\n #projectileMissBehaviour = false;\n #impactSize = 0;\n #randomMissDistanceOffset = 0.5;\n #randomMissPositionOffset = vec3.create();\n\n // Carbon m_fadeOnLocatorChange (EveTurretTarget.h:92) - default off; only\n // EveChildTurret enables it, so ship turrets keep the snap behaviour.\n #fadeOnLocatorChange = false;\n\n /**\n * The targetable record this tracker is following, or null when it has no\n * target.\n */\n @carbon.method @impl.implemented\n GetTargetable()\n {\n return this.#targetable;\n }\n\n /**\n * Accepts an object as the target only when it exposes both an impact or\n * damage-locator surface and a world-position surface; a change to a different\n * object seeds the position blend so tracking eases off the previous target.\n * Null clears the target (Carbon EveTurretTarget.cpp:62-67). Returns whether\n * the object was accepted.\n */\n @carbon.method @impl.adapted\n @impl.reason(\"Carbon QueryInterface checks are represented by validating the targetable's required duck-typed position surface.\")\n SetTargetable(object)\n {\n if (!object)\n {\n this.#targetable = null;\n this.#worldPositionObject = null;\n return true;\n }\n const hasTargetSurface = typeof object.GetDamageLocatorPosition === \"function\" || typeof object.GetImpactPosition === \"function\";\n const hasPositionSurface = typeof object.GetWorldPosition === \"function\" || object.worldPosition?.length >= 3 || object.position?.length >= 3;\n if (!(hasTargetSurface && hasPositionSurface)) return false;\n if (object !== this.#targetable)\n {\n this.#targetable = object;\n this.#worldPositionObject = object;\n vec3.copy(this.positionOld, this.position);\n this.positionOldInfluence = 1;\n }\n return true;\n }\n\n /** The damage locator index currently being fired at, or -1 when not firing. */\n @carbon.method @impl.implemented\n GetLocator()\n {\n return this.locator;\n }\n\n /**\n * Smooths the aim over locator changes instead of snapping (Carbon\n * EveTurretTarget.cpp:104-111): firing at or leaving a locator seeds the\n * position blend from the current tracking position.\n */\n @carbon.method @impl.implemented\n SetFadeOnLocatorChange(fade)\n {\n this.#fadeOnLocatorChange = !!fade;\n }\n\n /**\n * Begins a shot at a locator: rolls this burst's random miss distance and\n * offset, and, when the shot is not a queued miss and an impact size is\n * authored, either creates the impact immediately (zero delay under\n * damage-locator behaviour) or arms it to be created once delay elapses.\n */\n @carbon.method @impl.adapted\n @impl.reason(\"Carbon's random helpers map to Math.random; targetable calls use the org-standard out-last convention.\")\n StartFireAtLocator(locator, delay, length, source = EveTurretTarget.#zero)\n {\n this.locator = Number(locator) | 0;\n // Carbon EveTurretTarget.cpp:122-126: fading turrets blend out of the\n // CURRENT tracking position when the locator changes.\n if (this.#fadeOnLocatorChange)\n {\n vec3.copy(this.positionOld, this.position);\n this.positionOldInfluence = 1;\n }\n this.#randomMissDistanceOffset = Math.random();\n const u = Math.random();\n const v = Math.random();\n const phi = u * Math.PI * 2;\n const theta = Math.acos(1 - Math.sqrt(v)) * 2;\n const sinPhi = Math.sin(phi) * 3;\n vec3.set(this.#randomMissPositionOffset, sinPhi * Math.cos(theta), Math.cos(phi) * 3, sinPhi * Math.sin(theta));\n this.#impactID = -1;\n\n if (!this.PopShotMissed() && this.#impactSize > 0 && this.#targetable)\n {\n this.#impactLength = Math.max(Number(length), 0);\n this.#impactDelay = Number(delay);\n if (this.#impactDelay === 0)\n {\n this.GetImpactPosition(source, this.targetPosition);\n if (this.behaviour === EveTurretTarget.ImpactBehaviour.DAMAGE_LOCATOR)\n {\n vec3.subtract(EveTurretTarget.#direction, source, this.targetPosition);\n this.#impactID = Number(this.#targetable.CreateImpact?.(this.locator, EveTurretTarget.#direction, this.#impactLength, this.#impactSize) ?? -1) | 0;\n this.#impactDelay = -1;\n }\n }\n }\n }\n\n /**\n * Ends firing: clears the locator, the position blend, the current miss state\n * and every queued shot result.\n */\n @carbon.method @impl.implemented\n StopFireAtLocator()\n {\n this.locator = -1;\n // Carbon EveTurretTarget.cpp:172-180: fading turrets ease out of the\n // last tracking position; others snap by disabling the blend.\n if (this.#fadeOnLocatorChange)\n {\n vec3.copy(this.positionOld, this.position);\n this.positionOldInfluence = 1;\n }\n else\n {\n this.positionOldInfluence = -1;\n }\n this.#lastShotMissed = false;\n this.#missQueue.length = 0;\n }\n\n /**\n * Resolves the world impact point for the current locator into out according\n * to the impact behaviour - the damage locator, the target's centre, or the\n * target's own shield-ellipsoid solution - falling back to the target's world\n * position when the locator gives no usable or finite position.\n */\n @carbon.method @impl.adapted\n @impl.reason(\"Targetable output parameters use CarbonEngineJS's out-last calling convention.\")\n GetImpactPosition(source = EveTurretTarget.#zero, out = vec3.create())\n {\n if (!this.#targetable) return out;\n if (this.behaviour === EveTurretTarget.ImpactBehaviour.DAMAGE_LOCATOR)\n {\n const valid = this.#targetable.GetDamageLocatorPosition?.(this.locator, true, out);\n if (valid === false || vec3.squaredLength(out) > 2.2379561604e22) getWorldPosition(this.#worldPositionObject, out);\n }\n else if (this.behaviour === EveTurretTarget.ImpactBehaviour.CENTER)\n {\n getWorldPosition(this.#worldPositionObject, out);\n }\n else\n {\n getWorldPosition(this.#worldPositionObject, EveTurretTarget.#worldPosition);\n const valid = this.#targetable.GetImpactPosition?.(this.locator, source, EveTurretTarget.#worldPosition, 0, out);\n if (valid === false) this.#targetable.GetDamageLocatorPosition?.(this.locator, true, out);\n }\n return out;\n }\n\n /**\n * Advances the target for the frame: recomputes the impact point, extends the\n * miss point far past the target along the miss direction (a fixed 250 km for\n * lasers, distance-relative otherwise), maintains an in-flight impact under\n * damage-locator behaviour, and blends the tracking position out of the\n * previous target. Returns the live position buffer, valid until the next\n * Update.\n */\n @carbon.method @impl.adapted\n @impl.reason(\"Targetable output parameters use CarbonEngineJS's out-last calling convention.\")\n Update(deltaTime, source = EveTurretTarget.#zero)\n {\n const dt = Number(deltaTime) || 0;\n if (this.#targetable)\n {\n this.GetImpactPosition(source, this.targetPosition);\n vec3.subtract(EveTurretTarget.#direction, source, this.targetPosition);\n const missResult = this.#targetable.GetMissPosition?.(this.targetPosition, source, this.#positionMiss);\n if (missResult?.length >= 3) vec3.copy(this.#positionMiss, missResult);\n else if (missResult === undefined && !this.#targetable.GetMissPosition) vec3.copy(this.#positionMiss, this.targetPosition);\n vec3.add(this.#positionMiss, this.#positionMiss, this.#randomMissPositionOffset);\n vec3.subtract(EveTurretTarget.#missDirection, this.#positionMiss, source);\n const distance = vec3.length(EveTurretTarget.#missDirection);\n if (distance) vec3.scale(EveTurretTarget.#missDirection, EveTurretTarget.#missDirection, 1 / distance);\n if (this.#laserMissBehaviour)\n {\n vec3.scaleAndAdd(this.#positionMiss, this.#positionMiss, EveTurretTarget.#missDirection, 250000);\n }\n else\n {\n vec3.scaleAndAdd(this.#positionMiss, this.#positionMiss, EveTurretTarget.#missDirection, (distance + 5000) * (1 + 0.5 * this.#randomMissDistanceOffset));\n }\n\n if (this.behaviour === EveTurretTarget.ImpactBehaviour.DAMAGE_LOCATOR)\n {\n if (this.#impactID !== -1) this.#targetable.UpdateImpact?.(this.targetPosition, EveTurretTarget.#direction, this.#impactID);\n if (this.#impactDelay > 0 && this.#impactSize > 0)\n {\n this.#impactDelay -= dt;\n if (this.#impactDelay < 0)\n {\n this.#impactID = Number(this.#targetable.CreateImpact?.(this.locator, EveTurretTarget.#direction, this.#impactLength, this.#impactSize) ?? -1) | 0;\n this.#impactDelay = -1;\n }\n }\n }\n }\n\n vec3.copy(this.position, this.targetPosition);\n if (this.positionOldInfluence > 0)\n {\n vec3.lerp(this.position, this.targetPosition, this.positionOld, this.positionOldInfluence);\n this.positionOldInfluence -= dt;\n }\n return this.position;\n }\n\n /**\n * The point the turrets aim at - the miss point when the last shot missed,\n * otherwise the blended target position. Copies into out when one is given,\n * otherwise returns the live buffer.\n */\n @carbon.method @impl.implemented\n GetTrackingPosition(out)\n {\n return copyOrReturn(this.GetShotMissed() ? this.#positionMiss : this.position, out);\n }\n\n /**\n * The point the firing effect terminates at - the miss point when the last\n * shot missed, otherwise the resolved impact point. Copies into out when one\n * is given, otherwise returns the live buffer.\n */\n @carbon.method @impl.implemented\n GetTargetPosition(out)\n {\n return copyOrReturn(this.GetShotMissed() ? this.#positionMiss : this.targetPosition, out);\n }\n\n /**\n * The index of the target's damage locator nearest source, with its world\n * position written into out; -1 when there is no target or the locator has no\n * position.\n */\n @carbon.method @impl.adapted\n @impl.reason(\"Targetable output parameters use CarbonEngineJS's out-last calling convention.\")\n FindClosestLocator(source, out = vec3.create())\n {\n if (!this.#targetable) return -1;\n const locator = Number(this.#targetable.GetClosestDamageLocatorIndex?.(source) ?? -1) | 0;\n return this.#targetable.GetDamageLocatorPosition?.(locator, true, out) === false ? -1 : locator;\n }\n\n /**\n * A locator drawn from the target's 'good' set, falling back to the closest\n * one, with its world position written into out; -1 when neither resolves.\n */\n @carbon.method @impl.adapted\n @impl.reason(\"Targetable output parameters use CarbonEngineJS's out-last calling convention.\")\n FindRandomValidLocator(source, out = vec3.create())\n {\n if (!this.#targetable) return -1;\n let locator = Number(this.#targetable.GetGoodDamageLocatorIndex?.(source) ?? -1) | 0;\n if (this.#targetable.GetDamageLocatorPosition?.(locator, true, out) !== false) return locator;\n locator = Number(this.#targetable.GetClosestDamageLocatorIndex?.(source) ?? -1) | 0;\n return this.#targetable.GetDamageLocatorPosition?.(locator, true, out) === false ? -1 : locator;\n }\n\n /**\n * Sets how misses and impacts are handled: laser versus projectile miss\n * behaviour, the impact size (zero suppresses impacts entirely) and the\n * impact-position behaviour.\n */\n @carbon.method @impl.implemented\n SetBehaviour(laserMiss, projectileMiss, impactSize, impactBehaviour)\n {\n this.#laserMissBehaviour = !!laserMiss;\n this.#projectileMissBehaviour = !!projectileMiss;\n this.SetImpactBehaviour(impactSize, impactBehaviour);\n }\n\n /**\n * Sets only the impact configuration, leaving miss behaviour untouched\n * (Carbon EveTurretTarget.cpp:371-375, split out for EveChildTurret).\n */\n @carbon.method @impl.implemented\n SetImpactBehaviour(impactSize, impactBehaviour)\n {\n this.#impactSize = Number(impactSize);\n this.behaviour = Number(impactBehaviour) | 0;\n }\n\n /**\n * Takes the next queued shot result and makes it the current miss state; an\n * empty queue counts as a hit.\n */\n @carbon.method @impl.implemented\n PopShotMissed()\n {\n this.#lastShotMissed = this.#missQueue.length ? this.#missQueue.shift() : false;\n return this.#lastShotMissed;\n }\n\n /**\n * Whether the most recently popped shot result was a miss, which is what\n * selects the miss position for tracking and targeting.\n */\n @carbon.method @impl.implemented\n GetShotMissed()\n {\n return this.#lastShotMissed;\n }\n\n /**\n * Queues a hit/miss result for a future shot and stamps the shot time; the queue keeps at most four entries, dropping the oldest.\n * @param {boolean} missed Whether that shot will miss.\n * @param {number} [timestamp] Shot time in seconds; defaults to wall-clock time, and may be supplied for determinism.\n */\n @carbon.method @impl.adapted\n @impl.reason(\"An optional timestamp supports deterministic tests; otherwise browser wall-clock seconds replace BeOS actual time.\")\n SetShotMissed(missed, timestamp = Date.now() / 1000)\n {\n this.#missQueue.push(!!missed);\n this.#lastShotTime = Number(timestamp);\n while (this.#missQueue.length > 4) this.#missQueue.shift();\n }\n\n /** The timestamp stamped by the most recent SetShotMissed, in seconds. */\n @carbon.method @impl.implemented\n GetLastShotTime()\n {\n return this.#lastShotTime;\n }\n\n /** The number of queued shot results not yet popped. */\n @carbon.method @impl.implemented\n MissQueueSize()\n {\n return this.#missQueue.length;\n }\n\n /** The maximum firing-time variance between turrets (Carbon EveTurretTarget.h:62-65). */\n @carbon.method @impl.implemented\n GetShotTimeVariance()\n {\n return EVE_TURRET_RANDOM_DELAY_MAX;\n }\n\n /**\n * The target's radius, which scales the firing effect; -1 when there is no\n * target.\n */\n @carbon.method @impl.implemented\n GetRadius()\n {\n return Number(this.#targetable?.GetRadius?.() ?? -1);\n }\n\n /**\n * The surface the target currently presents - shield, armor or hull -\n * IMPACT_INVALID when the target does not report one.\n */\n @carbon.method @impl.implemented\n GetImpactConfiguration()\n {\n return this.#targetable?.GetImpactConfiguration?.() ?? EveTurretTarget.ImpactConfiguration.IMPACT_INVALID;\n }\n\n /**\n * Whether the firing effect should draw its impact end: false only when the\n * shot missed and projectile miss behaviour is set.\n */\n @carbon.method @impl.implemented\n ShowDestObject()\n {\n return !(this.#projectileMissBehaviour && this.GetShotMissed());\n }\n\n static ImpactBehaviour = Object.freeze({ DAMAGE_LOCATOR: 0, SHIELD_ELLIPSOID: 1, CENTER: 2 });\n static ImpactConfiguration = ImpactConfiguration;\n static #zero = vec3.create();\n static #direction = vec3.create();\n static #missDirection = vec3.create();\n static #worldPosition = vec3.create();\n}\n\nfunction getWorldPosition(object, out)\n{\n const value = object?.GetWorldPosition?.(out) ?? object?.worldPosition ?? object?.position;\n if (value?.length >= 3 && value !== out) vec3.copy(out, value);\n return out;\n}\n\nfunction copyOrReturn(value, out)\n{\n return out ? vec3.copy(out, value) : value;\n}\n"],"names":["EVE_TURRET_RANDOM_DELAY_MAX","_EveTurretTarget","_identity","EveTurretTarget","CjsModel","e","_init_targetPosition","_init_extra_targetPosition","_init_behaviour","_init_extra_behaviour","_init_positionOldInfluence","_init_extra_positionOldInfluence","_init_position","_init_extra_position","_init_positionOld","_init_extra_positionOld","_init_locator","_init_extra_locator","_initProto","c","_initClass","_applyDecs","type","define","className","family","edit","read","vec3","int32","enum","float32","carbon","method","impl","implemented","adapted","reason","targetPosition","create","behaviour","positionOldInfluence","position","positionOld","locator","GetTargetable","SetTargetable","object","hasTargetSurface","GetDamageLocatorPosition","GetImpactPosition","hasPositionSurface","GetWorldPosition","worldPosition","length","copy","GetLocator","SetFadeOnLocatorChange","fade","StartFireAtLocator","delay","source","Number","Math","random","u","v","phi","PI","theta","acos","sqrt","sinPhi","sin","set","cos","PopShotMissed","max","ImpactBehaviour","DAMAGE_LOCATOR","subtract","CreateImpact","StopFireAtLocator","out","valid","squaredLength","getWorldPosition","CENTER","Update","deltaTime","dt","missResult","GetMissPosition","undefined","add","distance","scale","scaleAndAdd","UpdateImpact","lerp","GetTrackingPosition","copyOrReturn","GetShotMissed","GetTargetPosition","FindClosestLocator","GetClosestDamageLocatorIndex","FindRandomValidLocator","GetGoodDamageLocatorIndex","SetBehaviour","laserMiss","projectileMiss","impactSize","impactBehaviour","SetImpactBehaviour","shift","SetShotMissed","missed","timestamp","Date","now","push","GetLastShotTime","MissQueueSize","GetShotTimeVariance","GetRadius","GetImpactConfiguration","ImpactConfiguration","IMPACT_INVALID","ShowDestObject","Object","freeze","SHIELD_ELLIPSOID","constructor","value"],"mappings":";;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACO,MAAMA,2BAA2B,GAAG;;AAG3C;AACA;AACA;AACA;AACA;AAJA,IAAAC;AAAA,IAAA,cAAAC,SAAA,CAAA;AAAA,EAAA,QAKA,MAAAC,eAAA,SACqCC,QAAQ,CAC7C;AAAA,IAAA;AAAA,MAAA,CAAA;QAAAC,CAAA,EAAA,CAAAC,oBAAA,EAAAC,0BAAA,EAAAC,eAAA,EAAAC,qBAAA,EAAAC,0BAAA,EAAAC,gCAAA,EAAAC,cAAA,EAAAC,oBAAA,EAAAC,iBAAA,EAAAC,uBAAA,EAAAC,aAAA,EAAAC,mBAAA,EAAAC,UAAA,CAAA;QAAAC,CAAA,EAAA,CAAAlB,gBAAA,EAAAmB,UAAA;AAAA,OAAA,GAAAC,cAAA,CAAA,IAAA,EAAA,CAFCC,IAAI,CAACC,MAAM,CAAC;AAAEC,QAAAA,SAAS,EAAE,iBAAiB;AAAEC,QAAAA,MAAM,EAAE;OAA0B,CAAC,MAG7EC,IAAI,EAAJA,IAAI,CAACC,IAAI,EAAEL,IAAI,EAAJA,IAAI,CAACM,IAAI,4BACpBF,IAAI,EAAJA,IAAI,CAACC,IAAI,EAAEL,IAAI,EAAJA,IAAI,CAACO,KAAK,EAAA,MAAA,EAAEP,IAAI,CAACQ,IAAI,CAAC,iBAAiB,CAAC,CAAA,EAAA,EAAA,EAAA,WAAA,CAAA,EAAA,CAAA,CACnDJ,IAAI,EAAJA,IAAI,CAACC,IAAI,EAAEL,IAAI,EAAJA,IAAI,CAACS,OAAO,CAAA,EAAA,EAAA,EAAA,sBAAA,CAAA,EAAA,CAAA,CACvB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AAA;AAGxC,SAASkE,gBAAgBA,CAACvC,MAAM,EAAEoC,GAAG,EACrC;AACE,EAAA,MAAMkD,KAAK,GAAGtF,MAAM,EAAEK,gBAAgB,GAAG+B,GAAG,CAAC,IAAIpC,MAAM,EAAEM,aAAa,IAAIN,MAAM,EAAEL,QAAQ;AAC1F,EAAA,IAAI2F,KAAK,EAAE/E,MAAM,IAAI,CAAC,IAAI+E,KAAK,KAAKlD,GAAG,EAAEvD,IAAI,CAAC2B,IAAI,CAAC4B,GAAG,EAAEkD,KAAK,CAAC;AAC9D,EAAA,OAAOlD,GAAG;AACZ;AAEA,SAASkB,YAAYA,CAACgC,KAAK,EAAElD,GAAG,EAChC;EACE,OAAOA,GAAG,GAAGvD,IAAI,CAAC2B,IAAI,CAAC4B,GAAG,EAAEkD,KAAK,CAAC,GAAGA,KAAK;AAC5C;;;;"}
@@ -5,23 +5,23 @@ import { edit, type } from '#schema';
5
5
  import './EveChildInstancedMeshArea.js';
6
6
  import './EveChildInstancedMeshInstance.js';
7
7
 
8
- let _initClass, _init_geometryPath, _init_extra_geometryPath, _init_castsShadow, _init_extra_castsShadow, _init_reflectionMode, _init_extra_reflectionMode, _init_meshIndex, _init_extra_meshIndex, _init_areas, _init_extra_areas, _init_instances, _init_extra_instances, _init_partTags, _init_extra_partTags, _init_sofHullName, _init_extra_sofHullName, _init_sofLocatorSetName, _init_extra_sofLocatorSetName, _init_display, _init_extra_display, _init_inheritOverlayEffects, _init_extra_inheritOverlayEffects, _init_ownOverlayEffects, _init_extra_ownOverlayEffects;
8
+ let _initClass, _init_geometryPath, _init_extra_geometryPath, _init_castsShadow, _init_extra_castsShadow, _init_reflectionMode, _init_extra_reflectionMode, _init_meshIndex, _init_extra_meshIndex, _init_areas, _init_extra_areas, _init_instances, _init_extra_instances, _init_partTags, _init_extra_partTags, _init_sofHullName, _init_extra_sofHullName, _init_sofLocatorSetName, _init_extra_sofLocatorSetName, _init_ownedLocatorSets, _init_extra_ownedLocatorSets, _init_armorDamageShader, _init_extra_armorDamageShader, _init_display, _init_extra_display, _init_inheritOverlayEffects, _init_extra_inheritOverlayEffects, _init_ownOverlayEffects, _init_extra_ownOverlayEffects;
9
9
 
10
- /**
11
- * One geometry-and-areas record inside an EveChildInstancedMeshes child, holding
12
- * its instance placements, per-instance world cull spheres, instance flags and
13
- * manager registration handles.
10
+ /**
11
+ * One geometry-and-areas record inside an EveChildInstancedMeshes child, holding
12
+ * its instance placements, per-instance world cull spheres, instance flags and
13
+ * manager registration handles.
14
14
  */
15
15
  let _EveChildInstancedMes;
16
16
  class EveChildInstancedMesh extends CjsModel {
17
17
  static {
18
18
  ({
19
- e: [_init_geometryPath, _init_extra_geometryPath, _init_castsShadow, _init_extra_castsShadow, _init_reflectionMode, _init_extra_reflectionMode, _init_meshIndex, _init_extra_meshIndex, _init_areas, _init_extra_areas, _init_instances, _init_extra_instances, _init_partTags, _init_extra_partTags, _init_sofHullName, _init_extra_sofHullName, _init_sofLocatorSetName, _init_extra_sofLocatorSetName, _init_display, _init_extra_display, _init_inheritOverlayEffects, _init_extra_inheritOverlayEffects, _init_ownOverlayEffects, _init_extra_ownOverlayEffects],
19
+ e: [_init_geometryPath, _init_extra_geometryPath, _init_castsShadow, _init_extra_castsShadow, _init_reflectionMode, _init_extra_reflectionMode, _init_meshIndex, _init_extra_meshIndex, _init_areas, _init_extra_areas, _init_instances, _init_extra_instances, _init_partTags, _init_extra_partTags, _init_sofHullName, _init_extra_sofHullName, _init_sofLocatorSetName, _init_extra_sofLocatorSetName, _init_ownedLocatorSets, _init_extra_ownedLocatorSets, _init_armorDamageShader, _init_extra_armorDamageShader, _init_display, _init_extra_display, _init_inheritOverlayEffects, _init_extra_inheritOverlayEffects, _init_ownOverlayEffects, _init_extra_ownOverlayEffects],
20
20
  c: [_EveChildInstancedMes, _initClass]
21
21
  } = _applyDecs2311(this, [type.define({
22
22
  className: "EveChildInstancedMesh",
23
23
  family: "eve/child"
24
- })], [[[edit, edit.persist, type, type.string], 16, "geometryPath"], [[edit, edit.persist, type, type.boolean], 16, "castsShadow"], [[edit, edit.persist, type, type.int32], 16, "reflectionMode"], [[edit, edit.persist, type, type.uint32], 16, "meshIndex"], [[edit, edit.persist, void 0, type.list("EveChildInstancedMeshArea")], 16, "areas"], [[edit, edit.persist, void 0, type.list("EveChildInstancedMeshInstance")], 16, "instances"], [[edit, edit.persist, void 0, type.array("uint32")], 16, "partTags"], [[edit, edit.persist, type, type.string], 16, "sofHullName"], [[edit, edit.persist, type, type.string], 16, "sofLocatorSetName"], [[edit, edit.persist, type, type.boolean], 16, "display"], [[edit, edit.persist, type, type.boolean], 16, "inheritOverlayEffects"], [[edit, edit.persist, void 0, type.list("EveMeshOverlayEffect")], 16, "ownOverlayEffects"]], 0, void 0, CjsModel));
24
+ })], [[[edit, edit.persist, type, type.string], 16, "geometryPath"], [[edit, edit.persist, type, type.boolean], 16, "castsShadow"], [[edit, edit.persist, type, type.int32], 16, "reflectionMode"], [[edit, edit.persist, type, type.uint32], 16, "meshIndex"], [[edit, edit.persist, void 0, type.list("EveChildInstancedMeshArea")], 16, "areas"], [[edit, edit.persist, void 0, type.list("EveChildInstancedMeshInstance")], 16, "instances"], [[edit, edit.persist, void 0, type.array("uint32")], 16, "partTags"], [[edit, edit.persist, type, type.string], 16, "sofHullName"], [[edit, edit.persist, type, type.string], 16, "sofLocatorSetName"], [[edit, edit.persist, void 0, type.list("EveLocatorSets")], 16, "ownedLocatorSets"], [[edit, edit.persist, void 0, type.objectRef("Tr2Effect")], 16, "armorDamageShader"], [[edit, edit.persist, type, type.boolean], 16, "display"], [[edit, edit.persist, type, type.boolean], 16, "inheritOverlayEffects"], [[edit, edit.persist, void 0, type.list("EveMeshOverlayEffect")], 16, "ownOverlayEffects"]], 0, void 0, CjsModel));
25
25
  }
26
26
  geometryPath = _init_geometryPath(this, "");
27
27
  castsShadow = (_init_extra_geometryPath(this), _init_castsShadow(this, false));
@@ -34,46 +34,52 @@ class EveChildInstancedMesh extends CjsModel {
34
34
  partTags = (_init_extra_instances(this), _init_partTags(this, []));
35
35
  sofHullName = (_init_extra_partTags(this), _init_sofHullName(this, ""));
36
36
  sofLocatorSetName = (_init_extra_sofHullName(this), _init_sofLocatorSetName(this, ""));
37
- display = (_init_extra_sofLocatorSetName(this), _init_display(this, true));
37
+
38
+ // Carbon Mesh::ownedLocatorSets and Mesh::armorDamageShader
39
+ // (EveChildInstancedMeshes.h:163-164), set by SOF BuildChild through AddMesh;
40
+ // CarbonEngineJS delivers built objects as documents, so both persist.
41
+ ownedLocatorSets = (_init_extra_sofLocatorSetName(this), _init_ownedLocatorSets(this, []));
42
+ armorDamageShader = (_init_extra_ownedLocatorSets(this), _init_armorDamageShader(this, null));
43
+ display = (_init_extra_armorDamageShader(this), _init_display(this, true));
38
44
  inheritOverlayEffects = (_init_extra_display(this), _init_inheritOverlayEffects(this, true));
39
45
  ownOverlayEffects = (_init_extra_inheritOverlayEffects(this), _init_ownOverlayEffects(this, []));
40
46
  overlayAreaBlocks = (_init_extra_ownOverlayEffects(this), [[], []]);
41
47
  overlayAreaBlocksBuilt = false;
42
48
  overlayPods = null;
43
49
 
44
- /** Carbon Mesh::sphereHandle (h:110) - manager registration handle;
50
+ /** Carbon Mesh::sphereHandle (h:110) - manager registration handle;
45
51
  * runtime state, not persisted. */
46
52
  sphereHandle = null;
47
53
 
48
- /** Carbon Mesh::worldBoundingSphere - stamped by UpdateAsyncronous
54
+ /** Carbon Mesh::worldBoundingSphere - stamped by UpdateAsyncronous
49
55
  * (cpp:270); the TriFrustum sphere-duck shape. */
50
56
  worldBoundingSphere = {
51
57
  center: vec3.create(),
52
58
  radius: 0
53
59
  };
54
60
 
55
- /** Carbon Mesh::instanceSpheres - per-instance world cull spheres, stamped
61
+ /** Carbon Mesh::instanceSpheres - per-instance world cull spheres, stamped
56
62
  * by UpdateAsyncronous (cpp:259-269). */
57
63
  instanceSpheres = [];
58
64
 
59
- /** Carbon Mesh::flags (InstanceFlags uint32) - batch-type bits stamped at
60
- * AddMesh (cpp:422-425), CASTS_SHADOW at AddMesh (cpp:418-421),
65
+ /** Carbon Mesh::flags (InstanceFlags uint32) - batch-type bits stamped at
66
+ * AddMesh (cpp:578-581), CASTS_SHADOW at AddMesh (cpp:574-577),
61
67
  * RENDER_IN_REFLECTION refreshed each async pass (cpp:251). */
62
68
  flags = 0;
63
69
  #geometry = null;
64
70
 
65
- /**
66
- * Returns the geometry resource backing this mesh, or null while none has been
67
- * assigned; the mesh does not register with the manager until it is present
68
- * and good.
71
+ /**
72
+ * Returns the geometry resource backing this mesh, or null while none has been
73
+ * assigned; the mesh does not register with the manager until it is present
74
+ * and good.
69
75
  */
70
76
  GetGeometryResource() {
71
77
  return this.#geometry;
72
78
  }
73
79
 
74
- /**
75
- * Assigns the geometry resource this mesh renders from; a nullish value clears
76
- * it. Runtime state, deliberately not persisted.
80
+ /**
81
+ * Assigns the geometry resource this mesh renders from; a nullish value clears
82
+ * it. Runtime state, deliberately not persisted.
77
83
  */
78
84
  SetGeometryResource(resource) {
79
85
  this.#geometry = resource ?? null;