The OrthographicView class is a subclass of View that creates a top-down view of the XY plane. It is usually used for rendering 2D charts in non-geospatial use cases.
It's recommended that you read the Views and Projections guide before using this class.
import {OrthographicView} from '@deck.gl/core';
const view = new OrthographicView({id, ...});OrthographicView takes the same parameters as the View superclass constructor, plus the following:
Whether to use top-left coordinates (true) or bottom-left coordinates (false). Default true.
Distance of near clipping plane. Default 0.1.
Distance of far clipping plane. Default 1000.
To render, OrthographicView needs to be used together with a viewState with the following parameters:
target(number[3], optional) - The world position at the center of the viewport. Default[0, 0, 0].zoom(number | number[2], optional) - The zoom level of the viewport.zoom: 0maps one unit distance to one pixel on screen, and increasingzoomby1scales the same object to twice as large. For examplezoom: 1is 2x the original size,zoom: 2is 4x,zoom: 3is 8x etc.. To apply independent zoom levels to the X and Y axes, supply an array[zoomX, zoomY]. Default0.minZoom(number, optional) - The min zoom level of the viewport. Default-Infinity.maxZoom(number, optional) - The max zoom level of the viewport. DefaultInfinity.
By default, OrthographicView uses the OrthographicController to handle interactivity. To enable the controller, use:
const view = new OrthographicView({id: '2d-scene', controller: true});Visit the OrthographicController documentation for a full list of supported options.