add focus function

This commit is contained in:
casperlamboo 2017-12-05 11:10:38 +01:00
parent d2c70f3b2f
commit bcf0bb254d

View File

@ -80,7 +80,9 @@ export function createScene(canvas, props, state) {
}; };
updateCanvas(canvas); 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) { export function fetchProgress(url, { method = 'get', headers = {}, body = {} } = {}, onProgress) {