this shows no ellipse :<
ellipse isn't a built-in JavaScript function and is probably not in Snap! either
ok well it's a function of CanvasRenderingContext2D but it uses different arguments
That's for the <canvas> element. You should have an element ready to use that on, and besides it's not even in the parentheses. Snap can have it's XXS vulnerabilities (for the learning) so you could probably use that. Remember to save, though.
The JSFunction block has two input slots. The first is inside (parentheses); the second is inside {braces}.
The first one is for the formal parameters of the function you're defining -- the variable names to which arguments will be bound when your function is called, like the orange variable ovals in the prototype in the hat block in the Block Editor when you're defining a procedure with inputs.
The body of your function -- the actual code that your function will carry out -- goes in the second input slot.
Wait, does Snap use a canvas element for running the code? I haven't really dug into the snap editor.
edit: it's quite obvious just looking into the source
what's quite obvious looking at source material
That the whole entire snap interface is by a single canvas element with some nice drawings...
of course Snap has pretty good source code running its editor
Not the best practice compared to me setting up Scratch 3.0, but hey
Oh i remember the good old days of scratch 3.0,but then i got bannnnnnnnneeeedddd and forgot it existed until certain events here,and i plan on forgetting it once again
This is a nice alternative. Maybe they should switch to JSON code.
Oh just dont preach about why you don't like scratch or get on snap teams bad side btw
....I thought you went offline ;_;
i'm still on!
Then how does I do an ellipse in a Snap editor?
(ooops, wrong person XD this was meant for @status101 but oh well)
1.The second code is misplaced!It should be in the second blank.
2.You need to have p5.js or Processing.js installed.Or try
world.worldCanvas.getContext("2d").arc(123,123,45,0,Math.PI)
but you can only draw circles not ellipses.
If you drag a window over that circle it will be erased.
1.That's a 36-agon.
2.No ellipses
3.Use a math function like this:Snap! Build Your Own Blocks
@bh