three-dragcontrols
Drag controls for https://github.com/mrdoob/three.js with support for ES6 import
Inspired by https://github.com/yomotsu/camera-controls to create the ES6 module
Installation
npm install drag-controls
Usage
DragControls var objects = // init threejs sceneconst camera = 60 width / height 001 1000const renderer = // set renderer size and append domElement to the desired conponent// add some meshes to the scene and the 'objects' array const dragControls = objects camera domElement // you may also want to add an mouse move event listener to render when moving objectsrendererdomElement;