[gs-longan](../README.md) / ViewerEvent

# Class: ViewerEvent

## Table of contents

### Constructors

- [constructor](ViewerEvent.md#constructor)

### Properties

- [uiEvent](ViewerEvent.md#uievent)
- [viewer](ViewerEvent.md#viewer)

### Methods

- [getElementPos](ViewerEvent.md#getelementpos)
- [keyboardEvent](ViewerEvent.md#keyboardevent)
- [mouseEvent](ViewerEvent.md#mouseevent)
- [mouseFarWorldPos](ViewerEvent.md#mousefarworldpos)
- [mouseNearWorldPos](ViewerEvent.md#mousenearworldpos)
- [mousePixelPos](ViewerEvent.md#mousepixelpos)
- [mouseUnitWindowPos](ViewerEvent.md#mouseunitwindowpos)
- [mouseViewpointPos](ViewerEvent.md#mouseviewpointpos)
- [mouseWindowPos](ViewerEvent.md#mousewindowpos)
- [mouseWorldPos](ViewerEvent.md#mouseworldpos)
- [mouseWorldRay](ViewerEvent.md#mouseworldray)
- [mouseZWorldPos](ViewerEvent.md#mousezworldpos)
- [touchEvent](ViewerEvent.md#touchevent)
- [touchNearWorldPos](ViewerEvent.md#touchnearworldpos)
- [touchPixelPos](ViewerEvent.md#touchpixelpos)
- [touchPixelPos1](ViewerEvent.md#touchpixelpos1)
- [touchUnitWindowPos](ViewerEvent.md#touchunitwindowpos)
- [touchWindowPos](ViewerEvent.md#touchwindowpos)
- [touchWindowPos1](ViewerEvent.md#touchwindowpos1)
- [touchWorldPos](ViewerEvent.md#touchworldpos)
- [touchWorldPos1](ViewerEvent.md#touchworldpos1)
- [touchWorldPos2](ViewerEvent.md#touchworldpos2)
- [touchWorldRay](ViewerEvent.md#touchworldray)
- [touchWorldRay1](ViewerEvent.md#touchworldray1)
- [wheelEvent](ViewerEvent.md#wheelevent)

## Constructors

### constructor

• **new ViewerEvent**(`viewer`, `e`): [`ViewerEvent`](ViewerEvent.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `viewer` | `any` |
| `e` | `UIEvent` |

#### Returns

[`ViewerEvent`](ViewerEvent.md)

## Properties

### uiEvent

• **uiEvent**: `UIEvent`

___

### viewer

• **viewer**: [`Viewer`](Viewer.md)

## Methods

### getElementPos

▸ **getElementPos**(`element`): `Object`

#### Parameters

| Name | Type |
| :------ | :------ |
| `element` | `any` |

#### Returns

`Object`

| Name | Type |
| :------ | :------ |
| `left` | `any` |
| `top` | `any` |

___

### keyboardEvent

▸ **keyboardEvent**(): `KeyboardEvent`

#### Returns

`KeyboardEvent`

___

### mouseEvent

▸ **mouseEvent**(): `MouseEvent`

#### Returns

`MouseEvent`

___

### mouseFarWorldPos

▸ **mouseFarWorldPos**(): `Float32Array`

#### Returns

`Float32Array`

___

### mouseNearWorldPos

▸ **mouseNearWorldPos**(): `Float32Array`

#### Returns

`Float32Array`

___

### mousePixelPos

▸ **mousePixelPos**(): `Float32Array`

#### Returns

`Float32Array`

___

### mouseUnitWindowPos

▸ **mouseUnitWindowPos**(): `Float32Array`

#### Returns

`Float32Array`

___

### mouseViewpointPos

▸ **mouseViewpointPos**(): `Float32Array`

#### Returns

`Float32Array`

___

### mouseWindowPos

▸ **mouseWindowPos**(): `Float32Array`

#### Returns

`Float32Array`

___

### mouseWorldPos

▸ **mouseWorldPos**(): `Float32Array`

#### Returns

`Float32Array`

___

### mouseWorldRay

▸ **mouseWorldRay**(): `Float32Array`

#### Returns

`Float32Array`

___

### mouseZWorldPos

▸ **mouseZWorldPos**(`z`): `Float32Array`

#### Parameters

| Name | Type |
| :------ | :------ |
| `z` | `number` |

#### Returns

`Float32Array`

___

### touchEvent

▸ **touchEvent**(): `TouchEvent`

#### Returns

`TouchEvent`

___

### touchNearWorldPos

▸ **touchNearWorldPos**(): `Float32Array`

#### Returns

`Float32Array`

___

### touchPixelPos

▸ **touchPixelPos**(): `Float32Array`

#### Returns

`Float32Array`

___

### touchPixelPos1

▸ **touchPixelPos1**(): `Float32Array`

#### Returns

`Float32Array`

___

### touchUnitWindowPos

▸ **touchUnitWindowPos**(): `Float32Array`

#### Returns

`Float32Array`

___

### touchWindowPos

▸ **touchWindowPos**(): `Float32Array`

#### Returns

`Float32Array`

___

### touchWindowPos1

▸ **touchWindowPos1**(): `Float32Array`

#### Returns

`Float32Array`

___

### touchWorldPos

▸ **touchWorldPos**(): `Float32Array`

#### Returns

`Float32Array`

___

### touchWorldPos1

▸ **touchWorldPos1**(): `Float32Array`

#### Returns

`Float32Array`

___

### touchWorldPos2

▸ **touchWorldPos2**(): `Float32Array`

#### Returns

`Float32Array`

___

### touchWorldRay

▸ **touchWorldRay**(): `Float32Array`

#### Returns

`Float32Array`

___

### touchWorldRay1

▸ **touchWorldRay1**(): `Float32Array`

#### Returns

`Float32Array`

___

### wheelEvent

▸ **wheelEvent**(): `WheelEvent`

#### Returns

`WheelEvent`
