@carbonenginejs/runtime-resource 0.9.2 → 0.11.0
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/NOTICE +3 -2
- package/README.md +47 -6
- package/dist/CjsMotherLode.js +88 -88
- package/dist/CjsMotherLode.js.map +1 -1
- package/dist/CjsResMan.js +717 -228
- package/dist/CjsResMan.js.map +1 -1
- package/dist/CjsResManFetchProvider.js +94 -0
- package/dist/CjsResManFetchProvider.js.map +1 -0
- package/dist/{CjsResManQueue.js → CjsResManWorkQueue.js} +112 -25
- package/dist/CjsResManWorkQueue.js.map +1 -0
- package/dist/format/CjsBlueReader.js +89 -0
- package/dist/format/CjsBlueReader.js.map +1 -1
- package/dist/format/CjsFormat.js +42 -16
- package/dist/format/CjsFormat.js.map +1 -1
- package/dist/format/CjsReader.js +4 -0
- package/dist/format/CjsReader.js.map +1 -1
- package/dist/format/CjsResourceProbe.js +2 -0
- package/dist/format/CjsResourceProbe.js.map +1 -1
- package/dist/format/effect/effectPermutationGraph.js +257 -0
- package/dist/format/effect/effectPermutationGraph.js.map +1 -0
- package/dist/format/effect/effectReflectionPackage.js +636 -0
- package/dist/format/effect/effectReflectionPackage.js.map +1 -0
- package/dist/format/effect/sha256.js +114 -0
- package/dist/format/effect/sha256.js.map +1 -0
- package/dist/format/payloadContract.js +20 -0
- package/dist/format/payloadContract.js.map +1 -1
- package/dist/formats/black/CjsBlackFormat.js +15 -1
- package/dist/formats/black/CjsBlackFormat.js.map +1 -1
- package/dist/formats/black/core/CjsBlackBinaryReader.js +103 -0
- package/dist/formats/black/core/CjsBlackBinaryReader.js.map +1 -1
- package/dist/formats/black/core/CjsBlackPropertyReaders.js +61 -0
- package/dist/formats/black/core/CjsBlackPropertyReaders.js.map +1 -1
- package/dist/formats/black/core/CjsBlackReader.js +125 -0
- package/dist/formats/black/core/CjsBlackReader.js.map +1 -1
- package/dist/formats/black/core/CjsBlackSchemaRegistry.js +103 -0
- package/dist/formats/black/core/CjsBlackSchemaRegistry.js.map +1 -1
- package/dist/formats/black/core/helpers.js +17 -0
- package/dist/formats/black/core/helpers.js.map +1 -1
- package/dist/formats/bnk/CjsBnkFormat.js +8 -0
- package/dist/formats/bnk/CjsBnkFormat.js.map +1 -1
- package/dist/formats/bnk/core/helpers.js +20 -0
- package/dist/formats/bnk/core/helpers.js.map +1 -1
- package/dist/formats/bnk/core/musicNodes.js +40 -3
- package/dist/formats/bnk/core/musicNodes.js.map +1 -1
- package/dist/formats/bnk/core/soundbanksInfo.js +2 -0
- package/dist/formats/bnk/core/soundbanksInfo.js.map +1 -1
- package/dist/formats/cmf/core/binary.js +71 -0
- package/dist/formats/cmf/core/binary.js.map +1 -1
- package/dist/formats/cmf/core/buffers.js +4 -0
- package/dist/formats/cmf/core/buffers.js.map +1 -1
- package/dist/formats/cmf/core/helpers.js +31 -0
- package/dist/formats/cmf/core/helpers.js.map +1 -1
- package/dist/formats/cmf/core/schema.js +10 -0
- package/dist/formats/cmf/core/schema.js.map +1 -1
- package/dist/formats/cmf/core/shared.js +9 -0
- package/dist/formats/cmf/core/shared.js.map +1 -1
- package/dist/formats/cmf/core/writer.js +54 -0
- package/dist/formats/cmf/core/writer.js.map +1 -1
- package/dist/formats/dds/core/bc6h.js +10 -0
- package/dist/formats/dds/core/bc6h.js.map +1 -1
- package/dist/formats/dds/core/bc7.js +16 -0
- package/dist/formats/dds/core/bc7.js.map +1 -1
- package/dist/formats/dds/core/helpers.js +47 -0
- package/dist/formats/dds/core/helpers.js.map +1 -1
- package/dist/formats/dxbc/CjsDxbcFormat.js +142 -0
- package/dist/formats/dxbc/CjsDxbcFormat.js.map +1 -0
- package/dist/formats/dxbc/core/DxbcReader.js +266 -0
- package/dist/formats/dxbc/core/DxbcReader.js.map +1 -0
- package/dist/formats/dxbc/core/container.js +169 -0
- package/dist/formats/dxbc/core/container.js.map +1 -0
- package/dist/formats/dxbc/core/decoder.js +789 -0
- package/dist/formats/dxbc/core/decoder.js.map +1 -0
- package/dist/formats/dxbc/core/errors.js +19 -0
- package/dist/formats/dxbc/core/errors.js.map +1 -0
- package/dist/formats/dxbc/core/helpers.js +220 -0
- package/dist/formats/dxbc/core/helpers.js.map +1 -0
- package/dist/formats/dxbc/core/opcodes.js +45 -0
- package/dist/formats/dxbc/core/opcodes.js.map +1 -0
- package/dist/formats/dxbc/core/program.js +91 -0
- package/dist/formats/dxbc/core/program.js.map +1 -0
- package/dist/formats/dxbc/core/signature.js +172 -0
- package/dist/formats/dxbc/core/signature.js.map +1 -0
- package/dist/formats/dxbc/index.js +2 -0
- package/dist/formats/dxbc/index.js.map +1 -0
- package/dist/formats/fbx/core/helpers.js +21 -0
- package/dist/formats/fbx/core/helpers.js.map +1 -1
- package/dist/formats/flac/CjsFlacFormat.js +49 -0
- package/dist/formats/flac/CjsFlacFormat.js.map +1 -1
- package/dist/formats/flac/core/helpers.js +20 -0
- package/dist/formats/flac/core/helpers.js.map +1 -1
- package/dist/formats/gif/CjsGifFormat.js +49 -0
- package/dist/formats/gif/CjsGifFormat.js.map +1 -1
- package/dist/formats/gif/core/helpers.js +20 -0
- package/dist/formats/gif/core/helpers.js.map +1 -1
- package/dist/formats/gltf/core/helpers.js +15 -0
- package/dist/formats/gltf/core/helpers.js.map +1 -1
- package/dist/formats/gltf/core/parser.js +13 -0
- package/dist/formats/gltf/core/parser.js.map +1 -1
- package/dist/formats/gltf/core/targets.js +10 -0
- package/dist/formats/gltf/core/targets.js.map +1 -1
- package/dist/formats/gr2/core/bitknit2.js +2 -0
- package/dist/formats/gr2/core/bitknit2.js.map +1 -1
- package/dist/formats/gr2/core/helpers.js +20 -0
- package/dist/formats/gr2/core/helpers.js.map +1 -1
- package/dist/formats/gr2/core/targets.js +10 -0
- package/dist/formats/gr2/core/targets.js.map +1 -1
- package/dist/formats/hlsl/CjsHlslFormat.js +254 -0
- package/dist/formats/hlsl/CjsHlslFormat.js.map +1 -0
- package/dist/formats/hlsl/core/HlslBinaryUtils.js +15 -0
- package/dist/formats/hlsl/core/HlslBinaryUtils.js.map +1 -0
- package/dist/formats/hlsl/core/HlslEffectReadError.js +19 -0
- package/dist/formats/hlsl/core/HlslEffectReadError.js.map +1 -0
- package/dist/formats/hlsl/core/HlslEffectStateManager.js +130 -0
- package/dist/formats/hlsl/core/HlslEffectStateManager.js.map +1 -0
- package/dist/formats/hlsl/core/HlslReader.js +266 -0
- package/dist/formats/hlsl/core/HlslReader.js.map +1 -0
- package/dist/formats/hlsl/core/HlslRenderStateSetup.js +37 -0
- package/dist/formats/hlsl/core/HlslRenderStateSetup.js.map +1 -0
- package/dist/formats/hlsl/core/HlslResourceSetDescription.js +94 -0
- package/dist/formats/hlsl/core/HlslResourceSetDescription.js.map +1 -0
- package/dist/formats/hlsl/core/HlslShaderBytecode.js +44 -0
- package/dist/formats/hlsl/core/HlslShaderBytecode.js.map +1 -0
- package/dist/formats/hlsl/core/analysis.js +51 -0
- package/dist/formats/hlsl/core/analysis.js.map +1 -0
- package/dist/formats/hlsl/core/helpers.js +270 -0
- package/dist/formats/hlsl/core/helpers.js.map +1 -0
- package/dist/formats/hlsl/core/json.js +284 -0
- package/dist/formats/hlsl/core/json.js.map +1 -0
- package/dist/formats/hlsl/core/metadata.js +327 -0
- package/dist/formats/hlsl/core/metadata.js.map +1 -0
- package/dist/formats/hlsl/core/portableReflection.js +848 -0
- package/dist/formats/hlsl/core/portableReflection.js.map +1 -0
- package/dist/formats/hlsl/core/render-states.js +280 -0
- package/dist/formats/hlsl/core/render-states.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/HlslRenderContextEnum.js +43 -0
- package/dist/formats/hlsl/core/tr2/HlslRenderContextEnum.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/resources/HlslEffectRes.js +294 -0
- package/dist/formats/hlsl/core/tr2/resources/HlslEffectRes.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/resources/HlslShaderPermutation.js +33 -0
- package/dist/formats/hlsl/core/tr2/resources/HlslShaderPermutation.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectBindingManifest.js +416 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectBindingManifest.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectConstant.js +40 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectConstant.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectDescription.js +742 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectDescription.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectLibrary.js +52 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectLibrary.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectParameterAnnotation.js +38 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectParameterAnnotation.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectResource.js +50 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectResource.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectStageInput.js +86 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectStageInput.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectTechnique.js +31 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslEffectTechnique.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslPass.js +42 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslPass.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslSamplerDescription.js +55 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslSamplerDescription.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslSamplerSetup.js +29 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslSamplerSetup.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslShader.js +220 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslShader.js.map +1 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslShaderOption.js +30 -0
- package/dist/formats/hlsl/core/tr2/shader/HlslShaderOption.js.map +1 -0
- package/dist/formats/hlsl/index.js +2 -0
- package/dist/formats/hlsl/index.js.map +1 -0
- package/dist/formats/hlsl/portable.js +2 -0
- package/dist/formats/hlsl/portable.js.map +1 -0
- package/dist/formats/index.js +4 -0
- package/dist/formats/index.js.map +1 -1
- package/dist/formats/jpeg/core/helpers.js +52 -0
- package/dist/formats/jpeg/core/helpers.js.map +1 -1
- package/dist/formats/jpeg/core/jpeg.js +93 -0
- package/dist/formats/jpeg/core/jpeg.js.map +1 -1
- package/dist/formats/mp3/core/helpers.js +37 -0
- package/dist/formats/mp3/core/helpers.js.map +1 -1
- package/dist/formats/mp4/core/helpers.js +35 -0
- package/dist/formats/mp4/core/helpers.js.map +1 -1
- package/dist/formats/ogg/CjsOggFormat.js +49 -0
- package/dist/formats/ogg/CjsOggFormat.js.map +1 -1
- package/dist/formats/ogg/core/helpers.js +23 -0
- package/dist/formats/ogg/core/helpers.js.map +1 -1
- package/dist/formats/ogg/core/vorbis.js +13 -0
- package/dist/formats/ogg/core/vorbis.js.map +1 -1
- package/dist/formats/png/core/helpers.js +52 -0
- package/dist/formats/png/core/helpers.js.map +1 -1
- package/dist/formats/red/CjsRedFormat.js +2 -0
- package/dist/formats/red/CjsRedFormat.js.map +1 -1
- package/dist/formats/red/core/CjsRedReader.js +52 -0
- package/dist/formats/red/core/CjsRedReader.js.map +1 -1
- package/dist/formats/red/core/helpers.js +19 -0
- package/dist/formats/red/core/helpers.js.map +1 -1
- package/dist/formats/stl/core/stl.js +8 -0
- package/dist/formats/stl/core/stl.js.map +1 -1
- package/dist/formats/stl/core/targets.js +10 -0
- package/dist/formats/stl/core/targets.js.map +1 -1
- package/dist/formats/tga/core/helpers.js +47 -0
- package/dist/formats/tga/core/helpers.js.map +1 -1
- package/dist/formats/wav/core/helpers.js +37 -0
- package/dist/formats/wav/core/helpers.js.map +1 -1
- package/dist/formats/webgl/CjsWebglFormat.js +221 -0
- package/dist/formats/webgl/CjsWebglFormat.js.map +1 -0
- package/dist/formats/webgl/core/cewg/CewgPackage.js +339 -0
- package/dist/formats/webgl/core/cewg/CewgPackage.js.map +1 -0
- package/dist/formats/webgl/core/cewg/CewgPackageBuilder.js +104 -0
- package/dist/formats/webgl/core/cewg/CewgPackageBuilder.js.map +1 -0
- package/dist/formats/webgl/core/cewg/binary.js +101 -0
- package/dist/formats/webgl/core/cewg/binary.js.map +1 -0
- package/dist/formats/webgl/core/cewgCompleteness.js +81 -0
- package/dist/formats/webgl/core/cewgCompleteness.js.map +1 -0
- package/dist/formats/webgl/core/effectPackage.js +789 -0
- package/dist/formats/webgl/core/effectPackage.js.map +1 -0
- package/dist/formats/webgl/core/effectPackageValidation.js +331 -0
- package/dist/formats/webgl/core/effectPackageValidation.js.map +1 -0
- package/dist/formats/webgl/core/errors.js +27 -0
- package/dist/formats/webgl/core/errors.js.map +1 -0
- package/dist/formats/webgl/core/glsl/DxbcGlslEmitter.js +2678 -0
- package/dist/formats/webgl/core/glsl/DxbcGlslEmitter.js.map +1 -0
- package/dist/formats/webgl/core/glsl/DxbcGlslHelpers.js +89 -0
- package/dist/formats/webgl/core/glsl/DxbcGlslHelpers.js.map +1 -0
- package/dist/formats/webgl/core/glsl/DxbcGlslOperandFormatter.js +428 -0
- package/dist/formats/webgl/core/glsl/DxbcGlslOperandFormatter.js.map +1 -0
- package/dist/formats/webgl/core/helpers.js +306 -0
- package/dist/formats/webgl/core/helpers.js.map +1 -0
- package/dist/formats/webgl/index.js +2 -0
- package/dist/formats/webgl/index.js.map +1 -0
- package/dist/formats/webgpu/CjsWebgpuFormat.js +376 -0
- package/dist/formats/webgpu/CjsWebgpuFormat.js.map +1 -0
- package/dist/formats/webgpu/core/cewgpu/CewgpuPackage.js +415 -0
- package/dist/formats/webgpu/core/cewgpu/CewgpuPackage.js.map +1 -0
- package/dist/formats/webgpu/core/cewgpu/CewgpuPackageBuilder.js +100 -0
- package/dist/formats/webgpu/core/cewgpu/CewgpuPackageBuilder.js.map +1 -0
- package/dist/formats/webgpu/core/cewgpu/binary.js +93 -0
- package/dist/formats/webgpu/core/cewgpu/binary.js.map +1 -0
- package/dist/formats/webgpu/core/cewgpu/tags.js +17 -0
- package/dist/formats/webgpu/core/cewgpu/tags.js.map +1 -0
- package/dist/formats/webgpu/core/effectAnalysis.js +82 -0
- package/dist/formats/webgpu/core/effectAnalysis.js.map +1 -0
- package/dist/formats/webgpu/core/effectBackendBodySet.js +305 -0
- package/dist/formats/webgpu/core/effectBackendBodySet.js.map +1 -0
- package/dist/formats/webgpu/core/effectPackageValidation.js +1078 -0
- package/dist/formats/webgpu/core/effectPackageValidation.js.map +1 -0
- package/dist/formats/webgpu/core/errors.js +20 -0
- package/dist/formats/webgpu/core/errors.js.map +1 -0
- package/dist/formats/webgpu/core/helpers.js +448 -0
- package/dist/formats/webgpu/core/helpers.js.map +1 -0
- package/dist/formats/webgpu/core/ir/analyzeRegisterValues.js +223 -0
- package/dist/formats/webgpu/core/ir/analyzeRegisterValues.js.map +1 -0
- package/dist/formats/webgpu/core/ir/buildControlFlow.js +220 -0
- package/dist/formats/webgpu/core/ir/buildControlFlow.js.map +1 -0
- package/dist/formats/webgpu/core/ir/indexableTemps.js +137 -0
- package/dist/formats/webgpu/core/ir/indexableTemps.js.map +1 -0
- package/dist/formats/webgpu/core/ir/inferValueTypes.js +454 -0
- package/dist/formats/webgpu/core/ir/inferValueTypes.js.map +1 -0
- package/dist/formats/webgpu/core/ir/lowerDxbcToIr.js +494 -0
- package/dist/formats/webgpu/core/ir/lowerDxbcToIr.js.map +1 -0
- package/dist/formats/webgpu/core/ir/resolveRegisterFlow.js +177 -0
- package/dist/formats/webgpu/core/ir/resolveRegisterFlow.js.map +1 -0
- package/dist/formats/webgpu/core/ir/sourceLanes.js +61 -0
- package/dist/formats/webgpu/core/ir/sourceLanes.js.map +1 -0
- package/dist/formats/webgpu/core/packageEffect.js +300 -0
- package/dist/formats/webgpu/core/packageEffect.js.map +1 -0
- package/dist/formats/webgpu/core/packageEffectSelection.js +164 -0
- package/dist/formats/webgpu/core/packageEffectSelection.js.map +1 -0
- package/dist/formats/webgpu/core/packageMetadata.js +8 -0
- package/dist/formats/webgpu/core/packageMetadata.js.map +1 -0
- package/dist/formats/webgpu/core/schema.js +4 -0
- package/dist/formats/webgpu/core/schema.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/buildResourceTransformPlan.js +275 -0
- package/dist/formats/webgpu/core/wgsl/buildResourceTransformPlan.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/buildWgslBindingPlan.js +182 -0
- package/dist/formats/webgpu/core/wgsl/buildWgslBindingPlan.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/buildWgslSet.js +324 -0
- package/dist/formats/webgpu/core/wgsl/buildWgslSet.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/emitWgsl.js +356 -0
- package/dist/formats/webgpu/core/wgsl/emitWgsl.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/hoistEscapingValues.js +77 -0
- package/dist/formats/webgpu/core/wgsl/hoistEscapingValues.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerBindingLayout.js +451 -0
- package/dist/formats/webgpu/core/wgsl/lowerBindingLayout.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerComputeProgram.js +754 -0
- package/dist/formats/webgpu/core/wgsl/lowerComputeProgram.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerCreateHistogramsComputeProgram.js +457 -0
- package/dist/formats/webgpu/core/wgsl/lowerCreateHistogramsComputeProgram.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerFragmentProgram.js +1572 -0
- package/dist/formats/webgpu/core/wgsl/lowerFragmentProgram.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerMergeHistogramsComputeProgram.js +659 -0
- package/dist/formats/webgpu/core/wgsl/lowerMergeHistogramsComputeProgram.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerParticleClearComputePrograms.js +734 -0
- package/dist/formats/webgpu/core/wgsl/lowerParticleClearComputePrograms.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerParticleEmitComputeProgram.js +583 -0
- package/dist/formats/webgpu/core/wgsl/lowerParticleEmitComputeProgram.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerSkinVerticesComputeProgram.js +621 -0
- package/dist/formats/webgpu/core/wgsl/lowerSkinVerticesComputeProgram.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerSortComputeProgram.js +824 -0
- package/dist/formats/webgpu/core/wgsl/lowerSortComputeProgram.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerSortInnerComputeProgram.js +697 -0
- package/dist/formats/webgpu/core/wgsl/lowerSortInnerComputeProgram.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerSortStepComputeProgram.js +559 -0
- package/dist/formats/webgpu/core/wgsl/lowerSortStepComputeProgram.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/lowerVertexProgram.js +1328 -0
- package/dist/formats/webgpu/core/wgsl/lowerVertexProgram.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/particleEmitSemanticDigest.js +110 -0
- package/dist/formats/webgpu/core/wgsl/particleEmitSemanticDigest.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/precisionControls.js +55 -0
- package/dist/formats/webgpu/core/wgsl/precisionControls.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/selectionPlans.js +758 -0
- package/dist/formats/webgpu/core/wgsl/selectionPlans.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/uniformity.js +78 -0
- package/dist/formats/webgpu/core/wgsl/uniformity.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/validateExactComputeIr.js +196 -0
- package/dist/formats/webgpu/core/wgsl/validateExactComputeIr.js.map +1 -0
- package/dist/formats/webgpu/core/wgsl/validateHandleOperand.js +37 -0
- package/dist/formats/webgpu/core/wgsl/validateHandleOperand.js.map +1 -0
- package/dist/formats/webgpu/index.js +2 -0
- package/dist/formats/webgpu/index.js.map +1 -0
- package/dist/formats/webm/core/helpers.js +35 -0
- package/dist/formats/webm/core/helpers.js.map +1 -1
- package/dist/formats/webp/CjsWebpFormat.js +49 -0
- package/dist/formats/webp/CjsWebpFormat.js.map +1 -1
- package/dist/formats/webp/core/helpers.js +23 -0
- package/dist/formats/webp/core/helpers.js.map +1 -1
- package/dist/formats/wem/CjsWemFormat.js +8 -0
- package/dist/formats/wem/CjsWemFormat.js.map +1 -1
- package/dist/formats/wem/core/bitStream.js +2 -0
- package/dist/formats/wem/core/bitStream.js.map +1 -1
- package/dist/formats/wem/core/helpers.js +20 -0
- package/dist/formats/wem/core/helpers.js.map +1 -1
- package/dist/formats/yaml/CjsYamlFormat.js +45 -0
- package/dist/formats/yaml/CjsYamlFormat.js.map +1 -1
- package/dist/formats/yaml/core/CjsYamlReader.js +91 -0
- package/dist/formats/yaml/core/CjsYamlReader.js.map +1 -1
- package/dist/formats/yaml/core/helpers.js +10 -0
- package/dist/formats/yaml/core/helpers.js.map +1 -1
- package/dist/index.js +56 -43
- package/dist/index.js.map +1 -1
- package/dist/{CjsResource.js → resource/CjsResource.js} +232 -17
- package/dist/resource/CjsResource.js.map +1 -0
- package/dist/{resources → resource}/Tr2LightProfileRes.js +4 -3
- package/dist/resource/Tr2LightProfileRes.js.map +1 -0
- package/dist/{resources → resource/audio}/AudioGeometryResData.js +1 -1
- package/dist/resource/audio/AudioGeometryResData.js.map +1 -0
- package/dist/resource/audio/CjsAudioBufferRes.js +86 -0
- package/dist/resource/audio/CjsAudioBufferRes.js.map +1 -0
- package/dist/resource/audio/CjsAudioRes.js +213 -0
- package/dist/resource/audio/CjsAudioRes.js.map +1 -0
- package/dist/resource/audio/index.js +4 -0
- package/dist/resource/audio/index.js.map +1 -0
- package/dist/{resources → resource/geometry}/MeshDecalData.js +1 -1
- package/dist/resource/geometry/MeshDecalData.js.map +1 -0
- package/dist/{resources → resource/geometry}/MeshDecalLodData.js +1 -1
- package/dist/resource/geometry/MeshDecalLodData.js.map +1 -0
- package/dist/resource/geometry/TriGeometryRes.js +656 -0
- package/dist/resource/geometry/TriGeometryRes.js.map +1 -0
- package/dist/{resources → resource/geometry}/TriGeometryResAreaData.js +1 -1
- package/dist/resource/geometry/TriGeometryResAreaData.js.map +1 -0
- package/dist/{resources → resource/geometry}/TriGeometryResJointData.js +1 -1
- package/dist/resource/geometry/TriGeometryResJointData.js.map +1 -0
- package/dist/{resources → resource/geometry}/TriGeometryResLodData.js +1 -1
- package/dist/resource/geometry/TriGeometryResLodData.js.map +1 -0
- package/dist/{resources → resource/geometry}/TriGeometryResMeshData.js +1 -1
- package/dist/resource/geometry/TriGeometryResMeshData.js.map +1 -0
- package/dist/{resources → resource/geometry}/TriGeometryResSkeletonData.js +1 -1
- package/dist/resource/geometry/TriGeometryResSkeletonData.js.map +1 -0
- package/dist/{resources → resource/geometry}/TriJointBinding.js +1 -1
- package/dist/resource/geometry/TriJointBinding.js.map +1 -0
- package/dist/{resources → resource/geometry}/TriMorphTargetGeometryConstants.js +1 -1
- package/dist/resource/geometry/TriMorphTargetGeometryConstants.js.map +1 -0
- package/dist/{resources → resource/geometry}/TriRtGeometryConstants.js +1 -1
- package/dist/resource/geometry/TriRtGeometryConstants.js.map +1 -0
- package/dist/{resources → resource/geometry/granny}/GStateBindingCallbackData.js +1 -1
- package/dist/resource/geometry/granny/GStateBindingCallbackData.js.map +1 -0
- package/dist/{resources → resource/geometry/granny}/Tr2GrannyIntersectionResult.js +1 -1
- package/dist/resource/geometry/granny/Tr2GrannyIntersectionResult.js.map +1 -0
- package/dist/{resources → resource/geometry/granny}/Tr2GrannyStateRes.js +6 -5
- package/dist/resource/geometry/granny/Tr2GrannyStateRes.js.map +1 -0
- package/dist/{resources → resource/geometry/granny}/TriGrannyRes.js +6 -5
- package/dist/resource/geometry/granny/TriGrannyRes.js.map +1 -0
- package/dist/{resources → resource/geometry/granny}/enums.js +1 -9
- package/dist/resource/geometry/granny/enums.js.map +1 -0
- package/dist/resource/geometry/granny/index.js +6 -0
- package/dist/resource/geometry/granny/index.js.map +1 -0
- package/dist/resource/geometry/index.js +17 -0
- package/dist/resource/geometry/index.js.map +1 -0
- package/dist/resource/index.js +52 -0
- package/dist/resource/index.js.map +1 -0
- package/dist/resource/resourceBoundary.js +64 -0
- package/dist/resource/resourceBoundary.js.map +1 -0
- package/dist/resource/shader/Tr2EffectRes.js +429 -0
- package/dist/resource/shader/Tr2EffectRes.js.map +1 -0
- package/dist/resource/shader/Tr2MaterialArea.js +34 -0
- package/dist/resource/shader/Tr2MaterialArea.js.map +1 -0
- package/dist/resource/shader/Tr2MaterialMesh.js +30 -0
- package/dist/resource/shader/Tr2MaterialMesh.js.map +1 -0
- package/dist/resource/shader/Tr2MaterialRes.js +35 -0
- package/dist/resource/shader/Tr2MaterialRes.js.map +1 -0
- package/dist/resource/shader/Tr2Shader.js +256 -0
- package/dist/resource/shader/Tr2Shader.js.map +1 -0
- package/dist/resource/shader/Tr2ShaderPermutation.js +47 -0
- package/dist/resource/shader/Tr2ShaderPermutation.js.map +1 -0
- package/dist/resource/shader/index.js +17 -0
- package/dist/resource/shader/index.js.map +1 -0
- package/dist/resource/shader/portable.js +33 -0
- package/dist/resource/shader/portable.js.map +1 -0
- package/dist/resource/shader/reflection/Tr2EffectConstant.js +135 -0
- package/dist/resource/shader/reflection/Tr2EffectConstant.js.map +1 -0
- package/dist/resource/shader/reflection/Tr2EffectDefine.js +28 -0
- package/dist/resource/shader/reflection/Tr2EffectDefine.js.map +1 -0
- package/dist/resource/shader/reflection/Tr2EffectDescription.js +107 -0
- package/dist/resource/shader/reflection/Tr2EffectDescription.js.map +1 -0
- package/dist/resource/shader/reflection/Tr2EffectLibrary.js +145 -0
- package/dist/resource/shader/reflection/Tr2EffectLibrary.js.map +1 -0
- package/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js +103 -0
- package/dist/resource/shader/reflection/Tr2EffectParameterAnnotation.js.map +1 -0
- package/dist/resource/shader/reflection/Tr2EffectResource.js +84 -0
- package/dist/resource/shader/reflection/Tr2EffectResource.js.map +1 -0
- package/dist/resource/shader/reflection/Tr2EffectStageInput.js +239 -0
- package/dist/resource/shader/reflection/Tr2EffectStageInput.js.map +1 -0
- package/dist/resource/shader/reflection/Tr2EffectTechnique.js +66 -0
- package/dist/resource/shader/reflection/Tr2EffectTechnique.js.map +1 -0
- package/dist/resource/shader/reflection/Tr2Pass.js +109 -0
- package/dist/resource/shader/reflection/Tr2Pass.js.map +1 -0
- package/dist/resource/shader/sampler/Tr2SamplerSetup.js +75 -0
- package/dist/resource/shader/sampler/Tr2SamplerSetup.js.map +1 -0
- package/dist/{texture → resource/texture}/CjsTextureArrayRes.js +83 -6
- package/dist/resource/texture/CjsTextureArrayRes.js.map +1 -0
- package/dist/{texture/CjsTextureParameterProxy.js → resource/texture/CjsTextureArrayResParameterProxy.js} +56 -10
- package/dist/resource/texture/CjsTextureArrayResParameterProxy.js.map +1 -0
- package/dist/{resources → resource/texture}/Tr2ImageRes.js +6 -4
- package/dist/resource/texture/Tr2ImageRes.js.map +1 -0
- package/dist/{resources → resource/texture}/Tr2TextureLodManager.js +3 -1
- package/dist/resource/texture/Tr2TextureLodManager.js.map +1 -0
- package/dist/{resources → resource/texture}/Tr2TextureLodUpdateRequest.js +1 -1
- package/dist/resource/texture/Tr2TextureLodUpdateRequest.js.map +1 -0
- package/dist/{resources → resource/texture}/Tr2TexturePackChannel.js +1 -1
- package/dist/resource/texture/Tr2TexturePackChannel.js.map +1 -0
- package/dist/{resources → resource/texture}/Tr2TexturePipeline.js +6 -4
- package/dist/resource/texture/Tr2TexturePipeline.js.map +1 -0
- package/dist/{resources → resource/texture}/Tr2TexturePipelineParams.js +1 -1
- package/dist/resource/texture/Tr2TexturePipelineParams.js.map +1 -0
- package/dist/{resources → resource/texture}/Tr2TexturePipelineStepCompress.js +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepCompress.js.map +1 -0
- package/dist/{resources → resource/texture}/Tr2TexturePipelineStepGenerateMips.js +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepGenerateMips.js.map +1 -0
- package/dist/{resources → resource/texture}/Tr2TexturePipelineStepLimitSize.js +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepLimitSize.js.map +1 -0
- package/dist/{resources → resource/texture}/Tr2TexturePipelineStepLoad.js +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepLoad.js.map +1 -0
- package/dist/{resources → resource/texture}/Tr2TexturePipelineStepPack.js +1 -1
- package/dist/resource/texture/Tr2TexturePipelineStepPack.js.map +1 -0
- package/dist/{resources → resource/texture}/TriTextureRes.js +42 -26
- package/dist/resource/texture/TriTextureRes.js.map +1 -0
- package/dist/resource/texture/index.js +15 -0
- package/dist/resource/texture/index.js.map +1 -0
- package/dist/{resources → resource/texture}/texturePipelineBehavior.js +59 -59
- package/dist/resource/texture/texturePipelineBehavior.js.map +1 -0
- package/dist/worker/CjsResManMainThreadLoader.js +87 -0
- package/dist/worker/CjsResManMainThreadLoader.js.map +1 -0
- package/dist/worker/CjsResManWorker.js +217 -0
- package/dist/worker/CjsResManWorker.js.map +1 -0
- package/dist/worker/CjsResManWorkerLoader.js +434 -0
- package/dist/worker/CjsResManWorkerLoader.js.map +1 -0
- package/dist/worker/protocol.js +12 -0
- package/dist/worker/protocol.js.map +1 -0
- package/docs/README.md +16 -3
- package/docs/architecture.md +39 -16
- package/docs/concepts/resource-lifecycle.md +2 -1
- package/docs/formats/README.md +8 -0
- package/docs/formats/provenance.md +11 -3
- package/docs/reference/classes/README.md +6 -4
- package/docs/reference/classes/audio.md +30 -0
- package/docs/reference/classes/core.md +31 -11
- package/docs/reference/classes/formats.md +440 -0
- package/docs/reference/classes/resources.md +151 -41
- package/docs/reference/classes/texture.md +7 -7
- package/docs/reference/motherlode-cache.md +17 -0
- package/docs/reference/queues.md +9 -1
- package/docs/reference/workers.md +135 -0
- package/docs/roadmap.md +27 -1
- package/format-notices/dxbc/LICENSE +21 -0
- package/format-notices/dxbc/NOTICE +20 -0
- package/format-notices/hlsl/LICENSE +21 -0
- package/format-notices/hlsl/NOTICE +25 -0
- package/format-notices/webgl/LICENSE +21 -0
- package/format-notices/webgl/NOTICE +35 -0
- package/format-notices/webgpu/LICENSE +21 -0
- package/format-notices/webgpu/NOTICE +31 -0
- package/package.json +13 -1
- package/dist/CjsResManQueue.js.map +0 -1
- package/dist/CjsResource.js.map +0 -1
- package/dist/CjsResourceSource.js +0 -68
- package/dist/CjsResourceSource.js.map +0 -1
- package/dist/resourcePath.js +0 -18
- package/dist/resourcePath.js.map +0 -1
- package/dist/resourceStates.js +0 -9
- package/dist/resourceStates.js.map +0 -1
- package/dist/resources/AudioGeometryResData.js.map +0 -1
- package/dist/resources/GStateBindingCallbackData.js.map +0 -1
- package/dist/resources/MeshDecalData.js.map +0 -1
- package/dist/resources/MeshDecalLodData.js.map +0 -1
- package/dist/resources/Tr2EffectRes.js +0 -71
- package/dist/resources/Tr2EffectRes.js.map +0 -1
- package/dist/resources/Tr2GrannyIntersectionResult.js.map +0 -1
- package/dist/resources/Tr2GrannyStateRes.js.map +0 -1
- package/dist/resources/Tr2ImageRes.js.map +0 -1
- package/dist/resources/Tr2LightProfileRes.js.map +0 -1
- package/dist/resources/Tr2MaterialArea.js +0 -34
- package/dist/resources/Tr2MaterialArea.js.map +0 -1
- package/dist/resources/Tr2MaterialMesh.js +0 -31
- package/dist/resources/Tr2MaterialMesh.js.map +0 -1
- package/dist/resources/Tr2MaterialRes.js +0 -34
- package/dist/resources/Tr2MaterialRes.js.map +0 -1
- package/dist/resources/Tr2ShaderPermutation.js +0 -43
- package/dist/resources/Tr2ShaderPermutation.js.map +0 -1
- package/dist/resources/Tr2TextureLodManager.js.map +0 -1
- package/dist/resources/Tr2TextureLodUpdateRequest.js.map +0 -1
- package/dist/resources/Tr2TexturePackChannel.js.map +0 -1
- package/dist/resources/Tr2TexturePipeline.js.map +0 -1
- package/dist/resources/Tr2TexturePipelineParams.js.map +0 -1
- package/dist/resources/Tr2TexturePipelineStepCompress.js.map +0 -1
- package/dist/resources/Tr2TexturePipelineStepGenerateMips.js.map +0 -1
- package/dist/resources/Tr2TexturePipelineStepLimitSize.js.map +0 -1
- package/dist/resources/Tr2TexturePipelineStepLoad.js.map +0 -1
- package/dist/resources/Tr2TexturePipelineStepPack.js.map +0 -1
- package/dist/resources/TriGeometryRes.js +0 -239
- package/dist/resources/TriGeometryRes.js.map +0 -1
- package/dist/resources/TriGeometryResAreaData.js.map +0 -1
- package/dist/resources/TriGeometryResJointData.js.map +0 -1
- package/dist/resources/TriGeometryResLodData.js.map +0 -1
- package/dist/resources/TriGeometryResMeshData.js.map +0 -1
- package/dist/resources/TriGeometryResSkeletonData.js.map +0 -1
- package/dist/resources/TriGrannyRes.js.map +0 -1
- package/dist/resources/TriJointBinding.js.map +0 -1
- package/dist/resources/TriMorphTargetGeometryConstants.js.map +0 -1
- package/dist/resources/TriRtGeometryConstants.js.map +0 -1
- package/dist/resources/TriTextureRes.js.map +0 -1
- package/dist/resources/enums.js.map +0 -1
- package/dist/resources/resourceBoundary.js +0 -47
- package/dist/resources/resourceBoundary.js.map +0 -1
- package/dist/resources/texturePipelineBehavior.js.map +0 -1
- package/dist/texture/CjsTextureArrayRes.js.map +0 -1
- package/dist/texture/CjsTextureParameterProxy.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Resources class catalog
|
|
2
2
|
|
|
3
3
|
Status: Evolving
|
|
4
|
-
Scope: `@carbonenginejs/runtime-resource` classes under `src/
|
|
4
|
+
Scope: `@carbonenginejs/runtime-resource` classes under `src/resource`
|
|
5
5
|
Audience: Users, maintainers, and automated readers
|
|
6
|
-
Summary: Provides one-sentence purpose descriptors for the Carbon-shaped semantic resource and data classes in src/
|
|
6
|
+
Summary: Provides one-sentence purpose descriptors for the Carbon-shaped semantic resource and data classes in the src/resource family tree.
|
|
7
7
|
|
|
8
8
|
<!-- class:AudioGeometryResData -->
|
|
9
9
|
## `AudioGeometryResData`
|
|
@@ -11,7 +11,7 @@ Summary: Provides one-sentence purpose descriptors for the Carbon-shaped semanti
|
|
|
11
11
|
Data record mirroring Carbon's per-mesh audio-geometry block: an id plus the vertices, indices, and min/max bounds consumed by audio occlusion.
|
|
12
12
|
|
|
13
13
|
- Export: `@carbonenginejs/runtime-resource`
|
|
14
|
-
- Source: `src/
|
|
14
|
+
- Source: `src/resource/audio/AudioGeometryResData.js`
|
|
15
15
|
- Visibility: Public
|
|
16
16
|
- Kind: Faithful Carbon port
|
|
17
17
|
|
|
@@ -21,7 +21,7 @@ Data record mirroring Carbon's per-mesh audio-geometry block: an id plus the ver
|
|
|
21
21
|
Data record mirroring Carbon's GState binding callback payload, holding the `gsf_path` string that identifies the Granny state file to bind.
|
|
22
22
|
|
|
23
23
|
- Export: `@carbonenginejs/runtime-resource`
|
|
24
|
-
- Source: `src/
|
|
24
|
+
- Source: `src/resource/geometry/granny/GStateBindingCallbackData.js`
|
|
25
25
|
- Visibility: Public
|
|
26
26
|
- Kind: Faithful Carbon port
|
|
27
27
|
|
|
@@ -31,7 +31,7 @@ Data record mirroring Carbon's GState binding callback payload, holding the `gsf
|
|
|
31
31
|
Data record mirroring Carbon's per-mesh decal block: an index-buffer allocation reference, a LOD mask, and the per-LOD decal ranges.
|
|
32
32
|
|
|
33
33
|
- Export: `@carbonenginejs/runtime-resource`
|
|
34
|
-
- Source: `src/
|
|
34
|
+
- Source: `src/resource/geometry/MeshDecalData.js`
|
|
35
35
|
- Visibility: Public
|
|
36
36
|
- Kind: Faithful Carbon port
|
|
37
37
|
|
|
@@ -41,17 +41,127 @@ Data record mirroring Carbon's per-mesh decal block: an index-buffer allocation
|
|
|
41
41
|
Data record mirroring Carbon's per-LOD decal range, holding the start index and primitive count for one decal LOD.
|
|
42
42
|
|
|
43
43
|
- Export: `@carbonenginejs/runtime-resource`
|
|
44
|
-
- Source: `src/
|
|
44
|
+
- Source: `src/resource/geometry/MeshDecalLodData.js`
|
|
45
45
|
- Visibility: Public
|
|
46
46
|
- Kind: Faithful Carbon port
|
|
47
47
|
|
|
48
48
|
<!-- class:Tr2EffectRes -->
|
|
49
49
|
## `Tr2EffectRes`
|
|
50
50
|
|
|
51
|
-
Resource record that owns effect
|
|
51
|
+
Resource record that owns an effect package, resolves global and local permutation options, hydrates exact portable reflection into canonical shaders, and caches them by body index.
|
|
52
52
|
|
|
53
53
|
- Export: `@carbonenginejs/runtime-resource`
|
|
54
|
-
- Source: `src/
|
|
54
|
+
- Source: `src/resource/shader/Tr2EffectRes.js`
|
|
55
|
+
- Visibility: Public
|
|
56
|
+
- Kind: Adapted Carbon concept
|
|
57
|
+
|
|
58
|
+
<!-- class:Tr2EffectConstant -->
|
|
59
|
+
## `Tr2EffectConstant`
|
|
60
|
+
|
|
61
|
+
Canonical device-free reflection record for one named constant, including register layout and exact default bytes.
|
|
62
|
+
|
|
63
|
+
- Export: `@carbonenginejs/runtime-resource/resource/shader`
|
|
64
|
+
- Source: `src/resource/shader/reflection/Tr2EffectConstant.js`
|
|
65
|
+
- Visibility: Public
|
|
66
|
+
- Kind: Adapted Carbon concept
|
|
67
|
+
|
|
68
|
+
<!-- class:Tr2EffectDefine -->
|
|
69
|
+
## `Tr2EffectDefine`
|
|
70
|
+
|
|
71
|
+
Canonical name/value record for one reflected effect define.
|
|
72
|
+
|
|
73
|
+
- Export: `@carbonenginejs/runtime-resource/resource/shader`
|
|
74
|
+
- Source: `src/resource/shader/reflection/Tr2EffectDefine.js`
|
|
75
|
+
- Visibility: Public
|
|
76
|
+
- Kind: Faithful Carbon port
|
|
77
|
+
|
|
78
|
+
<!-- class:Tr2EffectDescription -->
|
|
79
|
+
## `Tr2EffectDescription`
|
|
80
|
+
|
|
81
|
+
Canonical device-free effect body containing techniques, annotations, and library reflection.
|
|
82
|
+
|
|
83
|
+
- Export: `@carbonenginejs/runtime-resource/resource/shader`
|
|
84
|
+
- Source: `src/resource/shader/reflection/Tr2EffectDescription.js`
|
|
85
|
+
- Visibility: Public
|
|
86
|
+
- Kind: Adapted Carbon concept
|
|
87
|
+
|
|
88
|
+
<!-- class:Tr2EffectLibrary -->
|
|
89
|
+
## `Tr2EffectLibrary`
|
|
90
|
+
|
|
91
|
+
Canonical reflected shader-library record containing source bytes, exported symbols, and derived ray-tracing entry roles.
|
|
92
|
+
|
|
93
|
+
- Export: `@carbonenginejs/runtime-resource/resource/shader`
|
|
94
|
+
- Source: `src/resource/shader/reflection/Tr2EffectLibrary.js`
|
|
95
|
+
- Visibility: Public
|
|
96
|
+
- Kind: Adapted Carbon concept
|
|
97
|
+
|
|
98
|
+
<!-- class:Tr2EffectParameterAnnotation -->
|
|
99
|
+
## `Tr2EffectParameterAnnotation`
|
|
100
|
+
|
|
101
|
+
Canonical typed parameter annotation that also preserves its exact raw scalar bits.
|
|
102
|
+
|
|
103
|
+
- Export: `@carbonenginejs/runtime-resource/resource/shader`
|
|
104
|
+
- Source: `src/resource/shader/reflection/Tr2EffectParameterAnnotation.js`
|
|
105
|
+
- Visibility: Public
|
|
106
|
+
- Kind: Adapted Carbon concept
|
|
107
|
+
|
|
108
|
+
<!-- class:Tr2EffectResource -->
|
|
109
|
+
## `Tr2EffectResource`
|
|
110
|
+
|
|
111
|
+
Canonical stage-resource reflection record for textures, buffers, UAVs, and related binding metadata.
|
|
112
|
+
|
|
113
|
+
- Export: `@carbonenginejs/runtime-resource/resource/shader`
|
|
114
|
+
- Source: `src/resource/shader/reflection/Tr2EffectResource.js`
|
|
115
|
+
- Visibility: Public
|
|
116
|
+
- Kind: Adapted Carbon concept
|
|
117
|
+
|
|
118
|
+
<!-- class:Tr2EffectStageInput -->
|
|
119
|
+
## `Tr2EffectStageInput`
|
|
120
|
+
|
|
121
|
+
Canonical device-free stage record containing source program bytes, constants, resources, samplers, and signatures.
|
|
122
|
+
|
|
123
|
+
- Export: `@carbonenginejs/runtime-resource/resource/shader`
|
|
124
|
+
- Source: `src/resource/shader/reflection/Tr2EffectStageInput.js`
|
|
125
|
+
- Visibility: Public
|
|
126
|
+
- Kind: Adapted Carbon concept
|
|
127
|
+
|
|
128
|
+
<!-- class:Tr2EffectTechnique -->
|
|
129
|
+
## `Tr2EffectTechnique`
|
|
130
|
+
|
|
131
|
+
Canonical named technique record containing its ordered reflected passes and shader-type mask.
|
|
132
|
+
|
|
133
|
+
- Export: `@carbonenginejs/runtime-resource/resource/shader`
|
|
134
|
+
- Source: `src/resource/shader/reflection/Tr2EffectTechnique.js`
|
|
135
|
+
- Visibility: Public
|
|
136
|
+
- Kind: Adapted Carbon concept
|
|
137
|
+
|
|
138
|
+
<!-- class:Tr2Pass -->
|
|
139
|
+
## `Tr2Pass`
|
|
140
|
+
|
|
141
|
+
Canonical reflected pass record containing ordered stage inputs and renderer-neutral render-state values.
|
|
142
|
+
|
|
143
|
+
- Export: `@carbonenginejs/runtime-resource/resource/shader`
|
|
144
|
+
- Source: `src/resource/shader/reflection/Tr2Pass.js`
|
|
145
|
+
- Visibility: Public
|
|
146
|
+
- Kind: Adapted Carbon concept
|
|
147
|
+
|
|
148
|
+
<!-- class:Tr2SamplerSetup -->
|
|
149
|
+
## `Tr2SamplerSetup`
|
|
150
|
+
|
|
151
|
+
Canonical device-free sampler reflection record preserving static/dynamic setup and nullable source names.
|
|
152
|
+
|
|
153
|
+
- Export: `@carbonenginejs/runtime-resource/resource/shader`
|
|
154
|
+
- Source: `src/resource/shader/sampler/Tr2SamplerSetup.js`
|
|
155
|
+
- Visibility: Public
|
|
156
|
+
- Kind: Adapted Carbon concept
|
|
157
|
+
|
|
158
|
+
<!-- class:Tr2Shader -->
|
|
159
|
+
## `Tr2Shader`
|
|
160
|
+
|
|
161
|
+
Canonical device-free hydrated shader graph and top-level portable-reflection orchestrator.
|
|
162
|
+
|
|
163
|
+
- Export: `@carbonenginejs/runtime-resource/resource/shader`
|
|
164
|
+
- Source: `src/resource/shader/Tr2Shader.js`
|
|
55
165
|
- Visibility: Public
|
|
56
166
|
- Kind: Adapted Carbon concept
|
|
57
167
|
|
|
@@ -61,7 +171,7 @@ Resource record that owns effect/shader payload facts, including the permutation
|
|
|
61
171
|
Data record mirroring Carbon's Granny intersection-query result: hit position, normal, UV, bone index, and mesh/area indices with per-field presence flags.
|
|
62
172
|
|
|
63
173
|
- Export: `@carbonenginejs/runtime-resource`
|
|
64
|
-
- Source: `src/
|
|
174
|
+
- Source: `src/resource/geometry/granny/Tr2GrannyIntersectionResult.js`
|
|
65
175
|
- Visibility: Public
|
|
66
176
|
- Kind: Faithful Carbon port
|
|
67
177
|
|
|
@@ -71,7 +181,7 @@ Data record mirroring Carbon's Granny intersection-query result: hit position, n
|
|
|
71
181
|
Resource that holds a plain GState payload, which may carry additive skeleton/state data without models, and validates that skeleton data or additive animations are present.
|
|
72
182
|
|
|
73
183
|
- Export: `@carbonenginejs/runtime-resource`
|
|
74
|
-
- Source: `src/
|
|
184
|
+
- Source: `src/resource/geometry/granny/Tr2GrannyStateRes.js`
|
|
75
185
|
- Visibility: Public
|
|
76
186
|
- Kind: Adapted Carbon concept
|
|
77
187
|
|
|
@@ -81,7 +191,7 @@ Resource that holds a plain GState payload, which may carry additive skeleton/st
|
|
|
81
191
|
Resource record that holds a validated canonical RGBA image payload and mirrors its width/height metadata, leaving any device texture realization to engine packages.
|
|
82
192
|
|
|
83
193
|
- Export: `@carbonenginejs/runtime-resource`
|
|
84
|
-
- Source: `src/
|
|
194
|
+
- Source: `src/resource/texture/Tr2ImageRes.js`
|
|
85
195
|
- Visibility: Public
|
|
86
196
|
- Kind: Adapted Carbon concept
|
|
87
197
|
|
|
@@ -91,47 +201,47 @@ Resource record that holds a validated canonical RGBA image payload and mirrors
|
|
|
91
201
|
Resource that holds a plain light-profile payload, which may be richer than the data retained by the resource or the active engine adapter.
|
|
92
202
|
|
|
93
203
|
- Export: `@carbonenginejs/runtime-resource`
|
|
94
|
-
- Source: `src/
|
|
204
|
+
- Source: `src/resource/Tr2LightProfileRes.js`
|
|
95
205
|
- Visibility: Public
|
|
96
206
|
- Kind: Adapted Carbon concept
|
|
97
207
|
|
|
98
208
|
<!-- class:Tr2MaterialArea -->
|
|
99
209
|
## `Tr2MaterialArea`
|
|
100
210
|
|
|
101
|
-
|
|
211
|
+
Associates one material-area metatype with its persisted parameter store.
|
|
102
212
|
|
|
103
213
|
- Export: `@carbonenginejs/runtime-resource`
|
|
104
|
-
- Source: `src/
|
|
214
|
+
- Source: `src/resource/shader/Tr2MaterialArea.js`
|
|
105
215
|
- Visibility: Public
|
|
106
216
|
- Kind: Faithful Carbon port
|
|
107
217
|
|
|
108
218
|
<!-- class:Tr2MaterialMesh -->
|
|
109
219
|
## `Tr2MaterialMesh`
|
|
110
220
|
|
|
111
|
-
|
|
221
|
+
Holds the persisted material-area dictionary for one material mesh.
|
|
112
222
|
|
|
113
223
|
- Export: `@carbonenginejs/runtime-resource`
|
|
114
|
-
- Source: `src/
|
|
224
|
+
- Source: `src/resource/shader/Tr2MaterialMesh.js`
|
|
115
225
|
- Visibility: Public
|
|
116
226
|
- Kind: Faithful Carbon port
|
|
117
227
|
|
|
118
228
|
<!-- class:Tr2MaterialRes -->
|
|
119
229
|
## `Tr2MaterialRes`
|
|
120
230
|
|
|
121
|
-
|
|
231
|
+
Root persisted material record containing its authored name and material mesh dictionary.
|
|
122
232
|
|
|
123
233
|
- Export: `@carbonenginejs/runtime-resource`
|
|
124
|
-
- Source: `src/
|
|
234
|
+
- Source: `src/resource/shader/Tr2MaterialRes.js`
|
|
125
235
|
- Visibility: Public
|
|
126
236
|
- Kind: Faithful Carbon port
|
|
127
237
|
|
|
128
238
|
<!-- class:Tr2ShaderPermutation -->
|
|
129
239
|
## `Tr2ShaderPermutation`
|
|
130
240
|
|
|
131
|
-
|
|
241
|
+
Describes one authored effect permutation and the option values a shader resolver may select.
|
|
132
242
|
|
|
133
243
|
- Export: `@carbonenginejs/runtime-resource`
|
|
134
|
-
- Source: `src/
|
|
244
|
+
- Source: `src/resource/shader/Tr2ShaderPermutation.js`
|
|
135
245
|
- Visibility: Public
|
|
136
246
|
- Kind: Faithful Carbon port
|
|
137
247
|
|
|
@@ -141,7 +251,7 @@ Data record mirroring Carbon's shader-permutation description: name, option list
|
|
|
141
251
|
CPU-side registry of texture resources participating in LOD management that owns deterministic membership and Carbon-shaped memory counters, while device allocation and budget policy stay in engine packages.
|
|
142
252
|
|
|
143
253
|
- Export: `@carbonenginejs/runtime-resource`
|
|
144
|
-
- Source: `src/
|
|
254
|
+
- Source: `src/resource/texture/Tr2TextureLodManager.js`
|
|
145
255
|
- Visibility: Public
|
|
146
256
|
- Kind: Adapted Carbon concept
|
|
147
257
|
|
|
@@ -151,7 +261,7 @@ CPU-side registry of texture resources participating in LOD management that owns
|
|
|
151
261
|
Data record mirroring Carbon's texture-LOD update request: the frame number, requested mip change, and RAM-cache flag.
|
|
152
262
|
|
|
153
263
|
- Export: `@carbonenginejs/runtime-resource`
|
|
154
|
-
- Source: `src/
|
|
264
|
+
- Source: `src/resource/texture/Tr2TextureLodUpdateRequest.js`
|
|
155
265
|
- Visibility: Public
|
|
156
266
|
- Kind: Faithful Carbon port
|
|
157
267
|
|
|
@@ -161,7 +271,7 @@ Data record mirroring Carbon's texture-LOD update request: the frame number, req
|
|
|
161
271
|
Persisted data record mirroring Carbon's pack-step channel selection: the source channel index, fill value, and source texture path for one output channel.
|
|
162
272
|
|
|
163
273
|
- Export: `@carbonenginejs/runtime-resource`
|
|
164
|
-
- Source: `src/
|
|
274
|
+
- Source: `src/resource/texture/Tr2TexturePackChannel.js`
|
|
165
275
|
- Visibility: Public
|
|
166
276
|
- Kind: Faithful Carbon port
|
|
167
277
|
|
|
@@ -171,7 +281,7 @@ Persisted data record mirroring Carbon's pack-step channel selection: the source
|
|
|
171
281
|
Persisted CPU bitmap-transformation pipeline that executes its ordered steps asynchronously to produce a canonical plain RGBA payload and reports the resource paths its load and pack steps depend on.
|
|
172
282
|
|
|
173
283
|
- Export: `@carbonenginejs/runtime-resource`
|
|
174
|
-
- Source: `src/
|
|
284
|
+
- Source: `src/resource/texture/Tr2TexturePipeline.js`
|
|
175
285
|
- Visibility: Public
|
|
176
286
|
- Kind: Adapted Carbon concept
|
|
177
287
|
|
|
@@ -181,7 +291,7 @@ Persisted CPU bitmap-transformation pipeline that executes its ordered steps asy
|
|
|
181
291
|
Data record mirroring Carbon's texture-pipeline execution parameters, holding the maximum output width and height.
|
|
182
292
|
|
|
183
293
|
- Export: `@carbonenginejs/runtime-resource`
|
|
184
|
-
- Source: `src/
|
|
294
|
+
- Source: `src/resource/texture/Tr2TexturePipelineParams.js`
|
|
185
295
|
- Visibility: Public
|
|
186
296
|
- Kind: Faithful Carbon port
|
|
187
297
|
|
|
@@ -191,7 +301,7 @@ Data record mirroring Carbon's texture-pipeline execution parameters, holding th
|
|
|
191
301
|
Persisted pipeline-step record mirroring Carbon's compress step, naming the target pixel format and per-channel error weights.
|
|
192
302
|
|
|
193
303
|
- Export: `@carbonenginejs/runtime-resource`
|
|
194
|
-
- Source: `src/
|
|
304
|
+
- Source: `src/resource/texture/Tr2TexturePipelineStepCompress.js`
|
|
195
305
|
- Visibility: Public
|
|
196
306
|
- Kind: Faithful Carbon port
|
|
197
307
|
|
|
@@ -201,7 +311,7 @@ Persisted pipeline-step record mirroring Carbon's compress step, naming the targ
|
|
|
201
311
|
Attribute-free persisted marker step mirroring Carbon's mip-generation step; the mip generation itself happens where the pipeline executes.
|
|
202
312
|
|
|
203
313
|
- Export: `@carbonenginejs/runtime-resource`
|
|
204
|
-
- Source: `src/
|
|
314
|
+
- Source: `src/resource/texture/Tr2TexturePipelineStepGenerateMips.js`
|
|
205
315
|
- Visibility: Public
|
|
206
316
|
- Kind: Faithful Carbon port
|
|
207
317
|
|
|
@@ -211,7 +321,7 @@ Attribute-free persisted marker step mirroring Carbon's mip-generation step; the
|
|
|
211
321
|
Persisted pipeline-step record mirroring Carbon's size-limit step, holding the maximum width and height the bitmap may keep.
|
|
212
322
|
|
|
213
323
|
- Export: `@carbonenginejs/runtime-resource`
|
|
214
|
-
- Source: `src/
|
|
324
|
+
- Source: `src/resource/texture/Tr2TexturePipelineStepLimitSize.js`
|
|
215
325
|
- Visibility: Public
|
|
216
326
|
- Kind: Faithful Carbon port
|
|
217
327
|
|
|
@@ -221,7 +331,7 @@ Persisted pipeline-step record mirroring Carbon's size-limit step, holding the m
|
|
|
221
331
|
Persisted pipeline-step record mirroring Carbon's load step, holding the source texture path the pipeline reads.
|
|
222
332
|
|
|
223
333
|
- Export: `@carbonenginejs/runtime-resource`
|
|
224
|
-
- Source: `src/
|
|
334
|
+
- Source: `src/resource/texture/Tr2TexturePipelineStepLoad.js`
|
|
225
335
|
- Visibility: Public
|
|
226
336
|
- Kind: Faithful Carbon port
|
|
227
337
|
|
|
@@ -231,7 +341,7 @@ Persisted pipeline-step record mirroring Carbon's load step, holding the source
|
|
|
231
341
|
Persisted pipeline-step record mirroring Carbon's pack step, naming the target pixel format and the four per-channel pack sources.
|
|
232
342
|
|
|
233
343
|
- Export: `@carbonenginejs/runtime-resource`
|
|
234
|
-
- Source: `src/
|
|
344
|
+
- Source: `src/resource/texture/Tr2TexturePipelineStepPack.js`
|
|
235
345
|
- Visibility: Public
|
|
236
346
|
- Kind: Faithful Carbon port
|
|
237
347
|
|
|
@@ -241,7 +351,7 @@ Persisted pipeline-step record mirroring Carbon's pack step, naming the target p
|
|
|
241
351
|
Resource record that owns geometry payload facts (meshes, optional skeletons and animations) and LOD-force metadata, while engine packages decide device buffers, vertex declarations, and draw-time state.
|
|
242
352
|
|
|
243
353
|
- Export: `@carbonenginejs/runtime-resource`
|
|
244
|
-
- Source: `src/
|
|
354
|
+
- Source: `src/resource/geometry/TriGeometryRes.js`
|
|
245
355
|
- Visibility: Public
|
|
246
356
|
- Kind: Adapted Carbon concept
|
|
247
357
|
|
|
@@ -251,7 +361,7 @@ Resource record that owns geometry payload facts (meshes, optional skeletons and
|
|
|
251
361
|
Data record mirroring Carbon's geometry area block: a named draw range with bounds, joint bindings, skinning/morph flags, and ray-tracing structure references.
|
|
252
362
|
|
|
253
363
|
- Export: `@carbonenginejs/runtime-resource`
|
|
254
|
-
- Source: `src/
|
|
364
|
+
- Source: `src/resource/geometry/TriGeometryResAreaData.js`
|
|
255
365
|
- Visibility: Public
|
|
256
366
|
- Kind: Faithful Carbon port
|
|
257
367
|
|
|
@@ -261,7 +371,7 @@ Data record mirroring Carbon's geometry area block: a named draw range with boun
|
|
|
261
371
|
Data record mirroring Carbon's geometry joint entry: a joint name, parent-joint index, and inverse world transform.
|
|
262
372
|
|
|
263
373
|
- Export: `@carbonenginejs/runtime-resource`
|
|
264
|
-
- Source: `src/
|
|
374
|
+
- Source: `src/resource/geometry/TriGeometryResJointData.js`
|
|
265
375
|
- Visibility: Public
|
|
266
376
|
- Kind: Faithful Carbon port
|
|
267
377
|
|
|
@@ -271,7 +381,7 @@ Data record mirroring Carbon's geometry joint entry: a joint name, parent-joint
|
|
|
271
381
|
Data record mirroring Carbon's per-LOD geometry block: mesh reference, naming and screen-size selection data, vertex/primitive counts, UV densities, areas, and buffer-allocation references.
|
|
272
382
|
|
|
273
383
|
- Export: `@carbonenginejs/runtime-resource`
|
|
274
|
-
- Source: `src/
|
|
384
|
+
- Source: `src/resource/geometry/TriGeometryResLodData.js`
|
|
275
385
|
- Visibility: Public
|
|
276
386
|
- Kind: Faithful Carbon port
|
|
277
387
|
|
|
@@ -281,7 +391,7 @@ Data record mirroring Carbon's per-LOD geometry block: mesh reference, naming an
|
|
|
281
391
|
Data record mirroring Carbon's per-mesh geometry block: name, vertex layout facts, bounds, joint bindings, audio geometry, decals, and the LOD list.
|
|
282
392
|
|
|
283
393
|
- Export: `@carbonenginejs/runtime-resource`
|
|
284
|
-
- Source: `src/
|
|
394
|
+
- Source: `src/resource/geometry/TriGeometryResMeshData.js`
|
|
285
395
|
- Visibility: Public
|
|
286
396
|
- Kind: Faithful Carbon port
|
|
287
397
|
|
|
@@ -291,7 +401,7 @@ Data record mirroring Carbon's per-mesh geometry block: name, vertex layout fact
|
|
|
291
401
|
Data record mirroring Carbon's geometry skeleton block, pairing a skeleton name with its joint list.
|
|
292
402
|
|
|
293
403
|
- Export: `@carbonenginejs/runtime-resource`
|
|
294
|
-
- Source: `src/
|
|
404
|
+
- Source: `src/resource/geometry/TriGeometryResSkeletonData.js`
|
|
295
405
|
- Visibility: Public
|
|
296
406
|
- Kind: Faithful Carbon port
|
|
297
407
|
|
|
@@ -301,7 +411,7 @@ Data record mirroring Carbon's geometry skeleton block, pairing a skeleton name
|
|
|
301
411
|
Resource that owns lifecycle identity for decoded Granny data attached as a plain payload with models or meshes, keeping reader and engine-specific behavior outside the class.
|
|
302
412
|
|
|
303
413
|
- Export: `@carbonenginejs/runtime-resource`
|
|
304
|
-
- Source: `src/
|
|
414
|
+
- Source: `src/resource/geometry/granny/TriGrannyRes.js`
|
|
305
415
|
- Visibility: Public
|
|
306
416
|
- Kind: Adapted Carbon concept
|
|
307
417
|
|
|
@@ -311,7 +421,7 @@ Resource that owns lifecycle identity for decoded Granny data attached as a plai
|
|
|
311
421
|
Data record mirroring Carbon's joint binding: a joint name with its oriented-bounding-box minimum and maximum.
|
|
312
422
|
|
|
313
423
|
- Export: `@carbonenginejs/runtime-resource`
|
|
314
|
-
- Source: `src/
|
|
424
|
+
- Source: `src/resource/geometry/TriJointBinding.js`
|
|
315
425
|
- Visibility: Public
|
|
316
426
|
- Kind: Faithful Carbon port
|
|
317
427
|
|
|
@@ -321,7 +431,7 @@ Data record mirroring Carbon's joint binding: a joint name with its oriented-bou
|
|
|
321
431
|
Data record mirroring Carbon's morph-target geometry constants: vertex-buffer stride, position/tangent offsets and types, and vertex count.
|
|
322
432
|
|
|
323
433
|
- Export: `@carbonenginejs/runtime-resource`
|
|
324
|
-
- Source: `src/
|
|
434
|
+
- Source: `src/resource/geometry/TriMorphTargetGeometryConstants.js`
|
|
325
435
|
- Visibility: Public
|
|
326
436
|
- Kind: Faithful Carbon port
|
|
327
437
|
|
|
@@ -331,7 +441,7 @@ Data record mirroring Carbon's morph-target geometry constants: vertex-buffer st
|
|
|
331
441
|
Data record mirroring Carbon's ray-tracing geometry constants: index/vertex buffer ids and strides plus attribute offsets and types.
|
|
332
442
|
|
|
333
443
|
- Export: `@carbonenginejs/runtime-resource`
|
|
334
|
-
- Source: `src/
|
|
444
|
+
- Source: `src/resource/geometry/TriRtGeometryConstants.js`
|
|
335
445
|
- Visibility: Public
|
|
336
446
|
- Kind: Faithful Carbon port
|
|
337
447
|
|
|
@@ -341,6 +451,6 @@ Data record mirroring Carbon's ray-tracing geometry constants: index/vertex buff
|
|
|
341
451
|
Resource record that owns Carbon-style texture identity and validated texture, RGBA, or video payload facts with mirrored dimension/format metadata, while engine packages decide what those facts become on a device.
|
|
342
452
|
|
|
343
453
|
- Export: `@carbonenginejs/runtime-resource`
|
|
344
|
-
- Source: `src/
|
|
454
|
+
- Source: `src/resource/texture/TriTextureRes.js`
|
|
345
455
|
- Visibility: Public
|
|
346
456
|
- Kind: Adapted Carbon concept
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Texture class catalog
|
|
2
2
|
|
|
3
3
|
Status: Evolving
|
|
4
|
-
Scope: `@carbonenginejs/runtime-resource` classes under `src/texture`
|
|
4
|
+
Scope: `@carbonenginejs/runtime-resource` classes under `src/resource/texture`
|
|
5
5
|
Audience: Users, maintainers, and automated readers
|
|
6
|
-
Summary: Provides one-sentence purpose descriptors for the texture-array aggregation classes in src/texture.
|
|
6
|
+
Summary: Provides one-sentence purpose descriptors for the texture-array aggregation classes in src/resource/texture.
|
|
7
7
|
|
|
8
8
|
<!-- class:CjsTextureArrayRes -->
|
|
9
9
|
## `CjsTextureArrayRes`
|
|
@@ -11,16 +11,16 @@ Summary: Provides one-sentence purpose descriptors for the texture-array aggrega
|
|
|
11
11
|
Mutable runtime aggregate resource for an ordered texture-array request that coalesces per-layer path changes and invalidations so a resource manager or engine scheduler can prepare the corresponding immutable texture-array payload on a later frame.
|
|
12
12
|
|
|
13
13
|
- Export: `@carbonenginejs/runtime-resource`
|
|
14
|
-
- Source: `src/texture/CjsTextureArrayRes.js`
|
|
14
|
+
- Source: `src/resource/texture/CjsTextureArrayRes.js`
|
|
15
15
|
- Visibility: Public
|
|
16
16
|
- Kind: Original CarbonEngineJS class
|
|
17
17
|
|
|
18
|
-
<!-- class:
|
|
19
|
-
## `
|
|
18
|
+
<!-- class:CjsTextureArrayResParameterProxy -->
|
|
19
|
+
## `CjsTextureArrayResParameterProxy`
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
`CjsTextureArrayRes`-owned parameter facade for one array layer that mirrors the public path API while delegating storage, invalidation, readiness, and adapter ownership to its parent, carrying no shader metadata or backend objects itself.
|
|
22
22
|
|
|
23
23
|
- Export: `@carbonenginejs/runtime-resource`
|
|
24
|
-
- Source: `src/texture/
|
|
24
|
+
- Source: `src/resource/texture/CjsTextureArrayResParameterProxy.js`
|
|
25
25
|
- Visibility: Public
|
|
26
26
|
- Kind: Original CarbonEngineJS class
|
|
@@ -40,6 +40,23 @@ ordinary ownership removals preserve the handle's last resource state;
|
|
|
40
40
|
`PURGED` is reserved for successful policy eviction through inactivity or
|
|
41
41
|
byte pressure.
|
|
42
42
|
|
|
43
|
+
`PURGED` is not terminal for the handle. Purge deletes the payload, but the
|
|
44
|
+
handle revives itself: `IsGood()` renews activity through `KeepAlive()`, and
|
|
45
|
+
`KeepAlive()` reloads a purged resource along the ordinary first-load path. A
|
|
46
|
+
consumer therefore never learns that a purge happened and never manages
|
|
47
|
+
retention itself - it asks whether the resource is good, and that question is
|
|
48
|
+
what keeps it, or brings it back.
|
|
49
|
+
|
|
50
|
+
Liveness follows visibility. Something being drawn is asked about every frame
|
|
51
|
+
and stays live; something that stops being drawn stops being renewed, ages out,
|
|
52
|
+
and has its memory reclaimed; when it is drawn again the next `IsGood()`
|
|
53
|
+
restores it. `Reload()` is bounded by `maxReloadAttempts` precisely because the
|
|
54
|
+
render path calls this every frame, so one permanently missing resource cannot
|
|
55
|
+
become a retry storm. A reload refills the exact handle the consumer holds
|
|
56
|
+
rather than resolving whatever the manager currently caches for that path,
|
|
57
|
+
because a consumer holding a purged handle has no way to discover a
|
|
58
|
+
replacement.
|
|
59
|
+
|
|
43
60
|
`Startup()` and `Shutdown()` are idempotent. `HasKey`, `Lookup`, `Delete`,
|
|
44
61
|
`GetKeys`, `GetValues`, `GetSize`, `SetCacheSize`, `GetCacheSize`, `GetStats`,
|
|
45
62
|
`TrimCache`, `ReplaceExpected`, `Clear`, and `ClearCached` provide the
|
package/docs/reference/queues.md
CHANGED
|
@@ -15,7 +15,8 @@ BACKGROUND: deduplicated source load, limited by maxConcurrentLoads
|
|
|
15
15
|
MAIN: reader/format conversion -> resource publication
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Without worker execution, the main reader/format operation and publication
|
|
19
|
+
are separate queue items.
|
|
19
20
|
`maxPrepareTime` is a per-pump budget in seconds limiting synchronous
|
|
20
21
|
main-queue work started in one pump, and `maxPrepareItemsPerTick` can add an
|
|
21
22
|
item-count limit. Promise-returning format work remains in flight without
|
|
@@ -42,6 +43,12 @@ The selected format class owns conversion to the promised CPU output.
|
|
|
42
43
|
support, and it does not run backend realization. An engine consumes the
|
|
43
44
|
published CPU resource afterward through its own explicit operation.
|
|
44
45
|
|
|
46
|
+
When worker loading is selected, a declared worker-safe format read runs on
|
|
47
|
+
the module worker rather than occupying a main-queue item. The guarded
|
|
48
|
+
publication item remains on the main queue. `GetPendingWorkers()` and
|
|
49
|
+
`IsLoading()` include unresolved worker requests, and a queued resource
|
|
50
|
+
operation keeps the worker descendant within its `Wait()` lineage.
|
|
51
|
+
|
|
45
52
|
## Queue controls
|
|
46
53
|
|
|
47
54
|
Blue-compatible queue controls are exposed directly on `CjsResMan`:
|
|
@@ -98,5 +105,6 @@ registry.
|
|
|
98
105
|
## Related documentation
|
|
99
106
|
|
|
100
107
|
- [Resource lifecycle concepts](../concepts/resource-lifecycle.md)
|
|
108
|
+
- [Browser worker execution](workers.md)
|
|
101
109
|
- [MotherLode identity, cache, and retention](motherlode-cache.md)
|
|
102
110
|
- [Format subpaths](../formats/README.md)
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Browser worker execution
|
|
2
|
+
|
|
3
|
+
Status: Evolving
|
|
4
|
+
Scope: `@carbonenginejs/runtime-resource`
|
|
5
|
+
Audience: Browser integrators and format maintainers
|
|
6
|
+
Summary: Defines worker-backed source and format execution while keeping resource publication and class-bearing results on the caller thread.
|
|
7
|
+
|
|
8
|
+
## Enable worker execution
|
|
9
|
+
|
|
10
|
+
`CjsResMan` selects the bundled module-worker strategy by default and creates
|
|
11
|
+
the worker lazily on the first eligible source or format read:
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
import {
|
|
15
|
+
CjsResManFetchProvider,
|
|
16
|
+
CjsResMan
|
|
17
|
+
} from "@carbonenginejs/runtime-resource";
|
|
18
|
+
import { CjsWemFormat } from "@carbonenginejs/runtime-resource/formats/wem";
|
|
19
|
+
|
|
20
|
+
const resMan = new CjsResMan({
|
|
21
|
+
paths: {
|
|
22
|
+
res: "https://cdn.example.invalid/resources/"
|
|
23
|
+
},
|
|
24
|
+
source: new CjsResManFetchProvider(),
|
|
25
|
+
formats: [ CjsWemFormat ]
|
|
26
|
+
});
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Pass `useWorkerLoading: false` or call `UseWorkerLoading(false)` when a caller
|
|
30
|
+
requires deterministic main-thread execution.
|
|
31
|
+
|
|
32
|
+
The default worker entry is resolved relative to the published
|
|
33
|
+
`CjsResManWorkerLoader` module. A browser wrapper may instead inject an
|
|
34
|
+
existing Worker-compatible object, a `workerFactory`, or a `workerUrl` through
|
|
35
|
+
the `workerLoader` constructor option:
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
const resMan = new CjsResMan({
|
|
39
|
+
source,
|
|
40
|
+
workerLoader: {
|
|
41
|
+
workerFactory: (url, options) => new Worker(url, options)
|
|
42
|
+
},
|
|
43
|
+
useWorkerLoading: true
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Failure to create the worker leaves unsupported and later operations on the
|
|
48
|
+
main-thread fallback. A fatal worker error rejects requests already assigned
|
|
49
|
+
to that worker, disables it, and leaves future reads able to fall back.
|
|
50
|
+
|
|
51
|
+
## Source reads
|
|
52
|
+
|
|
53
|
+
A source opts into worker execution by implementing:
|
|
54
|
+
|
|
55
|
+
```js
|
|
56
|
+
CreateWorkerRequest(sourcePath, options) {
|
|
57
|
+
return {
|
|
58
|
+
operation: "source.fetch",
|
|
59
|
+
payload,
|
|
60
|
+
signal,
|
|
61
|
+
transfer
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Returning `null` selects the main-thread fallback for that read.
|
|
67
|
+
`CjsResMan` resolves the resource path to a URL before invoking a URL-backed
|
|
68
|
+
provider. `CjsResManFetchProvider` implements the worker contract for its
|
|
69
|
+
normal global `fetch` path and returns `ArrayBuffer` data using transfer
|
|
70
|
+
ownership. An injected fetch implementation remains on the caller thread
|
|
71
|
+
unless its provider is explicitly created with `{ worker: true }`.
|
|
72
|
+
Structural sources that do not declare `requiresUrl` continue to receive the
|
|
73
|
+
normalized resource path.
|
|
74
|
+
|
|
75
|
+
Fetch request options may include ordinary headers, including an HTTP `Range`
|
|
76
|
+
header. Range capability, status interpretation, and the identity of an
|
|
77
|
+
offset-backed logical resource remain provider policy; `CjsResMan` does not
|
|
78
|
+
invent offset semantics.
|
|
79
|
+
|
|
80
|
+
## Format reads
|
|
81
|
+
|
|
82
|
+
A clone-safe format opts in with a static worker declaration:
|
|
83
|
+
|
|
84
|
+
```js
|
|
85
|
+
static worker = Object.freeze({
|
|
86
|
+
module: import.meta.url,
|
|
87
|
+
exportName: "CjsExampleFormat"
|
|
88
|
+
});
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The worker dynamically imports that exact module and invokes its static
|
|
92
|
+
`readAsync`/`read` operation, falling back to an instance
|
|
93
|
+
`ReadAsync`/`Read` operation when required. BNK and WEM are worker-enabled.
|
|
94
|
+
Black `json` and `payload` outputs are worker-enabled; Black document/runtime
|
|
95
|
+
outputs remain on the caller thread because structured cloning would discard
|
|
96
|
+
their class identity.
|
|
97
|
+
|
|
98
|
+
A declaration may restrict clone-safe outputs:
|
|
99
|
+
|
|
100
|
+
```js
|
|
101
|
+
static worker = Object.freeze({
|
|
102
|
+
module: import.meta.url,
|
|
103
|
+
exportName: "CjsExampleFormat",
|
|
104
|
+
outputTypes: Object.freeze([ "json", "payload" ]),
|
|
105
|
+
defaultOutput: "json"
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Format options containing functions, symbols, non-plain instances, cycles, or
|
|
110
|
+
caller-supplied class constructors do not cross the worker boundary.
|
|
111
|
+
|
|
112
|
+
## Queues and ownership
|
|
113
|
+
|
|
114
|
+
Worker-safe format reading runs outside the main preparation queue. Its
|
|
115
|
+
resource-operation root remains visible to `Wait()`, and
|
|
116
|
+
`GetPendingWorkers()`/`IsLoading()` include unresolved worker requests. Once
|
|
117
|
+
the reader settles, guarded resource publication is still enqueued on the
|
|
118
|
+
main queue.
|
|
119
|
+
|
|
120
|
+
Format input is cloned by default. This preserves source-cache and
|
|
121
|
+
multi-output ownership at the cost of a copy. A format may declare
|
|
122
|
+
`transferInput: true` only when its caller guarantees exclusive ownership of a
|
|
123
|
+
complete `ArrayBuffer`; transferring detaches the caller's buffer. Result
|
|
124
|
+
ArrayBuffers and typed-array backing stores are transferred back
|
|
125
|
+
automatically.
|
|
126
|
+
|
|
127
|
+
The bundled strategy currently owns one module worker. Asynchronous fetches
|
|
128
|
+
may overlap within it, while synchronous CPU readers are serialized by that
|
|
129
|
+
worker's event loop.
|
|
130
|
+
|
|
131
|
+
## Related documentation
|
|
132
|
+
|
|
133
|
+
- [Queues, publication, and the Wait fence](queues.md)
|
|
134
|
+
- [MotherLode identity, cache, and retention](motherlode-cache.md)
|
|
135
|
+
- [Wwise BNK/WEM formats](../formats/wwise.md)
|