A walkthrough of using p5.js inside a SvelteKit project via a custom wrapper library called p5-svelte. Covers installation, instance mode vs global mode, Svelte reactivity integration, and how to use add-ons like p5-sound. The second half explains how the wrapper handles CommonJS compatibility issues by using dynamic imports instead of static imports, and warns against using async functions in cleanup callbacks to avoid memory leaks.
ā¢9m watch time
Sort: