Skip to content

Commit f72e67f

Browse files
authored
Merge pull request supermedium#23 from feiss/revert-21-teleport-on-generated-ground
Revert "rotate the geometry instead of mesh to work with teleport component"
2 parents ec4a933 + bb428a9 commit f72e67f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,14 @@ AFRAME.registerComponent('environment', {
163163
// create ground
164164
this.groundMaterial = null;
165165
this.ground = document.createElement('a-entity');
166+
this.ground.setAttribute('rotation', '-90 0 0');
166167
this.ground.classList.add('environmentGround');
167168
this.groundCanvas = null;
168169
this.groundTexture = null;
169170
this.groundMaterial = null;
170171
this.groundGeometry = null;
171172

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

175175
this.gridCanvas = null;
176176
this.gridTexture = null;
@@ -529,11 +529,10 @@ AFRAME.registerComponent('environment', {
529529

530530
this.groundGeometry.verticesNeedUpdate = true;
531531
this.groundGeometry.normalsNeedUpdate = true;
532-
this.groundGeometry.rotateX(- Math.PI / 2)
533532
}
534533

535534
// apply Y scale. There's no need to recalculate the geometry for this. Just change scale
536-
this.ground.setAttribute('scale', {y: this.data.groundYScale});
535+
this.ground.setAttribute('scale', {z: this.data.groundYScale});
537536

538537
// update ground, playarea and grid textures.
539538
var groundResolution = 2048;

0 commit comments

Comments
 (0)