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

Can't create shape wirh sprite #42

Closed
Reptoh opened this issue May 23, 2016 · 8 comments
Closed

Can't create shape wirh sprite #42

Reptoh opened this issue May 23, 2016 · 8 comments

Comments

@Reptoh
Copy link

Reptoh commented May 23, 2016

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?

@sbiermanlytle
Copy link
Owner

Is this for a Box2d shape or an iio shape?

@Reptoh
Copy link
Author

Reptoh commented May 23, 2016

@sbiermanlytle
Sorry, box2d shape

@sbiermanlytle
Copy link
Owner

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

@sbiermanlytle
Copy link
Owner

sbiermanlytle commented May 24, 2016

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.

@Reptoh
Copy link
Author

Reptoh commented May 24, 2016

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?

@sbiermanlytle
Copy link
Owner

sbiermanlytle commented May 24, 2016

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

@Reptoh
Copy link
Author

Reptoh commented May 24, 2016

Great! Thanks for answering!

@maverickteckh
Copy link

@Reptoh please close this issue!

@Reptoh Reptoh closed this as completed Apr 4, 2023
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

3 participants