Skip to content

Classes

GlobalDescription
SpritePIXI.Sprite

Functions

GlobalDescription
addChild(child)Object

向容器添加子对象。 Adds a child to the container.

addChildAt(child, index)Object

在指定索引位置向容器添加子对象。 Adds a child to the container at a specified index.

removeChild(child)Object

从容器中移除子对象。 Removes a child from the container.

removeChildAt(index)Object

从指定索引位置移除子对象。 Removes a child from the specified index position.

initialize(bitmap)

初始化精灵。 Initializes the sprite.

update()

为每一帧更新精灵。 Updates the sprite for each frame.

move(x, y)

一次设置x和y坐标。 Sets the x and y at once.

setFrame(x, y, width, height)

设置精灵显示的位图矩形。 Sets the rectangle of the bitmap that the sprite displays.

getBlendColor()Array

获取精灵的混合颜色。 Gets the blend color for the sprite.

setBlendColor(color)

设置精灵的混合颜色。 Sets the blend color for the sprite.

getColorTone()Array

获取精灵的颜色色调。 Gets the color tone for the sprite.

setColorTone(tone)

设置精灵的颜色色调。 Sets the color tone for the sprite.

Sprite ⇐ PIXI.Sprite

Kind: global class
Extends: PIXI.Sprite

  • Sprite ⇐ PIXI.Sprite
    • new Sprite(bitmap)
    • .voidFilter : PIXI.filters.VoidFilter

new Sprite(bitmap)

渲染到游戏屏幕的基本对象。
The basic object that is rendered to the game screen.

ParamTypeDescription
bitmapBitmap精灵的图像 The image for the sprite

Sprite.voidFilter : PIXI.filters.VoidFilter

空滤镜实例。
Void filter instance.

Kind: static property of Sprite


addChild(child) ⇒ Object

向容器添加子对象。
Adds a child to the container.

Kind: global function
Returns: Object - 添加的子对象 The child that was added

ParamTypeDescription
childObject要添加的子对象 The child to add

addChildAt(child, index) ⇒ Object

在指定索引位置向容器添加子对象。
Adds a child to the container at a specified index.

Kind: global function
Returns: Object - 添加的子对象 The child that was added

ParamTypeDescription
childObject要添加的子对象 The child to add
indexNumber放置子对象的索引 The index to place the child in

removeChild(child) ⇒ Object

从容器中移除子对象。
Removes a child from the container.

Kind: global function
Returns: Object - 被移除的子对象 The child that was removed

ParamTypeDescription
childObject要移除的子对象 The child to remove

removeChildAt(index) ⇒ Object

从指定索引位置移除子对象。
Removes a child from the specified index position.

Kind: global function
Returns: Object - 被移除的子对象 The child that was removed

ParamTypeDescription
indexNumber获取子对象的索引 The index to get the child from

initialize(bitmap)

初始化精灵。
Initializes the sprite.

Kind: global function

ParamTypeDescription
bitmapBitmap精灵的图像 The image for the sprite

update()

为每一帧更新精灵。
Updates the sprite for each frame.

Kind: global function


move(x, y)

一次设置 x 和 y 坐标。
Sets the x and y at once.

Kind: global function

ParamTypeDescription
xNumber精灵的 x 坐标 The x coordinate of the sprite
yNumber精灵的 y 坐标 The y coordinate of the sprite

setFrame(x, y, width, height)

设置精灵显示的位图矩形。
Sets the rectangle of the bitmap that the sprite displays.

Kind: global function

ParamTypeDescription
xNumber帧的 x 坐标 The x coordinate of the frame
yNumber帧的 y 坐标 The y coordinate of the frame
widthNumber帧的宽度 The width of the frame
heightNumber帧的高度 The height of the frame

getBlendColor() ⇒ Array

获取精灵的混合颜色。
Gets the blend color for the sprite.

Kind: global function
Returns: Array - 混合颜色 [r, g, b, a] The blend color [r, g, b, a]


setBlendColor(color)

设置精灵的混合颜色。
Sets the blend color for the sprite.

Kind: global function

ParamTypeDescription
colorArray混合颜色 [r, g, b, a] The blend color [r, g, b, a]

getColorTone() ⇒ Array

获取精灵的颜色色调。
Gets the color tone for the sprite.

Kind: global function
Returns: Array - 颜色色调 [r, g, b, gray] The color tone [r, g, b, gray]


setColorTone(tone)

设置精灵的颜色色调。
Sets the color tone for the sprite.

Kind: global function

ParamTypeDescription
toneArray颜色色调 [r, g, b, gray] The color tone [r, g, b, gray]

贡献者

暂无相关贡献者

页面历史

暂无最近变更历史
最近更新