Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/tests/mount-pivot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default async function ({ renderer, testRoot }: ExampleSettings) {
colorBottom: randomColor() * 0xffffffaa,
colorTop: randomColor() * 0xffffffaa,
parent: testRoot,
shader: renderer.createShader('RoundedRectangle', {
shader: renderer.createShader('Rounded', {
radius: rnd(10, 50),
}),
mountX,
Expand All @@ -71,7 +71,7 @@ export default async function ({ renderer, testRoot }: ExampleSettings) {
h: 20,
color: 0xffffffff,
parent: node,
shader: renderer.createShader('RoundedRectangle', {
shader: renderer.createShader('Rounded', {
radius: 10,
}),
scale: 1,
Expand Down
6 changes: 3 additions & 3 deletions examples/tests/scaling-animations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default async function ({ renderer, testRoot }: ExampleSettings) {
colorBottom: randomColor(),
colorTop: randomColor(),
parent: testRoot,
shader: renderer.createShader('RoundedRectangle', {
shader: renderer.createShader('Rounded', {
radius: rnd(10, 50),
}),
scale: 1,
Expand All @@ -37,7 +37,7 @@ export default async function ({ renderer, testRoot }: ExampleSettings) {
h: 20,
color: 0xffffff55,
parent: node,
// shader: renderer.createShader('RoundedRectangle', {
// shader: renderer.createShader('Rounded', {
// radius: 5,
// }),
scale: 1,
Expand All @@ -50,7 +50,7 @@ export default async function ({ renderer, testRoot }: ExampleSettings) {
h: 16,
color: 0x000000ff,
parent: pivotPoint,
// shader: renderer.createShader('RoundedRectangle', {
// shader: renderer.createShader('Rounded', {
// radius: 3,
// }),
});
Expand Down
12 changes: 11 additions & 1 deletion examples/tests/stress-tv.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { type INode } from '@lightningjs/renderer';
import type { ExampleSettings } from '../common/ExampleSettings.js';
import { waitUntilIdle } from '../common/utils.js';
import lightning from '../assets/lightning.png';
import rocko from '../assets/rocko.png';
import testscreen from '../assets/testscreen.png';
Expand Down Expand Up @@ -118,7 +119,16 @@ const measureFps = (frames: number): Promise<number> =>
requestAnimationFrame(tick);
});

export default async function ({
export async function automation(settings: ExampleSettings) {
// No autosweep/key driving in automation — `test` builds the default scene
// (tier 4, 200 cards: rounded cards + images + SDF text). Wait for textures
// and text layout to settle so the snapshot is the stable final frame.
await test(settings);
await waitUntilIdle(settings.renderer);
await settings.snapshot();
}

export default async function test({
renderer,
testRoot,
perfMultiplier,
Expand Down
2 changes: 1 addition & 1 deletion examples/tests/text-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class BoxedText extends EventEmitter implements BoxedTextProps {
color: 0xff0000ff,
// colorTop: props.boxColor1,
// colorBottom: props.boxColor2,
shader: renderer.createShader('RoundedRectangle', {
shader: renderer.createShader('Rounded', {
radius: 10,
}),
parent: props.parent,
Expand Down
17 changes: 13 additions & 4 deletions examples/tests/viewport-memory.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
import type { ExampleSettings } from '../common/ExampleSettings.js';
import { waitUntilIdle } from '../common/utils.js';

export async function automation(settings: ExampleSettings) {
await test(settings);
// The scene streams in async (SDF text layout + rounded-rect shaders);
// wait for the renderer to settle so the snapshot is the stable final frame.
await waitUntilIdle(settings.renderer);
await settings.snapshot();
}

function getRandomTitle(length = 10) {
const characters =
Expand Down Expand Up @@ -29,7 +38,7 @@ export default async function test(settings: ExampleSettings) {
w: 100,
h: 100,
color: 0xff0000ff,
shader: renderer.createShader('RoundedRectangle', {
shader: renderer.createShader('Rounded', {
radius: 50,
}),
parent: testRoot,
Expand All @@ -41,7 +50,7 @@ export default async function test(settings: ExampleSettings) {
w: 100,
h: 100,
color: 0x0000ffff,
shader: renderer.createShader('RoundedRectangle', {
shader: renderer.createShader('Rounded', {
radius: 50,
}),
parent: testRoot,
Expand All @@ -53,7 +62,7 @@ export default async function test(settings: ExampleSettings) {
w: 100,
h: 100,
color: 0xffff00ff,
shader: renderer.createShader('RoundedRectangle', {
shader: renderer.createShader('Rounded', {
radius: 50,
}),
parent: testRoot,
Expand Down Expand Up @@ -98,7 +107,7 @@ export default async function test(settings: ExampleSettings) {
h: 90, // Slightly smaller height
color: 0x00ff00ff, // Green
parent: borderNode,
shader: renderer.createShader('RoundedRectangle', {
shader: renderer.createShader('Rounded', {
radius: 10,
}),
});
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading