r3-legacy/src/game-lib-d3-api-light-ambie...

33 lines
877 B
JavaScript
Raw Normal View History

2018-01-23 23:10:20 +01:00
/**
* Raw Light API object - should always correspond with the Light Schema
* @constructor
* @param apiLight
*/
GameLib.D3.API.Light.Ambient = function(
apiLight
) {
if (GameLib.Utils.UndefinedOrNull(apiLight)) {
apiLight = {
lightType : GameLib.D3.API.Light.LIGHT_TYPE_AMBIENT
};
}
2018-01-29 12:42:46 +01:00
if (GameLib.Utils.UndefinedOrNull(apiLight.lightType)) {
apiLight.lightType = GameLib.D3.API.Light.LIGHT_TYPE_AMBIENT;
}
2018-01-23 23:10:20 +01:00
GameLib.D3.API.Light.call(
this,
apiLight.id,
apiLight.name,
apiLight.lightType,
apiLight.color,
apiLight.intensity,
apiLight.parentScene,
apiLight.parentEntity
);
};
GameLib.D3.API.Light.Ambient.prototype = Object.create(GameLib.D3.API.Light.prototype);
GameLib.D3.API.Light.Ambient.prototype.constructor = GameLib.D3.API.Light.Ambient;