How to use the @egjs/axes.WheelInput function in @egjs/axes

To help you get started, we’ve selected a few @egjs/axes examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github naver / egjs-view360 / src / YawPitchControl / YawPitchControl.js View on Github external
_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: {

@egjs/axes

A module used to change the information of user action entered by various input devices such as touch screen or mouse into the logical virtual coordinates. You can easily create a UI that responds to user actions.

MIT
Latest version published 10 months ago

Package Health Score

67 / 100
Full package analysis

Similar packages