@carbonenginejs/runtime-resource 0.20.0 → 0.22.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 +6 -0
- package/dist/CjsResMan.js +1374 -1318
- package/dist/CjsResMan.js.map +1 -1
- package/dist/format/CjsFormat.js +393 -164
- package/dist/format/CjsFormat.js.map +1 -1
- package/dist/format/CjsFormatStore.js +315 -0
- package/dist/format/CjsFormatStore.js.map +1 -0
- package/dist/format/CjsResourceProbe.js +66 -234
- package/dist/format/CjsResourceProbe.js.map +1 -1
- package/dist/format/payloadContract.js +47 -6
- package/dist/format/payloadContract.js.map +1 -1
- package/dist/formats/black/CjsBlackFormat.js +23 -6
- package/dist/formats/black/CjsBlackFormat.js.map +1 -1
- package/dist/formats/bnk/CjsBnkFormat.js +122 -120
- package/dist/formats/bnk/CjsBnkFormat.js.map +1 -1
- package/dist/formats/bnk/core/helpers.js +5 -15
- package/dist/formats/bnk/core/helpers.js.map +1 -1
- package/dist/formats/cmf/CjsCmfFormat.js +31 -14
- package/dist/formats/cmf/CjsCmfFormat.js.map +1 -1
- package/dist/formats/dds/CjsDdsFormat.js +29 -19
- package/dist/formats/dds/CjsDdsFormat.js.map +1 -1
- package/dist/formats/dds/core/helpers.js +4 -5
- package/dist/formats/dds/core/helpers.js.map +1 -1
- package/dist/formats/dxbc/CjsDxbcFormat.js +15 -13
- package/dist/formats/dxbc/CjsDxbcFormat.js.map +1 -1
- package/dist/formats/fbx/CjsFbxFormat.js +27 -19
- package/dist/formats/fbx/CjsFbxFormat.js.map +1 -1
- package/dist/formats/fbx/core/helpers.js +4 -4
- package/dist/formats/fbx/core/helpers.js.map +1 -1
- package/dist/formats/flac/CjsFlacFormat.js +19 -17
- package/dist/formats/flac/CjsFlacFormat.js.map +1 -1
- package/dist/formats/flac/core/helpers.js +5 -11
- package/dist/formats/flac/core/helpers.js.map +1 -1
- package/dist/formats/fsd/32/CjsFsd32Format.js +55 -0
- package/dist/formats/fsd/32/CjsFsd32Format.js.map +1 -0
- package/dist/formats/fsd/32/index.js +2 -0
- package/dist/formats/fsd/32/index.js.map +1 -0
- package/dist/formats/fsd/64/CjsFsd64Format.js +119 -0
- package/dist/formats/fsd/64/CjsFsd64Format.js.map +1 -0
- package/dist/formats/fsd/64/core/CjsFsd64Binary.js +393 -0
- package/dist/formats/fsd/64/core/CjsFsd64Binary.js.map +1 -0
- package/dist/formats/fsd/64/core/CjsFsd64Reader.js +138 -0
- package/dist/formats/fsd/64/core/CjsFsd64Reader.js.map +1 -0
- package/dist/formats/fsd/64/core/CjsFsd64SchemaDecoder.js +389 -0
- package/dist/formats/fsd/64/core/CjsFsd64SchemaDecoder.js.map +1 -0
- package/dist/formats/fsd/64/core/CjsFsd64SchemaReader.js +43 -0
- package/dist/formats/fsd/64/core/CjsFsd64SchemaReader.js.map +1 -0
- package/dist/formats/fsd/64/core/fsd64Records.js +60 -0
- package/dist/formats/fsd/64/core/fsd64Records.js.map +1 -0
- package/dist/formats/fsd/64/index.js +7 -0
- package/dist/formats/fsd/64/index.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64ReaderSetCharacterStaticData.js +33 -0
- package/dist/formats/fsd/64/readers/CjsFsd64ReaderSetCharacterStaticData.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaAgentTypes.js +35 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaAgentTypes.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaAgentsInSpace.js +50 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaAgentsInSpace.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaAncestries.js +75 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaAncestries.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaArchetypes.js +57 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaArchetypes.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaAudioMetadata.js +201 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaAudioMetadata.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaBloodlines.js +73 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaBloodlines.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCategories.js +53 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCategories.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterAvatarBehaviors.js +44 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterAvatarBehaviors.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterColorLocations.js +38 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterColorLocations.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterColorNames.js +34 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterColorNames.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterModifierLocations.js +34 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterModifierLocations.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterPortraitResources.js +44 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterPortraitResources.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterResources.js +81 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterResources.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterSculptingLocations.js +34 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterSculptingLocations.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCompressibleTypes.js +41 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCompressibleTypes.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaContrabandTypes.js +63 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaContrabandTypes.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaControlTowerResources.js +76 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaControlTowerResources.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCorporationActivities.js +38 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCorporationActivities.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCorporationRoleGroups.js +74 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCorporationRoleGroups.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCorporationRoles.js +59 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaCorporationRoles.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaDogmaAttributeCategories.js +46 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaDogmaAttributeCategories.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaDogmaAttributes.js +133 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaDogmaAttributes.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaDogmaEffects.js +236 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaDogmaEffects.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaDogmaUnits.js +60 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaDogmaUnits.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaDynamicItemAttributes.js +95 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaDynamicItemAttributes.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaEpicArcs.js +106 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaEpicArcs.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaExpertSystems.js +86 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaExpertSystems.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaFactions.js +117 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaFactions.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaGraphicIds.js +70 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaGraphicIds.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaGraphicMaterialSets.js +173 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaGraphicMaterialSets.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaGroups.js +77 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaGroups.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaIcons.js +62 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaIcons.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaMarketGroups.js +63 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaMarketGroups.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaMetaGroups.js +86 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaMetaGroups.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaNpcCorporationDivisions.js +72 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaNpcCorporationDivisions.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaNpcCorporations.js +326 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaNpcCorporations.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaPaperdolls.js +279 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaPaperdolls.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaRaces.js +64 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaRaces.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSchoolMap.js +40 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSchoolMap.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSchools.js +113 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSchools.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkillPlans.js +130 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkillPlans.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrComponentCategories.js +38 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrComponentCategories.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrComponentPointValues.js +45 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrComponentPointValues.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrComponentRarities.js +44 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrComponentRarities.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrComponents.js +163 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrComponents.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrSlotCategories.js +37 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrSlotCategories.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrSlotConfigurations.js +77 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrSlotConfigurations.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrSlotNames.js +37 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrSlotNames.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrSlots.js +74 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrSlots.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrTierThresholds.js +44 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrTierThresholds.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaStationOperations.js +120 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaStationOperations.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaStationServices.js +49 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaStationServices.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaTypeDogma.js +73 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaTypeDogma.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaTypeLists.js +122 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaTypeLists.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaTypeMaterials.js +83 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaTypeMaterials.js.map +1 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaTypes.js +194 -0
- package/dist/formats/fsd/64/readers/CjsFsd64SchemaTypes.js.map +1 -0
- package/dist/formats/fsd/64/readers/index.js +58 -0
- package/dist/formats/fsd/64/readers/index.js.map +1 -0
- package/dist/formats/fsd/CjsFsdFormat.js +62 -0
- package/dist/formats/fsd/CjsFsdFormat.js.map +1 -0
- package/dist/formats/fsd/index.js +9 -0
- package/dist/formats/fsd/index.js.map +1 -0
- package/dist/formats/gif/CjsGifFormat.js +26 -16
- package/dist/formats/gif/CjsGifFormat.js.map +1 -1
- package/dist/formats/gif/core/helpers.js +6 -18
- package/dist/formats/gif/core/helpers.js.map +1 -1
- package/dist/formats/gltf/CjsGltfFormat.js +25 -13
- package/dist/formats/gltf/CjsGltfFormat.js.map +1 -1
- package/dist/formats/gr2/CjsGr2Format.js +27 -6
- package/dist/formats/gr2/CjsGr2Format.js.map +1 -1
- package/dist/formats/hlsl/CjsHlslFormat.js +20 -16
- package/dist/formats/hlsl/CjsHlslFormat.js.map +1 -1
- package/dist/formats/hlsl/core/analysis.js +1 -1
- package/dist/formats/index.js +5 -0
- package/dist/formats/index.js.map +1 -1
- package/dist/formats/jpeg/CjsJpegFormat.js +26 -19
- package/dist/formats/jpeg/CjsJpegFormat.js.map +1 -1
- package/dist/formats/jpeg/core/helpers.js +6 -15
- package/dist/formats/jpeg/core/helpers.js.map +1 -1
- package/dist/formats/jpeg/core/jpeg.js +0 -3
- package/dist/formats/jpeg/core/jpeg.js.map +1 -1
- package/dist/formats/mp3/CjsMp3Format.js +19 -19
- package/dist/formats/mp3/CjsMp3Format.js.map +1 -1
- package/dist/formats/mp3/core/helpers.js +5 -11
- package/dist/formats/mp3/core/helpers.js.map +1 -1
- package/dist/formats/mp4/CjsMp4Format.js +20 -19
- package/dist/formats/mp4/CjsMp4Format.js.map +1 -1
- package/dist/formats/mp4/core/helpers.js +6 -15
- package/dist/formats/mp4/core/helpers.js.map +1 -1
- package/dist/formats/obj/CjsObjFormat.js +25 -12
- package/dist/formats/obj/CjsObjFormat.js.map +1 -1
- package/dist/formats/ogg/CjsOggFormat.js +26 -17
- package/dist/formats/ogg/CjsOggFormat.js.map +1 -1
- package/dist/formats/ogg/core/helpers.js +5 -16
- package/dist/formats/ogg/core/helpers.js.map +1 -1
- package/dist/formats/pickle/CjsPickleFormat.js +64 -5
- package/dist/formats/pickle/CjsPickleFormat.js.map +1 -1
- package/dist/formats/png/CjsPngFormat.js +28 -19
- package/dist/formats/png/CjsPngFormat.js.map +1 -1
- package/dist/formats/png/core/helpers.js +5 -14
- package/dist/formats/png/core/helpers.js.map +1 -1
- package/dist/formats/red/CjsRedFormat.js +19 -5
- package/dist/formats/red/CjsRedFormat.js.map +1 -1
- package/dist/formats/schemabound/CjsSchemaBoundFormat.js +48 -38
- package/dist/formats/schemabound/CjsSchemaBoundFormat.js.map +1 -1
- package/dist/formats/sqlite/CjsSqliteFormat.js +49 -41
- package/dist/formats/sqlite/CjsSqliteFormat.js.map +1 -1
- package/dist/formats/static/CjsStaticFormat.js +15 -57
- package/dist/formats/static/CjsStaticFormat.js.map +1 -1
- package/dist/formats/static/staticContainers.js +6 -6
- package/dist/formats/static/staticContainers.js.map +1 -1
- package/dist/formats/stl/CjsStlFormat.js +25 -12
- package/dist/formats/stl/CjsStlFormat.js.map +1 -1
- package/dist/formats/tga/CjsTgaFormat.js +26 -19
- package/dist/formats/tga/CjsTgaFormat.js.map +1 -1
- package/dist/formats/tga/core/helpers.js +7 -22
- package/dist/formats/tga/core/helpers.js.map +1 -1
- package/dist/formats/wav/CjsWavFormat.js +26 -19
- package/dist/formats/wav/CjsWavFormat.js.map +1 -1
- package/dist/formats/wav/core/helpers.js +7 -16
- package/dist/formats/wav/core/helpers.js.map +1 -1
- package/dist/formats/webgl/CjsWebglFormat.js +11 -13
- package/dist/formats/webgl/CjsWebglFormat.js.map +1 -1
- package/dist/formats/webgl/core/glsl/DxbcGlslEmitter.js +31 -1
- package/dist/formats/webgl/core/glsl/DxbcGlslEmitter.js.map +1 -1
- package/dist/formats/webgl/core/readGlslEffectContainer.js +8 -8
- package/dist/formats/webgl/core/readGlslEffectContainer.js.map +1 -1
- package/dist/formats/webgpu/CjsWebgpuFormat.js +11 -5
- package/dist/formats/webgpu/CjsWebgpuFormat.js.map +1 -1
- package/dist/formats/webm/CjsWebmFormat.js +20 -19
- package/dist/formats/webm/CjsWebmFormat.js.map +1 -1
- package/dist/formats/webm/core/helpers.js +6 -15
- package/dist/formats/webm/core/helpers.js.map +1 -1
- package/dist/formats/webp/CjsWebpFormat.js +19 -17
- package/dist/formats/webp/CjsWebpFormat.js.map +1 -1
- package/dist/formats/webp/core/helpers.js +5 -11
- package/dist/formats/webp/core/helpers.js.map +1 -1
- package/dist/formats/wem/CjsWemFormat.js +128 -141
- package/dist/formats/wem/CjsWemFormat.js.map +1 -1
- package/dist/formats/wem/core/helpers.js +1 -114
- package/dist/formats/wem/core/helpers.js.map +1 -1
- package/dist/formats/wem/core/{resolve.js → probeCodecSupport.js} +11 -18
- package/dist/formats/wem/core/probeCodecSupport.js.map +1 -0
- package/dist/formats/yaml/CjsYamlFormat.js +20 -5
- package/dist/formats/yaml/CjsYamlFormat.js.map +1 -1
- package/dist/generated/index.js +2 -0
- package/dist/generated/index.js.map +1 -0
- package/dist/generated/resources/Tr2RaycastGeometryRes.js +34 -0
- package/dist/generated/resources/Tr2RaycastGeometryRes.js.map +1 -0
- package/dist/generated/resources/index.js +2 -0
- package/dist/generated/resources/index.js.map +1 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/resource/CjsResource.js +134 -0
- package/dist/resource/CjsResource.js.map +1 -1
- package/dist/resource/ResourceRequirement.js +42 -0
- package/dist/resource/ResourceRequirement.js.map +1 -0
- package/dist/resource/Tr2LightProfileRes.js +2 -1
- package/dist/resource/Tr2LightProfileRes.js.map +1 -1
- package/dist/resource/geometry/TriGeometryRes.js +34 -7
- package/dist/resource/geometry/TriGeometryRes.js.map +1 -1
- package/dist/resource/geometry/granny/Tr2GrannyStateRes.js +184 -7
- package/dist/resource/geometry/granny/Tr2GrannyStateRes.js.map +1 -1
- package/dist/resource/geometry/granny/TriGrannyRes.js +20 -8
- package/dist/resource/geometry/granny/TriGrannyRes.js.map +1 -1
- package/dist/resource/index.js +1 -0
- package/dist/resource/index.js.map +1 -1
- package/dist/resource/resourceBoundary.js +24 -1
- package/dist/resource/resourceBoundary.js.map +1 -1
- package/dist/resource/shader/Tr2EffectRes.js +2 -1
- package/dist/resource/shader/Tr2EffectRes.js.map +1 -1
- package/dist/resource/texture/CjsTextureArrayRes.js +2 -1
- package/dist/resource/texture/CjsTextureArrayRes.js.map +1 -1
- package/dist/resource/texture/Tr2ImageRes.js +2 -1
- package/dist/resource/texture/Tr2ImageRes.js.map +1 -1
- package/dist/resource/texture/TriTextureRes.js +40 -2
- package/dist/resource/texture/TriTextureRes.js.map +1 -1
- package/docs/architecture.md +121 -116
- package/docs/concepts/format-capabilities.md +90 -0
- package/docs/formats/README.md +14 -6
- package/docs/formats/fsd.md +104 -0
- package/docs/formats/gr2.md +1 -1
- package/docs/formats/hlsl/reference/api.md +6 -4
- package/docs/formats/provenance.md +18 -0
- package/docs/formats/schemabound.md +10 -4
- package/docs/formats/static.md +26 -26
- package/docs/formats/webgpu/reference/api.md +4 -3
- package/docs/reference/classes/core.md +22 -2
- package/docs/reference/classes/formats.md +643 -1
- package/docs/reference/classes/resources.md +463 -453
- package/docs/reference/queues.md +205 -194
- package/docs/roadmap.md +14 -18
- package/format-notices/fsd/LICENSE +21 -0
- package/format-notices/fsd/NOTICE +11 -0
- package/package.json +70 -64
- package/dist/formats/wem/core/resolve.js.map +0 -1
- package/docs/concepts/format-type-resolution.md +0 -79
package/docs/reference/queues.md
CHANGED
|
@@ -1,194 +1,205 @@
|
|
|
1
|
-
# Queues, publication, and the Wait fence
|
|
2
|
-
|
|
3
|
-
Status: Evolving
|
|
4
|
-
Scope: `@carbonenginejs/runtime-resource`
|
|
5
|
-
Audience: Users and integrators
|
|
6
|
-
Summary: Defines the two manager-owned queues, publication budgeting, registration, and the `Wait()` fence semantics.
|
|
7
|
-
|
|
8
|
-
## Queued CPU load and publication
|
|
9
|
-
|
|
10
|
-
`GetObject()`, `LoadObject()`, and resource `Ready()` use two manager-owned
|
|
11
|
-
queues:
|
|
12
|
-
|
|
13
|
-
```text
|
|
14
|
-
BACKGROUND: deduplicated source load, limited by maxConcurrentLoads
|
|
15
|
-
MAIN: reader/format conversion -> resource publication
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Without worker execution, the main reader/format operation and publication
|
|
19
|
-
are separate queue items.
|
|
20
|
-
`maxPrepareTime` is a per-pump budget in seconds limiting synchronous
|
|
21
|
-
main-queue work started in one pump, and `maxPrepareItemsPerTick` can add an
|
|
22
|
-
item-count limit. Promise-returning format work remains in flight without
|
|
23
|
-
blocking the JavaScript event loop. The default scheduler keeps promise-based
|
|
24
|
-
calls working; a `CjsLibrary` or direct caller can provide its frame
|
|
25
|
-
scheduler:
|
|
26
|
-
|
|
27
|
-
```js
|
|
28
|
-
const resMan = new CjsResMan({
|
|
29
|
-
source,
|
|
30
|
-
maxConcurrentLoads: 8,
|
|
31
|
-
maxPrepareTime: 0.005,
|
|
32
|
-
queueScheduler: callback => requestAnimationFrame(callback)
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
await resMan.FetchResource("res:/model/ship.gr2", {
|
|
36
|
-
requirement: "geometry",
|
|
37
|
-
emit: "cmf"
|
|
38
|
-
});
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
The selected format class owns conversion to the promised CPU output.
|
|
42
|
-
`CjsResMan` does not inspect WebGL, WebGPU, texture, geometry, or codec
|
|
43
|
-
support, and it does not run backend realization. An engine consumes the
|
|
44
|
-
published CPU resource afterward through its own explicit operation.
|
|
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
|
-
|
|
52
|
-
## Queue controls
|
|
53
|
-
|
|
54
|
-
Blue-compatible queue controls are exposed directly on `CjsResMan`:
|
|
55
|
-
`AddToQueue`, `CancelFromQueue`, `GetNextIdForQueue`, `PumpMainThreadQueue`,
|
|
56
|
-
`PauseQueue`, `ResumeQueue`, `GetPendingLoads`, and `GetPendingPrepares`.
|
|
57
|
-
`Update()`/`Tick()` pump work.
|
|
58
|
-
|
|
59
|
-
## The Wait fence
|
|
60
|
-
|
|
61
|
-
`Wait()` synchronously captures queued resource-operation roots and low-level
|
|
62
|
-
queue tasks that already exist when it is called. Captured resource roots
|
|
63
|
-
include publication work enqueued after an asynchronous read; unrelated later
|
|
64
|
-
roots/tasks do not postpone the fence. Failure and queued cancellation count
|
|
65
|
-
as settlement, remain observable through their original operation promises,
|
|
66
|
-
and cross the fence without making `Wait()` reject.
|
|
67
|
-
|
|
68
|
-
By default `Wait()` pumps the two queues directly within their ordinary
|
|
69
|
-
budgets and never runs automatic purge housekeeping. It preserves pause
|
|
70
|
-
state; `{ pump: false }` leaves all progress to an external driver. A
|
|
71
|
-
standalone canonical `PrepareResourceObjectQueued()` call is a queued root.
|
|
72
|
-
Direct `LoadResourceObject()`, direct `PrepareResourceObject()`, standalone
|
|
73
|
-
`ReadResource()`, and standalone `ReadFormatOnce()` calls bypass both queues
|
|
74
|
-
and are outside this fence unless they own a captured queue task, although
|
|
75
|
-
direct resource mutations are still tracked for safe MotherLode replacement.
|
|
76
|
-
`WaitUrgent()` remains deferred until the queue has real per-item priority
|
|
77
|
-
and urgent-membership semantics.
|
|
78
|
-
|
|
79
|
-
## Registration
|
|
80
|
-
|
|
81
|
-
The Carbon-shaped primary route binds an extension to a resource-compatible
|
|
82
|
-
handler and a format. The handler declares whether the public result is a
|
|
83
|
-
stable resource or a constructed object:
|
|
84
|
-
|
|
85
|
-
```js
|
|
86
|
-
import {
|
|
87
|
-
CjsLoadingObject,
|
|
88
|
-
CjsResMan
|
|
89
|
-
} from "@carbonenginejs/runtime-resource";
|
|
90
|
-
import { CjsBlackFormat } from "@carbonenginejs/runtime-resource/formats/black";
|
|
91
|
-
import { CjsRedFormat } from "@carbonenginejs/runtime-resource/formats/red";
|
|
92
|
-
|
|
93
|
-
const resMan = new CjsResMan({ source });
|
|
94
|
-
|
|
95
|
-
resMan.RegisterExtension(".red", CjsLoadingObject, [
|
|
96
|
-
CjsBlackFormat,
|
|
97
|
-
CjsRedFormat
|
|
98
|
-
]);
|
|
99
|
-
resMan.RegisterExtension(".black", CjsLoadingObject, [
|
|
100
|
-
CjsBlackFormat,
|
|
101
|
-
CjsRedFormat
|
|
102
|
-
]);
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Ordered arrays apply request output/media filters first, then evaluate support
|
|
106
|
-
probes in order. The first supported format wins. One format without a probe
|
|
107
|
-
may be the final fallback; it cannot precede another entry. After selection,
|
|
108
|
-
reader failure is final and does not advance to the fallback. Both `.red` and
|
|
109
|
-
`.black` therefore use Black magic first and Red/YAML otherwise, independent
|
|
110
|
-
of the suffix.
|
|
111
|
-
|
|
112
|
-
A fixed `Target` may hydrate parsed values through its static `from` or
|
|
113
|
-
`fromYAML` method. `Identify(values, context)` may instead return a target
|
|
114
|
-
constructor, `true` to accept the reader result unchanged, or false/null to
|
|
115
|
-
fail. `Target` and `Identify` are mutually exclusive and only valid for object
|
|
116
|
-
handlers. These functions remain on the main thread even when the selected
|
|
117
|
-
format is worker-safe.
|
|
118
|
-
|
|
119
|
-
The normalized context supplied to formats as the third
|
|
120
|
-
`read(input, options, context)` argument, direct object loaders, `Identify`,
|
|
121
|
-
and `fromYAML` contains the same resource identity fields:
|
|
122
|
-
|
|
123
|
-
- `ext`: normalized lowercase extension without a leading dot;
|
|
124
|
-
- `resFilePath`: normalized lowercase logical resource path;
|
|
125
|
-
- `fileName`: normalized lowercase final path component; and
|
|
126
|
-
- `url`: the exact translated URL used by a URL-backed source, or `null` for
|
|
127
|
-
sources that read logical resource paths directly.
|
|
128
|
-
|
|
129
|
-
`path` remains a compatibility alias for `resFilePath`. URL text is not
|
|
130
|
-
lowercased independently: paths translated from `res:/` already use the
|
|
131
|
-
normalized resource path, while configured URL-base or resolver casing is
|
|
132
|
-
preserved.
|
|
133
|
-
|
|
134
|
-
The single-format short form:
|
|
135
|
-
|
|
136
|
-
```js
|
|
137
|
-
import { TriTextureRes } from "@carbonenginejs/runtime-resource/resource/texture";
|
|
138
|
-
import { CjsDdsFormat } from "@carbonenginejs/runtime-resource/formats/dds";
|
|
139
|
-
|
|
140
|
-
resMan.RegisterExtension("dds", TriTextureRes, CjsDdsFormat);
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
is equivalent to:
|
|
144
|
-
|
|
145
|
-
```js
|
|
146
|
-
resMan.RegisterExtension("dds", TriTextureRes, {
|
|
147
|
-
Format: CjsDdsFormat
|
|
148
|
-
});
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
`Register({ extensions })` accepts the same route objects keyed by extension.
|
|
152
|
-
Re-registration replaces the route for future uncached handles; an existing
|
|
153
|
-
canonical handle retains the complete route it captured.
|
|
154
|
-
|
|
155
|
-
The older registries remain independent compatibility and specialization
|
|
156
|
-
seams. `RegisterFormat` adds a format under its self-declared input extensions.
|
|
157
|
-
`RegisterResourceType` selects a resource class from a semantic requirement or
|
|
158
|
-
payload
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
} from "@carbonenginejs/runtime-resource
|
|
166
|
-
import {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
const
|
|
180
|
-
requirement: "
|
|
181
|
-
emit: "image"
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
-
|
|
1
|
+
# Queues, publication, and the Wait fence
|
|
2
|
+
|
|
3
|
+
Status: Evolving
|
|
4
|
+
Scope: `@carbonenginejs/runtime-resource`
|
|
5
|
+
Audience: Users and integrators
|
|
6
|
+
Summary: Defines the two manager-owned queues, publication budgeting, registration, and the `Wait()` fence semantics.
|
|
7
|
+
|
|
8
|
+
## Queued CPU load and publication
|
|
9
|
+
|
|
10
|
+
`GetObject()`, `LoadObject()`, and resource `Ready()` use two manager-owned
|
|
11
|
+
queues:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
BACKGROUND: deduplicated source load, limited by maxConcurrentLoads
|
|
15
|
+
MAIN: reader/format conversion -> resource publication
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Without worker execution, the main reader/format operation and publication
|
|
19
|
+
are separate queue items.
|
|
20
|
+
`maxPrepareTime` is a per-pump budget in seconds limiting synchronous
|
|
21
|
+
main-queue work started in one pump, and `maxPrepareItemsPerTick` can add an
|
|
22
|
+
item-count limit. Promise-returning format work remains in flight without
|
|
23
|
+
blocking the JavaScript event loop. The default scheduler keeps promise-based
|
|
24
|
+
calls working; a `CjsLibrary` or direct caller can provide its frame
|
|
25
|
+
scheduler:
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
const resMan = new CjsResMan({
|
|
29
|
+
source,
|
|
30
|
+
maxConcurrentLoads: 8,
|
|
31
|
+
maxPrepareTime: 0.005,
|
|
32
|
+
queueScheduler: callback => requestAnimationFrame(callback)
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
await resMan.FetchResource("res:/model/ship.gr2", {
|
|
36
|
+
requirement: "geometry",
|
|
37
|
+
emit: "cmf"
|
|
38
|
+
});
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The selected format class owns conversion to the promised CPU output.
|
|
42
|
+
`CjsResMan` does not inspect WebGL, WebGPU, texture, geometry, or codec
|
|
43
|
+
support, and it does not run backend realization. An engine consumes the
|
|
44
|
+
published CPU resource afterward through its own explicit operation.
|
|
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
|
+
|
|
52
|
+
## Queue controls
|
|
53
|
+
|
|
54
|
+
Blue-compatible queue controls are exposed directly on `CjsResMan`:
|
|
55
|
+
`AddToQueue`, `CancelFromQueue`, `GetNextIdForQueue`, `PumpMainThreadQueue`,
|
|
56
|
+
`PauseQueue`, `ResumeQueue`, `GetPendingLoads`, and `GetPendingPrepares`.
|
|
57
|
+
`Update()`/`Tick()` pump work.
|
|
58
|
+
|
|
59
|
+
## The Wait fence
|
|
60
|
+
|
|
61
|
+
`Wait()` synchronously captures queued resource-operation roots and low-level
|
|
62
|
+
queue tasks that already exist when it is called. Captured resource roots
|
|
63
|
+
include publication work enqueued after an asynchronous read; unrelated later
|
|
64
|
+
roots/tasks do not postpone the fence. Failure and queued cancellation count
|
|
65
|
+
as settlement, remain observable through their original operation promises,
|
|
66
|
+
and cross the fence without making `Wait()` reject.
|
|
67
|
+
|
|
68
|
+
By default `Wait()` pumps the two queues directly within their ordinary
|
|
69
|
+
budgets and never runs automatic purge housekeeping. It preserves pause
|
|
70
|
+
state; `{ pump: false }` leaves all progress to an external driver. A
|
|
71
|
+
standalone canonical `PrepareResourceObjectQueued()` call is a queued root.
|
|
72
|
+
Direct `LoadResourceObject()`, direct `PrepareResourceObject()`, standalone
|
|
73
|
+
`ReadResource()`, and standalone `ReadFormatOnce()` calls bypass both queues
|
|
74
|
+
and are outside this fence unless they own a captured queue task, although
|
|
75
|
+
direct resource mutations are still tracked for safe MotherLode replacement.
|
|
76
|
+
`WaitUrgent()` remains deferred until the queue has real per-item priority
|
|
77
|
+
and urgent-membership semantics.
|
|
78
|
+
|
|
79
|
+
## Registration
|
|
80
|
+
|
|
81
|
+
The Carbon-shaped primary route binds an extension to a resource-compatible
|
|
82
|
+
handler and a format. The handler declares whether the public result is a
|
|
83
|
+
stable resource or a constructed object:
|
|
84
|
+
|
|
85
|
+
```js
|
|
86
|
+
import {
|
|
87
|
+
CjsLoadingObject,
|
|
88
|
+
CjsResMan
|
|
89
|
+
} from "@carbonenginejs/runtime-resource";
|
|
90
|
+
import { CjsBlackFormat } from "@carbonenginejs/runtime-resource/formats/black";
|
|
91
|
+
import { CjsRedFormat } from "@carbonenginejs/runtime-resource/formats/red";
|
|
92
|
+
|
|
93
|
+
const resMan = new CjsResMan({ source });
|
|
94
|
+
|
|
95
|
+
resMan.RegisterExtension(".red", CjsLoadingObject, [
|
|
96
|
+
CjsBlackFormat,
|
|
97
|
+
CjsRedFormat
|
|
98
|
+
]);
|
|
99
|
+
resMan.RegisterExtension(".black", CjsLoadingObject, [
|
|
100
|
+
CjsBlackFormat,
|
|
101
|
+
CjsRedFormat
|
|
102
|
+
]);
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Ordered arrays apply request output/media filters first, then evaluate support
|
|
106
|
+
probes in order. The first supported format wins. One format without a probe
|
|
107
|
+
may be the final fallback; it cannot precede another entry. After selection,
|
|
108
|
+
reader failure is final and does not advance to the fallback. Both `.red` and
|
|
109
|
+
`.black` therefore use Black magic first and Red/YAML otherwise, independent
|
|
110
|
+
of the suffix.
|
|
111
|
+
|
|
112
|
+
A fixed `Target` may hydrate parsed values through its static `from` or
|
|
113
|
+
`fromYAML` method. `Identify(values, context)` may instead return a target
|
|
114
|
+
constructor, `true` to accept the reader result unchanged, or false/null to
|
|
115
|
+
fail. `Target` and `Identify` are mutually exclusive and only valid for object
|
|
116
|
+
handlers. These functions remain on the main thread even when the selected
|
|
117
|
+
format is worker-safe.
|
|
118
|
+
|
|
119
|
+
The normalized context supplied to formats as the third
|
|
120
|
+
`read(input, options, context)` argument, direct object loaders, `Identify`,
|
|
121
|
+
and `fromYAML` contains the same resource identity fields:
|
|
122
|
+
|
|
123
|
+
- `ext`: normalized lowercase extension without a leading dot;
|
|
124
|
+
- `resFilePath`: normalized lowercase logical resource path;
|
|
125
|
+
- `fileName`: normalized lowercase final path component; and
|
|
126
|
+
- `url`: the exact translated URL used by a URL-backed source, or `null` for
|
|
127
|
+
sources that read logical resource paths directly.
|
|
128
|
+
|
|
129
|
+
`path` remains a compatibility alias for `resFilePath`. URL text is not
|
|
130
|
+
lowercased independently: paths translated from `res:/` already use the
|
|
131
|
+
normalized resource path, while configured URL-base or resolver casing is
|
|
132
|
+
preserved.
|
|
133
|
+
|
|
134
|
+
The single-format short form:
|
|
135
|
+
|
|
136
|
+
```js
|
|
137
|
+
import { TriTextureRes } from "@carbonenginejs/runtime-resource/resource/texture";
|
|
138
|
+
import { CjsDdsFormat } from "@carbonenginejs/runtime-resource/formats/dds";
|
|
139
|
+
|
|
140
|
+
resMan.RegisterExtension("dds", TriTextureRes, CjsDdsFormat);
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
is equivalent to:
|
|
144
|
+
|
|
145
|
+
```js
|
|
146
|
+
resMan.RegisterExtension("dds", TriTextureRes, {
|
|
147
|
+
Format: CjsDdsFormat
|
|
148
|
+
});
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
`Register({ extensions })` accepts the same route objects keyed by extension.
|
|
152
|
+
Re-registration replaces the route for future uncached handles; an existing
|
|
153
|
+
canonical handle retains the complete route it captured.
|
|
154
|
+
|
|
155
|
+
The older registries remain independent compatibility and specialization
|
|
156
|
+
seams. `RegisterFormat` adds a format under its self-declared input extensions.
|
|
157
|
+
`RegisterResourceType` selects a resource class from a semantic requirement or
|
|
158
|
+
payload. A matching extension handler takes precedence when several concrete
|
|
159
|
+
resource classes declare that same semantic key; this is how `.gr2` selects
|
|
160
|
+
`TriGrannyRes` while other geometry routes can select `TriGeometryRes`.
|
|
161
|
+
Otherwise an explicitly registered semantic default takes precedence over the
|
|
162
|
+
extension handler:
|
|
163
|
+
|
|
164
|
+
```js
|
|
165
|
+
import { CjsResMan } from "@carbonenginejs/runtime-resource";
|
|
166
|
+
import {
|
|
167
|
+
Tr2ImageRes,
|
|
168
|
+
TriTextureRes
|
|
169
|
+
} from "@carbonenginejs/runtime-resource/resource/texture";
|
|
170
|
+
import { CjsDdsFormat } from "@carbonenginejs/runtime-resource/formats/dds";
|
|
171
|
+
import { CjsPngFormat } from "@carbonenginejs/runtime-resource/formats/png";
|
|
172
|
+
|
|
173
|
+
const resMan = new CjsResMan().Register({
|
|
174
|
+
source,
|
|
175
|
+
formats: [ CjsDdsFormat, CjsPngFormat ],
|
|
176
|
+
resourceTypes: [ TriTextureRes, Tr2ImageRes ]
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
const texture = resMan.GetResource("res:/image/ship.png", {
|
|
180
|
+
requirement: "texture",
|
|
181
|
+
emit: "image"
|
|
182
|
+
});
|
|
183
|
+
const image = resMan.GetResource("res:/image/ship.png", {
|
|
184
|
+
requirement: "image",
|
|
185
|
+
emit: "image"
|
|
186
|
+
});
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Those are distinct resource identities but share the normalized source-byte
|
|
190
|
+
operation. Registering several constructor shorthands with one semantic key is
|
|
191
|
+
valid when an extension route disambiguates them; requesting that key without a
|
|
192
|
+
matching route throws `CJS_RESOURCE_TYPE_AMBIGUOUS`. An explicit keyed
|
|
193
|
+
`RegisterResourceType("geometry", Constructor)` establishes one default and
|
|
194
|
+
replaces that ambiguity. Call-level `aliases` map additional semantic keys to
|
|
195
|
+
the same registered constructor.
|
|
196
|
+
|
|
197
|
+
`RegisterObjectLoader` remains the direct legacy byte-to-value registration for
|
|
198
|
+
an extension without an explicit route.
|
|
199
|
+
|
|
200
|
+
## Related documentation
|
|
201
|
+
|
|
202
|
+
- [Resource lifecycle concepts](../concepts/resource-lifecycle.md)
|
|
203
|
+
- [Browser worker execution](workers.md)
|
|
204
|
+
- [MotherLode identity, cache, and retention](motherlode-cache.md)
|
|
205
|
+
- [Format subpaths](../formats/README.md)
|
package/docs/roadmap.md
CHANGED
|
@@ -130,24 +130,20 @@ playback or decoded-cache lifetime would unnecessarily retain both
|
|
|
130
130
|
representations. Runtime-lifetime and group retention remain caller policy
|
|
131
131
|
built from explicit tokens, not an implicit default on every loaded resource.
|
|
132
132
|
|
|
133
|
-
##
|
|
134
|
-
|
|
135
|
-
[
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
Alongside it, `CjsWemFormat` could expose a single resolve-then-route output so
|
|
148
|
-
a caller stops choosing between `raw`, `ogg`, and `pcm` for media whose codec
|
|
149
|
-
the reader has already established. Today all three are distinct declared
|
|
150
|
-
outputs.
|
|
133
|
+
## Explicit capability verification
|
|
134
|
+
|
|
135
|
+
**Current:** [Format capabilities](concepts/format-capabilities.md) separates
|
|
136
|
+
synchronous routing and advisory reporting from asynchronous proof. `is()` is
|
|
137
|
+
the only routing predicate, `getSupport()` reports declared or cheaply observed
|
|
138
|
+
capability, and `verifySupport()` attempts the exact requested output through
|
|
139
|
+
the real asynchronous read path.
|
|
140
|
+
|
|
141
|
+
The ordinary resource read path deliberately does not preflight every read.
|
|
142
|
+
Doing so would decode twice or impose an asynchronous content check on formats
|
|
143
|
+
that do not need one. A consumer such as runtime-core that must prove an output
|
|
144
|
+
before committing to a route can call `verifySupport()` explicitly; ordinary
|
|
145
|
+
reads route synchronously and let the read itself provide the authoritative
|
|
146
|
+
failure. WEM's `raw`, `ogg`, and `pcm` outputs remain explicit caller choices.
|
|
151
147
|
|
|
152
148
|
## Open design questions
|
|
153
149
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 CarbonEngineJS contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
CarbonEngineJS tools-fsd
|
|
2
|
+
|
|
3
|
+
This implementation provides original JavaScript infrastructure for decoding
|
|
4
|
+
caller-supplied FSD bytes. No game assets, downloaded static data, proprietary
|
|
5
|
+
schemas, generated game tables, or copied game reader implementations are
|
|
6
|
+
included.
|
|
7
|
+
|
|
8
|
+
CarbonEngine and Fenris Creations (CCP Games) are named only for
|
|
9
|
+
interoperability and provenance context. This project is not affiliated with,
|
|
10
|
+
endorsed by, or sponsored by CCP Games or CCP ehf. EVE Online and related marks
|
|
11
|
+
remain the property of their respective owners.
|
package/package.json
CHANGED
|
@@ -1,66 +1,72 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@carbonenginejs/runtime-resource",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "CarbonEngineJS resource lifecycle, cache, source, and object loading contracts.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"exports": {
|
|
7
|
-
".": "./dist/index.js",
|
|
8
|
-
"./
|
|
9
|
-
"./
|
|
10
|
-
"./resource
|
|
11
|
-
"./resource/
|
|
12
|
-
"./resource/
|
|
13
|
-
"./resource/
|
|
14
|
-
"./
|
|
15
|
-
"./
|
|
16
|
-
"./
|
|
17
|
-
"./
|
|
18
|
-
"./formats
|
|
19
|
-
"./formats/black
|
|
20
|
-
"./formats/black/
|
|
21
|
-
"./formats/
|
|
22
|
-
"./formats/
|
|
23
|
-
"./formats/
|
|
24
|
-
"./formats/
|
|
25
|
-
"./formats/
|
|
26
|
-
"./formats/
|
|
27
|
-
"./formats/
|
|
28
|
-
"./formats/
|
|
1
|
+
{
|
|
2
|
+
"name": "@carbonenginejs/runtime-resource",
|
|
3
|
+
"version": "0.22.0",
|
|
4
|
+
"description": "CarbonEngineJS resource lifecycle, cache, source, and object loading contracts.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./dist/index.js",
|
|
8
|
+
"./generated": "./dist/generated/index.js",
|
|
9
|
+
"./generated/*": "./dist/generated/*/index.js",
|
|
10
|
+
"./resource": "./dist/resource/index.js",
|
|
11
|
+
"./resource/audio": "./dist/resource/audio/index.js",
|
|
12
|
+
"./resource/geometry": "./dist/resource/geometry/index.js",
|
|
13
|
+
"./resource/geometry/granny": "./dist/resource/geometry/granny/index.js",
|
|
14
|
+
"./resource/shader": "./dist/resource/shader/index.js",
|
|
15
|
+
"./resource/texture": "./dist/resource/texture/index.js",
|
|
16
|
+
"./worker": "./dist/worker/CjsResManWorker.js",
|
|
17
|
+
"./format": "./dist/format/index.js",
|
|
18
|
+
"./formats": "./dist/formats/index.js",
|
|
19
|
+
"./formats/black": "./dist/formats/black/index.js",
|
|
20
|
+
"./formats/black/schema": "./dist/formats/black/core/blackSchema.js",
|
|
21
|
+
"./formats/black/enums": "./dist/formats/black/core/blackEnums.js",
|
|
22
|
+
"./formats/black/version": "./dist/formats/black/core/blackVersion.js",
|
|
23
|
+
"./formats/bnk": "./dist/formats/bnk/index.js",
|
|
24
|
+
"./formats/cmf": "./dist/formats/cmf/index.js",
|
|
25
|
+
"./formats/dds": "./dist/formats/dds/index.js",
|
|
26
|
+
"./formats/dxbc": "./dist/formats/dxbc/index.js",
|
|
27
|
+
"./formats/hlsl": "./dist/formats/hlsl/index.js",
|
|
28
|
+
"./formats/webgl": "./dist/formats/webgl/index.js",
|
|
29
|
+
"./formats/webgpu": "./dist/formats/webgpu/index.js",
|
|
30
|
+
"./formats/fbx": "./dist/formats/fbx/index.js",
|
|
29
31
|
"./formats/flac": "./dist/formats/flac/index.js",
|
|
32
|
+
"./formats/fsd": "./dist/formats/fsd/index.js",
|
|
33
|
+
"./formats/fsd/32": "./dist/formats/fsd/32/index.js",
|
|
34
|
+
"./formats/fsd/64": "./dist/formats/fsd/64/index.js",
|
|
35
|
+
"./formats/fsd/64/readers": "./dist/formats/fsd/64/readers/index.js",
|
|
30
36
|
"./formats/gif": "./dist/formats/gif/index.js",
|
|
31
|
-
"./formats/gltf": "./dist/formats/gltf/index.js",
|
|
32
|
-
"./formats/gr2": "./dist/formats/gr2/index.js",
|
|
33
|
-
"./formats/jpeg": "./dist/formats/jpeg/index.js",
|
|
34
|
-
"./formats/mp3": "./dist/formats/mp3/index.js",
|
|
35
|
-
"./formats/mp4": "./dist/formats/mp4/index.js",
|
|
36
|
-
"./formats/obj": "./dist/formats/obj/index.js",
|
|
37
|
-
"./formats/ogg": "./dist/formats/ogg/index.js",
|
|
38
|
-
"./formats/pickle": "./dist/formats/pickle/index.js",
|
|
39
|
-
"./formats/png": "./dist/formats/png/index.js",
|
|
40
|
-
"./formats/red": "./dist/formats/red/index.js",
|
|
41
|
-
"./formats/red/schema": "./dist/formats/red/core/blackDefinitions.js",
|
|
42
|
-
"./formats/schemabound": "./dist/formats/schemabound/index.js",
|
|
43
|
-
"./formats/sqlite": "./dist/formats/sqlite/index.js",
|
|
44
|
-
"./formats/static": "./dist/formats/static/index.js",
|
|
45
|
-
"./formats/stl": "./dist/formats/stl/index.js",
|
|
46
|
-
"./formats/tga": "./dist/formats/tga/index.js",
|
|
47
|
-
"./formats/wav": "./dist/formats/wav/index.js",
|
|
48
|
-
"./formats/webm": "./dist/formats/webm/index.js",
|
|
49
|
-
"./formats/webp": "./dist/formats/webp/index.js",
|
|
50
|
-
"./formats/wem": "./dist/formats/wem/index.js",
|
|
51
|
-
"./formats/yaml": "./dist/formats/yaml/index.js"
|
|
52
|
-
},
|
|
53
|
-
"sideEffects": false,
|
|
54
|
-
"engines": {
|
|
55
|
-
"node": ">=18"
|
|
56
|
-
},
|
|
57
|
-
"dependencies": {
|
|
58
|
-
"@carbonenginejs/runtime-utils": "^0.1.6",
|
|
59
|
-
"meshoptimizer": "^1.2.0",
|
|
60
|
-
"yaml": "^2.4.0"
|
|
61
|
-
},
|
|
62
|
-
"license": "MIT",
|
|
63
|
-
"publishConfig": {
|
|
64
|
-
"access": "public"
|
|
65
|
-
}
|
|
66
|
-
}
|
|
37
|
+
"./formats/gltf": "./dist/formats/gltf/index.js",
|
|
38
|
+
"./formats/gr2": "./dist/formats/gr2/index.js",
|
|
39
|
+
"./formats/jpeg": "./dist/formats/jpeg/index.js",
|
|
40
|
+
"./formats/mp3": "./dist/formats/mp3/index.js",
|
|
41
|
+
"./formats/mp4": "./dist/formats/mp4/index.js",
|
|
42
|
+
"./formats/obj": "./dist/formats/obj/index.js",
|
|
43
|
+
"./formats/ogg": "./dist/formats/ogg/index.js",
|
|
44
|
+
"./formats/pickle": "./dist/formats/pickle/index.js",
|
|
45
|
+
"./formats/png": "./dist/formats/png/index.js",
|
|
46
|
+
"./formats/red": "./dist/formats/red/index.js",
|
|
47
|
+
"./formats/red/schema": "./dist/formats/red/core/blackDefinitions.js",
|
|
48
|
+
"./formats/schemabound": "./dist/formats/schemabound/index.js",
|
|
49
|
+
"./formats/sqlite": "./dist/formats/sqlite/index.js",
|
|
50
|
+
"./formats/static": "./dist/formats/static/index.js",
|
|
51
|
+
"./formats/stl": "./dist/formats/stl/index.js",
|
|
52
|
+
"./formats/tga": "./dist/formats/tga/index.js",
|
|
53
|
+
"./formats/wav": "./dist/formats/wav/index.js",
|
|
54
|
+
"./formats/webm": "./dist/formats/webm/index.js",
|
|
55
|
+
"./formats/webp": "./dist/formats/webp/index.js",
|
|
56
|
+
"./formats/wem": "./dist/formats/wem/index.js",
|
|
57
|
+
"./formats/yaml": "./dist/formats/yaml/index.js"
|
|
58
|
+
},
|
|
59
|
+
"sideEffects": false,
|
|
60
|
+
"engines": {
|
|
61
|
+
"node": ">=18"
|
|
62
|
+
},
|
|
63
|
+
"dependencies": {
|
|
64
|
+
"@carbonenginejs/runtime-utils": "^0.1.6",
|
|
65
|
+
"meshoptimizer": "^1.2.0",
|
|
66
|
+
"yaml": "^2.4.0"
|
|
67
|
+
},
|
|
68
|
+
"license": "MIT",
|
|
69
|
+
"publishConfig": {
|
|
70
|
+
"access": "public"
|
|
71
|
+
}
|
|
72
|
+
}
|