@eveshipfit/images

中文文档
3.3687575.0发布于 2026/11/11SEE LICENSE IN LICENSETypeScriptES Module构建来源已验证近 30 天下载 2575

EVE Online's icons, as WebP

原始使用文档
文档目录7 节
  1. Why?
  2. Prerequisite
  3. Usage
  4. Output
  5. npm
  6. Releasing
  7. License

Images

npm CI

Discord

EVE Online's icons, as WebP.

Every published type, market group, meta group, faction, dogma attribute and dogma effect has its icon here, together with the client's UI textures EVEShipFit uses. Icons are not composited: a type has an icon, a frame and a marker, so the tech level or faction marker can be left off.

Why?

Most images are also available on https://images.evetech.net. But these images aren't always of the best quality: sometimes their marker is wrong, etc. See here for an overview of issues.

Additionally, in-game icons aren't available on that server. Meaning we have to fetch them from the client resources.

Both combined created this repository: it fixes both issues by just fetching all the information from the client data directly. Additionally, it outputs it as WebP with a quality of 0.9, which makes the files about 5 times smaller.

Prerequisite

  • Go 1.27 or later
  • flatc, to change the schema
  • Node, for the npm package
  • libwebp, optional; converting is several times faster with it

Usage

go run ./cmd/images download        # fetch the latest SDE into sde/, and the client's resource index into cache/
go run ./cmd/images build           # convert the images, and write them with images.dat to dist/
go run ./cmd/images compare old/    # tell whether dist/ differs from old/

build downloads the SDE when there is none yet, and uses the one on disk otherwise. Use --build <number> to pin a version; the client shares its build number with the SDE. Use --server singularity to take the SDE and client from Singularity.

Converted images are kept in cache/, so a next build only fetches what changed in EVE.

Output

build writes to dist/:

  • images/, one WebP per image. A file is named after a hash of its source, so it keeps its name while it does not change.
  • images.dat, a flatbuffer, described in specs/, which tells which images every type, market group, meta group, faction, dogma attribute and dogma effect uses.

Icons are scaled to 64 by 64 pixels, lossy at quality 90. Icons smaller than that, markers, frames and UI textures keep their own size, and are lossless.

Which image a type gets follows what the client draws, as worked out by EVE-TurtleTools' eveicongenerator.

npm

npm install @eveshipfit/images

The package ships dist/images.dat, the dist/images/ folder and a loader. Serve the folder with your site, and load images.dat like the SDE. With Vite and vite-plugin-static-copy:

// vite.config.js
viteStaticCopy({
  targets: [{ src: "node_modules/@eveshipfit/images/dist/images/*", dest: "images", rename: { stripBase: true } }],
});
import imagesUrl from "@eveshipfit/images/dist/images.dat?url";
import { loadImages } from "@eveshipfit/images";

const images = await loadImages({ url: imagesUrl }, { baseUrl: `${import.meta.env.BASE_URL}images/` });

images.typeIcon(2048); // Damage Control II: [{ src }, { src }], the icon and its Tech II marker
images.typeIcon(2048, { marker: false }); // without the Tech II marker
images.typeIcon(691, { copy: true }); // Rifter Blueprint, as a copy
images.marketGroupIcon(4); // Ships
images.metaGroupIcon(2); // Tech II
images.factionIcon(500001); // Caldari State
images.attributeIcon(263); // Shield Capacity
images.effectIcon(12); // High Power Slot
images.uiTexture("classes/fitting/statsicons/armorhp");

A type's layers are drawn at their own size, from the top-left corner of an icon of 64 pixels; a marker is smaller than the icon below it. Scale the whole icon rather than the layers. An additive layer is added onto the layers below; draw the stack in its own stacking context, so it is not added onto the page:

function TypeIcon({ typeId, size = 64 }: { typeId: number; size?: number }) {
  const layers = images.typeIcon(typeId);
  if (layers === undefined) return null;

  return (
    <span style={{ position: "relative", display: "inline-block", width: 64, height: 64, zoom: size / 64, isolation: "isolate" }}>
      {layers.map((layer) => (
        <img
          key={layer.src}
          src={layer.src}
          alt=""
          style={{ position: "absolute", top: 0, left: 0, mixBlendMode: layer.additive ? "plus-lighter" : undefined }}
        />
      ))}
    </span>
  );
}

Releasing

Every day at 12:00 UTC, main is built against the latest SDE and client. When images.dat differs from the latest release, a new release is made and published on npm.

License

All EVE Online data belongs to CCP, and is subject to their license agreement. Everything EVEShip.fit-specific is MIT.

版本与发布记录

@eveshipfit/images 共发布 28 个版本,首次发布于 2026/09/27;过去 12 个月发布了 28 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
3.3687575.0latest2026/11/112 天前
3.3682781.02026/11/103 天前
3.3678022.0-singularity.57singularity2026/11/086 天前
3.3670638.02026/11/058 天前
3.3665151.02026/11/0211 天前
3.3662168.22026/11/0113 天前

关于 @eveshipfit/images 的常见问题

@eveshipfit/images 是什么?

EVE Online's icons, as WebP

如何安装 @eveshipfit/images?

在项目目录运行 npm install @eveshipfit/images,或使用 pnpm add / yarn add / bun add。

@eveshipfit/images 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@eveshipfit/images 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@eveshipfit/images 可以商用吗?

@eveshipfit/images 使用 SEE LICENSE IN LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@eveshipfit/images 的下载量有多少?

根据 npm 官方下载统计,@eveshipfit/images 在 2026/10/14 – 2026/11/12 这 30 天内被下载 2,575 次,日均约 86 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@eveshipfit/images 还在维护吗?

最新版本 3.3687575.0 发布于 2026/11/11(2 天前);至今共发布 28 个版本,其中过去 12 个月发布了 28 个;首次发布于 2026/09/27。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。