Classes
| Global | Description |
|---|---|
WindowLayer ⇐ PIXI.Container |
Functions
| Global | Description |
|---|---|
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. |
WindowLayer ⇐ PIXI.Container
Kind: global class
Extends: PIXI.Container
- WindowLayer ⇐
PIXI.Container- new WindowLayer()
- .initialize() ⇒
void - .onRemoveAsAChild() ⇒
void - .move(x, y, width, height) ⇒
void - .update() ⇒
void
new WindowLayer()
窗口图层类,用于管理和渲染多个游戏窗口,支持 Canvas 和 WebGL 渲染。
Window layer class for managing and rendering multiple game windows, supporting both Canvas and WebGL rendering.
WindowLayer.initialize() ⇒ void
初始化窗口图层对象,创建遮罩和渲染所需的资源。
Initializes the window layer object, creates masks and rendering resources.
Kind: static method of WindowLayer
Returns: void - 无返回值 No return value
WindowLayer.onRemoveAsAChild() ⇒ void
当窗口图层作为子对象被移除时,清除所有子对象以防止内存泄漏。
When the window layer is removed as a child, clears all children to prevent memory leaks.
Kind: static method of WindowLayer
Returns: void - 无返回值 No return value
WindowLayer.move(x, y, width, height) ⇒ void
同时设置窗口图层的位置和大小。
Sets the position and size of the window layer at once.
Kind: static method of WindowLayer
Returns: void - 无返回值 No return value
| Param | Type | Description |
|---|---|---|
| x | Number | 窗口层的 x 坐标 The x coordinate of the window layer |
| y | Number | 窗口层的 y 坐标 The y coordinate of the window layer |
| width | Number | 窗口层的宽度 The width of the window layer |
| height | Number | 窗口层的高度 The height of the window layer |
WindowLayer.update() ⇒ void
每帧更新窗口图层,更新所有子窗口对象。
Updates the window layer each frame, updates all child window objects.
Kind: static method of WindowLayer
Returns: void - 无返回值 No return value
addChild(child) ⇒ Object
向容器中添加子对象。
Adds a child to the container.
Kind: global function
Returns: Object - 被添加的子对象 The child that was added
| Param | Type | Description |
|---|---|---|
| child | Object | 要添加的子对象 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
| Param | Type | Description |
|---|---|---|
| child | Object | 要添加的子对象 The child to add |
| index | Number | 放置子对象的索引 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
| Param | Type | Description |
|---|---|---|
| child | Object | 要移除的子对象 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
| Param | Type | Description |
|---|---|---|
| index | Number | 获取子对象的索引 The index to get the child from |