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

Crafty.isometric.area() returns negative values #1177

Open
ghost opened this issue Apr 14, 2018 · 2 comments
Open

Crafty.isometric.area() returns negative values #1177

ghost opened this issue Apr 14, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Apr 14, 2018

http://craftyjs.com/api/Crafty-isometric.html#Crafty-isometric-area

Crafty.init(300, 300);
Crafty.log(Crafty.isometric.size(64).area());
// { x: { start: 0, end: -5 }, y: { start: 1, end: -17.75 } }
@starwed
Copy link
Member

starwed commented May 2, 2018

I haven't dealt with the isometric code much. From looking at the source here, I notice it's referring to the viewport in several places.

Are you defining any viewport transformations? One guess is that there might be some assumptions in the isometric code that don't hold under certain transformations.

@starwed
Copy link
Member

starwed commented May 3, 2018

Hmm, certainly on the surface it seems like something is broken. I'll try to dig into what's going on here this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant