Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_initAxes(opt) {
const yRange = this._updateYawRange(opt.yawRange, opt.fov, opt.aspectRatio);
const pRange = this._updatePitchRange(opt.pitchRange, opt.fov, opt.showPolePoint);
const useRotation = opt.gyroMode === GYRO_MODE.VR;
this.axesPanInput = new RotationPanInput(this._element, {useRotation});
this.axesWheelInput = new WheelInput(this._element, {scale: -4});
this.axesTiltMotionInput = null;
this.axesPinchInput = SUPPORT_TOUCH ? new PinchInput(this._element, {scale: -1}) : null;
this.axesMoveKeyInput = new MoveKeyInput(this._element, {scale: [-6, 6]});
this.axes = new Axes({
yaw: {
range: yRange,
circular: YawPitchControl.isCircular(yRange),
bounce: [0, 0]
},
pitch: {
range: pRange,
circular: YawPitchControl.isCircular(pRange),
bounce: [0, 0]
},
fov: {
range: opt.fovRange,
circular: [false, false],
bounce: [0, 0]