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

ac-dds

v0.1.1

Published

Write DDS textures Assetto Corsa reads correctly, decode them to RGBA in Node or a browser, and check a texture for what the game would get wrong.

Readme

ac-dds

Writes DDS textures Assetto Corsa reads correctly, decodes them back to RGBA in Node or a browser, and says why the game would mishandle one. AC is a DX9 engine, and a texture it cannot use still installs and loads: the only symptom is a car that looks wrong.

import { caseCollisions, ddsInfo, ddsProblems, decodeDds, encodeDds } from "ac-dds"

const dds = encodeDds(rgba, 2048, 2048, { alpha: true }) // a Buffer: DXT5, 12 mip levels
decodeDds(dds.buffer.slice(dds.byteOffset, dds.byteOffset + dds.length)) // { width, height, pixels }

ddsInfo(bytes)     // { width, height, mips, fourCC, alpha, dx10 }, or null
ddsProblems(bytes) // [{ code: "mip-chain", message: "It has no mipmaps where ..." }]
caseCollisions(["Body.dds", "body.dds", "rim.dds"]) // [["Body.dds", "body.dds"]]
  • Encoder: BC1 (DXT1) or, with alpha, BC3 (DXT5), with every mip level down to 1x1 and the classic DX9 header, never DX10. The chain is counted to the longer edge, so 2048x512 gets 12 levels, and each level is averaged weighted by alpha, so a cut-out's clear black never darkens its edges at a distance. Flat colors come back within one step of themselves.
  • Decoder: DXT1, DXT3 and DXT5, the same behind a DX10 header, BC7, and uncompressed RGB, RGBA and luminance read through the header's channel masks. Top level only, and null for anything else rather than a guess.
  • Checker: ddsProblems reports not-dds, dx10 (ignored by the game, the classic white car), not-power-of-two (a DX9 game may drop the mip chain), mip-chain (too few levels: shimmers at a distance) and truncated (shorter than its declared levels need), each with a one-line message. caseCollisions finds names that are one file on NTFS, where the second to extract wins.

ac-dds/decode is the decoder alone, with no imports at all, so a browser can load it straight from node_modules through an import map. The rest uses Buffer and is Node only.