Closed 0xs1r4t closed 3 months ago
Open the branch in Web Editor • VS Code • Insiders
Open Preview
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 19, 2024 9:01pm |
A fix for the p5 and next
window is not defined
build errorI added a
Point
class to define the points that form the trail. Previously namedPastelDreams.tsx
, I renamed it to something more direct, so I settled forTrail.tsx
. One point follows the mouse, and others follow right behind, with modified distances, velocities and linear interpolation to display a smooth trail across the canvas.The
p5-wrapper
package for react doesn't work well with Vectors since theP5CanvasInstance
provided in the library doesn't recognise the methods used withp5.Vector
. The best way to prevent this from causing issues was to use these methods via a constructor, as mentioned in #182. Once this PR is merged, the changes should fix that issue.Enhancements
Trail.tsx
I changed some minor details in the trail's colours to:
globals.css