p5.xr icon indicating copy to clipboard operation
p5.xr copied to clipboard

Feat/hand tracking

Open TiborUdvari opened this issue 4 months ago • 5 comments

Not quite ready to merge this, but to follow up on the API proposal in #216 it would look something like this

https://github.com/stalgiag/p5.xr/assets/1434442/3c4356b1-56d6-44aa-a587-525e81f50d63

function preload() {
  createARCanvas();
}

function setup() {
  describe("A sphere on your right index finger");
  mainHandMode(RIGHT);
}

function draw() {
  normalMaterial();
  push();
  translate(finger.x, finger.y, finger.z);
  sphere(0.01);
  pop();
}

TiborUdvari avatar Apr 18 '24 10:04 TiborUdvari