Skip to content

Interface: DomainCamera ​

Experimental

A domain trace's tilted camera (see the module comment): world (overlay) px ↔ screen, and the pointer onto the flat trace. Pure (three.js math only).

Properties ​

PropertyModifierTypeDefault valueDescription
camerareadonlyView3DCameraundefinedExperimental
heightreadonlynumberundefinedExperimental Figure height (overlay world y = height − container y).
rectreadonlyReadonly<ViewportRect>undefinedExperimental
shapespublicreadonly DomainShape[][]Experimental

Methods ​

project() ​

ts
project(x, y): [number, number];

Experimental

Where the flat trace's container point (x, y) is drawn (on its shape's top), container.

Parameters ​

ParameterType
xnumber
ynumber

Returns ​

[number, number]


projectPositions() ​

ts
projectPositions(out): void;

Experimental

Project out's positions (world px, built by buildPrisms) in place.

Parameters ​

ParameterType
outPrismBuffers

Returns ​

void


toScreen() ​

ts
toScreen(
   x,
   y,
   z
): [number, number, number];

Experimental

World point (x, y) raised z px: where it is drawn (world px) and its overlay depth.

Parameters ​

ParameterType
xnumber
ynumber
znumber

Returns ​

[number, number, number]


unproject() ​

ts
unproject(x, y): [number, number];

Experimental

The flat trace's container point under screen point (x, y) (container px): inside the prism the pointer ray hits first, else on the plane.

Parameters ​

ParameterType
xnumber
ynumber

Returns ​

[number, number]


zAt() ​

ts
zAt(x, y): number;

Experimental

The height (px) a world point is drawn at: the top of the (topmost) shape it lies on; else the nearest shape's top, or its bottom in front of it (so an outside label below a slice isn't drawn over the slice's front); 0 without shapes.

Parameters ​

ParameterType
xnumber
ynumber

Returns ​

number

Released under the MIT License.