r3-legacy/src/r3-d3-api-light-ambient.js

33 lines
827 B
JavaScript
Raw Normal View History

2018-04-09 09:35:04 +02:00
/**
* Raw Light API object - should always correspond with the Light Schema
* @constructor
* @param apiLight
*/
R3.D3.API.Light.Ambient = function(
apiLight
) {
if (R3.Utils.UndefinedOrNull(apiLight)) {
apiLight = {
lightType : R3.D3.API.Light.LIGHT_TYPE_AMBIENT
};
}
if (R3.Utils.UndefinedOrNull(apiLight.lightType)) {
apiLight.lightType = R3.D3.API.Light.LIGHT_TYPE_AMBIENT;
}
R3.D3.API.Light.call(
this,
apiLight.id,
apiLight.name,
apiLight.lightType,
apiLight.color,
apiLight.intensity,
apiLight.parentScene,
apiLight.parentEntity
);
};
R3.D3.API.Light.Ambient.prototype = Object.create(R3.D3.API.Light.prototype);
R3.D3.API.Light.Ambient.prototype.constructor = R3.D3.API.Light.Ambient;