File tree Expand file tree Collapse file tree 2 files changed +9
-14
lines changed
packages/stage-ui/src/components/scenes/live2d Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,11 @@ defineExpose({
9191 captureFrame ,
9292 canvasElement ,
9393})
94+
95+ import .meta .hot ?.dispose (() => {
96+ console .warn (' [Dev] Reload on HMR dispose is active for this component. Performing a full reload.' )
97+ window .location .reload ()
98+ })
9499 </script >
95100
96101<template >
Original file line number Diff line number Diff line change @@ -402,14 +402,6 @@ onMounted(async () => {
402402 updateDropShadowFilter ()
403403})
404404
405- function componentCleanUp() {
406- cancelAnimationFrame (dropShadowAnimationId .value )
407- model .value && pixiApp .value ?.stage .removeChild (model .value )
408- }
409- onUnmounted (() => {
410- componentCleanUp ()
411- })
412-
413405function listMotionGroups() {
414406 return availableMotions .value
415407}
@@ -419,12 +411,10 @@ defineExpose({
419411 listMotionGroups ,
420412})
421413
422- if (import .meta .hot ) {
423- // Ensure cleanup on HMR
424- import .meta .hot .dispose (() => {
425- componentCleanUp ()
426- })
427- }
414+ import .meta .hot ?.dispose (() => {
415+ console .warn (' [Dev] Reload on HMR dispose is active for this component. Performing a full reload.' )
416+ window .location .reload ()
417+ })
428418 </script >
429419
430420<template >
You can’t perform that action at this time.
0 commit comments