Skip to content

Commit 7403b2d

Browse files
committed
Fix lint check
1 parent baa1b79 commit 7403b2d

File tree

3 files changed

+23
-20
lines changed

3 files changed

+23
-20
lines changed

src/controls.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -230,36 +230,39 @@ export class URDFControls extends GUI {
230230
let isResizing = false;
231231
let startX: number;
232232
let startWidth: number;
233-
233+
234234
const { minWidth, maxWidth, grabZoneWidth } = options;
235-
235+
236236
const onMouseMove = (e: MouseEvent) => {
237-
if (!isResizing) return;
238-
237+
if (!isResizing) {
238+
return;
239+
}
240+
239241
const width = startWidth - (e.clientX - startX);
240242
if (width >= minWidth && width <= maxWidth) {
241243
this.domElement.style.width = `${width}px`;
242244
}
243245
};
244-
246+
245247
const onMouseUp = () => {
246248
isResizing = false;
247249
document.removeEventListener('mousemove', onMouseMove);
248250
document.removeEventListener('mouseup', onMouseUp);
249251
};
250-
252+
251253
this.domElement.addEventListener('mousedown', (e: MouseEvent) => {
252-
if (e.clientX < this.domElement.getBoundingClientRect().left + grabZoneWidth) {
254+
if (
255+
e.clientX <
256+
this.domElement.getBoundingClientRect().left + grabZoneWidth
257+
) {
253258
isResizing = true;
254259
startX = e.clientX;
255260
startWidth = parseInt(getComputedStyle(this.domElement).width, 10);
256261
e.preventDefault();
257-
262+
258263
document.addEventListener('mousemove', onMouseMove);
259264
document.addEventListener('mouseup', onMouseUp);
260265
}
261266
});
262267
}
263-
264268
}
265-

src/renderer.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export class URDFRenderer extends THREE.WebGLRenderer {
123123
* Adds three lights to the scene
124124
*/
125125
private _addLights(): void {
126-
const directionalLight = new THREE.DirectionalLight(0xffffff, 1.0);
126+
const directionalLight = new THREE.DirectionalLight(0xff0000, 1.0);
127127
directionalLight.castShadow = true;
128128
directionalLight.position.set(3, 10, 3);
129129
directionalLight.shadow.camera.top = 2;
@@ -132,12 +132,12 @@ export class URDFRenderer extends THREE.WebGLRenderer {
132132
directionalLight.shadow.camera.right = 2;
133133
directionalLight.shadow.camera.near = 0.1;
134134
directionalLight.shadow.camera.far = 40;
135-
this._scene.add(directionalLight);
135+
//this._scene.add(directionalLight);
136136

137-
const ambientLight = new THREE.AmbientLight('#fff');
138-
ambientLight.intensity = 0.5;
137+
const ambientLight = new THREE.AmbientLight('#ff0000');
138+
ambientLight.intensity = 1;
139139
ambientLight.position.set(0, 5, 0);
140-
this._scene.add(ambientLight);
140+
//this._scene.add(ambientLight);
141141

142142
const hemisphereLight = new THREE.HemisphereLight(
143143
this._colorSky,

style/base.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@
2929
box-sizing: border-box;
3030
min-width: 150px;
3131
max-width: 500px;
32-
padding-bottom: 20px;
32+
padding-bottom: 20px;
3333
}
3434

3535
/* Add a resize handle on the left border */
3636
.urdf-gui::before {
37-
content: "";
37+
content: '';
3838
position: absolute;
39-
width: 12px;
39+
width: 12px;
4040
height: 100%;
41-
cursor: ew-resize;
41+
cursor: ew-resize;
4242
}
4343

4444
.urdf-gui li.folder {
@@ -144,6 +144,6 @@
144144
/* Style for Dat.GUI's close button */
145145
.urdf-gui .close-button {
146146
width: 100% !important;
147-
color: white !important;
147+
color: white !important;
148148
position: absolute;
149149
}

0 commit comments

Comments
 (0)