@eveshipfit/images

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

EVE Online 图标, 作为 WebP

中文使用文档
文档目录7 节
  1. 为什么?
  2. 先决条件
  3. 使用量
  4. 产出
  5. 无
  6. 释放
  7. 许可证

图像

npm CI

Discord

EVE Online的图标,作为WebP.

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

为什么?

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

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

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

先决条件

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

使用量

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一个平缓起伏器,被描述在 规格/,它告诉每个类型,市场组,元组,派系,教条属性和教条效应使用的是哪一种图像.

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

哪个类型的图像会跟随客户端所画的, 由 EVE- Turtle 工具系统夜生师.

无

npm install @eveshipfit/images

货船 dist/images.dat,则 dist/images/ 文件夹和装入器. 将文件夹装入您的网站并装入 images.dat 像SDE一样. 与维特和 静态复制数字 :

// 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");

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

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 数据 在线数据属于中共党组织,且受以下条件制约: 他们的许可协议。 。 。 . EVESIP.fit的特异性是麻省理工学院.

版本与发布记录

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