Closed cdaein closed 1 year ago
Hi @cdaein, so the form
needs to be inside a player function/object in space
for it to render. Eg,
Pts.namespace(this);
const space = new CanvasSpace(canvas);
const form = space.getForm();
space.add( t => form.fill("#000").point([200, 200], 100, "circle") ).playOnce();
For quick sketching, you can also try the quickStart
option:
Pts.quickStart( canvas, "#00F" )( t => form.fill("#fff").point([200, 200], 100, "circle") );
Now I see I made a mistake... thank you for the help!
I'm having an issue calling methods on form when it is created from an existing canvas.
When running this:
I get an error:
but when I
console.log(form.fill)
I can see the function declaration. I wonder if this is because of a mismatch between the rawCanvasRenderingContext2D
andPtsCanvasRenderingContext2D
, but haven't looked closely at the source code yet.