Skip to content
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

Open
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

solsarratea
Copy link
Collaborator

  • Implementation of static Canvas component for generative background based on configuration file

demo-pullreq

@vercel
Copy link

vercel bot commented Dec 5, 2022

@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.

@jaredpereira
Copy link
Contributor

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]);
Copy link
Contributor

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.

Copy link
Contributor

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 });
Copy link
Contributor

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.

@jaredpereira jaredpereira force-pushed the main branch 3 times, most recently from 97b9c9b to 4e2a42f Compare February 7, 2023 03:39
@jaredpereira jaredpereira force-pushed the main branch 4 times, most recently from 42d9af8 to 345b833 Compare February 9, 2023 23:41
@jaredpereira jaredpereira force-pushed the main branch 2 times, most recently from 3b01268 to f87b15f Compare February 18, 2023 01:36
@jaredpereira jaredpereira force-pushed the main branch 2 times, most recently from 933295f to 8c473d9 Compare March 11, 2023 02:05
@jaredpereira jaredpereira force-pushed the main branch 3 times, most recently from 6bd3b89 to b76b840 Compare March 24, 2023 23:00
@jaredpereira jaredpereira force-pushed the main branch 3 times, most recently from 3168e73 to 4d01ffb Compare June 8, 2023 20:22
@jaredpereira jaredpereira force-pushed the main branch 11 times, most recently from 70374c5 to aa6e039 Compare August 15, 2023 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants