@clypra-studio/engine 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +1 -1
  2. package/dist/{chunk-Y4FMAOTW.js → chunk-7ORA5BPW.js} +279 -1302
  3. package/dist/chunk-7ORA5BPW.js.map +1 -0
  4. package/dist/chunk-NG4F55V7.js +300 -0
  5. package/dist/chunk-NG4F55V7.js.map +1 -0
  6. package/dist/chunk-PU3Q4QI7.js +833 -0
  7. package/dist/chunk-PU3Q4QI7.js.map +1 -0
  8. package/dist/chunk-Q7XYDP4X.js +1898 -0
  9. package/dist/chunk-Q7XYDP4X.js.map +1 -0
  10. package/dist/{chunk-LT3HTJ3X.js → chunk-SH7HOGVX.js} +5 -829
  11. package/dist/chunk-SH7HOGVX.js.map +1 -0
  12. package/dist/index-B1lFl4p2.d.ts +122 -0
  13. package/dist/index-Cpps1DKP.d.ts +489 -0
  14. package/dist/index-DrzRbR7G.d.cts +122 -0
  15. package/dist/index-WsvrOpAy.d.cts +489 -0
  16. package/dist/index.cjs +14360 -24090
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +2187 -7852
  19. package/dist/index.d.ts +2187 -7852
  20. package/dist/index.js +11128 -18233
  21. package/dist/index.js.map +1 -1
  22. package/dist/rendering/index.cjs +3694 -0
  23. package/dist/rendering/index.cjs.map +1 -0
  24. package/dist/rendering/index.d.cts +2 -0
  25. package/dist/rendering/index.d.ts +2 -0
  26. package/dist/rendering/index.js +21 -0
  27. package/dist/textEffects/index.cjs +270 -974
  28. package/dist/textEffects/index.cjs.map +1 -1
  29. package/dist/textEffects/index.d.cts +2 -1
  30. package/dist/textEffects/index.d.ts +2 -1
  31. package/dist/textEffects/index.js +6 -4
  32. package/dist/transitions/index.cjs +18 -2199
  33. package/dist/transitions/index.cjs.map +1 -1
  34. package/dist/transitions/index.d.cts +37 -53
  35. package/dist/transitions/index.d.ts +37 -53
  36. package/dist/transitions/index.js +3 -51
  37. package/dist/{index-D6GAXDBy.d.cts → types-IYwXGYkB.d.cts} +300 -154
  38. package/dist/{index-D6GAXDBy.d.ts → types-IYwXGYkB.d.ts} +300 -154
  39. package/dist/videoEffects/index.cjs +4 -835
  40. package/dist/videoEffects/index.cjs.map +1 -1
  41. package/dist/videoEffects/index.d.cts +9 -138
  42. package/dist/videoEffects/index.d.ts +9 -138
  43. package/dist/videoEffects/index.js +1 -15
  44. package/package.json +18 -16
  45. package/dist/TransitionDefinition-CQoSb4ZB.d.cts +0 -158
  46. package/dist/TransitionDefinition-CQoSb4ZB.d.ts +0 -158
  47. package/dist/chunk-FIJBB3MH.js +0 -2990
  48. package/dist/chunk-FIJBB3MH.js.map +0 -1
  49. package/dist/chunk-LT3HTJ3X.js.map +0 -1
  50. package/dist/chunk-RYA4KGDB.js +0 -690
  51. package/dist/chunk-RYA4KGDB.js.map +0 -1
  52. package/dist/chunk-Y4FMAOTW.js.map +0 -1
  53. package/dist/index-BdQ3oRT4.d.cts +0 -139
  54. package/dist/index-BdQ3oRT4.d.ts +0 -139
  55. package/dist/v2/backends/index.cjs +0 -693
  56. package/dist/v2/backends/index.cjs.map +0 -1
  57. package/dist/v2/backends/index.d.cts +0 -3
  58. package/dist/v2/backends/index.d.ts +0 -3
  59. package/dist/v2/backends/index.js +0 -8
  60. /package/dist/{v2/backends → rendering}/index.js.map +0 -0
