Skip to content

Latest commit

 

History

History
41 lines (23 loc) · 1.74 KB

File metadata and controls

41 lines (23 loc) · 1.74 KB

geospatial

OrthographicView Class (Experimental)

The [OrthographicView] class is a subclass of View that creates a perspective view using classic "3D camera" view state parameters.

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, optional) - The zoom level of the viewport. zoom: 0 maps one unit distance to one pixel on screen, and increasing zoom by 1 scales the same object to twice as large. Default 0.
  • minZoom (Number, optional) - The min zoom level of the viewport. Default -Infinity.
  • maxZoom (Number, optional) - The max zoom level of the viewport. Default Infinity.

For more information on using View classes, consult the Views article.

Constructor

new OrthographicView({controller: true});

The OrthographicView constructor takes the same parameters as the View superclass constructor.

Methods

Inherits all View methods.

Remarks

  • When zooming with orthographic view, the size (width and height) of the view and window are no longer the same. In such case, specify right and bottom together with left and top explicitly to define the view size.
  • Refer to examples/experimental/orthographic-zooming for example.

Source

modules/core/src/views/orthographic-view.js