Set Editor Camera
Applies position and zoom to the editor camera while in editor mode.
Syntax
store.dispatch({ type: "SET_EDITOR_CAMERA", payload: { position, zoom } });
Parameters
position
The target position to move the editor camera to.
zoom
The target zoom to set the editor camera to.
Examples
Moves the editor camera 20 pixels above the origin and applies a camera zoom of 3.
store.dispatch({
type: "SET_EDITOR_CAMERA",
payload: { position: { x: 0, y: -20 }, zoom: 3 }
});