@@ -1,139 +0,0 @@
1
- import * as pixi_js from 'pixi.js';
2
- import { GraphNode, GraphEdge } from '@clypra-studio/types';
3
-
4
- /**
5
- * @clypra-studio/engine — Pipeline V2: Render Planner Definitions
6
- *
7
- * @deprecated This file has been superseded by @clypra/runtime/planner/types
8
- * Import from @clypra/runtime instead:
9
- * ```ts
10
- * import type { FrameGraph, ResourceRequest, RenderPass } from "@clypra/runtime/planner";
11
- * ```
12
- * Note: Runtime version includes additional properties (blendMode, clearBeforeRender, PlannerConfig)
13
- * This file will be removed in v3.0.0
14
- *
15
- * Defines transient planning constructs: resource requests, frame-isolated graphs, and render passes.
16
- */
17
-
18
- interface ResourceRequest {
19
- readonly id: string;
20
- readonly type: "texture" | "buffer";
21
- readonly width: number;
22
- readonly height: number;
23
- readonly format: "rgba8" | "rgba16f" | "rgba32f" | "r8";
24
- readonly transient: boolean;
25
- }
26
- interface RenderPass {
27
- readonly id: string;
28
- readonly name: string;
29
- readonly shaderId: string;
30
- readonly inputs: readonly string[];
31
- readonly output: string;
32
- readonly uniforms: Readonly<Record<string, any>>;
33
- }
34
- /**
35
- * A flattened, active graph containing only nodes contributing to a specific frame.
36
- */
37
- interface FrameGraph {
38
- readonly frameNumber: number;
39
- readonly timelineTimeMs: number;
40
- readonly nodes: readonly GraphNode[];
41
- readonly edges: readonly GraphEdge[];
42
- readonly resourceRequests: readonly ResourceRequest[];
43
- readonly passes: readonly RenderPass[];
44
- }
45
- interface DependencyGraph {
46
- readonly executionOrder: readonly string[];
47
- readonly readDependencies: Readonly<Record<string, readonly string[]>>;
48
- readonly writeDependencies: Readonly<Record<string, string>>;
49
- }
50
-
51
- /**
52
- * @clypra-studio/engine — Pipeline V2: Runtime Definitions
53
- *
54
- * @deprecated These types are interfaces only. Full implementations exist in @clypra/runtime
55
- * Import from @clypra/runtime instead:
56
- * ```ts
57
- * import { PixiRenderer, NullRenderer, Executor } from "@clypra/runtime/renderer";
58
- * ```
59
- * This file will be removed in v3.0.0
60
- *
61
- * Defines execution-specific layers: policies, backends, and command buffers.
62
- */
63
-
64
- type ExecutionQuality = "draft" | "preview" | "export";
65
- type PlaybackMode = "play" | "seek";
66
- type PlaybackDirection = "forward" | "reverse";
67
- interface ExecutionPolicy {
68
- readonly quality: ExecutionQuality;
69
- readonly playbackMode: PlaybackMode;
70
- readonly direction: PlaybackDirection;
71
- readonly targetFps: number;
72
- }
73
- interface Command {
74
- readonly op: "bind_texture" | "bind_uniforms" | "draw" | "copy" | "clear";
75
- readonly resourceId?: string;
76
- readonly params?: Readonly<Record<string, any>>;
77
- }
78
- interface CommandBuffer {
79
- readonly frameNumber: number;
80
- readonly passes: readonly {
81
- readonly pass: RenderPass;
82
- readonly commands: readonly Command[];
83
- }[];
84
- }
85
- interface RenderBackend {
86
- /** Initialize connection to physical GPU queue/canvas */
87
- init(canvasElement?: HTMLCanvasElement): Promise<void>;
88
- /** Allocate physical textures or buffers */
89
- allocateResource(id: string, type: "texture" | "buffer", width: number, height: number, format: string): void;
90
- /** Release physical textures or buffers */
91
- releaseResource(id: string): void;
92
- /** Compile static shader kernels */
93
- compileShader(shaderId: string, sourceGLSLOrWGSL: string): void;
94
- /** Execute command buffer queue */
95
- submit(commandBuffer: CommandBuffer): Promise<void>;
96
- /** Retrieve pixel buffer from target texture */
97
- readPixels(resourceId: string): Promise<Uint8Array>;
98
- /** Release all allocated memory */
99
- destroy(): void;
100
- }
101
-
102
- /**
103
- * @clypra-studio/engine — Pipeline V2: Pixi Render Backend
104
- *
105
- * @deprecated Use @clypra/runtime/renderer instead
106
- * The runtime version (PixiRenderer) is more complete with better resource management.
107
- * This file will be removed in v3.0.0
108
- *
109
- * RenderBackend implementation using Pixi.js for GPU pass execution.
110
- */
111
-
112
- declare class PixiRenderBackend implements RenderBackend {
113
- private app;
114
- private initialized;
115
- private resources;
116
- private filters;
117
- private canvasElement?;
118
- init(canvasElement?: HTMLCanvasElement, width?: number, height?: number): Promise<void>;
119
- resize(width: number, height: number): void;
120
- get logicalWidth(): number;
121
- get logicalHeight(): number;
122
- allocateResource(id: string, _type: "texture" | "buffer", width: number, height: number, _format: string): void;
123
- releaseResource(id: string): void;
124
- compileShader(shaderId: string, _sourceGLSLOrWGSL: string): void;
125
- submit(commandBuffer: CommandBuffer): Promise<void>;
126
- private executePass;
127
- private applyUniforms;
128
- private blitTexture;
129
- /** Upload a source image into track/source render textures (contain-fit). */
130
- uploadSourceImage(sourceImage: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, resourceIds: readonly string[]): void;
131
- /** Present a resource texture to the canvas screen. */
132
- present(resourceId: string): void;
133
- getResource(id: string): pixi_js.Texture | undefined;
134
- readPixels(resourceId: string): Promise<Uint8Array>;
135
- clearResources(): void;
136
- destroy(): void;
137
- }
138
-
139
- export { type CommandBuffer as C, type DependencyGraph as D, type ExecutionPolicy as E, type FrameGraph as F, PixiRenderBackend as P, type RenderBackend as R, type ExecutionQuality as a, type PlaybackDirection as b, type PlaybackMode as c, type RenderPass as d, type ResourceRequest as e, type Command as f };
@@ -1,139 +0,0 @@
1
- import * as pixi_js from 'pixi.js';
2
- import { GraphNode, GraphEdge } from '@clypra-studio/types';
3
-
4
- /**
5
- * @clypra-studio/engine — Pipeline V2: Render Planner Definitions
6
- *
7
- * @deprecated This file has been superseded by @clypra/runtime/planner/types
8
- * Import from @clypra/runtime instead:
9
- * ```ts
10
- * import type { FrameGraph, ResourceRequest, RenderPass } from "@clypra/runtime/planner";
11
- * ```
12
- * Note: Runtime version includes additional properties (blendMode, clearBeforeRender, PlannerConfig)
13
- * This file will be removed in v3.0.0
14
- *
15
- * Defines transient planning constructs: resource requests, frame-isolated graphs, and render passes.
16
- */
17
-
18
- interface ResourceRequest {
19
- readonly id: string;
20
- readonly type: "texture" | "buffer";
21
- readonly width: number;
22
- readonly height: number;
23
- readonly format: "rgba8" | "rgba16f" | "rgba32f" | "r8";
24
- readonly transient: boolean;
25
- }
26
- interface RenderPass {
27
- readonly id: string;
28
- readonly name: string;
29
- readonly shaderId: string;
30
- readonly inputs: readonly string[];
31
- readonly output: string;
32
- readonly uniforms: Readonly<Record<string, any>>;
33
- }
34
- /**
35
- * A flattened, active graph containing only nodes contributing to a specific frame.
36
- */
37
- interface FrameGraph {
38
- readonly frameNumber: number;
39
- readonly timelineTimeMs: number;
40
- readonly nodes: readonly GraphNode[];
41
- readonly edges: readonly GraphEdge[];
42
- readonly resourceRequests: readonly ResourceRequest[];
43
- readonly passes: readonly RenderPass[];
44
- }
45
- interface DependencyGraph {
46
- readonly executionOrder: readonly string[];
47
- readonly readDependencies: Readonly<Record<string, readonly string[]>>;
48
- readonly writeDependencies: Readonly<Record<string, string>>;
49
- }
50
-
51
- /**
52
- * @clypra-studio/engine — Pipeline V2: Runtime Definitions
53
- *
54
- * @deprecated These types are interfaces only. Full implementations exist in @clypra/runtime
55
- * Import from @clypra/runtime instead:
56
- * ```ts
57
- * import { PixiRenderer, NullRenderer, Executor } from "@clypra/runtime/renderer";
58
- * ```
59
- * This file will be removed in v3.0.0
60
- *
61
- * Defines execution-specific layers: policies, backends, and command buffers.
62
- */
63
-
64
- type ExecutionQuality = "draft" | "preview" | "export";
65
- type PlaybackMode = "play" | "seek";
66
- type PlaybackDirection = "forward" | "reverse";
67
- interface ExecutionPolicy {
68
- readonly quality: ExecutionQuality;
69
- readonly playbackMode: PlaybackMode;
70
- readonly direction: PlaybackDirection;
71
- readonly targetFps: number;
72
- }
73
- interface Command {
74
- readonly op: "bind_texture" | "bind_uniforms" | "draw" | "copy" | "clear";
75
- readonly resourceId?: string;
76
- readonly params?: Readonly<Record<string, any>>;
77
- }
78
- interface CommandBuffer {
79
- readonly frameNumber: number;
80
- readonly passes: readonly {
81
- readonly pass: RenderPass;
82
- readonly commands: readonly Command[];
83
- }[];
84
- }
85
- interface RenderBackend {
86
- /** Initialize connection to physical GPU queue/canvas */
87
- init(canvasElement?: HTMLCanvasElement): Promise<void>;
88
- /** Allocate physical textures or buffers */
89
- allocateResource(id: string, type: "texture" | "buffer", width: number, height: number, format: string): void;
90
- /** Release physical textures or buffers */
91
- releaseResource(id: string): void;
92
- /** Compile static shader kernels */
93
- compileShader(shaderId: string, sourceGLSLOrWGSL: string): void;
94
- /** Execute command buffer queue */
95
- submit(commandBuffer: CommandBuffer): Promise<void>;
96
- /** Retrieve pixel buffer from target texture */
97
- readPixels(resourceId: string): Promise<Uint8Array>;
98
- /** Release all allocated memory */
99
- destroy(): void;
100
- }
101
-
102
- /**
103
- * @clypra-studio/engine — Pipeline V2: Pixi Render Backend
104
- *
105
- * @deprecated Use @clypra/runtime/renderer instead
106
- * The runtime version (PixiRenderer) is more complete with better resource management.
107
- * This file will be removed in v3.0.0
108
- *
109
- * RenderBackend implementation using Pixi.js for GPU pass execution.
110
- */
111
-
112
- declare class PixiRenderBackend implements RenderBackend {
113
- private app;
114
- private initialized;
115
- private resources;
116
- private filters;
117
- private canvasElement?;
118
- init(canvasElement?: HTMLCanvasElement, width?: number, height?: number): Promise<void>;
119
- resize(width: number, height: number): void;
120
- get logicalWidth(): number;
121
- get logicalHeight(): number;
122
- allocateResource(id: string, _type: "texture" | "buffer", width: number, height: number, _format: string): void;
123
- releaseResource(id: string): void;
124
- compileShader(shaderId: string, _sourceGLSLOrWGSL: string): void;
125
- submit(commandBuffer: CommandBuffer): Promise<void>;
126
- private executePass;
127
- private applyUniforms;
128
- private blitTexture;
129
- /** Upload a source image into track/source render textures (contain-fit). */
130
- uploadSourceImage(sourceImage: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, resourceIds: readonly string[]): void;
131
- /** Present a resource texture to the canvas screen. */
132
- present(resourceId: string): void;
133
- getResource(id: string): pixi_js.Texture | undefined;
134
- readPixels(resourceId: string): Promise<Uint8Array>;
135
- clearResources(): void;
136
- destroy(): void;
137
- }
138
-
139
- export { type CommandBuffer as C, type DependencyGraph as D, type ExecutionPolicy as E, type FrameGraph as F, PixiRenderBackend as P, type RenderBackend as R, type ExecutionQuality as a, type PlaybackDirection as b, type PlaybackMode as c, type RenderPass as d, type ResourceRequest as e, type Command as f };