Skip to content

Commit

Permalink
Merge pull request supermedium#23 from feiss/revert-21-teleport-on-ge…
Browse files Browse the repository at this point in the history
…nerated-ground

Revert "rotate the geometry instead of mesh to work with teleport component"
  • Loading branch information
feiss authored Oct 7, 2017
2 parents 75c96c7 + 6730f71 commit 46899ca
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,14 @@ 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;
this.groundMaterial = null;
this.groundGeometry = null;

this.dressing = document.createElement('a-entity');
this.dressing.classList.add('environmentDressing')

this.gridCanvas = null;
this.gridTexture = null;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 46899ca

Please sign in to comment.