@aura3d/workflows 1.0.6
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/dist/AnimationLabWorkflow.d.ts +3 -0
- package/dist/AnimationLabWorkflow.d.ts.map +1 -0
- package/dist/AnimationLabWorkflow.js +156 -0
- package/dist/AnimationLabWorkflow.js.map +1 -0
- package/dist/AssetViewerWorkflow.d.ts +3 -0
- package/dist/AssetViewerWorkflow.d.ts.map +1 -0
- package/dist/AssetViewerWorkflow.js +35 -0
- package/dist/AssetViewerWorkflow.js.map +1 -0
- package/dist/ComparisonWorkflow.d.ts +3 -0
- package/dist/ComparisonWorkflow.d.ts.map +1 -0
- package/dist/ComparisonWorkflow.js +67 -0
- package/dist/ComparisonWorkflow.js.map +1 -0
- package/dist/InteractiveSceneWorkflow.d.ts +3 -0
- package/dist/InteractiveSceneWorkflow.d.ts.map +1 -0
- package/dist/InteractiveSceneWorkflow.js +43 -0
- package/dist/InteractiveSceneWorkflow.js.map +1 -0
- package/dist/MaterialStudioWorkflow.d.ts +3 -0
- package/dist/MaterialStudioWorkflow.d.ts.map +1 -0
- package/dist/MaterialStudioWorkflow.js +47 -0
- package/dist/MaterialStudioWorkflow.js.map +1 -0
- package/dist/ProductConfiguratorWorkflow.d.ts +3 -0
- package/dist/ProductConfiguratorWorkflow.d.ts.map +1 -0
- package/dist/ProductConfiguratorWorkflow.js +25 -0
- package/dist/ProductConfiguratorWorkflow.js.map +1 -0
- package/dist/SceneShowcaseWorkflow.d.ts +3 -0
- package/dist/SceneShowcaseWorkflow.d.ts.map +1 -0
- package/dist/SceneShowcaseWorkflow.js +44 -0
- package/dist/SceneShowcaseWorkflow.js.map +1 -0
- package/dist/WorkflowDiagnostics.d.ts +11 -0
- package/dist/WorkflowDiagnostics.d.ts.map +1 -0
- package/dist/WorkflowDiagnostics.js +34 -0
- package/dist/WorkflowDiagnostics.js.map +1 -0
- package/dist/WorkflowTypes.d.ts +90 -0
- package/dist/WorkflowTypes.d.ts.map +1 -0
- package/dist/WorkflowTypes.js +2 -0
- package/dist/WorkflowTypes.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/production-runtime/ArchitectureWorkflow.d.ts +7 -0
- package/dist/production-runtime/ArchitectureWorkflow.d.ts.map +1 -0
- package/dist/production-runtime/ArchitectureWorkflow.js +2 -0
- package/dist/production-runtime/ArchitectureWorkflow.js.map +1 -0
- package/dist/production-runtime/AssetInspectionWorkflow.d.ts +7 -0
- package/dist/production-runtime/AssetInspectionWorkflow.d.ts.map +1 -0
- package/dist/production-runtime/AssetInspectionWorkflow.js +2 -0
- package/dist/production-runtime/AssetInspectionWorkflow.js.map +1 -0
- package/dist/production-runtime/CinematicWorkflow.d.ts +7 -0
- package/dist/production-runtime/CinematicWorkflow.d.ts.map +1 -0
- package/dist/production-runtime/CinematicWorkflow.js +2 -0
- package/dist/production-runtime/CinematicWorkflow.js.map +1 -0
- package/dist/production-runtime/MaterialAuthoringWorkflow.d.ts +7 -0
- package/dist/production-runtime/MaterialAuthoringWorkflow.d.ts.map +1 -0
- package/dist/production-runtime/MaterialAuthoringWorkflow.js +2 -0
- package/dist/production-runtime/MaterialAuthoringWorkflow.js.map +1 -0
- package/dist/production-runtime/ProductRenderWorkflow.d.ts +7 -0
- package/dist/production-runtime/ProductRenderWorkflow.d.ts.map +1 -0
- package/dist/production-runtime/ProductRenderWorkflow.js +2 -0
- package/dist/production-runtime/ProductRenderWorkflow.js.map +1 -0
- package/dist/production-runtime/ProductionExampleRuntime.d.ts +66 -0
- package/dist/production-runtime/ProductionExampleRuntime.d.ts.map +1 -0
- package/dist/production-runtime/ProductionExampleRuntime.js +189 -0
- package/dist/production-runtime/ProductionExampleRuntime.js.map +1 -0
- package/dist/production-runtime/ProductionWorkflows.d.ts +69 -0
- package/dist/production-runtime/ProductionWorkflows.d.ts.map +1 -0
- package/dist/production-runtime/ProductionWorkflows.js +128 -0
- package/dist/production-runtime/ProductionWorkflows.js.map +1 -0
- package/dist/production-runtime/WorkflowDiagnostics.d.ts +7 -0
- package/dist/production-runtime/WorkflowDiagnostics.d.ts.map +1 -0
- package/dist/production-runtime/WorkflowDiagnostics.js +2 -0
- package/dist/production-runtime/WorkflowDiagnostics.js.map +1 -0
- package/dist/production-runtime/index.d.ts +11 -0
- package/dist/production-runtime/index.d.ts.map +1 -0
- package/dist/production-runtime/index.js +9 -0
- package/dist/production-runtime/index.js.map +1 -0
- package/dist/workflow-foundation/index.d.ts +26 -0
- package/dist/workflow-foundation/index.d.ts.map +1 -0
- package/dist/workflow-foundation/index.js +25 -0
- package/dist/workflow-foundation/index.js.map +1 -0
- package/package.json +22 -0
- package/src/AnimationLabWorkflow.ts +165 -0
- package/src/AssetViewerWorkflow.ts +37 -0
- package/src/ComparisonWorkflow.ts +68 -0
- package/src/InteractiveSceneWorkflow.ts +44 -0
- package/src/MaterialStudioWorkflow.ts +48 -0
- package/src/ProductConfiguratorWorkflow.ts +32 -0
- package/src/SceneShowcaseWorkflow.ts +45 -0
- package/src/WorkflowDiagnostics.ts +47 -0
- package/src/WorkflowTypes.ts +113 -0
- package/src/index.ts +34 -0
- package/src/production-runtime/ArchitectureWorkflow.ts +2 -0
- package/src/production-runtime/AssetInspectionWorkflow.ts +2 -0
- package/src/production-runtime/CinematicWorkflow.ts +2 -0
- package/src/production-runtime/MaterialAuthoringWorkflow.ts +2 -0
- package/src/production-runtime/ProductRenderWorkflow.ts +2 -0
- package/src/production-runtime/ProductionExampleRuntime.ts +267 -0
- package/src/production-runtime/ProductionWorkflows.ts +203 -0
- package/src/production-runtime/WorkflowDiagnostics.ts +2 -0
- package/src/production-runtime/index.ts +32 -0
- package/src/workflow-foundation/index.ts +27 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { AnimationClip, AnimationMixerSnapshot } from "@aura3d/animation";
|
|
2
|
+
import type { RenderDeviceDiagnostics, RenderItem, RenderSource, CameraLike } from "@aura3d/rendering";
|
|
3
|
+
import type { RenderableAsset, RenderableScene, CreateRenderableSceneOptions, LoadRenderableAssetOptions } from "@aura3d/assets";
|
|
4
|
+
import type { ProductAsset, ProductAssetLoadOptions, ProductRenderScene } from "@aura3d/product-studio";
|
|
5
|
+
export type A3DWorkflowKind = "asset-viewer" | "product-configurator" | "material-studio" | "scene-showcase" | "interactive-scene" | "animation-lab" | "comparison";
|
|
6
|
+
export interface A3DWorkflowDiagnostics {
|
|
7
|
+
readonly workflow: A3DWorkflowKind;
|
|
8
|
+
readonly warnings: readonly string[];
|
|
9
|
+
readonly featureChecklist: readonly string[];
|
|
10
|
+
readonly asset?: {
|
|
11
|
+
readonly kind: string;
|
|
12
|
+
readonly meshCount: number;
|
|
13
|
+
readonly materialCount: number;
|
|
14
|
+
readonly textureCount: number;
|
|
15
|
+
};
|
|
16
|
+
readonly renderDiagnostics?: RenderDeviceDiagnostics;
|
|
17
|
+
}
|
|
18
|
+
export interface A3DWorkflowResult {
|
|
19
|
+
readonly kind: A3DWorkflowKind;
|
|
20
|
+
readonly source: RenderSource;
|
|
21
|
+
readonly camera?: CameraLike;
|
|
22
|
+
readonly renderItems?: readonly RenderItem[];
|
|
23
|
+
readonly diagnostics: A3DWorkflowDiagnostics;
|
|
24
|
+
dispose(): void;
|
|
25
|
+
}
|
|
26
|
+
export interface AssetViewerWorkflowOptions extends CreateRenderableSceneOptions, LoadRenderableAssetOptions {
|
|
27
|
+
readonly url: string;
|
|
28
|
+
}
|
|
29
|
+
export interface AssetViewerWorkflowResult extends A3DWorkflowResult {
|
|
30
|
+
readonly kind: "asset-viewer";
|
|
31
|
+
readonly asset: RenderableAsset;
|
|
32
|
+
readonly scene: RenderableScene;
|
|
33
|
+
}
|
|
34
|
+
export interface ProductConfiguratorWorkflowOptions {
|
|
35
|
+
readonly asset: ProductAssetLoadOptions;
|
|
36
|
+
readonly materialMode?: "asset" | "clay" | "matte" | "metal-check" | "contrast";
|
|
37
|
+
readonly lighting?: "catalog-softbox" | "inspection-bay" | "hero-contrast";
|
|
38
|
+
readonly camera?: "front-three-quarter" | "side-profile" | "top-detail" | "macro-detail";
|
|
39
|
+
readonly viewport?: {
|
|
40
|
+
readonly width: number;
|
|
41
|
+
readonly height: number;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export interface ProductConfiguratorWorkflowResult extends A3DWorkflowResult {
|
|
45
|
+
readonly kind: "product-configurator";
|
|
46
|
+
readonly asset: ProductAsset;
|
|
47
|
+
readonly scene: ProductRenderScene;
|
|
48
|
+
}
|
|
49
|
+
export interface MaterialStudioWorkflowOptions {
|
|
50
|
+
readonly mode?: "comparison" | "metals" | "transparent";
|
|
51
|
+
}
|
|
52
|
+
export interface MaterialStudioWorkflowResult extends A3DWorkflowResult {
|
|
53
|
+
readonly kind: "material-studio";
|
|
54
|
+
}
|
|
55
|
+
export interface SceneShowcaseWorkflowOptions {
|
|
56
|
+
readonly preset?: "studio" | "gallery" | "dramatic";
|
|
57
|
+
}
|
|
58
|
+
export interface SceneShowcaseWorkflowResult extends A3DWorkflowResult {
|
|
59
|
+
readonly kind: "scene-showcase";
|
|
60
|
+
}
|
|
61
|
+
export interface InteractiveSceneWorkflowOptions {
|
|
62
|
+
readonly preset?: "orbiting-products" | "input-ready";
|
|
63
|
+
}
|
|
64
|
+
export interface InteractiveSceneWorkflowResult extends A3DWorkflowResult {
|
|
65
|
+
readonly kind: "interactive-scene";
|
|
66
|
+
update(timeSeconds: number): RenderSource;
|
|
67
|
+
}
|
|
68
|
+
export interface AnimationLabWorkflowOptions {
|
|
69
|
+
readonly clip?: "idle" | "walk" | "run";
|
|
70
|
+
readonly speed?: number;
|
|
71
|
+
}
|
|
72
|
+
export interface AnimationLabWorkflowResult extends A3DWorkflowResult {
|
|
73
|
+
readonly kind: "animation-lab";
|
|
74
|
+
readonly clips: readonly AnimationClip[];
|
|
75
|
+
readonly mixer: AnimationMixerSnapshot;
|
|
76
|
+
update(timeSeconds: number): RenderSource;
|
|
77
|
+
}
|
|
78
|
+
export interface ComparisonWorkflowOptions {
|
|
79
|
+
readonly focus?: "setup" | "rendering" | "migration";
|
|
80
|
+
}
|
|
81
|
+
export interface ComparisonWorkflowResult extends A3DWorkflowResult {
|
|
82
|
+
readonly kind: "comparison";
|
|
83
|
+
readonly comparison: {
|
|
84
|
+
readonly focus: "setup" | "rendering" | "migration";
|
|
85
|
+
readonly a3dSteps: readonly string[];
|
|
86
|
+
readonly threeJsSteps: readonly string[];
|
|
87
|
+
readonly migrationNotes: readonly string[];
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=WorkflowTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkflowTypes.d.ts","sourceRoot":"","sources":["../../../../packages/workflows/src/WorkflowTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,KAAK,EAAE,uBAAuB,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACvG,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,4BAA4B,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AACjI,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAExG,MAAM,MAAM,eAAe,GACvB,cAAc,GACd,sBAAsB,GACtB,iBAAiB,GACjB,gBAAgB,GAChB,mBAAmB,GACnB,eAAe,GACf,YAAY,CAAC;AAEjB,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C,QAAQ,CAAC,KAAK,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AQ,CAAC,KAAK,EAAE,sBAAsB,CAAC;IACvC,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,YAAY,CAAC;CAC3C;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,WAAW,GAAG,WAAW,CAAC;CACtD;AAED,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;IACjE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE;QACnB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,GAAG,WAAW,CAAC;QACpD,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;QACrC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;QACzC,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;KAC5C,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkflowTypes.js","sourceRoot":"","sources":["../../../../packages/workflows/src/WorkflowTypes.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { createAssetViewerWorkflow } from "./AssetViewerWorkflow";
|
|
2
|
+
export { createProductConfiguratorWorkflow } from "./ProductConfiguratorWorkflow";
|
|
3
|
+
export { createMaterialStudioWorkflow } from "./MaterialStudioWorkflow";
|
|
4
|
+
export { createSceneShowcaseWorkflow } from "./SceneShowcaseWorkflow";
|
|
5
|
+
export { createInteractiveSceneWorkflow } from "./InteractiveSceneWorkflow";
|
|
6
|
+
export { createAnimationLabWorkflow } from "./AnimationLabWorkflow";
|
|
7
|
+
export { createComparisonWorkflow } from "./ComparisonWorkflow";
|
|
8
|
+
export { createWorkflowDiagnostics } from "./WorkflowDiagnostics";
|
|
9
|
+
export { workflows as externalParityWorkflows } from "./workflow-foundation/index";
|
|
10
|
+
export { PRODUCTION_WORKFLOWS, createProductionAssetPreflight, createProductionRendererDefaults, createProductionVisualQAResult, createProductionWorkflowPlan, listProductionWorkflowDefinitions, runProductionExample } from "./production-runtime";
|
|
11
|
+
export type { ProductionAssetPreflightInput, ProductionAssetPreflightResult, ProductionExampleAsset, ProductionExampleDefinition, ProductionExampleEnvironment, ProductionExampleRuntime, ProductionExampleRuntimeMetrics, ProductionRendererDefaults, ProductionVisualQAInput, ProductionVisualQAResult, ProductionWorkflowDefinition, ProductionWorkflowId, ProductionWorkflowPlan } from "./production-runtime";
|
|
12
|
+
export type * from "./WorkflowTypes";
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/workflows/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,SAAS,IAAI,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,EACL,oBAAoB,EACpB,8BAA8B,EAC9B,gCAAgC,EAChC,8BAA8B,EAC9B,4BAA4B,EAC5B,iCAAiC,EACjC,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,6BAA6B,EAC7B,8BAA8B,EAC9B,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,EAC5B,wBAAwB,EACxB,+BAA+B,EAC/B,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,4BAA4B,EAC5B,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAC9B,mBAAmB,iBAAiB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { createAssetViewerWorkflow } from "./AssetViewerWorkflow.js";
|
|
2
|
+
export { createProductConfiguratorWorkflow } from "./ProductConfiguratorWorkflow.js";
|
|
3
|
+
export { createMaterialStudioWorkflow } from "./MaterialStudioWorkflow.js";
|
|
4
|
+
export { createSceneShowcaseWorkflow } from "./SceneShowcaseWorkflow.js";
|
|
5
|
+
export { createInteractiveSceneWorkflow } from "./InteractiveSceneWorkflow.js";
|
|
6
|
+
export { createAnimationLabWorkflow } from "./AnimationLabWorkflow.js";
|
|
7
|
+
export { createComparisonWorkflow } from "./ComparisonWorkflow.js";
|
|
8
|
+
export { createWorkflowDiagnostics } from "./WorkflowDiagnostics.js";
|
|
9
|
+
export { workflows as externalParityWorkflows } from "./workflow-foundation/index.js";
|
|
10
|
+
export { PRODUCTION_WORKFLOWS, createProductionAssetPreflight, createProductionRendererDefaults, createProductionVisualQAResult, createProductionWorkflowPlan, listProductionWorkflowDefinitions, runProductionExample } from "./production-runtime/index.js";
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/workflows/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,SAAS,IAAI,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,EACL,oBAAoB,EACpB,8BAA8B,EAC9B,gCAAgC,EAChC,8BAA8B,EAC9B,4BAA4B,EAC5B,iCAAiC,EACjC,oBAAoB,EACrB,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface ArchitectureWorkflowSummary {
|
|
2
|
+
readonly id: string;
|
|
3
|
+
readonly ready: boolean;
|
|
4
|
+
readonly workflow: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function createArchitectureWorkflowSummary(): ArchitectureWorkflowSummary;
|
|
7
|
+
//# sourceMappingURL=ArchitectureWorkflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArchitectureWorkflow.d.ts","sourceRoot":"","sources":["../../../../../packages/workflows/src/production-runtime/ArchitectureWorkflow.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,2BAA2B;IAAG,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAAE;AACzH,wBAAgB,iCAAiC,IAAI,2BAA2B,CAAkF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArchitectureWorkflow.js","sourceRoot":"","sources":["../../../../../packages/workflows/src/production-runtime/ArchitectureWorkflow.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,iCAAiC,KAAkC,OAAO,EAAE,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,sBAAsB,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface AssetInspectionWorkflowSummary {
|
|
2
|
+
readonly id: string;
|
|
3
|
+
readonly ready: boolean;
|
|
4
|
+
readonly workflow: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function createAssetInspectionWorkflowSummary(): AssetInspectionWorkflowSummary;
|
|
7
|
+
//# sourceMappingURL=AssetInspectionWorkflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetInspectionWorkflow.d.ts","sourceRoot":"","sources":["../../../../../packages/workflows/src/production-runtime/AssetInspectionWorkflow.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,8BAA8B;IAAG,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAAE;AAC5H,wBAAgB,oCAAoC,IAAI,8BAA8B,CAAyF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetInspectionWorkflow.js","sourceRoot":"","sources":["../../../../../packages/workflows/src/production-runtime/AssetInspectionWorkflow.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,oCAAoC,KAAqC,OAAO,EAAE,EAAE,EAAE,kBAAkB,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,yBAAyB,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CinematicWorkflow.d.ts","sourceRoot":"","sources":["../../../../../packages/workflows/src/production-runtime/CinematicWorkflow.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IAAG,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAAE;AACtH,wBAAgB,8BAA8B,IAAI,wBAAwB,CAA4E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CinematicWorkflow.js","sourceRoot":"","sources":["../../../../../packages/workflows/src/production-runtime/CinematicWorkflow.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,8BAA8B,KAA+B,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,mBAAmB,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface MaterialAuthoringWorkflowSummary {
|
|
2
|
+
readonly id: string;
|
|
3
|
+
readonly ready: boolean;
|
|
4
|
+
readonly workflow: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function createMaterialAuthoringWorkflowSummary(): MaterialAuthoringWorkflowSummary;
|
|
7
|
+
//# sourceMappingURL=MaterialAuthoringWorkflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaterialAuthoringWorkflow.d.ts","sourceRoot":"","sources":["../../../../../packages/workflows/src/production-runtime/MaterialAuthoringWorkflow.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gCAAgC;IAAG,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAAE;AAC9H,wBAAgB,sCAAsC,IAAI,gCAAgC,CAA6F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaterialAuthoringWorkflow.js","sourceRoot":"","sources":["../../../../../packages/workflows/src/production-runtime/MaterialAuthoringWorkflow.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,sCAAsC,KAAuC,OAAO,EAAE,EAAE,EAAE,oBAAoB,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,2BAA2B,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface ProductRenderWorkflowSummary {
|
|
2
|
+
readonly id: string;
|
|
3
|
+
readonly ready: boolean;
|
|
4
|
+
readonly workflow: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function createProductRenderWorkflowSummary(): ProductRenderWorkflowSummary;
|
|
7
|
+
//# sourceMappingURL=ProductRenderWorkflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductRenderWorkflow.d.ts","sourceRoot":"","sources":["../../../../../packages/workflows/src/production-runtime/ProductRenderWorkflow.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IAAG,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAAE;AAC1H,wBAAgB,kCAAkC,IAAI,4BAA4B,CAAqF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductRenderWorkflow.js","sourceRoot":"","sources":["../../../../../packages/workflows/src/production-runtime/ProductRenderWorkflow.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,kCAAkC,KAAmC,OAAO,EAAE,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,uBAAuB,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { type ProductionGLTFRenderMetadata as ProductionGLTFRenderMetadata } from "@aura3d/engine/assets/browser";
|
|
2
|
+
import { summarizeProductionWebGL2Proof as summarizeProductionWebGL2Proof, type ProductionRenderProof as ProductionRenderProof, type ProductionWebGPUReport } from "@aura3d/engine/rendering";
|
|
3
|
+
export interface ProductionExampleAsset {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
readonly file: string;
|
|
7
|
+
readonly role: "primary" | "secondary";
|
|
8
|
+
}
|
|
9
|
+
export interface ProductionExampleEnvironment {
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly label: string;
|
|
12
|
+
readonly file: string;
|
|
13
|
+
readonly exposure: number;
|
|
14
|
+
readonly intensity: number;
|
|
15
|
+
readonly rotation: number;
|
|
16
|
+
}
|
|
17
|
+
export interface ProductionExampleDefinition {
|
|
18
|
+
readonly appId: string;
|
|
19
|
+
readonly sceneId: string;
|
|
20
|
+
readonly title: string;
|
|
21
|
+
readonly workflow: string;
|
|
22
|
+
readonly assets: readonly ProductionExampleAsset[];
|
|
23
|
+
readonly environment: ProductionExampleEnvironment;
|
|
24
|
+
readonly postprocess: boolean;
|
|
25
|
+
readonly webgpuReport: boolean;
|
|
26
|
+
readonly expectedPostprocessChain: readonly string[];
|
|
27
|
+
}
|
|
28
|
+
export interface ProductionExampleRuntimeMetrics {
|
|
29
|
+
readonly appId: string;
|
|
30
|
+
readonly sceneId: string;
|
|
31
|
+
readonly workflow: string;
|
|
32
|
+
readonly rendererBackend: "webgl2";
|
|
33
|
+
readonly assetIds: readonly string[];
|
|
34
|
+
readonly primaryAssetId: string;
|
|
35
|
+
readonly hdrEnvironmentId: string;
|
|
36
|
+
readonly drawCalls: number;
|
|
37
|
+
readonly triangleCount: number;
|
|
38
|
+
readonly materialCount: number;
|
|
39
|
+
readonly textureCount: number;
|
|
40
|
+
readonly textureMemoryEstimate: number;
|
|
41
|
+
readonly postprocessChain: readonly string[];
|
|
42
|
+
readonly frameTimeMs: number;
|
|
43
|
+
readonly warnings: readonly string[];
|
|
44
|
+
}
|
|
45
|
+
export interface ProductionExampleRuntime {
|
|
46
|
+
readonly status: "loading" | "ready" | "error";
|
|
47
|
+
readonly appId: string;
|
|
48
|
+
readonly sceneId: string;
|
|
49
|
+
readonly error?: string;
|
|
50
|
+
readonly rendererBackend?: "webgl2";
|
|
51
|
+
readonly runtime?: ProductionExampleRuntimeMetrics;
|
|
52
|
+
readonly metadata?: ProductionGLTFRenderMetadata;
|
|
53
|
+
readonly secondaryMetadata?: readonly ProductionGLTFRenderMetadata[];
|
|
54
|
+
readonly proof?: ProductionRenderProof;
|
|
55
|
+
readonly proofSummary?: ReturnType<typeof summarizeProductionWebGL2Proof>;
|
|
56
|
+
readonly webgpu?: ProductionWebGPUReport;
|
|
57
|
+
readonly interactionCount: number;
|
|
58
|
+
readonly lastInteraction?: string;
|
|
59
|
+
}
|
|
60
|
+
declare global {
|
|
61
|
+
interface Window {
|
|
62
|
+
__a3dProductionExample?: ProductionExampleRuntime;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export declare function runProductionExample(definition: ProductionExampleDefinition): Promise<void>;
|
|
66
|
+
//# sourceMappingURL=ProductionExampleRuntime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductionExampleRuntime.d.ts","sourceRoot":"","sources":["../../../../../packages/workflows/src/production-runtime/ProductionExampleRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,4BAA4B,IAAI,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AACpJ,OAAO,EAKL,8BAA8B,IAAI,8BAA8B,EAChE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,EAC5B,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,WAAW,CAAC;CACxC;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE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,SAAS,MAAM,EAAE,CAAC;CACtC;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;IAC/C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,eAAe,CAAC,EAAE,QAAQ,CAAC;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,+BAA+B,CAAC;IACnD,QAAQ,CAAC,QAAQ,CAAC,EAAE,4BAA4B,CAAC;IACjD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,4BAA4B,EAAE,CAAC;IACrE,QAAQ,CAAC,KAAK,CAAC,EAAE,qBAAqB,CAAC;IACvC,QAAQ,CAAC,YAAY,CAAC,EAAE,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC;IAC1E,QAAQ,CAAC,MAAM,CAAC,EAAE,sBAAsB,CAAC;IACzC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,sBAAsB,CAAC,EAAE,wBAAwB,CAAC;KACnD;CACF;AAED,wBAAsB,oBAAoB,CAAC,UAAU,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CAqHjG"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { loadProductionGLTFRenderPipeline } from "@aura3d/engine/assets/browser";
|
|
2
|
+
import { ProductionWebGL2Renderer, createProductionEnvironmentLightingResources as createProductionEnvironmentLightingResources, createProductionPbrHdrPipelineFromRadiance as createProductionPbrHdrPipelineFromRadiance, createProductionWebGPUReport, summarizeProductionWebGL2Proof as summarizeProductionWebGL2Proof } from "@aura3d/engine/rendering";
|
|
3
|
+
export async function runProductionExample(definition) {
|
|
4
|
+
const root = document.getElementById("app");
|
|
5
|
+
const canvas = document.getElementById("viewport");
|
|
6
|
+
if (!(root instanceof HTMLElement) || !(canvas instanceof HTMLCanvasElement)) {
|
|
7
|
+
throw new Error(`${definition.appId} requires #app and canvas#viewport.`);
|
|
8
|
+
}
|
|
9
|
+
window.__a3dProductionExample = {
|
|
10
|
+
status: "loading",
|
|
11
|
+
appId: definition.appId,
|
|
12
|
+
sceneId: definition.sceneId,
|
|
13
|
+
interactionCount: 0
|
|
14
|
+
};
|
|
15
|
+
mountProductionExampleShell(root, definition, window.__a3dProductionExample);
|
|
16
|
+
try {
|
|
17
|
+
const primary = definition.assets.find((asset) => asset.role === "primary") ?? definition.assets[0];
|
|
18
|
+
if (!primary)
|
|
19
|
+
throw new Error(`${definition.appId} has no primary asset.`);
|
|
20
|
+
const hdr = await fetchArrayBuffer(resolveEnvironmentUrl(definition.environment.file));
|
|
21
|
+
const hdrPipeline = createProductionPbrHdrPipelineFromRadiance(hdr, {
|
|
22
|
+
id: definition.environment.id,
|
|
23
|
+
label: definition.environment.label,
|
|
24
|
+
intensity: definition.environment.intensity,
|
|
25
|
+
backgroundIntensity: 0.9,
|
|
26
|
+
rotation: definition.environment.rotation,
|
|
27
|
+
toneMapping: { operator: "filmic", exposure: definition.environment.exposure, whitePoint: 11.2 }
|
|
28
|
+
});
|
|
29
|
+
const lighting = createProductionEnvironmentLightingResources(hdrPipeline);
|
|
30
|
+
const pipeline = await loadProductionGLTFRenderPipeline({
|
|
31
|
+
url: resolveAssetUrl(primary.file),
|
|
32
|
+
assetId: primary.id,
|
|
33
|
+
assetName: primary.label,
|
|
34
|
+
width: canvas.width,
|
|
35
|
+
height: canvas.height,
|
|
36
|
+
rendererInput: {
|
|
37
|
+
environmentLighting: lighting.lighting,
|
|
38
|
+
qualityPreset: definition.postprocess ? "hdr-studio-preview" : "studio-preview",
|
|
39
|
+
cameraPolicy: "require",
|
|
40
|
+
postprocess: false
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const secondaryMetadata = await loadSecondaryMetadata(definition, primary.id, canvas.width, canvas.height);
|
|
44
|
+
const renderer = await ProductionWebGL2Renderer.create({
|
|
45
|
+
canvas,
|
|
46
|
+
width: canvas.width,
|
|
47
|
+
height: canvas.height,
|
|
48
|
+
preserveDrawingBuffer: true,
|
|
49
|
+
clearColor: [0.01, 0.012, 0.016, 1]
|
|
50
|
+
});
|
|
51
|
+
const frameStart = performance.now();
|
|
52
|
+
const proof = renderer.renderImportedAsset({
|
|
53
|
+
source: pipeline.source,
|
|
54
|
+
camera: pipeline.camera,
|
|
55
|
+
metadata: {
|
|
56
|
+
assetId: pipeline.metadata.assetId,
|
|
57
|
+
assetName: pipeline.metadata.assetName,
|
|
58
|
+
assetUri: pipeline.metadata.assetUri,
|
|
59
|
+
meshCount: pipeline.metadata.meshCount,
|
|
60
|
+
primitiveCount: pipeline.metadata.primitiveCount,
|
|
61
|
+
materialCount: pipeline.metadata.materialCount,
|
|
62
|
+
textureCount: pipeline.metadata.textureCount,
|
|
63
|
+
imageCount: pipeline.metadata.imageCount,
|
|
64
|
+
animationCount: pipeline.metadata.animationCount,
|
|
65
|
+
skinCount: pipeline.metadata.skinCount,
|
|
66
|
+
morphTargetCount: pipeline.metadata.morphTargetCount,
|
|
67
|
+
extensionsUsed: pipeline.metadata.extensionsUsed,
|
|
68
|
+
environmentId: definition.environment.id,
|
|
69
|
+
hdrEnvironmentUri: resolveEnvironmentUrl(definition.environment.file)
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
const webgpu = definition.webgpuReport
|
|
73
|
+
? await createProductionWebGPUReport(navigator.gpu)
|
|
74
|
+
: undefined;
|
|
75
|
+
const runtime = {
|
|
76
|
+
status: "ready",
|
|
77
|
+
appId: definition.appId,
|
|
78
|
+
sceneId: definition.sceneId,
|
|
79
|
+
rendererBackend: "webgl2",
|
|
80
|
+
runtime: {
|
|
81
|
+
appId: definition.appId,
|
|
82
|
+
sceneId: definition.sceneId,
|
|
83
|
+
workflow: definition.workflow,
|
|
84
|
+
rendererBackend: "webgl2",
|
|
85
|
+
assetIds: definition.assets.map((asset) => asset.id),
|
|
86
|
+
primaryAssetId: pipeline.metadata.assetId,
|
|
87
|
+
hdrEnvironmentId: definition.environment.id,
|
|
88
|
+
drawCalls: proof.diagnostics.drawCalls,
|
|
89
|
+
triangleCount: Math.max(1, Math.floor(pipeline.metadata.indexCount / 3)),
|
|
90
|
+
materialCount: pipeline.metadata.materialCount,
|
|
91
|
+
textureCount: pipeline.metadata.textureCount,
|
|
92
|
+
textureMemoryEstimate: proof.diagnostics.textureBytes ?? 0,
|
|
93
|
+
postprocessChain: [],
|
|
94
|
+
frameTimeMs: Number((performance.now() - frameStart).toFixed(3)),
|
|
95
|
+
warnings: [
|
|
96
|
+
...(definition.postprocess ? ["Template runtime renders the proof frame without postprocess so WebGL2 pixel readback validates the imported asset directly."] : []),
|
|
97
|
+
...(webgpu?.warnings ?? [])
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
metadata: pipeline.metadata,
|
|
101
|
+
secondaryMetadata,
|
|
102
|
+
proof,
|
|
103
|
+
proofSummary: summarizeProductionWebGL2Proof(proof),
|
|
104
|
+
...(webgpu ? { webgpu } : {}),
|
|
105
|
+
interactionCount: 0
|
|
106
|
+
};
|
|
107
|
+
window.__a3dProductionExample = runtime;
|
|
108
|
+
mountProductionExampleShell(root, definition, runtime);
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
window.__a3dProductionExample = {
|
|
112
|
+
status: "error",
|
|
113
|
+
appId: definition.appId,
|
|
114
|
+
sceneId: definition.sceneId,
|
|
115
|
+
error: error instanceof Error ? error.stack ?? error.message : String(error),
|
|
116
|
+
interactionCount: window.__a3dProductionExample?.interactionCount ?? 0
|
|
117
|
+
};
|
|
118
|
+
mountProductionExampleShell(root, definition, window.__a3dProductionExample);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function mountProductionExampleShell(root, definition, runtime) {
|
|
122
|
+
const metrics = runtime.runtime;
|
|
123
|
+
root.innerHTML = `
|
|
124
|
+
<section class="a3d-production-runtime-panel">
|
|
125
|
+
<div>
|
|
126
|
+
<h1>${definition.title}</h1>
|
|
127
|
+
<p>${definition.workflow}</p>
|
|
128
|
+
</div>
|
|
129
|
+
<button id="a3d-production-runtime-action" type="button">Inspect</button>
|
|
130
|
+
</section>
|
|
131
|
+
<section class="a3d-production-runtime-metrics">
|
|
132
|
+
<span>${runtime.status}</span>
|
|
133
|
+
<span>${metrics ? `${metrics.drawCalls} draw calls` : definition.environment.label}</span>
|
|
134
|
+
<span>${metrics ? `${metrics.triangleCount} triangles` : definition.assets.map((asset) => asset.id).join(", ")}</span>
|
|
135
|
+
<span>${metrics ? `${metrics.textureCount} textures` : "HDR IBL"}</span>
|
|
136
|
+
</section>
|
|
137
|
+
`;
|
|
138
|
+
root.querySelector("#a3d-production-runtime-action")?.addEventListener("click", () => {
|
|
139
|
+
const current = window.__a3dProductionExample;
|
|
140
|
+
if (!current)
|
|
141
|
+
return;
|
|
142
|
+
window.__a3dProductionExample = {
|
|
143
|
+
...current,
|
|
144
|
+
interactionCount: current.interactionCount + 1,
|
|
145
|
+
lastInteraction: "Inspect"
|
|
146
|
+
};
|
|
147
|
+
mountProductionExampleShell(root, definition, window.__a3dProductionExample);
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
async function loadSecondaryMetadata(definition, primaryAssetId, width, height) {
|
|
151
|
+
const metadata = [];
|
|
152
|
+
for (const asset of definition.assets.filter((item) => item.id !== primaryAssetId)) {
|
|
153
|
+
const pipeline = await loadProductionGLTFRenderPipeline({
|
|
154
|
+
url: resolveAssetUrl(asset.file),
|
|
155
|
+
assetId: asset.id,
|
|
156
|
+
assetName: asset.label,
|
|
157
|
+
width,
|
|
158
|
+
height,
|
|
159
|
+
rendererInput: { qualityPreset: "studio-preview", cameraPolicy: "require", postprocess: false }
|
|
160
|
+
});
|
|
161
|
+
metadata.push(pipeline.metadata);
|
|
162
|
+
}
|
|
163
|
+
return metadata;
|
|
164
|
+
}
|
|
165
|
+
function resolveAssetUrl(file) {
|
|
166
|
+
if (file.startsWith("/"))
|
|
167
|
+
return file;
|
|
168
|
+
if (file.startsWith("fixtures/"))
|
|
169
|
+
return `/${file}`;
|
|
170
|
+
if (file.includes("/"))
|
|
171
|
+
return `/fixtures/${file}`;
|
|
172
|
+
return `/fixtures/asset-corpus/${file}`;
|
|
173
|
+
}
|
|
174
|
+
function resolveEnvironmentUrl(file) {
|
|
175
|
+
if (file.startsWith("/"))
|
|
176
|
+
return file;
|
|
177
|
+
if (file.startsWith("fixtures/"))
|
|
178
|
+
return `/${file}`;
|
|
179
|
+
if (file.includes("/"))
|
|
180
|
+
return `/fixtures/${file}`;
|
|
181
|
+
return `/fixtures/environment-corpus/hdri/${file}`;
|
|
182
|
+
}
|
|
183
|
+
async function fetchArrayBuffer(url) {
|
|
184
|
+
const response = await fetch(url);
|
|
185
|
+
if (!response.ok)
|
|
186
|
+
throw new Error(`Failed to fetch ${url}: ${response.status}`);
|
|
187
|
+
return await response.arrayBuffer();
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=ProductionExampleRuntime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductionExampleRuntime.js","sourceRoot":"","sources":["../../../../../packages/workflows/src/production-runtime/ProductionExampleRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAqE,MAAM,+BAA+B,CAAC;AACpJ,OAAO,EACL,wBAAwB,EACxB,4CAA4C,IAAI,4CAA4C,EAC5F,0CAA0C,IAAI,0CAA0C,EACxF,4BAA4B,EAC5B,8BAA8B,IAAI,8BAA8B,EAGjE,MAAM,0BAA0B,CAAC;AAsElC,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,UAAuC;IAChF,MAAM,IAAI,GAAG,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC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AAa,IAAI,EAAE,CAAC;IACnD,OAAO,0BAA0B,IAAI,EAAE,CAAC;AAC1C,CAAC;AAED,SAAS,qBAAqB,CAAC,IAAY;IACzC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACtC,IAAI,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;QAAE,OAAO,IAAI,IAAI,EAAE,CAAC;IACpD,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,aAAa,IAAI,EAAE,CAAC;IACnD,OAAO,qCAAqC,IAAI,EAAE,CAAC;AACrD,CAAC;AAED,KAAK,UAAU,gBAAgB,CAAC,GAAW;IACzC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,GAAG,KAAK,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAChF,OAAO,MAAM,QAAQ,CAAC,WAAW,EAAE,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export type ProductionWorkflowId = "product" | "asset" | "material" | "architecture" | "cinematic";
|
|
2
|
+
export interface ProductionWorkflowDefinition {
|
|
3
|
+
readonly id: ProductionWorkflowId;
|
|
4
|
+
readonly label: string;
|
|
5
|
+
readonly requiredAssetClasses: readonly string[];
|
|
6
|
+
readonly requiredRendererFeatures: readonly string[];
|
|
7
|
+
readonly requiredProof: readonly string[];
|
|
8
|
+
readonly differentiation: readonly string[];
|
|
9
|
+
}
|
|
10
|
+
export interface ProductionAssetPreflightInput {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly localPath?: string;
|
|
13
|
+
readonly sourceUri?: string;
|
|
14
|
+
readonly sha256?: string;
|
|
15
|
+
readonly bytes?: number;
|
|
16
|
+
readonly license?: string;
|
|
17
|
+
readonly tags?: readonly string[];
|
|
18
|
+
readonly renderRequirements?: readonly string[];
|
|
19
|
+
}
|
|
20
|
+
export interface ProductionAssetPreflightResult {
|
|
21
|
+
readonly assetId: string;
|
|
22
|
+
readonly pass: boolean;
|
|
23
|
+
readonly missing: readonly string[];
|
|
24
|
+
readonly warnings: readonly string[];
|
|
25
|
+
}
|
|
26
|
+
export interface ProductionVisualQAInput {
|
|
27
|
+
readonly screenshotPath: string;
|
|
28
|
+
readonly rendererBackend: string;
|
|
29
|
+
readonly realRendererProof: boolean;
|
|
30
|
+
readonly width: number;
|
|
31
|
+
readonly height: number;
|
|
32
|
+
readonly nonBlackPixels: number;
|
|
33
|
+
readonly uniqueColorBuckets: number;
|
|
34
|
+
readonly drawCalls: number;
|
|
35
|
+
readonly textureMemory: number;
|
|
36
|
+
}
|
|
37
|
+
export interface ProductionVisualQAResult {
|
|
38
|
+
readonly screenshotPath: string;
|
|
39
|
+
readonly pass: boolean;
|
|
40
|
+
readonly score: number;
|
|
41
|
+
readonly failures: readonly string[];
|
|
42
|
+
}
|
|
43
|
+
export interface ProductionRendererDefaults {
|
|
44
|
+
readonly workflowId: ProductionWorkflowId;
|
|
45
|
+
readonly backend: "webgl2";
|
|
46
|
+
readonly hdrEnvironmentId: "studio-small-08";
|
|
47
|
+
readonly qualityPreset: "hdr-studio-preview";
|
|
48
|
+
readonly camera: {
|
|
49
|
+
readonly policy: "require";
|
|
50
|
+
readonly paddingRatio: number;
|
|
51
|
+
readonly yawRadians: number;
|
|
52
|
+
readonly pitchRadians: number;
|
|
53
|
+
};
|
|
54
|
+
readonly postprocess: readonly string[];
|
|
55
|
+
readonly runtimeMetrics: readonly string[];
|
|
56
|
+
}
|
|
57
|
+
export interface ProductionWorkflowPlan {
|
|
58
|
+
readonly workflow: ProductionWorkflowDefinition;
|
|
59
|
+
readonly defaults: ProductionRendererDefaults;
|
|
60
|
+
readonly preflightRequired: true;
|
|
61
|
+
readonly visualQARequired: true;
|
|
62
|
+
}
|
|
63
|
+
export declare const PRODUCTION_WORKFLOWS: readonly ProductionWorkflowDefinition[];
|
|
64
|
+
export declare function listProductionWorkflowDefinitions(): readonly ProductionWorkflowDefinition[];
|
|
65
|
+
export declare function createProductionAssetPreflight(input: ProductionAssetPreflightInput): ProductionAssetPreflightResult;
|
|
66
|
+
export declare function createProductionVisualQAResult(input: ProductionVisualQAInput): ProductionVisualQAResult;
|
|
67
|
+
export declare function createProductionRendererDefaults(workflowId: ProductionWorkflowId): ProductionRendererDefaults;
|
|
68
|
+
export declare function createProductionWorkflowPlan(workflowId: ProductionWorkflowId): ProductionWorkflowPlan;
|
|
69
|
+
//# sourceMappingURL=ProductionWorkflows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductionWorkflows.d.ts","sourceRoot":"","sources":["../../../../../packages/workflows/src/production-runtime/ProductionWorkflows.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,cAAc,GAAG,WAAW,CAAC;AAEnG,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,EAAE,EAAE,oBAAoB,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,oBAAoB,EAAE,SAAS,MAAM,EAAE,CAAC;IACjD,QAAQ,CAAC,wBAAwB,EAAE,SAAS,MAAM,EAAE,CAAC;IACrD,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,E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