@gpu-tex-enc/etc

中文文档
1.0.3发布于 2024/02/16Apache-2.0TypeScriptCommonJS零依赖近 30 天下载 7.1万

Compressing images using the ETC & ETC2 texture compression standard.

原始使用文档
文档目录7 节
  1. Description
  2. Features
  3. Installation
  4. Usage
  5. Binaries
  6. Repository
  7. License

@gpu-tex-enc/etc

Compressing images using the ETC & ETC2 texture compression standard.

etc2comp v1.0.0

Description

The @gpu-tex-enc/etc module offers an efficient solution for compressing images into ETC (Ericsson Texture Compression) and ETC2 formats. These compression standards are widely used in the world of graphics programming, particularly in scenarios where memory bandwidth and texture size are crucial considerations.

Features

  • Efficient image compression into ETC and ETC2 formats.
  • Supports a wide range of use cases in graphics programming.
  • Includes pre-compiled etc2comp etc2comp binaries for Linux, Windows, and Darwin for easy integration.

Installation

To install the package, run:

npm install @gpu-tex-enc/etc

Usage

Here's how to use the module in your Node.js project:

const etcCompressor = require('@gpu-tex-enc/etc');

// Your code to use the compressor

Binaries

Included pre-compiled binaries:

  • Linux: etc2comp-linux (located in ./bin/linux/EtcTool)
  • Windows: etc2comp-win32 (located in ./bin/win32/EtcTool.exe)
  • Darwin: etc2comp-darwin-{x64|arm64} (located in ./bin/darwin-{x64|arm64}/EtcTool)

Repository

Find the source code on GitHub:

github.com/ddenisyuk/gpu-tex-enc

License

This project is under the Apache-2.0 License.

版本与发布记录

@gpu-tex-enc/etc 共发布 4 个版本,首次发布于 2023/12/03;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.0.3latest2024/02/162 年前
1.0.22024/02/162 年前
1.0.12023/12/042 年前
1.0.02023/12/032 年前

关于 @gpu-tex-enc/etc 的常见问题

@gpu-tex-enc/etc 是什么?

Compressing images using the ETC & ETC2 texture compression standard.

如何安装 @gpu-tex-enc/etc?

在项目目录运行 npm install @gpu-tex-enc/etc,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 etc2comp-linux、etc2comp-win32、etc2comp-darwin-x64、etc2comp-darwin-arm64,可以用 npx etc2comp-linux 直接运行。

@gpu-tex-enc/etc 支持 TypeScript 吗?

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

@gpu-tex-enc/etc 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@gpu-tex-enc/etc 可以商用吗?

@gpu-tex-enc/etc 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@gpu-tex-enc/etc 的下载量有多少?

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

@gpu-tex-enc/etc 还在维护吗?

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