Skip to content

akalyan/fuse-orientation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

fuse-orientation

What?

Library to get the device orientation in Fuse. Currently supports iOS only.

Why?

Because sometimes you want the device's orientation even if the orientation is locked.

Installation

  1. Clone this repo
  2. Add a reference to the local fuse-orientation.unoproj in your project's .unoproj file, e.g.
"Projects": [
  "../fuse-orientation/fuse-orientation.unoproj",
],

Usage:

  1. In the root of your app, subscribe to orientation updates:
var orientation = require("OrientationChangeListener");
orientation.subscribe();
  1. Elsewhere, you can listen to the event:
var listener = require("OrientationChangeListener");
listener.on("orientationChanged", function(val) {
  // val will be one of "portrait_up", "portrait_down", "landscape_left", or "landscape_right"
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages