Comments (14)
Why am I reminded of this cartoon? :)
from deviceorientation.
Further discussion on this topic is at http://lists.w3.org/Archives/Public/public-webapps/2014JulSep/0203.html.
In this thread @sicking also argues that we should incorporate Screen Orientation in to returned Device Orientation data – therefore providing alpha, beta and gamma values that match the current 'up' frame relative to the screen – by adding the following to the spec:
partial interface DeviceOrientationEvent
{
readonly attribute double? screenAlpha;
readonly attribute double? screenBeta;
readonly attribute double? screenGamma;
}
from deviceorientation.
Proposed spec change is now available as Pull Request #10.
from deviceorientation.
Is there some way we can stop with the alpha, beta, gamma nonesense?
from deviceorientation.
What do you want to see instead @marcoscaceres?
from deviceorientation.
Angles and x, y, z.
from deviceorientation.
Generally speaking we can say that alpha = z, beta = x, gamma = y
.
But depending on the world coordinate system you use that can change. e.g. three.js employs a different coordinate system where alpha = y, beta = x, gamma = -z
(see: https://github.com/mrdoob/three.js/blob/master/examples/js/controls/DeviceOrientationControls.js#L48).
from deviceorientation.
What three.js is doing might be good - Do you know of other libs that are changing the coordinate system?
from deviceorientation.
I believe CSS transforms match the z-x-y convention of device orientation events.
There are lots of different conventions for coordinate systems though. You can have left-handed and right-handed conventions, the Y and Z axis switched around (like in three.js) or the axis that is perpendicular to the ground being either positive or negative toward the center of the earth. You can also have any combination of those factors together. It isn't a one-size fits all thing.
from deviceorientation.
Sure, but no one is doing alpha, beta, gamma and negative angles, right?
from deviceorientation.
The angles are mathematically sound :) That is to say, you can compute quaternions and rotation matrices from them as they are defined today. Euler angles are generally defined using both positive and negative offset from a default position. More info is available at https://en.wikipedia.org/wiki/Euler_angles#Signs_and_ranges.
from deviceorientation.
I'm sorry if that is how this discussion came across.
We do not plan to re-define standard 3D Cartesian coordinate space though. If you have more info on an alternative coordinate system then we can discuss it here.
from deviceorientation.
Wikipedia appears to say that it's not a requirement that one use negative angles. I don't think we need to define some alternative system: just one that is more developer friendly. If we are seeing evidence that developers are changing coordinate systems, they might have a good reason.
from deviceorientation.
Closing as a long overdue task per #10 (comment) decision to not add new features that are not implemented by any vendor.
from deviceorientation.
Related Issues (20)
- Automatic publishing broken due to Specberus errors HOT 6
- Broken references in DeviceOrientation Event Specification
- Broken references in DeviceOrientation Event Specification
- Remove [NoInterfaceObject] HOT 9
- Add non-normative text describing the current deviceorientationabsolute implementation status
- What is difference with Gyroscope API ? HOT 1
- Add integration with Permissions Policy HOT 7
- Set up automatic Bikeshed compilation HOT 2
- Add integration with the Permissions API HOT 1
- requestPermission() and event handling clarification HOT 10
- DeviceMotion only works once at init and return null value HOT 2
- Update to constructor operations HOT 2
- PermissionState is already defined in Permission API HOT 7
- Need to define the DeviceMotionEvent constructor HOT 4
- Move fingerprintable APIs behind permissions HOT 46
- Device motion sampling frequency HOT 2
- Convert DeviceMotionEventAcceleration/RotationRate to dictionaries HOT 1
- DeviceMotionEvent atttributes can't be null per current IDL HOT 18
- Opposite z-axis for example 7 HOT 9
- Example 9 doesn't match the situation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deviceorientation.