@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.
Files changed (101) hide show
  1. package/dist/AnimationLabWorkflow.d.ts +3 -0
  2. package/dist/AnimationLabWorkflow.d.ts.map +1 -0
  3. package/dist/AnimationLabWorkflow.js +156 -0
  4. package/dist/AnimationLabWorkflow.js.map +1 -0
  5. package/dist/AssetViewerWorkflow.d.ts +3 -0
  6. package/dist/AssetViewerWorkflow.d.ts.map +1 -0
  7. package/dist/AssetViewerWorkflow.js +35 -0
  8. package/dist/AssetViewerWorkflow.js.map +1 -0
  9. package/dist/ComparisonWorkflow.d.ts +3 -0
  10. package/dist/ComparisonWorkflow.d.ts.map +1 -0
  11. package/dist/ComparisonWorkflow.js +67 -0
  12. package/dist/ComparisonWorkflow.js.map +1 -0
  13. package/dist/InteractiveSceneWorkflow.d.ts +3 -0
  14. package/dist/InteractiveSceneWorkflow.d.ts.map +1 -0
  15. package/dist/InteractiveSceneWorkflow.js +43 -0
  16. package/dist/InteractiveSceneWorkflow.js.map +1 -0
  17. package/dist/MaterialStudioWorkflow.d.ts +3 -0
  18. package/dist/MaterialStudioWorkflow.d.ts.map +1 -0
  19. package/dist/MaterialStudioWorkflow.js +47 -0
  20. package/dist/MaterialStudioWorkflow.js.map +1 -0
  21. package/dist/ProductConfiguratorWorkflow.d.ts +3 -0
  22. package/dist/ProductConfiguratorWorkflow.d.ts.map +1 -0
  23. package/dist/ProductConfiguratorWorkflow.js +25 -0
  24. package/dist/ProductConfiguratorWorkflow.js.map +1 -0
  25. package/dist/SceneShowcaseWorkflow.d.ts +3 -0
  26. package/dist/SceneShowcaseWorkflow.d.ts.map +1 -0
  27. package/dist/SceneShowcaseWorkflow.js +44 -0
  28. package/dist/SceneShowcaseWorkflow.js.map +1 -0
  29. package/dist/WorkflowDiagnostics.d.ts +11 -0
  30. package/dist/WorkflowDiagnostics.d.ts.map +1 -0
  31. package/dist/WorkflowDiagnostics.js +34 -0
  32. package/dist/WorkflowDiagnostics.js.map +1 -0
  33. package/dist/WorkflowTypes.d.ts +90 -0
  34. package/dist/WorkflowTypes.d.ts.map +1 -0
  35. package/dist/WorkflowTypes.js +2 -0
  36. package/dist/WorkflowTypes.js.map +1 -0
  37. package/dist/index.d.ts +13 -0
  38. package/dist/index.d.ts.map +1 -0
  39. package/dist/index.js +11 -0
  40. package/dist/index.js.map +1 -0
  41. package/dist/production-runtime/ArchitectureWorkflow.d.ts +7 -0
  42. package/dist/production-runtime/ArchitectureWorkflow.d.ts.map +1 -0
  43. package/dist/production-runtime/ArchitectureWorkflow.js +2 -0
  44. package/dist/production-runtime/ArchitectureWorkflow.js.map +1 -0
  45. package/dist/production-runtime/AssetInspectionWorkflow.d.ts +7 -0
  46. package/dist/production-runtime/AssetInspectionWorkflow.d.ts.map +1 -0
  47. package/dist/production-runtime/AssetInspectionWorkflow.js +2 -0
  48. package/dist/production-runtime/AssetInspectionWorkflow.js.map +1 -0
  49. package/dist/production-runtime/CinematicWorkflow.d.ts +7 -0
  50. package/dist/production-runtime/CinematicWorkflow.d.ts.map +1 -0
  51. package/dist/production-runtime/CinematicWorkflow.js +2 -0
  52. package/dist/production-runtime/CinematicWorkflow.js.map +1 -0
  53. package/dist/production-runtime/MaterialAuthoringWorkflow.d.ts +7 -0
  54. package/dist/production-runtime/MaterialAuthoringWorkflow.d.ts.map +1 -0
  55. package/dist/production-runtime/MaterialAuthoringWorkflow.js +2 -0
  56. package/dist/production-runtime/MaterialAuthoringWorkflow.js.map +1 -0
  57. package/dist/production-runtime/ProductRenderWorkflow.d.ts +7 -0
  58. package/dist/production-runtime/ProductRenderWorkflow.d.ts.map +1 -0
  59. package/dist/production-runtime/ProductRenderWorkflow.js +2 -0
  60. package/dist/production-runtime/ProductRenderWorkflow.js.map +1 -0
  61. package/dist/production-runtime/ProductionExampleRuntime.d.ts +66 -0
  62. package/dist/production-runtime/ProductionExampleRuntime.d.ts.map +1 -0
  63. package/dist/production-runtime/ProductionExampleRuntime.js +189 -0
  64. package/dist/production-runtime/ProductionExampleRuntime.js.map +1 -0
  65. package/dist/production-runtime/ProductionWorkflows.d.ts +69 -0
  66. package/dist/production-runtime/ProductionWorkflows.d.ts.map +1 -0
  67. package/dist/production-runtime/ProductionWorkflows.js +128 -0
  68. package/dist/production-runtime/ProductionWorkflows.js.map +1 -0
  69. package/dist/production-runtime/WorkflowDiagnostics.d.ts +7 -0
  70. package/dist/production-runtime/WorkflowDiagnostics.d.ts.map +1 -0
  71. package/dist/production-runtime/WorkflowDiagnostics.js +2 -0
  72. package/dist/production-runtime/WorkflowDiagnostics.js.map +1 -0
  73. package/dist/production-runtime/index.d.ts +11 -0
  74. package/dist/production-runtime/index.d.ts.map +1 -0
  75. package/dist/production-runtime/index.js +9 -0
  76. package/dist/production-runtime/index.js.map +1 -0
  77. package/dist/workflow-foundation/index.d.ts +26 -0
  78. package/dist/workflow-foundation/index.d.ts.map +1 -0
  79. package/dist/workflow-foundation/index.js +25 -0
  80. package/dist/workflow-foundation/index.js.map +1 -0
  81. package/package.json +22 -0
  82. package/src/AnimationLabWorkflow.ts +165 -0
  83. package/src/AssetViewerWorkflow.ts +37 -0
  84. package/src/ComparisonWorkflow.ts +68 -0
  85. package/src/InteractiveSceneWorkflow.ts +44 -0
  86. package/src/MaterialStudioWorkflow.ts +48 -0
  87. package/src/ProductConfiguratorWorkflow.ts +32 -0
  88. package/src/SceneShowcaseWorkflow.ts +45 -0
  89. package/src/WorkflowDiagnostics.ts +47 -0
  90. package/src/WorkflowTypes.ts +113 -0
  91. package/src/index.ts +34 -0
  92. package/src/production-runtime/ArchitectureWorkflow.ts +2 -0
  93. package/src/production-runtime/AssetInspectionWorkflow.ts +2 -0
  94. package/src/production-runtime/CinematicWorkflow.ts +2 -0
  95. package/src/production-runtime/MaterialAuthoringWorkflow.ts +2 -0
  96. package/src/production-runtime/ProductRenderWorkflow.ts +2 -0
  97. package/src/production-runtime/ProductionExampleRuntime.ts +267 -0
  98. package/src/production-runtime/ProductionWorkflows.ts +203 -0
  99. package/src/production-runtime/WorkflowDiagnostics.ts +2 -0
  100. package/src/production-runtime/index.ts +32 -0
  101. package/src/workflow-foundation/index.ts +27 -0
@@ -0,0 +1,203 @@
1
+ export type ProductionWorkflowId = "product" | "asset" | "material" | "architecture" | "cinematic";
2
+
3
+ export interface ProductionWorkflowDefinition {
4
+ readonly id: ProductionWorkflowId;
5
+ readonly label: string;
6
+ readonly requiredAssetClasses: readonly string[];
7
+ readonly requiredRendererFeatures: readonly string[];
8
+ readonly requiredProof: readonly string[];
9
+ readonly differentiation: readonly string[];
10
+ }
11
+
12
+ export interface ProductionAssetPreflightInput {
13
+ readonly id: string;
14
+ readonly localPath?: string;
15
+ readonly sourceUri?: string;
16
+ readonly sha256?: string;
17
+ readonly bytes?: number;
18
+ readonly license?: string;
19
+ readonly tags?: readonly string[];
20
+ readonly renderRequirements?: readonly string[];
21
+ }
22
+
23
+ export interface ProductionAssetPreflightResult {
24
+ readonly assetId: string;
25
+ readonly pass: boolean;
26
+ readonly missing: readonly string[];
27
+ readonly warnings: readonly string[];
28
+ }
29
+
30
+ export interface ProductionVisualQAInput {
31
+ readonly screenshotPath: string;
32
+ readonly rendererBackend: string;
33
+ readonly realRendererProof: boolean;
34
+ readonly width: number;
35
+ readonly height: number;
36
+ readonly nonBlackPixels: number;
37
+ readonly uniqueColorBuckets: number;
38
+ readonly drawCalls: number;
39
+ readonly textureMemory: number;
40
+ }
41
+
42
+ export interface ProductionVisualQAResult {
43
+ readonly screenshotPath: string;
44
+ readonly pass: boolean;
45
+ readonly score: number;
46
+ readonly failures: readonly string[];
47
+ }
48
+
49
+ export interface ProductionRendererDefaults {
50
+ readonly workflowId: ProductionWorkflowId;
51
+ readonly backend: "webgl2";
52
+ readonly hdrEnvironmentId: "studio-small-08";
53
+ readonly qualityPreset: "hdr-studio-preview";
54
+ readonly camera: {
55
+ readonly policy: "require";
56
+ readonly paddingRatio: number;
57
+ readonly yawRadians: number;
58
+ readonly pitchRadians: number;
59
+ };
60
+ readonly postprocess: readonly string[];
61
+ readonly runtimeMetrics: readonly string[];
62
+ }
63
+
64
+ export interface ProductionWorkflowPlan {
65
+ readonly workflow: ProductionWorkflowDefinition;
66
+ readonly defaults: ProductionRendererDefaults;
67
+ readonly preflightRequired: true;
68
+ readonly visualQARequired: true;
69
+ }
70
+
71
+ export const PRODUCTION_WORKFLOWS: readonly ProductionWorkflowDefinition[] = [
72
+ {
73
+ id: "product",
74
+ label: "Product Configurator",
75
+ requiredAssetClasses: ["product"],
76
+ requiredRendererFeatures: ["real-webgl2-context", "pbr-materials", "hdr-ibl-ready", "pixel-readback"],
77
+ requiredProof: ["imported-glb", "hdr-environment", "draw-calls", "texture-memory", "canvas-screenshot"],
78
+ differentiation: ["runtime proof bundle", "material variant workflow", "developer metrics"]
79
+ },
80
+ {
81
+ id: "asset",
82
+ label: "Asset Inspector",
83
+ requiredAssetClasses: ["product", "character", "material"],
84
+ requiredRendererFeatures: ["real-webgl2-context", "imported-gltf-render-source", "pixel-readback"],
85
+ requiredProof: ["asset metadata", "skinning-or-morph-visibility", "corpus provenance"],
86
+ differentiation: ["asset preflight", "metadata and visual proof in one report"]
87
+ },
88
+ {
89
+ id: "material",
90
+ label: "Material Studio",
91
+ requiredAssetClasses: ["material"],
92
+ requiredRendererFeatures: ["pbr-materials", "hdr-ibl-ready", "texture-upload-diagnostics"],
93
+ requiredProof: ["material-extension-metadata", "hdr-lighting", "texture bindings"],
94
+ differentiation: ["extension coverage reporting", "visual QA score per material"]
95
+ },
96
+ {
97
+ id: "architecture",
98
+ label: "Architecture Viewer",
99
+ requiredAssetClasses: ["architecture", "product"],
100
+ requiredRendererFeatures: ["hdr-ibl-ready", "camera-framing", "pixel-readback"],
101
+ requiredProof: ["day-night-environment", "camera defaults", "visual quality metrics"],
102
+ differentiation: ["environment comparison", "inspection-ready camera defaults"]
103
+ },
104
+ {
105
+ id: "cinematic",
106
+ label: "Cinematic Postprocess",
107
+ requiredAssetClasses: ["product"],
108
+ requiredRendererFeatures: ["postprocess-presentation", "tone-mapping", "bloom", "fxaa"],
109
+ requiredProof: ["postprocess-chain", "nonblank diffable screenshot", "renderer diagnostics"],
110
+ differentiation: ["proof-backed postprocess presets", "gallery-ready output"]
111
+ }
112
+ ];
113
+
114
+ export function listProductionWorkflowDefinitions(): readonly ProductionWorkflowDefinition[] {
115
+ return PRODUCTION_WORKFLOWS;
116
+ }
117
+
118
+ export function createProductionAssetPreflight(input: ProductionAssetPreflightInput): ProductionAssetPreflightResult {
119
+ const renderRequirements = input.renderRequirements ?? [];
120
+ const missing = [
121
+ ...(!input.id ? ["id"] : []),
122
+ ...(!input.localPath ? ["localPath"] : []),
123
+ ...(!input.sourceUri ? ["sourceUri"] : []),
124
+ ...(!input.sha256 ? ["sha256"] : []),
125
+ ...(!input.license ? ["license"] : []),
126
+ ...(!input.bytes || input.bytes <= 0 ? ["bytes"] : []),
127
+ ...(renderRequirements.length === 0 ? ["renderRequirements"] : [])
128
+ ];
129
+ const warnings = [
130
+ ...(!input.tags?.includes("pbr") ? ["Asset is not tagged as PBR; workflow may need material fallback."] : []),
131
+ ...(!renderRequirements.includes("hdrIbl") ? ["Asset does not declare HDR IBL as an asset-specific requirement; renderer workflow must provide fallback HDR lighting proof."] : []),
132
+ ...((input.bytes ?? 0) < 10_000 ? ["Asset is very small for visual parity proof."] : [])
133
+ ];
134
+ return {
135
+ assetId: input.id,
136
+ pass: missing.length === 0,
137
+ missing,
138
+ warnings
139
+ };
140
+ }
141
+
142
+ export function createProductionVisualQAResult(input: ProductionVisualQAInput): ProductionVisualQAResult {
143
+ const totalPixels = Math.max(1, input.width * input.height);
144
+ const coverage = input.nonBlackPixels / totalPixels;
145
+ const score = Number(Math.min(100, (
146
+ (input.realRendererProof ? 22 : 0) +
147
+ (input.rendererBackend === "webgl2" ? 12 : 0) +
148
+ Math.min(24, coverage * 30) +
149
+ Math.min(24, input.uniqueColorBuckets / 8) +
150
+ Math.min(10, input.drawCalls * 1.5) +
151
+ Math.min(8, input.textureMemory / 4_000_000)
152
+ )).toFixed(3));
153
+ const failures = [
154
+ ...(!input.realRendererProof ? ["missing-real-renderer-proof"] : []),
155
+ ...(input.rendererBackend !== "webgl2" ? ["unexpected-renderer-backend"] : []),
156
+ ...(input.width < 128 || input.height < 128 ? ["screenshot-too-small"] : []),
157
+ ...(input.nonBlackPixels <= 1000 ? ["blank-or-nearly-blank"] : []),
158
+ ...(input.uniqueColorBuckets <= 4 ? ["low-color-entropy"] : []),
159
+ ...(input.drawCalls <= 0 ? ["missing-draw-calls"] : [])
160
+ ];
161
+ return {
162
+ screenshotPath: input.screenshotPath,
163
+ pass: failures.length === 0 && score >= 40,
164
+ score,
165
+ failures
166
+ };
167
+ }
168
+
169
+ export function createProductionRendererDefaults(workflowId: ProductionWorkflowId): ProductionRendererDefaults {
170
+ const cameraByWorkflow: Record<ProductionWorkflowId, { readonly yawRadians: number; readonly pitchRadians: number; readonly paddingRatio: number }> = {
171
+ product: { yawRadians: -0.38, pitchRadians: -0.16, paddingRatio: 0.18 },
172
+ asset: { yawRadians: -0.34, pitchRadians: -0.14, paddingRatio: 0.2 },
173
+ material: { yawRadians: -0.42, pitchRadians: -0.16, paddingRatio: 0.22 },
174
+ architecture: { yawRadians: -0.52, pitchRadians: -0.2, paddingRatio: 0.24 },
175
+ cinematic: { yawRadians: -0.36, pitchRadians: -0.14, paddingRatio: 0.18 }
176
+ };
177
+ const camera = cameraByWorkflow[workflowId];
178
+ return {
179
+ workflowId,
180
+ backend: "webgl2",
181
+ hdrEnvironmentId: "studio-small-08",
182
+ qualityPreset: "hdr-studio-preview",
183
+ camera: {
184
+ policy: "require",
185
+ paddingRatio: camera.paddingRatio,
186
+ yawRadians: camera.yawRadians,
187
+ pitchRadians: camera.pitchRadians
188
+ },
189
+ postprocess: ["tone-mapping", "color-grade", "bloom", "fxaa"],
190
+ runtimeMetrics: ["appId", "sceneId", "rendererBackend", "assetIds", "hdrEnvironmentId", "drawCalls", "triangleCount", "materialCount", "textureCount", "textureMemoryEstimate", "frameTime"]
191
+ };
192
+ }
193
+
194
+ export function createProductionWorkflowPlan(workflowId: ProductionWorkflowId): ProductionWorkflowPlan {
195
+ const workflow = PRODUCTION_WORKFLOWS.find((item) => item.id === workflowId);
196
+ if (!workflow) throw new Error(`Unknown Production workflow: ${workflowId}`);
197
+ return {
198
+ workflow,
199
+ defaults: createProductionRendererDefaults(workflowId),
200
+ preflightRequired: true,
201
+ visualQARequired: true
202
+ };
203
+ }
@@ -0,0 +1,2 @@
1
+ export interface WorkflowDiagnosticsSummary { readonly id: string; readonly ready: boolean; readonly workflow: string; }
2
+ export function createWorkflowDiagnosticsSummary(): WorkflowDiagnosticsSummary { return { id: 'diagnostics', ready: true, workflow: 'WorkflowDiagnostics' }; }
@@ -0,0 +1,32 @@
1
+ export {
2
+ PRODUCTION_WORKFLOWS,
3
+ createProductionAssetPreflight,
4
+ createProductionRendererDefaults,
5
+ createProductionVisualQAResult,
6
+ createProductionWorkflowPlan,
7
+ listProductionWorkflowDefinitions
8
+ } from "./ProductionWorkflows";
9
+ export type {
10
+ ProductionAssetPreflightInput,
11
+ ProductionAssetPreflightResult,
12
+ ProductionRendererDefaults,
13
+ ProductionVisualQAInput,
14
+ ProductionVisualQAResult,
15
+ ProductionWorkflowDefinition,
16
+ ProductionWorkflowId,
17
+ ProductionWorkflowPlan
18
+ } from "./ProductionWorkflows";
19
+ export { runProductionExample } from "./ProductionExampleRuntime";
20
+ export type {
21
+ ProductionExampleAsset,
22
+ ProductionExampleDefinition,
23
+ ProductionExampleEnvironment,
24
+ ProductionExampleRuntime,
25
+ ProductionExampleRuntimeMetrics
26
+ } from "./ProductionExampleRuntime";
27
+ export * from './ProductRenderWorkflow';
28
+ export * from './AssetInspectionWorkflow';
29
+ export * from './MaterialAuthoringWorkflow';
30
+ export * from './ArchitectureWorkflow';
31
+ export * from './CinematicWorkflow';
32
+ export * from './WorkflowDiagnostics';
@@ -0,0 +1,27 @@
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 type * from "../WorkflowTypes";
10
+
11
+ import { createAnimationLabWorkflow } from "../AnimationLabWorkflow";
12
+ import { createAssetViewerWorkflow } from "../AssetViewerWorkflow";
13
+ import { createComparisonWorkflow } from "../ComparisonWorkflow";
14
+ import { createInteractiveSceneWorkflow } from "../InteractiveSceneWorkflow";
15
+ import { createMaterialStudioWorkflow } from "../MaterialStudioWorkflow";
16
+ import { createProductConfiguratorWorkflow } from "../ProductConfiguratorWorkflow";
17
+ import { createSceneShowcaseWorkflow } from "../SceneShowcaseWorkflow";
18
+
19
+ export const workflows = {
20
+ assetViewer: createAssetViewerWorkflow,
21
+ productConfigurator: createProductConfiguratorWorkflow,
22
+ materialStudio: createMaterialStudioWorkflow,
23
+ sceneShowcase: createSceneShowcaseWorkflow,
24
+ interactiveScene: createInteractiveSceneWorkflow,
25
+ animationLab: createAnimationLabWorkflow,
26
+ comparison: createComparisonWorkflow
27
+ } as const;