Diorama

Made for a big screen.

This site is one 3D scene, built for a computer: a wide window and a mouse. Open dioramajs.dev on a desktop or a laptop to see it.This site is one 3D scene, built for a wide window. Make this one wider, or open dioramajs.dev on a larger screen.

GitHub

DioramaDocs

@dioramajs/effects/testing

Test helpers for effects: a GPU stand-in and probe().

View as Markdown
On this page
import { box, codes, fakeRender } from '@dioramajs/effects/testing'

Functions

boxA viewport box for happy-dom, which lays nothing out.
codesThe codes of reported errors, the cause first.
htmlAdds an element with a viewport box.
objectsMeshes and sprites in the render scene.
probeMounts an effect on a fixture with the fake render, runs setup and two updates with pointer and scroll movement, and reports what it read and whether it rests. For the tests and the metadata of effect modules; needs a DOM such as happy-dom.
runAlternates tasks and frames until both settle; returns the frames drawn.
startStarts an app with the fake render, the effects preset and these entries, engine loaded.
stateThe element's `data-dio-state`.
statusThe status of an effect instance on an element.
tickWaits one task.
viewporthappy-dom has no viewport size: the stage reads these.

Constants

fakeRenderA `render` plugin without a GPU: a real three scene and a renderer that only counts.
gpuWhat the fake renderer drew, compiled and uploaded, and switches to make it fail.

Interfaces

ProbeOptionsOptions of `probe`.
ProbeResultWhat `probe` found out about an effect.
WorldAn app started by `start` with its driver and what it reported.