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)
  • topLeft Vec2 Top left coordinate of the screen related to the game scene.
  • topRight Vec2 Top right coordinate of the screen related to the game scene.
  • top Vec2 Top center coordinate of the screen related to the game scene.
  • bottomLeft Vec2 Bottom left coordinate of the screen related to the game scene.
  • bottomRight Vec2 Bottom right coordinate of the screen related to the game scene.
  • bottom Vec2 Bottom center coordinate of the screen related to the game scene.
  • center Vec2 Center coordinate of the screen related to the game scene.
  • left Vec2 Left center coordinate of the screen related to the game scene.
  • right Vec2 Right center coordinate of the screen related to the game scene.
  • width Number Width of the screen.
  • height Number Height of the screen.
方法

Details

属性(properties)

topLeft

Top left coordinate of the screen related to the game scene.

meta description
类型 Vec2
定义于 https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCVisibleRect.js:93
topRight

Top right coordinate of the screen related to the game scene.

meta description
类型 Vec2
定义于 https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCVisibleRect.js:98
top

Top center coordinate of the screen related to the game scene.

meta description
类型 Vec2
定义于 https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCVisibleRect.js:103
bottomLeft

Bottom left coordinate of the screen related to the game scene.

meta description
类型 Vec2
定义于 https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCVisibleRect.js:108
bottomRight

Bottom right coordinate of the screen related to the game scene.

meta description
类型 Vec2
定义于 https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCVisibleRect.js:113
bottom

Bottom center coordinate of the screen related to the game scene.

meta description
类型 Vec2
定义于 https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCVisibleRect.js:118
center

Center coordinate of the screen related to the game scene.

meta description
类型 Vec2
定义于 https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCVisibleRect.js:123
left

Left center coordinate of the screen related to the game scene.

meta description
类型 Vec2
定义于 https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCVisibleRect.js:128

Right center coordinate of the screen related to the game scene.

meta description
类型 Vec2
定义于 https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCVisibleRect.js:133
width

Width of the screen.

meta description
类型 Number
定义于 https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCVisibleRect.js:138
height

Height of the screen.

meta description
类型 Number
定义于 https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCVisibleRect.js:143

方法

init

initialize

meta description
定义于 https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCVisibleRect.js:49
参数列表

条与 "" 相匹配的结果

    没有与 "" 匹配的结果