@real-music-packages/web-core 0.31.0 → 0.33.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/dist/scene/index.d.ts +33 -2
- package/dist/scene/index.js +222 -1
- package/dist/scene/index.js.map +1 -1
- package/package.json +1 -1
package/dist/scene/index.d.ts
CHANGED
|
@@ -1020,7 +1020,8 @@ declare const keyboardFactory: LayerFactory<KeyboardProps>;
|
|
|
1020
1020
|
interface FretboardProps {
|
|
1021
1021
|
/** Highest fret drawn. Default: auto-fit the excerpt (min 5, max 15), padded. */
|
|
1022
1022
|
visibleFrets?: number;
|
|
1023
|
-
/** Board height in world px. Default
|
|
1023
|
+
/** Board height in world px. Default 360 — 6 strings need more vertical room
|
|
1024
|
+
* than the piano strip (220 cramped them to ~37px each). */
|
|
1024
1025
|
height?: number;
|
|
1025
1026
|
/** Board bottom edge in world px. Default safeBox.bottom. */
|
|
1026
1027
|
bottomY?: number;
|
|
@@ -1988,4 +1989,34 @@ interface EndCardProps {
|
|
|
1988
1989
|
}
|
|
1989
1990
|
declare const endCardFactory: LayerFactory<EndCardProps>;
|
|
1990
1991
|
|
|
1991
|
-
|
|
1992
|
+
type ImageRevealMode = 'pixelate' | 'shuffle' | 'blur';
|
|
1993
|
+
/**
|
|
1994
|
+
* Reveal pacing curve applied to linear progress before it drives the effect.
|
|
1995
|
+
* - 'linear' : constant rate (default — unchanged behavior).
|
|
1996
|
+
* - 'easeOut' : fast at first, SLOWER near the end (quadratic).
|
|
1997
|
+
* - 'easeOutStrong' : like easeOut but a more DRAMATIC, drawn-out final reveal (cubic).
|
|
1998
|
+
* - 'easeInOut' : slow start (stays obscured), then a slow settle at the end.
|
|
1999
|
+
*/
|
|
2000
|
+
type RevealEasing = 'linear' | 'easeOut' | 'easeOutStrong' | 'easeInOut';
|
|
2001
|
+
interface ImageRevealProps {
|
|
2002
|
+
/** The image to reveal. Any CanvasImageSource (HTMLImageElement, OffscreenCanvas, …). */
|
|
2003
|
+
image: CanvasImageSource;
|
|
2004
|
+
/** Reveal mode. Default 'pixelate'. */
|
|
2005
|
+
mode?: ImageRevealMode;
|
|
2006
|
+
/** When the reveal starts (ms). Default 0. */
|
|
2007
|
+
startMs?: number;
|
|
2008
|
+
/** How long the full reveal takes (ms). Default 6000. */
|
|
2009
|
+
durationMs?: number;
|
|
2010
|
+
/**
|
|
2011
|
+
* Difficulty scalar 0..1.
|
|
2012
|
+
* - pixelate: controls maximum block size (0→small, 1→large; default 0.5 ≈ 1/8 width).
|
|
2013
|
+
* - shuffle: controls maximum tile offset fraction (default 0.5).
|
|
2014
|
+
* - blur: controls maximum blur radius in px (0→mild, 1→extreme; default 0.5 ≈ 40px).
|
|
2015
|
+
*/
|
|
2016
|
+
difficulty?: number;
|
|
2017
|
+
/** Pacing curve for the reveal. Default 'linear'. See RevealEasing. */
|
|
2018
|
+
easing?: RevealEasing;
|
|
2019
|
+
}
|
|
2020
|
+
declare const imageRevealFactory: LayerFactory<ImageRevealProps>;
|
|
2021
|
+
|
|
2022
|
+
export { type Affine, type AudioClock, type AudioEvent, type BackgroundProps, type BeatGridOpts, type BeatPulseProps, type BeatTick, type BrandingProps, type BufferFactory, type BuildSceneOpts, type BuiltScene, type CameraState, type CaptionCue, type CaptionProps, type CaptionScript, type CaptionStyle, type ChordRibbonProps, type ChordSpan, type CircleOfFifthsProps, type CirclePoint, type ClickTrackOpts, type ColorBy, type ContourPlot, type ContourPoint, type CountInOpts, type CountdownProps, type CountingTrackProps, type CtaProps, DEFAULT_FUNCTION_COLORS, type DegreeLabel, type DegreeLabelsProps, type DroneOpts, type DuckWindow, type Easing, type EndCardProps, type ExtendedDemoOpts, FIFTHS_MAJOR, FIFTHS_MINOR, FOLLOW_BARS, FOLLOW_PAD, type FallingKeyboardDemoOpts, type FallingNotesProps, type FretboardProps, type FunctionColors, type FunctionalHarmonyProps, type GateError, type GateInput, type HandColors, type HarmonicFunction, type HarmonyMode, type HighlightRegion, type HookProps, type ImageRevealMode, type ImageRevealProps, type IntervalArcsProps, type KaraokeCaptionProps, type KaraokeWord, type KeyRect, type KeyboardLayout, type KeyboardLayoutOpts, type KeyboardProps, type KineticMode, type KineticTextProps, type LabelMode, type Layer, type LayerFactory, type McqCardProps, type NotationEngraving, type NotationLayout, type NotationLayoutOpts, type NotationProps, type NotationRect, type OutputProbe, PIANO_HIGH, PIANO_LOW, type ParticleBurstProps, type PitchContourProps, type Placement, type PlayheadLine, type PortraitProps, type ProgressRingProps, type PromoCardsDemoOpts, type PulseStyle, type Quiz, type QuizOption, type QuizPhase, type RadialSpectrumProps, type RayEndpoints, type RecordSceneSpecOpts, type Rect, type RenderCtx, type ResolvedSegment, type RevealEasing, type RevealProps, SCALE_INTERVALS, type SafeGuidesProps, type ScaleHighlightProps, type SceneSpec, type ScheduleTarget, type Score, type ScoreFromMusicXMLOpts, type ScoreNote, type ScrollCursorProps, type Section, type SectionMinimapProps, type SegmentAudio, type SegmentAudioCtx, type SegmentTransition, type SpecLayer, type SpectrumInput, type SpectrumProps, type StaffKeyboardRayProps, type StatCounterProps, type TempoMap, type TensionGraphProps, type TensionPoint, type TextureProps, type TimeAnchor, type TimelineSegment, type WaveformInput, type WaveformProps, activeChord, activeCue, activeSection, animatedSlot, applySchedule, applyToContext, assertGate, audioPlayheadLine, ballArc, ballX, beatGrid, beatPhase, beatPulseFactory, blackKeys, bpmOf, brandingFactory, buildScene, cameraForFollow, cameraTransform, chordRibbonFactory, circleOfFifthsDemoSpec, circleOfFifthsFactory, clamp, clickTrackSchedule, contourMinimapDemoSpec, contourPoints, contourPolyline, countInLeadSec, countInSchedule, countdownFactory, countdownRemaining, countdownSeconds, countingDegreeDemoSpec, countingTrackFactory, cropAroundBox, ctaFactory, cubicEaseInOut, cueOpacity, degreeLabel, degreeLabelsFactory, distinctMeasureIndices, distinctOnsets, dotAt, drawCaption, drawHighlight, droneSchedule, duckGainAt, easeIn, easeInOut, easeOut, endCardFactory, fallingKeyboardDemoScore, fallingKeyboardDemoSpec, fallingNotesFactory, firstMeasureBox, followBoxAt, followSrcBox, followWindowStart, fracSlotPoint, frameRect, fretboardFactory, functionColor, functionalHarmonyFactory, getKeyboardLayout, getLayerFactory, getNotationEngraving, harmonyDemoSpec, highlightIntensity, hookFactory, identityCamera, imageRevealFactory, inRange, intervalArcsFactory, invLerp, isBlackKey, karaokeCaptionFactory, kenBurns, keyCenterX, keyColumnWidth, keyRect, keySlot, keyboardFactory, keyboardLayout, kineticTextFactory, lerp, lerpBox, lerpCamera, linear, mapBoxThroughLayout, mcqCardFactory, mcqDemoSpec, measureColumnsFromLayout, measureCount, measureSpanBox, measureSpans, measureSystemMap, timeToX as minimapTimeToX, msPerBeat, notationFactory, notationLayout, noteColor, noteSetXRange, parseKey, parseTimeSig, particleBurstFactory, pcToSlot, pitchAt, pitchContourFactory, pitchRange, playheadLine, portraitFactory, progress01, progressRingFactory, projectPoint, promoCardsDemoSpec, pulseAt, quizPhase, radialSpectrumFactory, rayEndpoints, rayPointAt, recordSceneSpec, registerLayer, registeredKeys, resolveAnchor, resolveKeyboardLayout, resolveTimeline, revealFactory, revealProgress, runGate, safeGuidesFactory, scaleHighlightFactory, scoreFromMusicXML, scorePitchSpan, scrollCursorFactory, sectionMinimapFactory, setFollowLayoutProvider, setKeyboardLayout, setNotationEngraving, slotAngle, slotPc, slotPoint, spectrumFactory, staffAnchor, staffKeyboardRayFactory, staffRayDemoSpec, statCounterFactory, systemBox, tensionGraphFactory, textureFactory, transitionProgress, validateChordTrack, validateQuiz, validateSections, visualTimelineMs, vstackAudioPlayheadLine, vstackFollowBox, waveformFactory, whiteKeys, worldToViewport };
|
package/dist/scene/index.js
CHANGED
|
@@ -1318,7 +1318,7 @@ function fretboardLayer() {
|
|
|
1318
1318
|
for (const p of placement.values()) maxFret = Math.max(maxFret, p.fret);
|
|
1319
1319
|
visibleFrets = props.visibleFrets ?? Math.min(15, Math.max(5, maxFret + 1));
|
|
1320
1320
|
const sb = ctx.safeBox;
|
|
1321
|
-
const height = props.height ??
|
|
1321
|
+
const height = props.height ?? 360;
|
|
1322
1322
|
const bottomY = props.bottomY ?? sb.bottom;
|
|
1323
1323
|
rect = { x: sb.left, y: bottomY - height, w: sb.w, h: height };
|
|
1324
1324
|
},
|
|
@@ -4765,6 +4765,225 @@ var endCardFactory = {
|
|
|
4765
4765
|
}
|
|
4766
4766
|
};
|
|
4767
4767
|
|
|
4768
|
+
// src/scene/layers/imageReveal.ts
|
|
4769
|
+
function applyEasing(p, easing) {
|
|
4770
|
+
if (easing === "easeOut") return 1 - (1 - p) * (1 - p);
|
|
4771
|
+
if (easing === "easeOutStrong") return 1 - (1 - p) * (1 - p) * (1 - p);
|
|
4772
|
+
if (easing === "easeInOut") return p * p * (3 - 2 * p);
|
|
4773
|
+
return p;
|
|
4774
|
+
}
|
|
4775
|
+
var DEFAULTS11 = {
|
|
4776
|
+
mode: "pixelate",
|
|
4777
|
+
startMs: 0,
|
|
4778
|
+
durationMs: 6e3,
|
|
4779
|
+
difficulty: 0.5,
|
|
4780
|
+
easing: "linear"
|
|
4781
|
+
};
|
|
4782
|
+
function clamp017(x) {
|
|
4783
|
+
return x < 0 ? 0 : x > 1 ? 1 : x;
|
|
4784
|
+
}
|
|
4785
|
+
function fitRect(iW, iH, bx, by, bw, bh) {
|
|
4786
|
+
const scale = Math.min(bw / iW, bh / iH);
|
|
4787
|
+
const dw = iW * scale;
|
|
4788
|
+
const dh = iH * scale;
|
|
4789
|
+
return { dx: bx + (bw - dw) / 2, dy: by + (bh - dh) / 2, dw, dh };
|
|
4790
|
+
}
|
|
4791
|
+
function blockSizeAt(p, maxBlock) {
|
|
4792
|
+
return Math.max(1, Math.round(maxBlock * (1 - p) + 1 * p));
|
|
4793
|
+
}
|
|
4794
|
+
function tileHash(i) {
|
|
4795
|
+
let x = i * 2654435761 >>> 0;
|
|
4796
|
+
x ^= x << 13;
|
|
4797
|
+
x ^= x >>> 17;
|
|
4798
|
+
x ^= x << 5;
|
|
4799
|
+
return (x >>> 0) / 4294967295;
|
|
4800
|
+
}
|
|
4801
|
+
function tileHashSigned(i, salt) {
|
|
4802
|
+
return tileHash(i * 1013904223 + salt * 22695477 | 0) * 2 - 1;
|
|
4803
|
+
}
|
|
4804
|
+
function imageRevealLayer() {
|
|
4805
|
+
let mode = DEFAULTS11.mode;
|
|
4806
|
+
let startMs = DEFAULTS11.startMs;
|
|
4807
|
+
let durationMs = DEFAULTS11.durationMs;
|
|
4808
|
+
let difficulty = DEFAULTS11.difficulty;
|
|
4809
|
+
let easing = DEFAULTS11.easing;
|
|
4810
|
+
let image = null;
|
|
4811
|
+
let offscreen = null;
|
|
4812
|
+
let offCtx = null;
|
|
4813
|
+
let imgW = 0;
|
|
4814
|
+
let imgH = 0;
|
|
4815
|
+
function ensureOffscreen(w, h) {
|
|
4816
|
+
const needNew = !offscreen || offscreen.width !== w || offscreen.height !== h;
|
|
4817
|
+
if (needNew) {
|
|
4818
|
+
if (typeof OffscreenCanvas !== "undefined") {
|
|
4819
|
+
offscreen = new OffscreenCanvas(w, h);
|
|
4820
|
+
offCtx = offscreen.getContext("2d");
|
|
4821
|
+
} else {
|
|
4822
|
+
const el = typeof document !== "undefined" ? document.createElement("canvas") : null;
|
|
4823
|
+
if (!el) {
|
|
4824
|
+
offscreen = null;
|
|
4825
|
+
offCtx = null;
|
|
4826
|
+
return null;
|
|
4827
|
+
}
|
|
4828
|
+
el.width = w;
|
|
4829
|
+
el.height = h;
|
|
4830
|
+
offscreen = el;
|
|
4831
|
+
offCtx = el.getContext("2d");
|
|
4832
|
+
}
|
|
4833
|
+
}
|
|
4834
|
+
return offCtx;
|
|
4835
|
+
}
|
|
4836
|
+
return {
|
|
4837
|
+
key: "image-reveal",
|
|
4838
|
+
init(_ctx, props) {
|
|
4839
|
+
mode = props.mode ?? DEFAULTS11.mode;
|
|
4840
|
+
startMs = props.startMs ?? DEFAULTS11.startMs;
|
|
4841
|
+
durationMs = props.durationMs ?? DEFAULTS11.durationMs;
|
|
4842
|
+
difficulty = props.difficulty ?? DEFAULTS11.difficulty;
|
|
4843
|
+
easing = props.easing ?? DEFAULTS11.easing;
|
|
4844
|
+
image = props.image;
|
|
4845
|
+
const src = props.image;
|
|
4846
|
+
imgW = src["naturalWidth"] ?? src["displayWidth"] ?? src["width"] ?? 0;
|
|
4847
|
+
imgH = src["naturalHeight"] ?? src["displayHeight"] ?? src["height"] ?? 0;
|
|
4848
|
+
},
|
|
4849
|
+
draw(ctx, tMs) {
|
|
4850
|
+
if (!image || imgW === 0 || imgH === 0) return;
|
|
4851
|
+
const raw = clamp017((tMs - startMs) / (durationMs > 0 ? durationMs : 1));
|
|
4852
|
+
const p = applyEasing(raw, easing);
|
|
4853
|
+
const sb = ctx.safeBox;
|
|
4854
|
+
const fit = fitRect(imgW, imgH, sb.left, sb.top, sb.w, sb.h);
|
|
4855
|
+
const c = ctx.ctx2d;
|
|
4856
|
+
c.save();
|
|
4857
|
+
c.beginPath();
|
|
4858
|
+
c.rect(fit.dx, fit.dy, fit.dw, fit.dh);
|
|
4859
|
+
c.clip();
|
|
4860
|
+
if (mode === "pixelate") {
|
|
4861
|
+
drawPixelate(c, image, fit, p, difficulty, imgW, imgH, ensureOffscreen);
|
|
4862
|
+
} else if (mode === "blur") {
|
|
4863
|
+
drawBlur(c, image, fit, p, difficulty, imgW, imgH, ensureOffscreen);
|
|
4864
|
+
} else {
|
|
4865
|
+
drawShuffle(c, image, fit, p, difficulty, imgW, imgH);
|
|
4866
|
+
}
|
|
4867
|
+
c.restore();
|
|
4868
|
+
},
|
|
4869
|
+
dispose() {
|
|
4870
|
+
image = null;
|
|
4871
|
+
offscreen = null;
|
|
4872
|
+
offCtx = null;
|
|
4873
|
+
}
|
|
4874
|
+
};
|
|
4875
|
+
}
|
|
4876
|
+
function drawPixelate(c, image, fit, p, difficulty, imgW, imgH, getOffCtx) {
|
|
4877
|
+
const maxBlock = Math.max(2, Math.round(fit.dw * (0.03125 + difficulty * 0.21875)));
|
|
4878
|
+
const blockSize = blockSizeAt(p, maxBlock);
|
|
4879
|
+
if (blockSize <= 1) {
|
|
4880
|
+
c.drawImage(image, 0, 0, imgW, imgH, fit.dx, fit.dy, fit.dw, fit.dh);
|
|
4881
|
+
return;
|
|
4882
|
+
}
|
|
4883
|
+
const smallW = Math.max(1, Math.ceil(fit.dw / blockSize));
|
|
4884
|
+
const smallH = Math.max(1, Math.ceil(fit.dh / blockSize));
|
|
4885
|
+
const oc = getOffCtx(smallW, smallH);
|
|
4886
|
+
if (!oc) {
|
|
4887
|
+
c.drawImage(image, 0, 0, imgW, imgH, fit.dx, fit.dy, fit.dw, fit.dh);
|
|
4888
|
+
return;
|
|
4889
|
+
}
|
|
4890
|
+
oc.clearRect(0, 0, smallW, smallH);
|
|
4891
|
+
oc.drawImage(image, 0, 0, imgW, imgH, 0, 0, smallW, smallH);
|
|
4892
|
+
const prev = c.imageSmoothingEnabled;
|
|
4893
|
+
c.imageSmoothingEnabled = false;
|
|
4894
|
+
const off = oc.canvas;
|
|
4895
|
+
c.drawImage(off, 0, 0, smallW, smallH, fit.dx, fit.dy, fit.dw, fit.dh);
|
|
4896
|
+
c.imageSmoothingEnabled = prev;
|
|
4897
|
+
}
|
|
4898
|
+
function drawBlur(c, image, fit, p, difficulty, imgW, imgH, getOffCtx) {
|
|
4899
|
+
const maxBlur = 8 + difficulty * 72;
|
|
4900
|
+
const blurPx = maxBlur * (1 - p);
|
|
4901
|
+
const cAny = c;
|
|
4902
|
+
const hasFilter = "filter" in c && cAny["filter"] !== void 0;
|
|
4903
|
+
if (hasFilter && blurPx > 0) {
|
|
4904
|
+
const prev = cAny["filter"];
|
|
4905
|
+
cAny["filter"] = `blur(${blurPx.toFixed(1)}px)`;
|
|
4906
|
+
c.drawImage(image, 0, 0, imgW, imgH, fit.dx, fit.dy, fit.dw, fit.dh);
|
|
4907
|
+
cAny["filter"] = prev ?? "none";
|
|
4908
|
+
} else if (blurPx > 0) {
|
|
4909
|
+
const passes = Math.min(6, Math.round(blurPx / 8));
|
|
4910
|
+
if (passes > 0) {
|
|
4911
|
+
let w = Math.max(1, Math.round(fit.dw / Math.pow(2, passes)));
|
|
4912
|
+
let h = Math.max(1, Math.round(fit.dh / Math.pow(2, passes)));
|
|
4913
|
+
const oc = getOffCtx(w, h);
|
|
4914
|
+
if (oc) {
|
|
4915
|
+
oc.clearRect(0, 0, w, h);
|
|
4916
|
+
oc.drawImage(image, 0, 0, imgW, imgH, 0, 0, w, h);
|
|
4917
|
+
c.drawImage(oc.canvas, 0, 0, w, h, fit.dx, fit.dy, fit.dw, fit.dh);
|
|
4918
|
+
} else {
|
|
4919
|
+
c.drawImage(image, 0, 0, imgW, imgH, fit.dx, fit.dy, fit.dw, fit.dh);
|
|
4920
|
+
}
|
|
4921
|
+
} else {
|
|
4922
|
+
c.drawImage(image, 0, 0, imgW, imgH, fit.dx, fit.dy, fit.dw, fit.dh);
|
|
4923
|
+
}
|
|
4924
|
+
} else {
|
|
4925
|
+
c.drawImage(image, 0, 0, imgW, imgH, fit.dx, fit.dy, fit.dw, fit.dh);
|
|
4926
|
+
}
|
|
4927
|
+
}
|
|
4928
|
+
function drawShuffle(c, image, fit, p, difficulty, imgW, imgH) {
|
|
4929
|
+
const cols = 8;
|
|
4930
|
+
const rows = 14;
|
|
4931
|
+
const tileW = fit.dw / cols;
|
|
4932
|
+
const tileH = fit.dh / rows;
|
|
4933
|
+
const srcTileW = imgW / cols;
|
|
4934
|
+
const srcTileH = imgH / rows;
|
|
4935
|
+
const maxOffX = tileW * difficulty * 1.5;
|
|
4936
|
+
const maxOffY = tileH * difficulty * 1.5;
|
|
4937
|
+
const ease = 1 - (1 - p) * (1 - p);
|
|
4938
|
+
for (let row = 0; row < rows; row++) {
|
|
4939
|
+
for (let col = 0; col < cols; col++) {
|
|
4940
|
+
const i = row * cols + col;
|
|
4941
|
+
const offX = tileHashSigned(i, 0) * maxOffX * (1 - ease);
|
|
4942
|
+
const offY = tileHashSigned(i, 1) * maxOffY * (1 - ease);
|
|
4943
|
+
const sx = col * srcTileW;
|
|
4944
|
+
const sy = row * srcTileH;
|
|
4945
|
+
const dxHome = fit.dx + col * tileW;
|
|
4946
|
+
const dyHome = fit.dy + row * tileH;
|
|
4947
|
+
const dx = dxHome + offX;
|
|
4948
|
+
const dy = dyHome + offY;
|
|
4949
|
+
c.drawImage(
|
|
4950
|
+
image,
|
|
4951
|
+
sx,
|
|
4952
|
+
sy,
|
|
4953
|
+
srcTileW,
|
|
4954
|
+
srcTileH,
|
|
4955
|
+
dx,
|
|
4956
|
+
dy,
|
|
4957
|
+
tileW,
|
|
4958
|
+
tileH
|
|
4959
|
+
);
|
|
4960
|
+
}
|
|
4961
|
+
}
|
|
4962
|
+
}
|
|
4963
|
+
var VALID_MODES = ["pixelate", "shuffle", "blur"];
|
|
4964
|
+
var VALID_EASINGS = ["linear", "easeOut", "easeOutStrong", "easeInOut"];
|
|
4965
|
+
var imageRevealFactory = {
|
|
4966
|
+
key: "image-reveal",
|
|
4967
|
+
create: imageRevealLayer,
|
|
4968
|
+
validateProps(props) {
|
|
4969
|
+
if (props == null || typeof props !== "object") return ["image-reveal: props must be an object"];
|
|
4970
|
+
const p = props;
|
|
4971
|
+
const errs = [];
|
|
4972
|
+
if (p["image"] == null) errs.push("image-reveal.image is required");
|
|
4973
|
+
if (p["mode"] != null && !VALID_MODES.includes(p["mode"]))
|
|
4974
|
+
errs.push(`image-reveal.mode must be one of: ${VALID_MODES.join(", ")}`);
|
|
4975
|
+
if (p["startMs"] != null && typeof p["startMs"] !== "number")
|
|
4976
|
+
errs.push("image-reveal.startMs must be a number");
|
|
4977
|
+
if (p["durationMs"] != null && (typeof p["durationMs"] !== "number" || p["durationMs"] <= 0))
|
|
4978
|
+
errs.push("image-reveal.durationMs must be a positive number");
|
|
4979
|
+
if (p["difficulty"] != null && (typeof p["difficulty"] !== "number" || p["difficulty"] < 0 || p["difficulty"] > 1))
|
|
4980
|
+
errs.push("image-reveal.difficulty must be a number in [0, 1]");
|
|
4981
|
+
if (p["easing"] != null && !VALID_EASINGS.includes(p["easing"]))
|
|
4982
|
+
errs.push(`image-reveal.easing must be one of: ${VALID_EASINGS.join(", ")}`);
|
|
4983
|
+
return errs;
|
|
4984
|
+
}
|
|
4985
|
+
};
|
|
4986
|
+
|
|
4768
4987
|
// src/scene/registry.ts
|
|
4769
4988
|
var REGISTRY = /* @__PURE__ */ new Map();
|
|
4770
4989
|
function registerLayer(factory) {
|
|
@@ -4813,6 +5032,7 @@ registerLayer(tensionGraphFactory);
|
|
|
4813
5032
|
registerLayer(textureFactory);
|
|
4814
5033
|
registerLayer(statCounterFactory);
|
|
4815
5034
|
registerLayer(endCardFactory);
|
|
5035
|
+
registerLayer(imageRevealFactory);
|
|
4816
5036
|
|
|
4817
5037
|
// src/scene/audioLayers.ts
|
|
4818
5038
|
function countInSchedule(opts) {
|
|
@@ -5633,6 +5853,7 @@ export {
|
|
|
5633
5853
|
highlightIntensity,
|
|
5634
5854
|
hookFactory,
|
|
5635
5855
|
identityCamera,
|
|
5856
|
+
imageRevealFactory,
|
|
5636
5857
|
inRange,
|
|
5637
5858
|
intervalArcsFactory,
|
|
5638
5859
|
invLerp,
|