Search found 16 matches

by dmagunov
Wed Nov 05, 2014 4:28 pm
Forum: R.U.B.E discussion
Topic: Bodies position in JSON file
Replies: 10
Views: 40295

Re: Bodies position in JSON file

First implementation of convert coords (for now without joints) - http://argadnet.com/coordinate-transfor ... -canvas_3/
by dmagunov
Wed Nov 05, 2014 4:28 pm
Forum: R.U.B.E discussion
Topic: javascript testbed.js
Replies: 17
Views: 137752

Re: javascript testbed.js

looking forward to a "flipWorldOnJsonExport()" function in RUBE so that there is zero performance hit within the app itself due to flipping (earning some participation brownie points) Thanks! Hello, first implementation of converting coords (for now without joints) - http://argadnet.com/c...
by dmagunov
Wed Dec 11, 2013 4:41 pm
Forum: R.U.B.E discussion
Topic: Bodies position in JSON file
Replies: 10
Views: 40295

Re: Bodies position in JSON file

Thanks for answers!

I've already write a script to convert positions of bodies and fixtures to "html canvas" orientation. Only joints remains.
by dmagunov
Tue Dec 10, 2013 8:21 pm
Forum: R.U.B.E discussion
Topic: Bodies position in JSON file
Replies: 10
Views: 40295

Re: Bodies position in JSON file

About performance: try to google about it. For example http://stackoverflow.com/questions/16191324/performance-problems-with-html5-canvas-in-some-mobile-browsers > Avoid scale and rotate context because they also cause drop down in performance. If you need to scale or rotate a sprite only once, use ...
by dmagunov
Tue Dec 10, 2013 6:04 pm
Forum: R.U.B.E discussion
Topic: Bodies position in JSON file
Replies: 10
Views: 40295

Re: Bodies position in JSON file

Try to explain what I mean. Take a look at http://awwsoft.ua/exchange/rube.jpg This is scene rendered from RUBE json file I use easel.js as engine. I understand that I can call scale on y (-1) to flip canvas, but I think this is not good idea for performance call this function every frame and also t...
by dmagunov
Tue Dec 10, 2013 3:45 pm
Forum: R.U.B.E discussion
Topic: Bodies position in JSON file
Replies: 10
Views: 40295

Bodies position in JSON file

Hello,

How can I export original bodies position (x,y) to JSON?

At that moment I must flip canvas context to display bodies as I draw in RUBE editor, but it is not correct way for me via performance issue.

Thanks.