Avatar for user89458

user89458

Member since May 2018 • Last active May 2018
  • 0 conversations
  • 2 comments

Most recent activity

  • in Puck.js, Pixl.js and MDBT42
    Avatar for user89458

    Thank you! Works like a charm.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for user89458

    The Puck.onMag function returns an orientation about once per second. Is it possible to speed that up somehow? I can get faster readings by repeatedly calling Puck.mag(), so it's possible. (Although if I ask for too many, too fast the program crashes.) That said, I would prefer the event-based polling. Is there a time constant somewhere that could be changed?

    Here is the code that generates the overflow, btw.

    var x=0;
    var y=0;
    var z=0;
    var f;

    var zero = Puck.mag();
    console.log(z);

    while(true){
    f = Puck.mag();
    x = f.x - zero.x;
    y = f.y - zero.y;
    z = f.z - zero.z;
    console.log(z);
    }

Actions