Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/hand tracking #217

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft

Conversation

TiborUdvari
Copy link
Collaborator

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

hello-handtracking.mp4
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
Copy link
Collaborator Author

finger-pyramid.mp4

This would allow to have quick interactions like this in an "active area", a spatial equivalent to

function draw() {
  ellipse(mouseX, mouseY, 10, 10);
}

@TiborUdvari
Copy link
Collaborator Author

Full hands

full-hands.mp4
function preload() {
  createARCanvas();
}

function setup() {
  describe("Spheres on all the skeletal joints of the hand.");
}

function draw() {
  normalMaterial();
  for (let i = 0; i < hands.length; i++) {
    const joint = hands[i];
    push();
    translate(joint.x, joint.y, joint.z);
    sphere(0.01);
    pop();
  }
}

@TiborUdvari
Copy link
Collaborator Author

Other experiments here: https://www.tiborudvari.com/sketchbook

@TiborUdvari
Copy link
Collaborator Author

Also worth mentioning this depends on the #215 refactor

@stalgiag
Copy link
Owner

stalgiag commented May 29, 2024

Amazing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants