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

3121 lines
94 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>Material - 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>
Material
<div class="titleCenterer"></div>
</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
<div class="nameContainer">
<h4 class="name" id="Material">
<a href="#Material" class="doc-link"></a>
new Cesium.Material<span class="signature">(<span class="optional">options</span>)</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L270">Scene/Material.js 270</a>
</div>
</h4>
</div>
<div class="description">
A Material defines surface appearance through a combination of diffuse, specular,
normal, emission, and alpha components. These values are specified using a
JSON schema called Fabric which gets parsed and assembled into glsl shader code
behind-the-scenes. Check out the <a href="https://github.com/CesiumGS/cesium/wiki/Fabric">wiki page</a>
for more details on Fabric.
<br /><br />
<style type="text/css">
#materialDescriptions code {
font-weight: normal;
font-family: Consolas, 'Lucida Console', Monaco, monospace;
color: #A35A00;
}
#materialDescriptions ul, #materialDescriptions ul ul {
list-style-type: none;
}
#materialDescriptions ul ul {
margin-bottom: 10px;
}
#materialDescriptions ul ul li {
font-weight: normal;
color: #000000;
text-indent: -2em;
margin-left: 2em;
}
#materialDescriptions ul li {
font-weight: bold;
color: #0053CF;
}
</style>
Base material types and their uniforms:
<div id='materialDescriptions'>
<ul>
<li>Color</li>
<ul>
<li><code>color</code>: rgba color object.</li>
</ul>
<li>Image</li>
<ul>
<li><code>image</code>: path to image.</li>
<li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
</ul>
<li>DiffuseMap</li>
<ul>
<li><code>image</code>: path to image.</li>
<li><code>channels</code>: Three character string containing any combination of r, g, b, and a for selecting the desired image channels.</li>
<li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
</ul>
<li>AlphaMap</li>
<ul>
<li><code>image</code>: path to image.</li>
<li><code>channel</code>: One character string containing r, g, b, or a for selecting the desired image channel. </li>
<li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
</ul>
<li>SpecularMap</li>
<ul>
<li><code>image</code>: path to image.</li>
<li><code>channel</code>: One character string containing r, g, b, or a for selecting the desired image channel. </li>
<li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
</ul>
<li>EmissionMap</li>
<ul>
<li><code>image</code>: path to image.</li>
<li><code>channels</code>: Three character string containing any combination of r, g, b, and a for selecting the desired image channels. </li>
<li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
</ul>
<li>BumpMap</li>
<ul>
<li><code>image</code>: path to image.</li>
<li><code>channel</code>: One character string containing r, g, b, or a for selecting the desired image channel. </li>
<li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
<li><code>strength</code>: Bump strength value between 0.0 and 1.0 where 0.0 is small bumps and 1.0 is large bumps.</li>
</ul>
<li>NormalMap</li>
<ul>
<li><code>image</code>: path to image.</li>
<li><code>channels</code>: Three character string containing any combination of r, g, b, and a for selecting the desired image channels. </li>
<li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
<li><code>strength</code>: Bump strength value between 0.0 and 1.0 where 0.0 is small bumps and 1.0 is large bumps.</li>
</ul>
<li>Grid</li>
<ul>
<li><code>color</code>: rgba color object for the whole material.</li>
<li><code>cellAlpha</code>: Alpha value for the cells between grid lines. This will be combined with color.alpha.</li>
<li><code>lineCount</code>: Object with x and y values specifying the number of columns and rows respectively.</li>
<li><code>lineThickness</code>: Object with x and y values specifying the thickness of grid lines (in pixels where available).</li>
<li><code>lineOffset</code>: Object with x and y values specifying the offset of grid lines (range is 0 to 1).</li>
</ul>
<li>Stripe</li>
<ul>
<li><code>horizontal</code>: Boolean that determines if the stripes are horizontal or vertical.</li>
<li><code>evenColor</code>: rgba color object for the stripe's first color.</li>
<li><code>oddColor</code>: rgba color object for the stripe's second color.</li>
<li><code>offset</code>: Number that controls at which point into the pattern to begin drawing; with 0.0 being the beginning of the even color, 1.0 the beginning of the odd color, 2.0 being the even color again, and any multiple or fractional values being in between.</li>
<li><code>repeat</code>: Number that controls the total number of stripes, half light and half dark.</li>
</ul>
<li>Checkerboard</li>
<ul>
<li><code>lightColor</code>: rgba color object for the checkerboard's light alternating color.</li>
<li><code>darkColor</code>: rgba color object for the checkerboard's dark alternating color.</li>
<li><code>repeat</code>: Object with x and y values specifying the number of columns and rows respectively.</li>
</ul>
<li>Dot</li>
<ul>
<li><code>lightColor</code>: rgba color object for the dot color.</li>
<li><code>darkColor</code>: rgba color object for the background color.</li>
<li><code>repeat</code>: Object with x and y values specifying the number of columns and rows of dots respectively.</li>
</ul>
<li>Water</li>
<ul>
<li><code>baseWaterColor</code>: rgba color object base color of the water.</li>
<li><code>blendColor</code>: rgba color object used when blending from water to non-water areas.</li>
<li><code>specularMap</code>: Single channel texture used to indicate areas of water.</li>
<li><code>normalMap</code>: Normal map for water normal perturbation.</li>
<li><code>frequency</code>: Number that controls the number of waves.</li>
<li><code>animationSpeed</code>: Number that controls the animations speed of the water.</li>
<li><code>amplitude</code>: Number that controls the amplitude of water waves.</li>
<li><code>specularIntensity</code>: Number that controls the intensity of specular reflections.</li>
</ul>
<li>RimLighting</li>
<ul>
<li><code>color</code>: diffuse color and alpha.</li>
<li><code>rimColor</code>: diffuse color and alpha of the rim.</li>
<li><code>width</code>: Number that determines the rim's width.</li>
</ul>
<li>Fade</li>
<ul>
<li><code>fadeInColor</code>: diffuse color and alpha at <code>time</code></li>
<li><code>fadeOutColor</code>: diffuse color and alpha at <code>maximumDistance</code> from <code>time</code></li>
<li><code>maximumDistance</code>: Number between 0.0 and 1.0 where the <code>fadeInColor</code> becomes the <code>fadeOutColor</code>. A value of 0.0 gives the entire material a color of <code>fadeOutColor</code> and a value of 1.0 gives the the entire material a color of <code>fadeInColor</code></li>
<li><code>repeat</code>: true if the fade should wrap around the texture coodinates.</li>
<li><code>fadeDirection</code>: Object with x and y values specifying if the fade should be in the x and y directions.</li>
<li><code>time</code>: Object with x and y values between 0.0 and 1.0 of the <code>fadeInColor</code> position</li>
</ul>
<li>PolylineArrow</li>
<ul>
<li><code>color</code>: diffuse color and alpha.</li>
</ul>
<li>PolylineDash</li>
<ul>
<li><code>color</code>: color for the line.</li>
<li><code>gapColor</code>: color for the gaps in the line.</li>
<li><code>dashLength</code>: Dash length in pixels.</li>
<li><code>dashPattern</code>: The 16 bit stipple pattern for the line..</li>
</ul>
<li>PolylineGlow</li>
<ul>
<li><code>color</code>: color and maximum alpha for the glow on the line.</li>
<li><code>glowPower</code>: strength of the glow, as a percentage of the total line width (less than 1.0).</li>
<li><code>taperPower</code>: strength of the tapering effect, as a percentage of the total line length. If 1.0 or higher, no taper effect is used.</li>
</ul>
<li>PolylineOutline</li>
<ul>
<li><code>color</code>: diffuse color and alpha for the interior of the line.</li>
<li><code>outlineColor</code>: diffuse color and alpha for the outline.</li>
<li><code>outlineWidth</code>: width of the outline in pixels.</li>
</ul>
<li>ElevationContour</li>
<ul>
<li><code>color</code>: color and alpha for the contour line.</li>
<li><code>spacing</code>: spacing for contour lines in meters.</li>
<li><code>width</code>: Number specifying the width of the grid lines in pixels.</li>
</ul>
<li>ElevationRamp</li>
<ul>
<li><code>image</code>: color ramp image to use for coloring the terrain.</li>
<li><code>minimumHeight</code>: minimum height for the ramp.</li>
<li><code>maximumHeight</code>: maximum height for the ramp.</li>
</ul>
<li>SlopeRamp</li>
<ul>
<li><code>image</code>: color ramp image to use for coloring the terrain by slope.</li>
</ul>
<li>AspectRamp</li>
<ul>
<li><code>image</code>: color ramp image to use for color the terrain by aspect.</li>
</ul>
<li>ElevationBand</li>
<ul>
<li><code>heights</code>: image of heights sorted from lowest to highest.</li>
<li><code>colors</code>: image of colors at the corresponding heights.</li>
</ul>
</ul>
</ul>
</div>
</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>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>strict</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>
Throws errors for issues that would normally be ignored, including unused uniforms or materials.</td>
</tr>
<tr>
<td class="name"><code>translucent</code></td>
<td class="type">
<span class="param-type">Boolean</span>
|
<span class="param-type">function</span>
</td>
<td class="default">
<code class="language-javascript">true</code>
</td>
<td class="description last">
<span class="optional">optional</span>
When <code>true</code> or a function that returns <code>true</code>, the geometry
with this material is expected to appear translucent.</td>
</tr>
<tr>
<td class="name"><code>minificationFilter</code></td>
<td class="type">
<span class="param-type"><a href="global.html#TextureMinificationFilter">TextureMinificationFilter</a></span>
</td>
<td class="default">
<code class="language-javascript">TextureMinificationFilter.LINEAR</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The <a href="global.html#TextureMinificationFilter"><code>TextureMinificationFilter</code></a> to apply to this material's textures.</td>
</tr>
<tr>
<td class="name"><code>magnificationFilter</code></td>
<td class="type">
<span class="param-type"><a href="global.html#TextureMagnificationFilter">TextureMagnificationFilter</a></span>
</td>
<td class="default">
<code class="language-javascript">TextureMagnificationFilter.LINEAR</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The <a href="global.html#TextureMagnificationFilter"><code>TextureMagnificationFilter</code></a> to apply to this material's textures.</td>
</tr>
<tr>
<td class="name"><code>fabric</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="default">
</td>
<td class="description last">
The fabric JSON used to generate the material.</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>
: fabric: uniform has invalid type.
</div>
</li>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: fabric: uniforms and materials cannot share the same property.
</div>
</li>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: fabric: cannot have source and components in the same section.
</div>
</li>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: fabric: property name is not valid. It should be 'type', 'materials', 'uniforms', 'components', or 'source'.
</div>
</li>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: fabric: property name is not valid. It should be 'diffuse', 'specular', 'shininess', 'normal', 'emission', or 'alpha'.
</div>
</li>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: strict: shader source does not use string.
</div>
</li>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: strict: shader source does not use uniform.
</div>
</li>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: strict: shader source does not use material.
</div>
</li>
</ul>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">// Create a color material with fromType:
polygon.material = Cesium.Material.fromType('Color');
polygon.material.uniforms.color = new Cesium.Color(1.0, 1.0, 0.0, 1.0);
// Create the default material:
polygon.material = new Cesium.Material();
// Create a color material with full Fabric notation:
polygon.material = new Cesium.Material({
fabric : {
type : 'Color',
uniforms : {
color : new Cesium.Color(1.0, 1.0, 0.0, 1.0)
}
}
});</code></pre>
<h5>Demo:</h5>
<ul class="see-list">
<li><a href="https://sandcastle.cesium.com/index.html?src=Materials.html">Cesium Sandcastle Materials Demo</a></li>
</ul>
<h5>See:</h5>
<ul class="see-list">
<li><a href="https://github.com/CesiumGS/cesium/wiki/Fabric">Fabric wiki page</a> for a more detailed options of Fabric.</li>
</ul>
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<div class="nameContainer">
<h4 class="name" id=".AlphaMapType">
<a href="#.AlphaMapType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.AlphaMapType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1303">Scene/Material.js 1303</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the alpha map material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".AspectRampMaterialType">
<a href="#.AspectRampMaterialType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.AspectRampMaterialType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1713">Scene/Material.js 1713</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the aspect ramp material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".BumpMapType">
<a href="#.BumpMapType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.BumpMapType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1366">Scene/Material.js 1366</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the bump map material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".CheckerboardType">
<a href="#.CheckerboardType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.CheckerboardType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1454">Scene/Material.js 1454</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the checkerboard material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".ColorType">
<a href="#.ColorType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.ColorType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1235">Scene/Material.js 1235</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the color material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".DefaultCubeMapId">
<a href="#.DefaultCubeMapId" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Material.DefaultCubeMapId<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1228">Scene/Material.js 1228</a>
</div>
</h4>
</div>
<div class="description">
Gets or sets the default cube map texture uniform value.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".DefaultImageId">
<a href="#.DefaultImageId" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Material.DefaultImageId<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1222">Scene/Material.js 1222</a>
</div>
</h4>
</div>
<div class="description">
Gets or sets the default texture uniform value.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".DiffuseMapType">
<a href="#.DiffuseMapType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.DiffuseMapType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1282">Scene/Material.js 1282</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the diffuce map material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".DotType">
<a href="#.DotType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.DotType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1476">Scene/Material.js 1476</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the dot material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".ElevationBandType">
<a href="#.ElevationBandType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.ElevationBandType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1730">Scene/Material.js 1730</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the elevation band material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".ElevationContourType">
<a href="#.ElevationContourType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.ElevationContourType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1658">Scene/Material.js 1658</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the elevation contour material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".ElevationRampType">
<a href="#.ElevationRampType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.ElevationRampType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1677">Scene/Material.js 1677</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the elevation contour material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".EmissionMapType">
<a href="#.EmissionMapType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.EmissionMapType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1345">Scene/Material.js 1345</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the emmision map material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".FadeType">
<a href="#.FadeType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.FadeType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1550">Scene/Material.js 1550</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the fade material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".GridType">
<a href="#.GridType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.GridType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1406">Scene/Material.js 1406</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the grid material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".ImageType">
<a href="#.ImageType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.ImageType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1257">Scene/Material.js 1257</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the image material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".NormalMapType">
<a href="#.NormalMapType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.NormalMapType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1386">Scene/Material.js 1386</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the normal map material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".PolylineArrowType">
<a href="#.PolylineArrowType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.PolylineArrowType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1580">Scene/Material.js 1580</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the polyline arrow material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".PolylineDashType">
<a href="#.PolylineDashType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.PolylineDashType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1597">Scene/Material.js 1597</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the polyline glow material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".PolylineGlowType">
<a href="#.PolylineGlowType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.PolylineGlowType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1617">Scene/Material.js 1617</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the polyline glow material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".PolylineOutlineType">
<a href="#.PolylineOutlineType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.PolylineOutlineType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1636">Scene/Material.js 1636</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the polyline outline material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".RimLightingType">
<a href="#.RimLightingType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.RimLightingType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1528">Scene/Material.js 1528</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the rim lighting material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".SlopeRampMaterialType">
<a href="#.SlopeRampMaterialType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.SlopeRampMaterialType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1696">Scene/Material.js 1696</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the slope ramp material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".SpecularMapType">
<a href="#.SpecularMapType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.SpecularMapType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1324">Scene/Material.js 1324</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the specular map material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".StripeType">
<a href="#.StripeType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.StripeType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1430">Scene/Material.js 1430</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the stripe material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".WaterType">
<a href="#.WaterType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-readonly">readonly</span> Cesium.Material.WaterType<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L1498">Scene/Material.js 1498</a>
</div>
</h4>
</div>
<div class="description">
Gets the name of the water material.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="materials">
<a href="#materials" class="doc-link"></a>
materials<span class="type-signature"> : Object</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L290">Scene/Material.js 290</a>
</div>
</h4>
</div>
<div class="description">
Maps sub-material names to Material objects.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">undefined</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="shaderSource">
<a href="#shaderSource" class="doc-link"></a>
shaderSource<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L283">Scene/Material.js 283</a>
</div>
</h4>
</div>
<div class="description">
The glsl shader source for this material.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">undefined</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="translucent">
<a href="#translucent" class="doc-link"></a>
translucent<span class="type-signature"> : Boolean|function</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L306">Scene/Material.js 306</a>
</div>
</h4>
</div>
<div class="description">
When <code>true</code> or a function that returns <code>true</code>,
the geometry is expected to appear translucent.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">undefined</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="type">
<a href="#type" class="doc-link"></a>
type<span class="type-signature"> : String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L276">Scene/Material.js 276</a>
</div>
</h4>
</div>
<div class="description">
The material type. Can be an existing type or a new type. If no type is specified in fabric, type is a GUID.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">undefined</code>
</dl>
<div class="nameContainer">
<h4 class="name" id="uniforms">
<a href="#uniforms" class="doc-link"></a>
uniforms<span class="type-signature"> : Object</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L297">Scene/Material.js 297</a>
</div>
</h4>
</div>
<div class="description">
Maps uniform names to their values.
</div>
<dl class="details">
<span class="details-header">Default Value:</span>
<code class="language-javascript">undefined</code>
</dl>
<h3 class="subsection-title">Methods</h3>
<div class="nameContainer">
<h4 class="name" id=".fromType">
<a href="#.fromType" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Material.fromType<span class="signature">(type, <span class="optional">uniforms</span>)</span> &rarr; <span class="type-signature returnType"><a href="Material.html">Material</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Scene/Material.js#L364">Scene/Material.js 364</a>
</div>
</h4>
</div>
<div class="description">
Creates a new material using an existing material type.
<br /><br />
Shorthand for: new Material({fabric : {type : type}});
</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>type</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">
The base material type.</td>
</tr>
<tr>
<td class="name"><code>uniforms</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">
<span class="optional">optional</span>
Overrides for the default uniforms.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
New material object.
</div>
<h5>Throws:</h5>
<ul>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: material with that type does not exist.
</div>
</li>
</ul>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">const material = Cesium.Material.fromType('Color', {
color : new Cesium.Color(1.0, 0.0, 0.0, 1.0)
});</code></pre>
</dl>
<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/Scene/Material.js#L565">Scene/Material.js 565</a>
</div>
</h4>
</div>
<div class="description">
Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
release of WebGL resources, instead of relying on the garbage collector to destroy this object.
<br /><br />
Once an object is destroyed, it should not be used; calling any function other than
<code>isDestroyed</code> will result in a <a href="DeveloperError.html"><code>DeveloperError</code></a> exception. Therefore,
assign the return value (<code>undefined</code>) to the object as done in the example.
</div>
<h5>Throws:</h5>
<ul>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: This object was destroyed, i.e., destroy() was called.
</div>
</li>
</ul>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">material = material &amp;&amp; material.destroy();</code></pre>
<h5>See:</h5>
<ul class="see-list">
<li><a href="Material.html#isDestroyed">Material#isDestroyed</a></li>
</ul>
</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/Scene/Material.js#L545">Scene/Material.js 545</a>
</div>
</h4>
</div>
<div class="description">
Returns true if this object was destroyed; otherwise, false.
<br /><br />
If this object was destroyed, it should not be used; calling any function other than
<code>isDestroyed</code> will result in a <a href="DeveloperError.html"><code>DeveloperError</code></a> exception.
</div>
<h5>Returns:</h5>
<div class="param-desc">
True if this object was destroyed; otherwise, false.
</div>
<dl class="details">
<h5>See:</h5>
<ul class="see-list">
<li><a href="Material.html#destroy">Material#destroy</a></li>
</ul>
</dl>
<div class="nameContainer">
<h4 class="name" id="isTranslucent">
<a href="#isTranslucent" class="doc-link"></a>
isTranslucent<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/Scene/Material.js#L392">Scene/Material.js 392</a>
</div>
</h4>
</div>
<div class="description">
Gets whether or not this material is translucent.
</div>
<h5>Returns:</h5>
<div class="param-desc">
<code>true</code> if this material is translucent, <code>false</code> otherwise.
</div>
<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>