fix(svelte,vue): apply WebGL fallback re-initialization fix to all remaining components - #22
Merged
Conversation
… html-in-canvas fails
… html-in-canvas fails
…ml-in-canvas fails
There was a problem hiding this comment.
Pull request overview
This PR propagates the WebGL fallback re-initialization fix (previously applied to Liquid in #20) across the remaining Svelte and Vue component wrappers under src/lib/, ensuring that when native html-in-canvas initialization fails, the fallback DOM path is rendered and the engine is re-created against the fallback container.
Changes:
- Vue wrappers: replace
requestAnimationFrame-delayed init withawait nextTick()and add a secondcreate*()attempt after togglingnativetofalse. - Svelte wrappers: add an
await tick()after togglingnative = falseand re-invokecreate*()against the fallback DOM container. - Add
disposedguards to avoid post-unmount initialization during async lifecycle sequences.
Reviewed changes
Copilot reviewed 42 out of 42 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/Asciify/Asciify.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/Asciify/Asciify.svelte | Re-initialize engine after native init failure using tick() fallback path. |
| src/lib/Bend/Bend.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/Bend/Bend.svelte | Re-initialize engine after native init failure using tick() fallback path. |
| src/lib/Blaze/Blaze.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/Blaze/Blaze.svelte | Re-initialize engine after native init failure using tick() fallback path. |
| src/lib/Bubble/Bubble.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/Bubble/Bubble.svelte | Re-initialize engine after native init failure using tick() fallback path. |
| src/lib/Cloth/Cloth.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/Cloth/Cloth.svelte | Re-initialize engine after native init failure using tick() fallback path. |
| src/lib/Clouds/Clouds.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/Clouds/Clouds.svelte | Re-initialize engine after native init failure using tick() fallback path. |
| src/lib/Droplets/Droplets.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/Droplets/Droplets.svelte | Re-initialize engine after native init failure using tick() fallback path. |
| src/lib/Frost/Frost.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/Frost/Frost.svelte | Re-initialize engine after native init failure using tick() fallback path. |
| src/lib/Glass/Glass.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/Glass/Glass.svelte | Re-initialize engine after native init failure using tick() fallback path. |
| src/lib/Glitch/Glitch.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/Glitch/Glitch.svelte | Re-initialize engine after native init failure using tick() fallback path. |
| src/lib/Grid/Grid.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/Grid/Grid.svelte | Re-initialize engine after native init failure using tick() fallback path. |
| src/lib/HexFloat/HexFloat.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/HexFloat/HexFloat.svelte | Re-initialize engine after native init failure using tick() fallback path. |
| src/lib/Laser/Laser.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/Laser/Laser.svelte | Re-initialize engine after native init failure using tick() fallback path. |
| src/lib/Magnify/Magnify.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/Magnify/Magnify.svelte | Re-initialize engine after native init failure using tick() fallback path. |
| src/lib/ParticleReveal/ParticleReveal.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/ParticleReveal/ParticleReveal.svelte | Re-initialize engine after native init failure using tick() fallback path. |
| src/lib/ParticleScroll/ParticleScroll.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/ParticleScroll/ParticleScroll.svelte | Re-initialize engine after native init failure using tick() fallback path. |
| src/lib/Peel/Peel.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/Peel/Peel.svelte | Re-initialize engine after native init failure using tick() fallback path. |
| src/lib/RetroDither/RetroDither.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/RetroDither/RetroDither.svelte | Re-initialize engine after native init failure using tick() fallback path. |
| src/lib/Ripple/Ripple.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/Ripple/Ripple.svelte | Re-initialize engine after native init failure using tick() fallback path. |
| src/lib/Shatter/Shatter.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/Shatter/Shatter.svelte | Re-initialize engine after native init failure using tick() fallback path. |
| src/lib/VHS/VHS.vue | Re-initialize engine after native init failure using nextTick() fallback path. |
| src/lib/VHS/VHS.svelte | Re-initialize engine after native init failure using tick() fallback path. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Extends the WebGL fallback re-initialization fix (previously merged in #20 for
Liquid) to all remaining Svelte and Vue component wrappers insrc/lib/.Summary of Change
When native
html-in-canvasinitialization fails, Svelte (onMount) and Vue (onMounted) now wait for DOM re-render (tick()/nextTick()) after settingnative = falseand re-invokecreate*()for the fallback DOM container.Affected Components Updated (21 components)
Asciify(Svelte & Vue)Bend(Svelte & Vue)Blaze(Svelte & Vue)Bubble(Svelte & Vue)Cloth(Svelte & Vue)Clouds(Svelte & Vue)Droplets(Svelte & Vue)Frost(Svelte & Vue)Glass(Svelte & Vue)Glitch(Svelte & Vue)Grid(Svelte & Vue)HexFloat(Svelte & Vue)Laser(Svelte & Vue)Magnify(Svelte & Vue)ParticleReveal(Svelte & Vue)ParticleScroll(Svelte & Vue)Peel(Svelte & Vue)RetroDither(Svelte & Vue)Ripple(Svelte & Vue)Shatter(Svelte & Vue)VHS(Svelte & Vue)Type of change
Checklist
npx tsc --noEmitpassesnpm run lintpassesnpm run buildpasses