r3-legacy/src/r3-d3-api-geometry-buffer-p...

42 lines
1.0 KiB
JavaScript

/**
* R3.D3.API.Geometry.Buffer.Plane
* @param apiComponent
*
* @property width
* @property height
* @property widthSegments
* @property heightSegments
*
* @constructor
*/
R3.D3.API.Geometry.Buffer.Plane = function(
apiComponent
) {
__API_GEOMETRY_BUFFER__;
if (R3.Utils.UndefinedOrNull(apiComponent.width)) {
apiComponent.width = 1;
}
this.width = apiComponent.width;
if (R3.Utils.UndefinedOrNull(apiComponent.height)) {
apiComponent.height = 1;
}
this.height = apiComponent.height;
if (R3.Utils.UndefinedOrNull(apiComponent.widthSegments)) {
apiComponent.widthSegments = 1;
}
this.widthSegments = apiComponent.widthSegments;
if (R3.Utils.UndefinedOrNull(apiComponent.heightSegments)) {
apiComponent.heightSegments = 1;
}
this.heightSegments = apiComponent.heightSegments;
};
R3.D3.API.Geometry.Buffer.Plane.prototype = Object.create(R3.D3.API.Geometry.Buffer.prototype);
R3.D3.API.Geometry.Buffer.Plane.prototype.constructor = R3.D3.API.Geometry.Buffer.Plane;