From 36dbc988c858fd541ef86a1fef82f6b074c43c80 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 18 Oct 2021 17:36:04 -0400 Subject: [PATCH] Grid is transparent and added y-axis --- img/grid_alpha_0.png | Bin 0 -> 227 bytes src/components/structural/View.js | 3 ++- src/reducers/scene.js | 2 +- src/tests/App.test.js | 2 +- src/utils/AFramePhysics.js | 5 +++-- 5 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 img/grid_alpha_0.png diff --git a/img/grid_alpha_0.png b/img/grid_alpha_0.png new file mode 100644 index 0000000000000000000000000000000000000000..0d4d9c0ec927671cfb4d28d4551c52a27cd1065a GIT binary patch literal 227 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9GGLLkg|>2BR0prCY# zYeY$Kep*R+Vo@rCb81d;WwAnVNoh)EzCuWTe$K(=4{LzR@;qG}Ln>~)z2GRyAi%(C zuzxZ~)kSZXg*!AJ-c-^l?TfV&V>D0LD#ysg!XcpG(7-?eSoyD|eou4eFb L^>bP0l+XkKOMEyC literal 0 HcmV?d00001 diff --git a/src/components/structural/View.js b/src/components/structural/View.js index a75c5f13..8445b602 100644 --- a/src/components/structural/View.js +++ b/src/components/structural/View.js @@ -284,6 +284,7 @@ class View extends Component { + diff --git a/src/reducers/scene.js b/src/reducers/scene.js index 25fa8928..6e1fdf21 100644 --- a/src/reducers/scene.js +++ b/src/reducers/scene.js @@ -5,7 +5,7 @@ export const DEF_SETTINGS = { floorColor: "#222", camConfig: 0, showCoordHelper: true, - showFloor: false, + showFloor: true, cameraPosition: "0 1.6 3", viewOnly: false, defaultLight: true, diff --git a/src/tests/App.test.js b/src/tests/App.test.js index 977cf1d3..75dbee84 100644 --- a/src/tests/App.test.js +++ b/src/tests/App.test.js @@ -317,7 +317,7 @@ describe("Scene Reducer", () => { floorColor: "#222", camConfig: 0, showCoordHelper: true, - showFloor: false, + showFloor: true, cameraPosition: "0 1.6 3", viewOnly: false, defaultLight: true, diff --git a/src/utils/AFramePhysics.js b/src/utils/AFramePhysics.js index 670e904d..2de146ff 100644 --- a/src/utils/AFramePhysics.js +++ b/src/utils/AFramePhysics.js @@ -46,13 +46,14 @@ AFRAME.registerComponent("gridmaterial",{ default:"" }, init: function(){ - const texture = new THREE.TextureLoader().load("https://cdn.jsdelivr.net/gh/donmccurdy/aframe-extras@v1.16.3/assets/grid.png"); + const texture = new THREE.TextureLoader().load("/img/grid_alpha_0.png"); texture.repeat = new THREE.Vector2(75,75); texture.wrapS = THREE.RepeatWrapping; texture.wrapT = THREE.RepeatWrapping; this.el.getObject3D("mesh").material = new THREE.MeshBasicMaterial({ - map: texture + map: texture, + transparent: true }); } });