diff --git a/docs/examples/en/controls/DeviceOrientationControls.html b/docs/examples/en/controls/DeviceOrientationControls.html new file mode 100644 index 0000000000000000000000000000000000000000..34cdd9ea0cb4b892e4dac56202cd7e8e3b0715dd --- /dev/null +++ b/docs/examples/en/controls/DeviceOrientationControls.html @@ -0,0 +1,89 @@ + + + + + + + + + + + +

[name]

+ +

+ Can be used to orient the camera based on the mobile device's orientation. +

+ +

Example

+ +

[example:misc_controls_deviceorientation misc / controls / deviceorientation ]

+ +

Constructor

+ +

[name]( [param:Camera object] )

+

+

+ [page:Camera object]: The camera to be controlled. +

+

+ Creates a new instance of [name]. +

+

+ +

Properties

+ +

[property:Number alphaOffset]

+

+ The alpha offset in radians. Default is *0*. +

+ +

[property:Object deviceOrientation]

+

+ The current *deviceorientation* event object. +

+ +

[property:Boolean enabled]

+

+ Whether or not the controls are enabled. +

+ +

[property:Camera object]

+

+ The camera to be controlled. +

+ +

[property:Number screenOrientation]

+

+ The orientation in degrees (in 90-degree increments) of the viewport relative to the device's natural orientation. Default is *0*. +

+ +

Methods

+ +

[method:null connect] ()

+

+ Adds the event listeners of the controls and enables it. +

+ +

[method:null disconnect] ()

+

+ Removes the event listeners of the controls and disables it. +

+ +

[method:null dispose] ()

+

+ Should be called if the controls is no longer required. +

+ +

[method:null update] ()

+

+ Updates the controls. Usually called in the animation loop. +

+ +

Source

+ +

+ [link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/DeviceOrientationControls.js examples/js/controls/DeviceOrientationControls.js] +

+ + diff --git a/docs/examples/zh/controls/DeviceOrientationControls.html b/docs/examples/zh/controls/DeviceOrientationControls.html new file mode 100644 index 0000000000000000000000000000000000000000..34cdd9ea0cb4b892e4dac56202cd7e8e3b0715dd --- /dev/null +++ b/docs/examples/zh/controls/DeviceOrientationControls.html @@ -0,0 +1,89 @@ + + + + + + + + + + + +

[name]

+ +

+ Can be used to orient the camera based on the mobile device's orientation. +

+ +

Example

+ +

[example:misc_controls_deviceorientation misc / controls / deviceorientation ]

+ +

Constructor

+ +

[name]( [param:Camera object] )

+

+

+ [page:Camera object]: The camera to be controlled. +

+

+ Creates a new instance of [name]. +

+

+ +

Properties

+ +

[property:Number alphaOffset]

+

+ The alpha offset in radians. Default is *0*. +

+ +

[property:Object deviceOrientation]

+

+ The current *deviceorientation* event object. +

+ +

[property:Boolean enabled]

+

+ Whether or not the controls are enabled. +

+ +

[property:Camera object]

+

+ The camera to be controlled. +

+ +

[property:Number screenOrientation]

+

+ The orientation in degrees (in 90-degree increments) of the viewport relative to the device's natural orientation. Default is *0*. +

+ +

Methods

+ +

[method:null connect] ()

+

+ Adds the event listeners of the controls and enables it. +

+ +

[method:null disconnect] ()

+

+ Removes the event listeners of the controls and disables it. +

+ +

[method:null dispose] ()

+

+ Should be called if the controls is no longer required. +

+ +

[method:null update] ()

+

+ Updates the controls. Usually called in the animation loop. +

+ +

Source

+ +

+ [link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/DeviceOrientationControls.js examples/js/controls/DeviceOrientationControls.js] +

+ + diff --git a/docs/list.js b/docs/list.js index fe326dd35ad844dfd31696baa16fe05549579118..02f6752e35bf7a805c5c6454a99bd4b77088ff65 100644 --- a/docs/list.js +++ b/docs/list.js @@ -354,6 +354,7 @@ var list = { }, "Controls": { + "DeviceOrientationControls": "examples/en/controls/DeviceOrientationControls", "DragControls": "examples/en/controls/DragControls", "OrbitControls": "examples/en/controls/OrbitControls" }, @@ -791,7 +792,8 @@ var list = { }, "控制": { - "DragControls": "examples/en/controls/DragControls", + "DeviceOrientationControls": "examples/zh/controls/DeviceOrientationControls", + "DragControls": "examples/zh/controls/DragControls", "OrbitControls": "examples/zh/controls/OrbitControls" }, diff --git a/examples/jsm/controls/DeviceOrientationControls.d.ts b/examples/jsm/controls/DeviceOrientationControls.d.ts index 17b5c9d18062eb83a368be9246181ea4be5f3a6e..56a855bff19f630edd89d40f130022b93e950a4a 100644 --- a/examples/jsm/controls/DeviceOrientationControls.d.ts +++ b/examples/jsm/controls/DeviceOrientationControls.d.ts @@ -1,6 +1,5 @@ import { - Camera, - Vector3 + Camera } from '../../../src/Three'; export class DeviceOrientationControls { @@ -14,7 +13,6 @@ export class DeviceOrientationControls { deviceOrientation: any; enabled: boolean; screenOrientation: number; - target: Vector3; connect(): void; disconnect(): void;