require(["esri/views/3d/webgl/RenderCamera"], (RenderCamera) => { /* code goes here */ });
import RenderCamera from "@arcgis/core/views/3d/webgl/RenderCamera.js";
esri/views/3d/webgl/RenderCamera
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.
- 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 | 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
-
The camera target ("look at") position in the internal Cartesian rendering coordinate system represented by a vector with 3 components.
-
The position of the camera in the internal Cartesian rendering coordinate system represented by a vector with 3 components.
-
far
far Numberreadonly
-
The distance to the far plane.
-
fovX
fovX Numberreadonly
-
The horizontal field of view.
-
fovY
fovY Numberreadonly
-
The vertical field of view.
-
near
near Numberreadonly
-
The distance to the near plane.
-
pixelRatio
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.
-
A 4x4 matrix that defines the perspective projection transformation.
-
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.
-
A 4x4 matrix representing the inverse transpose of
viewMatrix
, used to transform normals
-
A 4x4 matrix that transforms coordinates from world space to camera space.
-
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 |