@motionscript/renderer 0.1.0 → 0.1.1-alpha.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/CHANGELOG.md +13 -0
- package/README.md +4 -1
- package/dist/browser/index.js +10 -10
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/manifest.json +1 -1
- package/dist/index.d.ts +33 -0
- package/dist/index.js +9475 -8923
- package/dist/index.js.map +1 -1
- package/dist/ms_renderer_bg.wasm +0 -0
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -151,3 +151,36 @@ export declare class ShaderPreview {
|
|
|
151
151
|
status(scope: ShaderScope, source: string): ShaderStatus;
|
|
152
152
|
destroy(): void;
|
|
153
153
|
}
|
|
154
|
+
|
|
155
|
+
/** Experimental: the bytes of an export stream for the native sidecar, as recorded so far. */
|
|
156
|
+
export interface NativeExportStream {
|
|
157
|
+
/** Bytes waiting to be taken. */
|
|
158
|
+
readonly size: number;
|
|
159
|
+
record(op: number, words: ArrayLike<number>, tail?: Uint8Array): void;
|
|
160
|
+
/** Everything recorded since the last call. */
|
|
161
|
+
take(): Uint8Array;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** Experimental: a render context whose frames go to the native export sidecar (`crates/export/DESIGN.md`). */
|
|
165
|
+
export type NativeExportContext = EngineRenderContext & {
|
|
166
|
+
readonly out: NativeExportStream;
|
|
167
|
+
/** The scene as last drawn is the next video frame. */
|
|
168
|
+
frameDone(): void;
|
|
169
|
+
/** Images handed to the sidecar, and the ms spent reading their pixels. */
|
|
170
|
+
readonly recorder: { imageUploads: number; imageMs: number };
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
/** The export stream's record kinds (`crates/export/src/stream.rs`). */
|
|
174
|
+
export declare const NATIVE_RECORD: {
|
|
175
|
+
readonly BEGIN: 1; readonly APPLY: 2; readonly FONT: 3; readonly IMAGE: 4; readonly SURFACE: 5; readonly SCENE3D: 6;
|
|
176
|
+
readonly SCENE3D_BIND: 7; readonly SCENE3D_PIXELS: 8; readonly FREE_IMAGE: 9; readonly SHADER_ADD: 10; readonly SHADER_BUILD: 11;
|
|
177
|
+
readonly SHADER_REMOVE: 12; readonly OPTIONS: 13; readonly RESIZE: 14; readonly FRAME: 15; readonly AUDIO: 16; readonly END: 17;
|
|
178
|
+
readonly INVALIDATE: 18; readonly CREATE: 19;
|
|
179
|
+
};
|
|
180
|
+
export declare const NATIVE_STREAM_VERSION: number;
|
|
181
|
+
|
|
182
|
+
/** Experimental: see {@link NativeExportContext}. */
|
|
183
|
+
export declare function createNativeExportContext(
|
|
184
|
+
storage: WgpuStorageAdapter,
|
|
185
|
+
options: { viewport: { width: number; height: number }; effects: readonly string[]; size: { width: number; height: number } },
|
|
186
|
+
): NativeExportContext;
|