From 313aa1ac899192cf70d7cf3a210da16b18fa072f Mon Sep 17 00:00:00 2001 From: Fabien Benetou Date: Mon, 23 Sep 2024 18:23:08 +0200 Subject: [PATCH] visual adjustement (3D model, grids, etc) --- index.html | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 890979a..5358f0b 100644 --- a/index.html +++ b/index.html @@ -196,11 +196,21 @@ AFRAME.registerComponent('billboard-content', { let boardEl = document.createElement("a-box") boardEl.setAttribute("width", 2) - boardEl.setAttribute("depth", .1) + boardEl.setAttribute("depth", .01) boardEl.setAttribute("height", 1) - boardEl.setAttribute("color", "black") - boardEl.setAttribute("position", "0 1.5 -1") + boardEl.setAttribute("color", "#303030") + boardEl.setAttribute("position", "0 1.5 -1.2") AFRAME.scenes[0].appendChild( boardEl ) + var grid = new THREE.GridHelper(1, 10, 0xFFFFFF, 0x888888 ); + grid.rotateX(Math.PI/2) + grid.translateY(.01) + grid.translateX(.5) + boardEl.object3D.add(grid); + var grid = new THREE.GridHelper(1, 10, 0xFFFFFF, 0x888888 ); + grid.rotateX(Math.PI/2) + grid.translateY(.01) + grid.translateX(-.5) + boardEl.object3D.add(grid); // bringing content in fetch(billBoardSourceURL).then( r => r.json() ).then( json => { let count = json.length // can get too high, thus unreachable, sticking to 1m total @@ -217,6 +227,7 @@ AFRAME.registerComponent('billboard-content', { noteEl.setAttribute("max-width", 10) noteEl.setAttribute("jsonID", i) noteEl.setAttribute("onreleased", "saveBoard()") + // could also possible insure that it's in front of the board, always }) billboarding = true makeAnchorsVisibleOnTargets() @@ -289,8 +300,12 @@ AFRAME.registerComponent('selector-line', { - - + + + + + +