Skip to content

Commit 3f4f652

Browse files
committed
Fix grid height resetting
1 parent 9c5d367 commit 3f4f652

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/renderer.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export class URDFRenderer extends THREE.WebGLRenderer {
2323
private _controls: OrbitControls;
2424
private _colorSky = new THREE.Color();
2525
private _colorGround = new THREE.Color();
26+
private _gridHeight = 0;
2627
private _robotIndex = -1;
2728

2829
/**
@@ -190,6 +191,7 @@ export class URDFRenderer extends THREE.WebGLRenderer {
190191
this._colorGround
191192
);
192193
this._updateLights();
194+
this.setGridHeight(this._gridHeight);
193195
this.redraw();
194196
}
195197

@@ -203,6 +205,7 @@ export class URDFRenderer extends THREE.WebGLRenderer {
203205
.map(i => i.type)
204206
.indexOf('GridHelper');
205207
this._scene.children[gridIndex].position.y = height;
208+
this._gridHeight = height;
206209
this.redraw();
207210
}
208211

0 commit comments

Comments
 (0)