Cocos Creator API

1.4.x

Cocos Creator is a highly customizable game development tool that utilizes the power of cocos2d-x.

Enum Macro

Module: cc

Predefined constants

INVALID_INDEX Number

NODE_TAG_INVALID Number

Default Node tag

PI Number

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

PI2 Number

PI * 2

FLT_MAX Number

Maximum float value

FLT_MIN Number

Minimum float value

RAD Number

PI / 180

DEG Number

One degree

UINT_MAX Number

Maximum unsigned int value

REPEAT_FOREVER Number

FLT_EPSILON Number

ONE Number

ZERO Number

SRC_ALPHA Number

SRC_ALPHA_SATURATE Number

SRC_COLOR Number

DST_ALPHA Number

DST_COLOR Number

ONE_MINUS_SRC_ALPHA Number

ONE_MINUS_SRC_COLOR Number

ONE_MINUS_DST_ALPHA Number

ONE_MINUS_DST_COLOR Number

ONE_MINUS_CONSTANT_ALPHA Number

ONE_MINUS_CONSTANT_COLOR Number

LINEAR Number

the constant variable equals gl.LINEAR for texture

BLEND_DST Number

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

WEB_ORIENTATION_PORTRAIT Number

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

WEB_ORIENTATION_LANDSCAPE_LEFT Number

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

WEB_ORIENTATION_PORTRAIT_UPSIDE_DOWN Number

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

WEB_ORIENTATION_LANDSCAPE_RIGHT Number

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

ORIENTATION_PORTRAIT Number

Oriented vertically

ORIENTATION_LANDSCAPE Number

Oriented horizontally

ORIENTATION_AUTO Number

Oriented automatically

VERTEX_ATTRIB_FLAG_NONE Number

VERTEX_ATTRIB_FLAG_POSITION Number

VERTEX_ATTRIB_FLAG_COLOR Number

VERTEX_ATTRIB_FLAG_TEX_COORDS Number

VERTEX_ATTRIB_FLAG_POS_COLOR_TEX Number

GL_ALL Number

GL server side states

VERTEX_ATTRIB_POSITION Number