@@ -52,6 +52,7 @@ export function changeFigure(sentence: ISentence): IPerform {
5252
5353 // live2d 或 spine 相关
5454 let motion = getStringArgByKey ( sentence , 'motion' ) ?? '' ;
55+ const skin = getStringArgByKey ( sentence , 'skin' ) ?? '' ;
5556 let expression = getStringArgByKey ( sentence , 'expression' ) ?? '' ;
5657 const boundsFromArgs = getStringArgByKey ( sentence , 'bounds' ) ?? '' ;
5758 let bounds = getOverrideBoundsArr ( boundsFromArgs ) ;
@@ -234,7 +235,7 @@ export function changeFigure(sentence: ISentence): IPerform {
234235 focus = focus ?? cloneDeep ( baseFocusParam ) ;
235236 zIndex = Math . max ( zIndex , 0 ) ;
236237 blendMode = blendMode ?? 'normal' ;
237- dispatch ( stageActions . setLive2dMotion ( { target : key , motion, overrideBounds : bounds } ) ) ;
238+ dispatch ( stageActions . setLive2dMotion ( { target : key , motion, skin , overrideBounds : bounds } ) ) ;
238239 dispatch ( stageActions . setLive2dExpression ( { target : key , expression } ) ) ;
239240 dispatch ( stageActions . setLive2dBlink ( { target : key , blink } ) ) ;
240241 dispatch ( stageActions . setLive2dFocus ( { target : key , focus } ) ) ;
@@ -243,8 +244,8 @@ export function changeFigure(sentence: ISentence): IPerform {
243244 } else {
244245 // 当 url 没有发生变化时,即没有新立绘替换
245246 // 应当保留旧立绘的状态,仅在需要时更新
246- if ( motion || bounds ) {
247- dispatch ( stageActions . setLive2dMotion ( { target : key , motion, overrideBounds : bounds } ) ) ;
247+ if ( motion || skin || bounds ) {
248+ dispatch ( stageActions . setLive2dMotion ( { target : key , motion, skin , overrideBounds : bounds } ) ) ;
248249 }
249250 if ( expression ) {
250251 dispatch ( stageActions . setLive2dExpression ( { target : key , expression } ) ) ;
0 commit comments