Is there a way to draw programatically?


#1

Is there a way that I can draw stuff programatically? I just wanna be able to draw simple shapes like lines, polygons, and maybe ellipses.

Thanks!


#2

Hi MedudeC, if you go to Khan Academy (which will be linked eventually for others to see) they have the source like variables to hold values to your animations and etc. So I do suggest starting off with what’s titled
“Hour of Coding” or “Computer of Science” your choice.


#3

Hey there, thank you for trying but that didn’t answer my question at all. You may have misunderstood me. I know how to program, I’ve been doing it for many, many years. I want to know if the Wick editor exposes an API for us to draw shapes programatically?


#4

Hi @MeLikeyCode,

There is currently no way to draw on a Wick Editor canvas programmatically. Is there anything specific you’re trying to achieve?


#5

Hello @Luxapodular,

I am creating a top down zombie shooting game. I’m trying to implement a laser gun. It should basically draw a long line from the gun to the place you click.

I am sure if I get super clever and do some really hard work, I can achieve this without a drawing API, but it seems like a simple createLineObject(pt1,pt2,thickness,color) or something would make it so much easier :slight_smile:!