macro Enum

Module: _decorator Parent Module: cc

Predefined constants

Index

  • INVALID_INDEX
  • NODE_TAG_INVALID
  • PI
  • PI2
  • FLT_MAX
  • FLT_MIN
  • RAD
  • DEG
  • UINT_MAX
  • REPEAT_FOREVER
  • FLT_EPSILON
  • ONE
  • ZERO
  • SRC_ALPHA
  • SRC_ALPHA_SATURATE
  • SRC_COLOR
  • DST_ALPHA
  • DST_COLOR
  • ONE_MINUS_SRC_ALPHA
  • ONE_MINUS_SRC_COLOR
  • ONE_MINUS_DST_ALPHA
  • ONE_MINUS_DST_COLOR
  • ONE_MINUS_CONSTANT_ALPHA
  • ONE_MINUS_CONSTANT_COLOR
  • LINEAR
  • BLEND_DST
  • WEB_ORIENTATION_PORTRAIT
  • WEB_ORIENTATION_LANDSCAPE_LEFT
  • WEB_ORIENTATION_PORTRAIT_UPSIDE_DOWN
  • WEB_ORIENTATION_LANDSCAPE_RIGHT
  • ORIENTATION_PORTRAIT
  • ORIENTATION_LANDSCAPE
  • ORIENTATION_AUTO
  • VERTEX_ATTRIB_FLAG_NONE
  • VERTEX_ATTRIB_FLAG_POSITION
  • VERTEX_ATTRIB_FLAG_COLOR
  • VERTEX_ATTRIB_FLAG_TEX_COORDS
  • VERTEX_ATTRIB_FLAG_POS_COLOR_TEX
  • GL_ALL
  • VERTEX_ATTRIB_POSITION
  • VERTEX_ATTRIB_COLOR
  • VERTEX_ATTRIB_TEX_COORDS
  • VERTEX_ATTRIB_MAX
  • UNIFORM_PMATRIX
  • UNIFORM_MVMATRIX
  • UNIFORM_MVPMATRIX
  • UNIFORM_TIME
  • UNIFORM_SINTIME
  • UNIFORM_COSTIME
  • UNIFORM_RANDOM01
  • UNIFORM_SAMPLER
  • UNIFORM_MAX
  • SHADER_POSITION_TEXTURECOLOR
  • SHADER_SPRITE_POSITION_TEXTURECOLOR
  • SHADER_POSITION_TEXTURECOLORALPHATEST
  • SHADER_SPRITE_POSITION_TEXTURECOLORALPHATEST
  • SHADER_POSITION_COLOR
  • SHADER_SPRITE_POSITION_COLOR
  • SHADER_POSITION_TEXTURE
  • SHADER_POSITION_TEXTURE_UCOLOR
  • SHADER_POSITION_TEXTUREA8COLOR
  • SHADER_POSITION_UCOLOR
  • SHADER_POSITION_LENGTHTEXTURECOLOR
  • UNIFORM_PMATRIX_S
  • UNIFORM_MVMATRIX_S
  • UNIFORM_MVPMATRIX_S
  • UNIFORM_TIME_S
  • UNIFORM_SINTIME_S
  • UNIFORM_COSTIME_S
  • UNIFORM_RANDOM01_S
  • UNIFORM_SAMPLER_S
  • UNIFORM_ALPHA_TEST_VALUE_S
  • ATTRIBUTE_NAME_COLOR
  • ATTRIBUTE_NAME_POSITION
  • ATTRIBUTE_NAME_TEX_COORD
  • ITEM_SIZE
  • CURRENT_ITEM
  • ZOOM_ACTION_TAG
  • NORMAL_TAG
  • SELECTED_TAG
  • DISABLE_TAG
  • FIX_ARTIFACTS_BY_STRECHING_TEXEL
  • FIX_ARTIFACTS_BY_STRECHING_TEXEL_TMX
  • DIRECTOR_STATS_POSITION
  • DIRECTOR_FPS_INTERVAL
  • COCOSNODE_RENDER_SUBPIXEL
  • SPRITEBATCHNODE_RENDER_SUBPIXEL
  • AUTO_PREMULTIPLIED_ALPHA_FOR_PNG
  • OPTIMIZE_BLEND_FUNC_FOR_PREMULTIPLIED_ALPHA
  • TEXTURE_NPOT_SUPPORT
  • USE_LA88_LABELS
  • SPRITE_DEBUG_DRAW
  • LABELBMFONT_DEBUG_DRAW
  • LABELATLAS_DEBUG_DRAW
  • ENABLE_STACKABLE_ACTIONS
  • ENABLE_GL_STATE_CACHE
  • TOUCH_TIMEOUT
  • BATCH_VERTEX_COUNT
  • ENABLE_GC_FOR_NATIVE_OBJECTS
  • ENABLE_TILEDMAP_CULLING
  • DOWNLOAD_MAX_CONCURRENT
  • ENABLE_TRANSPARENT_CANVAS
  • ENABLE_WEBGL_ANTIALIAS
  • ENABLE_CULLING
  • BLEND_SRC

