@3driseai/3drise-viewer 0.1.24 → 0.1.26
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/animationsV2/ClipPlayer.d.ts +13 -0
- package/dist/animationsV2/ClipPlayer.d.ts.map +1 -0
- package/dist/animationsV2/ClipPlayer.js +140 -0
- package/dist/animationsV2/ClipsRuntime.d.ts +111 -0
- package/dist/animationsV2/ClipsRuntime.d.ts.map +1 -0
- package/dist/animationsV2/ClipsRuntime.js +476 -0
- package/dist/animationsV2/appliers.d.ts +16 -0
- package/dist/animationsV2/appliers.d.ts.map +1 -0
- package/dist/animationsV2/appliers.js +204 -0
- package/dist/animationsV2/clipUtils.d.ts +33 -0
- package/dist/animationsV2/clipUtils.d.ts.map +1 -0
- package/dist/animationsV2/clipUtils.js +164 -0
- package/dist/animationsV2/elementSettings.d.ts +15 -0
- package/dist/animationsV2/elementSettings.d.ts.map +1 -0
- package/dist/animationsV2/elementSettings.js +16 -0
- package/dist/animationsV2/index.d.ts +16 -0
- package/dist/animationsV2/index.d.ts.map +1 -0
- package/dist/animationsV2/index.js +12 -0
- package/dist/animationsV2/nodeTracks.d.ts +13 -0
- package/dist/animationsV2/nodeTracks.d.ts.map +1 -0
- package/dist/animationsV2/nodeTracks.js +165 -0
- package/dist/animationsV2/normalize.d.ts +4 -0
- package/dist/animationsV2/normalize.d.ts.map +1 -0
- package/dist/animationsV2/normalize.js +49 -0
- package/dist/animationsV2/sequenceUtils.d.ts +57 -0
- package/dist/animationsV2/sequenceUtils.d.ts.map +1 -0
- package/dist/animationsV2/sequenceUtils.js +120 -0
- package/dist/animationsV2/types.d.ts +95 -0
- package/dist/animationsV2/types.d.ts.map +1 -0
- package/dist/animationsV2/types.js +8 -0
- package/dist/api/sceneHandle.d.ts +102 -0
- package/dist/api/sceneHandle.d.ts.map +1 -0
- package/dist/api/sceneHandle.js +237 -0
- package/dist/components/CameraController.d.ts.map +1 -1
- package/dist/components/CameraController.js +3 -44
- package/dist/components/Clouds.d.ts.map +1 -1
- package/dist/components/Clouds.js +0 -34
- package/dist/components/CreatedObject.d.ts.map +1 -1
- package/dist/components/CreatedObject.js +19 -1
- package/dist/components/EnvironmentManager.d.ts.map +1 -1
- package/dist/components/EnvironmentManager.js +6 -4
- package/dist/components/ObjectNode.d.ts.map +1 -1
- package/dist/components/ObjectNode.js +5 -1
- package/dist/components/ObjectsRenderer.d.ts +5 -1
- package/dist/components/ObjectsRenderer.d.ts.map +1 -1
- package/dist/components/ObjectsRenderer.js +24 -3
- package/dist/components/Ocean.d.ts.map +1 -1
- package/dist/components/Ocean.js +0 -63
- package/dist/components/ProjectLoader.d.ts +9 -3
- package/dist/components/ProjectLoader.d.ts.map +1 -1
- package/dist/components/ProjectLoader.js +5 -4
- package/dist/components/SceneBuilder.d.ts +9 -1
- package/dist/components/SceneBuilder.d.ts.map +1 -1
- package/dist/components/SceneBuilder.js +30 -5
- package/dist/components/SkyController.d.ts.map +1 -1
- package/dist/components/SkyController.js +0 -39
- package/dist/components/Stars.d.ts.map +1 -1
- package/dist/components/Stars.js +3 -46
- package/dist/components/terrain/TerrainSurface.d.ts.map +1 -1
- package/dist/components/terrain/TerrainSurface.js +0 -5
- package/dist/components/volumetricClouds/VolumetricCloudsPass.d.ts.map +1 -1
- package/dist/components/volumetricClouds/VolumetricCloudsPass.js +0 -6
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/useInteraction.d.ts +7 -7
- package/dist/hooks/useInteraction.d.ts.map +1 -1
- package/dist/hooks/useInteraction.js +87 -233
- package/dist/hooks/useLightConfig.d.ts.map +1 -1
- package/dist/hooks/useLightConfig.js +7 -0
- package/dist/hooks/useLightLive.d.ts.map +1 -1
- package/dist/hooks/useLightLive.js +2 -0
- package/dist/hooks/useLightTargets.d.ts +7 -0
- package/dist/hooks/useLightTargets.d.ts.map +1 -0
- package/dist/hooks/useLightTargets.js +132 -0
- package/dist/hooks/useObjectAnimation.d.ts.map +1 -1
- package/dist/hooks/useObjectAnimation.js +0 -2
- package/dist/hooks/useOceanMaterial.d.ts.map +1 -1
- package/dist/hooks/useOceanMaterial.js +0 -5
- package/dist/hooks/useRuntimeSettings.d.ts +15 -0
- package/dist/hooks/useRuntimeSettings.d.ts.map +1 -0
- package/dist/hooks/useRuntimeSettings.js +22 -0
- package/dist/hooks/useSequenceAnimation.d.ts.map +1 -1
- package/dist/hooks/useSequenceAnimation.js +27 -9
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/interactions/index.d.ts +3 -0
- package/dist/interactions/index.d.ts.map +1 -0
- package/dist/interactions/index.js +1 -0
- package/dist/interactions/runner.d.ts +9 -0
- package/dist/interactions/runner.d.ts.map +1 -0
- package/dist/interactions/runner.js +23 -0
- package/dist/operations/catalogue/displayImage.d.ts +3 -0
- package/dist/operations/catalogue/displayImage.d.ts.map +1 -0
- package/dist/operations/catalogue/displayImage.js +39 -0
- package/dist/operations/catalogue/fade.d.ts +3 -0
- package/dist/operations/catalogue/fade.d.ts.map +1 -0
- package/dist/operations/catalogue/fade.js +44 -0
- package/dist/operations/catalogue/focus.d.ts +3 -0
- package/dist/operations/catalogue/focus.d.ts.map +1 -0
- package/dist/operations/catalogue/focus.js +22 -0
- package/dist/operations/catalogue/glow.d.ts +3 -0
- package/dist/operations/catalogue/glow.d.ts.map +1 -0
- package/dist/operations/catalogue/glow.js +49 -0
- package/dist/operations/catalogue/materialFx.d.ts +6 -0
- package/dist/operations/catalogue/materialFx.d.ts.map +1 -0
- package/dist/operations/catalogue/materialFx.js +13 -0
- package/dist/operations/catalogue/moveToFront.d.ts +3 -0
- package/dist/operations/catalogue/moveToFront.d.ts.map +1 -0
- package/dist/operations/catalogue/moveToFront.js +25 -0
- package/dist/operations/catalogue/visibility.d.ts +3 -0
- package/dist/operations/catalogue/visibility.d.ts.map +1 -0
- package/dist/operations/catalogue/visibility.js +24 -0
- package/dist/operations/catalogue/zoom.d.ts +3 -0
- package/dist/operations/catalogue/zoom.d.ts.map +1 -0
- package/dist/operations/catalogue/zoom.js +32 -0
- package/dist/operations/index.d.ts +5 -0
- package/dist/operations/index.d.ts.map +1 -0
- package/dist/operations/index.js +4 -0
- package/dist/operations/registry.d.ts +11 -0
- package/dist/operations/registry.d.ts.map +1 -0
- package/dist/operations/registry.js +21 -0
- package/dist/operations/runtime.d.ts +22 -0
- package/dist/operations/runtime.d.ts.map +1 -0
- package/dist/operations/runtime.js +161 -0
- package/dist/operations/types.d.ts +96 -0
- package/dist/operations/types.d.ts.map +1 -0
- package/dist/operations/types.js +3 -0
- package/dist/operations/useOperationsRuntime.d.ts +3 -0
- package/dist/operations/useOperationsRuntime.d.ts.map +1 -0
- package/dist/operations/useOperationsRuntime.js +31 -0
- package/package.json +2 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AnimationClip, AnimationSequence } from './types';
|
|
3
|
+
export interface ClipPlayerProps {
|
|
4
|
+
getSettings: (state: string) => any;
|
|
5
|
+
/** Start the sequences flagged `autoplay` (published viewer). The studio leaves this off. */
|
|
6
|
+
autoplay?: {
|
|
7
|
+
sequences: AnimationSequence[];
|
|
8
|
+
clips: AnimationClip[];
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
declare const ClipPlayer: React.FC<ClipPlayerProps>;
|
|
12
|
+
export default ClipPlayer;
|
|
13
|
+
//# sourceMappingURL=ClipPlayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClipPlayer.d.ts","sourceRoot":"","sources":["../../src/animationsV2/ClipPlayer.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAIjD,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEhE,MAAM,WAAW,eAAe;IAC5B,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAC;IACpC,6FAA6F;IAC7F,QAAQ,CAAC,EAAE;QAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;QAAC,KAAK,EAAE,aAAa,EAAE,CAAA;KAAE,CAAC;CACzE;AAMD,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAwGzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// ClipPlayer — drives ClipsRuntime from the R3F frame loop, and feeds it input.
|
|
3
|
+
// =============================================================================
|
|
4
|
+
//
|
|
5
|
+
// Mount inside the Canvas AFTER the objects and the environment: R3F runs
|
|
6
|
+
// same-priority frame callbacks in subscription order, so clips write after the
|
|
7
|
+
// objects' own per-frame animation. Priority stays 0 — a positive priority would
|
|
8
|
+
// take rendering over from R3F (see CLAUDE.md on the cloud pass).
|
|
9
|
+
//
|
|
10
|
+
// `getSettings(state)` returns an element's authored settings (action patches
|
|
11
|
+
// included) — the value a stopped track restores. The studio reads it from Redux,
|
|
12
|
+
// the published viewer from the loaded project (resolveElementSettings).
|
|
13
|
+
//
|
|
14
|
+
// Input drivers (sequence.driver):
|
|
15
|
+
// mouseX / mouseY the pointer's position over the canvas is the progress (0–1).
|
|
16
|
+
// mouseWheel the wheel moves the progress (sensitivity); touch: vertical drag.
|
|
17
|
+
// While one runs, OrbitControls zoom is off. At either end the wheel
|
|
18
|
+
// is let through, so the host page can scroll on.
|
|
19
|
+
// Listeners sit on window and check the canvas rect: studio overlays above the
|
|
20
|
+
// canvas would otherwise swallow the events.
|
|
21
|
+
//
|
|
22
|
+
// `autoplay` (published viewer): sequences flagged autoplay start once, on mount.
|
|
23
|
+
//
|
|
24
|
+
import { useEffect, useRef } from 'react';
|
|
25
|
+
import { useFrame, useThree } from '@react-three/fiber';
|
|
26
|
+
import ClipsRuntime from './ClipsRuntime.js';
|
|
27
|
+
import { clipMap } from './sequenceUtils.js';
|
|
28
|
+
/** Wheel delta in pixels, whatever the device reports. */
|
|
29
|
+
const wheelPixels = (e) => e.deltaMode === 1 ? e.deltaY * 16 : e.deltaMode === 2 ? e.deltaY * window.innerHeight : e.deltaY;
|
|
30
|
+
const ClipPlayer = ({ getSettings, autoplay }) => {
|
|
31
|
+
const camera = useThree((s) => s.camera);
|
|
32
|
+
const controls = useThree((s) => s.controls);
|
|
33
|
+
const gl = useThree((s) => s.gl);
|
|
34
|
+
// Read at restore time through a ref, so the context object stays stable.
|
|
35
|
+
const settingsRef = useRef(getSettings);
|
|
36
|
+
settingsRef.current = getSettings;
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
ClipsRuntime.setContext({ camera, controls, getSettings: (state) => settingsRef.current(state) });
|
|
39
|
+
return () => ClipsRuntime.setContext(null);
|
|
40
|
+
}, [camera, controls]);
|
|
41
|
+
// --- autoplay (once per sequence id) -------------------------------------------
|
|
42
|
+
const autoplayed = useRef(new Set());
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (!autoplay)
|
|
45
|
+
return;
|
|
46
|
+
const lookup = clipMap(autoplay.clips);
|
|
47
|
+
for (const seq of autoplay.sequences) {
|
|
48
|
+
if (!seq.autoplay || autoplayed.current.has(seq.id))
|
|
49
|
+
continue;
|
|
50
|
+
autoplayed.current.add(seq.id);
|
|
51
|
+
ClipsRuntime.playSequence(seq, lookup);
|
|
52
|
+
}
|
|
53
|
+
}, [autoplay?.sequences, autoplay?.clips]);
|
|
54
|
+
// --- input drivers ----------------------------------------------------------------
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
const canvas = gl.domElement;
|
|
57
|
+
const inside = (x, y) => {
|
|
58
|
+
const r = canvas.getBoundingClientRect();
|
|
59
|
+
return x >= r.left && x <= r.right && y >= r.top && y <= r.bottom ? r : null;
|
|
60
|
+
};
|
|
61
|
+
/** Progress along the wheel-driven sequences; true when any of them moved. */
|
|
62
|
+
const nudgeWheel = (pixels) => {
|
|
63
|
+
let moved = false;
|
|
64
|
+
for (const d of ClipsRuntime.getDrivenSequences()) {
|
|
65
|
+
if (d.driver !== 'mouseWheel')
|
|
66
|
+
continue;
|
|
67
|
+
const dir = d.settings?.invert ? -1 : 1;
|
|
68
|
+
const delta = pixels * dir * Math.max(0.01, d.settings?.sensitivity ?? 1) / 1000;
|
|
69
|
+
if (ClipsRuntime.nudgeSequenceProgress(d.id, delta))
|
|
70
|
+
moved = true;
|
|
71
|
+
}
|
|
72
|
+
return moved;
|
|
73
|
+
};
|
|
74
|
+
let touchY = null;
|
|
75
|
+
const onPointerMove = (e) => {
|
|
76
|
+
const r = inside(e.clientX, e.clientY);
|
|
77
|
+
if (!r)
|
|
78
|
+
return;
|
|
79
|
+
for (const d of ClipsRuntime.getDrivenSequences()) {
|
|
80
|
+
if (d.driver !== 'mouseX' && d.driver !== 'mouseY')
|
|
81
|
+
continue;
|
|
82
|
+
const raw = d.driver === 'mouseX' ? (e.clientX - r.left) / r.width : (e.clientY - r.top) / r.height;
|
|
83
|
+
ClipsRuntime.setSequenceProgress(d.id, d.settings?.invert ? 1 - raw : raw);
|
|
84
|
+
}
|
|
85
|
+
// Touch has no wheel: a vertical drag stands in for it (drag up = forward).
|
|
86
|
+
if (e.pointerType === 'touch' && touchY !== null) {
|
|
87
|
+
nudgeWheel(touchY - e.clientY);
|
|
88
|
+
touchY = e.clientY;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const onPointerDown = (e) => {
|
|
92
|
+
if (e.pointerType === 'touch' && inside(e.clientX, e.clientY))
|
|
93
|
+
touchY = e.clientY;
|
|
94
|
+
};
|
|
95
|
+
const onPointerUp = () => { touchY = null; };
|
|
96
|
+
const onWheel = (e) => {
|
|
97
|
+
if (!inside(e.clientX, e.clientY))
|
|
98
|
+
return;
|
|
99
|
+
// Only swallow the wheel while it moved something; at either end the page scrolls.
|
|
100
|
+
if (nudgeWheel(wheelPixels(e)))
|
|
101
|
+
e.preventDefault();
|
|
102
|
+
};
|
|
103
|
+
window.addEventListener('pointermove', onPointerMove);
|
|
104
|
+
window.addEventListener('pointerdown', onPointerDown);
|
|
105
|
+
window.addEventListener('pointerup', onPointerUp);
|
|
106
|
+
window.addEventListener('pointercancel', onPointerUp);
|
|
107
|
+
window.addEventListener('wheel', onWheel, { passive: false });
|
|
108
|
+
return () => {
|
|
109
|
+
window.removeEventListener('pointermove', onPointerMove);
|
|
110
|
+
window.removeEventListener('pointerdown', onPointerDown);
|
|
111
|
+
window.removeEventListener('pointerup', onPointerUp);
|
|
112
|
+
window.removeEventListener('pointercancel', onPointerUp);
|
|
113
|
+
window.removeEventListener('wheel', onWheel);
|
|
114
|
+
};
|
|
115
|
+
}, [gl]);
|
|
116
|
+
// --- zoom: OrbitControls must not zoom while the wheel drives a sequence -----------
|
|
117
|
+
const zoomRestore = useRef(null);
|
|
118
|
+
useEffect(() => () => {
|
|
119
|
+
const z = zoomRestore.current;
|
|
120
|
+
if (z?.controls)
|
|
121
|
+
z.controls.enableZoom = z.enableZoom;
|
|
122
|
+
zoomRestore.current = null;
|
|
123
|
+
}, []);
|
|
124
|
+
useFrame((_state, delta) => {
|
|
125
|
+
ClipsRuntime.tick(delta);
|
|
126
|
+
const wheelActive = ClipsRuntime.getDrivenSequences().some(d => d.driver === 'mouseWheel');
|
|
127
|
+
const z = zoomRestore.current;
|
|
128
|
+
if (wheelActive && controls && !z) {
|
|
129
|
+
zoomRestore.current = { controls, enableZoom: controls.enableZoom !== false };
|
|
130
|
+
controls.enableZoom = false;
|
|
131
|
+
}
|
|
132
|
+
else if ((!wheelActive || z?.controls !== controls) && z) {
|
|
133
|
+
if (z.controls)
|
|
134
|
+
z.controls.enableZoom = z.enableZoom;
|
|
135
|
+
zoomRestore.current = null;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
return null;
|
|
139
|
+
};
|
|
140
|
+
export default ClipPlayer;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { AnimationClip, AnimationSequence, KeyValue, Track } from './types';
|
|
2
|
+
import { type ApplyContext } from './appliers';
|
|
3
|
+
import { type ClipLookup, type ScheduledClip } from './sequenceUtils';
|
|
4
|
+
/** A driven sequence as the input layer sees it. */
|
|
5
|
+
export interface DrivenSequence {
|
|
6
|
+
id: string;
|
|
7
|
+
driver: AnimationSequence['driver'];
|
|
8
|
+
settings: AnimationSequence['driverSettings'];
|
|
9
|
+
/** 0–1 along the sequence's own direction (reverse flips it). */
|
|
10
|
+
progress: number;
|
|
11
|
+
}
|
|
12
|
+
export type RuntimeEventType = 'start' | 'end' | 'loop';
|
|
13
|
+
export interface RuntimeEvent {
|
|
14
|
+
type: RuntimeEventType;
|
|
15
|
+
kind: 'clip' | 'sequence';
|
|
16
|
+
id: string;
|
|
17
|
+
}
|
|
18
|
+
/** @deprecated name kept for existing imports */
|
|
19
|
+
export type ClipEvent = RuntimeEvent;
|
|
20
|
+
declare class ClipsRuntime {
|
|
21
|
+
private clips;
|
|
22
|
+
private sequences;
|
|
23
|
+
private ctx;
|
|
24
|
+
private order;
|
|
25
|
+
private version;
|
|
26
|
+
private listeners;
|
|
27
|
+
private eventListeners;
|
|
28
|
+
/** tracks whose authored value must be written back on the next tick */
|
|
29
|
+
private pendingRestore;
|
|
30
|
+
/** last written value per property (targetKey -> JSON) */
|
|
31
|
+
private written;
|
|
32
|
+
setContext(ctx: ApplyContext | null): void;
|
|
33
|
+
subscribe(listener: () => void): () => void;
|
|
34
|
+
getVersion(): number;
|
|
35
|
+
on(listener: (e: RuntimeEvent) => void): () => void;
|
|
36
|
+
play(clip: AnimationClip, opts?: {
|
|
37
|
+
from?: number;
|
|
38
|
+
speed?: number;
|
|
39
|
+
reverse?: boolean;
|
|
40
|
+
}): void;
|
|
41
|
+
pause(clipId: string): void;
|
|
42
|
+
resume(clipId: string): void;
|
|
43
|
+
/** Stop and put the clip's properties back to their authored values. */
|
|
44
|
+
stop(clipId: string): void;
|
|
45
|
+
/** Hold the clip at t (seconds) — the editor playhead, or seek() from outside. */
|
|
46
|
+
pose(clip: AnimationClip, t: number): void;
|
|
47
|
+
/** The clip data changed (editor edit): keep time and play state, use the new tracks. */
|
|
48
|
+
updateClip(clip: AnimationClip): void;
|
|
49
|
+
getTime(clipId: string): number;
|
|
50
|
+
isPlaying(clipId: string): boolean;
|
|
51
|
+
isActive(clipId: string): boolean;
|
|
52
|
+
/** Value of a track at the clip's current time (the panel's value column). */
|
|
53
|
+
sampleAt(clip: AnimationClip, track: Track): KeyValue | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Play a sequence. `reverse` defaults to the sequence's own; `from` is sequence
|
|
56
|
+
* seconds (defaults to the current time, or the start edge of the run).
|
|
57
|
+
*/
|
|
58
|
+
playSequence(seq: AnimationSequence, clips: ClipLookup, opts?: {
|
|
59
|
+
from?: number;
|
|
60
|
+
speed?: number;
|
|
61
|
+
reverse?: boolean;
|
|
62
|
+
}): void;
|
|
63
|
+
/** Driven sequences that are running — what the input layer (ClipPlayer) feeds. */
|
|
64
|
+
getDrivenSequences(): DrivenSequence[];
|
|
65
|
+
/**
|
|
66
|
+
* Set a sequence's position, 0–1 along its own direction (reverse flips it). A
|
|
67
|
+
* driven sequence eases there (its smoothing); any other is posed there at once.
|
|
68
|
+
*/
|
|
69
|
+
setSequenceProgress(seqId: string, progress: number): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Move a driven sequence's target by `delta` of its length (the wheel). Returns
|
|
72
|
+
* false when it is already at that end — the caller then lets the event through
|
|
73
|
+
* (page scroll), so a visitor is never trapped inside the canvas.
|
|
74
|
+
*/
|
|
75
|
+
nudgeSequenceProgress(seqId: string, delta: number): boolean;
|
|
76
|
+
getSequenceProgress(seqId: string): number;
|
|
77
|
+
private progressOf;
|
|
78
|
+
private timeOf;
|
|
79
|
+
pauseSequence(seqId: string): void;
|
|
80
|
+
resumeSequence(seqId: string): void;
|
|
81
|
+
/** Stop and put every property the sequence drove back to its authored value. */
|
|
82
|
+
stopSequence(seqId: string): void;
|
|
83
|
+
/** Hold the sequence at T (sequence seconds) — the panel's scrub, or seek(). */
|
|
84
|
+
poseSequence(seq: AnimationSequence, clips: ClipLookup, T: number): void;
|
|
85
|
+
/** The sequence or one of its clips changed: re-resolve, keep time and play state. */
|
|
86
|
+
updateSequence(seq: AnimationSequence, clips: ClipLookup): void;
|
|
87
|
+
getSequenceTime(seqId: string): number;
|
|
88
|
+
getSequenceDuration(seqId: string): number;
|
|
89
|
+
isSequencePlaying(seqId: string): boolean;
|
|
90
|
+
isSequenceActive(seqId: string): boolean;
|
|
91
|
+
tick(delta: number): void;
|
|
92
|
+
/** Every driver's values for this frame, lowest priority first. */
|
|
93
|
+
private proposals;
|
|
94
|
+
private runRestores;
|
|
95
|
+
/** Whether any active driver still has a track on (state, node, path). */
|
|
96
|
+
private isDriven;
|
|
97
|
+
private advanceClip;
|
|
98
|
+
private finishClip;
|
|
99
|
+
/**
|
|
100
|
+
* Same edge rules as a clip, on the sequence clock. "Forward" is the run's base
|
|
101
|
+
* direction: a reversed run starts at the end and finishes at 0.
|
|
102
|
+
*/
|
|
103
|
+
private advanceSequence;
|
|
104
|
+
private finishSequence;
|
|
105
|
+
private emit;
|
|
106
|
+
private bump;
|
|
107
|
+
}
|
|
108
|
+
export type { ScheduledClip };
|
|
109
|
+
declare const clipsRuntime: ClipsRuntime;
|
|
110
|
+
export default clipsRuntime;
|
|
111
|
+
//# sourceMappingURL=ClipsRuntime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClipsRuntime.d.ts","sourceRoot":"","sources":["../../src/animationsV2/ClipsRuntime.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEjF,OAAO,EAAkC,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/E,OAAO,EAEL,KAAK,UAAU,EAAE,KAAK,aAAa,EACpC,MAAM,iBA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