@carbonenginejs/runtime 0.1.0-alpha.0 → 0.1.0-alpha.1
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/README.md +58 -125
- package/dist/audio/index.js +8 -1
- package/dist/audio/index.js.map +1 -1
- package/dist/audio/trinity/audio/AudActionLog/AudActionLogCB.js +84 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionLogCB.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecord.js +14 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecord.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordExecuteActionOnPlayingID.js +26 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordExecuteActionOnPlayingID.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordPostEvent.js +27 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordPostEvent.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetRTPC.js +27 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetRTPC.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetState.js +25 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetState.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetSwitch.js +26 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetSwitch.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/IAudActionLog.js +58 -0
- package/dist/audio/trinity/audio/AudActionLog/IAudActionLog.js.map +1 -0
- package/dist/audio/trinity/audio/AudManager.js +1 -1
- package/dist/audio/trinity/audio/AudManager.js.map +1 -1
- package/dist/audio/trinity/audio/{AudObstructionOcclusion.js → AudObstructionOcclusion/AudObstructionOcclusion.js} +8 -52
- package/dist/audio/trinity/audio/AudObstructionOcclusion/AudObstructionOcclusion.js.map +1 -0
- package/dist/audio/trinity/audio/AudObstructionOcclusion/EmitterState.js +17 -0
- package/dist/audio/trinity/audio/AudObstructionOcclusion/EmitterState.js.map +1 -0
- package/dist/audio/trinity/audio/AudObstructionOcclusion/FadingValue.js +46 -0
- package/dist/audio/trinity/audio/AudObstructionOcclusion/FadingValue.js.map +1 -0
- package/dist/audio/trinity/index.js +8 -1
- package/dist/audio/trinity/index.js.map +1 -1
- package/dist/character/CjsCharacterAppearanceConstruction.js +5 -0
- package/dist/character/CjsCharacterAppearanceConstruction.js.map +1 -1
- package/dist/character/CjsCharacterAppearanceManager.js +14 -0
- package/dist/character/CjsCharacterAppearanceManager.js.map +1 -1
- package/dist/character/CjsCharacterFoundationConstruction.js +5 -0
- package/dist/character/CjsCharacterFoundationConstruction.js.map +1 -1
- package/dist/character/CjsCharacterTexturePolicy.js +5 -0
- package/dist/character/CjsCharacterTexturePolicy.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesAppearanceAL.js +17 -0
- package/dist/character/gles/CjsCharacterGlesAppearanceAL.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesAtlasRenderer.js +2 -0
- package/dist/character/gles/CjsCharacterGlesAtlasRenderer.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesFoundationTranslator.js +5 -0
- package/dist/character/gles/CjsCharacterGlesFoundationTranslator.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesLegacyConstructionTranslator.js +5 -0
- package/dist/character/gles/CjsCharacterGlesLegacyConstructionTranslator.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesMorphDeformation.js +2 -0
- package/dist/character/gles/CjsCharacterGlesMorphDeformation.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesPaletteCompatibility.js +5 -0
- package/dist/character/gles/CjsCharacterGlesPaletteCompatibility.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesTriangleCoverage.js +5 -0
- package/dist/character/gles/CjsCharacterGlesTriangleCoverage.js.map +1 -1
- package/dist/character/webgl2/CjsCharacterWebgl2EffectRouter.js +9 -0
- package/dist/character/webgl2/CjsCharacterWebgl2EffectRouter.js.map +1 -1
- package/dist/global/blue/CjsScriptCallback.js +142 -0
- package/dist/global/blue/CjsScriptCallback.js.map +1 -0
- package/dist/global/blue/index.js +2 -0
- package/dist/global/blue/index.js.map +1 -0
- package/dist/global/consts/renderContext/formats.js +51 -1
- package/dist/global/consts/renderContext/formats.js.map +1 -1
- package/dist/global/consts/renderContext/index.js +2 -2
- package/dist/global/consts/renderContext/renderStates.js +16 -1
- package/dist/global/consts/renderContext/renderStates.js.map +1 -1
- package/dist/global/contracts/index.js +0 -1
- package/dist/global/contracts/index.js.map +1 -1
- package/dist/global/index.js +4 -3
- package/dist/global/index.js.map +1 -1
- package/dist/global/math/index.js +2 -0
- package/dist/global/math/index.js.map +1 -1
- package/dist/global/math/mesh.js +70 -16
- package/dist/global/math/mesh.js.map +1 -1
- package/dist/global/math/noise.js +47 -68
- package/dist/global/math/noise.js.map +1 -1
- package/dist/global/math/pool.js +18 -3
- package/dist/global/math/pool.js.map +1 -1
- package/dist/global/math/random.js +52 -0
- package/dist/global/math/random.js.map +1 -0
- package/dist/global/math/tri3.js +18 -4
- package/dist/global/math/tri3.js.map +1 -1
- package/dist/global/utils/bytes.js +22 -4
- package/dist/global/utils/bytes.js.map +1 -1
- package/dist/global/utils/checksum.js +80 -0
- package/dist/global/utils/checksum.js.map +1 -0
- package/dist/global/utils/errors/CjsCancellationError.js +36 -0
- package/dist/global/utils/errors/CjsCancellationError.js.map +1 -0
- package/dist/global/utils/errors/CjsError.js +21 -52
- package/dist/global/utils/errors/CjsError.js.map +1 -1
- package/dist/global/utils/errors/abort.js +1 -1
- package/dist/global/utils/errors/abort.js.map +1 -1
- package/dist/global/utils/errors/index.js +2 -1
- package/dist/global/utils/errors/index.js.map +1 -1
- package/dist/global/utils/index.js +4 -2
- package/dist/global/utils/index.js.map +1 -1
- package/dist/index.js +95 -35
- package/dist/index.js.map +1 -1
- package/dist/input/Tr2MainWindow.js +7 -9
- package/dist/input/Tr2MainWindow.js.map +1 -1
- package/dist/resource/CjsResMan.js +33 -39
- package/dist/resource/CjsResMan.js.map +1 -1
- package/dist/resource/CjsResource.js +19 -5
- package/dist/resource/CjsResource.js.map +1 -1
- package/dist/resource/audio/AudioGeometryResData.js +22 -27
- package/dist/resource/audio/AudioGeometryResData.js.map +1 -1
- package/dist/resource/audio/CjsAudioRes.js +4 -5
- package/dist/resource/audio/CjsAudioRes.js.map +1 -1
- package/dist/resource/format/CjsBitReader.js +263 -0
- package/dist/resource/format/CjsBitReader.js.map +1 -0
- package/dist/resource/format/CjsByteReader.js +130 -125
- package/dist/resource/format/CjsByteReader.js.map +1 -1
- package/dist/resource/format/CjsFormat.js +11 -4
- package/dist/resource/format/CjsFormat.js.map +1 -1
- package/dist/resource/format/CjsFormatError.js +37 -1
- package/dist/resource/format/CjsFormatError.js.map +1 -1
- package/dist/resource/format/CjsResourceProbe.js +41 -37
- package/dist/resource/format/CjsResourceProbe.js.map +1 -1
- package/dist/resource/format/carbonRecordGuard.js +33 -0
- package/dist/resource/format/carbonRecordGuard.js.map +1 -0
- package/dist/resource/format/imageSignatures.js +202 -0
- package/dist/resource/format/imageSignatures.js.map +1 -0
- package/dist/resource/format/index.js +2 -1
- package/dist/resource/format/index.js.map +1 -1
- package/dist/resource/format/jsonPolicies.js +180 -0
- package/dist/resource/format/jsonPolicies.js.map +1 -0
- package/dist/resource/formats/black/core/helpers.js +18 -29
- package/dist/resource/formats/black/core/helpers.js.map +1 -1
- package/dist/resource/formats/bnk/CjsBnkFormat.js +4 -3
- package/dist/resource/formats/bnk/CjsBnkFormat.js.map +1 -1
- package/dist/resource/formats/bnk/core/WwiseCursor.js +218 -0
- package/dist/resource/formats/bnk/core/WwiseCursor.js.map +1 -0
- package/dist/resource/formats/bnk/core/busNodes.js +2 -1
- package/dist/resource/formats/bnk/core/busNodes.js.map +1 -1
- package/dist/resource/formats/bnk/core/effectNodes.js +2 -1
- package/dist/resource/formats/bnk/core/effectNodes.js.map +1 -1
- package/dist/resource/formats/bnk/core/eventAction.js +15 -93
- package/dist/resource/formats/bnk/core/eventAction.js.map +1 -1
- package/dist/resource/formats/bnk/core/globalSettings.js +19 -94
- package/dist/resource/formats/bnk/core/globalSettings.js.map +1 -1
- package/dist/resource/formats/bnk/core/helpers.js +2 -48
- package/dist/resource/formats/bnk/core/helpers.js.map +1 -1
- package/dist/resource/formats/bnk/core/musicNodes.js +42 -134
- package/dist/resource/formats/bnk/core/musicNodes.js.map +1 -1
- package/dist/resource/formats/bnk/core/nodeBase.js +20 -111
- package/dist/resource/formats/bnk/core/nodeBase.js.map +1 -1
- package/dist/resource/formats/bnk/core/sfxNodes.js +2 -1
- package/dist/resource/formats/bnk/core/sfxNodes.js.map +1 -1
- package/dist/resource/formats/cmf/CjsCmfFormat.js +242 -228
- package/dist/resource/formats/cmf/CjsCmfFormat.js.map +1 -1
- package/dist/resource/formats/cmf/core/binary.js +54 -60
- package/dist/resource/formats/cmf/core/binary.js.map +1 -1
- package/dist/resource/formats/dds/CjsDdsFormat.js +5 -3
- package/dist/resource/formats/dds/CjsDdsFormat.js.map +1 -1
- package/dist/resource/formats/dds/core/bc6h.js +16 -18
- package/dist/resource/formats/dds/core/bc6h.js.map +1 -1
- package/dist/resource/formats/dds/core/bc7.js +28 -24
- package/dist/resource/formats/dds/core/bc7.js.map +1 -1
- package/dist/resource/formats/dds/core/helpers.js +7 -133
- package/dist/resource/formats/dds/core/helpers.js.map +1 -1
- package/dist/resource/formats/dxbc/CjsDxbcFormat.js +3 -2
- package/dist/resource/formats/dxbc/CjsDxbcFormat.js.map +1 -1
- package/dist/resource/formats/dxbc/core/helpers.js +4 -32
- package/dist/resource/formats/dxbc/core/helpers.js.map +1 -1
- package/dist/resource/formats/fbx/CjsFbxFormat.js +11 -0
- package/dist/resource/formats/fbx/CjsFbxFormat.js.map +1 -1
- package/dist/resource/formats/fbx/core/helpers.js +18 -12
- package/dist/resource/formats/fbx/core/helpers.js.map +1 -1
- package/dist/resource/formats/flac/CjsFlacFormat.js +4 -9
- package/dist/resource/formats/flac/CjsFlacFormat.js.map +1 -1
- package/dist/resource/formats/flac/core/helpers.js +1 -62
- package/dist/resource/formats/flac/core/helpers.js.map +1 -1
- package/dist/resource/formats/gif/CjsGifFormat.js +4 -9
- package/dist/resource/formats/gif/CjsGifFormat.js.map +1 -1
- package/dist/resource/formats/gif/core/helpers.js +1 -63
- package/dist/resource/formats/gif/core/helpers.js.map +1 -1
- package/dist/resource/formats/gltf/CjsGltfFormat.js +4 -3
- package/dist/resource/formats/gltf/CjsGltfFormat.js.map +1 -1
- package/dist/resource/formats/gltf/core/helpers.js +3 -19
- package/dist/resource/formats/gltf/core/helpers.js.map +1 -1
- package/dist/resource/formats/gr2/CjsGr2Format.js +105 -92
- package/dist/resource/formats/gr2/CjsGr2Format.js.map +1 -1
- package/dist/resource/formats/gr2/core/container.js +1 -10
- package/dist/resource/formats/gr2/core/container.js.map +1 -1
- package/dist/resource/formats/gr2/core/helpers.js +24 -35
- package/dist/resource/formats/gr2/core/helpers.js.map +1 -1
- package/dist/resource/formats/gr2/core/shared.js +193 -189
- package/dist/resource/formats/gr2/core/shared.js.map +1 -1
- package/dist/resource/formats/hlsl/CjsHlslFormat.js +4 -3
- package/dist/resource/formats/hlsl/CjsHlslFormat.js.map +1 -1
- package/dist/resource/formats/hlsl/core/helpers.js +1 -30
- package/dist/resource/formats/hlsl/core/helpers.js.map +1 -1
- package/dist/resource/formats/jpeg/CjsJpegFormat.js +5 -3
- package/dist/resource/formats/jpeg/CjsJpegFormat.js.map +1 -1
- package/dist/resource/formats/jpeg/core/helpers.js +7 -134
- package/dist/resource/formats/jpeg/core/helpers.js.map +1 -1
- package/dist/resource/formats/mp3/CjsMp3Format.js +4 -9
- package/dist/resource/formats/mp3/CjsMp3Format.js.map +1 -1
- package/dist/resource/formats/mp3/core/helpers.js +1 -64
- package/dist/resource/formats/mp3/core/helpers.js.map +1 -1
- package/dist/resource/formats/mp4/CjsMp4Format.js +4 -9
- package/dist/resource/formats/mp4/CjsMp4Format.js.map +1 -1
- package/dist/resource/formats/mp4/core/helpers.js +1 -73
- package/dist/resource/formats/mp4/core/helpers.js.map +1 -1
- package/dist/resource/formats/obj/CjsObjFormat.js +4 -3
- package/dist/resource/formats/obj/CjsObjFormat.js.map +1 -1
- package/dist/resource/formats/obj/core/helpers.js +93 -115
- package/dist/resource/formats/obj/core/helpers.js.map +1 -1
- package/dist/resource/formats/ogg/CjsOggFormat.js +4 -3
- package/dist/resource/formats/ogg/CjsOggFormat.js.map +1 -1
- package/dist/resource/formats/ogg/core/helpers.js +1 -15
- package/dist/resource/formats/ogg/core/helpers.js.map +1 -1
- package/dist/resource/formats/ogg/core/vorbis.js +138 -144
- package/dist/resource/formats/ogg/core/vorbis.js.map +1 -1
- package/dist/resource/formats/pickle/CjsPickleFormat.js +83 -114
- package/dist/resource/formats/pickle/CjsPickleFormat.js.map +1 -1
- package/dist/resource/formats/png/CjsPngFormat.js +5 -3
- package/dist/resource/formats/png/CjsPngFormat.js.map +1 -1
- package/dist/resource/formats/png/core/helpers.js +13 -152
- package/dist/resource/formats/png/core/helpers.js.map +1 -1
- package/dist/resource/formats/png/core/writer.js +3 -27
- package/dist/resource/formats/png/core/writer.js.map +1 -1
- package/dist/resource/formats/red/core/helpers.js +19 -29
- package/dist/resource/formats/red/core/helpers.js.map +1 -1
- package/dist/resource/formats/stl/CjsStlFormat.js +158 -147
- package/dist/resource/formats/stl/CjsStlFormat.js.map +1 -1
- package/dist/resource/formats/stl/core/helpers.js +44 -66
- package/dist/resource/formats/stl/core/helpers.js.map +1 -1
- package/dist/resource/formats/tga/CjsTgaFormat.js +5 -3
- package/dist/resource/formats/tga/CjsTgaFormat.js.map +1 -1
- package/dist/resource/formats/tga/core/helpers.js +7 -153
- package/dist/resource/formats/tga/core/helpers.js.map +1 -1
- package/dist/resource/formats/vta/CjsVtaFormat.js +4 -3
- package/dist/resource/formats/vta/CjsVtaFormat.js.map +1 -1
- package/dist/resource/formats/vta/core/helpers.js +1 -17
- package/dist/resource/formats/vta/core/helpers.js.map +1 -1
- package/dist/resource/formats/wav/CjsWavFormat.js +4 -3
- package/dist/resource/formats/wav/CjsWavFormat.js.map +1 -1
- package/dist/resource/formats/wav/core/helpers.js +1 -15
- package/dist/resource/formats/wav/core/helpers.js.map +1 -1
- package/dist/resource/formats/webgl/CjsWebglFormat.js +4 -3
- package/dist/resource/formats/webgl/CjsWebglFormat.js.map +1 -1
- package/dist/resource/formats/webgl/core/glsl/DxbcGlslEmitter.js +52 -4
- package/dist/resource/formats/webgl/core/glsl/DxbcGlslEmitter.js.map +1 -1
- package/dist/resource/formats/webgl/core/helpers.js +39 -68
- package/dist/resource/formats/webgl/core/helpers.js.map +1 -1
- package/dist/resource/formats/webgpu/CjsWebgpuFormat.js +4 -3
- package/dist/resource/formats/webgpu/CjsWebgpuFormat.js.map +1 -1
- package/dist/resource/formats/webgpu/core/helpers.js +4 -30
- package/dist/resource/formats/webgpu/core/helpers.js.map +1 -1
- package/dist/resource/formats/webm/CjsWebmFormat.js +4 -9
- package/dist/resource/formats/webm/CjsWebmFormat.js.map +1 -1
- package/dist/resource/formats/webm/core/helpers.js +1 -73
- package/dist/resource/formats/webm/core/helpers.js.map +1 -1
- package/dist/resource/formats/webp/CjsWebpFormat.js +4 -9
- package/dist/resource/formats/webp/CjsWebpFormat.js.map +1 -1
- package/dist/resource/formats/webp/core/helpers.js +1 -62
- package/dist/resource/formats/webp/core/helpers.js.map +1 -1
- package/dist/resource/formats/wem/CjsWemFormat.js +4 -3
- package/dist/resource/formats/wem/CjsWemFormat.js.map +1 -1
- package/dist/resource/formats/wem/core/bitStream.js +83 -106
- package/dist/resource/formats/wem/core/bitStream.js.map +1 -1
- package/dist/resource/formats/wem/core/codebookLibrary.js +52 -52
- package/dist/resource/formats/wem/core/codebookLibrary.js.map +1 -1
- package/dist/resource/formats/wem/core/helpers.js +1 -15
- package/dist/resource/formats/wem/core/helpers.js.map +1 -1
- package/dist/resource/formats/wem/core/wemToOgg.js +67 -67
- package/dist/resource/formats/wem/core/wemToOgg.js.map +1 -1
- package/dist/resource/geometry/MeshDecalData.js +23 -25
- package/dist/resource/geometry/MeshDecalData.js.map +1 -1
- package/dist/resource/geometry/MeshDecalLodData.js +14 -23
- package/dist/resource/geometry/MeshDecalLodData.js.map +1 -1
- package/dist/resource/geometry/TriGeometryRes.js +299 -284
- package/dist/resource/geometry/TriGeometryRes.js.map +1 -1
- package/dist/resource/geometry/TriGeometryResAreaData.js +30 -31
- package/dist/resource/geometry/TriGeometryResAreaData.js.map +1 -1
- package/dist/resource/geometry/TriGeometryResJointData.js +16 -24
- package/dist/resource/geometry/TriGeometryResJointData.js.map +1 -1
- package/dist/resource/geometry/TriGeometryResLodData.js +50 -41
- package/dist/resource/geometry/TriGeometryResLodData.js.map +1 -1
- package/dist/resource/geometry/TriGeometryResMeshData.js +32 -32
- package/dist/resource/geometry/TriGeometryResMeshData.js.map +1 -1
- package/dist/resource/geometry/TriGeometryResSkeletonData.js +14 -23
- package/dist/resource/geometry/TriGeometryResSkeletonData.js.map +1 -1
- package/dist/resource/geometry/TriJointBinding.js +16 -24
- package/dist/resource/geometry/TriJointBinding.js.map +1 -1
- package/dist/resource/geometry/TriMorphTargetGeometryConstants.js +22 -27
- package/dist/resource/geometry/TriMorphTargetGeometryConstants.js.map +1 -1
- package/dist/resource/geometry/TriRtGeometryConstants.js +50 -41
- package/dist/resource/geometry/TriRtGeometryConstants.js.map +1 -1
- package/dist/resource/geometry/granny/GStateBindingCallbackData.js +12 -22
- package/dist/resource/geometry/granny/GStateBindingCallbackData.js.map +1 -1
- package/dist/resource/geometry/granny/Tr2GrannyIntersectionResult.js +30 -31
- package/dist/resource/geometry/granny/Tr2GrannyIntersectionResult.js.map +1 -1
- package/dist/resource/index.js +1 -1
- package/dist/resource/shader/reflection/Tr2EffectConstant.js +16 -17
- package/dist/resource/shader/reflection/Tr2EffectConstant.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectDescription.js +26 -28
- package/dist/resource/shader/reflection/Tr2EffectDescription.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectLibrary.js +24 -25
- package/dist/resource/shader/reflection/Tr2EffectLibrary.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js +21 -22
- package/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectResource.js +25 -26
- package/dist/resource/shader/reflection/Tr2EffectResource.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectStageInput.js +69 -72
- package/dist/resource/shader/reflection/Tr2EffectStageInput.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectTechnique.js +17 -18
- package/dist/resource/shader/reflection/Tr2EffectTechnique.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2Pass.js +42 -43
- package/dist/resource/shader/reflection/Tr2Pass.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2RenderStateSetup.js +26 -5
- package/dist/resource/shader/reflection/Tr2RenderStateSetup.js.map +1 -1
- package/dist/resource/shader/reflection/carbonRecordFields.js +87 -90
- package/dist/resource/shader/reflection/carbonRecordFields.js.map +1 -1
- package/dist/resource/shader/sampler/Tr2SamplerSetup.js +32 -34
- package/dist/resource/shader/sampler/Tr2SamplerSetup.js.map +1 -1
- package/dist/resource/texture/CjsTextureArrayRes.js +1 -6
- package/dist/resource/texture/CjsTextureArrayRes.js.map +1 -1
- package/dist/resource/texture/Tr2TextureLodManager.js +35 -27
- package/dist/resource/texture/Tr2TextureLodManager.js.map +1 -1
- package/dist/resource/texture/Tr2TextureLodUpdateRequest.js +16 -24
- package/dist/resource/texture/Tr2TextureLodUpdateRequest.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePackChannel.js +16 -24
- package/dist/resource/texture/Tr2TexturePackChannel.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipeline.js +24 -20
- package/dist/resource/texture/Tr2TexturePipeline.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineParams.js +14 -23
- package/dist/resource/texture/Tr2TexturePipelineParams.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepCompress.js +18 -25
- package/dist/resource/texture/Tr2TexturePipelineStepCompress.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepGenerateMips.js +11 -16
- package/dist/resource/texture/Tr2TexturePipelineStepGenerateMips.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepLimitSize.js +14 -23
- package/dist/resource/texture/Tr2TexturePipelineStepLimitSize.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepLoad.js +12 -22
- package/dist/resource/texture/Tr2TexturePipelineStepLoad.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepPack.js +38 -26
- package/dist/resource/texture/Tr2TexturePipelineStepPack.js.map +1 -1
- package/dist/resource/worker/CjsResManMainThreadLoader.js +2 -5
- package/dist/resource/worker/CjsResManMainThreadLoader.js.map +1 -1
- package/dist/resource/worker/CjsResManWorkerLoader.js +6 -7
- package/dist/resource/worker/CjsResManWorkerLoader.js.map +1 -1
- package/dist/resource/worker/protocol.js +18 -1
- package/dist/resource/worker/protocol.js.map +1 -1
- package/dist/sof/EveSOF.js +2 -222
- package/dist/sof/EveSOF.js.map +1 -1
- package/dist/sof/SofDocumentBuilder.js +205 -0
- package/dist/sof/SofDocumentBuilder.js.map +1 -0
- package/dist/sof/faction/ErrSOFFactionColorSetTypeNotFound.js +16 -0
- package/dist/sof/faction/ErrSOFFactionColorSetTypeNotFound.js.map +1 -0
- package/dist/sof/faction/ErrSOFFactionColorSetTypeUnknown.js +16 -0
- package/dist/sof/faction/ErrSOFFactionColorSetTypeUnknown.js.map +1 -0
- package/dist/sof/faction/EveSOFDataFactionColorSet.js +3 -27
- package/dist/sof/faction/EveSOFDataFactionColorSet.js.map +1 -1
- package/dist/sof/faction/index.js +3 -1
- package/dist/sof/faction/index.js.map +1 -1
- package/dist/sof/generic/ErrSOFAreaShaderNotFound.js +18 -0
- package/dist/sof/generic/ErrSOFAreaShaderNotFound.js.map +1 -0
- package/dist/sof/generic/ErrSOFDecalShaderNotFound.js +18 -0
- package/dist/sof/generic/ErrSOFDecalShaderNotFound.js.map +1 -0
- package/dist/sof/generic/ErrSOFMaterialPrefixNotFound.js +21 -0
- package/dist/sof/generic/ErrSOFMaterialPrefixNotFound.js.map +1 -0
- package/dist/sof/generic/ErrSOFPatternMaterialPrefixNotFound.js +21 -0
- package/dist/sof/generic/ErrSOFPatternMaterialPrefixNotFound.js.map +1 -0
- package/dist/sof/generic/EveSOFDataGeneric.js +5 -69
- package/dist/sof/generic/EveSOFDataGeneric.js.map +1 -1
- package/dist/sof/generic/index.js +5 -1
- package/dist/sof/generic/index.js.map +1 -1
- package/dist/sof/index.js +23 -7
- package/dist/sof/index.js.map +1 -1
- package/dist/sof/pattern/ErrSOFProjectionNotFound.js +20 -0
- package/dist/sof/pattern/ErrSOFProjectionNotFound.js.map +1 -0
- package/dist/sof/pattern/EveSOFDataPattern.js +2 -17
- package/dist/sof/pattern/EveSOFDataPattern.js.map +1 -1
- package/dist/sof/pattern/index.js +2 -1
- package/dist/sof/pattern/index.js.map +1 -1
- package/dist/sof/shared/ErrSOFAreaTypeNotFound.js +16 -0
- package/dist/sof/shared/ErrSOFAreaTypeNotFound.js.map +1 -0
- package/dist/sof/shared/ErrSOFLogoSetTypeNotFound.js +16 -0
- package/dist/sof/shared/ErrSOFLogoSetTypeNotFound.js.map +1 -0
- package/dist/sof/shared/ErrSOFLogoSetTypeUnknown.js +16 -0
- package/dist/sof/shared/ErrSOFLogoSetTypeUnknown.js.map +1 -0
- package/dist/sof/shared/EveSOFDataArea.js +2 -13
- package/dist/sof/shared/EveSOFDataArea.js.map +1 -1
- package/dist/sof/shared/EveSOFDataLogoSet.js +3 -27
- package/dist/sof/shared/EveSOFDataLogoSet.js.map +1 -1
- package/dist/sof/shared/EveSOFDataParameter.js +2 -146
- package/dist/sof/shared/EveSOFDataParameter.js.map +1 -1
- package/dist/sof/shared/EveSOFDataParameterBool.js +40 -0
- package/dist/sof/shared/EveSOFDataParameterBool.js.map +1 -0
- package/dist/sof/shared/EveSOFDataParameterColor.js +36 -0
- package/dist/sof/shared/EveSOFDataParameterColor.js.map +1 -0
- package/dist/sof/shared/EveSOFDataParameterFloat.js +37 -0
- package/dist/sof/shared/EveSOFDataParameterFloat.js.map +1 -0
- package/dist/sof/shared/EveSOFDataParameterInt.js +37 -0
- package/dist/sof/shared/EveSOFDataParameterInt.js.map +1 -0
- package/dist/sof/shared/EveSOFDataParameterVector2.js +37 -0
- package/dist/sof/shared/EveSOFDataParameterVector2.js.map +1 -0
- package/dist/sof/shared/EveSOFDataParameterVector3.js +37 -0
- package/dist/sof/shared/EveSOFDataParameterVector3.js.map +1 -0
- package/dist/sof/shared/{EveSOFDataSpotlightAttachment.js → EveSOFDataSpotLightAttachment.js} +1 -1
- package/dist/sof/shared/{EveSOFDataSpotlightAttachment.js.map → EveSOFDataSpotLightAttachment.js.map} +1 -1
- package/dist/sof/shared/index.js +13 -4
- package/dist/sof/shared/index.js.map +1 -1
- package/dist/sof/sofDocumentValues.js +33 -0
- package/dist/sof/sofDocumentValues.js.map +1 -0
- package/dist/trinity/controllers/ITr2Controller/ITr2ActionController.js +168 -0
- package/dist/trinity/controllers/ITr2Controller/ITr2ActionController.js.map +1 -0
- package/dist/trinity/controllers/{ITr2Controller.js → ITr2Controller/ITr2Controller.js} +2 -134
- package/dist/trinity/controllers/ITr2Controller/ITr2Controller.js.map +1 -0
- package/dist/trinity/controllers/Tr2Controller.js +2 -1
- package/dist/trinity/controllers/Tr2Controller.js.map +1 -1
- package/dist/trinity/controllers/Tr2ControllerReference.js +2 -1
- package/dist/trinity/controllers/Tr2ControllerReference.js.map +1 -1
- package/dist/trinity/controllers/action/ITr2ControllerAction.js +2 -1
- package/dist/trinity/controllers/action/ITr2ControllerAction.js.map +1 -1
- package/dist/trinity/controllers/action/Tr2ActionSpawnParticles.js +10 -9
- package/dist/trinity/controllers/action/Tr2ActionSpawnParticles.js.map +1 -1
- package/dist/trinity/controllers/expression/CjsControllerExpressionCompileError.js +26 -0
- package/dist/trinity/controllers/expression/CjsControllerExpressionCompileError.js.map +1 -0
- package/dist/trinity/controllers/expression/CjsControllerExpressionEvaluateError.js +24 -0
- package/dist/trinity/controllers/expression/CjsControllerExpressionEvaluateError.js.map +1 -0
- package/dist/trinity/controllers/expression/CjsControllerExpressionParser.js +387 -0
- package/dist/trinity/controllers/expression/CjsControllerExpressionParser.js.map +1 -0
- package/dist/trinity/controllers/expression/CjsControllerExpressionProgram.js +4 -1011
- package/dist/trinity/controllers/expression/CjsControllerExpressionProgram.js.map +1 -1
- package/dist/trinity/controllers/expression/expressionRuntime.js +605 -0
- package/dist/trinity/controllers/expression/expressionRuntime.js.map +1 -0
- package/dist/trinity/controllers/index.js +5 -2
- package/dist/trinity/controllers/index.js.map +1 -1
- package/dist/trinity/controllers/state/ITr2StateMachineStateFinalizer.js +2 -1
- package/dist/trinity/controllers/state/ITr2StateMachineStateFinalizer.js.map +1 -1
- package/dist/trinity/controllers/timeline/Tr2TimelineController.js +2 -1
- package/dist/trinity/controllers/timeline/Tr2TimelineController.js.map +1 -1
- package/dist/trinity/core/ITr2Updateable.js +2 -1
- package/dist/trinity/core/ITr2Updateable.js.map +1 -1
- package/dist/trinity/core/Tr2Blitter.js +6 -3
- package/dist/trinity/core/Tr2Blitter.js.map +1 -1
- package/dist/trinity/core/Tr2Denoiser.js +256 -0
- package/dist/trinity/core/Tr2Denoiser.js.map +1 -0
- package/dist/trinity/core/Tr2GpuResourcePool/GpuResourceHandle.js +115 -0
- package/dist/trinity/core/Tr2GpuResourcePool/GpuResourceHandle.js.map +1 -0
- package/dist/trinity/core/Tr2GpuResourcePool/TextureSize2D.js +79 -0
- package/dist/trinity/core/Tr2GpuResourcePool/TextureSize2D.js.map +1 -0
- package/dist/trinity/core/{Tr2GpuResourcePool.js → Tr2GpuResourcePool/Tr2GpuResourcePool.js} +63 -151
- package/dist/trinity/core/Tr2GpuResourcePool/Tr2GpuResourcePool.js.map +1 -0
- package/dist/trinity/core/{Tr2QuadRenderer.js → Tr2QuadRenderer/Tr2QuadRenderer.js} +8 -30
- package/dist/trinity/core/Tr2QuadRenderer/Tr2QuadRenderer.js.map +1 -0
- package/dist/trinity/core/Tr2QuadRenderer/Tr2QuadRendererEffectRecord.js +38 -0
- package/dist/trinity/core/Tr2QuadRenderer/Tr2QuadRendererEffectRecord.js.map +1 -0
- package/dist/trinity/core/Tr2RenderUtils.js +20 -3
- package/dist/trinity/core/Tr2RenderUtils.js.map +1 -1
- package/dist/trinity/core/Tr2Renderer.js +146 -1
- package/dist/trinity/core/Tr2Renderer.js.map +1 -1
- package/dist/trinity/core/Tr2ShadowMap.js +135 -14
- package/dist/trinity/core/Tr2ShadowMap.js.map +1 -1
- package/dist/trinity/core/{Tr2TextureArray.js → Tr2TextureArray/Tr2TextureArray.js} +3 -58
- package/dist/trinity/core/Tr2TextureArray/Tr2TextureArray.js.map +1 -0
- package/dist/trinity/core/Tr2TextureArray/Tr2TextureArrayElement.js +61 -0
- package/dist/trinity/core/Tr2TextureArray/Tr2TextureArrayElement.js.map +1 -0
- package/dist/trinity/core/batch/TriRenderBatch/DefaultKeyGenerator.js +26 -0
- package/dist/trinity/core/batch/TriRenderBatch/DefaultKeyGenerator.js.map +1 -0
- package/dist/trinity/core/batch/TriRenderBatch/EffectKeyGenerator.js +29 -0
- package/dist/trinity/core/batch/TriRenderBatch/EffectKeyGenerator.js.map +1 -0
- package/dist/trinity/core/batch/{ITriRenderBatchAccumulator.js → TriRenderBatch/ITriRenderBatchAccumulator.js} +30 -30
- package/dist/trinity/core/batch/TriRenderBatch/ITriRenderBatchAccumulator.js.map +1 -0
- package/dist/trinity/core/batch/{Tr2RenderBatch.js → TriRenderBatch/Tr2RenderBatch.js} +81 -154
- package/dist/trinity/core/batch/TriRenderBatch/Tr2RenderBatch.js.map +1 -0
- package/dist/trinity/core/batch/{TriRenderBatchAccumulator.js → TriRenderBatch/TriRenderBatchAccumulator.js} +7 -38
- package/dist/trinity/core/batch/TriRenderBatch/TriRenderBatchAccumulator.js.map +1 -0
- package/dist/trinity/core/batch/TriRenderBatch/TriRenderBatchAreaBlock.js +61 -0
- package/dist/trinity/core/batch/TriRenderBatch/TriRenderBatchAreaBlock.js.map +1 -0
- package/dist/trinity/core/batch/TriRenderBatch/TriRenderBatchAreaBlocksWithSharedMaterial.js +40 -0
- package/dist/trinity/core/batch/TriRenderBatch/TriRenderBatchAreaBlocksWithSharedMaterial.js.map +1 -0
- package/dist/trinity/core/batch/TriRenderBatchMap.js +6 -1
- package/dist/trinity/core/batch/TriRenderBatchMap.js.map +1 -1
- package/dist/trinity/core/context/Tr2RenderContext.js +75 -57
- package/dist/trinity/core/context/Tr2RenderContext.js.map +1 -1
- package/dist/trinity/core/context/Tr2VisibilityResults/Tr2VisibilityEvent.js +67 -0
- package/dist/trinity/core/context/Tr2VisibilityResults/Tr2VisibilityEvent.js.map +1 -0
- package/dist/trinity/core/context/Tr2VisibilityResults/Tr2VisibilityResults.js +50 -0
- package/dist/trinity/core/context/Tr2VisibilityResults/Tr2VisibilityResults.js.map +1 -0
- package/dist/trinity/core/device/Tr2DepthStencil.js +186 -13
- package/dist/trinity/core/device/Tr2DepthStencil.js.map +1 -1
- package/dist/trinity/core/device/{Tr2RingBuffer.js → Tr2RingBuffer/Tr2RingBuffer.js} +27 -79
- package/dist/trinity/core/device/Tr2RingBuffer/Tr2RingBuffer.js.map +1 -0
- package/dist/trinity/core/device/Tr2RingBuffer/Tr2RingBufferOffsets.js +114 -0
- package/dist/trinity/core/device/Tr2RingBuffer/Tr2RingBufferOffsets.js.map +1 -0
- package/dist/trinity/core/device/{Tr2SuballocatedBuffer.js → Tr2SuballocatedBuffer/Tr2SuballocatedBuffer.js} +5 -59
- package/dist/trinity/core/device/Tr2SuballocatedBuffer/Tr2SuballocatedBuffer.js.map +1 -0
- package/dist/trinity/core/device/Tr2SuballocatedBuffer/Tr2SuballocatedBufferAllocation.js +80 -0
- package/dist/trinity/core/device/Tr2SuballocatedBuffer/Tr2SuballocatedBufferAllocation.js.map +1 -0
- package/dist/trinity/core/index.js +42 -15
- package/dist/trinity/core/index.js.map +1 -1
- package/dist/trinity/core/lighting/Tr2LightManager.js +6 -1
- package/dist/trinity/core/lighting/Tr2LightManager.js.map +1 -1
- package/dist/trinity/core/mesh/{ITr2ImpostorSource.js → ITr2ImpostorSource/ITr2ImpostorSource.js} +6 -28
- package/dist/trinity/core/mesh/ITr2ImpostorSource/ITr2ImpostorSource.js.map +1 -0
- package/dist/trinity/core/mesh/ITr2ImpostorSource/ITr2ImpostorSourceImpostorHash.js +32 -0
- package/dist/trinity/core/mesh/ITr2ImpostorSource/ITr2ImpostorSourceImpostorHash.js.map +1 -0
- package/dist/trinity/core/mesh/{ITr2InstanceData.js → ITr2InstanceData/ITr2InstanceData.js} +5 -29
- package/dist/trinity/core/mesh/ITr2InstanceData/ITr2InstanceData.js.map +1 -0
- package/dist/trinity/core/mesh/ITr2InstanceData/ITr2InstanceDataInstanceData.js +33 -0
- package/dist/trinity/core/mesh/ITr2InstanceData/ITr2InstanceDataInstanceData.js.map +1 -0
- package/dist/trinity/core/mesh/Tr2DirectInstanceData.js +2 -1
- package/dist/trinity/core/mesh/Tr2DirectInstanceData.js.map +1 -1
- package/dist/trinity/core/mesh/Tr2MeshBase.js +7 -1
- package/dist/trinity/core/mesh/Tr2MeshBase.js.map +1 -1
- package/dist/trinity/core/mesh/Tr2RuntimeInstanceData.js +2 -1
- package/dist/trinity/core/mesh/Tr2RuntimeInstanceData.js.map +1 -1
- package/dist/trinity/core/mesh/TriGeometryResAllocations.js +6 -2
- package/dist/trinity/core/mesh/TriGeometryResAllocations.js.map +1 -1
- package/dist/trinity/core/rawData/CjsConstantLayout.js +196 -0
- package/dist/trinity/core/rawData/CjsConstantLayout.js.map +1 -0
- package/dist/trinity/core/rawData/CjsPerFrameLayouts.js +8 -3
- package/dist/trinity/core/rawData/CjsPerFrameLayouts.js.map +1 -1
- package/dist/trinity/core/rawData/CjsPerObjectLayouts.js +40 -732
- package/dist/trinity/core/rawData/CjsPerObjectLayouts.js.map +1 -1
- package/dist/trinity/core/rawData/layouts/CjsEveBasicLayout.js +34 -0
- package/dist/trinity/core/rawData/layouts/CjsEveBasicLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveBoosterSetLayout.js +69 -0
- package/dist/trinity/core/rawData/layouts/CjsEveBoosterSetLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveChildBoosterSetLayout.js +59 -0
- package/dist/trinity/core/rawData/layouts/CjsEveChildBoosterSetLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveChildBulletStormLayout.js +37 -0
- package/dist/trinity/core/rawData/layouts/CjsEveChildBulletStormLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveChildSpherePinLayout.js +44 -0
- package/dist/trinity/core/rawData/layouts/CjsEveChildSpherePinLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveLensflareLayout.js +31 -0
- package/dist/trinity/core/rawData/layouts/CjsEveLensflareLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveMissileWarheadLayout.js +29 -0
- package/dist/trinity/core/rawData/layouts/CjsEveMissileWarheadLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEvePerObjectLayout.js +39 -0
- package/dist/trinity/core/rawData/layouts/CjsEvePerObjectLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSceneStaticParticlesLayout.js +30 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSceneStaticParticlesLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpaceObjectDecalLayout.js +78 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpaceObjectDecalLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpaceObjectLayout.js +169 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpaceObjectLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpacePerObjectLayout.js +107 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpacePerObjectLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpherePinLayout.js +44 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpherePinLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveStretch2Layout.js +34 -0
- package/dist/trinity/core/rawData/layouts/CjsEveStretch2Layout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveTurretSetLayout.js +82 -0
- package/dist/trinity/core/rawData/layouts/CjsEveTurretSetLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsTr2PerObjectLayout.js +42 -0
- package/dist/trinity/core/rawData/layouts/CjsTr2PerObjectLayout.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveBasicPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveBasicPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveBoosterSetPerObjectData.js +59 -0
- package/dist/trinity/core/rawData/perObjectData/EveBoosterSetPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveChildBoosterSetPerObjectData.js +59 -0
- package/dist/trinity/core/rawData/perObjectData/EveChildBoosterSetPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveChildBulletStormPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveChildBulletStormPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveChildSpherePinPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveChildSpherePinPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveDecalPerObjectData.js +59 -0
- package/dist/trinity/core/rawData/perObjectData/EveDecalPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveLensflarePerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveLensflarePerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveMissileWarheadPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveMissileWarheadPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveSceneStaticParticlesPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveSceneStaticParticlesPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveSpherePinPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveSpherePinPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveTurretSetPerObjectData.js +59 -0
- package/dist/trinity/core/rawData/perObjectData/EveTurretSetPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/StretchPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/StretchPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/{Tr2PerObjectData.js → perObjectData/Tr2PerObjectData.js} +110 -62
- package/dist/trinity/core/rawData/perObjectData/Tr2PerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/Tr2PerObjectDataPSBuffer.js +104 -0
- package/dist/trinity/core/rawData/perObjectData/Tr2PerObjectDataPSBuffer.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/Tr2PerObjectDataStandard.js +87 -0
- package/dist/trinity/core/rawData/perObjectData/Tr2PerObjectDataStandard.js.map +1 -0
- package/dist/trinity/core/variable/TriVariable.js +83 -83
- package/dist/trinity/core/variable/TriVariable.js.map +1 -1
- package/dist/trinity/core/vertex/{Tr2VertexDefinition.js → Tr2VertexDefinition/Tr2VertexDefinition.js} +4 -20
- package/dist/trinity/core/vertex/Tr2VertexDefinition/Tr2VertexDefinition.js.map +1 -0
- package/dist/trinity/core/vertex/Tr2VertexDefinition/Tr2VertexDefinitionItem.js +29 -0
- package/dist/trinity/core/vertex/Tr2VertexDefinition/Tr2VertexDefinitionItem.js.map +1 -0
- package/dist/trinity/core/volumetrics/Tr2VolumetricsRenderer.js +116 -36
- package/dist/trinity/core/volumetrics/Tr2VolumetricsRenderer.js.map +1 -1
- package/dist/trinity/curves/curve/Tr2CurveRandomAxisRotation.js +50 -92
- package/dist/trinity/curves/curve/Tr2CurveRandomAxisRotation.js.map +1 -1
- package/dist/trinity/eve/EveModularObjectModifier.js +9 -5
- package/dist/trinity/eve/EveModularObjectModifier.js.map +1 -1
- package/dist/trinity/eve/IEveInheritPropertiesOwner.js +2 -1
- package/dist/trinity/eve/IEveInheritPropertiesOwner.js.map +1 -1
- package/dist/trinity/eve/IEveSpaceObject2.js +2 -1
- package/dist/trinity/eve/IEveSpaceObject2.js.map +1 -1
- package/dist/trinity/eve/IEveTransform.js +2 -1
- package/dist/trinity/eve/IEveTransform.js.map +1 -1
- package/dist/trinity/eve/attachment/banner/EveBannerSet.js +2 -2
- package/dist/trinity/eve/attachment/banner/EveBannerSet.js.map +1 -1
- package/dist/trinity/eve/attachment/booster/EveBoosterSet2.js +109 -133
- package/dist/trinity/eve/attachment/booster/EveBoosterSet2.js.map +1 -1
- package/dist/trinity/eve/attachment/booster/EveBoosterSet2Item.js +40 -0
- package/dist/trinity/eve/attachment/booster/EveBoosterSet2Item.js.map +1 -0
- package/dist/trinity/eve/attachment/booster/EveBoosterSet2Renderable.js +1 -1
- package/dist/trinity/eve/attachment/booster/EveBoosterSet2Renderable.js.map +1 -1
- package/dist/trinity/eve/attachment/decal/DecalMeshCache.js +2 -14
- package/dist/trinity/eve/attachment/decal/DecalMeshCache.js.map +1 -1
- package/dist/trinity/eve/attachment/decal/DecalMeshCacheMeshBuffers.js +18 -0
- package/dist/trinity/eve/attachment/decal/DecalMeshCacheMeshBuffers.js.map +1 -0
- package/dist/trinity/eve/attachment/decal/EveSpaceObjectDecal.js +1 -1
- package/dist/trinity/eve/attachment/decal/EveSpaceObjectDecal.js.map +1 -1
- package/dist/trinity/eve/attachment/haze/EveHazeSet.js +1 -1
- package/dist/trinity/eve/attachment/haze/EveHazeSet.js.map +1 -1
- package/dist/trinity/eve/attachment/plane/EvePlaneSet.js +1 -1
- package/dist/trinity/eve/attachment/plane/EvePlaneSet.js.map +1 -1
- package/dist/trinity/eve/attachment/spotlight/EveSpotlightSet.js +2 -2
- package/dist/trinity/eve/attachment/spotlight/EveSpotlightSet.js.map +1 -1
- package/dist/trinity/eve/attachment/sprite/EveSpriteLineSet.js +1 -1
- package/dist/trinity/eve/attachment/sprite/EveSpriteLineSet.js.map +1 -1
- package/dist/trinity/eve/attachment/sprite/EveSpriteSet.js +4 -2
- package/dist/trinity/eve/attachment/sprite/EveSpriteSet.js.map +1 -1
- package/dist/trinity/eve/attachment/turrets/EveTurretSet.js +143 -139
- package/dist/trinity/eve/attachment/turrets/EveTurretSet.js.map +1 -1
- package/dist/trinity/eve/camera/EveCamera.js +1 -1
- package/dist/trinity/eve/camera/EveCamera.js.map +1 -1
- package/dist/trinity/eve/child/EveChildBoosterSet.js +12 -1
- package/dist/trinity/eve/child/EveChildBoosterSet.js.map +1 -1
- package/dist/trinity/eve/child/EveChildCloud2.js +178 -151
- package/dist/trinity/eve/child/EveChildCloud2.js.map +1 -1
- package/dist/trinity/eve/child/EveChildContainer.js +141 -141
- package/dist/trinity/eve/child/EveChildContainer.js.map +1 -1
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMesh.js +87 -0
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMesh.js.map +1 -0
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshArea.js +46 -0
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshArea.js.map +1 -0
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshInstance.js +35 -0
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshInstance.js.map +1 -0
- package/dist/trinity/eve/child/{EveChildInstancedMeshes.js → EveChildInstancedMeshes/EveChildInstancedMeshes.js} +42 -163
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshes.js.map +1 -0
- package/dist/trinity/eve/child/EveChildMesh.js +218 -218
- package/dist/trinity/eve/child/EveChildMesh.js.map +1 -1
- package/dist/trinity/eve/child/EveChildPartData/EveChildPartData.js +53 -0
- package/dist/trinity/eve/child/EveChildPartData/EveChildPartData.js.map +1 -0
- package/dist/trinity/eve/child/{EveChildPartData.js → EveChildPartData/EveChildPartDataPartData.js} +9 -45
- package/dist/trinity/eve/child/EveChildPartData/EveChildPartDataPartData.js.map +1 -0
- package/dist/trinity/eve/child/EveChildParticleSystem.js +30 -29
- package/dist/trinity/eve/child/EveChildParticleSystem.js.map +1 -1
- package/dist/trinity/eve/child/EveChildTransform.js +5 -0
- package/dist/trinity/eve/child/EveChildTransform.js.map +1 -1
- package/dist/trinity/eve/child/EveChildTurret.js +7 -0
- package/dist/trinity/eve/child/EveChildTurret.js.map +1 -1
- package/dist/trinity/eve/index.js +10 -4
- package/dist/trinity/eve/index.js.map +1 -1
- package/dist/trinity/eve/lights/Tr2Light.js +5 -0
- package/dist/trinity/eve/lights/Tr2Light.js.map +1 -1
- package/dist/trinity/eve/overlays/overlayBatches.js +6 -1
- package/dist/trinity/eve/overlays/overlayBatches.js.map +1 -1
- package/dist/trinity/eve/particles/static/EveSceneStaticParticles.js +4 -4
- package/dist/trinity/eve/particles/static/EveSceneStaticParticles.js.map +1 -1
- package/dist/trinity/eve/renderable/stretch/EveStretch2.js +76 -71
- package/dist/trinity/eve/renderable/stretch/EveStretch2.js.map +1 -1
- package/dist/trinity/eve/renderable/stretch/EveStretch3.js +1 -1
- package/dist/trinity/eve/renderable/stretch/EveStretch3.js.map +1 -1
- package/dist/trinity/eve/spaceObject/EveShip2.js +3 -3
- package/dist/trinity/eve/spaceObject/EveShip2.js.map +1 -1
- package/dist/trinity/eve/spaceObject/EveSpaceObject2.js +408 -407
- package/dist/trinity/eve/spaceObject/EveSpaceObject2.js.map +1 -1
- package/dist/trinity/eve/ui/EveTacticalOverlay.js +1 -1
- package/dist/trinity/eve/ui/EveTacticalOverlay.js.map +1 -1
- package/dist/trinity/eve/ui/lines/EveCurveLineSet.js +9 -9
- package/dist/trinity/eve/ui/lines/EveCurveLineSet.js.map +1 -1
- package/dist/trinity/eve/ui/lines/EveLineSet.js +27 -25
- package/dist/trinity/eve/ui/lines/EveLineSet.js.map +1 -1
- package/dist/trinity/eve/ui/tacticalOverlay/EveTacticalTrails.js +3 -2
- package/dist/trinity/eve/ui/tacticalOverlay/EveTacticalTrails.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 +59 -23
- package/dist/trinity/index.js.map +1 -1
- package/dist/trinity/particle/{ITr2GenericEmitter.js → ITr2GenericEmitter/ITr2GenericEmitter.js} +4 -32
- package/dist/trinity/particle/ITr2GenericEmitter/ITr2GenericEmitter.js.map +1 -0
- package/dist/trinity/particle/ITr2GenericEmitter/ITr2GenericEmitterUpdateArguments.js +36 -0
- package/dist/trinity/particle/ITr2GenericEmitter/ITr2GenericEmitterUpdateArguments.js.map +1 -0
- package/dist/trinity/particle/Tr2ParticleSystem.js +4 -2
- package/dist/trinity/particle/Tr2ParticleSystem.js.map +1 -1
- package/dist/trinity/particle/element/Tr2ParticleElementData.js +15 -4
- package/dist/trinity/particle/element/Tr2ParticleElementData.js.map +1 -1
- package/dist/trinity/particle/emitter/Tr2DynamicEmitter.js +21 -20
- package/dist/trinity/particle/emitter/Tr2DynamicEmitter.js.map +1 -1
- package/dist/trinity/particle/emitter/Tr2GpuSharedEmitter.js +23 -22
- package/dist/trinity/particle/emitter/Tr2GpuSharedEmitter.js.map +1 -1
- package/dist/trinity/particle/emitter/Tr2StaticEmitter.js +14 -13
- package/dist/trinity/particle/emitter/Tr2StaticEmitter.js.map +1 -1
- package/dist/trinity/particle/index.js +2 -1
- package/dist/trinity/particle/index.js.map +1 -1
- package/dist/trinity/renderJob/step/TriStepPushRenderTarget.js +7 -1
- package/dist/trinity/renderJob/step/TriStepPushRenderTarget.js.map +1 -1
- package/dist/trinity/shader/Tr2Effect.js +131 -58
- package/dist/trinity/shader/Tr2Effect.js.map +1 -1
- package/dist/trinity/shader/Tr2EffectStateManager.js +17 -5
- package/dist/trinity/shader/Tr2EffectStateManager.js.map +1 -1
- package/dist/trinity/shader/Tr2Material.js +21 -4
- package/dist/trinity/shader/Tr2Material.js.map +1 -1
- package/dist/trinity/shader/material/Tr2EffectPassParameters.js +4 -1
- package/dist/trinity/shader/material/Tr2EffectPassParameters.js.map +1 -1
- package/dist/trinity/shader/parameter/Tr2GeometryBufferParameter.js +2 -2
- package/dist/trinity/shader/parameter/Tr2GeometryBufferParameter.js.map +1 -1
- package/dist/trinityal/Tr2BufferAL/Tr2BufferDescriptionAL.js +79 -0
- package/dist/trinityal/Tr2BufferAL/Tr2BufferDescriptionAL.js.map +1 -0
- package/dist/trinityal/{Tr2DeviceResourceAL.js → Tr2DeviceResourceAL/Tr2BaseDeviceResourceAL.js} +77 -79
- package/dist/trinityal/Tr2DeviceResourceAL/Tr2BaseDeviceResourceAL.js.map +1 -0
- package/dist/trinityal/Tr2DeviceResourceAL/Tr2DeviceResourceAL.js +24 -0
- package/dist/trinityal/Tr2DeviceResourceAL/Tr2DeviceResourceAL.js.map +1 -0
- package/dist/trinityal/Tr2DrawUPHelper.js +2 -1
- package/dist/trinityal/Tr2DrawUPHelper.js.map +1 -1
- package/dist/trinityal/Tr2HalHelperStructures/Tr2MsaaDesc.js +45 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2MsaaDesc.js.map +1 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2SamplerDescription.js +154 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2SamplerDescription.js.map +1 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2SubresourceData.js +48 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2SubresourceData.js.map +1 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2TextureCoordBox.js +75 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2TextureCoordBox.js.map +1 -0
- package/dist/trinityal/{Tr2HalHelperStructures.js → Tr2HalHelperStructures/Tr2TextureSubresource.js} +11 -115
- package/dist/trinityal/Tr2HalHelperStructures/Tr2TextureSubresource.js.map +1 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2Viewport.js +51 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2Viewport.js.map +1 -0
- package/dist/trinityal/{Tr2RenderPassAL.js → Tr2RenderPassAL/Tr2ColorAttachment.js} +5 -28
- package/dist/trinityal/Tr2RenderPassAL/Tr2ColorAttachment.js.map +1 -0
- package/dist/trinityal/Tr2RenderPassAL/Tr2DepthAttachment.js +38 -0
- package/dist/trinityal/Tr2RenderPassAL/Tr2DepthAttachment.js.map +1 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2RegisterMapAL.js +80 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2RegisterMapAL.js.map +1 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetAL.js +76 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetAL.js.map +1 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetALStub.js +96 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetALStub.js.map +1 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetDescriptionAL.js +196 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetDescriptionAL.js.map +1 -0
- package/dist/trinityal/index.js +22 -9
- package/dist/trinityal/index.js.map +1 -1
- package/dist/trinityal/stub/Tr2BufferALStub.js +86 -141
- package/dist/trinityal/stub/Tr2BufferALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2CapsALStub.js +17 -0
- package/dist/trinityal/stub/Tr2CapsALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2ConstantBufferALStub.js +57 -41
- package/dist/trinityal/stub/Tr2ConstantBufferALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2FenceALStub.js +18 -2
- package/dist/trinityal/stub/Tr2FenceALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2GpuTimerALStub.js +97 -0
- package/dist/trinityal/stub/Tr2GpuTimerALStub.js.map +1 -0
- package/dist/trinityal/stub/Tr2OcclusionQueryALStub.js +124 -0
- package/dist/trinityal/stub/Tr2OcclusionQueryALStub.js.map +1 -0
- package/dist/trinityal/stub/Tr2PipelineStatsQueryALStub/Tr2PipelineStatsQueryALStub.js +146 -0
- package/dist/trinityal/stub/Tr2PipelineStatsQueryALStub/Tr2PipelineStatsQueryALStub.js.map +1 -0
- package/dist/trinityal/stub/Tr2RenderContextALStub/Tr2BindlessResourcesAL.js +28 -0
- package/dist/trinityal/stub/Tr2RenderContextALStub/Tr2BindlessResourcesAL.js.map +1 -0
- package/dist/trinityal/stub/{Tr2RenderContextALStub.js → Tr2RenderContextALStub/Tr2RenderContextALStub.js} +70 -75
- package/dist/trinityal/stub/Tr2RenderContextALStub/Tr2RenderContextALStub.js.map +1 -0
- package/dist/trinityal/stub/Tr2SamplerStateALStub.js +47 -31
- package/dist/trinityal/stub/Tr2SamplerStateALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2ShaderALStub.js +61 -45
- package/dist/trinityal/stub/Tr2ShaderALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2ShaderProgramALStub.js +51 -33
- package/dist/trinityal/stub/Tr2ShaderProgramALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2SwapChainALStub.js +61 -45
- package/dist/trinityal/stub/Tr2SwapChainALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2TextureALStub.js +188 -171
- package/dist/trinityal/stub/Tr2TextureALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2VertexLayoutALStub.js +43 -27
- package/dist/trinityal/stub/Tr2VertexLayoutALStub.js.map +1 -1
- package/dist/trinityal/stub/{Tr2VideoAdapterInfoALStub.js → Tr2VideoAdapterInfoStub.js} +16 -1
- package/dist/trinityal/stub/Tr2VideoAdapterInfoStub.js.map +1 -0
- package/dist/trinityal/stub/index.js +8 -4
- package/dist/trinityal/stub/index.js.map +1 -1
- package/dist/trinityal/vertexLayoutMatch.js +2 -2
- package/dist/trinityal/vertexLayoutMatch.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuBufferAL.js +105 -90
- package/dist/trinityal/webgpu/CjsWebgpuBufferAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuCapsAL.js +17 -0
- package/dist/trinityal/webgpu/CjsWebgpuCapsAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuConstantBufferAL.js +15 -0
- package/dist/trinityal/webgpu/CjsWebgpuConstantBufferAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuDevice.js +2 -2
- package/dist/trinityal/webgpu/CjsWebgpuDevice.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuRenderContextAL.js +900 -938
- package/dist/trinityal/webgpu/CjsWebgpuRenderContextAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuResourceSetAL.js +56 -60
- package/dist/trinityal/webgpu/CjsWebgpuResourceSetAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuSamplerStateAL.js +16 -1
- package/dist/trinityal/webgpu/CjsWebgpuSamplerStateAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuShaderAL.js +100 -379
- package/dist/trinityal/webgpu/CjsWebgpuShaderAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuShaderProgramAL.js +330 -0
- package/dist/trinityal/webgpu/CjsWebgpuShaderProgramAL.js.map +1 -0
- package/dist/trinityal/webgpu/CjsWebgpuTextureAL.js +15 -0
- package/dist/trinityal/webgpu/CjsWebgpuTextureAL.js.map +1 -1
- package/dist/trinityal/webgpu/core/{constantArena.js → CjsWebgpuConstantArena.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuConstantArena.js.map +1 -0
- package/dist/trinityal/webgpu/core/{batchGroups.js → CjsWebgpuEncodeState.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuEncodeState.js.map +1 -0
- package/dist/trinityal/webgpu/core/{perFrameSource.js → CjsWebgpuPerFrameSource.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuPerFrameSource.js.map +1 -0
- package/dist/trinityal/webgpu/core/{pipelineCache.js → CjsWebgpuPipelineCache.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuPipelineCache.js.map +1 -0
- package/dist/trinityal/webgpu/core/{psoDescription.js → CjsWebgpuPsoDescription.js} +2 -2
- package/dist/trinityal/webgpu/core/CjsWebgpuPsoDescription.js.map +1 -0
- package/dist/trinityal/webgpu/core/{renderTarget.js → CjsWebgpuRenderTarget.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuRenderTarget.js.map +1 -0
- package/dist/trinityal/webgpu/core/{samplerSource.js → CjsWebgpuSamplerSource.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuSamplerSource.js.map +1 -0
- package/dist/trinityal/webgpu/core/{textureSource.js → CjsWebgpuTextureSource.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuTextureSource.js.map +1 -0
- package/dist/trinityal/webgpu/core/{trinityBatchDispatcher.js → CjsWebgpuTrinityBatchDispatcher.js} +4 -4
- package/dist/trinityal/webgpu/core/CjsWebgpuTrinityBatchDispatcher.js.map +1 -0
- package/dist/trinityal/webgpu/core/{trinityBatchResolver.js → CjsWebgpuTrinityBatchResolver.js} +81 -81
- package/dist/trinityal/webgpu/core/CjsWebgpuTrinityBatchResolver.js.map +1 -0
- package/dist/trinityal/webgpu/core/{trinityPassEncoder.js → CjsWebgpuTrinityPassEncoder.js} +2 -2
- package/dist/trinityal/webgpu/core/CjsWebgpuTrinityPassEncoder.js.map +1 -0
- package/dist/trinityal/webgpu/core/{workQueue.js → CjsWebgpuWorkQueue.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuWorkQueue.js.map +1 -0
- package/dist/trinityal/webgpu/internal.js +12 -11
- package/dist/trinityal/webgpu/internal.js.map +1 -1
- package/docs/audio/reference/classes/trinity.md +44 -34
- package/docs/character/architecture.md +276 -0
- package/docs/character/reference/character-appearance-plans.md +30 -66
- package/docs/character/reference/prepared-libraries.md +14 -30
- package/docs/global/reference/api.md +2 -1
- package/docs/global/reference/classes/README.md +53 -71
- package/docs/global/reference/classes/dropped.md +16 -0
- package/docs/resource/README.md +19 -15
- package/docs/resource/architecture.md +9 -2
- package/docs/resource/concepts/format-capabilities.md +124 -80
- package/docs/resource/concepts/shared-format-helpers.md +94 -0
- package/docs/resource/formats/README.md +230 -224
- package/docs/resource/formats/bitknit2.md +221 -0
- package/docs/resource/formats/carbon-effect-container.md +184 -269
- package/docs/resource/formats/gr2.md +6 -1
- package/docs/resource/formats/schemabound.md +28 -48
- package/docs/resource/formats/static.md +70 -97
- package/docs/resource/formats/webgl/carbon-constant-layouts.md +8 -8
- package/docs/resource/formats/webgl/decl-io.md +165 -256
- package/docs/resource/formats/webgl/memory-structured.md +64 -142
- package/docs/resource/formats/webgl/texture-sample.md +109 -138
- package/docs/resource/formats/webgpu/formats/carbon-webgpu.md +38 -69
- package/docs/resource/formats/webgpu/guides/effect-packaging.md +54 -116
- package/docs/resource/formats/webgpu/reference/api.md +64 -67
- package/docs/resource/formats/webgpu/reference/wgsl-compatibility.md +104 -260
- package/docs/resource/reference/classes/core.md +256 -236
- package/docs/resource/reference/classes/formats.md +1668 -1672
- package/docs/resource/reference/workers.md +4 -2
- package/docs/sof/reference/classes/core.md +1 -1
- package/docs/sof/reference/classes/faction.md +2 -2
- package/docs/sof/reference/classes/generic.md +4 -4
- package/docs/sof/reference/classes/pattern.md +1 -1
- package/docs/sof/reference/classes/shared.md +10 -10
- package/docs/trinity/architecture.md +55 -44
- package/docs/trinity/concepts/generated-class-lifecycle.md +10 -15
- package/docs/trinity/reference/classes/curves-and-utilities.md +496 -506
- package/docs/trinity/reference/classes/dropped.md +0 -189
- package/docs/trinity/reference/classes/eve-runtime.md +8 -8
- package/docs/trinity/reference/classes/generated.md +0 -10
- package/docs/trinity/reference/classes/particle.md +2 -2
- package/docs/trinity/reference/classes/trinity-core.md +1554 -1256
- package/docs/trinity/reference/implementation-status.md +50 -75
- package/docs/trinity/reference/main-semantic-extraction.md +13 -17
- package/docs/trinityal/reference/classes/README.md +77 -27
- package/docs/trinityal/reference/classes/dropped.md +82 -0
- package/docs/trinityal/webgpu/README.md +3 -1
- package/docs/trinityal/webgpu/architecture.md +121 -228
- package/docs/trinityal/webgpu/reference/api.md +5 -5
- package/docs/trinityal/webgpu/reference/classes/README.md +13 -13
- package/format-notices/gr2/NOTICE +18 -12
- package/format-notices/gr2/THIRD-PARTY-NOTICES.md +5 -5
- package/package.json +4 -1
- package/dist/audio/trinity/audio/AudActionLog.js +0 -173
- package/dist/audio/trinity/audio/AudActionLog.js.map +0 -1
- package/dist/audio/trinity/audio/AudObstructionOcclusion.js.map +0 -1
- package/dist/global/contracts/CjsScriptCallback.js +0 -94
- package/dist/global/contracts/CjsScriptCallback.js.map +0 -1
- package/dist/trinity/controllers/ITr2Controller.js.map +0 -1
- package/dist/trinity/core/Tr2GpuResourcePool.js.map +0 -1
- package/dist/trinity/core/Tr2QuadRenderer.js.map +0 -1
- package/dist/trinity/core/Tr2TextureArray.js.map +0 -1
- package/dist/trinity/core/batch/ITriRenderBatchAccumulator.js.map +0 -1
- package/dist/trinity/core/batch/Tr2RenderBatch.js.map +0 -1
- package/dist/trinity/core/batch/TriRenderBatchAccumulator.js.map +0 -1
- package/dist/trinity/core/context/CjsShadowMapExecutor.js +0 -43
- package/dist/trinity/core/context/CjsShadowMapExecutor.js.map +0 -1
- package/dist/trinity/core/context/CjsVolumetricsExecutor.js +0 -64
- package/dist/trinity/core/context/CjsVolumetricsExecutor.js.map +0 -1
- package/dist/trinity/core/context/Tr2VisibilityResults.js +0 -109
- package/dist/trinity/core/context/Tr2VisibilityResults.js.map +0 -1
- package/dist/trinity/core/device/Tr2RingBuffer.js.map +0 -1
- package/dist/trinity/core/device/Tr2SuballocatedBuffer.js.map +0 -1
- package/dist/trinity/core/mesh/ITr2ImpostorSource.js.map +0 -1
- package/dist/trinity/core/mesh/ITr2InstanceData.js.map +0 -1
- package/dist/trinity/core/rawData/Tr2PerObjectData.js.map +0 -1
- package/dist/trinity/core/rawData/constantLayout.js +0 -175
- package/dist/trinity/core/rawData/constantLayout.js.map +0 -1
- package/dist/trinity/core/vertex/Tr2VertexDefinition.js.map +0 -1
- package/dist/trinity/eve/child/EveChildInstancedMeshes.js.map +0 -1
- package/dist/trinity/eve/child/EveChildPartData.js.map +0 -1
- package/dist/trinity/generated/trinityCore/Tr2Denoiser.js +0 -47
- package/dist/trinity/generated/trinityCore/Tr2Denoiser.js.map +0 -1
- package/dist/trinity/particle/ITr2GenericEmitter.js.map +0 -1
- package/dist/trinityal/Tr2DeviceResourceAL.js.map +0 -1
- package/dist/trinityal/Tr2HalHelperStructures.js.map +0 -1
- package/dist/trinityal/Tr2RenderPassAL.js.map +0 -1
- package/dist/trinityal/Tr2ResourceSetAL.js +0 -419
- package/dist/trinityal/Tr2ResourceSetAL.js.map +0 -1
- package/dist/trinityal/Tr2SamplerDescription.js +0 -72
- package/dist/trinityal/Tr2SamplerDescription.js.map +0 -1
- package/dist/trinityal/stub/Tr2QueryALStub.js +0 -326
- package/dist/trinityal/stub/Tr2QueryALStub.js.map +0 -1
- package/dist/trinityal/stub/Tr2RenderContextALStub.js.map +0 -1
- package/dist/trinityal/stub/Tr2VideoAdapterInfoALStub.js.map +0 -1
- package/dist/trinityal/webgpu/core/batchGroups.js.map +0 -1
- package/dist/trinityal/webgpu/core/constantArena.js.map +0 -1
- package/dist/trinityal/webgpu/core/perFrameSource.js.map +0 -1
- package/dist/trinityal/webgpu/core/pipelineCache.js.map +0 -1
- package/dist/trinityal/webgpu/core/psoDescription.js.map +0 -1
- package/dist/trinityal/webgpu/core/renderTarget.js.map +0 -1
- package/dist/trinityal/webgpu/core/samplerSource.js.map +0 -1
- package/dist/trinityal/webgpu/core/textureSource.js.map +0 -1
- package/dist/trinityal/webgpu/core/trinityBatchDispatcher.js.map +0 -1
- package/dist/trinityal/webgpu/core/trinityBatchResolver.js.map +0 -1
- package/dist/trinityal/webgpu/core/trinityPassEncoder.js.map +0 -1
- package/dist/trinityal/webgpu/core/workQueue.js.map +0 -1
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { readU32LE, readU16LE } from '#utils/bytes';
|
|
2
|
+
|
|
3
|
+
// Image container identification, once.
|
|
4
|
+
//
|
|
5
|
+
// WHY THIS EXISTS. Each of the four raster formats that share an inspection
|
|
6
|
+
// surface — png, jpeg, tga, dds — carried a copy of ALL FOUR magic-number
|
|
7
|
+
// sniffers and ALL FOUR header inspectors, so each of the eight functions
|
|
8
|
+
// existed four times. That is not a shared module anyone forgot to write; it is
|
|
9
|
+
// the same code pasted into four neighbours, and it had already started to drift
|
|
10
|
+
// in exactly the way that predicts.
|
|
11
|
+
//
|
|
12
|
+
// WHAT THE FOREIGN COPIES ACTUALLY DID, measured rather than assumed. Every
|
|
13
|
+
// format's `inspectBytes` dispatched across all four sniffers, so the foreign
|
|
14
|
+
// code genuinely ran. But every caller passes its own format id as
|
|
15
|
+
// `expectedType`, and a detected foreign format throws immediately. So of
|
|
16
|
+
// everything a foreign inspector computed — width, height, mip count, fourCC,
|
|
17
|
+
// colour type — the ONLY value that ever escaped was the format NAME, used in
|
|
18
|
+
// the mismatch message. Identification is all that was ever needed; the other
|
|
19
|
+
// three inspectors were decoding headers so their results could be discarded.
|
|
20
|
+
//
|
|
21
|
+
// THE DRIFT THIS REMOVES, and it changes behaviour, deliberately. Two sniffers
|
|
22
|
+
// had grown stricter or wider in their OWNING format only:
|
|
23
|
+
//
|
|
24
|
+
// - `isDDS` also checks that the header-size field reads 124. The three
|
|
25
|
+
// foreign copies check the magic alone.
|
|
26
|
+
// - `isTGA` accepts 15 bits per pixel. The three foreign copies accept only
|
|
27
|
+
// 8, 16, 24 and 32, so a 15-bpp TGA was detected by the tga reader and
|
|
28
|
+
// invisible to the other three.
|
|
29
|
+
//
|
|
30
|
+
// The owning copy is the maintained one, so this module keeps both, and the
|
|
31
|
+
// consequence is that all four readers now identify a 15-bpp TGA and a
|
|
32
|
+
// malformed-header DDS the same way. That is the point of having one
|
|
33
|
+
// implementation, but it IS a change and is recorded here rather than absorbed
|
|
34
|
+
// silently.
|
|
35
|
+
//
|
|
36
|
+
// An inspector is NOT here. Each format keeps its own, because that one is real
|
|
37
|
+
// work on a container the format owns.
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
/** Media type per identified container. */
|
|
41
|
+
const IMAGE_MIME_TYPES = Object.freeze({
|
|
42
|
+
png: "image/png",
|
|
43
|
+
jpeg: "image/jpeg",
|
|
44
|
+
jpg: "image/jpeg",
|
|
45
|
+
tga: "image/x-tga",
|
|
46
|
+
dds: "image/vnd-ms.dds"
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
/** Byte length of the DDS header that follows the four-byte magic. */
|
|
50
|
+
const DDS_HEADER_SIZE = 124;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* True when `bytes` opens with the eight-byte PNG signature.
|
|
54
|
+
*
|
|
55
|
+
* The length floor is 24, not 8: the signature alone is not a PNG, and every
|
|
56
|
+
* caller goes straight on to read the IHDR that must follow it.
|
|
57
|
+
*
|
|
58
|
+
* @param {Uint8Array} bytes Candidate bytes.
|
|
59
|
+
* @returns {boolean} Whether the signature matches.
|
|
60
|
+
*/
|
|
61
|
+
function isPNG(bytes) {
|
|
62
|
+
return bytes.byteLength >= 24 && bytes[0] === 0x89 && bytes[1] === 0x50 && bytes[2] === 0x4e && bytes[3] === 0x47 && bytes[4] === 0x0d && bytes[5] === 0x0a && bytes[6] === 0x1a && bytes[7] === 0x0a;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* True when `bytes` opens with the JPEG start-of-image marker.
|
|
67
|
+
*
|
|
68
|
+
* @param {Uint8Array} bytes Candidate bytes.
|
|
69
|
+
* @returns {boolean} Whether the marker matches.
|
|
70
|
+
*/
|
|
71
|
+
function isJPEG(bytes) {
|
|
72
|
+
return bytes.byteLength >= 4 && bytes[0] === 0xff && bytes[1] === 0xd8;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* True when `bytes` opens with the DDS magic AND a well-formed header size.
|
|
77
|
+
*
|
|
78
|
+
* The size check is what separates this from a bare magic test: `DDS ` followed
|
|
79
|
+
* by anything is not a DDS file, and accepting it sends a caller into a header
|
|
80
|
+
* parse that cannot succeed.
|
|
81
|
+
*
|
|
82
|
+
* @param {Uint8Array} bytes Candidate bytes.
|
|
83
|
+
* @returns {boolean} Whether the container is DDS.
|
|
84
|
+
*/
|
|
85
|
+
function isDDS(bytes) {
|
|
86
|
+
return bytes.byteLength >= DDS_HEADER_SIZE + 4 && bytes[0] === 0x44 && bytes[1] === 0x44 && bytes[2] === 0x53 && bytes[3] === 0x20 && readU32LE(bytes, 4) === DDS_HEADER_SIZE;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* True when `bytes` plausibly opens a TGA.
|
|
91
|
+
*
|
|
92
|
+
* TGA has no magic number, so this is a heuristic over the 18-byte header:
|
|
93
|
+
* a known image type, non-zero extent, and a supported pixel depth. It is
|
|
94
|
+
* therefore the LAST thing to test, after every format that can prove itself.
|
|
95
|
+
*
|
|
96
|
+
* @param {Uint8Array} bytes Candidate bytes.
|
|
97
|
+
* @returns {boolean} Whether the header is a plausible TGA.
|
|
98
|
+
*/
|
|
99
|
+
function isTGA(bytes) {
|
|
100
|
+
if (bytes.byteLength < 18) return false;
|
|
101
|
+
const imageType = bytes[2],
|
|
102
|
+
width = readU16LE(bytes, 12),
|
|
103
|
+
height = readU16LE(bytes, 14),
|
|
104
|
+
bpp = bytes[16];
|
|
105
|
+
return width > 0 && height > 0 && [1, 2, 3, 9, 10, 11].includes(imageType) && [8, 15, 16, 24, 32].includes(bpp);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Name the raster container `bytes` holds.
|
|
110
|
+
*
|
|
111
|
+
* Order matters and is not alphabetical: the formats that can PROVE themselves
|
|
112
|
+
* from a signature go first, and TGA — which can only be guessed at — goes last.
|
|
113
|
+
*
|
|
114
|
+
* @param {Uint8Array} bytes Candidate bytes.
|
|
115
|
+
* @returns {string} `"png"`, `"jpeg"`, `"dds"`, `"tga"`, or `""` when unknown.
|
|
116
|
+
*/
|
|
117
|
+
function identifyImageBytes(bytes) {
|
|
118
|
+
if (isPNG(bytes)) return "png";
|
|
119
|
+
if (isJPEG(bytes)) return "jpeg";
|
|
120
|
+
if (isDDS(bytes)) return "dds";
|
|
121
|
+
if (isTGA(bytes)) return "tga";
|
|
122
|
+
return "";
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The minimal inspection record for a container this reader does not own.
|
|
127
|
+
*
|
|
128
|
+
* A reader asked to inspect a foreign container needs only to be able to say
|
|
129
|
+
* which one it is; its caller rejects the mismatch before anything reads the
|
|
130
|
+
* extent. Returning zeroes rather than a decoded foreign header is what makes
|
|
131
|
+
* the other three inspectors deletable.
|
|
132
|
+
*
|
|
133
|
+
* @param {string} sourceFormat Identified container name, or `""`.
|
|
134
|
+
* @returns {{sourceFormat: string, width: number, height: number}} The record.
|
|
135
|
+
*/
|
|
136
|
+
function foreignImageRecord(sourceFormat) {
|
|
137
|
+
return {
|
|
138
|
+
sourceFormat,
|
|
139
|
+
width: 0,
|
|
140
|
+
height: 0
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Media type for an identified container.
|
|
146
|
+
*
|
|
147
|
+
* @param {string} sourceFormat Identified container name.
|
|
148
|
+
* @returns {string} Media type, or the generic binary type when unknown.
|
|
149
|
+
*/
|
|
150
|
+
function imageMimeType(sourceFormat) {
|
|
151
|
+
return IMAGE_MIME_TYPES[sourceFormat] || "application/octet-stream";
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Channel count for a PNG colour type.
|
|
156
|
+
*
|
|
157
|
+
* Lives here rather than in the PNG reader because the shared inspection record
|
|
158
|
+
* reports it, and three neighbours held a copy for that reason alone.
|
|
159
|
+
*
|
|
160
|
+
* @param {number} colorType PNG IHDR colour type.
|
|
161
|
+
* @returns {number} Channels per pixel, or 0 when the colour type is invalid.
|
|
162
|
+
*/
|
|
163
|
+
function pngChannels(colorType) {
|
|
164
|
+
if (colorType === 0) return 1;
|
|
165
|
+
if (colorType === 2) return 3;
|
|
166
|
+
if (colorType === 3) return 1;
|
|
167
|
+
if (colorType === 4) return 2;
|
|
168
|
+
if (colorType === 6) return 4;
|
|
169
|
+
return 0;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* The `raw` support variant every image reader offers.
|
|
174
|
+
*
|
|
175
|
+
* Handing back the undecoded bytes always works, so this entry is unconditional
|
|
176
|
+
* and identical across the family.
|
|
177
|
+
*
|
|
178
|
+
* @param {object} metadata Inspection record carrying `sourceFormat`.
|
|
179
|
+
* @returns {object} The raw variant descriptor.
|
|
180
|
+
*/
|
|
181
|
+
function rawVariant(metadata) {
|
|
182
|
+
return {
|
|
183
|
+
kind: "raw",
|
|
184
|
+
payloadType: "raw",
|
|
185
|
+
codec: metadata.sourceFormat,
|
|
186
|
+
mimeType: imageMimeType(metadata.sourceFormat),
|
|
187
|
+
supported: true
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Capitalize a format id for an error message, defaulting to `"Image"`.
|
|
193
|
+
*
|
|
194
|
+
* @param {string} value Format id.
|
|
195
|
+
* @returns {string} Capitalized name.
|
|
196
|
+
*/
|
|
197
|
+
function capitalizeFormatId(value) {
|
|
198
|
+
return value ? value[0].toUpperCase() + value.slice(1) : "Image";
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export { capitalizeFormatId, foreignImageRecord, identifyImageBytes, imageMimeType, isDDS, isJPEG, isPNG, isTGA, pngChannels, rawVariant };
|
|
202
|
+
//# sourceMappingURL=imageSignatures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imageSignatures.js","sources":["../../../../src/resource/format/imageSignatures.js"],"sourcesContent":["// Image container identification, once.\n//\n// WHY THIS EXISTS. Each of the four raster formats that share an inspection\n// surface — png, jpeg, tga, dds — carried a copy of ALL FOUR magic-number\n// sniffers and ALL FOUR header inspectors, so each of the eight functions\n// existed four times. That is not a shared module anyone forgot to write; it is\n// the same code pasted into four neighbours, and it had already started to drift\n// in exactly the way that predicts.\n//\n// WHAT THE FOREIGN COPIES ACTUALLY DID, measured rather than assumed. Every\n// format's `inspectBytes` dispatched across all four sniffers, so the foreign\n// code genuinely ran. But every caller passes its own format id as\n// `expectedType`, and a detected foreign format throws immediately. So of\n// everything a foreign inspector computed — width, height, mip count, fourCC,\n// colour type — the ONLY value that ever escaped was the format NAME, used in\n// the mismatch message. Identification is all that was ever needed; the other\n// three inspectors were decoding headers so their results could be discarded.\n//\n// THE DRIFT THIS REMOVES, and it changes behaviour, deliberately. Two sniffers\n// had grown stricter or wider in their OWNING format only:\n//\n// - `isDDS` also checks that the header-size field reads 124. The three\n// foreign copies check the magic alone.\n// - `isTGA` accepts 15 bits per pixel. The three foreign copies accept only\n// 8, 16, 24 and 32, so a 15-bpp TGA was detected by the tga reader and\n// invisible to the other three.\n//\n// The owning copy is the maintained one, so this module keeps both, and the\n// consequence is that all four readers now identify a 15-bpp TGA and a\n// malformed-header DDS the same way. That is the point of having one\n// implementation, but it IS a change and is recorded here rather than absorbed\n// silently.\n//\n// An inspector is NOT here. Each format keeps its own, because that one is real\n// work on a container the format owns.\n\nimport { readU16LE, readU32LE } from \"#utils/bytes\";\n\n/** Media type per identified container. */\nconst IMAGE_MIME_TYPES = Object.freeze({\n png: \"image/png\",\n jpeg: \"image/jpeg\",\n jpg: \"image/jpeg\",\n tga: \"image/x-tga\",\n dds: \"image/vnd-ms.dds\"\n});\n\n/** Byte length of the DDS header that follows the four-byte magic. */\nconst DDS_HEADER_SIZE = 124;\n\n/**\n * True when `bytes` opens with the eight-byte PNG signature.\n *\n * The length floor is 24, not 8: the signature alone is not a PNG, and every\n * caller goes straight on to read the IHDR that must follow it.\n *\n * @param {Uint8Array} bytes Candidate bytes.\n * @returns {boolean} Whether the signature matches.\n */\nexport function isPNG(bytes)\n{\n return bytes.byteLength >= 24 &&\n bytes[0] === 0x89 && bytes[1] === 0x50 && bytes[2] === 0x4e && bytes[3] === 0x47 &&\n bytes[4] === 0x0d && bytes[5] === 0x0a && bytes[6] === 0x1a && bytes[7] === 0x0a;\n}\n\n/**\n * True when `bytes` opens with the JPEG start-of-image marker.\n *\n * @param {Uint8Array} bytes Candidate bytes.\n * @returns {boolean} Whether the marker matches.\n */\nexport function isJPEG(bytes)\n{\n return bytes.byteLength >= 4 && bytes[0] === 0xff && bytes[1] === 0xd8;\n}\n\n/**\n * True when `bytes` opens with the DDS magic AND a well-formed header size.\n *\n * The size check is what separates this from a bare magic test: `DDS ` followed\n * by anything is not a DDS file, and accepting it sends a caller into a header\n * parse that cannot succeed.\n *\n * @param {Uint8Array} bytes Candidate bytes.\n * @returns {boolean} Whether the container is DDS.\n */\nexport function isDDS(bytes)\n{\n return bytes.byteLength >= DDS_HEADER_SIZE + 4 &&\n bytes[0] === 0x44 && bytes[1] === 0x44 && bytes[2] === 0x53 && bytes[3] === 0x20 &&\n readU32LE(bytes, 4) === DDS_HEADER_SIZE;\n}\n\n/**\n * True when `bytes` plausibly opens a TGA.\n *\n * TGA has no magic number, so this is a heuristic over the 18-byte header:\n * a known image type, non-zero extent, and a supported pixel depth. It is\n * therefore the LAST thing to test, after every format that can prove itself.\n *\n * @param {Uint8Array} bytes Candidate bytes.\n * @returns {boolean} Whether the header is a plausible TGA.\n */\nexport function isTGA(bytes)\n{\n if (bytes.byteLength < 18) return false;\n\n const\n imageType = bytes[2],\n width = readU16LE(bytes, 12),\n height = readU16LE(bytes, 14),\n bpp = bytes[16];\n\n return width > 0 && height > 0 &&\n [ 1, 2, 3, 9, 10, 11 ].includes(imageType) &&\n [ 8, 15, 16, 24, 32 ].includes(bpp);\n}\n\n/**\n * Name the raster container `bytes` holds.\n *\n * Order matters and is not alphabetical: the formats that can PROVE themselves\n * from a signature go first, and TGA — which can only be guessed at — goes last.\n *\n * @param {Uint8Array} bytes Candidate bytes.\n * @returns {string} `\"png\"`, `\"jpeg\"`, `\"dds\"`, `\"tga\"`, or `\"\"` when unknown.\n */\nexport function identifyImageBytes(bytes)\n{\n if (isPNG(bytes)) return \"png\";\n if (isJPEG(bytes)) return \"jpeg\";\n if (isDDS(bytes)) return \"dds\";\n if (isTGA(bytes)) return \"tga\";\n return \"\";\n}\n\n/**\n * The minimal inspection record for a container this reader does not own.\n *\n * A reader asked to inspect a foreign container needs only to be able to say\n * which one it is; its caller rejects the mismatch before anything reads the\n * extent. Returning zeroes rather than a decoded foreign header is what makes\n * the other three inspectors deletable.\n *\n * @param {string} sourceFormat Identified container name, or `\"\"`.\n * @returns {{sourceFormat: string, width: number, height: number}} The record.\n */\nexport function foreignImageRecord(sourceFormat)\n{\n return { sourceFormat, width: 0, height: 0 };\n}\n\n/**\n * Media type for an identified container.\n *\n * @param {string} sourceFormat Identified container name.\n * @returns {string} Media type, or the generic binary type when unknown.\n */\nexport function imageMimeType(sourceFormat)\n{\n return IMAGE_MIME_TYPES[sourceFormat] || \"application/octet-stream\";\n}\n\n/**\n * Channel count for a PNG colour type.\n *\n * Lives here rather than in the PNG reader because the shared inspection record\n * reports it, and three neighbours held a copy for that reason alone.\n *\n * @param {number} colorType PNG IHDR colour type.\n * @returns {number} Channels per pixel, or 0 when the colour type is invalid.\n */\nexport function pngChannels(colorType)\n{\n if (colorType === 0) return 1;\n if (colorType === 2) return 3;\n if (colorType === 3) return 1;\n if (colorType === 4) return 2;\n if (colorType === 6) return 4;\n return 0;\n}\n\n/**\n * The `raw` support variant every image reader offers.\n *\n * Handing back the undecoded bytes always works, so this entry is unconditional\n * and identical across the family.\n *\n * @param {object} metadata Inspection record carrying `sourceFormat`.\n * @returns {object} The raw variant descriptor.\n */\nexport function rawVariant(metadata)\n{\n return {\n kind: \"raw\",\n payloadType: \"raw\",\n codec: metadata.sourceFormat,\n mimeType: imageMimeType(metadata.sourceFormat),\n supported: true\n };\n}\n\n/**\n * Capitalize a format id for an error message, defaulting to `\"Image\"`.\n *\n * @param {string} value Format id.\n * @returns {string} Capitalized name.\n */\nexport function capitalizeFormatId(value)\n{\n return value ? value[0].toUpperCase() + value.slice(1) : \"Image\";\n}\n"],"names":["IMAGE_MIME_TYPES","Object","freeze","png","jpeg","jpg","tga","dds","DDS_HEADER_SIZE","isPNG","bytes","byteLength","isJPEG","isDDS","readU32LE","isTGA","imageType","width","readU16LE","height","bpp","includes","identifyImageBytes","foreignImageRecord","sourceFormat","imageMimeType","pngChannels","colorType","rawVariant","metadata","kind","payloadType","codec","mimeType","supported","capitalizeFormatId","value","toUpperCase","slice"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAIA;AACA,MAAMA,gBAAgB,GAAGC,MAAM,CAACC,MAAM,CAAC;AACnCC,EAAAA,GAAG,EAAE,WAAW;AAChBC,EAAAA,IAAI,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GAAG;AAChD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASM,aAAaA,CAACD,YAAY,EAC1C;AACI,EAAA,OAAOxB,gBAAgB,CAACwB,YAAY,CAAC,IAAI,0BAA0B;AACvE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,WAAWA,CAACC,SAAS,EACrC;AACI,EAAA,IAAIA,SAAS,KAAK,CAAC,EAAE,OAAO,CAAC;AAC7B,EAAA,IAAIA,SAAS,KAAK,CAAC,EAAE,OAAO,CAAC;AAC7B,EAAA,IAAIA,SAAS,KAAK,CAAC,EAAE,OAAO,CAAC;AAC7B,EAAA,IAAIA,SAAS,KAAK,CAAC,EAAE,OAAO,CAAC;AAC7B,EAAA,IAAIA,SAAS,KAAK,CAAC,EAAE,OAAO,CAAC;AAC7B,EAAA,OAAO,CAAC;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,UAAUA,CAACC,QAAQ,EACnC;EACI,OAAO;AACHC,IAAAA,IAAI,EAAE,KAAK;AACXC,IAAAA,WAAW,EAAE,KAAK;IAClBC,KAAK,EAAEH,QAAQ,CAACL,YAAY;AAC5BS,IAAAA,QAAQ,EAAER,aAAa,CAACI,QAAQ,CAACL,YAAY,CAAC;AAC9CU,IAAAA,SAAS,EAAE;GACd;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,kBAAkBA,CAACC,KAAK,EACxC;AACI,EAAA,OAAOA,KAAK,GAAGA,KAAK,CAAC,CAAC,CAAC,CAACC,WAAW,EAAE,GAAGD,KAAK,CAACE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO;AACpE;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { CjsReader } from './CjsReader.js';
|
|
2
|
-
export { CjsFormatReadError, CjsFormatWriteError } from './CjsFormatError.js';
|
|
2
|
+
export { CjsFormatRangeError, CjsFormatReadError, CjsFormatWriteError } from './CjsFormatError.js';
|
|
3
3
|
export { CjsByteReader } from './CjsByteReader.js';
|
|
4
|
+
export { CjsBitReader, readBitAt, readBitsAt } from './CjsBitReader.js';
|
|
4
5
|
export { CjsByteWriter } from './CjsByteWriter.js';
|
|
5
6
|
export { CJS_STRING_TABLE_NULL_REFERENCE, CjsStringTable, compareTableBlobs } from './CjsStringTable.js';
|
|
6
7
|
export { CARBON_ANNOTATION_TYPE, CARBON_EFFECT_COUNT_CAPS, CARBON_EFFECT_DATA_VERSION, CARBON_EFFECT_MIN_DATA_VERSION, CARBON_EFFECT_WRITE_VERSIONS, CARBON_SHADER_CONSTANTS_MAX, collectArena, compareAnnotationNames, internArena, passthroughArena, readEffectDescription, resolveWriteVersion, writeEffectDescription } from './carbonEffect/carbonEffectRecords.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
// How a format's decoded record becomes JSON. Four policies, not one function.
|
|
2
|
+
//
|
|
3
|
+
// Twenty-seven formats each declared a local `toJsonValue`, and the obvious
|
|
4
|
+
// reading — twenty-seven copies of one helper — is wrong. They fall into four
|
|
5
|
+
// groups that give CONTRADICTORY output for the same input, and the contradiction
|
|
6
|
+
// is deliberate in every case. Collapsing them into one function with flags would
|
|
7
|
+
// have picked one group's answer and silently changed the other three.
|
|
8
|
+
//
|
|
9
|
+
// THE AXIS THEY DISAGREE ON IS BINARY DATA:
|
|
10
|
+
//
|
|
11
|
+
// - A media or container reader is describing a file. Its `Uint8Array` is the
|
|
12
|
+
// pixel or sample payload, often megabytes, and expanding it into a JSON
|
|
13
|
+
// array produces an unreadable document nobody wanted. It reports the LENGTH.
|
|
14
|
+
// - A geometry reader's typed arrays ARE the answer — vertices, indices, UVs.
|
|
15
|
+
// Summarising them to a byte count throws away the document.
|
|
16
|
+
//
|
|
17
|
+
// Both are right for their own reader, which is why this file has two of them.
|
|
18
|
+
//
|
|
19
|
+
// The remaining two are the first policy's shape plus a capability its callers
|
|
20
|
+
// genuinely need: shader reflection carries `Map`, `Set` and `bigint`, and the
|
|
21
|
+
// Blue object graphs can contain cycles that must be refused rather than
|
|
22
|
+
// recursed into forever.
|
|
23
|
+
//
|
|
24
|
+
// TWO FORMATS DELIBERATELY KEEP THEIR OWN. `formats/fbx` renders a typed array as
|
|
25
|
+
// `{ type, length }` — naming the constructor, because an FBX array property's
|
|
26
|
+
// declared element type is a fact about the file worth reporting — and
|
|
27
|
+
// `formats/cmf` sits between two policies here. Neither has a second caller, so
|
|
28
|
+
// neither is a policy.
|
|
29
|
+
//
|
|
30
|
+
// No Carbon donor: Carbon persists through Blue, not JSON, so there is nothing
|
|
31
|
+
// here to port and nothing here claims to be a port.
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Convert a decoded record to JSON, reporting binary payloads by length.
|
|
35
|
+
*
|
|
36
|
+
* For readers whose `Uint8Array` is the file's bulk data rather than its
|
|
37
|
+
* description: audio, video, images, and the Wwise containers. A byte array
|
|
38
|
+
* becomes `{ byteLength }`.
|
|
39
|
+
*
|
|
40
|
+
* Note the check is `instanceof Uint8Array`, not `ArrayBuffer.isView` — so a
|
|
41
|
+
* `Float32Array` falls through to the object branch and serialises by index.
|
|
42
|
+
* That is the inherited behaviour of all fifteen callers, preserved rather than
|
|
43
|
+
* quietly improved, because these records are compared in tests.
|
|
44
|
+
*
|
|
45
|
+
* @param {*} value Any decoded value.
|
|
46
|
+
* @returns {*} A JSON-safe value.
|
|
47
|
+
*/
|
|
48
|
+
function toJsonWithByteSummary(value) {
|
|
49
|
+
if (value instanceof Uint8Array) return {
|
|
50
|
+
byteLength: value.byteLength
|
|
51
|
+
};
|
|
52
|
+
if (Array.isArray(value)) return value.map(toJsonWithByteSummary);
|
|
53
|
+
if (value && typeof value === "object") {
|
|
54
|
+
const output = {};
|
|
55
|
+
for (const [key, entry] of Object.entries(value)) output[key] = toJsonWithByteSummary(entry);
|
|
56
|
+
return output;
|
|
57
|
+
}
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Convert a decoded record to JSON, expanding typed arrays into values.
|
|
63
|
+
*
|
|
64
|
+
* For the geometry interchange readers, where the typed arrays are the document.
|
|
65
|
+
* `DataView` is excluded because it is a window onto bytes rather than a
|
|
66
|
+
* sequence of values.
|
|
67
|
+
*
|
|
68
|
+
* @param {*} value Any decoded value.
|
|
69
|
+
* @returns {*} A JSON-safe value.
|
|
70
|
+
*/
|
|
71
|
+
function toJsonWithArrayValues(value) {
|
|
72
|
+
if (value === null || value === undefined) return value;
|
|
73
|
+
if (typeof value !== "object") return value;
|
|
74
|
+
if (typeof value.toJSON === "function") {
|
|
75
|
+
const next = value.toJSON();
|
|
76
|
+
if (next !== value) return toJsonWithArrayValues(next);
|
|
77
|
+
}
|
|
78
|
+
if (Array.isArray(value)) return value.map(toJsonWithArrayValues);
|
|
79
|
+
if (ArrayBuffer.isView(value) && !(value instanceof DataView)) return Array.from(value);
|
|
80
|
+
const out = {};
|
|
81
|
+
for (const key of Object.keys(value)) {
|
|
82
|
+
out[key] = toJsonWithArrayValues(value[key]);
|
|
83
|
+
}
|
|
84
|
+
return out;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Convert a decoded record to JSON, handling collections and big integers.
|
|
89
|
+
*
|
|
90
|
+
* For the shader readers, whose reflection graphs hold `Map` and `Set` and whose
|
|
91
|
+
* register and hash values exceed the safe integer range. A `bigint` becomes a
|
|
92
|
+
* STRING, deliberately: JSON has no integer wide enough, and a number would lose
|
|
93
|
+
* digits without saying so.
|
|
94
|
+
*
|
|
95
|
+
* Anything it cannot represent — a function, a symbol — becomes `null` rather
|
|
96
|
+
* than being passed through, so the output is always serialisable.
|
|
97
|
+
*
|
|
98
|
+
* @param {*} value Any decoded value.
|
|
99
|
+
* @returns {*} A JSON-safe value.
|
|
100
|
+
*/
|
|
101
|
+
function toJsonWithCollections(value) {
|
|
102
|
+
if (value === null || value === undefined) return value ?? null;
|
|
103
|
+
if (typeof value === "number" || typeof value === "string" || typeof value === "boolean") return value;
|
|
104
|
+
if (typeof value === "bigint") return value.toString();
|
|
105
|
+
if (ArrayBuffer.isView(value)) return Array.from(value);
|
|
106
|
+
if (Array.isArray(value)) return value.map(toJsonWithCollections);
|
|
107
|
+
if (value instanceof Map) {
|
|
108
|
+
const out = {};
|
|
109
|
+
for (const [key, entry] of value) out[key] = toJsonWithCollections(entry);
|
|
110
|
+
return out;
|
|
111
|
+
}
|
|
112
|
+
if (value instanceof Set) return Array.from(value, toJsonWithCollections);
|
|
113
|
+
if (typeof value === "object") {
|
|
114
|
+
if (typeof value.toJSON === "function") return toJsonWithCollections(value.toJSON());
|
|
115
|
+
const out = {};
|
|
116
|
+
for (const key of Object.keys(value)) out[key] = toJsonWithCollections(value[key]);
|
|
117
|
+
return out;
|
|
118
|
+
}
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Convert a decoded record to JSON, refusing a cycle.
|
|
124
|
+
*
|
|
125
|
+
* For the Blue graph transports, whose documents legitimately contain object
|
|
126
|
+
* references and can therefore contain a loop. A cycle THROWS rather than being
|
|
127
|
+
* pruned, because a silently truncated graph is indistinguishable from a graph
|
|
128
|
+
* that was genuinely that shape.
|
|
129
|
+
*
|
|
130
|
+
* The guard is released on the way back out, so a node reachable twice by
|
|
131
|
+
* different paths is not mistaken for a cycle.
|
|
132
|
+
*
|
|
133
|
+
* @param {*} value Any decoded value.
|
|
134
|
+
* @param {string} [label] Name used in the cycle error, identifying the reader.
|
|
135
|
+
* @param {WeakSet} [seen] Ancestors on the current path; supplied by recursion.
|
|
136
|
+
* @returns {*} A JSON-safe value.
|
|
137
|
+
* @throws {TypeError} The value contains a cycle.
|
|
138
|
+
*/
|
|
139
|
+
function toJsonAcyclic(value, label = "Reader", seen = new WeakSet()) {
|
|
140
|
+
if (value === null || typeof value !== "object") return value;
|
|
141
|
+
|
|
142
|
+
// A typed array cannot hold a reference, so it cannot take part in a cycle
|
|
143
|
+
// and needs no guard. It is tested before the guard for that reason only.
|
|
144
|
+
if (ArrayBuffer.isView(value)) return Array.from(value, item => toJsonAcyclic(item, label, seen));
|
|
145
|
+
|
|
146
|
+
// THE CYCLE CHECK MUST PRECEDE THE ARRAY BRANCH. It did not in the three
|
|
147
|
+
// readers this policy replaced (black, red and gr2 were identical here): the
|
|
148
|
+
// array branch returned before `seen` was ever consulted, so a cycle reached
|
|
149
|
+
// through an array — `list.push(list)` — recursed until the stack overflowed
|
|
150
|
+
// and raised `RangeError: Maximum call stack size exceeded` instead of the
|
|
151
|
+
// intended `TypeError`. Fixed here rather than reproduced: this policy is
|
|
152
|
+
// CarbonEngineJS's own (Carbon persists through Blue, not JSON), so there is
|
|
153
|
+
// no donor behaviour to stay faithful to, and nothing can depend on the shape
|
|
154
|
+
// of a stack overflow.
|
|
155
|
+
if (seen.has(value)) {
|
|
156
|
+
throw new TypeError(`${label}.toJSON cannot convert circular data`);
|
|
157
|
+
}
|
|
158
|
+
if (Array.isArray(value)) {
|
|
159
|
+
seen.add(value);
|
|
160
|
+
const out = value.map(item => toJsonAcyclic(item, label, seen));
|
|
161
|
+
seen.delete(value);
|
|
162
|
+
return out;
|
|
163
|
+
}
|
|
164
|
+
if (typeof value.toJSON === "function") {
|
|
165
|
+
seen.add(value);
|
|
166
|
+
const json = toJsonAcyclic(value.toJSON(), label, seen);
|
|
167
|
+
seen.delete(value);
|
|
168
|
+
return json;
|
|
169
|
+
}
|
|
170
|
+
seen.add(value);
|
|
171
|
+
const out = {};
|
|
172
|
+
for (const key of Object.keys(value)) {
|
|
173
|
+
out[key] = toJsonAcyclic(value[key], label, seen);
|
|
174
|
+
}
|
|
175
|
+
seen.delete(value);
|
|
176
|
+
return out;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export { toJsonAcyclic, toJsonWithArrayValues, toJsonWithByteSummary, toJsonWithCollections };
|
|
180
|
+
//# sourceMappingURL=jsonPolicies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonPolicies.js","sources":["../../../../src/resource/format/jsonPolicies.js"],"sourcesContent":["// How a format's decoded record becomes JSON. Four policies, not one function.\n//\n// Twenty-seven formats each declared a local `toJsonValue`, and the obvious\n// reading — twenty-seven copies of one helper — is wrong. They fall into four\n// groups that give CONTRADICTORY output for the same input, and the contradiction\n// is deliberate in every case. Collapsing them into one function with flags would\n// have picked one group's answer and silently changed the other three.\n//\n// THE AXIS THEY DISAGREE ON IS BINARY DATA:\n//\n// - A media or container reader is describing a file. Its `Uint8Array` is the\n// pixel or sample payload, often megabytes, and expanding it into a JSON\n// array produces an unreadable document nobody wanted. It reports the LENGTH.\n// - A geometry reader's typed arrays ARE the answer — vertices, indices, UVs.\n// Summarising them to a byte count throws away the document.\n//\n// Both are right for their own reader, which is why this file has two of them.\n//\n// The remaining two are the first policy's shape plus a capability its callers\n// genuinely need: shader reflection carries `Map`, `Set` and `bigint`, and the\n// Blue object graphs can contain cycles that must be refused rather than\n// recursed into forever.\n//\n// TWO FORMATS DELIBERATELY KEEP THEIR OWN. `formats/fbx` renders a typed array as\n// `{ type, length }` — naming the constructor, because an FBX array property's\n// declared element type is a fact about the file worth reporting — and\n// `formats/cmf` sits between two policies here. Neither has a second caller, so\n// neither is a policy.\n//\n// No Carbon donor: Carbon persists through Blue, not JSON, so there is nothing\n// here to port and nothing here claims to be a port.\n\n/**\n * Convert a decoded record to JSON, reporting binary payloads by length.\n *\n * For readers whose `Uint8Array` is the file's bulk data rather than its\n * description: audio, video, images, and the Wwise containers. A byte array\n * becomes `{ byteLength }`.\n *\n * Note the check is `instanceof Uint8Array`, not `ArrayBuffer.isView` — so a\n * `Float32Array` falls through to the object branch and serialises by index.\n * That is the inherited behaviour of all fifteen callers, preserved rather than\n * quietly improved, because these records are compared in tests.\n *\n * @param {*} value Any decoded value.\n * @returns {*} A JSON-safe value.\n */\nexport function toJsonWithByteSummary(value)\n{\n if (value instanceof Uint8Array) return { byteLength: value.byteLength };\n if (Array.isArray(value)) return value.map(toJsonWithByteSummary);\n if (value && typeof value === \"object\")\n {\n const output = {};\n for (const [ key, entry ] of Object.entries(value)) output[key] = toJsonWithByteSummary(entry);\n return output;\n }\n return value;\n}\n\n/**\n * Convert a decoded record to JSON, expanding typed arrays into values.\n *\n * For the geometry interchange readers, where the typed arrays are the document.\n * `DataView` is excluded because it is a window onto bytes rather than a\n * sequence of values.\n *\n * @param {*} value Any decoded value.\n * @returns {*} A JSON-safe value.\n */\nexport function toJsonWithArrayValues(value)\n{\n if (value === null || value === undefined) return value;\n if (typeof value !== \"object\") return value;\n\n if (typeof value.toJSON === \"function\")\n {\n const next = value.toJSON();\n if (next !== value) return toJsonWithArrayValues(next);\n }\n\n if (Array.isArray(value)) return value.map(toJsonWithArrayValues);\n if (ArrayBuffer.isView(value) && !(value instanceof DataView)) return Array.from(value);\n\n const out = {};\n for (const key of Object.keys(value))\n {\n out[key] = toJsonWithArrayValues(value[key]);\n }\n return out;\n}\n\n/**\n * Convert a decoded record to JSON, handling collections and big integers.\n *\n * For the shader readers, whose reflection graphs hold `Map` and `Set` and whose\n * register and hash values exceed the safe integer range. A `bigint` becomes a\n * STRING, deliberately: JSON has no integer wide enough, and a number would lose\n * digits without saying so.\n *\n * Anything it cannot represent — a function, a symbol — becomes `null` rather\n * than being passed through, so the output is always serialisable.\n *\n * @param {*} value Any decoded value.\n * @returns {*} A JSON-safe value.\n */\nexport function toJsonWithCollections(value)\n{\n if (value === null || value === undefined) return value ?? null;\n if (typeof value === \"number\" || typeof value === \"string\" || typeof value === \"boolean\") return value;\n if (typeof value === \"bigint\") return value.toString();\n if (ArrayBuffer.isView(value)) return Array.from(value);\n if (Array.isArray(value)) return value.map(toJsonWithCollections);\n if (value instanceof Map)\n {\n const out = {};\n for (const [ key, entry ] of value) out[key] = toJsonWithCollections(entry);\n return out;\n }\n if (value instanceof Set) return Array.from(value, toJsonWithCollections);\n if (typeof value === \"object\")\n {\n if (typeof value.toJSON === \"function\") return toJsonWithCollections(value.toJSON());\n const out = {};\n for (const key of Object.keys(value)) out[key] = toJsonWithCollections(value[key]);\n return out;\n }\n return null;\n}\n\n/**\n * Convert a decoded record to JSON, refusing a cycle.\n *\n * For the Blue graph transports, whose documents legitimately contain object\n * references and can therefore contain a loop. A cycle THROWS rather than being\n * pruned, because a silently truncated graph is indistinguishable from a graph\n * that was genuinely that shape.\n *\n * The guard is released on the way back out, so a node reachable twice by\n * different paths is not mistaken for a cycle.\n *\n * @param {*} value Any decoded value.\n * @param {string} [label] Name used in the cycle error, identifying the reader.\n * @param {WeakSet} [seen] Ancestors on the current path; supplied by recursion.\n * @returns {*} A JSON-safe value.\n * @throws {TypeError} The value contains a cycle.\n */\nexport function toJsonAcyclic(value, label = \"Reader\", seen = new WeakSet())\n{\n if (value === null || typeof value !== \"object\") return value;\n\n // A typed array cannot hold a reference, so it cannot take part in a cycle\n // and needs no guard. It is tested before the guard for that reason only.\n if (ArrayBuffer.isView(value)) return Array.from(value, item => toJsonAcyclic(item, label, seen));\n\n // THE CYCLE CHECK MUST PRECEDE THE ARRAY BRANCH. It did not in the three\n // readers this policy replaced (black, red and gr2 were identical here): the\n // array branch returned before `seen` was ever consulted, so a cycle reached\n // through an array — `list.push(list)` — recursed until the stack overflowed\n // and raised `RangeError: Maximum call stack size exceeded` instead of the\n // intended `TypeError`. Fixed here rather than reproduced: this policy is\n // CarbonEngineJS's own (Carbon persists through Blue, not JSON), so there is\n // no donor behaviour to stay faithful to, and nothing can depend on the shape\n // of a stack overflow.\n if (seen.has(value))\n {\n throw new TypeError(`${label}.toJSON cannot convert circular data`);\n }\n\n if (Array.isArray(value))\n {\n seen.add(value);\n const out = value.map(item => toJsonAcyclic(item, label, seen));\n seen.delete(value);\n return out;\n }\n\n if (typeof value.toJSON === \"function\")\n {\n seen.add(value);\n const json = toJsonAcyclic(value.toJSON(), label, seen);\n seen.delete(value);\n return json;\n }\n\n seen.add(value);\n const out = {};\n for (const key of Object.keys(value))\n {\n out[key] = toJsonAcyclic(value[key], label, seen);\n }\n seen.delete(value);\n return out;\n}\n"],"names":["toJsonWithByteSummary","value","Uint8Array","byteLength","Array","isArray","map","output","key","entry","Object","entries","toJsonWithArrayValues","undefined","toJSON","next","ArrayBuffer","isView","DataView","from","out","keys","toJsonWithCollections","toString","Map","Set","toJsonAcyclic","label","seen","WeakSet","item","has","TypeError","add","delete","json"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,qBAAqBA,CAACC,KAAK,EAC3C;AACI,EAAA,IAAIA,KAAK,YAAYC,UAAU,EAAE,OAAO;IAAEC,UAAU,EAAEF,KAAK,CAACE;GAAY;AACxE,EAAA,IAAIC,KAAK,CAACC,OAAO,CAACJ,KAAK,CAAC,EAAE,OAAOA,KAAK,CAACK,GAAG,CAACN,qBAAqB,CAAC;AACjE,EAAA,IAAIC,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,EACtC;IACI,MAAMM,MAAM,GAAG,EAAE;IACjB,KAAK,MAAM,CAAEC,GAAG,EAAEC,KAAK,CAAE,IAAIC,MAAM,CAACC,OAAO,CAACV,KAAK,CAAC,EAAEM,MAAM,CAACC,GAAG,CAAC,GAAGR,qBAAqB,CAACS,KAAK,CAAC;AAC9F,IAAA,OAAOF,MAAM;AACjB,EAAA;AACA,EAAA,OAAON,KAAK;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,S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AAK,CAAC,EACpC;AACImB,IAAAA,GAAG,CAACZ,GAAG,CAAC,GAAGkB,aAAa,CAACzB,KAAK,CAACO,GAAG,CAAC,EAAEmB,KAAK,EAAEC,IAAI,CAAC;AACrD,EAAA;AACAA,EAAAA,IAAI,CAACM,MAAM,CAACjC,KAAK,CAAC;AAClB,EAAA,OAAOmB,GAAG;AACd;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { toJsonAcyclic } from '../../../format/jsonPolicies.js';
|
|
1
2
|
import { classes } from './blackDefinitions.js';
|
|
2
3
|
|
|
3
4
|
const OUTPUT_JSON = "json";
|
|
@@ -95,9 +96,9 @@ function validateClassKey(classKeys, key, readerName) {
|
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
98
|
|
|
98
|
-
/**
|
|
99
|
-
* Validates a resolved runtime class constructor for the Black object-graph
|
|
100
|
-
* reader.
|
|
99
|
+
/**
|
|
100
|
+
* Validates a resolved runtime class constructor for the Black object-graph
|
|
101
|
+
* reader.
|
|
101
102
|
*/
|
|
102
103
|
function validateClass(classKeys, type, Class, readerName) {
|
|
103
104
|
validateClassKey(classKeys, type, readerName);
|
|
@@ -119,9 +120,9 @@ function mergeClasses(values, classes, classKeys, readerName) {
|
|
|
119
120
|
values.classes = next;
|
|
120
121
|
}
|
|
121
122
|
|
|
122
|
-
/**
|
|
123
|
-
* Normalizes reader options against their supported defaults for the Black
|
|
124
|
-
* object-graph reader.
|
|
123
|
+
/**
|
|
124
|
+
* Normalizes reader options against their supported defaults for the Black
|
|
125
|
+
* object-graph reader.
|
|
125
126
|
*/
|
|
126
127
|
function normalizeValues(base, options, classKeys, readerName) {
|
|
127
128
|
if (!options || typeof options !== "object") {
|
|
@@ -163,30 +164,18 @@ function normalizeValues(base, options, classKeys, readerName) {
|
|
|
163
164
|
return values;
|
|
164
165
|
}
|
|
165
166
|
|
|
166
|
-
/**
|
|
167
|
-
* Converts a parsed payload into a JSON-safe value for the Black object-graph
|
|
168
|
-
* reader.
|
|
167
|
+
/**
|
|
168
|
+
* Converts a parsed payload into a JSON-safe value for the Black object-graph
|
|
169
|
+
* reader.
|
|
169
170
|
*/
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
seen.add(value);
|
|
179
|
-
const json = toJsonValue(value.toJSON(), seen);
|
|
180
|
-
seen.delete(value);
|
|
181
|
-
return json;
|
|
182
|
-
}
|
|
183
|
-
seen.add(value);
|
|
184
|
-
const out = {};
|
|
185
|
-
for (const key of Object.keys(value)) {
|
|
186
|
-
out[key] = toJsonValue(value[key], seen);
|
|
187
|
-
}
|
|
188
|
-
seen.delete(value);
|
|
189
|
-
return out;
|
|
171
|
+
/**
|
|
172
|
+
* Convert to JSON, refusing a cycle, naming this reader in the error.
|
|
173
|
+
*
|
|
174
|
+
* @param {*} value Any decoded value.
|
|
175
|
+
* @returns {*} A JSON-safe value.
|
|
176
|
+
*/
|
|
177
|
+
function toJsonValue(value) {
|
|
178
|
+
return toJsonAcyclic(value, "Reader");
|
|
190
179
|
}
|
|
191
180
|
|
|
192
181
|
export { DEFAULT_VALUES, OUTPUT_DOCUMENT, OUTPUT_JSON, OUTPUT_PAYLOAD, OUTPUT_RAW, OUTPUT_RUNTIME, normalizeValues, toJsonValue, validateClass, validateClassKey };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sources":["../../../../../../src/resource/formats/black/core/helpers.js"],"sourcesContent":["import blackDefinitions from \"./blackSchema.js\";\r\n\r\nexport const OUTPUT_JSON = \"json\";\r\nexport const OUTPUT_RAW = \"raw\";\r\nexport const OUTPUT_DOCUMENT = \"document\";\r\nexport const OUTPUT_PAYLOAD = \"payload\";\r\nexport const OUTPUT_RUNTIME = \"runtime\";\r\n\r\nexport const DEFAULT_VALUES = Object.freeze({\r\n emit: OUTPUT_JSON,\r\n schema: blackDefinitions,\r\n registry: null,\r\n sourceShapes: null,\r\n rootName: \"default\",\r\n firstId: 1,\r\n metadata: null,\r\n includeMetadata: false,\r\n includeClassMetadata: false,\r\n includeFieldTrace: false,\r\n includeRefIndex: false,\r\n trace: false,\r\n debug: false,\r\n decodeBinaryBlocks: false,\r\n captureUnknownBlackFields: false,\r\n captureUnknownResourceFields: false,\r\n captureUnknownWhenNoBlackFields: false,\r\n allowUnknownStringFallback: false,\r\n rootFields: null,\r\n payloadRootFields: null,\r\n payloadTypeField: \"_type\",\r\n payloadIdField: \"_id\",\r\n payloadReferenceField: \"_reference\",\r\n pathHandler: null,\r\n adapter: null,\r classes: Object.freeze({})\r\n});\r\n\r\nconst OPTION_KEYS = new Set(Object.keys(DEFAULT_VALUES));\r\n\n\r\nfunction normalizeEmit(emit, readerName)\r\n{\r\n if (emit === undefined || emit === OUTPUT_JSON) return OUTPUT_JSON;\r\n if (emit === OUTPUT_RAW) return OUTPUT_RAW;\r\n if (emit === OUTPUT_DOCUMENT) return OUTPUT_DOCUMENT;\r\n if (emit === OUTPUT_PAYLOAD) return OUTPUT_PAYLOAD;\r\n if (emit === OUTPUT_RUNTIME) return OUTPUT_RUNTIME;\r\n throw new Error(`${readerName} unknown emit value \"${emit}\"`);\r\n}\r\n\r\nfunction assertKnownOptions(options, readerName)\r\n{\r\n for (const key of Object.keys(options))\r\n {\r\n if (!OPTION_KEYS.has(key))\r\n {\r\n throw new TypeError(`${readerName} unknown option \"${key}\"`);\r\n }\r\n }\r\n}\r\n\r\nfunction classMap(values)\r\n{\r\n return values && values.classes ? values.classes : {};\r\n}\r\n\r\nfunction cloneValues(values)\r\n{\r\n return {\r\n emit: values.emit,\r\n schema: values.schema ?? null,\r\n registry: values.registry ?? null,\r\n sourceShapes: values.sourceShapes ?? null,\r\n rootName: values.rootName ?? \"default\",\r\n firstId: values.firstId ?? 1,\r\n metadata: values.metadata ?? null,\r\n includeMetadata: Boolean(values.includeMetadata),\r\n includeClassMetadata: Boolean(values.includeClassMetadata),\r\n includeFieldTrace: Boolean(values.includeFieldTrace),\r\n includeRefIndex: Boolean(values.includeRefIndex),\r\n trace: Boolean(values.trace),\r\n debug: Boolean(values.debug),\r\n decodeBinaryBlocks: Boolean(values.decodeBinaryBlocks),\r\n captureUnknownBlackFields: Boolean(values.captureUnknownBlackFields),\r\n captureUnknownResourceFields: Boolean(values.captureUnknownResourceFields),\r\n captureUnknownWhenNoBlackFields: Boolean(values.captureUnknownWhenNoBlackFields),\r\n allowUnknownStringFallback: Boolean(values.allowUnknownStringFallback),\r\n rootFields: cloneListOrValue(values.rootFields),\r\n payloadRootFields: cloneListOrValue(values.payloadRootFields),\r\n payloadTypeField: values.payloadTypeField,\r\n payloadIdField: values.payloadIdField,\r\n payloadReferenceField: values.payloadReferenceField,\r\n pathHandler: values.pathHandler ?? null,\r\n adapter: values.adapter ?? null,\r classes: { ...classMap(values) }\r\n };\r\n}\r\n\r\nfunction cloneListOrValue(value)\r\n{\r\n return Array.isArray(value) ? value.slice() : value ?? null;\r\n}\r\n\r\n/** Validates a requested runtime class key for the Black object-graph reader. */\r\nexport function validateClassKey(classKeys, key, readerName)\r\n{\r\n if (typeof key !== \"string\" || !key)\r\n {\r\n throw new Error(`${readerName} class type must be a non-empty string`);\r\n }\r\n}\r\n\r\n/**\r\n * Validates a resolved runtime class constructor for the Black object-graph\r\n * reader.\r\n */\r\nexport function validateClass(classKeys, type, Class, readerName)\r\n{\r\n validateClassKey(classKeys, type, readerName);\r\n if (typeof Class !== \"function\")\r\n {\r\n throw new TypeError(`${readerName} class \"${type}\" must be a constructor`);\r\n }\r\n}\r\n\r\nfunction mergeClasses(values, classes, classKeys, readerName)\r\n{\r\n if (!classes || typeof classes !== \"object\")\r\n {\r\n throw new TypeError(`${readerName} classes option must be an object`);\r\n }\r\n\r\n const next = { ...values.classes };\r\n for (const [ type, Class ] of Object.entries(classes))\r\n {\r\n validateClass(classKeys, type, Class, readerName);\r\n next[type] = Class;\r\n }\r\n values.classes = next;\r\n}\r\n\r\n/**\r\n * Normalizes reader options against their supported defaults for the Black\r\n * object-graph reader.\r\n */\r\nexport function normalizeValues(base, options, classKeys, readerName)\r\n{\r\n if (!options || typeof options !== \"object\")\r\n {\r\n throw new TypeError(`${readerName} options must be an object`);\r\n }\r\n\r\n assertKnownOptions(options, readerName);\r\n\r\n const values = cloneValues(base);\r\n if (Object.hasOwn(options, \"emit\")) values.emit = normalizeEmit(options.emit, readerName);\r\n if (Object.hasOwn(options, \"schema\")) values.schema = options.schema ?? null;\r\n if (Object.hasOwn(options, \"registry\")) values.registry = options.registry ?? null;\r\n if (Object.hasOwn(options, \"sourceShapes\")) values.sourceShapes = options.sourceShapes ?? null;\r\n if (Object.hasOwn(options, \"rootName\")) values.rootName = options.rootName ?? \"default\";\r\n if (Object.hasOwn(options, \"firstId\")) values.firstId = options.firstId ?? 1;\r\n if (Object.hasOwn(options, \"metadata\")) values.metadata = options.metadata ?? null;\r\n if (Object.hasOwn(options, \"includeMetadata\")) values.includeMetadata = Boolean(options.includeMetadata);\r\n if (Object.hasOwn(options, \"includeClassMetadata\")) values.includeClassMetadata = Boolean(options.includeClassMetadata);\r\n if (Object.hasOwn(options, \"includeFieldTrace\")) values.includeFieldTrace = Boolean(options.includeFieldTrace);\r\n if (Object.hasOwn(options, \"includeRefIndex\")) values.includeRefIndex = Boolean(options.includeRefIndex);\r\n if (Object.hasOwn(options, \"trace\")) values.trace = Boolean(options.trace);\r\n if (Object.hasOwn(options, \"debug\")) values.debug = Boolean(options.debug);\r\n if (Object.hasOwn(options, \"decodeBinaryBlocks\")) values.decodeBinaryBlocks = Boolean(options.decodeBinaryBlocks);\r\n if (Object.hasOwn(options, \"captureUnknownBlackFields\")) values.captureUnknownBlackFields = Boolean(options.captureUnknownBlackFields);\r\n if (Object.hasOwn(options, \"captureUnknownResourceFields\")) values.captureUnknownResourceFields = Boolean(options.captureUnknownResourceFields);\r\n if (Object.hasOwn(options, \"captureUnknownWhenNoBlackFields\")) values.captureUnknownWhenNoBlackFields = Boolean(options.captureUnknownWhenNoBlackFields);\r\n if (Object.hasOwn(options, \"allowUnknownStringFallback\")) values.allowUnknownStringFallback = Boolean(options.allowUnknownStringFallback);\r\n if (Object.hasOwn(options, \"rootFields\")) values.rootFields = cloneListOrValue(options.rootFields);\r\n if (Object.hasOwn(options, \"payloadRootFields\")) values.payloadRootFields = cloneListOrValue(options.payloadRootFields);\r\n if (Object.hasOwn(options, \"payloadTypeField\")) values.payloadTypeField = options.payloadTypeField;\r\n if (Object.hasOwn(options, \"payloadIdField\")) values.payloadIdField = options.payloadIdField;\r\n if (Object.hasOwn(options, \"payloadReferenceField\")) values.payloadReferenceField = options.payloadReferenceField;\r\n if (Object.hasOwn(options, \"adapter\")) values.adapter = options.adapter ?? null;\r if (Object.hasOwn(options, \"pathHandler\"))\r\n {\r\n if (options.pathHandler !== null && options.pathHandler !== undefined && typeof options.pathHandler !== \"function\")\r\n {\r\n throw new TypeError(`${readerName} pathHandler option must be a function`);\r\n }\r\n values.pathHandler = options.pathHandler ?? null;\r\n }\r\n if (Object.hasOwn(options, \"classes\")) mergeClasses(values, options.classes, classKeys, readerName);\r\n return values;\r\n}\r\n\r\n/**\r\n * Throws a format error for a reader operation that is intentionally unavailable\r\n * for the Black object-graph reader.\r\n */\r\nexport function notImplemented(readerName, methodName)\r\n{\r\n return new Error(`${readerName}.${methodName} is not implemented yet`);\r\n}\r\n\r\n/**\r\n * Converts a parsed payload into a JSON-safe value for the Black object-graph\r\n * reader.\r\n */\r\nexport function toJsonValue(value, seen = new WeakSet())\r\n{\r\n if (value === null || typeof value !== \"object\") return value;\r\n if (ArrayBuffer.isView(value)) return Array.from(value, item => toJsonValue(item, seen));\r\n if (Array.isArray(value)) return value.map(item => toJsonValue(item, seen));\r\n\r\n if (seen.has(value))\r\n {\r\n throw new TypeError(\"Reader.toJSON cannot convert circular data\");\r\n }\r\n\r\n if (typeof value.toJSON === \"function\")\r\n {\r\n seen.add(value);\r\n const json = toJsonValue(value.toJSON(), seen);\r\n seen.delete(value);\r\n return json;\r\n }\r\n\r\n seen.add(value);\r\n const out = {};\r\n for (const key of Object.keys(value))\r\n {\r\n out[key] = toJsonValue(value[key], seen);\r\n }\r\n seen.delete(value);\r\n return out;\r\n}\r\n"],"names":["OUTPUT_JSON","OUTPUT_RAW","OUTPUT_DOCUMENT","OUTPUT_PAYLOAD","OUTPUT_RUNTIME","DEFAULT_VALUES","Object","freeze","emit","schema","blackDefinitions","registry","sourceShapes","rootName","firstId","metadata","includeMetadata","includeClassMetadata","includeFieldTrace","includeRefIndex","trace","debug","decodeBinaryBlocks","captureUnknownBlackFields","captureUnknownResourceFields","captureUnknownWhenNoBlackFields","allowUnknownStringFallback","rootFields","payloadRootFields","payloadTypeField","payloadIdField","payloadReferenceField","pathHandler","adapter","classes","OPTION_KEYS","Set","keys","normalizeEmit","readerName","undefined","Error","assertKnownOptions","options","key","has","TypeError","classMap","values","cloneValues","Boolean","cloneListOrValue","value","Array","isArray","slice","validateClassKey","classKeys","validateClass","type","Class","mergeClasses","next","entries","normalizeValues","base","hasOwn","toJsonValue","seen","WeakSet","ArrayBuffer","isView","from","item","map","toJSON","add","json","delete","out"],"mappings":";;AAEO,MAAMA,WAAW,GAAG;AACpB,MAAMC,UAAU,GAAG;AACnB,MAAMC,eAAe,GAAG;AACxB,MAAMC,cAAc,GAAG;AACvB,MAAMC,cAAc,GAAG;MAEjBC,cAAc,GAAGC,MAAM,CAACC,MAAM,CAAC;AACxCC,EAAAA,IAAI,EAAER,WAAW;AACjBS,EAAAA,MAAM,EAAEC,OAAgB;AACxBC,EAAAA,QAAQ,EAAE,IAAI;AACdC,EAAAA,YAAY,EAAE,IAAI;AAClBC,EAAAA,QAAQ,EAAE,SAAS;AACnBC,EAAAA,OAAO,EAAE,CAAC;AACVC,EAAAA,QAAQ,EAAE,IAAI;AACdC,EAAAA,eAAe,EAAE,KAAK;AACtBC,EAAAA,oBAAoB,EAAE,KAAK;AAC3BC,EAAAA,iBAAiB,EAAE,KAAK;AACxBC,EA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yB,IAAI;AACf,EAAA;AAEAT,EAAAA,IAAI,CAACQ,GAAG,CAACxB,KAAK,CAAC;EACf,MAAM2B,GAAG,GAAG,EAAE;EACd,KAAK,MAAMnC,GAAG,IAAItC,MAAM,CAAC+B,IAAI,CAACe,KAAK,CAAC,EACpC;AACI2B,IAAAA,GAAG,CAACnC,GAAG,CAAC,GAAGuB,WAAW,CAACf,KAAK,CAACR,GAAG,CAAC,EAAEwB,IAAI,CAAC;AAC5C,EAAA;AACAA,EAAAA,IAAI,CAACU,MAAM,CAAC1B,KAAK,CAAC;AAClB,EAAA,OAAO2B,GAAG;AACd;;;;"}
|
|
1
|
+
{"version":3,"file":"helpers.js","sources":["../../../../../../src/resource/formats/black/core/helpers.js"],"sourcesContent":["import { toJsonAcyclic } from \"../../../format/jsonPolicies.js\";\nimport blackDefinitions from \"./blackSchema.js\";\n\nexport const OUTPUT_JSON = \"json\";\nexport const OUTPUT_RAW = \"raw\";\nexport const OUTPUT_DOCUMENT = \"document\";\nexport const OUTPUT_PAYLOAD = \"payload\";\nexport const OUTPUT_RUNTIME = \"runtime\";\n\nexport const DEFAULT_VALUES = Object.freeze({\n emit: OUTPUT_JSON,\n schema: blackDefinitions,\n registry: null,\n sourceShapes: null,\n rootName: \"default\",\n firstId: 1,\n metadata: null,\n includeMetadata: false,\n includeClassMetadata: false,\n includeFieldTrace: false,\n includeRefIndex: false,\n trace: false,\n debug: false,\n decodeBinaryBlocks: false,\n captureUnknownBlackFields: false,\n captureUnknownResourceFields: false,\n captureUnknownWhenNoBlackFields: false,\n allowUnknownStringFallback: false,\n rootFields: null,\n payloadRootFields: null,\n payloadTypeField: \"_type\",\n payloadIdField: \"_id\",\n payloadReferenceField: \"_reference\",\n pathHandler: null,\n adapter: null,\n classes: Object.freeze({})\n});\n\nconst OPTION_KEYS = new Set(Object.keys(DEFAULT_VALUES));\n\n\nfunction normalizeEmit(emit, readerName)\n{\n if (emit === undefined || emit === OUTPUT_JSON) return OUTPUT_JSON;\n if (emit === OUTPUT_RAW) return OUTPUT_RAW;\n if (emit === OUTPUT_DOCUMENT) return OUTPUT_DOCUMENT;\n if (emit === OUTPUT_PAYLOAD) return OUTPUT_PAYLOAD;\n if (emit === OUTPUT_RUNTIME) return OUTPUT_RUNTIME;\n throw new Error(`${readerName} unknown emit value \"${emit}\"`);\n}\n\nfunction assertKnownOptions(options, readerName)\n{\n for (const key of Object.keys(options))\n {\n if (!OPTION_KEYS.has(key))\n {\n throw new TypeError(`${readerName} unknown option \"${key}\"`);\n }\n }\n}\n\nfunction classMap(values)\n{\n return values && values.classes ? values.classes : {};\n}\n\nfunction cloneValues(values)\n{\n return {\n emit: values.emit,\n schema: values.schema ?? null,\n registry: values.registry ?? null,\n sourceShapes: values.sourceShapes ?? null,\n rootName: values.rootName ?? \"default\",\n firstId: values.firstId ?? 1,\n metadata: values.metadata ?? null,\n includeMetadata: Boolean(values.includeMetadata),\n includeClassMetadata: Boolean(values.includeClassMetadata),\n includeFieldTrace: Boolean(values.includeFieldTrace),\n includeRefIndex: Boolean(values.includeRefIndex),\n trace: Boolean(values.trace),\n debug: Boolean(values.debug),\n decodeBinaryBlocks: Boolean(values.decodeBinaryBlocks),\n captureUnknownBlackFields: Boolean(values.captureUnknownBlackFields),\n captureUnknownResourceFields: Boolean(values.captureUnknownResourceFields),\n captureUnknownWhenNoBlackFields: Boolean(values.captureUnknownWhenNoBlackFields),\n allowUnknownStringFallback: Boolean(values.allowUnknownStringFallback),\n rootFields: cloneListOrValue(values.rootFields),\n payloadRootFields: cloneListOrValue(values.payloadRootFields),\n payloadTypeField: values.payloadTypeField,\n payloadIdField: values.payloadIdField,\n payloadReferenceField: values.payloadReferenceField,\n pathHandler: values.pathHandler ?? null,\n adapter: values.adapter ?? null,\n classes: { ...classMap(values) }\n };\n}\n\nfunction cloneListOrValue(value)\n{\n return Array.isArray(value) ? value.slice() : value ?? null;\n}\n\n/** Validates a requested runtime class key for the Black object-graph reader. */\nexport function validateClassKey(classKeys, key, readerName)\n{\n if (typeof key !== \"string\" || !key)\n {\n throw new Error(`${readerName} class type must be a non-empty string`);\n }\n}\n\n/**\n * Validates a resolved runtime class constructor for the Black object-graph\n * reader.\n */\nexport function validateClass(classKeys, type, Class, readerName)\n{\n validateClassKey(classKeys, type, readerName);\n if (typeof Class !== \"function\")\n {\n throw new TypeError(`${readerName} class \"${type}\" must be a constructor`);\n }\n}\n\nfunction mergeClasses(values, classes, classKeys, readerName)\n{\n if (!classes || typeof classes !== \"object\")\n {\n throw new TypeError(`${readerName} classes option must be an object`);\n }\n\n const next = { ...values.classes };\n for (const [ type, Class ] of Object.entries(classes))\n {\n validateClass(classKeys, type, Class, readerName);\n next[type] = Class;\n }\n values.classes = next;\n}\n\n/**\n * Normalizes reader options against their supported defaults for the Black\n * object-graph reader.\n */\nexport function normalizeValues(base, options, classKeys, readerName)\n{\n if (!options || typeof options !== \"object\")\n {\n throw new TypeError(`${readerName} options must be an object`);\n }\n\n assertKnownOptions(options, readerName);\n\n const values = cloneValues(base);\n if (Object.hasOwn(options, \"emit\")) values.emit = normalizeEmit(options.emit, readerName);\n if (Object.hasOwn(options, \"schema\")) values.schema = options.schema ?? null;\n if (Object.hasOwn(options, \"registry\")) values.registry = options.registry ?? null;\n if (Object.hasOwn(options, \"sourceShapes\")) values.sourceShapes = options.sourceShapes ?? null;\n if (Object.hasOwn(options, \"rootName\")) values.rootName = options.rootName ?? \"default\";\n if (Object.hasOwn(options, \"firstId\")) values.firstId = options.firstId ?? 1;\n if (Object.hasOwn(options, \"metadata\")) values.metadata = options.metadata ?? null;\n if (Object.hasOwn(options, \"includeMetadata\")) values.includeMetadata = Boolean(options.includeMetadata);\n if (Object.hasOwn(options, \"includeClassMetadata\")) values.includeClassMetadata = Boolean(options.includeClassMetadata);\n if (Object.hasOwn(options, \"includeFieldTrace\")) values.includeFieldTrace = Boolean(options.includeFieldTrace);\n if (Object.hasOwn(options, \"includeRefIndex\")) values.includeRefIndex = Boolean(options.includeRefIndex);\n if (Object.hasOwn(options, \"trace\")) values.trace = Boolean(options.trace);\n if (Object.hasOwn(options, \"debug\")) values.debug = Boolean(options.debug);\n if (Object.hasOwn(options, \"decodeBinaryBlocks\")) values.decodeBinaryBlocks = Boolean(options.decodeBinaryBlocks);\n if (Object.hasOwn(options, \"captureUnknownBlackFields\")) values.captureUnknownBlackFields = Boolean(options.captureUnknownBlackFields);\n if (Object.hasOwn(options, \"captureUnknownResourceFields\")) values.captureUnknownResourceFields = Boolean(options.captureUnknownResourceFields);\n if (Object.hasOwn(options, \"captureUnknownWhenNoBlackFields\")) values.captureUnknownWhenNoBlackFields = Boolean(options.captureUnknownWhenNoBlackFields);\n if (Object.hasOwn(options, \"allowUnknownStringFallback\")) values.allowUnknownStringFallback = Boolean(options.allowUnknownStringFallback);\n if (Object.hasOwn(options, \"rootFields\")) values.rootFields = cloneListOrValue(options.rootFields);\n if (Object.hasOwn(options, \"payloadRootFields\")) values.payloadRootFields = cloneListOrValue(options.payloadRootFields);\n if (Object.hasOwn(options, \"payloadTypeField\")) values.payloadTypeField = options.payloadTypeField;\n if (Object.hasOwn(options, \"payloadIdField\")) values.payloadIdField = options.payloadIdField;\n if (Object.hasOwn(options, \"payloadReferenceField\")) values.payloadReferenceField = options.payloadReferenceField;\n if (Object.hasOwn(options, \"adapter\")) values.adapter = options.adapter ?? null;\n if (Object.hasOwn(options, \"pathHandler\"))\n {\n if (options.pathHandler !== null && options.pathHandler !== undefined && typeof options.pathHandler !== \"function\")\n {\n throw new TypeError(`${readerName} pathHandler option must be a function`);\n }\n values.pathHandler = options.pathHandler ?? null;\n }\n if (Object.hasOwn(options, \"classes\")) mergeClasses(values, options.classes, classKeys, readerName);\n return values;\n}\n\n/**\n * Throws a format error for a reader operation that is intentionally unavailable\n * for the Black object-graph reader.\n */\nexport function notImplemented(readerName, methodName)\n{\n return new Error(`${readerName}.${methodName} is not implemented yet`);\n}\n\n/**\n * Converts a parsed payload into a JSON-safe value for the Black object-graph\n * reader.\n */\n/**\n * Convert to JSON, refusing a cycle, naming this reader in the error.\n *\n * @param {*} value Any decoded value.\n * @returns {*} A JSON-safe value.\n */\nexport function toJsonValue(value)\n{\n return toJsonAcyclic(value, \"Reader\");\n}\n"],"names":["OUTPUT_JSON","OUTPUT_RAW","OUTPUT_DOCUMENT","OUTPUT_PAYLOAD","OUTPUT_RUNTIME","DEFAULT_VALUES","Object","freeze","emit","schema","blackDefinitions","registry","sourceShapes","rootName","firstId","metadata","includeMetadata","includeClassMetadata","includeFieldTrace","includeRefIndex","trace","debug","decodeBinaryBlocks","captureUnknownBlackFields","captureUnknownResourceFields","captureUnknownWhenNoBlackFields","allowUnknownStringFallback","rootFields","payloadRootFields","payloadTypeField","payloadIdField","payloadReferenceField","pathHandler","adapter","classes","OPTION_KEYS","Set","keys","normalizeEmit","readerName","undefined","Error","assertKnownOptions","options","key","has","TypeError","classMap","values","cloneValues","Boolean","cloneListOrValue","value","Array","isArray","slice","validateClassKey","classKeys","validateClass","type","Class","mergeClasses","next","entries","normalizeValues","base","hasOwn","toJsonValue","toJsonAcyclic"],"mappings":";;;AAGO,MAAMA,WAAW,GAAG;AACpB,MAAMC,UAAU,GAAG;AACnB,MAAMC,eAAe,GAAG;AACxB,MAAMC,cAAc,GAAG;AACvB,MAAMC,cAAc,GAAG;MAEjBC,cAAc,GAAGC,MAAM,CAACC,MAAM,CAAC;AACxCC,EAAAA,IAAI,EAAER,WAAW;AACjBS,EAAAA,MAAM,EAAEC,OAAgB;AACxBC,EAAAA,QAAQ,EAAE,IAAI;AACdC,EAAAA,YAAY,EAAE,IAAI;AAClBC,EAAAA,QAAQ,EAAE,SAAS;AACnBC,EAAAA,OAAO,EAAE,CAAC;AACVC,EAAAA,QAAQ,EAAE,IAAI;AACdC,EAAAA,eAAe,EAAE,KAAK;AACtBC,EAAAA,oBAAoB,EAAE,KAAK;AAC3BC,EAAAA,iBAAiB,EAAE,KAAK;AACxBC,EAAAA,eAAe,EAAE,KAAK;AACtBC,EAAAA,KAAK,EAAE,K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