57 lines
1.4 KiB
JavaScript
57 lines
1.4 KiB
JavaScript
/**
|
|
* R3.D3.API.Material.Points
|
|
* @param apiComponent
|
|
*
|
|
* @property color
|
|
* @property diffuseMap
|
|
* @property morphTargets
|
|
* @property size
|
|
* @property sizeAttenuation
|
|
*
|
|
* @constructor
|
|
*/
|
|
R3.D3.API.Material.Points = function(
|
|
apiComponent
|
|
) {
|
|
|
|
__API_MATERIAL__;
|
|
|
|
if (R3.Utils.UndefinedOrNull(apiComponent.color)) {
|
|
apiComponent.color = new R3.API.Color(
|
|
{
|
|
parent : this,
|
|
register : true,
|
|
r : 1,
|
|
g : 1,
|
|
b : 1,
|
|
a : 1
|
|
}
|
|
);
|
|
}
|
|
this.color = apiComponent.color;
|
|
|
|
if (R3.Utils.UndefinedOrNull(apiComponent.diffuseMap)) {
|
|
apiComponent.diffuseMap = null;
|
|
}
|
|
this.diffuseMap = apiComponent.diffuseMap;
|
|
|
|
if (R3.Utils.UndefinedOrNull(apiComponent.morphTargets)) {
|
|
apiComponent.morphTargets = false;
|
|
}
|
|
this.morphTargets = apiComponent.morphTargets;
|
|
|
|
if (R3.Utils.UndefinedOrNull(apiComponent.size)) {
|
|
apiComponent.size = 1;
|
|
}
|
|
this.size = apiComponent.size;
|
|
|
|
if (R3.Utils.UndefinedOrNull(apiComponent.sizeAttenuation)) {
|
|
apiComponent.sizeAttenuation = true;
|
|
}
|
|
this.sizeAttenuation = apiComponent.sizeAttenuation;
|
|
|
|
};
|
|
|
|
R3.D3.API.Material.Points.prototype = Object.create(R3.D3.API.Material.prototype);
|
|
R3.D3.API.Material.Points.prototype.constructor = R3.D3.API.Material.Points;
|