提交 5d1f736f 编写于 作者: C Christian Yang

Add THREE.MouseUtils with BUTTONS enum

上级 67df0d4d
......@@ -23,9 +23,6 @@
THREE.OrbitControls = function ( object, domElement ) {
// MouseEvent.button codes per https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent.button
var MOUSEBUTTONS = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
this.object = object;
this.domElement = ( domElement !== undefined ) ? domElement : document;
......@@ -74,7 +71,7 @@ THREE.OrbitControls = function ( object, domElement ) {
this.keys = { LEFT: 37, UP: 38, RIGHT: 39, BOTTOM: 40 };
// Mouse buttons
this.mouseButtons = { ORBIT: MOUSEBUTTONS.LEFT, ZOOM: MOUSEBUTTONS.MIDDLE, PAN: MOUSEBUTTONS.RIGHT };
this.mouseButtons = { ORBIT: THREE.MouseUtils.BUTTONS.LEFT, ZOOM: THREE.MouseUtils.BUTTONS.MIDDLE, PAN: THREE.MouseUtils.BUTTONS.RIGHT };
////////////
// internals
......
/**
* @author yangchristian
*/
THREE.MouseUtils = {
// MouseEvent.button codes per https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent.button
BUTTONS: { LEFT: 0, MIDDLE: 1, RIGHT: 2 }
};
\ No newline at end of file
[
"src/extras/GeometryUtils.js",
"src/extras/ImageUtils.js",
"src/extras/MouseUtils.js",
"src/extras/SceneUtils.js",
"src/extras/FontUtils.js",
"src/extras/core/Curve.js",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册