Black.stage.orientation
brunoandradebr opened this issue ยท 6 comments
Black.stage.orientation = StageOrientation.LANDSCAPE
It's not working on ios running on safari and when running added to home screen. Keeping rotating and do not lock orientation.
From example page : Orientation example
Hello,
Black.stage.orientation
is meant to lock stage orientation. By setting its value to StageOrientation.LANDSCAPE
you are preventing stage from rotating. There is no easy way to lock orientation in safari. As an option you can show lock screen.
humm I thought It would lock orientation.
As an option you can show lock screen.
I didn't get it =/
humm I thought It would lock orientation.
It is not allowed to lock orientation from inside HTML. Orientation locking only possible on native apps.
See image attached - it shows how StageScaleMode.LETTERBOX
and StageOrientation.LANDSCAPE
works.
To achieve orientation lock there are few options:
- manually rotate game container using CSS3 transform matrix
- show "ROTATE YOUR DEVICE" message to users when
Black.stage.isPortrait
is true.
I've added new example so you can play around with it. Try running example in fullscreen and rotate your device. http://blacksmith2d.io/Docs/Examples/Stage/Orientations%20Lock
Let me know if this helps.
Yeah got it!
Your example is not working in ios 6s device, message still showing on landscape, but left bottom. Running on desktop browser with device emulator, works. And "Switch" is misspelled.
I'm writing my own engine too and I liked black interface, sounds like Actionscript 3. Very beutiful job ;)
Thanks for your patience.
Example works fine on my side. Must be something server side related issue.
Thanks for your feedback. We appreciate it.
Yep, I cleaned safari cache and worked.