123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- define([
- '../Core/Color',
- '../Core/defined',
- '../Core/defineProperties',
- '../Core/DeveloperError',
- '../Scene/Material'
- ], function(
- Color,
- defined,
- defineProperties,
- DeveloperError,
- Material) {
- "use strict";
-
- var MaterialProperty = function() {
- DeveloperError.throwInstantiationError();
- };
- defineProperties(MaterialProperty.prototype, {
-
- isConstant : {
- get : DeveloperError.throwInstantiationError
- },
-
- definitionChanged : {
- get : DeveloperError.throwInstantiationError
- }
- });
-
- MaterialProperty.prototype.getType = DeveloperError.throwInstantiationError;
-
- MaterialProperty.prototype.getValue = DeveloperError.throwInstantiationError;
-
- MaterialProperty.prototype.equals = DeveloperError.throwInstantiationError;
-
- MaterialProperty.getValue = function(time, materialProperty, material) {
- var type;
- if (defined(materialProperty)) {
- type = materialProperty.getType(time);
- if (defined(type)) {
- if (!defined(material) || (material.type !== type)) {
- material = Material.fromType(type);
- }
- materialProperty.getValue(time, material.uniforms);
- return material;
- }
- }
- if (!defined(material) || (material.type !== Material.ColorType)) {
- material = Material.fromType(Material.ColorType);
- }
- Color.clone(Color.WHITE, material.uniforms.color);
- return material;
- };
- return MaterialProperty;
- });
|