File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -184,6 +184,9 @@ export function useModel() {
184184 'ParamMouseY' ,
185185 'ParamAngleX' ,
186186 'ParamAngleY' ,
187+ 'ParamAngleZ' ,
188+ 'ParamEyeBallX' ,
189+ 'ParamEyeBallY' ,
187190 ] ) {
188191 const range = live2d . getParameterValueRange ( id )
189192
@@ -194,11 +197,23 @@ export function useModel() {
194197 if ( isNil ( min ) || isNil ( max ) ) continue
195198
196199 const isXAxis = id . endsWith ( 'X' )
200+ const isYAxis = id . endsWith ( 'Y' )
201+ const isZAxis = id . endsWith ( 'Z' )
197202
198- const ratio = isXAxis ? xRatio : yRatio
199- let value = max - ratio * ( max - min )
203+ let value : number
200204
201- if ( isXAxis && catStore . model . mouseMirror ) {
205+ if ( isZAxis ) {
206+ const dragX = 1 - 2 * xRatio
207+ const dragY = 1 - 2 * yRatio
208+
209+ value = dragX * dragY * min
210+ } else {
211+ const ratio = isXAxis ? xRatio : yRatio
212+
213+ value = max - ratio * ( max - min )
214+ }
215+
216+ if ( ! isYAxis && catStore . model . mouseMirror ) {
202217 value *= - 1
203218 }
204219
You can’t perform that action at this time.
0 commit comments