Skip to content

Instantly share code, notes, and snippets.

@gtalarico
Last active March 21, 2019 06:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gtalarico/358a6cb02db3a1bbe506d01bdfcc752c to your computer and use it in GitHub Desktop.
Save gtalarico/358a6cb02db3a1bbe506d01bdfcc752c to your computer and use it in GitHub Desktop.
threejs-vue-template-2
// src/three/index.ks
import * as THREE from 'three'
window.THREE = THREE
require('@/vendor/OrbitControls.js')
export { THREE }
// src/three/OrbitControls.js
// Note: file content truncated for display
// Be sure to include the entire content from
// https://raw.githubusercontent.com/mrdoob/three.js/master/examples/js/controls/OrbitControls.js
/**
* @author qiao / https://github.com/qiao
* @author mrdoob / http://mrdoob.com
* @author alteredq / http://alteredqualia.com/
* @author WestLangley / http://github.com/WestLangley
* @author erich666 / http://erichaines.com
*/
// This set of controls performs orbiting, dollying (zooming), and panning.
// Unlike TrackballControls, it maintains the "up" direction object.up (+Y by default).
//
// Orbit - left mouse / touch: one-finger move
// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish
// Pan - right mouse, or left mouse + ctrl/meta/shiftKey, or arrow keys / touch: two-finger move
THREE.OrbitControls = function ( object, domElement ) {
this.object = object;
// Be sure to include the entire content from
// https://raw.githubusercontent.com/mrdoob/three.js/master/examples/js/controls/OrbitControls.js
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment