-
AssetDB Modules
properties
methods
- explore
- exploreLib
- queryPathByUrl
- queryUuidByUrl
- queryPathByUuid
- queryUrlByUuid
- queryInfoByUuid
- queryMetaInfoByUuid
- deepQuery
- queryAssets
- import
- create
- move
- delete
- save
- saveMeta
- urlToUuid
- fspathToUuid
- uuidToFspath
- uuidToUrl
- exists
- existsByUuid
- existsByPath
- isSubAsset
- isSubAssetByUuid
- isSubAssetByPath
- containsSubAssets
- containsSubAssetsByUuid
- containsSubAssetsByPath
- assetInfo
- assetInfoByUuid
- assetInfoByPath
- subAssetInfos
- subAssetInfosByUuid
- subAssetInfosByPath
- loadMeta
- loadMetaByUuid
- loadMetaByPath
- isMount
- isMountByPath
- isMountByUuid
- mountInfo
- mountInfoByUuid
- mountInfoByPath
- mount
- unmount
-
Editor Modules
properties
methods
- log
- success
- failed
- info
- warn
- error
- fatal
- connectToConsole
- clearLog
- loadProfile
- loadAllPackages
- require
- execSpawn
- watchPackages
- registerProfilePath
- registerDefaultLayout
- init
- reset
- sendToWindowsExclude
- sendToWindows
- sendToCore
- sendToAll
- sendToPanel
- sendToMainWindow
- url
- registerProtocol
- require
- log
- sendToCoreSync
- sendToCore
- sendToWindows
- sendToMainWindow
- sendToAll
- sendToPanel
- sendRequestToCore
- cancelRequestToCore
- waitForReply
- cancelWaitForReply
-
Editor.Debugger Modules
-
Editor.MainMenu Modules
-
Editor.Package Modules
properties
methods
-
Editor.Panel Modules
methods
-
cc Modules
properties
- PRIORITY_NON_SYSTEM
- FMT_JPG
- FMT_PNG
- FMT_TIFF
- FMT_RAWDATA
- FMT_WEBP
- FMT_UNKNOWN
- FIX_ARTIFACTS_BY_STRECHING_TEXEL
- DIRECTOR_STATS_POSITION
- DIRECTOR_FPS_INTERVAL
- COCOSNODE_RENDER_SUBPIXEL
- SPRITEBATCHNODE_RENDER_SUBPIXEL
- AUTO_PREMULTIPLIED_ALPHA_FOR_PNG
- OPTIMIZE_BLEND_FUNC_FOR_PREMULTIPLIED_ALPHA
- TEXTURE_ATLAS_USE_TRIANGLE_STRIP
- TEXTURE_ATLAS_USE_VAO
- RETINA_DISPLAY_FILENAME_SUFFIX
- USE_LA88_LABELS
- SPRITE_DEBUG_DRAW
- SPRITEBATCHNODE_DEBUG_DRAW
- LABELBMFONT_DEBUG_DRAW
- LABELATLAS_DEBUG_DRAW
- IS_RETINA_DISPLAY_SUPPORTED
- DEFAULT_ENGINE
- ENABLE_STACKABLE_ACTIONS
- ENABLE_GL_STATE_CACHE
- INVALID_INDEX
- PI
- 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_SRC
- BLEND_DST
- DEVICE_ORIENTATION_PORTRAIT
- DEVICE_ORIENTATION_LANDSCAPE_LEFT
- DEVICE_ORIENTATION_PORTRAIT_UPSIDE_DOWN
- DEVICE_ORIENTATION_LANDSCAPE_RIGHT
- DEVICE_MAX_ORIENTATIONS
- 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_POSITION_TEXTURECOLORALPHATEST
- SHADER_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
methods
- _initDebugSetting
- error
- warn
- log
- info
- speed
- follow
- cardinalSplineTo
- cardinalSplineBy
- catmullRomTo
- catmullRomBy
- easeIn
- easeOut
- easeInOut
- easeExponentialIn
- easeExponentialOut
- easeExponentialInOut
- easeSineIn
- easeSineOut
- easeSineInOut
- easeElasticIn
- easeElasticOut
- easeElasticInOut
- easeBounceIn
- easeBounceOut
- easeBounceInOut
- easeBackIn
- easeBackOut
- easeBackInOut
- easeBezierAction
- easeQuadraticActionIn
- easeQuadraticActionOut
- easeQuadraticActionInOut
- easeQuarticActionIn
- easeQuarticActionOut
- easeQuarticActionInOut
- easeQuinticActionIn
- easeQuinticActionOut
- easeQuinticActionInOut
- easeCircleActionIn
- easeCircleActionOut
- easeCircleActionInOut
- easeCubicActionIn
- easeCubicActionOut
- easeCubicActionInOut
- show
- hide
- toggleVisibility
- removeSelf
- flipX
- flipY
- place
- callFunc
- sequence
- repeat
- repeatForever
- spawn
- rotateTo
- rotateBy
- moveBy
- moveTo
- skewTo
- skewBy
- jumpBy
- jumpTo
- bezierBy
- bezierTo
- scaleTo
- scaleBy
- blink
- fadeTo
- fadeIn
- fadeOut
- tintTo
- tintBy
- delayTime
- reverseTime
- animate
- targetedAction
- CGAffineToGL
- GLToCGAffine
- isChildClassOf
- associateWithNative
- getImageFormatByData
- inherits
- setAccelerometerEnabled
- setAccelerometerInterval
- swap
- lerp
- rand
- randomMinus1To1
- random0To1
- degreesToRadians
- radiansToDegrees
- radiansToDegress
- nodeDrawSetup
- enableDefaultGLStates
- disableDefaultGLStates
- incrementGLDraws
- contentScaleFactor
- pointPointsToPixels
- pointPixelsToPoints
- sizePointsToPixels
- sizePixelsToPoints
- rectPixelsToPoints
- rectPointsToPixels
- checkGLErrorDebug
- deserialize
- instantiate
- find
- Enum
- getList
- pNeg
- pAdd
- pSub
- pMult
- pMidpoint
- pDot
- pCross
- pPerp
- pRPerp
- pProject
- pRotate
- pUnrotate
- pLengthSQ
- pDistanceSQ
- pLength
- pDistance
- pNormalize
- pForAngle
- pToAngle
- clampf
- clamp01
- pClamp
- pFromSize
- pCompOp
- pLerp
- pFuzzyEqual
- pCompMult
- pAngleSigned
- pAngle
- pRotateByAngle
- pLineIntersect
- pSegmentIntersect
- pIntersectPoint
- pSameAs
- pZeroIn
- pIn
- pMultIn
- pSubIn
- pAddIn
- pNormalizeIn
- V3F_C4B_T2F_QuadZero
- V3F_C4B_T2F_QuadCopy
- V3F_C4B_T2F_QuadsCopy
- v2
- p
- pointEqualToPoint
-
js Modules
-
Editor.Menu Classes
-
Editor.Window Classes
-
cc.Acceleration Classes
methods
-
cc.Action Classes
-
cc.ActionEase Classes
-
cc.ActionInstant Classes
-
cc.ActionInterval Classes
-
cc.ActionManager Classes
-
cc.AffineTransform Classes
methods
- affineTransformMake
- affineTransformClone
- pointApplyAffineTransform
- sizeApplyAffineTransform
- affineTransformMakeIdentity
- affineTransformIdentity
- rectApplyAffineTransform
- affineTransformTranslate
- affineTransformScale
- affineTransformRotate
- affineTransformConcat
- affineTransformConcatIn
- affineTransformEqualToTransform
- affineTransformInvert
-
cc.Animation Classes
properties
methods
-
cc.AnimationClip Classes
properties
methods
-
cc.AnimationNode Classes
-
cc.AnimationState Classes
-
cc.Asset Classes
properties
methods
-
cc.AssetLibrary Classes
properties
methods
-
cc.AudioClip Classes
methods
-
cc.AudioSource Classes
properties
- isPlaying
- clip
- volume
- mute
- loop
- playOnLoad
- node
- uuid
- _enabled
- enabled
- enabledInHierarchy
- _isOnLoadCalled
- __eventTargets
- _name
- _objFlags
- name
- isValid
methods
-
cc.BitmapFont Classes
methods
-
cc.BlendFunc Classes
methods
-
cc.Button Classes
-
cc.Button.ClickEvent Classes
-
cc.CallbacksInvoker Classes
-
cc.Canvas Classes
-
cc.Class Classes
methods
-
cc.CoffeeScript Classes
-
cc.Color Classes
-
cc.Component Classes
-
cc.ContainerStrategy Classes
-
cc.ContentStrategy Classes
-
cc.Details Classes
-
cc.EaseBounce Classes
-
cc.EaseElastic Classes
-
cc.EaseRateAction Classes
-
cc.EqualToFrame Classes
-
cc.EqualToWindow Classes
-
cc.Event Classes
-
cc.Event.EventAcceleration Classes
-
cc.Event.EventCustom Classes
-
cc.Event.EventFocus Classes
-
cc.Event.EventKeyboard Classes
-
cc.Event.EventMouse Classes
properties
- type
- target
- currentTarget;
- eventPhase
- _defaultPrevented
- _propagationStopped
- _propagationImmediateStopped
methods
-
cc.Event.EventTouch Classes
-
cc.EventAnimCurve Classes
properties
-
cc.EventInfo Classes
-
cc.EventListener Classes
-
cc.EventTarget Classes
-
cc.FiniteTimeAction Classes
-
cc.Font Classes
methods
-
cc.FontDefinition Classes
methods
-
cc.HashElement Classes
methods
-
cc.HashTimerEntry Classes
-
cc.HashUpdateEntry Classes
-
cc.Label Classes
-
cc.Layout Classes
-
cc.ListEntry Classes
-
cc.Mask Classes
properties
- node
- uuid
- _enabled
- enabled
- enabledInHierarchy
- _isOnLoadCalled
- __eventTargets
- _name
- _objFlags
- name
- isValid
methods
-
cc.Node Classes
properties
- active
- activeInHierarchy
- _components
- _prefab
- _persistNode
- __eventTargets
- name
- parent
- _id
- uuid
- skewX
- skewY
- zIndex
- rotation
- rotationX
- scaleX
- scaleY
- x
- y
- children
- childrenCount
- anchorX
- anchorY
- width
- height
- ignoreAnchor
- tag
- opacity
- cascadeOpacity
- color
- _sizeProvider
- position
- scale
- _name
- _objFlags
- isValid
events
- position-changed
- rotation-changed
- scale-changed
- size-changed
- anchor-changed
- color-changed
- opacity-changed
methods
- getComponent
- addComponent
- _addComponentAt
- removeComponent
- _getDependComponent
- on
- runAction
- stopAllActions
- stopAction
- stopActionByTag
- getActionByTag
- getNumberOfRunningActions
- init
- attr
- setGlobalZOrder
- getGlobalZOrder
- getScale
- setScale
- getPosition
- setPosition
- getAnchorPoint
- setAnchorPoint
- getAnchorPointInPoints
- getContentSize
- setContentSize
- getBoundingBox
- cleanup
- getChildByTag
- getChildByName
- addChild
- removeFromParent
- removeChild
- removeChildByTag
- removeAllChildren
- getParentToNodeTransform
- getNodeToWorldTransform
- getWorldToNodeTransform
- convertToNodeSpace
- convertToWorldSpace
- convertToNodeSpaceAR
- convertToWorldSpaceAR
- convertTouchToNodeSpace
- convertTouchToNodeSpaceAR
- getNodeToParentTransform
- getBoundingBoxToWorld
- getDisplayedOpacity
- getDisplayedColor
- setOpacityModifyRGB
- isOpacityModifyRGB
- getSiblingIndex
- setSiblingIndex
- isChildOf
- getPositionX
- setPositionX
- getPositionY
- setPositionY
- getLocalZOrder
- setLocalZOrder
- isIgnoreAnchorPointForPosition
- ignoreAnchorPointForPosition
- isCascadeOpacityEnabled
- setCascadeOpacityEnabled
- isCascadeColorEnabled
- setCascadeColorEnabled
- destroy
- realDestroyInEditor
- _destruct
- _onPreDestroy
- _serialize
- _deserialize
-
cc.Node.EventType Classes
-
cc.OriginalContainer Classes
-
cc.Playable Classes
-
cc.Prefab Classes
-
cc.ProgressBar Classes
properties
- barSprite
- mode
- totalLength
- progress
- reverse
- node
- uuid
- _enabled
- enabled
- enabledInHierarchy
- _isOnLoadCalled
- __eventTargets
- _name
- _objFlags
- name
- isValid
methods
-
cc.ProportionalToFrame Classes
-
cc.ProportionalToWindow Classes
-
cc.Quad2 Classes
-
cc.Quad3 Classes
methods
-
cc.RawAsset Classes
methods
-
cc.Rect Classes
properties
methods
-
cc.ResolutionPolicy Classes
properties
methods
-
cc.SampledAnimCurve Classes
-
cc.Scene Classes
-
cc.Scheduler Classes
properties
methods
- setTimeScale
- getTimeScale
- update
- scheduleCallbackForTarget
- schedule
- pauseAllTargets
- pauseAllTargetsWithMinPriority
- resumeTargets
- pauseTarget
- resumeTarget
- isTargetPaused
- scheduleUpdateForTarget
- unscheduleCallbackForTarget
- unscheduleUpdateForTarget
- unscheduleAllCallbacksForTarget
- unscheduleAllCallbacks
- unscheduleAllCallbacksWithMinPriority
-
cc.ScrollView Classes
properties
- content
- horizontal
- vertical
- inertia
- brake
- elastic
- bounceDuration
- horizontalScrollBar
- verticalScrollBar
- node
- uuid
- _enabled
- enabled
- enabledInHierarchy
- _isOnLoadCalled
- __eventTargets
- _name
- _objFlags
- name
- isValid
methods
- scrollToBottom
- scrollToTop
- scrollToLeft
- scrollToRight
- scrollToTopLeft
- scrollToTopRight
- scrollToBottomLeft
- scrollToBottomRight
- scrollToPercentHorizontal
- scrollTo
- scrollToPercentVertical
- setContentPosition
- getContentPosition
- update
- lateUpdate
- onLoad
- start
- onEnable
- onDisable
- onDestroy
- onFocusInEditMode
- onLostFocusInEditMode
- addComponent
- getComponent
- schedule
- scheduleOnce
- unschedule
- unscheduleAllCallbacks
- destroy
- realDestroyInEditor
- _destruct
- _onPreDestroy
- _serialize
- _deserialize
-
cc.Scrollbar Classes
-
cc.Size Classes
-
cc.Sprite Classes
properties
- _atlas
- sprite
- type
- node
- uuid
- _enabled
- enabled
- enabledInHierarchy
- _isOnLoadCalled
- __eventTargets
- _name
- _objFlags
- name
- isValid
methods
- setVisible
- setScale9Enabled
- isScale9Enabled
- initWithFile
- initWithSpriteFrame
- initWithSpriteFrameName
- getOriginalSize
- setInsetLeft
- getInsetLeft
- setInsetTop
- getInsetTop
- setInsetRight
- getInsetRight
- setInsetBottom
- getInsetBottom
- _createSgNode
- update
- lateUpdate
- onLoad
- start
- onEnable
- onDisable
- onDestroy
- onFocusInEditMode
- onLostFocusInEditMode
- addComponent
- getComponent
- schedule
- scheduleOnce
- unschedule
- unscheduleAllCallbacks
- destroy
- realDestroyInEditor
- _destruct
- _onPreDestroy
- _serialize
- _deserialize
-
cc.SpriteAnimationAsset Classes
properties
methods
-
cc.SpriteAtlas Classes
methods
-
cc.SpriteFrame Classes
properties
methods
- textureLoaded
- addLoadedEventListener
- getRectInPixels
- setRectInPixels
- isRotated
- setRotated
- getRect
- setRect
- getOffsetInPixels
- setOffsetInPixels
- getOriginalSizeInPixels
- setOriginalSizeInPixels
- getOriginalSize
- setOriginalSize
- getTexture
- _refreshTexture
- getOffset
- setOffset
- clone
- initWithTexture
- copyWithZone
- copy
- cc.SpriteFrame.create
- cc.SpriteFrame.createWithTexture
- serialize
- createNode
- _setRawFiles
- createNodeByInfo
-
cc.TTFFont Classes
-
cc.Tex2F Classes
-
cc.TextAsset Classes
-
cc.Texture2D Classes
properties
methods
-
cc.Texture2D.WrapMode Classes
properties
-
cc.TextureAtlas Classes
properties
methods
- getTotalQuads
- getCapacity
- getTexture
- setTexture
- setDirty
- isDirty
- getQuads
- setQuads
- initWithFile
- initWithTexture
- updateQuad
- insertQuad
- insertQuads
- insertQuadFromIndex
- removeQuadAtIndex
- removeQuadsAtIndex
- removeAllQuads
- resizeCapacity
- increaseTotalQuadsWith
- moveQuadsFromIndex
- fillWithEmptyQuadsFromIndex
- drawNumberOfQuads
-
cc.TiledMapAsset Classes
methods
-
cc.Timer Classes
methods
-
cc.Touch Classes
-
cc.V2F_C4B_T2F Classes
-
cc.V2F_C4B_T2F_Triangle Classes
methods
-
cc.V3F_C4B_T2F Classes
methods
-
cc.V3F_C4B_T2F_Quad Classes
-
cc.ValueType Classes
-
cc.Vec2 Classes
-
cc.Vertex2F Classes
-
cc.Vertex3F Classes
-
cc.WebGLColor Classes
-
cc.Widget Classes
properties
- isAlignTop
- isAlignVerticalCenter
- isAlignBottom
- isAlignLeft
- isAlignHorizontalCenter
- isAlignRight
- isStretchHeight
- isStretchHeight
- top
- bottom
- left
- right
- isAbsoluteTop
- isAbsoluteBottom
- isAbsoluteLeft
- isAbsoluteRight
- _alignFlags
- node
- uuid
- _enabled
- enabled
- enabledInHierarchy
- _isOnLoadCalled
- __eventTargets
- _name
- _objFlags
- name
- isValid
methods
-
cc.audioEngine Classes
-
cc.director Classes
methods
- convertToGL
- convertToUI
- getContentScaleFactor
- getNotificationNode
- getWinSize
- getWinSizeInPixels
- getVisibleSize
- getVisibleOrigin
- getZEye
- pause
- pushScene
- runScene
- loadScene
- _loadSceneByUuid
- resume
- setDepthTest
- setClearColor
- setOpenGLView
- setProjection
- setViewport
- getOpenGLView
- getProjection
- setAlphaBlending
- isSendCleanupToScene
- getRunningScene
- getScene
- getAnimationInterval
- isDisplayStats
- setDisplayStats
- getSecondsPerFrame
- isNextDeltaTimeZero
- isPaused
- getTotalFrames
- getScheduler
- setScheduler
- getActionManager
- setActionManager
- getAnimationManager
- getDeltaTime
-
cc.eventManager Classes
-
cc.game Classes
-
cc.inputManager Classes
-
cc.loader Classes
-
cc.pool Classes
-
cc.screen Classes
-
cc.spriteFrameCache Classes
-
cc.sys Classes
properties
- LANGUAGE_ENGLISH
- LANGUAGE_CHINESE
- LANGUAGE_FRENCH
- LANGUAGE_ITALIAN
- LANGUAGE_GERMAN
- LANGUAGE_SPANISH
- LANGUAGE_DUTCH
- LANGUAGE_RUSSIAN
- LANGUAGE_KOREAN
- LANGUAGE_JAPANESE
- LANGUAGE_HUNGARIAN
- LANGUAGE_PORTUGUESE
- LANGUAGE_ARABIC
- LANGUAGE_NORWEGIAN
- LANGUAGE_POLISH
- LANGUAGE_UNKNOWN
- OS_IOS
- OS_ANDROID
- OS_WINDOWS
- OS_MARMALADE
- OS_LINUX
- OS_BADA
- OS_BLACKBERRY
- OS_OSX
- OS_WP8
- OS_WINRT
- OS_UNKNOWN
- UNKNOWN
- WIN32
- LINUX
- MACOS
- ANDROID
- IOS
- IPAD
- BLACKBERRY
- NACL
- EMSCRIPTEN
- TIZEN
- WINRT
- WP8
- MOBILE_BROWSER
- DESKTOP_BROWSER
- EDITOR_PAGE
- EDITOR_CORE
- BROWSER_TYPE_WECHAT
- BROWSER_TYPE_ANDROID
- BROWSER_TYPE_IE
- BROWSER_TYPE_QQ
- BROWSER_TYPE_MOBILE_QQ
- BROWSER_TYPE_UC
- BROWSER_TYPE_360
- BROWSER_TYPE_BAIDU_APP
- BROWSER_TYPE_BAIDU
- BROWSER_TYPE_MAXTHON
- BROWSER_TYPE_OPERA
- BROWSER_TYPE_OUPENG
- BROWSER_TYPE_MIUI
- BROWSER_TYPE_FIREFOX
- BROWSER_TYPE_SAFARI
- BROWSER_TYPE_CHROME
- BROWSER_TYPE_LIEBAO
- BROWSER_TYPE_QZONE
- BROWSER_TYPE_SOUGOU
- BROWSER_TYPE_UNKNOWN
- isNative
- isBrowser
- isMobile
- platform
- language
- os
- browserType
- browserVersion
- windowPixelResolution
- localStorage
- capabilities
methods
-
cc.textureCache Classes
-
cc.url Classes
-
cc.view Classes
methods
- setTargetDensityDPI
- getTargetDensityDPI
- resizeWithBrowserSize
- setResizeCallback
- adjustViewPort
- enableRetina
- isRetinaEnabled
- enableAutoFullScreen
- isAutoFullScreenEnabled
- isOpenGLReady
- setIMEKeyboardState
- setContentTranslateLeftTop
- getContentTranslateLeftTop
- setCanvasSize
- getCanvasSize
- getFrameSize
- setFrameSize
- getVisibleSize
- getVisibleSizeInPixel
- getVisibleOrigin
- getVisibleOriginInPixel
- canSetContentScaleFactor
- getResolutionPolicy
- setResolutionPolicy
- setDesignResolutionSize
- getDesignResolutionSize
- setRealPixelResolution
- setViewPortInPoints
- setScissorInPoints
- isScissorEnabled
- getScissorRect
- setViewName
- getViewName
- getViewPortRect
- getScaleX
- getScaleY
- getDevicePixelRatio
- convertToLocationInView
- _getInstance
-
cc.visibleRect Classes
-
js.array Classes
-
cc.Button.Transition Enums
-
cc.DebugMode Enums
-
cc.KEY Enums
- none
- back
- menu
- backspace
- tab
- enter
- shift
- ctrl
- alt
- pause
- capslock
- escape
- space
- pageup
- pagedown
- end
- home
- left
- up
- right
- down
- select
- insert
- Delete
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- a
- b
- c
- d
- e
- f
- g
- h
- i
- j
- k
- l
- m
- n
- o
- p
- q
- r
- s
- t
- u
- v
- w
- x
- y
- z
- num0
- num1
- num2
- num3
- num5
- num6
- num7
- num8
- num9
- *
- +
- -
- numdel
- /
- f1
- f2
- f3
- f4
- f5
- f6
- f7
- f8
- f9
- f10
- f11
- f12
- numlock
- scrolllock
- ;
- semicolon
- equal
- =
- ,
- comma
- dash
- .
- period
- forwardslash
- grave
- [
- openbracket
- backslash
- ]
- closebracket
- quote
- dpadLeft
- dpadRight
- dpadUp
- dpadDown
- dpadCenter
-
cc.Layout.Type Enums
-
cc.ProgressBar.Mode Enums
-
cc.Scrollbar.Direction Enums
-
cc.SpriteType Enums
-
cc.TextAlignment Enums
-
cc.UIOrientation Enums
-
cc.VerticalTextAlignment Enums
-
cc.WrapMode Enums
properties
properties
properties
properties
properties
properties
properties
EventTarget
EventTarget is an object to which an event is dispatched when something has occurred. Entity are the most common event targets, but other objects can be event targets too.
Event targets are an important part of the Fireball event model. The event target serves as the focal point for how events flow through the scene graph. When an event such as a mouse click or a keypress occurs, Fireball dispatches an event object into the event flow from the root of the hierarchy. The event object then makes its way through the scene graph until it reaches the event target, at which point it begins its return trip through the scene graph. This round-trip journey to the event target is conceptually divided into three phases:
- The capture phase comprises the journey from the root to the last node before the event target's node
- The target phase comprises only the event target node
- The bubbling phase comprises any subsequent nodes encountered on the return trip to the root of the tree See also: http://www.w3.org/TR/DOM-Level-3-Events/#event-flow
Event targets can implement the following methods:
- _getCapturingTargets
- _getBubblingTargets
Properties
_capturingListeners EventListeners private
_bubblingListeners EventListeners private
There are no properties that match your current filter settings. You can change your filter settings in the index section on this page. index
Methods
on
(
-
type
-
callback
-
[target
]
-
[useCapture
=false]
)
Function
- type
- callback
- [target ]
- [useCapture =false]
Register an callback of a specific event type on the EventTarget. This method is merely an alias to addEventListener.
name | type | description | |
---|---|---|---|
type
|
String |
A string representing the event type to listen for. |
|
callback
|
Function |
The callback that will be invoked when the event is dispatched. The callback is ignored if it is a duplicate (the callbacks are unique).
|
|
target
optional
|
Object |
The target to invoke the callback, can be null |
|
useCapture
optional
|
Boolean | false |
When set to true, the capture argument prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false, callback will NOT be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked when event's eventPhase attribute value is AT_TARGET. |
returns:
off
(
-
type
-
callback
-
[target
]
-
[useCapture
=false]
)
- type
- callback
- [target ]
- [useCapture =false]
Removes the callback previously registered with the same type, callback, target and or useCapture. This method is merely an alias to removeEventListener.
name | type | description | |
---|---|---|---|
type
|
String |
A string representing the event type being removed. |
|
callback
|
Function |
The callback to remove. |
|
target
optional
|
Object |
The target to invoke the callback, if it's not given, only callback without target will be removed |
|
useCapture
optional
|
Boolean | false |
Specifies whether the callback being removed was registered as a capturing callback or not. If not specified, useCapture defaults to false. If a callback was registered twice, one with capture and one without, each must be removed separately. Removal of a capturing callback does not affect a non-capturing version of the same listener, and vice versa. |
targetOff
(
-
target
)
- target
Removes all callbacks previously registered with the same target.
name | type | description |
---|---|---|
target
|
Object |
The target to be searched for all related callbacks |
once
(
-
type
-
callback
-
[target
]
-
[useCapture
=false]
)
- type
- callback
- [target ]
- [useCapture =false]
Register an callback of a specific event type on the EventTarget, the callback will remove itself after the first time it is triggered.
name | type | description | |
---|---|---|---|
type
|
String |
A string representing the event type to listen for. |
|
callback
|
Function |
The callback that will be invoked when the event is dispatched. The callback is ignored if it is a duplicate (the callbacks are unique).
|
|
target
optional
|
Object |
The target to invoke the callback, can be null |
|
useCapture
optional
|
Boolean | false |
When set to true, the capture argument prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false, callback will NOT be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked when event's eventPhase attribute value is AT_TARGET. |
dispatchEvent
(
-
event
)
Boolean
- event
Dispatches an event into the event flow. The event target is the EventTarget object upon which the dispatchEvent() method is called.
name | type | description |
---|---|---|
event
|
Event |
The Event object that is dispatched into the event flow |
returns:
returns true if either the event's preventDefault() method was not invoked, or its cancelable attribute value is false, and false otherwise.
emit
(
-
message
-
[detail
]
)
- message
- [detail ]
Send an event to this object directly, this method will not propagate the event to any other objects. The event will be created from the supplied message, you can get the "detail" argument from event.detail.
name | type | description |
---|---|---|
message
|
String |
the message to send |
detail
optional
|
Any |
whatever argument the message needs |
_isTargetActive
(
-
type
)
Boolean
- type
Get whether the target is active for events. The name is for avoiding conflict with user defined functions.
Subclasses can override this method to make event target active or inactive.
name | type | description |
---|---|---|
type
|
String |
the event type |
returns:
_getCapturingTargets
(
-
type
-
array
)
- type
- array
Get all the targets listening to the supplied type of event in the target's capturing phase. The capturing phase comprises the journey from the root to the last node BEFORE the event target's node. The result should save in the array parameter, and MUST SORT from child nodes to parent nodes.
Subclasses can override this method to make event propagable.
examples:
----------
Subclasses can override this method to make event propagable
`
js
for (var target = this._parent; target; target = target._parent) {
if (target._capturingListeners && target._capturingListeners.has(type)) {
array.push(target);
}
}
_getBubblingTargets
(
-
type
-
array
)
- type
- array
Get all the targets listening to the supplied type of event in the target's bubbling phase. The bubbling phase comprises any SUBSEQUENT nodes encountered on the return trip to the root of the tree. The result should save in the array parameter, and MUST SORT from child nodes to parent nodes.
Subclasses can override this method to make event propagable.
There are no methods that match your current filter settings. You can change your filter settings in the index section on this page. index