Skip to content

CubeFace beta ​

Interface of @v12-engine/editor

ts
export interface CubeFace

A face of the cube as it stands on the screen: whether it faces the viewer, where its middle is (x right, y down, from the cube's middle, in units of the cube's half-side), and the matrix of the 2D transform that lays a square element on it (matrix(a b c d): the label's across and down, as they are on the screen)

Members ​

face ​

ts
face: ViewFace;

Which face of the cube it is

facing ​

ts
facing: number;

How much it faces the viewer, 0 edge-on, 1 square on: for its shade

matrix ​

ts
matrix: [number, number, number, number];

[a, b, c, d] of matrix(a, b, c, d, 0, 0)

visible ​

ts
visible: boolean;

Facing the viewer: the others are behind the cube

x ​

ts
x: number;

Where its middle is across the screen, from the cube's middle, in units of the cube's half-side; right is positive

y ​

ts
y: number;

Where its middle is down the screen, from the cube's middle, in units of the cube's half-side; down is positive