A held key fired once and then nothing, so sliding a Tetris piece sideways or walking a menu meant building a timer next to every key node. Two settings on the node do it now: Repeat after and Repeat interval, both in milliseconds so the usual values stay whole numbers (300, 50) instead of 0.3 and 0.05. A delay of 0 keeps the node exactly as it was, an interval of 0 means every frame. The browser's own auto-repeat is deliberately not used - Input.press has always dropped it - because its delay and rate are an operating-system setting of the player's, not a game's. The repeat is built from the measured hold time instead, per node, so two nodes on one key keep their own clocks. The rule itself is a pure function in keyRepeat.ts and is checked without a world. Both rows stay off the node body while the delay is 0: two lines of "0" on every key node in every graph would be noise, and the screenshot said so. NodeDef gains hiddenParams for that; the inspector still shows them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
49 lines
1.4 KiB
JavaScript
49 lines
1.4 KiB
JavaScript
/**
|
|
* The e2e steps in the order they run. Each step is `async (t) => {}` over the harness
|
|
* toolbox; later steps rely on the scene state earlier ones leave behind (names given in
|
|
* the parenting step, the container created in the container step, …).
|
|
*/
|
|
import { hierarchy } from './01-hierarchy.mjs';
|
|
import { inspector } from './02-inspector.mjs';
|
|
import { play } from './03-play.mjs';
|
|
import { assets } from './04-assets.mjs';
|
|
import { drawing } from './05-drawing.mjs';
|
|
import { graph } from './06-graph.mjs';
|
|
import { parenting } from './07-parenting.mjs';
|
|
import { colliders } from './08-colliders.mjs';
|
|
import { containers } from './09-containers.mjs';
|
|
import { textAndEnabled } from './10-text-and-enabled.mjs';
|
|
import { menus } from './11-menus.mjs';
|
|
import { textures } from './12-textures.mjs';
|
|
import { frames } from './13-frames.mjs';
|
|
import { overflow } from './14-overflow.mjs';
|
|
import { aspect } from './15-aspect.mjs';
|
|
import { containerTab } from './16-container.mjs';
|
|
import { editorRun } from './17-editor-run.mjs';
|
|
import { pause } from './18-pause.mjs';
|
|
import { nestedBehavior } from './19-nested-behavior.mjs';
|
|
import { keyRepeat } from './20-key-repeat.mjs';
|
|
|
|
export const STEPS = [
|
|
hierarchy,
|
|
inspector,
|
|
play,
|
|
assets,
|
|
drawing,
|
|
graph,
|
|
parenting,
|
|
colliders,
|
|
containers,
|
|
textAndEnabled,
|
|
menus,
|
|
textures,
|
|
frames,
|
|
overflow,
|
|
aspect,
|
|
containerTab,
|
|
editorRun,
|
|
pause,
|
|
nestedBehavior,
|
|
keyRepeat,
|
|
];
|