visibleRect Class
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()
Index
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.
Methods
initinitialize
Details
Properties
topLeft
Top left coordinate of the screen related to the game scene.
| meta | description |
|---|---|
| Type | Vec2 |
| Defined in | cocos2d/core/platform/CCVisibleRect.js:95 |
topRight
Top right coordinate of the screen related to the game scene.
| meta | description |
|---|---|
| Type | Vec2 |
| Defined in | cocos2d/core/platform/CCVisibleRect.js:101 |
top
Top center coordinate of the screen related to the game scene.
| meta | description |
|---|---|
| Type | Vec2 |
| Defined in | cocos2d/core/platform/CCVisibleRect.js:107 |
bottomLeft
Bottom left coordinate of the screen related to the game scene.
| meta | description |
|---|---|
| Type | Vec2 |
| Defined in | cocos2d/core/platform/CCVisibleRect.js:113 |
bottomRight
Bottom right coordinate of the screen related to the game scene.
| meta | description |
|---|---|
| Type | Vec2 |
| Defined in | cocos2d/core/platform/CCVisibleRect.js:119 |
bottom
Bottom center coordinate of the screen related to the game scene.
| meta | description |
|---|---|
| Type | Vec2 |
| Defined in | cocos2d/core/platform/CCVisibleRect.js:125 |
center
Center coordinate of the screen related to the game scene.
| meta | description |
|---|---|
| Type | Vec2 |
| Defined in | cocos2d/core/platform/CCVisibleRect.js:131 |
left
Left center coordinate of the screen related to the game scene.
| meta | description |
|---|---|
| Type | Vec2 |
| Defined in | cocos2d/core/platform/CCVisibleRect.js:137 |
right
Right center coordinate of the screen related to the game scene.
| meta | description |
|---|---|
| Type | Vec2 |
| Defined in | cocos2d/core/platform/CCVisibleRect.js:143 |
width
Width of the screen.
| meta | description |
|---|---|
| Type | Number |
| Defined in | cocos2d/core/platform/CCVisibleRect.js:149 |
height
Height of the screen.
| meta | description |
|---|---|
| Type | Number |
| Defined in | cocos2d/core/platform/CCVisibleRect.js:155 |
Methods
init
initialize
| meta | description |
|---|---|
| Defined in | cocos2d/core/platform/CCVisibleRect.js:50 |
Parameters
visibleRectRect