API 参考
正在准备搜索索引…

ReadonlyRenderStates

只读绘制状态;纹理和着色器保留资源引用。

interface ReadonlyRenderStates {
    blendMode: Readonly<BlendMode>;
    coordinateType: CoordinateType;
    shader:
        | null
        | Readonly<
            Pick<
                Shader,
                | typeof graphicsNative
                | "getNativeHandle"
                | typeof shaderId
                | typeof shaderTextures,
            >,
        >;
    stencilMode: Readonly<
        Omit<StencilMode, "stencilReference" | "stencilMask">,
    > & {
        stencilMask: Readonly<StencilValue>;
        stencilReference: Readonly<StencilValue>;
    };
    texture: | null
    | Readonly<
        Pick<
            Texture,
            | "getSize"
            | typeof graphicsNative
            | typeof textureId
            | typeof textureOwner
            | "copyToImage"
            | "isSmooth"
            | "isRepeated"
            | "isSrgb"
            | "getNativeHandle",
        >,
    >;
    transform: ReadonlyValue<Transform>;
}
源码与继承
成员目录6

属性

属性

blendMode: Readonly<BlendMode>

颜色混合模式。

源码与继承
coordinateType: CoordinateType

纹理坐标单位。

源码与继承
shader:
    | null
    | Readonly<
        Pick<
            Shader,
            | typeof graphicsNative
            | "getNativeHandle"
            | typeof shaderId
            | typeof shaderTextures,
        >,
    >

着色器资源引用,null 使用默认管线。

源码与继承
stencilMode: Readonly<Omit<StencilMode, "stencilReference" | "stencilMask">> & {
    stencilMask: Readonly<StencilValue>;
    stencilReference: Readonly<StencilValue>;
}

模板测试配置。

类型声明

  • 只读stencilMask: Readonly<StencilValue>

    只读模板比较掩码。

  • 只读stencilReference: Readonly<StencilValue>

    只读模板参考值。

源码与继承
texture:
    | null
    | Readonly<
        Pick<
            Texture,
            | "getSize"
            | typeof graphicsNative
            | typeof textureId
            | typeof textureOwner
            | "copyToImage"
            | "isSmooth"
            | "isRepeated"
            | "isSrgb"
            | "getNativeHandle",
        >,
    >

纹理资源引用,null 表示不用纹理。

源码与继承

绘制前应用的变换。

源码与继承

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0