DEV Community

Cover image for Draw on the HTML canvas without code
UnionForever
UnionForever

Posted on

1 1 1 1

Draw on the HTML canvas without code

I was recently creating a web game. Now, while creating graphics for this game (characters, map etc), I saw that under the HTML canvas API, drawing even a single line took 4 lines of code-

ctx.beginPath();
ctx.moveTo(100, 150);
ctx.lineTo(100, 200);
ctx.stroke();
Enter fullscreen mode Exit fullscreen mode

I knew that things like mapping out coordinates and rewriting repeated methods can easily be done by a no-code tool. This led to the creation of Canvascript. It's a open source tool whose purpose is to speed up the time it takes to create web game graphics.

Using it is simple, draw on the canvas, then click on the generate button to get the code to render the design on the actual HTML canvas. You can use the tool here. We also have a Discord server btw.

What do you think about this? any feedback or suggestions?

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (1)

Collapse
 
mulu_hunegnaw_b97b522fcdd profile image
Mulu Hunegnaw

That's great 😊

SurveyJS custom survey software

JavaScript UI Library for Surveys and Forms

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

View demo

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay