文档目录
IF 精灵
Industrial Foregoing 精灵渲染器:按 IF_CROPS 裁剪 IF / Titanium 图集,1 源 px = 1 GUI px,支持 multiply 染色。
import { IfSprite } from "./index";
export function IfSpriteDemo() {
return (
<div className="flex items-start gap-4">
<IfSprite crop="slot" height={18} name="titanium_background" width={18} />
<IfSprite crop="tankNormal" height={56} name="titanium_background" width={18} />
<IfSprite crop="augmentPanel" height={84} name="titanium_background" width={30} />
<IfSprite crop="donateIcon" height={15} name="donate" width={15} />
</div>
);
}
安装
$pnpm add @tennantite/industrialforegoingnpm 方式安装编译产物;需要改造源码请用上方的 CLI 拷贝安装。
源码
packages/industrialforegoing/src/if-sprite/index.tsxnpm 包保留源码目录,可直接复制改造。