Interface SpriteImageItem

精灵图标某项数据

interface SpriteImageItem {
    anchorX?: number | "left" | "center" | "right";
    anchorY?: number | "top" | "bottom" | "center";
    collideId?: string;
    collideZIndex?: number;
    height?: number;
    highlightIcon?: string | ImageLike;
    highlightMaterial?: SpriteMaterial;
    highlightOpacity?: number;
    icon: string | ImageLike;
    material: SpriteMaterial;
    object: SpriteMarker;
    offsetX?: number;
    offsetY?: number;
    position: [number, number, number] | Vector3;
    rotation?: number;
    width?: number;
}

Hierarchy (view full)

Properties

anchorX?: number | "left" | "center" | "right"

x对齐方式

anchorY?: number | "top" | "bottom" | "center"

y对齐方式

collideId?: string

同一个id会一起显示和隐藏

collideZIndex?: number

碰撞检测时的zindex,值越大,越往上

height?: number

高(sizeAttenuation为false是图标像素大小,否则表示世界坐标制图高)

highlightIcon?: string | ImageLike

高亮时的图标

highlightMaterial?: SpriteMaterial
highlightOpacity?: number

高亮时的透明度

icon: string | ImageLike

图标

material: SpriteMaterial
object: SpriteMarker
offsetX?: number

x偏移

offsetY?: number

y偏移

position: [number, number, number] | Vector3

位置

rotation?: number

旋转角度(0-360)

width?: number

宽(sizeAttenuation为false是图标像素大小,否则表示世界坐标宽度)