Sha256: 17dc3e46ae36db8fe33f956dc3be9a085e9022b4009b549c8b6b0477819b21c7
Contents?: true
Size: 1.72 KB
Versions: 1
Compression:
Stored size: 1.72 KB
Contents
/*global define*/ define(['Core/Color', 'Core/defined', 'DynamicScene/ConstantProperty'], function( Color, defined, ConstantProperty) { "use strict"; /** * A {@link MaterialProperty} that maps to solid color {@link Material} uniforms. * @alias ColorMaterialProperty * @constructor */ var ColorMaterialProperty = function() { /** * A {@link Color} {@link Property} which determines the material's color. * @type {Property} * @default new ConstantProperty(Color.WHITE) */ this.color = new ConstantProperty(Color.WHITE); }; /** * Gets the {@link Material} type at the provided time. * @memberof ColorMaterialProperty * * @param {JulianDate} time The time for which to retrieve the type. * @type {String} The type of material. */ ColorMaterialProperty.prototype.getType = function(time) { return 'Color'; }; /** * Gets the value of the property at the provided time. * @memberof ColorMaterialProperty * * @param {JulianDate} time The time for which to retrieve the value. * @param {Object} [result] The object to store the value into, if omitted, a new instance is created and returned. * @returns {Object} The modified result parameter or a new instance if the result parameter was not supplied. * * @exception {DeveloperError} time is required. */ ColorMaterialProperty.prototype.getValue = function(time, result) { if (!defined(result)) { result = {}; } result.color = defined(this.color) ? this.color.getValue(time, result.color) : undefined; return result; }; return ColorMaterialProperty; });
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cesium-0.21.1 | app/assets/javascripts/DynamicScene/ColorMaterialProperty.js |