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

@poe2-toolkit/tree-extractor

v0.5.0

Published

Builds the Path of Exile 2 passive-tree data and sprite atlases straight from the official GGPK / patch server, in the shape @poe2-toolkit/tree-core consumes. Code only — ships no game data or art.

Readme

@poe2-toolkit/tree-extractor

npm types included ESM only license: MIT

Builds the Path of Exile 2 passive tree, both the node data and the sprite atlases, straight from the official GGPK / patch server, in the shape @poe2-toolkit/tree-core consumes.

It is source-agnostic: it never downloads anything itself. You hand it a @poe2-toolkit/ggpk source and it returns the data, ready to use or to write wherever you publish it.

Code only. This package ships no game data and no art. Everything it produces is read from the patch server at run time and handed back to you; nothing from the game is bundled or stored here.

Install

npm install @poe2-toolkit/tree-extractor @poe2-toolkit/ggpk

Node 18+. ESM only. TypeScript types are included.

The contract

The library returns formatted data. It performs no I/O of its own beyond what the source serves, and it never writes to disk. You decide what to do with the result.

import { createCdnSource } from '@poe2-toolkit/ggpk';
import { extractTree } from '@poe2-toolkit/tree-extractor';

const source = await createCdnSource({
  patch: '4.5.4.1',
  tablesDir: './tables/English',
  cacheDir: './.cache',
});

const { data, graphics, centre } = await extractTree(source);

patch is whatever version the patch server currently serves — the value above is only illustrative and will age. The CDN serves just the current patch, so a stale version 404s; pass the one you actually want to extract.

extractTree(source) returns a TreeBundle:

| Field | Type | What it is | | --- | --- | --- | | data | TreeExport | The data.json payload, @poe2-toolkit/tree-core's normalize input (nodes, groups, classes, arc edges, roots, jewel slots, attribute choices, and the maxBasicPoints / maxWeaponSetPoints budget). | | graphics | GraphicsResult | The three sprite atlases (skills, frame, mastery-effect-active), each a packed PNG plus its frame-map, with a report of what packed or was skipped. | | centre | Record<string, Buffer> | Centre art keyed by output name (portrait-ranger, ascendancy-deadeye, ring-static, ...), each a PNG buffer. |

The individual steps are exported too, if you only need one: buildTree(source), buildGraphics(source, data), buildCentre(source). The lower-level pieces are exported as well: parsePsg (the .psg graph parser) and packAtlas (the atlas packer), along with their types.

CLI: write the bundle to disk

When you do want files, the bundled CLI writes the whole bundle to a configurable output directory; nothing is written inside the package:

poe2-tree-extract \
  --patch 4.5.4.1 \
  --tables ./tables/English \
  --cache ./.cache \
  --out ./out/tree

All four flags are required (--patch is illustrative above — pass the version the patch server currently serves). It writes data.json, the three atlases as assets/<name>.png + <name>.json, and the centre art as centre/<name>.png. Output is PNG + JSON; converting the PNGs to WebP for the web is a separate publish step left to you.

How it works

  • Data comes from GGPK tables (PassiveSkills, PassiveSkillMasteryGroups, Characters, Ascendancy, SkillGems, BaseItemTypes, ...) joined to the .psg passive-graph geometry, with stat lines rendered through @poe2-toolkit/ggpk's stat-description engine. Nodes that describe themselves through a granted skill or passive points instead of a stat line (resolved SkillGems -> BaseItemTypes for the name) read as "Grants Skill: ..." or "Grants N Passive Skill Point", matching Path of Building's export. Each node also carries an unlockConstraint when GGG gates it behind another allocated passive, and each directed .psg edge becomes an arc with its world centre resolved up front so the renderer just sweeps it.
  • The passive-point budget is computed from GGPK too, never hardcoded. maxWeaponSetPoints is every campaign weapon-set passive point (the WeaponPassives column of QuestStaticRewards, summed; optional non-campaign grants like fishing and logbook runes are filtered out by their QuestFlags id, as Path of Building also excludes them). maxBasicPoints adds one point per level above the first (the level cap from ExperienceLevels). The exporter config must request QuestStaticRewards, QuestFlags and ExperienceLevels.
  • Sprites are decoded from GGPK DDS art and packed into atlases keyed exactly as the renderer expects. Skill icons pack a single colour sprite per node; the unallocated/dimmed look is a render-time tint (a grey multiply, the game's own approach), not a baked desaturated copy. A sprite the source cannot serve is skipped and reported, never pulled from a vendored asset.

Released PoE2 classes and ascendancies only; the GGPK's leftover PoE1 placeholder classes are filtered out from the data.

Attributions and legal

This is an unofficial, fan-made project, not affiliated with, endorsed by, or sponsored by Grinding Gear Games. "Path of Exile 2" is a trademark of Grinding Gear Games, and all game content, data, and art are their property. This package ships code only and stores nothing derived from the game. Thank you to Grinding Gear Games for making Path of Exile 2.

GGPK access is provided by @poe2-toolkit/ggpk, which builds on pathofexile-dat (MIT, © SnosMe). Full attribution is in the repository NOTICE.

License

MIT, see LICENSE.