Utopiah / aframe-inVR-blocks-based-editor

Editing VR content while being in VR using the blocks visual programming model
5 stars 4 forks source link

6DoF support #2

Open Utopiah opened 6 years ago

Utopiah commented 6 years ago
  1. replace modified entities by mesh
  2. make each grabbable
  3. change opacity/etc based on grammar rules (e.g. on drop/release/moved instead of gaze/click )
Utopiah commented 6 years ago

Simplified start using super-hands https://glitch.com/edit/#!/scratch-blocks3d?path=super-hands.html with its Global Event Handler integration.

Utopiah commented 6 years ago

Consider also a snappable grid

// return the object closest to provided coordinates based on 1 provided class
// notes that the distance comparison is based on the center of the object
function getClosestObjectWithClass(coordinate, classFilter){
  var result = null;
  var smallestDistance = 999; // assuming 1km is a safe maximum distance
  for (e of document.querySelectorAll("."+classFilter)) {
    var testDistance = coordinate.distanceTo( e.object3D.getWorldPosition() );
    if  (testDistance < smallestDistance){
     smallestDistance = testDistance;
      result = e;
    }
  }
  return result;
}

and invisible entities generated via https://github.com/ngokevin/kframe/tree/master/components/entity-generator/