# @eveshipfit/images 中文文档

规范地址：https://npmcn.com/package/%40eveshipfit/images/

版本：3\.3687575\.0
npm 元数据更新时间：2026-11-11T12:04:41.280Z
中文译文更新时间：2026-11-14T02:03:25.938Z
软件包许可：SEE LICENSE IN LICENSE

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40eveshipfit/images
原文对照：https://npmcn.com/package/%40eveshipfit/images/?lang=original
项目主页：https://github.com/EVEShipFit/images#readme
源码仓库：https://github.com/EVEShipFit/images

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：11.7 MB，6400 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- 运行依赖：1 个
- 首次发布：2026-09-26T20:44:00.852Z
- 最新版本发布：2026-11-11T12:04:40.727Z
- 近 30 天下载量：2575（2026-10-14 至 2026-11-12，npm 官方下载统计）
- 已发布版本数：28（近 12 个月 28 个）

## 中文简介

EVE Online 图标, 作为 WebP

## 安装

```sh
npm install @eveshipfit/images
```

也可以使用：`pnpm add @eveshipfit/images`、`yarn add @eveshipfit/images`、`bun add @eveshipfit/images`

## README

# 图像

[![npm](https://img.shields.io/npm/v/%40eveshipfit%2Fimages.svg)](https://www.npmjs.com/package/@eveshipfit/images) [![CI](https://github.com/EVEShipFit/images/actions/workflows/testing.yml/badge.svg)](https://github.com/EVEShipFit/images/actions/workflows/testing.yml)

[![Discord](https://img.shields.io/badge/Discord-Join-5865F2?logo=discord&logoColor=white)](https://discord.gg/S5V5BkvNf7)

EVE Online的图标,作为WebP.

每个已出版的类型,市场组,元组,派系,教条属性和教条效应都在这里有其图标,同时还有客户端的UI纹理EVEShipFit的用法. 图标不复合:一个类型有图标,帧和标记,因此技术级别或派别标记可以被忽略.

## 为什么?

大多数图像也可以在 [https://images.evetech.net (英语)](https://images.evetech.net/)但这些图像不是 总是质量最好的:有时他们的标记是错的等. 见 [这里](https://github.com/esi/esi-issues/issues/1448) 概览 问题.

此外,游戏中图标在服务器上无法使用. 意思是我们必须去取 他们来自客户资源.

两者共同创建了这个存储库:它通过获取所有 直接来自客户数据的信息。 此外,它还将其输出为WebP,用于 a 质量为 0.9,这使得文件的大小大约为5倍.

## 先决条件

-   走1.27号或以后
-   平板电脑,用来改变方案
-   Npm 软件包的节点
-   libwebp, 可选; 转换速度比它快数倍

## 使用量

```bash
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` 下载尚未下载的 SDE,另用磁盘上的. 使用 `--build <number>` ;客户端与 SDE 共享其构建编号. 使用 `--server singularity` 从 Singularity 取取 SDE 和客户端.

转换后图像保存在 `cache/`因此,下一个建筑只获取 EVE 中的变化.

## 产出

`build` 写到 `dist/`数字 :

-   `images/`,每个图像一个WebP。 文件以其来源的散列来命名,因此在不更改的情况下保留其名称.
-   `images.dat`一个平缓起伏器,被描述在 [规格/](https://npmcn.com/package/%40eveshipfit/images/specs/images.fbs),它告诉每个类型,市场组,元组,派系,教条属性和教条效应使用的是哪一种图像.

图标被64像素缩放为64,质量为90. 图标小于此,标记,帧和UI纹理保持了自己的大小,并且是无损失的.

哪个类型的图像会跟随客户端所画的, 由 [EVE- Turtle 工具系统](https://github.com/SentientTurtle/EVE-TurtleTools)夜生师.

## 无

```sh
npm install @eveshipfit/images
```

货船 `dist/images.dat`,则 `dist/images/` 文件夹和装入器. 将文件夹装入您的网站并装入 `images.dat` 像SDE一样. 与维特和 [静态复制](https://github.com/sapphi-red/vite-plugin-static-copy)数字 :

```js
// vite.config.js
viteStaticCopy({
  targets: [{ src: "node_modules/@eveshipfit/images/dist/images/*", dest: "images", rename: { stripBase: true } }],
});
```

```ts
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");
```

一个类型的地层被从64像素的图标的左上角画出自己的大小;一个标记比下面的图标要小. 缩放整个图标而不是层. 一个 `additive` 层被添加到下面的地层上; 在自己的堆栈上下文中绘制堆栈, 所以不添加到页面上 :

```tsx
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>
  );
}
```

## 释放

每天协调世界时中午12点, `main` 以最新的 SDE 和客户端为条件构建. 何时 `images.dat` 与最新版本不同,新版本在npm上制作并发布.

## 许可证

全部 EVE 数据 在线数据属于中共党组织,且受以下条件制约: [他们的许可协议](https://developers.eveonline.com/license-agreement)。 。 。 . EVESIP.fit的特异性是麻省理工学院.

## 常见问题

### @eveshipfit/images 是什么？

EVE Online 图标, 作为 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 和提交记录判断。

