From bcf0bb254d5a68f0d6d76a017ad3ecc65203954d Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Tue, 5 Dec 2017 11:10:38 +0100 Subject: [PATCH] add focus function --- src/interface/utils.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/interface/utils.js b/src/interface/utils.js index c1f8e08..1383028 100644 --- a/src/interface/utils.js +++ b/src/interface/utils.js @@ -80,7 +80,9 @@ export function createScene(canvas, props, state) { }; updateCanvas(canvas); - return { editorControls, scene, mesh, camera, renderer, render, box, setSize, updateCanvas }; + const focus = () => editorControls.focus(mesh); + + return { editorControls, scene, mesh, camera, renderer, render, box, setSize, updateCanvas, focus }; } export function fetchProgress(url, { method = 'get', headers = {}, body = {} } = {}, onProgress) {