Class: GyroInputDevice
Extra-Helpers.GyroInputDevice
Implements
Methods
IsCompatible
▸ Static
IsCompatible(): boolean
Returns
boolean
Defined in
webgi/src/extras/devices/GyroInputDevice.ts:73
getOffsetFromCenter
▸ getOffsetFromCenter(initialIdentity?
): Vector2
Parameters
Name | Type | Default value |
---|---|---|
initialIdentity | boolean | true |
Returns
Vector2
Implementation of
IInputDevice.getOffsetFromCenter
Defined in
webgi/src/extras/devices/GyroInputDevice.ts:16
getQuaternion
▸ getQuaternion(initialIdentity
, quat?
): Quaternion
Parameters
Name | Type |
---|---|
initialIdentity | boolean |
quat? | Quaternion |
Returns
Quaternion
Defined in
webgi/src/extras/devices/GyroInputDevice.ts:27
onScreenOrientationChangeEvent
▸ onScreenOrientationChangeEvent(): void
Returns
void
Defined in
webgi/src/extras/devices/GyroInputDevice.ts:77
onDeviceOrientationChangeEvent
▸ onDeviceOrientationChangeEvent(event
): void
Parameters
Name | Type |
---|---|
event | DeviceOrientationEvent |
Returns
void
Defined in
webgi/src/extras/devices/GyroInputDevice.ts:81
addPermissionMessage
▸ addPermissionMessage(): void
Returns
void
Defined in
webgi/src/extras/devices/GyroInputDevice.ts:85
connect
▸ connect(): undefined
| boolean
Returns
undefined
| boolean
Implementation of
Defined in
webgi/src/extras/devices/GyroInputDevice.ts:100
askPermission
▸ askPermission(): void
Returns
void
Defined in
webgi/src/extras/devices/GyroInputDevice.ts:116
disconnect
▸ disconnect(): void
Returns
void
Implementation of
Defined in
webgi/src/extras/devices/GyroInputDevice.ts:136
_toQuaternion
▸ Protected
_toQuaternion(quat
, alpha
, beta
, gamma
, orient
, initialIdentity
): Quaternion
Parameters
Name | Type |
---|---|
quat | Quaternion |
alpha | number |
beta | number |
gamma | number |
orient | number |
initialIdentity | boolean |
Returns
Quaternion
Defined in
webgi/src/extras/devices/GyroInputDevice.ts:47
Properties
screenOrientation
• screenOrientation: any
Defined in
webgi/src/extras/devices/GyroInputDevice.ts:6
deviceOrientation
• Optional
deviceOrientation: DeviceOrientationEvent
Defined in
webgi/src/extras/devices/GyroInputDevice.ts:7
permissionMessage
• Optional
permissionMessage: HTMLDivElement
Defined in
webgi/src/extras/devices/GyroInputDevice.ts:8
Constructors
constructor
• new GyroInputDevice(viewer
)
Parameters
Name | Type |
---|---|
viewer | ViewerApp |