123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- import Color from "../Core/Color.js";
- import defined from "../Core/defined.js";
- import DeveloperError from "../Core/DeveloperError.js";
- import Material from "../Scene/Material.js";
- function MaterialProperty() {
- DeveloperError.throwInstantiationError();
- }
- Object.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;
- };
- export default MaterialProperty;
|