Interface TextureOptions

图片参数

interface TextureOptions {
    autoResize?: boolean;
    format?: "jpg" | "png" | "heif" | "webp" | "avif";
    mappings?: ImageURLMappings;
    quality?: number;
    sharpen?: number;
    size?: number;
    transform?: ((url, options) => string);
}

Properties

autoResize?: boolean

针对 textureOptions 是否自动通过模型贴图的数量计算需要的模型贴图的尺寸 默认 true

format?: "jpg" | "png" | "heif" | "webp" | "avif"

图片格式参数

mappings?: ImageURLMappings
quality?: number

图片质量参数(0-100)

sharpen?: number

锐化参数 海外不支持

size?: number

图片尺寸参数 尽量使用 2 的幂次 如 256 512 1024

transform?: ((url, options) => string)

url 地址转化

Type declaration

    • (url, options): string
    • Parameters

      Returns string

Returns

转化后地址