Skip to content

chris-ldgk/ac-sharedmem-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AC Shared Memory client

A strongly typed shared memory client for Assetto Corsa.

Getting Started

npm install ac-sharedmem-client

Usage

import { ACSharedMemClient, EventTypes } from "ac-sharedmem-client";

// Create new client instance
const client = new ACSharedMemClient();

// Listen to physics updates
client.on(EventTypes.PHYSICS_UPDATE, (physicsInfo) => console.log(physicsInfo));

// Listen to graphics updates
client.on(EventTypes.GRAPHICS_UPDATE, (graphicsInfo) =>
  console.log(graphicsInfo)
);

// Listen to static updates
client.on(EventTypes.STATIC_UPDATE, (staticInfo) => console.log(staticInfo));

// Initialize client (arg1 = Physics polling rate, arg2 = graphics polling rate, arg3 = static polling rate)
client.init(1000, 1000, 1000);

// Destroy client and including setIntervals and memory mappings
// client.destroy();

About

A (strongly typed) Shared Memory client for Assetto Corsa server based on https://github.com/FynniX/acc-node-wrapper

Resources

License

Stars

Watchers

Forks

Packages

No packages published