Details

INVALID_INDEX
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1150
NODE_TAG_INVALID

Default Node tag

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1156
PI

PI is the ratio of a circle's circumference to its diameter.

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1163
PI2

PI * 2

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1170
FLT_MAX

Maximum float value

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1177
FLT_MIN

Minimum float value

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1184
RAD

PI / 180

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1191
DEG

One degree

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1198
UINT_MAX

Maximum unsigned int value

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1205
REPEAT_FOREVER
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1212
FLT_EPSILON
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1218
ONE
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1225
ZERO
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1231
SRC_ALPHA
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1237
SRC_ALPHA_SATURATE
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1243
SRC_COLOR
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1249
DST_ALPHA
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1255
DST_COLOR
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1261
ONE_MINUS_SRC_ALPHA
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1267
ONE_MINUS_SRC_COLOR
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1273
ONE_MINUS_DST_ALPHA
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1279
ONE_MINUS_DST_COLOR
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1285
ONE_MINUS_CONSTANT_ALPHA
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1291
ONE_MINUS_CONSTANT_COLOR
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1297
LINEAR

the constant variable equals gl.LINEAR for texture

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1303
BLEND_DST

default gl blend dst function. Compatible with premultiplied alpha images.

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1310
WEB_ORIENTATION_PORTRAIT

Device oriented vertically, home button on the bottom (UIDeviceOrientationPortrait)

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1320
WEB_ORIENTATION_LANDSCAPE_LEFT

Device oriented horizontally, home button on the right (UIDeviceOrientationLandscapeLeft)

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1327
WEB_ORIENTATION_PORTRAIT_UPSIDE_DOWN

Device oriented vertically, home button on the top (UIDeviceOrientationPortraitUpsideDown)

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1334
WEB_ORIENTATION_LANDSCAPE_RIGHT

Device oriented horizontally, home button on the left (UIDeviceOrientationLandscapeRight)

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1341
ORIENTATION_PORTRAIT

Oriented vertically

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1348
ORIENTATION_LANDSCAPE

Oriented horizontally

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1355
ORIENTATION_AUTO

Oriented automatically

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1362
VERTEX_ATTRIB_FLAG_NONE
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1378
VERTEX_ATTRIB_FLAG_POSITION
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1383
VERTEX_ATTRIB_FLAG_COLOR
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1388
VERTEX_ATTRIB_FLAG_TEX_COORDS
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1393
VERTEX_ATTRIB_FLAG_POS_COLOR_TEX
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1398
GL_ALL

GL server side states

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1404
VERTEX_ATTRIB_POSITION
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1412
VERTEX_ATTRIB_COLOR
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1417
VERTEX_ATTRIB_TEX_COORDS
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1422
VERTEX_ATTRIB_MAX
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1427
UNIFORM_PMATRIX
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1434
UNIFORM_MVMATRIX
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1439
UNIFORM_MVPMATRIX
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1444
UNIFORM_TIME
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1449
UNIFORM_SINTIME
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1454
UNIFORM_COSTIME
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1459
UNIFORM_RANDOM01
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1464
UNIFORM_SAMPLER
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1469
UNIFORM_MAX
meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1474
SHADER_POSITION_TEXTURECOLOR
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1481
SHADER_SPRITE_POSITION_TEXTURECOLOR
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1486
SHADER_POSITION_TEXTURECOLORALPHATEST
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1491
SHADER_SPRITE_POSITION_TEXTURECOLORALPHATEST
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1496
SHADER_POSITION_COLOR
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1501
SHADER_SPRITE_POSITION_COLOR
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1506
SHADER_POSITION_TEXTURE
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1511
SHADER_POSITION_TEXTURE_UCOLOR
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1516
SHADER_POSITION_TEXTUREA8COLOR
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1521
SHADER_POSITION_UCOLOR
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1526
SHADER_POSITION_LENGTHTEXTURECOLOR
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1531
UNIFORM_PMATRIX_S
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1538
UNIFORM_MVMATRIX_S
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1543
UNIFORM_MVPMATRIX_S
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1548
UNIFORM_TIME_S
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1553
UNIFORM_SINTIME_S
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1558
UNIFORM_COSTIME_S
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1563
UNIFORM_RANDOM01_S
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1568
UNIFORM_SAMPLER_S
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1573
UNIFORM_ALPHA_TEST_VALUE_S
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1578
ATTRIBUTE_NAME_COLOR
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1585
ATTRIBUTE_NAME_POSITION
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1590
ATTRIBUTE_NAME_TEX_COORD
meta description
Type String
Defined in cocos2d/core/platform/CCMacro.js:1595
ITEM_SIZE

