@@ -95,10 +95,35 @@ export const PivotHandlesHandles = forwardRef<PivotHandlesHandlesImpl, PivotHand
95
95
if ( fixed !== null ) {
96
96
handles . fixed = fixed
97
97
}
98
+ useEffect ( ( ) => handles . scaleX . bind ( 0xff2060 , applyEnabled ( scale , enabled ) ) , [ enabled , scale , handles ] )
99
+ useEffect ( ( ) => handles . scaleY . bind ( 0x20df80 , applyEnabled ( scale , enabled ) ) , [ enabled , scale , handles ] )
100
+ useEffect ( ( ) => handles . scaleZ . bind ( 0x2080ff , applyEnabled ( scale , enabled ) ) , [ enabled , scale , handles ] )
101
+ useEffect ( ( ) => handles . rotationX . bind ( 0xff2060 , applyEnabled ( rotation , enabled ) ) , [ enabled , rotation , handles ] )
102
+ useEffect ( ( ) => handles . rotationY . bind ( 0x20df80 , applyEnabled ( rotation , enabled ) ) , [ enabled , rotation , handles ] )
103
+ useEffect ( ( ) => handles . rotationZ . bind ( 0x2080ff , applyEnabled ( rotation , enabled ) ) , [ enabled , rotation , handles ] )
98
104
useEffect (
99
- ( ) =>
100
- handles . bind ( applyEnabled ( translation , enabled ) , applyEnabled ( rotation , enabled ) , applyEnabled ( scale , enabled ) ) ,
101
- [ enabled , scale , handles , translation , rotation ] ,
105
+ ( ) => handles . translationX . bind ( 0xff2060 , 0xffff40 , applyEnabled ( translation , enabled ) ) ,
106
+ [ enabled , translation , handles ] ,
107
+ )
108
+ useEffect (
109
+ ( ) => handles . translationY . bind ( 0x20df80 , 0xffff40 , applyEnabled ( translation , enabled ) ) ,
110
+ [ enabled , translation , handles ] ,
111
+ )
112
+ useEffect (
113
+ ( ) => handles . translationZ . bind ( 0x2080ff , 0xffff40 , applyEnabled ( translation , enabled ) ) ,
114
+ [ enabled , translation , handles ] ,
115
+ )
116
+ useEffect (
117
+ ( ) => handles . translationXY . bind ( 0xff2060 , 0xffff40 , applyEnabled ( translation , enabled ) ) ,
118
+ [ enabled , translation , handles ] ,
119
+ )
120
+ useEffect (
121
+ ( ) => handles . translationYZ . bind ( 0x2080ff , 0xffff40 , applyEnabled ( translation , enabled ) ) ,
122
+ [ enabled , translation , handles ] ,
123
+ )
124
+ useEffect (
125
+ ( ) => handles . translationXZ . bind ( 0x20df80 , 0xffff40 , applyEnabled ( translation , enabled ) ) ,
126
+ [ enabled , translation , handles ] ,
102
127
)
103
128
useFrame ( ( state ) => handles . update ( state . camera ) )
104
129
return < primitive object = { handles } />
0 commit comments