@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,59 @@
|
|
|
1
|
+
import { applyDecs2311 as _applyDecs2311 } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import { Tr2PerObjectData } from './Tr2PerObjectData.js';
|
|
3
|
+
import { carbon, impl } from '#schema';
|
|
4
|
+
|
|
5
|
+
let _initProto;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A turret set's vertex and pixel blocks.
|
|
9
|
+
*/
|
|
10
|
+
class EveTurretSetPerObjectData extends Tr2PerObjectData {
|
|
11
|
+
static {
|
|
12
|
+
[_initProto] = _applyDecs2311(this, [], [[[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Carbon binds this payload without consulting the technique mask, a form distinguished from the gated one only by C++ overload resolution on an argument type. Our layouts declare the stages they serve, so the gate is per declaration; see the family README and CE-19.")], 18, "SetPerObjectDataToDevice"]], 0, void 0, Tr2PerObjectData).e;
|
|
13
|
+
}
|
|
14
|
+
/** The vertex payload. */
|
|
15
|
+
vs = (_initProto(this), null);
|
|
16
|
+
|
|
17
|
+
/** The pixel payload. */
|
|
18
|
+
ps = null;
|
|
19
|
+
|
|
20
|
+
/** @returns {object[]} The payloads this object uploads. */
|
|
21
|
+
GetPayloads() {
|
|
22
|
+
return [this.vs, this.ps];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Leases the object and its payload.
|
|
27
|
+
*
|
|
28
|
+
* The layout name is fixed rather than a parameter: Carbon's class is bound to
|
|
29
|
+
* its struct type by the member's declaration, so there is nothing for a caller
|
|
30
|
+
* to choose.
|
|
31
|
+
*
|
|
32
|
+
* @param {object} accumulator An `ITriRenderBatchAccumulator`.
|
|
33
|
+
* @returns {EveTurretSetPerObjectData} The leased object.
|
|
34
|
+
*/
|
|
35
|
+
static alloc(accumulator) {
|
|
36
|
+
const record = new this();
|
|
37
|
+
record.vs = accumulator.Alloc("EveTurretSetVSData");
|
|
38
|
+
record.ps = accumulator.Alloc("EveTurretSetPSData");
|
|
39
|
+
return record;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Uploads this object's payload and binds it.
|
|
44
|
+
*
|
|
45
|
+
* Carbon binds without consulting the technique's shader mask; we gate on it.
|
|
46
|
+
* The reason is the family's, stated once in README.md and docketed as CE-19.
|
|
47
|
+
*
|
|
48
|
+
* @param {object[]} buffers A `Tr2ConstantBufferAL` per `ShaderType`.
|
|
49
|
+
* @param {number} constantTypeMask A bit per `ShaderType`.
|
|
50
|
+
* @param {object} renderContext The context to upload and bind against.
|
|
51
|
+
* @returns {number} How many payloads were uploaded.
|
|
52
|
+
*/
|
|
53
|
+
SetPerObjectDataToDevice(buffers, constantTypeMask, renderContext) {
|
|
54
|
+
return Tr2PerObjectData.setPerObjectDataToDevice(this, buffers, constantTypeMask, renderContext);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export { EveTurretSetPerObjectData };
|
|
59
|
+
//# sourceMappingURL=EveTurretSetPerObjectData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EveTurretSetPerObjectData.js","sources":["../../../../../../src/trinity/core/rawData/perObjectData/EveTurretSetPerObjectData.js"],"sourcesContent":["// Source: trinity/Eve/Turret/EveTurretSet.h:79\r\n//\r\n// A turret set's vertex and pixel blocks.\r\n//\r\n// A VERTEX PAYLOAD AND A PIXEL PAYLOAD, each at its own per-object register -\r\n// the same shape as Tr2PerObjectDataStandard, which this does NOT extend because\r\n// Carbon's derives straight from Tr2PerObjectData.\r\n//\r\n// Carbon holds its payload as members and uploads them with hand-written\r\n// FillAndSetConstants calls.\r\n//\r\n// Here the payload is a RawData leased in a named layout and the upload is the\r\n// family's shared one, so this class carries the donor's identity and its payload\r\n// shape - which is all that distinguishes it from its siblings in Carbon either.\r\n\r\nimport { Tr2PerObjectData } from \"./Tr2PerObjectData.js\";\r\nimport { carbon, impl } from \"#schema\";\r\n\r\n\r\n/**\r\n * A turret set's vertex and pixel blocks.\r\n */\r\nexport class EveTurretSetPerObjectData extends Tr2PerObjectData\r\n{\r\n /** The vertex payload. */\r\n vs = null;\r\n\r\n /** The pixel payload. */\r\n ps = null;\r\n\r\n /** @returns {object[]} The payloads this object uploads. */\r\n GetPayloads()\r\n {\r\n return [ this.vs, this.ps ];\r\n }\r\n\r\n /**\r\n * Leases the object and its payload.\r\n *\r\n * The layout name is fixed rather than a parameter: Carbon's class is bound to\r\n * its struct type by the member's declaration, so there is nothing for a caller\r\n * to choose.\r\n *\r\n * @param {object} accumulator An `ITriRenderBatchAccumulator`.\r\n * @returns {EveTurretSetPerObjectData} The leased object.\r\n */\r\n static alloc(accumulator)\r\n {\r\n const record = new this();\r\n\r\n record.vs = accumulator.Alloc(\"EveTurretSetVSData\");\r\n record.ps = accumulator.Alloc(\"EveTurretSetPSData\");\r\n\r\n return record;\r\n }\r\n\r\n /**\r\n * Uploads this object's payload and binds it.\r\n *\r\n * Carbon binds without consulting the technique's shader mask; we gate on it.\r\n * The reason is the family's, stated once in README.md and docketed as CE-19.\r\n *\r\n * @param {object[]} buffers A `Tr2ConstantBufferAL` per `ShaderType`.\r\n * @param {number} constantTypeMask A bit per `ShaderType`.\r\n * @param {object} renderContext The context to upload and bind against.\r\n * @returns {number} How many payloads were uploaded.\r\n */\r\n @carbon.method\r\n @impl.adapted\r\n @impl.reason(\"Carbon binds this payload without consulting the technique mask, a form distinguished from the gated one only by C++ overload resolution on an argument type. Our layouts declare the stages they serve, so the gate is per declaration; see the family README and CE-19.\")\r\n SetPerObjectDataToDevice(buffers, constantTypeMask, renderContext)\r\n {\r\n return Tr2PerObjectData.setPerObjectDataToDevice(this, buffers, constantTypeMask, renderContext);\r\n }\r\n}\r\n"],"names":["EveTurretSetPerObjectData","Tr2PerObjectData","_initProto","_applyDecs","carbon","method","impl","adapted","reason","e","vs","ps","GetPayloads","alloc","accumulator","record","Alloc","SetPerObjectDataToDevice","buffers","constantTypeMask","renderContext","setPerObjectDataToDevice"],"mappings":";;;;;;AAmBA;AACA;AACA;AACO,MAAMA,yBAAyB,SAASC,gBAAgB,CAC/D;AAAA,EAAA;IAAA,CAAAC,UAAA,CAAA,GAAAC,cAAA,CAAA,IAAA,EAAA,EAAA,EAAA,CAAA,CAAA,CA4CGC,MAAM,EAANA,MAAM,CAACC,MAAM,EACbC,IAAI,EAAJA,IAAI,CAACC,OAAO,EAAA,MAAA,EACZD,IAAI,CAACE,MAAM,CAAC,2QAA2Q,CAAC,CAAA,EAAA,EAAA,EAAA,0BAAA,CAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EA/C5OP,gBAAgB,CAAA,CAAAQ,CAAA;AAAA;AAE7D;EACAC,EAAE,IAAAR,UAAA,CAAA,IAAA,CAAA,EAAG,IAAI;;AAET;AACAS,EAAAA,EAAE,GAAG,IAAI;;AAET;AACAC,EAAAA,WAAWA,GACX;IACE,OAAO,CAAE,IAAI,CAACF,EAAE,EAAE,IAAI,CAACC,EAAE,CAAE;AAC7B,EAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOE,KAAKA,CAACC,WAAW,EACxB;AACE,IAAA,MAAMC,MAAM,GAAG,IAAI,IAAI,EAAE;IAEzBA,MAAM,CAACL,EAAE,GAAGI,WAAW,CAACE,KAAK,CAAC,oBAAoB,CAAC;IACnDD,MAAM,CAACJ,EAAE,GAAGG,WAAW,CAACE,KAAK,CAAC,oBAAoB,CAAC;AAEnD,IAAA,OAAOD,MAAM;AACf,EAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIEE,EAAAA,wBAAwBA,CAACC,OAAO,EAAEC,gBAAgB,EAAEC,aAAa,EACjE;IACE,OAAOnB,gBAAgB,CAACoB,wBAAwB,CAAC,IAAI,EAAEH,OAAO,EAAEC,gBAAgB,EAAEC,aAAa,CAAC;AAClG,EAAA;AACF;;;;"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { applyDecs2311 as _applyDecs2311 } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import { Tr2PerObjectData } from './Tr2PerObjectData.js';
|
|
3
|
+
import { carbon, impl } from '#schema';
|
|
4
|
+
|
|
5
|
+
let _initProto;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A stretch's endpoint and effect block, bound to both registers.
|
|
9
|
+
*/
|
|
10
|
+
class StretchPerObjectData extends Tr2PerObjectData {
|
|
11
|
+
static {
|
|
12
|
+
[_initProto] = _applyDecs2311(this, [], [[[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Carbon binds this payload without consulting the technique mask, a form distinguished from the gated one only by C++ overload resolution on an argument type. Our layouts declare the stages they serve, so the gate is per declaration; see the family README and CE-19.")], 18, "SetPerObjectDataToDevice"]], 0, void 0, Tr2PerObjectData).e;
|
|
13
|
+
}
|
|
14
|
+
/** The payload, bound to both per-object registers. */
|
|
15
|
+
data = (_initProto(this), null);
|
|
16
|
+
|
|
17
|
+
/** @returns {object[]} The payloads this object uploads. */
|
|
18
|
+
GetPayloads() {
|
|
19
|
+
return [this.data];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Leases the object and its payload.
|
|
24
|
+
*
|
|
25
|
+
* The layout name is fixed rather than a parameter: Carbon's class is bound to
|
|
26
|
+
* its struct type by the member's declaration, so there is nothing for a caller
|
|
27
|
+
* to choose.
|
|
28
|
+
*
|
|
29
|
+
* @param {object} accumulator An `ITriRenderBatchAccumulator`.
|
|
30
|
+
* @returns {StretchPerObjectData} The leased object.
|
|
31
|
+
*/
|
|
32
|
+
static alloc(accumulator) {
|
|
33
|
+
const record = new this();
|
|
34
|
+
record.data = accumulator.Alloc("EveStretch2PerObjectData");
|
|
35
|
+
return record;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Uploads this object's payload and binds it.
|
|
40
|
+
*
|
|
41
|
+
* Carbon binds without consulting the technique's shader mask; we gate on it.
|
|
42
|
+
* The reason is the family's, stated once in README.md and docketed as CE-19.
|
|
43
|
+
*
|
|
44
|
+
* @param {object[]} buffers A `Tr2ConstantBufferAL` per `ShaderType`.
|
|
45
|
+
* @param {number} constantTypeMask A bit per `ShaderType`.
|
|
46
|
+
* @param {object} renderContext The context to upload and bind against.
|
|
47
|
+
* @returns {number} How many payloads were uploaded.
|
|
48
|
+
*/
|
|
49
|
+
SetPerObjectDataToDevice(buffers, constantTypeMask, renderContext) {
|
|
50
|
+
return Tr2PerObjectData.setPerObjectDataToDevice(this, buffers, constantTypeMask, renderContext);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { StretchPerObjectData };
|
|
55
|
+
//# sourceMappingURL=StretchPerObjectData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StretchPerObjectData.js","sources":["../../../../../../src/trinity/core/rawData/perObjectData/StretchPerObjectData.js"],"sourcesContent":["// Source: trinity/Eve/Renderable/Stretch/EveStretch2.cpp:20\r\n//\r\n// A stretch's endpoint and effect block, bound to both registers.\r\n//\r\n// ONE PAYLOAD, BOUND TO BOTH per-object registers. Carbon calls\r\n// FillAndSetConstants TWICE over the same bytes to do that; the layout declares\r\n// `stages: [ \"vs\", \"ps\" ]`, so the payload is uploaded once and bound to both.\r\n// See README.md, The divergence.\r\n//\r\n// CARBON HOLDS NOTHING: `void* m_data; size_t m_size` point at a 64-byte window\r\n// starting at EveStretch2::m_source, so the OWNER's member block is the constant\r\n// buffer (EveStretch2.h:105-109, a float between the two Vector3s filling each w).\r\n// JavaScript cannot point into an object's fields, so the layout names those four\r\n// vectors and the producer writes them. See README.md.\r\n//\r\n// Here the payload is a RawData leased in a named layout and the upload is the\r\n// family's shared one, so this class carries the donor's identity and its payload\r\n// shape - which is all that distinguishes it from its siblings in Carbon either.\r\n\r\nimport { Tr2PerObjectData } from \"./Tr2PerObjectData.js\";\r\nimport { carbon, impl } from \"#schema\";\r\n\r\n\r\n/**\r\n * A stretch's endpoint and effect block, bound to both registers.\r\n */\r\nexport class StretchPerObjectData extends Tr2PerObjectData\r\n{\r\n /** The payload, bound to both per-object registers. */\r\n data = null;\r\n\r\n /** @returns {object[]} The payloads this object uploads. */\r\n GetPayloads()\r\n {\r\n return [ this.data ];\r\n }\r\n\r\n /**\r\n * Leases the object and its payload.\r\n *\r\n * The layout name is fixed rather than a parameter: Carbon's class is bound to\r\n * its struct type by the member's declaration, so there is nothing for a caller\r\n * to choose.\r\n *\r\n * @param {object} accumulator An `ITriRenderBatchAccumulator`.\r\n * @returns {StretchPerObjectData} The leased object.\r\n */\r\n static alloc(accumulator)\r\n {\r\n const record = new this();\r\n\r\n record.data = accumulator.Alloc(\"EveStretch2PerObjectData\");\r\n\r\n return record;\r\n }\r\n\r\n /**\r\n * Uploads this object's payload and binds it.\r\n *\r\n * Carbon binds without consulting the technique's shader mask; we gate on it.\r\n * The reason is the family's, stated once in README.md and docketed as CE-19.\r\n *\r\n * @param {object[]} buffers A `Tr2ConstantBufferAL` per `ShaderType`.\r\n * @param {number} constantTypeMask A bit per `ShaderType`.\r\n * @param {object} renderContext The context to upload and bind against.\r\n * @returns {number} How many payloads were uploaded.\r\n */\r\n @carbon.method\r\n @impl.adapted\r\n @impl.reason(\"Carbon binds this payload without consulting the technique mask, a form distinguished from the gated one only by C++ overload resolution on an argument type. Our layouts declare the stages they serve, so the gate is per declaration; see the family README and CE-19.\")\r\n SetPerObjectDataToDevice(buffers, constantTypeMask, renderContext)\r\n {\r\n return Tr2PerObjectData.setPerObjectDataToDevice(this, buffers, constantTypeMask, renderContext);\r\n }\r\n}\r\n"],"names":["StretchPerObjectData","Tr2PerObjectData","_initProto","_applyDecs","carbon","method","impl","adapted","reason","e","data","GetPayloads","alloc","accumulator","record","Alloc","SetPerObjectDataToDevice","buffers","constantTypeMask","renderContext","setPerObjectDataToDevice"],"mappings":";;;;;;AAuBA;AACA;AACA;AACO,MAAMA,oBAAoB,SAASC,gBAAgB,CAC1D;AAAA,EAAA;IAAA,CAAAC,UAAA,CAAA,GAAAC,cAAA,CAAA,IAAA,EAAA,EAAA,EAAA,CAAA,CAAA,CAwCGC,MAAM,EAANA,MAAM,CAACC,MAAM,EACbC,IAAI,EAAJA,IAAI,CAACC,OAAO,EAAA,MAAA,EACZD,IAAI,CAACE,MAAM,CAAC,2QAA2Q,CAAC,CAAA,EAAA,EAAA,EAAA,0BAAA,CAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EA3CjPP,gBAAgB,CAAA,CAAAQ,CAAA;AAAA;AAExD;EACAC,IAAI,IAAAR,UAAA,CAAA,IAAA,CAAA,EAAG,IAAI;;AAEX;AACAS,EAAAA,WAAWA,GACX;AACE,IAAA,OAAO,CAAE,IAAI,CAACD,IAAI,CAAE;AACtB,EAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOE,KAAKA,CAACC,WAAW,EACxB;AACE,IAAA,MAAMC,MAAM,GAAG,IAAI,IAAI,EAAE;IAEzBA,MAAM,CAACJ,IAAI,GAAGG,WAAW,CAACE,KAAK,CAAC,0BAA0B,CAAC;AAE3D,IAAA,OAAOD,MAAM;AACf,EAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIEE,EAAAA,wBAAwBA,CAACC,OAAO,EAAEC,gBAAgB,EAAEC,aAAa,EACjE;IACE,OAAOlB,gBAAgB,CAACmB,wBAAwB,CAAC,IAAI,EAAEH,OAAO,EAAEC,gBAAgB,EAAEC,aAAa,CAAC;AAClG,EAAA;AACF;;;;"}
|
|
@@ -1,32 +1,23 @@
|
|
|
1
|
+
import { applyDecs2311 as _applyDecs2311 } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
1
2
|
import { CjsConstantPayload } from '#contracts';
|
|
3
|
+
import { carbon, impl, CjsSchema } from '#schema';
|
|
2
4
|
import { ShaderType } from '#consts/render-context';
|
|
3
|
-
import { FillAndSetConstants } from '
|
|
4
|
-
import { PER_OBJECT_PS, PER_OBJECT_VS } from '
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
//
|
|
12
|
-
// THIS HEAD COMMENT USED TO SAY the upload path was "engine-owned and
|
|
13
|
-
// intentionally not modelled here; the engine reads the canonical
|
|
14
|
-
// CjsConstantPayload at dispatch". That was the engine-means-`trinityal/webgpu`
|
|
15
|
-
// misreading: Carbon's SetPerObjectDataToDevice calls FillAndSetConstants,
|
|
16
|
-
// which lives in Tr2RenderUtils.h - Trinity. The upload is here now and it
|
|
17
|
-
// writes a Tr2ConstantBufferAL through the abstraction layer.
|
|
18
|
-
//
|
|
19
|
-
// ApplyConstantBuffers, the indirect-draw sibling, is still unported: it takes
|
|
20
|
-
// a Tr2IndirectDrawBufferWriter and nothing on this path draws indirectly yet.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Per-object render data: the object id a batch is picked and identified by,
|
|
25
|
-
* and the upload of its constant payloads through the abstraction layer.
|
|
5
|
+
import { FillAndSetConstants } from '../../Tr2RenderUtils.js';
|
|
6
|
+
import { PER_OBJECT_PS, PER_OBJECT_VS } from '../../Tr2Renderer.js';
|
|
7
|
+
|
|
8
|
+
let _initProto;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Per-object render data: the object id a batch is picked and identified by,
|
|
12
|
+
* and the upload of its constant payloads through the abstraction layer.
|
|
26
13
|
*/
|
|
27
14
|
class Tr2PerObjectData {
|
|
15
|
+
static {
|
|
16
|
+
[_initProto] = _applyDecs2311(this, [], [[[carbon, carbon.method, impl, impl.implemented], 18, "SetPerObjectDataToDevice"], [[carbon, carbon.method, impl, impl.notImplemented, void 0, impl.reason("Tr2IndirectDrawBufferWriter is unported and nothing on this path draws indirectly; Carbon's base asserts here too.")], 18, "ApplyConstantBuffers"]]).e;
|
|
17
|
+
}
|
|
28
18
|
/** Starts with a zero object id. */
|
|
29
19
|
constructor() {
|
|
20
|
+
_initProto(this);
|
|
30
21
|
this.userData = 0;
|
|
31
22
|
}
|
|
32
23
|
|
|
@@ -40,6 +31,53 @@ class Tr2PerObjectData {
|
|
|
40
31
|
return this.userData;
|
|
41
32
|
}
|
|
42
33
|
|
|
34
|
+
/**
|
|
35
|
+
* The payloads this object uploads, in binding order.
|
|
36
|
+
*
|
|
37
|
+
* DECLARED BY EACH SUBCLASS, because Carbon's differ in what they hold and
|
|
38
|
+
* there is no single member shape to read. EveDecalPerObjectData owns a
|
|
39
|
+
* vertex/pixel struct pair; EveChildSpherePinPerObjectData owns ONE payload
|
|
40
|
+
* and Carbon uploads the same bytes to both per-object registers;
|
|
41
|
+
* EveChildBehaviorSystemPerObjectData owns nothing and points at the payloads
|
|
42
|
+
* of the object it decorates. A getter covers all three without anything
|
|
43
|
+
* having to guess from properties.
|
|
44
|
+
*
|
|
45
|
+
* The base carries none, matching its empty upload.
|
|
46
|
+
*
|
|
47
|
+
* @returns {object[]} Leased `RawData` payloads.
|
|
48
|
+
*/
|
|
49
|
+
GetPayloads() {
|
|
50
|
+
return [];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Uploads this object's per-object constants and binds them.
|
|
55
|
+
*
|
|
56
|
+
* AN EMPTY BODY, BECAUSE CARBON'S IS (`Tr2PerObjectData.cpp:29-32`). The base
|
|
57
|
+
* declares the virtual and does nothing; `Tr2PerObjectDataStandard` and
|
|
58
|
+
* `Tr2PerObjectDataSkinned` override it, and `Tr2PerObjectDataPSBuffer`
|
|
59
|
+
* deliberately does not - allocating one of those uploads nothing, which is
|
|
60
|
+
* its donor's behaviour rather than an omission here.
|
|
61
|
+
*
|
|
62
|
+
* The static `setPerObjectDataToDevice` below is the shared mechanism these
|
|
63
|
+
* overrides call; this is the dispatch point Carbon's callers reach through.
|
|
64
|
+
*
|
|
65
|
+
* @returns {number} How many payloads were uploaded; none, at this level.
|
|
66
|
+
*/
|
|
67
|
+
SetPerObjectDataToDevice() {
|
|
68
|
+
return 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The indirect-draw sibling.
|
|
73
|
+
*
|
|
74
|
+
* Carbon's base asserts rather than defaulting (`Tr2PerObjectData.cpp:34-37`),
|
|
75
|
+
* so a call that reached here is a porting mistake and must not look valid.
|
|
76
|
+
*/
|
|
77
|
+
ApplyConstantBuffers() {
|
|
78
|
+
throw new Error("Tr2PerObjectData.ApplyConstantBuffers: indirect draw is unported.");
|
|
79
|
+
}
|
|
80
|
+
|
|
43
81
|
// Carbon Tr2RenderContextEnum::ShaderType (trinityal/Tr2RenderContextEnum.h:31-43).
|
|
44
82
|
// The order is the bit order used by every constant-binding mask.
|
|
45
83
|
|
|
@@ -91,39 +129,39 @@ class Tr2PerObjectData {
|
|
|
91
129
|
// (constantTypeMask & (1 << PIXEL_SHADER)). This port takes the gated form
|
|
92
130
|
// for every struct. See docs/research/carbon-known-defects.md CE-19.
|
|
93
131
|
|
|
94
|
-
/**
|
|
95
|
-
* Uploads this object's per-object constants and binds them.
|
|
96
|
-
*
|
|
97
|
-
* Carbon `Tr2PerObjectDataStandard::SetPerObjectDataToDevice`
|
|
98
|
-
* (`Tr2PerObjectData.cpp:47-67`), which is two `FillAndSetConstants` calls
|
|
99
|
-
* and nothing else.
|
|
100
|
-
*
|
|
101
|
-
* THE CPU HALF WAS ALREADY HERE - `getConstantRecords` below answers which
|
|
102
|
-
* payload binds to which stages, gated on the technique's mask. What was
|
|
103
|
-
* missing was this last hop, because it was believed to be work for the
|
|
104
|
-
* `trinityal/webgpu` package rather than for Trinity calling the abstraction
|
|
105
|
-
* layer. `FillAndSetConstants` is in `Tr2RenderUtils.h`, which is Trinity.
|
|
106
|
-
*
|
|
107
|
-
* ONE BUFFER PER STAGE, SUPPLIED BY THE CALLER, as Carbon does: the context
|
|
108
|
-
* owns a small array of per-object constant buffers and hands the same ones
|
|
109
|
-
* to every batch in a group, so the buffer is created once and refilled per
|
|
110
|
-
* object rather than allocated per draw.
|
|
111
|
-
*
|
|
112
|
-
* STATIC, TAKING THE DATA, WHERE CARBON'S IS A VIRTUAL ON IT - and this is
|
|
113
|
-
* forced rather than chosen. Carbon dispatches on the subclass
|
|
114
|
-
* (`Tr2PerObjectDataStandard` / `Tr2PerObjectDataSkinned`), but almost
|
|
115
|
-
* nothing here is a `Tr2PerObjectData` instance: every renderable's
|
|
116
|
-
* `GetPerObjectData` returns a plain `{ vs, ps }` pair of `RawData` records,
|
|
117
|
-
* and only `EveChildCloud2` constructs the class at all. Written as an
|
|
118
|
-
* instance method it would answer for `this` - which has no payloads - and
|
|
119
|
-
* silently upload nothing. `getConstantRecords` beside it is static for the
|
|
120
|
-
* same reason and takes the same argument.
|
|
121
|
-
*
|
|
122
|
-
* @param {object} objectData A `{ vs, ps }` pair, a single payload, or null.
|
|
123
|
-
* @param {Array<object>} buffers A `Tr2ConstantBufferAL` per `ShaderType`.
|
|
124
|
-
* @param {number} constantTypeMask The technique's shader-type mask.
|
|
125
|
-
* @param {object} renderContext The context to upload and bind against.
|
|
126
|
-
* @returns {number} How many payloads were uploaded.
|
|
132
|
+
/**
|
|
133
|
+
* Uploads this object's per-object constants and binds them.
|
|
134
|
+
*
|
|
135
|
+
* Carbon `Tr2PerObjectDataStandard::SetPerObjectDataToDevice`
|
|
136
|
+
* (`Tr2PerObjectData.cpp:47-67`), which is two `FillAndSetConstants` calls
|
|
137
|
+
* and nothing else.
|
|
138
|
+
*
|
|
139
|
+
* THE CPU HALF WAS ALREADY HERE - `getConstantRecords` below answers which
|
|
140
|
+
* payload binds to which stages, gated on the technique's mask. What was
|
|
141
|
+
* missing was this last hop, because it was believed to be work for the
|
|
142
|
+
* `trinityal/webgpu` package rather than for Trinity calling the abstraction
|
|
143
|
+
* layer. `FillAndSetConstants` is in `Tr2RenderUtils.h`, which is Trinity.
|
|
144
|
+
*
|
|
145
|
+
* ONE BUFFER PER STAGE, SUPPLIED BY THE CALLER, as Carbon does: the context
|
|
146
|
+
* owns a small array of per-object constant buffers and hands the same ones
|
|
147
|
+
* to every batch in a group, so the buffer is created once and refilled per
|
|
148
|
+
* object rather than allocated per draw.
|
|
149
|
+
*
|
|
150
|
+
* STATIC, TAKING THE DATA, WHERE CARBON'S IS A VIRTUAL ON IT - and this is
|
|
151
|
+
* forced rather than chosen. Carbon dispatches on the subclass
|
|
152
|
+
* (`Tr2PerObjectDataStandard` / `Tr2PerObjectDataSkinned`), but almost
|
|
153
|
+
* nothing here is a `Tr2PerObjectData` instance: every renderable's
|
|
154
|
+
* `GetPerObjectData` returns a plain `{ vs, ps }` pair of `RawData` records,
|
|
155
|
+
* and only `EveChildCloud2` constructs the class at all. Written as an
|
|
156
|
+
* instance method it would answer for `this` - which has no payloads - and
|
|
157
|
+
* silently upload nothing. `getConstantRecords` beside it is static for the
|
|
158
|
+
* same reason and takes the same argument.
|
|
159
|
+
*
|
|
160
|
+
* @param {object} objectData A `{ vs, ps }` pair, a single payload, or null.
|
|
161
|
+
* @param {Array<object>} buffers A `Tr2ConstantBufferAL` per `ShaderType`.
|
|
162
|
+
* @param {number} constantTypeMask The technique's shader-type mask.
|
|
163
|
+
* @param {object} renderContext The context to upload and bind against.
|
|
164
|
+
* @returns {number} How many payloads were uploaded.
|
|
127
165
|
*/
|
|
128
166
|
static setPerObjectDataToDevice(objectData, buffers, constantTypeMask, renderContext) {
|
|
129
167
|
let uploaded = 0;
|
|
@@ -140,11 +178,11 @@ class Tr2PerObjectData {
|
|
|
140
178
|
return uploaded;
|
|
141
179
|
}
|
|
142
180
|
|
|
143
|
-
/**
|
|
144
|
-
* The per-object constant records to bind for a technique's shader-type mask:
|
|
145
|
-
* one entry per payload that has a stage in common with the mask, carrying the
|
|
146
|
-
* bytes and the stages to bind them to. Accepts a single record, a { vs, ps }
|
|
147
|
-
* pair, or null, which is every shape a renderable's GetPerObjectData returns.
|
|
181
|
+
/**
|
|
182
|
+
* The per-object constant records to bind for a technique's shader-type mask:
|
|
183
|
+
* one entry per payload that has a stage in common with the mask, carrying the
|
|
184
|
+
* bytes and the stages to bind them to. Accepts a single record, a { vs, ps }
|
|
185
|
+
* pair, or null, which is every shape a renderable's GetPerObjectData returns.
|
|
148
186
|
*/
|
|
149
187
|
static getConstantRecords(objectData, shaderTypeMask) {
|
|
150
188
|
const mask = shaderTypeMask >>> 0;
|
|
@@ -170,9 +208,19 @@ class Tr2PerObjectData {
|
|
|
170
208
|
return records;
|
|
171
209
|
}
|
|
172
210
|
|
|
173
|
-
/**
|
|
211
|
+
/**
|
|
212
|
+
* The payloads carried by a family instance, a single payload, or a
|
|
213
|
+
* { vs, ps } pair.
|
|
214
|
+
*
|
|
215
|
+
* The pair form is what producers not yet moved onto a Carbon class return.
|
|
216
|
+
* `CjsSchema.cast` is the one sanctioned type test on a class we own and it
|
|
217
|
+
* answers on `extends` lineage, so it separates the two without probing for
|
|
218
|
+
* properties or methods.
|
|
219
|
+
*/
|
|
174
220
|
static #payloadsOf(objectData) {
|
|
175
221
|
if (objectData instanceof CjsConstantPayload) return [objectData];
|
|
222
|
+
const owned = CjsSchema.cast(objectData, Tr2PerObjectData);
|
|
223
|
+
if (owned) return owned.GetPayloads();
|
|
176
224
|
return [objectData.vs, objectData.ps].filter(Boolean);
|
|
177
225
|
}
|
|
178
226
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tr2PerObjectData.js","sources":["../../../../../../src/trinity/core/rawData/perObjectData/Tr2PerObjectData.js"],"sourcesContent":["// Source: trinity/Tr2PerObjectData.h (Tr2PerObjectData base)\n//\n// Per-object render data. Carries the object id (Carbon's m_userData, used as\n// the picking / object id) and is the value a renderable's GetPerObjectData\n// returns and a batch references via SetPerObjectData.\n//\n// THIS HEAD COMMENT USED TO SAY the upload path was \"engine-owned and\n// intentionally not modelled here; the engine reads the canonical\n// CjsConstantPayload at dispatch\". That was the engine-means-`trinityal/webgpu`\n// misreading: Carbon's SetPerObjectDataToDevice calls FillAndSetConstants,\n// which lives in Tr2RenderUtils.h - Trinity. The upload is here now and it\n// writes a Tr2ConstantBufferAL through the abstraction layer.\n//\n// ApplyConstantBuffers, the indirect-draw sibling, is still unported: it takes\n// a Tr2IndirectDrawBufferWriter and nothing on this path draws indirectly yet.\n\nimport { CjsConstantPayload } from \"#contracts\";\nimport { CjsSchema, carbon, impl } from \"#schema\";\nimport { ShaderType } from \"#consts/render-context\";\nimport { FillAndSetConstants } from \"../../Tr2RenderUtils.js\";\nimport { PER_OBJECT_PS, PER_OBJECT_VS } from \"../../Tr2Renderer.js\";\n\n/**\n * Per-object render data: the object id a batch is picked and identified by,\n * and the upload of its constant payloads through the abstraction layer.\n */\nexport class Tr2PerObjectData\n{\n /** Starts with a zero object id. */\n constructor()\n {\n this.userData = 0;\n }\n\n /** Sets the object id, coerced to an unsigned 32-bit value. */\n SetUserData(userData)\n {\n this.userData = userData >>> 0;\n }\n\n /** The object id, which doubles as the picking id. */\n GetUserData()\n {\n return this.userData;\n }\n\n /**\n * The payloads this object uploads, in binding order.\n *\n * DECLARED BY EACH SUBCLASS, because Carbon's differ in what they hold and\n * there is no single member shape to read. EveDecalPerObjectData owns a\n * vertex/pixel struct pair; EveChildSpherePinPerObjectData owns ONE payload\n * and Carbon uploads the same bytes to both per-object registers;\n * EveChildBehaviorSystemPerObjectData owns nothing and points at the payloads\n * of the object it decorates. A getter covers all three without anything\n * having to guess from properties.\n *\n * The base carries none, matching its empty upload.\n *\n * @returns {object[]} Leased `RawData` payloads.\n */\n GetPayloads()\n {\n return [];\n }\n\n /**\n * Uploads this object's per-object constants and binds them.\n *\n * AN EMPTY BODY, BECAUSE CARBON'S IS (`Tr2PerObjectData.cpp:29-32`). The base\n * declares the virtual and does nothing; `Tr2PerObjectDataStandard` and\n * `Tr2PerObjectDataSkinned` override it, and `Tr2PerObjectDataPSBuffer`\n * deliberately does not - allocating one of those uploads nothing, which is\n * its donor's behaviour rather than an omission here.\n *\n * The static `setPerObjectDataToDevice` below is the shared mechanism these\n * overrides call; this is the dispatch point Carbon's callers reach through.\n *\n * @returns {number} How many payloads were uploaded; none, at this level.\n */\n @carbon.method\n @impl.implemented\n SetPerObjectDataToDevice()\n {\n return 0;\n }\n\n /**\n * The indirect-draw sibling.\n *\n * Carbon's base asserts rather than defaulting (`Tr2PerObjectData.cpp:34-37`),\n * so a call that reached here is a porting mistake and must not look valid.\n */\n @carbon.method\n @impl.notImplemented\n @impl.reason(\"Tr2IndirectDrawBufferWriter is unported and nothing on this path draws indirectly; Carbon's base asserts here too.\")\n ApplyConstantBuffers()\n {\n throw new Error(\"Tr2PerObjectData.ApplyConstantBuffers: indirect draw is unported.\");\n }\n\n // Carbon Tr2RenderContextEnum::ShaderType (trinityal/Tr2RenderContextEnum.h:31-43).\n // The order is the bit order used by every constant-binding mask.\n\n /** Carbon's shader-type vocabulary, in its declared order. */\n static ShaderType = Object.freeze({\n VERTEX_SHADER: 0,\n PIXEL_SHADER: 1,\n COMPUTE_SHADER: 2,\n GEOMETRY_SHADER: 3,\n HULL_SHADER: 4,\n DOMAIN_SHADER: 5\n });\n\n /** A layout stage name to its shader-type bit. */\n static StageBits = Object.freeze({\n vs: 1 << 0,\n ps: 1 << 1,\n cs: 1 << 2,\n gs: 1 << 3,\n hs: 1 << 4,\n ds: 1 << 5\n });\n\n // Carbon's perFrameVsMask (Tr2PerObjectData.cpp:49-54): a payload declared\n // for the vertex stage is bound to the whole non-pixel family, because those\n // stages share the per-object vertex register. A struct declaring \"vs\" is\n // therefore asking for all five, exactly as Carbon's fill does.\n\n /** The stages a \"vs\" payload binds to, per Carbon's per-object VS mask. */\n static VertexFamilyMask =\n Tr2PerObjectData.StageBits.vs\n | Tr2PerObjectData.StageBits.cs\n | Tr2PerObjectData.StageBits.gs\n | Tr2PerObjectData.StageBits.hs\n | Tr2PerObjectData.StageBits.ds;\n\n // Carbon SetPerObjectDataToDevice(buffers, constantTypeMask, renderContext)\n // (Tr2PerObjectData.cpp:47-67 Standard, :75-96 Skinned). getConstantRecords\n // answers WHICH payload binds to WHICH stages for a given technique;\n // SetPerObjectDataToDevice above then uploads them. It is the join Carbon\n // makes per batch, where\n // RenderBatchGroup hoists currentShader->GetShaderTypeMask(technique) once per\n // group and passes it to every batch in that group.\n //\n // A zero mask binds nothing, matching FillAndSetConstants' early return\n // (Tr2RenderUtils.cpp:104-107), so a record is omitted rather than emitted\n // empty.\n //\n // DELIBERATE DEVIATION, because Carbon's two subclasses disagree and one\n // generic path cannot reproduce both. Tr2PerObjectDataStandard binds its\n // PIXEL payload UNMASKED - it passes the PIXEL_SHADER enum straight through,\n // so the pixel constant buffer is filled and bound even for a technique with\n // no pixel stage - while Tr2PerObjectDataSkinned gates the same payload on\n // (constantTypeMask & (1 << PIXEL_SHADER)). This port takes the gated form\n // for every struct. See docs/research/carbon-known-defects.md CE-19.\n\n /**\n * Uploads this object's per-object constants and binds them.\n *\n * Carbon `Tr2PerObjectDataStandard::SetPerObjectDataToDevice`\n * (`Tr2PerObjectData.cpp:47-67`), which is two `FillAndSetConstants` calls\n * and nothing else.\n *\n * THE CPU HALF WAS ALREADY HERE - `getConstantRecords` below answers which\n * payload binds to which stages, gated on the technique's mask. What was\n * missing was this last hop, because it was believed to be work for the\n * `trinityal/webgpu` package rather than for Trinity calling the abstraction\n * layer. `FillAndSetConstants` is in `Tr2RenderUtils.h`, which is Trinity.\n *\n * ONE BUFFER PER STAGE, SUPPLIED BY THE CALLER, as Carbon does: the context\n * owns a small array of per-object constant buffers and hands the same ones\n * to every batch in a group, so the buffer is created once and refilled per\n * object rather than allocated per draw.\n *\n * STATIC, TAKING THE DATA, WHERE CARBON'S IS A VIRTUAL ON IT - and this is\n * forced rather than chosen. Carbon dispatches on the subclass\n * (`Tr2PerObjectDataStandard` / `Tr2PerObjectDataSkinned`), but almost\n * nothing here is a `Tr2PerObjectData` instance: every renderable's\n * `GetPerObjectData` returns a plain `{ vs, ps }` pair of `RawData` records,\n * and only `EveChildCloud2` constructs the class at all. Written as an\n * instance method it would answer for `this` - which has no payloads - and\n * silently upload nothing. `getConstantRecords` beside it is static for the\n * same reason and takes the same argument.\n *\n * @param {object} objectData A `{ vs, ps }` pair, a single payload, or null.\n * @param {Array<object>} buffers A `Tr2ConstantBufferAL` per `ShaderType`.\n * @param {number} constantTypeMask The technique's shader-type mask.\n * @param {object} renderContext The context to upload and bind against.\n * @returns {number} How many payloads were uploaded.\n */\n static setPerObjectDataToDevice(objectData, buffers, constantTypeMask, renderContext)\n {\n let uploaded = 0;\n\n for (const record of Tr2PerObjectData.getConstantRecords(objectData, constantTypeMask))\n {\n // The register is the payload's own: a pixel payload binds at the\n // per-object PS register, everything else at the VS one. Carbon picks\n // between exactly these two the same way.\n const isPixel = record.stageMask === Tr2PerObjectData.StageBits.ps;\n const buffer = buffers[isPixel ? ShaderType.PIXEL_SHADER : ShaderType.VERTEX_SHADER];\n\n if (!buffer) continue;\n\n const bound = FillAndSetConstants(\n buffer,\n record.data,\n record.data.byteLength,\n record.stageMask,\n isPixel ? PER_OBJECT_PS : PER_OBJECT_VS,\n renderContext\n );\n\n if (bound) uploaded += 1;\n }\n\n return uploaded;\n }\n\n /**\n * The per-object constant records to bind for a technique's shader-type mask:\n * one entry per payload that has a stage in common with the mask, carrying the\n * bytes and the stages to bind them to. Accepts a single record, a { vs, ps }\n * pair, or null, which is every shape a renderable's GetPerObjectData returns.\n */\n static getConstantRecords(objectData, shaderTypeMask)\n {\n const mask = shaderTypeMask >>> 0;\n\n if (!objectData || !mask) return [];\n\n const records = [];\n\n for (const payload of Tr2PerObjectData.#payloadsOf(objectData))\n {\n const stages = payload.GetLayout().stages;\n\n if (!stages) continue;\n\n let declared = 0;\n\n for (const stage of stages)\n {\n declared |= stage === \"vs\"\n ? Tr2PerObjectData.VertexFamilyMask\n : (Tr2PerObjectData.StageBits[stage] ?? 0);\n }\n\n const stageMask = declared & mask;\n\n if (stageMask)\n {\n records.push({\n stageMask,\n payload,\n data: payload.GetData(),\n struct: payload.GetStruct()\n });\n }\n }\n\n return records;\n }\n\n /**\n * The payloads carried by a family instance, a single payload, or a\n * { vs, ps } pair.\n *\n * The pair form is what producers not yet moved onto a Carbon class return.\n * `CjsSchema.cast` is the one sanctioned type test on a class we own and it\n * answers on `extends` lineage, so it separates the two without probing for\n * properties or methods.\n */\n static #payloadsOf(objectData)\n {\n if (objectData instanceof CjsConstantPayload) return [ objectData ];\n\n const owned = CjsSchema.cast(objectData, Tr2PerObjectData);\n\n if (owned) return owned.GetPayloads();\n\n return [ objectData.vs, objectData.ps ].filter(Boolean);\n }\n}\n"],"names":["Tr2PerObjectData","_initProto","_applyDecs","carbon","method","impl","implemented","notImplemented","reason","e","constructor","userData","SetUserData","GetUserData","GetPayloads","SetPerObjectDataToDevice","ApplyConstantBuffers","Error","ShaderType","Object","freeze","VERTEX_SHADER","PIXEL_SHADER","COMPUTE_SHADER","GEOMETRY_SHADER","HULL_SHADER","DOMAIN_SHADER","StageBits","vs","ps","cs","gs","hs","ds","VertexFamilyMask","setPerObjectDataToDevice","objectData","buffers","constantTypeMask","renderContext","uploaded","record","getConstantRecords","isPixel","stageMask","buffer","bound","FillAndSetConstants","data","byteLength","PER_OBJECT_PS","PER_OBJECT_VS","shaderTypeMask","mask","records","payload","stages","GetLayout","declared","stage","push","GetData","struct","GetStruct","#payloadsOf","CjsConstantPayload","owned","CjsSchema","cast","filter","Boolean"],"mappings":";;;;;;;;;AAsBA;AACA;AACA;AACA;AACO,MAAMA,gBAAgB,CAC7B;AAAA,EAAA;AAAA,IAAA,CAAAC,UAAA,CAAA,GAAAC,cAAA,CAAA,IAAA,EAAA,EAAA,EAAA,CAAA,CAAA,CAqDGC,MAAM,EAANA,MAAM,CAACC,MAAM,EACbC,IAAI,EAAJA,IAAI,CAACC,WAAW,CAAA,EAAA,EAAA,EAAA,0BAAA,CAAA,EAAA,CAAA,CAYhBH,MAAM,EAANA,MAAM,CAACC,MAAM,EACbC,IAAI,EAAJA,IAAI,CAACE,cAAc,EAAA,MAAA,EACnBF,IAAI,CAACG,MAAM,CAAC,oHAAoH,CAAC,iCAAAC,CAAA;AAAA;AAnElI;AACAC,EAAAA,WAAWA,GACX;IAAAT,UAAA,CAAA,IAAA,CAAA;IACE,IAAI,CAACU,QAAQ,GAAG,CAAC;AACnB,EAAA;;AAEA;EACAC,WAAWA,CAACD,QAAQ,EACpB;AACE,IAAA,IAAI,CAACA,QAAQ,GAAGA,QAAQ,KAAK,CAAC;AAChC,EAAA;;AAEA;AACAE,EAAAA,WAAWA,GACX;IACE,OAAO,IAAI,CAACF,QAAQ;AACtB,EAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEG,EAAAA,WAAWA,GACX;AACE,IAAA,OAAO,EAAE;AACX,EAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGEC,EAAAA,wBAAwBA,GACxB;AACE,IAAA,OAAO,CAAC;AACV,EAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AAIEC,EAAAA,oBAAoBA,GACpB;AACE,IAAA,MAAM,IAAIC,KAAK,CAAC,mEAAmE,CAAC;AACtF,EAAA;;AAEA;AACA;;AAEA;AACA,EAAA,OAAOC,UAAU,GAAGC,MAAM,CAACC,MAAM,CAAC;AAChCC,IAAAA,aAAa,EAAE,CAAC;AAChBC,IAAAA,YAAY,EAAE,CAAC;AACfC,IAAAA,cAAc,EAAE,CAAC;AACjBC,IAAAA,eAAe,EAAE,CAAC;AAClBC,IAAAA,WAAW,EAAE,CAAC;AACdC,IAAAA,aAAa,EAAE;AACjB,GAAC,CAAC;;AAEF;AACA,EAAA,OAAOC,SAAS,GAAGR,MAAM,CAACC,MAAM,CAAC;IAC/BQ,EAAE,EAAE,CAAC,IAAI,CAAC;IACVC,EAAE,EAAE,CAAC,IAAI,CAAC;IACVC,EAAE,EAAE,CAAC,IAAI,CAAC;IACVC,EAAE,EAAE,CAAC,IAAI,CAAC;IACVC,EAAE,EAAE,CAAC,IAAI,CAAC;IACVC,EAAE,EAAE,CAAC,IAAI;AACX,GAAC,CAAC;;AAEF;AACA;AACA;AACA;;AAEA;AACA,EAAA,OAAOC,gBAAgB,GACrBlC,gBAAgB,CAAC2B,SAAS,CAACC,EAAE,GAC3B5B,gBAAgB,CAAC2B,SAAS,CAACG,EAAE,GAC7B9B,gBAAgB,CAAC2B,SAAS,CAACI,EAAE,GAC7B/B,gBAAgB,CAAC2B,SAAS,CAACK,EAAE,GAC7BhC,gBAAgB,CAAC2B,SAAS,CAACM,EAAE;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACF;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;EACE,OAAOE,wBAAwBA,CAACC,UAAU,EAAEC,OAAO,EAAEC,gBAAgB,EAAEC,aAAa,EACpF;IACE,IAAIC,QAAQ,GAAG,CAAC;IAEhB,KAAK,MAAMC,MAAM,IAAIzC,gBAAgB,CAAC0C,kBAAkB,CAACN,UAAU,EAAEE,gBAAgB,CAAC,EACtF;AACE;AACA;AACA;MACA,MAAMK,OAAO,GAAGF,MAAM,CAACG,SAAS,KAAK5C,gBAAgB,CAAC2B,SAAS,CAACE,EAAE;AAClE,MAAA,MAAMgB,MAAM,GAAGR,OAAO,CAACM,OAAO,GAAGzB,UAAU,CAACI,YAAY,GAAGJ,UAAU,CAACG,aAAa,CAAC;MAEpF,IAAI,CAACwB,MAAM,EAAE;MAEb,MAAMC,KAAK,GAAGC,mBAAmB,CAC/BF,MAAM,EACNJ,MAAM,CAACO,IAAI,EACXP,MAAM,CAACO,IAAI,CAACC,UAAU,EACtBR,MAAM,CAACG,SAAS,EAChBD,OAAO,GAAGO,aAAa,GAAGC,aAAa,EACvCZ,aACF,CAAC;AAED,MAAA,IAAIO,KAAK,EAAEN,QAAQ,IAAI,CAAC;AAC1B,IAAA;AAEA,IAAA,OAAOA,QAAQ;AACjB,EAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACE,EAAA,OAAOE,kBAAkBA,CAACN,UAAU,EAAEgB,cAAc,EACpD;AACE,IAAA,MAAMC,IAAI,GAAGD,cAAc,KAAK,CAAC;AAEjC,IAAA,IAAI,CAAChB,UAAU,IAAI,CAACiB,IAAI,EAAE,OAAO,EAAE;IAEnC,MAAMC,OAAO,GAAG,EAAE;IAElB,KAAK,MAAMC,OAAO,IAAIvD,gBAAgB,CAAC,WAAW,CAACoC,UAAU,CAAC,EAC9D;MACE,MAAMoB,MAAM,GAAGD,OAAO,CAACE,SAAS,EAAE,CAACD,MAAM;MAEzC,IAAI,CAACA,MAAM,EAAE;MAEb,IAAIE,QAAQ,GAAG,CAAC;AAEhB,MAAA,KAAK,MAAMC,KAAK,IAAIH,MAAM,EAC1B;AACEE,QAAAA,QAAQ,IAAIC,KAAK,KAAK,IAAI,GACtB3D,gBAAgB,CAACkC,gBAAgB,GAChClC,gBAAgB,CAAC2B,SAAS,CAACgC,KAAK,CAAC,IAAI,CAAE;AAC9C,MAAA;AAEA,MAAA,MAAMf,SAAS,GAAGc,QAAQ,GAAGL,IAAI;AAEjC,MAAA,IAAIT,SAAS,EACb;QACEU,OAAO,CAACM,IAAI,CAAC;UACXhB,SAAS;UACTW,OAAO;AACPP,UAAAA,IAAI,EAAEO,OAAO,CAACM,OAAO,EAAE;AACvBC,UAAAA,MAAM,EAAEP,OAAO,CAACQ,SAAS;AAC3B,SAAC,CAAC;AACJ,MAAA;AACF,IAAA;AAEA,IAAA,OAAOT,OAAO;AAChB,EAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACE,EAAA,OAAO,WAAWU,CAAC5B,UAAU,EAC7B;AACE,IAAA,IAAIA,UAAU,YAAY6B,kBAAkB,EAAE,OAAO,CAAE7B,UAAU,CAAE;IAEnE,MAAM8B,KAAK,GAAGC,SAAS,CAACC,IAAI,CAAChC,UAAU,EAAEpC,gBAAgB,CAAC;AAE1D,IAAA,IAAIkE,KAAK,EAAE,OAAOA,KAAK,CAACpD,WAAW,EAAE;AAErC,IAAA,OAAO,CAAEsB,UAAU,CAACR,EAAE,EAAEQ,UAAU,CAACP,EAAE,CAAE,CAACwC,MAAM,CAACC,OAAO,CAAC;AACzD,EAAA;AACF;;;;"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Tr2PerObjectData } from './Tr2PerObjectData.js';
|
|
2
|
+
|
|
3
|
+
// Source: trinity/Tr2PerObjectData.h:42 (Tr2PerObjectDataPSBuffer)
|
|
4
|
+
// Source: trinity/Tr2PerObjectData.cpp:29-37 (the base upload and apply bodies)
|
|
5
|
+
//
|
|
6
|
+
// Shared pixel-shader storage for the per-object data classes that carry one.
|
|
7
|
+
//
|
|
8
|
+
// NOTHING BINDS AT THIS LEVEL. Carbon's base SetPerObjectDataToDevice is an
|
|
9
|
+
// empty body and this class does not override it, so it is storage and nothing
|
|
10
|
+
// else - exactly as its donor comment says, "a common functionality of
|
|
11
|
+
// Tr2PerObjectDataStandard, Tr2PerAreaSHLightingData and
|
|
12
|
+
// Tr2PerObjectDataSkinned". Allocating one directly uploads nothing, which is
|
|
13
|
+
// Carbon's behaviour and not an omission here.
|
|
14
|
+
//
|
|
15
|
+
// WHY THERE IS NO CopyToPSFloatBuffer. Carbon's Copy methods bridge a STACK
|
|
16
|
+
// struct into a member float array:
|
|
17
|
+
//
|
|
18
|
+
// EvePerObjectPSData perObjectPSBuffer; // stack, defaults
|
|
19
|
+
// perObjectPSBuffer.WorldMat = Transpose( m_worldTransform );
|
|
20
|
+
// data->CopyToPSFloatBuffer( perObjectPSBuffer ); // memcpy into member
|
|
21
|
+
//
|
|
22
|
+
// JavaScript has no such gap: a RawData already IS the uploadable buffer. So the
|
|
23
|
+
// class leases its RawData in the named shape and the producer writes onto it
|
|
24
|
+
// directly. A method carrying Carbon's name while accepting field-wise writes
|
|
25
|
+
// instead of a whole struct would read as ported when it is not.
|
|
26
|
+
//
|
|
27
|
+
// Carbon's three static_asserts land as one create-time check. `sizeof(T) <=
|
|
28
|
+
// sizeof(buffer)` is AssertFitsPerObjectBudget; `sizeof(T) % 16 == 0` is already
|
|
29
|
+
// guaranteed by every CjsPerObjectLayouts stride; the not-a-pointer assert has
|
|
30
|
+
// no JS counterpart.
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
/** `m_pixelShaderFloatConstantBuffer[80 * 4]` - Carbon's PS register budget. */
|
|
34
|
+
const PER_OBJECT_PS_FLOAT_CAPACITY = 80 * 4;
|
|
35
|
+
|
|
36
|
+
/** `m_vertexShaderFloatConstantBuffer[40 * 4]` - Carbon's VS register budget. */
|
|
37
|
+
const PER_OBJECT_VS_FLOAT_CAPACITY = 40 * 4;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Carbon's `static_assert( sizeof( T ) <= sizeof( buffer ) )`, at lease time.
|
|
41
|
+
*
|
|
42
|
+
* A layout wider than its register budget is a porting mistake rather than a
|
|
43
|
+
* runtime condition, so this throws. `FillAndSetConstants` would otherwise clamp
|
|
44
|
+
* the copy to the buffer and drop the tail - which is Carbon's own behaviour for
|
|
45
|
+
* an oversized payload, and exactly the quiet wrongness the assert exists to
|
|
46
|
+
* stop at build time.
|
|
47
|
+
*
|
|
48
|
+
* @param {object} payload A leased `RawData`.
|
|
49
|
+
* @param {number} floatCapacity The register budget, in floats.
|
|
50
|
+
* @param {string} struct The layout name, for the message.
|
|
51
|
+
* @param {string} half Either "VS" or "PS", for the message.
|
|
52
|
+
*/
|
|
53
|
+
function AssertFitsPerObjectBudget(payload, floatCapacity, struct, half) {
|
|
54
|
+
const floats = payload.GetData().length;
|
|
55
|
+
if (floats > floatCapacity) {
|
|
56
|
+
throw new Error(`Tr2PerObjectData: ${half} layout "${struct}" is ${floats} floats, ` + `over Carbon's ${floatCapacity}-float per-object ${half} register budget.`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Per-object data carrying a pixel-shader payload.
|
|
62
|
+
*
|
|
63
|
+
* Storage only: it declares no upload, because Carbon's does not.
|
|
64
|
+
*/
|
|
65
|
+
class Tr2PerObjectDataPSBuffer extends Tr2PerObjectData {
|
|
66
|
+
/**
|
|
67
|
+
* The pixel payload, in the shape this object was leased for.
|
|
68
|
+
*
|
|
69
|
+
* Carbon's equivalent is a fixed 1,280-byte member zeroed in the constructor,
|
|
70
|
+
* with `m_pixelShaderFloatBufferSize` recording how much of it a copy filled.
|
|
71
|
+
* Ours is exactly its layout's stride, so the size IS the buffer and there is
|
|
72
|
+
* no tail to disagree about.
|
|
73
|
+
*/
|
|
74
|
+
ps = null;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Leases a per-object data object and its pixel payload.
|
|
78
|
+
*
|
|
79
|
+
* Carbon leases the OBJECT from the accumulator too -
|
|
80
|
+
* `accumulator->Allocate<Tr2PerObjectDataStandard>()` - because its buffers are
|
|
81
|
+
* inline members and the whole thing lives in the frame arena. Constructed
|
|
82
|
+
* directly here instead, because `ITriRenderBatchAccumulator.Allocate` records
|
|
83
|
+
* that it only calls the constructor - in JS the GC owns the object's lifetime,
|
|
84
|
+
* and it is the BUFFERS that need the arena. If that door ever starts pooling,
|
|
85
|
+
* route this through it.
|
|
86
|
+
*
|
|
87
|
+
* @param {object} accumulator An `ITriRenderBatchAccumulator`.
|
|
88
|
+
* @param {string} psStruct A `CjsPerObjectLayouts` struct name.
|
|
89
|
+
* @returns {Tr2PerObjectDataPSBuffer} The leased object.
|
|
90
|
+
*/
|
|
91
|
+
/** @returns {object[]} The pixel payload. */
|
|
92
|
+
GetPayloads() {
|
|
93
|
+
return [this.ps];
|
|
94
|
+
}
|
|
95
|
+
static alloc(accumulator, psStruct) {
|
|
96
|
+
const data = new this();
|
|
97
|
+
data.ps = accumulator.Alloc(psStruct);
|
|
98
|
+
AssertFitsPerObjectBudget(data.ps, PER_OBJECT_PS_FLOAT_CAPACITY, psStruct, "PS");
|
|
99
|
+
return data;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export { AssertFitsPerObjectBudget, PER_OBJECT_PS_FLOAT_CAPACITY, PER_OBJECT_VS_FLOAT_CAPACITY, Tr2PerObjectDataPSBuffer };
|
|
104
|
+
//# sourceMappingURL=Tr2PerObjectDataPSBuffer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tr2PerObjectDataPSBuffer.js","sources":["../../../../../../src/trinity/core/rawData/perObjectData/Tr2PerObjectDataPSBuffer.js"],"sourcesContent":["// Source: trinity/Tr2PerObjectData.h:42 (Tr2PerObjectDataPSBuffer)\n// Source: trinity/Tr2PerObjectData.cpp:29-37 (the base upload and apply bodies)\n//\n// Shared pixel-shader storage for the per-object data classes that carry one.\n//\n// NOTHING BINDS AT THIS LEVEL. Carbon's base SetPerObjectDataToDevice is an\n// empty body and this class does not override it, so it is storage and nothing\n// else - exactly as its donor comment says, \"a common functionality of\n// Tr2PerObjectDataStandard, Tr2PerAreaSHLightingData and\n// Tr2PerObjectDataSkinned\". Allocating one directly uploads nothing, which is\n// Carbon's behaviour and not an omission here.\n//\n// WHY THERE IS NO CopyToPSFloatBuffer. Carbon's Copy methods bridge a STACK\n// struct into a member float array:\n//\n// EvePerObjectPSData perObjectPSBuffer; // stack, defaults\n// perObjectPSBuffer.WorldMat = Transpose( m_worldTransform );\n// data->CopyToPSFloatBuffer( perObjectPSBuffer ); // memcpy into member\n//\n// JavaScript has no such gap: a RawData already IS the uploadable buffer. So the\n// class leases its RawData in the named shape and the producer writes onto it\n// directly. A method carrying Carbon's name while accepting field-wise writes\n// instead of a whole struct would read as ported when it is not.\n//\n// Carbon's three static_asserts land as one create-time check. `sizeof(T) <=\n// sizeof(buffer)` is AssertFitsPerObjectBudget; `sizeof(T) % 16 == 0` is already\n// guaranteed by every CjsPerObjectLayouts stride; the not-a-pointer assert has\n// no JS counterpart.\n\nimport { Tr2PerObjectData } from \"./Tr2PerObjectData.js\";\n\n\n/** `m_pixelShaderFloatConstantBuffer[80 * 4]` - Carbon's PS register budget. */\nexport const PER_OBJECT_PS_FLOAT_CAPACITY = 80 * 4;\n\n/** `m_vertexShaderFloatConstantBuffer[40 * 4]` - Carbon's VS register budget. */\nexport const PER_OBJECT_VS_FLOAT_CAPACITY = 40 * 4;\n\n\n/**\n * Carbon's `static_assert( sizeof( T ) <= sizeof( buffer ) )`, at lease time.\n *\n * A layout wider than its register budget is a porting mistake rather than a\n * runtime condition, so this throws. `FillAndSetConstants` would otherwise clamp\n * the copy to the buffer and drop the tail - which is Carbon's own behaviour for\n * an oversized payload, and exactly the quiet wrongness the assert exists to\n * stop at build time.\n *\n * @param {object} payload A leased `RawData`.\n * @param {number} floatCapacity The register budget, in floats.\n * @param {string} struct The layout name, for the message.\n * @param {string} half Either \"VS\" or \"PS\", for the message.\n */\nexport function AssertFitsPerObjectBudget(payload, floatCapacity, struct, half)\n{\n const floats = payload.GetData().length;\n\n if (floats > floatCapacity)\n {\n throw new Error(\n `Tr2PerObjectData: ${half} layout \"${struct}\" is ${floats} floats, `\n + `over Carbon's ${floatCapacity}-float per-object ${half} register budget.`\n );\n }\n}\n\n\n/**\n * Per-object data carrying a pixel-shader payload.\n *\n * Storage only: it declares no upload, because Carbon's does not.\n */\nexport class Tr2PerObjectDataPSBuffer extends Tr2PerObjectData\n{\n /**\n * The pixel payload, in the shape this object was leased for.\n *\n * Carbon's equivalent is a fixed 1,280-byte member zeroed in the constructor,\n * with `m_pixelShaderFloatBufferSize` recording how much of it a copy filled.\n * Ours is exactly its layout's stride, so the size IS the buffer and there is\n * no tail to disagree about.\n */\n ps = null;\n\n /**\n * Leases a per-object data object and its pixel payload.\n *\n * Carbon leases the OBJECT from the accumulator too -\n * `accumulator->Allocate<Tr2PerObjectDataStandard>()` - because its buffers are\n * inline members and the whole thing lives in the frame arena. Constructed\n * directly here instead, because `ITriRenderBatchAccumulator.Allocate` records\n * that it only calls the constructor - in JS the GC owns the object's lifetime,\n * and it is the BUFFERS that need the arena. If that door ever starts pooling,\n * route this through it.\n *\n * @param {object} accumulator An `ITriRenderBatchAccumulator`.\n * @param {string} psStruct A `CjsPerObjectLayouts` struct name.\n * @returns {Tr2PerObjectDataPSBuffer} The leased object.\n */\n /** @returns {object[]} The pixel payload. */\n GetPayloads()\n {\n return [ this.ps ];\n }\n\n static alloc(accumulator, psStruct)\n {\n const data = new this();\n\n data.ps = accumulator.Alloc(psStruct);\n\n AssertFitsPerObjectBudget(data.ps, PER_OBJECT_PS_FLOAT_CAPACITY, psStruct, \"PS\");\n\n return data;\n }\n}\n"],"names":["PER_OBJECT_PS_FLOAT_CAPACITY","PER_OBJECT_VS_FLOAT_CAPACITY","AssertFitsPerObjectBudget","payload","floatCapacity","struct","half","floats","GetData","length","Error","Tr2PerObjectDataPSBuffer","Tr2PerObjectData","ps","GetPayloads","alloc","accumulator","psStruct","data","Alloc"],"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;;;AAKA;AACO,MAAMA,4BAA4B,GAAG,EAAE,GAAG;;AAEjD;AACO,MAAMC,4BAA4B,GAAG,EAAE,GAAG;;AAGjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,yBAAyBA,CAACC,OAAO,EAAEC,aAAa,EAAEC,MAAM,EAAEC,IAAI,EAC9E;EACE,MAAMC,MAAM,GAAGJ,OAAO,CAACK,OAAO,EAAE,CAACC,MAAM;EAEvC,IAAIF,MAAM,GAAGH,aAAa,EAC1B;AACE,IAAA,MAAM,IAAIM,KAAK,CACb,CAAA,kBAAA,EAAqBJ,IAAI,YAAYD,MAAM,CAAA,KAAA,EAAQE,MAAM,CAAA,SAAA,CAAW,GAClE,CAAA,cAAA,EAAiBH,aAAa,CAAA,kBAAA,EAAqBE,IAAI,mBAC3D,CAAC;AACH,EAAA;AACF;;AAGA;AACA;AACA;AACA;AACA;AACO,MAAMK,wBAAwB,SAASC,gBAAgB,CAC9D;AACE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,EAAE,GAAG,IAAI;;AAET;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACE;AACAC,EAAAA,WAAWA,GACX;AACE,IAAA,OAAO,CAAE,IAAI,CAACD,EAAE,CAAE;AACpB,EAAA;AAEA,EAAA,OAAOE,KAAKA,CAACC,WAAW,EAAEC,QAAQ,EAClC;AACE,IAAA,MAAMC,IAAI,GAAG,IAAI,IAAI,EAAE;IAEvBA,IAAI,CAACL,EAAE,GAAGG,WAAW,CAACG,KAAK,CAACF,QAAQ,CAAC;IAErCf,yBAAyB,CAACgB,IAAI,CAACL,EAAE,EAAEb,4BAA4B,EAAEiB,QAAQ,EAAE,IAAI,CAAC;AAEhF,IAAA,OAAOC,IAAI;AACb,EAAA;AACF;;;;"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { applyDecs2311 as _applyDecs2311 } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import { Tr2PerObjectData } from './Tr2PerObjectData.js';
|
|
3
|
+
import { Tr2PerObjectDataPSBuffer, AssertFitsPerObjectBudget, PER_OBJECT_VS_FLOAT_CAPACITY } from './Tr2PerObjectDataPSBuffer.js';
|
|
4
|
+
import { carbon, impl } from '#schema';
|
|
5
|
+
|
|
6
|
+
let _initProto;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Per-object data with both a vertex and a pixel payload.
|
|
10
|
+
*/
|
|
11
|
+
class Tr2PerObjectDataStandard extends Tr2PerObjectDataPSBuffer {
|
|
12
|
+
static {
|
|
13
|
+
[_initProto] = _applyDecs2311(this, [], [[[carbon, carbon.method, impl, impl.adapted, void 0, impl.reason("Carbon binds the pixel payload without consulting the technique mask, distinguished from the gated form only by C++ overload resolution on an argument type. Our layouts declare the stages they serve, so the gate is per declaration and more precise than Carbon's hardcoded halves.")], 18, "SetPerObjectDataToDevice"], [[carbon, carbon.method, impl, impl.notImplemented, void 0, impl.reason("Tr2IndirectDrawBufferWriter is unported and nothing on this path draws indirectly.")], 18, "ApplyConstantBuffers"]], 0, void 0, Tr2PerObjectDataPSBuffer).e;
|
|
14
|
+
}
|
|
15
|
+
/** The vertex payload, in the shape this object was leased for. */
|
|
16
|
+
vs = (_initProto(this), null);
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Leases a per-object data object and both of its payloads.
|
|
20
|
+
*
|
|
21
|
+
* @param {object} accumulator An `ITriRenderBatchAccumulator`.
|
|
22
|
+
* @param {string} vsStruct A `CjsPerObjectLayouts` struct name for the vertex payload.
|
|
23
|
+
* @param {string} psStruct A `CjsPerObjectLayouts` struct name for the pixel payload.
|
|
24
|
+
* @returns {Tr2PerObjectDataStandard} The leased object.
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Vertex payload first, matching the order Carbon binds them in.
|
|
28
|
+
*
|
|
29
|
+
* @returns {object[]} Both payloads.
|
|
30
|
+
*/
|
|
31
|
+
GetPayloads() {
|
|
32
|
+
return [this.vs, this.ps];
|
|
33
|
+
}
|
|
34
|
+
static alloc(accumulator, vsStruct, psStruct) {
|
|
35
|
+
const data = super.alloc(accumulator, psStruct);
|
|
36
|
+
data.vs = accumulator.Alloc(vsStruct);
|
|
37
|
+
AssertFitsPerObjectBudget(data.vs, PER_OBJECT_VS_FLOAT_CAPACITY, vsStruct, "VS");
|
|
38
|
+
return data;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Uploads both payloads and binds them at the per-object registers.
|
|
43
|
+
*
|
|
44
|
+
* THE PIXEL HALF IS GATED HERE AND IS NOT IN CARBON, which is the one
|
|
45
|
+
* behavioural divergence in this class. Carbon passes the PIXEL_SHADER enum,
|
|
46
|
+
* selecting the overload that shifts `1 << PIXEL_SHADER` and never intersects
|
|
47
|
+
* it with the technique's mask, so Standard binds its pixel buffer even for a
|
|
48
|
+
* technique with no pixel stage (`Tr2PerObjectData.cpp:61-66`; Skinned gates
|
|
49
|
+
* the same payload at :77).
|
|
50
|
+
*
|
|
51
|
+
* We gate it, for a reason Carbon does not have available: our layouts DECLARE
|
|
52
|
+
* which stages they serve, so the gate is per layout rather than per hardcoded
|
|
53
|
+
* half, and it is strictly more precise. `FillAndSetConstants` is built around
|
|
54
|
+
* that - its own head comment records that a zero mask binding nothing "is how
|
|
55
|
+
* a payload declared for stages a technique does not use gets skipped, per
|
|
56
|
+
* batch, without the caller testing anything". Binding a pixel buffer for a
|
|
57
|
+
* pipeline with no pixel stage is wasted upload work, and the declaration also
|
|
58
|
+
* expresses a payload serving both stages in ONE buffer, which Carbon can only
|
|
59
|
+
* do with two.
|
|
60
|
+
*
|
|
61
|
+
* The upload itself is the shared static, so this class adds the virtual and
|
|
62
|
+
* the identity without a second copy of the mechanism.
|
|
63
|
+
*
|
|
64
|
+
* @param {object[]} buffers A `Tr2ConstantBufferAL` per `ShaderType`.
|
|
65
|
+
* @param {number} constantTypeMask A bit per `ShaderType`.
|
|
66
|
+
* @param {object} renderContext The context to upload and bind against.
|
|
67
|
+
* @returns {number} How many payloads were uploaded.
|
|
68
|
+
*/
|
|
69
|
+
SetPerObjectDataToDevice(buffers, constantTypeMask, renderContext) {
|
|
70
|
+
return Tr2PerObjectData.setPerObjectDataToDevice(this, buffers, constantTypeMask, renderContext);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The indirect-draw sibling.
|
|
75
|
+
*
|
|
76
|
+
* Carbon writes both payloads through a `Tr2IndirectDrawBufferWriter`
|
|
77
|
+
* (`Tr2PerObjectData.cpp:69-73`). That class has no JS counterpart and nothing
|
|
78
|
+
* on this path draws indirectly, and Carbon's base asserts rather than
|
|
79
|
+
* defaulting (`:34-37`), so an accidental call must not look successful.
|
|
80
|
+
*/
|
|
81
|
+
ApplyConstantBuffers() {
|
|
82
|
+
throw new Error("Tr2PerObjectDataStandard.ApplyConstantBuffers: indirect draw is unported.");
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export { Tr2PerObjectDataStandard };
|
|
87
|
+
//# sourceMappingURL=Tr2PerObjectDataStandard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tr2PerObjectDataStandard.js","sources":["../../../../../../src/trinity/core/rawData/perObjectData/Tr2PerObjectDataStandard.js"],"sourcesContent":["// Source: trinity/Tr2PerObjectData.h:71 (Tr2PerObjectDataStandard)\n// Source: trinity/Tr2PerObjectData.cpp:42-73\n//\n// Per-object data for an ordinary renderable: one vertex payload and one pixel\n// payload, uploaded to the per-object registers.\n//\n// Carbon's producers are EveLineSet, EveCurveLineSet and EveEllipseSet (each\n// Eve/UI/*.cpp, GetPerObjectData), all of which fill only WorldMat and leave\n// every other field at its layout default.\n//\n// WHY THIS CLASS EXISTS RATHER THAN A { vs, ps } RECORD. Carbon's upload is a\n// virtual on the data, and its subclasses differ in a way no shared function can\n// express: Standard binds its pixel buffer without consulting the technique mask\n// while Skinned gates the identical payload behind it. In C++ that difference is\n// carried entirely by overload resolution on an argument type -\n// FillAndSetConstants takes `unsigned` at Tr2RenderUtils.h:35 and `ShaderType`\n// at :46, the latter shifting `1 << t` - which JavaScript cannot express. With\n// the class restored, each subclass simply states its own behaviour.\n\nimport { Tr2PerObjectData } from \"./Tr2PerObjectData.js\";\nimport {\n AssertFitsPerObjectBudget,\n PER_OBJECT_VS_FLOAT_CAPACITY,\n Tr2PerObjectDataPSBuffer\n} from \"./Tr2PerObjectDataPSBuffer.js\";\nimport { carbon, impl } from \"#schema\";\n\n\n/**\n * Per-object data with both a vertex and a pixel payload.\n */\nexport class Tr2PerObjectDataStandard extends Tr2PerObjectDataPSBuffer\n{\n /** The vertex payload, in the shape this object was leased for. */\n vs = null;\n\n /**\n * Leases a per-object data object and both of its payloads.\n *\n * @param {object} accumulator An `ITriRenderBatchAccumulator`.\n * @param {string} vsStruct A `CjsPerObjectLayouts` struct name for the vertex payload.\n * @param {string} psStruct A `CjsPerObjectLayouts` struct name for the pixel payload.\n * @returns {Tr2PerObjectDataStandard} The leased object.\n */\n /**\n * Vertex payload first, matching the order Carbon binds them in.\n *\n * @returns {object[]} Both payloads.\n */\n GetPayloads()\n {\n return [ this.vs, this.ps ];\n }\n\n static alloc(accumulator, vsStruct, psStruct)\n {\n const data = super.alloc(accumulator, psStruct);\n\n data.vs = accumulator.Alloc(vsStruct);\n\n AssertFitsPerObjectBudget(data.vs, PER_OBJECT_VS_FLOAT_CAPACITY, vsStruct, \"VS\");\n\n return data;\n }\n\n /**\n * Uploads both payloads and binds them at the per-object registers.\n *\n * THE PIXEL HALF IS GATED HERE AND IS NOT IN CARBON, which is the one\n * behavioural divergence in this class. Carbon passes the PIXEL_SHADER enum,\n * selecting the overload that shifts `1 << PIXEL_SHADER` and never intersects\n * it with the technique's mask, so Standard binds its pixel buffer even for a\n * technique with no pixel stage (`Tr2PerObjectData.cpp:61-66`; Skinned gates\n * the same payload at :77).\n *\n * We gate it, for a reason Carbon does not have available: our layouts DECLARE\n * which stages they serve, so the gate is per layout rather than per hardcoded\n * half, and it is strictly more precise. `FillAndSetConstants` is built around\n * that - its own head comment records that a zero mask binding nothing \"is how\n * a payload declared for stages a technique does not use gets skipped, per\n * batch, without the caller testing anything\". Binding a pixel buffer for a\n * pipeline with no pixel stage is wasted upload work, and the declaration also\n * expresses a payload serving both stages in ONE buffer, which Carbon can only\n * do with two.\n *\n * The upload itself is the shared static, so this class adds the virtual and\n * the identity without a second copy of the mechanism.\n *\n * @param {object[]} buffers A `Tr2ConstantBufferAL` per `ShaderType`.\n * @param {number} constantTypeMask A bit per `ShaderType`.\n * @param {object} renderContext The context to upload and bind against.\n * @returns {number} How many payloads were uploaded.\n */\n @carbon.method\n @impl.adapted\n @impl.reason(\"Carbon binds the pixel payload without consulting the technique mask, distinguished from the gated form only by C++ overload resolution on an argument type. Our layouts declare the stages they serve, so the gate is per declaration and more precise than Carbon's hardcoded halves.\")\n SetPerObjectDataToDevice(buffers, constantTypeMask, renderContext)\n {\n return Tr2PerObjectData.setPerObjectDataToDevice(this, buffers, constantTypeMask, renderContext);\n }\n\n /**\n * The indirect-draw sibling.\n *\n * Carbon writes both payloads through a `Tr2IndirectDrawBufferWriter`\n * (`Tr2PerObjectData.cpp:69-73`). That class has no JS counterpart and nothing\n * on this path draws indirectly, and Carbon's base asserts rather than\n * defaulting (`:34-37`), so an accidental call must not look successful.\n */\n @carbon.method\n @impl.notImplemented\n @impl.reason(\"Tr2IndirectDrawBufferWriter is unported and nothing on this path draws indirectly.\")\n ApplyConstantBuffers()\n {\n throw new Error(\"Tr2PerObjectDataStandard.ApplyConstantBuffers: indirect draw is unported.\");\n }\n}\n"],"names":["Tr2PerObjectDataStandard","Tr2PerObjectDataPSBuffer","_initProto","_applyDecs","carbon","method","impl","adapted","reason","notImplemented","e","vs","GetPayloads","ps","alloc","accumulator","vsStruct","psStruct","data","Alloc","AssertFitsPerObjectBudget","PER_OBJECT_VS_FLOAT_CAPACITY","SetPerObjectDataToDevice","buffers","constantTypeMask","renderContext","Tr2PerObjectData","setPerObjectDataToDevice","ApplyConstantBuffers","Error"],"mappings":";;;;;;;AA4BA;AACA;AACA;AACO,MAAMA,wBAAwB,SAASC,wBAAwB,CACtE;AAAA,EAAA;IAAA,CAAAC,UAAA,IAAAC,cAAA,CAAA,IAAA,EAAA,EAAA,EAAA,CAAA,CAAA,CA6DGC,MAAM,EAANA,MAAM,CAACC,MAAM,EACbC,IAAI,EAAJA,IAAI,CAACC,OAAO,EAAA,MAAA,EACZD,IAAI,CAACE,MAAM,CAAC,yRAAyR,CAAC,sCActSJ,MAAM,EAANA,MAAM,CAACC,MAAM,EACbC,IAAI,EAAJA,IAAI,CAACG,cAAc,UACnBH,IAAI,CAACE,MAAM,CAAC,oFAAoF,CAAC,CAAA,EAAA,EAAA,EAAA,sBAAA,CAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAhFtDP,wBAAwB,EAAAS,CAAA;AAAA;AAEpE;EACAC,EAAE,IAAAT,UAAA,CAAA,IAAA,CAAA,EAAG,IAAI;;AAET;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACE;AACF;AACA;AACA;AACA;AACEU,EAAAA,WAAWA,GACX;IACE,OAAO,CAAE,IAAI,CAACD,EAAE,EAAE,IAAI,CAACE,EAAE,CAAE;AAC7B,EAAA;AAEA,EAAA,OAAOC,KAAKA,CAACC,WAAW,EAAEC,QAAQ,EAAEC,QAAQ,EAC5C;IACE,MAAMC,IAAI,GAAG,KAAK,CAACJ,KAAK,CAACC,WAAW,EAAEE,QAAQ,CAAC;IAE/CC,IAAI,CAACP,EAAE,GAAGI,WAAW,CAACI,KAAK,CAACH,QAAQ,CAAC;IAErCI,yBAAyB,CAACF,IAAI,CAACP,EAAE,EAAEU,4BAA4B,EAAEL,QAAQ,EAAE,IAAI,CAAC;AAEhF,IAAA,OAAOE,IAAI;AACb,EAAA;;AAEA;AACF;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;AAIEI,EAAAA,wBAAwBA,CAACC,OAAO,EAAEC,gBAAgB,EAAEC,aAAa,EACjE;IACE,OAAOC,gBAAgB,CAACC,wBAAwB,CAAC,IAAI,EAAEJ,OAAO,EAAEC,gBAAgB,EAAEC,aAAa,CAAC;AAClG,EAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AAIEG,EAAAA,oBAAoBA,GACpB;AACE,IAAA,MAAM,IAAIC,KAAK,CAAC,2EAA2E,CAAC;AAC9F,EAAA;AACF;;;;"}
|