@carbonenginejs/runtime 0.1.0-alpha.0 → 0.1.0-alpha.2
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/schema/CjsSchema.js +20 -2
- package/dist/global/schema/CjsSchema.js.map +1 -1
- package/dist/global/schema/hydration.js +14 -0
- package/dist/global/schema/hydration.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 +69 -9
- package/dist/resource/formats/webgl/core/glsl/DxbcGlslEmitter.js.map +1 -1
- package/dist/resource/formats/webgl/core/glsl/DxbcGlslOperandFormatter.js +12 -3
- package/dist/resource/formats/webgl/core/glsl/DxbcGlslOperandFormatter.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 +158 -345
- 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 +92 -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
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { toJsonAcyclic } from '../../../format/jsonPolicies.js';
|
|
2
|
+
|
|
1
3
|
const OUTPUT_JSON = "json";
|
|
2
4
|
const OUTPUT_PAYLOAD = "payload";
|
|
3
5
|
const OUTPUT_RUNTIME = "runtime";
|
|
@@ -58,9 +60,9 @@ function validateClassKey(classKeys, key, readerName) {
|
|
|
58
60
|
}
|
|
59
61
|
}
|
|
60
62
|
|
|
61
|
-
/**
|
|
62
|
-
* Validates a resolved runtime class constructor for the RED object-graph
|
|
63
|
-
* reader.
|
|
63
|
+
/**
|
|
64
|
+
* Validates a resolved runtime class constructor for the RED object-graph
|
|
65
|
+
* reader.
|
|
64
66
|
*/
|
|
65
67
|
function validateClass(classKeys, type, Class, readerName) {
|
|
66
68
|
validateClassKey(classKeys, type, readerName);
|
|
@@ -82,9 +84,9 @@ function mergeClasses(values, classes, classKeys, readerName) {
|
|
|
82
84
|
values.classes = next;
|
|
83
85
|
}
|
|
84
86
|
|
|
85
|
-
/**
|
|
86
|
-
* Normalizes reader options against their supported defaults for the RED
|
|
87
|
-
* object-graph reader.
|
|
87
|
+
/**
|
|
88
|
+
* Normalizes reader options against their supported defaults for the RED
|
|
89
|
+
* object-graph reader.
|
|
88
90
|
*/
|
|
89
91
|
function normalizeValues(base, options, classKeys, readerName) {
|
|
90
92
|
if (!options || typeof options !== "object") {
|
|
@@ -122,30 +124,18 @@ function copyReaderOptions(values) {
|
|
|
122
124
|
return readerOptions;
|
|
123
125
|
}
|
|
124
126
|
|
|
125
|
-
/**
|
|
126
|
-
* Converts a parsed payload into a JSON-safe value for the RED object-graph
|
|
127
|
-
* reader.
|
|
127
|
+
/**
|
|
128
|
+
* Converts a parsed payload into a JSON-safe value for the RED object-graph
|
|
129
|
+
* reader.
|
|
128
130
|
*/
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
seen.add(value);
|
|
138
|
-
const json = toJsonValue(value.toJSON(), seen);
|
|
139
|
-
seen.delete(value);
|
|
140
|
-
return json;
|
|
141
|
-
}
|
|
142
|
-
seen.add(value);
|
|
143
|
-
const out = {};
|
|
144
|
-
for (const key of Object.keys(value)) {
|
|
145
|
-
out[key] = toJsonValue(value[key], seen);
|
|
146
|
-
}
|
|
147
|
-
seen.delete(value);
|
|
148
|
-
return out;
|
|
131
|
+
/**
|
|
132
|
+
* Convert to JSON, refusing a cycle, naming this reader in the error.
|
|
133
|
+
*
|
|
134
|
+
* @param {*} value Any decoded value.
|
|
135
|
+
* @returns {*} A JSON-safe value.
|
|
136
|
+
*/
|
|
137
|
+
function toJsonValue(value) {
|
|
138
|
+
return toJsonAcyclic(value, "Reader");
|
|
149
139
|
}
|
|
150
140
|
|
|
151
141
|
export { DEFAULT_VALUES, OUTPUT_JSON, OUTPUT_PAYLOAD, OUTPUT_RAW, OUTPUT_RUNTIME, copyReaderOptions, normalizeValues, toJsonValue, validateClass, validateClassKey };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sources":["../../../../../../src/resource/formats/red/core/helpers.js"],"sourcesContent":["export const OUTPUT_JSON = \"json\";\r\nexport const OUTPUT_PAYLOAD = \"payload\";\r\nexport const OUTPUT_RUNTIME = \"runtime\";\r\nexport const OUTPUT_RAW = \"raw\";\r\n\r\nexport const DEFAULT_VALUES = Object.freeze({\r\n emit: OUTPUT_JSON,\r\n schema: null,\r\n registry: null,\r\n firstId: 1,\r\n parse: null,\r\n adapter: null,\r payloadTypeField: \"_type\",\r\n payloadIdField: \"_id\",\r\n payloadReferenceField: \"_reference\",\r\n payloadValuesField: \"_values\",\r\n classes: Object.freeze({})\r\n});\r\n\r\nconst OPTION_KEYS = new Set(Object.keys(DEFAULT_VALUES));\r\n\n\r\nfunction normalizeEmit(emit, readerName)\r\n{\r\n if (emit === undefined || emit === OUTPUT_JSON) return OUTPUT_JSON;\r\n if (emit === OUTPUT_PAYLOAD) return OUTPUT_PAYLOAD;\r\n if (emit === OUTPUT_RUNTIME) return OUTPUT_RUNTIME;\r\n if (emit === OUTPUT_RAW) return OUTPUT_RAW;\r\n throw new Error(`${readerName} unknown emit value \"${emit}\"`);\r\n}\r\n\r\nfunction assertKnownOptions(options, readerName)\r\n{\r\n for (const key of Object.keys(options))\r\n {\r\n if (!OPTION_KEYS.has(key))\r\n {\r\n throw new TypeError(`${readerName} unknown option \"${key}\"`);\r\n }\r\n }\r\n}\r\n\r\nfunction classMap(values)\r\n{\r\n return values && values.classes ? values.classes : {};\r\n}\r\n\r\nfunction cloneValues(values)\r\n{\r\n return {\r\n emit: values.emit,\r\n schema: values.schema ?? null,\r\n registry: values.registry ?? null,\r\n firstId: values.firstId ?? 1,\r\n parse: values.parse ?? null,\r\n adapter: values.adapter ?? null,\r payloadTypeField: values.payloadTypeField,\r\n payloadIdField: values.payloadIdField,\r\n payloadReferenceField: values.payloadReferenceField,\r\n payloadValuesField: values.payloadValuesField,\r\n classes: { ...classMap(values) }\r\n };\r\n}\r\n\r\n/** Validates a requested runtime class key for the RED object-graph reader. */\r\nexport function validateClassKey(classKeys, key, readerName)\r\n{\r\n if (typeof key !== \"string\" || !key)\r\n {\r\n throw new Error(`${readerName} class type must be a non-empty string`);\r\n }\r\n}\r\n\r\n/**\r\n * Validates a resolved runtime class constructor for the RED object-graph\r\n * reader.\r\n */\r\nexport function validateClass(classKeys, type, Class, readerName)\r\n{\r\n validateClassKey(classKeys, type, readerName);\r\n if (typeof Class !== \"function\")\r\n {\r\n throw new TypeError(`${readerName} class \"${type}\" must be a constructor`);\r\n }\r\n}\r\n\r\nfunction mergeClasses(values, classes, classKeys, readerName)\r\n{\r\n if (!classes || typeof classes !== \"object\")\r\n {\r\n throw new TypeError(`${readerName} classes option must be an object`);\r\n }\r\n\r\n const next = { ...values.classes };\r\n for (const [ type, Class ] of Object.entries(classes))\r\n {\r\n validateClass(classKeys, type, Class, readerName);\r\n next[type] = Class;\r\n }\r\n values.classes = next;\r\n}\r\n\r\n/**\r\n * Normalizes reader options against their supported defaults for the RED\r\n * object-graph reader.\r\n */\r\nexport function normalizeValues(base, options, classKeys, readerName)\r\n{\r\n if (!options || typeof options !== \"object\")\r\n {\r\n throw new TypeError(`${readerName} options must be an object`);\r\n }\r\n\r\n assertKnownOptions(options, readerName);\r\n\r\n const values = cloneValues(base);\r\n if (Object.hasOwn(options, \"emit\")) values.emit = normalizeEmit(options.emit, readerName);\r\n if (Object.hasOwn(options, \"schema\")) values.schema = options.schema ?? null;\r\n if (Object.hasOwn(options, \"registry\")) values.registry = options.registry ?? null;\r\n if (Object.hasOwn(options, \"firstId\")) values.firstId = options.firstId ?? 1;\r\n if (Object.hasOwn(options, \"parse\"))\r\n {\r\n if (options.parse !== null && options.parse !== undefined && typeof options.parse !== \"function\")\r\n {\r\n throw new TypeError(`${readerName} parse option must be a function`);\r\n }\r\n values.parse = options.parse ?? null;\r\n }\r\n if (Object.hasOwn(options, \"adapter\")) values.adapter = options.adapter ?? null;\r if (Object.hasOwn(options, \"payloadTypeField\")) values.payloadTypeField = options.payloadTypeField;\r\n if (Object.hasOwn(options, \"payloadIdField\")) values.payloadIdField = options.payloadIdField;\r\n if (Object.hasOwn(options, \"payloadReferenceField\")) values.payloadReferenceField = options.payloadReferenceField;\r\n if (Object.hasOwn(options, \"payloadValuesField\")) values.payloadValuesField = options.payloadValuesField;\r\n if (Object.hasOwn(options, \"classes\")) mergeClasses(values, options.classes, classKeys, readerName);\r\n return values;\r\n}\r\n\r\n/** Copies reader options accepted by the current RED object-graph reader. */\r\nexport function copyReaderOptions(values)\r\n{\r\n const { emit: _emit, schema: _schema, classes: _classes, ...readerOptions } = values;\r\n return readerOptions;\r\n}\r\n\r\n/**\r\n * Converts a parsed payload into a JSON-safe value for the RED object-graph\r\n * reader.\r\n */\r\nexport function toJsonValue(value, seen = new WeakSet())\r\n{\r\n if (value === null || typeof value !== \"object\") return value;\r\n if (ArrayBuffer.isView(value)) return Array.from(value, item => toJsonValue(item, seen));\r\n if (Array.isArray(value)) return value.map(item => toJsonValue(item, seen));\r\n\r\n if (seen.has(value))\r\n {\r\n throw new TypeError(\"Reader.toJSON cannot convert circular data\");\r\n }\r\n\r\n if (typeof value.toJSON === \"function\")\r\n {\r\n seen.add(value);\r\n const json = toJsonValue(value.toJSON(), seen);\r\n seen.delete(value);\r\n return json;\r\n }\r\n\r\n seen.add(value);\r\n const out = {};\r\n for (const key of Object.keys(value))\r\n {\r\n out[key] = toJsonValue(value[key], seen);\r\n }\r\n seen.delete(value);\r\n return out;\r\n}\r\n"],"names":["OUTPUT_JSON","OUTPUT_PAYLOAD","OUTPUT_RUNTIME","OUTPUT_RAW","DEFAULT_VALUES","Object","freeze","emit","schema","registry","firstId","parse","adapter","payloadTypeField","payloadIdField","payloadReferenceField","payloadValuesField","classes","OPTION_KEYS","Set","keys","normalizeEmit","readerName","undefined","Error","assertKnownOptions","options","key","has","TypeError","classMap","values","cloneValues","validateClassKey","classKeys","validateClass","type","Class","mergeClasses","next","entries","normalizeValues","base","hasOwn","copyReaderOptions","_emit","_schema","_classes","readerOptions","toJsonValue","value","seen","WeakSet","ArrayBuffer","isView","Array","from","item","isArray","map","toJSON","add","json","delete","out"],"mappings":"AAAO,MAAMA,WAAW,GAAG;AACpB,MAAMC,cAAc,GAAG;AACvB,MAAMC,cAAc,GAAG;AACvB,MAAMC,UAAU,GAAG;MAEbC,cAAc,GAAGC,MAAM,CAACC,MAAM,CAAC;AACxCC,EAAAA,IAAI,EAAEP,WAAW;AACjBQ,EAAAA,MAAM,EAAE,IAAI;AACZC,EAAAA,QAAQ,EAAE,IAAI;AACdC,EAAAA,OAAO,EAAE,CAAC;AACVC,EAAAA,KAAK,EAAE,IAAI;AACXC,EAAAA,OAAO,EAAE,IAAI;AACbC,EAAAA,gBAAgB,EAAE,OAAO;AACzBC,EAAAA,cAAc,EAAE,KAAK;AACrBC,EAAAA,qBAAqB,EAAE,YAAY;AACnCC,EAAAA,kBAAkB,EAAE,SAAS;AAC7BC,EAAAA,OAAO,EAAEZ,MAAM,CAACC,MAAM,CAAC,EAAE;AAC7B,CAAC;AAED,MAAMY,WAAW,GAAG,IAAIC,GAAG,CAACd,MAAM,CAACe,IAAI,CAAChB,cAAc,CAAC,CAAC;AAGxD,SAASiB,aAAaA,CAACd,IAAI,EAAEe,UAAU,EACvC;EACI,IAAIf,IAAI,KAAKgB,SAAS,IAAIhB,IAAI,KAAKP,WAAW,EAAE,OAAOA,WAAW;AAClE,EAAA,IAAIO,IAAI,KAAKN,cAAc,EAAE,OAAOA,cAAc;AAClD,EAAA,IAAIM,IAAI,KAAKL,cAAc,EAAE,OAAOA,cAAc;AAClD,EAAA,IAAIK,IAAI,KAAKJ,UAAU,EAAE,OAAOA,UAAU;EAC1C,MAAM,IAAIqB,KAAK,CAAC,CAAA,EA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AEO,IAAI,IAAIR,WAAW,CAACQ,IAAI,EAAEN,IAAI,CAAC,CAAC;EACxF,IAAII,KAAK,CAACG,OAAO,CAACR,KAAK,CAAC,EAAE,OAAOA,KAAK,CAACS,GAAG,CAACF,IAAI,IAAIR,WAAW,CAACQ,IAAI,EAAEN,IAAI,CAAC,CAAC;AAE3E,EAAA,IAAIA,IAAI,CAACvB,GAAG,CAACsB,KAAK,CAAC,EACnB;AACI,IAAA,MAAM,IAAIrB,SAAS,CAAC,4CAA4C,CAAC;AACrE,EAAA;AAEA,EAAA,IAAI,OAAOqB,KAAK,CAACU,MAAM,KAAK,UAAU,EACtC;AACIT,IAAAA,IAAI,CAACU,GAAG,CAACX,KAAK,CAAC;IACf,MAAMY,IAAI,GAAGb,WAAW,CAACC,KAAK,CAACU,MAAM,EAAE,EAAET,IAAI,CAAC;AAC9CA,IAAAA,IAAI,CAACY,MAAM,CAACb,KAAK,CAAC;AAClB,IAAA,OAAOY,IAAI;AACf,EAAA;AAEAX,EAAAA,IAAI,CAACU,GAAG,CAACX,KAAK,CAAC;EACf,MAAMc,GAAG,GAAG,EAAE;EACd,KAAK,MAAMrC,GAAG,IAAItB,MAAM,CAACe,IAAI,CAAC8B,KAAK,CAAC,EACpC;AACIc,IAAAA,GAAG,CAACrC,GAAG,CAAC,GAAGsB,WAAW,CAACC,KAAK,CAACvB,GAAG,CAAC,EAAEwB,IAAI,CAAC;AAC5C,EAAA;AACAA,EAAAA,IAAI,CAACY,MAAM,CAACb,KAAK,CAAC;AAClB,EAAA,OAAOc,GAAG;AACd;;;;"}
|
|
1
|
+
{"version":3,"file":"helpers.js","sources":["../../../../../../src/resource/formats/red/core/helpers.js"],"sourcesContent":["import { toJsonAcyclic } from \"../../../format/jsonPolicies.js\";\n\nexport const OUTPUT_JSON = \"json\";\nexport const OUTPUT_PAYLOAD = \"payload\";\nexport const OUTPUT_RUNTIME = \"runtime\";\nexport const OUTPUT_RAW = \"raw\";\n\nexport const DEFAULT_VALUES = Object.freeze({\n emit: OUTPUT_JSON,\n schema: null,\n registry: null,\n firstId: 1,\n parse: null,\n adapter: null,\n payloadTypeField: \"_type\",\n payloadIdField: \"_id\",\n payloadReferenceField: \"_reference\",\n payloadValuesField: \"_values\",\n classes: Object.freeze({})\n});\n\nconst OPTION_KEYS = new Set(Object.keys(DEFAULT_VALUES));\n\n\nfunction normalizeEmit(emit, readerName)\n{\n if (emit === undefined || emit === OUTPUT_JSON) return OUTPUT_JSON;\n if (emit === OUTPUT_PAYLOAD) return OUTPUT_PAYLOAD;\n if (emit === OUTPUT_RUNTIME) return OUTPUT_RUNTIME;\n if (emit === OUTPUT_RAW) return OUTPUT_RAW;\n throw new Error(`${readerName} unknown emit value \"${emit}\"`);\n}\n\nfunction assertKnownOptions(options, readerName)\n{\n for (const key of Object.keys(options))\n {\n if (!OPTION_KEYS.has(key))\n {\n throw new TypeError(`${readerName} unknown option \"${key}\"`);\n }\n }\n}\n\nfunction classMap(values)\n{\n return values && values.classes ? values.classes : {};\n}\n\nfunction cloneValues(values)\n{\n return {\n emit: values.emit,\n schema: values.schema ?? null,\n registry: values.registry ?? null,\n firstId: values.firstId ?? 1,\n parse: values.parse ?? null,\n adapter: values.adapter ?? null,\n payloadTypeField: values.payloadTypeField,\n payloadIdField: values.payloadIdField,\n payloadReferenceField: values.payloadReferenceField,\n payloadValuesField: values.payloadValuesField,\n classes: { ...classMap(values) }\n };\n}\n\n/** Validates a requested runtime class key for the RED object-graph reader. */\nexport function validateClassKey(classKeys, key, readerName)\n{\n if (typeof key !== \"string\" || !key)\n {\n throw new Error(`${readerName} class type must be a non-empty string`);\n }\n}\n\n/**\n * Validates a resolved runtime class constructor for the RED object-graph\n * reader.\n */\nexport function validateClass(classKeys, type, Class, readerName)\n{\n validateClassKey(classKeys, type, readerName);\n if (typeof Class !== \"function\")\n {\n throw new TypeError(`${readerName} class \"${type}\" must be a constructor`);\n }\n}\n\nfunction mergeClasses(values, classes, classKeys, readerName)\n{\n if (!classes || typeof classes !== \"object\")\n {\n throw new TypeError(`${readerName} classes option must be an object`);\n }\n\n const next = { ...values.classes };\n for (const [ type, Class ] of Object.entries(classes))\n {\n validateClass(classKeys, type, Class, readerName);\n next[type] = Class;\n }\n values.classes = next;\n}\n\n/**\n * Normalizes reader options against their supported defaults for the RED\n * object-graph reader.\n */\nexport function normalizeValues(base, options, classKeys, readerName)\n{\n if (!options || typeof options !== \"object\")\n {\n throw new TypeError(`${readerName} options must be an object`);\n }\n\n assertKnownOptions(options, readerName);\n\n const values = cloneValues(base);\n if (Object.hasOwn(options, \"emit\")) values.emit = normalizeEmit(options.emit, readerName);\n if (Object.hasOwn(options, \"schema\")) values.schema = options.schema ?? null;\n if (Object.hasOwn(options, \"registry\")) values.registry = options.registry ?? null;\n if (Object.hasOwn(options, \"firstId\")) values.firstId = options.firstId ?? 1;\n if (Object.hasOwn(options, \"parse\"))\n {\n if (options.parse !== null && options.parse !== undefined && typeof options.parse !== \"function\")\n {\n throw new TypeError(`${readerName} parse option must be a function`);\n }\n values.parse = options.parse ?? null;\n }\n if (Object.hasOwn(options, \"adapter\")) values.adapter = options.adapter ?? null;\n if (Object.hasOwn(options, \"payloadTypeField\")) values.payloadTypeField = options.payloadTypeField;\n if (Object.hasOwn(options, \"payloadIdField\")) values.payloadIdField = options.payloadIdField;\n if (Object.hasOwn(options, \"payloadReferenceField\")) values.payloadReferenceField = options.payloadReferenceField;\n if (Object.hasOwn(options, \"payloadValuesField\")) values.payloadValuesField = options.payloadValuesField;\n if (Object.hasOwn(options, \"classes\")) mergeClasses(values, options.classes, classKeys, readerName);\n return values;\n}\n\n/** Copies reader options accepted by the current RED object-graph reader. */\nexport function copyReaderOptions(values)\n{\n const { emit: _emit, schema: _schema, classes: _classes, ...readerOptions } = values;\n return readerOptions;\n}\n\n/**\n * Converts a parsed payload into a JSON-safe value for the RED object-graph\n * reader.\n */\n/**\n * Convert to JSON, refusing a cycle, naming this reader in the error.\n *\n * @param {*} value Any decoded value.\n * @returns {*} A JSON-safe value.\n */\nexport function toJsonValue(value)\n{\n return toJsonAcyclic(value, \"Reader\");\n}\n"],"names":["OUTPUT_JSON","OUTPUT_PAYLOAD","OUTPUT_RUNTIME","OUTPUT_RAW","DEFAULT_VALUES","Object","freeze","emit","schema","registry","firstId","parse","adapter","payloadTypeField","payloadIdField","payloadReferenceField","payloadValuesField","classes","OPTION_KEYS","Set","keys","normalizeEmit","readerName","undefined","Error","assertKnownOptions","options","key","has","TypeError","classMap","values","cloneValues","validateClassKey","classKeys","validateClass","type","Class","mergeClasses","next","entries","normalizeValues","base","hasOwn","copyReaderOptions","_emit","_schema","_classes","readerOptions","toJsonValue","value","toJsonAcyclic"],"mappings":";;AAEO,MAAMA,WAAW,GAAG;AACpB,MAAMC,cAAc,GAAG;AACvB,MAAMC,cAAc,GAAG;AACvB,MAAMC,UAAU,GAAG;MAEbC,cAAc,GAAGC,MAAM,CAACC,MAAM,CAAC;AACxCC,EAAAA,IAAI,EAAEP,WAAW;AACjBQ,EAAAA,MAAM,EAAE,IAAI;AACZC,EAAAA,QAAQ,EAAE,IAAI;AACdC,EAAAA,OAAO,EAAE,CAAC;AACVC,EAAAA,KAAK,EAAE,IAAI;AACXC,EAAAA,OAAO,EAAE,IAAI;AACbC,EAAAA,gBAAgB,EAAE,OAAO;AACzBC,EAAAA,cAAc,EAAE,KAAK;AACrBC,EAAAA,qBAAqB,EAAE,YAAY;AACnCC,EAAAA,kBAAkB,EAAE,SAAS;AAC7BC,EAAAA,OAAO,EAAEZ,MAAM,CAACC,MAAM,CAAC,EAAE;AAC7B,CAAC;AAED,MAAMY,WAAW,GAAG,IAAIC,GAAG,CAACd,MAAM,CAACe,IAAI,CAAChB,cAAc,CAAC,CAAC;AAGxD,SAASiB,aAAaA,CAACd,IAAI,EAAEe,UAAU,EACvC;EACI,IAAIf,IAAI,KAAKgB,SAAS,IAAIhB,IAAI,KAAKP,WAAW,EAAE,OAAOA,WAAW;AAClE,EAAA,IAAIO,IAAI,KAAKN,cAAc,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OAAOC,aAAa,CAACD,KAAK,EAAE,QAAQ,CAAC;AACzC;;;;"}
|
|
@@ -1,50 +1,51 @@
|
|
|
1
1
|
import { CjsFormat } from '../../format/CjsFormat.js';
|
|
2
|
-
import { DEFAULT_VALUES, normalizeValues, validateClassKey, validateClass, readWithValues, writeWithValues, inspectWithValues,
|
|
2
|
+
import { DEFAULT_VALUES, normalizeValues, validateClassKey, validateClass, readWithValues, writeWithValues, inspectWithValues, OUTPUT_CMF, OUTPUT_GR2, OUTPUT_SHARED, OUTPUT_STL_JSON, OUTPUT_JSON, CLASS_KEYS } from './core/helpers.js';
|
|
3
|
+
import { toJsonWithArrayValues } from '../../format/jsonPolicies.js';
|
|
3
4
|
import { isStl, isBinaryStl } from './core/stl.js';
|
|
4
5
|
|
|
5
6
|
const FORMAT_NAME = "CjsStlFormat";
|
|
6
7
|
|
|
7
|
-
/**
|
|
8
|
-
* Shared mesh accepted by the STL writer. STL exports only `vertex.position`
|
|
9
|
-
* and triangular `indices[].faces`; all other shared channels are ignored.
|
|
10
|
-
*
|
|
11
|
-
* @typedef {object} CjsStlSharedMesh
|
|
12
|
-
* @property {string} [name] Diagnostic mesh name; `solidName` controls the STL header.
|
|
13
|
-
* @property {{position: ArrayLike<number>, normal?: ArrayLike<number>}} vertex Shared vertex channels.
|
|
14
|
-
* @property {Array<{name?: string, faces: ArrayLike<number>}>} indices Triangle index groups.
|
|
8
|
+
/**
|
|
9
|
+
* Shared mesh accepted by the STL writer. STL exports only `vertex.position`
|
|
10
|
+
* and triangular `indices[].faces`; all other shared channels are ignored.
|
|
11
|
+
*
|
|
12
|
+
* @typedef {object} CjsStlSharedMesh
|
|
13
|
+
* @property {string} [name] Diagnostic mesh name; `solidName` controls the STL header.
|
|
14
|
+
* @property {{position: ArrayLike<number>, normal?: ArrayLike<number>}} vertex Shared vertex channels.
|
|
15
|
+
* @property {Array<{name?: string, faces: ArrayLike<number>}>} indices Triangle index groups.
|
|
15
16
|
*/
|
|
16
17
|
|
|
17
|
-
/**
|
|
18
|
-
* Shared geometry root accepted by the STL writer.
|
|
19
|
-
*
|
|
20
|
-
* @typedef {object} CjsStlSharedRoot
|
|
21
|
-
* @property {Array<CjsStlSharedMesh>} meshes Meshes flattened into one STL solid.
|
|
22
|
-
* @property {string} [grannyFileSource] Optional source label used by inspection.
|
|
18
|
+
/**
|
|
19
|
+
* Shared geometry root accepted by the STL writer.
|
|
20
|
+
*
|
|
21
|
+
* @typedef {object} CjsStlSharedRoot
|
|
22
|
+
* @property {Array<CjsStlSharedMesh>} meshes Meshes flattened into one STL solid.
|
|
23
|
+
* @property {string} [grannyFileSource] Optional source label used by inspection.
|
|
23
24
|
*/
|
|
24
25
|
|
|
25
|
-
/**
|
|
26
|
-
* Reusable STL read, write, and inspection options.
|
|
27
|
-
*
|
|
28
|
-
* @typedef {object} CjsStlFormatOptions
|
|
29
|
-
* @property {"shared"|"stlJson"|"json"|"gr2"|"cmf"} [emit="stlJson"] Read output contract.
|
|
30
|
-
* @property {string} [source="memory"] Source label stored in read/inspection output.
|
|
31
|
-
* @property {boolean} [binary=true] Whether writes return binary bytes instead of ASCII text.
|
|
32
|
-
* @property {string} [solidName="carbonenginejs"] Sanitized ASCII solid name and binary header label.
|
|
33
|
-
* @property {number} [scale=1] Positive finite multiplier applied to exported positions.
|
|
34
|
-
* @property {boolean} [recalculateNormals=true] Derive facet normals from winding instead of vertex normals.
|
|
35
|
-
* @property {boolean} [weldVertices=false] Weld equal positions while reading STL.
|
|
36
|
-
* @property {number} [weldTolerance=1e-5] Non-negative read/inspection position tolerance.
|
|
37
|
-
* @property {boolean} [skipDegenerate=true] Omit degenerate shared triangles during writes.
|
|
38
|
-
* @property {boolean} [requireWatertight=false] Reject writes with printability topology issues.
|
|
39
|
-
* @property {Record<string, Function>} [classes] Caller constructors used for read hydration.
|
|
26
|
+
/**
|
|
27
|
+
* Reusable STL read, write, and inspection options.
|
|
28
|
+
*
|
|
29
|
+
* @typedef {object} CjsStlFormatOptions
|
|
30
|
+
* @property {"shared"|"stlJson"|"json"|"gr2"|"cmf"} [emit="stlJson"] Read output contract.
|
|
31
|
+
* @property {string} [source="memory"] Source label stored in read/inspection output.
|
|
32
|
+
* @property {boolean} [binary=true] Whether writes return binary bytes instead of ASCII text.
|
|
33
|
+
* @property {string} [solidName="carbonenginejs"] Sanitized ASCII solid name and binary header label.
|
|
34
|
+
* @property {number} [scale=1] Positive finite multiplier applied to exported positions.
|
|
35
|
+
* @property {boolean} [recalculateNormals=true] Derive facet normals from winding instead of vertex normals.
|
|
36
|
+
* @property {boolean} [weldVertices=false] Weld equal positions while reading STL.
|
|
37
|
+
* @property {number} [weldTolerance=1e-5] Non-negative read/inspection position tolerance.
|
|
38
|
+
* @property {boolean} [skipDegenerate=true] Omit degenerate shared triangles during writes.
|
|
39
|
+
* @property {boolean} [requireWatertight=false] Reject writes with printability topology issues.
|
|
40
|
+
* @property {Record<string, Function>} [classes] Caller constructors used for read hydration.
|
|
40
41
|
*/
|
|
41
42
|
|
|
42
|
-
/**
|
|
43
|
-
* CarbonEngineJS-facing STL format surface.
|
|
44
|
-
*
|
|
45
|
-
* The Cjs prefix marks this as a JavaScript format/construction boundary.
|
|
46
|
-
* STL is a triangle-only import/export format; the JSON contract is the shared
|
|
47
|
-
* CarbonEngineJS mesh schema.
|
|
43
|
+
/**
|
|
44
|
+
* CarbonEngineJS-facing STL format surface.
|
|
45
|
+
*
|
|
46
|
+
* The Cjs prefix marks this as a JavaScript format/construction boundary.
|
|
47
|
+
* STL is a triangle-only import/export format; the JSON contract is the shared
|
|
48
|
+
* CarbonEngineJS mesh schema.
|
|
48
49
|
*/
|
|
49
50
|
class CjsStlFormat extends CjsFormat {
|
|
50
51
|
#emit = DEFAULT_VALUES.emit;
|
|
@@ -59,26 +60,26 @@ class CjsStlFormat extends CjsFormat {
|
|
|
59
60
|
#requireWatertight = DEFAULT_VALUES.requireWatertight;
|
|
60
61
|
#classes = DEFAULT_VALUES.classes;
|
|
61
62
|
|
|
62
|
-
/**
|
|
63
|
-
* Create a reusable format profile.
|
|
64
|
-
*
|
|
65
|
-
* The instance stores only normalized options; each `Read`, `Write`, or
|
|
66
|
-
* `Inspect` call may provide non-mutating overrides.
|
|
67
|
-
*
|
|
68
|
-
* @param {CjsStlFormatOptions} [options={}] Default format values.
|
|
69
|
-
* @throws {TypeError} If an option, output mode, numeric value, or class map is invalid.
|
|
63
|
+
/**
|
|
64
|
+
* Create a reusable format profile.
|
|
65
|
+
*
|
|
66
|
+
* The instance stores only normalized options; each `Read`, `Write`, or
|
|
67
|
+
* `Inspect` call may provide non-mutating overrides.
|
|
68
|
+
*
|
|
69
|
+
* @param {CjsStlFormatOptions} [options={}] Default format values.
|
|
70
|
+
* @throws {TypeError} If an option, output mode, numeric value, or class map is invalid.
|
|
70
71
|
*/
|
|
71
72
|
constructor(options = {}) {
|
|
72
73
|
super();
|
|
73
74
|
this.SetValues(options);
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
/**
|
|
77
|
-
* Set format values for this reusable profile.
|
|
78
|
-
*
|
|
79
|
-
* @param {CjsStlFormatOptions} [options={}] Values to merge into the profile.
|
|
80
|
-
* @returns {CjsStlFormat} This format profile.
|
|
81
|
-
* @throws {TypeError} If an option, output mode, numeric value, or class map is invalid.
|
|
77
|
+
/**
|
|
78
|
+
* Set format values for this reusable profile.
|
|
79
|
+
*
|
|
80
|
+
* @param {CjsStlFormatOptions} [options={}] Values to merge into the profile.
|
|
81
|
+
* @returns {CjsStlFormat} This format profile.
|
|
82
|
+
* @throws {TypeError} If an option, output mode, numeric value, or class map is invalid.
|
|
82
83
|
*/
|
|
83
84
|
SetValues(options = {}) {
|
|
84
85
|
const values = normalizeValues(this.GetValues(), options, FORMAT_NAME);
|
|
@@ -96,12 +97,12 @@ class CjsStlFormat extends CjsFormat {
|
|
|
96
97
|
return this;
|
|
97
98
|
}
|
|
98
99
|
|
|
99
|
-
/**
|
|
100
|
-
* Get this profile's current values, optionally with per-call overrides.
|
|
101
|
-
*
|
|
102
|
-
* @param {CjsStlFormatOptions} [options={}] Optional values to merge into a copy.
|
|
103
|
-
* @returns {CjsStlFormatOptions} A validated copy of the effective values.
|
|
104
|
-
* @throws {TypeError} If an override is invalid.
|
|
100
|
+
/**
|
|
101
|
+
* Get this profile's current values, optionally with per-call overrides.
|
|
102
|
+
*
|
|
103
|
+
* @param {CjsStlFormatOptions} [options={}] Optional values to merge into a copy.
|
|
104
|
+
* @returns {CjsStlFormatOptions} A validated copy of the effective values.
|
|
105
|
+
* @throws {TypeError} If an override is invalid.
|
|
105
106
|
*/
|
|
106
107
|
GetValues(options = {}) {
|
|
107
108
|
return normalizeValues({
|
|
@@ -119,11 +120,11 @@ class CjsStlFormat extends CjsFormat {
|
|
|
119
120
|
}, options, FORMAT_NAME);
|
|
120
121
|
}
|
|
121
122
|
|
|
122
|
-
/**
|
|
123
|
-
* Set multiple node-class constructors for this profile.
|
|
124
|
-
*
|
|
125
|
-
* @param {object} [classes] Map of node class keys to constructors.
|
|
126
|
-
* @returns {CjsStlFormat} This format profile.
|
|
123
|
+
/**
|
|
124
|
+
* Set multiple node-class constructors for this profile.
|
|
125
|
+
*
|
|
126
|
+
* @param {object} [classes] Map of node class keys to constructors.
|
|
127
|
+
* @returns {CjsStlFormat} This format profile.
|
|
127
128
|
*/
|
|
128
129
|
SetClasses(classes = {}) {
|
|
129
130
|
return this.SetValues({
|
|
@@ -131,12 +132,12 @@ class CjsStlFormat extends CjsFormat {
|
|
|
131
132
|
});
|
|
132
133
|
}
|
|
133
134
|
|
|
134
|
-
/**
|
|
135
|
-
* Set one node-class constructor for this profile.
|
|
136
|
-
*
|
|
137
|
-
* @param {string} type Node class key.
|
|
138
|
-
* @param {Function|null|undefined} Class Constructor to use, or nullish to delete.
|
|
139
|
-
* @returns {CjsStlFormat} This format profile.
|
|
135
|
+
/**
|
|
136
|
+
* Set one node-class constructor for this profile.
|
|
137
|
+
*
|
|
138
|
+
* @param {string} type Node class key.
|
|
139
|
+
* @param {Function|null|undefined} Class Constructor to use, or nullish to delete.
|
|
140
|
+
* @returns {CjsStlFormat} This format profile.
|
|
140
141
|
*/
|
|
141
142
|
SetClass(type, Class) {
|
|
142
143
|
if (Class === null || Class === undefined) {
|
|
@@ -156,145 +157,145 @@ class CjsStlFormat extends CjsFormat {
|
|
|
156
157
|
});
|
|
157
158
|
}
|
|
158
159
|
|
|
159
|
-
/**
|
|
160
|
-
* Get a configured node-class constructor.
|
|
161
|
-
*
|
|
162
|
-
* @param {string} type Node class key.
|
|
163
|
-
* @returns {Function|undefined} The registered constructor, if any.
|
|
160
|
+
/**
|
|
161
|
+
* Get a configured node-class constructor.
|
|
162
|
+
*
|
|
163
|
+
* @param {string} type Node class key.
|
|
164
|
+
* @returns {Function|undefined} The registered constructor, if any.
|
|
164
165
|
*/
|
|
165
166
|
GetClass(type) {
|
|
166
167
|
validateClassKey(type, FORMAT_NAME);
|
|
167
168
|
return this.#classes[type];
|
|
168
169
|
}
|
|
169
170
|
|
|
170
|
-
/**
|
|
171
|
-
* Whether this format profile has a constructor registered for a node class key.
|
|
172
|
-
*
|
|
173
|
-
* @param {string} type Node class key.
|
|
174
|
-
* @returns {boolean} True when a constructor is registered.
|
|
171
|
+
/**
|
|
172
|
+
* Whether this format profile has a constructor registered for a node class key.
|
|
173
|
+
*
|
|
174
|
+
* @param {string} type Node class key.
|
|
175
|
+
* @returns {boolean} True when a constructor is registered.
|
|
175
176
|
*/
|
|
176
177
|
HasClass(type) {
|
|
177
178
|
return !!this.GetClass(type);
|
|
178
179
|
}
|
|
179
180
|
|
|
180
|
-
/**
|
|
181
|
-
* Read STL text/bytes with this profile's values.
|
|
182
|
-
*
|
|
183
|
-
* @param {string|Uint8Array|ArrayBuffer|DataView} input STL text or bytes.
|
|
184
|
-
* @param {object} [options] Per-call value overrides.
|
|
185
|
-
* @returns {object} The shared CarbonEngineJS JSON mesh schema.
|
|
181
|
+
/**
|
|
182
|
+
* Read STL text/bytes with this profile's values.
|
|
183
|
+
*
|
|
184
|
+
* @param {string|Uint8Array|ArrayBuffer|DataView} input STL text or bytes.
|
|
185
|
+
* @param {object} [options] Per-call value overrides.
|
|
186
|
+
* @returns {object} The shared CarbonEngineJS JSON mesh schema.
|
|
186
187
|
*/
|
|
187
188
|
Read(input, options = {}) {
|
|
188
189
|
return readWithValues(this, input, this.GetValues(options));
|
|
189
190
|
}
|
|
190
191
|
|
|
191
|
-
/**
|
|
192
|
-
* Write shared JSON geometry as STL with this profile's values.
|
|
193
|
-
*
|
|
194
|
-
* Multiple meshes and index groups are flattened in encounter order because
|
|
195
|
-
* STL has no portable material or scene hierarchy. Degenerate triangles are
|
|
196
|
-
* skipped by default. Binary output validates that every coordinate is
|
|
197
|
-
* representable as float32 rather than silently writing infinities.
|
|
198
|
-
*
|
|
199
|
-
* @param {CjsStlSharedRoot|CjsStlSharedMesh} input Shared JSON root or mesh.
|
|
200
|
-
* @param {CjsStlFormatOptions} [options={}] Per-call writer overrides.
|
|
201
|
-
* @returns {string|Uint8Array} ASCII STL text or binary STL bytes.
|
|
202
|
-
* @throws {TypeError|RangeError|Error} If geometry, indices, coordinates, topology, or options are invalid.
|
|
192
|
+
/**
|
|
193
|
+
* Write shared JSON geometry as STL with this profile's values.
|
|
194
|
+
*
|
|
195
|
+
* Multiple meshes and index groups are flattened in encounter order because
|
|
196
|
+
* STL has no portable material or scene hierarchy. Degenerate triangles are
|
|
197
|
+
* skipped by default. Binary output validates that every coordinate is
|
|
198
|
+
* representable as float32 rather than silently writing infinities.
|
|
199
|
+
*
|
|
200
|
+
* @param {CjsStlSharedRoot|CjsStlSharedMesh} input Shared JSON root or mesh.
|
|
201
|
+
* @param {CjsStlFormatOptions} [options={}] Per-call writer overrides.
|
|
202
|
+
* @returns {string|Uint8Array} ASCII STL text or binary STL bytes.
|
|
203
|
+
* @throws {TypeError|RangeError|Error} If geometry, indices, coordinates, topology, or options are invalid.
|
|
203
204
|
*/
|
|
204
205
|
Write(input, options = {}) {
|
|
205
206
|
return writeWithValues(input, this.GetValues(options));
|
|
206
207
|
}
|
|
207
208
|
|
|
208
|
-
/**
|
|
209
|
-
* Inspect STL text/bytes or shared JSON geometry for printability blockers.
|
|
210
|
-
*
|
|
211
|
-
* @param {any} input STL text/bytes or shared JSON root/mesh.
|
|
212
|
-
* @param {object} [options] Per-call value overrides.
|
|
213
|
-
* @returns {object} Plain printability report.
|
|
209
|
+
/**
|
|
210
|
+
* Inspect STL text/bytes or shared JSON geometry for printability blockers.
|
|
211
|
+
*
|
|
212
|
+
* @param {any} input STL text/bytes or shared JSON root/mesh.
|
|
213
|
+
* @param {object} [options] Per-call value overrides.
|
|
214
|
+
* @returns {object} Plain printability report.
|
|
214
215
|
*/
|
|
215
216
|
Inspect(input, options = {}) {
|
|
216
217
|
return inspectWithValues(input, this.GetValues(options));
|
|
217
218
|
}
|
|
218
219
|
|
|
219
|
-
/**
|
|
220
|
-
* Convert format output to JSON-compatible data.
|
|
221
|
-
*
|
|
222
|
-
* @param {any} value Format output to convert.
|
|
223
|
-
* @returns {any} Plain JSON-compatible data.
|
|
220
|
+
/**
|
|
221
|
+
* Convert format output to JSON-compatible data.
|
|
222
|
+
*
|
|
223
|
+
* @param {any} value Format output to convert.
|
|
224
|
+
* @returns {any} Plain JSON-compatible data.
|
|
224
225
|
*/
|
|
225
226
|
ToJSON(value) {
|
|
226
|
-
return
|
|
227
|
+
return toJsonWithArrayValues(value);
|
|
227
228
|
}
|
|
228
229
|
|
|
229
|
-
/**
|
|
230
|
-
* Static one-shot read. Static methods use camelCase by convention.
|
|
231
|
-
*
|
|
232
|
-
* @param {string|Uint8Array|ArrayBuffer|DataView} input STL text or bytes.
|
|
233
|
-
* @param {object} [options] Format values.
|
|
234
|
-
* @returns {object} The shared CarbonEngineJS JSON mesh schema.
|
|
230
|
+
/**
|
|
231
|
+
* Static one-shot read. Static methods use camelCase by convention.
|
|
232
|
+
*
|
|
233
|
+
* @param {string|Uint8Array|ArrayBuffer|DataView} input STL text or bytes.
|
|
234
|
+
* @param {object} [options] Format values.
|
|
235
|
+
* @returns {object} The shared CarbonEngineJS JSON mesh schema.
|
|
235
236
|
*/
|
|
236
237
|
static read(input, options = {}) {
|
|
237
238
|
return readWithValues(CjsStlFormat, input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));
|
|
238
239
|
}
|
|
239
240
|
|
|
240
|
-
/**
|
|
241
|
-
* Static one-shot write.
|
|
242
|
-
*
|
|
243
|
-
* The call is one-shot and does not mutate `input`. Multiple meshes and
|
|
244
|
-
* index groups are flattened into a single STL solid in encounter order.
|
|
245
|
-
*
|
|
246
|
-
* @param {CjsStlSharedRoot|CjsStlSharedMesh} input Shared JSON root or mesh.
|
|
247
|
-
* @param {CjsStlFormatOptions} [options={}] Writer values.
|
|
248
|
-
* @returns {string|Uint8Array} ASCII STL text or binary STL bytes.
|
|
249
|
-
* @throws {TypeError|RangeError|Error} If geometry, indices, coordinates, topology, or options are invalid.
|
|
241
|
+
/**
|
|
242
|
+
* Static one-shot write.
|
|
243
|
+
*
|
|
244
|
+
* The call is one-shot and does not mutate `input`. Multiple meshes and
|
|
245
|
+
* index groups are flattened into a single STL solid in encounter order.
|
|
246
|
+
*
|
|
247
|
+
* @param {CjsStlSharedRoot|CjsStlSharedMesh} input Shared JSON root or mesh.
|
|
248
|
+
* @param {CjsStlFormatOptions} [options={}] Writer values.
|
|
249
|
+
* @returns {string|Uint8Array} ASCII STL text or binary STL bytes.
|
|
250
|
+
* @throws {TypeError|RangeError|Error} If geometry, indices, coordinates, topology, or options are invalid.
|
|
250
251
|
*/
|
|
251
252
|
static write(input, options = {}) {
|
|
252
253
|
return writeWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));
|
|
253
254
|
}
|
|
254
255
|
|
|
255
|
-
/**
|
|
256
|
-
* Static one-shot inspection.
|
|
257
|
-
*
|
|
258
|
-
* @param {any} input STL text/bytes or shared JSON root/mesh.
|
|
259
|
-
* @param {object} [options] Format values.
|
|
260
|
-
* @returns {object} Plain printability report.
|
|
256
|
+
/**
|
|
257
|
+
* Static one-shot inspection.
|
|
258
|
+
*
|
|
259
|
+
* @param {any} input STL text/bytes or shared JSON root/mesh.
|
|
260
|
+
* @param {object} [options] Format values.
|
|
261
|
+
* @returns {object} Plain printability report.
|
|
261
262
|
*/
|
|
262
263
|
static inspect(input, options = {}) {
|
|
263
264
|
return inspectWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));
|
|
264
265
|
}
|
|
265
266
|
|
|
266
|
-
/**
|
|
267
|
-
* Static JSON-compatible conversion.
|
|
268
|
-
*
|
|
269
|
-
* @param {any} value Format output to convert.
|
|
270
|
-
* @returns {any} Plain JSON-compatible data.
|
|
267
|
+
/**
|
|
268
|
+
* Static JSON-compatible conversion.
|
|
269
|
+
*
|
|
270
|
+
* @param {any} value Format output to convert.
|
|
271
|
+
* @returns {any} Plain JSON-compatible data.
|
|
271
272
|
*/
|
|
272
273
|
static toJSON(value) {
|
|
273
|
-
return
|
|
274
|
+
return toJsonWithArrayValues(value);
|
|
274
275
|
}
|
|
275
276
|
|
|
276
|
-
/**
|
|
277
|
-
* Cheap sniff for STL-like input.
|
|
278
|
-
*
|
|
279
|
-
* @param {string|Uint8Array|ArrayBuffer|DataView} input Candidate STL input.
|
|
280
|
-
* @returns {boolean} True when input looks like STL.
|
|
277
|
+
/**
|
|
278
|
+
* Cheap sniff for STL-like input.
|
|
279
|
+
*
|
|
280
|
+
* @param {string|Uint8Array|ArrayBuffer|DataView} input Candidate STL input.
|
|
281
|
+
* @returns {boolean} True when input looks like STL.
|
|
281
282
|
*/
|
|
282
283
|
static isStl(input) {
|
|
283
284
|
return isStl(input);
|
|
284
285
|
}
|
|
285
286
|
|
|
286
|
-
/**
|
|
287
|
-
* Check whether byte-like input has an exact binary STL layout.
|
|
288
|
-
*
|
|
289
|
-
* @param {string|Uint8Array|ArrayBuffer|DataView} input Candidate STL input.
|
|
290
|
-
* @returns {boolean} True when input is binary STL bytes.
|
|
287
|
+
/**
|
|
288
|
+
* Check whether byte-like input has an exact binary STL layout.
|
|
289
|
+
*
|
|
290
|
+
* @param {string|Uint8Array|ArrayBuffer|DataView} input Candidate STL input.
|
|
291
|
+
* @returns {boolean} True when input is binary STL bytes.
|
|
291
292
|
*/
|
|
292
293
|
static isBinaryStl(input) {
|
|
293
294
|
return isBinaryStl(input);
|
|
294
295
|
}
|
|
295
296
|
|
|
296
|
-
/**
|
|
297
|
-
* Emit targets for this format (canonical frozen enum).
|
|
297
|
+
/**
|
|
298
|
+
* Emit targets for this format (canonical frozen enum).
|
|
298
299
|
*/
|
|
299
300
|
static Output = Object.freeze({
|
|
300
301
|
JSON: OUTPUT_JSON,
|
|
@@ -306,6 +307,16 @@ class CjsStlFormat extends CjsFormat {
|
|
|
306
307
|
static CLASS_KEYS = CLASS_KEYS;
|
|
307
308
|
static id = "stl";
|
|
308
309
|
static mediaTypes = Object.freeze(["geometry"]);
|
|
310
|
+
// STL takes the shared geometry root directly rather than going through
|
|
311
|
+
// CMF, because it carries triangles and nothing else worth preserving.
|
|
312
|
+
// Lossless for what STL can represent; everything else was never in scope.
|
|
313
|
+
static inputs = CjsFormat.defineInputs({
|
|
314
|
+
shared: {
|
|
315
|
+
default: true,
|
|
316
|
+
payloadType: "geometry",
|
|
317
|
+
options: ["binary", "solidName", "scale", "recalculateNormals", "weldVertices"]
|
|
318
|
+
}
|
|
319
|
+
});
|
|
309
320
|
static outputs = CjsFormat.defineOutputs({
|
|
310
321
|
shared: {
|
|
311
322
|
decoded: true
|