1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

iPhone Gyroscope.

Discussion in 'HTML & Website Design' started by Klikkit, Jun 12, 2013.

  1. #1
    Has anyone come across any websites that utilise the iPhone's gyroscope? Similar to the wallpapers on iOS7?

    I know there are websites like http://360.io/pt3dmqna for example that use the iPhone gyroscope to view 360 panorama photos

    But what if I wanted the text on a website to slightly tilt with the phone?
     
    Klikkit, Jun 12, 2013 IP
  2. tonicc

    tonicc Well-Known Member

    Messages:
    198
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #2
    You can use javascript for your purpose, with event listeners and getting the position from the device:


    window.addEventListener("deviceorientation", function () {
            tilt([event.beta, event.gamma]);
        }, true);
    Code (markup):

     
    tonicc, Jun 12, 2013 IP
  3. Klikkit

    Klikkit Member

    Messages:
    69
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    43
    #3
    It's completely foreign to me, is there a help/learning doc?
     
    Klikkit, Jun 13, 2013 IP