default size for font size

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1602
CURRENT_ITEM

default tag for current item

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1609
ZOOM_ACTION_TAG

default tag for zoom action tag

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1615
NORMAL_TAG

default tag for normal

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1621
SELECTED_TAG

default selected tag

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1628
DISABLE_TAG

default disabled tag

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1635
FIX_ARTIFACTS_BY_STRECHING_TEXEL

If enabled, the texture coordinates will be calculated by using this formula:
- texCoord.left = (rect.x*2+1) / (texture.wide*2);
- texCoord.right = texCoord.left + (rect.width*2-2)/(texture.wide*2);

The same for bottom and top.

This formula prevents artifacts by using 99% of the texture.
The "correct" way to prevent artifacts is by expand the texture's border with the same color by 1 pixel

Affected nodes:
- _ccsg.Sprite

Disabled by default. To enabled set it to 1.
To modify it, in Web engine please refer to CCMacro.js, in JSB please refer to CCConfig.h

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1643
FIX_ARTIFACTS_BY_STRECHING_TEXEL_TMX

If enabled, the texture coordinates will be calculated by using this formula:
- texCoord.left = (rect.x*2+1) / (texture.wide*2);
- texCoord.right = texCoord.left + (rect.width*2-2)/(texture.wide*2);

The same for bottom and top.

This formula prevents artifacts by using 99% of the texture.
The "correct" way to prevent artifacts is by expand the texture's border with the same color by 1 pixel

Affected nodes:
- _ccsg.TMXLayer

Enabled by default. To disabled set it to 0.
To modify it, in Web engine please refer to CCMacro.js, in JSB please refer to CCConfig.h

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1665
DIRECTOR_STATS_POSITION

Position of the FPS (Default: 0,0 (bottom-left corner))
To modify it, in Web engine please refer to CCMacro.js, in JSB please refer to CCConfig.h

meta description
Type Vec2
Defined in cocos2d/core/platform/CCMacro.js:1687
DIRECTOR_FPS_INTERVAL

Seconds between FPS updates.
0.5 seconds, means that the FPS number will be updated every 0.5 seconds.
Having a bigger number means a more reliable FPS

Default value: 0.1f
To modify it, in Web engine please refer to CCMacro.js, in JSB please refer to CCConfig.h

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1694
COCOSNODE_RENDER_SUBPIXEL

If enabled, the ccsg.Node objects (_ccsg.Sprite, _ccsg.Label,etc) will be able to render in subpixels.
If disabled, integer pixels will be used.

To enable set it to 1. Enabled by default.
To modify it, in Web engine please refer to CCMacro.js, in JSB please refer to CCConfig.h

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1707
SPRITEBATCHNODE_RENDER_SUBPIXEL

If enabled, the _ccsg.Sprite objects rendered with cc.SpriteBatchNode will be able to render in subpixels.
If disabled, integer pixels will be used.

To enable set it to 1. Enabled by default.
To modify it, in Web engine please refer to CCMacro.js, in JSB please refer to CCConfig.h

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1719
AUTO_PREMULTIPLIED_ALPHA_FOR_PNG

Automatically premultiply alpha for remote PNG resources.

meta description
Type Boolean
Defined in cocos2d/core/platform/CCMacro.js:1731
OPTIMIZE_BLEND_FUNC_FOR_PREMULTIPLIED_ALPHA

If most of your images have pre-multiplied alpha, set it to 1 (if you are going to use .PNG/.JPG file images).
Only set to 0 if ALL your images by-pass Apple UIImage loading system (eg: if you use libpng or PVR images)

To enable set it to a value different than 0. Enabled by default.
To modify it, in Web engine please refer to CCMacro.js, in JSB please refer to CCConfig.h

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1738
TEXTURE_NPOT_SUPPORT

If enabled, NPOT textures will be used where available. Only 3rd gen (and newer) devices support NPOT textures.
NPOT textures have the following limitations:
- They can't have mipmaps
- They only accept GL_CLAMP_TO_EDGE in GL_TEXTURE_WRAP_{S,T}

To enable set it to a value different than 0. Disabled by default.

This value governs only the PNG, GIF, BMP, images.
This value DOES NOT govern the PVR (PVR.GZ, PVR.CCZ) files. If NPOT PVR is loaded, then it will create an NPOT texture ignoring this value.
To modify it, in Web engine please refer to CCMacro.js, in JSB please refer to CCConfig.h

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1750
Deprecated This value will be removed in 1.1 and NPOT textures will be loaded by default if the device supports it.
USE_LA88_LABELS

If enabled, it will use LA88 (Luminance Alpha 16-bit textures) for CCLabelTTF objects.
If it is disabled, it will use A8 (Alpha 8-bit textures).
LA88 textures are 6% faster than A8 textures, but they will consume 2x memory.

