visibleRect 类型
模块: _decorator 父模块: cc
cc.visibleRect is a singleton object which defines the actual visible rect of the current view, it should represent the same rect as cc.view.getViewportRect()
索引
属性(properties)
topLeftVec2Top left coordinate of the screen related to the game scene.topRightVec2Top right coordinate of the screen related to the game scene.topVec2Top center coordinate of the screen related to the game scene.bottomLeftVec2Bottom left coordinate of the screen related to the game scene.bottomRightVec2Bottom right coordinate of the screen related to the game scene.bottomVec2Bottom center coordinate of the screen related to the game scene.centerVec2Center coordinate of the screen related to the game scene.leftVec2Left center coordinate of the screen related to the game scene.rightVec2Right center coordinate of the screen related to the game scene.widthNumberWidth of the screen.heightNumberHeight of the screen.
方法
initinitialize
Details
属性(properties)
topLeft
Top left coordinate of the screen related to the game scene.
| meta | description |
|---|---|
| 类型 | Vec2 |
| 定义于 | cocos2d/core/platform/CCVisibleRect.js:94 |
topRight
Top right coordinate of the screen related to the game scene.
| meta | description |
|---|---|
| 类型 | Vec2 |
| 定义于 | cocos2d/core/platform/CCVisibleRect.js:99 |
top
Top center coordinate of the screen related to the game scene.
| meta | description |
|---|---|
| 类型 | Vec2 |
| 定义于 | cocos2d/core/platform/CCVisibleRect.js:104 |
bottomLeft
Bottom left coordinate of the screen related to the game scene.
| meta | description |
|---|---|
| 类型 | Vec2 |
| 定义于 | cocos2d/core/platform/CCVisibleRect.js:109 |
bottomRight
Bottom right coordinate of the screen related to the game scene.
| meta | description |
|---|---|
| 类型 | Vec2 |
| 定义于 | cocos2d/core/platform/CCVisibleRect.js:114 |
bottom
Bottom center coordinate of the screen related to the game scene.
| meta | description |
|---|---|
| 类型 | Vec2 |
| 定义于 | cocos2d/core/platform/CCVisibleRect.js:119 |
center
Center coordinate of the screen related to the game scene.
| meta | description |
|---|---|
| 类型 | Vec2 |
| 定义于 | cocos2d/core/platform/CCVisibleRect.js:124 |
left
Left center coordinate of the screen related to the game scene.
| meta | description |
|---|---|
| 类型 | Vec2 |
| 定义于 | cocos2d/core/platform/CCVisibleRect.js:129 |
right
Right center coordinate of the screen related to the game scene.
| meta | description |
|---|---|
| 类型 | Vec2 |
| 定义于 | cocos2d/core/platform/CCVisibleRect.js:134 |
width
Width of the screen.
| meta | description |
|---|---|
| 类型 | Number |
| 定义于 | cocos2d/core/platform/CCVisibleRect.js:139 |
height
Height of the screen.
| meta | description |
|---|---|
| 类型 | Number |
| 定义于 | cocos2d/core/platform/CCVisibleRect.js:144 |
方法
init
initialize
| meta | description |
|---|---|
| 定义于 | cocos2d/core/platform/CCVisibleRect.js:50 |
参数列表
visibleRectRect