Log inGet started
Package

crashCams.package

This package holds more than this page lists. See all of its files in its world.

README.md

crashCams tests

Checks the crashCams.cams module and the six camera behaviours:

  • Catalogue: Cams.kinds() lists the six kinds in catalogue order and Cams.component resolves each one's behaviour; Cams.use refuses an unknown kind and an entity with no Camera, and sets the Camera's behavior and follow and Cams.current.
  • Placement: one camera per kind, all given the same still subject (a chassis point, a head and an impact face): after a few frames each has left its spawn point, sits at a finite position, has a sane lens, and has its subject (the head for dummyView, the car for the rest) within 30 degrees of its view direction.
  • Director: a non-looping director cuts 1, 2, 3 in order on the wall clock and stops itself on the last shot; a looping one wraps and stop() holds the shot it is on; cutTo and next wrap.
  • Overlay: Cams.overlay(cam, true, { label }) shows the REC screen and Cams.overlay(cam, false) hides it; turning it off on a bare camera adds nothing.

The behaviours place their cameras in update, which runs only while the gameplay clock runs, so the placement, director and overlay tests enter play. The runner discards that session and returns to edit after each test. Everything is spawned at x = -1600, away from any scene content. It leaves the camera props (Cams.dressing), impactShake and the visual quality of each shot alone.

Run it: tools.use("tests", "run", "crashCams") in edit mode.