-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/cards generative art #9
base: main
Are you sure you want to change the base?
Conversation
solsarratea
commented
Dec 5, 2022
- Implementation of static Canvas component for generative background based on configuration file
- reference document with checkins
@solsarratea is attempting to deploy a commit to the Hyperlink Team on Vercel. To accomplish this, @solsarratea needs to request access to the Team. Afterwards, an owner of the Team is required to accept their membership request. If you're already a member of the respective Vercel Team, make sure that your Personal Vercel Account is connected to your GitHub account. |
I just tested out plugging it into the background of the highlights view and it looks (and performs) great! |
localDataRef.current = data; | ||
|
||
onCanvasLoaded(); | ||
}, [canvasRef.current]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this effect will only fire initially as changes to canvasRef.current won't trigger a new re-render.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might also want to pass somethings from props here (height and width) if we want to trigger changes based on them.
|
||
const [quality] = useState(props.quality || 1); | ||
const [context, setContext] = useState<Context>(); | ||
const [size] = useState({ w: props.width || 500, h: props.height || 500 }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that size won't update if the props change. We might want to change the size of the parent container dynamically, so could either use a useEffect to update this when the props change, or just use the props directly.
97b9c9b
to
4e2a42f
Compare
42d9af8
to
345b833
Compare
3b01268
to
f87b15f
Compare
933295f
to
8c473d9
Compare
6bd3b89
to
b76b840
Compare
3168e73
to
4d01ffb
Compare
70374c5
to
aa6e039
Compare