@novely/solid-renderer 0.16.3 → 0.16.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.jsx +6 -6
- package/package.json +1 -1
package/dist/index.jsx
CHANGED
|
@@ -5651,14 +5651,14 @@ var createSolidRenderer = ({
|
|
|
5651
5651
|
ctx: canvasContext,
|
|
5652
5652
|
emotions: {},
|
|
5653
5653
|
emotion(emotion, shouldRender) {
|
|
5654
|
-
|
|
5654
|
+
let stored = this.emotions[emotion];
|
|
5655
5655
|
if (!stored) {
|
|
5656
5656
|
const characterEmotion = characters[character].emotions[emotion];
|
|
5657
5657
|
const emotionData = ((unknown) => Array.isArray(unknown) ? unknown : [unknown])(characterEmotion);
|
|
5658
|
-
this.emotions[emotion] = emotionData.map((src) => createImage(src));
|
|
5658
|
+
stored = this.emotions[emotion] = emotionData.map((src) => createImage(src));
|
|
5659
5659
|
}
|
|
5660
|
-
if (shouldRender) {
|
|
5661
|
-
canvasDrawImages(canvas, canvasContext,
|
|
5660
|
+
if (shouldRender && stored) {
|
|
5661
|
+
canvasDrawImages(canvas, canvasContext, stored);
|
|
5662
5662
|
}
|
|
5663
5663
|
},
|
|
5664
5664
|
append(className2, style2) {
|
|
@@ -5770,8 +5770,8 @@ var createSolidRenderer = ({
|
|
|
5770
5770
|
}
|
|
5771
5771
|
}
|
|
5772
5772
|
ctx.audio.voiceStop();
|
|
5773
|
-
const musics = Object.entries(ctx.store.audio.music).filter(([name2]) => !keepAudio.music.has(name2)).map(([_, h]) => h);
|
|
5774
|
-
const sounds = Object.entries(ctx.store.audio.sound).filter(([name2]) => !keepAudio.sounds.has(name2)).map(([_, h]) => h);
|
|
5773
|
+
const musics = Object.entries(ctx.store.audio.music).filter(([name2]) => keepAudio.music && !keepAudio.music.has(name2)).map(([_, h]) => h);
|
|
5774
|
+
const sounds = Object.entries(ctx.store.audio.sound).filter(([name2]) => keepAudio.sounds && !keepAudio.sounds.has(name2)).map(([_, h]) => h);
|
|
5775
5775
|
for (const music of [...musics, ...sounds]) {
|
|
5776
5776
|
if (!music)
|
|
5777
5777
|
continue;
|