@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
|
@@ -8,7 +8,6 @@ const OUTPUT_IMAGE = "image";
|
|
|
8
8
|
const OUTPUT_TEXTURE = "texture";
|
|
9
9
|
const OUTPUT_RGBA = "rgba";
|
|
10
10
|
const OUTPUT_RAW = "raw";
|
|
11
|
-
const OUTPUT_JSON = "json";
|
|
12
11
|
const DEFAULT_VALUES = Object.freeze({
|
|
13
12
|
emit: OUTPUT_RAW,
|
|
14
13
|
inputType: "",
|
|
@@ -74,9 +73,9 @@ const DEBUG_OUTPUTS = Object.freeze({
|
|
|
74
73
|
dds: "ddsJson"
|
|
75
74
|
});
|
|
76
75
|
|
|
77
|
-
/**
|
|
78
|
-
* Normalizes reader options against their supported defaults for the DDS format
|
|
79
|
-
* reader.
|
|
76
|
+
/**
|
|
77
|
+
* Normalizes reader options against their supported defaults for the DDS format
|
|
78
|
+
* reader.
|
|
80
79
|
*/
|
|
81
80
|
function normalizeValues(base = DEFAULT_VALUES, options = {}, readerName = "CjsImageFormat") {
|
|
82
81
|
const values = {
|
|
@@ -99,8 +98,7 @@ function normalizeInputType(inputType) {
|
|
|
99
98
|
/** Normalizes the requested output representation for the DDS format reader. */
|
|
100
99
|
function normalizeEmit(emit, inputType, readerName) {
|
|
101
100
|
if (emit === undefined || emit === null) return OUTPUT_RAW;
|
|
102
|
-
if (
|
|
103
|
-
if ([OUTPUT_IMAGE, OUTPUT_TEXTURE, OUTPUT_RGBA, OUTPUT_RAW, OUTPUT_JSON].includes(emit)) return emit;
|
|
101
|
+
if ([OUTPUT_IMAGE, OUTPUT_TEXTURE, OUTPUT_RGBA, OUTPUT_RAW].includes(emit)) return emit;
|
|
104
102
|
if (Object.values(DEBUG_OUTPUTS).includes(emit)) return emit;
|
|
105
103
|
throw new TypeError(`${readerName}: unknown emit value ${JSON.stringify(emit)}`);
|
|
106
104
|
}
|
|
@@ -123,9 +121,9 @@ function inspectWithValues(input, values = DEFAULT_VALUES, expectedType = "") {
|
|
|
123
121
|
};
|
|
124
122
|
}
|
|
125
123
|
|
|
126
|
-
/**
|
|
127
|
-
* Reports whether input is supported under normalized format options for the DDS
|
|
128
|
-
* format reader.
|
|
124
|
+
/**
|
|
125
|
+
* Reports whether input is supported under normalized format options for the DDS
|
|
126
|
+
* format reader.
|
|
129
127
|
*/
|
|
130
128
|
function probeSupportWithValues(input, values = DEFAULT_VALUES, expectedType = "") {
|
|
131
129
|
try {
|
|
@@ -204,11 +202,11 @@ function readWithValues(input, values = DEFAULT_VALUES, expectedType = "") {
|
|
|
204
202
|
bytes
|
|
205
203
|
};
|
|
206
204
|
}
|
|
207
|
-
if (values.emit ===
|
|
205
|
+
if (values.emit === DEBUG_OUTPUTS[metadata.sourceFormat]) {
|
|
208
206
|
return metadata;
|
|
209
207
|
}
|
|
210
208
|
if (values.emit === OUTPUT_TEXTURE && metadata.sourceFormat === "dds") {
|
|
211
|
-
return readDdsTexture(bytes, metadata);
|
|
209
|
+
return readDdsTexture(bytes, metadata, values);
|
|
212
210
|
}
|
|
213
211
|
if ((values.emit === OUTPUT_RGBA || values.emit === OUTPUT_IMAGE) && metadata.sourceFormat === "dds") {
|
|
214
212
|
return readDdsToRgba(bytes, metadata);
|
|
@@ -220,9 +218,9 @@ function readWithValues(input, values = DEFAULT_VALUES, expectedType = "") {
|
|
|
220
218
|
throw error;
|
|
221
219
|
}
|
|
222
220
|
|
|
223
|
-
/**
|
|
224
|
-
* Inspects the supplied bytes without decoding their payload for the DDS format
|
|
225
|
-
* reader.
|
|
221
|
+
/**
|
|
222
|
+
* Inspects the supplied bytes without decoding their payload for the DDS format
|
|
223
|
+
* reader.
|
|
226
224
|
*/
|
|
227
225
|
function inspectBytes(bytes) {
|
|
228
226
|
const sourceFormat = identifyImageBytes(bytes);
|
|
@@ -346,7 +344,93 @@ function inspectDDS(bytes) {
|
|
|
346
344
|
hasMipMaps: readU32LE(bytes, 28) > 1
|
|
347
345
|
};
|
|
348
346
|
}
|
|
349
|
-
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Carbon's load-time clean-up of 24-bit RGB: BGR -> BGRX with X = 0
|
|
350
|
+
* (imageio/Tr2DdsHandler.cpp Convert24BitTo32Bit, :774-795).
|
|
351
|
+
*
|
|
352
|
+
* @param {Uint8Array} source 24-bit pixels.
|
|
353
|
+
* @returns {Uint8Array} 32-bit pixels.
|
|
354
|
+
*/
|
|
355
|
+
function expand24To32(source) {
|
|
356
|
+
const pixels = Math.floor(source.length / 3);
|
|
357
|
+
const out = new Uint8Array(pixels * 4);
|
|
358
|
+
for (let p = 0, s = 0, d = 0; p < pixels; p++) {
|
|
359
|
+
out[d++] = source[s++];
|
|
360
|
+
out[d++] = source[s++];
|
|
361
|
+
out[d++] = source[s++];
|
|
362
|
+
out[d++] = 0;
|
|
363
|
+
}
|
|
364
|
+
return out;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Carbon's load-time clean-up of A8L8: luminance and alpha -> BGRA with
|
|
369
|
+
* B = G = R = L (Tr2DdsHandler.cpp:863-868, via HostBitmap::ConvertFormat
|
|
370
|
+
* R8G8 -> B8G8R8A8, HostBitmap.cpp:386-396).
|
|
371
|
+
*
|
|
372
|
+
* @param {Uint8Array} source L8A8 pixels.
|
|
373
|
+
* @returns {Uint8Array} BGRA pixels.
|
|
374
|
+
*/
|
|
375
|
+
function convertL8A8ToBgra(source) {
|
|
376
|
+
const pixels = Math.floor(source.length / 2);
|
|
377
|
+
const out = new Uint8Array(pixels * 4);
|
|
378
|
+
for (let p = 0, s = 0, d = 0; p < pixels; p++, s += 2) {
|
|
379
|
+
out[d++] = source[s];
|
|
380
|
+
out[d++] = source[s];
|
|
381
|
+
out[d++] = source[s];
|
|
382
|
+
out[d++] = source[s + 1];
|
|
383
|
+
}
|
|
384
|
+
return out;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/** The legacy layouts `expandLegacy` rewrites, with their converter and resulting format. */
|
|
388
|
+
const LEGACY_EXPANSIONS = {
|
|
389
|
+
"bgr8unorm": {
|
|
390
|
+
convert: expand24To32,
|
|
391
|
+
pixelFormat: "bgrx8unorm",
|
|
392
|
+
scale: 4 / 3
|
|
393
|
+
},
|
|
394
|
+
"l8a8unorm": {
|
|
395
|
+
convert: convertL8A8ToBgra,
|
|
396
|
+
pixelFormat: "bgra8unorm",
|
|
397
|
+
scale: 2
|
|
398
|
+
}
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Rewrite a 24-bit or A8L8 texture payload into Carbon's 32-bit shape, subresource
|
|
403
|
+
* by subresource, when `values.expandLegacy` asks for it.
|
|
404
|
+
*/
|
|
405
|
+
function expandLegacyTexture(texture) {
|
|
406
|
+
const rule = LEGACY_EXPANSIONS[texture.pixelFormat];
|
|
407
|
+
if (!rule) return texture;
|
|
408
|
+
const parts = [];
|
|
409
|
+
let offset = 0;
|
|
410
|
+
const subresources = texture.subresources.map(sub => {
|
|
411
|
+
const data = rule.convert(texture.data.subarray(sub.offset, sub.offset + sub.byteLength));
|
|
412
|
+
parts.push(data);
|
|
413
|
+
const next = {
|
|
414
|
+
...sub,
|
|
415
|
+
offset,
|
|
416
|
+
byteLength: data.length,
|
|
417
|
+
rowPitch: Math.round(sub.rowPitch * rule.scale),
|
|
418
|
+
slicePitch: Math.round(sub.slicePitch * rule.scale)
|
|
419
|
+
};
|
|
420
|
+
offset += data.length;
|
|
421
|
+
return next;
|
|
422
|
+
});
|
|
423
|
+
const data = new Uint8Array(offset);
|
|
424
|
+
for (let i = 0, at = 0; i < parts.length; at += parts[i].length, i++) data.set(parts[i], at);
|
|
425
|
+
return {
|
|
426
|
+
...texture,
|
|
427
|
+
pixelFormat: rule.pixelFormat,
|
|
428
|
+
dataBytes: offset,
|
|
429
|
+
subresources,
|
|
430
|
+
data
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
function readDdsTexture(bytes, metadata, values = DEFAULT_VALUES) {
|
|
350
434
|
if (!metadata.pixelFormat) {
|
|
351
435
|
const error = new Error("dds: texture format is not recognized yet");
|
|
352
436
|
error.code = "CJS_FORMAT_OUTPUT_NOT_SUPPORTED";
|
|
@@ -354,7 +438,7 @@ function readDdsTexture(bytes, metadata) {
|
|
|
354
438
|
throw error;
|
|
355
439
|
}
|
|
356
440
|
const subresources = buildDdsSubresources(bytes, metadata);
|
|
357
|
-
|
|
441
|
+
const texture = {
|
|
358
442
|
payloadType: OUTPUT_TEXTURE,
|
|
359
443
|
sourceFormat: "dds",
|
|
360
444
|
width: metadata.width,
|
|
@@ -377,17 +461,18 @@ function readDdsTexture(bytes, metadata) {
|
|
|
377
461
|
metadata,
|
|
378
462
|
data: bytes.subarray(metadata.dataOffset, metadata.dataOffset + subresources.reduce((sum, entry) => sum + entry.byteLength, 0))
|
|
379
463
|
};
|
|
464
|
+
return values.expandLegacy ? expandLegacyTexture(texture) : texture;
|
|
380
465
|
}
|
|
381
466
|
|
|
382
|
-
/**
|
|
383
|
-
* Block formats one slice can be decoded from, by pixel format alone.
|
|
384
|
-
*
|
|
385
|
-
* Narrower than `canDecodeDdsToRgba`, which answers for a whole file and
|
|
386
|
-
* includes the uncompressed formats. A caller holding one slice of a volume has
|
|
387
|
-
* no file to ask about, only a format name.
|
|
388
|
-
*
|
|
389
|
-
* @param {String} pixelFormat
|
|
390
|
-
* @returns {Boolean}
|
|
467
|
+
/**
|
|
468
|
+
* Block formats one slice can be decoded from, by pixel format alone.
|
|
469
|
+
*
|
|
470
|
+
* Narrower than `canDecodeDdsToRgba`, which answers for a whole file and
|
|
471
|
+
* includes the uncompressed formats. A caller holding one slice of a volume has
|
|
472
|
+
* no file to ask about, only a format name.
|
|
473
|
+
*
|
|
474
|
+
* @param {String} pixelFormat
|
|
475
|
+
* @returns {Boolean}
|
|
391
476
|
*/
|
|
392
477
|
function canDecodeDdsBlockFormat(pixelFormat) {
|
|
393
478
|
return /^bc[1-7]/u.test(String(pixelFormat ?? ""));
|
|
@@ -833,20 +918,20 @@ function decode565(value) {
|
|
|
833
918
|
return [Math.round((value >>> 11 & 0x1f) * 255 / 31), Math.round((value >>> 5 & 0x3f) * 255 / 63), Math.round((value & 0x1f) * 255 / 31), 255];
|
|
834
919
|
}
|
|
835
920
|
|
|
836
|
-
/**
|
|
837
|
-
* The floating-point `D3DFORMAT` enumerators, which a legacy DDS stores as a
|
|
838
|
-
* NUMBER in the four-character-code field rather than as four characters.
|
|
839
|
-
*
|
|
840
|
-
* That is the whole trap. `DDPF_FOURCC` is set and the field reads `114`, which
|
|
841
|
-
* as text is `"r\0\0\0"` and matches nothing, so a reader that only compares
|
|
842
|
-
* character codes reports an unrecognized format for a file whose format is
|
|
843
|
-
* perfectly ordinary. Every one of these six is a plain uncompressed surface.
|
|
844
|
-
*
|
|
845
|
-
* Two were mapped when BC6H support landed and the other four were not, so
|
|
846
|
-
* `A16B16G16R16F` and `A32B32G32R32F` loaded while their one- and two-channel
|
|
847
|
-
* siblings did not. Found 2026-08-16 on
|
|
848
|
-
* `res:/dx9/model/ship/amarr/battleship/ab3/effects/ab3_traffic.dds`, a 256x9
|
|
849
|
-
* `R32F` gradient.
|
|
921
|
+
/**
|
|
922
|
+
* The floating-point `D3DFORMAT` enumerators, which a legacy DDS stores as a
|
|
923
|
+
* NUMBER in the four-character-code field rather than as four characters.
|
|
924
|
+
*
|
|
925
|
+
* That is the whole trap. `DDPF_FOURCC` is set and the field reads `114`, which
|
|
926
|
+
* as text is `"r\0\0\0"` and matches nothing, so a reader that only compares
|
|
927
|
+
* character codes reports an unrecognized format for a file whose format is
|
|
928
|
+
* perfectly ordinary. Every one of these six is a plain uncompressed surface.
|
|
929
|
+
*
|
|
930
|
+
* Two were mapped when BC6H support landed and the other four were not, so
|
|
931
|
+
* `A16B16G16R16F` and `A32B32G32R32F` loaded while their one- and two-channel
|
|
932
|
+
* siblings did not. Found 2026-08-16 on
|
|
933
|
+
* `res:/dx9/model/ship/amarr/battleship/ab3/effects/ab3_traffic.dds`, a 256x9
|
|
934
|
+
* `R32F` gradient.
|
|
850
935
|
*/
|
|
851
936
|
const LEGACY_D3DFMT_PIXEL_FORMATS = {
|
|
852
937
|
111: "r16float",
|
|
@@ -884,5 +969,5 @@ function getDdsPixelFormat(format) {
|
|
|
884
969
|
return "";
|
|
885
970
|
}
|
|
886
971
|
|
|
887
|
-
export { DEFAULT_VALUES, OUTPUT_IMAGE,
|
|
972
|
+
export { DEFAULT_VALUES, OUTPUT_IMAGE, OUTPUT_RAW, OUTPUT_RGBA, OUTPUT_TEXTURE, canDecodeDdsBlockFormat, convertL8A8ToBgra, decodeDdsSlice, expand24To32, inspectBytes, inspectWithValues, normalizeEmit, normalizeInputType, normalizeValues, probeSupportWithValues, readWithValues };
|
|
888
973
|
//# sourceMappingURL=helpers.js.map
|