From bb428a910c64d9d1dca24126e81cae47d5bd4be0 Mon Sep 17 00:00:00 2001 From: "Diego F. Goberna" Date: Sat, 7 Oct 2017 22:40:11 +0200 Subject: [PATCH] Revert "rotate the geometry instead of mesh to work with teleport component" --- index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 190732f0..30a639ff 100644 --- a/index.js +++ b/index.js @@ -163,6 +163,7 @@ AFRAME.registerComponent('environment', { // create ground this.groundMaterial = null; this.ground = document.createElement('a-entity'); + this.ground.setAttribute('rotation', '-90 0 0'); this.ground.classList.add('environmentGround'); this.groundCanvas = null; this.groundTexture = null; @@ -170,7 +171,6 @@ AFRAME.registerComponent('environment', { this.groundGeometry = null; this.dressing = document.createElement('a-entity'); - this.dressing.classList.add('environmentDressing') this.gridCanvas = null; this.gridTexture = null; @@ -529,11 +529,10 @@ AFRAME.registerComponent('environment', { this.groundGeometry.verticesNeedUpdate = true; this.groundGeometry.normalsNeedUpdate = true; - this.groundGeometry.rotateX(- Math.PI / 2) } // apply Y scale. There's no need to recalculate the geometry for this. Just change scale - this.ground.setAttribute('scale', {y: this.data.groundYScale}); + this.ground.setAttribute('scale', {z: this.data.groundYScale}); // update ground, playarea and grid textures. var groundResolution = 2048;