@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CjsDxbcFormat.js","sources":["../../../../src/formats/dxbc/CjsDxbcFormat.js"],"sourcesContent":["/**\n * Exposed CarbonEngineJS-facing DXBC format class.\n *\n * Keep this file small and reviewable: container/signature/program parsing\n * and the instruction decoder live in core/; input/option normalization and\n * the shared read path live in core/helpers.js.\n */\n\nimport { DxbcContainer } from \"./core/container.js\";\nimport { disassembleInstructions } from \"./core/disassemble.js\";\nimport {\n DEFAULT_VALUES,\n OUTPUT_JSON,\n OUTPUT_RAW,\n inspectWithValues,\n normalizeValues,\n readWithValues,\n toJsonValue\n} from \"./core/helpers.js\";\n\nconst FORMAT_NAME = \"CjsDxbcFormat\";\n\n/**\n * Resolves whatever the caller has to the decoder record a listing needs.\n *\n * Callers reach disassembly from three places: raw bytes, the result of a\n * previous read they do not want to repeat, and a decoder they already hold\n * from an emitter. All three are accepted so the listing never costs a second\n * decode.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView|object} input Bytes or record.\n * @param {object} options Format values for the byte path.\n * @returns {object} Record carrying an `instructions` array.\n */\nfunction resolveDecoderRecord(input, options)\n{\n if (input && typeof input === \"object\" && Array.isArray(input.instructions))\n {\n return input;\n }\n\n if (input && typeof input === \"object\" && input.decoder)\n {\n return input.decoder;\n }\n\n const result = readWithValues(input, normalizeValues(DEFAULT_VALUES, {\n ...options,\n emit: OUTPUT_RAW,\n decodeInstructions: true\n }, FORMAT_NAME));\n\n return result.decoder;\n}\n\n/**\n * CarbonEngineJS-facing DXBC (Direct3D shader bytecode) reader.\n *\n * The Cjs prefix marks this as a JavaScript format/construction boundary.\n * DXBC is Microsoft's compiled-shader container format; this reader has no\n * CCP/Carbon vocabulary. It parses the container, signatures and the\n * SM4/SM5 token stream, and emits plain JSON data by default or the raw\n * decoder objects for backends (GLSL/WGSL emitters) that want them.\n */\nexport class CjsDxbcFormat\n{\n\n #emit = DEFAULT_VALUES.emit;\n #source = DEFAULT_VALUES.source;\n #decodeInstructions = DEFAULT_VALUES.decodeInstructions;\n\n /**\n * Create a reusable format profile.\n *\n * @param {object} [options] Default format values.\n */\n constructor(options = {})\n {\n this.SetValues(options);\n }\n\n /**\n * Set format values for this reusable profile.\n *\n * @param {object} [options] Values to merge into the profile.\n * @returns {CjsDxbcFormat} This format profile.\n */\n SetValues(options = {})\n {\n const values = normalizeValues(this.GetValues(), options, FORMAT_NAME);\n\n this.#emit = values.emit;\n this.#source = values.source;\n this.#decodeInstructions = values.decodeInstructions;\n\n return this;\n }\n\n /**\n * Get this profile's current values, optionally with per-call overrides.\n *\n * @param {object} [options] Optional values to merge into a copy.\n * @returns {object} A copy of the effective values.\n */\n GetValues(options = {})\n {\n return normalizeValues({\n emit: this.#emit,\n source: this.#source,\n decodeInstructions: this.#decodeInstructions\n }, options, FORMAT_NAME);\n }\n\n /**\n * Read a DXBC payload with this profile's values.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input DXBC bytes.\n * @param {object} [options] Per-call value overrides.\n * @returns {object} Plain JSON data, or raw decoder objects when emit is \"raw\".\n */\n Read(input, options = {})\n {\n return readWithValues(input, this.GetValues(options));\n }\n\n /**\n * Inspect a DXBC payload without decoding instructions.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input DXBC bytes.\n * @param {object} [options] Per-call value overrides.\n * @returns {object} Plain summary data.\n */\n Inspect(input, options = {})\n {\n return inspectWithValues(input, this.GetValues(options));\n }\n\n /**\n * Static payload sniff. Static methods use camelCase by convention.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Candidate bytes.\n * @returns {boolean} True when the payload starts with the DXBC magic.\n */\n static isDxbc(input)\n {\n try\n {\n return DxbcContainer.IsDxbc(input);\n }\n catch\n {\n return false;\n }\n }\n\n /**\n * Static one-shot read.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input DXBC bytes.\n * @param {object} [options] Format values.\n * @returns {object} Plain JSON data, or raw decoder objects when emit is \"raw\".\n */\n static read(input, options = {})\n {\n return readWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));\n }\n\n /**\n * Static one-shot inspection.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input DXBC bytes.\n * @param {object} [options] Format values.\n * @returns {object} Plain summary data.\n */\n static inspect(input, options = {})\n {\n return inspectWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));\n }\n\n /**\n * Static one-shot disassembly.\n *\n * A translated shader can only be judged against the bytecode it was\n * translated from, so the listing exists to be read beside emitted GLSL or\n * WGSL. Accepts DXBC bytes or an already-decoded result from `read`.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView|object} input DXBC bytes,\n * a read result, or a decoder record.\n * @param {object} [options] Listing options plus format values.\n * @returns {string} Assembly listing.\n */\n static disassemble(input, options = {})\n {\n const decoder = resolveDecoderRecord(input, options);\n\n return disassembleInstructions(decoder, options);\n }\n\n /**\n * Static JSON-compatible conversion.\n *\n * @param {any} value Format output to convert.\n * @returns {any} Plain JSON-compatible data.\n */\n static toJSON(value)\n {\n return toJsonValue(value);\n }\n\n static OUTPUT_JSON = OUTPUT_JSON;\n static OUTPUT_RAW = OUTPUT_RAW;\n static type = Object.freeze([ \"shader\" ]);\n static mediaTypes = Object.freeze([ \"shader\" ]);\n static inputTypes = Object.freeze([ \"dxbc\" ]);\n static outputTypes = Object.freeze([ OUTPUT_JSON ]);\n static debugOutputTypes = Object.freeze([ OUTPUT_RAW ]);\n\n}\n\nexport default CjsDxbcFormat;\n"],"names":["FORMAT_NAME","resolveDecoderRecord","input","options","Array","isArray","instructions","decoder","result","readWithValues","normalizeValues","DEFAULT_VALUES","emit","OUTPUT_RAW","decodeInstructions","CjsDxbcFormat","source","constructor","SetValues","values","GetValues","Read","Inspect","inspectWithValues","isDxbc","DxbcContainer","IsDxbc","read","inspect","disassemble","disassembleInstructions","toJSON","value","toJsonValue","OUTPUT_JSON","type","Object","freeze","mediaTypes","inputTypes","outputTypes","debugOutputTypes"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAcA,MAAMA,WAAW,GAAG,eAAe;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,oBAAoBA,CAACC,KAAK,EAAEC,OAAO,EAC5C;AACI,EAAA,IAAID,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAIE,KAAK,CAACC,OAAO,CAACH,KAAK,CAACI,YAAY,CAAC,EAC3E;AACI,IAAA,OAAOJ,KAAK;AAChB,EAAA;EAEA,IAAIA,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACK,OAAO,EACvD;IACI,OAAOL,KAAK,CAACK,OAAO;AACxB,EAAA;EAEA,MAAMC,MAAM,GAAGC,cAAc,CAACP,KAAK,EAAEQ,eAAe,CAACC,cAAc,EAAE;AACjE,IAAA,GAAGR,OAAO;AACVS,IAAAA,IAAI,EAAEC,UAAU;AAChBC,IAAAA,kBAAkB,EAAE;GACvB,EAAEd,WAAW,CAAC,CAAC;EAEhB,OAAOQ,MAAM,CAACD,OAAO;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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WAAW;EAChC,OAAOrB,UAAU,GAAGA,UAAU;EAC9B,OAAOsB,IAAI,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAE,QAAQ,CAAE,CAAC;EACzC,OAAOC,UAAU,GAAGF,MAAM,CAACC,MAAM,CAAC,CAAE,QAAQ,CAAE,CAAC;EAC/C,OAAOE,UAAU,GAAGH,MAAM,CAACC,MAAM,CAAC,CAAE,MAAM,CAAE,CAAC;EAC7C,OAAOG,WAAW,GAAGJ,MAAM,CAACC,MAAM,CAAC,CAAEH,WAAW,CAAE,CAAC;EACnD,OAAOO,gBAAgB,GAAGL,MAAM,CAACC,MAAM,CAAC,CAAExB,UAAU,CAAE,CAAC;AAE3D;;;;"}
|
|
1
|
+
{"version":3,"file":"CjsDxbcFormat.js","sources":["../../../../src/formats/dxbc/CjsDxbcFormat.js"],"sourcesContent":["import { CjsFormat } from \"../../format/CjsFormat.js\";\n/**\n * Exposed CarbonEngineJS-facing DXBC format class.\n *\n * Keep this file small and reviewable: container/signature/program parsing\n * and the instruction decoder live in core/; input/option normalization and\n * the shared read path live in core/helpers.js.\n */\n\nimport { DxbcContainer } from \"./core/container.js\";\nimport { disassembleInstructions } from \"./core/disassemble.js\";\nimport {\n DEFAULT_VALUES,\n OUTPUT_JSON,\n OUTPUT_RAW,\n inspectWithValues,\n normalizeValues,\n readWithValues,\n toJsonValue\n} from \"./core/helpers.js\";\n\nconst FORMAT_NAME = \"CjsDxbcFormat\";\n\n/**\n * Resolves whatever the caller has to the decoder record a listing needs.\n *\n * Callers reach disassembly from three places: raw bytes, the result of a\n * previous read they do not want to repeat, and a decoder they already hold\n * from an emitter. All three are accepted so the listing never costs a second\n * decode.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView|object} input Bytes or record.\n * @param {object} options Format values for the byte path.\n * @returns {object} Record carrying an `instructions` array.\n */\nfunction resolveDecoderRecord(input, options)\n{\n if (input && typeof input === \"object\" && Array.isArray(input.instructions))\n {\n return input;\n }\n\n if (input && typeof input === \"object\" && input.decoder)\n {\n return input.decoder;\n }\n\n const result = readWithValues(input, normalizeValues(DEFAULT_VALUES, {\n ...options,\n emit: OUTPUT_RAW,\n decodeInstructions: true\n }, FORMAT_NAME));\n\n return result.decoder;\n}\n\n/**\n * CarbonEngineJS-facing DXBC (Direct3D shader bytecode) reader.\n *\n * The Cjs prefix marks this as a JavaScript format/construction boundary.\n * DXBC is Microsoft's compiled-shader container format; this reader has no\n * CCP/Carbon vocabulary. It parses the container, signatures and the\n * SM4/SM5 token stream, and emits plain JSON data by default or the raw\n * decoder objects for backends (GLSL/WGSL emitters) that want them.\n */\nexport class CjsDxbcFormat extends CjsFormat\n{\n\n #emit = DEFAULT_VALUES.emit;\n #source = DEFAULT_VALUES.source;\n #decodeInstructions = DEFAULT_VALUES.decodeInstructions;\n\n /**\n * Create a reusable format profile.\n *\n * @param {object} [options] Default format values.\n */\n constructor(options = {})\n {\n super();\n this.SetValues(options);\n }\n\n /**\n * Set format values for this reusable profile.\n *\n * @param {object} [options] Values to merge into the profile.\n * @returns {CjsDxbcFormat} This format profile.\n */\n SetValues(options = {})\n {\n const values = normalizeValues(this.GetValues(), options, FORMAT_NAME);\n\n this.#emit = values.emit;\n this.#source = values.source;\n this.#decodeInstructions = values.decodeInstructions;\n\n return this;\n }\n\n /**\n * Get this profile's current values, optionally with per-call overrides.\n *\n * @param {object} [options] Optional values to merge into a copy.\n * @returns {object} A copy of the effective values.\n */\n GetValues(options = {})\n {\n return normalizeValues({\n emit: this.#emit,\n source: this.#source,\n decodeInstructions: this.#decodeInstructions\n }, options, FORMAT_NAME);\n }\n\n /**\n * Read a DXBC payload with this profile's values.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input DXBC bytes.\n * @param {object} [options] Per-call value overrides.\n * @returns {object} Plain JSON data, or raw decoder objects when emit is \"raw\".\n */\n Read(input, options = {})\n {\n return readWithValues(input, this.GetValues(options));\n }\n\n /**\n * Inspect a DXBC payload without decoding instructions.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input DXBC bytes.\n * @param {object} [options] Per-call value overrides.\n * @returns {object} Plain summary data.\n */\n Inspect(input, options = {})\n {\n return inspectWithValues(input, this.GetValues(options));\n }\n\n /**\n * Static payload sniff. Static methods use camelCase by convention.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input Candidate bytes.\n * @returns {boolean} True when the payload starts with the DXBC magic.\n */\n static isDxbc(input)\n {\n try\n {\n return DxbcContainer.IsDxbc(input);\n }\n catch\n {\n return false;\n }\n }\n\n /**\n * Static one-shot read.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input DXBC bytes.\n * @param {object} [options] Format values.\n * @returns {object} Plain JSON data, or raw decoder objects when emit is \"raw\".\n */\n static read(input, options = {})\n {\n return readWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));\n }\n\n /**\n * Static one-shot inspection.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView} input DXBC bytes.\n * @param {object} [options] Format values.\n * @returns {object} Plain summary data.\n */\n static inspect(input, options = {})\n {\n return inspectWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));\n }\n\n /**\n * Static one-shot disassembly.\n *\n * A translated shader can only be judged against the bytecode it was\n * translated from, so the listing exists to be read beside emitted GLSL or\n * WGSL. Accepts DXBC bytes or an already-decoded result from `read`.\n *\n * @param {Uint8Array|ArrayBuffer|Buffer|DataView|object} input DXBC bytes,\n * a read result, or a decoder record.\n * @param {object} [options] Listing options plus format values.\n * @returns {string} Assembly listing.\n */\n static disassemble(input, options = {})\n {\n const decoder = resolveDecoderRecord(input, options);\n\n return disassembleInstructions(decoder, options);\n }\n\n /**\n * Static JSON-compatible conversion.\n *\n * @param {any} value Format output to convert.\n * @returns {any} Plain JSON-compatible data.\n */\n static toJSON(value)\n {\n return toJsonValue(value);\n }\n\n static OUTPUT_JSON = OUTPUT_JSON;\n static OUTPUT_RAW = OUTPUT_RAW;\n static id = \"dxbc\";\n static mediaTypes = Object.freeze([ \"shader\" ]);\n static outputs = CjsFormat.defineOutputs({\n json: { default: true, decoded: true },\n raw: { role: \"debug\", decoded: true }\n });\n static extensions = Object.freeze([]);\n\n}\n\nexport default CjsDxbcFormat;\n"],"names":["FORMAT_NAME","resolveDecoderRecord","input","options","Array","isArray","instructions","decoder","result","readWithValues","normalizeValues","DEFAULT_VALUES","emit","OUTPUT_RAW","decodeInstructions","CjsDxbcFormat","CjsFormat","source","constructor","SetValues","values","GetValues","Read","Inspect","inspectWithValues","isDxbc","DxbcContainer","IsDxbc","read","inspect","disassemble","disassembleInstructions","toJSON","value","toJsonValue","OUTPUT_JSON","id","mediaTypes","Object","freeze","outputs","defineOutputs","json","default","decoded","raw","role","extensions"],"mappings":";;;;;AAqBA,MAAMA,WAAW,GAAG,eAAe;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,oBAAoBA,CAACC,KAAK,EAAEC,OAAO,EAC5C;AACI,EAAA,IAAID,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAIE,KAAK,CAACC,OAAO,CAACH,KAAK,CAACI,YAAY,CAAC,EAC3E;AACI,IAAA,OAAOJ,KAAK;AAChB,EAAA;EAEA,IAAIA,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACK,OAAO,EACvD;IACI,OAAOL,KAAK,CAACK,OAAO;AACxB,EAAA;EAEA,MAAMC,MAAM,GAAGC,cAAc,CAACP,KAAK,EAAEQ,eAAe,CAACC,cAAc,EAAE;AACjE,IAAA,GAAGR,OAAO;AACVS,IAAAA,IAAI,EAAEC,UAAU;AAChBC,IAAAA,kBAAkB,EAAE;GACvB,EAAEd,WAAW,CAAC,CAAC;EAEhB,OAAOQ,MAAM,CAACD,OAAO;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMQ,aAAa,SAASC,SAAS,CAC5C;AAEI,E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AChC,OAAOtB,UAAU,GAAGA,UAAU;EAC9B,OAAOuB,EAAE,GAAG,MAAM;EAClB,OAAOC,UAAU,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAE,QAAQ,CAAE,CAAC;AAC/C,EAAA,OAAOC,OAAO,GAAGxB,SAAS,CAACyB,aAAa,CAAC;AACrCC,IAAAA,IAAI,EAAE;AAAEC,MAAAA,OAAO,EAAE,IAAI;AAAEC,MAAAA,OAAO,EAAE;KAAM;AACtCC,IAAAA,GAAG,EAAE;AAAEC,MAAAA,IAAI,EAAE,OAAO;AAAEF,MAAAA,OAAO,EAAE;AAAK;AACxC,GAAC,CAAC;AACF,EAAA,OAAOG,UAAU,GAAGT,MAAM,CAACC,MAAM,CAAC,EAAE,CAAC;AAEzC;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CjsFormat } from '../../format/CjsFormat.js';
|
|
2
|
+
import { DEFAULT_VALUES, normalizeValues, validateClassKey, validateClass, readWithValues, inspectWithValues, toJsonValue, probeSupportWithValues, isFBX, toBytes, OUTPUT_FBX_JSON, OUTPUT_JSON, OUTPUT_RAW, OUTPUT_GR2, OUTPUT_CMF, CLASS_KEYS } from './core/helpers.js';
|
|
2
3
|
|
|
3
4
|
const FORMAT_NAME = "CjsFbxFormat";
|
|
4
5
|
|
|
@@ -9,7 +10,7 @@ const FORMAT_NAME = "CjsFbxFormat";
|
|
|
9
10
|
* is available; full CarbonEngine-equivalent FBX import still follows the
|
|
10
11
|
* cmfprocessor/ufbx importer behavior and needs more pure JS coverage.
|
|
11
12
|
*/
|
|
12
|
-
class CjsFbxFormat {
|
|
13
|
+
class CjsFbxFormat extends CjsFormat {
|
|
13
14
|
#values = DEFAULT_VALUES;
|
|
14
15
|
|
|
15
16
|
/**
|
|
@@ -18,6 +19,7 @@ class CjsFbxFormat {
|
|
|
18
19
|
* @param {object} [options] Default read/inspect options.
|
|
19
20
|
*/
|
|
20
21
|
constructor(options = {}) {
|
|
22
|
+
super();
|
|
21
23
|
this.SetValues(options);
|
|
22
24
|
}
|
|
23
25
|
|
|
@@ -146,17 +148,6 @@ class CjsFbxFormat {
|
|
|
146
148
|
return inspectWithValues(input, this.GetValues(options));
|
|
147
149
|
}
|
|
148
150
|
|
|
149
|
-
/**
|
|
150
|
-
* Report whether this package supports the input and requested variants.
|
|
151
|
-
*
|
|
152
|
-
* @param {Uint8Array|ArrayBuffer|DataView} input FBX bytes.
|
|
153
|
-
* @param {object} [options] Per-call values.
|
|
154
|
-
* @returns {object} Support/probe report.
|
|
155
|
-
*/
|
|
156
|
-
IsSupported(input, options = {}) {
|
|
157
|
-
return isSupportedWithValues(input, this.GetValues(options));
|
|
158
|
-
}
|
|
159
|
-
|
|
160
151
|
/**
|
|
161
152
|
* Convert format output into JSON-compatible debug data.
|
|
162
153
|
*
|
|
@@ -213,8 +204,8 @@ class CjsFbxFormat {
|
|
|
213
204
|
* @param {object} [options] Probe options.
|
|
214
205
|
* @returns {object} Support/probe report.
|
|
215
206
|
*/
|
|
216
|
-
static
|
|
217
|
-
return
|
|
207
|
+
static probeSupport(input, options = {}) {
|
|
208
|
+
return probeSupportWithValues(input, normalizeValues(DEFAULT_VALUES, {
|
|
218
209
|
inputType: "fbx",
|
|
219
210
|
...options
|
|
220
211
|
}, FORMAT_NAME));
|
|
@@ -255,11 +246,28 @@ class CjsFbxFormat {
|
|
|
255
246
|
FBX_JSON: OUTPUT_FBX_JSON
|
|
256
247
|
});
|
|
257
248
|
static CLASS_KEYS = CLASS_KEYS;
|
|
258
|
-
static
|
|
249
|
+
static id = "fbx";
|
|
259
250
|
static mediaTypes = Object.freeze(["geometry"]);
|
|
260
|
-
static
|
|
261
|
-
|
|
262
|
-
|
|
251
|
+
static outputs = CjsFormat.defineOutputs({
|
|
252
|
+
gr2: {
|
|
253
|
+
decoded: true
|
|
254
|
+
},
|
|
255
|
+
cmf: {
|
|
256
|
+
decoded: true
|
|
257
|
+
},
|
|
258
|
+
fbxJson: {
|
|
259
|
+
role: "debug",
|
|
260
|
+
decoded: true,
|
|
261
|
+
probes: ["fbxJson", "document"]
|
|
262
|
+
},
|
|
263
|
+
raw: {
|
|
264
|
+
role: "debug",
|
|
265
|
+
default: true,
|
|
266
|
+
passthrough: true,
|
|
267
|
+
probes: ["raw", "document"]
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
static extensions = Object.freeze([".fbx"]);
|
|
263
271
|
}
|
|
264
272
|
|
|
265
273
|
export { CjsFbxFormat, CjsFbxFormat as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CjsFbxFormat.js","sources":["../../../../src/formats/fbx/CjsFbxFormat.js"],"sourcesContent":["import {\n CLASS_KEYS,\n DEFAULT_VALUES,\n OUTPUT_CMF,\n OUTPUT_FBX_JSON,\n OUTPUT_GR2,\n OUTPUT_JSON,\n OUTPUT_RAW,\n inspectWithValues,\n isFBX,\n isSupportedWithValues,\n normalizeValues,\n readWithValues,\n toBytes,\n toJsonValue,\n validateClass,\n validateClassKey\n} from \"./core/helpers.js\";\n\nconst FORMAT_NAME = \"CjsFbxFormat\";\n\n/**\n * CarbonEngineJS-facing FBX format surface.\n *\n * FBX is recognized and inspected in-browser. Basic static mesh GR2/CMF output\n * is available; full CarbonEngine-equivalent FBX import still follows the\n * cmfprocessor/ufbx importer behavior and needs more pure JS coverage.\n */\nexport class CjsFbxFormat\n{\n #values = DEFAULT_VALUES;\n\n /**\n * Create a reusable FBX format profile.\n *\n * @param {object} [options] Default read/inspect options.\n */\n constructor(options = {})\n {\n this.SetValues(options);\n }\n\n /**\n * Merge options into this profile.\n *\n * @param {object} [options] Values to merge.\n * @returns {CjsFbxFormat} This format profile.\n */\n SetValues(options = {})\n {\n this.#values = normalizeValues(this.#values, { inputType: \"fbx\", ...options }, FORMAT_NAME);\n return this;\n }\n\n /**\n * Get normalized profile values with optional per-call overrides.\n *\n * @param {object} [options] Per-call values.\n * @returns {object} Normalized read values.\n */\n GetValues(options = {})\n {\n return normalizeValues(this.#values, { inputType: \"fbx\", ...options }, FORMAT_NAME);\n }\n\n /**\n * Set multiple output node constructors for this profile.\n *\n * These constructors are used only for explicit runtime output targets such\n * as `emit: \"gr2\"` and `emit: \"cmf\"` paths. Debug `fbxJson` output\n * remains plain data.\n *\n * @param {object} [classes] Map of output node class keys to constructors.\n * @returns {CjsFbxFormat} This format profile.\n */\n SetClasses(classes = {})\n {\n return this.SetValues({ classes });\n }\n\n /**\n * Set one output node constructor for this profile.\n *\n * @param {string} type Output node class key.\n * @param {Function|null|undefined} Class Constructor to use, or nullish to delete.\n * @returns {CjsFbxFormat} This format profile.\n */\n SetClass(type, Class)\n {\n validateClassKey(type, FORMAT_NAME);\n\n if (Class === null || Class === undefined)\n {\n const classes = { ...this.#values.classes };\n delete classes[type];\n this.#values = { ...this.#values, classes };\n return this;\n }\n\n validateClass(type, Class, FORMAT_NAME);\n return this.SetValues({ classes: { [type]: Class } });\n }\n\n /**\n * Get a configured output node constructor.\n *\n * @param {string} type Output node class key.\n * @returns {Function|undefined} The registered constructor, if any.\n */\n GetClass(type)\n {\n validateClassKey(type, FORMAT_NAME);\n return this.#values.classes[type];\n }\n\n /**\n * Whether this profile has a constructor registered for an output node key.\n *\n * @param {string} type Output node class key.\n * @returns {boolean} True when a constructor is registered.\n */\n HasClass(type)\n {\n return !!this.GetClass(type);\n }\n\n /**\n * Read FBX bytes with this profile.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input FBX bytes.\n * @param {object} [options] Per-call values.\n * @returns {object} Raw or debug payload for the selected emit target.\n */\n Read(input, options = {})\n {\n return readWithValues(input, this.GetValues(options));\n }\n\n /**\n * Read FBX bytes asynchronously with this profile.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input FBX bytes.\n * @param {object} [options] Per-call values.\n * @returns {Promise<object>} Raw or debug payload for the selected emit target.\n */\n async ReadAsync(input, options = {})\n {\n return this.Read(input, options);\n }\n\n /**\n * Inspect FBX bytes without converting geometry.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input FBX bytes.\n * @param {object} [options] Per-call values.\n * @returns {object} Lightweight FBX metadata.\n */\n Inspect(input, options = {})\n {\n return inspectWithValues(input, this.GetValues(options));\n }\n\n /**\n * Report whether this package supports the input and requested variants.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input FBX bytes.\n * @param {object} [options] Per-call values.\n * @returns {object} Support/probe report.\n */\n IsSupported(input, options = {})\n {\n return isSupportedWithValues(input, this.GetValues(options));\n }\n\n /**\n * Convert format output into JSON-compatible debug data.\n *\n * @param {any} value Format output.\n * @returns {any} JSON-compatible value.\n */\n ToJSON(value)\n {\n return toJsonValue(value);\n }\n\n /**\n * One-shot FBX read.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input FBX bytes.\n * @param {object} [options] Read options.\n * @returns {object} Raw or debug payload for the selected emit target.\n */\n static read(input, options = {})\n {\n return readWithValues(input, normalizeValues(DEFAULT_VALUES, { inputType: \"fbx\", ...options }, FORMAT_NAME));\n }\n\n /**\n * One-shot asynchronous FBX read.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input FBX bytes.\n * @param {object} [options] Read options.\n * @returns {Promise<object>} Raw or debug payload for the selected emit target.\n */\n static async readAsync(input, options = {})\n {\n return CjsFbxFormat.read(input, options);\n }\n\n /**\n * One-shot FBX inspection.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input FBX bytes.\n * @param {object} [options] Inspect options.\n * @returns {object} Lightweight FBX metadata.\n */\n static inspect(input, options = {})\n {\n return inspectWithValues(input, normalizeValues(DEFAULT_VALUES, { inputType: \"fbx\", ...options }, FORMAT_NAME));\n }\n\n /**\n * One-shot FBX support probe.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input FBX bytes.\n * @param {object} [options] Probe options.\n * @returns {object} Support/probe report.\n */\n static isSupported(input, options = {})\n {\n return isSupportedWithValues(input, normalizeValues(DEFAULT_VALUES, { inputType: \"fbx\", ...options }, FORMAT_NAME));\n }\n\n /**\n * Convert format output into JSON-compatible debug data.\n *\n * @param {any} value Format output.\n * @returns {any} JSON-compatible value.\n */\n static toJSON(value)\n {\n return toJsonValue(value);\n }\n\n /**\n * Test whether bytes look like an FBX file.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Candidate FBX bytes.\n * @returns {boolean} True when the input appears to be FBX.\n */\n static isFBX(input)\n {\n try\n {\n return isFBX(toBytes(input));\n }\n catch\n {\n return false;\n }\n }\n\n /**\n * Emit targets for this format (canonical frozen enum).\n */\n static Output = Object.freeze({\n CMF: OUTPUT_CMF,\n GR2: OUTPUT_GR2,\n RAW: OUTPUT_RAW,\n JSON: OUTPUT_JSON,\n FBX_JSON: OUTPUT_FBX_JSON\n });\n static CLASS_KEYS = CLASS_KEYS;\n static type = Object.freeze([ \"geometry\" ]);\n static mediaTypes = Object.freeze([ \"geometry\" ]);\n static inputTypes = Object.freeze([ \"fbx\" ]);\n static outputTypes = Object.freeze([ OUTPUT_GR2, OUTPUT_CMF ]);\n static debugOutputTypes = Object.freeze([ OUTPUT_FBX_JSON, OUTPUT_RAW ]);\n}\n\nexport default CjsFbxFormat;\n"],"names":["FORMAT_NAME","CjsFbxFormat","DEFAULT_VALUES","constructor","options","SetValues","normalizeValues","inputType","GetValues","SetClasses","classes","SetClass","type","Class","validateClassKey","undefined","validateClass","GetClass","HasClass","Read","input","readWithValues","ReadAsync","Inspect","inspectWithValues","IsSupported","isSupportedWithValues","ToJSON","value","toJsonValue","read","readAsync","inspect","isSupported","toJSON","isFBX","toBytes","Output","Object","freeze","CMF","OUTPUT_CMF","GR2","OUTPUT_GR2","RAW","OUTPUT_RAW","JSON","OUTPUT_JSON","FBX_JSON","OUTPUT_FBX_JSON","CLASS_KEYS","mediaTypes","inputTypes","outputTypes","debugOutputTypes"],"mappings":";;AAmBA,MAAMA,WAAW,GAAG,cAAc;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAY,CACzB;EACI,OAAO,GAAGC,cAAc;;AAExB;A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KAAK,EACnB;IACI,OAAOC,WAAW,CAACD,KAAK,CAAC;AAC7B,EAAA;;AAEA;AACJ;AACA;AACA;AACA;AACA;EACI,OAAOO,KAAKA,CAACf,KAAK,EAClB;IACI,IACA;AACI,MAAA,OAAOe,KAAK,CAACC,OAAO,CAAChB,KAAK,CAAC,CAAC;AAChC,IAAA,CAAC,CACD,MACA;AACI,MAAA,OAAO,KAAK;AAChB,IAAA;AACJ,EAAA;;AAEA;AACJ;AACA;AACI,EAAA,OAAOiB,MAAM,GAAGC,MAAM,CAACC,MAAM,CAAC;AAC1BC,IAAAA,GAAG,EAAEC,UAAU;AACfC,IAAAA,GAAG,EAAEC,UAAU;AACfC,IAAAA,GAAG,EAAEC,UAAU;AACfC,IAAAA,IAAI,EAAEC,WAAW;AACjBC,IAAAA,QAAQ,EAAEC;AACd,GAAC,CAAC;EACF,OAAOC,UAAU,GAAGA,UAAU;EAC9B,OAAOtC,IAAI,GAAG0B,MAAM,CAACC,MAAM,CAAC,CAAE,UAAU,CAAE,CAAC;EAC3C,OAAOY,UAAU,GAAGb,MAAM,CAACC,MAAM,CAAC,CAAE,UAAU,CAAE,CAAC;EACjD,OAAOa,UAAU,GAAGd,MAAM,CAACC,MAAM,CAAC,CAAE,KAAK,CAAE,CAAC;EAC5C,OAAOc,WAAW,GAAGf,MAAM,CAACC,MAAM,CAAC,CAAEI,UAAU,EAAEF,UAAU,CAAE,CAAC;EAC9D,OAAOa,gBAAgB,GAAGhB,MAAM,CAACC,MAAM,CAAC,CAAEU,eAAe,EAAEJ,UAAU,CAAE,CAAC;AAC5E;;;;"}
|
|
1
|
+
{"version":3,"file":"CjsFbxFormat.js","sources":["../../../../src/formats/fbx/CjsFbxFormat.js"],"sourcesContent":["import { CjsFormat } from \"../../format/CjsFormat.js\";\nimport {\n CLASS_KEYS,\n DEFAULT_VALUES,\n OUTPUT_CMF,\n OUTPUT_FBX_JSON,\n OUTPUT_GR2,\n OUTPUT_JSON,\n OUTPUT_RAW,\n inspectWithValues,\n isFBX,\n probeSupportWithValues,\n normalizeValues,\n readWithValues,\n toBytes,\n toJsonValue,\n validateClass,\n validateClassKey\n} from \"./core/helpers.js\";\n\nconst FORMAT_NAME = \"CjsFbxFormat\";\n\n/**\n * CarbonEngineJS-facing FBX format surface.\n *\n * FBX is recognized and inspected in-browser. Basic static mesh GR2/CMF output\n * is available; full CarbonEngine-equivalent FBX import still follows the\n * cmfprocessor/ufbx importer behavior and needs more pure JS coverage.\n */\nexport class CjsFbxFormat extends CjsFormat\n{\n #values = DEFAULT_VALUES;\n\n /**\n * Create a reusable FBX format profile.\n *\n * @param {object} [options] Default read/inspect options.\n */\n constructor(options = {})\n {\n super();\n this.SetValues(options);\n }\n\n /**\n * Merge options into this profile.\n *\n * @param {object} [options] Values to merge.\n * @returns {CjsFbxFormat} This format profile.\n */\n SetValues(options = {})\n {\n this.#values = normalizeValues(this.#values, { inputType: \"fbx\", ...options }, FORMAT_NAME);\n return this;\n }\n\n /**\n * Get normalized profile values with optional per-call overrides.\n *\n * @param {object} [options] Per-call values.\n * @returns {object} Normalized read values.\n */\n GetValues(options = {})\n {\n return normalizeValues(this.#values, { inputType: \"fbx\", ...options }, FORMAT_NAME);\n }\n\n /**\n * Set multiple output node constructors for this profile.\n *\n * These constructors are used only for explicit runtime output targets such\n * as `emit: \"gr2\"` and `emit: \"cmf\"` paths. Debug `fbxJson` output\n * remains plain data.\n *\n * @param {object} [classes] Map of output node class keys to constructors.\n * @returns {CjsFbxFormat} This format profile.\n */\n SetClasses(classes = {})\n {\n return this.SetValues({ classes });\n }\n\n /**\n * Set one output node constructor for this profile.\n *\n * @param {string} type Output node class key.\n * @param {Function|null|undefined} Class Constructor to use, or nullish to delete.\n * @returns {CjsFbxFormat} This format profile.\n */\n SetClass(type, Class)\n {\n validateClassKey(type, FORMAT_NAME);\n\n if (Class === null || Class === undefined)\n {\n const classes = { ...this.#values.classes };\n delete classes[type];\n this.#values = { ...this.#values, classes };\n return this;\n }\n\n validateClass(type, Class, FORMAT_NAME);\n return this.SetValues({ classes: { [type]: Class } });\n }\n\n /**\n * Get a configured output node constructor.\n *\n * @param {string} type Output node class key.\n * @returns {Function|undefined} The registered constructor, if any.\n */\n GetClass(type)\n {\n validateClassKey(type, FORMAT_NAME);\n return this.#values.classes[type];\n }\n\n /**\n * Whether this profile has a constructor registered for an output node key.\n *\n * @param {string} type Output node class key.\n * @returns {boolean} True when a constructor is registered.\n */\n HasClass(type)\n {\n return !!this.GetClass(type);\n }\n\n /**\n * Read FBX bytes with this profile.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input FBX bytes.\n * @param {object} [options] Per-call values.\n * @returns {object} Raw or debug payload for the selected emit target.\n */\n Read(input, options = {})\n {\n return readWithValues(input, this.GetValues(options));\n }\n\n /**\n * Read FBX bytes asynchronously with this profile.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input FBX bytes.\n * @param {object} [options] Per-call values.\n * @returns {Promise<object>} Raw or debug payload for the selected emit target.\n */\n async ReadAsync(input, options = {})\n {\n return this.Read(input, options);\n }\n\n /**\n * Inspect FBX bytes without converting geometry.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input FBX bytes.\n * @param {object} [options] Per-call values.\n * @returns {object} Lightweight FBX metadata.\n */\n Inspect(input, options = {})\n {\n return inspectWithValues(input, this.GetValues(options));\n }\n\n /**\n * Convert format output into JSON-compatible debug data.\n *\n * @param {any} value Format output.\n * @returns {any} JSON-compatible value.\n */\n ToJSON(value)\n {\n return toJsonValue(value);\n }\n\n /**\n * One-shot FBX read.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input FBX bytes.\n * @param {object} [options] Read options.\n * @returns {object} Raw or debug payload for the selected emit target.\n */\n static read(input, options = {})\n {\n return readWithValues(input, normalizeValues(DEFAULT_VALUES, { inputType: \"fbx\", ...options }, FORMAT_NAME));\n }\n\n /**\n * One-shot asynchronous FBX read.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input FBX bytes.\n * @param {object} [options] Read options.\n * @returns {Promise<object>} Raw or debug payload for the selected emit target.\n */\n static async readAsync(input, options = {})\n {\n return CjsFbxFormat.read(input, options);\n }\n\n /**\n * One-shot FBX inspection.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input FBX bytes.\n * @param {object} [options] Inspect options.\n * @returns {object} Lightweight FBX metadata.\n */\n static inspect(input, options = {})\n {\n return inspectWithValues(input, normalizeValues(DEFAULT_VALUES, { inputType: \"fbx\", ...options }, FORMAT_NAME));\n }\n\n /**\n * One-shot FBX support probe.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input FBX bytes.\n * @param {object} [options] Probe options.\n * @returns {object} Support/probe report.\n */\n static probeSupport(input, options = {})\n {\n return probeSupportWithValues(input, normalizeValues(DEFAULT_VALUES, { inputType: \"fbx\", ...options }, FORMAT_NAME));\n }\n\n /**\n * Convert format output into JSON-compatible debug data.\n *\n * @param {any} value Format output.\n * @returns {any} JSON-compatible value.\n */\n static toJSON(value)\n {\n return toJsonValue(value);\n }\n\n /**\n * Test whether bytes look like an FBX file.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Candidate FBX bytes.\n * @returns {boolean} True when the input appears to be FBX.\n */\n static isFBX(input)\n {\n try\n {\n return isFBX(toBytes(input));\n }\n catch\n {\n return false;\n }\n }\n\n /**\n * Emit targets for this format (canonical frozen enum).\n */\n static Output = Object.freeze({\n CMF: OUTPUT_CMF,\n GR2: OUTPUT_GR2,\n RAW: OUTPUT_RAW,\n JSON: OUTPUT_JSON,\n FBX_JSON: OUTPUT_FBX_JSON\n });\n static CLASS_KEYS = CLASS_KEYS;\n static id = \"fbx\";\n static mediaTypes = Object.freeze([ \"geometry\" ]);\n static outputs = CjsFormat.defineOutputs({\n gr2: { decoded: true },\n cmf: { decoded: true },\n fbxJson: { role: \"debug\", decoded: true, probes: [ \"fbxJson\", \"document\" ] },\n raw: { role: \"debug\", default: true, passthrough: true, probes: [ \"raw\", \"document\" ] }\n });\n static extensions = Object.freeze([ \".fbx\" ]);\n}\n\nexport default CjsFbxFormat;\n"],"names":["FORMAT_NAME","CjsFbxFormat","CjsFormat","DEFAULT_VALUES","constructor","options","SetValues","normalizeValues","inputType","GetValues","SetClasses","classes","SetClass","type","Class","validateClassKey","undefined","validateClass","GetClass","HasClass","Read","input","readWithValues","ReadAsync","Inspect","inspectWithValues","ToJSON","value","toJsonValue","read","readAsync","inspect","probeSupport","probeSupportWithValues","toJSON","isFBX","toBytes","Output","Object","freeze","CMF","OUTPUT_CMF","GR2","OUTPUT_GR2","RAW","OUTPUT_RAW","JSON","OUTPUT_JSON","FBX_JSON","OUTPUT_FBX_JSON","CLASS_KEYS","id","mediaTypes","outputs","defineOutputs","gr2","decoded","cmf","fbxJson","role","probes","raw","default","passthrough","extensions"],"mappings":";;;AAoBA,MAAMA,WAAW,GAAG,cAAc;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAY,SAASC,SAAS,CAC3C;EACI,OAAO,GAAGC,cAAc;;AAExB;AACJ;AACA;AACA;AACA;AACIC,EAAAA,WAAWA,CAACC,OAAO,GAAG,EAAE,EACxB;AACI,IAAA,KAAK,EAAE;AACP,IAAA,IAAI,CAACC,SAAS,CAACD,OAAO,CAAC;AAC3B,EAAA;;AAEA;AACJ;AACA;AACA;AACA;AACA;AACIC,EAAAA,SAASA,CAACD,OAAO,GAAG,EAAE,EACtB;IACI,IAAI,CAAC,OAAO,GAAGE,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE;AAAEC,MAAAA,SAAS,EAAE,KAAK;MAAE,GAAGH;KAAS,EAAEL,WAAW,CAAC;AAC3F,IAAA,OAAO,IAAI;AACf,EAAA;;AAEA;AACJ;AACA;AACA;AACA;AACA;AACIS,EAAAA,SAASA,CAACJ,OAAO,GAAG,EAAE,EACtB;AACI,IAAA,OAAOE,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE;AAAEC,MAAAA,SAAS,EAAE,KAAK;MAAE,GAAGH;KAAS,EAAEL,WAAW,CAAC;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AG,EAAE;AAAED,MAAAA,OAAO,EAAE;KAAM;AACtBE,IAAAA,OAAO,EAAE;AAAEC,MAAAA,IAAI,EAAE,OAAO;AAAEH,MAAAA,OAAO,EAAE,IAAI;AAAEI,MAAAA,MAAM,EAAE,CAAE,SAAS,EAAE,UAAU;KAAI;AAC5EC,IAAAA,GAAG,EAAE;AAAEF,MAAAA,IAAI,EAAE,OAAO;AAAEG,MAAAA,OAAO,EAAE,IAAI;AAAEC,MAAAA,WAAW,EAAE,IAAI;AAAEH,MAAAA,MAAM,EAAE,CAAE,KAAK,EAAE,UAAU;AAAG;AAC1F,GAAC,CAAC;EACF,OAAOI,UAAU,GAAG1B,MAAM,CAACC,MAAM,CAAC,CAAE,MAAM,CAAE,CAAC;AACjD;;;;"}
|
|
@@ -293,7 +293,7 @@ function parseGr2DocumentWithValues(input, values) {
|
|
|
293
293
|
* @param {object} values Normalized reader values.
|
|
294
294
|
* @returns {object} Support report.
|
|
295
295
|
*/
|
|
296
|
-
function
|
|
296
|
+
function probeSupportWithValues(input, values = DEFAULT_VALUES) {
|
|
297
297
|
try {
|
|
298
298
|
const metadata = inspectWithValues(input, values);
|
|
299
299
|
const recognized = metadata.encoding !== "";
|
|
@@ -306,7 +306,7 @@ function isSupportedWithValues(input, values = DEFAULT_VALUES) {
|
|
|
306
306
|
source: values.source || "buffer",
|
|
307
307
|
supported: recognized ? "partial" : "none",
|
|
308
308
|
confidence: recognized ? metadata.confidence : 0,
|
|
309
|
-
|
|
309
|
+
preferredOutput: recognized ? "gr2" : "",
|
|
310
310
|
reason: recognized ? "FBX document parsing plus basic static/skinned/morphed GR2/CMF output and basic CMF animation curves are available; full CarbonEngine-equivalent import is not implemented yet." : "Unrecognized FBX data.",
|
|
311
311
|
metadata,
|
|
312
312
|
variants: [{
|
|
@@ -333,7 +333,7 @@ function isSupportedWithValues(input, values = DEFAULT_VALUES) {
|
|
|
333
333
|
source: values.source || "buffer",
|
|
334
334
|
supported: "none",
|
|
335
335
|
confidence: 0,
|
|
336
|
-
|
|
336
|
+
preferredOutput: "",
|
|
337
337
|
reason: error.message,
|
|
338
338
|
metadata: null,
|
|
339
339
|
variants: [],
|
|
@@ -3928,5 +3928,5 @@ function readF64LE(bytes, offset) {
|
|
|
3928
3928
|
return new DataView(bytes.buffer, bytes.byteOffset + offset, 8).getFloat64(0, true);
|
|
3929
3929
|
}
|
|
3930
3930
|
|
|
3931
|
-
export { CLASS_KEYS, CMF_CLASS_KEYS, DEFAULT_VALUES, GR2_CLASS_KEYS, OUTPUT_CMF, OUTPUT_FBX_JSON, OUTPUT_GR2, OUTPUT_JSON, OUTPUT_RAW, inspectBytes, inspectWithValues, isFBX,
|
|
3931
|
+
export { CLASS_KEYS, CMF_CLASS_KEYS, DEFAULT_VALUES, GR2_CLASS_KEYS, OUTPUT_CMF, OUTPUT_FBX_JSON, OUTPUT_GR2, OUTPUT_JSON, OUTPUT_RAW, inspectBytes, inspectWithValues, isFBX, normalizeEmit, normalizeValues, parseWithValues, probeSupportWithValues, readCmfWithValues, readGr2WithValues, readWithValues, toBytes, toJsonValue, validateClass, validateClassKey };
|
|
3932
3932
|
//# sourceMappingURL=helpers.js.map
|