diff --git a/index.html b/index.html
index d333306..ec859df 100644
--- a/index.html
+++ b/index.html
@@ -76,8 +76,8 @@ AFRAME.registerComponent('selector-line', {
},
// try pinching modifier, e.g pinch while holding the SHIFT key
-
})
+
@@ -104,6 +104,7 @@ AFRAME.registerComponent('selector-line', {
+
diff --git a/jxr-core.js b/jxr-core.js
index 4dac9fb..08190fe 100644
--- a/jxr-core.js
+++ b/jxr-core.js
@@ -25,6 +25,7 @@ const sides = ["right", "left"]
var pinches = [] // position, timestamp, primary vs secondary
var dl2p = null // from distanceLastTwoPinches
var selectedElements = [];
+var billboarding = false
// ==================================== picking ======================================================
@@ -161,7 +162,7 @@ AFRAME.registerComponent('pinchprimary', { // currently only 1 hand, the right o
if (selectedElement){
let content = selectedElement.getAttribute("value")
selectedElement.emit('released', {element:selectedElement, timestamp:Date.now(), primary:true})
- // selectedElement.object3D.rotation.set( 0, 0, 0 ) // billboarding, could need modifier
+ if (billboarding) selectedElement.object3D.rotation.set( 0, 0, 0 )
}
// unselect current target if any
selectedElement = null;
@@ -833,6 +834,8 @@ function addDropZone(position="0 1.4 -0.6", callback=setFeedbackHUD, radius=0.11
return el
}
+function toggleBillboarding(){ billboarding=!billboarding }
+
// ==================================== facilitating debugging ======================================================
function makeAnchorsVisibleOnTargets(){