@hyperframes/shader-transitions 0.8.76 → 0.8.78
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/index.cjs +13 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.global.js +13 -13
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -104,4 +104,21 @@ declare const PAGE_COMPOSITOR_BUILD_CANARY = "__hf_page_compositor_v1__";
|
|
|
104
104
|
declare function isPageSideCompositingSupported(): boolean;
|
|
105
105
|
declare function installPageSideCompositor(options: PageCompositorInstallOptions): boolean;
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
/** What texImage2D accepts; LINEAR filtering scales it to the canvas, so a larger frame adds no quality. */
|
|
108
|
+
type SeamTransitionFrameSource = HTMLImageElement | HTMLCanvasElement | ImageBitmap;
|
|
109
|
+
interface SeamTransitionLoopOptions {
|
|
110
|
+
/** Defaults to the canvas's own drawing-buffer size. */
|
|
111
|
+
width?: number;
|
|
112
|
+
height?: number;
|
|
113
|
+
loopMs?: number;
|
|
114
|
+
}
|
|
115
|
+
interface SeamTransitionLoopHandle {
|
|
116
|
+
/** Frees what this call created and keeps the WebGL context for the canvas's next loop. Idempotent. */
|
|
117
|
+
stop: () => void;
|
|
118
|
+
/** Resolves at the first drawn frame or at `stop()`, whichever comes first. */
|
|
119
|
+
ready: Promise<void>;
|
|
120
|
+
}
|
|
121
|
+
/** Loops a catalog shader transition between two frames; throws for an unknown shader, no WebGL or a bad size. */
|
|
122
|
+
declare function playSeamTransitionLoop(canvas: HTMLCanvasElement, fromSource: SeamTransitionFrameSource, toSource: SeamTransitionFrameSource, shaderName: string, options?: SeamTransitionLoopOptions): SeamTransitionLoopHandle;
|
|
123
|
+
|
|
124
|
+
export { type HyperShaderConfig, PAGE_COMPOSITOR_BUILD_CANARY, PAGE_COMPOSITOR_CANVAS_ID, SHADER_NAMES, type SeamTransitionFrameSource, type SeamTransitionLoopHandle, type SeamTransitionLoopOptions, type ShaderName, type TransitionConfig, init, installPageSideCompositor, isHtmlInCanvasCaptureSupported, isPageSideCompositingSupported, playSeamTransitionLoop };
|
package/dist/index.d.ts
CHANGED
|
@@ -104,4 +104,21 @@ declare const PAGE_COMPOSITOR_BUILD_CANARY = "__hf_page_compositor_v1__";
|
|
|
104
104
|
declare function isPageSideCompositingSupported(): boolean;
|
|
105
105
|
declare function installPageSideCompositor(options: PageCompositorInstallOptions): boolean;
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
/** What texImage2D accepts; LINEAR filtering scales it to the canvas, so a larger frame adds no quality. */
|
|
108
|
+
type SeamTransitionFrameSource = HTMLImageElement | HTMLCanvasElement | ImageBitmap;
|
|
109
|
+
interface SeamTransitionLoopOptions {
|
|
110
|
+
/** Defaults to the canvas's own drawing-buffer size. */
|
|
111
|
+
width?: number;
|
|
112
|
+
height?: number;
|
|
113
|
+
loopMs?: number;
|
|
114
|
+
}
|
|
115
|
+
interface SeamTransitionLoopHandle {
|
|
116
|
+
/** Frees what this call created and keeps the WebGL context for the canvas's next loop. Idempotent. */
|
|
117
|
+
stop: () => void;
|
|
118
|
+
/** Resolves at the first drawn frame or at `stop()`, whichever comes first. */
|
|
119
|
+
ready: Promise<void>;
|
|
120
|
+
}
|
|
121
|
+
/** Loops a catalog shader transition between two frames; throws for an unknown shader, no WebGL or a bad size. */
|
|
122
|
+
declare function playSeamTransitionLoop(canvas: HTMLCanvasElement, fromSource: SeamTransitionFrameSource, toSource: SeamTransitionFrameSource, shaderName: string, options?: SeamTransitionLoopOptions): SeamTransitionLoopHandle;
|
|
123
|
+
|
|
124
|
+
export { type HyperShaderConfig, PAGE_COMPOSITOR_BUILD_CANARY, PAGE_COMPOSITOR_CANVAS_ID, SHADER_NAMES, type SeamTransitionFrameSource, type SeamTransitionLoopHandle, type SeamTransitionLoopOptions, type ShaderName, type TransitionConfig, init, installPageSideCompositor, isHtmlInCanvasCaptureSupported, isPageSideCompositingSupported, playSeamTransitionLoop };
|