A camera could only show the whole scene, so a HUD drawn in the world would run through a camera shader (#299) with everything else. Render layers say which cameras see an object, and overlay cameras draw their own picture over the main one. - The project has a list of up to 16 render layers, edited in Project settings next to the collision layers. It is a list of its own, read by the same rules (`layerNamesOf`). - Sprites, texts, tilemaps, particle sources and containers carry a row `Render layer` under their switches. Its default `Inherit` takes the parent's layer, at the top the first one. - A camera has `Sees` (all layers by default) and `Overlay`. The main camera is the first one switched on without Overlay, so two plain cameras still draw through the first one only. - Every view through a camera keeps only what that camera sees and lays one see-through view per overlay camera over itself. That view is a `WorldViewport` of its own, handed its view and frame from below. - An overlay is fitted into the main camera's whole picture without distortion. One of the same size and zoom covers it exactly. - `z` sorts within one camera only. The pictures lie on top of each other as a whole, which is what a shader per camera (#299) needs. - The Game tab's preview now collects the scene once per redraw. Before it collected it twice, with the cameras it would have been five times. - `SetCollisionLayersCommand` became `SetLayerNamesCommand`, which takes the list it sets. Follow-ups: #304 (the mouse through a chosen camera) and #305 (change the render layer at run time). Tests: - Gate: 226 files, 3487 tests (3480 + 7) - e2e 63 (new): 4 checks. A green overlay sprite at z -10 covers a red main sprite at z 1000, in the preview and in the running game. A `UI` sprite in front of the main camera and a `Default` one in front of the overlay stay away. Without Overlay the second camera draws nothing. The settings dialog adds a render layer at the end. - Counter-checks: inheriting from parents switched off fails 1 unit test. Overlays never drawn fails the two overlay checks in e2e 63. - e2e total 1720 (1716 + 4), computed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
135 lines
4.0 KiB
JavaScript
135 lines
4.0 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';
|
|
import { listTab } from './21-list.mjs';
|
|
import { structVariable } from './22-struct.mjs';
|
|
import { variableNodes } from './23-variable-nodes.mjs';
|
|
import { propertyNodes } from './24-property-nodes.mjs';
|
|
import { animation } from './25-animation.mjs';
|
|
import { stateMachine } from './26-state-machine.mjs';
|
|
import { consolePanel } from './27-console.mjs';
|
|
import { shader } from './28-shader.mjs';
|
|
import { transform } from './29-transform.mjs';
|
|
import { font } from './30-font.mjs';
|
|
import { particles } from './31-particles.mjs';
|
|
import { scope } from './32-scope.mjs';
|
|
import { renderOnChange } from './33-render-on-change.mjs';
|
|
import { sound } from './34-sound.mjs';
|
|
import { loadScene } from './35-load-scene.mjs';
|
|
import { graphGroups } from './36-graph-groups.mjs';
|
|
import { nineSlice } from './37-nine-slice.mjs';
|
|
import { plugins } from './38-plugins.mjs';
|
|
import { tile } from './39-tile.mjs';
|
|
import { tilemap } from './40-tilemap.mjs';
|
|
import { physics } from './41-physics.mjs';
|
|
import { shapes } from './42-shapes.mjs';
|
|
import { queries } from './43-queries.mjs';
|
|
import { documents } from './44-documents.mjs';
|
|
import { login } from './45-login.mjs';
|
|
import { topbar } from './46-topbar.mjs';
|
|
import { vectorArt } from './47-vectorart.mjs';
|
|
import { pixelArt } from './48-pixelart.mjs';
|
|
import { users } from './49-users.mjs';
|
|
import { snapshots } from './50-snapshots.mjs';
|
|
import { clipboard } from './51-clipboard.mjs';
|
|
import { hierarchyGroups } from './52-hierarchy-groups.mjs';
|
|
import { curves } from './53-curves.mjs';
|
|
import { structTypes } from './54-struct-types.mjs';
|
|
import { typedLists } from './55-typed-lists.mjs';
|
|
import { privateVariables } from './56-private-variables.mjs';
|
|
import { objectReferences } from './57-object-references.mjs';
|
|
import { clipAreas } from './58-clip-areas.mjs';
|
|
import { whilePlaying } from './59-while-playing.mjs';
|
|
import { release } from './60-release.mjs';
|
|
import { fullscreen } from './61-fullscreen.mjs';
|
|
import { devicePixels } from './62-device-pixels.mjs';
|
|
import { renderLayers } from './63-render-layers.mjs';
|
|
|
|
export const STEPS = [
|
|
hierarchy,
|
|
inspector,
|
|
play,
|
|
assets,
|
|
drawing,
|
|
graph,
|
|
parenting,
|
|
colliders,
|
|
containers,
|
|
textAndEnabled,
|
|
menus,
|
|
textures,
|
|
frames,
|
|
overflow,
|
|
aspect,
|
|
containerTab,
|
|
editorRun,
|
|
pause,
|
|
nestedBehavior,
|
|
keyRepeat,
|
|
listTab,
|
|
structVariable,
|
|
variableNodes,
|
|
propertyNodes,
|
|
animation,
|
|
stateMachine,
|
|
consolePanel,
|
|
shader,
|
|
transform,
|
|
font,
|
|
particles,
|
|
scope,
|
|
renderOnChange,
|
|
sound,
|
|
loadScene,
|
|
graphGroups,
|
|
nineSlice,
|
|
plugins,
|
|
tile,
|
|
tilemap,
|
|
physics,
|
|
shapes,
|
|
queries,
|
|
documents,
|
|
login,
|
|
topbar,
|
|
vectorArt,
|
|
pixelArt,
|
|
users,
|
|
snapshots,
|
|
clipboard,
|
|
hierarchyGroups,
|
|
curves,
|
|
structTypes,
|
|
typedLists,
|
|
privateVariables,
|
|
objectReferences,
|
|
clipAreas,
|
|
whilePlaying,
|
|
release,
|
|
fullscreen,
|
|
devicePixels,
|
|
renderLayers,
|
|
];
|