MCPcopy
hub / github.com/midrender/revideo / mockScene2D

Function mockScene2D

packages/2d/src/lib/components/__tests__/mockScene2D.ts:22–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20 * Due to js-dom limitations, layouts are not correctly computed.
21 */
22export function mockScene2D() {
23 const playback = new PlaybackManager();
24 const status = new PlaybackStatus(playback);
25 const description = {
26 ...makeScene2D('scene 1', function* () {
27 // do nothing
28 }),
29 name: 'test',
30 size: new Vector2(1920, 1080),
31 resolutionScale: 1,
32 playback: status,
33 } as unknown as FullSceneDescription<ThreadGeneratorFactory<View2D>>;
34 const scene = new Scene2D(description);
35
36 beforeAll(() => {
37 startScene(scene);
38 startPlayback(status);
39 });
40 afterAll(() => {
41 endPlayback(status);
42 endScene(scene);
43 });
44 beforeEach(() => scene.reset());
45}

Callers 5

Txt.test.tsxFile · 0.90
state.test.tsxFile · 0.90
query.test.tsxFile · 0.90
children.test.tsxFile · 0.90
clone.test.tsxFile · 0.90

Calls 6

resetMethod · 0.95
makeScene2DFunction · 0.90
startSceneFunction · 0.90
startPlaybackFunction · 0.90
endPlaybackFunction · 0.90
endSceneFunction · 0.90

Tested by

no test coverage detected