# vrjs-trackr-key

> keyboard tracker for vrjs

Latest version **0.0.3** (published 2015-07-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install vrjs-trackr-key
pnpm add vrjs-trackr-key
yarn add vrjs-trackr-key
bun add vrjs-trackr-key
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2015-07-15 |
| First published | 2015-07-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Scott Frees |
| Maintainers | freezer3 |
| Keywords | vrjs |

## Links

- npm: https://www.npmjs.com/package/vrjs-trackr-key
- Repository: https://github.com/vrjs/trackr-key
- Homepage: https://github.com/vrjs/trackr-key#readme
- Issues: https://github.com/vrjs/trackr-key/issues
- npm.io page: https://npm.io/package/vrjs-trackr-key

## Recent versions

- 0.0.3 (latest) — 2015-07-15
- 0.0.2 — 2015-07-06
- 0.0.1 — 2015-07-03

## README

# vrjs-trackr-key
This is an npm module for the [vrjs]() framework that implements a standard tracker with keyboard controls.  The keyboard tracker has 10 channels/sensors that can be toggled, allowing an application to "track" up to ten different sensors.

## Installation

`npm install vrjs-trackr-key`

## Usage

Keypresses control the current position and orientation of the active sensor
```
x/X - moves the active sensor along the x axis
y/Y - moves the active sensor along the y axis
z/Z - moves the active sensor along the z axis
j/J - rotates the active sensor around x axis
n/N - rotates the active sensor around y axis
h/H - rotates the active sensor around z axis
[0-9] - sets the active sensor
```

In your code, you can create a trackr object with the THREE object:

```js
var keytrackr = require('vrjs-trackr-key')
var trackr = keytrackr.make(THREE);
```

You can add objects to sensors using the add method

```js
trackr.add(object, sensor_number);
```

In your animation loop, simply call the `poll` method and the module will automatically apply the sensor position and orientation to all tracked objects in the scene.

```js
trackr.poll()
```

You can apply optional positional offsets to the sensor and customized scalling using the `offset` and `scale` methods.  See source for details.

---
_Source: https://npm.io/package/vrjs-trackr-key · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
