1.0.9 • Published 1 year ago

forza-horizon v1.0.9

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Forza Horizon Telemetry (NodeJS)

A simple UDP server library, which can parse data from FH4/FH5.

📝How to use

0. Install & Import

  1. Install:

    $ npm i forza-horizon
  2. Import:

    import ForzaServer from 'forza-horizon'

1. Create a server

const server = new ForzaServer( PORT )

2. Add listeners

server.on('listening', () => console.log('Listening...'))

server.on('data', data => {
  console.log(data)
})

3. Bind Server

server.bind()

💬Example

import ForzaServer from 'forza-horizon'

const server = new ForzaServer(3001)

server.on('data', data => {
    let isMoving = [data.VelocityX, data.VelocityY, data.VelocityZ].some(v => v > 0.1)

    console.log(`Is moving: ${isMoving}`)
})

server.bind()
1.0.9

1 year ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago