@carbonenginejs/runtime 0.1.0-alpha.0 → 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -125
- package/dist/audio/index.js +8 -1
- package/dist/audio/index.js.map +1 -1
- package/dist/audio/trinity/audio/AudActionLog/AudActionLogCB.js +84 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionLogCB.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecord.js +14 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecord.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordExecuteActionOnPlayingID.js +26 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordExecuteActionOnPlayingID.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordPostEvent.js +27 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordPostEvent.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetRTPC.js +27 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetRTPC.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetState.js +25 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetState.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetSwitch.js +26 -0
- package/dist/audio/trinity/audio/AudActionLog/AudActionRecordSetSwitch.js.map +1 -0
- package/dist/audio/trinity/audio/AudActionLog/IAudActionLog.js +58 -0
- package/dist/audio/trinity/audio/AudActionLog/IAudActionLog.js.map +1 -0
- package/dist/audio/trinity/audio/AudManager.js +1 -1
- package/dist/audio/trinity/audio/AudManager.js.map +1 -1
- package/dist/audio/trinity/audio/{AudObstructionOcclusion.js → AudObstructionOcclusion/AudObstructionOcclusion.js} +8 -52
- package/dist/audio/trinity/audio/AudObstructionOcclusion/AudObstructionOcclusion.js.map +1 -0
- package/dist/audio/trinity/audio/AudObstructionOcclusion/EmitterState.js +17 -0
- package/dist/audio/trinity/audio/AudObstructionOcclusion/EmitterState.js.map +1 -0
- package/dist/audio/trinity/audio/AudObstructionOcclusion/FadingValue.js +46 -0
- package/dist/audio/trinity/audio/AudObstructionOcclusion/FadingValue.js.map +1 -0
- package/dist/audio/trinity/index.js +8 -1
- package/dist/audio/trinity/index.js.map +1 -1
- package/dist/character/CjsCharacterAppearanceConstruction.js +5 -0
- package/dist/character/CjsCharacterAppearanceConstruction.js.map +1 -1
- package/dist/character/CjsCharacterAppearanceManager.js +14 -0
- package/dist/character/CjsCharacterAppearanceManager.js.map +1 -1
- package/dist/character/CjsCharacterFoundationConstruction.js +5 -0
- package/dist/character/CjsCharacterFoundationConstruction.js.map +1 -1
- package/dist/character/CjsCharacterTexturePolicy.js +5 -0
- package/dist/character/CjsCharacterTexturePolicy.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesAppearanceAL.js +17 -0
- package/dist/character/gles/CjsCharacterGlesAppearanceAL.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesAtlasRenderer.js +2 -0
- package/dist/character/gles/CjsCharacterGlesAtlasRenderer.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesFoundationTranslator.js +5 -0
- package/dist/character/gles/CjsCharacterGlesFoundationTranslator.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesLegacyConstructionTranslator.js +5 -0
- package/dist/character/gles/CjsCharacterGlesLegacyConstructionTranslator.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesMorphDeformation.js +2 -0
- package/dist/character/gles/CjsCharacterGlesMorphDeformation.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesPaletteCompatibility.js +5 -0
- package/dist/character/gles/CjsCharacterGlesPaletteCompatibility.js.map +1 -1
- package/dist/character/gles/CjsCharacterGlesTriangleCoverage.js +5 -0
- package/dist/character/gles/CjsCharacterGlesTriangleCoverage.js.map +1 -1
- package/dist/character/webgl2/CjsCharacterWebgl2EffectRouter.js +9 -0
- package/dist/character/webgl2/CjsCharacterWebgl2EffectRouter.js.map +1 -1
- package/dist/global/blue/CjsScriptCallback.js +142 -0
- package/dist/global/blue/CjsScriptCallback.js.map +1 -0
- package/dist/global/blue/index.js +2 -0
- package/dist/global/blue/index.js.map +1 -0
- package/dist/global/consts/renderContext/formats.js +51 -1
- package/dist/global/consts/renderContext/formats.js.map +1 -1
- package/dist/global/consts/renderContext/index.js +2 -2
- package/dist/global/consts/renderContext/renderStates.js +16 -1
- package/dist/global/consts/renderContext/renderStates.js.map +1 -1
- package/dist/global/contracts/index.js +0 -1
- package/dist/global/contracts/index.js.map +1 -1
- package/dist/global/index.js +4 -3
- package/dist/global/index.js.map +1 -1
- package/dist/global/math/index.js +2 -0
- package/dist/global/math/index.js.map +1 -1
- package/dist/global/math/mesh.js +70 -16
- package/dist/global/math/mesh.js.map +1 -1
- package/dist/global/math/noise.js +47 -68
- package/dist/global/math/noise.js.map +1 -1
- package/dist/global/math/pool.js +18 -3
- package/dist/global/math/pool.js.map +1 -1
- package/dist/global/math/random.js +52 -0
- package/dist/global/math/random.js.map +1 -0
- package/dist/global/math/tri3.js +18 -4
- package/dist/global/math/tri3.js.map +1 -1
- package/dist/global/utils/bytes.js +22 -4
- package/dist/global/utils/bytes.js.map +1 -1
- package/dist/global/utils/checksum.js +80 -0
- package/dist/global/utils/checksum.js.map +1 -0
- package/dist/global/utils/errors/CjsCancellationError.js +36 -0
- package/dist/global/utils/errors/CjsCancellationError.js.map +1 -0
- package/dist/global/utils/errors/CjsError.js +21 -52
- package/dist/global/utils/errors/CjsError.js.map +1 -1
- package/dist/global/utils/errors/abort.js +1 -1
- package/dist/global/utils/errors/abort.js.map +1 -1
- package/dist/global/utils/errors/index.js +2 -1
- package/dist/global/utils/errors/index.js.map +1 -1
- package/dist/global/utils/index.js +4 -2
- package/dist/global/utils/index.js.map +1 -1
- package/dist/index.js +95 -35
- package/dist/index.js.map +1 -1
- package/dist/input/Tr2MainWindow.js +7 -9
- package/dist/input/Tr2MainWindow.js.map +1 -1
- package/dist/resource/CjsResMan.js +33 -39
- package/dist/resource/CjsResMan.js.map +1 -1
- package/dist/resource/CjsResource.js +19 -5
- package/dist/resource/CjsResource.js.map +1 -1
- package/dist/resource/audio/AudioGeometryResData.js +22 -27
- package/dist/resource/audio/AudioGeometryResData.js.map +1 -1
- package/dist/resource/audio/CjsAudioRes.js +4 -5
- package/dist/resource/audio/CjsAudioRes.js.map +1 -1
- package/dist/resource/format/CjsBitReader.js +263 -0
- package/dist/resource/format/CjsBitReader.js.map +1 -0
- package/dist/resource/format/CjsByteReader.js +130 -125
- package/dist/resource/format/CjsByteReader.js.map +1 -1
- package/dist/resource/format/CjsFormat.js +11 -4
- package/dist/resource/format/CjsFormat.js.map +1 -1
- package/dist/resource/format/CjsFormatError.js +37 -1
- package/dist/resource/format/CjsFormatError.js.map +1 -1
- package/dist/resource/format/CjsResourceProbe.js +41 -37
- package/dist/resource/format/CjsResourceProbe.js.map +1 -1
- package/dist/resource/format/carbonRecordGuard.js +33 -0
- package/dist/resource/format/carbonRecordGuard.js.map +1 -0
- package/dist/resource/format/imageSignatures.js +202 -0
- package/dist/resource/format/imageSignatures.js.map +1 -0
- package/dist/resource/format/index.js +2 -1
- package/dist/resource/format/index.js.map +1 -1
- package/dist/resource/format/jsonPolicies.js +180 -0
- package/dist/resource/format/jsonPolicies.js.map +1 -0
- package/dist/resource/formats/black/core/helpers.js +18 -29
- package/dist/resource/formats/black/core/helpers.js.map +1 -1
- package/dist/resource/formats/bnk/CjsBnkFormat.js +4 -3
- package/dist/resource/formats/bnk/CjsBnkFormat.js.map +1 -1
- package/dist/resource/formats/bnk/core/WwiseCursor.js +218 -0
- package/dist/resource/formats/bnk/core/WwiseCursor.js.map +1 -0
- package/dist/resource/formats/bnk/core/busNodes.js +2 -1
- package/dist/resource/formats/bnk/core/busNodes.js.map +1 -1
- package/dist/resource/formats/bnk/core/effectNodes.js +2 -1
- package/dist/resource/formats/bnk/core/effectNodes.js.map +1 -1
- package/dist/resource/formats/bnk/core/eventAction.js +15 -93
- package/dist/resource/formats/bnk/core/eventAction.js.map +1 -1
- package/dist/resource/formats/bnk/core/globalSettings.js +19 -94
- package/dist/resource/formats/bnk/core/globalSettings.js.map +1 -1
- package/dist/resource/formats/bnk/core/helpers.js +2 -48
- package/dist/resource/formats/bnk/core/helpers.js.map +1 -1
- package/dist/resource/formats/bnk/core/musicNodes.js +42 -134
- package/dist/resource/formats/bnk/core/musicNodes.js.map +1 -1
- package/dist/resource/formats/bnk/core/nodeBase.js +20 -111
- package/dist/resource/formats/bnk/core/nodeBase.js.map +1 -1
- package/dist/resource/formats/bnk/core/sfxNodes.js +2 -1
- package/dist/resource/formats/bnk/core/sfxNodes.js.map +1 -1
- package/dist/resource/formats/cmf/CjsCmfFormat.js +242 -228
- package/dist/resource/formats/cmf/CjsCmfFormat.js.map +1 -1
- package/dist/resource/formats/cmf/core/binary.js +54 -60
- package/dist/resource/formats/cmf/core/binary.js.map +1 -1
- package/dist/resource/formats/dds/CjsDdsFormat.js +5 -3
- package/dist/resource/formats/dds/CjsDdsFormat.js.map +1 -1
- package/dist/resource/formats/dds/core/bc6h.js +16 -18
- package/dist/resource/formats/dds/core/bc6h.js.map +1 -1
- package/dist/resource/formats/dds/core/bc7.js +28 -24
- package/dist/resource/formats/dds/core/bc7.js.map +1 -1
- package/dist/resource/formats/dds/core/helpers.js +7 -133
- package/dist/resource/formats/dds/core/helpers.js.map +1 -1
- package/dist/resource/formats/dxbc/CjsDxbcFormat.js +3 -2
- package/dist/resource/formats/dxbc/CjsDxbcFormat.js.map +1 -1
- package/dist/resource/formats/dxbc/core/helpers.js +4 -32
- package/dist/resource/formats/dxbc/core/helpers.js.map +1 -1
- package/dist/resource/formats/fbx/CjsFbxFormat.js +11 -0
- package/dist/resource/formats/fbx/CjsFbxFormat.js.map +1 -1
- package/dist/resource/formats/fbx/core/helpers.js +18 -12
- package/dist/resource/formats/fbx/core/helpers.js.map +1 -1
- package/dist/resource/formats/flac/CjsFlacFormat.js +4 -9
- package/dist/resource/formats/flac/CjsFlacFormat.js.map +1 -1
- package/dist/resource/formats/flac/core/helpers.js +1 -62
- package/dist/resource/formats/flac/core/helpers.js.map +1 -1
- package/dist/resource/formats/gif/CjsGifFormat.js +4 -9
- package/dist/resource/formats/gif/CjsGifFormat.js.map +1 -1
- package/dist/resource/formats/gif/core/helpers.js +1 -63
- package/dist/resource/formats/gif/core/helpers.js.map +1 -1
- package/dist/resource/formats/gltf/CjsGltfFormat.js +4 -3
- package/dist/resource/formats/gltf/CjsGltfFormat.js.map +1 -1
- package/dist/resource/formats/gltf/core/helpers.js +3 -19
- package/dist/resource/formats/gltf/core/helpers.js.map +1 -1
- package/dist/resource/formats/gr2/CjsGr2Format.js +105 -92
- package/dist/resource/formats/gr2/CjsGr2Format.js.map +1 -1
- package/dist/resource/formats/gr2/core/container.js +1 -10
- package/dist/resource/formats/gr2/core/container.js.map +1 -1
- package/dist/resource/formats/gr2/core/helpers.js +24 -35
- package/dist/resource/formats/gr2/core/helpers.js.map +1 -1
- package/dist/resource/formats/gr2/core/shared.js +193 -189
- package/dist/resource/formats/gr2/core/shared.js.map +1 -1
- package/dist/resource/formats/hlsl/CjsHlslFormat.js +4 -3
- package/dist/resource/formats/hlsl/CjsHlslFormat.js.map +1 -1
- package/dist/resource/formats/hlsl/core/helpers.js +1 -30
- package/dist/resource/formats/hlsl/core/helpers.js.map +1 -1
- package/dist/resource/formats/jpeg/CjsJpegFormat.js +5 -3
- package/dist/resource/formats/jpeg/CjsJpegFormat.js.map +1 -1
- package/dist/resource/formats/jpeg/core/helpers.js +7 -134
- package/dist/resource/formats/jpeg/core/helpers.js.map +1 -1
- package/dist/resource/formats/mp3/CjsMp3Format.js +4 -9
- package/dist/resource/formats/mp3/CjsMp3Format.js.map +1 -1
- package/dist/resource/formats/mp3/core/helpers.js +1 -64
- package/dist/resource/formats/mp3/core/helpers.js.map +1 -1
- package/dist/resource/formats/mp4/CjsMp4Format.js +4 -9
- package/dist/resource/formats/mp4/CjsMp4Format.js.map +1 -1
- package/dist/resource/formats/mp4/core/helpers.js +1 -73
- package/dist/resource/formats/mp4/core/helpers.js.map +1 -1
- package/dist/resource/formats/obj/CjsObjFormat.js +4 -3
- package/dist/resource/formats/obj/CjsObjFormat.js.map +1 -1
- package/dist/resource/formats/obj/core/helpers.js +93 -115
- package/dist/resource/formats/obj/core/helpers.js.map +1 -1
- package/dist/resource/formats/ogg/CjsOggFormat.js +4 -3
- package/dist/resource/formats/ogg/CjsOggFormat.js.map +1 -1
- package/dist/resource/formats/ogg/core/helpers.js +1 -15
- package/dist/resource/formats/ogg/core/helpers.js.map +1 -1
- package/dist/resource/formats/ogg/core/vorbis.js +138 -144
- package/dist/resource/formats/ogg/core/vorbis.js.map +1 -1
- package/dist/resource/formats/pickle/CjsPickleFormat.js +83 -114
- package/dist/resource/formats/pickle/CjsPickleFormat.js.map +1 -1
- package/dist/resource/formats/png/CjsPngFormat.js +5 -3
- package/dist/resource/formats/png/CjsPngFormat.js.map +1 -1
- package/dist/resource/formats/png/core/helpers.js +13 -152
- package/dist/resource/formats/png/core/helpers.js.map +1 -1
- package/dist/resource/formats/png/core/writer.js +3 -27
- package/dist/resource/formats/png/core/writer.js.map +1 -1
- package/dist/resource/formats/red/core/helpers.js +19 -29
- package/dist/resource/formats/red/core/helpers.js.map +1 -1
- package/dist/resource/formats/stl/CjsStlFormat.js +158 -147
- package/dist/resource/formats/stl/CjsStlFormat.js.map +1 -1
- package/dist/resource/formats/stl/core/helpers.js +44 -66
- package/dist/resource/formats/stl/core/helpers.js.map +1 -1
- package/dist/resource/formats/tga/CjsTgaFormat.js +5 -3
- package/dist/resource/formats/tga/CjsTgaFormat.js.map +1 -1
- package/dist/resource/formats/tga/core/helpers.js +7 -153
- package/dist/resource/formats/tga/core/helpers.js.map +1 -1
- package/dist/resource/formats/vta/CjsVtaFormat.js +4 -3
- package/dist/resource/formats/vta/CjsVtaFormat.js.map +1 -1
- package/dist/resource/formats/vta/core/helpers.js +1 -17
- package/dist/resource/formats/vta/core/helpers.js.map +1 -1
- package/dist/resource/formats/wav/CjsWavFormat.js +4 -3
- package/dist/resource/formats/wav/CjsWavFormat.js.map +1 -1
- package/dist/resource/formats/wav/core/helpers.js +1 -15
- package/dist/resource/formats/wav/core/helpers.js.map +1 -1
- package/dist/resource/formats/webgl/CjsWebglFormat.js +4 -3
- package/dist/resource/formats/webgl/CjsWebglFormat.js.map +1 -1
- package/dist/resource/formats/webgl/core/glsl/DxbcGlslEmitter.js +52 -4
- package/dist/resource/formats/webgl/core/glsl/DxbcGlslEmitter.js.map +1 -1
- package/dist/resource/formats/webgl/core/helpers.js +39 -68
- package/dist/resource/formats/webgl/core/helpers.js.map +1 -1
- package/dist/resource/formats/webgpu/CjsWebgpuFormat.js +4 -3
- package/dist/resource/formats/webgpu/CjsWebgpuFormat.js.map +1 -1
- package/dist/resource/formats/webgpu/core/helpers.js +4 -30
- package/dist/resource/formats/webgpu/core/helpers.js.map +1 -1
- package/dist/resource/formats/webm/CjsWebmFormat.js +4 -9
- package/dist/resource/formats/webm/CjsWebmFormat.js.map +1 -1
- package/dist/resource/formats/webm/core/helpers.js +1 -73
- package/dist/resource/formats/webm/core/helpers.js.map +1 -1
- package/dist/resource/formats/webp/CjsWebpFormat.js +4 -9
- package/dist/resource/formats/webp/CjsWebpFormat.js.map +1 -1
- package/dist/resource/formats/webp/core/helpers.js +1 -62
- package/dist/resource/formats/webp/core/helpers.js.map +1 -1
- package/dist/resource/formats/wem/CjsWemFormat.js +4 -3
- package/dist/resource/formats/wem/CjsWemFormat.js.map +1 -1
- package/dist/resource/formats/wem/core/bitStream.js +83 -106
- package/dist/resource/formats/wem/core/bitStream.js.map +1 -1
- package/dist/resource/formats/wem/core/codebookLibrary.js +52 -52
- package/dist/resource/formats/wem/core/codebookLibrary.js.map +1 -1
- package/dist/resource/formats/wem/core/helpers.js +1 -15
- package/dist/resource/formats/wem/core/helpers.js.map +1 -1
- package/dist/resource/formats/wem/core/wemToOgg.js +67 -67
- package/dist/resource/formats/wem/core/wemToOgg.js.map +1 -1
- package/dist/resource/geometry/MeshDecalData.js +23 -25
- package/dist/resource/geometry/MeshDecalData.js.map +1 -1
- package/dist/resource/geometry/MeshDecalLodData.js +14 -23
- package/dist/resource/geometry/MeshDecalLodData.js.map +1 -1
- package/dist/resource/geometry/TriGeometryRes.js +299 -284
- package/dist/resource/geometry/TriGeometryRes.js.map +1 -1
- package/dist/resource/geometry/TriGeometryResAreaData.js +30 -31
- package/dist/resource/geometry/TriGeometryResAreaData.js.map +1 -1
- package/dist/resource/geometry/TriGeometryResJointData.js +16 -24
- package/dist/resource/geometry/TriGeometryResJointData.js.map +1 -1
- package/dist/resource/geometry/TriGeometryResLodData.js +50 -41
- package/dist/resource/geometry/TriGeometryResLodData.js.map +1 -1
- package/dist/resource/geometry/TriGeometryResMeshData.js +32 -32
- package/dist/resource/geometry/TriGeometryResMeshData.js.map +1 -1
- package/dist/resource/geometry/TriGeometryResSkeletonData.js +14 -23
- package/dist/resource/geometry/TriGeometryResSkeletonData.js.map +1 -1
- package/dist/resource/geometry/TriJointBinding.js +16 -24
- package/dist/resource/geometry/TriJointBinding.js.map +1 -1
- package/dist/resource/geometry/TriMorphTargetGeometryConstants.js +22 -27
- package/dist/resource/geometry/TriMorphTargetGeometryConstants.js.map +1 -1
- package/dist/resource/geometry/TriRtGeometryConstants.js +50 -41
- package/dist/resource/geometry/TriRtGeometryConstants.js.map +1 -1
- package/dist/resource/geometry/granny/GStateBindingCallbackData.js +12 -22
- package/dist/resource/geometry/granny/GStateBindingCallbackData.js.map +1 -1
- package/dist/resource/geometry/granny/Tr2GrannyIntersectionResult.js +30 -31
- package/dist/resource/geometry/granny/Tr2GrannyIntersectionResult.js.map +1 -1
- package/dist/resource/index.js +1 -1
- package/dist/resource/shader/reflection/Tr2EffectConstant.js +16 -17
- package/dist/resource/shader/reflection/Tr2EffectConstant.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectDescription.js +26 -28
- package/dist/resource/shader/reflection/Tr2EffectDescription.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectLibrary.js +24 -25
- package/dist/resource/shader/reflection/Tr2EffectLibrary.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js +21 -22
- package/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectResource.js +25 -26
- package/dist/resource/shader/reflection/Tr2EffectResource.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectStageInput.js +69 -72
- package/dist/resource/shader/reflection/Tr2EffectStageInput.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2EffectTechnique.js +17 -18
- package/dist/resource/shader/reflection/Tr2EffectTechnique.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2Pass.js +42 -43
- package/dist/resource/shader/reflection/Tr2Pass.js.map +1 -1
- package/dist/resource/shader/reflection/Tr2RenderStateSetup.js +26 -5
- package/dist/resource/shader/reflection/Tr2RenderStateSetup.js.map +1 -1
- package/dist/resource/shader/reflection/carbonRecordFields.js +87 -90
- package/dist/resource/shader/reflection/carbonRecordFields.js.map +1 -1
- package/dist/resource/shader/sampler/Tr2SamplerSetup.js +32 -34
- package/dist/resource/shader/sampler/Tr2SamplerSetup.js.map +1 -1
- package/dist/resource/texture/CjsTextureArrayRes.js +1 -6
- package/dist/resource/texture/CjsTextureArrayRes.js.map +1 -1
- package/dist/resource/texture/Tr2TextureLodManager.js +35 -27
- package/dist/resource/texture/Tr2TextureLodManager.js.map +1 -1
- package/dist/resource/texture/Tr2TextureLodUpdateRequest.js +16 -24
- package/dist/resource/texture/Tr2TextureLodUpdateRequest.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePackChannel.js +16 -24
- package/dist/resource/texture/Tr2TexturePackChannel.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipeline.js +24 -20
- package/dist/resource/texture/Tr2TexturePipeline.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineParams.js +14 -23
- package/dist/resource/texture/Tr2TexturePipelineParams.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepCompress.js +18 -25
- package/dist/resource/texture/Tr2TexturePipelineStepCompress.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepGenerateMips.js +11 -16
- package/dist/resource/texture/Tr2TexturePipelineStepGenerateMips.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepLimitSize.js +14 -23
- package/dist/resource/texture/Tr2TexturePipelineStepLimitSize.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepLoad.js +12 -22
- package/dist/resource/texture/Tr2TexturePipelineStepLoad.js.map +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepPack.js +38 -26
- package/dist/resource/texture/Tr2TexturePipelineStepPack.js.map +1 -1
- package/dist/resource/worker/CjsResManMainThreadLoader.js +2 -5
- package/dist/resource/worker/CjsResManMainThreadLoader.js.map +1 -1
- package/dist/resource/worker/CjsResManWorkerLoader.js +6 -7
- package/dist/resource/worker/CjsResManWorkerLoader.js.map +1 -1
- package/dist/resource/worker/protocol.js +18 -1
- package/dist/resource/worker/protocol.js.map +1 -1
- package/dist/sof/EveSOF.js +2 -222
- package/dist/sof/EveSOF.js.map +1 -1
- package/dist/sof/SofDocumentBuilder.js +205 -0
- package/dist/sof/SofDocumentBuilder.js.map +1 -0
- package/dist/sof/faction/ErrSOFFactionColorSetTypeNotFound.js +16 -0
- package/dist/sof/faction/ErrSOFFactionColorSetTypeNotFound.js.map +1 -0
- package/dist/sof/faction/ErrSOFFactionColorSetTypeUnknown.js +16 -0
- package/dist/sof/faction/ErrSOFFactionColorSetTypeUnknown.js.map +1 -0
- package/dist/sof/faction/EveSOFDataFactionColorSet.js +3 -27
- package/dist/sof/faction/EveSOFDataFactionColorSet.js.map +1 -1
- package/dist/sof/faction/index.js +3 -1
- package/dist/sof/faction/index.js.map +1 -1
- package/dist/sof/generic/ErrSOFAreaShaderNotFound.js +18 -0
- package/dist/sof/generic/ErrSOFAreaShaderNotFound.js.map +1 -0
- package/dist/sof/generic/ErrSOFDecalShaderNotFound.js +18 -0
- package/dist/sof/generic/ErrSOFDecalShaderNotFound.js.map +1 -0
- package/dist/sof/generic/ErrSOFMaterialPrefixNotFound.js +21 -0
- package/dist/sof/generic/ErrSOFMaterialPrefixNotFound.js.map +1 -0
- package/dist/sof/generic/ErrSOFPatternMaterialPrefixNotFound.js +21 -0
- package/dist/sof/generic/ErrSOFPatternMaterialPrefixNotFound.js.map +1 -0
- package/dist/sof/generic/EveSOFDataGeneric.js +5 -69
- package/dist/sof/generic/EveSOFDataGeneric.js.map +1 -1
- package/dist/sof/generic/index.js +5 -1
- package/dist/sof/generic/index.js.map +1 -1
- package/dist/sof/index.js +23 -7
- package/dist/sof/index.js.map +1 -1
- package/dist/sof/pattern/ErrSOFProjectionNotFound.js +20 -0
- package/dist/sof/pattern/ErrSOFProjectionNotFound.js.map +1 -0
- package/dist/sof/pattern/EveSOFDataPattern.js +2 -17
- package/dist/sof/pattern/EveSOFDataPattern.js.map +1 -1
- package/dist/sof/pattern/index.js +2 -1
- package/dist/sof/pattern/index.js.map +1 -1
- package/dist/sof/shared/ErrSOFAreaTypeNotFound.js +16 -0
- package/dist/sof/shared/ErrSOFAreaTypeNotFound.js.map +1 -0
- package/dist/sof/shared/ErrSOFLogoSetTypeNotFound.js +16 -0
- package/dist/sof/shared/ErrSOFLogoSetTypeNotFound.js.map +1 -0
- package/dist/sof/shared/ErrSOFLogoSetTypeUnknown.js +16 -0
- package/dist/sof/shared/ErrSOFLogoSetTypeUnknown.js.map +1 -0
- package/dist/sof/shared/EveSOFDataArea.js +2 -13
- package/dist/sof/shared/EveSOFDataArea.js.map +1 -1
- package/dist/sof/shared/EveSOFDataLogoSet.js +3 -27
- package/dist/sof/shared/EveSOFDataLogoSet.js.map +1 -1
- package/dist/sof/shared/EveSOFDataParameter.js +2 -146
- package/dist/sof/shared/EveSOFDataParameter.js.map +1 -1
- package/dist/sof/shared/EveSOFDataParameterBool.js +40 -0
- package/dist/sof/shared/EveSOFDataParameterBool.js.map +1 -0
- package/dist/sof/shared/EveSOFDataParameterColor.js +36 -0
- package/dist/sof/shared/EveSOFDataParameterColor.js.map +1 -0
- package/dist/sof/shared/EveSOFDataParameterFloat.js +37 -0
- package/dist/sof/shared/EveSOFDataParameterFloat.js.map +1 -0
- package/dist/sof/shared/EveSOFDataParameterInt.js +37 -0
- package/dist/sof/shared/EveSOFDataParameterInt.js.map +1 -0
- package/dist/sof/shared/EveSOFDataParameterVector2.js +37 -0
- package/dist/sof/shared/EveSOFDataParameterVector2.js.map +1 -0
- package/dist/sof/shared/EveSOFDataParameterVector3.js +37 -0
- package/dist/sof/shared/EveSOFDataParameterVector3.js.map +1 -0
- package/dist/sof/shared/{EveSOFDataSpotlightAttachment.js → EveSOFDataSpotLightAttachment.js} +1 -1
- package/dist/sof/shared/{EveSOFDataSpotlightAttachment.js.map → EveSOFDataSpotLightAttachment.js.map} +1 -1
- package/dist/sof/shared/index.js +13 -4
- package/dist/sof/shared/index.js.map +1 -1
- package/dist/sof/sofDocumentValues.js +33 -0
- package/dist/sof/sofDocumentValues.js.map +1 -0
- package/dist/trinity/controllers/ITr2Controller/ITr2ActionController.js +168 -0
- package/dist/trinity/controllers/ITr2Controller/ITr2ActionController.js.map +1 -0
- package/dist/trinity/controllers/{ITr2Controller.js → ITr2Controller/ITr2Controller.js} +2 -134
- package/dist/trinity/controllers/ITr2Controller/ITr2Controller.js.map +1 -0
- package/dist/trinity/controllers/Tr2Controller.js +2 -1
- package/dist/trinity/controllers/Tr2Controller.js.map +1 -1
- package/dist/trinity/controllers/Tr2ControllerReference.js +2 -1
- package/dist/trinity/controllers/Tr2ControllerReference.js.map +1 -1
- package/dist/trinity/controllers/action/ITr2ControllerAction.js +2 -1
- package/dist/trinity/controllers/action/ITr2ControllerAction.js.map +1 -1
- package/dist/trinity/controllers/action/Tr2ActionSpawnParticles.js +10 -9
- package/dist/trinity/controllers/action/Tr2ActionSpawnParticles.js.map +1 -1
- package/dist/trinity/controllers/expression/CjsControllerExpressionCompileError.js +26 -0
- package/dist/trinity/controllers/expression/CjsControllerExpressionCompileError.js.map +1 -0
- package/dist/trinity/controllers/expression/CjsControllerExpressionEvaluateError.js +24 -0
- package/dist/trinity/controllers/expression/CjsControllerExpressionEvaluateError.js.map +1 -0
- package/dist/trinity/controllers/expression/CjsControllerExpressionParser.js +387 -0
- package/dist/trinity/controllers/expression/CjsControllerExpressionParser.js.map +1 -0
- package/dist/trinity/controllers/expression/CjsControllerExpressionProgram.js +4 -1011
- package/dist/trinity/controllers/expression/CjsControllerExpressionProgram.js.map +1 -1
- package/dist/trinity/controllers/expression/expressionRuntime.js +605 -0
- package/dist/trinity/controllers/expression/expressionRuntime.js.map +1 -0
- package/dist/trinity/controllers/index.js +5 -2
- package/dist/trinity/controllers/index.js.map +1 -1
- package/dist/trinity/controllers/state/ITr2StateMachineStateFinalizer.js +2 -1
- package/dist/trinity/controllers/state/ITr2StateMachineStateFinalizer.js.map +1 -1
- package/dist/trinity/controllers/timeline/Tr2TimelineController.js +2 -1
- package/dist/trinity/controllers/timeline/Tr2TimelineController.js.map +1 -1
- package/dist/trinity/core/ITr2Updateable.js +2 -1
- package/dist/trinity/core/ITr2Updateable.js.map +1 -1
- package/dist/trinity/core/Tr2Blitter.js +6 -3
- package/dist/trinity/core/Tr2Blitter.js.map +1 -1
- package/dist/trinity/core/Tr2Denoiser.js +256 -0
- package/dist/trinity/core/Tr2Denoiser.js.map +1 -0
- package/dist/trinity/core/Tr2GpuResourcePool/GpuResourceHandle.js +115 -0
- package/dist/trinity/core/Tr2GpuResourcePool/GpuResourceHandle.js.map +1 -0
- package/dist/trinity/core/Tr2GpuResourcePool/TextureSize2D.js +79 -0
- package/dist/trinity/core/Tr2GpuResourcePool/TextureSize2D.js.map +1 -0
- package/dist/trinity/core/{Tr2GpuResourcePool.js → Tr2GpuResourcePool/Tr2GpuResourcePool.js} +63 -151
- package/dist/trinity/core/Tr2GpuResourcePool/Tr2GpuResourcePool.js.map +1 -0
- package/dist/trinity/core/{Tr2QuadRenderer.js → Tr2QuadRenderer/Tr2QuadRenderer.js} +8 -30
- package/dist/trinity/core/Tr2QuadRenderer/Tr2QuadRenderer.js.map +1 -0
- package/dist/trinity/core/Tr2QuadRenderer/Tr2QuadRendererEffectRecord.js +38 -0
- package/dist/trinity/core/Tr2QuadRenderer/Tr2QuadRendererEffectRecord.js.map +1 -0
- package/dist/trinity/core/Tr2RenderUtils.js +20 -3
- package/dist/trinity/core/Tr2RenderUtils.js.map +1 -1
- package/dist/trinity/core/Tr2Renderer.js +146 -1
- package/dist/trinity/core/Tr2Renderer.js.map +1 -1
- package/dist/trinity/core/Tr2ShadowMap.js +135 -14
- package/dist/trinity/core/Tr2ShadowMap.js.map +1 -1
- package/dist/trinity/core/{Tr2TextureArray.js → Tr2TextureArray/Tr2TextureArray.js} +3 -58
- package/dist/trinity/core/Tr2TextureArray/Tr2TextureArray.js.map +1 -0
- package/dist/trinity/core/Tr2TextureArray/Tr2TextureArrayElement.js +61 -0
- package/dist/trinity/core/Tr2TextureArray/Tr2TextureArrayElement.js.map +1 -0
- package/dist/trinity/core/batch/TriRenderBatch/DefaultKeyGenerator.js +26 -0
- package/dist/trinity/core/batch/TriRenderBatch/DefaultKeyGenerator.js.map +1 -0
- package/dist/trinity/core/batch/TriRenderBatch/EffectKeyGenerator.js +29 -0
- package/dist/trinity/core/batch/TriRenderBatch/EffectKeyGenerator.js.map +1 -0
- package/dist/trinity/core/batch/{ITriRenderBatchAccumulator.js → TriRenderBatch/ITriRenderBatchAccumulator.js} +30 -30
- package/dist/trinity/core/batch/TriRenderBatch/ITriRenderBatchAccumulator.js.map +1 -0
- package/dist/trinity/core/batch/{Tr2RenderBatch.js → TriRenderBatch/Tr2RenderBatch.js} +81 -154
- package/dist/trinity/core/batch/TriRenderBatch/Tr2RenderBatch.js.map +1 -0
- package/dist/trinity/core/batch/{TriRenderBatchAccumulator.js → TriRenderBatch/TriRenderBatchAccumulator.js} +7 -38
- package/dist/trinity/core/batch/TriRenderBatch/TriRenderBatchAccumulator.js.map +1 -0
- package/dist/trinity/core/batch/TriRenderBatch/TriRenderBatchAreaBlock.js +61 -0
- package/dist/trinity/core/batch/TriRenderBatch/TriRenderBatchAreaBlock.js.map +1 -0
- package/dist/trinity/core/batch/TriRenderBatch/TriRenderBatchAreaBlocksWithSharedMaterial.js +40 -0
- package/dist/trinity/core/batch/TriRenderBatch/TriRenderBatchAreaBlocksWithSharedMaterial.js.map +1 -0
- package/dist/trinity/core/batch/TriRenderBatchMap.js +6 -1
- package/dist/trinity/core/batch/TriRenderBatchMap.js.map +1 -1
- package/dist/trinity/core/context/Tr2RenderContext.js +75 -57
- package/dist/trinity/core/context/Tr2RenderContext.js.map +1 -1
- package/dist/trinity/core/context/Tr2VisibilityResults/Tr2VisibilityEvent.js +67 -0
- package/dist/trinity/core/context/Tr2VisibilityResults/Tr2VisibilityEvent.js.map +1 -0
- package/dist/trinity/core/context/Tr2VisibilityResults/Tr2VisibilityResults.js +50 -0
- package/dist/trinity/core/context/Tr2VisibilityResults/Tr2VisibilityResults.js.map +1 -0
- package/dist/trinity/core/device/Tr2DepthStencil.js +186 -13
- package/dist/trinity/core/device/Tr2DepthStencil.js.map +1 -1
- package/dist/trinity/core/device/{Tr2RingBuffer.js → Tr2RingBuffer/Tr2RingBuffer.js} +27 -79
- package/dist/trinity/core/device/Tr2RingBuffer/Tr2RingBuffer.js.map +1 -0
- package/dist/trinity/core/device/Tr2RingBuffer/Tr2RingBufferOffsets.js +114 -0
- package/dist/trinity/core/device/Tr2RingBuffer/Tr2RingBufferOffsets.js.map +1 -0
- package/dist/trinity/core/device/{Tr2SuballocatedBuffer.js → Tr2SuballocatedBuffer/Tr2SuballocatedBuffer.js} +5 -59
- package/dist/trinity/core/device/Tr2SuballocatedBuffer/Tr2SuballocatedBuffer.js.map +1 -0
- package/dist/trinity/core/device/Tr2SuballocatedBuffer/Tr2SuballocatedBufferAllocation.js +80 -0
- package/dist/trinity/core/device/Tr2SuballocatedBuffer/Tr2SuballocatedBufferAllocation.js.map +1 -0
- package/dist/trinity/core/index.js +42 -15
- package/dist/trinity/core/index.js.map +1 -1
- package/dist/trinity/core/lighting/Tr2LightManager.js +6 -1
- package/dist/trinity/core/lighting/Tr2LightManager.js.map +1 -1
- package/dist/trinity/core/mesh/{ITr2ImpostorSource.js → ITr2ImpostorSource/ITr2ImpostorSource.js} +6 -28
- package/dist/trinity/core/mesh/ITr2ImpostorSource/ITr2ImpostorSource.js.map +1 -0
- package/dist/trinity/core/mesh/ITr2ImpostorSource/ITr2ImpostorSourceImpostorHash.js +32 -0
- package/dist/trinity/core/mesh/ITr2ImpostorSource/ITr2ImpostorSourceImpostorHash.js.map +1 -0
- package/dist/trinity/core/mesh/{ITr2InstanceData.js → ITr2InstanceData/ITr2InstanceData.js} +5 -29
- package/dist/trinity/core/mesh/ITr2InstanceData/ITr2InstanceData.js.map +1 -0
- package/dist/trinity/core/mesh/ITr2InstanceData/ITr2InstanceDataInstanceData.js +33 -0
- package/dist/trinity/core/mesh/ITr2InstanceData/ITr2InstanceDataInstanceData.js.map +1 -0
- package/dist/trinity/core/mesh/Tr2DirectInstanceData.js +2 -1
- package/dist/trinity/core/mesh/Tr2DirectInstanceData.js.map +1 -1
- package/dist/trinity/core/mesh/Tr2MeshBase.js +7 -1
- package/dist/trinity/core/mesh/Tr2MeshBase.js.map +1 -1
- package/dist/trinity/core/mesh/Tr2RuntimeInstanceData.js +2 -1
- package/dist/trinity/core/mesh/Tr2RuntimeInstanceData.js.map +1 -1
- package/dist/trinity/core/mesh/TriGeometryResAllocations.js +6 -2
- package/dist/trinity/core/mesh/TriGeometryResAllocations.js.map +1 -1
- package/dist/trinity/core/rawData/CjsConstantLayout.js +196 -0
- package/dist/trinity/core/rawData/CjsConstantLayout.js.map +1 -0
- package/dist/trinity/core/rawData/CjsPerFrameLayouts.js +8 -3
- package/dist/trinity/core/rawData/CjsPerFrameLayouts.js.map +1 -1
- package/dist/trinity/core/rawData/CjsPerObjectLayouts.js +40 -732
- package/dist/trinity/core/rawData/CjsPerObjectLayouts.js.map +1 -1
- package/dist/trinity/core/rawData/layouts/CjsEveBasicLayout.js +34 -0
- package/dist/trinity/core/rawData/layouts/CjsEveBasicLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveBoosterSetLayout.js +69 -0
- package/dist/trinity/core/rawData/layouts/CjsEveBoosterSetLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveChildBoosterSetLayout.js +59 -0
- package/dist/trinity/core/rawData/layouts/CjsEveChildBoosterSetLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveChildBulletStormLayout.js +37 -0
- package/dist/trinity/core/rawData/layouts/CjsEveChildBulletStormLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveChildSpherePinLayout.js +44 -0
- package/dist/trinity/core/rawData/layouts/CjsEveChildSpherePinLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveLensflareLayout.js +31 -0
- package/dist/trinity/core/rawData/layouts/CjsEveLensflareLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveMissileWarheadLayout.js +29 -0
- package/dist/trinity/core/rawData/layouts/CjsEveMissileWarheadLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEvePerObjectLayout.js +39 -0
- package/dist/trinity/core/rawData/layouts/CjsEvePerObjectLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSceneStaticParticlesLayout.js +30 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSceneStaticParticlesLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpaceObjectDecalLayout.js +78 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpaceObjectDecalLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpaceObjectLayout.js +169 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpaceObjectLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpacePerObjectLayout.js +107 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpacePerObjectLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpherePinLayout.js +44 -0
- package/dist/trinity/core/rawData/layouts/CjsEveSpherePinLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveStretch2Layout.js +34 -0
- package/dist/trinity/core/rawData/layouts/CjsEveStretch2Layout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsEveTurretSetLayout.js +82 -0
- package/dist/trinity/core/rawData/layouts/CjsEveTurretSetLayout.js.map +1 -0
- package/dist/trinity/core/rawData/layouts/CjsTr2PerObjectLayout.js +42 -0
- package/dist/trinity/core/rawData/layouts/CjsTr2PerObjectLayout.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveBasicPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveBasicPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveBoosterSetPerObjectData.js +59 -0
- package/dist/trinity/core/rawData/perObjectData/EveBoosterSetPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveChildBoosterSetPerObjectData.js +59 -0
- package/dist/trinity/core/rawData/perObjectData/EveChildBoosterSetPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveChildBulletStormPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveChildBulletStormPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveChildSpherePinPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveChildSpherePinPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveDecalPerObjectData.js +59 -0
- package/dist/trinity/core/rawData/perObjectData/EveDecalPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveLensflarePerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveLensflarePerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveMissileWarheadPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveMissileWarheadPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveSceneStaticParticlesPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveSceneStaticParticlesPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveSpherePinPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/EveSpherePinPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/EveTurretSetPerObjectData.js +59 -0
- package/dist/trinity/core/rawData/perObjectData/EveTurretSetPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/StretchPerObjectData.js +55 -0
- package/dist/trinity/core/rawData/perObjectData/StretchPerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/{Tr2PerObjectData.js → perObjectData/Tr2PerObjectData.js} +110 -62
- package/dist/trinity/core/rawData/perObjectData/Tr2PerObjectData.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/Tr2PerObjectDataPSBuffer.js +104 -0
- package/dist/trinity/core/rawData/perObjectData/Tr2PerObjectDataPSBuffer.js.map +1 -0
- package/dist/trinity/core/rawData/perObjectData/Tr2PerObjectDataStandard.js +87 -0
- package/dist/trinity/core/rawData/perObjectData/Tr2PerObjectDataStandard.js.map +1 -0
- package/dist/trinity/core/variable/TriVariable.js +83 -83
- package/dist/trinity/core/variable/TriVariable.js.map +1 -1
- package/dist/trinity/core/vertex/{Tr2VertexDefinition.js → Tr2VertexDefinition/Tr2VertexDefinition.js} +4 -20
- package/dist/trinity/core/vertex/Tr2VertexDefinition/Tr2VertexDefinition.js.map +1 -0
- package/dist/trinity/core/vertex/Tr2VertexDefinition/Tr2VertexDefinitionItem.js +29 -0
- package/dist/trinity/core/vertex/Tr2VertexDefinition/Tr2VertexDefinitionItem.js.map +1 -0
- package/dist/trinity/core/volumetrics/Tr2VolumetricsRenderer.js +116 -36
- package/dist/trinity/core/volumetrics/Tr2VolumetricsRenderer.js.map +1 -1
- package/dist/trinity/curves/curve/Tr2CurveRandomAxisRotation.js +50 -92
- package/dist/trinity/curves/curve/Tr2CurveRandomAxisRotation.js.map +1 -1
- package/dist/trinity/eve/EveModularObjectModifier.js +9 -5
- package/dist/trinity/eve/EveModularObjectModifier.js.map +1 -1
- package/dist/trinity/eve/IEveInheritPropertiesOwner.js +2 -1
- package/dist/trinity/eve/IEveInheritPropertiesOwner.js.map +1 -1
- package/dist/trinity/eve/IEveSpaceObject2.js +2 -1
- package/dist/trinity/eve/IEveSpaceObject2.js.map +1 -1
- package/dist/trinity/eve/IEveTransform.js +2 -1
- package/dist/trinity/eve/IEveTransform.js.map +1 -1
- package/dist/trinity/eve/attachment/banner/EveBannerSet.js +2 -2
- package/dist/trinity/eve/attachment/banner/EveBannerSet.js.map +1 -1
- package/dist/trinity/eve/attachment/booster/EveBoosterSet2.js +109 -133
- package/dist/trinity/eve/attachment/booster/EveBoosterSet2.js.map +1 -1
- package/dist/trinity/eve/attachment/booster/EveBoosterSet2Item.js +40 -0
- package/dist/trinity/eve/attachment/booster/EveBoosterSet2Item.js.map +1 -0
- package/dist/trinity/eve/attachment/booster/EveBoosterSet2Renderable.js +1 -1
- package/dist/trinity/eve/attachment/booster/EveBoosterSet2Renderable.js.map +1 -1
- package/dist/trinity/eve/attachment/decal/DecalMeshCache.js +2 -14
- package/dist/trinity/eve/attachment/decal/DecalMeshCache.js.map +1 -1
- package/dist/trinity/eve/attachment/decal/DecalMeshCacheMeshBuffers.js +18 -0
- package/dist/trinity/eve/attachment/decal/DecalMeshCacheMeshBuffers.js.map +1 -0
- package/dist/trinity/eve/attachment/decal/EveSpaceObjectDecal.js +1 -1
- package/dist/trinity/eve/attachment/decal/EveSpaceObjectDecal.js.map +1 -1
- package/dist/trinity/eve/attachment/haze/EveHazeSet.js +1 -1
- package/dist/trinity/eve/attachment/haze/EveHazeSet.js.map +1 -1
- package/dist/trinity/eve/attachment/plane/EvePlaneSet.js +1 -1
- package/dist/trinity/eve/attachment/plane/EvePlaneSet.js.map +1 -1
- package/dist/trinity/eve/attachment/spotlight/EveSpotlightSet.js +2 -2
- package/dist/trinity/eve/attachment/spotlight/EveSpotlightSet.js.map +1 -1
- package/dist/trinity/eve/attachment/sprite/EveSpriteLineSet.js +1 -1
- package/dist/trinity/eve/attachment/sprite/EveSpriteLineSet.js.map +1 -1
- package/dist/trinity/eve/attachment/sprite/EveSpriteSet.js +4 -2
- package/dist/trinity/eve/attachment/sprite/EveSpriteSet.js.map +1 -1
- package/dist/trinity/eve/attachment/turrets/EveTurretSet.js +143 -139
- package/dist/trinity/eve/attachment/turrets/EveTurretSet.js.map +1 -1
- package/dist/trinity/eve/camera/EveCamera.js +1 -1
- package/dist/trinity/eve/camera/EveCamera.js.map +1 -1
- package/dist/trinity/eve/child/EveChildBoosterSet.js +12 -1
- package/dist/trinity/eve/child/EveChildBoosterSet.js.map +1 -1
- package/dist/trinity/eve/child/EveChildCloud2.js +178 -151
- package/dist/trinity/eve/child/EveChildCloud2.js.map +1 -1
- package/dist/trinity/eve/child/EveChildContainer.js +141 -141
- package/dist/trinity/eve/child/EveChildContainer.js.map +1 -1
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMesh.js +87 -0
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMesh.js.map +1 -0
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshArea.js +46 -0
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshArea.js.map +1 -0
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshInstance.js +35 -0
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshInstance.js.map +1 -0
- package/dist/trinity/eve/child/{EveChildInstancedMeshes.js → EveChildInstancedMeshes/EveChildInstancedMeshes.js} +42 -163
- package/dist/trinity/eve/child/EveChildInstancedMeshes/EveChildInstancedMeshes.js.map +1 -0
- package/dist/trinity/eve/child/EveChildMesh.js +218 -218
- package/dist/trinity/eve/child/EveChildMesh.js.map +1 -1
- package/dist/trinity/eve/child/EveChildPartData/EveChildPartData.js +53 -0
- package/dist/trinity/eve/child/EveChildPartData/EveChildPartData.js.map +1 -0
- package/dist/trinity/eve/child/{EveChildPartData.js → EveChildPartData/EveChildPartDataPartData.js} +9 -45
- package/dist/trinity/eve/child/EveChildPartData/EveChildPartDataPartData.js.map +1 -0
- package/dist/trinity/eve/child/EveChildParticleSystem.js +30 -29
- package/dist/trinity/eve/child/EveChildParticleSystem.js.map +1 -1
- package/dist/trinity/eve/child/EveChildTransform.js +5 -0
- package/dist/trinity/eve/child/EveChildTransform.js.map +1 -1
- package/dist/trinity/eve/child/EveChildTurret.js +7 -0
- package/dist/trinity/eve/child/EveChildTurret.js.map +1 -1
- package/dist/trinity/eve/index.js +10 -4
- package/dist/trinity/eve/index.js.map +1 -1
- package/dist/trinity/eve/lights/Tr2Light.js +5 -0
- package/dist/trinity/eve/lights/Tr2Light.js.map +1 -1
- package/dist/trinity/eve/overlays/overlayBatches.js +6 -1
- package/dist/trinity/eve/overlays/overlayBatches.js.map +1 -1
- package/dist/trinity/eve/particles/static/EveSceneStaticParticles.js +4 -4
- package/dist/trinity/eve/particles/static/EveSceneStaticParticles.js.map +1 -1
- package/dist/trinity/eve/renderable/stretch/EveStretch2.js +76 -71
- package/dist/trinity/eve/renderable/stretch/EveStretch2.js.map +1 -1
- package/dist/trinity/eve/renderable/stretch/EveStretch3.js +1 -1
- package/dist/trinity/eve/renderable/stretch/EveStretch3.js.map +1 -1
- package/dist/trinity/eve/spaceObject/EveShip2.js +3 -3
- package/dist/trinity/eve/spaceObject/EveShip2.js.map +1 -1
- package/dist/trinity/eve/spaceObject/EveSpaceObject2.js +408 -407
- package/dist/trinity/eve/spaceObject/EveSpaceObject2.js.map +1 -1
- package/dist/trinity/eve/ui/EveTacticalOverlay.js +1 -1
- package/dist/trinity/eve/ui/EveTacticalOverlay.js.map +1 -1
- package/dist/trinity/eve/ui/lines/EveCurveLineSet.js +9 -9
- package/dist/trinity/eve/ui/lines/EveCurveLineSet.js.map +1 -1
- package/dist/trinity/eve/ui/lines/EveLineSet.js +27 -25
- package/dist/trinity/eve/ui/lines/EveLineSet.js.map +1 -1
- package/dist/trinity/eve/ui/tacticalOverlay/EveTacticalTrails.js +3 -2
- package/dist/trinity/eve/ui/tacticalOverlay/EveTacticalTrails.js.map +1 -1
- package/dist/trinity/generated/index.js +0 -1
- package/dist/trinity/generated/index.js.map +1 -1
- package/dist/trinity/generated/trinityCore/index.js +0 -1
- package/dist/trinity/generated/trinityCore/index.js.map +1 -1
- package/dist/trinity/index.js +59 -23
- package/dist/trinity/index.js.map +1 -1
- package/dist/trinity/particle/{ITr2GenericEmitter.js → ITr2GenericEmitter/ITr2GenericEmitter.js} +4 -32
- package/dist/trinity/particle/ITr2GenericEmitter/ITr2GenericEmitter.js.map +1 -0
- package/dist/trinity/particle/ITr2GenericEmitter/ITr2GenericEmitterUpdateArguments.js +36 -0
- package/dist/trinity/particle/ITr2GenericEmitter/ITr2GenericEmitterUpdateArguments.js.map +1 -0
- package/dist/trinity/particle/Tr2ParticleSystem.js +4 -2
- package/dist/trinity/particle/Tr2ParticleSystem.js.map +1 -1
- package/dist/trinity/particle/element/Tr2ParticleElementData.js +15 -4
- package/dist/trinity/particle/element/Tr2ParticleElementData.js.map +1 -1
- package/dist/trinity/particle/emitter/Tr2DynamicEmitter.js +21 -20
- package/dist/trinity/particle/emitter/Tr2DynamicEmitter.js.map +1 -1
- package/dist/trinity/particle/emitter/Tr2GpuSharedEmitter.js +23 -22
- package/dist/trinity/particle/emitter/Tr2GpuSharedEmitter.js.map +1 -1
- package/dist/trinity/particle/emitter/Tr2StaticEmitter.js +14 -13
- package/dist/trinity/particle/emitter/Tr2StaticEmitter.js.map +1 -1
- package/dist/trinity/particle/index.js +2 -1
- package/dist/trinity/particle/index.js.map +1 -1
- package/dist/trinity/renderJob/step/TriStepPushRenderTarget.js +7 -1
- package/dist/trinity/renderJob/step/TriStepPushRenderTarget.js.map +1 -1
- package/dist/trinity/shader/Tr2Effect.js +131 -58
- package/dist/trinity/shader/Tr2Effect.js.map +1 -1
- package/dist/trinity/shader/Tr2EffectStateManager.js +17 -5
- package/dist/trinity/shader/Tr2EffectStateManager.js.map +1 -1
- package/dist/trinity/shader/Tr2Material.js +21 -4
- package/dist/trinity/shader/Tr2Material.js.map +1 -1
- package/dist/trinity/shader/material/Tr2EffectPassParameters.js +4 -1
- package/dist/trinity/shader/material/Tr2EffectPassParameters.js.map +1 -1
- package/dist/trinity/shader/parameter/Tr2GeometryBufferParameter.js +2 -2
- package/dist/trinity/shader/parameter/Tr2GeometryBufferParameter.js.map +1 -1
- package/dist/trinityal/Tr2BufferAL/Tr2BufferDescriptionAL.js +79 -0
- package/dist/trinityal/Tr2BufferAL/Tr2BufferDescriptionAL.js.map +1 -0
- package/dist/trinityal/{Tr2DeviceResourceAL.js → Tr2DeviceResourceAL/Tr2BaseDeviceResourceAL.js} +77 -79
- package/dist/trinityal/Tr2DeviceResourceAL/Tr2BaseDeviceResourceAL.js.map +1 -0
- package/dist/trinityal/Tr2DeviceResourceAL/Tr2DeviceResourceAL.js +24 -0
- package/dist/trinityal/Tr2DeviceResourceAL/Tr2DeviceResourceAL.js.map +1 -0
- package/dist/trinityal/Tr2DrawUPHelper.js +2 -1
- package/dist/trinityal/Tr2DrawUPHelper.js.map +1 -1
- package/dist/trinityal/Tr2HalHelperStructures/Tr2MsaaDesc.js +45 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2MsaaDesc.js.map +1 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2SamplerDescription.js +154 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2SamplerDescription.js.map +1 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2SubresourceData.js +48 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2SubresourceData.js.map +1 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2TextureCoordBox.js +75 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2TextureCoordBox.js.map +1 -0
- package/dist/trinityal/{Tr2HalHelperStructures.js → Tr2HalHelperStructures/Tr2TextureSubresource.js} +11 -115
- package/dist/trinityal/Tr2HalHelperStructures/Tr2TextureSubresource.js.map +1 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2Viewport.js +51 -0
- package/dist/trinityal/Tr2HalHelperStructures/Tr2Viewport.js.map +1 -0
- package/dist/trinityal/{Tr2RenderPassAL.js → Tr2RenderPassAL/Tr2ColorAttachment.js} +5 -28
- package/dist/trinityal/Tr2RenderPassAL/Tr2ColorAttachment.js.map +1 -0
- package/dist/trinityal/Tr2RenderPassAL/Tr2DepthAttachment.js +38 -0
- package/dist/trinityal/Tr2RenderPassAL/Tr2DepthAttachment.js.map +1 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2RegisterMapAL.js +80 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2RegisterMapAL.js.map +1 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetAL.js +76 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetAL.js.map +1 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetALStub.js +96 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetALStub.js.map +1 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetDescriptionAL.js +196 -0
- package/dist/trinityal/Tr2ResourceSetAL/Tr2ResourceSetDescriptionAL.js.map +1 -0
- package/dist/trinityal/index.js +22 -9
- package/dist/trinityal/index.js.map +1 -1
- package/dist/trinityal/stub/Tr2BufferALStub.js +86 -141
- package/dist/trinityal/stub/Tr2BufferALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2CapsALStub.js +17 -0
- package/dist/trinityal/stub/Tr2CapsALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2ConstantBufferALStub.js +57 -41
- package/dist/trinityal/stub/Tr2ConstantBufferALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2FenceALStub.js +18 -2
- package/dist/trinityal/stub/Tr2FenceALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2GpuTimerALStub.js +97 -0
- package/dist/trinityal/stub/Tr2GpuTimerALStub.js.map +1 -0
- package/dist/trinityal/stub/Tr2OcclusionQueryALStub.js +124 -0
- package/dist/trinityal/stub/Tr2OcclusionQueryALStub.js.map +1 -0
- package/dist/trinityal/stub/Tr2PipelineStatsQueryALStub/Tr2PipelineStatsQueryALStub.js +146 -0
- package/dist/trinityal/stub/Tr2PipelineStatsQueryALStub/Tr2PipelineStatsQueryALStub.js.map +1 -0
- package/dist/trinityal/stub/Tr2RenderContextALStub/Tr2BindlessResourcesAL.js +28 -0
- package/dist/trinityal/stub/Tr2RenderContextALStub/Tr2BindlessResourcesAL.js.map +1 -0
- package/dist/trinityal/stub/{Tr2RenderContextALStub.js → Tr2RenderContextALStub/Tr2RenderContextALStub.js} +70 -75
- package/dist/trinityal/stub/Tr2RenderContextALStub/Tr2RenderContextALStub.js.map +1 -0
- package/dist/trinityal/stub/Tr2SamplerStateALStub.js +47 -31
- package/dist/trinityal/stub/Tr2SamplerStateALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2ShaderALStub.js +61 -45
- package/dist/trinityal/stub/Tr2ShaderALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2ShaderProgramALStub.js +51 -33
- package/dist/trinityal/stub/Tr2ShaderProgramALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2SwapChainALStub.js +61 -45
- package/dist/trinityal/stub/Tr2SwapChainALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2TextureALStub.js +188 -171
- package/dist/trinityal/stub/Tr2TextureALStub.js.map +1 -1
- package/dist/trinityal/stub/Tr2VertexLayoutALStub.js +43 -27
- package/dist/trinityal/stub/Tr2VertexLayoutALStub.js.map +1 -1
- package/dist/trinityal/stub/{Tr2VideoAdapterInfoALStub.js → Tr2VideoAdapterInfoStub.js} +16 -1
- package/dist/trinityal/stub/Tr2VideoAdapterInfoStub.js.map +1 -0
- package/dist/trinityal/stub/index.js +8 -4
- package/dist/trinityal/stub/index.js.map +1 -1
- package/dist/trinityal/vertexLayoutMatch.js +2 -2
- package/dist/trinityal/vertexLayoutMatch.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuBufferAL.js +105 -90
- package/dist/trinityal/webgpu/CjsWebgpuBufferAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuCapsAL.js +17 -0
- package/dist/trinityal/webgpu/CjsWebgpuCapsAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuConstantBufferAL.js +15 -0
- package/dist/trinityal/webgpu/CjsWebgpuConstantBufferAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuDevice.js +2 -2
- package/dist/trinityal/webgpu/CjsWebgpuDevice.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuRenderContextAL.js +900 -938
- package/dist/trinityal/webgpu/CjsWebgpuRenderContextAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuResourceSetAL.js +56 -60
- package/dist/trinityal/webgpu/CjsWebgpuResourceSetAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuSamplerStateAL.js +16 -1
- package/dist/trinityal/webgpu/CjsWebgpuSamplerStateAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuShaderAL.js +100 -379
- package/dist/trinityal/webgpu/CjsWebgpuShaderAL.js.map +1 -1
- package/dist/trinityal/webgpu/CjsWebgpuShaderProgramAL.js +330 -0
- package/dist/trinityal/webgpu/CjsWebgpuShaderProgramAL.js.map +1 -0
- package/dist/trinityal/webgpu/CjsWebgpuTextureAL.js +15 -0
- package/dist/trinityal/webgpu/CjsWebgpuTextureAL.js.map +1 -1
- package/dist/trinityal/webgpu/core/{constantArena.js → CjsWebgpuConstantArena.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuConstantArena.js.map +1 -0
- package/dist/trinityal/webgpu/core/{batchGroups.js → CjsWebgpuEncodeState.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuEncodeState.js.map +1 -0
- package/dist/trinityal/webgpu/core/{perFrameSource.js → CjsWebgpuPerFrameSource.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuPerFrameSource.js.map +1 -0
- package/dist/trinityal/webgpu/core/{pipelineCache.js → CjsWebgpuPipelineCache.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuPipelineCache.js.map +1 -0
- package/dist/trinityal/webgpu/core/{psoDescription.js → CjsWebgpuPsoDescription.js} +2 -2
- package/dist/trinityal/webgpu/core/CjsWebgpuPsoDescription.js.map +1 -0
- package/dist/trinityal/webgpu/core/{renderTarget.js → CjsWebgpuRenderTarget.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuRenderTarget.js.map +1 -0
- package/dist/trinityal/webgpu/core/{samplerSource.js → CjsWebgpuSamplerSource.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuSamplerSource.js.map +1 -0
- package/dist/trinityal/webgpu/core/{textureSource.js → CjsWebgpuTextureSource.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuTextureSource.js.map +1 -0
- package/dist/trinityal/webgpu/core/{trinityBatchDispatcher.js → CjsWebgpuTrinityBatchDispatcher.js} +4 -4
- package/dist/trinityal/webgpu/core/CjsWebgpuTrinityBatchDispatcher.js.map +1 -0
- package/dist/trinityal/webgpu/core/{trinityBatchResolver.js → CjsWebgpuTrinityBatchResolver.js} +81 -81
- package/dist/trinityal/webgpu/core/CjsWebgpuTrinityBatchResolver.js.map +1 -0
- package/dist/trinityal/webgpu/core/{trinityPassEncoder.js → CjsWebgpuTrinityPassEncoder.js} +2 -2
- package/dist/trinityal/webgpu/core/CjsWebgpuTrinityPassEncoder.js.map +1 -0
- package/dist/trinityal/webgpu/core/{workQueue.js → CjsWebgpuWorkQueue.js} +1 -1
- package/dist/trinityal/webgpu/core/CjsWebgpuWorkQueue.js.map +1 -0
- package/dist/trinityal/webgpu/internal.js +12 -11
- package/dist/trinityal/webgpu/internal.js.map +1 -1
- package/docs/audio/reference/classes/trinity.md +44 -34
- package/docs/character/architecture.md +276 -0
- package/docs/character/reference/character-appearance-plans.md +30 -66
- package/docs/character/reference/prepared-libraries.md +14 -30
- package/docs/global/reference/api.md +2 -1
- package/docs/global/reference/classes/README.md +53 -71
- package/docs/global/reference/classes/dropped.md +16 -0
- package/docs/resource/README.md +19 -15
- package/docs/resource/architecture.md +9 -2
- package/docs/resource/concepts/format-capabilities.md +124 -80
- package/docs/resource/concepts/shared-format-helpers.md +94 -0
- package/docs/resource/formats/README.md +230 -224
- package/docs/resource/formats/bitknit2.md +221 -0
- package/docs/resource/formats/carbon-effect-container.md +184 -269
- package/docs/resource/formats/gr2.md +6 -1
- package/docs/resource/formats/schemabound.md +28 -48
- package/docs/resource/formats/static.md +70 -97
- package/docs/resource/formats/webgl/carbon-constant-layouts.md +8 -8
- package/docs/resource/formats/webgl/decl-io.md +165 -256
- package/docs/resource/formats/webgl/memory-structured.md +64 -142
- package/docs/resource/formats/webgl/texture-sample.md +109 -138
- package/docs/resource/formats/webgpu/formats/carbon-webgpu.md +38 -69
- package/docs/resource/formats/webgpu/guides/effect-packaging.md +54 -116
- package/docs/resource/formats/webgpu/reference/api.md +64 -67
- package/docs/resource/formats/webgpu/reference/wgsl-compatibility.md +104 -260
- package/docs/resource/reference/classes/core.md +256 -236
- package/docs/resource/reference/classes/formats.md +1668 -1672
- package/docs/resource/reference/workers.md +4 -2
- package/docs/sof/reference/classes/core.md +1 -1
- package/docs/sof/reference/classes/faction.md +2 -2
- package/docs/sof/reference/classes/generic.md +4 -4
- package/docs/sof/reference/classes/pattern.md +1 -1
- package/docs/sof/reference/classes/shared.md +10 -10
- package/docs/trinity/architecture.md +55 -44
- package/docs/trinity/concepts/generated-class-lifecycle.md +10 -15
- package/docs/trinity/reference/classes/curves-and-utilities.md +496 -506
- package/docs/trinity/reference/classes/dropped.md +0 -189
- package/docs/trinity/reference/classes/eve-runtime.md +8 -8
- package/docs/trinity/reference/classes/generated.md +0 -10
- package/docs/trinity/reference/classes/particle.md +2 -2
- package/docs/trinity/reference/classes/trinity-core.md +1554 -1256
- package/docs/trinity/reference/implementation-status.md +50 -75
- package/docs/trinity/reference/main-semantic-extraction.md +13 -17
- package/docs/trinityal/reference/classes/README.md +77 -27
- package/docs/trinityal/reference/classes/dropped.md +82 -0
- package/docs/trinityal/webgpu/README.md +3 -1
- package/docs/trinityal/webgpu/architecture.md +121 -228
- package/docs/trinityal/webgpu/reference/api.md +5 -5
- package/docs/trinityal/webgpu/reference/classes/README.md +13 -13
- package/format-notices/gr2/NOTICE +18 -12
- package/format-notices/gr2/THIRD-PARTY-NOTICES.md +5 -5
- package/package.json +4 -1
- package/dist/audio/trinity/audio/AudActionLog.js +0 -173
- package/dist/audio/trinity/audio/AudActionLog.js.map +0 -1
- package/dist/audio/trinity/audio/AudObstructionOcclusion.js.map +0 -1
- package/dist/global/contracts/CjsScriptCallback.js +0 -94
- package/dist/global/contracts/CjsScriptCallback.js.map +0 -1
- package/dist/trinity/controllers/ITr2Controller.js.map +0 -1
- package/dist/trinity/core/Tr2GpuResourcePool.js.map +0 -1
- package/dist/trinity/core/Tr2QuadRenderer.js.map +0 -1
- package/dist/trinity/core/Tr2TextureArray.js.map +0 -1
- package/dist/trinity/core/batch/ITriRenderBatchAccumulator.js.map +0 -1
- package/dist/trinity/core/batch/Tr2RenderBatch.js.map +0 -1
- package/dist/trinity/core/batch/TriRenderBatchAccumulator.js.map +0 -1
- package/dist/trinity/core/context/CjsShadowMapExecutor.js +0 -43
- package/dist/trinity/core/context/CjsShadowMapExecutor.js.map +0 -1
- package/dist/trinity/core/context/CjsVolumetricsExecutor.js +0 -64
- package/dist/trinity/core/context/CjsVolumetricsExecutor.js.map +0 -1
- package/dist/trinity/core/context/Tr2VisibilityResults.js +0 -109
- package/dist/trinity/core/context/Tr2VisibilityResults.js.map +0 -1
- package/dist/trinity/core/device/Tr2RingBuffer.js.map +0 -1
- package/dist/trinity/core/device/Tr2SuballocatedBuffer.js.map +0 -1
- package/dist/trinity/core/mesh/ITr2ImpostorSource.js.map +0 -1
- package/dist/trinity/core/mesh/ITr2InstanceData.js.map +0 -1
- package/dist/trinity/core/rawData/Tr2PerObjectData.js.map +0 -1
- package/dist/trinity/core/rawData/constantLayout.js +0 -175
- package/dist/trinity/core/rawData/constantLayout.js.map +0 -1
- package/dist/trinity/core/vertex/Tr2VertexDefinition.js.map +0 -1
- package/dist/trinity/eve/child/EveChildInstancedMeshes.js.map +0 -1
- package/dist/trinity/eve/child/EveChildPartData.js.map +0 -1
- package/dist/trinity/generated/trinityCore/Tr2Denoiser.js +0 -47
- package/dist/trinity/generated/trinityCore/Tr2Denoiser.js.map +0 -1
- package/dist/trinity/particle/ITr2GenericEmitter.js.map +0 -1
- package/dist/trinityal/Tr2DeviceResourceAL.js.map +0 -1
- package/dist/trinityal/Tr2HalHelperStructures.js.map +0 -1
- package/dist/trinityal/Tr2RenderPassAL.js.map +0 -1
- package/dist/trinityal/Tr2ResourceSetAL.js +0 -419
- package/dist/trinityal/Tr2ResourceSetAL.js.map +0 -1
- package/dist/trinityal/Tr2SamplerDescription.js +0 -72
- package/dist/trinityal/Tr2SamplerDescription.js.map +0 -1
- package/dist/trinityal/stub/Tr2QueryALStub.js +0 -326
- package/dist/trinityal/stub/Tr2QueryALStub.js.map +0 -1
- package/dist/trinityal/stub/Tr2RenderContextALStub.js.map +0 -1
- package/dist/trinityal/stub/Tr2VideoAdapterInfoALStub.js.map +0 -1
- package/dist/trinityal/webgpu/core/batchGroups.js.map +0 -1
- package/dist/trinityal/webgpu/core/constantArena.js.map +0 -1
- package/dist/trinityal/webgpu/core/perFrameSource.js.map +0 -1
- package/dist/trinityal/webgpu/core/pipelineCache.js.map +0 -1
- package/dist/trinityal/webgpu/core/psoDescription.js.map +0 -1
- package/dist/trinityal/webgpu/core/renderTarget.js.map +0 -1
- package/dist/trinityal/webgpu/core/samplerSource.js.map +0 -1
- package/dist/trinityal/webgpu/core/textureSource.js.map +0 -1
- package/dist/trinityal/webgpu/core/trinityBatchDispatcher.js.map +0 -1
- package/dist/trinityal/webgpu/core/trinityBatchResolver.js.map +0 -1
- package/dist/trinityal/webgpu/core/trinityPassEncoder.js.map +0 -1
- package/dist/trinityal/webgpu/core/workQueue.js.map +0 -1
|
@@ -10,13 +10,25 @@ import { CjsResource } from '../CjsResource.js';
|
|
|
10
10
|
import { Tr2RaycastGeometryRes } from './Tr2RaycastGeometryRes.js';
|
|
11
11
|
import { assertResourcePayloadObject, assertResourcePayloadArray, resourcePayloadError, resourceBoundaryError } from '../resourceBoundary.js';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
// Scratch edges for the picking cross product. Picking is synchronous and the
|
|
14
|
+
// result is consumed before the next hit, so one pair is enough.
|
|
15
|
+
//
|
|
16
|
+
// PLAIN arrays, not `vec3.create()`, because the destination is one: the hit
|
|
17
|
+
// record's `unnormalizedNormal` is `[ 0, 0, 0 ]`, so the products stay in double
|
|
18
|
+
// precision the whole way. Rounding the two edges to a math array's element type
|
|
19
|
+
// first perturbs the result on all but 2.5% of triangles, and by as much as 1.8%
|
|
20
|
+
// relatively where the cross product cancels - which is exactly the thin sliver
|
|
21
|
+
// a picking ray is most likely to graze.
|
|
22
|
+
const edgeAB = [0, 0, 0];
|
|
23
|
+
const edgeAC = [0, 0, 0];
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Resource record that owns geometry payload facts (meshes, optional
|
|
27
|
+
* skeletons and animations) and LOD-force metadata, while engine packages
|
|
28
|
+
* decide device buffers, vertex declarations, and draw-time state.
|
|
29
|
+
*
|
|
30
|
+
* Geometry inspection composes the generic math supplied by the runtime global layer
|
|
31
|
+
* with resource-specific payload traversal.
|
|
20
32
|
*/
|
|
21
33
|
class TriGeometryRes extends CjsResource {
|
|
22
34
|
forceLod = false;
|
|
@@ -36,12 +48,12 @@ class TriGeometryRes extends CjsResource {
|
|
|
36
48
|
});
|
|
37
49
|
}
|
|
38
50
|
|
|
39
|
-
/**
|
|
40
|
-
* Attach a plain geometry payload.
|
|
41
|
-
*
|
|
42
|
-
* @param {object|null} payload
|
|
43
|
-
* @param {object|null} options
|
|
44
|
-
* @returns {TriGeometryRes}
|
|
51
|
+
/**
|
|
52
|
+
* Attach a plain geometry payload.
|
|
53
|
+
*
|
|
54
|
+
* @param {object|null} payload
|
|
55
|
+
* @param {object|null} options
|
|
56
|
+
* @returns {TriGeometryRes}
|
|
45
57
|
*/
|
|
46
58
|
SetPayload(payload = null, options = null) {
|
|
47
59
|
if (this.#raycastUsers !== 0) {
|
|
@@ -65,38 +77,38 @@ class TriGeometryRes extends CjsResource {
|
|
|
65
77
|
return this;
|
|
66
78
|
}
|
|
67
79
|
|
|
68
|
-
/**
|
|
69
|
-
* Get mesh count from the CPU geometry payload.
|
|
70
|
-
*
|
|
71
|
-
* @returns {number}
|
|
80
|
+
/**
|
|
81
|
+
* Get mesh count from the CPU geometry payload.
|
|
82
|
+
*
|
|
83
|
+
* @returns {number}
|
|
72
84
|
*/
|
|
73
85
|
GetMeshCount() {
|
|
74
86
|
return this.GetPayload()?.meshes?.length || 0;
|
|
75
87
|
}
|
|
76
88
|
|
|
77
|
-
/**
|
|
78
|
-
* Get animation count from the CPU geometry payload.
|
|
79
|
-
*
|
|
80
|
-
* @returns {number}
|
|
89
|
+
/**
|
|
90
|
+
* Get animation count from the CPU geometry payload.
|
|
91
|
+
*
|
|
92
|
+
* @returns {number}
|
|
81
93
|
*/
|
|
82
94
|
GetAnimationCount() {
|
|
83
95
|
return this.GetPayload()?.animations?.length || 0;
|
|
84
96
|
}
|
|
85
97
|
|
|
86
|
-
/**
|
|
87
|
-
* Get skeleton count from the CPU geometry payload.
|
|
88
|
-
*
|
|
89
|
-
* @returns {number}
|
|
98
|
+
/**
|
|
99
|
+
* Get skeleton count from the CPU geometry payload.
|
|
100
|
+
*
|
|
101
|
+
* @returns {number}
|
|
90
102
|
*/
|
|
91
103
|
GetSkeletonCount() {
|
|
92
104
|
return this.GetPayload()?.skeletons?.length || 0;
|
|
93
105
|
}
|
|
94
106
|
|
|
95
|
-
/**
|
|
96
|
-
* Get one resource-owned skeleton from the CPU geometry payload.
|
|
97
|
-
*
|
|
98
|
-
* @param {number} skeletonIndex
|
|
99
|
-
* @returns {*}
|
|
107
|
+
/**
|
|
108
|
+
* Get one resource-owned skeleton from the CPU geometry payload.
|
|
109
|
+
*
|
|
110
|
+
* @param {number} skeletonIndex
|
|
111
|
+
* @returns {*}
|
|
100
112
|
*/
|
|
101
113
|
GetSkeletonData(skeletonIndex = 0) {
|
|
102
114
|
const index = Number(skeletonIndex);
|
|
@@ -106,11 +118,11 @@ class TriGeometryRes extends CjsResource {
|
|
|
106
118
|
return this.GetPayload()?.skeletons?.[index] || null;
|
|
107
119
|
}
|
|
108
120
|
|
|
109
|
-
/**
|
|
110
|
-
* Get mesh area count from a CPU geometry payload mesh.
|
|
111
|
-
*
|
|
112
|
-
* @param {number} meshIndex
|
|
113
|
-
* @returns {number}
|
|
121
|
+
/**
|
|
122
|
+
* Get mesh area count from a CPU geometry payload mesh.
|
|
123
|
+
*
|
|
124
|
+
* @param {number} meshIndex
|
|
125
|
+
* @returns {number}
|
|
114
126
|
*/
|
|
115
127
|
GetMeshAreaCount(meshIndex = 0) {
|
|
116
128
|
const mesh = this.GetPayload()?.meshes?.[meshIndex];
|
|
@@ -138,13 +150,13 @@ class TriGeometryRes extends CjsResource {
|
|
|
138
150
|
// comments explicitly. forceLod pins the index instead, clamped to the last
|
|
139
151
|
// LOD.
|
|
140
152
|
|
|
141
|
-
/**
|
|
142
|
-
* The LOD index this mesh should be drawn at for a screen size, or -1 when the
|
|
143
|
-
* mesh does not exist.
|
|
144
|
-
*
|
|
145
|
-
* @param {number} meshIndex
|
|
146
|
-
* @param {number} screenSize
|
|
147
|
-
* @returns {number}
|
|
153
|
+
/**
|
|
154
|
+
* The LOD index this mesh should be drawn at for a screen size, or -1 when the
|
|
155
|
+
* mesh does not exist.
|
|
156
|
+
*
|
|
157
|
+
* @param {number} meshIndex
|
|
158
|
+
* @param {number} screenSize
|
|
159
|
+
* @returns {number}
|
|
148
160
|
*/
|
|
149
161
|
GetLodIndexForScreenSize(meshIndex = 0, screenSize = Infinity) {
|
|
150
162
|
const mesh = this.GetPayload()?.meshes?.[meshIndex];
|
|
@@ -170,25 +182,25 @@ class TriGeometryRes extends CjsResource {
|
|
|
170
182
|
// mesh with an EMPTY lod list reads out of bounds there; this port returns
|
|
171
183
|
// null (docs/research/carbon-known-defects.md).
|
|
172
184
|
|
|
173
|
-
/**
|
|
174
|
-
* The LOD data this mesh should be drawn at for a screen size, or null when
|
|
175
|
-
* the mesh has no LODs.
|
|
176
|
-
*
|
|
177
|
-
* @param {number} meshIndex
|
|
178
|
-
* @param {number} screenSize
|
|
179
|
-
* @returns {object|null}
|
|
185
|
+
/**
|
|
186
|
+
* The LOD data this mesh should be drawn at for a screen size, or null when
|
|
187
|
+
* the mesh has no LODs.
|
|
188
|
+
*
|
|
189
|
+
* @param {number} meshIndex
|
|
190
|
+
* @param {number} screenSize
|
|
191
|
+
* @returns {object|null}
|
|
180
192
|
*/
|
|
181
193
|
GetMeshLod(meshIndex = 0, screenSize = Infinity) {
|
|
182
194
|
return this.GetMeshLodByIndex(meshIndex, this.GetLodIndexForScreenSize(meshIndex, screenSize));
|
|
183
195
|
}
|
|
184
196
|
|
|
185
|
-
/**
|
|
186
|
-
* The LOD data at an explicit index, or null when the mesh or index does not
|
|
187
|
-
* exist (Carbon TriGeometryRes.cpp:281-292).
|
|
188
|
-
*
|
|
189
|
-
* @param {number} meshIndex
|
|
190
|
-
* @param {number} lodIndex
|
|
191
|
-
* @returns {object|null}
|
|
197
|
+
/**
|
|
198
|
+
* The LOD data at an explicit index, or null when the mesh or index does not
|
|
199
|
+
* exist (Carbon TriGeometryRes.cpp:281-292).
|
|
200
|
+
*
|
|
201
|
+
* @param {number} meshIndex
|
|
202
|
+
* @param {number} lodIndex
|
|
203
|
+
* @returns {object|null}
|
|
192
204
|
*/
|
|
193
205
|
GetMeshLodByIndex(meshIndex = 0, lodIndex = 0) {
|
|
194
206
|
const mesh = this.GetPayload()?.meshes?.[meshIndex];
|
|
@@ -199,35 +211,35 @@ class TriGeometryRes extends CjsResource {
|
|
|
199
211
|
return lodIndex === 0 && mesh.areas ? mesh : null;
|
|
200
212
|
}
|
|
201
213
|
|
|
202
|
-
/**
|
|
203
|
-
* Get mesh name from a CPU geometry payload.
|
|
204
|
-
*
|
|
205
|
-
* @param {number} meshIndex
|
|
206
|
-
* @returns {string}
|
|
214
|
+
/**
|
|
215
|
+
* Get mesh name from a CPU geometry payload.
|
|
216
|
+
*
|
|
217
|
+
* @param {number} meshIndex
|
|
218
|
+
* @returns {string}
|
|
207
219
|
*/
|
|
208
220
|
GetMeshName(meshIndex = 0) {
|
|
209
221
|
return this.GetPayload()?.meshes?.[meshIndex]?.name || "";
|
|
210
222
|
}
|
|
211
223
|
|
|
212
|
-
/**
|
|
213
|
-
* Get mesh area name from a CPU geometry payload.
|
|
214
|
-
*
|
|
215
|
-
* @param {number} meshIndex
|
|
216
|
-
* @param {number} areaIndex
|
|
217
|
-
* @returns {string}
|
|
224
|
+
/**
|
|
225
|
+
* Get mesh area name from a CPU geometry payload.
|
|
226
|
+
*
|
|
227
|
+
* @param {number} meshIndex
|
|
228
|
+
* @param {number} areaIndex
|
|
229
|
+
* @returns {string}
|
|
218
230
|
*/
|
|
219
231
|
GetMeshAreaName(meshIndex = 0, areaIndex = 0) {
|
|
220
232
|
return this.GetPayload()?.meshes?.[meshIndex]?.areas?.[areaIndex]?.name || "";
|
|
221
233
|
}
|
|
222
234
|
|
|
223
|
-
/**
|
|
224
|
-
* Get area bounding box from geometry payload data.
|
|
225
|
-
*
|
|
226
|
-
* @param {number} meshIndex
|
|
227
|
-
* @param {number} areaIndex
|
|
228
|
-
* @param {ArrayLike<number>|null} outMin
|
|
229
|
-
* @param {ArrayLike<number>|null} outMax
|
|
230
|
-
* @returns {*|boolean}
|
|
235
|
+
/**
|
|
236
|
+
* Get area bounding box from geometry payload data.
|
|
237
|
+
*
|
|
238
|
+
* @param {number} meshIndex
|
|
239
|
+
* @param {number} areaIndex
|
|
240
|
+
* @param {ArrayLike<number>|null} outMin
|
|
241
|
+
* @param {ArrayLike<number>|null} outMax
|
|
242
|
+
* @returns {*|boolean}
|
|
231
243
|
*/
|
|
232
244
|
GetAreaBoundingBox(meshIndex = 0, areaIndex = 0, outMin = null, outMax = null) {
|
|
233
245
|
const area = TriGeometryRes.getMeshAreas(this.GetPayload()?.meshes?.[meshIndex])?.[areaIndex];
|
|
@@ -235,12 +247,12 @@ class TriGeometryRes extends CjsResource {
|
|
|
235
247
|
return TriGeometryRes.copyBounds(bounds, outMin, outMax);
|
|
236
248
|
}
|
|
237
249
|
|
|
238
|
-
/**
|
|
239
|
-
* Get mesh bounding box from geometry payload data.
|
|
240
|
-
* @param {number} meshIndex
|
|
241
|
-
* @param {ArrayLike<number>|null} outMin
|
|
242
|
-
* @param {ArrayLike<number>|null} outMax
|
|
243
|
-
* @returns {*|boolean}
|
|
250
|
+
/**
|
|
251
|
+
* Get mesh bounding box from geometry payload data.
|
|
252
|
+
* @param {number} meshIndex
|
|
253
|
+
* @param {ArrayLike<number>|null} outMin
|
|
254
|
+
* @param {ArrayLike<number>|null} outMax
|
|
255
|
+
* @returns {*|boolean}
|
|
244
256
|
*/
|
|
245
257
|
GetBoundingBox(meshIndex = 0, outMin = null, outMax = null) {
|
|
246
258
|
const payload = this.GetPayload();
|
|
@@ -248,11 +260,11 @@ class TriGeometryRes extends CjsResource {
|
|
|
248
260
|
return TriGeometryRes.copyBounds(bounds, outMin, outMax);
|
|
249
261
|
}
|
|
250
262
|
|
|
251
|
-
/**
|
|
252
|
-
* Get mesh bounding sphere from geometry payload data.
|
|
253
|
-
* @param {number} meshIndex
|
|
254
|
-
* @param {ArrayLike<number>|null} out
|
|
255
|
-
* @returns {*|boolean}
|
|
263
|
+
/**
|
|
264
|
+
* Get mesh bounding sphere from geometry payload data.
|
|
265
|
+
* @param {number} meshIndex
|
|
266
|
+
* @param {ArrayLike<number>|null} out
|
|
267
|
+
* @returns {*|boolean}
|
|
256
268
|
*/
|
|
257
269
|
GetBoundingSphere(meshIndex = 0, out = null) {
|
|
258
270
|
const payload = this.GetPayload();
|
|
@@ -263,15 +275,15 @@ class TriGeometryRes extends CjsResource {
|
|
|
263
275
|
return true;
|
|
264
276
|
}
|
|
265
277
|
|
|
266
|
-
/**
|
|
267
|
-
* Calculate a transformed bounding box from canonical CPU vertex data.
|
|
268
|
-
*
|
|
269
|
-
* Carbon stores the same matrix bytes as gl-matrix; transforming one point
|
|
270
|
-
* therefore uses the ordinary column-vector index layout.
|
|
271
|
-
*
|
|
272
|
-
* @param {number} meshIndex
|
|
273
|
-
* @param {ArrayLike<number>} transform
|
|
274
|
-
* @returns {{min: number[], max: number[]}|null}
|
|
278
|
+
/**
|
|
279
|
+
* Calculate a transformed bounding box from canonical CPU vertex data.
|
|
280
|
+
*
|
|
281
|
+
* Carbon stores the same matrix bytes as gl-matrix; transforming one point
|
|
282
|
+
* therefore uses the ordinary column-vector index layout.
|
|
283
|
+
*
|
|
284
|
+
* @param {number} meshIndex
|
|
285
|
+
* @param {ArrayLike<number>} transform
|
|
286
|
+
* @returns {{min: number[], max: number[]}|null}
|
|
275
287
|
*/
|
|
276
288
|
CalculateBoundingBoxFromTransform(meshIndex = 0, transform = null) {
|
|
277
289
|
if (!transform || transform.length < 16) {
|
|
@@ -300,10 +312,10 @@ class TriGeometryRes extends CjsResource {
|
|
|
300
312
|
}
|
|
301
313
|
}
|
|
302
314
|
|
|
303
|
-
/**
|
|
304
|
-
* Recalculate bounding sphere data from canonical CPU vertex positions.
|
|
305
|
-
*
|
|
306
|
-
* @returns {boolean}
|
|
315
|
+
/**
|
|
316
|
+
* Recalculate bounding sphere data from canonical CPU vertex positions.
|
|
317
|
+
*
|
|
318
|
+
* @returns {boolean}
|
|
307
319
|
*/
|
|
308
320
|
RecalculateBoundingSphere() {
|
|
309
321
|
let updated = false;
|
|
@@ -322,34 +334,34 @@ class TriGeometryRes extends CjsResource {
|
|
|
322
334
|
}
|
|
323
335
|
}
|
|
324
336
|
|
|
325
|
-
/**
|
|
326
|
-
* Reloading belongs to the resource manager because it owns source and
|
|
327
|
-
* canonical replacement policy.
|
|
328
|
-
*
|
|
329
|
-
* @throws {Error}
|
|
337
|
+
/**
|
|
338
|
+
* Reloading belongs to the resource manager because it owns source and
|
|
339
|
+
* canonical replacement policy.
|
|
340
|
+
*
|
|
341
|
+
* @throws {Error}
|
|
330
342
|
*/
|
|
331
343
|
Reload() {
|
|
332
344
|
throw resourceBoundaryError("TriGeometryRes", "Reload", "Request a reload through CjsResMan so source reads and canonical replacement remain manager-owned.");
|
|
333
345
|
}
|
|
334
346
|
|
|
335
|
-
/**
|
|
336
|
-
* Intersect a ray with canonical CPU triangle data.
|
|
337
|
-
*
|
|
338
|
-
* @param {ArrayLike<number>} position
|
|
339
|
-
* @param {ArrayLike<number>} direction
|
|
340
|
-
* @returns {object}
|
|
347
|
+
/**
|
|
348
|
+
* Intersect a ray with canonical CPU triangle data.
|
|
349
|
+
*
|
|
350
|
+
* @param {ArrayLike<number>} position
|
|
351
|
+
* @param {ArrayLike<number>} direction
|
|
352
|
+
* @returns {object}
|
|
341
353
|
*/
|
|
342
354
|
GetIntersectionPointNormalBone(position, direction) {
|
|
343
355
|
return TriGeometryRes.intersectGeometry(this.RequireIntersectionMeshes(), position, direction, -1);
|
|
344
356
|
}
|
|
345
357
|
|
|
346
|
-
/**
|
|
347
|
-
* Intersect a ray with one area index across canonical CPU meshes.
|
|
348
|
-
*
|
|
349
|
-
* @param {ArrayLike<number>} position
|
|
350
|
-
* @param {ArrayLike<number>} direction
|
|
351
|
-
* @param {number} areaIndex
|
|
352
|
-
* @returns {object}
|
|
358
|
+
/**
|
|
359
|
+
* Intersect a ray with one area index across canonical CPU meshes.
|
|
360
|
+
*
|
|
361
|
+
* @param {ArrayLike<number>} position
|
|
362
|
+
* @param {ArrayLike<number>} direction
|
|
363
|
+
* @param {number} areaIndex
|
|
364
|
+
* @returns {object}
|
|
353
365
|
*/
|
|
354
366
|
GetAreaIntersectionPointNormalBone(position, direction, areaIndex = -1) {
|
|
355
367
|
if (!Number.isInteger(areaIndex) || areaIndex < -1) {
|
|
@@ -425,27 +437,27 @@ class TriGeometryRes extends CjsResource {
|
|
|
425
437
|
return true;
|
|
426
438
|
}
|
|
427
439
|
|
|
428
|
-
/**
|
|
429
|
-
* The CPU triangle data an intersection query needs, or a loud failure.
|
|
430
|
-
*
|
|
431
|
-
* A ray query used to read `GetPayload()?.meshes`, and `intersectGeometry`
|
|
432
|
-
* loops over `meshes?.length || 0`. So an absent payload produced a clean
|
|
433
|
-
* MISS: `hit: false`, no error, indistinguishable from the ray genuinely
|
|
434
|
-
* passing the object by. Picking would appear to work and simply stop
|
|
435
|
-
* hitting things, and the symptom reads as a maths bug rather than a
|
|
436
|
-
* residency one.
|
|
437
|
-
*
|
|
438
|
-
* Carbon never has to answer this, because it holds the loaded file for the
|
|
439
|
-
* resource's lifetime and its CPU data is always resident. Ours is
|
|
440
|
-
* releasable, so the unavailable case is real and must be named.
|
|
441
|
-
*
|
|
442
|
-
* Throwing is the interim answer, not the final one: once accuracy tiers
|
|
443
|
-
* exist a query degrades to bounds or sphere and reports which produced it.
|
|
444
|
-
* What it must never do again is report absence as a miss. See
|
|
445
|
-
* `/docs/contracts/cpu-geometry-residency.md`.
|
|
446
|
-
*
|
|
447
|
-
* @returns {Array<*>} Canonical CPU meshes.
|
|
448
|
-
* @throws {Error} When the CPU geometry is not resident.
|
|
440
|
+
/**
|
|
441
|
+
* The CPU triangle data an intersection query needs, or a loud failure.
|
|
442
|
+
*
|
|
443
|
+
* A ray query used to read `GetPayload()?.meshes`, and `intersectGeometry`
|
|
444
|
+
* loops over `meshes?.length || 0`. So an absent payload produced a clean
|
|
445
|
+
* MISS: `hit: false`, no error, indistinguishable from the ray genuinely
|
|
446
|
+
* passing the object by. Picking would appear to work and simply stop
|
|
447
|
+
* hitting things, and the symptom reads as a maths bug rather than a
|
|
448
|
+
* residency one.
|
|
449
|
+
*
|
|
450
|
+
* Carbon never has to answer this, because it holds the loaded file for the
|
|
451
|
+
* resource's lifetime and its CPU data is always resident. Ours is
|
|
452
|
+
* releasable, so the unavailable case is real and must be named.
|
|
453
|
+
*
|
|
454
|
+
* Throwing is the interim answer, not the final one: once accuracy tiers
|
|
455
|
+
* exist a query degrades to bounds or sphere and reports which produced it.
|
|
456
|
+
* What it must never do again is report absence as a miss. See
|
|
457
|
+
* `/docs/contracts/cpu-geometry-residency.md`.
|
|
458
|
+
*
|
|
459
|
+
* @returns {Array<*>} Canonical CPU meshes.
|
|
460
|
+
* @throws {Error} When the CPU geometry is not resident.
|
|
449
461
|
*/
|
|
450
462
|
RequireIntersectionMeshes() {
|
|
451
463
|
const meshes = this.GetPayload()?.meshes;
|
|
@@ -455,11 +467,11 @@ class TriGeometryRes extends CjsResource {
|
|
|
455
467
|
return meshes;
|
|
456
468
|
}
|
|
457
469
|
|
|
458
|
-
/**
|
|
459
|
-
* Get vertex element descriptors for a mesh.
|
|
460
|
-
*
|
|
461
|
-
* @param {number} meshIndex
|
|
462
|
-
* @returns {Array<*>}
|
|
470
|
+
/**
|
|
471
|
+
* Get vertex element descriptors for a mesh.
|
|
472
|
+
*
|
|
473
|
+
* @param {number} meshIndex
|
|
474
|
+
* @returns {Array<*>}
|
|
463
475
|
*/
|
|
464
476
|
GetMeshVertexElements(meshIndex = 0) {
|
|
465
477
|
// The CMF reader emits the element list as `decl`, matching the CMF struct
|
|
@@ -470,10 +482,10 @@ class TriGeometryRes extends CjsResource {
|
|
|
470
482
|
return mesh?.decl || mesh?.vertexElements || [];
|
|
471
483
|
}
|
|
472
484
|
|
|
473
|
-
/**
|
|
474
|
-
* Saving belongs to the selected geometry format writer and destination.
|
|
475
|
-
*
|
|
476
|
-
* @throws {Error}
|
|
485
|
+
/**
|
|
486
|
+
* Saving belongs to the selected geometry format writer and destination.
|
|
487
|
+
*
|
|
488
|
+
* @throws {Error}
|
|
477
489
|
*/
|
|
478
490
|
SaveMesh() {
|
|
479
491
|
throw resourceBoundaryError("TriGeometryRes", "SaveMesh", "Use a geometry format writer with the resource payload and a caller-owned destination.");
|
|
@@ -486,15 +498,15 @@ class TriGeometryRes extends CjsResource {
|
|
|
486
498
|
// multiply by three: the *3 belongs to the caller, so triangles-only is a
|
|
487
499
|
// property of the mesh draw path rather than of the geometry layer.
|
|
488
500
|
|
|
489
|
-
/**
|
|
490
|
-
* The summed primitive count over `count` areas of a LOD starting at `index`,
|
|
491
|
-
* with the run clamped to the area list as Carbon clamps it; zero when the
|
|
492
|
-
* index is out of range, which callers treat as "emit no draw".
|
|
493
|
-
*
|
|
494
|
-
* @param {object|null} lod
|
|
495
|
-
* @param {number} index
|
|
496
|
-
* @param {number} count
|
|
497
|
-
* @returns {number}
|
|
501
|
+
/**
|
|
502
|
+
* The summed primitive count over `count` areas of a LOD starting at `index`,
|
|
503
|
+
* with the run clamped to the area list as Carbon clamps it; zero when the
|
|
504
|
+
* index is out of range, which callers treat as "emit no draw".
|
|
505
|
+
*
|
|
506
|
+
* @param {object|null} lod
|
|
507
|
+
* @param {number} index
|
|
508
|
+
* @param {number} count
|
|
509
|
+
* @returns {number}
|
|
498
510
|
*/
|
|
499
511
|
static getPrimitiveCount(lod, index, count) {
|
|
500
512
|
const areas = lod?.areas ?? null;
|
|
@@ -524,22 +536,22 @@ class TriGeometryRes extends CjsResource {
|
|
|
524
536
|
// accepted above: the name is the producer's. A payload built by a reader
|
|
525
537
|
// that already speaks Carbon's vocabulary is passed through unconverted.
|
|
526
538
|
|
|
527
|
-
/**
|
|
528
|
-
* One area's primitive count, under whichever name the producer used.
|
|
529
|
-
*
|
|
530
|
-
* @param {object|null} area
|
|
531
|
-
* @returns {number} Triangle count; zero when the area is absent or unnamed.
|
|
539
|
+
/**
|
|
540
|
+
* One area's primitive count, under whichever name the producer used.
|
|
541
|
+
*
|
|
542
|
+
* @param {object|null} area
|
|
543
|
+
* @returns {number} Triangle count; zero when the area is absent or unnamed.
|
|
532
544
|
*/
|
|
533
545
|
static getAreaPrimitiveCount(area) {
|
|
534
546
|
return area?.primitiveCount ?? area?.elementCount ?? 0;
|
|
535
547
|
}
|
|
536
548
|
|
|
537
|
-
/**
|
|
538
|
-
* One area's first INDEX, converting a CMF first-triangle when that is what
|
|
539
|
-
* the producer wrote.
|
|
540
|
-
*
|
|
541
|
-
* @param {object|null} area
|
|
542
|
-
* @returns {number} Index offset into the LOD's index buffer.
|
|
549
|
+
/**
|
|
550
|
+
* One area's first INDEX, converting a CMF first-triangle when that is what
|
|
551
|
+
* the producer wrote.
|
|
552
|
+
*
|
|
553
|
+
* @param {object|null} area
|
|
554
|
+
* @returns {number} Index offset into the LOD's index buffer.
|
|
543
555
|
*/
|
|
544
556
|
static getAreaFirstIndex(area) {
|
|
545
557
|
if (area?.firstIndex !== undefined) return area.firstIndex;
|
|
@@ -547,17 +559,17 @@ class TriGeometryRes extends CjsResource {
|
|
|
547
559
|
return 0;
|
|
548
560
|
}
|
|
549
561
|
|
|
550
|
-
/**
|
|
551
|
-
* A LOD's total primitive count.
|
|
552
|
-
*
|
|
553
|
-
* Carbon takes this from the index stream rather than from the areas
|
|
554
|
-
* (`GetStreamElementCount( cmfLod.ib ) / 3`, TriGeometryRes.cpp:890), because
|
|
555
|
-
* an area list need not cover every triangle. Falling back to the area sum
|
|
556
|
-
* keeps a payload that carries areas but no index-stream extent usable, and
|
|
557
|
-
* only the reversed draw path reads this at all.
|
|
558
|
-
*
|
|
559
|
-
* @param {object|null} lod
|
|
560
|
-
* @returns {number}
|
|
562
|
+
/**
|
|
563
|
+
* A LOD's total primitive count.
|
|
564
|
+
*
|
|
565
|
+
* Carbon takes this from the index stream rather than from the areas
|
|
566
|
+
* (`GetStreamElementCount( cmfLod.ib ) / 3`, TriGeometryRes.cpp:890), because
|
|
567
|
+
* an area list need not cover every triangle. Falling back to the area sum
|
|
568
|
+
* keeps a payload that carries areas but no index-stream extent usable, and
|
|
569
|
+
* only the reversed draw path reads this at all.
|
|
570
|
+
*
|
|
571
|
+
* @param {object|null} lod
|
|
572
|
+
* @returns {number}
|
|
561
573
|
*/
|
|
562
574
|
static getLodPrimitiveCount(lod) {
|
|
563
575
|
if (lod?.primitiveCount !== undefined) return lod.primitiveCount;
|
|
@@ -567,21 +579,21 @@ class TriGeometryRes extends CjsResource {
|
|
|
567
579
|
return TriGeometryRes.getPrimitiveCount(lod, 0, lod?.areas?.length ?? 0);
|
|
568
580
|
}
|
|
569
581
|
|
|
570
|
-
/**
|
|
571
|
-
* Gets the canonical area list from a mesh or its first LOD.
|
|
572
|
-
*
|
|
573
|
-
* @param {object|null} mesh
|
|
574
|
-
* @returns {Array<*>|null}
|
|
582
|
+
/**
|
|
583
|
+
* Gets the canonical area list from a mesh or its first LOD.
|
|
584
|
+
*
|
|
585
|
+
* @param {object|null} mesh
|
|
586
|
+
* @returns {Array<*>|null}
|
|
575
587
|
*/
|
|
576
588
|
static getMeshAreas(mesh) {
|
|
577
589
|
return mesh?.areas || mesh?.lods?.[0]?.areas || null;
|
|
578
590
|
}
|
|
579
591
|
|
|
580
|
-
/**
|
|
581
|
-
* Gets canonical bounds from a geometry payload object.
|
|
582
|
-
*
|
|
583
|
-
* @param {object|null} value
|
|
584
|
-
* @returns {{min: ArrayLike<number>, max: ArrayLike<number>}|null}
|
|
592
|
+
/**
|
|
593
|
+
* Gets canonical bounds from a geometry payload object.
|
|
594
|
+
*
|
|
595
|
+
* @param {object|null} value
|
|
596
|
+
* @returns {{min: ArrayLike<number>, max: ArrayLike<number>}|null}
|
|
585
597
|
*/
|
|
586
598
|
static getBounds(value) {
|
|
587
599
|
if (!value || typeof value !== "object") return null;
|
|
@@ -595,24 +607,24 @@ class TriGeometryRes extends CjsResource {
|
|
|
595
607
|
return null;
|
|
596
608
|
}
|
|
597
609
|
|
|
598
|
-
/**
|
|
599
|
-
* Gets the canonical bounding sphere from a geometry payload object.
|
|
600
|
-
*
|
|
601
|
-
* @param {object|null} value
|
|
602
|
-
* @returns {ArrayLike<number>|null}
|
|
610
|
+
/**
|
|
611
|
+
* Gets the canonical bounding sphere from a geometry payload object.
|
|
612
|
+
*
|
|
613
|
+
* @param {object|null} value
|
|
614
|
+
* @returns {ArrayLike<number>|null}
|
|
603
615
|
*/
|
|
604
616
|
static getSphere(value) {
|
|
605
617
|
if (!value || typeof value !== "object") return null;
|
|
606
618
|
return value.sphere || value.boundingSphere || null;
|
|
607
619
|
}
|
|
608
620
|
|
|
609
|
-
/**
|
|
610
|
-
* Copies bounds into caller-owned outputs, or returns the source object.
|
|
611
|
-
*
|
|
612
|
-
* @param {{min: ArrayLike<number>, max: ArrayLike<number>}|null} bounds
|
|
613
|
-
* @param {ArrayLike<number>|null} outMin
|
|
614
|
-
* @param {ArrayLike<number>|null} outMax
|
|
615
|
-
* @returns {*|boolean}
|
|
621
|
+
/**
|
|
622
|
+
* Copies bounds into caller-owned outputs, or returns the source object.
|
|
623
|
+
*
|
|
624
|
+
* @param {{min: ArrayLike<number>, max: ArrayLike<number>}|null} bounds
|
|
625
|
+
* @param {ArrayLike<number>|null} outMin
|
|
626
|
+
* @param {ArrayLike<number>|null} outMax
|
|
627
|
+
* @returns {*|boolean}
|
|
616
628
|
*/
|
|
617
629
|
static copyBounds(bounds, outMin, outMax) {
|
|
618
630
|
if (!outMin && !outMax) return bounds;
|
|
@@ -622,34 +634,34 @@ class TriGeometryRes extends CjsResource {
|
|
|
622
634
|
return true;
|
|
623
635
|
}
|
|
624
636
|
|
|
625
|
-
/**
|
|
626
|
-
* Gets canonical positions from a mesh or its first LOD.
|
|
627
|
-
*
|
|
628
|
-
* @param {object|null} mesh
|
|
629
|
-
* @returns {ArrayLike<number>|Array<ArrayLike<number>>|null}
|
|
637
|
+
/**
|
|
638
|
+
* Gets canonical positions from a mesh or its first LOD.
|
|
639
|
+
*
|
|
640
|
+
* @param {object|null} mesh
|
|
641
|
+
* @returns {ArrayLike<number>|Array<ArrayLike<number>>|null}
|
|
630
642
|
*/
|
|
631
643
|
static getMeshPositions(mesh) {
|
|
632
644
|
return mesh?.vertex?.position || mesh?.positions || mesh?.lods?.[0]?.vertex?.position || mesh?.lods?.[0]?.positions || null;
|
|
633
645
|
}
|
|
634
646
|
|
|
635
|
-
/**
|
|
636
|
-
* Gets the number of vertices represented by flat or nested positions.
|
|
637
|
-
*
|
|
638
|
-
* @param {ArrayLike<number>|Array<ArrayLike<number>>|null} positions
|
|
639
|
-
* @returns {number}
|
|
647
|
+
/**
|
|
648
|
+
* Gets the number of vertices represented by flat or nested positions.
|
|
649
|
+
*
|
|
650
|
+
* @param {ArrayLike<number>|Array<ArrayLike<number>>|null} positions
|
|
651
|
+
* @returns {number}
|
|
640
652
|
*/
|
|
641
653
|
static getPositionCount(positions) {
|
|
642
654
|
if (!positions) return 0;
|
|
643
655
|
return typeof positions[0] === "number" ? Math.floor(positions.length / 3) : positions.length;
|
|
644
656
|
}
|
|
645
657
|
|
|
646
|
-
/**
|
|
647
|
-
* Calculates bounds from canonical positions using caller-owned scratch.
|
|
648
|
-
*
|
|
649
|
-
* @param {ArrayLike<number>} out
|
|
650
|
-
* @param {ArrayLike<number>|Array<ArrayLike<number>>|null} positions
|
|
651
|
-
* @param {ArrayLike<number>} point
|
|
652
|
-
* @returns {boolean}
|
|
658
|
+
/**
|
|
659
|
+
* Calculates bounds from canonical positions using caller-owned scratch.
|
|
660
|
+
*
|
|
661
|
+
* @param {ArrayLike<number>} out
|
|
662
|
+
* @param {ArrayLike<number>|Array<ArrayLike<number>>|null} positions
|
|
663
|
+
* @param {ArrayLike<number>} point
|
|
664
|
+
* @returns {boolean}
|
|
653
665
|
*/
|
|
654
666
|
static setBoundsFromPositions(out, positions, point) {
|
|
655
667
|
const count = this.getPositionCount(positions);
|
|
@@ -673,13 +685,13 @@ class TriGeometryRes extends CjsResource {
|
|
|
673
685
|
return found;
|
|
674
686
|
}
|
|
675
687
|
|
|
676
|
-
/**
|
|
677
|
-
* Calculates a bounding sphere from positions using caller-owned scratch.
|
|
678
|
-
*
|
|
679
|
-
* @param {ArrayLike<number>} out
|
|
680
|
-
* @param {ArrayLike<number>|Array<ArrayLike<number>>|null} positions
|
|
681
|
-
* @param {ArrayLike<number>} point
|
|
682
|
-
* @returns {boolean}
|
|
688
|
+
/**
|
|
689
|
+
* Calculates a bounding sphere from positions using caller-owned scratch.
|
|
690
|
+
*
|
|
691
|
+
* @param {ArrayLike<number>} out
|
|
692
|
+
* @param {ArrayLike<number>|Array<ArrayLike<number>>|null} positions
|
|
693
|
+
* @param {ArrayLike<number>} point
|
|
694
|
+
* @returns {boolean}
|
|
683
695
|
*/
|
|
684
696
|
static setSphereFromPositions(out, positions, point) {
|
|
685
697
|
const count = this.getPositionCount(positions);
|
|
@@ -716,13 +728,13 @@ class TriGeometryRes extends CjsResource {
|
|
|
716
728
|
return true;
|
|
717
729
|
}
|
|
718
730
|
|
|
719
|
-
/**
|
|
720
|
-
* Calculates a mesh sphere from positions or existing bounds.
|
|
721
|
-
*
|
|
722
|
-
* @param {ArrayLike<number>} out
|
|
723
|
-
* @param {object} mesh
|
|
724
|
-
* @param {ArrayLike<number>} point
|
|
725
|
-
* @returns {boolean}
|
|
731
|
+
/**
|
|
732
|
+
* Calculates a mesh sphere from positions or existing bounds.
|
|
733
|
+
*
|
|
734
|
+
* @param {ArrayLike<number>} out
|
|
735
|
+
* @param {object} mesh
|
|
736
|
+
* @param {ArrayLike<number>} point
|
|
737
|
+
* @returns {boolean}
|
|
726
738
|
*/
|
|
727
739
|
static calculateMeshSphere(out, mesh, point) {
|
|
728
740
|
if (this.setSphereFromPositions(out, this.getMeshPositions(mesh), point)) return true;
|
|
@@ -732,12 +744,12 @@ class TriGeometryRes extends CjsResource {
|
|
|
732
744
|
return true;
|
|
733
745
|
}
|
|
734
746
|
|
|
735
|
-
/**
|
|
736
|
-
* Stores a calculated sphere in the mesh's canonical sphere fields.
|
|
737
|
-
*
|
|
738
|
-
* @param {object} mesh
|
|
739
|
-
* @param {ArrayLike<number>} sphere
|
|
740
|
-
* @returns {void}
|
|
747
|
+
/**
|
|
748
|
+
* Stores a calculated sphere in the mesh's canonical sphere fields.
|
|
749
|
+
*
|
|
750
|
+
* @param {object} mesh
|
|
751
|
+
* @param {ArrayLike<number>} sphere
|
|
752
|
+
* @returns {void}
|
|
741
753
|
*/
|
|
742
754
|
static setMeshSphere(mesh, sphere) {
|
|
743
755
|
if (mesh.sphere && typeof mesh.sphere.set === "function") mesh.sphere.set(sphere);else mesh.sphere = [...sphere];
|
|
@@ -748,14 +760,14 @@ class TriGeometryRes extends CjsResource {
|
|
|
748
760
|
}
|
|
749
761
|
}
|
|
750
762
|
|
|
751
|
-
/**
|
|
752
|
-
* Intersects a ray with canonical CPU geometry.
|
|
753
|
-
*
|
|
754
|
-
* @param {Array<object>|null} meshes
|
|
755
|
-
* @param {ArrayLike<number>} position
|
|
756
|
-
* @param {ArrayLike<number>} direction
|
|
757
|
-
* @param {number} areaIndex
|
|
758
|
-
* @returns {object}
|
|
763
|
+
/**
|
|
764
|
+
* Intersects a ray with canonical CPU geometry.
|
|
765
|
+
*
|
|
766
|
+
* @param {Array<object>|null} meshes
|
|
767
|
+
* @param {ArrayLike<number>} position
|
|
768
|
+
* @param {ArrayLike<number>} direction
|
|
769
|
+
* @param {number} areaIndex
|
|
770
|
+
* @returns {object}
|
|
759
771
|
*/
|
|
760
772
|
static intersectGeometry(meshes, position, direction, areaIndex) {
|
|
761
773
|
this.validateRayVector(position, "position");
|
|
@@ -813,12 +825,12 @@ class TriGeometryRes extends CjsResource {
|
|
|
813
825
|
}
|
|
814
826
|
}
|
|
815
827
|
|
|
816
|
-
/**
|
|
817
|
-
* Validates a caller-provided ray vector.
|
|
818
|
-
*
|
|
819
|
-
* @param {ArrayLike<number>} value
|
|
820
|
-
* @param {string} name
|
|
821
|
-
* @returns {void}
|
|
828
|
+
/**
|
|
829
|
+
* Validates a caller-provided ray vector.
|
|
830
|
+
*
|
|
831
|
+
* @param {ArrayLike<number>} value
|
|
832
|
+
* @param {string} name
|
|
833
|
+
* @returns {void}
|
|
822
834
|
*/
|
|
823
835
|
static validateRayVector(value, name) {
|
|
824
836
|
if (!value || value.length < 3 || !Number.isFinite(value[0]) || !Number.isFinite(value[1]) || !Number.isFinite(value[2])) {
|
|
@@ -826,23 +838,23 @@ class TriGeometryRes extends CjsResource {
|
|
|
826
838
|
}
|
|
827
839
|
}
|
|
828
840
|
|
|
829
|
-
/**
|
|
830
|
-
* Intersects a ray with one flat face list.
|
|
831
|
-
*
|
|
832
|
-
* @param {object|null} nearest
|
|
833
|
-
* @param {ArrayLike<number>|null} faces
|
|
834
|
-
* @param {number} areaIndex
|
|
835
|
-
* @param {object} mesh
|
|
836
|
-
* @param {number} meshIndex
|
|
837
|
-
* @param {ArrayLike<number>|Array<ArrayLike<number>>} positions
|
|
838
|
-
* @param {ArrayLike<number>} rayOrigin
|
|
839
|
-
* @param {ArrayLike<number>} ray
|
|
840
|
-
* @param {ArrayLike<number>} point
|
|
841
|
-
* @param {ArrayLike<number>} vertexA
|
|
842
|
-
* @param {ArrayLike<number>} vertexB
|
|
843
|
-
* @param {ArrayLike<number>} vertexC
|
|
844
|
-
* @param {ArrayLike<number>} normal
|
|
845
|
-
* @returns {object|null}
|
|
841
|
+
/**
|
|
842
|
+
* Intersects a ray with one flat face list.
|
|
843
|
+
*
|
|
844
|
+
* @param {object|null} nearest
|
|
845
|
+
* @param {ArrayLike<number>|null} faces
|
|
846
|
+
* @param {number} areaIndex
|
|
847
|
+
* @param {object} mesh
|
|
848
|
+
* @param {number} meshIndex
|
|
849
|
+
* @param {ArrayLike<number>|Array<ArrayLike<number>>} positions
|
|
850
|
+
* @param {ArrayLike<number>} rayOrigin
|
|
851
|
+
* @param {ArrayLike<number>} ray
|
|
852
|
+
* @param {ArrayLike<number>} point
|
|
853
|
+
* @param {ArrayLike<number>} vertexA
|
|
854
|
+
* @param {ArrayLike<number>} vertexB
|
|
855
|
+
* @param {ArrayLike<number>} vertexC
|
|
856
|
+
* @param {ArrayLike<number>} normal
|
|
857
|
+
* @returns {object|null}
|
|
846
858
|
*/
|
|
847
859
|
static intersectFaces(nearest, faces, areaIndex, mesh, meshIndex, positions, rayOrigin, ray, point, vertexA, vertexB, vertexC, normal) {
|
|
848
860
|
const count = faces?.length ?? this.getPositionCount(positions);
|
|
@@ -871,9 +883,12 @@ class TriGeometryRes extends CjsResource {
|
|
|
871
883
|
}
|
|
872
884
|
nearest.boneIndex = this.getMeshBoneIndex(mesh, vertexIndexA);
|
|
873
885
|
vec3.copy(nearest.position, point);
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
886
|
+
// (B - A) x (C - A). This was written out in full one line above a
|
|
887
|
+
// `triangleNormalTo` call that computes the NORMALISED version of the same
|
|
888
|
+
// vector, so the winding convention lived in two places at once.
|
|
889
|
+
vec3.subtract(edgeAB, vertexB, vertexA);
|
|
890
|
+
vec3.subtract(edgeAC, vertexC, vertexA);
|
|
891
|
+
vec3.cross(nearest.unnormalizedNormal, edgeAB, edgeAC);
|
|
877
892
|
triangleNormalTo(normal, vertexA, vertexB, vertexC);
|
|
878
893
|
vec3.copy(nearest.normal, normal);
|
|
879
894
|
nearest.distance = distance;
|
|
@@ -883,13 +898,13 @@ class TriGeometryRes extends CjsResource {
|
|
|
883
898
|
return nearest;
|
|
884
899
|
}
|
|
885
900
|
|
|
886
|
-
/**
|
|
887
|
-
* Copies one flat or nested position into caller-owned output.
|
|
888
|
-
*
|
|
889
|
-
* @param {ArrayLike<number>} out
|
|
890
|
-
* @param {ArrayLike<number>|Array<ArrayLike<number>>} positions
|
|
891
|
-
* @param {number} index
|
|
892
|
-
* @returns {boolean}
|
|
901
|
+
/**
|
|
902
|
+
* Copies one flat or nested position into caller-owned output.
|
|
903
|
+
*
|
|
904
|
+
* @param {ArrayLike<number>} out
|
|
905
|
+
* @param {ArrayLike<number>|Array<ArrayLike<number>>} positions
|
|
906
|
+
* @param {number} index
|
|
907
|
+
* @returns {boolean}
|
|
893
908
|
*/
|
|
894
909
|
static copyPosition(out, positions, index) {
|
|
895
910
|
if (!Number.isInteger(index) || index < 0) return false;
|
|
@@ -909,12 +924,12 @@ class TriGeometryRes extends CjsResource {
|
|
|
909
924
|
return true;
|
|
910
925
|
}
|
|
911
926
|
|
|
912
|
-
/**
|
|
913
|
-
* Gets the first blend index for a mesh vertex.
|
|
914
|
-
*
|
|
915
|
-
* @param {object} mesh
|
|
916
|
-
* @param {number} vertexIndex
|
|
917
|
-
* @returns {number}
|
|
927
|
+
/**
|
|
928
|
+
* Gets the first blend index for a mesh vertex.
|
|
929
|
+
*
|
|
930
|
+
* @param {object} mesh
|
|
931
|
+
* @param {number} vertexIndex
|
|
932
|
+
* @returns {number}
|
|
918
933
|
*/
|
|
919
934
|
static getMeshBoneIndex(mesh, vertexIndex) {
|
|
920
935
|
const indices = mesh?.vertex?.blendIndices || mesh?.blendIndices;
|