@forgeax/engine-pack 0.1.23 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -6
- package/dist/build.d.ts +4 -4
- package/dist/build.d.ts.map +1 -1
- package/dist/build.mjs +390 -294
- package/dist/build.mjs.map +1 -1
- package/dist/cli-asset.mjs +33 -35
- package/dist/cli-asset.mjs.map +1 -1
- package/dist/evidence/material-cook.d.ts +26 -0
- package/dist/evidence/material-cook.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +121 -27
- package/dist/index.mjs.map +1 -1
- package/dist/material-cook.d.ts +1 -1
- package/dist/material-cook.d.ts.map +1 -1
- package/dist/material-cook.mjs +102 -4
- package/dist/material-cook.mjs.map +1 -1
- package/dist/{parameterized-pack-node.d.ts → pack-authoring-node.d.ts} +7 -7
- package/dist/pack-authoring-node.d.ts.map +1 -0
- package/dist/{parameterized-pack-node.mjs → pack-authoring-node.mjs} +59 -63
- package/dist/pack-authoring-node.mjs.map +1 -0
- package/dist/{parameterized-pack.d.ts → pack-authoring.d.ts} +28 -31
- package/dist/pack-authoring.d.ts.map +1 -0
- package/dist/pack-authoring.mjs +1137 -0
- package/dist/pack-authoring.mjs.map +1 -0
- package/dist/runtime.mjs +1 -1
- package/dist/runtime.mjs.map +1 -1
- package/dist/scanner.d.ts +11 -9
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.mjs +36 -34
- package/dist/scanner.mjs.map +1 -1
- package/dist/schema.mjs +1 -1
- package/dist/schema.mjs.map +1 -1
- package/dist/scriptable-pack-node.d.ts +4 -4
- package/dist/scriptable-pack-node.d.ts.map +1 -1
- package/dist/scriptable-pack-node.mjs +18 -20
- package/dist/scriptable-pack-node.mjs.map +1 -1
- package/dist/scriptable-pack.d.ts +3 -2
- package/dist/scriptable-pack.d.ts.map +1 -1
- package/dist/scriptable-pack.mjs +19 -23
- package/dist/scriptable-pack.mjs.map +1 -1
- package/package.json +2 -7
- package/schema/pack.schema.json +1 -1
- package/src/__tests__/material-cook-receipt-layer-plan.unit.test.ts +16 -0
- package/src/__tests__/material-cook-schema.unit.test.ts +62 -0
- package/src/__tests__/material-declaration-boundary.unit.test.ts +35 -0
- package/src/__tests__/material-surface-consumer-census.test.ts +24 -0
- package/src/__tests__/material-surface-publication.unit.test.ts +159 -0
- package/src/__tests__/material-surface-wire.unit.test.ts +30 -0
- package/src/__tests__/{parameterized-pack-authoring-gateway.unit.test.ts → pack-authoring-gateway.unit.test.ts} +9 -9
- package/src/__tests__/{parameterized-pack.unit.test.ts → pack-authoring.unit.test.ts} +10 -10
- package/src/__tests__/{parameterized-pack-scanner.unit.test.ts → pack-scanner.unit.test.ts} +6 -6
- package/src/__tests__/scanner-inventory.contract.test.ts +2 -4
- package/src/__tests__/scanner-inventory.test.ts +7 -6
- package/src/__tests__/scriptable-pack-cli.integration.test.ts +1 -1
- package/src/build.ts +10 -8
- package/src/catalog-builder.ts +3 -3
- package/src/cli-asset.ts +5 -5
- package/src/evidence/material-cook.ts +170 -7
- package/src/evidence/source-inventory.ts +3 -3
- package/src/index.ts +6 -1
- package/src/material-cook.ts +3 -0
- package/src/{parameterized-pack-node.ts → pack-authoring-node.ts} +71 -73
- package/src/{parameterized-pack.ts → pack-authoring.ts} +59 -74
- package/src/scanner.ts +33 -31
- package/src/schema/material-cook.schema.json +47 -1
- package/src/scriptable-pack-node.ts +25 -25
- package/src/scriptable-pack.ts +3 -2
- package/dist/__tests__/ai-recovery.unit.test.d.ts +0 -2
- package/dist/__tests__/ai-recovery.unit.test.d.ts.map +0 -1
- package/dist/__tests__/artifact-path.test.d.ts +0 -2
- package/dist/__tests__/artifact-path.test.d.ts.map +0 -1
- package/dist/__tests__/asset-evidence-error-hints.test.d.ts +0 -2
- package/dist/__tests__/asset-evidence-error-hints.test.d.ts.map +0 -1
- package/dist/__tests__/asset-evidence-lifecycle.test.d.ts +0 -2
- package/dist/__tests__/asset-evidence-lifecycle.test.d.ts.map +0 -1
- package/dist/__tests__/asset-evidence-schema.test.d.ts +0 -2
- package/dist/__tests__/asset-evidence-schema.test.d.ts.map +0 -1
- package/dist/__tests__/atlas-cli-region-mismatch.test.d.ts +0 -2
- package/dist/__tests__/atlas-cli-region-mismatch.test.d.ts.map +0 -1
- package/dist/__tests__/atlas-error-code-owner.test-d.d.ts +0 -2
- package/dist/__tests__/atlas-error-code-owner.test-d.d.ts.map +0 -1
- package/dist/__tests__/cli-asset-evidence.integration.test.d.ts +0 -2
- package/dist/__tests__/cli-asset-evidence.integration.test.d.ts.map +0 -1
- package/dist/__tests__/cli.unit.test.d.ts +0 -2
- package/dist/__tests__/cli.unit.test.d.ts.map +0 -1
- package/dist/__tests__/evidence-source-inventory.unit.test.d.ts +0 -2
- package/dist/__tests__/evidence-source-inventory.unit.test.d.ts.map +0 -1
- package/dist/__tests__/guid-collision.unit.test.d.ts +0 -2
- package/dist/__tests__/guid-collision.unit.test.d.ts.map +0 -1
- package/dist/__tests__/guid-validator-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/guid-validator-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/inventory-schema.test.d.ts +0 -2
- package/dist/__tests__/inventory-schema.test.d.ts.map +0 -1
- package/dist/__tests__/material-cook-dependencies.unit.test.d.ts +0 -2
- package/dist/__tests__/material-cook-dependencies.unit.test.d.ts.map +0 -1
- package/dist/__tests__/material-cook-receipt.unit.test.d.ts +0 -2
- package/dist/__tests__/material-cook-receipt.unit.test.d.ts.map +0 -1
- package/dist/__tests__/material-cook-schema.unit.test.d.ts +0 -2
- package/dist/__tests__/material-cook-schema.unit.test.d.ts.map +0 -1
- package/dist/__tests__/mesh-bin-consumer-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/mesh-bin-consumer-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/mesh-bin-contract.unit.test.d.ts +0 -2
- package/dist/__tests__/mesh-bin-contract.unit.test.d.ts.map +0 -1
- package/dist/__tests__/meta-schema-optional.test.d.ts +0 -2
- package/dist/__tests__/meta-schema-optional.test.d.ts.map +0 -1
- package/dist/__tests__/meta-source-overrides.unit.test.d.ts +0 -2
- package/dist/__tests__/meta-source-overrides.unit.test.d.ts.map +0 -1
- package/dist/__tests__/native-cooker-registry.test.d.ts +0 -2
- package/dist/__tests__/native-cooker-registry.test.d.ts.map +0 -1
- package/dist/__tests__/offline-evidence-artifact-verification-owner.test-d.d.ts +0 -2
- package/dist/__tests__/offline-evidence-artifact-verification-owner.test-d.d.ts.map +0 -1
- package/dist/__tests__/offline-evidence.integration.test.d.ts +0 -2
- package/dist/__tests__/offline-evidence.integration.test.d.ts.map +0 -1
- package/dist/__tests__/owner-chain.integration.test.d.ts +0 -2
- package/dist/__tests__/owner-chain.integration.test.d.ts.map +0 -1
- package/dist/__tests__/pack-v2-fixture-migration.test.d.ts +0 -2
- package/dist/__tests__/pack-v2-fixture-migration.test.d.ts.map +0 -1
- package/dist/__tests__/pack-v2-schema.test.d.ts +0 -2
- package/dist/__tests__/pack-v2-schema.test.d.ts.map +0 -1
- package/dist/__tests__/pack.unit.test.d.ts +0 -2
- package/dist/__tests__/pack.unit.test.d.ts.map +0 -1
- package/dist/__tests__/package-finalizer.contract.test.d.ts +0 -2
- package/dist/__tests__/package-finalizer.contract.test.d.ts.map +0 -1
- package/dist/__tests__/parameterized-pack-authoring-gateway.unit.test.d.ts +0 -2
- package/dist/__tests__/parameterized-pack-authoring-gateway.unit.test.d.ts.map +0 -1
- package/dist/__tests__/parameterized-pack-scanner.unit.test.d.ts +0 -2
- package/dist/__tests__/parameterized-pack-scanner.unit.test.d.ts.map +0 -1
- package/dist/__tests__/parameterized-pack.unit.test.d.ts +0 -2
- package/dist/__tests__/parameterized-pack.unit.test.d.ts.map +0 -1
- package/dist/__tests__/producer-contract-schema.unit.test.d.ts +0 -2
- package/dist/__tests__/producer-contract-schema.unit.test.d.ts.map +0 -1
- package/dist/__tests__/resolve-asset-source.test.d.ts +0 -2
- package/dist/__tests__/resolve-asset-source.test.d.ts.map +0 -1
- package/dist/__tests__/runtime-projection.unit.test.d.ts +0 -2
- package/dist/__tests__/runtime-projection.unit.test.d.ts.map +0 -1
- package/dist/__tests__/runtime.browser.test.d.ts +0 -2
- package/dist/__tests__/runtime.browser.test.d.ts.map +0 -1
- package/dist/__tests__/scanner-blacklist.test.d.ts +0 -2
- package/dist/__tests__/scanner-blacklist.test.d.ts.map +0 -1
- package/dist/__tests__/scanner-inventory.contract.test.d.ts +0 -2
- package/dist/__tests__/scanner-inventory.contract.test.d.ts.map +0 -1
- package/dist/__tests__/scanner-inventory.test.d.ts +0 -2
- package/dist/__tests__/scanner-inventory.test.d.ts.map +0 -1
- package/dist/__tests__/scanner-mount-cycle.test.d.ts +0 -2
- package/dist/__tests__/scanner-mount-cycle.test.d.ts.map +0 -1
- package/dist/__tests__/scriptable-pack-cli.integration.test.d.ts +0 -2
- package/dist/__tests__/scriptable-pack-cli.integration.test.d.ts.map +0 -1
- package/dist/__tests__/scriptable-pack-ddc-key.unit.test.d.ts +0 -2
- package/dist/__tests__/scriptable-pack-ddc-key.unit.test.d.ts.map +0 -1
- package/dist/__tests__/topology-actions.unit.test.d.ts +0 -2
- package/dist/__tests__/topology-actions.unit.test.d.ts.map +0 -1
- package/dist/__tests__/topology.unit.test.d.ts +0 -2
- package/dist/__tests__/topology.unit.test.d.ts.map +0 -1
- package/dist/parameterized-pack-node.d.ts.map +0 -1
- package/dist/parameterized-pack-node.mjs.map +0 -1
- package/dist/parameterized-pack.d.ts.map +0 -1
|
@@ -11,6 +11,17 @@ export interface MaterialCookArtifact {
|
|
|
11
11
|
readonly digest: string;
|
|
12
12
|
readonly bytes: Uint8Array;
|
|
13
13
|
}
|
|
14
|
+
/** Backend capability projection for one immutable cooked material artifact. */
|
|
15
|
+
export interface MaterialCookVariantContext {
|
|
16
|
+
readonly backend: 'webgpu' | 'webgl2' | 'wgpu-native';
|
|
17
|
+
readonly capability: 'storage-buffer' | 'uniform-fallback';
|
|
18
|
+
}
|
|
19
|
+
/** Additional backend artifact published with one material generation. */
|
|
20
|
+
export interface MaterialCookVariant {
|
|
21
|
+
readonly context: MaterialCookVariantContext;
|
|
22
|
+
readonly specializationKey: string;
|
|
23
|
+
readonly artifact: MaterialCookArtifact;
|
|
24
|
+
}
|
|
14
25
|
export interface MaterialCookWasmProvenance {
|
|
15
26
|
readonly sourceContentKey: string;
|
|
16
27
|
readonly artifactSha256: string;
|
|
@@ -41,6 +52,8 @@ export interface MaterialCookReceipt {
|
|
|
41
52
|
readonly identity: MaterialCookIdentity;
|
|
42
53
|
readonly derivedInterface: {
|
|
43
54
|
readonly layoutIdentity: string;
|
|
55
|
+
/** Build-time Standard physical lowering identity, when the root is Standard. */
|
|
56
|
+
readonly layerPlanIdentity?: string;
|
|
44
57
|
};
|
|
45
58
|
}
|
|
46
59
|
export interface MaterialParameterContract {
|
|
@@ -54,6 +67,10 @@ export interface CookedMaterialRecord {
|
|
|
54
67
|
readonly materialGuid?: string;
|
|
55
68
|
readonly publicationGeneration?: number;
|
|
56
69
|
readonly specializationKey?: string;
|
|
70
|
+
/** Compiler context used by the primary `artifact` entry. */
|
|
71
|
+
readonly variantContext?: MaterialCookVariantContext;
|
|
72
|
+
/** Additional immutable artifacts for other backend capability lanes. */
|
|
73
|
+
readonly variants?: readonly MaterialCookVariant[];
|
|
57
74
|
readonly artifactDigest?: string;
|
|
58
75
|
readonly sourceClosure?: readonly string[];
|
|
59
76
|
readonly parameterContract?: MaterialParameterContract;
|
|
@@ -81,6 +98,15 @@ export interface MaterialCookIdentityExpectation {
|
|
|
81
98
|
readonly artifactDigest?: string;
|
|
82
99
|
readonly inputDigest?: string;
|
|
83
100
|
}
|
|
101
|
+
/** Shared ownership predicate for the built-in Standard material root. */
|
|
102
|
+
export declare function isStandardRootModule(module: string): boolean;
|
|
103
|
+
export declare function isStandardMaterialRecord(record: Pick<CookedMaterialRecord, 'resolved'>): boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Recompute the Standard layer identity from the admitted resolved root.
|
|
106
|
+
* Material admission and runtime loading share this owner so a stale receipt
|
|
107
|
+
* cannot select a different physical layer plan after cooking.
|
|
108
|
+
*/
|
|
109
|
+
export declare function materialLayerPlanIdentity(record: Pick<CookedMaterialRecord, 'resolved'>): string | undefined;
|
|
84
110
|
export declare function collectMaterialCookRefs(material: Partial<MaterialAsset>): MaterialCookRefs;
|
|
85
111
|
export declare function createMaterialArtifactDigest(bytes: Uint8Array): string;
|
|
86
112
|
export declare function createMaterialCookIdentity(input: MaterialCookIdentityInput): MaterialCookIdentity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"material-cook.d.ts","sourceRoot":"","sources":["../../src/evidence/material-cook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,YAAY,EAGZ,aAAa,EACb,MAAM,EACP,MAAM,uBAAuB,CAAC;AAK/B,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;CAC5B;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED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CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { type CookedMaterialRecord, collectMaterialCookRefs, createMaterialArtifactDigest, createMaterialCookIdentity, type MaterialCookArtifact, type MaterialCookIdentity, type MaterialCookIdentityExpectation, type MaterialCookIdentityInput, type MaterialCookReceipt, type MaterialCookRecordError, type MaterialCookRefs, type MaterialCookWasmProvenance, projectCookedMaterialRecord, serializeCookedMaterialRecord, serializeMaterialCookReceipt, validateCookedMaterialRecord, validateMaterialCookReceipt, } from './evidence/material-cook.js';
|
|
1
|
+
export { type CookedMaterialRecord, collectMaterialCookRefs, createMaterialArtifactDigest, createMaterialCookIdentity, isStandardMaterialRecord, isStandardRootModule, type MaterialCookArtifact, type MaterialCookIdentity, type MaterialCookIdentityExpectation, type MaterialCookIdentityInput, type MaterialCookReceipt, type MaterialCookRecordError, type MaterialCookRefs, type MaterialCookVariant, type MaterialCookVariantContext, type MaterialCookWasmProvenance, materialLayerPlanIdentity, projectCookedMaterialRecord, serializeCookedMaterialRecord, serializeMaterialCookReceipt, validateCookedMaterialRecord, validateMaterialCookReceipt, } from './evidence/material-cook.js';
|
|
2
2
|
export { buildOfflineAssetEvidence, packageVerification } from './evidence/offline-evidence.js';
|
|
3
3
|
export { AssetGuid, isValidAssetGuidString, isValidPackSourceKey, PACK_SOURCE_KEY_RE, PackageId, } from './guid.js';
|
|
4
4
|
export { decodeMeshBinHeader, MESH_BIN_DIGEST_BYTES, MESH_BIN_HEADER_V4_BYTES, MESH_BIN_PROJECTION_VERSION, MESH_BIN_VERSION, type MeshBinContractError, type MeshBinHeaderResult, type MeshBinHeaderV4, writeMeshBinHeader, } from './mesh-bin-contract.js';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './pack-authoring.js';
|
|
6
6
|
export { validateProducerContract, validateProducerOutputs } from './producer-contract.js';
|
|
7
7
|
export { type AssetReader, isScriptablePackAssetKind, projectScriptablePackSceneComponents, SCRIPTABLE_PACK_ASSET_KINDS, type ScriptablePackAssetKind, type ScriptablePackReadError, type ScriptablePackSceneComponent, type ScriptablePackSceneComponentInput, type ScriptablePackSourceClosureEntry, } from './scriptable-pack.js';
|
|
8
8
|
export { calculateTopologyDiff, diffTopology } from './topology.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,oBAAoB,EACzB,uBAAuB,EACvB,4BAA4B,EAC5B,0BAA0B,EAC1B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,+BAA+B,EACpC,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,0BAA0B,EAC/B,2BAA2B,EAC3B,6BAA6B,EAC7B,4BAA4B,EAC5B,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAChG,OAAO,EACL,SAAS,EACT,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,SAAS,GACV,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,2BAA2B,EAC3B,gBAAgB,EAChB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAChC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,oBAAoB,EACzB,uBAAuB,EACvB,4BAA4B,EAC5B,0BAA0B,EAC1B,wBAAwB,EACxB,oBAAoB,EACpB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,+BAA+B,EACpC,KAAK,yBAAyB,EAC9B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AS,EACT,aAAa,EACb,SAAS,EACT,MAAM,EACN,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,aAAa,EACb,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,UAAU,GACX,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,kBAAkB,EAClB,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,GAChC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAElF,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAWvE"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MATERIAL_TEXTURE_SLOTS, ok, projectCookProductEvidence, projectAssetEvidence, err, validateSourceOverrideMap } from '@forgeax/engine-types';
|
|
1
|
+
import { deriveStandardLayerPlan, MATERIAL_TEXTURE_SLOTS, ok, projectCookProductEvidence, projectAssetEvidence, err, validateSourceOverrideMap } from '@forgeax/engine-types';
|
|
2
2
|
import { sha256 } from '@noble/hashes/sha2.js';
|
|
3
3
|
import { bytesToHex } from '@noble/hashes/utils.js';
|
|
4
4
|
import { sha1 } from '@noble/hashes/legacy.js';
|
|
@@ -6815,6 +6815,25 @@ var require_dist = __commonJS({
|
|
|
6815
6815
|
exports.default = formatsPlugin;
|
|
6816
6816
|
}
|
|
6817
6817
|
});
|
|
6818
|
+
var STANDARD_ROOT_MODULES = /* @__PURE__ */ new Set([
|
|
6819
|
+
"forgeax::default-standard-pbr",
|
|
6820
|
+
"forgeax::pbr-skin",
|
|
6821
|
+
"forgeax_material::standard",
|
|
6822
|
+
"forgeax_material::pbr-skin",
|
|
6823
|
+
"forgeax::default-shadow-caster"
|
|
6824
|
+
]);
|
|
6825
|
+
function isStandardRootModule(module) {
|
|
6826
|
+
return STANDARD_ROOT_MODULES.has(module);
|
|
6827
|
+
}
|
|
6828
|
+
function isStandardMaterialRecord(record) {
|
|
6829
|
+
return record.resolved.passes.some((pass) => isStandardRootModule(pass.program.module));
|
|
6830
|
+
}
|
|
6831
|
+
function materialLayerPlanIdentity(record) {
|
|
6832
|
+
if (!isStandardMaterialRecord(record)) {
|
|
6833
|
+
return void 0;
|
|
6834
|
+
}
|
|
6835
|
+
return deriveStandardLayerPlan(record.resolved.parameters, record.resolved.passes).identity;
|
|
6836
|
+
}
|
|
6818
6837
|
function unique(values) {
|
|
6819
6838
|
return [...new Set(values)].sort();
|
|
6820
6839
|
}
|
|
@@ -6909,6 +6928,14 @@ function invalid(field, actual) {
|
|
|
6909
6928
|
}
|
|
6910
6929
|
});
|
|
6911
6930
|
}
|
|
6931
|
+
function normalizeArtifactBytes(value) {
|
|
6932
|
+
if (Array.isArray(value)) {
|
|
6933
|
+
return value.every((byte) => Number.isInteger(byte) && byte >= 0 && byte <= 255) ? Uint8Array.from(value) : void 0;
|
|
6934
|
+
}
|
|
6935
|
+
if (!ArrayBuffer.isView(value)) return void 0;
|
|
6936
|
+
const view = value;
|
|
6937
|
+
return new Uint8Array(view.buffer, view.byteOffset, view.byteLength).slice();
|
|
6938
|
+
}
|
|
6912
6939
|
var IDENTITY_FIELDS = [
|
|
6913
6940
|
"materialContractDigest",
|
|
6914
6941
|
"sourceRevision",
|
|
@@ -6965,6 +6992,12 @@ function validateMaterialCookReceipt(value, expected = {}) {
|
|
|
6965
6992
|
if (derivedInterface.layoutIdentity !== identity.layoutIdentity) {
|
|
6966
6993
|
return invalid("receipt.derivedInterface.layoutIdentity", derivedInterface.layoutIdentity);
|
|
6967
6994
|
}
|
|
6995
|
+
if (derivedInterface.layerPlanIdentity !== void 0 && (typeof derivedInterface.layerPlanIdentity !== "string" || derivedInterface.layerPlanIdentity.length === 0)) {
|
|
6996
|
+
return invalid(
|
|
6997
|
+
"receipt.derivedInterface.layerPlanIdentity",
|
|
6998
|
+
derivedInterface.layerPlanIdentity
|
|
6999
|
+
);
|
|
7000
|
+
}
|
|
6968
7001
|
for (const field of ["sourceClosure", "profile", "compilerVersion"]) {
|
|
6969
7002
|
const fieldValue = candidate[field];
|
|
6970
7003
|
if (field === "sourceClosure" && !Array.isArray(fieldValue) || field !== "sourceClosure" && typeof fieldValue !== "string") {
|
|
@@ -6990,7 +7023,10 @@ function validateMaterialCookReceipt(value, expected = {}) {
|
|
|
6990
7023
|
profile: candidate.profile,
|
|
6991
7024
|
compilerVersion: candidate.compilerVersion,
|
|
6992
7025
|
identity,
|
|
6993
|
-
derivedInterface: {
|
|
7026
|
+
derivedInterface: {
|
|
7027
|
+
layoutIdentity: derivedInterface.layoutIdentity,
|
|
7028
|
+
...derivedInterface.layerPlanIdentity === void 0 ? {} : { layerPlanIdentity: derivedInterface.layerPlanIdentity }
|
|
7029
|
+
}
|
|
6994
7030
|
});
|
|
6995
7031
|
}
|
|
6996
7032
|
function validateCookedMaterialRecord(value) {
|
|
@@ -7005,6 +7041,33 @@ function validateCookedMaterialRecord(value) {
|
|
|
7005
7041
|
return invalid("publicationGeneration", candidate.publicationGeneration);
|
|
7006
7042
|
if (candidate.specializationKey !== void 0 && typeof candidate.specializationKey !== "string")
|
|
7007
7043
|
return invalid("specializationKey");
|
|
7044
|
+
if (candidate.variantContext !== void 0) {
|
|
7045
|
+
if (candidate.variantContext === null || typeof candidate.variantContext !== "object")
|
|
7046
|
+
return invalid("variantContext");
|
|
7047
|
+
const context = candidate.variantContext;
|
|
7048
|
+
if (context.backend !== "webgpu" && context.backend !== "webgl2" && context.backend !== "wgpu-native" || context.capability !== "storage-buffer" && context.capability !== "uniform-fallback")
|
|
7049
|
+
return invalid("variantContext", candidate.variantContext);
|
|
7050
|
+
}
|
|
7051
|
+
if (candidate.variants !== void 0) {
|
|
7052
|
+
if (!Array.isArray(candidate.variants)) return invalid("variants");
|
|
7053
|
+
for (const [index, value2] of candidate.variants.entries()) {
|
|
7054
|
+
if (value2 === null || typeof value2 !== "object") return invalid(`variants[${index}]`);
|
|
7055
|
+
const variant = value2;
|
|
7056
|
+
const context = variant.context;
|
|
7057
|
+
if (context === null || typeof context !== "object")
|
|
7058
|
+
return invalid(`variants[${index}].context`);
|
|
7059
|
+
const contextRecord = context;
|
|
7060
|
+
if (contextRecord.backend !== "webgpu" && contextRecord.backend !== "webgl2" && contextRecord.backend !== "wgpu-native" || contextRecord.capability !== "storage-buffer" && contextRecord.capability !== "uniform-fallback")
|
|
7061
|
+
return invalid(`variants[${index}].context`, context);
|
|
7062
|
+
if (typeof variant.specializationKey !== "string" || variant.specializationKey.length === 0)
|
|
7063
|
+
return invalid(`variants[${index}].specializationKey`);
|
|
7064
|
+
if (variant.artifact === null || typeof variant.artifact !== "object")
|
|
7065
|
+
return invalid(`variants[${index}].artifact`);
|
|
7066
|
+
const variantArtifact = variant.artifact;
|
|
7067
|
+
if (typeof variantArtifact.mediaType !== "string" || typeof variantArtifact.path !== "string" || typeof variantArtifact.digest !== "string" || normalizeArtifactBytes(variantArtifact.bytes) === void 0)
|
|
7068
|
+
return invalid(`variants[${index}].artifact`);
|
|
7069
|
+
}
|
|
7070
|
+
}
|
|
7008
7071
|
if (candidate.artifactDigest !== void 0 && typeof candidate.artifactDigest !== "string")
|
|
7009
7072
|
return invalid("artifactDigest");
|
|
7010
7073
|
if (candidate.sourceClosure !== void 0 && (!Array.isArray(candidate.sourceClosure) || candidate.sourceClosure.some((path) => typeof path !== "string")))
|
|
@@ -7033,6 +7096,26 @@ function validateCookedMaterialRecord(value) {
|
|
|
7033
7096
|
artifactDigest: artifact.digest
|
|
7034
7097
|
});
|
|
7035
7098
|
if (!receiptResult.ok) return receiptResult;
|
|
7099
|
+
const resolved = candidate.resolved;
|
|
7100
|
+
if (!Array.isArray(resolved.passes)) return invalid("resolved.passes", resolved.passes);
|
|
7101
|
+
if (!Array.isArray(resolved.parameters))
|
|
7102
|
+
return invalid("resolved.parameters", resolved.parameters);
|
|
7103
|
+
if (resolved.values === null || typeof resolved.values !== "object" || Array.isArray(resolved.values))
|
|
7104
|
+
return invalid("resolved.values", resolved.values);
|
|
7105
|
+
let expectedLayerPlanIdentity;
|
|
7106
|
+
try {
|
|
7107
|
+
expectedLayerPlanIdentity = materialLayerPlanIdentity({
|
|
7108
|
+
resolved
|
|
7109
|
+
});
|
|
7110
|
+
} catch (error) {
|
|
7111
|
+
return invalid("resolved.layerPlanIdentity", error instanceof Error ? error.message : error);
|
|
7112
|
+
}
|
|
7113
|
+
if (expectedLayerPlanIdentity !== void 0 && receiptResult.value.derivedInterface.layerPlanIdentity !== expectedLayerPlanIdentity) {
|
|
7114
|
+
return invalid(
|
|
7115
|
+
"receipt.derivedInterface.layerPlanIdentity",
|
|
7116
|
+
receiptResult.value.derivedInterface.layerPlanIdentity
|
|
7117
|
+
);
|
|
7118
|
+
}
|
|
7036
7119
|
if (candidate.artifactDigest !== void 0 && candidate.artifactDigest !== artifact.digest)
|
|
7037
7120
|
return invalid("artifactDigest", candidate.artifactDigest);
|
|
7038
7121
|
if (candidate.publicationGeneration !== void 0 && receiptResult.value.identity.cookGeneration !== candidate.publicationGeneration)
|
|
@@ -7041,8 +7124,21 @@ function validateCookedMaterialRecord(value) {
|
|
|
7041
7124
|
...candidate,
|
|
7042
7125
|
artifact: {
|
|
7043
7126
|
...artifact,
|
|
7044
|
-
bytes:
|
|
7127
|
+
bytes: normalizeArtifactBytes(artifact.bytes)
|
|
7045
7128
|
},
|
|
7129
|
+
...Array.isArray(candidate.variants) ? {
|
|
7130
|
+
variants: candidate.variants.map((value2) => {
|
|
7131
|
+
const variant = value2;
|
|
7132
|
+
const variantArtifact = variant.artifact;
|
|
7133
|
+
return {
|
|
7134
|
+
...variant,
|
|
7135
|
+
artifact: {
|
|
7136
|
+
...variantArtifact,
|
|
7137
|
+
bytes: normalizeArtifactBytes(variantArtifact.bytes)
|
|
7138
|
+
}
|
|
7139
|
+
};
|
|
7140
|
+
})
|
|
7141
|
+
} : {},
|
|
7046
7142
|
receipt: receiptResult.value
|
|
7047
7143
|
};
|
|
7048
7144
|
return ok(normalized);
|
|
@@ -7052,6 +7148,8 @@ function projectCookedMaterialRecord(record) {
|
|
|
7052
7148
|
resolved: record.resolved,
|
|
7053
7149
|
refs: record.refs,
|
|
7054
7150
|
artifact: record.artifact,
|
|
7151
|
+
...record.variantContext === void 0 ? {} : { variantContext: record.variantContext },
|
|
7152
|
+
...record.variants === void 0 ? {} : { variants: record.variants },
|
|
7055
7153
|
receipt: record.receipt,
|
|
7056
7154
|
schemaVersion: record.schemaVersion
|
|
7057
7155
|
};
|
|
@@ -7780,10 +7878,10 @@ function definePack(definition) {
|
|
|
7780
7878
|
validated.value
|
|
7781
7879
|
);
|
|
7782
7880
|
}
|
|
7783
|
-
function
|
|
7881
|
+
function projectScriptablePackMeta(definition, sourcePath) {
|
|
7784
7882
|
return {
|
|
7785
7883
|
schemaVersion: "2.0.0",
|
|
7786
|
-
kind: "
|
|
7884
|
+
kind: "scriptable-pack-source",
|
|
7787
7885
|
packageId: PackageId.format(definition.packageId),
|
|
7788
7886
|
source: sourcePath,
|
|
7789
7887
|
..."parameters" in definition ? {
|
|
@@ -7880,7 +7978,7 @@ function validatePackDefinition(value, sourcePath) {
|
|
|
7880
7978
|
})
|
|
7881
7979
|
);
|
|
7882
7980
|
}
|
|
7883
|
-
function
|
|
7981
|
+
function hasPackParameters(value) {
|
|
7884
7982
|
return isRecord(value) && Array.isArray(value.parameters) && value.parameters.length > 0;
|
|
7885
7983
|
}
|
|
7886
7984
|
function resolvePackParameterValues(definition, overrides = {}, inheritedValues) {
|
|
@@ -8023,7 +8121,7 @@ function parsePackJsonAsset(value, sourceKey2) {
|
|
|
8023
8121
|
};
|
|
8024
8122
|
return ok(withArtifacts);
|
|
8025
8123
|
}
|
|
8026
|
-
function
|
|
8124
|
+
function parsePackSourceJson(value) {
|
|
8027
8125
|
if (!isRecord(value))
|
|
8028
8126
|
return jsonError("$", "a v3 pack.json object", value, "document is not an object");
|
|
8029
8127
|
if (value.schemaVersion !== "3.0.0")
|
|
@@ -8102,10 +8200,8 @@ function parseParameterizedPackJson(value) {
|
|
|
8102
8200
|
values: Object.freeze({ ...value.values })
|
|
8103
8201
|
});
|
|
8104
8202
|
}
|
|
8105
|
-
var parsePackJson = parseParameterizedPackJson;
|
|
8106
|
-
var parsePackAuthoringJson = parseParameterizedPackJson;
|
|
8107
8203
|
function projectDirectPackJson(value) {
|
|
8108
|
-
const parsed = "format" in value ? ok(value) :
|
|
8204
|
+
const parsed = "format" in value ? ok(value) : parsePackSourceJson(value);
|
|
8109
8205
|
if (!parsed.ok) return parsed;
|
|
8110
8206
|
if (parsed.value.format !== "direct") {
|
|
8111
8207
|
return failure2(
|
|
@@ -8151,9 +8247,9 @@ async function resolvePackParameterInheritance(subject, readParent) {
|
|
|
8151
8247
|
if (current.format === "direct") {
|
|
8152
8248
|
return failure2(
|
|
8153
8249
|
authoringError(
|
|
8154
|
-
"pack-parent-
|
|
8155
|
-
"a
|
|
8156
|
-
"direct packs cannot be instance parents; point the instance at a
|
|
8250
|
+
"pack-parent-has-no-parameters",
|
|
8251
|
+
"a ScriptablePack source with parameters as the parent",
|
|
8252
|
+
"direct packs cannot be instance parents; point the instance at a ScriptablePack source with parameters",
|
|
8157
8253
|
{ packageId: currentId }
|
|
8158
8254
|
)
|
|
8159
8255
|
);
|
|
@@ -8164,7 +8260,7 @@ async function resolvePackParameterInheritance(subject, readParent) {
|
|
|
8164
8260
|
if (descriptors2.value.length === 0) {
|
|
8165
8261
|
return failure2(
|
|
8166
8262
|
authoringError(
|
|
8167
|
-
"pack-parent-
|
|
8263
|
+
"pack-parent-has-no-parameters",
|
|
8168
8264
|
"the parent source to declare a non-empty parameter list",
|
|
8169
8265
|
"use clone for an independent zero-parameter Pack instead of creating an empty instance",
|
|
8170
8266
|
{ packageId: currentId }
|
|
@@ -8190,7 +8286,7 @@ async function resolvePackParameterInheritance(subject, readParent) {
|
|
|
8190
8286
|
authoringError(
|
|
8191
8287
|
"pack-parent-not-found",
|
|
8192
8288
|
"the parent packageId to resolve in the source index",
|
|
8193
|
-
"inspect the parent locator or recreate the instance from a live
|
|
8289
|
+
"inspect the parent locator or recreate the instance from a live ScriptablePack with parameters",
|
|
8194
8290
|
{ packageId: currentId, parent: PackageId.format(current.parent) }
|
|
8195
8291
|
)
|
|
8196
8292
|
);
|
|
@@ -8232,7 +8328,7 @@ async function resolvePackParameterInheritance(subject, readParent) {
|
|
|
8232
8328
|
return visit(subject, []);
|
|
8233
8329
|
}
|
|
8234
8330
|
var resolvePackInheritance = resolvePackParameterInheritance;
|
|
8235
|
-
var
|
|
8331
|
+
var PACK_AUTHORING_OPERATION_IDS = [
|
|
8236
8332
|
"asset.list",
|
|
8237
8333
|
"asset.inspect",
|
|
8238
8334
|
"asset.resolve",
|
|
@@ -8244,7 +8340,7 @@ var PARAMETERIZED_PACK_OPERATION_IDS = [
|
|
|
8244
8340
|
"asset-source.rebuild",
|
|
8245
8341
|
"asset-source.cold-cook"
|
|
8246
8342
|
];
|
|
8247
|
-
function
|
|
8343
|
+
function createPackAuthoringGateway(port) {
|
|
8248
8344
|
const requests = /* @__PURE__ */ new Map();
|
|
8249
8345
|
return {
|
|
8250
8346
|
execute(operation) {
|
|
@@ -8310,14 +8406,12 @@ function createParameterizedPackAuthoringGateway(port) {
|
|
|
8310
8406
|
}
|
|
8311
8407
|
};
|
|
8312
8408
|
}
|
|
8313
|
-
var
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
})
|
|
8320
|
-
);
|
|
8409
|
+
var PACK_AUTHORING_OPERATION_DESCRIPTORS = PACK_AUTHORING_OPERATION_IDS.map((id) => ({
|
|
8410
|
+
id,
|
|
8411
|
+
domain: id.startsWith("asset-source.") ? "session" : "asset",
|
|
8412
|
+
readOnly: id.startsWith("asset."),
|
|
8413
|
+
requiresRevision: !id.startsWith("asset.") && id !== "asset-source.create"
|
|
8414
|
+
}));
|
|
8321
8415
|
function isRecord2(value) {
|
|
8322
8416
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
8323
8417
|
}
|
|
@@ -8954,7 +9048,7 @@ var pack_schema_default = {
|
|
|
8954
9048
|
},
|
|
8955
9049
|
parent: {
|
|
8956
9050
|
$ref: "#/$defs/guid36",
|
|
8957
|
-
description: "Parent
|
|
9051
|
+
description: "Parent ScriptablePack packageId for one v3 instance; the source may declare Pack parameters."
|
|
8958
9052
|
},
|
|
8959
9053
|
values: {
|
|
8960
9054
|
type: "object",
|
|
@@ -9301,6 +9395,6 @@ function parsePackV2(value) {
|
|
|
9301
9395
|
return ok(value);
|
|
9302
9396
|
}
|
|
9303
9397
|
|
|
9304
|
-
export { AssetGuid, MESH_BIN_DIGEST_BYTES, MESH_BIN_HEADER_V4_BYTES, MESH_BIN_PROJECTION_VERSION, MESH_BIN_VERSION,
|
|
9398
|
+
export { AssetGuid, MESH_BIN_DIGEST_BYTES, MESH_BIN_HEADER_V4_BYTES, MESH_BIN_PROJECTION_VERSION, MESH_BIN_VERSION, PACK_AUTHORING_OPERATION_DESCRIPTORS, PACK_AUTHORING_OPERATION_IDS, PACK_PARAMETER_TYPES, PACK_SOURCE_KEY_RE, PackageId, SCRIPTABLE_PACK_ASSET_KINDS, buildOfflineAssetEvidence, calculateTopologyDiff, collectMaterialCookRefs, createMaterialArtifactDigest, createMaterialCookIdentity, createPackAuthoringGateway, decodeMeshBinHeader, definePack, definePackageId, diffTopology, hasPackParameters, isScriptablePackAssetKind, isStandardMaterialRecord, isStandardRootModule, isValidAssetGuidString, isValidPackSourceKey, materialLayerPlanIdentity, packageVerification, parsePackSourceJson, parsePackV2, projectCookedMaterialRecord, projectDirectPackJson, projectRuntimePack, projectScriptablePackMeta, projectScriptablePackSceneComponents, resolvePackInheritance, resolvePackParameterInheritance, resolvePackParameterValues, serializeCookedMaterialRecord, serializeMaterialCookReceipt, validateArtifactPath, validateCookedMaterialRecord, validateMaterialCookReceipt, validateMeta, validatePack, validatePackDefinition, validatePackV2, validateProducerContract, validateProducerOutputs, writeMaterialArtifact, writeMeshBinHeader };
|
|
9305
9399
|
//# sourceMappingURL=index.mjs.map
|
|
9306
9400
|
//# sourceMappingURL=index.mjs.map
|