How to use the TOUCH function from three

Find comprehensive JavaScript three.TOUCH code examples handpicked from public code repositorys.

2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
switch ( pointers.length ) {

	case 1:
		switch ( scope.touches.ONE ) {

			case THREE.TOUCH.ROTATE:
				if ( scope.enableRotate === false ) return;
				handleTouchStartRotate();
				state = STATE.TOUCH_ROTATE;
				break;
fork icon3
star icon7
watch icon0

+ 135 other calls in file

1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
	RIGHT: THREE.MOUSE.PAN
}; // Touch fingers

this.touches = {
	ONE: THREE.TOUCH.ROTATE,
	TWO: THREE.TOUCH.DOLLY_PAN
}; // for reset

this.target0 = this.target.clone();
this.position0 = this.object.position.clone();
fork icon3
star icon7
watch icon0

+ 143 other calls in file

71
72
73
74
75
76
77
78
79
80

// Mouse buttons
this.mouseButtons = { LEFT: THREE.MOUSE.ROTATE, MIDDLE: THREE.MOUSE.DOLLY, RIGHT: THREE.MOUSE.PAN };

// Touch fingers
this.touches = { ONE: THREE.TOUCH.ROTATE, TWO: THREE.TOUCH.DOLLY_PAN };

// for reset
this.target0 = this.target.clone();
this.position0 = this.object.position.clone();
fork icon2
star icon7
watch icon3

+ 8 other calls in file

78
79
80
81
82
83
84
85
86
87

// Mouse buttons
this.mouseButtons = { LEFT: three.MOUSE.ROTATE, MIDDLE: three.MOUSE.DOLLY, RIGHT: three.MOUSE.PAN };

// Touch fingers
this.touches = { ONE: three.TOUCH.ROTATE, TWO: three.TOUCH.DOLLY_PAN };

// for reset
this.target0 = this.target.clone();
this.position0 = this.object.position.clone();
fork icon0
star icon0
watch icon1

+ 6 other calls in file

17
18
19
20
21
22
23
24
25
26
27
28
29


    control.mouseButtons.LEFT = THREE.MOUSE.PAN;
    control.mouseButtons.RIGHT = THREE.MOUSE.ROTATE;


    control.touches.ONE = THREE.TOUCH.PAN;
    control.touches.TWO = THREE.TOUCH.DOLLY_ROTATE;


    return control
};

fork icon0
star icon0
watch icon0

+ 3 other calls in file

Other functions in three

Sorted by popularity

function icon

three.Vector3 is the most popular function in three (22341 examples)