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

Kash - fixes #38

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

Kash - fixes #38

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

Comments

@soggybag
Copy link
Owner

const kash = canvas.getContext('2d')

Import context and size here and calculate the x and y.

import ctx, { size } from './main.js'

const x = 1 * size
const y = 3 * size

Now use these numbers to draw your shapes. For example:

...
ctx.rect(x, y, size, size)  // draws a rectangle in your square
...
@soggybag soggybag self-assigned this Oct 27, 2020
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