Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jarquevious - Fixes #43

Open
soggybag opened this issue Oct 27, 2020 · 0 comments
Open

Jarquevious - Fixes #43

soggybag opened this issue Oct 27, 2020 · 0 comments

Comments

@soggybag
Copy link
Owner

Calculate the x and y position using size:

const x = 2 * size 
const y = 1 * size 

Add this to the top.

Now use the x and y values to draw your shapes.

For example around line 7 you have:

ctx.rect(200, 100, 250, 75)

This can now be:

ctx.rect(x, y, 250, 75) // use x and y here

Notice the size here is too wide you need to keep your drawing inside the size. Size is 113. So you could use any of these:

ctx.rect(x, y, size, 75) // width is max size height is 75 less than size so its okay
// or
ctx.rect(x, y, size, size / 2) // height is half size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant