RenderCamera

AMD: require(["esri/views/3d/webgl/RenderCamera"], (RenderCamera) => { /* code goes here */ });
ESM: import RenderCamera from "@arcgis/core/views/3d/webgl/RenderCamera.js";
Object: esri/views/3d/webgl/RenderCamera
Since: ArcGIS Maps SDK for JavaScript 4.30

This is the RenderCamera interface used by the SceneView. The RenderCamera specifies the view position and orientation in render coordinates only. See section on coordinate systems for details.

The render camera is distinct from Camera and is meant to be worked with when using RenderNode.

Important guidelines

This interface is experimental. Please read the following information carefully before using it in a product:

  • It is not possible to shield users of this interface from SceneView internal implementation details. Therefore, this interface should be considered not stable and subject to changes in upcoming minor releases of the ArcGIS Maps SDK for JavaScript.
  • Because of the complex nature of WebGL and hardware-accelerated 3D rendering, this interface is targeting expert developers that are experienced with WebGL or OpenGL.
    • Improper use of WebGL might not only break the custom rendering, but also the rendering of SceneView itself.
    • Esri does not provide any support for issues related to WebGL rendering in custom rendering code, or for issues that arise in SceneView rendering while using custom rendering code.
  • Integration with third-party libraries is only possible under certain conditions. Specifically, the third-party library has to be capable of working on the same WebGL context as SceneView, and able to set the relevant parts of the WebGL state in every frame.

In this documentation vectors (Vec3 and Vec4) are presented as arrays of numbers. Matrices (Mat4) are presented as arrays with 16 elements following the WebGL conventions where the translation component occupies the 13th, 14th, and 15th elements.

Property Overview

Name Type Summary Object

The camera target ("look at") position in the internal Cartesian rendering coordinate system represented by a vector with 3 components.

RenderCamera

The position of the camera in the internal Cartesian rendering coordinate system represented by a vector with 3 components.

RenderCamera

The distance to the far plane.

RenderCamera

The horizontal field of view.

RenderCamera

The vertical field of view.

RenderCamera

The distance to the near plane.

RenderCamera

The render pixel ratio.

RenderCamera

A 4x4 matrix that defines the perspective projection transformation.

RenderCamera

The camera up vector with 3 components.

RenderCamera

A 4x4 matrix representing the inverse transpose of viewMatrix, used to transform normals

RenderCamera

A 4x4 matrix that transforms coordinates from world space to camera space.

RenderCamera

The viewport expressed as vector with 4 components (x, y, width, height).

RenderCamera

Property Details

center

Property
center Number[]readonly

The camera target ("look at") position in the internal Cartesian rendering coordinate system represented by a vector with 3 components.

eye

Property
eye Number[]readonly

The position of the camera in the internal Cartesian rendering coordinate system represented by a vector with 3 components.

far

Property
far Numberreadonly

The distance to the far plane.

fovX

Property
fovX Numberreadonly

The horizontal field of view.

fovY

Property
fovY Numberreadonly

The vertical field of view.

near

Property
near Numberreadonly

The distance to the near plane.

pixelRatio

Property
pixelRatio Numberreadonly

The render pixel ratio. This can be used to adjust screen sizes so that they correctly match up to CSS pixel sizes when rendered in HiDPI.

projectionMatrix

Property
projectionMatrix Number[]readonly

A 4x4 matrix that defines the perspective projection transformation.

up

Property
up Number[]readonly

The camera up vector with 3 components. Returns the unorthogonalized up direction used for the view matrix construction. This is not necessarily equal to the up axis of the camera local coordinate system.

viewInverseTransposeMatrix

Property
viewInverseTransposeMatrix Number[]readonly

A 4x4 matrix representing the inverse transpose of viewMatrix, used to transform normals

viewMatrix

Property
viewMatrix Number[]readonly

A 4x4 matrix that transforms coordinates from world space to camera space.

viewport

Property
viewport Number[]readonly

The viewport expressed as vector with 4 components (x, y, width, height). This viewport does not consider padding.

Method Overview

Name Return Type Summary Object

A 4x4 matrix that defines the perspective projection transformation.

get

Method Details

get

Method
get()inner

A 4x4 matrix that defines the perspective projection transformation.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.