Members
Total budget, in milliseconds, allowed for one frame
When defined, this overrides the blending property of a
DrawCommand's render state.
This is used to, for example, to allow the renderer to turn off blending during the picking pass.
When this is undefined, the DrawCommand's property is used.
-
Default Value:
undefined
A cache of objects tied to this context. Just before the Context is destroyed,
destroy will be invoked on each object in this object literal that has
such a method. This is useful for caching any objects that might otherwise
be stored globally, except they're tied to a particular context, and to manage
their lifetime.
camera : Camera
A camera to use instead of
FrameState.camera for the current pass.
color : Color
The value to clear the color buffer to. When
undefined, the color buffer is not cleared.
-
Default Value:
undefined
commandList : Array.<DrawCommand>
An array of rendering commands to use instead of
FrameState.commandList for the current pass.
context : Context
The context used to execute commands for this pass.
cullingVolume : CullingVolume
A culling volume to use instead of
FrameState.cullingVolume for the current pass.
The value to clear the depth buffer to. When
undefined, the depth buffer is not cleared.
-
Default Value:
undefined
When true, the framebuffer owns its attachments so they will be destroyed when
Framebuffer#destroy is called or when a new attachment is assigned
to an attachment point.
-
Default Value:
- Framebuffer#destroy
true
See:
fragmentShaderSource : ShaderSource
The fragment shader source. The default vertex shader is ViewportQuadVS.
-
Default Value:
undefined
framebuffer : Framebuffer
The framebuffer to render to. This framebuffer is used unless a
DrawCommand
or ClearCommand explicitly define a framebuffer, which is used for off-screen
rendering.
-
Default Value:
undefined
framebuffer : Framebuffer
The framebuffer to clear.
-
Default Value:
undefined
globeDepthTexture : Texture
Example:
{
webgl : {
alpha : false,
depth : true,
stencil : false,
antialias : true,
premultipliedAlpha : true,
preserveDrawingBuffer : false,
failIfMajorPerformanceCaveat : true
},
allowTextureFilterAnisotropic : true
}
outputTexture : Texture
Texture to use for offscreen rendering.
-
Default Value:
undefined
The object who created this command. This is useful for debugging command
execution; it allows us to see who created a command when we only have a
reference to the command, and can be used to selectively execute commands
with
Scene#debugCommandFilter.
-
Default Value:
undefined
See:
The object who created this command. This is useful for debugging command
execution; it allows you to see who created a command when you only have a
reference to the command, and can be used to selectively execute commands
with
Scene#debugCommandFilter.
-
Default Value:
undefined
See:
The pass.
The pass when to render. Always compute pass.
-
Default Value:
Pass.COMPUTE;
The pass in which to run this command.
-
Default Value:
undefined
Whether the renderer resources will persist beyond this call. If not, they
will be destroyed after completion.
-
Default Value:
false
Function that is called after the ComputeCommand is executed. Takes the output
texture as its single argument.
-
Default Value:
undefined
Function that is called immediately before the ComputeCommand is executed. Used to
update any renderer resources. Takes the ComputeCommand as its single argument.
-
Default Value:
undefined
A read-only property that indicates whether the pass is ready, i.e. all tiles needed by the pass are loaded.
-
Default Value:
false
The render state to apply when executing the clear command. The following states affect clearing:
scissor test, color mask, depth mask, and stencil mask. When the render state is
undefined, the default render state is used.
-
Default Value:
undefined
When defined, this overrides the scissor test property of a
DrawCommand's render state.
This is used to, for example, to allow the renderer to scissor out the pick region during the picking pass.
When this is undefined, the DrawCommand's property is used.
-
Default Value:
undefined
shaderProgram : ShaderProgram
The shader program to apply.
-
Default Value:
undefined
Indicates if this job was starved last frame. This prevents it
from being stolen from this frame.
Indicates if this job type was starved this frame, i.e., a job
tried to run but didn't have budget
The value to clear the stencil buffer to. When
undefined, the stencil buffer is not cleared.
-
Default Value:
undefined
Time, in milliseconds, that other job types stole this frame
An object with functions whose names match the uniforms in the shader program
and return values to set those uniforms.
-
Default Value:
undefined
Time, in milliseconds, used so far during this frame
vertexArray : VertexArray
The vertex array. If none is provided, a viewport quad will be used.
-
Default Value:
undefined
viewport : BoundingRectangle
The viewport used when one is not defined by a
DrawCommand's render state.
-
Default Value:
undefined
private
Methods
When computing planes to bound the rectangle,
need to factor in "bulge" and other distortion.
Flatten the ellipsoid-centered corners and edge-centers of the rectangle
into the plane of the local ENU system, compute bounds in 2D, and
project back to ellipsoid-centered.
Mutates the properties of a given rectangle so it does not extend outside of the given tiling scheme's rectangle
Convert to a usable heatmap value (i.e. a number). Ensures that tile values that aren't stored as numbers can be used for colorization.
Gets the level with the specified world coordinate spacing between texels, or less.
| Name | Type | Description |
|---|---|---|
layer |
ImageryLayer | The imagery layer to use. |
texelSpacing |
Number | The texel spacing for which to find a corresponding level. |
latitudeClosestToEquator |
Number | The latitude closest to the equator that we're concerned with. |
Returns:
The level with the specified texel spacing or less.
This function differs from the normal subarray function
because it takes offset and length, rather than begin and end.
Traverse the tree and check if their selected frame is the current frame. If so, add it to a selection queue.
This is a preorder traversal so children tiles are selected before ancestor tiles.
The reason for the preorder traversal is so that tiles can easily be marked with their
selection depth. A tile's _selectionDepth is its depth in the tree where all non-selected tiles are removed.
This property is important for use in the stencil test because we want to render deeper tiles on top of their
ancestors. If a tileset is very deep, the depth is unlikely to fit into the stencil buffer.
We want to select children before their ancestors because there is no guarantee on the relationship between
the children's z-depth and the ancestor's z-depth. We cannot rely on Z because we want the child to appear on top
of ancestor regardless of true depth. The stencil tests used require children to be drawn first.
NOTE: 3D Tiles uses 3 bits from the stencil buffer meaning this will not work when there is a chain of
selected tiles that is deeper than 7. This is not very likely.
Checks if the load queue length has changed since the last time we raised a queue change event - if so, raises
a new change event at the end of the render cycle.
