Giter Club home page Giter Club logo

Comments (14)

marcoscaceres avatar marcoscaceres commented on July 28, 2024 1

Why am I reminded of this cartoon? :)

fault-tolerance_nosql-1

from deviceorientation.

richtr avatar richtr commented on July 28, 2024

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.

richtr avatar richtr commented on July 28, 2024

Proposed spec change is now available as Pull Request #10.

from deviceorientation.

marcoscaceres avatar marcoscaceres commented on July 28, 2024

Is there some way we can stop with the alpha, beta, gamma nonesense?

from deviceorientation.

richtr avatar richtr commented on July 28, 2024

What do you want to see instead @marcoscaceres?

from deviceorientation.

marcoscaceres avatar marcoscaceres commented on July 28, 2024

Angles and x, y, z.

from deviceorientation.

richtr avatar richtr commented on July 28, 2024

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.

marcoscaceres avatar marcoscaceres commented on July 28, 2024

What three.js is doing might be good - Do you know of other libs that are changing the coordinate system?

from deviceorientation.

richtr avatar richtr commented on July 28, 2024

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.

marcoscaceres avatar marcoscaceres commented on July 28, 2024

Sure, but no one is doing alpha, beta, gamma and negative angles, right?

from deviceorientation.

richtr avatar richtr commented on July 28, 2024

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.

richtr avatar richtr commented on July 28, 2024

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.

marcoscaceres avatar marcoscaceres commented on July 28, 2024

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.

anssiko avatar anssiko commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.