Skip to content

Commit 9c2406f

Browse files
committedFeb 3, 2021
refactor(debug): remove three r124 warning.
1 parent 6297c09 commit 9c2406f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed
 

‎src/Core/Picking.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ export default {
233233
{ scene: object, camera: view.camera },
234234
zone);
235235

236-
const clearColor = view.mainLoop.gfxEngine.renderer.getClearColor();
236+
const clearColor = new THREE.Color();
237+
view.mainLoop.gfxEngine.renderer.getClearColor(clearColor);
237238
const clearR = Math.round(255 * clearColor.r);
238239
const clearG = Math.round(255 * clearColor.g);
239240
const clearB = Math.round(255 * clearColor.b);

‎utils/debug/Debug.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ function Debug(view, datDebugTool, chartDivContainer) {
160160
}
161161
}
162162

163-
const bClearColor = new Color();
163+
const clearColor = new Color();
164164
const lookAtCameraDebug = new Vector3();
165165
function renderCameraDebug() {
166166
if (state.debugCameraWindow && debugCamera) {
@@ -208,15 +208,15 @@ function Debug(view, datDebugTool, chartDivContainer) {
208208
const deltaY = state.displayCharts ? Math.round(parseFloat(chartDivContainer.style.height.replace('%', '')) * g.height / 100) + 3 : 0;
209209
helper.visible = true;
210210
helper.updateMatrixWorld(true);
211-
bClearColor.copy(r.getClearColor());
211+
r.getClearColor(clearColor);
212212
r.setViewport(g.width - size.x, deltaY, size.x, size.y);
213213
r.setScissor(g.width - size.x, deltaY, size.x, size.y);
214214
r.setScissorTest(true);
215215
r.setClearColor(backgroundChartDiv);
216216
r.clear();
217217
r.render(view.scene, debugCamera);
218218
r.setScissorTest(false);
219-
r.setClearColor(bClearColor);
219+
r.setClearColor(clearColor);
220220
r.setViewport(0, 0, g.width, g.height);
221221

222222
helper.visible = false;

0 commit comments

Comments
 (0)
Please sign in to comment.