@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.
- package/dist/global/blue/BlueClasses.js +200 -0
- package/dist/global/blue/BlueClasses.js.map +1 -0
- package/dist/global/blue/IBlueClasses.js +79 -0
- package/dist/global/blue/IBlueClasses.js.map +1 -0
- package/dist/global/blue/IBlueDynamicResourceConstructor.js +16 -0
- package/dist/global/blue/IBlueDynamicResourceConstructor.js.map +1 -1
- package/dist/global/blue/blue.js +8 -2
- package/dist/global/blue/blue.js.map +1 -1
- package/dist/global/blue/index.js +2 -0
- package/dist/global/blue/index.js.map +1 -1
- package/dist/global/consts/index.js +0 -1
- package/dist/global/consts/index.js.map +1 -1
- package/dist/global/consts/renderContext/formats.js +26 -25
- package/dist/global/consts/renderContext/formats.js.map +1 -1
- package/dist/{trinityal/Tr2BitmapDimensions.js → global/imageio/BitmapDimensions.js} +19 -15
- package/dist/global/imageio/BitmapDimensions.js.map +1 -0
- package/dist/global/imageio/Cutout.js +28 -0
- package/dist/global/imageio/Cutout.js.map +1 -0
- package/dist/global/imageio/HostBitmap.js +1106 -0
- package/dist/global/imageio/HostBitmap.js.map +1 -0
- package/dist/global/imageio/ImageIOResult.js +99 -0
- package/dist/global/imageio/ImageIOResult.js.map +1 -0
- package/dist/global/imageio/ImageUtility.js +205 -0
- package/dist/global/imageio/ImageUtility.js.map +1 -0
- package/dist/global/imageio/LoadParameters.js +86 -0
- package/dist/global/imageio/LoadParameters.js.map +1 -0
- package/dist/global/imageio/Metadata.js +22 -0
- package/dist/global/imageio/Metadata.js.map +1 -0
- package/dist/global/imageio/index.js +8 -0
- package/dist/global/{consts/webgpu → imageio}/index.js.map +1 -1
- package/dist/global/index.js +2 -1
- package/dist/global/index.js.map +1 -1
- package/dist/global/math/color.js +1 -1
- package/dist/global/math/color.js.map +1 -1
- package/dist/global/schema/CjsSchema.js +8 -0
- package/dist/global/schema/CjsSchema.js.map +1 -1
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/resource/CjsResMan.js +47 -7
- package/dist/resource/CjsResMan.js.map +1 -1
- package/dist/resource/Tr2LightProfileRes.js +37 -0
- package/dist/resource/Tr2LightProfileRes.js.map +1 -1
- package/dist/resource/format/CjsByteWriter.js +46 -46
- package/dist/resource/format/CjsByteWriter.js.map +1 -1
- package/dist/resource/format/CjsFormat.js +7 -8
- package/dist/resource/format/CjsFormat.js.map +1 -1
- package/dist/resource/format/CjsFormatStore.js +8 -8
- package/dist/resource/format/CjsFormatStore.js.map +1 -1
- package/dist/resource/format/CjsGeometryFormat.js +114 -0
- package/dist/resource/format/CjsGeometryFormat.js.map +1 -0
- package/dist/resource/format/CjsImageFormat.js +282 -0
- package/dist/resource/format/CjsImageFormat.js.map +1 -0
- package/dist/resource/format/CjsResourceProbe.js +12 -48
- package/dist/resource/format/CjsResourceProbe.js.map +1 -1
- package/dist/resource/format/CjsStringTable.js +37 -37
- package/dist/resource/format/CjsStringTable.js.map +1 -1
- package/dist/resource/format/carbonEffect/CjsCarbonEffectReader.js +10 -10
- package/dist/resource/format/carbonEffect/CjsCarbonEffectReader.js.map +1 -1
- package/dist/resource/format/carbonEffect/CjsCarbonEffectWriter.js +37 -37
- package/dist/resource/format/carbonEffect/CjsCarbonEffectWriter.js.map +1 -1
- package/dist/resource/format/carbonEffect/carbonEffectBackendBlock.js +35 -7
- package/dist/resource/format/carbonEffect/carbonEffectBackendBlock.js.map +1 -1
- package/dist/resource/format/index.js +3 -1
- package/dist/resource/format/index.js.map +1 -1
- package/dist/resource/formats/black/CjsBlackFormat.js +130 -137
- package/dist/resource/formats/black/CjsBlackFormat.js.map +1 -1
- package/dist/resource/formats/bnk/CjsBnkFormat.js +12 -19
- package/dist/resource/formats/bnk/CjsBnkFormat.js.map +1 -1
- package/dist/resource/formats/bnk/core/helpers.js +1 -3
- package/dist/resource/formats/bnk/core/helpers.js.map +1 -1
- package/dist/resource/formats/cmf/CjsCmfFormat.js +19 -82
- package/dist/resource/formats/cmf/CjsCmfFormat.js.map +1 -1
- package/dist/resource/formats/cmf/core/constants.js +1 -2
- package/dist/resource/formats/cmf/core/constants.js.map +1 -1
- package/dist/resource/formats/{stl/core/targets.js → cmf/core/flatShared.js} +9 -8
- package/dist/resource/formats/cmf/core/flatShared.js.map +1 -0
- package/dist/resource/formats/cmf/core/helpers.js +13 -13
- package/dist/resource/formats/cmf/core/helpers.js.map +1 -1
- package/dist/resource/formats/cmf/core/writer.js +24 -24
- package/dist/resource/formats/cmf/core/writer.js.map +1 -1
- package/dist/resource/formats/dds/CjsDdsFormat.js +134 -17
- package/dist/resource/formats/dds/CjsDdsFormat.js.map +1 -1
- package/dist/resource/formats/dds/core/helpers.js +125 -40
- package/dist/resource/formats/dds/core/helpers.js.map +1 -1
- package/dist/resource/formats/dxbc/CjsDxbcFormat.js +14 -16
- package/dist/resource/formats/dxbc/CjsDxbcFormat.js.map +1 -1
- package/dist/resource/formats/dxbc/core/{container.js → DxbcContainer.js} +2 -2
- package/dist/resource/formats/dxbc/core/DxbcContainer.js.map +1 -0
- package/dist/resource/formats/dxbc/core/{errors.js → DxbcReadError.js} +1 -1
- package/dist/resource/formats/dxbc/core/DxbcReadError.js.map +1 -0
- package/dist/resource/formats/dxbc/core/DxbcReader.js +1 -1
- package/dist/resource/formats/dxbc/core/DxbcReader.js.map +1 -1
- package/dist/resource/formats/dxbc/core/{program.js → DxbcShaderProgram.js} +2 -2
- package/dist/resource/formats/dxbc/core/DxbcShaderProgram.js.map +1 -0
- package/dist/resource/formats/dxbc/core/{signature.js → DxbcSignatureChunk.js} +2 -2
- package/dist/resource/formats/dxbc/core/DxbcSignatureChunk.js.map +1 -0
- package/dist/resource/formats/dxbc/core/decoder.js +2 -2
- package/dist/resource/formats/dxbc/core/decoder.js.map +1 -1
- package/dist/resource/formats/dxbc/core/helpers.js +3 -3
- package/dist/resource/formats/dxbc/core/helpers.js.map +1 -1
- package/dist/resource/formats/fbx/CjsFbxFormat.js +18 -20
- package/dist/resource/formats/fbx/CjsFbxFormat.js.map +1 -1
- package/dist/resource/formats/flac/CjsFlacFormat.js +7 -13
- package/dist/resource/formats/flac/CjsFlacFormat.js.map +1 -1
- package/dist/resource/formats/fsd/32/CjsFsd32Format.js +29 -29
- package/dist/resource/formats/fsd/32/CjsFsd32Format.js.map +1 -1
- package/dist/resource/formats/fsd/64/CjsFsd64Format.js +3 -3
- package/dist/resource/formats/fsd/64/CjsFsd64Format.js.map +1 -1
- package/dist/resource/formats/fsd/64/core/CjsFsd64Binary.js +23 -23
- package/dist/resource/formats/fsd/64/core/CjsFsd64Binary.js.map +1 -1
- package/dist/resource/formats/fsd/64/core/CjsFsd64Reader.js +8 -8
- package/dist/resource/formats/fsd/64/core/CjsFsd64Reader.js.map +1 -1
- package/dist/resource/formats/fsd/CjsFsdFormat.js +23 -23
- package/dist/resource/formats/fsd/CjsFsdFormat.js.map +1 -1
- package/dist/resource/formats/gif/CjsGifFormat.js +24 -15
- package/dist/resource/formats/gif/CjsGifFormat.js.map +1 -1
- package/dist/resource/formats/gltf/CjsGltfFormat.js +33 -98
- package/dist/resource/formats/gltf/CjsGltfFormat.js.map +1 -1
- package/dist/resource/formats/gltf/core/helpers.js +3 -12
- package/dist/resource/formats/gltf/core/helpers.js.map +1 -1
- package/dist/resource/formats/gr2/CjsGr2Format.js +27 -91
- package/dist/resource/formats/gr2/CjsGr2Format.js.map +1 -1
- package/dist/resource/formats/hlsl/CjsHlslFormat.js +22 -25
- package/dist/resource/formats/hlsl/CjsHlslFormat.js.map +1 -1
- package/dist/resource/formats/hlsl/core/carbonDescriptionToRuntime.js +1 -1
- package/dist/resource/formats/hlsl/core/carbonDescriptionToRuntime.js.map +1 -1
- package/dist/resource/formats/hlsl/core/tr2/shader/HlslEffectStageInput.js +3 -3
- package/dist/resource/formats/hlsl/core/tr2/shader/HlslEffectStageInput.js.map +1 -1
- package/dist/resource/formats/ies/CjsIESFormat.js +29 -29
- package/dist/resource/formats/ies/CjsIESFormat.js.map +1 -1
- package/dist/resource/formats/jpeg/CjsJpegFormat.js +24 -15
- package/dist/resource/formats/jpeg/CjsJpegFormat.js.map +1 -1
- package/dist/resource/formats/jpeg/core/helpers.js +3 -5
- package/dist/resource/formats/jpeg/core/helpers.js.map +1 -1
- package/dist/resource/formats/jpeg/core/jpeg.js +58 -58
- package/dist/resource/formats/jpeg/core/jpeg.js.map +1 -1
- package/dist/resource/formats/jsonl/CjsJsonlFormat.js +3 -3
- package/dist/resource/formats/jsonl/CjsJsonlFormat.js.map +1 -1
- package/dist/resource/formats/mp3/CjsMp3Format.js +7 -14
- package/dist/resource/formats/mp3/CjsMp3Format.js.map +1 -1
- package/dist/resource/formats/mp3/core/helpers.js +3 -5
- package/dist/resource/formats/mp3/core/helpers.js.map +1 -1
- package/dist/resource/formats/mp4/CjsMp4Format.js +7 -13
- package/dist/resource/formats/mp4/CjsMp4Format.js.map +1 -1
- package/dist/resource/formats/mp4/core/helpers.js +3 -5
- package/dist/resource/formats/mp4/core/helpers.js.map +1 -1
- package/dist/resource/formats/obj/CjsObjFormat.js +92 -157
- package/dist/resource/formats/obj/CjsObjFormat.js.map +1 -1
- package/dist/resource/formats/obj/core/helpers.js +5 -113
- package/dist/resource/formats/obj/core/helpers.js.map +1 -1
- package/dist/resource/formats/ogg/CjsOggFormat.js +7 -14
- package/dist/resource/formats/ogg/CjsOggFormat.js.map +1 -1
- package/dist/resource/formats/pickle/CjsPickleFormat.js +7 -12
- package/dist/resource/formats/pickle/CjsPickleFormat.js.map +1 -1
- package/dist/resource/formats/pickle/core/CjsPickleProtocol0Reader.js +7 -7
- package/dist/resource/formats/pickle/core/CjsPickleProtocol0Reader.js.map +1 -1
- package/dist/resource/formats/pickle/core/CjsPickleProtocol4Reader.js +7 -7
- package/dist/resource/formats/pickle/core/CjsPickleProtocol4Reader.js.map +1 -1
- package/dist/resource/formats/png/CjsPngFormat.js +40 -15
- package/dist/resource/formats/png/CjsPngFormat.js.map +1 -1
- package/dist/resource/formats/png/core/helpers.js +4 -6
- package/dist/resource/formats/png/core/helpers.js.map +1 -1
- package/dist/resource/formats/red/CjsRedFormat.js +22 -28
- package/dist/resource/formats/red/CjsRedFormat.js.map +1 -1
- package/dist/resource/formats/schemabound/CjsSchemaBoundFormat.js +3 -7
- package/dist/resource/formats/schemabound/CjsSchemaBoundFormat.js.map +1 -1
- package/dist/resource/formats/schemabound/core/schemaBoundValues.js +5 -0
- package/dist/resource/formats/schemabound/core/schemaBoundValues.js.map +1 -1
- package/dist/resource/formats/sqlite/CjsSqliteFormat.js +4 -9
- package/dist/resource/formats/sqlite/CjsSqliteFormat.js.map +1 -1
- package/dist/resource/formats/static/CjsStaticFormat.js +4 -4
- package/dist/resource/formats/static/CjsStaticFormat.js.map +1 -1
- package/dist/resource/formats/stl/CjsStlFormat.js +39 -104
- package/dist/resource/formats/stl/CjsStlFormat.js.map +1 -1
- package/dist/resource/formats/stl/core/helpers.js +5 -19
- package/dist/resource/formats/stl/core/helpers.js.map +1 -1
- package/dist/resource/formats/tga/CjsTgaFormat.js +26 -15
- package/dist/resource/formats/tga/CjsTgaFormat.js.map +1 -1
- package/dist/resource/formats/tga/core/helpers.js +3 -5
- package/dist/resource/formats/tga/core/helpers.js.map +1 -1
- package/dist/resource/formats/vta/CjsVtaFormat.js +8 -15
- package/dist/resource/formats/vta/CjsVtaFormat.js.map +1 -1
- package/dist/resource/formats/wav/CjsWavFormat.js +7 -14
- package/dist/resource/formats/wav/CjsWavFormat.js.map +1 -1
- package/dist/resource/formats/wav/core/helpers.js +3 -5
- package/dist/resource/formats/wav/core/helpers.js.map +1 -1
- package/dist/resource/formats/webgl/CjsWebglFormat.js +103 -105
- package/dist/resource/formats/webgl/CjsWebglFormat.js.map +1 -1
- package/dist/resource/formats/webgl/core/{errors.js → WebglReadError.js} +1 -1
- package/dist/resource/formats/webgl/core/WebglReadError.js.map +1 -0
- package/dist/resource/formats/webgl/core/effectPackage.js +1 -1
- package/dist/resource/formats/webgl/core/effectPackage.js.map +1 -1
- package/dist/resource/formats/webgl/core/glsl/DxbcGlslEmitter.js +3 -3
- package/dist/resource/formats/webgl/core/glsl/DxbcGlslEmitter.js.map +1 -1
- package/dist/resource/formats/webgl/core/glsl/{DxbcGlslHelpers.js → DxbcGlslHelperRegistry.js} +2 -2
- package/dist/resource/formats/webgl/core/glsl/DxbcGlslHelperRegistry.js.map +1 -0
- package/dist/resource/formats/webgl/core/glsl/DxbcGlslOperandFormatter.js +1 -1
- package/dist/resource/formats/webgl/core/glsl/DxbcGlslOperandFormatter.js.map +1 -1
- package/dist/resource/formats/webgl/core/glslBackendBlock.js +1 -1
- package/dist/resource/formats/webgl/core/glslBackendBlock.js.map +1 -1
- package/dist/resource/formats/webgl/core/helpers.js.map +1 -1
- package/dist/resource/formats/webgpu/CjsWebgpuFormat.js +28 -29
- package/dist/resource/formats/webgpu/CjsWebgpuFormat.js.map +1 -1
- package/dist/resource/formats/webgpu/core/{errors.js → WebgpuReadError.js} +1 -1
- package/dist/resource/formats/webgpu/core/WebgpuReadError.js.map +1 -0
- package/dist/resource/formats/webgpu/core/carbonWebgpu/validateContainer.js +1 -1
- package/dist/resource/formats/webgpu/core/carbonWebgpu/validateContainer.js.map +1 -1
- package/dist/resource/formats/webgpu/core/helpers.js +1 -1
- package/dist/resource/formats/webgpu/core/helpers.js.map +1 -1
- package/dist/resource/formats/webgpu/core/ir/lowerDxbcToIr.js +1 -1
- package/dist/resource/formats/webgpu/core/ir/lowerDxbcToIr.js.map +1 -1
- package/dist/resource/formats/webgpu/core/wgsl/buildWgslSet.js +18 -6
- package/dist/resource/formats/webgpu/core/wgsl/buildWgslSet.js.map +1 -1
- package/dist/resource/formats/webgpu/core/wgsl/lowerBindingLayout.js +39 -13
- package/dist/resource/formats/webgpu/core/wgsl/lowerBindingLayout.js.map +1 -1
- package/dist/resource/formats/webgpu/core/wgsl/lowerCreateHistogramsComputeProgram.js +16 -14
- package/dist/resource/formats/webgpu/core/wgsl/lowerCreateHistogramsComputeProgram.js.map +1 -1
- package/dist/resource/formats/webm/CjsWebmFormat.js +8 -13
- package/dist/resource/formats/webm/CjsWebmFormat.js.map +1 -1
- package/dist/resource/formats/webm/core/helpers.js +3 -5
- package/dist/resource/formats/webm/core/helpers.js.map +1 -1
- package/dist/resource/formats/webp/CjsWebpFormat.js +8 -12
- package/dist/resource/formats/webp/CjsWebpFormat.js.map +1 -1
- package/dist/resource/formats/wem/CjsWemFormat.js +9 -17
- package/dist/resource/formats/wem/CjsWemFormat.js.map +1 -1
- package/dist/resource/formats/wem/core/bitStream.js +35 -35
- package/dist/resource/formats/wem/core/bitStream.js.map +1 -1
- package/dist/resource/formats/wem/core/helpers.js +1 -3
- package/dist/resource/formats/wem/core/helpers.js.map +1 -1
- package/dist/resource/formats/yaml/CjsYamlFormat.js +28 -37
- package/dist/resource/formats/yaml/CjsYamlFormat.js.map +1 -1
- package/dist/resource/imageio/ImageIO.js +142 -0
- package/dist/resource/imageio/ImageIO.js.map +1 -0
- package/dist/resource/imageio/index.js +17 -0
- package/dist/resource/imageio/index.js.map +1 -0
- package/dist/resource/index.js +7 -0
- package/dist/resource/index.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectResource.js +24 -2
- package/dist/resource/shader/reflection/Tr2EffectResource.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2Pass.js +76 -5
- package/dist/resource/shader/reflection/Tr2Pass.js.map +1 -1
- package/dist/resource/texture/CjsTextureArrayConstructor.js +97 -0
- package/dist/resource/texture/CjsTextureArrayConstructor.js.map +1 -0
- package/dist/resource/texture/CjsTexturePackConstructor.js +160 -0
- package/dist/resource/texture/CjsTexturePackConstructor.js.map +1 -0
- package/dist/resource/texture/CjsTexturePipelineStepArray.js +72 -0
- package/dist/resource/texture/CjsTexturePipelineStepArray.js.map +1 -0
- package/dist/resource/texture/CjsTexturePipelineStepConvert.js +73 -0
- package/dist/resource/texture/CjsTexturePipelineStepConvert.js.map +1 -0
- package/dist/resource/texture/CjsTexturePipelineStepPack.js +71 -0
- package/dist/resource/texture/CjsTexturePipelineStepPack.js.map +1 -0
- package/dist/resource/texture/CjsTexturePipelineStepResize.js +123 -0
- package/dist/resource/texture/CjsTexturePipelineStepResize.js.map +1 -0
- package/dist/resource/texture/SolidColorTextureConstructor.js +11 -1
- package/dist/resource/texture/SolidColorTextureConstructor.js.map +1 -1
- package/dist/resource/texture/Tr2ImageRes.js +100 -68
- package/dist/resource/texture/Tr2ImageRes.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipeline.js +45 -25
- package/dist/resource/texture/Tr2TexturePipeline.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepCompress.js +34 -1
- package/dist/resource/texture/Tr2TexturePipelineStepCompress.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepGenerateMips.js +30 -3
- package/dist/resource/texture/Tr2TexturePipelineStepGenerateMips.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepLimitSize.js +81 -1
- package/dist/resource/texture/Tr2TexturePipelineStepLimitSize.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepLoad.js +36 -1
- package/dist/resource/texture/Tr2TexturePipelineStepLoad.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepPack.js +146 -24
- package/dist/resource/texture/Tr2TexturePipelineStepPack.js.map +1 -1
- package/dist/resource/texture/TriTextureRes.js +151 -29
- package/dist/resource/texture/TriTextureRes.js.map +1 -1
- package/dist/resource/texture/index.js +7 -0
- package/dist/resource/texture/index.js.map +1 -1
- package/dist/resource/texture/registerTextureResources.js +83 -0
- package/dist/resource/texture/registerTextureResources.js.map +1 -0
- package/dist/resource/texture/solidColorTexture.js +10 -19
- package/dist/resource/texture/solidColorTexture.js.map +1 -1
- package/dist/sof/EveSOF.js +39 -7
- package/dist/sof/EveSOF.js.map +1 -1
- package/dist/trinity/core/Tr2GpuResourcePool/Tr2GpuResourcePool.js +2 -2
- package/dist/trinity/core/Tr2GpuResourcePool/Tr2GpuResourcePool.js.map +1 -1
- package/dist/trinity/core/Tr2ImageIOHelpers.js +80 -17
- package/dist/trinity/core/Tr2ImageIOHelpers.js.map +1 -1
- package/dist/trinity/core/Tr2RenderUtils.js +1 -1
- package/dist/trinity/core/Tr2TextureArray/Tr2TextureArray.js +49 -62
- package/dist/trinity/core/Tr2TextureArray/Tr2TextureArray.js.map +1 -1
- package/dist/trinity/core/Tr2TextureReference.js +114 -0
- package/dist/trinity/core/Tr2TextureReference.js.map +1 -0
- package/dist/trinity/core/device/Tr2DepthStencil.js +2 -2
- package/dist/trinity/core/device/Tr2DepthStencil.js.map +1 -1
- package/dist/trinity/core/device/Tr2RingBuffer/Tr2RingBuffer.js +1 -1
- package/dist/trinity/core/index.js +1 -0
- package/dist/trinity/core/index.js.map +1 -1
- package/dist/trinity/core/lighting/Tr2LightManager.js +5 -4
- package/dist/trinity/core/lighting/Tr2LightManager.js.map +1 -1
- package/dist/trinity/core/procedural/GradientTextureConstructor.js +5 -4
- package/dist/trinity/core/procedural/GradientTextureConstructor.js.map +1 -1
- package/dist/trinity/core/procedural/gradientTexture.js +10 -13
- package/dist/trinity/core/procedural/gradientTexture.js.map +1 -1
- package/dist/trinity/core/volumetrics/Tr2VolumetricsRenderer.js +1 -1
- package/dist/trinity/core/volumetrics/Tr2VolumetricsRenderer.js.map +1 -1
- package/dist/trinity/eve/EveImpactOverlay.js +102 -50
- package/dist/trinity/eve/EveImpactOverlay.js.map +1 -1
- package/dist/trinity/eve/EveModularObjectModifier.js +9 -18
- package/dist/trinity/eve/EveModularObjectModifier.js.map +1 -1
- package/dist/trinity/eve/attachment/turrets/EveTurretSet.js +175 -157
- package/dist/trinity/eve/attachment/turrets/EveTurretSet.js.map +1 -1
- package/dist/trinity/eve/attachment/turrets/EveTurretTarget.js +100 -83
- package/dist/trinity/eve/attachment/turrets/EveTurretTarget.js.map +1 -1
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMesh.js +26 -20
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMesh.js.map +1 -1
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshes.js +368 -179
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshes.js.map +1 -1
- package/dist/trinity/eve/child/EveChildMesh.js +242 -234
- package/dist/trinity/eve/child/EveChildMesh.js.map +1 -1
- package/dist/trinity/eve/child/EveChildTurret.js +57 -16
- package/dist/trinity/eve/child/EveChildTurret.js.map +1 -1
- package/dist/trinity/eve/child/EveSpaceObjectChild.js +28 -1
- package/dist/trinity/eve/child/EveSpaceObjectChild.js.map +1 -1
- package/dist/trinity/eve/index.js +2 -2
- package/dist/trinity/eve/overlays/EveDamageOverlay.js +5 -1
- package/dist/trinity/eve/overlays/EveDamageOverlay.js.map +1 -1
- package/dist/trinity/eve/scene/EveSpaceScene.js +234 -233
- package/dist/trinity/eve/scene/EveSpaceScene.js.map +1 -1
- package/dist/trinity/eve/scene/EveSpaceSceneRenderDriver.js +2 -0
- package/dist/trinity/eve/scene/EveSpaceSceneRenderDriver.js.map +1 -1
- package/dist/trinity/eve/spaceObject/EveSpaceObject2.js +492 -437
- package/dist/trinity/eve/spaceObject/EveSpaceObject2.js.map +1 -1
- package/dist/trinity/generated/index.js +0 -1
- package/dist/trinity/generated/index.js.map +1 -1
- package/dist/trinity/generated/trinityCore/index.js +0 -1
- package/dist/trinity/generated/trinityCore/index.js.map +1 -1
- package/dist/trinity/index.js +3 -3
- package/dist/trinity/particle/emitter/Tr2GpuSharedEmitter.js +10 -1
- package/dist/trinity/particle/emitter/Tr2GpuSharedEmitter.js.map +1 -1
- package/dist/trinity/shader/Tr2DataTextureManager.js +152 -66
- package/dist/trinity/shader/Tr2DataTextureManager.js.map +1 -1
- package/dist/trinity/shader/Tr2Material.js +1 -1
- package/dist/trinityal/Tr2HalHelperStructures/Tr2TextureSubresource.js +5 -5
- package/dist/trinityal/Tr2HalHelperStructures/Tr2TextureSubresource.js.map +1 -1
- package/dist/trinityal/index.js +1 -1
- package/dist/trinityal/stub/Tr2RenderContextALStub/Tr2RenderContextALStub.js +2 -2
- package/dist/trinityal/stub/Tr2RenderContextALStub/Tr2RenderContextALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2SwapChainALStub.js +45 -45
- package/dist/trinityal/stub/Tr2SwapChainALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2TextureALStub.js +170 -170
- package/dist/trinityal/stub/Tr2TextureALStub.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuDevice.js +234 -164
- package/dist/trinityal/webgpu/CjsWebgpuDevice.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuRenderContextAL.js +7 -0
- package/dist/trinityal/webgpu/CjsWebgpuRenderContextAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuTextureAL.js +78 -14
- package/dist/trinityal/webgpu/CjsWebgpuTextureAL.js.map +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuUtils.js +94 -0
- package/dist/trinityal/webgpu/core/CjsWebgpuUtils.js.map +1 -0
- package/dist/trinityal/webgpu/internal.js +1 -0
- package/dist/trinityal/webgpu/internal.js.map +1 -1
- package/docs/global/reference/classes/README.md +90 -0
- package/docs/resource/concepts/format-capabilities.md +3 -3
- package/docs/resource/formats/README.md +1 -1
- package/docs/resource/reference/classes/core.md +31 -1
- package/docs/resource/reference/classes/formats.md +7 -7
- package/docs/resource/reference/classes/resources.md +76 -16
- package/docs/trinity/reference/classes/generated.md +0 -10
- package/docs/trinity/reference/classes/trinity-core.md +1692 -1682
- package/docs/trinityal/reference/classes/README.md +0 -10
- package/docs/trinityal/webgpu/reference/classes/README.md +276 -266
- package/package.json +4 -3
- package/dist/global/consts/webgpu/index.js +0 -2
- package/dist/global/consts/webgpu/textureFormats.js +0 -180
- package/dist/global/consts/webgpu/textureFormats.js.map +0 -1
- package/dist/resource/formats/dxbc/core/container.js.map +0 -1
- package/dist/resource/formats/dxbc/core/errors.js.map +0 -1
- package/dist/resource/formats/dxbc/core/program.js.map +0 -1
- package/dist/resource/formats/dxbc/core/signature.js.map +0 -1
- package/dist/resource/formats/stl/core/targets.js.map +0 -1
- package/dist/resource/formats/webgl/core/errors.js.map +0 -1
- package/dist/resource/formats/webgl/core/glsl/DxbcGlslHelpers.js.map +0 -1
- package/dist/resource/formats/webgpu/core/errors.js.map +0 -1
- package/dist/resource/texture/texturePipelineBehavior.js +0 -332
- package/dist/resource/texture/texturePipelineBehavior.js.map +0 -1
- package/dist/trinity/generated/trinityCore/Tr2TextureReference.js +0 -40
- package/dist/trinity/generated/trinityCore/Tr2TextureReference.js.map +0 -1
- package/dist/trinityal/Tr2BitmapDimensions.js.map +0 -1
|
@@ -49,10 +49,10 @@ const NO_BONE_TRANSFORMS = Object.freeze({
|
|
|
49
49
|
boneCount: 0
|
|
50
50
|
});
|
|
51
51
|
|
|
52
|
-
/**
|
|
53
|
-
* Space-object child that draws one mesh under its own transform, owning its
|
|
54
|
-
* decals, lights, attachments, morph weights, world bounds and screen-size LOD
|
|
55
|
-
* state.
|
|
52
|
+
/**
|
|
53
|
+
* Space-object child that draws one mesh under its own transform, owning its
|
|
54
|
+
* decals, lights, attachments, morph weights, world bounds and screen-size LOD
|
|
55
|
+
* state.
|
|
56
56
|
*/
|
|
57
57
|
let _EveChildMesh;
|
|
58
58
|
new class extends _identity {
|
|
@@ -64,7 +64,7 @@ new class extends _identity {
|
|
|
64
64
|
} = _applyDecs2311(this, [type.define({
|
|
65
65
|
className: "EveChildMesh",
|
|
66
66
|
family: "eve/child"
|
|
67
|
-
}), carbon.inherit(ITr2Renderable), carbon.inherit(IListNotify)], [[[edit, edit.persist, void 0, type.list("EveLocatorSets")], 16, "ownedLocatorSets"], [[edit, edit.persist, void 0, type.objectRef("Tr2Effect")], 16, "armorDamageShader"], [[edit, edit.notify, edit, edit.persist, type, type.int32, void 0, type.enum("trinity.EntityComponents.ReflectionMode")], 16, "reflectionMode"], [[edit, edit.persist, void 0, type.list("IEveChildTransformModifier")], 16, "transformModifiers"], [[edit, edit.read, type, type.mat4], 16, "worldTransform"], [[edit, edit.notify, 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, "overlayEffects"], [[edit, edit.persist, void 0, type.objectRef("EveDamageOverlay")], 16, "damageOverlay"], [[edit, edit.notify, edit, edit.persist, type, type.boolean], 16, "castShadow"], [[edit, edit.notify, edit, edit.persist, void 0, type.objectRef("Tr2MeshBase")], 16, "mesh"], [[edit, edit.persist, type, type.string], 16, "name"], [[edit, edit.notify, edit, edit.persist, type, type.quat], 16, "rotation"], [[edit, edit.notify, edit, edit.persist, type, type.vec3], 16, "translation"], [[edit, edit.notify, edit, edit.persist, type, type.vec3], 16, "scaling"], [[edit, edit.notify, edit, edit.persist, type, type.mat4], 16, "localTransform"], [[edit, edit.persist, void 0, type.list("EveSpaceObjectDecal")], 16, "decals"], [[edit, edit.persist, type, type.boolean], 16, "staticTransform"], [[edit, edit.notify, edit, edit.persist, void 0, type.objectRef("Tr2GrannyAnimation")], 16, "animationUpdater"], [[edit, edit.persist, void 0, type.list("IEveSpaceObjectAttachment")], 16, "attachments"], [[edit, edit.persist, void 0, type.list("Tr2Light")], 16, "lights"], [[edit, edit.persist, type, type.int32, void 0, type.enum("trinity.Tr2Lod")], 16, "lowestLodVisible"], [[edit, edit.persist, type, type.float32], 16, "minScreenSize"], [[edit, edit.persist, type, type.float32], 16, "sortValueOffset"], [[edit, edit.persist, type, type.float32], 16, "sortValueScale"], [[edit, edit.read, type, type.float32], 16, "currentScreenSize"], [[edit, edit.read, type, type.float32], 16, "currentInstanceScreenSize"], [[edit, edit.persist, type, type.boolean], 16, "useSRT"], [[edit, edit.persist, type, type.boolean], 16, "updateAnimation"], [[edit, edit.persist, type, type.int32, void 0, type.enum("Origin")], 16, "origin"], [[edit, edit.persist, void 0, type.array("mat4")], 16, "instanceTransforms"], [[edit, edit.persist, type, type.string], 16, "sofDna"], [[edit, edit.persist, type, type.string], 16, "sofParentHullName"], [[edit, edit.persist, type, type.string], 16, "sofLocatorSetName"], [[edit, edit.persist, type, type.string], 16, "sofLocatorIndex"], [[carbon, carbon.method, impl, impl.adapted], 18, "Initialize"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("JS arrays use the shared list mutation entry points; component interface IDs use the existing EveComponentType map.")], 18, "OnListModified"], [[carbon, carbon.method, impl, impl.implemented], 18, "Setup"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetInstanceTransforms"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetInstanceTransforms"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetMesh"], [[carbon, carbon.method, impl, impl.implemented], 18, "AddOverlayEffect"], [[carbon, carbon.method, impl, impl.implemented], 18, "RemoveOverlayEffect"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetOverlayEffectByName"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetOrigin"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetScale"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetReflectionMode"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetCastShadow"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetMinScreenSize"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLocalToWorldTransform"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetName"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetName"], [[carbon, carbon.method, impl, impl.implemented], 18, "AddTransformModifier"], [[carbon, carbon.method, impl, impl.implemented], 18, "AddDecal"], [[carbon, carbon.method, impl, impl.implemented], 18, "AddAttachment"], [[carbon, carbon.method, impl, impl.implemented], 18, "ClearAttachments"], [[carbon, carbon.method, impl, impl.implemented], 18, "AddLight"], [[carbon, carbon.method, impl, impl.implemented], 18, "ClearLights"], [[carbon, carbon.method, impl, impl.implemented], 18, "IsAlwaysOn"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetShaderOption"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetMorphTargetNames"], [[carbon, carbon.method, impl, impl.adapted], 18, "SetMorphTargetWeight"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetMorphTargetWeight"], [[impl, impl.adapted], 18, "UpdateMorphAnimationBuffer"], [[impl, impl.adapted], 18, "GetMorphTargets"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetSofSourceLocator"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Audio-geometry registration is not ported yet and the animationUpdater branches await the JS animation seam; nothing else remains in Carbon's body.")], 18, "UpdateSyncronous"], [[carbon, carbon.method, void 0, carbon.contextual(["camera"]), impl, impl.adapted], 18, "UpdateAsyncronous"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Tr2AnimationMeshBinding remains unported; Carbon's identity rest-pose fallback is used when neither live palette source is available.")], 18, "GetBoneTransforms"], [[impl, impl.implemented], 18, "GetRestPoseBoneTransforms"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Bone-fed decal bounds still await the decal seam and the raytracing refresh is not ported yet; the LOD/screen-size math and the bone-fed attachment pass are ported.")], 18, "UpdateVisibility"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("The decal mesh cache is not ported yet (null placeholder); collection structure is ported.")], 18, "GetRenderables"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetBoundingSphere"], [[carbon, carbon.method, impl, impl.implemented], 18, "HasTransparentBatches"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Frustum and threshold arrive via the duck-typed update context instead of renderer state.")], 18, "IsVisible"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetBatches"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetBatchesFromOverlayVector"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetShadowBatches"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Carbon reads the Tr2Renderer view-position global; the relocated camera state arrives via the threaded render context.")], 18, "GetSortValue"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetShadowPerObjectData"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("GPU ring-buffer offsets have no CPU derivation and keep their defaults; every CPU-known field is filled.")], 18, "GetPerObjectData"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Overload dispatch by argument shape and a length-1 out array replace C++ overloading and the float& out-param; the shadow math is ported.")], 18, "IsCastingShadow"], [[carbon, carbon.method, impl, impl.implemented], 18, "ChangeLOD"], [[carbon, carbon.method, impl, impl.implemented], 18, "RegisterComponents"], [[carbon, carbon.method, impl, impl.implemented], 18, "UnRegisterComponents"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLights"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetID"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("JS identifies Carbon's changed member address by its exposed property name; the instanced-mesh cast is performed where that interface is used.")], 18, "OnModified"], [[carbon, carbon.method, impl, impl.implemented], 18, "InvalidateOwnerMergedLocators"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetOwner"], [[carbon, carbon.method, impl, impl.adapted], 18, "CollectOwnedLocatorSets"], [[carbon, carbon.method, impl, impl.implemented], 18, "CollectOwnedGeometry"], [[carbon, carbon.method, impl, impl.adapted], 18, "SetOwnedLocatorSets"], [[carbon, carbon.method, impl, impl.implemented], 18, "
|
|
67
|
+
}), carbon.inherit(ITr2Renderable), carbon.inherit(IListNotify)], [[[edit, edit.persist, void 0, type.list("EveLocatorSets")], 16, "ownedLocatorSets"], [[edit, edit.persist, void 0, type.objectRef("Tr2Effect")], 16, "armorDamageShader"], [[edit, edit.notify, edit, edit.persist, type, type.int32, void 0, type.enum("trinity.EntityComponents.ReflectionMode")], 16, "reflectionMode"], [[edit, edit.persist, void 0, type.list("IEveChildTransformModifier")], 16, "transformModifiers"], [[edit, edit.read, type, type.mat4], 16, "worldTransform"], [[edit, edit.notify, 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, "overlayEffects"], [[edit, edit.persist, void 0, type.objectRef("EveDamageOverlay")], 16, "damageOverlay"], [[edit, edit.notify, edit, edit.persist, type, type.boolean], 16, "castShadow"], [[edit, edit.notify, edit, edit.persist, void 0, type.objectRef("Tr2MeshBase")], 16, "mesh"], [[edit, edit.persist, type, type.string], 16, "name"], [[edit, edit.notify, edit, edit.persist, type, type.quat], 16, "rotation"], [[edit, edit.notify, edit, edit.persist, type, type.vec3], 16, "translation"], [[edit, edit.notify, edit, edit.persist, type, type.vec3], 16, "scaling"], [[edit, edit.notify, edit, edit.persist, type, type.mat4], 16, "localTransform"], [[edit, edit.persist, void 0, type.list("EveSpaceObjectDecal")], 16, "decals"], [[edit, edit.persist, type, type.boolean], 16, "staticTransform"], [[edit, edit.notify, edit, edit.persist, void 0, type.objectRef("Tr2GrannyAnimation")], 16, "animationUpdater"], [[edit, edit.persist, void 0, type.list("IEveSpaceObjectAttachment")], 16, "attachments"], [[edit, edit.persist, void 0, type.list("Tr2Light")], 16, "lights"], [[edit, edit.persist, type, type.int32, void 0, type.enum("trinity.Tr2Lod")], 16, "lowestLodVisible"], [[edit, edit.persist, type, type.float32], 16, "minScreenSize"], [[edit, edit.persist, type, type.float32], 16, "sortValueOffset"], [[edit, edit.persist, type, type.float32], 16, "sortValueScale"], [[edit, edit.read, type, type.float32], 16, "currentScreenSize"], [[edit, edit.read, type, type.float32], 16, "currentInstanceScreenSize"], [[edit, edit.persist, type, type.boolean], 16, "useSRT"], [[edit, edit.persist, type, type.boolean], 16, "updateAnimation"], [[edit, edit.persist, type, type.int32, void 0, type.enum("Origin")], 16, "origin"], [[edit, edit.persist, void 0, type.array("mat4")], 16, "instanceTransforms"], [[edit, edit.persist, type, type.string], 16, "sofDna"], [[edit, edit.persist, type, type.string], 16, "sofParentHullName"], [[edit, edit.persist, type, type.string], 16, "sofLocatorSetName"], [[edit, edit.persist, type, type.string], 16, "sofLocatorIndex"], [[carbon, carbon.method, impl, impl.adapted], 18, "Initialize"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("JS arrays use the shared list mutation entry points; component interface IDs use the existing EveComponentType map.")], 18, "OnListModified"], [[carbon, carbon.method, impl, impl.implemented], 18, "Setup"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetInstanceTransforms"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetInstanceTransforms"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetMesh"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetMesh"], [[carbon, carbon.method, impl, impl.implemented], 18, "AddOverlayEffect"], [[carbon, carbon.method, impl, impl.implemented], 18, "RemoveOverlayEffect"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetOverlayEffectByName"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetOrigin"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetScale"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetReflectionMode"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetCastShadow"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetMinScreenSize"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLocalToWorldTransform"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetName"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetName"], [[carbon, carbon.method, impl, impl.implemented], 18, "AddTransformModifier"], [[carbon, carbon.method, impl, impl.implemented], 18, "AddDecal"], [[carbon, carbon.method, impl, impl.implemented], 18, "AddAttachment"], [[carbon, carbon.method, impl, impl.implemented], 18, "ClearAttachments"], [[carbon, carbon.method, impl, impl.implemented], 18, "AddLight"], [[carbon, carbon.method, impl, impl.implemented], 18, "ClearLights"], [[carbon, carbon.method, impl, impl.implemented], 18, "IsAlwaysOn"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetShaderOption"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetMorphTargetNames"], [[carbon, carbon.method, impl, impl.adapted], 18, "SetMorphTargetWeight"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetMorphTargetWeight"], [[impl, impl.adapted], 18, "UpdateMorphAnimationBuffer"], [[impl, impl.adapted], 18, "GetMorphTargets"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetSofSourceLocator"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Audio-geometry registration is not ported yet and the animationUpdater branches await the JS animation seam; nothing else remains in Carbon's body.")], 18, "UpdateSyncronous"], [[carbon, carbon.method, void 0, carbon.contextual(["camera"]), impl, impl.adapted], 18, "UpdateAsyncronous"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Tr2AnimationMeshBinding remains unported; Carbon's identity rest-pose fallback is used when neither live palette source is available.")], 18, "GetBoneTransforms"], [[impl, impl.implemented], 18, "GetRestPoseBoneTransforms"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Bone-fed decal bounds still await the decal seam and the raytracing refresh is not ported yet; the LOD/screen-size math and the bone-fed attachment pass are ported.")], 18, "UpdateVisibility"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("The decal mesh cache is not ported yet (null placeholder); collection structure is ported.")], 18, "GetRenderables"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetBoundingSphere"], [[carbon, carbon.method, impl, impl.implemented], 18, "HasTransparentBatches"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Frustum and threshold arrive via the duck-typed update context instead of renderer state.")], 18, "IsVisible"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetBatches"], [[carbon, carbon.method, impl, impl.adapted], 18, "GetBatchesFromOverlayVector"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetShadowBatches"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Carbon reads the Tr2Renderer view-position global; the relocated camera state arrives via the threaded render context.")], 18, "GetSortValue"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetShadowPerObjectData"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("GPU ring-buffer offsets have no CPU derivation and keep their defaults; every CPU-known field is filled.")], 18, "GetPerObjectData"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Overload dispatch by argument shape and a length-1 out array replace C++ overloading and the float& out-param; the shadow math is ported.")], 18, "IsCastingShadow"], [[carbon, carbon.method, impl, impl.implemented], 18, "ChangeLOD"], [[carbon, carbon.method, impl, impl.implemented], 18, "RegisterComponents"], [[carbon, carbon.method, impl, impl.implemented], 18, "UnRegisterComponents"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetLights"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetID"], [[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("JS identifies Carbon's changed member address by its exposed property name; the instanced-mesh cast is performed where that interface is used.")], 18, "OnModified"], [[carbon, carbon.method, impl, impl.implemented], 18, "InvalidateOwnerMergedLocators"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetOwner"], [[carbon, carbon.method, impl, impl.adapted], 18, "CollectOwnedLocatorSets"], [[carbon, carbon.method, impl, impl.implemented], 18, "CollectOwnedGeometry"], [[carbon, carbon.method, impl, impl.adapted], 18, "SetOwnedLocatorSets"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetPartDamageOverlay"], [[carbon, carbon.method, impl, impl.implemented], 18, "CreatePartDamageOverlay"], [[carbon, carbon.method, impl, impl.implemented], 18, "SetArmorDamageShaderEffect"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetPartArmorDamageShaderEffect"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetOwnedDamageLocators"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetDamageLocatorBindPositionLocal"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetPartDamageLocatorAnimatedLocal"], [[carbon, carbon.method, impl, impl.implemented], 18, "GetPickingBatches"], [[carbon, carbon.method, impl, impl.implemented], 18, "InitializeAnimation"], [[carbon, carbon.method, impl, impl.notImplemented], 18, "BakeMorphs"], [[carbon, carbon.method, impl, impl.notImplemented], 18, "UnbakeMorphs"], [[carbon, carbon.method, impl, impl.notImplemented], 18, "IsMeshBaked"]], 0, void 0, _EveChildTransform));
|
|
68
68
|
}
|
|
69
69
|
constructor(...args) {
|
|
70
70
|
super(...args);
|
|
@@ -105,7 +105,7 @@ new class extends _identity {
|
|
|
105
105
|
#restPoseBoneTransforms = null;
|
|
106
106
|
#parentOverlayEffects = null;
|
|
107
107
|
|
|
108
|
-
/** m_parentData (IEveSpaceObject2::ParentData) - refreshed from the space
|
|
108
|
+
/** m_parentData (IEveSpaceObject2::ParentData) - refreshed from the space
|
|
109
109
|
* object parent in UpdateSyncronous and handed to the decals (cpp:1015, 450). */
|
|
110
110
|
#parentData = new IEveSpaceObject2ParentData();
|
|
111
111
|
#overlayAreaBlocks = [[], []];
|
|
@@ -116,13 +116,13 @@ new class extends _identity {
|
|
|
116
116
|
ownedLocatorSets = _init_ownedLocatorSets(this, []);
|
|
117
117
|
armorDamageShader = (_init_extra_ownedLocatorSets(this), _init_armorDamageShader(this, null));
|
|
118
118
|
|
|
119
|
-
/**
|
|
120
|
-
* Clears the private visibility state for a derived child whose own Carbon
|
|
121
|
-
* cull rejects it before EveChildMesh::UpdateVisibility runs.
|
|
122
|
-
*
|
|
123
|
-
* EveChildInstanceMeshRenderer owns exactly that two-stage cull. Keeping the
|
|
124
|
-
* mutation here preserves one state owner instead of shadowing the four
|
|
125
|
-
* private values in the subclass.
|
|
119
|
+
/**
|
|
120
|
+
* Clears the private visibility state for a derived child whose own Carbon
|
|
121
|
+
* cull rejects it before EveChildMesh::UpdateVisibility runs.
|
|
122
|
+
*
|
|
123
|
+
* EveChildInstanceMeshRenderer owns exactly that two-stage cull. Keeping the
|
|
124
|
+
* mutation here preserves one state owner instead of shadowing the four
|
|
125
|
+
* private values in the subclass.
|
|
126
126
|
*/
|
|
127
127
|
_ResetVisibilityState() {
|
|
128
128
|
this.#isVisible = false;
|
|
@@ -172,9 +172,9 @@ new class extends _identity {
|
|
|
172
172
|
sofLocatorSetName = (_init_extra_sofParentHullName(this), _init_sofLocatorSetName(this, ""));
|
|
173
173
|
sofLocatorIndex = (_init_extra_sofLocatorSetName(this), _init_sofLocatorIndex(this, ""));
|
|
174
174
|
|
|
175
|
-
/**
|
|
176
|
-
* Rebuilds the local transform up front when the child is marked
|
|
177
|
-
* staticTransform, since UpdateTransform will not rebuild it on later frames.
|
|
175
|
+
/**
|
|
176
|
+
* Rebuilds the local transform up front when the child is marked
|
|
177
|
+
* staticTransform, since UpdateTransform will not rebuild it on later frames.
|
|
178
178
|
*/
|
|
179
179
|
Initialize() {
|
|
180
180
|
if (this.staticTransform) {
|
|
@@ -229,10 +229,10 @@ new class extends _identity {
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
/**
|
|
233
|
-
* Applies the authored scale/rotation/translation and, when supplied, the
|
|
234
|
-
* lowest LOD level at which the child stays visible; returns the rebuilt local
|
|
235
|
-
* transform.
|
|
232
|
+
/**
|
|
233
|
+
* Applies the authored scale/rotation/translation and, when supplied, the
|
|
234
|
+
* lowest LOD level at which the child stays visible; returns the rebuilt local
|
|
235
|
+
* transform.
|
|
236
236
|
*/
|
|
237
237
|
Setup(scale = null, rotation = null, translation = null, lowestLodVisible = null) {
|
|
238
238
|
super.Setup(scale, rotation, translation, lowestLodVisible);
|
|
@@ -242,10 +242,10 @@ new class extends _identity {
|
|
|
242
242
|
return this.localTransform;
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
-
/**
|
|
246
|
-
* Replaces the instance placement list with clones of the supplied matrices, so later caller mutations do not reach the child.
|
|
247
|
-
* @param {Iterable<Float32Array>} instances - 16-value matrices; a wrongly sized entry throws TypeError
|
|
248
|
-
* @returns {Array<Float32Array>} the stored list
|
|
245
|
+
/**
|
|
246
|
+
* Replaces the instance placement list with clones of the supplied matrices, so later caller mutations do not reach the child.
|
|
247
|
+
* @param {Iterable<Float32Array>} instances - 16-value matrices; a wrongly sized entry throws TypeError
|
|
248
|
+
* @returns {Array<Float32Array>} the stored list
|
|
249
249
|
*/
|
|
250
250
|
SetInstanceTransforms(instances) {
|
|
251
251
|
const next = [];
|
|
@@ -259,18 +259,23 @@ new class extends _identity {
|
|
|
259
259
|
return this.instanceTransforms;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
/**
|
|
263
|
-
* Returns the live instance transform list, not a copy - mutating it changes
|
|
264
|
-
* what the child renders.
|
|
262
|
+
/**
|
|
263
|
+
* Returns the live instance transform list, not a copy - mutating it changes
|
|
264
|
+
* what the child renders.
|
|
265
265
|
*/
|
|
266
266
|
GetInstanceTransforms() {
|
|
267
267
|
return this.instanceTransforms;
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
/**
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
270
|
+
/** Returns the Tr2MeshBase this child draws, or null (Carbon EveChildMesh.cpp:968-971). */
|
|
271
|
+
GetMesh() {
|
|
272
|
+
return this.mesh;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Assigns the Tr2MeshBase this child draws; a nullish value clears it, which
|
|
277
|
+
* also makes the child permanently invisible (UpdateVisibility requires a
|
|
278
|
+
* mesh).
|
|
274
279
|
*/
|
|
275
280
|
SetMesh(mesh) {
|
|
276
281
|
this.mesh = mesh ?? null;
|
|
@@ -295,48 +300,48 @@ new class extends _identity {
|
|
|
295
300
|
return this.overlayEffects.find(effect => effect.name === String(name)) ?? null;
|
|
296
301
|
}
|
|
297
302
|
|
|
298
|
-
/**
|
|
299
|
-
* Records whether this child's placement was authored in space or by SOF (the
|
|
300
|
-
* Origin enum).
|
|
303
|
+
/**
|
|
304
|
+
* Records whether this child's placement was authored in space or by SOF (the
|
|
305
|
+
* Origin enum).
|
|
301
306
|
*/
|
|
302
307
|
SetOrigin(origin) {
|
|
303
308
|
this.origin = Number(origin) | 0;
|
|
304
309
|
}
|
|
305
310
|
|
|
306
|
-
/**
|
|
307
|
-
* Copies the given scale into the child's SRT scaling; it reaches the world
|
|
308
|
-
* transform on the next local-transform rebuild.
|
|
311
|
+
/**
|
|
312
|
+
* Copies the given scale into the child's SRT scaling; it reaches the world
|
|
313
|
+
* transform on the next local-transform rebuild.
|
|
309
314
|
*/
|
|
310
315
|
SetScale(scale) {
|
|
311
316
|
vec3.copy(this.scaling, scale);
|
|
312
317
|
}
|
|
313
318
|
|
|
314
|
-
/**
|
|
315
|
-
* Sets the reflection mode, which decides whether the child registers as a
|
|
316
|
-
* ReflectionRenderable and whether it casts shadows during reflection passes.
|
|
319
|
+
/**
|
|
320
|
+
* Sets the reflection mode, which decides whether the child registers as a
|
|
321
|
+
* ReflectionRenderable and whether it casts shadows during reflection passes.
|
|
317
322
|
*/
|
|
318
323
|
SetReflectionMode(mode) {
|
|
319
324
|
this.reflectionMode = Number(mode) | 0;
|
|
320
325
|
}
|
|
321
326
|
|
|
322
|
-
/**
|
|
323
|
-
* Sets whether the child registers as a shadow caster and contributes opaque
|
|
324
|
-
* shadow batches.
|
|
327
|
+
/**
|
|
328
|
+
* Sets whether the child registers as a shadow caster and contributes opaque
|
|
329
|
+
* shadow batches.
|
|
325
330
|
*/
|
|
326
331
|
SetCastShadow(castShadow) {
|
|
327
332
|
this.castShadow = !!castShadow;
|
|
328
333
|
}
|
|
329
334
|
|
|
330
|
-
/**
|
|
331
|
-
* Sets the minimum screen size, in pixels across, that the child's world
|
|
332
|
-
* bounding sphere must reach - after the frame's inverse LOD factor scaling -
|
|
333
|
-
* before UpdateVisibility marks it visible.
|
|
335
|
+
/**
|
|
336
|
+
* Sets the minimum screen size, in pixels across, that the child's world
|
|
337
|
+
* bounding sphere must reach - after the frame's inverse LOD factor scaling -
|
|
338
|
+
* before UpdateVisibility marks it visible.
|
|
334
339
|
*/
|
|
335
340
|
SetMinScreenSize(minScreenSize) {
|
|
336
341
|
this.minScreenSize = Number(minScreenSize);
|
|
337
342
|
}
|
|
338
343
|
|
|
339
|
-
/** Carbon EveChildMesh::GetLocalToWorldTransform (cpp:1047-1050); the
|
|
344
|
+
/** Carbon EveChildMesh::GetLocalToWorldTransform (cpp:1047-1050); the
|
|
340
345
|
* optional out follows the EveChildInstancedMeshes copy-out shape. */
|
|
341
346
|
GetLocalToWorldTransform(out = null) {
|
|
342
347
|
if (out) {
|
|
@@ -345,9 +350,9 @@ new class extends _identity {
|
|
|
345
350
|
return this.worldTransform;
|
|
346
351
|
}
|
|
347
352
|
|
|
348
|
-
/**
|
|
349
|
-
* The authored name, persisted with the child and used to identify it in the
|
|
350
|
-
* parent graph.
|
|
353
|
+
/**
|
|
354
|
+
* The authored name, persisted with the child and used to identify it in the
|
|
355
|
+
* parent graph.
|
|
351
356
|
*/
|
|
352
357
|
GetName() {
|
|
353
358
|
return this.name;
|
|
@@ -358,50 +363,50 @@ new class extends _identity {
|
|
|
358
363
|
this.name = String(name ?? "");
|
|
359
364
|
}
|
|
360
365
|
|
|
361
|
-
/**
|
|
362
|
-
* Appends a transform modifier; modifiers fold over the child's world
|
|
363
|
-
* transform in insertion order on each async update.
|
|
366
|
+
/**
|
|
367
|
+
* Appends a transform modifier; modifiers fold over the child's world
|
|
368
|
+
* transform in insertion order on each async update.
|
|
364
369
|
*/
|
|
365
370
|
AddTransformModifier(modifier) {
|
|
366
371
|
this.transformModifiers.push(modifier);
|
|
367
372
|
}
|
|
368
373
|
|
|
369
|
-
/**
|
|
370
|
-
* Appends a decal; decals refresh their visibility only while the child itself
|
|
371
|
-
* is visible, and ride along in GetRenderables when the mesh has a geometry
|
|
372
|
-
* resource.
|
|
374
|
+
/**
|
|
375
|
+
* Appends a decal; decals refresh their visibility only while the child itself
|
|
376
|
+
* is visible, and ride along in GetRenderables when the mesh has a geometry
|
|
377
|
+
* resource.
|
|
373
378
|
*/
|
|
374
379
|
AddDecal(decal) {
|
|
375
380
|
this.decals.push(decal);
|
|
376
381
|
}
|
|
377
382
|
|
|
378
|
-
/**
|
|
379
|
-
* Appends an attachment; attachments refresh their lights and visibility every
|
|
380
|
-
* frame regardless of the child's own visibility.
|
|
383
|
+
/**
|
|
384
|
+
* Appends an attachment; attachments refresh their lights and visibility every
|
|
385
|
+
* frame regardless of the child's own visibility.
|
|
381
386
|
*/
|
|
382
387
|
AddAttachment(attachment) {
|
|
383
388
|
this.attachments.push(attachment);
|
|
384
389
|
}
|
|
385
390
|
|
|
386
|
-
/**
|
|
387
|
-
* Drops every attachment, removing their lights, batches and visibility
|
|
388
|
-
* updates from this child.
|
|
391
|
+
/**
|
|
392
|
+
* Drops every attachment, removing their lights, batches and visibility
|
|
393
|
+
* updates from this child.
|
|
389
394
|
*/
|
|
390
395
|
ClearAttachments() {
|
|
391
396
|
this.attachments.length = 0;
|
|
392
397
|
}
|
|
393
398
|
|
|
394
|
-
/**
|
|
395
|
-
* Appends a light, submitted to the light manager from the child's world
|
|
396
|
-
* transform while the child displays.
|
|
399
|
+
/**
|
|
400
|
+
* Appends a light, submitted to the light manager from the child's world
|
|
401
|
+
* transform while the child displays.
|
|
397
402
|
*/
|
|
398
403
|
AddLight(light) {
|
|
399
404
|
this.lights.push(light);
|
|
400
405
|
}
|
|
401
406
|
|
|
402
|
-
/**
|
|
403
|
-
* Drops every light, which also stops the child registering as a LightOwner on
|
|
404
|
-
* the next component registration.
|
|
407
|
+
/**
|
|
408
|
+
* Drops every light, which also stops the child registering as a LightOwner on
|
|
409
|
+
* the next component registration.
|
|
405
410
|
*/
|
|
406
411
|
ClearLights() {
|
|
407
412
|
this.lights.length = 0;
|
|
@@ -424,27 +429,27 @@ new class extends _identity {
|
|
|
424
429
|
}
|
|
425
430
|
}
|
|
426
431
|
|
|
427
|
-
/**
|
|
428
|
-
* Names of the mesh's morph targets in index order, or an empty array when the
|
|
429
|
-
* mesh exposes none; the indices line up with the records GetMorphTargets
|
|
430
|
-
* returns.
|
|
432
|
+
/**
|
|
433
|
+
* Names of the mesh's morph targets in index order, or an empty array when the
|
|
434
|
+
* mesh exposes none; the indices line up with the records GetMorphTargets
|
|
435
|
+
* returns.
|
|
431
436
|
*/
|
|
432
437
|
GetMorphTargetNames() {
|
|
433
438
|
return this.mesh?.GetMorphTargetNames?.() ?? [];
|
|
434
439
|
}
|
|
435
440
|
|
|
436
|
-
/**
|
|
437
|
-
* Writes a named morph weight on the mesh; it only reaches the render path
|
|
438
|
-
* after the next UpdateMorphAnimationBuffer pass re-sorts the indexed buffer.
|
|
441
|
+
/**
|
|
442
|
+
* Writes a named morph weight on the mesh; it only reaches the render path
|
|
443
|
+
* after the next UpdateMorphAnimationBuffer pass re-sorts the indexed buffer.
|
|
439
444
|
*/
|
|
440
445
|
SetMorphTargetWeight(name, weight) {
|
|
441
446
|
this.mesh?.SetMorphTargetWeight?.(name, weight);
|
|
442
447
|
}
|
|
443
448
|
|
|
444
|
-
/**
|
|
445
|
-
* Reads a named morph weight straight from the mesh (0 when it has no such
|
|
446
|
-
* target), bypassing any animation-driven value the morph buffer may have
|
|
447
|
-
* applied.
|
|
449
|
+
/**
|
|
450
|
+
* Reads a named morph weight straight from the mesh (0 when it has no such
|
|
451
|
+
* target), bypassing any animation-driven value the morph buffer may have
|
|
452
|
+
* applied.
|
|
448
453
|
*/
|
|
449
454
|
GetMorphTargetWeight(name) {
|
|
450
455
|
return this.mesh?.GetMorphTargetWeight?.(name) ?? 0;
|
|
@@ -518,22 +523,22 @@ new class extends _identity {
|
|
|
518
523
|
}));
|
|
519
524
|
}
|
|
520
525
|
|
|
521
|
-
/**
|
|
522
|
-
* Always returns null: a child mesh exposes no packed area-id lookup, since
|
|
523
|
-
* its SOF identity lives directly on its
|
|
524
|
-
* sofParentHullName/sofLocatorSetName/sofLocatorIndex fields.
|
|
526
|
+
/**
|
|
527
|
+
* Always returns null: a child mesh exposes no packed area-id lookup, since
|
|
528
|
+
* its SOF identity lives directly on its
|
|
529
|
+
* sofParentHullName/sofLocatorSetName/sofLocatorIndex fields.
|
|
525
530
|
*/
|
|
526
531
|
GetSofSourceLocator() {
|
|
527
532
|
return null;
|
|
528
533
|
}
|
|
529
534
|
|
|
530
|
-
/**
|
|
531
|
-
* Sync-side frame update (Carbon EveChildMesh::UpdateSyncronous,
|
|
532
|
-
* cpp:1002-1045). Carbon's body is entirely audio-geometry registration
|
|
533
|
-
* (cpp:1004-1010, 1044 - engine/audio-owned, omitted) plus animationUpdater
|
|
534
|
-
* re-binding and PrePhysicsAnimation stepping (cpp:1011-1042 - skipped: the
|
|
535
|
-
* JS animation seam is absent, there is no Tr2GrannyAnimation runtime), so
|
|
536
|
-
* the port is a documented frame-contract no-op.
|
|
535
|
+
/**
|
|
536
|
+
* Sync-side frame update (Carbon EveChildMesh::UpdateSyncronous,
|
|
537
|
+
* cpp:1002-1045). Carbon's body is entirely audio-geometry registration
|
|
538
|
+
* (cpp:1004-1010, 1044 - engine/audio-owned, omitted) plus animationUpdater
|
|
539
|
+
* re-binding and PrePhysicsAnimation stepping (cpp:1011-1042 - skipped: the
|
|
540
|
+
* JS animation seam is absent, there is no Tr2GrannyAnimation runtime), so
|
|
541
|
+
* the port is a documented frame-contract no-op.
|
|
537
542
|
*/
|
|
538
543
|
UpdateSyncronous(updateContext, _params) {
|
|
539
544
|
if (this.damageOverlay) this.damageOverlay.UpdateSyncronous(updateContext);
|
|
@@ -541,17 +546,17 @@ new class extends _identity {
|
|
|
541
546
|
for (const overlay of this.overlayEffects) overlay.Update(time, time);
|
|
542
547
|
}
|
|
543
548
|
|
|
544
|
-
/**
|
|
545
|
-
* Per-frame async update (Carbon EveChildMesh::UpdateAsyncronous,
|
|
546
|
-
* cpp:903-1000): rebuild the world transform from the parent, fold the
|
|
547
|
-
* transform modifiers over it, store the activation strength, refresh the
|
|
548
|
-
* attachment lights, the morph buffer, and the world bounds. The GPU ring
|
|
549
|
-
* buffer advance/per-object-data invalidation (cpp:905-909), audio geometry
|
|
550
|
-
* (cpp:920-930), parent VS/PS struct refresh (cpp:932-960), and the skinned
|
|
551
|
-
* GetBounds overload are not modelled, hence @impl.adapted.
|
|
552
|
-
* @param {Object} updateContext - frame context (EveUpdateContext), threaded to modifiers
|
|
553
|
-
* @param {EveChildUpdateParams} params - localToWorldTransform + boneCount/bones
|
|
554
|
-
* @returns {Float32Array} worldTransform
|
|
549
|
+
/**
|
|
550
|
+
* Per-frame async update (Carbon EveChildMesh::UpdateAsyncronous,
|
|
551
|
+
* cpp:903-1000): rebuild the world transform from the parent, fold the
|
|
552
|
+
* transform modifiers over it, store the activation strength, refresh the
|
|
553
|
+
* attachment lights, the morph buffer, and the world bounds. The GPU ring
|
|
554
|
+
* buffer advance/per-object-data invalidation (cpp:905-909), audio geometry
|
|
555
|
+
* (cpp:920-930), parent VS/PS struct refresh (cpp:932-960), and the skinned
|
|
556
|
+
* GetBounds overload are not modelled, hence @impl.adapted.
|
|
557
|
+
* @param {Object} updateContext - frame context (EveUpdateContext), threaded to modifiers
|
|
558
|
+
* @param {EveChildUpdateParams} params - localToWorldTransform + boneCount/bones
|
|
559
|
+
* @returns {Float32Array} worldTransform
|
|
555
560
|
*/
|
|
556
561
|
UpdateAsyncronous(updateContext, params) {
|
|
557
562
|
const parentTransform = params?.localToWorldTransform;
|
|
@@ -645,30 +650,30 @@ new class extends _identity {
|
|
|
645
650
|
return this.worldTransform;
|
|
646
651
|
}
|
|
647
652
|
|
|
648
|
-
/**
|
|
649
|
-
* Frame visibility + LOD state (Carbon EveChildMesh::UpdateVisibility,
|
|
650
|
-
* cpp:366-463): screen size via the frustum, invLodFactor scaling, the
|
|
651
|
-
* minScreenSize/lowestLodVisible gates, the per-instance visibility gate,
|
|
652
|
-
* and the attachment/decal visibility fan-out. Carbon recomputes the local
|
|
653
|
-
* mesh bounds here (cpp:380-394) but consumes only the world sphere/box
|
|
654
|
-
* computed in UpdateAsyncronous, so the dead recompute is skipped. The
|
|
655
|
-
* raytracing branch (cpp:450-462) is not ported yet and omitted.
|
|
656
|
-
* @param {Object} updateContext - frame context (frustum + invLodFactor ducks)
|
|
657
|
-
* @param {Float32Array} _parentTransform
|
|
658
|
-
* @param {Number} parentLod - parent Tr2Lod level
|
|
659
|
-
* @returns {Boolean} isVisible
|
|
653
|
+
/**
|
|
654
|
+
* Frame visibility + LOD state (Carbon EveChildMesh::UpdateVisibility,
|
|
655
|
+
* cpp:366-463): screen size via the frustum, invLodFactor scaling, the
|
|
656
|
+
* minScreenSize/lowestLodVisible gates, the per-instance visibility gate,
|
|
657
|
+
* and the attachment/decal visibility fan-out. Carbon recomputes the local
|
|
658
|
+
* mesh bounds here (cpp:380-394) but consumes only the world sphere/box
|
|
659
|
+
* computed in UpdateAsyncronous, so the dead recompute is skipped. The
|
|
660
|
+
* raytracing branch (cpp:450-462) is not ported yet and omitted.
|
|
661
|
+
* @param {Object} updateContext - frame context (frustum + invLodFactor ducks)
|
|
662
|
+
* @param {Float32Array} _parentTransform
|
|
663
|
+
* @param {Number} parentLod - parent Tr2Lod level
|
|
664
|
+
* @returns {Boolean} isVisible
|
|
660
665
|
*/
|
|
661
|
-
/**
|
|
662
|
-
* The mesh's bone palette, as a borrowed Float4x3 buffer and its bone count.
|
|
663
|
-
*
|
|
664
|
-
* Carbon `EveChildMesh::GetBoneTransforms` (cpp:1285-1307). Carbon branches:
|
|
665
|
-
* the updater's own palette when it has a mesh binding, otherwise a separate
|
|
666
|
-
* `Tr2AnimationMeshBinding` palette. Only the first branch exists here -
|
|
667
|
-
* `Tr2AnimationMeshBinding` is unported - so a mesh relying on the second
|
|
668
|
-
* gets no bones rather than the wrong ones.
|
|
669
|
-
*
|
|
670
|
-
* Carbon also assigns `accumulatedTransforms` and never reads it; that dead
|
|
671
|
-
* local is not reproduced.
|
|
666
|
+
/**
|
|
667
|
+
* The mesh's bone palette, as a borrowed Float4x3 buffer and its bone count.
|
|
668
|
+
*
|
|
669
|
+
* Carbon `EveChildMesh::GetBoneTransforms` (cpp:1285-1307). Carbon branches:
|
|
670
|
+
* the updater's own palette when it has a mesh binding, otherwise a separate
|
|
671
|
+
* `Tr2AnimationMeshBinding` palette. Only the first branch exists here -
|
|
672
|
+
* `Tr2AnimationMeshBinding` is unported - so a mesh relying on the second
|
|
673
|
+
* gets no bones rather than the wrong ones.
|
|
674
|
+
*
|
|
675
|
+
* Carbon also assigns `accumulatedTransforms` and never reads it; that dead
|
|
676
|
+
* local is not reproduced.
|
|
672
677
|
*/
|
|
673
678
|
GetBoneTransforms() {
|
|
674
679
|
const updater = this.animationUpdater;
|
|
@@ -686,9 +691,9 @@ new class extends _identity {
|
|
|
686
691
|
return this.GetRestPoseBoneTransforms();
|
|
687
692
|
}
|
|
688
693
|
|
|
689
|
-
/**
|
|
690
|
-
* Builds Carbon's identity Float4x3 rest-pose palette. Geometry with no bone
|
|
691
|
-
* bindings still receives one identity because skinned shaders read bone 0.
|
|
694
|
+
/**
|
|
695
|
+
* Builds Carbon's identity Float4x3 rest-pose palette. Geometry with no bone
|
|
696
|
+
* bindings still receives one identity because skinned shaders read bone 0.
|
|
692
697
|
*/
|
|
693
698
|
GetRestPoseBoneTransforms() {
|
|
694
699
|
const geometry = this.mesh ? this.mesh.GetGeometryResource() : null;
|
|
@@ -711,10 +716,10 @@ new class extends _identity {
|
|
|
711
716
|
};
|
|
712
717
|
}
|
|
713
718
|
|
|
714
|
-
/**
|
|
715
|
-
* Resolves this child's visibility for the frame from its world bounding
|
|
716
|
-
* sphere, the parent LOD, and the authored screen-size thresholds, recording
|
|
717
|
-
* the mesh and per-instance screen sizes the batch path then draws at.
|
|
719
|
+
/**
|
|
720
|
+
* Resolves this child's visibility for the frame from its world bounding
|
|
721
|
+
* sphere, the parent LOD, and the authored screen-size thresholds, recording
|
|
722
|
+
* the mesh and per-instance screen sizes the batch path then draws at.
|
|
718
723
|
*/
|
|
719
724
|
UpdateVisibility(updateContext, _parentTransform = null, parentLod = Tr2Lod.TR2_LOD_HIGH) {
|
|
720
725
|
this.#isVisible = false;
|
|
@@ -789,12 +794,12 @@ new class extends _identity {
|
|
|
789
794
|
return this.#isVisible;
|
|
790
795
|
}
|
|
791
796
|
|
|
792
|
-
/**
|
|
793
|
-
* Collects this child (and its decals) as renderables (Carbon
|
|
794
|
-
* EveChildMesh::GetRenderables, cpp:571-616): instanced meshes contribute
|
|
795
|
-
* only while the per-instance gate passed; decals ride along through their
|
|
796
|
-
* duck-typed renderable collectors (mesh cache is not ported yet, passed null
|
|
797
|
-
* as in EveSpaceObject2.GetRenderables).
|
|
797
|
+
/**
|
|
798
|
+
* Collects this child (and its decals) as renderables (Carbon
|
|
799
|
+
* EveChildMesh::GetRenderables, cpp:571-616): instanced meshes contribute
|
|
800
|
+
* only while the per-instance gate passed; decals ride along through their
|
|
801
|
+
* duck-typed renderable collectors (mesh cache is not ported yet, passed null
|
|
802
|
+
* as in EveSpaceObject2.GetRenderables).
|
|
798
803
|
*/
|
|
799
804
|
GetRenderables(out = []) {
|
|
800
805
|
if (!this.#isVisible) {
|
|
@@ -822,7 +827,7 @@ new class extends _identity {
|
|
|
822
827
|
return out;
|
|
823
828
|
}
|
|
824
829
|
|
|
825
|
-
/** Carbon EveChildMesh::GetBoundingSphere (cpp:618-627): the realized world
|
|
830
|
+
/** Carbon EveChildMesh::GetBoundingSphere (cpp:618-627): the realized world
|
|
826
831
|
* sphere, valid only after an update produced bounds (radius > 0). */
|
|
827
832
|
GetBoundingSphere(out = vec4.create(), _query = 0) {
|
|
828
833
|
if (this.#worldBoundingSphere[3] > 0) {
|
|
@@ -846,7 +851,7 @@ new class extends _identity {
|
|
|
846
851
|
return false;
|
|
847
852
|
}
|
|
848
853
|
|
|
849
|
-
/** Carbon EveChildMesh::IsVisible (cpp:639-650): sphere-in-frustum plus the
|
|
854
|
+
/** Carbon EveChildMesh::IsVisible (cpp:639-650): sphere-in-frustum plus the
|
|
850
855
|
* estimated pixel size against the context visibility threshold. */
|
|
851
856
|
IsVisible(updateContext) {
|
|
852
857
|
if (this.#worldBoundingSphere[3] > 0) {
|
|
@@ -861,13 +866,13 @@ new class extends _identity {
|
|
|
861
866
|
return false;
|
|
862
867
|
}
|
|
863
868
|
|
|
864
|
-
/** Carbon EveChildMesh::GetBatches (cpp:652-670): the mesh delegates per
|
|
865
|
-
* batch type and activated attachments recurse, at
|
|
866
|
-
* min(currentInstanceScreenSize, currentScreenSize) and with a reverse-winding
|
|
867
|
-
* flag from Determinant(m_worldTransform) < 0 - a negative determinant means
|
|
868
|
-
* the transform mirrors, which flips triangle facing. A determinant is
|
|
869
|
-
* transpose-invariant, so the row-vector/column-vector difference does not
|
|
870
|
-
* apply to this test. Returns whether any batch was committed (JS addition;
|
|
869
|
+
/** Carbon EveChildMesh::GetBatches (cpp:652-670): the mesh delegates per
|
|
870
|
+
* batch type and activated attachments recurse, at
|
|
871
|
+
* min(currentInstanceScreenSize, currentScreenSize) and with a reverse-winding
|
|
872
|
+
* flag from Determinant(m_worldTransform) < 0 - a negative determinant means
|
|
873
|
+
* the transform mirrors, which flips triangle facing. A determinant is
|
|
874
|
+
* transpose-invariant, so the row-vector/column-vector difference does not
|
|
875
|
+
* apply to this test. Returns whether any batch was committed (JS addition;
|
|
871
876
|
* Carbon returns void). */
|
|
872
877
|
GetBatches(batches, batchType, perObjectData, reason = Tr2RenderReason.TR2RENDERREASON_NORMAL) {
|
|
873
878
|
if (!this.display) {
|
|
@@ -913,9 +918,9 @@ new class extends _identity {
|
|
|
913
918
|
return committed;
|
|
914
919
|
}
|
|
915
920
|
|
|
916
|
-
/** Carbon EveChildMesh::GetShadowBatches (cpp:672-681): the OPAQUE areas
|
|
917
|
-
* only, gated on display/mesh/hasUpdated, at the caller's shadow pixel size
|
|
918
|
-
* rather than the child's own screen size. Returns whether any batch was
|
|
921
|
+
/** Carbon EveChildMesh::GetShadowBatches (cpp:672-681): the OPAQUE areas
|
|
922
|
+
* only, gated on display/mesh/hasUpdated, at the caller's shadow pixel size
|
|
923
|
+
* rather than the child's own screen size. Returns whether any batch was
|
|
919
924
|
* committed (JS addition; Carbon returns void). */
|
|
920
925
|
GetShadowBatches(batches, perObjectData, shadowPixelSize = Infinity) {
|
|
921
926
|
if (this.display && this.mesh && this.#hasUpdated) {
|
|
@@ -924,7 +929,7 @@ new class extends _identity {
|
|
|
924
929
|
return false;
|
|
925
930
|
}
|
|
926
931
|
|
|
927
|
-
/** Carbon EveChildMesh::GetSortValue (cpp:787-792): view distance scaled by
|
|
932
|
+
/** Carbon EveChildMesh::GetSortValue (cpp:787-792): view distance scaled by
|
|
928
933
|
* sortValueScale plus sortValueOffset. */
|
|
929
934
|
GetSortValue(renderContext = null) {
|
|
930
935
|
const viewPosition = renderContext?.GetViewPosition();
|
|
@@ -934,21 +939,21 @@ new class extends _identity {
|
|
|
934
939
|
return Math.hypot(x, y, z) * this.sortValueScale + this.sortValueOffset;
|
|
935
940
|
}
|
|
936
941
|
|
|
937
|
-
/** Carbon EveChildMesh::GetShadowPerObjectData (cpp:794-797) forwards the
|
|
942
|
+
/** Carbon EveChildMesh::GetShadowPerObjectData (cpp:794-797) forwards the
|
|
938
943
|
* shadow pass to the same per-object record. */
|
|
939
944
|
GetShadowPerObjectData(accumulator = null) {
|
|
940
945
|
return this.GetPerObjectData(accumulator);
|
|
941
946
|
}
|
|
942
947
|
|
|
943
|
-
/**
|
|
944
|
-
* Carbon EveChildMesh::GetPerObjectData (cpp:799-843): resets the morph
|
|
945
|
-
* counters, uploads the bone and morph rings, then hands back a handle over
|
|
946
|
-
* this child's two PERSISTENT buffers.
|
|
947
|
-
*
|
|
948
|
-
* The ring OFFSETS (`boneOffsets[0..1]`, `morphTargetAnimationDataOffset`,
|
|
949
|
-
* `morphTargetVertexDataOffset`, `bakedMorphTargetVertexDataOffset`) are GPU
|
|
950
|
-
* addresses with no CPU derivation, so they keep their defaults; the counts,
|
|
951
|
-
* which are CPU-known, are written.
|
|
948
|
+
/**
|
|
949
|
+
* Carbon EveChildMesh::GetPerObjectData (cpp:799-843): resets the morph
|
|
950
|
+
* counters, uploads the bone and morph rings, then hands back a handle over
|
|
951
|
+
* this child's two PERSISTENT buffers.
|
|
952
|
+
*
|
|
953
|
+
* The ring OFFSETS (`boneOffsets[0..1]`, `morphTargetAnimationDataOffset`,
|
|
954
|
+
* `morphTargetVertexDataOffset`, `bakedMorphTargetVertexDataOffset`) are GPU
|
|
955
|
+
* addresses with no CPU derivation, so they keep their defaults; the counts,
|
|
956
|
+
* which are CPU-known, are written.
|
|
952
957
|
*/
|
|
953
958
|
GetPerObjectData(_accumulator = null) {
|
|
954
959
|
this.#perObjectData.vs.Set("activeMorphTargetsCount", [0]);
|
|
@@ -964,17 +969,17 @@ new class extends _identity {
|
|
|
964
969
|
};
|
|
965
970
|
}
|
|
966
971
|
|
|
967
|
-
/**
|
|
968
|
-
* Carbon's two IsCastingShadow overloads, dispatched on the second argument:
|
|
969
|
-
* a position vector (length >= 3) selects the sphere-overlap overload
|
|
970
|
-
* (cpp:338-364); anything else is the shadow-frustum overload (cpp:295-336),
|
|
971
|
-
* whose Carbon out-param float& sizeInShadow becomes the optional trailing
|
|
972
|
-
* length-1 array (out-params last).
|
|
973
|
-
* @param {Object} cameraFrustum
|
|
974
|
-
* @param {Object|Float32Array} shadowFrustumOrPosition
|
|
975
|
-
* @param {Number} renderReasonOrRadius
|
|
976
|
-
* @param {Array|Number} sizeInShadowOutOrRenderReason
|
|
977
|
-
* @returns {Boolean}
|
|
972
|
+
/**
|
|
973
|
+
* Carbon's two IsCastingShadow overloads, dispatched on the second argument:
|
|
974
|
+
* a position vector (length >= 3) selects the sphere-overlap overload
|
|
975
|
+
* (cpp:338-364); anything else is the shadow-frustum overload (cpp:295-336),
|
|
976
|
+
* whose Carbon out-param float& sizeInShadow becomes the optional trailing
|
|
977
|
+
* length-1 array (out-params last).
|
|
978
|
+
* @param {Object} cameraFrustum
|
|
979
|
+
* @param {Object|Float32Array} shadowFrustumOrPosition
|
|
980
|
+
* @param {Number} renderReasonOrRadius
|
|
981
|
+
* @param {Array|Number} sizeInShadowOutOrRenderReason
|
|
982
|
+
* @returns {Boolean}
|
|
978
983
|
*/
|
|
979
984
|
IsCastingShadow(cameraFrustum, shadowFrustumOrPosition, renderReasonOrRadius, sizeInShadowOutOrRenderReason = null) {
|
|
980
985
|
if (!this.display || !this.castShadow || !this.#hasUpdated) {
|
|
@@ -1042,12 +1047,12 @@ new class extends _identity {
|
|
|
1042
1047
|
/** Carbon EveChildMesh::ChangeLOD (cpp:1052-1054) is an intentional no-op. */
|
|
1043
1048
|
ChangeLOD(_lod) {}
|
|
1044
1049
|
|
|
1045
|
-
/** Carbon EveChildMesh::RegisterComponents (cpp:239-269): LightOwner when
|
|
1046
|
-
* lights are authored; ReflectionRenderable (ShouldReflect) and ShadowCaster
|
|
1047
|
-
* (castShadow) only when a mesh is present; then forwards the attachments.
|
|
1048
|
-
* Gate m_display. "MeshMorph" stays OUT-OF-BAND: Carbon registers it at
|
|
1049
|
-
* baked-morph need inside BakeMorphs (cpp:1404-1409), not here - the JS
|
|
1050
|
-
* BakeMorphs stub is the site that would register it when the GPU morph
|
|
1050
|
+
/** Carbon EveChildMesh::RegisterComponents (cpp:239-269): LightOwner when
|
|
1051
|
+
* lights are authored; ReflectionRenderable (ShouldReflect) and ShadowCaster
|
|
1052
|
+
* (castShadow) only when a mesh is present; then forwards the attachments.
|
|
1053
|
+
* Gate m_display. "MeshMorph" stays OUT-OF-BAND: Carbon registers it at
|
|
1054
|
+
* baked-morph need inside BakeMorphs (cpp:1404-1409), not here - the JS
|
|
1055
|
+
* BakeMorphs stub is the site that would register it when the GPU morph
|
|
1051
1056
|
* bake is ported. */
|
|
1052
1057
|
RegisterComponents() {
|
|
1053
1058
|
const registry = this.GetComponentRegistry();
|
|
@@ -1069,9 +1074,9 @@ new class extends _identity {
|
|
|
1069
1074
|
}
|
|
1070
1075
|
}
|
|
1071
1076
|
|
|
1072
|
-
/** Carbon EveChildMesh::UnRegisterComponents (cpp:275-290): forwards the
|
|
1073
|
-
* attachments only (own components were already removed by
|
|
1074
|
-
* EveEntity::UnRegister, EveEntity.cpp:90); no display re-check.
|
|
1077
|
+
/** Carbon EveChildMesh::UnRegisterComponents (cpp:275-290): forwards the
|
|
1078
|
+
* attachments only (own components were already removed by
|
|
1079
|
+
* EveEntity::UnRegister, EveEntity.cpp:90); no display re-check.
|
|
1075
1080
|
* UnregisterAudioGeometry (cpp:277) is audio-engine-owned and unported. */
|
|
1076
1081
|
UnRegisterComponents() {
|
|
1077
1082
|
const registry = this.GetComponentRegistry();
|
|
@@ -1082,12 +1087,12 @@ new class extends _identity {
|
|
|
1082
1087
|
}
|
|
1083
1088
|
}
|
|
1084
1089
|
|
|
1085
|
-
/** Carbon EveChildMesh::GetLights (cpp:1638-1652): BOTH gates (empty
|
|
1086
|
-
* lights and display, cpp:1640 - unlike EveSpaceObject2's display-only),
|
|
1087
|
-
* then per light AddLight(manager, worldTransform, 1, bones, boneCount)
|
|
1088
|
-
* FOLLOWED by SetBrightnessMultiplier(m_activationStrength) - the
|
|
1089
|
-
* one-frame-lag order is contract (the submission uses the multiplier
|
|
1090
|
-
* stamped on the previous pass; the first pass uses the Tr2Light default
|
|
1090
|
+
/** Carbon EveChildMesh::GetLights (cpp:1638-1652): BOTH gates (empty
|
|
1091
|
+
* lights and display, cpp:1640 - unlike EveSpaceObject2's display-only),
|
|
1092
|
+
* then per light AddLight(manager, worldTransform, 1, bones, boneCount)
|
|
1093
|
+
* FOLLOWED by SetBrightnessMultiplier(m_activationStrength) - the
|
|
1094
|
+
* one-frame-lag order is contract (the submission uses the multiplier
|
|
1095
|
+
* stamped on the previous pass; the first pass uses the Tr2Light default
|
|
1091
1096
|
* 1). */
|
|
1092
1097
|
GetLights(lightManager) {
|
|
1093
1098
|
if (!this.lights.length || !this.display) {
|
|
@@ -1110,10 +1115,10 @@ new class extends _identity {
|
|
|
1110
1115
|
return this;
|
|
1111
1116
|
}
|
|
1112
1117
|
|
|
1113
|
-
/**
|
|
1114
|
-
* Carbon OnModified (EveChildMesh.cpp:197-216): three independent tests, not
|
|
1115
|
-
* a chain - a mesh change satisfies the first two, and the third only runs
|
|
1116
|
-
* for a child that owns locator sets.
|
|
1118
|
+
/**
|
|
1119
|
+
* Carbon OnModified (EveChildMesh.cpp:197-216): three independent tests, not
|
|
1120
|
+
* a chain - a mesh change satisfies the first two, and the third only runs
|
|
1121
|
+
* for a child that owns locator sets.
|
|
1117
1122
|
*/
|
|
1118
1123
|
OnModified(propertyName) {
|
|
1119
1124
|
if (propertyName === "reflectionMode" || propertyName === "display" || propertyName === "mesh" || propertyName === "castShadow") {
|
|
@@ -1128,9 +1133,9 @@ new class extends _identity {
|
|
|
1128
1133
|
return true;
|
|
1129
1134
|
}
|
|
1130
1135
|
|
|
1131
|
-
/**
|
|
1132
|
-
* Carbon InvalidateOwnerMergedLocators (EveChildMesh.cpp:1330-1336): tell the
|
|
1133
|
-
* owner its merged locator sets are stale, and why.
|
|
1136
|
+
/**
|
|
1137
|
+
* Carbon InvalidateOwnerMergedLocators (EveChildMesh.cpp:1330-1336): tell the
|
|
1138
|
+
* owner its merged locator sets are stale, and why.
|
|
1134
1139
|
*/
|
|
1135
1140
|
InvalidateOwnerMergedLocators(reason = "structure") {
|
|
1136
1141
|
this.GetOwner()?.InvalidateMergedLocators(reason);
|
|
@@ -1155,15 +1160,16 @@ new class extends _identity {
|
|
|
1155
1160
|
out.push({
|
|
1156
1161
|
childToObject: mat4.clone(childToObject),
|
|
1157
1162
|
owner: this,
|
|
1163
|
+
partTag: this.GetPartTag(),
|
|
1158
1164
|
sets
|
|
1159
1165
|
});
|
|
1160
1166
|
}
|
|
1161
1167
|
}
|
|
1162
1168
|
|
|
1163
|
-
/**
|
|
1164
|
-
* Contributes this child's geometry to the owner's merged raycast set
|
|
1165
|
-
* (Carbon EveChildMesh.cpp:2061-2077): one record per mesh, its areas
|
|
1166
|
-
* appended to the shared pool by batch type.
|
|
1169
|
+
/**
|
|
1170
|
+
* Contributes this child's geometry to the owner's merged raycast set
|
|
1171
|
+
* (Carbon EveChildMesh.cpp:2061-2077): one record per mesh, its areas
|
|
1172
|
+
* appended to the shared pool by batch type.
|
|
1167
1173
|
*/
|
|
1168
1174
|
CollectOwnedGeometry(type, parentTransform, out, areaPool) {
|
|
1169
1175
|
const geometry = this.mesh ? this.mesh.GetGeometryResource() : null;
|
|
@@ -1188,15 +1194,17 @@ new class extends _identity {
|
|
|
1188
1194
|
if (owner) owner.InvalidateMergedLocators("structure");
|
|
1189
1195
|
}
|
|
1190
1196
|
|
|
1191
|
-
/**
|
|
1192
|
-
|
|
1197
|
+
/**
|
|
1198
|
+
* Returns this child mesh's armour and hull damage overlay; a child mesh is
|
|
1199
|
+
* one part, so the tag is ignored (Carbon EveChildMesh.cpp:2098-2101).
|
|
1200
|
+
*/
|
|
1201
|
+
GetPartDamageOverlay(_partTag) {
|
|
1193
1202
|
return this.damageOverlay;
|
|
1194
1203
|
}
|
|
1195
1204
|
|
|
1196
|
-
/** Creates this child mesh's damage overlay when it does not yet exist. */
|
|
1197
|
-
|
|
1205
|
+
/** Creates this child mesh's damage overlay when it does not yet exist (Carbon cpp:2103-2109). */
|
|
1206
|
+
CreatePartDamageOverlay(_partTag) {
|
|
1198
1207
|
this.damageOverlay ??= new _EveDamageOverlay();
|
|
1199
|
-
return this.damageOverlay;
|
|
1200
1208
|
}
|
|
1201
1209
|
|
|
1202
1210
|
/** Sets the per-part armour damage shader stamped by SOF placement creation. */
|
|
@@ -1204,14 +1212,14 @@ new class extends _identity {
|
|
|
1204
1212
|
this.armorDamageShader = effect ?? null;
|
|
1205
1213
|
}
|
|
1206
1214
|
|
|
1207
|
-
/** Returns the per-part armour damage shader, or null when the part has none. */
|
|
1208
|
-
|
|
1215
|
+
/** Returns the per-part armour damage shader, or null when the part has none (Carbon cpp:2116-2119). */
|
|
1216
|
+
GetPartArmorDamageShaderEffect(_partTag) {
|
|
1209
1217
|
return this.armorDamageShader;
|
|
1210
1218
|
}
|
|
1211
1219
|
|
|
1212
|
-
/**
|
|
1213
|
-
* Returns the locator list of this child's own damage set, or null when the
|
|
1214
|
-
* child owns no damage locators (Carbon EveChildMesh.cpp:
|
|
1220
|
+
/**
|
|
1221
|
+
* Returns the locator list of this child's own damage set, or null when the
|
|
1222
|
+
* child owns no damage locators (Carbon EveChildMesh.cpp:2121-2131).
|
|
1215
1223
|
*/
|
|
1216
1224
|
GetOwnedDamageLocators() {
|
|
1217
1225
|
for (const set of this.ownedLocatorSets) {
|
|
@@ -1220,10 +1228,10 @@ new class extends _identity {
|
|
|
1220
1228
|
return null;
|
|
1221
1229
|
}
|
|
1222
1230
|
|
|
1223
|
-
/**
|
|
1224
|
-
* Resolves one damage locator's BIND-pose position in the child's local
|
|
1225
|
-
* space - no bone transform, the stable overlay seed position (Carbon
|
|
1226
|
-
* EveChildMesh.cpp:
|
|
1231
|
+
/**
|
|
1232
|
+
* Resolves one damage locator's BIND-pose position in the child's local
|
|
1233
|
+
* space - no bone transform, the stable overlay seed position (Carbon
|
|
1234
|
+
* EveChildMesh.cpp:2133-2143).
|
|
1227
1235
|
*/
|
|
1228
1236
|
GetDamageLocatorBindPositionLocal(index, out = vec3.create()) {
|
|
1229
1237
|
const locators = this.GetOwnedDamageLocators();
|
|
@@ -1233,12 +1241,12 @@ new class extends _identity {
|
|
|
1233
1241
|
return true;
|
|
1234
1242
|
}
|
|
1235
1243
|
|
|
1236
|
-
/**
|
|
1237
|
-
* Resolves one damage locator's animated position and direction in the
|
|
1238
|
-
* child's local space, posed by this child's own animation updater (Carbon
|
|
1239
|
-
* EveChildMesh.cpp:
|
|
1244
|
+
/**
|
|
1245
|
+
* Resolves one damage locator's animated position and direction in the
|
|
1246
|
+
* child's local space, posed by this child's own animation updater (Carbon
|
|
1247
|
+
* EveChildMesh.cpp:2145-2155; the part tag is ignored).
|
|
1240
1248
|
*/
|
|
1241
|
-
|
|
1249
|
+
GetPartDamageLocatorAnimatedLocal(_partTag, index, outPosition, outDirection) {
|
|
1242
1250
|
const locators = this.GetOwnedDamageLocators();
|
|
1243
1251
|
const locatorIndex = Number(index) | 0;
|
|
1244
1252
|
if (!locators || locatorIndex < 0 || locatorIndex >= locators.length) return false;
|
|
@@ -1246,14 +1254,14 @@ new class extends _identity {
|
|
|
1246
1254
|
return true;
|
|
1247
1255
|
}
|
|
1248
1256
|
|
|
1249
|
-
/**
|
|
1250
|
-
* Carbon EveChildMesh::GetPickingBatches (cpp:862-889): collects the geometry
|
|
1251
|
-
* a pick pass should test, by mask. Unlike the hull's version this one has no
|
|
1252
|
-
* overlay effects to pull in.
|
|
1253
|
-
*
|
|
1254
|
-
* @param {Object} batches - the picking accumulator
|
|
1255
|
-
* @param {Number} pickTypes - a Tr2PickType mask
|
|
1256
|
-
* @param {Object} perObjectData - this child's per-object record
|
|
1257
|
+
/**
|
|
1258
|
+
* Carbon EveChildMesh::GetPickingBatches (cpp:862-889): collects the geometry
|
|
1259
|
+
* a pick pass should test, by mask. Unlike the hull's version this one has no
|
|
1260
|
+
* overlay effects to pull in.
|
|
1261
|
+
*
|
|
1262
|
+
* @param {Object} batches - the picking accumulator
|
|
1263
|
+
* @param {Number} pickTypes - a Tr2PickType mask
|
|
1264
|
+
* @param {Object} perObjectData - this child's per-object record
|
|
1257
1265
|
*/
|
|
1258
1266
|
GetPickingBatches(batches, pickTypes = TR2_PICK_TYPE_DEFAULT, perObjectData = null) {
|
|
1259
1267
|
if (pickTypes & Tr2PickType.PICK_TYPE_PICKING) {
|
|
@@ -1279,14 +1287,14 @@ new class extends _identity {
|
|
|
1279
1287
|
return true;
|
|
1280
1288
|
}
|
|
1281
1289
|
|
|
1282
|
-
/**
|
|
1283
|
-
* Binds the animation updater to this mesh's geometry, so a child with no
|
|
1284
|
-
* animation resource of its own animates from the mesh's own bone binding.
|
|
1285
|
-
*
|
|
1286
|
-
* Carbon `EveChildMesh::InitializeAnimation` (cpp:217-232). Only runs when
|
|
1287
|
-
* the updater has no authored resPath - one that does keeps its own
|
|
1288
|
-
* resource. When the mesh has no geometry yet the shared binding is cleared
|
|
1289
|
-
* rather than left stale, so a later mesh swap rebinds cleanly.
|
|
1290
|
+
/**
|
|
1291
|
+
* Binds the animation updater to this mesh's geometry, so a child with no
|
|
1292
|
+
* animation resource of its own animates from the mesh's own bone binding.
|
|
1293
|
+
*
|
|
1294
|
+
* Carbon `EveChildMesh::InitializeAnimation` (cpp:217-232). Only runs when
|
|
1295
|
+
* the updater has no authored resPath - one that does keeps its own
|
|
1296
|
+
* resource. When the mesh has no geometry yet the shared binding is cleared
|
|
1297
|
+
* rather than left stale, so a later mesh swap rebinds cleanly.
|
|
1290
1298
|
*/
|
|
1291
1299
|
InitializeAnimation() {
|
|
1292
1300
|
const updater = this.animationUpdater;
|