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

Expo2DContext.arc with small radius has low polygons #28

Open
joonas-yoon opened this issue Nov 12, 2021 · 0 comments
Open

Expo2DContext.arc with small radius has low polygons #28

joonas-yoon opened this issue Nov 12, 2021 · 0 comments

Comments

@joonas-yoon
Copy link

Left one is result on Chrome in pure js, and right one is result with expo-2d-context in React Native.

circles has increasing radius for each line as you can looks like:

image

vanilla javascript

const ctx = canvas.getContext('2d');
ctx.fillStyle = "black";
ctx.fillRect(0, 0, canvas.width, canvas.height);
for (let i = 1; i <= 20; i++) {
  const x = canvas.width / 2;
  const y = canvas.height / 20 * (i - 1);
  ctx.fillStyle = "white";
  ctx.beginPath();
  ctx.arc(x, y, i, 0, 2 * Math.PI);
  ctx.fill();
  ctx.closePath();
}

expo-2d-context
https://snack.expo.dev/FrwvgMUBl

Does it mean to have low polygons?

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