Skip to content

Commit

Permalink
Controls: Move into core. (#29136)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 authored Aug 14, 2024
1 parent 3ce950f commit bf6dfd5
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h3>[method:undefined update] ( [param:Number delta] )</h3>
<h2>Source</h2>

<p>
[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/Controls.js examples/jsm/controls/Controls.js]
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h3>[method:undefined update] ( [param:Number delta] )</h3>
<h2>源代码</h2>

<p>
[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/Controls.js examples/jsm/controls/Controls.js]
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
4 changes: 2 additions & 2 deletions docs/list.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
},

"Extras": {
"Controls": "api/en/extras/Controls",
"DataUtils": "api/en/extras/DataUtils",
"Earcut": "api/en/extras/Earcut",
"ImageUtils": "api/en/extras/ImageUtils",
Expand Down Expand Up @@ -331,7 +332,6 @@

"Controls": {
"ArcballControls": "examples/en/controls/ArcballControls",
"Controls": "examples/en/controls/Controls",
"DragControls": "examples/en/controls/DragControls",
"FirstPersonControls": "examples/en/controls/FirstPersonControls",
"FlyControls": "examples/en/controls/FlyControls",
Expand Down Expand Up @@ -854,6 +854,7 @@
},

"附件": {
"Controls": "api/zh/extras/Controls",
"DataUtils": "api/zh/extras/DataUtils",
"Earcut": "api/zh/extras/Earcut",
"ImageUtils": "api/zh/extras/ImageUtils",
Expand Down Expand Up @@ -1084,7 +1085,6 @@

"控制": {
"ArcballControls": "examples/zh/controls/ArcballControls",
"Controls": "examples/zh/controls/Controls",
"DragControls": "examples/zh/controls/DragControls",
"FirstPersonControls": "examples/zh/controls/FirstPersonControls",
"FlyControls": "examples/zh/controls/FlyControls",
Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/controls/ArcballControls.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
Controls,
GridHelper,
EllipseCurve,
BufferGeometry,
Expand All @@ -14,7 +15,6 @@ import {
Matrix4,
MathUtils
} from 'three';
import { Controls } from './Controls.js';

//trackball state
const STATE = {
Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/controls/DragControls.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
Controls,
Matrix4,
Plane,
Raycaster,
Expand All @@ -7,7 +8,6 @@ import {
MOUSE,
TOUCH
} from 'three';
import { Controls } from './Controls.js';

const _plane = new Plane();

Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/controls/FirstPersonControls.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {
Controls,
MathUtils,
Spherical,
Vector3
} from 'three';
import { Controls } from './Controls.js';

const _lookDirection = new Vector3();
const _spherical = new Spherical();
Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/controls/FlyControls.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
Controls,
Quaternion,
Vector3
} from 'three';
import { Controls } from './Controls.js';

const _changeEvent = { type: 'change' };

Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/controls/PointerLockControls.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
Controls,
Euler,
Vector3
} from 'three';
import { Controls } from './Controls.js';

const _euler = new Euler( 0, 0, 0, 'YXZ' );
const _vector = new Vector3();
Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/controls/TrackballControls.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {
Controls,
MathUtils,
MOUSE,
Quaternion,
Vector2,
Vector3
} from 'three';
import { Controls } from './Controls.js';

const _changeEvent = { type: 'change' };
const _startEvent = { type: 'start' };
Expand Down
1 change: 1 addition & 0 deletions src/Three.WebGPU.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ export { Path } from './extras/core/Path.js';
export { ShapePath } from './extras/core/ShapePath.js';
export { CurvePath } from './extras/core/CurvePath.js';
export { Curve } from './extras/core/Curve.js';
export { Controls } from './extras/Controls.js';
export { DataUtils } from './extras/DataUtils.js';
export { ImageUtils } from './extras/ImageUtils.js';
export { ShapeUtils } from './extras/ShapeUtils.js';
Expand Down
1 change: 1 addition & 0 deletions src/Three.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export { Path } from './extras/core/Path.js';
export { ShapePath } from './extras/core/ShapePath.js';
export { CurvePath } from './extras/core/CurvePath.js';
export { Curve } from './extras/core/Curve.js';
export { Controls } from './extras/Controls.js';
export { DataUtils } from './extras/DataUtils.js';
export { ImageUtils } from './extras/ImageUtils.js';
export { ShapeUtils } from './extras/ShapeUtils.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EventDispatcher } from 'three';
import { EventDispatcher } from '../core/EventDispatcher.js';

class Controls extends EventDispatcher {

Expand Down

0 comments on commit bf6dfd5

Please sign in to comment.