ViewChangeEvent
An event that fires on camera view direction change.
This is triggered only on frame render.
In other words, even if the actual camera orientation changes several times between frame renderings, the actual event is triggered only with the camera's direction at the time the screen is updated.
interface ViewChangeEvent
Properties
Camera's new pitch value.
Camera's new quaternion value. (x, y, z, w)
An instance of the component that triggered this event.
A type of the event.
This value is equal to event's name.
Camera's new yaw value.
Camera's new zoom value.
Properties
pitch
pitchnumber
Camera's new pitch value.
quaternion
quaternionnumber[]
Camera's new quaternion value. (x, y, z, w)
target
target
An instance of the component that triggered this event.
viewer.on("ready", evt => {
console.log(evt.target); // = viewer
});
type
typestring
A type of the event.
This value is equal to event's name.
viewer.on("ready", evt => {
console.log(evt.type); // "ready"
});
yaw
yawnumber
Camera's new yaw value.
zoom
zoomnumber
Camera's new zoom value.