crashCams.testSuite
README.md
crashCams tests
Checks the crashCams.cams module and the six camera behaviours:
- Catalogue:
Cams.kinds()lists the six kinds in catalogue order andCams.componentresolves each one's behaviour;Cams.userefuses an unknown kind and an entity with noCamera, and sets the Camera'sbehaviorandfollowandCams.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;cutToandnextwrap. - Overlay:
Cams.overlay(cam, true, { label })shows the REC screen andCams.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.