Ball Rotation

the game

Ball Rotation

the game

Ball rotation game. p5.js rotation and 3d experiments. Play game here.

Ball Rotation

Reference:

Introduction

Mobile game, ball on surface. Ball defined as sphrere, texture by V.

Move object:

Setup

Create repo (github). Preferences already correct, gh-pages created as default. Create readme and .gitignore (java).

git clone https://github.com/talonendm/ballrotation.git

Geolocation


navigator.geolocation.getCurrentPosition(
  function(position) {
    text("speed: " + position.coords.speed, 5, 10);
    text("heading: " + round(position.coords.heading), 5, 40); // heading in degrees
  },

    // Optional error callback
    function(error){
        /* 
        Error object
        error = {
            code - Error code representing the type of error 
                    1 - PERMISSION_DENIED
                    2 - POSITION_UNAVAILABLE
                    3 - TIMEOUT

            message - Details about the error in human-readable format.
        }
        // auto indect in vscode: shift-alt-f 
        */
    }
);

Tags: p5 WEBGL
Share: Twitter