houdini.how icon indicating copy to clipboard operation
houdini.how copied to clipboard

Added quadratic bezier curve demo

Open gnikoloff opened this issue 3 years ago • 8 comments

Description

Added a new demo that renders continuous quadratic curve through multiple points.

gnikoloff avatar Jan 26 '21 23:01 gnikoloff

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

google-cla[bot] avatar Jan 26 '21 23:01 google-cla[bot]

@googlebot I signed it!

gnikoloff avatar Jan 26 '21 23:01 gnikoloff

Wow this is so cool! Is there any way to set the points instead of them being randomized? That feels super helpful for charting

una avatar Jan 30 '21 22:01 una

Hi @una , thanks so much!

It is my understanding that CSS Houdini supports custom parameters in the paint() method like this, which would be perfect for describing the points positions. However, I did not see any examples on houdini.how that utilise inputArguments, so I decided to use CSS variable to control the number and spacing of points and randomly generate X, Y myself.

How should it be done in your opinion? I was thinking that I can make the random positions once and cache them in the paintlet on the first render and then keep reusing them? That would be one way to make it not regenerate the positions on each CSS variable change/

gnikoloff avatar Jan 30 '21 22:01 gnikoloff

Update: I saw one of the examples actually supports inputArguments, but with a hint that says it is hidden behind a flag.

I would be happy to implement it on my own demo page and include the same hint text under the demo. For the purposes of it not constantly rerendering with different points when changing CSS variables, how about I just cache their positions on the first render and keep reusing them?

Please let me know

gnikoloff avatar Feb 02 '21 13:02 gnikoloff

Yes yes inputArguments would be perfect for this. Unfortunately, they are not yet supported by the Paint Polyfill, and thus can't be used for houdini.how demos. We could have the demo as-is with the randomized segments, and add a similar note stating that the points are customizable via input arguments with a link to the full demo.

una avatar Feb 18 '21 18:02 una

Hey @una, that's cool then :) Is anything else needed on my part WRT to the merge request?

Btw I also have other demos, are you guys cool with multiple contributions from the same person?

Thanks!

gnikoloff avatar Feb 18 '21 19:02 gnikoloff

@gnikoloff yes, other demos are welcomed with open arms! Sorry about the delay on this one. Do you have a demo with using the argument list to set the points? I'd really like to add a note on this one and link to that!

una avatar Mar 10 '21 17:03 una