Closed Reptoh closed 1 year ago
Is this for a Box2d shape or an iio shape?
@sbiermanlytle Sorry, box2d shape
Yes it looks like image attachment isn't working right now in iio 1.4. This will be the next priority but still may take up to a few weeks to get the fix out.
I suggest using iio 1.2 (iioEngine) for this purpose until then. This page has a demo app with Box2d + images: http://iioengine.iioinc.com/demos
you can download the full source code for the engine and the demo here: https://github.com/iioinc/iio.js/tree/v1.2-iioengine
FYI the Box2d integration and syntax in 1.2 and 1.4 is very similar, so upgrading won't be too bad if you want to do that once the fix is released.
Thanks for answer! I already got 1.2 with examples. I tried open app on mobile devices: it works fine, but without events.
@sbiermanlytle Do you plan support mobile devices?
iio doesn't listen for touch events by default, but they can be added easily with EventListeners in the JS standard library, check out these docs for examples: http://iioengine.iioinc.com/docs/iio-basics#input
you can use 'touchstart', 'touchmove', etc to detect mobile input.
And yes, built in mobile feature are going to be the big addition in iio 2.0 - code in JS and deploy straight to iOS, Android, etc
Great! Thanks for answering!
@Reptoh please close this issue!
In version 1.4.0 I can't create shape with sprite/image. I research documentation, noted prepGraphics method in older version. Maybe I missed something in new version?