@clypra-studio/engine 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{chunk-LT3HTJ3X.js → chunk-3UEOLDJJ.js} +5 -829
- package/dist/chunk-3UEOLDJJ.js.map +1 -0
- package/dist/{chunk-Y4FMAOTW.js → chunk-E6O6LZME.js} +266 -1004
- package/dist/chunk-E6O6LZME.js.map +1 -0
- package/dist/chunk-PU3Q4QI7.js +833 -0
- package/dist/chunk-PU3Q4QI7.js.map +1 -0
- package/dist/{index-D6GAXDBy.d.cts → index-C18SQ-y6.d.cts} +171 -37
- package/dist/{index-D6GAXDBy.d.ts → index-C18SQ-y6.d.ts} +171 -37
- package/dist/index.cjs +11149 -23528
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2087 -7834
- package/dist/index.d.ts +2087 -7834
- package/dist/index.js +10059 -17971
- package/dist/index.js.map +1 -1
- package/dist/textEffects/index.cjs +259 -971
- package/dist/textEffects/index.cjs.map +1 -1
- package/dist/textEffects/index.d.cts +1 -1
- package/dist/textEffects/index.d.ts +1 -1
- package/dist/textEffects/index.js +1 -1
- package/dist/transitions/index.cjs +18 -2199
- package/dist/transitions/index.cjs.map +1 -1
- package/dist/transitions/index.d.cts +37 -53
- package/dist/transitions/index.d.ts +37 -53
- package/dist/transitions/index.js +3 -51
- package/dist/videoEffects/index.cjs +4 -835
- package/dist/videoEffects/index.cjs.map +1 -1
- package/dist/videoEffects/index.d.cts +9 -138
- package/dist/videoEffects/index.d.ts +9 -138
- package/dist/videoEffects/index.js +1 -15
- package/package.json +13 -16
- package/dist/TransitionDefinition-CQoSb4ZB.d.cts +0 -158
- package/dist/TransitionDefinition-CQoSb4ZB.d.ts +0 -158
- package/dist/chunk-FIJBB3MH.js +0 -2990
- package/dist/chunk-FIJBB3MH.js.map +0 -1
- package/dist/chunk-LT3HTJ3X.js.map +0 -1
- package/dist/chunk-RYA4KGDB.js +0 -690
- package/dist/chunk-RYA4KGDB.js.map +0 -1
- package/dist/chunk-Y4FMAOTW.js.map +0 -1
- package/dist/index-BdQ3oRT4.d.cts +0 -139
- package/dist/index-BdQ3oRT4.d.ts +0 -139
- package/dist/v2/backends/index.cjs +0 -693
- package/dist/v2/backends/index.cjs.map +0 -1
- package/dist/v2/backends/index.d.cts +0 -3
- package/dist/v2/backends/index.d.ts +0 -3
- package/dist/v2/backends/index.js +0 -8
- package/dist/v2/backends/index.js.map +0 -1
|
@@ -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 };
|
package/dist/index-BdQ3oRT4.d.ts
DELETED
|
@@ -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 };
|