qd-changjing/public/static/Build/Documentation/CesiumWidget.html

2576 lines
87 KiB
HTML
Raw Normal View History

2022-07-05 16:56:29 +08:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CesiumWidget - Cesium Documentation</title>
<!--[if lt IE 9]>
<script src="javascript/html5.js"></script>
<![endif]-->
<link href="styles/jsdoc-default.css" rel="stylesheet">
<link href="styles/prism.css" rel="stylesheet">
</head>
<body>
<div id="main">
<h1 class="page-title">
<a href="index.html"><img src="Images/CesiumLogo.png" class="cesiumLogo"></a>
CesiumWidget
<div class="titleCenterer"></div>
</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
<div class="nameContainer">
<h4 class="name" id="CesiumWidget">
<a href="#CesiumWidget" class="doc-link"></a>
new Cesium.CesiumWidget<span class="signature">(container, <span class="optional">options</span>)</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/CesiumWidget/CesiumWidget.js#L181">Widgets/CesiumWidget/CesiumWidget.js 181</a>
</div>
</h4>
</div>
<div class="description">
A widget containing a Cesium scene.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>container</code></td>
<td class="type">
<span class="param-type">Element</span>
|
<span class="param-type">String</span>
</td>
<td class="description last">
The DOM element or ID that will contain the widget.</td>
</tr>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">
<span class="optional">optional</span>
Object with the following properties:
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>clock</code></td>
<td class="type">
<span class="param-type"><a href="Clock.html">Clock</a></span>
</td>
<td class="default">
<code class="language-javascript">new Clock()</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The clock to use to control current time.</td>
</tr>
<tr>
<td class="name"><code>imageryProvider</code></td>
<td class="type">
<span class="param-type"><a href="ImageryProvider.html">ImageryProvider</a></span>
|
<span class="param-type">false</span>
</td>
<td class="default">
<code class="language-javascript">createWorldImagery()</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The imagery provider to serve as the base layer. If set to <code>false</code>, no imagery provider will be added.</td>
</tr>
<tr>
<td class="name"><code>terrainProvider</code></td>
<td class="type">
<span class="param-type"><a href="TerrainProvider.html">TerrainProvider</a></span>
</td>
<td class="default">
<code class="language-javascript">new EllipsoidTerrainProvider</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The terrain provider.</td>
</tr>
<tr>
<td class="name"><code>skyBox</code></td>
<td class="type">
<span class="param-type"><a href="SkyBox.html">SkyBox</a></span>
|
<span class="param-type">false</span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The skybox used to render the stars. When <code>undefined</code>, the default stars are used. If set to <code>false</code>, no skyBox, Sun, or Moon will be added.</td>
</tr>
<tr>
<td class="name"><code>skyAtmosphere</code></td>
<td class="type">
<span class="param-type"><a href="SkyAtmosphere.html">SkyAtmosphere</a></span>
|
<span class="param-type">false</span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
Blue sky, and the glow around the Earth's limb. Set to <code>false</code> to turn it off.</td>
</tr>
<tr>
<td class="name"><code>sceneMode</code></td>
<td class="type">
<span class="param-type"><a href="global.html#SceneMode">SceneMode</a></span>
</td>
<td class="default">
<code class="language-javascript">SceneMode.SCENE3D</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The initial scene mode.</td>
</tr>
<tr>
<td class="name"><code>scene3DOnly</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">false</code>
</td>
<td class="description last">
<span class="optional">optional</span>
When <code>true</code>, each geometry instance will only be rendered in 3D to save GPU memory.</td>
</tr>
<tr>
<td class="name"><code>orderIndependentTranslucency</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">true</code>
</td>
<td class="description last">
<span class="optional">optional</span>
If true and the configuration supports it, use order independent translucency.</td>
</tr>
<tr>
<td class="name"><code>mapProjection</code></td>
<td class="type">
<span class="param-type"><a href="MapProjection.html">MapProjection</a></span>
</td>
<td class="default">
<code class="language-javascript">new GeographicProjection()</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The map projection to use in 2D and Columbus View modes.</td>
</tr>
<tr>
<td class="name"><code>globe</code></td>
<td class="type">
<span class="param-type"><a href="Globe.html">Globe</a></span>
|
<span class="param-type">false</span>
</td>
<td class="default">
<code class="language-javascript">new Globe(mapProjection.ellipsoid)</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The globe to use in the scene. If set to <code>false</code>, no globe will be added.</td>
</tr>
<tr>
<td class="name"><code>useDefaultRenderLoop</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">true</code>
</td>
<td class="description last">
<span class="optional">optional</span>
True if this widget should control the render loop, false otherwise.</td>
</tr>
<tr>
<td class="name"><code>useBrowserRecommendedResolution</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">true</code>
</td>
<td class="description last">
<span class="optional">optional</span>
If true, render at the browser's recommended resolution and ignore <code>window.devicePixelRatio</code>.</td>
</tr>
<tr>
<td class="name"><code>targetFrameRate</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The target frame rate when using the default render loop.</td>
</tr>
<tr>
<td class="name"><code>showRenderLoopErrors</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">true</code>
</td>
<td class="description last">
<span class="optional">optional</span>
If true, this widget will automatically display an HTML panel to the user containing the error, if a render loop error occurs.</td>
</tr>
<tr>
<td class="name"><code>contextOptions</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
Context and WebGL creation properties corresponding to <code>options</code> passed to <a href="Scene.html"><code>Scene</code></a>.</td>
</tr>
<tr>
<td class="name"><code>creditContainer</code></td>
<td class="type">
<span class="param-type">Element</span>
|
<span class="param-type">String</span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The DOM element or ID that will contain the <a href="CreditDisplay.html"><code>CreditDisplay</code></a>. If not specified, the credits are added
to the bottom of the widget itself.</td>
</tr>
<tr>
<td class="name"><code>creditViewport</code></td>
<td class="type">
<span class="param-type">Element</span>
|
<span class="param-type">String</span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The DOM element or ID that will contain the credit pop up created by the <a href="CreditDisplay.html"><code>CreditDisplay</code></a>. If not specified, it will appear over the widget itself.</td>
</tr>
<tr>
<td class="name"><code>shadows</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">false</code>
</td>
<td class="description last">
<span class="optional">optional</span>
Determines if shadows are cast by light sources.</td>
</tr>
<tr>
<td class="name"><code>terrainShadows</code></td>
<td class="type">
<span class="param-type"><a href="global.html#ShadowMode">ShadowMode</a></span>
</td>
<td class="default">
<code class="language-javascript">ShadowMode.RECEIVE_ONLY</code>
</td>
<td class="description last">
<span class="optional">optional</span>
Determines if the terrain casts or receives shadows from light sources.</td>
</tr>
<tr>
<td class="name"><code>mapMode2D</code></td>
<td class="type">
<span class="param-type"><a href="global.html#MapMode2D">MapMode2D</a></span>
</td>
<td class="default">
<code class="language-javascript">MapMode2D.INFINITE_SCROLL</code>
</td>
<td class="description last">
<span class="optional">optional</span>
Determines if the 2D map is rotatable or can be scrolled infinitely in the horizontal direction.</td>
</tr>
<tr>
<td class="name"><code>requestRenderMode</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">false</code>
</td>
<td class="description last">
<span class="optional">optional</span>
If true, rendering a frame will only occur when needed as determined by changes within the scene. Enabling improves performance of the application, but requires using <a href="Scene.html#requestRender"><code>Scene#requestRender</code></a> to render a new frame explicitly in this mode. This will be necessary in many cases after making changes to the scene in other parts of the API. See <a href="https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/">Improving Performance with Explicit Rendering</a>.</td>
</tr>
<tr>
<td class="name"><code>maximumRenderTimeChange</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
If requestRenderMode is true, this value defines the maximum change in simulation time allowed before a render is requested. See <a href="https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/">Improving Performance with Explicit Rendering</a>.</td>
</tr>
<tr>
<td class="name"><code>msaaSamples</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">1</code>
</td>
<td class="description last">
<span class="optional">optional</span>
If provided, this value controls the rate of multisample antialiasing. Typical multisampling rates are 2, 4, and sometimes 8 samples per pixel. Higher sampling rates of MSAA may impact performance in exchange for improved visual quality. This value only applies to WebGL2 contexts that support multisample render targets.</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<h5>Throws:</h5>
<ul>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: Element with id "container" does not exist in the document.
</div>
</li>
</ul>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">// For each example, include a link to CesiumWidget.css stylesheet in HTML head,
// and in the body, include: &lt;div id="cesiumContainer">&lt;/div>
//Widget with no terrain and default Bing Maps imagery provider.
const widget = new Cesium.CesiumWidget('cesiumContainer');
//Widget with ion imagery and Cesium World Terrain.
const widget2 = new Cesium.CesiumWidget('cesiumContainer', {
imageryProvider : Cesium.createWorldImagery(),
terrainProvider : Cesium.createWorldTerrain(),
skyBox : new Cesium.SkyBox({
sources : {
positiveX : 'stars/TychoSkymapII.t3_08192x04096_80_px.jpg',
negativeX : 'stars/TychoSkymapII.t3_08192x04096_80_mx.jpg',
positiveY : 'stars/TychoSkymapII.t3_08192x04096_80_py.jpg',
negativeY : 'stars/TychoSkymapII.t3_08192x04096_80_my.jpg',
positiveZ : 'stars/TychoSkymapII.t3_08192x04096_80_pz.jpg',
negativeZ : 'stars/TychoSkymapII.t3_08192x04096_80_mz.jpg'
}
}),
// Show Columbus View map with Web Mercator projection
sceneMode : Cesium.SceneMode.COLUMBUS_VIEW,
mapProjection : new Cesium.WebMercatorProjection()
});</code></pre>
<h5>Demo:</h5>
<ul class="see-list">
<li><a href="https://sandcastle.cesium.com/index.html?src=Cesium%2520Widget.html">Cesium Sandcastle Cesium Widget Demo</a></li>
</ul>
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<div class="nameContainer">
<h4 class="name" id="camera">
<a href="#camera" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span> camera<span class="type-signature"> : <a href="Camera.html">Camera</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/CesiumWidget/CesiumWidget.js#L490">Widgets/CesiumWidget/CesiumWidget.js 490</a>
</div>
</h4>
</div>
<div class="description">
Gets the camera.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="canvas">
<a href="#canvas" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span> canvas<span class="type-signature"> : HTMLCanvasElement</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/CesiumWidget/CesiumWidget.js#L410">Widgets/CesiumWidget/CesiumWidget.js 410</a>
</div>
</h4>
</div>
<div class="description">
Gets the canvas.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="clock">
<a href="#clock" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span> clock<span class="type-signature"> : <a href="Clock.html">Clock</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/CesiumWidget/CesiumWidget.js#L503">Widgets/CesiumWidget/CesiumWidget.js 503</a>
</div>
</h4>
</div>
<div class="description">
Gets the clock.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="container">
<a href="#container" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span> container<span class="type-signature"> : Element</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/CesiumWidget/CesiumWidget.js#L397">Widgets/CesiumWidget/CesiumWidget.js 397</a>
</div>
</h4>
</div>
<div class="description">
Gets the parent container.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="creditContainer">
<a href="#creditContainer" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span> creditContainer<span class="type-signature"> : Element</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/CesiumWidget/CesiumWidget.js#L423">Widgets/CesiumWidget/CesiumWidget.js 423</a>
</div>
</h4>
</div>
<div class="description">
Gets the credit container.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="creditViewport">
<a href="#creditViewport" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span> creditViewport<span class="type-signature"> : Element</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/CesiumWidget/CesiumWidget.js#L436">Widgets/CesiumWidget/CesiumWidget.js 436</a>
</div>
</h4>
</div>
<div class="description">
Gets the credit viewport
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="imageryLayers">
<a href="#imageryLayers" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span> imageryLayers<span class="type-signature"> : <a href="ImageryLayerCollection.html">ImageryLayerCollection</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/CesiumWidget/CesiumWidget.js#L462">Widgets/CesiumWidget/CesiumWidget.js 462</a>
</div>
</h4>
</div>
<div class="description">
Gets the collection of image layers that will be rendered on the globe.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="resolutionScale">
<a href="#resolutionScale" class="doc-link"></a>
resolutionScale<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/CesiumWidget/CesiumWidget.js#L587">Widgets/CesiumWidget/CesiumWidget.js 587</a>
</div>
</h4>
</div>
<div class="description">
Gets or sets a scaling factor for rendering resolution. Values less than 1.0 can improve
performance on less powerful devices while values greater than 1.0 will render at a higher
resolution and then scale down, resulting in improved visual fidelity.
For example, if the widget is laid out at a size of 640x480, setting this value to 0.5
will cause the scene to be rendered at 320x240 and then scaled up while setting
it to 2.0 will cause the scene to be rendered at 1280x960 and then scaled down.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">1.0</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="scene">
<a href="#scene" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span> scene<span class="type-signature"> : <a href="Scene.html">Scene</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/CesiumWidget/CesiumWidget.js#L449">Widgets/CesiumWidget/CesiumWidget.js 449</a>
</div>
</h4>
</div>
<div class="description">
Gets the scene.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="screenSpaceEventHandler">
<a href="#screenSpaceEventHandler" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span> screenSpaceEventHandler<span class="type-signature"> : <a href="ScreenSpaceEventHandler.html">ScreenSpaceEventHandler</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/CesiumWidget/CesiumWidget.js#L516">Widgets/CesiumWidget/CesiumWidget.js 516</a>
</div>
</h4>
</div>
<div class="description">
Gets the screen space event handler.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="targetFrameRate">
<a href="#targetFrameRate" class="doc-link"></a>
targetFrameRate<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/CesiumWidget/CesiumWidget.js#L531">Widgets/CesiumWidget/CesiumWidget.js 531</a>
</div>
</h4>
</div>
<div class="description">
Gets or sets the target frame rate of the widget when <code>useDefaultRenderLoop</code>
is true. If undefined, the browser's <a href="global.html#requestAnimationFrame"><code>requestAnimationFrame</code></a> implementation
determines the frame rate. If defined, this value must be greater than 0. A value higher
than the underlying requestAnimationFrame implementation will have no effect.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="terrainProvider">
<a href="#terrainProvider" class="doc-link"></a>
terrainProvider<span class="type-signature"> : <a href="TerrainProvider.html">TerrainProvider</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/CesiumWidget/CesiumWidget.js#L474">Widgets/CesiumWidget/CesiumWidget.js 474</a>
</div>
</h4>
</div>
<div class="description">
The terrain provider providing surface geometry for the globe.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="useBrowserRecommendedResolution">
<a href="#useBrowserRecommendedResolution" class="doc-link"></a>
useBrowserRecommendedResolution<span class="type-signature"> : Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/CesiumWidget/CesiumWidget.js#L616">Widgets/CesiumWidget/CesiumWidget.js 616</a>
</div>
</h4>
</div>
<div class="description">
Boolean flag indicating if the browser's recommended resolution is used.
If true, the browser's device pixel ratio is ignored and 1.0 is used instead,
effectively rendering based on CSS pixels instead of device pixels. This can improve
performance on less powerful devices that have high pixel density. When false, rendering
will be in device pixels. <a href="CesiumWidget.html#resolutionScale"><code>CesiumWidget#resolutionScale</code></a> will still take effect whether
this flag is true or false.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">true</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="useDefaultRenderLoop">
<a href="#useDefaultRenderLoop" class="doc-link"></a>
useDefaultRenderLoop<span class="type-signature"> : Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/CesiumWidget/CesiumWidget.js#L561">Widgets/CesiumWidget/CesiumWidget.js 561</a>
</div>
</h4>
</div>
<div class="description">
Gets or sets whether or not this widget should control the render loop.
If set to true the widget will use <a href="global.html#requestAnimationFrame"><code>requestAnimationFrame</code></a> to
perform rendering and resizing of the widget, as well as drive the
simulation clock. If set to false, you must manually call the
<code>resize</code>, <code>render</code> methods as part of a custom
render loop. If an error occurs during rendering, <a href="Scene.html"><code>Scene</code></a>'s
<code>renderError</code> event will be raised and this property
will be set to false. It must be set back to true to continue rendering
after the error.
</div>
<dl class="details">
</dl>
<h3 class="subsection-title">Methods</h3>
<div class="nameContainer">
<h4 class="name" id="destroy">
<a href="#destroy" class="doc-link"></a>
destroy<span class="signature">()</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/CesiumWidget/CesiumWidget.js#L749">Widgets/CesiumWidget/CesiumWidget.js 749</a>
</div>
</h4>
</div>
<div class="description">
Destroys the widget. Should be called if permanently
removing the widget from layout.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="isDestroyed">
<a href="#isDestroyed" class="doc-link"></a>
isDestroyed<span class="signature">()</span> &rarr; <span class="type-signature returnType">Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/CesiumWidget/CesiumWidget.js#L741">Widgets/CesiumWidget/CesiumWidget.js 741</a>
</div>
</h4>
</div>
<h5>Returns:</h5>
<div class="param-desc">
true if the object has been destroyed, false otherwise.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="render">
<a href="#render" class="doc-link"></a>
render<span class="signature">()</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/CesiumWidget/CesiumWidget.js#L786">Widgets/CesiumWidget/CesiumWidget.js 786</a>
</div>
</h4>
</div>
<div class="description">
Renders the scene. This function is called automatically
unless <code>useDefaultRenderLoop</code> is set to false;
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="resize">
<a href="#resize" class="doc-link"></a>
resize<span class="signature">()</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/CesiumWidget/CesiumWidget.js#L764">Widgets/CesiumWidget/CesiumWidget.js 764</a>
</div>
</h4>
</div>
<div class="description">
Updates the canvas size, camera aspect ratio, and viewport size.
This function is called automatically as needed unless
<code>useDefaultRenderLoop</code> is set to false.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="showErrorPanel">
<a href="#showErrorPanel" class="doc-link"></a>
showErrorPanel<span class="signature">(title, <span class="optional">message</span>, <span class="optional">error</span>)</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Widgets/CesiumWidget/CesiumWidget.js#L639">Widgets/CesiumWidget/CesiumWidget.js 639</a>
</div>
</h4>
</div>
<div class="description">
Show an error panel to the user containing a title and a longer error message,
which can be dismissed using an OK button. This panel is displayed automatically
when a render loop error occurs, if showRenderLoopErrors was not false when the
widget was constructed.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>title</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">
The title to be displayed on the error panel. This string is interpreted as text.</td>
</tr>
<tr>
<td class="name"><code>message</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">
<span class="optional">optional</span>
A helpful, user-facing message to display prior to the detailed error information. This string is interpreted as HTML.</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">
<span class="optional">optional</span>
The error to be displayed on the error panel. This string is formatted using <a href="global.html#formatError"><code>formatError</code></a> and then displayed as text.</td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
</article>
</section>
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a>
</footer>
</div>
<div class="nav">
<div class="menu">
<input type="text" class="classFilter" id="ClassFilter" placeholder="Search">
<ul id="ClassList"><li data-name="Animation"><a href="Animation.html">Animation</a></li><li data-name="AnimationViewModel"><a href="AnimationViewModel.html">AnimationViewModel</a></li><li data-name="Appearance"><a href="Appearance.html">Appearance</a></li><li data-name="ArcGisMapServerImageryProvider"><a href="ArcGisMapServerImageryProvider.html">ArcGisMapServerImageryProvider</a></li><li data-name="ArcGISTiledElevationTerrainProvider"><a href="ArcGISTiledElevationTerrainProvider.html">ArcGISTiledElevationTerrainProvider</a></li><li data-name="ArcType"><a href="global.html#ArcType">ArcType</a></li><li data-name="AssociativeArray"><a href="AssociativeArray.html">AssociativeArray</a></li><li data-name="Axis"><a href="global.html#Axis">Axis</a></li><li data-name="AxisAlignedBoundingBox"><a href="AxisAlignedBoundingBox.html">AxisAlignedBoundingBox</a></li><li data-name="backFaceCulling"><a href="global.html#backFaceCulling">backFaceCulling</a></li><li data-name="barycentricCoordinates"><a href="global.html#barycentricCoordinates">barycentricCoordinates</a></li><li data-name="BaseLayerPicker"><a href="BaseLayerPicker.html">BaseLayerPicker</a></li><li data-name="BaseLayerPickerViewModel"><a href="BaseLayerPickerViewModel.html">BaseLayerPickerViewModel</a></li><li data-name="Billboard"><a href="Billboard.html">Billboard</a></li><li data-name="BillboardCollection"><a href="BillboardCollection.html">BillboardCollection</a></li><li data-name="BillboardGraphics"><a href="BillboardGraphics.html">BillboardGraphics</a></li><li data-name="BillboardVisualizer"><a href="BillboardVisualizer.html">BillboardVisualizer</a></li><li data-name="binarySearch"><a href="global.html#binarySearch">binarySearch</a></li><li data-name="binarySearchComparator"><a href="global.html#binarySearchComparator">binarySearchComparator</a></li><li data-name="BingMapsGeocoderService"><a href="BingMapsGeocoderService.html">BingMapsGeocoderService</a></li><li data-name="BingMapsImageryProvider"><a href="BingMapsImageryProvider.html">BingMapsImageryProvider</a></li><li data-name="BingMapsStyle"><a href="global.html#BingMapsStyle">BingMapsStyle</a></li><li data-name="BlendEquation"><a href="global.html#BlendEquation">BlendEquation</a></li><li data-name="BlendFunction"><a href="global.html#BlendFunction">BlendFunction</a></li><li data-name="BlendingState"><a href="BlendingState.html">BlendingState</a></li><li data-name="BlendOption"><a href="global.html#BlendOption">BlendOption</a></li><li data-name="BoundingRectangle"><a href="BoundingRectangle.html">BoundingRectangle</a></li><li data-name="BoundingSphere"><a href="BoundingSphere.html">BoundingSphere</a></li><li data-name="boundingSphere"><a href="global.html#boundingSphere">boundingSphere</a></li><li data-name="BoxEmitter"><a href="BoxEmitter.html">BoxEmitter</a></li><li data-name="BoxGeometry"><a href="BoxGeometry.html">BoxGeometry</a></li><li data-name="BoxGeometryUpdater"><a href="BoxGeometryUpdater.html">BoxGeometryUpdater</a></li><li data-name="BoxGraphics"><a href="BoxGraphics.html">BoxGraphics</a></li><li data-name="BoxOutlineGeometry"><a href="BoxOutlineGeometry.html">BoxOutlineGeometry</a></li><li data-name="buildModuleUrl"><a href="global.html#buildModuleUrl">buildModuleUrl</a></li><li data-name="CallbackProperty"><a href="CallbackProperty.html">CallbackProperty</a></li><li data-name="Camera"><a href="Camera.html">Camera</a></li><li data-name="CameraEventAggregator"><a href="CameraEventAggregator.html">CameraEventAggregator</a></li><li data-name="CameraEventType"><a href="global.html#CameraEventType">CameraEventType</a></li><li data-name="cancelAnimationFrame"><a href="global.html#cancelAnimationFrame">cancelAnimationFrame</a></li><li data-name="Cartesian2"><a href="Cartesian2.html">Cartesian2</a></li><li data-name="Cartesian3"><a href="Cartesian3.html">Cartesian3</a></li><li data-name="Cartesian4"><a href="Cartesian4.html">Cartesian4</a></li><li data-name="Cartographic"><a href="Cartographic.html">Cartographic</a></li><li data-name="CartographicGeocoderService"><a href="CartographicGeocoderServic
</div>
</div>
<script>
if (window.frameElement) {
document.body.className = 'embedded';
var ele = document.createElement('a');
ele.className = 'popout';
ele.target = '_blank';
ele.href = window.location.href;
ele.title = 'Pop out';
document.getElementById('main').appendChild(ele);
}
// Set targets on external links. Sandcastle and GitHub shouldn't be embedded in any iframe.
Array.prototype.forEach.call(document.getElementsByTagName('a'), function(a) {
if (/^https?:/i.test(a.getAttribute('href'))) {
a.target='_blank';
}
});
</script>
<script src="javascript/prism.js"></script>
<script src="javascript/cesiumDoc.js"></script>
</body>
</html>