# Script in threejs Editor to rotate scene by mouse

**URL:** <https://discourse.threejs.org/t/script-in-threejs-editor-to-rotate-scene-by-mouse/15941>\
**Category:** Questions\
**Tags:** mouse-controls, editor\
**Created:** [June 6, 2020, 6:14pm UTC](https://discourse.threejs.org/t/script-in-threejs-editor-to-rotate-scene-by-mouse/15941 "2020-06-06T18:14:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/nikn/32/11406_2.png) [@nikn](https://discourse.threejs.org/u/nikn)\
**Post date:** [June 6, 2020, 6:14pm UTC](https://discourse.threejs.org/t/script-in-threejs-editor-to-rotate-scene-by-mouse/15941/1 "2020-06-06T18:14:39Z")

</div>

Tell me, is it possible to add code in the editor so that the whole scene spins with the help of a mouse movement?  
I am not familiar with javascript, but I can upload the model to the editor.  
when exporting to the web, the model is static, I can’t rotate or zoom it

I found the TrackballControls method, but I don’t know how to apply it in the editor

Can you help me ?

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [June 7, 2020, 9:29am UTC](https://discourse.threejs.org/t/script-in-threejs-editor-to-rotate-scene-by-mouse/15941/2 "2020-06-07T09:29:26Z")

</div>

> [@nikn](#):
>
> I found the TrackballControls method, but I don’t know how to apply it in the editor

It’s unfortunately not possible to add additional controls to the editor’s scene. However, you can arbitrarily modify the exported project source code but it requires basic JavaScript and `three.js` knowledge.

Adding an existing control class like `TrackballControls` is probably easier than implement camera controls from scratch with the editor’s script feature.
