36 lines
1.0 KiB
JavaScript
36 lines
1.0 KiB
JavaScript
/**
|
|
* R3.D3.API.Viewport.FixedAspect.VR
|
|
*
|
|
* Respect the aspectRatio setting and adjust viewport x,y,width and height accordingly
|
|
* - entire viewport remains visible at all times
|
|
* - will have empty space above or below viewport depending on canvas size (if canvas ratio != viewport ratio)
|
|
*
|
|
* @param apiComponent
|
|
*
|
|
* @property aspectRatio
|
|
*
|
|
* @constructor
|
|
*/
|
|
R3.D3.API.Viewport.FixedAspect.VR = function(
|
|
apiComponent
|
|
) {
|
|
|
|
__API_COMPONENT__;
|
|
|
|
if (R3.Utils.UndefinedOrNull(apiComponent.side)) {
|
|
apiComponent.side = R3.D3.API.Viewport.FixedAspect.VR.VIEWPORT_LEFT;
|
|
}
|
|
this.side = apiComponent.side;
|
|
|
|
R3.D3.API.Viewport.FixedAspect.call(
|
|
this,
|
|
apiComponent
|
|
);
|
|
|
|
};
|
|
|
|
R3.D3.API.Viewport.FixedAspect.VR.prototype = Object.create(R3.D3.API.Viewport.FixedAspect.prototype);
|
|
R3.D3.API.Viewport.FixedAspect.VR.prototype.constructor = R3.D3.API.Viewport.FixedAspect.VR;
|
|
|
|
R3.D3.API.Viewport.FixedAspect.VR.VIEWPORT_LEFT = 0x1;
|
|
R3.D3.API.Viewport.FixedAspect.VR.VIEWPORT_RIGHT = 0x2; |