ContentStrategy 类型

模块: _decorator 父模块: cc

cc.ContentStrategy class is the root strategy class of content's scale strategy, it controls the behavior of how to scale the scene and setup the viewport for the game

索引

方法
  • preApply Manipulation before applying the strategy
  • apply Function to apply this strategy The return value is {scale: [scaleX, scaleY], viewport: {cc.Rect}}, The target view can then apply these value to itself, it's preferred not to modify directly its private variables
  • postApply Manipulation after applying the strategy

Details

方法

preApply

Manipulation before applying the strategy

meta description
定义于 https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCView.js:1137
参数列表
  • view View The target view
apply

Function to apply this strategy The return value is {scale: [scaleX, scaleY], viewport: {cc.Rect}}, The target view can then apply these value to itself, it's preferred not to modify directly its private variables

meta description
返回 Object
定义于 https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCView.js:1145
参数列表
postApply

Manipulation after applying the strategy

meta description
定义于 https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCView.js:1158
参数列表
  • view View The target view

条与 "" 相匹配的结果

    没有与 "" 匹配的结果