@graphty/graphty-element / index / CameraState
Interface: CameraState ​
Defined in: graphty-element/src/camera/types.ts:56
Where the camera is now, and where a view asks it to go.
Every member is optional because the element draws with three different cameras and a state describes whichever one is current: an orbit camera reads alpha, beta and radius, a free camera reads position and target, and the 2D camera reads zoom and pan. A view fills in the members its type calls for and leaves the rest alone.
Properties ​
alpha? ​
optionalalpha?:number
Defined in: graphty-element/src/camera/types.ts:68
Orbit angles in Babylon's ArcRotate convention: alpha turns around the +y axis starting from +x, beta is measured down from +y (0 looks straight down, PI/2 is level). With radius they place the viewer at target + radius * (cos(alpha) sin(beta), cos(beta), sin(alpha) sin(beta)). Ignored when the state also gives position or pivotRotation.
beta? ​
optionalbeta?:number
Defined in: graphty-element/src/camera/types.ts:69
cameraDistance? ​
optionalcameraDistance?:number
Defined in: graphty-element/src/camera/types.ts:87
fov? ​
optionalfov?:number
Defined in: graphty-element/src/camera/types.ts:72
orthoBottom? ​
optionalorthoBottom?:number
Defined in: graphty-element/src/camera/types.ts:83
orthoLeft? ​
optionalorthoLeft?:number
Defined in: graphty-element/src/camera/types.ts:80
orthoRight? ​
optionalorthoRight?:number
Defined in: graphty-element/src/camera/types.ts:81
orthoTop? ​
optionalorthoTop?:number
Defined in: graphty-element/src/camera/types.ts:82
pan? ​
optionalpan?:object
Defined in: graphty-element/src/camera/types.ts:76
x ​
x:
number
y ​
y:
number
pivotRotation? ​
optionalpivotRotation?:object
Defined in: graphty-element/src/camera/types.ts:86
x ​
x:
number
y ​
y:
number
z ​
z:
number
position? ​
optionalposition?:object
Defined in: graphty-element/src/camera/types.ts:60
x ​
x:
number
y ​
y:
number
z ​
z:
number
radius? ​
optionalradius?:number
Defined in: graphty-element/src/camera/types.ts:71
Distance from target for an orbit state given as alpha and beta.
rotation? ​
optionalrotation?:number
Defined in: graphty-element/src/camera/types.ts:77
target? ​
optionaltarget?:object
Defined in: graphty-element/src/camera/types.ts:61
x ​
x:
number
y ​
y:
number
z ​
z:
number
type? ​
optionaltype?:"arcRotate"|"free"|"universal"|"orthographic"
Defined in: graphty-element/src/camera/types.ts:57
zoom? ​
optionalzoom?:number
Defined in: graphty-element/src/camera/types.ts:75