Log inGet started
Package

comicPanels.package

Newest version

README.md

comicPanels tests

Checks the package against styleKit's block rules and against what its docs promise, partly on the presented frame of a small set the suite builds itself (a white wall, a red box and a camera of its own), since the test runner empties the scene.

  • Rules: the panelPage block is installed from comicPanels, passes StyleKit.checkBlock and sits in the Medium slot, so it lies over any look.
  • Seventeen layouts, one change each: ComicPanels.setLayout takes every layout and the page reads it back with the layout's own panel count; the borderless bleed drops its margin and border; an unknown layout is refused.
  • Camera plan: with one camera no extra views are planned; with several, each layout plans at most three extra views, one per distinct known framing, and every panel shows a view that exists.
  • Borders, gutters and cameras by name: every border style and gutter colour switches in one call and reads back from state(), and so does the camera mode.
  • Looks and the page: ComicPanels.applyLook changes the look and keeps the page; off() takes the page away (needs comicBlocks for the look).
  • Captions, pages and the default page: a caption reads back from the page entry, a second at the same place replaces it, an unknown style is refused and clearCaptions empties them; on() lays ComicPanels.DEFAULT; every page preset whose look is installed sets look, layout, border, gutter and captions in one step.
  • On the frame: a black gutter darkens the page margin and a white one lightens it while the picture stays in the panel, and taking the page off puts the frame back within 0.5 of 255.

The scene's shared stack, the viewport camera, and the test set are put back after each test. The synced ComicPanels runner entity a layout call makes is left in place: it keeps no state and idles once the page is off. Run with zero tests run comicPanelsTests or asset.resolve("comicPanelsTests", "testSuite"):run().

Known limits

The per-player extra cameras follow a local player's avatar, and the test runner runs in edit mode with no player, so the suite checks the camera plan rather than the rendered extra views. Those were checked in play in the showcase scene.