How are distances measured in morphic.js?

I know that morphic.js doesn't measure distance in pixels since if you draw a world on a 800x600 canvas and place an object at 400,300 it won't be at the center. How does morphic.js measure distance and how can I convert it to pixels?

Of course it's in pixels. I've written quite exhaustive documentation for Morphic, and am not interested in discussing it here.

The reason I asked this was since placing an object at 400,600 didn't really align up and I was trying to find out why. It was probably because if something I wasn't aware of

Sigh. Morphic is not written in Snap!. The origin of shapes on a computer is usually at the top-left corner. Hey, see, this is why I'm getting all nervous about kids (?) wanting to learn "pro" stuff. We've made a great environment in which you can learn really powerful wizardry such as lambda-calculus, higher-order functions, prototypical inheritance, nested scopes etc. etc. - stuff that can put you miles above even most professional programmers - and you folks just don't believe it. Instead you're poking around some stupid text languages and "underlying" frameworks searching for a deeper truth that simply isn't there. </rant>

No, but I set the position to new Point(400,300) and I made the canvas 800x600, so the object should be 400 pixels across and 300 down (half of the full canvas's size) so the position should be correct. I think the problem is that morphic.js forces the canvas to fill the entire screen.

where can I find the document

yeah, there's a flag for that. Read the documentation.

So Snap! new nickname shouldn't be WBWnDPP
"Written By Wizards, not Dumb Professional Programmers" :wink: