Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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