@JsType(isNative=true, namespace="Cesium", name="Cesium3DTileset") public class Cesium3DTileset extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Cesium3DTileset.FoveatedInterpolationCallback
Optimization option.
|
Modifier and Type | Field and Description |
---|---|
Event |
allTilesLoaded
The event fired to indicate that all tiles that meet the screen space error this frame are loaded.
|
double |
baseScreenSpaceError
The screen space error that must be reached before skipping levels of detail.
|
ClippingPlaneCollection |
clippingPlanes
The
ClippingPlaneCollection used to selectively disable rendering the tileset. |
double |
colorBlendAmount
Defines the value used to linearly interpolate between the source color and feature color when the
colorBlendMode is MIX. |
Number |
colorBlendMode
Defines how per-feature colors set from the Cesium API or declarative styling blend with the source colors from
the original feature, e.g. glTF material or per-point color in the tile.
|
boolean |
cullRequestsWhileMoving
Don't request tiles that will likely be unused when they come back because of the camera's movement.
|
double |
cullRequestsWhileMovingMultiplier
Multiplier used in culling requests while moving.
|
boolean |
debugColorizeTiles
For debugging only.
|
boolean |
debugFreezeFrame
For debugging only.
|
boolean |
debugShowBoundingVolume
For debugging only.
|
boolean |
debugShowContentBoundingVolume
For debugging only.
|
boolean |
debugShowGeometricError
For debugging only.
|
boolean |
debugShowMemoryUsage
For debugging only.
|
boolean |
debugShowRenderingStatistics
For debugging only.
|
boolean |
debugShowViewerRequestVolume
For debugging only.
|
boolean |
debugWireframe
For debugging only.
|
boolean |
dynamicScreenSpaceError
Optimization option.
|
double |
dynamicScreenSpaceErrorDensity
Density used to adjust the dynamic screen space error, similar to fog density.
|
double |
dynamicScreenSpaceErrorFactor
A factor used to increase the computed dynamic screen space error.
|
double |
dynamicScreenSpaceErrorHeightFalloff
A ratio of the tileset's height at which the density starts to falloff.
|
Ellipsoid |
ellipsoid
The ellipsoid determining the size and shape of the globe.
|
double |
foveatedConeSize
Optimization option.
|
Cesium3DTileset.FoveatedInterpolationCallback |
foveatedInterpolationCallback
Optimization option.
|
double |
foveatedMinimumScreenSpaceErrorRelaxation
Optimization option.
|
boolean |
foveatedScreenSpaceError
Optimization option.
|
double |
foveatedTimeDelay
Optimization option.
|
boolean |
immediatelyLoadDesiredLevelOfDetail
When skipLevelOfDetail is true, only tiles that meet the maximum screen space error will ever be downloaded.
|
Event |
initialTilesLoaded
The event fired to indicate that all tiles that meet the screen space error this frame are loaded.
|
Cartesian3 |
lightColor
The color and intensity of the sunlight used to shade a model.
|
Event |
loadProgress
The event fired to indicate progress of loading new tiles.
|
boolean |
loadSiblings
When skipLevelOfDetail is true, determines whether siblings of visible tiles are always downloaded during traversal.
|
double |
luminanceAtZenith
The sun's luminance at the zenith in kilo candela per meter squared to use for this model's
procedural environment map.
|
double |
maximumMemoryUsage
The maximum amount of memory in MB that can be used by the tileset.
|
double |
maximumScreenSpaceError
The maximum screen space error used to drive level of detail refinement.
|
Matrix4 |
modelMatrix
A 4x4 transformation matrix that transforms the tileset's root tile.
|
PointCloudShading |
pointCloudShading
Options for controlling point size based on geometric error and eye dome lighting.
|
boolean |
preferLeaves
Optimization option.
|
boolean |
preloadFlightDestinations
Preload tiles at the camera's flight destination while the camera is in flight.
|
boolean |
preloadWhenHidden
Preload tiles when tileset.show is false.
|
double |
progressiveResolutionHeightFraction
Optimization option.
|
Number |
shadows
Determines whether the tileset casts or receives shadows from each light source.
|
boolean |
show
Determines if the tileset will be shown.
|
boolean |
skipLevelOfDetail
Optimization option.
|
double |
skipLevels
When skipLevelOfDetail is true, a constant defining the minimum number of levels to skip when loading tiles.
|
double |
skipScreenSpaceErrorFactor
When skipLevelOfDetail is true, a multiplier defining the minimum screen space error to skip.
|
String |
specularEnvironmentMaps
A URL to a KTX file that contains a cube map of the specular lighting and the convoluted specular mipmaps.
|
Cartesian3[] |
sphericalHarmonicCoefficients
The third order spherical harmonic coefficients used for the diffuse color of image-based lighting.
|
Cesium3DTileStyle |
style
The style, defined using the 3D Tiles Styling language, applied to each feature in the tileset.
|
Event |
tileFailed
The event fired to indicate that a tile's content failed to load.
|
Event |
tileLoad
The event fired to indicate that a tile's content was loaded.
|
Event |
tileUnload
The event fired to indicate that a tile's content was unloaded.
|
Event |
tileVisible
This event fires once for each visible tile in a frame.
|
Constructor and Description |
---|
Cesium3DTileset(Cesium3DTilesetOptions options)
A 3D Tiles tileset,
used for streaming massive heterogeneous 3D geospatial datasets.
|
Modifier and Type | Method and Description |
---|---|
Object |
asset()
Gets the tileset's asset object property, which contains metadata about the tileset.
|
String |
basePath()
The base path that non-absolute paths in tileset.json are relative to.
|
BoundingSphere |
boundingSphere()
The tileset's bounding sphere.
|
ClassificationType |
classificationType()
Determines whether terrain, 3D Tiles or both will be classified by this tileset.
|
static Cesium3DTileset |
create(Promise<?,?> url) |
static Cesium3DTileset |
create(Resource url) |
static Cesium3DTileset |
create(String url) |
void |
destroy()
Destroys the WebGL resources held by this object.
|
Object |
extras()
Returns the extras property at the top-level of the tileset JSON, which contains application specific metadata.
|
boolean |
isDestroyed()
Returns true if this object was destroyed; otherwise, false.
|
static Promise<JsObject,Void> |
loadJson(String tilesetUrl)
Provides a hook to override the method used to request the tileset json useful when fetching tilesets from remote servers
|
void |
makeStyleDirty()
Marks the tileset's Cesium3DTileset#style as dirty, which forces all features to re-evaluate
the style in the next frame each is visible.
|
Object |
properties()
Gets the tileset's properties dictionary object, which contains metadata about per-feature properties.
|
boolean |
ready()
When true, the tileset's root tile is loaded and the tileset is ready to render.
|
Promise<Cesium3DTileset,Void> |
readyPromise()
Gets the promise that will be resolved when the tileset's root tile is loaded and the tileset is ready to render.
|
Cesium3DTile |
root()
The root tile.
|
boolean |
tilesLoaded()
When true, all tiles that meet the screen space error this frame are loaded.
|
int |
timeSinceLoad()
Returns the time, in milliseconds, since the tileset was loaded and first updated.
|
int |
totalMemoryUsageInBytes()
The total amount of GPU memory in bytes used by the tileset.
|
void |
trimLoadedTiles()
Unloads all tiles that weren't selected the previous frame.
|
void |
update()
Called when Viewer or CesiumWidget render the scene to get the draw commands needed to render this primitive.
|
String |
url()
The url to a tileset.json file or to a directory containing a tileset.json file.
|
@JsProperty public Event allTilesLoaded
@JsProperty public double baseScreenSpaceError
skipLevelOfDetail
is true.
Default: 1024public Ellipsoid ellipsoid
Ellipsoid.WGS84()
.@JsProperty public double foveatedConeSize
foveatedScreenSpaceError
is true to control the cone size that
determines which tiles are deferred. Tiles that are inside this cone are loaded immediately. Tiles outside the
cone are potentially deferred based on how far outside the cone they are and their screen space error.
This is controlled by foveatedInterpolationCallback
and foveatedMinimumScreenSpaceErrorRelaxation
.
Setting this to 0.0 means the cone will be the line formed by the camera position and its view direction.
Setting this to 1.0 means the cone encompasses the entire field of view of the camera, disabling the effect.
Default: 0.1@JsProperty public double foveatedMinimumScreenSpaceErrorRelaxation
foveatedScreenSpaceError
is true to control the starting screen
space error relaxation for tiles outside the foveated cone. The screen space error will be raised starting with
tileset value up to maximumScreenSpaceError
based on the provided foveatedInterpolationCallback
.
Default: 0.0@JsProperty public Cesium3DTileset.FoveatedInterpolationCallback foveatedInterpolationCallback
foveatedScreenSpaceError
is true to control how much to
raise the screen space error for tiles outside the foveated cone, interpolating
between foveatedMinimumScreenSpaceErrorRelaxation
and maximumScreenSpaceError
@JsProperty public ClippingPlaneCollection clippingPlanes
ClippingPlaneCollection
used to selectively disable rendering the tileset.
Clipping planes are not currently supported in Internet Explorer.@JsProperty public double colorBlendAmount
colorBlendMode
is MIX. A value of 0.0 results in the source color while a value
of 1.0 results in the feature color, with any value in-between resulting in a mix of
the source color and feature color.
Default: 0.5@JsProperty public Number colorBlendMode
@JsProperty public boolean cullRequestsWhileMoving
@JsProperty public double cullRequestsWhileMovingMultiplier
@JsProperty public boolean debugFreezeFrame
@JsProperty public boolean debugColorizeTiles
@JsProperty public boolean debugWireframe
@JsProperty public boolean debugShowBoundingVolume
@JsProperty public boolean debugShowContentBoundingVolume
@JsProperty public boolean debugShowViewerRequestVolume
@JsProperty public boolean debugShowGeometricError
@JsProperty public boolean debugShowRenderingStatistics
@JsProperty public boolean debugShowMemoryUsage
@JsProperty public boolean dynamicScreenSpaceError
@JsProperty public double dynamicScreenSpaceErrorDensity
@JsProperty public double dynamicScreenSpaceErrorFactor
@JsProperty public double dynamicScreenSpaceErrorHeightFalloff
@JsProperty public boolean immediatelyLoadDesiredLevelOfDetail
@JsProperty public Event initialTilesLoaded
allTilesLoaded
@JsProperty public Cartesian3 lightColor
@JsProperty public Event loadProgress
@JsProperty public boolean loadSiblings
@JsProperty public double luminanceAtZenith
Model.specularEnvironmentMaps
and
Model.sphericalHarmonicCoefficients
are not defined.
Default: 0.5@JsProperty public double maximumScreenSpaceError
@JsProperty public double maximumMemoryUsage
@JsProperty public Matrix4 modelMatrix
Matrix4.IDENTITY()
@JsProperty public PointCloudShading pointCloudShading
@JsProperty public boolean preloadFlightDestinations
@JsProperty public boolean preloadWhenHidden
@JsProperty public double progressiveResolutionHeightFraction
@JsProperty public boolean foveatedScreenSpaceError
foveatedConeSize
are loaded.
Default: true@JsProperty public double foveatedTimeDelay
foveatedScreenSpaceError
is true to control how long in seconds
to wait after the camera stops moving before deferred tiles start loading in. This time delay prevents requesting
tiles around the edges of the screen when the camera is moving.
Setting this to 0.0 will immediately request all tiles in any given view.
Default: 0.2@JsProperty public boolean preferLeaves
@JsProperty public Number shadows
ShadowMode.ENABLED()
@JsProperty public boolean show
@JsProperty public boolean skipLevelOfDetail
@JsProperty public double skipLevels
@JsProperty public double skipScreenSpaceErrorFactor
@JsProperty public String specularEnvironmentMaps
Model.sphericalHarmonicCoefficients
@JsProperty public Cartesian3[] sphericalHarmonicCoefficients
@JsProperty public Cesium3DTileStyle style
@JsProperty public Event tileFailed
@JsProperty public Event tileLoad
@JsProperty public Event tileUnload
@JsProperty public Event tileVisible
@JsConstructor public Cesium3DTileset(Cesium3DTilesetOptions options)
options
- Cesium3DTilesetOptions
@JsProperty(name="asset") public Object asset()
@JsProperty(name="basePath") public String basePath()
@JsProperty(name="boundingSphere") public BoundingSphere boundingSphere()
@JsProperty(name="classificationType") public ClassificationType classificationType()
@JsProperty(name="extras") public Object extras()
@JsProperty(name="properties") public Object properties()
@JsProperty(name="ready") public boolean ready()
@JsProperty(name="readyPromise") public Promise<Cesium3DTileset,Void> readyPromise()
@JsProperty(name="root") public Cesium3DTile root()
@JsProperty(name="tilesLoaded") public boolean tilesLoaded()
@JsProperty(name="timeSinceLoad") public int timeSinceLoad()
@JsProperty(name="totalMemoryUsageInBytes") public int totalMemoryUsageInBytes()
maximumMemoryUsage
@JsProperty(name="url") public String url()
@JsOverlay public static Cesium3DTileset create(String url)
@JsOverlay public static Cesium3DTileset create(Resource url)
@JsOverlay public static Cesium3DTileset create(Promise<?,?> url)
@JsMethod public static Promise<JsObject,Void> loadJson(String tilesetUrl)
tilesetUrl
- The url of the json file to be fetched@JsMethod public void destroy()
isDestroyed()
@JsMethod public boolean isDestroyed()
destroy()
@JsMethod public void makeStyleDirty()
@JsMethod public void trimLoadedTiles()
@JsMethod public void update()
Copyright © 2019. All rights reserved.