The container for all 3D graphical objects and state in a Cesium virtual scene. Generally,
a scene is not created directly; instead, it is implicitly created by CesiumWidget
webgl.alpha defaults to false, which can improve performance compared to the standard WebGL default
of true. If an application needs to composite Cesium above other HTML elements using alpha-blending, set
webgl.alpha to true.
allowTextureFilterAnisotropic defaults to true, which enables anisotropic texture filtering when the
WebGL extension is supported. Setting this to false will improve performance, but hurt visual quality, especially for horizon views.
alias Scene
- The options object takes the following properties
- {Canvas} options.canvas The HTML canvas element to create the scene for.
- {Object} [options.contextOptions] Context and WebGL creation properties. See details above.
- {Element} [options.creditContainer] The HTML element in which the credits will be displayed.
- {MapProjection} [options.mapProjection=new GeographicProjection()] The map projection to use in 2D and Columbus View modes.
- {Boolean} [options.orderIndependentTranslucency=true] If true and the configuration supports it, use order independent translucency.
- {Boolean} [options.scene3DOnly=false] If true, optimizes memory use and performance for 3D mode but disables the ability to use 2D or Columbus View.
- {Number} [options.terrainExaggeration=1.0] A scalar used to exaggerate the terrain. Note that terrain exaggeration will not modify any other primitive as they are positioned relative to the ellipsoid.
Annotations
@RawJSType()@native()@JSName("Cesium.Scene")
Example:
// Create scene without anisotropic texture filtering
var scene = new Cesium.Scene({
canvas : canvas,
contextOptions : {
allowTextureFilterAnisotropic : false
}
});
The container for all 3D graphical objects and state in a Cesium virtual scene. Generally, a scene is not created directly; instead, it is implicitly created by CesiumWidget
contextOptions
parameter details:The default values are:
{ webgl : { alpha : false, depth : true, stencil : false, antialias : true, premultipliedAlpha : true, preserveDrawingBuffer : false, failIfMajorPerformanceCaveat : false }, allowTextureFilterAnisotropic : true }
The
webgl
property corresponds to the http://www.khronos.org/registry/webgl/specs/latest/#5.2|WebGLContextAttributes object used to create the WebGL context.webgl.alpha
defaults to false, which can improve performance compared to the standard WebGL default of true. If an application needs to composite Cesium above other HTML elements using alpha-blending, setwebgl.alpha
to true.The other
webgl
properties match the WebGL defaults for http://www.khronos.org/registry/webgl/specs/latest/#5.2|WebGLContextAttributesallowTextureFilterAnisotropic
defaults to true, which enables anisotropic texture filtering when the WebGL extension is supported. Setting this to false will improve performance, but hurt visual quality, especially for horizon views.alias Scene
- The options object takes the following properties - {Canvas} options.canvas The HTML canvas element to create the scene for. - {Object} [options.contextOptions] Context and WebGL creation properties. See details above. - {Element} [options.creditContainer] The HTML element in which the credits will be displayed. - {MapProjection} [options.mapProjection=new GeographicProjection()] The map projection to use in 2D and Columbus View modes. - {Boolean} [options.orderIndependentTranslucency=true] If true and the configuration supports it, use order independent translucency. - {Boolean} [options.scene3DOnly=false] If true, optimizes memory use and performance for 3D mode but disables the ability to use 2D or Columbus View. - {Number} [options.terrainExaggeration=1.0] A scalar used to exaggerate the terrain. Note that terrain exaggeration will not modify any other primitive as they are positioned relative to the ellipsoid.
// Create scene without anisotropic texture filtering var scene = new Cesium.Scene({ canvas : canvas, contextOptions : { allowTextureFilterAnisotropic : false } });
http://www.khronos.org/registry/webgl/specs/latest/#5.2|WebGLContextAttributes exception {DeveloperError} options and options.canvas are required.
CesiumWidget