This feature is enabled by default.

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1769
SPRITE_DEBUG_DRAW

If enabled, all subclasses of _ccsg.Sprite will draw a bounding box
Useful for debugging purposes only. It is recommend to leave it disabled.

To enable set it to a value different than 0. Disabled by default:
0 -- disabled
1 -- draw bounding box
2 -- draw texture box

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1781
LABELBMFONT_DEBUG_DRAW

If enabled, all subclasses of cc.LabelBMFont will draw a bounding box
Useful for debugging purposes only. It is recommend to leave it disabled.

To enable set it to a value different than 0. Disabled by default.

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1795
LABELATLAS_DEBUG_DRAW

If enabled, all subclasses of cc.LabelAtlas will draw a bounding box
Useful for debugging purposes only. It is recommend to leave it disabled.

To enable set it to a value different than 0. Disabled by default.

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1806
ENABLE_STACKABLE_ACTIONS

If enabled, actions that alter the position property (eg: CCMoveBy, CCJumpBy, CCBezierBy, etc..) will be stacked.
If you run 2 or more 'position' actions at the same time on a node, then end position will be the sum of all the positions.
If disabled, only the last run action will take effect.

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1817
ENABLE_GL_STATE_CACHE

If enabled, cocos2d will maintain an OpenGL state cache internally to avoid unnecessary switches.
In order to use them, you have to use the following functions, instead of the the GL ones:
- cc.gl.useProgram() instead of glUseProgram()
- cc.gl.deleteProgram() instead of glDeleteProgram()
- cc.gl.blendFunc() instead of glBlendFunc()

If this functionality is disabled, then cc.gl.useProgram(), cc.gl.deleteProgram(), cc.gl.blendFunc() will call the GL ones, without using the cache.
It is recommend to enable whenever possible to improve speed.
If you are migrating your code from GL ES 1.1, then keep it disabled. Once all your code works as expected, turn it on.

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1827
TOUCH_TIMEOUT

The timeout to determine whether a touch is no longer active and should be removed. The reason to add this timeout is due to an issue in X5 browser core, when X5 is presented in wechat on Android, if a touch is glissed from the bottom up, and leave the page area, no touch cancel event is triggered, and the touch will be considered active forever. After multiple times of this action, our maximum touches number will be reached and all new touches will be ignored. So this new mechanism can remove the touch that should be inactive if it's not updated during the last 5000 milliseconds. Though it might remove a real touch if it's just not moving for the last 5 seconds which is not easy with the sensibility of mobile touch screen. You can modify this value to have a better behavior if you find it's not enough.

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1844
BATCH_VERTEX_COUNT

The maximum vertex count for a single batched draw call.

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1866
ENABLE_GC_FOR_NATIVE_OBJECTS

JSB only, using JS object life cycle to control C++ object or inversely, it indicates two different memory model controled by the native macro CC_ENABLE_GC_FOR_NATIVE_OBJECTS. Modify the JS macro value won't have any effect.

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1875
ENABLE_TILEDMAP_CULLING

Whether or not enabled tiled map auto culling. If you set the TiledMap skew or rotation, then need to manually disable this, otherwise, the rendering will be wrong.

meta description
Type Boolean
Defined in cocos2d/core/platform/CCMacro.js:1887
DOWNLOAD_MAX_CONCURRENT

The max concurrent task number for the downloader

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1897
ENABLE_TRANSPARENT_CANVAS

Boolean that indicates if the canvas contains an alpha channel, default sets to false for better performance. Though if you want to make your canvas background transparent and show other dom elements at the background, you can set it to true before cc.game.run. Web only.

meta description
Type Boolean
Defined in cocos2d/core/platform/CCMacro.js:1907
ENABLE_WEBGL_ANTIALIAS

Boolean that indicates if the WebGL context is created with antialias option turned on, default value is false. Set it to true could make your game graphics slightly smoother, like texture hard edges when rotated. Whether to use this really depend on your game design and targeted platform, device with retina display usually have good detail on graphics with or without this option, you probably don't want antialias if your game style is pixel art based. Also, it could have great performance impact with some browser / device using software MSAA. You can set it to true before cc.game.run. Web only.

meta description
Type Boolean
Defined in cocos2d/core/platform/CCMacro.js:1922
ENABLE_CULLING

Whether or not enable auto culling. If your game have more dynamic objects, we suggest to disable auto culling. If your game have more static objects, we suggest to enable auto culling.

meta description
Type Boolean
Defined in cocos2d/core/platform/CCMacro.js:1945
BLEND_SRC

default gl blend src function. Compatible with premultiplied alpha images.

meta description
Type Number
Defined in cocos2d/core/platform/CCMacro.js:1979

results matching ""

    No results matching ""