@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.
Files changed (2) hide show
  1. package/dist/index.jsx +6 -6
  2. 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
- const stored = this.emotions[emotion];
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, this.emotions[emotion]);
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@novely/solid-renderer",
3
- "version": "0.16.3",
3
+ "version": "0.16.4",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"