npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@adatechnology/game-vehicles-driving

v0.2.7

Published

Driving for vehicles, without three.js and without a game: an arcade driver (the game's car: acceleration, braking, handbrake, steering, corner collision, crash damage, noise, run-over of bodies) and a semi-simulation driver (suspension, tyre friction, ge

Readme

@adatechnology/game-vehicles-driving

Driving for vehicles, without three.js and without a game. The arcade driver is the car of the game, extracted: a pure step over a state, with every number an option.

import { createArcadeDriver, vehicleCorners } from '@adatechnology/game-vehicles-driving'

const driver = createArcadeDriver({ maxForward: 20 })
driver.place(0, 0, 0)
const world = {
  blocked: (x, z, yaw) => vehicleCorners(driver.spec, x, z, yaw).some(([a, b]) => isSolid(a, b)),
  bodies: () => zombies.map((z) => (z.alive ? z : undefined)),
}
const { state, events } = driver.step({ throttle: 1, brake: 0, steer: 0, handbrake: false }, dt, world)
// events: crash, noise (crash, engine, horn), run_over (kill, knock, push), horn

The driver never touches a game: the host applies damage, shakes the camera, kills the bodies and plays the sounds from the events. Tested against the game's own carUpdate cut from jogo.js (positions and events frame by frame).

Semi-simulation

createSemiSimDriver(spec) is the driving the Frota document asks for: a single rigid body with a low centre of mass, a spring and damper on each wheel measured against the ground under it (world.ground(x, z)), longitudinal and lateral tyre forces apart inside a friction circle, an automatic gearbox with a simulated RPM, a handbrake that locks the rear wheels, surfaces (dry_asphalt 1.0, wet_asphalt 0.75 with aquaplaning above 90 km/h, dirt 0.65, grass 0.55, mud 0.4 that bogs a vehicle without four-wheel drive, blood 0.5) and damage that changes how it drives (driver.condition: a flat tyre pulls to its side, a damaged suspension rolls more, an engine under 30% fails at full throttle and can die uphill). Fuel use follows the RPM, the cargo and the engine (up to +40% when wrecked). semiSpecFromStats builds a spec from the design ratings; impactEnergy, bodyDamage, vehicleDamageFromImpact and speedLoss are the run-over formulas of section 08. There is no team code for it: the document's numbers are the tests, and no golden is claimed.