0xs1r4t / sirat.xyz

my website. under construction 🔧
https://sirat.xyz
0 stars 0 forks source link

🎨 p5.js and window not defined errors #183

Closed 0xs1r4t closed 2 months ago

0xs1r4t commented 2 months ago
  1. Added p5.js and a p5 wrapper for sketches
  2. Caught up on school and college level Vector math using 3Blue1Brown's series on the Essence of Linear Algebra, only to find out that the issue had nothing to do with mathematics and had been resolved in p5.js and p5-types, but just hadn't been pushed to @types/p5 - #182
  3. Stayed up at night trying to fix a window is not defined error with no resolution in sight
  4. Found out that the global p5 declaration isn't the same as using the p5 object, which is of type P5CanvasInstance in @p5-wrapper #https://github.com/P5-wrapper/react/issues/42#issuecomment-633108409. This causes many Vector functions to break, which is why my code wasn't being built
  5. Added a few lines to detect whether the window is defined or not, so that it can be built and pushed temporarily
codesandbox[bot] commented 2 months ago

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders
Open Preview

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sirat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 5, 2024 1:22pm