cocos-enhance-kit/docs/static/demo/v1.0.0/web-desktop/cocos2d-js.js.076d2.map
2022-07-05 18:10:58 +08:00

1 line
5.3 MiB
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"sources":["Users/smallmain/Documents/Work/cocos-service-pack-src/engine/gulp/browserify_prelude.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/DebugInfos.json","cocos2d-js.be84c.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/actions/CCAction.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/actions/CCActionCatmullRom.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/actions/CCActionEase.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/actions/CCActionInstant.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/actions/CCActionInterval.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/actions/CCActionManager.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/actions/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/actions/tween.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/animation/animation-animator.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/animation/animation-clip.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/animation/animation-curves.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/animation/animation-manager.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/animation/animation-state.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/animation/bezier.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/animation/easing.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/animation/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/animation/motion-path-helper.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/animation/playable.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/animation/types.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/CCDebug.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/CCDirector.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/CCGame.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/CCNode.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/CCPrivateNode.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/CCScene.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/CCScheduler.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/CCAssetManager.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/builtins.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/bundle.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/cache.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/config.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/depend-util.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/deprecated.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/deserialize.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/download-dom-audio.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/download-dom-image.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/download-file.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/download-script.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/downloader.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/factory.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/fetch.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/font-loader.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/helper.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/load.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/pack-manager.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/parser.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/pipeline.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/preprocess.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/releaseManager.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/request-item.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/shared.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/task.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/urlTransformer.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/asset-manager/utilities.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/CCAsset.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/CCAudioClip.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/CCBitmapFont.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/CCBufferAsset.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/CCFont.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/CCJsonAsset.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/CCLabelAtlas.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/CCPrefab.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/CCRenderTexture.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/CCSceneAsset.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/CCScripts.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/CCSpriteAtlas.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/CCSpriteFrame.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/CCTTFFont.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/CCTextAsset.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/CCTexture2D.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/CCVideoClip.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/material/CCEffectAsset.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/material/CCMaterial.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/material/effect-base.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/material/effect-parser.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/material/effect-variant.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/material/effect.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/material/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/material/material-pool.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/material/material-variant.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/assets/material/utils.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/base-ui/CCWidgetManager.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/camera/CCCamera.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/component-scheduler.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCAnimation.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCBlockInputEvents.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCButton.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCCanvas.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCComponent.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCComponentEventHandler.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCLabel.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCLabelOutline.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCLabelShadow.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCLayout.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCMask.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCMotionStreak.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCRenderComponent.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCRichText.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCScrollBar.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCScrollView.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCSlider.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCSprite.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCToggle.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCToggleContainer.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCToggleGroup.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCViewGroup.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/CCWidget.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/components/missing-script.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/event-manager/CCEvent.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/event-manager/CCEventListener.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/event-manager/CCEventManager.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/event-manager/CCTouch.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/event-manager/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/event/event-listeners.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/event/event-target.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/event/event.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/event/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/event/system-event.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/graphics/graphics.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/graphics/helper.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/graphics/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/graphics/types.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/node-activator.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/CCClass.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/CCClassDecorator.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/CCEnum.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/CCInputExtension.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/CCInputManager.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/CCMacro.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/CCObject.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/CCSAXParser.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/CCScreen.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/CCSys.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/CCView.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/CCVisibleRect.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/attribute.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/callbacks-invoker.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/compiler.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/deserialize-compiled.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/deserialize.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/id-generater.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/instantiate-jit.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/instantiate.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/js.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/preprocess-class.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/requiring-frame.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/platform/utils.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/predefine.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/assembler-2d.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/assembler-pool.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/assembler.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/canvas/Device.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/canvas/Texture2D.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/render-flow.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/utils/dynamic-atlas/manager.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/utils/dynamic-atlas/reusable-atlas.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/utils/label/bmfont.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/utils/label/label-frame.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/utils/label/letter-font.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/utils/label/ttf.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/utils/utils.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/graphics/earcut.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/graphics/impl.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/graphics/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/label/2d-multi/bmfont.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/label/2d-multi/ttf.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/label/2d/bmfont.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/label/2d/letter.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/label/2d/nativeTTF.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/label/2d/ttf.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/label/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/mask-assembler.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/motion-streak-multi.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/motion-streak.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/sprite/2d-multi/bar-filled.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/sprite/2d-multi/mesh.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/sprite/2d-multi/radial-filled.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/sprite/2d-multi/simple.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/sprite/2d-multi/sliced.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/sprite/2d-multi/tiled.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/sprite/2d/bar-filled.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/sprite/2d/mesh.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/sprite/2d/radial-filled.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/sprite/2d/simple.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/sprite/2d/sliced.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/sprite/2d/tiled.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/assemblers/sprite/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/flex-buffer.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/mesh-buffer.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/model-batcher.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/quad-buffer.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/render-data.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/spine-buffer.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/renderer/webgl/vertex-format.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/sp/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/sp/multi-batcher.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/sp/multi-handler.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/sp/sp.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/CCPath.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/affine-transform.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/base-node.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/binary-search.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/blend-func.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/decode-uuid.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/find.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/gray-sprite-state.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/html-text-parser.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/misc.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/mutable-forward-iterator.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/pool.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/prefab-helper.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/profiler/CCProfiler.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/profiler/counter.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/profiler/perf-counter.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/text-utils.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/texture-util.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/trans-pool/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/trans-pool/mem-pool.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/trans-pool/node-mem-pool.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/trans-pool/node-unit.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/utils/trans-pool/unit-base.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/value-types/color.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/value-types/index.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/value-types/mat3.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/value-types/mat4.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/value-types/quat.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/value-types/rect.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/value-types/size.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/value-types/trs.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/value-types/utils.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/value-types/value-type.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/value-types/vec2.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/value-types/vec3.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/core/value-types/vec4.ts","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/deprecated.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/particle/CCParticleAsset.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/build/mappings/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/core/base-renderer.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/core/input-assembler.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/core/pass.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/core/program-lib.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/core/technique.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/core/view.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/enums.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/gfx/device.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/gfx/enums.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/gfx/frame-buffer.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/gfx/index-buffer.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/gfx/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/gfx/misc.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/gfx/program.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/gfx/render-buffer.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/gfx/state.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/gfx/texture-2d.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/gfx/texture-cube.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/gfx/texture.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/gfx/vertex-buffer.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/gfx/vertex-format.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/memop/circular-pool.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/memop/fixed-array.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/memop/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/memop/linked-array.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/memop/pool.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/memop/recycle-pool.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/memop/timsort.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/memop/typed-array-pool.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/murmurhash2_gc.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/renderers/forward-renderer.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/scene/camera.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/scene/model.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/scene/scene.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/renderer/types.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/cocos2d/tilemap/CCTiledMapAsset.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/extends.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/extensions/spine/AttachUtil.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/extensions/spine/Skeleton.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/extensions/spine/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/extensions/spine/lib/spine.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/extensions/spine/skeleton-cache.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/extensions/spine/skeleton-data.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/extensions/spine/skeleton-texture.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/extensions/spine/spine-assembler.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/extensions/spine/track-entry-listeners.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/extensions/spine/vertex-effect-delegate.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/index.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/polyfill/array-buffer.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/polyfill/array.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/polyfill/misc.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/polyfill/number.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/polyfill/object.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/polyfill/string.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/polyfill/typescript.js","Users/smallmain/Documents/Work/cocos-service-pack-src/engine/predefine.js"],"names":["outer","modules","cache","entry","newRequire","name","jumped","module","moduleData","exports","x","i","length","1","require","1001","1002","1003","1004","1005","1006","1007","1008","1009","1010","1011","1012","1013","1014","1015","1016","1019","1020","1021","1022","1023","1024","1025","1026","1027","1028","1029","1030","1031","1100","1101","1200","1201","1203","1204","1205","1206","1207","1208","1209","1210","1211","1212","1213","1214","1215","1216","1300","1400","1404","1405","1406","1408","1502","1503","1504","1505","1506","1507","1508","1509","1510","1511","1513","1605","1606","1610","1612","1613","1617","1618","1619","1620","1623","1624","1625","1626","1627","1632","1633","1634","1635","1636","1637","1638","1639","1800","1801","1802","1803","1900","2000","2200","2201","2300","2400","2602","2603","2606","2607","2608","2609","2610","2614","2616","2617","2618","2619","2623","2625","2626","2627","2628","2712","3005","3006","3007","3103","3112","3113","3116","3117","3119","3120","3121","3300","3400","3401","3500","3501","3502","3503","3504","3505","3506","3507","3508","3509","3510","3511","3600","3601","3602","3603","3604","3605","3606","3607","3608","3609","3610","3611","3612","3613","3614","3615","3616","3617","3618","3619","3620","3621","3622","3623","3624","3625","3626","3627","3628","3633","3634","3635","3636","3637","3638","3639","3640","3641","3642","3643","3644","3645","3646","3647","3648","3649","3651","3652","3653","3654","3655","3700","3701","3800","3801","3802","3803","3804","3805","3806","3807","3808","3809","3810","3811","3812","3813","3814","3815","3816","3817","3818","3819","3820","3821","3900","3901","3902","3903","3904","3905","3906","3907","3912","4003","4004","4011","4012","4013","4200","4201","4202","4300","4400","4600","4700","4800","4901","4902","4914","4915","4916","4921","4922","4923","4924","4925","4926","4927","4928","4929","4930","4932","4933","5000","5001","5100","5200","5201","5202","5300","5301","5302","5303","5304","5402","5403","5404","5405","5406","5500","5501","5507","5508","5510","5511","5512","5513","5514","5515","5516","5517","5601","5602","5603","5700","5800","5801","5802","5900","5901","5902","6000","6001","6017","6018","6019","6020","6021","6022","6023","6024","6025","6026","6027","6028","6029","6030","6031","6032","6400","6402","6500","6600","6601","6700","6800","6801","6900","6901","6902","6903","6904","6905","7100","7101","7200","7201","7202","7203","7210","7211","7215","7216","7217","7218","7219","7221","7222","7236","7237","7238","7239","7240","7241","7401","7402","7501","7502","7503","7504","7506","7507","7508","7509","7510","7600","7601","7602","7603","7604","7605","7700","7701","7702","7800","7801","7802","7803","7804","7805","7900","7901","7902","7903","7904","7905","7906","7907","7908","7909","8000","8001","8002","8003","8103","8104","8105","8106","8107","8108","8109","8200","8300","8301","8400","8401","9000","9001","9100","9101","9102","9103","9104","9105","9106","9107","9200","0100","2","misc","cc","Action","Class","ctor","this","originalTarget","target","tag","TAG_INVALID","clone","action","isDone","startWithTarget","stop","step","dt","logID","update","getTarget","setTarget","getOriginalTarget","setOriginalTarget","getTag","setTag","retain","release","FiniteTimeAction","extends","_duration","getDuration","_timesForRepeat","setDuration","duration","reverse","Speed","speed","_speed","_innerAction","initWithAction","getSpeed","setSpeed","errorID","prototype","call","setInnerAction","getInnerAction","Follow","followedNode","rect","_followedNode","_boundarySet","_boundaryFullyCovered","_halfScreenSize","_fullScreenSize","leftBoundary","rightBoundary","topBoundary","bottomBoundary","_worldRect","initWithTarget","locRect","Rect","y","width","height","isBoundarySet","setBoundarySet","value","setBoudarySet","_this","winSize","v2","mul","targetWorldPos","convertToWorldSpaceAR","Vec2","ZERO","followedWorldPos","delta","sub","tempPos","parent","convertToNodeSpaceAR","add","setPosition","clampf","activeInHierarchy","follow","../core/platform/CCClass","../core/utils/misc","3","cardinalSplineAt","p0","p1","p2","p3","tension","t","t2","t3","s","b1","b2","b3","b4","getControlPointAt","controlPoints","pos","p","Math","min","max","reverseControlPoints","newArray","push","cloneControlPoints","CardinalSplineTo","ActionInterval","points","_points","_deltaT","_tension","_previousPosition","_accumulatedDiff","undefined","initWithDuration","setPoints","_computeEaseTime","lt","ps","locDT","newPos","macro","ENABLE_STACKABLE_ACTIONS","tempX","tempY","locAccDiff","updatePosition","reversePoints","cardinalSplineTo","getPoints","CardinalSplineBy","_startPosition","copyConfig","slice","current","reverseArray","pop","unshift","cardinalSplineBy","posX","posY","a","CatmullRomTo","catmullRomTo","CatmullRomBy","catmullRomBy","4","easeIn","rate","_rate","easing","pow","easeOut","easeInOut","_easeExponentialInObj","_easeExponentialOutObj","easeExponentialIn","easeExponentialOut","_easeExponentialInOutObj","easeExponentialInOut","_easeSineInObj","cos","PI","_easeSineOutObj","easeSineIn","sin","easeSineOut","_easeSineInOutObj","easeSineInOut","_easeElasticInObj","_easeElasticOutObj","easeElasticIn","period","_period","easeElasticOut","easeElasticInOut","newT","locPeriod","_bounceTime","time1","_easeBounceInObj","_easeBounceOutObj","easeBounceIn","easeBounceOut","_easeBounceInOutObj","easeBounceInOut","_easeBackInObj","overshoot","_easeBackOutObj","easeBackIn","easeBackOut","_easeBackInOutObj","easeBackInOut","easeBezierAction","b","c","d","_easeQuadraticActionIn","time","easeQuadraticActionIn","_easeQuadraticActionOut","easeQuadraticActionOut","_easeQuadraticActionInOut","resultTime","easeQuadraticActionInOut","_easeQuarticActionIn","easeQuarticActionIn","_easeQuarticActionOut","easeQuarticActionOut","_easeQuarticActionInOut","easeQuarticActionInOut","_easeQuinticActionIn","easeQuinticActionIn","_easeQuinticActionOut","easeQuinticActionOut","_easeQuinticActionInOut","easeQuinticActionInOut","_easeCircleActionIn","sqrt","easeCircleActionIn","_easeCircleActionOut","easeCircleActionOut","_easeCircleActionInOut","easeCircleActionInOut","_easeCubicActionIn","easeCubicActionIn","_easeCubicActionOut","easeCubicActionOut","_easeCubicActionInOut","easeCubicActionInOut","5","ActionInstant","Show","_renderComps","getComponentsInChildren","RenderComponent","render","enabled","Hide","show","hide","ToggleVisibility","toggleVisibility","RemoveSelf","isNeedCleanUp","_isNeedCleanUp","init","removeFromParent","removeSelf","DestroySelf","destroy","destroySelf","FlipX","flip","_flippedX","initWithFlipX","scaleX","abs","flipX","FlipY","_flippedY","initWithFlipY","scaleY","flipY","Place","_x","_y","initWithPosition","place","CallFunc","selector","selectorTarget","data","_selectorTarget","_function","_data","initWithFunction","execute","getTargetCallback","setTargetCallback","sel","callFunc","6","MAX_VALUE","_elapsed","_firstTick","_easeList","_repeatForever","_repeatMethod","_speedMethod","getElapsed","FLT_EPSILON","_cloneDecoration","_reverseEaseList","easeObj","arguments","locList","n","setAmplitudeRate","amp","getAmplitudeRate","repeat","times","round","isNaN","repeatForever","actionInterval","Sequence","tempArray","_actions","_split","_last","_reversed","paramArray","Array","last","prev","action1","_actionOneTwo","initWithTwoActions","actionOne","actionTwo","durationOne","durationTwo","new_t","found","locSplit","locActions","locLast","actionFound","sequence","result","Repeat","_times","_total","_nextDt","_actionInstant","locInnerAction","locDuration","locTimes","locNextDt","RepeatForever","Spawn","_one","_two","action2","ret","d1","d2","delayTime","spawn","pSpawn","RotateTo","statics","_reverse","dstAngle","_startAngle","_dstAngle","_angle","startAngle","angle","rotateTo","RotateBy","deltaAngle","_deltaAngle","rotateBy","MoveBy","deltaPos","deltaY","_positionDelta","position","locPosX","locPosY","locStartPosition","targetX","targetY","locPreviousPosition","moveBy","MoveTo","_endPosition","moveTo","SkewTo","sx","sy","_skewX","_skewY","_startSkewX","_startSkewY","_endSkewX","_endSkewY","_deltaX","_deltaY","skewX","skewY","skewTo","SkewBy","deltaSkewX","deltaSkewY","skewBy","JumpBy","jumps","_delta","_height","_jumps","frac","jumpBy","JumpTo","jumpTo","bezierAt","BezierBy","_config","newConfigs","selConf","locConfig","xa","xb","xc","xd","ya","yb","yc","yd","x0","y0","x1","y1","x2","y2","r","bezierBy","BezierTo","_toConfig","locStartPos","locToConfig","bezierTo","ScaleTo","_scaleX","_scaleY","_startScaleX","_startScaleY","_endScaleX","_endScaleY","scaleTo","ScaleBy","scaleBy","Blink","blinks","_originalState","m","opacity","blink","FadeTo","_toOpacity","_fromOpacity","fromOpacity","fadeTo","FadeIn","_reverseAction","FadeOut","fadeIn","fadeOut","TintTo","red","green","blue","_to","color","_from","Color","g","locTo","locFrom","tintTo","TintBy","deltaRed","deltaGreen","deltaBlue","_deltaR","_deltaG","_deltaB","_fromR","_fromG","_fromB","tintBy","DelayTime","ReverseTime","_other","reverseTime","TargetedAction","_action","_forcedTarget","getForcedTarget","setForcedTarget","forcedTarget","targetedAction","7","js","HashElement","actions","actionIndex","currentAction","paused","lock","ActionManager","_hashTargets","createMap","_arrayTargets","_currentTarget","director","_scheduler","enableForTarget","constructor","_elementPool","_searchElementByTarget","arr","k","_getElement","element","_putElement","addAction","_id","removeAllActions","locTargets","removeAllActionsFromTarget","forceDelete","_deleteHashElement","removeAction","splice","_removeActionByTag","l","_removeActionAtIndex","_removeAllActionsByTag","removeActionByTag","hashTargets","_element","removeAllActionsByTag","_element2","getActionByTag","getNumberOfRunningActionsInTarget","pauseTarget","resumeTarget","pauseAllRunningActions","idsWithActions","resumeTargets","targetsToResume","pauseTargets","targetsToPause","purgeSharedManager","getScheduler","unscheduleUpdate","index","targets","locCurrTarget","elt","CC_TEST","../core/platform/js","8","./CCAction","./CCActionCatmullRom","./CCActionEase","./CCActionInstant","./CCActionInterval","./CCActionManager","./tween","9","_bezier","_tweenID","TweenAction","props","opts","_opts","Object","create","_props","progress","easingName","warnID","relative","isNumber","lerp","warn","prop","_originProps","start","end","easingTime","onUpdate","SetAction","Tween","_finalAction","_target","_tag","stopAll","getActionManager","stopAllByTag","stopAllByTarget","then","other","_union","isValid","tween","union","assign","c1","c2","to","c0x","c0y","c1x","c1y","bezier","by","_this2","tmp_args","wrapAction","arg","apply","set","delay","parallel","previousAsInputActions","keys","_loop","key","_loop2","_i","args","_i2","../animation/bezier","10","Playable","_require","EventAnimCurve","EventInfo","WrapModeMask","binarySearch","binarySearchEpsilon","AnimationAnimator","animation","_anims","array","MutableForwardIterator","extend","playState","state","startTime","clip","curveLoaded","initClipData","animator","play","setTime","stopStatesExcept","iterator","anim","stopState","addAnimation","indexOf","_setEventTarget","removeAnimation","fastRemoveAt","sample","pauseState","pause","resumeState","resume","isPaused","setStateTime","onStop","onPause","onResume","_reloadClip","createBatchedProperty","propPath","firstDotIndex","mainValue","animValue","nextValue","leftIndex","rightIndex","nextName","lastPropName","root","wrapMode","frameRate","Loop","repeatCount","Infinity","curves","createCurves","events","curve","eventData","ratio","frame","eventInfo","ratios","func","params","../core/utils/binary-search","./animation-curves","./playable","./types","11","WrapMode","DynamicAnimCurve","quickFindIndex","sampleMotionPaths","AnimationClip","Asset","properties","default","type","Float","get","Normal","curveData","visible","createWithSpriteFrames","spriteFrames","isArray","frames","comps","cc.Sprite","spriteFrame","onLoad","Number","parseFloat","parseInt","createPropCurve","keyframes","motionPaths","isMotionPathProp","Node","keyframe","motionPath","curveValue","values","curveTypes","types","Linear","Bezier","currRatioDif","lastRatioDif","canOptimize","EPSILON","_l","_findFrameIndex","firstValue","_lerp","_lerpNumber","Quat","_lerpQuat","_lerpVector2","Vec3","_lerpVector3","_lerpObject","createTargetCurves","propsData","compsData","compName","comp","getComponent","compData","_propPath","_curve","childrenCurveDatas","paths","namePath","find","childCurveDatas","./motion-path-helper","12","bezierByTime","WrappedInfo","computeRatioByType","AnimCurve","onTimeChangedManually","eachLength","floorIndex","_cachedIndex","from","out","quat","v3","frameCount","shoudRefind","cachedIndex","_fromRatio","_toRatio","fromVal","fromRatio","toRatio","ratioBetweenFrames","toVal","_wrappedInfo","_default","_lastWrappedInfo","_ignoreIndex","NaN","_wrapIterations","iterations","currentWrappedInfo","getWrappedInfo","direction","currentIndex","frameIndex","_fireEvent","currentIterations","lastWrappedInfo","lastIterations","lastIndex","lastDirection","interationsChanged","PingPong","getAnimationManager","pushDelayEvent","components","_components","event","funcName","j","component","info","./bezier","13","AnimationManager","_delayEvents","_isPlaying","_isPaused","destruct","14","Types","AnimationState","_currentFramePlayed","_delay","_delayTime","_process","process","_clip","_name","_lastframeEventOn","emit","proto","_emit","on","callback","once","self","off","hasEventListener","onPlay","lastInfo","stopped","simpleProcess","len","_lastIterations","_needRevers","needRevers","isEnd","isOddIteration","Reverse","tempRatio","tempTime","shouldWrap","_wrapMode","ShouldWrap","obsolete","getset","CC_EDITOR","_repeatCount","15","C1","C2","C3","C4","t1","acos","pi","tau","crt","v","cardano","pa","pb","pc","pd","pa3","pb3","pc3","rd","r3","a3","q","q2","discriminant","u1","v1","x3","mp3","mp33","cosphi","phi","crtr","sd","percent","p1y","p2y","16","constant","linear","quadIn","quadOut","quadInOut","cubicIn","cubicOut","cubicInOut","quartIn","quartOut","quartInOut","quintIn","quintOut","quintInOut","sineIn","sineOut","sineInOut","expoIn","expoOut","expoInOut","circIn","circOut","circInOut","elasticIn","asin","elasticOut","elasticInOut","backIn","backOut","backInOut","bounceIn","bounceOut","bounceInOut","smooth","fade","_makeOutIn","fnIn","fnOut","quadOutIn","cubicOutIn","quartOutIn","quintOutIn","sineOutIn","expoOutIn","circOutIn","backOutIn","bounceOutIn","17","./animation-animator","./animation-clip","./animation-manager","./animation-state","./easing","18","Curve","beziers","progresses","computeBeziers","startPoint","endPoint","startCtrlPoint","endCtrlPoint","getLength","getPointAt","u","getUtoTmapping","getPoint","lengths","getLengths","divisions","__arcLengthDivisions","cacheArcLengths","vector","sum","mag","distance","arcLengths","il","targetArcLength","low","high","comparison","floor","lengthBefore","lengthAfter","segmentLength","segmentFraction","checkMotionPath","controls","fps","createControlPoints","in","map","motionPathValid","_motionPath","newValues","newTypes","newRatios","addNewDatas","startRatioOffset","newType","nextRatio","betweenRatio","results","finalProgress","l2","normal","normalize","bezierIndex","newRatio","19","debug","_stepOnce","virtual","onError","getError","../core/CCDebug","20","Enum","Default","LoopReverse","PingPongReverse","21","utils","debugInfos","ERROR_MAP_URL","logList","log","error","assert","console","bind","resetDebugSetting","mode","DebugMode","NONE","ERROR","logToWebPage","msg","game","canvas","logDiv","document","createElement","setAttribute","logDivStyle","style","zIndex","top","left","logListStyle","backgroundColor","borderBottom","borderTopWidth","borderLeftWidth","borderRightWidth","borderTopStyle","borderLeftStyle","borderRightStyle","padding","margin","appendChild","parentNode","scrollTop","scrollHeight","formatStr","cond","shiftArguments","ERROR_FOR_WEB_PAGE","INFO_FOR_WEB_PAGE","CC_JSB","CC_DEV","Error","INFO","CC_RUNTIME","_throw","callInNextTick","getTypedFormatter","id","argsArray","concat","logFormatter","warnFormatter","errorFormatter","assertFormatter","assertID","WARN","WARN_FOR_WEB_PAGE","_resetDebugSetting","isDisplayStats","profiler","isShowingStats","setDisplayStats","displayStats","renderType","RENDER_TYPE_CANVAS","showStats","hideStats","config","showFPS","../../DebugInfos","./platform/utils","22","EventTarget","ComponentScheduler","NodeActivator","Obj","renderer","eventManager","Scheduler","Director","_paused","_purgeDirectorInNextLoop","_winSizeInPoints","_scene","_loadingScene","_totalFrames","_lastUpdate","_deltaTime","_startTime","_maxParticleDeltaTime","_compScheduler","_nodeActivator","_actionManager","EVENT_SHOW","performance","now","EVENT_ENGINE_INITED","size","scheduleUpdate","PRIORITY_SYSTEM","sharedInit","setEnabled","_animationManager","CollisionManager","_collisionManager","PhysicsManager","_physicsManager","Physics3DManager","CC_PHYSICS_BUILTIN","CC_PHYSICS_CANNON","_physics3DManager","_widgetManager","calculateDeltaTime","CC_DEBUG","convertToGL","uiPoint","container","view","box","getBoundingClientRect","window","pageXOffset","clientLeft","pageYOffset","clientTop","_devicePixelRatio","_isRotated","_viewportRect","convertToUI","glPoint","getWinSize","getWinSizeInPixels","purgeCachedData","assetManager","releaseAll","purgeDirector","unscheduleAll","reset","clear","builtins","runSceneImmediate","scene","onBeforeLoadScene","onLaunched","Scene","SceneAsset","CC_BUILD","_load","timeEnd","persistNodeList","_persistRootNodes","node","existNode","getChildByUuid","uuid","getSiblingIndex","_destroyImmediate","insertChild","oldScene","_releaseManager","_autoRelease","_deferredDestroy","EVENT_BEFORE_SCENE_LAUNCH","_activate","EVENT_AFTER_SCENE_LAUNCH","runScene","EVENT_AFTER_DRAW","loadScene","sceneName","_onUnloaded","bundle","bundles","getSceneInfo","EVENT_BEFORE_SCENE_LOADING","err","preloadScene","onProgress","onLoaded","setDepthTest","Camera","main","depth","setClearColor","clearColor","getRunningScene","getScene","getAnimationInterval","getFrameRate","setAnimationInterval","setFrameRate","getDeltaTime","getTotalTime","getTotalFrames","setScheduler","scheduler","setActionManager","actionManager","getCollisionManager","getPhysicsManager","getPhysics3DManager","startAnimation","stopAnimation","_resetDeltaTime","mainLoop","EVENT_BEFORE_UPDATE","startPhase","updatePhase","lateUpdatePhase","EVENT_AFTER_UPDATE","EVENT_BEFORE_DRAW","frameUpdateListeners","__fastOn","__fastOff","addon","EVENT_PROJECTION_CHANGED","EVENT_BEFORE_VISIT","EVENT_AFTER_VISIT","PROJECTION_2D","PROJECTION_3D","PROJECTION_CUSTOM","PROJECTION_DEFAULT","EVENT_BEFORE_PHYSICS","EVENT_AFTER_PHYSICS","./CCGame","./CCScheduler","./component-scheduler","./event-manager","./event/event-target","./node-activator","./platform/CCObject","./renderer","23","dynamicAtlasManager","EVENT_HIDE","EVENT_RESTART","EVENT_GAME_INITED","EVENT_RENDERER_INITED","RENDER_TYPE_WEBGL","RENDER_TYPE_OPENGL","_configLoaded","_isCloning","_prepared","_rendererInitialized","_renderContext","_intervalId","_lastTime","_frameTime","onStart","cancelAnimFrame","_setAnimFrame","_runMainLoop","audioEngine","_break","_restore","restart","removePersistRootNode","uncacheAll","close","_initEngine","_initRenderer","_initEvents","_loadPreviewScript","cb","CC_PREVIEW","_prepareFinished","ENGINE_VERSION","eventTargetOn","eventTargetOnce","prepare","run","_initConfig","addPersistRootNode","isNode","_persistNode","_addPersistNodeRef","_removePersistNodeRef","isPersistRootNode","rAF","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","requestAnimFrame","_stTimeWithRAF","_stTime","_ctTime","cancelAnimationFrame","cancelRequestAnimationFrame","msCancelRequestAnimationFrame","mozCancelRequestAnimationFrame","oCancelRequestAnimationFrame","webkitCancelRequestAnimationFrame","msCancelAnimationFrame","mozCancelAnimationFrame","webkitCancelAnimationFrame","oCancelAnimationFrame","currTime","timeToCall","setTimeout","clearTimeout","_callback","skip","debugMode","exposeClassName","renderMode","registerSystemEvent","collisionMatrix","groupList","_determineRenderType","userRenderMode","supportRender","sys","capabilities","el","localCanvas","localContainer","addClass","hasClass","className","HTMLElement","querySelector","tagName","insertBefore","clientWidth","clientHeight","body","documentElement","stencil","antialias","ENABLE_WEBGL_ANTIALIAS","alpha","ENABLE_TRANSPARENT_CANVAS","initWebGL","device","_gl","CLEANUP_IMAGE_CACHE","initCanvas","_ctx","oncontextmenu","_isContextMenuEnable","win","hiddenPropName","internal","inputManager","hidden","mozHidden","msHidden","webkitHidden","onHidden","onShown","arg0","arg1","arg2","arg3","arg4","changeList","addEventListener","navigator","userAgent","onfocus","../audio/CCAudioEngine","../core/renderer/utils/dynamic-atlas/manager","./CCDebug","./renderer/index.js","24","_valueTypes","_utils","BaseNode","PrefabHelper","nodeMemPool","NodeMemPool","AffineTrans","Event","RenderFlow","Flags","Destroying","ERR_INVALID_NUMBER","ONE_DEGREE","ActionManagerExist","emptyFunc","_gwpVec3","_gwpQuat","_tpVec3a","_tpVec3b","_tpQuata","_tpQuatb","_swpVec3","_gwsVec3","_swsVec3","_gwrtVec3a","_gwrtVec3b","_gwrtQuata","_gwrtQuatb","_laVec3","_laQuat","_urfVec3","_urfQuat","_htVec3a","_htVec3b","_gwrQuat","_swrQuat","_quata","_mat4_temp","mat4","_vec3_temp","POSITION_ON","SCALE_ON","ROTATION_ON","SIZE_ON","ANCHOR_ON","COLOR_ON","_cachedPool","Pool","_get","BuiltinGroupIndex","DEBUG","LocalDirtyFlag","POSITION","SCALE","ROTATION","SKEW","TRS","RS","TRSS","PHYSICS_POSITION","PHYSICS_SCALE","PHYSICS_ROTATION","PHYSICS_TRS","PHYSICS_RS","ALL_POSITION","ALL_SCALE","ALL_ROTATION","ALL_TRS","ALL","EventType","TOUCH_START","TOUCH_MOVE","TOUCH_END","TOUCH_CANCEL","MOUSE_DOWN","MOUSE_MOVE","MOUSE_ENTER","MOUSE_LEAVE","MOUSE_UP","MOUSE_WHEEL","POSITION_CHANGED","ROTATION_CHANGED","SCALE_CHANGED","SIZE_CHANGED","ANCHOR_CHANGED","COLOR_CHANGED","CHILD_ADDED","CHILD_REMOVED","CHILD_REORDER","GROUP_CHANGED","SIBLING_ORDER_CHANGED","_touchEvents","_mouseEvents","_skewNeedWarn","_skewWarn","nodePath","NodeUtils","_currentHovered","_touchStartHandler","touch","getLocation","owner","_hitTest","bubbles","dispatchEvent","_touchMoveHandler","_touchEndHandler","_touchCancelHandler","_mouseDownHandler","_mouseMoveHandler","hit","_previousIn","_mouseListener","stopPropagation","_mouseUpHandler","_mouseWheelHandler","_searchComponentsInParent","list","curr","_parent","next","_checkListeners","_objFlags","_bubblingListeners","_capturingListeners","_doDispatchEvent","cachedArray","_getCapturingTargets","eventPhase","currentTarget","_propagationStopped","_propagationImmediateStopped","_getBubblingTargets","_getActualGroupIndex","groupIndex","_updateCullingMask","_cullingMask","_children","updateLocalMatrix3D","_localMatDirty","_matrix","tm","Trs","toMat4","_trs","skx","tan","sky","_worldMatDirty","updateLocalMatrix2D","dirtyFlag","trs","rotation","_eulerAngles","z","hasSkew","rotationRadians","_a","_b","_c","_d","calculWorldMatrix3D","_updateLocalMatrix","parentMat","_worldMatrix","Mat4","copy","calculWorldMatrix2D","_mulMat","mulMat2D","am","bm","outm","aa","ab","ac","ad","atx","aty","ba","bb","bc","bd","btx","bty","mulMat3D","NodeDefines","_opacity","_color","WHITE","_contentSize","Size","_anchorPoint","_position","_scale","_zIndex","Integer","_localZOrder","serializable","_is3DNode","_groupIndex","formerlySerializedAs","group","oldValue","setLocalDirty","_eventMask","_renderFlag","FLAG_WORLD_TRANSFORM","fromAngleZ","rotationX","fromEulerNumber","rotationY","eulerAngles","toEuler","fromEuler","FLAG_TRANSFORM","setRotation","scale","setScale","scaleZ","FLAG_OPACITY_COLOR","range","equals","FLAG_COLOR","anchorX","anchorPoint","anchorY","MAX_ZINDEX","MIN_ZINDEX","_onSiblingIndexChanged","is3DNode","_update3DFunction","up","_up","transformQuat","UP","getWorldRotation","right","_right","RIGHT","forward","_forward","FORWARD","_reorderChildDirty","_widget","_renderComponent","_touchListener","_initDataFromPool","_childArrivalOrder","_LocalDirtyFlag","obj","_delaySort","_onPreDestroy","destroyByParent","_onPreDestroyBase","removeListeners","mask","_backDataIntoPool","sortAllChildren","_onPostActivated","active","_checkListenerMask","_onHierarchyChanged","oldParent","_updateOrderOfArrival","_onHierarchyChangedBase","_nodesOrderDirty","_activeInHierarchy","_calculWorldMatrix","_on3DNodeChanged","_spaceInfo","spaceInfo","localMat","identity","worldMat","_toEuler","_fromEuler","_initProperties","desTrs","subarray","_onBatchCreated","dontSyncChildPrefab","children","child","prefabInfo","_prefab","sync","syncWithPrefab","FLAG_CHILDREN","Mask","_checknSetupSysEvent","newAdded","forDispatch","EventListener","TOUCH_ONE_BY_ONE","swallowTouches","onTouchBegan","onTouchMoved","onTouchEnded","onTouchCancelled","addListener","MOUSE","onMouseDown","onMouseMove","onMouseUp","onMouseScroll","schedule","useCapture","_onDispatch","listeners","__eventTargets","touchEvent","mouseEvent","_offDispatch","removeListener","hasListeners","fastRemove","removeAll","targetOff","has","arg5","_array","put","pauseSystemEvents","recursive","resumeSystemEvents","point","listener","w","h","cameraPt","testPt","camera","findCamera","getScreenToWorldPoint","_updateWorldMatrix","invert","transformMat4","temp","_enabled","runAction","_suppressDeprecation","pauseAllActions","resumeAllActions","stopAllActions","stopAction","stopActionByTag","getNumberOfRunningActions","getPosition","toPosition","newPosOrX","oldPosition","getScale","toScale","newScaleOrX","getRotation","toRotation","getContentSize","setContentSize","locContentSize","approx","getAnchorPoint","setAnchorPoint","locAnchorPoint","_invTransformPoint","ltrs","conjugate","inverseSafe","getWorldPosition","setWorldPosition","fromPosition","setWorldRotation","val","fromRotation","getWorldScale","setWorldScale","div","fromScale","getWorldRT","opos","orot","fromRT","lookAt","fromViewUp","flag","setWorldDirty","getLocalMatrix","getWorldMatrix","worldPoint","nodePoint","convertToNodeSpace","convertToWorldSpace","getNodeToParentTransform","contentSize","transform","fromMat4","getNodeToParentTransformAR","getNodeToWorldTransform","getNodeToWorldTransformAR","getParentToNodeTransform","getWorldToNodeTransform","convertTouchToNodeSpace","convertTouchToNodeSpaceAR","getBoundingBox","getBoundingBoxToWorld","_getBoundingBoxTo","locChildren","childRect","arrivalOrder","setSelfGroupIndex","addChild","cleanup","_setDirtyForNode","_child","child2","count","_restoreProperties","onRestore","_p","vec3_tmp","./event/event","./platform/CCMacro","./platform/js","./renderer/render-flow","./utils/affine-transform","./utils/base-node","./utils/prefab-helper","./utils/trans-pool","./value-types","./value-types/utils","25","_createForOfIteratorHelperLoose","o","allowArrayLike","it","Symbol","_unsupportedIterableToArray","done","TypeError","minLen","_arrayLikeToArray","toString","test","arr2","HideInHierarchy","PrivateNode","_originPos","localPosition","_posDirty","override","showInEditor","editorOnly","sendEvent","_super","setParent","getParent","./CCNode","26","NIL","autoReleaseAssets","_inited","dependAssets","_active","_instantiate","activateNode","27","IdGenerater","MAX_POOL_SIZE","idGenerater","ListEntry","priority","markedForDeletion","_listEntries","HashUpdateEntry","_hashUpdateEntries","HashTimerEntry","timers","timerIndex","currentTimer","currentTimerSalvaged","_t","_hashTimerEntries","CallbackTimer","_lock","_runForever","_useDelay","_timesExecuted","_repeat","_interval","initWithCallback","seconds","REPEAT_FOREVER","getInterval","setInterval","interval","trigger","cancel","getCallback","unschedule","_timers","timer","_timeScale","_updatesNegList","_updates0List","_updatesPosList","_hashForUpdates","_hashForTimers","_currentTargetSalvaged","_updateHashLocked","_arrayForTimers","_removeHashElement","_removeUpdateFromHash","targetId","listEntry","_priorityIn","ppList","listElement","_appendIn","__instanceId","getNewId","setTimeScale","timeScale","getTimeScale","tmp","hashElement","li","unscheduleAllForTarget","unscheduleAllWithMinPriority","minPriority","temp_length","isScheduled","pauseAllTargets","pauseAllTargetsWithMinPriority","idsWithSelectors","locArrayForTimers","elementUpdate","isTargetPaused","PRIORITY_NON_SYSTEM","./platform/id-generater","28","preprocess","fetch","Cache","helper","releaseManager","dependUtil","load","Pipeline","Task","RequestItem","downloader","parser","packManager","Bundle","factory","parse","combine","_require2","parseParameters","asyncify","_require3","assets","files","parsed","pipeline","transformPipeline","fetchPipeline","RequestType","BuiltinBundleName","AssetManager","_preprocessPipe","_fetchPipe","_loadPipe","append","_files","_parsed","generalImportBase","generalNativeBase","cacheAsset","force","cacheManager","presets","preload","maxConcurrency","maxRequestsPerFrame","remote","maxRetryCount","script","MAIN","resources","RESOURCES","INTERNAL","options","bundleVers","server","importBase","nativeBase","getBundle","removeBundle","_destroy","remove","loadAny","requests","onComplete","_parseParameters","preset","task","input","async","preloadAny","_parseParameters2","postLoadNative","asset","_parseParameters3","_native","_nativeAsset","depend","getNativeDep","_uuid","getAssetInfo","message","stack","loadRemote","url","_parseParameters4","__isNative__","ext","path","extname","loadScript","_parseParameters5","__requestType__","URL","loadBundle","nameOrUrl","_parseParameters6","bundleName","basename","releaseAsset","tryRelease","releaseUnusedAssets","forEach","_transform","subTask","urls","item","recycle","e","output","defineProperty","./builtins","./bundle","./cache","./depend-util","./downloader","./factory","./fetch","./helper","./load","./pack-manager","./parser","./pipeline","./preprocess","./releaseManager","./request-item","./shared","./task","./urlTransformer","./utilities","29","_assets","material","effect","_loadBuiltins","dirname","builtin","loadDir","addRef","_loadBuiltinsSP","sp","MAX_MULTITEXTURE_NUM","_loadMultiEffect","multi2dSpriteEffectAsset","inited","multiBatcher","maxAtlasCount","charAtlasAutoBatchCount","EffectAsset","getBuiltin","30","Config","parseLoadResArgs","deps","base","getInfoWithPath","getDirWithPath","_parseLoadResArgs","PATH","__outputAsArray__","_parseLoadResArgs2","dir","_parseLoadResArgs3","DIR","preloadDir","_parseLoadResArgs4","sceneAsset","redirect","./config","31","_map","_count","predicate","../platform/js","32","processOptions","assetInfos","scenes","_initUuid","uuids","_initPath","_initScene","_initPackage","packs","_initVersion","versions","_initRedirect","uuidList","pathList","isSubAsset","assetInfo","_getClassById","sceneList","packageList","packUuid","pack","assetPacks","entries","ver","nativeVer","items","isChildClassOf","infos","isMatchByWord","nextAscii","charCodeAt","startsWith","endsWith","33","_deserializeCompiled","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","__esModule","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","hasOwnProperty","desc","deserialize","_depends","nativeDep","getDeps","getDepsRecursively","exclude","depends","_descend","json","__type__","hasNativeDep","_parseDepsFromJson","_parseDepsFromAsset","parsedFromExistAsset","preventPreloadNativeObject","preventDeferredLoadDependents","__depends__","dep","__nativeDepend__","_nativeDep","getDependUuidList","decodeUuid","../platform/deserialize-compiled","./deserialize","34","utilities","ImageFmts","AudioFmts","GetTrue","md5Pipe","transformURL","getUuidFromURL","hashValue","hashPatchInFolder","replace","match","loader","_autoReleaseSetting","_cache","progressCallback","completeCallback","images","audios","finish","total","content","includes","res","image","audio","isCompleted","getXMLHttpRequest","XMLHttpRequest","getItem","loadRes","_this$_parseLoadResAr","loadResArray","_this$_parseLoadResAr2","loadResDir","_this$_parseLoadResAr3","getRes","getResCount","getDependsRecursively","assetLoader","addDownloadHandlers","extMap","handler","register","addLoadHandlers","file","flowInDeps","isBuiltin","builtinAsset","_isBuiltin","releaseRes","releaseResDir","removeItem","setAutoRelease","autoRelease","setAutoReleaseRecursively","isAutoRelease","loadSubpackage","AssetLibrary","libraryPath","rawAssetsBase","rawAssets","loadAsset","getLibUrlNoExt","queryAssetInfo","raw","changeExtname","substr","onceWarns","assetLibrary","defineProperties","LoadingItems","DOWNLOAD_MAX_CONCURRENT","_getSceneUuid","_sceneInfos","releaseSettings","../CCDirector","35","MissingClass","classFinder","missingClass","_MissingScript","safeFindClass","pool","deserializeForCompiled","deserializeForEditor","Details","tdInfo","customEnv","objList","uuidObjList","propList","uuidPropList","dependUuid","../platform/deserialize","../platform/deserialize-editor","36","__audioSupport","downloadDomAudio","dom","src","clearEvent","removeEventListener","success","failure","USE_LOADER_EVENT","readyState","37","downloadDomImage","img","Image","location","protocol","crossOrigin","loadCallback","errorCallback","38","downloadFile","xhr","errInfo","open","responseType","withCredentials","mimeType","overrideMimeType","timeout","header","setRequestHeader","onload","status","response","onprogress","lengthComputable","loaded","onerror","ontimeout","onabort","send","39","downloaded","downloadScript","loadHandler","removeChild","errorHandler","40","loadFont","_require4","urlAppendTimestamp","retry","REGEX","formatSupport","format","unsupported","downloadAudio","audioLoadMode","AudioClip","LoadMode","DOM_AUDIO","downloadArrayBuffer","WEB_AUDIO","downloadImage","imageBitmap","ALLOW_IMAGE_BITMAP","downloadBlob","onFileProgress","downloadJson","JSON","downloadText","downloadVideo","downloadBundle","version","_downloading","_queue","_queueDirty","_totalNum","_totalNumThisPeriod","_lastDate","_checkNextPeriod","updateTime","Date","_maxInterval","handleQueue","sort","nextOne","invoke","_remoteServerAddress","remoteServerAddress","appendTimeStamp","limited","retryInterval","mixin","downloaders","download","downloadCallbacks","finale","callbacks",".png",".jpg",".bmp",".jpeg",".gif",".ico",".tiff",".webp",".image",".pvr",".pkm",".mp3",".ogg",".wav",".m4a",".txt",".xml",".vsh",".fsh",".atlas",".tmx",".tsx",".json",".ExportJson",".plist",".fnt",".font",".eot",".ttf",".woff",".svg",".ttc",".mp4",".avi",".mov",".mpg",".mpeg",".rm",".rmvb",".binary",".bin",".dbbin",".skel",".js","_downloaders","../CCDebug","../platform/CCSys","../platform/utils","./download-dom-audio","./download-dom-image","./download-file","./download-script.js","./font-loader","41","_creating","createTexture","Texture2D","_nativeUrl","createAudioClip","createVideoClip","VideoClip","createJsonAsset","JsonAsset","createTextAsset","TextAsset","text","createFont","TTFFont","createBufferAsset","BufferAsset","createAsset","createBundle","producers","creating","42","getDepends","firstTask","canInvoke","__exclude__","isNative","handle","__asyncLoadAssets__","isFinish","dispatch","decreaseRef","decRef","loadDepends","43","textUtils","_canvasContext","_testString","_fontFaces","_loadingFonts","_timeout","useNativeCheck","nativeCheck","FontFace","exec","safari10Match","vendor","_checkFontLoaded","allFontsLoaded","fontLoadHandle","fontFamily","fontFamilyName","oldWidth","refWidth","fontDesc","font","newWidth","safeMeasureText","clearInterval","nativeCheckFontLoaded","Promise","resolve","reject","check","fonts","timeoutId","race","fontLoader","_getFontFamily","labelCanvas","getContext","fontStyle","fontStr","textContent","preloadDiv","divStyle","innerHTML","fontHandle","ttfIndex","lastIndexOf","slashPos","substring","../utils/text-utils","44","_uuidRegex","matches","getUrlWithUuid","nativeExt","isScene","../utils/decode-uuid","45","./CCAssetManager","./deprecated","46","gatherAsset","setProperties","checkCircleReference","loadOneAssetPipeline","reload","_exclude$uuid","repeatItem","dependAsset","missingAsset","__onLoadInvoked__","47","_loading","isLoading","unpackJson","unpackJSONs","textureType","_getClassId","datas","split","packCustomObjData","unpackers","unpack","unpacker","48","plistParser","_parsing","parseImage","Blob","imageOptions","imageOrientation","__flipY__","premultiplyAlpha","__premultiplyAlpha__","createImageBitmap","parseAudio","ArrayBuffer","context","decodeAudioData","buffer","parsePVRTex","PVR_HEADER_LENGTH","PVR_MAGIC","PVR_HEADER_MAGIC","PVR_HEADER_FORMAT","PVR_HEADER_HEIGHT","PVR_HEADER_WIDTH","PVR_HEADER_MIPMAPCOUNT","PVR_HEADER_METADATA","Int32Array","dataOffset","pvrtcData","Uint8Array","_compressed","parsePKMTex","ETC_PKM_HEADER_SIZE","ETC_PKM_FORMAT_OFFSET","ETC_PKM_ENCODED_WIDTH_OFFSET","ETC_PKM_ENCODED_HEIGHT_OFFSET","ETC_PKM_WIDTH_OFFSET","ETC_PKM_HEIGHT_OFFSET","ETC1_RGB_NO_MIPMAPS","ETC2_RGB_NO_MIPMAPS","ETC2_RGBA_NO_MIPMAPS","readBEUint16","offset","encodedWidth","encodedHeight","etcData","parsePlist","parseImport","parsers","parsedAsset","parsing","parseHandler","import","../platform/CCSAXParser","49","_pipelineId","funcs","pipes","insert","_isFinish","pipe","_flow","50","subOptions","leftOptions","op","UUID","SCENE","source","51","visitAsset","visitComponent","getOwnPropertyNames","propName","_j","_val","_temp","visitNode","descendOpRef","refs","refCount","checkCircularReference","_persistNodeDeps","_toDelete","eventListener","freeAssets","_free","newScene","persistNodes","childs","dependencies","persistDeps","_asset","sceneDeps","_i3","_l2","../assets/CCAsset","52","MAX_DEAD_NUM","_deadPool","53","START_SCENE","54","_taskId","param1","param2","param3","param4","str","toUpperCase","55","stringify","__nativeName__","56","MissingObjectReporter","realEntries","_entry","packId","packedIds","folder","_uuid2","clearRef","wait","asyncLoadAssets","includeNative","_i4","_dep","_isScene","assetsMap","missingAssetReporter","reportByOwner","errs","isCallback","isValidType","checked","57","CCObject","writable","_ref","nativeUrl","_$nativeAsset","serialize","createNode","_setRawAsset","filename","inLibrary","../platform/CCObject","58","mixins","_audio","loadMode","_loadByUrl","audioClip","_ensureLoaded","uncache","../event/event-target","./CCAsset","59","FontLetterDefinition","offsetX","offsetY","textureID","valid","xAdvance","FontAtlas","texture","_letterDefinitions","_texture","addLetterDefinitions","letter","letterDefinition","cloneLetterDefinition","copyLetterDefinitions","getTexture","getLetter","getLetterDefinitionForChar","_char","hasKey","BitmapFont","Font","fntDataStr","SpriteFrame","fontSize","_fntConfig","_fontDefDictionary","fntConfig","fontDict","fontDefDictionary","fontDef","xOffset","yOffset","60","_buffer","bin","61","62","63","LabelAtlas","64","OptimizationPolicy","AUTO","SINGLE_INSTANCE","MULTI_INSTANCE","Prefab","_createFunction","_instantiatedTimes","optimizationPolicy","readonly","OptimizationPolicyThreshold","compileCreateFunction","jit","compile","_doInstantiate","rootToRedirect","useJit","CC_SUPPORT_JIT","PrefabUtils","../platform/instantiate-jit","65","_gfx","_interopRequireDefault","DepthStencilFormat","RB_FMT_D24S8","RB_FMT_S8","RB_FMT_D16","RenderTexture","_framebuffer","initWithSize","depthStencilFormat","visibleRect","_resetUnderlyingMipmaps","colors","_depthStencilBuffer","depthStencilBuffer","RenderBuffer","depthStencil","FrameBuffer","_packable","updateSize","rbo","_width","drawTextureAt","_image","updateSubImage","level","_premultiplyAlpha","readPixels","gl","oldFBO","getParameter","FRAMEBUFFER_BINDING","bindFramebuffer","FRAMEBUFFER","getHandle","RGBA","UNSIGNED_BYTE","../../renderer/gfx","../renderer","./CCTexture2D","66","67","Script","_Script","JavaScript","_JavaScript","TypeScript","_TypeScript","68","SpriteAtlas","_spriteFrames","getSpriteFrame","sf","getSpriteFrames","69","INSET_LEFT","INSET_TOP","INSET_RIGHT","INSET_BOTTOM","temp_uvs","_textureSetter","_refreshTexture","insetTop","_capInsets","_calculateSlicedUV","insetBottom","insetLeft","insetRight","rotated","originalSize","_rect","uv","_original","_offset","_originalSize","_rotated","_flipX","_flipY","vertices","uvSliced","setTexture","textureLoaded","onTextureLoaded","ensureLoadTexture","isRotated","setRotated","bRotated","_calculateUV","isFlipX","isFlipY","setFlipX","setFlipY","getRect","setRect","getOriginalSize","setOriginalSize","_textureLoadedCallback","_checkRect","setOffset","getOffset","offsets","maxX","maxY","_flipXY","uvs","tempVal","_tempVal","atlasWidth","atlasHeight","leftWidth","rightWidth","centerWidth","topHeight","bottomHeight","centerHeight","row","rowD","col","colD","_row","_rowD","_col","_colD","_setDynamicAtlasFrame","_resetDynamicAtlasFrame","texw","texh","_r","_tempVal2","nu","nv","_serialize","exporting","ctx","_textureFilename","Editor","Utils","UuidCache","urlToUuid","UuidUtils","compressUuid","dependsOn","triangles","atlas","_atlasUuid","capInsets","_deserialize","textureUuid","deleteSpriteFrame","copyWithZone","initWithTexture","70","_fontFamily","String","./CCFont","71","72","GL_NEAREST","GL_LINEAR","GL_REPEAT","GL_CLAMP_TO_EDGE","GL_MIRRORED_REPEAT","GL_RGBA","CHAR_CODE_0","CHAR_CODE_1","CUSTOM_PIXEL_FORMAT","PixelFormat","RGB565","TEXTURE_FMT_R5_G6_B5","RGB5A1","TEXTURE_FMT_R5_G5_B5_A1","RGBA4444","TEXTURE_FMT_R4_G4_B4_A4","RGB888","TEXTURE_FMT_RGB8","RGBA8888","TEXTURE_FMT_RGBA8","RGBA32F","TEXTURE_FMT_RGBA32F","A8","TEXTURE_FMT_A8","I8","TEXTURE_FMT_L8","AI8","TEXTURE_FMT_L8_A8","RGB_PVRTC_2BPPV1","TEXTURE_FMT_RGB_PVRTC_2BPPV1","RGBA_PVRTC_2BPPV1","TEXTURE_FMT_RGBA_PVRTC_2BPPV1","RGB_A_PVRTC_2BPPV1","RGB_PVRTC_4BPPV1","TEXTURE_FMT_RGB_PVRTC_4BPPV1","RGBA_PVRTC_4BPPV1","TEXTURE_FMT_RGBA_PVRTC_4BPPV1","RGB_A_PVRTC_4BPPV1","RGB_ETC1","TEXTURE_FMT_RGB_ETC1","RGBA_ETC1","RGB_ETC2","TEXTURE_FMT_RGB_ETC2","RGBA_ETC2","TEXTURE_FMT_RGBA_ETC2","REPEAT","CLAMP_TO_EDGE","MIRRORED_REPEAT","Filter","LINEAR","NEAREST","FilterIndex","9728","9729","_images","_sharedOpts","minFilter","magFilter","wrapS","wrapT","genMipmaps","_getSharedOptions","initWithData","_format","initWithElement","_minFilter","_magFilter","_mipFilter","_wrapS","_wrapT","_isAlphaAtlas","_genMipmaps","packable","_FilterIndex","extnames","_parseExt","extIdStr","defaultFormat","extIds","defaultExt","bestExt","bestIndex","bestFormat","SupportTextureFormats","SUPPORT_TEXTURE_FORMATS","extFormat","tmpExt","tmpFormat","webp","_hashDirty","_hash","_multiMaterial","getImpl","getId","updateImg","mipFilter","ImageBitmap","_checkImageBitmap","_upload","complete","HTMLCanvasElement","handleLoadedTexture","pixelFormat","pixelsWidth","pixelsHeight","_getGFXPixelFormat","_updateFormat","_checkPackable","getHtmlElementObj","deleteAtlasTexture","unlinkMaterial","getPixelFormat","hasPremultipliedAlpha","isAlphaAtlas","_cleanupImageCache","HTMLImageElement","_clearImage","description","releaseTexture","setWrapMode","setFilters","setPremultiplyAlpha","premultiply","dynamicAtlas","_isCompressed","maxFrameSize","_getHash","Atlas","DEFAULT_HASH","_getOpts","anisotropy","_anisotropy","mipmapSources","extId","exportedExts","_exportedExts","exts","_extId","join","fields","linkMaterial","getMultiHandler","autoSetTexture","removeTexture","getLinkedMaterial","hasLinkedMaterial","../platform/CCClass","../platform/id-generater","73","74","./CCAudioClip","./CCBitmapFont","./CCBufferAsset","./CCJsonAsset","./CCLabelAtlas","./CCPrefab","./CCRenderTexture","./CCSceneAsset","./CCScripts","./CCSpriteAtlas","./CCSpriteFrame","./CCTTFFont","./CCTextAsset","./CCVideoClip","./material","75","_CCAsset","_effectParser","_effect","techniques","shaders","lib","_programLib","define","_initEffect","parseEffect","freeze","getInstantiatedEffect","getEffect","../CCAsset","./effect-parser","76","Texture","textureUtil","gfx","BUILTIN_NAME","SPRITE","GRAY_SPRITE","UNLIT","Material","_manualHash","_dirty","_multiHandler","_defines","_effectAsset","_techniqueIndex","_techniqueData","effectName","effectAsset","updateMultiSupport","techniqueIndex","switchTechnique","getBuiltinMaterial","createWithBuiltin","setProperty","passIdx","directly","def","getDefine","getProperty","setCullMode","cullMode","CULL_BACK","setDepth","depthTest","depthWrite","depthFunc","DS_FUNC_LESS","setBlend","blendEq","blendSrc","blendDst","blendAlphaEq","blendSrcAlpha","blendDstAlpha","blendColor","BLEND_FUNC_ADD","BLEND_SRC_ALPHA","BLEND_ONE_MINUS_SRC_ALPHA","setStencilEnabled","stencilTest","STENCIL_INHERIT","setStencil","stencilFunc","stencilRef","stencilMask","stencilFailOp","stencilZFailOp","stencilZPassOp","stencilWriteMask","DS_FUNC_ALWAYS","STENCIL_OP_KEEP","updateHash","hash","getHash","passDatas","passData","defines","syncTextures","passes","technique","setMultiSupport","isMultiSupport","bool","MultiHandler","../../utils/texture-util","../CCTexture2D","./CCEffectAsset","77","_pass","_enums","_defineProperties","descriptor","enumerable","configurable","_createClass","Constructor","protoProps","staticProps","EffectBase","_technique","_proto","_createPassProp","pass","_properties","uniform","Float32Array","Float64Array","_setPassProperty","compareValue","PARAM_TEXTURE_2D","setStencilFront","setStencilBack","../../../renderer/core/pass","../../../renderer/enums","78","_types","getInvolvedProgram","programName","getTemplate","parseProperties","passJson","propertiesJson","program","uniformInfo","uniforms","_ret","propInfo","PARAM_INT","PARAM_FLOAT","enums2default","passDefines","parseTechniques","techNum","tech","techName","passNum","passName","detailName","stage","newPass","rasterizerState","blendState","blend","depthStencilState","stencilFuncFront","stencilRefFront","stencilMaskFront","stencilFailOpFront","stencilZFailOpFront","stencilZPassOpFront","stencilWriteMaskFront","stencilFuncBack","stencilRefBack","stencilMaskBack","stencilFailOpBack","stencilZFailOpBack","stencilZPassOpBack","stencilWriteMaskBack","../../../renderer/core/technique","../../../renderer/types","./effect","79","_murmurhash2_gc","_effectBase","_inheritsLoose","subClass","superClass","_setPrototypeOf","setPrototypeOf","__proto__","EffectVariant","_EffectBase","_passes","_stagePasses","_onEffectChanged","variantPasses","stagePasses","variant","_stage","serializePasses","../../../renderer/murmurhash2_gc","./effect-base","./utils","80","Effect","_techniques","createNative","81","./CCMaterial","./material-variant","82","_pool","MaterialPool","_Pool","_len","_key","exampleMat","renderComponent","MaterialVariant","_owner","instance","serializeDefines","serializeTechniques","mat","maxSize","_clean","materialPool","../../utils/pool","83","_CCMaterial","_effectVariant","_materialPool","_dec","_class","ccclass","_decorator","_Material","materialName","_material","./effect-variant","./material-pool","84","hashArray","names","serializePass","excludeProperties","_programName","_cullMode","_blend","_blendEq","_blendAlphaEq","_blendSrc","_blendDst","_blendSrcAlpha","_blendDstAlpha","_blendColor","_depthTest","_depthWrite","_depthFunc","_stencilTest","_stencilFuncFront","_stencilRefFront","_stencilMaskFront","_stencilFailOpFront","_stencilZFailOpFront","_stencilZPassOpFront","_stencilWriteMaskFront","_stencilFuncBack","_stencilRefBack","_stencilMaskBack","_stencilFailOpBack","_stencilZFailOpBack","_stencilZPassOpBack","_stencilWriteMaskBack","serializeUniforms","_propertyNames","_defineNames","hashData","param","PARAM_TEXTURE_CUBE","85","TOP","MID","BOT","LEFT","CENTER","HORIZONTAL","VERTICAL","AlignMode","ONCE","ON_WINDOW_RESIZE","ALWAYS","getReadonlyNodeSize","computeInverseTransForTarget","widgetNode","out_inverseTranslate","out_inverseScale","translateX","translateY","tInverseTranslate","tInverseScale","ONE","align","widget","hasTarget","inverseTranslate","inverseScale","targetSize","targetAnchor","isRoot","anchor","_alignFlags","localLeft","localRight","targetWidth","_isAbsLeft","_left","_isAbsRight","isStretchWidth","isAlignHorizontalCenter","localHorizontalCenter","_isAbsHorizontalCenter","_horizontalCenter","targetCenter","isAlignLeft","localTop","localBottom","targetHeight","bottom","_isAbsBottom","_bottom","_isAbsTop","_top","isStretchHeight","isAlignVerticalCenter","localVerticalCenter","_isAbsVerticalCenter","_verticalCenter","targetMiddle","isAlignBottom","alignMode","widgetManager","activeWidgets","animationState","refreshScene","AnimUtils","EditMode","nowPreviewing","_component","_animation","isAligning","_activeWidgetsIterator","editingNode","adjustWidgetToAllowMovingInEditor","adjustWidgetToAllowResizingInEditor","updateAlignment","Widget","_AlignFlags","thisOnResized","onResized","refreshWidgetOnResized","../CCNode","86","_geomUtils","RendererCamera","_mat4_temp_1","_mat4_temp_2","_v3_temp_1","_v3_temp_2","_v3_temp_3","_cameras","updateMainCamera","minDepth","_depth","_debugCamera","repositionDebugCamera","getNode","ClearFlags","COLOR","DEPTH","STENCIL","StageFlags","OPAQUE","TRANSPARENT","Component","setStages","dirty","_camera","editor","_clearFlags","_backgroundColor","_zoomRatio","_targetTexture","_fov","_orthoSize","_nearClip","_farClip","_ortho","_renderStages","_alignWithScreen","zoomRatio","tooltip","fov","orthoSize","nearClip","_updateClippingpPlanes","farClip","ortho","_updateProjection","_updateRect","cullingMask","_updateCameraMask","clearFlags","setClearFlags","_updateBackgroundColor","setPriority","targetTexture","_updateTargetTexture","renderStages","_updateStages","alignWithScreen","_is3D","cameras","containsNode","_findRendererCamera","_setupDebugCamera","setFov","setNear","setFar","setColor","setNode","addCamera","setFrameBuffer","setType","flags","stages","_init","beforeDraw","__preload","onEnable","onDisable","removeCamera","getScreenToWorldMatrix2D","getWorldToScreenMatrix2D","_mat4_temp_1m","m12","m13","center","screenPosition","screenToWorld","getWorldToScreenPoint","worldPosition","worldToScreen","getRay","screenPos","geomUtils","Ray","fromPoints","rootNode","renderCamera","_onAlignWithScreen","RAD","atan","setOrthoHeight","getNodeToCameraTransform","getWorldToCameraMatrix","getCameraToWorldPoint","getWorldToCameraPoint","getCameraToWorldMatrix","../../renderer/scene/camera","../CCGame","../geom-utils","../renderer/index","../renderer/render-flow","../utils/affine-transform","../value-types","87","jsArray","IsStartCalled","IsOnEnableCalled","IsEditorOnEnableCalled","callerFunctor","callOnEnableInTryCatch","callOnDisableInTryCatch","sortedIndex","order","_executionOrder","testOrder","testId","stableRemoveInactive","flagToClear","removeAt","LifeCycleInvoker","__ctor__","invokeFunc","Iterator","_zero","_neg","_pos","_invoke","compareOrder","OneOffInvoker","cancelInactive","compsNeg","compsPos","ReusableInvoker","enableInEditor","engine","createInvokeImpl","indiePath","useDt","ensureFlag","fastPath","Function","invokeStart","invokeUpdate","invokeLateUpdate","startInvoker","updateInvoker","lateUpdateInvoker","_deferredComps","_updating","invokeOnEnable","compScheduler","deactivatedDuringOnEnable","_onEnabled","_scheduleImmediate","_onDisabled","lateUpdate","enableComp","invoker","disableComp","_deferredSchedule","_startForNewComps","./platform/CCClass","./utils/misc","88","equalClips","clip1","clip2","PLAY","STOP","PAUSE","RESUME","LASTFRAME","FINISHED","Animation","_animator","_nameToState","_didInit","_currentClip","_defaultClip","defaultClip","contain","currentClip","_writableClips","_clips","playOnLoad","isPlaying","getAnimationState","onDestroy","getClips","playAdditive","enabledInHierarchy","setCurrentTime","hasAnimationState","addClip","newName","contains","oldState","newState","removeClip","filter","_EventTargetOn","states","_EventTargetOff","_createStates","defaultClipState","../../animation/animation-animator","../../animation/animation-clip","./CCComponent","89","BlockEvents","BlockInputEvents","menu","inspector","help","90","GraySpriteState","Transition","State","NORMAL","HOVER","PRESSED","DISABLED","Button","_pressed","_hovered","_fromColor","_toColor","_time","_transitionFinished","_fromScale","_toScale","_originalScale","_graySpriteMaterial","_spriteMaterial","_sprite","interactable","notify","_updateState","_resetState","animatable","_resizeToTarget","_resizeNodeToTargetNode","enableAutoGrayEffect","_updateDisabledState","transition","_updateTransition","normalColor","displayName","_getButtonState","_getTarget","pressedColor","hoverColor","disabledColor","zoomScale","normalSprite","pressedSprite","hoverSprite","disabledSprite","_applyTarget","_unregisterTargetEvent","clickEvents","EventHandler","originalScale","_setTargetColor","_registerNodeEvent","_unregisterNodeEvent","_onTargetSpriteFrameChanged","_setCurrentStateSprite","_onTargetColorChanged","_setCurrentStateColor","_onTargetScaleChanged","cloneColor","_getStateColor","_getStateSprite","_onTouchBegan","_onTouchMove","_onTouchEnded","_onTouchCancel","_onMouseMoveIn","_onMouseMoveOut","_registerTargetEvent","_getTargetSprite","sprite","Sprite","_applyTransition","emitEvents","_updateColorTransitionImmediately","_updateColorTransition","_updateSpriteTransition","_updateScaleTransition","_zoomUp","_zoomBack","oldTransition","useGrayMaterial","_switchGrayMaterial","../utils/gray-sprite-state","91","resetWidgetComponent","addComponent","isAlignTop","isAlignRight","Canvas","resetInEditor","_designResolution","designResolution","applySettings","_fitWidth","_fitHeight","fitHeight","fitWidth","_fitDesignResolution","cameraNode","setSiblingIndex","ResolutionPolicy","policy","SHOW_ALL","FIXED_WIDTH","FIXED_HEIGHT","NO_BORDER","designRes","setDesignResolutionSize","../camera/CCCamera","92","IsOnLoadCalled","getClassName","trimLeft","__scriptAsset","_this$node","_this$node2","_this$node2$_parent","_isOnLoadCalled","onFocusInEditor","onLostFocusInEditor","typeOrClassName","getComponents","getComponentInChildren","_getLocalBounds","unscheduleAllCallbacks","eventTargets","destroyComp","_removeComponent","cloned","instantiate","_clone","scheduleOnce","callback_fn","_requireComponent","cls","reqComp","requireComponent","executionOrder","_disallowMultiple","willExecuteInEditMode","__scriptUuid","93","_componentId","_componentName","_genCompIdIfNeeded","_compId2Name","_compName2Id","customEventData","compType","getClassByName","compId","94","LabelFrame","BlendFunc","deleteFromDynamicAtlas","HorizontalAlign","TextAlignment","VerticalAlign","VerticalTextAlignment","Overflow","CLAMP","SHRINK","RESIZE_HEIGHT","CacheMode","BITMAP","CHAR","BOLD_FLAG","ITALIC_FLAG","UNDERLINE_FLAG","Label","_actualFontSize","_assemblerData","_frame","_ttfTexture","_letterTexture","_updateMaterial","_updateMaterialCanvas","_updateMaterialWebgl","_string","string","setVertsDirty","_checkStringEmpty","multiline","horizontalAlign","verticalAlign","actualFontSize","_fontSize","_lineHeight","lineHeight","overflow","_enableWrapText","enableWrapText","_N$file","_isSystemFontUsed","_forceUpdateRenderData","useSystemFont","markForValidate","_bmFontOriginalSize","_spacingX","spacingX","_batchAsBitmap","cacheMode","_materials","_shareAtlas","setMaterial","_getDefaultMaterial","_styleFlags","enableBold","enableItalic","enableUnderline","_underlineHeight","underlineHeight","autoSwitchMaterial","EnableType","GLOBAL","allowDynamicAtlas","enableRetina","clearCharCache","clearAllCache","_nodeSizeChanged","_nodeColorChanged","_assembler","_resetAssemblerData","_resetFrame","_updateColor","_srcBlendFactor","BlendFactor","SRC_ALPHA","FLAG_OPACITY","_validateRender","disableRender","_resetAssembler","markForRender","_applyFontTexture","_onBMFontTextureLoaded","updateRenderData","_onBlendChanged","_nativeTTF","_getAssemblerData","getMaterial","_updateTTFMaterial","isMultiMaterial","_texIdDirty","isMulti","_forceUseCanvas","_useNativeTTF","ENABLE_NATIVE_TTF_RENDERER","_enableBold","_enableItalics","_enableUnderline","../assets/material/CCMaterial","../platform/CCMacro","../renderer/utils/label/label-frame","../renderer/utils/utils","../utils/blend-func","./CCRenderComponent","95","LabelOutline","_updateRenderData","label","96","LabelShadow","_blur","blur","97","NodeEvent","Type","GRID","ResizeMode","CONTAINER","CHILDREN","AxisDirection","VerticalDirection","BOTTOM_TO_TOP","TOP_TO_BOTTOM","HorizontalDirection","LEFT_TO_RIGHT","RIGHT_TO_LEFT","Layout","_layoutSize","_layoutDirty","_resize","_N$layoutType","reLayouted","_doLayoutDirty","resizeMode","cellSize","startAxis","paddingLeft","paddingRight","paddingTop","paddingBottom","spacingY","verticalDirection","horizontalDirection","affectedByScale","_addEventListeners","_removeEventListeners","_doScaleDirty","updateLayout","_resized","_childAdded","_childRemoved","_addChildrenEventListeners","_removeChildrenEventListeners","_doLayoutHorizontally","baseWidth","rowBreak","fnPositionY","applyChildren","layoutAnchor","sign","paddingX","leftBoundaryOfLayout","nextX","rowMaxHeight","tempMaxHeight","secondMaxHeight","containerResizeBoundary","maxHeightChildAnchorY","activeChildCount","newChildWidth","childScaleX","_getUsedScaleValue","childScaleY","childBoundingBoxWidth","childBoundingBoxHeight","rightBoundaryOfChild","rowBreakBoundary","leftToRightRowBreak","rightToLeftRowBreak","finalPositionY","signX","tempFinalPositionY","topMarign","_getVerticalBaseHeight","newHeight","_doLayoutVertically","baseHeight","columnBreak","fnPositionX","paddingY","bottomBoundaryOfLayout","nextY","columnMaxWidth","tempMaxWidth","secondMaxWidth","column","maxWidthChildAnchorX","newChildHeight","topBoundaryOfChild","columnBreakBoundary","bottomToTopColumnBreak","topToBottomColumnBreak","finalPositionX","tempFinalPositionX","rightMarign","_doLayoutBasic","allChildrenBoundingBox","leftBottomSpace","rightTopSpace","xMax","yMax","newSize","toFixed","newAnchorX","newAnchorY","_doLayoutGridAxisHorizontal","layoutSize","topOffset","boundary","_doLayoutGridAxisVertical","leftOffset","_doLayoutGrid","_getHorizontalBaseWidth","_doLayout","activeChild","98","_mat","_vec","_materialVariant","Graphics","_vec2_temp","_circlepoints","_calculateCircle","radius","segements","anglePerStep","MaskType","RECT","ELLIPSE","IMAGE_STENCIL","SEGEMENTS_MIN","SEGEMENTS_MAX","_graphics","_enableMaterial","_exitMaterial","_clearMaterial","_spriteFrame","_type","alphaThreshold","_updateGraphics","_activateMaterial","lastSprite","slide","inverted","Boolean","_segments","FLAG_POST_RENDER","_removeGraphics","_createGraphics","STENCIL_DISABLE","Assembler","lineWidth","strokeColor","graphics","lineTo","stroke","fill","rx","ry","px","py","enable","FLAG_RENDER","FLAG_UPDATE_RENDER_DATA","../assets/material/material-variant","../graphics/graphics","../utils/misc","../value-types/mat4","../value-types/vec2","99","MotionStreak","_lastWPos","preview","_fadeTime","fadeTime","_minSeg","minSeg","_stroke","_checkSwitchMaterial","_fastMode","fastMode","checkAndSwitchMaterial","_updateMultiTexId","textureImpl","updateTexId","_renderData","../../core/utils/blend-func","../components/CCRenderComponent","100","_temp_color","ENABLE","DISABLE","materials","_vertsDirty","_texId","assembler","registerValidate","instantiated","getMaterials","updateColor","srcBlendFactor","_checkBacth","_flush","_dummyNode","multi","spTexture","nSpTexture","same","isChanged","texId","getIndex","../renderer/assembler","101","HtmlTextParser","_htmlTextParser","RichTextChildName","RichTextChildImageName","debounce","immediate","later","callNow","outline","richtext","labelNode","DontSave","labelComponent","RichText","_textArray","_labelSegments","_labelSegmentsCache","_linesWidth","_updateRichTextStatus","_updateRichText","_onTTFLoaded","maxWidth","imageAtlas","handleTouchEvent","customMaterial","spriteComponent","_labelComponent","_labelComponent2","_labelComponent3","_labelComponent4","_activateChildren","_onColorChanged","parentColor","childNode","_updateLabelSegmentTextAttributes","_applyTextAttribute","_createFontLabel","_measureText","styleIndex","_styleIndex","labelSize","labelSegment","clickHandler","_clickHandler","clickParam","_clickParam","_containsTouchLocation","myRect","_lineOffsetX","_lineCount","_labelWidth","_labelHeight","_addLabelSegment","stringToken","_updateRichTextWithMaxWidth","labelString","labelWidth","fragmentWidth","checkStartIndex","checkEndIndex","_getFirstWordLen","checkString","checkStringWidth","remainingString","_updateLineInfo","fragments","fragmentText","splitString","_isLastComponentCR","_needsUpdateTextLayout","newTextArray","oldItem","newItem","oldStyle","newStyle","italic","isImage","imageAlign","imageHeight","imageWidth","imageOffset","_addRichTextImageElement","richTextElement","spriteFrameName","spriteNode","_imageOffset","SLICED","sizeMode","SizeMode","CUSTOM","spriteRect","scaleFactor","spriteWidth","spriteHeight","expectWidth","expectHeight","click","lastEmptyLine","newline","multilineTexts","BASELINE_RATIO","_updateRichTextPosition","startIndex","textLen","character","charAt","isUnicodeCJK","isUnicodeSpace","nextTokenX","nextLineIndex","totalLineCount","lineCount","lineOffsetX","lineHeightSet","lineHeightReal","isInteger","_offsetY","_convertLiteralColorValue","colorValue","fromHEX","textStyle","isAsset","bold","enableItalics","underline","labelOutlineComponent","../utils/html-text-parser","102","GETTINGSHORTERFACTOR","Direction","Scrollbar","_scrollView","_touching","_autoHideRemainingTime","_onScroll","enableAutoHide","autoHideTime","setTargetScrollView","scrollView","_convertToScrollViewSpace","scrollViewNode","worldSpacePos","scrollViewSpacePos","_setOpacity","outOfBoundary","scrollViewSize","handleNodeSize","_conditionalDisableScrollBar","contentMeasure","scrollViewMeasure","outOfBoundaryValue","contentPosition","handleNodeMeasure","_calculateLength","_calculatePosition","_updateLength","_updateHanlderPosition","_fixupHandlerPosition","barSize","barAnchor","handleSize","handleParent","leftBottomWorldPosition","fixupPosition","denominatorValue","lengthRation","actualLenth","positionRatio","clamp01","handleNode","_processAutoHide","deltaTime","103","NUMBER_OF_GATHERED_TOUCHES_FOR_MOVE_SPEED","OUT_OF_BOUNDARY_BREAKING_FACTOR","MOVEMENT_FACTOR","_tempPoint","_tempPrevPoint","quintEaseOut","getTimeInMilliseconds","currentTime","getMilliseconds","SCROLL_TO_TOP","SCROLL_TO_BOTTOM","SCROLL_TO_LEFT","SCROLL_TO_RIGHT","SCROLLING","BOUNCE_TOP","BOUNCE_BOTTOM","BOUNCE_LEFT","BOUNCE_RIGHT","SCROLL_ENDED","TOUCH_UP","AUTOSCROLL_ENDED_WITH_THRESHOLD","SCROLL_BEGAN","eventMap","scroll-to-top","scroll-to-bottom","scroll-to-left","scroll-to-right","scrolling","bounce-bottom","bounce-left","bounce-right","bounce-top","scroll-ended","touch-up","scroll-ended-with-threshold","scroll-began","ScrollView","_topBoundary","_bottomBoundary","_leftBoundary","_rightBoundary","_touchMoveDisplacements","_touchMoveTimeDeltas","_touchMovePreviousTimestamp","_touchMoved","_autoScrolling","_autoScrollAttenuate","_autoScrollStartPosition","_autoScrollTargetDelta","_autoScrollTotalTime","_autoScrollAccumulatedTime","_autoScrollCurrentlyOutOfBoundary","_autoScrollBraking","_autoScrollBrakingStartPosition","_outOfBoundaryAmount","_outOfBoundaryAmountDirty","_stopMouseWheel","_mouseWheelEventElapsedTime","_isScrollEndedWithThresholdEventFired","_scrollEventEmitMask","_isBouncing","_scrolling","_calculateBoundary","horizontal","vertical","inertia","brake","elastic","bounceDuration","horizontalScrollBar","_updateScrollBar","verticalScrollBar","scrollEvents","cancelInnerEvents","_view","scrollToBottom","timeInSecond","attenuated","moveDelta","_calculateMovePercentDelta","applyToHorizontal","applyToVertical","_startAutoScroll","_moveContent","scrollToTop","scrollToLeft","scrollToRight","scrollToTopLeft","scrollToTopRight","scrollToBottomLeft","scrollToBottomRight","scrollToOffset","maxScrollOffset","getMaxScrollOffset","scrollTo","getScrollOffset","topDelta","_getContentTopBoundary","leftDeta","_getContentLeftBoundary","viewSize","horizontalMaximizeOffset","verticalMaximizeOffset","scrollToPercentHorizontal","scrollToPercentVertical","stopAutoScroll","setContentPosition","fuzzyEquals","getContentPosition","isScrolling","isAutoScrolling","_registerEvent","_onTouchMoved","_onTouchCancelled","_onMouseWheel","_unregisterEvent","captureListeners","hasNestedViewGroup","deltaMove","wheelPrecision","os","OS_WINDOWS","browserType","BROWSER_TYPE_FIREFOX","getScrollY","_processDeltaMove","_handlePressLogic","_checkMouseWheel","_stopPropagationIfTargetIsMe","currentOutOfBoundary","_getHowMuchOutOfBoundary","maxElapsedTime","_processInertiaScroll","_dispatchEvent","_onScrollBarTouchEnded","scrollSize","bottomDeta","_getContentBottomBoundary","totalScrollDelta","_moveContentToTopLeft","_updateScrollBarState","_adjustContentOutOfBoundary","layout","CAPTURING_PHASE","ViewGroup","AT_TARGET","_handleMoveLogic","getStartLocation","cancelEvent","EventTouch","getTouches","simulate","_handleReleaseLogic","_scrollChildren","_gatherTouchMove","_getLocalAxisAlignDelta","getPreviousLocation","_clampDelta","realMove","vertical_scrollEventType","horizontal_scrollEventType","icBottomPos","icTopPos","icRightPos","icLeftPos","_onScrollBarTouchBegan","shift","timeStamp","_startBounceBackIfNeeded","bounceBackAmount","bounceBackTime","bounceBackStarted","touchMoveVelocity","_calculateTouchMoveVelocity","_startInertiaScroll","_isOutOfBoundary","_isNecessaryAutoScrollBrake","getScrollEndedEventTiming","_processAutoScrolling","isAutoScrollBrake","brakingFactor","percentage","newPosition","reachedEnd","fireEvent","brakeOffsetPosition","inertiaTotalMovement","_startAttenuatingAutoScroll","_calculateAttenuatedFactor","initialVelocity","_calculateAutoScrollTimeByInitalSpeed","targetDelta","scrollviewSize","totalMoveWidth","totalMoveHeight","attenuatedFactorX","attenuatedFactorY","originalMoveLength","factor","initalSpeed","adjustedDeltaMove","_flattenVectorByDirection","totalTime","reduce","totalMovement","canStartBounceBack","adjustedMove","contentPos","_getContentRightBoundary","addition","outOfBoundaryAmount","_hideScrollbar","./CCViewGroup","104","Horizontal","Vertical","Slider","_touchHandle","_dragging","_updateHandlePosition","slideEvents","_onHandleDragStart","_handleSliderLogic","_updateProgress","_emitSlideEvent","localTouchPos","handlelocalPos","105","SpriteType","SIMPLE","TILED","FILLED","MESH","FillType","RADIAL","TRIMMED","RAW","GRAY","_sizeMode","_fillType","_fillCenter","_fillStart","_fillRange","_isTrimmedMode","_atlas","_applySpriteFrame","fillType","fillCenter","fillStart","fillRange","trim","_applySpriteSize","setVisible","setState","getState","oldDefine","_applyAtlas","oldFrame","oldTexture","frameValid","newTexture","106","Toggle","_N$isChecked","isChecked","toggleGroup","_toggleContainer","allowSwitchOff","_updateCheckMark","updateToggles","_triggerEventInScript_isChecked","_emitToggleEvents","checkMark","checkEvents","_triggerEventInScript_check","_registerToggleEvent","addToggle","_unregisterToggleEvent","removeToggle","_hideCheckMark","toggle","uncheck","ToggleContainer","./CCButton","./CCToggleGroup","107","toggleItems","_allowOnlyOneToggleChecked","_makeAtLeastOneToggleChecked","108","ToggleGroup","_toggleItems","showed","109","110","WidgetManager","AlignFlags","TOP_BOT","LEFT_RIGHT","_setAlign","horizontalCenter","verticalCenter","isAbsoluteHorizontalCenter","isAbsoluteVerticalCenter","isAbsoluteTop","isAbsoluteBottom","isAbsoluteLeft","isAbsoluteRight","_wasAlignOnce","_originalWidth","_originalHeight","_validateTargetInDEV","isAlign","isHorizontal","../base-ui/CCWidgetManager","111","SubContextView","WXSubContextView","SwanSubContextView","./CCAnimation","./CCAudioSource","./CCBlockInputEvents","./CCCanvas","./CCComponentEventHandler","./CCLabel","./CCLabelOutline","./CCLabelShadow","./CCLayout","./CCMask","./CCMotionStreak","./CCPageView","./CCPageViewIndicator","./CCProgressBar","./CCRichText","./CCSafeArea","./CCScrollBar","./CCScrollView","./CCSlider","./CCSprite","./CCToggle","./CCToggleContainer","./CCWidget","./SubContextView","./editbox/CCEditBox","./missing-script","112","MissingScript","compiled","_$erialized","reportMissingClass","113","EventMouse","eventType","_eventType","_button","_prevX","_prevY","_scrollX","_scrollY","setScrollData","scrollX","scrollY","getScrollX","setLocation","getLocationInView","_designResolutionSize","_setPrevCursor","getDelta","getDeltaX","getDeltaY","setButton","button","getButton","getLocationX","getLocationY","DOWN","MOVE","SCROLL","BUTTON_LEFT","BUTTON_RIGHT","BUTTON_MIDDLE","BUTTON_4","BUTTON_5","BUTTON_6","BUTTON_7","BUTTON_8","touchArr","TOUCH","_eventCode","_touches","currentTouch","getEventCode","_setEventCode","eventCode","_setTouches","touches","setTouchInfo","getID","MAX_TOUCHES","BEGAN","MOVED","ENDED","CANCELED","EventAcceleration","acc","ACCELERATION","EventKeyboard","keyCode","isPressed","KEYBOARD","../event/event","114","listenerID","_onEvent","_listenerID","_registered","_fixedPriority","_node","_isEnabled","_setPaused","_setRegistered","registered","_isRegistered","_getType","_getListenerID","_setFixedPriority","fixedPriority","_getFixedPriority","_setSceneGraphPriority","_getSceneGraphPriority","checkAvailable","isEnabled","UNKNOWN","TOUCH_ALL_AT_ONCE","ListenerID","Custom","listenerId","_onCustomEvent","Mouse","TouchOneByOne","_claimedTouches","setSwallowTouches","needSwallow","isSwallowTouches","TouchAllAtOnce","onTouchesBegan","onTouchesMoved","onTouchesEnded","onTouchesCancelled","Acceleration","_onAccelerationEvent","Keyboard","onKeyPressed","onKeyReleased","argObj","listenerType","eventName","115","_EventListenerVector","_fixedListeners","_sceneGraphListeners","gt0Index","empty","clearSceneGraphListeners","clearFixedListeners","getFixedPriorityListeners","getSceneGraphPriorityListeners","__getListenerID","DIRTY_NONE","DIRTY_FIXED_PRIORITY","DIRTY_SCENE_GRAPH_PRIORITY","DIRTY_ALL","_listenersMap","_priorityDirtyFlagMap","_nodeListenersMap","_toAddedListeners","_toRemovedListeners","_dirtyListeners","_inDispatch","_currentTouch","_currentTouchListener","_internalCustomListenerIDs","selListeners","selListener","childrenCount","_BaseNode","_clearCurTouch","_addListener","_forceAddEventListener","_setDirty","_associateNodeAndEventListener","_getListeners","_updateDirtyFlagForSceneGraph","locDirtyListeners","selKey","_removeAllListenersInVector","listenerVector","_dissociateNodeAndEventListener","_removeListenersForListenerID","fixedPriorityListeners","sceneGraphPriorityListeners","locToAddedListeners","_sortEventListeners","locFlagMap","_sortListenersOfFixedPriority","rootEntity","_sortListenersOfSceneGraphPriority","sceneGraphListener","_sortEventListenersOfSceneGraphPriorityDes","l1","node1","node2","ex","fixedListeners","_sortListenersOfFixedPriorityAsc","_onUpdateListeners","idx","toRemovedListeners","locListenersMap","locPriorityDirtyFlagMap","_cleanToRemovedListeners","_updateTouchListeners","locInDispatch","_onTouchEventCallback","argsObj","selTouch","isClaimed","removedIdx","getCode","ENABLE_MULTI_TOUCH","isStopped","needsMutableSet","_dispatchTouchEvent","oneByOneListeners","allAtOnceListeners","originalTouches","mutableTouches","oneByOneArgsObj","_dispatchEventToListeners","_onTouchesEventCallback","callbackParams","onEvent","eventOrArgs","shouldStopPropagation","locDirtyFlagMap","_sortNumberAsc","nodeOrPriority","addCustomListener","isFound","locListener","_removeListenerInVector","_removeListenerInCallback","listenersCopy","removeCustomListeners","customEventName","removeAllListeners","locListeners","locInternalCustomEventIDs","getType","_onListenerCallback","dispatchCustomEvent","optionalUserData","ev","EventCustom","setUserData","./CCEventListener","116","Touch","_lastModified","_point","_prevPoint","_startPoint","getPreviousLocationInView","getStartLocationInView","_startPointCaptured","_convertPointWithScale","_setPoint","_setPrevPoint","117","./CCEvent","./CCEventManager","./CCTouch","118","CallbacksInvoker","EventListeners","_callbackTable","rootInvoker","isInvoking","callbackInfos","containCanceled","purgeCanceled","../platform/callbacks-invoker","119","__on","__off","120","unuse","NO_TYPE","reuse","stopPropagationImmediate","getCurrentTarget","BUBBLING_PHASE","detail","getUserData","getEventName","_eventPool","121","./event","./event-listeners","./event-target","./system-event","122","inputManger","KEY_DOWN","KEY_UP","DEVICEMOTION","keyboardListener","accelerationListener","SystemEvent","setAccelerometerEnabled","isEnable","DeviceMotionEvent","requestPermission","setAccelerometerInterval","systemEvent","hasKeyDownEventListener","hasKeyUpEventListener","../event-manager","../platform/CCInputManager","123","LineCap","LineJoin","_impl","_Impl","_lineWidth","_strokeColor","BLACK","_lineJoin","MITER","_lineCap","BUTT","_fillColor","_miterLimit","lineJoin","lineCap","fillColor","miterLimit","glExtension","bezierCurveTo","c2x","c2y","quadraticCurveTo","cx","cy","arc","endAngle","counterclockwise","ellipse","circle","roundRect","fillRect","clean","Helper","124","PointFlags","KAPPA90","da","hda","kappa","dx","dy","tanx","tany","ptanx","ptany","ndivs","tesselateBezier","y3","x4","y4","x12","y12","x23","y23","x34","y34","x123","y123","x234","y234","x1234","y1234","d3","_tessTol","_addPoint","PT_BEVEL","125","./graphics","126","ROUND","SQUARE","BEVEL","PT_CORNER","PT_LEFT","PT_INNERBEVEL","127","./3d","./CCPrivateNode","./CCScene","./assets","./base-ui/CCWidgetManager","./camera/CCCamera","./collider","./collider/CCIntersection","./components","./geom-utils","./mesh","./physics","./platform","./sp","128","CompScheduler","IsPreloadStarted","IsOnLoadStarted","Deactivating","callPreloadInTryCatch","callOnLoadInTryCatch","callOnDestroyInTryCatch","callOnFocusInTryCatch","callOnLostFocusInTryCatch","UnsortedInvoker","invokePreload","invokeOnLoad","activateTasksPool","getActivateTask","_componentCorrupted","_onLoadInEditor","focused","Selection","curActivate","_Scene","AssetsWatcher","_activatingStack","_activateNodeRecursively","preloadInvoker","onLoadInvoker","onEnableInvoker","originCount","activateComp","_deactivateNodeRecursively","lastTask","deactivatedOnLoading","resetComp","129","_isPlainEmptyObj_DEV","isPlainEmptyObj_DEV","_cloneable_DEV","cloneable_DEV","Attr","DELIMETER","BUILTIN_ENTRIES","INVALID_STATICS_DEV","pushUnique","deferredInitializer","declareProperties","$super","appendProp","__props__","defineProp","es6","defaultValue","setClassAttr","parseAttributes","defineGetSet","getter","setter","setterUndefined","getDefault","defaultVal","mixinWithInherited","dest","getPropertyDescriptor","doDefine","baseClass","shouldAddProtoCtor","__es6__","__ES6__","ctorToUse","ctors","fireClass","_getAllCtors","_createCtor","CCClass","_isCCClass","getClassAttrs","__initProps__","compileProps","setClassName","_RF","peek","_setClassId","normalizeClassName_DEV","DefaultName","getNewValueTypeCodeJit","clsName","propVal","escapeForJS","getInitPropsJit","attrs","F","attrKey","statement","IDENTIFIER_RE","expression","ValueType","initProps","getInitProps","simpleEnd","valueTypeEnd","simples","valueTypes","advanceds","totalLength","actualClass","superCallBounded","boundSuperCalls","ctorName","ctorLen","useTryCatch","SNIPPET","_validateCtor_DEV","originCtor","getCtors","__ctors__","baseOrMixins","baseOrMixin","baseCtors","SuperCallReg","xyz","SuperCallRegStrict","hasSuperCall","superFunc","preprocessAttrs","__values__","_sealed","some","staticPropName","validateMethodWithProps","_registerEditorProps","_fastDefine","serializableFields","attr","getInheritanceChain","klass","chain","getSuper","PrimitiveTypes","onAfterProps_ET","attributes","usedInGetter","ERR_Type","propNamePrefix","initAttrs","primitiveType","_short","getTypeChecker_ET","ScriptUuid","ScriptAsset","isEnum","getList","getObjTypeChecker_ET","parseSimpleAttr","attrName","expectType","startsWithUS","fastDefine","getNewValueTypeCode","./CCEnum","./attribute","./js","./preprocess-class","./requiring-frame","130","Preprocess","CACHE_KEY","fNOP","getSubDict","checkCtorArgument","decorate","_checkNormalArgument","validator_DEV","decoratorName","checkCompArgument","_argumentChecker","checkStringArgument","checkNumberArgument","getClassCache","getDefaultFromInitializer","initializer","extractActualDefaultValues","dummyObj","genProperty","fullOptions","isGetset","getFullFormOfProperty","existsProperty","errorProps","isDefaultValueSpecified","actualDefaultValues","decoratedProto","propNames","property","ctorProtoOrOptions","normalized","ctorProto","ccclassProto","createEditorDecorator","argCheckFunc","editorPropName","staticValue","decoratedValue","createDummyDecorator","executeInEditMode","disallowMultiple","playOnFocus","icon","./CCClass","131","reverseKey","enumType","enumDef","__enums__","enums","_TestEnum","132","PORTRAIT","LANDSCAPE_LEFT","PORTRAIT_UPSIDE_DOWN","LANDSCAPE_RIGHT","_didAccelerateFun","timestamp","_accelEnabled","_registerAccelerometerEvent","_accelCurTime","_unregisterAccelerometerEvent","_accelInterval","_registerKeyboardEvent","preventDefault","_acceleration","_accelDeviceEvent","DeviceOrientationEvent","BROWSER_TYPE_MOBILE_QQ","_deviceEventType","ua","BROWSER_TYPE_UC","_minus","didAccelerate","mAcceleration","eventAcceleration","_accelMinus","tmpX","orientation","OS_ANDROID","./CCInputManager","133","_vec2","_mousePressed","_isRegisterEvent","_preTouchPoint","_prevMousePoint","_preTouchPool","_preTouchPoolPointer","_maxTouches","_touchesIntegerDict","_indexBitsUsed","_touchesCache","_touchCount","_canvasBoundingRect","adjustedLeft","adjustedTop","_getUnUsedIndex","TOUCH_TIMEOUT","unused","locTouches","locTouchesIntDict","locTouchesCache","ccTouch","touchID","_glView","_updateCanvasBoundingRect","canvasBoundingRect","docElem","handleTouchesBegin","handleTouches","unusedIndex","_convertTouchesWithScale","handleTouchesMove","handleTouchesEnd","getSetOfTouchesEndOrCancel","handleTouchesCancel","getGlobalTouchCount","getGlobalTouches","getPreTouch","preTouch","locPreTouchPool","setPreTouch","getTouchByXY","tx","ty","locPreTouch","convertToLocationInView","getMouseEvent","locPreMouse","_convertMouseToLocationInView","getPointByEvent","BROWSER_TYPE_QQ","BROWSER_TYPE_SAFARI","pageX","pageY","scrollLeft","clientX","clientY","getTouchesByEvent","locView","touch_event","preLocation","changedTouches","identifier","selfPointer","prohibition","isMobile","supportMouse","supportTouches","_mouseEventsOnElement","focus","wheelDelta","msPointerEnabled","_pointerEventsMap","MSPointerDown","MSPointerMove","MSPointerUp","MSPointerCancel","_touchEventsMap","touchstart","touchesToHandle","touchmove","touchend","touchcancel","registerTouchEvent","_eventName","./CCMacro","./CCSys","134","DEG","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","ORIENTATION_PORTRAIT","ORIENTATION_LANDSCAPE","ORIENTATION_AUTO","DENSITYDPI_DEVICE","DENSITYDPI_HIGH","DENSITYDPI_MEDIUM","DENSITYDPI_LOW","FIX_ARTIFACTS_BY_STRECHING_TEXEL_TMX","DIRECTOR_STATS_POSITION","BATCH_VERTEX_COUNT","ENABLE_TILEDMAP_CULLING","ENABLE_CULLING","SHOW_MESH_WIREFRAME","SHOW_MESH_NORMAL","KEY","none","back","backspace","tab","enter","ctrl","alt","capslock","escape","space","pageup","pagedown","home","down","select","Delete","0","f","num0","num1","num2","num3","num4","num5","num6","num7","num8","num9","*","+","-","numdel","/","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","numlock","scrolllock",";","semicolon","equal","=",",","comma","dash",".","forwardslash","grave","[","openbracket","backslash","]","closebracket","quote","dpadLeft","dpadRight","dpadUp","dpadDown","dpadCenter","ImageFormat","JPG","PNG","TIFF","WEBP","PVR","ETC","S3TC","ATITC","TGA","RAWDATA","BOTTOM","135","Destroyed","RealDestroyed","ToDestroy","EditorOnly","Dirty","DontDestroy","LockedInEditor","IsRotationLocked","IsScaleLocked","IsAnchorLocked","IsSizeLocked","IsPositionLocked","PersistentMask","objectsToDestroy","deferredDestroy","deleteCount","deferredDestroyTimer","compileDestruct","shouldSkipId","idToSkip","propsToReset","_destruct","__destruct__","strictMode","136","SAXParser","DOMParser","_isSupportDOMParser","_parser","xmlTxt","_parseXML","textxml","xmlDoc","parseFromString","ActiveXObject","loadXML","PlistParser","plist","childNodes","nodeType","_parseNode","_parseDict","_parseArray","firstChild","nodeValue","saxParser","137","screen","_supportsFullScreen","_onfullscreenchange","_onfullscreenerror","_preOnFullScreenChange","_preOnFullScreenError","_preOnTouch","_touchEvent","_fn","_fnMap","valL","requestFullscreen","fullScreen","fullscreenElement","webkitFullscreenElement","mozFullScreenElement","requestFullScreen","onFullScreenChange","onFullScreenError","toLowerCase","OS_IOS","isBrowser","webkitEnterFullscreen","fullscreenchange","fullscreenerror","requestPromise","exitFullScreen","webkitExitFullscreen","exitFullscreen","autoFullScreen","_ensureFullScreen","disableAutoFullScreen","touchTarget","touchEventName","fullScreenErrorEventName","onTouch","138","settingPlatform","_CCSettings","platform","isVivoGame","isOppoGame","isHuaweiGame","isJKWGame","isQttGame","isLinkSure","_global","global","initSys","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_TURKISH","LANGUAGE_UKRAINIAN","LANGUAGE_ROMANIAN","LANGUAGE_BULGARIAN","LANGUAGE_UNKNOWN","OS_MARMALADE","OS_LINUX","OS_BADA","OS_BLACKBERRY","OS_OSX","OS_WP8","OS_WINRT","OS_UNKNOWN","WIN32","LINUX","MACOS","ANDROID","IPHONE","IPAD","BLACKBERRY","NACL","EMSCRIPTEN","TIZEN","WINRT","WP8","MOBILE_BROWSER","DESKTOP_BROWSER","EDITOR_PAGE","EDITOR_CORE","WECHAT_GAME","QQ_PLAY","FB_PLAYABLE_ADS","BAIDU_GAME","VIVO_GAME","OPPO_GAME","HUAWEI_GAME","XIAOMI_GAME","JKW_GAME","ALIPAY_GAME","WECHAT_GAME_SUB","BAIDU_GAME_SUB","QTT_GAME","BYTEDANCE_GAME","BYTEDANCE_GAME_SUB","LINKSURE","TAOBAO","BROWSER_TYPE_WECHAT","BROWSER_TYPE_ANDROID","BROWSER_TYPE_IE","BROWSER_TYPE_EDGE","BROWSER_TYPE_UCBS","BROWSER_TYPE_360","BROWSER_TYPE_BAIDU_APP","BROWSER_TYPE_BAIDU","BROWSER_TYPE_MAXTHON","BROWSER_TYPE_OPERA","BROWSER_TYPE_OUPENG","BROWSER_TYPE_MIUI","BROWSER_TYPE_CHROME","BROWSER_TYPE_LIEBAO","BROWSER_TYPE_QZONE","BROWSER_TYPE_SOUGOU","BROWSER_TYPE_HUAWEI","BROWSER_TYPE_UNKNOWN","getMaxJointMatrixSize","_maxJointMatrixSize","JOINT_MATRICES_SIZE","LEFT_UNIFORM_SIZE","maxUniforms","MAX_VERTEX_UNIFORM_VECTORS","getSafeAreaRect","visibleSize","getVisibleSize","__globalAdapter","adaptSys","languageCode","nav","doc","docEle","FbPlayableAd","currLanguage","language","browserLanguage","isAndroid","iOS","osVersion","osMainVersion","uaResult","maxTouchPoints","osName","appVersion","OS_UNIX","typeReg1","typeReg2","typeReg3","browserTypes","typeMap","micromessenger","trident","edge","360 aphone","mxbrowser","opr/","ubrowser","huaweibrowser","browserVersion","versionReg1","versionReg2","innerWidth","innerHeight","devicePixelRatio","windowPixelResolution","_checkWebGLRenderMode","_tmpCanvas1","create3DContext","opt_attribs","opt_contextType","localStorage","setItem","_supportWebp","toDataURL","_supportCanvas","_supportWebGL","WebGLRenderingContext","opengl","supportWebAudio","AudioContext","webkitAudioContext","mozAudioContext","ONLY_ONE","DELAY_CREATE_CTX","ONE_SOURCE","MULTI_CHANNEL","AUTOPLAY","canPlayType","ogg","wav","mp4","m4a","NetworkType","LAN","WWAN","getNetworkType","getBatteryLevel","garbageCollect","restartVM","isObjectValid","dump","openURL","139","__BrowserGetter","html","getElementsByTagName","availWidth","availHeight","meta","adaptationType","_scissorRect","View","_strategyer","ContainerStrategy","_strategy","ContentStrategy","_frameSize","_originalDesignResolutionSize","_visibleRect","_autoFullScreen","_maxPixelRatio","_retinaEnabled","_resizeCallback","_resizing","_resizeWithBrowserSize","_orientationChanging","_orientation","_isAdjustViewport","_antiAliasEnabled","_resolutionPolicy","_rpExactFit","EQUAL_TO_FRAME","EXACT_FIT","_rpShowAll","_rpNoBorder","_rpFixedHeight","_rpFixedWidth","_initFrameSize","_resizeEvent","forceOrEvent","prevFrameW","prevFrameH","prevRotated","containerStyle","display","_orientationChange","resizeWithBrowserSize","setResizeCallback","setOrientation","designWidth","designHeight","locFrameSize","isLandscape","transformOrigin","_setViewportMeta","metas","overwrite","vp","getElementById","head","elems","getElementsByName","currentVP","pattern","RegExp","_adjustViewportMeta","adjustViewportMeta","isRetinaEnabled","enableAntiAlias","imageSmoothingEnabled","mozImageSmoothingEnabled","isAntiAliasEnabled","enableAutoFullScreen","isAutoFullScreenEnabled","setCanvasSize","getCanvasSize","getFrameSize","setFrameSize","getVisibleSizeInPixel","getVisibleOrigin","getVisibleOriginInPixel","getResolutionPolicy","setResolutionPolicy","resolutionPolicy","_locPolicy","preApply","viewport","vb","rv","postApply","updateCameraViewport","getDesignResolutionSize","setRealPixelResolution","setViewportInPoints","locScaleX","locScaleY","setScissorInPoints","ceil","sw","sh","boxArr","SCISSOR_BOX","scissor","isScissorEnabled","SCISSOR_TEST","getScissorRect","scaleXFactor","scaleYFactor","getViewportRect","getScaleX","getScaleY","getDevicePixelRatio","relatedPos","posLeft","posTop","in_out_point","selPoint","selPrePoint","designedResolution","_setupContainer","locCanvas","_setupStyle","locContainer","_fixContainer","bs","contStyle","_result","_buildResult","containerW","containerH","contentW","contentH","EqualToFrame","frameH","ProportionalToFrame","frameW","designW","designH","offx","offy","EqualToWindow","ProportionalToWindow","OriginalContainer","globalAdapter","adaptContainerStrategy","adaptView","PROPORTION_TO_FRAME","ORIGINAL_CONTAINER","ExactFit","ShowAll","NoBorder","FixedHeight","FixedWidth","containerStg","contentStg","_containerStrategy","_contentStrategy","setContainerStrategy","setContentStrategy","140","topLeft","topRight","bottomLeft","bottomRight","141","isPlainEmptyObj","createAttrsSingle","superAttrs","createAttrs","subclass","chains","__attrs__","newAttrs","prefix","PrimitiveType","getTypeChecker","mainPropName","mainPropAttrs","mainPropAttrsType","isContainer","defaultType","type_lowerCase","getObjTypeChecker","typeCtor","classCtor","defaultDef","typename","142","CallbackInfo","callbackInfoPool","CallbackList","removeByCallback","removeByTarget","cancelAll","MAX_SIZE","callbackListPool","keyOrTarget","_list","143","deepFlatten","strList","flattenCodeArray","separator","144","_js","_vec3","_size","_quat","SUPPORT_MIN_FORMAT_VERSION","EMPTY_PLACEHOLDER","BuiltinValueTypes","BuiltinValueTypeParsers_xyzw","BuiltinValueTypeSetters","fromArray","serializeBuiltinValueTypes","typeId","toArray","DataTypeID","SimpleType","InstanceRef","Array_InstanceRef","Array_AssetRefByInnerObj","ValueTypeCreated","AssetRefByInnerObj","Array_Class","CustomizedClass","Dict","ARRAY_LENGTH","CLASS_TYPE","CLASS_KEYS","CLASS_PROP_TYPE_OFFSET","MASK_CLASS","OBJ_DATA_MASK","CUSTOM_OBJ_DATA_CLASS","CUSTOM_OBJ_DATA_CONTENT","VALUETYPE_SETTER","DICT_JSON_LAYOUT","ARRAY_ITEM_VALUES","Refs","EACH_RECORD_LENGTH","OWNER_OFFSET","KEY_OFFSET","TARGET_OFFSET","File","Version","Context","SharedUuids","SharedStrings","SharedClasses","SharedMasks","Instances","InstanceTypes","DependObjs","DependKeys","DependUuidIndices","PACKED_SECTIONS","dereference","instances","strings","dataLength","instanceOffset","keyIndex","_owner2","_keyIndex","deserializeCCObject","objectData","clazz","classTypeOffset","maskTypeOffset","_key2","ASSIGNMENTS","deserializeCustomCCObject","assignSimple","assignInstanceRef","genArrayParser","parseAssetRefByInnerObj","parseClass","parseCustomClass","parseValueTypeCreated","parseValueType","parseTRS","typedArray","parseDict","dict","_key3","_type2","subValue","parseArray","_type3","parseInstances","instanceTypes","instanceTypesLen","rootIndex","normalObjectCount","insIndex","classes","typeIndex","_type4","eachData","getMissingClass","hasCustomFinder","doLookupClass","silent","proxy","lookupClasses","customFinder","klassLayout","_type5","cacheMasks","masks","parseResult","sharedStrings","dependSharedUuids","dependObjs","dependKeys","dependUuids","_obj","_key4","details","borrowDetails","preprocessed","_version","FileInfo","sharedUuids","sharedClasses","sharedMasks","sections","rootInfo","../value-types/color","../value-types/quat","../value-types/rect","../value-types/size","../value-types/vec3","../value-types/vec4","145","./deserialize-compiled","./deserialize-editor","146","NonUuidMark","category","random","147","./CCClassDecorator","./CCObject","./CCVisibleRect","./callbacks-invoker","./instantiate","./instantiate-jit","148","Compiler","DEFAULT","VAR","LOCAL_OBJ","LOCAL_TEMP_OBJ","LOCAL_ARRAY","LINE_INDEX_OF_NEW_OBJ","DEFAULT_MODULE_CACHE","cc.Node","cc.Label","cc.Button","cc.Widget","cc.Animation","cc.ClickEvent","cc.PrefabInfo","Int8Array","Int16Array","Uint16Array","Uint32Array","Uint8ClampedArray","getTypedArrayName","Declaration","varName","mergeDeclaration","writeAssignment","codeArray","Assignments","targetExpression","_exps","_targetExp","writeCode","targetVar","pair","getPropAccessor","equalsToDefault","isEmptyObject","Parser","objsToClear_iN$t","objs","funcModuleCache","globalVariables","globalVariableId","localVariableId","getFuncModule","globalVar","enumerateObject","globalVariablesDeclaration","code","_iN$t","usedInNew","clsNameIsModule","getObjRef","setValueType","srcValue","assignments","fastDefinedProps","enumerateField","enumerateCCClass","setObjProp","instantiateArray","arrayVar","declaration","instantiateTypedArray","line","isView","instantiateObj","createCode","isChildOf","_obj$node","./compiler","149","CCValueType","_isDomNode","isDomNode","original","internal_force","doInstantiate","objsToClearTmpVar","initValue","../value-types/value-type","150","tempCIDGenerater","_getPropertyDescriptor","getPrototypeOf","_copyprop","isString","dunderProto","superclass","tmpValueDesc","tmpGetSetDesc","tmpGetDesc","tmpSetDesc","objOrCtor","__classname__","retval","isTempClassId","_idToClass","_nameToClass","setup","publicName","table","doSetClassName","unregisterClass","classId","__cid__","classname","allowTempId","obsoleted","newExpr","extractPropName","oldProp","newProp","obsoletes","objName","REGEXP_NUM_OR_STR","REGEXP_STR","argLen","hasSubstitution","regExpToTest","notReplaceFunction","forceDictMode","INVALID_IDENTIFIER_1","INVALID_IDENTIFIER_2","verifyType","removeArray","minusArr","appendObjectsAt","addObjs","arr_clone","cleanupFunc","_cleanup","resize","../utils/mutable-forward-iterator","./id-generater","151","Attrs","SerializableAttrs","TYPO_TO_CORRECT_DEV","parseNotify","newKey","newValue","canUsedInGet","parseType","STATIC_CHECK","getBaseClassWherePropertyDefined_DEV","_wrapOptions","isES6Getset","isLiteral","fullForm","maybeTypeScript","CALL_SUPER_DESTROY_REG_DEV","overrided","baseFuc","subFuc","correct","152","requiringFrames","beh","frameInfo","anyKey","153","refNode","otherNode","compareDocumentPosition","nodeName","154","./CCDirector","./asset-manager","./platform/CCInputExtension","./platform/CCInputManager","./platform/CCScreen","./platform/CCSys","./platform/CCView","155","_manager","_assertThisInitialized","ReferenceError","Assembler2D","_Assembler","initData","initLocal","createQuadData","verticesFloats","indicesCount","_local","uintVerts","uintVDatas","floatsPerVert","colorOffset","getBuffer","_handle","_meshBuffer","updateWorldVerts","local","verts","vDatas","matrix","matrixm","vl","vr","vt","vertexOffset","justTranslate","al","ar","bl","br","ct","db","fillBuffers","worldMatDirty","renderData","vData","iData","iDatas","offsetInfo","request","verticesCount","byteOffset","vbuf","_vData","ibuf","_iData","indiceOffset","vertexId","texIdOffset","uvOffset","./assembler","./utils/dynamic-atlas/manager","./webgl/render-data","156","_pool3","_assemblerId","getAssemblerId","assemblerCtor","__assemblerId__","AssemblerPool","_pool2","assemblers","_renderComp","../utils/pool","157","_vertexFormat","_assemblerPool","_extendNative","renderComp","updateRenderDataForSwitchMaterial","getVfmt","vfmtPosUvColor","packDynamicAtlasAndCheckMaterial","packedFrame","insertSpriteFrame","renderCompCtor","__assembler__","getConstructor","./assembler-pool","./webgl/vertex-format","158","Device","canvasEL","_canvas","_caps","_stats","drawcalls","_vx","_vy","_vw","_vh","_sx","_sy","_sw","_sh","_restoreTexture","unit","setViewport","setScissor","clearRect","fillStyle","globalAlpha","resetDrawCalls","getDrawCalls","159","_device","updateImage","160","_inputAssembler","_initBuiltins","defaultTexture","WRAP_REPEAT","programTemplates","programChunks","InputAssembler","Pass","renderEngine","drawCalls","_cameraNode","ModelBatcher","nativeFlow","ForwardRenderer","_builtins","canvasRenderer","RenderComponentHandle","ecScene","../../renderer/core/input-assembler","../../renderer/core/pass","../../renderer/renderers/forward-renderer","../../renderer/scene/scene","./canvas","./canvas/Device","./canvas/Texture2D","./webgl/assemblers","./webgl/model-batcher","161","FlagOfset","DONOTHING","BREAK_FLOW","LOCAL_TRANSFORM","WORLD_TRANSFORM","TRANSFORM","UPDATE_RENDER_DATA","OPACITY","OPACITY_COLOR","RENDER","POST_RENDER","FINAL","_batcher","_func","_next","_doNothing","_localTransform","_worldTransform","parentOpacityDirty","_render","batcher","parentOpacity","worldTransformFlag","worldOpacityFlag","worldDirtyFlag","colorVal","_fastSetA","flows","_postRender","postFillBuffers","EMPTY_FLOW","createFlow","flow","getFlow","tFlag","_validateList","_inValidateList","validateRenderers","visitRootNode","preCullingMask","walking","terminate","_renderScene","forwardRenderer","getBachther","FLAG_DONOTHING","FLAG_BREAK_FLOW","FLAG_LOCAL_TRANSFORM","FLAG_FINAL","162","_reusableAtlas","_atlases","_atlasIndex","_maxAtlasCount","_textureSize","_maxFrameSize","_textureBleeding","_autoMultiBatch","_autoResetBeforeSceneLoad","_debugNode","newAtlas","autoMultiBatch","requsetMaterial","beforeSceneLoad","atlasCount","textureBleeding","textureSize","autoResetBeforeSceneLoad","atlases","rects","deleteAtlasSpriteFrame","deleteTexture","deleteInnerTexture","showDebug","scroll","./reusable-atlas","163","pointer","parentRect","subRectA","subRectB","subRectC","cacheIndex","used","border","rootRect","freeRects","pushFreeRect","removeFreeRect","temp2","replaceFreeRect","score","areaFit","originalIndex","sizes","best","ignoreRectSize","deleteInnerRect","_iterator","_step","tryMergeRecycle","old","isEmpty","_iterator2","_step2","_iterator3","_step3","../../../assets/CCRenderTexture","164","_assembler2d","shareLabelInfo","LetterInfo","_tmpRect","_comp","_horizontalKernings","_lettersInfo","_linesOffsetX","_numberOfLines","_textDesiredHeight","_letterOffsetY","_tailoredTopY","_tailoredBottomY","_bmfontScale","_lineBreakWithoutSpaces","_lineSpacing","_originFontSize","_hAlign","_vAlign","_overflow","_isWrapText","_maxLineWidth","_isRetina","_retinaScale","BmfontAssembler","_Assembler2D","_reserveQuads","assemblerChanged","_updateFontFamily","_aftUpdateRenderData","_preUpdateRenderData","fontAsset","fontAtlas","_updateProperties","_updateLabelInfo","_updateContent","_resetProperties","_updateFontScale","getTTFTextureSizeScale","enableLabelRetina","labelRetinaScale","_setupBMFontOverflowMetrics","_computeHorizontalKerningForText","_alignText","stringLen","horizontalKernings","kerningDict","kerningAmount","_multilineTextWrap","nextTokenFunc","lineIndex","nextTokenY","longestLine","letterRight","highestY","lowestY","letterDef","letterPosition","_getFontScale","_recordPlaceholderInfo","tokenLen","tokenHighestY","tokenLowestY","tokenRight","nextLetterX","newLine","letterIndex","atlasName","letterX","_recordLetterInfo","_finishMultilineTextWrap","_getFirstCharLen","_multilineTextWrapByWord","_multilineTextWrapByChar","tmpInfo","_char2","_computeAlignmentOffset","_isVerticalClamp","_shrinkLabelToContentSize","_updateQuads","_isHorizontalClamp","_scaleFontSizeDown","shouldUpdateContent","lambda","mid","newFontSize","letterClamp","ctr","letterInfo","wordWidth","_isHorizontalClamped","letterOverClamp","appx","appy","clipTop","_determineRect","letterPositionX","appendQuad","_quadsUpdated","tempRect","trimmedLeft","trimmedTop","originalX","blank","../../../components/CCLabel","../../../platform/CCMacro","../../../utils/text-utils","../../assembler-2d","../utils","165","166","_bmfont","OUTLINE_SUPPORTED","getFontFamily","bleed","_invisibleAlpha","LetterTexture","labelInfo","_labelInfo","_context","_updateTexture","_canvasPool","startX","startY","MIDDLE_RATIO","BASELINE_OFFSET","textAlign","isOutlined","strokeStyle","strokeText","fillText","LetterAtlas","_tmpId","_nexty","frees","waitCleans","insertLetterTexture","letterTexture","freeLetter","removeFreeLetter","oldx","oldy","oldnexty","_letter","_inCleans","ref","pushFreeLetter","defs","LetterAtlases","fakeMaterial","_atlasWidth","_atlasHeight","deleteLetter","_iterator4","_step4","_iterator5","_step5","charAtlasAutoResetBeforeSceneLoad","_emptyTexture","_firstTraverse","_letterRefs","checkMaterialAndUpdateTexId","_usedMaterial","_needCheckMaterial","computeHash","toHEX","_isBold","LetterFontAssembler","_WebglBmfontAssembler","_proto2","createFlexData","vfmtPosUvColorTexId","_getFontDesc","_iterator6","_step6","_recycleLetterRef","_iterator7","_step7","assemblerData","appendVerts","../../../components/CCComponent","../../../components/CCLabelOutline","../../webgl/assemblers/label/2d/bmfont","../../webgl/vertex-format","167","_fontDesc","_drawFontSize","_splitedStrings","_canvasSize","_premultiply","_outlineComp","_outlineColor","_shadowComp","_shadowColor","_canvasPadding","_contentSizeExtend","_nodeContentSize","_enableItalic","_underlineThickness","_drawUnderlinePos","_drawUnderlineWidth","_sharedLabelData","Alignment","TTFAssembler","_calculateLabelFont","_updateLabelDimensions","_calDynamicAtlas","updateVerts","_updatePaddingRect","outlineWidth","shadowWidth","CC_NATIVERENDERER","_calculateFillTextStartPosition","labelX","_getLineHeight","drawStartY","firstLinelabelY","_setupOutline","_setupShadow","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","_drawTextEffect","startPosition","isMultiple","measureText","drawTextPosX","drawTextPosY","maxTextureSize","caps","recreate","nodeSpacingY","_calculateParagraphLength","paragraphedStrings","paragraphLength","_calculateShrinkFont","totalHeight","maxLength","canvasWidthNoMargin","canvasHeightNoMargin","textFragment","allWidth","_calculateWrapText","canvasSizeX","canvasSizeY","paraLength","rawWidth","rawHeight","_rawHeight","../../../components/CCLabelShadow","168","hAlign","vAlign","./dynamic-atlas/manager","169","earcut","holeIndices","dim","hasHoles","outerLen","outerNode","linkedList","minX","minY","eliminateHoles","earcutLinked","clockwise","signedArea","insertNode","removeNode","filterPoints","again","steiner","area","ear","indexCurve","isEarHashed","isEar","cureLocalIntersections","splitEarcut","pointInTriangle","minTX","minTY","maxTX","maxTY","minZ","zOrder","maxZ","nextZ","prevZ","intersects","locallyInside","isValidDiagonal","splitPolygon","queue","getLeftmost","compareX","eliminateHole","hole","findHoleBridge","hx","hy","qx","mx","my","tanMin","sortLinked","tail","numMerges","pSize","qSize","inSize","leftmost","ax","ay","bx","intersectsPolygon","middleInside","q1","inside","a2","an","bp","deviation","polygonArea","trianglesArea","flatten","holes","dimensions","holeIndex","170","Point","dmx","dmy","Path","closed","nbevel","complex","Impl","_distTol","_updatePathOffset","_paths","_pathLength","_pathOffset","_pointsOffset","_commandx","_commandy","_addPath","_curPath","pt","pathPoints","../../../../graphics/helper","../../../../graphics/types","171","MeshBuffer","Earcut","MAX_VERTEX","MAX_INDICE","atan2","curveDivs","tol","clamp","vfmtPosColorSdf","VertexFormat","ATTR_POSITION","ATTR_TYPE_FLOAT32","num","ATTR_COLOR","ATTR_TYPE_UINT8","GraphicsAssembler","_buffers","_bufferOffset","getVfmtFloatCount","requestBuffer","indiceStart","vertexStart","meshbuffer","ia","_vb","_ib","getBuffers","buffers","_flushIA","uploadData","genBuffer","cverts","maxVertsCount","requestStatic","_curColor","_flattenPaths","_expandStroke","_expandFill","impl","ncap","_calculateJoins","pointsLength","_path","pts","_pointsLength","loop","dPos","normalizeSelf","_buttCapStart","_roundCapStart","_roundJoin","_bevelJoin","_vset","floatCount","vDataoOfset","_dPos","_dx","_dy","_buttCapEnd","_roundCapEnd","indicesOffset","_start","_end","_l3","_path2","_pointsLength2","earcutData","vDataOffset","newIndices","_j2","nIndices","first","_end2","iw","w2","ptsLength","nleft","dmr2","cross","limit","dlx0","dly0","dlx1","dly1","dmwx","dmwy","dmlen2","_chooseBevel","bevel","dlx","dly","lw","rw","p1x","lx0","ly0","lx1","ly1","a0","a1","_out","rx0","ry0","rx1","ry1","_a2","_n","_u","_a3","lx","ly","_out2","uintVData","_uintVData","../../../../../renderer/core/input-assembler","../../../../graphics/graphics","../../../assembler","../../../index","../../mesh-buffer","./earcut","./impl","172","./label","./mask-assembler","./motion-streak","./motion-streak-multi","./sprite","173","MultiWebglBmfontAssembler","../../../../webgl/vertex-format","../2d/bmfont","174","_ttf","MultiWebglTTFAssembler","_WebglTTFAssembler","indices","initQuadIndices","../2d/ttf","175","_dataOffset","WebglBmfontAssembler","_BmfontAssembler","flexBuffer","_flexBuffer","reserve","vid","_getColor","rectWidth","rectHeight","uvDataOffset","retinaScale","world","../../../../utils/label/bmfont","176","WebglLetterFontAssembler","_LetterFontAssembler","createData","requestRenderData","../../../../../platform/js","../../../../utils/label/letter-font","./bmfont","177","UPDATE_CONTENT","UPDATE_FONT","UPDATE_EFFECT","NativeTTF","labelMaterial","_label","CustomAssembler","_proxy","setAssembler","_layout","jsb","LabelRenderer","_cfg","DataView","_layoutInfo","_cfgFields","_layoutFields","bindNodeProxy","_bindMaterial","_setBufferFlag","dv","getInt8","setInt8","_v","getInt32","__isLittleEndian__","setInt32","_updateCfgFlag","field","updateFlags","_setBufferValue","setFloat32","setUint8","_setFieldValue","field_name","_getBufferValue","getFloat32","getUint8","_getFieldValue","_getLayoutValue","_setLayoutValue","_updateCfgFlag_Content","_updateCfgFlag_Font","_colorEqual","_colorToObj","setString","setFontPath","fontPath","setFontSize","fontSizeRetina","oldfontsize","setOutline","oldOutline","setOutlineColor","oldColor","setLineHeight","oldLineHeight","setOverFlow","setEnableWrap","setVerticalAlign","setHorizontalAlign","oldHeight","oldX","oldY","setShadow","oldBlur","updateContent","setShadowColor","setItalic","oldItalic","setBold","oldBold","setUnderline","setSpacingX","getCache","retinaSize","getR","getG","getB","getA","shadow","outlineSize","setEffect","_nativeObj","../../../../../assets/material/CCMaterial","../../../../../assets/material/material-variant","../../../../../components/CCLabel","../../../../../components/CCLabelOutline","../../../../../components/CCLabelShadow","178","WebglTTFAssembler","_TTFAssembler","updateUVs","srcOffset","dstOffset","canvasWidth","canvasHeight","shadowOffset","../../../../utils/label/ttf","179","_CCLabel","_ttf2","_bmfont2","_letter2","_ttf3","_bmfont3","textBaseline","TTF","Bmfont","Letter","TTF3D","Bmfont3D","Letter3D","TTFMulti","BmfontMulti","../../../../components/CCLabel","./2d-multi/bmfont","./2d-multi/ttf","./2d/bmfont","./2d/letter","./2d/nativeTTF","./2d/ttf","./3d/bmfont","./3d/letter","./3d/ttf","180","MaskAssembler","SimpleSpriteAssembler","vfmtPos","_maxLevel","_maskStack","getWriteMask","getStencilRef","applyStencil","failOp","writeMask","zFailOp","zPassOp","STENCIL_ENABLE","pushMask","exitMask","_flushMaterial","enableMask","applyClearMask","DS_FUNC_NEVER","STENCIL_OP_REPLACE","STENCIL_OP_ZERO","applyAreaMask","DS_FUNC_EQUAL","_SimpleSpriteAssemble","../../../../renderer/gfx","../../../components/CCMask","../../assembler","../../render-flow","../vertex-format","./sprite/2d/simple","181","_motionStreak","setPoint","setDir","_normal","MultiMotionStreakAssembler","_MotionStreakAssemble","lastPos","moved","cur","newHead","_prev","_tailShortenTime","_prev2","difx","dify","prevIsTail","ca","crgb","vertsOffset","isLast","nextIsStatic","segmentProgress","_this$_renderData$_fl","usedVertices","usedIndices","usedVerticesFloats","MotionStreakAssembler","../../../components/CCMotionStreak","182","_tangent","_miter","computeMiter","miter","lineA","lineB","halfThick","maxMultiple","multiple","dot","183","_barFilled","BarFilledAssemblerMulti","_BarFilledAssembler","fillEnd","../2d/bar-filled","184","_mesh","MultiMeshSpriteAssembler","_MeshSpriteAssembler","updateIndices","../2d/mesh","185","_radialFilled","MultiRadialFilledAssembler","_RadialFilledAssemble","../2d/radial-filled","186","_simple","MultiSimpleSpriteAssembler","../2d/simple","187","_sliced","MultiSlicedAssembler","_SlicedAssembler","meshCount","indexOffset","../2d/sliced","188","_tiled","MultiTiledAssembler","_TiledAssembler","contentWidth","contentHeight","sizableWidth","sizableHeight","hRepeat","vRepeat","_updateIndices","../2d/tiled","189","BarFilledAssembler","textureRect","ul","ur","quadUV0","quadUV1","quadUV2","quadUV3","quadUV4","quadUV5","quadUV6","quadUV7","progressStart","progressEnd","../../../../../components/CCSprite","../../../../assembler-2d","190","MeshSpriteAssembler","originalWidth","originalHeight","trimX","trimY","191","PI_2","_vertPos","_vertices","_uvs","_intersectPoint_1","_intersectPoint_2","_center","_triangles","_calcInsectedPoints","intersectPoints","sinAngle","cosAngle","tanAngle","cotAngle","yleft","yright","xtop","xbottom","_calculateVertices","_calculateUVs","u0","v0","_getVertAngle","placementX","placementY","RadialFilledAssembler","floatsPerTriangle","triangleIndex","triangle","_generateTriangle","testIndex","allocWorldVerts","vert0","vert1","vert2","v0x","v0y","v1x","v1y","progressX","progressY","_generateUV","px1","px2","py1","py2","192","cw","ch","ow","oh","rh","trimRight","trimBottom","trimTop","193","SlicedAssembler","xScale","yScale","voffset","localRowY","localColX","worldIndex","194","TiledAssembler","_this$_local","offsetWidth","offsetHeight","localX","localY","yindex","ylength","xindex","xlength","coefu","coefv","tempXVerts","tempYVerts","195","_CCSprite","_simple2","_sliced2","_tiled2","_radialFilled2","_barFilled2","_mesh2","_simple3","_sliced3","_tiled3","_radialFilled3","_barFilled3","_mesh3","Simple","Sliced","Tiled","RadialFilled","BarFilled","Mesh","Simple3D","Sliced3D","Tiled3D","RadialFilled3D","BarFilled3D","Mesh3D","SimpleMulti","SlicedMulti","TiledMulti","RadialFilledMulti","BarFilledMulti","MeshMulti","../../../../components/CCSprite","./2d-multi/bar-filled","./2d-multi/mesh","./2d-multi/radial-filled","./2d-multi/simple","./2d-multi/sliced","./2d-multi/tiled","./2d/bar-filled","./2d/mesh","./2d/radial-filled","./2d/simple","./2d/sliced","./2d/tiled","./3d/bar-filled","./3d/mesh","./3d/radial-filled","./3d/simple","./3d/sliced","./3d/tiled","196","FlexBuffer","vfmt","_handler","_index","_vfmt","_verticesBytes","_bytes","_initVerticesCount","_initIndicesCount","_reallocVData","floatsCount","oldData","updateMesh","_reallocIData","newFloatsCount","realloced","newIndicesCount","updateMeshRange","197","FIX_IOS14_BUFFER","_GameGlobal","GameGlobal","isIOSHighPerformanceMode","vertexFormat","_vertexBytes","_arrOffset","_vbArr","VertexBuffer","USAGE_DYNAMIC","_ibArr","IndexBuffer","INDEX_FMT_UINT16","USAGE_STATIC","_initVDataCount","_initIDataCount","_offsetInfo","_reallocBuffer","vertexsData","indicesData","ib","switchBuffer","checkAndSwitchBuffer","vertexCount","indiceCount","byteLength","indiceLength","_updateOffset","requestForSpine","requestStaticForSpine","adjustForSpine","copyOldData","oldVData","newData","oldIData","forwardIndiceStartToOffset","../../../renderer/gfx","198","_recyclePool","_model","vfmt3D","QuadBuffer","SpineBuffer","empty_material","empty_ia","renderScene","_iaPool","_modelPool","_quadBuffer","_quadBuffer3D","_meshBuffer3D","_batchedModels","_sortKey","models","setInputAssembler","removeModel","model","sortKey","addModel","_vertexBuffer","_indexBuffer","vertextFormat","../../../renderer/core/input-assembler","../../../renderer/memop/recycle-pool","../../../renderer/scene/model","../../assets/material/CCMaterial","../../platform/id-generater","./mesh-buffer","./quad-buffer","./spine-buffer","./vertex-format","199","_fillQuadBuffer","vertextID","200","RenderData","_infos","./flex-buffer","201","adjust","202","ATTR_UV0","XYZ_UV_Color","XY_UV_Color","ATTR_TEX_ID","XY_UV_Color_TexId","vfmtPosUvTwoColor","ATTR_COLOR0","XY_UV_Two_Color","vfmtPosUvTwoColorTexId","XY_UV_Two_Color_TexId","vfmtPosUv","XY_UV","vfmtPosColor","XY_Color","XY","203","./multi-batcher","./multi-handler","204","MultiBatcher","handlers","nextHandler","getEmptyIndex","205","textures","hasEmptySlot","texture2","texture3","texture4","texture5","texture6","texture7","texture8","propertyIndex2Name","hasTexture","206","i2nMap","n2iMap","propertyName2Index","207","EXTNAME_RE","DIRNAME_RE","NORMALIZE_RE","pathStr","mainFileName","fileName","reg","baseName","tempStr","changeBasename","isSameExt","_normalize","oldUrl","sep","stripSep","208","AffineTransform","determinant","matm","transformVec2","transOrY","transformSize","transformRect","ol","ob","or","ot","lbx","lby","rbx","rby","ltx","lty","rtx","rty","transformObb","out_bl","out_tl","out_tr","out_br","anAffineTransform","209","findComponent","findComponents","_comp2","findChildComponent","findChildComponents","couldActiveInScene","_onSetParent","getChildByName","siblingIndex","siblings","oldIndex","walk","prefunc","postfunc","afterChildren","_stacks","_stackId","removeAllChildren","_checkMultipleComp","existing","_RFpeek","ReqComp","depended","attachedObjsForEditor","_addComponentAt","removeComponent","_getDependComponent","destroyAllChildren","newParent","inCurrentSceneBefore","inCurrentSceneNow","newPrefabRoot","myPrefabInfo","shouldActiveNow","isSyncedNode","newPrefabInfo","syncing","_registerIfAttached","_comp3","childIndex","SameNameGetSets","propertyDefine","./misc","210","211","_dstBlendFactor","_updateBlendFunc","dstBlendFactor","materialVar","_updateMaterialBlendFunc","212","Base64Values","BASE64_VALUES","HexChars","UuidTemplate","Indices","isFinite","base64","lhs","rhs","213","referenceNode","nameList","subChild","214","_normalMaterial","normalMaterial","_grayMaterial","grayMaterial","215","eventRegx","imageAttrReg","_parsedObject","_specialSymbolArray","htmlString","_resultObjectArray","_stack","tagEndIndex","tagBeginIndex","noTagBegin","_processResult","newStr","tagStr","_addToStack","_attributeToObject","attribute","nextSpace","eventObj","eventHanlderString","_processEventHandler","isNewLine","tagValue","remainingArgument","isValidImageTag","toLocaleLowerCase","defaultOutlineObject","outlineAttrReg","eventString","eventNames","isValidTag","eventValue","previousTagObj","_escapeSpecialSymbol","216","./CCPath","./find","./mutable-forward-iterator","./profiler/CCProfiler","217","sameNameGetSets","diffNameGetSets","np","getterFunc","suffix","NextPOT","BUILTIN_CLASSID_RE","BASE64_KEYS","pushToMap","pushFront","exists","min_inclusive","max_inclusive","degreesToRadians","radiansToDegrees","218","219","220","_PrefabInfo","fileId","eulerAnglesX","eulerAnglesY","eulerAnglesZ","prefabRoot","221","PerfCounter","_showFPS","_rootNode","generateStats","below","average","draws","logic","_counter","generateNode","leftLabel","rightLabel","beforeUpdate","afterUpdate","updateLabel","stat","human","afterDraw","../../platform/CCMacro","./perf-counter","222","Counter","_value","_averageValue","_accumValue","_accumSamples","_accumStart","_average","alarm","over","223","tick","avg","./counter","224","_BASELINE_RATIO","_BASELINE_OFFSET","MAX_CACHE_SIZE","LRUCache","moveToHead","discard","measureCache","label_wordRex","label_symbolRex","label_lastWordRex","label_lastEnglish","label_firstEnglish","highSurrogateRex","lowSurrogateRex","label_wrapinspection","__CHINESE_REG","__JAPANESE_REG","__KOREAN_REG","metric","_safeSubstring","targetString","endIndex","newStartIndex","newEndIndex","startChar","endChar","wrappedWords","fuzzyLen","tmpText","sLine","pushNum","checkWhile","checkCount","sText","225","loadImage","tex","cacheImage","postLoadTexture","../assets/CCTexture2D","226","NodeUnit","./node-mem-pool","./node-unit","227","MemPool","unitClass","_unitClass","_findOrder","_initNative","_nativeMemPool","_buildUnit","unitID","_destroyUnit","_findUnitID","findUnit","findOrder","hasSpace","firstUnit","isAllFree","228","Super","./mem-pool","229","Uint32_Bytes","Uint8_Bytes","Dirty_Type","Dirty_Members","Dirty_Stride","TRS_Members","TRS_Stride","FLOAT_BYTES","LocalMatrix_Members","LocalMatrix_Stride","WorldMatrix_Members","WorldMatrix_Stride","Parent_Type","Parent_Members","Parent_Stride","ZOrder_Type","ZOrder_Members","ZOrder_Stride","CullingMask_Type","CullingMask_Members","CullingMask_Stride","Opacity_Type","Opacity_Members","Opacity_Stride","Is3D_Type","Is3D_Members","Is3D_Stride","Node_Type","Node_Members","Skew_Members","Skew_Stride","UnitBase","memPool","contentNum","_contentNum","trsList","FLOAT_ARRAY_TYPE","localMatList","worldMatList","_spacesData","../../value-types/utils","./unit-base","230","POINTER_INVALID_FLAG","SPACE_FREE_FLAG","SPACE_USE_FLAG","POS_NEXT_FREE","POS_FREE_FLAG","_memPool","_signData","signIndex","UnitBaseProto","headFreeIndex","spaceNum","freeStr","usingNum","usingStr","freeFlag","totalNum","231","_valueType","_CCClass","_misc","_ValueType","fromHex","hex","hexString","subtract","multiply","divide","ag","ofs","setR","setG","setB","setA","toCSS","opt","fmt","toRGBValue","fromHSV","toHSV","hsv","WHITE_R","BLACK_R","TRANSPARENT_R","GRAY_R","RED_R","RED","GREEN_R","GREEN","BLUE_R","BLUE","YELLOW_R","YELLOW","ORANGE_R","ORANGE","CYAN_R","CYAN","MAGENTA_R","MAGENTA","./value-type","232","_exportNames","Vec4","Mat3","_mat2","math","./color","./mat3","./mat4","./quat","./rect","./size","./trs","./vec2","./vec3","./vec4","233","m00","m01","m02","m03","m04","m05","m06","m07","m08","m10","m11","m20","m21","m22","transpose","a01","a02","a12","a00","a10","a11","a20","a21","a22","b01","b11","b21","det","adjoint","b00","b02","b10","b12","b20","b22","multiplyMat4","translate","rotate","rad","fromTranslation","fromScaling","fromQuat","z2","xx","yx","yy","zx","zy","zz","wx","wy","wz","_fromViewUpIIFE","default_up","lengthSqr","normalFromMat4","a03","a13","a23","a30","a31","a32","a33","b03","b04","b05","b06","b07","b08","b09","frob","multiplyScalar","multiplyScalarAndAdd","exactEquals","a4","a5","a6","a7","a8","b0","b5","b6","b7","b8","IDENTITY","../value-types/utils","234","_a00","_a01","_a02","_a03","_a10","_a11","_a12","_a13","_a20","_a21","_a22","_a23","_a30","_a31","_a32","_a33","mulScalar","m23","m30","m31","m32","m33","axis","rotateX","rotateY","rotateZ","fromXRotation","fromYRotation","fromZRotation","xy","xz","yz","getTranslation","getScaling","m3","m3_1","m09","trace","S","toRTS","v3_1","fromMat3","fromRTS","sz","fromRTSOrigin","ox","oy","oz","frustum","near","far","rl","tb","nf","perspective","fovy","aspect","lr","bt","eye","eyex","eyey","eyez","upx","upy","upz","centerx","centery","centerz","z0","z1","inverseTranspose","strictEquals","epsilon","sm","number","m14","m15","235","_z","_w","rotationTo","fromAxisAngle","getAxisAngle","outAxis","scaleAndAdd","bw","bz","rotateAround","rot","qt_1","rotateAroundLocal","calculateW","slerp","scale0","scale1","cosom","omega","sinom","sqlerp","qt_2","invDot","fromAxes","xAxis","yAxis","zAxis","halfToRad","_s","_s2","_s3","cz","toAxisX","fy","fz","toAxisY","fx","toAxisZ","outerZ","bank","heading","attitude","toDegree","sqx","sqy","sqz","euler","236","fromMinMax","min_x","min_y","max_x","max_y","maxax","maxay","maxbx","maxby","intersection","rectB","axMin","ayMin","axMax","ayMax","bxMin","byMin","bxMax","byMax","containsRect","aw","ah","bh","237","ZERO_R","238","tmp_quat","239","INT_MIN","INT_MAX","INT_BITS","inverseLerp","nextPow2","pingPong","pseudoRandom","pseudoRandomRange","pseudoRandomRangeInt","randomRange","randomRangeInt","toRadian","_d2r","_r2d","maxDiff","seed","240","241","neg","negate","squaredDistance","inverse","transformMat3","v2_1","v2_2","cosine","magSqr","subSelf","mulSelf","divSelf","scaleSelf","negSelf","variance","addSelf","invsqrt","magSqr1","magSqr2","theta","signAngle","radians","rotateSelf","project","maxAxis","squaredMagnitude","ONE_R","UP_R","RIGHT_R","242","zero","az","cosTheta","sinTheta","rhw","transformMat4Normal","transformAffine","ix","iy","iz","transformRTS","transformInverseRTS","rz","v3_2","projectOnPlane","sqrLen","vec1","vec2","FRONT_R","243","v4","equals4f","strictEquals4f","minInclusive","maxInclusive","NEG_ONE_R","NEG_ONE","244","deprecateEnum","oldPath","newPath","hasTypePrefixBefore","delimiter","oldPropName","oldTypeName","markAsRemoved","ownerCtor","removedProps","ownerName","markAsDeprecated","deprecatedProps","descriptors","getOwnPropertyDescriptors","deprecatedProp","markAsRemovedInObject","ownerObj","provideClearError","Info","accessor","etProp","markFunctionWarning","originFunc","_glID","PI2","FLT_MAX","FLT_MIN","UINT_MAX","scheduleCallbackForTarget","scheduleUpdateForTarget","unscheduleCallbackForTarget","unscheduleUpdateForTarget","unscheduleAllCallbacksForTarget","unscheduleAllCallbacksWithMinPriority","adjustViewPort","setViewPortInPoints","getViewPortRect","getChildByTag","removeChildByTag","getRotationX","setRotationX","getRotationY","setRotationY","getPositionX","setPositionX","getPositionY","setPositionY","getSkewX","setSkewX","getSkewY","setSkewY","setScaleX","setScaleY","getOpacity","setOpacity","getColor","getLocalZOrder","setLocalZOrder","setInsetLeft","setInsetRight","setInsetTop","setInsetBottom","getInstantiatedBuiltinMaterial","getInstantiatedMaterial","ERR","Light","affineTransformMake","affineTransformMakeIdentity","affineTransformClone","affineTransformConcat","affineTransformConcatIn","affineTransformInvert","affineTransformInvertIn","affineTransformInvertOut","affineTransformEqualToTransform","pointApplyAffineTransform","sizeApplyAffineTransform","rectApplyAffineTransform","obbApplyAffineTransform","pointEqualToPoint","sizeEqualToSize","rectEqualToRect","rectContainsRect","rectContainsPoint","rectOverlapsRect","rectIntersectsRect","rectIntersection","rectUnion","rectGetMaxX","rectGetMidX","rectGetMinX","rectGetMaxY","rectGetMidY","rectGetMinY","colorEqual","hexToColor","colorToHex","pNeg","pAdd","pSub","pMult","pMidpoint","pDot","pCross","pPerp","pRPerp","pProject","pLengthSQ","pDistanceSQ","pLength","pDistance","pNormalize","pForAngle","pToAngle","pZeroIn","pIn","pMultIn","pSubIn","pAddIn","pNormalizeIn","pSameAs","pAngle","pAngleSigned","pRotateByAngle","pCompMult","pFuzzyEqual","pLerp","pClamp","rand","randomMinus1To1","_renderType","_getError","_initDebugSetting","rgb2hsv","hsv2rgb","dragonBones","CCFactory","getInstance","vmath","245","./actions","./core/CCGame","246","CCSpriteFrame","ParticleAsset","../core/assets/CCAsset","../core/assets/CCSpriteFrame","247","USAGE_STREAM","INDEX_FMT_UINT8","INDEX_FMT_UINT32","ATTR_NORMAL","ATTR_TANGENT","ATTR_BITANGENT","ATTR_WEIGHTS","ATTR_JOINTS","ATTR_COLOR1","ATTR_UV","ATTR_UV1","ATTR_UV2","ATTR_UV3","ATTR_UV4","ATTR_UV5","ATTR_UV6","ATTR_UV7","ATTR_TYPE_INT8","ATTR_TYPE_INT16","ATTR_TYPE_UINT16","ATTR_TYPE_INT32","ATTR_TYPE_UINT32","FILTER_NEAREST","FILTER_LINEAR","WRAP_CLAMP","WRAP_MIRROR","TEXTURE_FMT_RGB_DXT1","TEXTURE_FMT_RGBA_DXT1","TEXTURE_FMT_RGBA_DXT3","TEXTURE_FMT_RGBA_DXT5","TEXTURE_FMT_RGB16F","TEXTURE_FMT_RGBA16F","TEXTURE_FMT_RGB32F","TEXTURE_FMT_R32F","TEXTURE_FMT_111110F","TEXTURE_FMT_SRGB","TEXTURE_FMT_SRGBA","TEXTURE_FMT_D16","TEXTURE_FMT_D32","TEXTURE_FMT_D24S8","DS_FUNC_LEQUAL","DS_FUNC_GREATER","DS_FUNC_NOTEQUAL","DS_FUNC_GEQUAL","RB_FMT_RGBA4","RB_FMT_RGB5_A1","RB_FMT_RGB565","BLEND_FUNC_SUBTRACT","BLEND_FUNC_REVERSE_SUBTRACT","BLEND_ZERO","BLEND_ONE","BLEND_SRC_COLOR","BLEND_ONE_MINUS_SRC_COLOR","BLEND_DST_COLOR","BLEND_ONE_MINUS_DST_COLOR","BLEND_DST_ALPHA","BLEND_ONE_MINUS_DST_ALPHA","BLEND_CONSTANT_COLOR","BLEND_ONE_MINUS_CONSTANT_COLOR","BLEND_CONSTANT_ALPHA","BLEND_ONE_MINUS_CONSTANT_ALPHA","BLEND_SRC_ALPHA_SATURATE","STENCIL_OP_INCR","STENCIL_OP_INCR_WRAP","STENCIL_OP_DECR","STENCIL_OP_DECR_WRAP","STENCIL_OP_INVERT","CULL_NONE","CULL_FRONT","CULL_FRONT_AND_BACK","PT_POINTS","PT_LINES","PT_LINE_LOOP","PT_LINE_STRIP","PT_TRIANGLES","PT_TRIANGLE_STRIP","PT_TRIANGLE_FAN","RenderQueue","OVERLAY","murmurhash2_32_gc","WebGLEXT","GFXObjectType","GFXStatus","GFXObject","gfxType","_gfxType","_status","UNREADY","GFXAttributeName","GFXType","GFXFormat","GFXBufferUsageBit","GFXMemoryUsageBit","GFXBufferAccessBit","GFXPrimitiveMode","GFXPolygonMode","GFXShadeModel","GFXCullMode","GFXComparisonFunc","GFXStencilOp","GFXBlendOp","GFXBlendFactor","GFXColorMask","GFXFilter","GFXAddress","GFXTextureType","GFXTextureUsageBit","GFXSampleCount","GFXTextureFlagBit","GFXTextureViewType","GFXShaderType","GFXBindingType","GFXCommandBufferType","GFXLoadOp","GFXStoreOp","GFXTextureLayout","GFXPipelineBindPoint","GFXDynamicState","GFXStencilFace","GFXQueueType","GFXClearFlag","GFXGetTypeSize","BOOL","INT","UINT","FLOAT","BOOL2","INT2","UINT2","FLOAT2","BOOL3","INT3","UINT3","FLOAT3","BOOL4","INT4","UINT4","FLOAT4","MAT2","MAT2X3","MAT2X4","MAT3X2","MAT3","MAT3X4","MAT4X2","MAT4","SAMPLER1D","SAMPLER1D_ARRAY","SAMPLER2D","SAMPLER2D_ARRAY","SAMPLER3D","SAMPLER_CUBE","RenderPassStage","RenderPriority","MAX_BINDING_SUPPORTED","UniformBinding","SamplerInfoIndex","sizeMap","formatMap","R32I","RG32I","RGB32I","RGBA32I","R32F","RG32F","RGB32F","passParams","BACK","FRONT","ADD","SUB","REV_SUB","CONSTANT_COLOR","CONSTANT_ALPHA","NEVER","LESS","EQUAL","LEQUAL","GREATER","NOTEQUAL","GEQUAL","KEEP","REPLACE","INCR","INCR_WRAP","DECR","DECR_WRAP","INVERT","effectStructure","$techniques","$passes","any","sampler","mappings","248","_memop","_m4_tmp","_stageInfos","RecyclePool","_float2_pool","_float3_pool","_float4_pool","_float9_pool","_float16_pool","_float64_pool","_int2_pool","_int3_pool","_int4_pool","_int64_pool","Base","_this$_type2defaultVa","_type2defaultValue","PARAM_INT2","PARAM_INT3","PARAM_INT4","PARAM_FLOAT2","PARAM_FLOAT3","PARAM_FLOAT4","PARAM_COLOR4","PARAM_MAT3","PARAM_MAT4","defaultTextureCube","_stage2fn","_usedTextureUnits","_viewPools","_drawItemsPools","_stageItemsPools","_definesChanged","_resetTextuerUnit","_allocTextureUnit","maxTextureUnits","_registerStage","fn","_requestView","clearOpts","CLEAR_COLOR","CLEAR_DEPTH","CLEAR_STENCIL","_stencil","_models","drawItem","extractDrawItem","_stages","stageItems","_drawItem","stageItem","stageInfo","_setProperty","slots","setTextureArray","setUniformDirectly","setUniform","_draw","programLib","_programKey","setVertexBuffer","setIndexBuffer","setPrimitiveType","_primitiveType","getProgram","setProgram","_uniforms","variants","enableBlend","setBlendFuncSep","setBlendEqSep","setBlendColor32","enableDepthTest","setDepthFunc","enableDepthWrite","setStencilTest","setStencilFuncFront","setStencilOpFront","setStencilFuncBack","setStencilOpBack","draw","../../core/value-types","../enums","../gfx","../memop","./program-lib","./view","249","250","_detailName","setStage","newProperties","../../core/value-types/value-type","251","_shdID","_generateDefines","tmpDefines","_replaceMacroNums","_unrollLoops","begin","snippet","unroll","parsedBegin","parsedEnd","_replaceHighp","ProgramLib","_templates","_checkPrecision","prog","glsl1","vert","frag","cnt","log2","samplers","blocks","members","extensions","hasProgram","getKey","tmpl","tmplDefs","errPrefix","customDef","_highpSupported","Program","errors","link","vertLines","fragLines","defineLength","originLine","lines","fileID","highpSupported","getShaderPrecisionFormat","vertHighp","VERTEX_SHADER","HIGH_FLOAT","fragHighp","FRAGMENT_SHADER","precision","252","Technique","253","_genID","_priority","_clearModel","_matView","_matViewInv","_matProj","_matViewProj","_matInvViewProj","_cullingByID","_shadowLight","getForward","254","_mappings","PROJ_PERSPECTIVE","PROJ_ORTHO","LIGHT_DIRECTIONAL","LIGHT_POINT","LIGHT_SPOT","LIGHT_AMBIENT","SHADOW_NONE","SHADOW_HARD","SHADOW_SOFT","ivec2","ivec3","ivec4","vec3","vec4","PARAM_MAT2","mat2","mat3","sampler2D","samplerCube","CLEAR_SKYBOX","BUFFER_VIEW_INT8","BUFFER_VIEW_UINT8","BUFFER_VIEW_INT16","BUFFER_VIEW_UINT16","BUFFER_VIEW_INT32","BUFFER_VIEW_UINT32","BUFFER_VIEW_FLOAT32","./build/mappings","255","_state","_texture2d","_textureCube","_type2uniformCommit2","_type2uniformArrayCom","GL_INT","GL_FLOAT","GL_FLOAT_VEC2","GL_FLOAT_VEC3","GL_FLOAT_VEC4","GL_INT_VEC2","GL_INT_VEC3","GL_INT_VEC4","GL_BOOL","GL_BOOL_VEC2","GL_BOOL_VEC3","GL_BOOL_VEC4","GL_FLOAT_MAT2","GL_FLOAT_MAT3","GL_FLOAT_MAT4","GL_SAMPLER_2D","GL_SAMPLER_CUBE","_type2uniformCommit","uniform1i","uniform1f","uniform2fv","uniform3fv","uniform4fv","uniform2iv","uniform3iv","uniform4iv","uniformMatrix2fv","uniformMatrix3fv","uniformMatrix4fv","_type2uniformArrayCommit","uniform1iv","uniform1fv","_commitBlendStates","disable","BLEND","blendSep","blendFuncSeparate","blendEquationSeparate","blendFunc","blendEquation","_commitDepthStates","DEPTH_TEST","depthMask","_commitStencilStates","STENCIL_TEST","stencilSep","stencilFuncSeparate","stencilMaskSeparate","stencilOpSeparate","stencilOp","_commitCullMode","CULL_FACE","cullFace","_commitVertexBuffers","attrsDirty","maxStream","vertexBuffers","vertexBufferOffsets","maxVertexAttribs","_newAttributes","vbOffset","bindBuffer","ARRAY_BUFFER","_attributes","_enabledAttributes","enableVertexAttribArray","vertexAttribPointer","stride","disableVertexAttribArray","_commitTextures","maxTextureSlot","textureUnits","activeTexture","TEXTURE0","bindTexture","_attach","attachment","face","framebufferTexture2D","TEXTURE_2D","TEXTURE_CUBE_MAP_POSITIVE_X","framebufferRenderbuffer","RENDERBUFFER","preserveDrawingBuffer","_extensions","_initExtensions","_initCaps","_initStates","initDefault","_current","vendorPrefixes","getExtension","extDrawBuffers","maxVertexStreams","maxVertexTextures","MAX_VERTEX_TEXTURE_IMAGE_UNITS","maxFragUniforms","MAX_FRAGMENT_UNIFORM_VECTORS","MAX_TEXTURE_IMAGE_UNITS","MAX_VERTEX_ATTRIBS","MAX_TEXTURE_SIZE","maxDrawBuffers","MAX_DRAW_BUFFERS_WEBGL","maxColorAttachments","MAX_COLOR_ATTACHMENTS_WEBGL","FUNC_ADD","colorMask","POLYGON_OFFSET_FILL","depthRange","clearDepth","clearStencil","_restoreIndexBuffer","indexBuffer","ELEMENT_ARRAY_BUFFER","allowFloatTexture","fb","numColors","_colors","colorBuffer","COLOR_ATTACHMENT0","DEPTH_ATTACHMENT","STENCIL_ATTACHMENT","_depthStencil","DEPTH_STENCIL_ATTACHMENT","COLOR_BUFFER_BIT","DEPTH_BUFFER_BIT","STENCIL_BUFFER_BIT","setStencilFunc","setStencilOp","rgba","setBlendColor","setBlendFunc","dst","srcAlpha","dstAlpha","setBlendEq","eq","alphaEq","stream","slot","sameType","isFloat32Array","isInt32Array","programDirty","_linked","useProgram","commitFunc","drawElements","_bytesPerIndex","drawArrays","./enums","./state","./texture-2d","./texture-cube","256","attrTypeBytes","glFilter","glTextureFmt","GL_NEAREST_MIPMAP_NEAREST","GL_LINEAR_MIPMAP_NEAREST","GL_NEAREST_MIPMAP_LINEAR","GL_LINEAR_MIPMAP_LINEAR","GL_UNSIGNED_BYTE","GL_UNSIGNED_SHORT","GL_UNSIGNED_INT","GL_UNSIGNED_SHORT_5_6_5","GL_UNSIGNED_SHORT_4_4_4_4","GL_UNSIGNED_SHORT_5_5_5_1","GL_HALF_FLOAT_OES","GL_DEPTH_COMPONENT","GL_ALPHA","GL_RGB","GL_LUMINANCE","GL_LUMINANCE_ALPHA","GL_COMPRESSED_RGB_S3TC_DXT1_EXT","GL_COMPRESSED_RGBA_S3TC_DXT1_EXT","GL_COMPRESSED_RGBA_S3TC_DXT3_EXT","GL_COMPRESSED_RGBA_S3TC_DXT5_EXT","GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG","GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG","GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG","GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG","GL_COMPRESSED_RGB_ETC1_WEBGL","GL_COMPRESSED_RGB8_ETC2","GL_COMPRESSED_RGBA8_ETC2_EAC","_filterGL","_textureFmtGL","internalFormat","pixelType","ATTR_TEX_COORD","ATTR_TEX_COORD1","ATTR_TEX_COORD2","ATTR_TEX_COORD3","ATTR_TEX_COORD4","ATTR_TEX_COORD5","ATTR_TEX_COORD6","ATTR_TEX_COORD7","ATTR_TEX_COORD8","attrType","LINEAR_MIPMAP_LINEAR","257","createFramebuffer","deleteFramebuffer","258","_BYTES_PER_INDEX","BYTES_PER_INDEX","usage","_usage","_numIndices","_needExpandDataStore","createBuffer","deleteBuffer","bytes","glUsage","bufferData","bufferSubData","setUsage","259","TextureCube","./device","./frame-buffer","./index-buffer","./program","./render-buffer","./texture","./vertex-buffer","260","isPow2","261","_parseError","errorLog","parts","_samplers","_errors","_vertSource","_fragSource","vertShader","_createShader","fragShader","createProgram","attachShader","linkProgram","failed","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","deleteShader","getProgramParameter","LINK_STATUS","getProgramInfoLog","numAttributes","ACTIVE_ATTRIBUTES","getActiveAttrib","getAttribLocation","numUniforms","ACTIVE_UNIFORMS","_info","getActiveUniform","_location","getUniformLocation","deleteProgram","shader","createShader","shaderSource","compileShader","262","createRenderbuffer","bindRenderbuffer","renderbufferStorage","deleteRenderbuffer","263","cpy","264","_Texture","_genMipmap","textureMaxSize","pot","_setMipmap","hint","GENERATE_MIPMAP_HINT","NICEST","generateMipmap","_setTexInfo","glFmt","_setSubImage","_setImage","pixelStorei","UNPACK_FLIP_Y_WEBGL","UNPACK_PREMULTIPLY_ALPHA_WEBGL","compressedTexSubImage2D","texSubImage2D","compressedTexImage2D","texImage2D","texParameteri","TEXTURE_MIN_FILTER","TEXTURE_MAG_FILTER","TEXTURE_WRAP_S","TEXTURE_WRAP_T","TEXTURE_MAX_ANISOTROPY_EXT","265","TEXTURE_CUBE_MAP","faceIndex","levelImages","266","_nullWebGLTexture","_textureID","267","_bytesPerVertex","_numVertices","getFormat","268","_attr2el","_elements","_el","../murmurhash2_gc","269","CircularPool","_cursor","270","_timsort","FixedArray","cmp","./timsort","271","TypedArrayPool","LinkedArray","_circularPool","_fixedArray","_linkedArray","_typedArrayPool","./circular-pool","./fixed-array","./linked-array","./pool","./recycle-pool","./typed-array-pool","272","_head","_tail","alloc","free","binder","cursor","273","_idx","_frees","_expand","274","275","DEFAULT_MIN_MERGE","DEFAULT_MIN_GALLOPING","DEFAULT_TMP_STORAGE_LENGTH","POWERS_OF_TEN","log10","alphabeticalCompare","aStr","bStr","minRunLength","makeAscendingRun","lo","hi","compare","runHi","reverseRun","binaryInsertionSort","pivot","gallopLeft","lastOffset","maxOffset","gallopRight","TimSort","minGallop","tmpStorageLength","stackLength","runStart","runLength","stackSize","pushRun","mergeRuns","mergeAt","forceMergeRuns","start1","length1","start2","length2","mergeLow","mergeHigh","cursor1","cursor2","count1","count2","exit","customCursor","customDest","remaining","ts","minRun","276","_bufferPools","_nextPow16","_log2","_alloc","buf","alloc_int8","alloc_uint8","alloc_int16","alloc_uint16","alloc_int32","alloc_uint32","alloc_float32","alloc_float64","alloc_dataview","277","278","_baseRenderer","_a16_view","_a16_view_inv","_a16_proj","_a16_viewProj","_a4_camPos","_a64_shadow_lightViewProj","_a16_shadow_lightViewProjs","_a4_shadow_info","_camPos","_camFwd","_v3_tmp1","CC_MAX_LIGHTS","CC_MAX_SHADOW_LIGHTS","sortView","_BaseRenderer","_lights","_shadowLights","_numLights","_shadowStage","_opaqueStage","_transparentStage","_updateLights","extractView","_view2","lights","light","shadowType","_updateLightDefines","lightKey","shadowKey","_shadowType","newCount","CC_NUM_LIGHTS","CC_NUM_SHADOW_LIGHTS","_submitLightsUniforms","positionAndRanges","directions","lightNum","_colorUniform","_directionUniform","_positionUniform","_range","_spotUniform","_submitShadowStageUniforms","shadowInfo","shadowMinDepth","shadowMaxDepth","shadowDepthScale","shadowDarkness","shadowBias","CC_SHADOW_TYPE","_submitOtherStagesUniforms","viewProjMatrix","_shadowResolution","_sortItems","_drawItems","shadowLights","_item","shadowIdx","shadowMap","../core/base-renderer","279","_tmp_mat4","_tmp_v3","_tmp2_v3","_poolID","_projection","_near","_far","_orthoHeight","setCullingMask","getPriority","getOrthoHeight","getFov","getNear","getFar","getDepth","getStencil","getClearFlags","getStages","getFramebuffer","framebuffer","_calcMatrices","screenPointToRay","worldPos","worldMatrixToScreen","worldMatrix","halfWidth","halfHeight","../../core/geom-utils","280","Model","_viewID","_cameraID","_userKey","_castShadow","_boundingShape","setUserKey","281","app","_app","_views","_add","_remove","setDebugCamera","cam","getCameraCount","getCamera","getModelCount","getModel","getLightCount","getLight","addLight","removeLight","addView","removeView","282","ctor2enums","getInspectorProps","getInstanceType","getInstanceCtor","_CCTexture2D","_ctor2default","_enums2ctor","_ctor2enums","_enums2default","gfxTexture2D","gfxTextureCube","ctor2default","enums2ctor","PARAM_COLOR3","className2InspectorName","typeName","valueCtor","assetType","../core/assets/CCTexture2D","../core/value-types","./gfx/texture-2d","283","TiledMapAsset","tmxXmlStr","textureNames","textureSizes","imageLayerTextures","imageLayerTextureNames","tsxFiles","tsxFileNames","284","./cocos2d/actions","./cocos2d/animation","./cocos2d/core","./cocos2d/core/components/CCStudioComponent","./cocos2d/deprecated","./cocos2d/particle","./cocos2d/particle/CCParticleAsset","./cocos2d/tilemap","./cocos2d/tilemap/CCTiledMapAsset","./cocos2d/videoplayer/CCVideoPlayer","./cocos2d/webview/CCWebView","./extensions/ccpool/CCNodePool","./extensions/dragonbones","./extensions/spine","285","EmptyHandle","ATTACHED_ROOT_NAME","ATTACHED_PRE_NAME","limitNode","_tempMat4","AttachUtil","_skeleton","_skeletonNode","_skeletonComp","_attachedRootNode","_attachedNodeArray","_boneIndexToNode","skeletonComp","_prepareAttachNode","armature","isCached","isAnimationCached","_frameCache","enableCacheAttachedInfo","_buildBoneAttachedNode","bone","boneIndex","boneNodeName","boneNode","_buildBoneRelation","_bone","_boneIndex","getAttachedRootNode","getAttachedNodes","boneName","nodeArray","_rebuildNodeArray","findMap","oldNodeArray","_toRemove","_sortNodeArray","_getNodeByBoneIndex","destroyAttachedNodes","markTree","delName","generateAttachedNodes","targetNodes","bones","boneData","buildBoneTree","parentBoneNode","targetNode","destroyAllAttachedNodes","generateAllAttachedNodes","parentIndex","_hasAttachedNode","attachedRootNode","_associateAttachedNode","_syncAttachedNode","rootMatrix","boneInfos","_curFrame","mulMat","matrixHandle","nodeMat","worldX","worldY","nodeArrayDirty","../../cocos2d/core/renderer/render-flow","../../cocos2d/core/value-types/mat4","286","TrackEntryListeners","spine","SkeletonCache","DefaultSkinsEnum","DefaultAnimsEnum","<None>","AnimationCacheMode","REALTIME","SHARED_CACHE","PRIVATE_CACHE","setEnumAttr","Skeleton","skeletonData","SkeletonData","defaultSkin","defaultAnimation","_updateSkeletonData","_animationName","getCurrent","setAnimation","clearTrack","setToSetupPose","_defaultSkinIndex","skinsEnum","getSkinsEnum","skinIndex","skinName","setSkin","_animationIndex","animationName","animsEnum","getAnimsEnum","animIndex","animName","_preCacheMode","_cacheMode","_defaultCacheMode","setAnimationCacheMode","premultipliedAlpha","debugSlots","_updateDebugDraw","debugBones","debugMesh","useTint","_updateUseTint","enableBatch","_updateBatch","_accTime","_playCount","_skeletonCache","_animationQueue","_headAniInfo","_playTimes","_isAniComplete","_effectDelegate","_rootBone","_listener","_materialCache","_debugRenderer","_startSlotIndex","_endSlotIndex","_startEntry","trackIndex","_endEntry","attachUtil","_dataDirty","invalidAnimationCache","baseMaterial","_defineMaterialTint","isTexturesLoaded","setSkeletonData","sharedCache","enablePrivateMode","skeletonInfo","getSkeletonCache","skeleton","_clipper","clipper","getRootBone","SkeletonClipping","setSlotsRange","startSlotIndex","endSlotIndex","setAnimationStateData","stateData","handleDynamicAtlasAndSwitchMaterial","frameCache","isInvalid","updateToFrame","aniInfo","_updateCache","_updateRealtime","_emitCacheCompleteEvent","isInited","frameTime","FrameTime","frameIdx","setVertexEffectDelegate","effectDelegate","updateWorldTransform","setBonesToSetupPose","setSlotsToSetupPose","updateAnimationCache","findBone","findSlot","slotName","setSkinByName","getAttachment","attachmentName","getAttachmentByName","setAttachment","getRegionData","RegionData","setRegionData","regionData","assignToAttachment","getTextureAtlas","regionAttachment","region","setMix","fromAnimation","toAnimation","getAnimationCache","initAnimationCache","findAnimation","setAnimationWith","addAnimationWith","clearTracks","setStartListener","_ensureListener","setInterruptListener","interrupt","setEndListener","setDisposeListener","dispose","setCompleteListener","setEventListener","setTrackStartListener","getListeners","setTrackInterruptListener","setTrackEndListener","setTrackDisposeListener","setTrackCompleteListener","trackEntry","loopCount","trackTime","animationEnd","setTrackEventListener","_resetDefaultAnim","_resetDefaultSkin","_updateAnimEnum","_updateSkinEnum","getRuntimeData","AnimationStateData","_refreshInspector","refreshSelectedInspector","debugDrawNode","debugDraw","../../cocos2d/core/components/CCRenderComponent","../../cocos2d/core/graphics/graphics","./AttachUtil","./lib/spine","./skeleton-cache","./track-entry-listeners","287","_isUseSpine","ATTACHMENT_TYPE","REGION","BOUNDING_BOX","SKINNED_MESH","AnimationEventType","START","INTERRUPT","END","DISPOSE","COMPLETE","EVENT","./Skeleton","./skeleton-data","./skeleton-texture","./spine-assembler","./vertex-effect-delegate","288","__extends","_extendStatics","extendStatics","__","timelines","timelineIds","getPropertyId","hasTimeline","lastTime","linearSearch","MixBlend","MixDirection","TimelineType","CurveTimeline","newFloatArray","BEZIER_SIZE","getFrameCount","setLinear","setStepped","STEPPED","getCurveType","BEZIER","setCurve","cx1","cy1","cx2","cy2","tmpx","tmpy","dddfx","dddfy","ddfx","ddfy","dfx","dfy","getCurvePercent","MathUtils","prevX","prevY","RotateTimeline","setFrame","degrees","r_1","ENTRIES","r_2","PREV_ROTATION","prevRotation","PREV_TIME","TranslateTimeline","X","Y","PREV_X","PREV_Y","ScaleTimeline","mixOut","signum","ShearTimeline","shear","shearX","shearY","ColorTimeline","slotIndex","R","G","B","A","setFromColor","PREV_R","PREV_G","PREV_B","PREV_A","TwoColorTimeline","twoColor","r2","g2","R2","G2","B2","darkColor","dark","setupLight","setupDark","PREV_R2","PREV_G2","PREV_B2","AttachmentTimeline","attachmentNames","attachmentName_1","attachmentName_2","zeros","DeformTimeline","frameVertices","deform","firedEvents","slotAttachment","VertexAttachment","deformAttachment","deformArray","vertexAttachment","deform_1","setArraySize","setupVertices","lastVertices","i_1","i_2","arrayCopy","vertexAttachment_1","i_3","i_4","i_5","i_6","i_7","prevVertices","nextVertices","i_8","i_9","i_10","vertexAttachment_2","i_11","i_12","i_13","i_14","i_15","EventTimeline","DrawOrderTimeline","drawOrders","drawOrder","drawOrderToSetupIndex","IkConstraintTimeline","ikConstraint","ikConstraintIndex","mix","softness","bendDirection","compress","stretch","MIX","SOFTNESS","BEND_DIRECTION","COMPRESS","STRETCH","constraint","ikConstraints","PREV_MIX","PREV_SOFTNESS","PREV_BEND_DIRECTION","PREV_COMPRESS","PREV_STRETCH","mixIn","TransformConstraintTimeline","transformConstraint","transformConstraintIndex","rotateMix","translateMix","scaleMix","shearMix","ROTATE","TRANSLATE","SHEAR","transformConstraints","PREV_ROTATE","PREV_TRANSLATE","PREV_SCALE","PREV_SHEAR","PathConstraintPositionTimeline","pathConstraintPosition","pathConstraintIndex","VALUE","pathConstraints","PREV_VALUE","PathConstraintSpacingTimeline","pathConstraintSpacing","spacing","PathConstraintMixTimeline","pathConstraintMix","tracks","EventQueue","propertyIDs","IntSet","animationsChanged","trackEntryPool","TrackEntry","animationLast","nextAnimationLast","trackLast","nextTrackLast","currentDelta","nextTime","setCurrent","mixingFrom","mixTime","trackEnd","disposeNext","updateMixingFrom","mixingTo","drain","finished","mixDuration","totalAlpha","interruptAlpha","_animationsChanged","applied","mixBlend","applyMixingFrom","animationTime","getAnimationTime","timelineCount","ii","webkit602BugfixHelper","timelineMode","firstFrame","timelinesRotation","timeline","timelineBlend","NOT_LAST","SUBSEQUENT","applyRotateTimeline","queueEvents","eventThreshold","attachments","attachmentThreshold","drawOrderThreshold","alphaHold","alphaMix","timelineHoldMix","FIRST","HOLD","holdMix","rotateTimeline","r1","diff","lastTotal","lastDiff","animationStart","trackLastWrapped","event_1","event_2","oldDrainDisabled","drainDisabled","expandToIndex","getMix","setEmptyAnimation","emptyAnimation","addEmptyAnimation","setEmptyAnimations","ensureArrayCapacity","obtain","holdPrevious","computeHold","computeNotLast","timelinesCount","timelineDipMix","HOLD_MIX","clearListeners","clearListenerNotifications","setAnimationLast","isComplete","resetRotationDirections","animState","objects","event_3","AnimationStateAdapter","animationToMixTime","defaultMix","fromName","toName","setMixWith","textureLoader","pathPrefix","toLoad","responseText","downloadBinary","loadBinary","loadText","loadTexture","loadTextureData","loadTextureAtlas","atlasData","pagesLoaded","atlasPages","TextureAtlas","FakeTexture","_loop_1","atlasPage","pageLoadError","imagePath","errorMessage","atlasPages_1","isLoadingComplete","getToLoad","getLoaded","hasErrors","getErrors","AtlasAttachmentLoader","newRegionAttachment","skin","findRegion","renderObject","RegionAttachment","setRegion","newMeshAttachment","MeshAttachment","newBoundingBoxAttachment","BoundingBoxAttachment","newPathAttachment","PathAttachment","newPointAttachment","PointAttachment","newClippingAttachment","ClippingAttachment","BlendMode","Bone","arotation","ascaleX","ascaleY","ashearX","ashearY","appliedValid","sorted","isActive","updateWorldTransformWith","cosDeg","sinDeg","transformMode","TransformMode","la","lb","lc","ld","OnlyTranslation","NoRotationOrReflection","prx","radDeg","NoScale","NoScaleOrReflection","za","zc","zb","zd","getWorldRotationX","getWorldRotationY","getWorldScaleX","getWorldScaleY","updateAppliedTransform","pid","ic","ra","rb","rc","worldToLocal","invDet","localToWorld","worldToLocalRotation","worldRotation","localToWorldRotation","localRotation","rotateWorld","BoneData","skinRequired","ConstraintData","EventData","IkConstraint","apply1","apply2","rotationIK","dd","bendDir","psx","psy","csx","os1","os2","s2","cwx","cwy","pp","td","ta","r0","minAngle","minDist","maxAngle","maxDist","IkConstraintData","PathConstraint","spaces","positions","segments","percentSpacing","spacingMode","SpacingMode","Percent","rotateMode","tangents","RotateMode","Tangent","ChainScale","boneCount","spacesCount","lengthSpacing","Length","setupLength","length_1","length_2","computeWorldPositions","positionMode","PositionMode","boneX","boneY","offsetRotation","tip","Chain","degRad","length_3","length_4","percentPosition","verticesLength","worldVerticesLength","curveCount","prevCurve","constantSpeed","pathLength_1","BEFORE","computeWorldVertices","addBeforePosition","AFTER","addAfterPosition","length_5","addCurvePosition","pathLength","curveLength","segment","length_6","length_7","tt","ttt","uu","uuu","ut","ut3","uut3","utt3","PathConstraintData","Assets","clientId","SharedAssetManager","clientAssets","queuedAssets","queueAsset","onreadystatechange","DONE","loadJson","updateClientAssets","rawAsset","updateCacheReset","parent_1","slotData","Slot","ikConstraintData","transformConstraintData","TransformConstraint","pathConstraintData","updateCache","skinBones","ikCount","transformCount","pathCount","constraintCount","sortIkConstraint","sortTransformConstraint","sortPathConstraint","sortBone","constraints","constrained","sortReset","slotBone","sortPathConstraintAttachment","skins","sortPathConstraintAttachmentWith","pathBones","findBoneIndex","findSlotIndex","findSkin","newSkin","attachAll","name_1","findIkConstraint","constraintName","findTransformConstraint","findPathConstraint","getBounds","POSITIVE_INFINITY","NEGATIVE_INFINITY","mesh","nn","SkeletonBinary","attachmentLoader","linkedMeshes","readSkeletonData","binary","BinaryInput","readString","readFloat","nonessential","readBoolean","imagesPath","audioPath","readInt","name_2","parent_2","TransformModeValues","rgba8888ToColor","readInt32","SlotData","rgb888ToColor","readStringRef","blendMode","BlendModeValues","readByte","TransformConstraintData","offsetScaleX","offsetScaleY","offsetShearY","PositionModeValues","SpacingModeValues","RotateModeValues","Fixed","readSkin","linkedMesh","parent_3","inheritDeform","setParentMesh","intValue","floatValue","stringValue","volume","balance","animations","readAnimation","slotCount","Skin","name_3","readAttachment","AttachmentTypeValues","AttachmentType","Region","updateOffset","BoundingBox","readVertices","readFloatArray","readShortArray","hullLength","edges","regionUVs","LinkedMesh","parent_4","closed_1","Clipping","endSlot","Vertices","weights","bonesArray","toFloatArray","readShort","tempColor1","tempColor2","timelineType","SLOT_ATTACHMENT","SLOT_COLOR","readCurve","SLOT_TWO_COLOR","BONE_ROTATE","BONE_TRANSLATE","BONE_SCALE","BONE_SHEAR","timelineScale","PATH_POSITION","PATH_SPACING","PATH_MIX","iii","nnn","weighted","deformLength","vn","drawOrderCount","offsetCount","unchanged","unchangedIndex","eventCount","event_4","CURVE_STEPPED","CURVE_BEZIER","Additive","Multiply","Screen","CURVE_LINEAR","getInt16","optimizePositive","byteCount","chars","charCount","fromCharCode","SkeletonBounds","boundingBoxes","polygons","polygonPool","updateAabb","freeAll","boundingBox","polygon","aabbCompute","aabbContainsPoint","aabbIntersectsSegment","aabbIntersectsSkeleton","bounds","containsPoint","containsPointPolygon","prevIndex","vertexY","vertexX","intersectsSegment","intersectsSegmentPolygon","width12","height12","det1","det2","width34","height34","det3","getPolygon","getWidth","getHeight","triangulator","Triangulator","clippingPolygon","clipOutput","clippedVertices","clippedTriangles","scratch","clipStart","clipAttachment","makeClockwise","clippingPolygons","decompose","triangulate","n_1","clipEndWithSlot","clipEnd","isClipping","clipTriangles","trianglesLength","originIndexOffset","originVertOffset","originUVSOffset","polygonsCount","vertexSize","xyOffset","u2","u3","clippedVerticesItems","clippedTrianglesItems","clipOutputLength","d0","d4","clipOutputCount","clipOutputItems","c0","clippingArea","originalOutput","clipped","clippingVertices","clippingVerticesLast","edgeX","edgeY","edgeX2","edgeY2","deltaX","inputVertices","inputVerticesLength","outputStart","inputX","inputY","inputX2","inputY2","side2","verticeslength","p2x","lastX","findEvent","eventDataName","event_5","findPathConstraintIndex","pathConstraintName","SkeletonJson","skeletonMap","boneMap","parent_5","parentName","getValue","transformModeFromString","slotMap","setFromString","blendModeFromString","ik","constraintMap","targetName","positionModeFromString","spacingModeFromString","rotateModeFromString","skinArr","skinMap","entryName","parent_6","animationMap","parent_7","scaledVertices","timelineName","timelineMap","valueMap","mapPath","deformName","deformMap","verticesValue","drawOrderNode","draworder","drawOrderMap","offsetMap","event_6","toSinglePrecision","SkinEntry","addSkin","contained","getAttachments","copySkin","newLinkedMesh","dictionary","removeAttachment","slotAttachments","name_4","getAttachmentsForSlot","name_5","oldSkin","skinAttachment","getSkeleton","attachmentTime","setAttachmentTime","getAttachmentTime","getImage","filterFromString","TextureFilter","Nearest","MipMap","MipMapNearestNearest","MipMapLinearNearest","MipMapNearestLinear","MipMapLinearLinear","wrapFromString","TextureWrap","MirroredRepeat","ClampToEdge","TextureRegion","setWraps","uWrap","vWrap","atlasText","pages","regions","reader","TextureAtlasReader","tuple","page","readLine","TextureAtlasRegion","rotateValue","readValue","readTuple","TextureAtlasPage","colon","lastMatch","Vector2","applyRelativeLocal","applyAbsoluteLocal","applyRelativeWorld","applyAbsoluteWorld","tc","degRadReflect","modified","convexPolygons","convexPolygonsIndices","indicesArray","isConcaveArray","polygonIndicesPool","verticesArray","isConcave","previous","p3x","p3y","vx","vy","positiveArea","previousIndex","nextIndex","polygonIndices","fanBaseIndex","lastWinding","merged","winding1","winding","winding2","firstIndex","prevPrevX","prevPrevY","firstX","firstY","secondX","secondY","otherIndices","otherFirstIndex","otherSecondIndex","otherLastIndex","otherPoly","toInt","cbrt","randomTriangular","randomTriangularWith","Interpolation","applyInternal","Pow","power","PowOut","sourceStart","destStart","numElements","oldSize","SUPPORTS_TYPED_ARRAYS","newShortArray","fround","DebugUtils","logBones","instantiator","TimeKeeper","maxDelta","framesPerSecond","WindowedMean","windowSize","addedValues","lastValue","mean","hasEnoughData","addValue","getMean","Attachment","nextID","worldVertices","v_1","skeletonBones","weight","copyTo","tempColor","textureWidth","textureHeight","getParentMesh","parentMesh","computeWorldPosition","computeWorldRotation","regionScaleX","regionScaleY","localX2","localY2","localXCos","localXSin","localYCos","localYSin","localX2Cos","localX2Sin","localY2Cos","localY2Sin","OX1","OY1","OX2","OY2","OX3","OY3","OX4","OY4","rendererObject","X1","Y1","C1R","C1G","C1B","C1A","U1","V1","X2","Y2","C2R","C2G","C2B","C2A","U2","V2","X3","Y3","C3R","C3G","C3B","C3A","U3","V3","X4","Y4","C4R","C4G","C4B","C4A","U4","V4","JitterEffect","jitterX","jitterY","SwirlEffect","interpolation","centerX","centerY","radAngle","dist","289","MaxCacheTime","_indices","_boneInfoOffset","_vertexOffset","_indexOffset","_vfOffset","_preTexUrl","_preBlendMode","_segVCount","_segICount","_segOffset","_colorOffset","_preFinalColor","_preDarkColor","_perVertexSize","_perClipVertexSize","_vfCount","_indexCount","_tempr","_tempg","_tempb","_tempa","_finalColor32","_darkColor32","_finalColor","_darkColor","_quadTriangles","AnimationCache","_privateMode","_invalid","_enableCacheAttachedInfo","_frameIdx","_skeletonInfo","_tempSegments","_tempColors","_tempBoneInfos","invalidAllFrame","completeHandle","unbind","preAnimationCache","curAnimationCache","_needToUpdate","toFrameIdx","_updateFrame","updateAllFrame","verticesMulti","uintVert","_traverseSkeleton","vfOffset","preSegOffset","preSegInfo","indexCount","vfCount","fillVertices","skeletonColor","attachmentColor","slotColor","fr","fg","fa","dr","dg","jj","isRegion","isMesh","isClip","boneInfo","slotIdx","_ii","_nn","_animationPool","removeSkeleton","animationsCache","aniKey","animationCache","poolKey","_animationCache","290","updateUV","attachmentOrSpriteFrame","texture2D","initWithSpriteFrame","initWithAttachment","origSize","updateWithTexture2D","updateWithPackedFrame","texture2d","spTex","SkeletonTexture","setRealTexture","toSpriteFrame","strict","resetDynamicAtlas","middlewareTextureID","_skeletonJson","skeletonJsonStr","skeletonJson","_atlasText","cloneId","_atlasCache","ensureTexturesLoaded","caller","texsLen","loadedCount","loadedItem","quiet","_getAtlas","resData","_getTexture","realUuid","_destroyFromDynamicAtlas","291","getRealTexture","292","VFOneColor","VFOneColorTexId","VFTwoColor","VFTwoColorTexId","FLAG_BATCH","FLAG_TWO_COLOR","_handleVal","_slotColor","_boneColor","_originColor","_meshColor","_tempPos","_tempUv","_premultipliedAlpha","_multiplier","_slotRangeStart","_slotRangeEnd","_useTint","_useMulti","_debugSlots","_debugBones","_debugMesh","_nodeR","_nodeG","_nodeB","_nodeA","_vertexFloatCount","_vertexCount","_vertexFloatOffset","_inRange","_mustFlush","_m00","_m04","_m12","_m01","_m05","_m13","_g","_fr","_fg","_fb","_fa","_dr","_dg","_db","_da","_renderer","_needColor","_vertexEffect","_packedRegions","_tmpRegionData","_getSlotMaterial","useModel","materialCache","materialInfo","_handleColor","_spineColorToInt32","spineColor","SpineAssembler","packDynamicAtlasForSpine","updatePackedAttachment","alreadyInAtlas","_packedFrame","_v2","_n2","_v3","_n3","realTimeTraverse","locSkeleton","worldMatm","_ii2","_nn2","_ii3","_nn3","_n4","cacheVerticesConvertToMulti","cacheTraverse","uintbuf","useMultiTint","frameVFOffset","frameIndexOffset","segVFCount","needBatch","calcTranslate","nowColor","maxVFOffset","segInfo","_ii4","_il","_ii5","_il2","frameColorOffset","_ii6","_il3","_ii7","_il4","_frameColorOffset","_ii8","_il5","_ii9","_il6","_frameColorOffset2","_ii10","_il7","nodeColor","../../cocos2d/core/renderer/assembler","../../cocos2d/core/renderer/webgl/vertex-format","293","294","VertexEffectDelegate","_interpolation","_effectType","initJitter","initSwirlWithPow","initSwirlWithPowOut","getJitterVertexEffect","getSwirlVertexEffect","getVertexEffect","getEffectType","295","./cocos2d","./cocos2d/core/predefine","./extends","./package","./polyfill/array","./polyfill/array-buffer","./polyfill/misc","./polyfill/number","./polyfill/object","./polyfill/string","./polyfill/typescript","./predefine","296","TypedArray","297","298","LOG2E","Timer","_timerTable","299","300","ownKeys","getOwnPropertySymbols","301","searchString","302","__assign","__rest","propertyIsEnumerable","__decorate","decorators","Reflect","__param","paramIndex","decorator","__metadata","metadataKey","metadataValue","metadata","__awaiter","thisArg","_arguments","P","generator","adopt","fulfilled","rejected","__generator","_","sent","trys","ops","verb","throw","return","__exportStar","__createBinding","k2","__values","__read","__spread","__spreadArrays","jl","__await","__asyncGenerator","asyncIterator","settle","fulfill","__asyncDelegator","__asyncValues","__makeTemplateObject","cooked","__setModuleDefault","__importStar","mod","__importDefault","__classPrivateFieldGet","receiver","privateMap","__classPrivateFieldSet","303","defineMacro","defineDeprecatedMacroGetter","recommandedUsage","defined","WECHATGAMESUB","getSharedCanvas","WECHATGAME","getSystemInfoSync","QQPLAY","engineVersion"],"mappings":"CAWA,SAAAA,MAAAC,SAAAC,OAAAC;EACA,SAAAC,WAAAC,MAAAC;IACA,IAAAC,SAAAL,MAAAG;IACA,KAAAE,QAAA;MACA,IAAAC,aAAAP,QAAAI;MACA,KAAAG,YAEA;MAEA,IAAAC,UAAA;MACAF,SAAAL,MAAAG,QAAA;QAAAI,SAAAA;;MACAD,WAAA,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MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,KAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,KAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC,MAAA;MACAC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YAAYA;IACpB6lJ,QAAQ3qI,aAAaA;IACrB2qI,QAAQx5J,UAAUA;IAClBw5J,QAAQv4I,aAAaA;IACrBu4I,QAAQ34I,SAASA;IAkBrB,IAAMokT,mBAAmBD,QAAQ,SAAS9zF,GAAGg0F;IAC7C,IAAMC,gBAAgBH,QAAQ,UAAU9zF,GAAGk0F,qBAAqBl0F,GAAGg0F;IACnE,IAAMG,SAASL,QAAQ;IACvBF,4BAA4B,oBAAoBG;IAChDH,4BAA4B,iBAAiBK;IAC7CL,4BAA4B,aAAaO;IAErCvkT;IAkBJ,IAAMwkT,gBAAgB;IACtB9rK,QAAQ,iBAAiB78K,GAAGoyC,iBAAiBu2S;K9S4mgH3C;GAAK,IAAG,EAAC","file":"cocos2d-js.be84c.js","sourcesContent":["\n// Based on https://github.com/substack/browser-pack/blob/master/prelude.js\n\n// modules are defined as an array\n// [ module function, map of requireuires ]\n//\n// map of requireuires is short require name -> numeric require\n//\n// anything defined in a previous bundle is accessed via the\n// orig method which is the requireuire for previous bundles\n\n(function outer (modules, cache, entry) {\n function newRequire(name, jumped){\n var module = cache[name];\n if(!module) {\n var moduleData = modules[name];\n if(!moduleData) {\n // this module is excluded from engine\n return undefined;\n }\n var exports = {};\n module = cache[name] = {exports: exports};\n moduleData[0](function(x){\n return newRequire(moduleData[1][x] || x);\n },module,exports);\n }\n return module.exports;\n }\n for(var i=0;i<entry.length;i++) newRequire(entry[i]);\n\n // Override the current require with this new one\n return newRequire;\n})\n","module.exports={\n \"1001\": \"cocos2d: removeAction: Target not found\",\n \"1002\": \"cc.ActionManager.removeActionByTag(): an invalid tag\",\n \"1003\": \"cc.ActionManager.removeActionByTag(): target must be non-null\",\n \"1004\": \"cc.ActionManager.getActionByTag(): an invalid tag\",\n \"1005\": \"cocos2d : getActionByTag(tag = %s): Action not found\",\n \"1006\": \"[Action step]. override me\",\n \"1007\": \"[Action update]. override me\",\n \"1008\": \"cocos2d: FiniteTimeAction#reverse: Implement me\",\n \"1009\": \"cc.EaseElastic.reverse(): it should be overridden in subclass.\",\n \"1010\": \"cc.IntervalAction: reverse not implemented.\",\n \"1011\": \"cc.ActionInterval.setAmplitudeRate(): it should be overridden in subclass.\",\n \"1012\": \"cc.ActionInterval.getAmplitudeRate(): it should be overridden in subclass.\",\n \"1013\": \"The speed parameter error\",\n \"1014\": \"The repeat parameter error\",\n \"1015\": \"parameters should not be ending with null in Javascript\",\n \"1016\": \"cc.RotateTo.reverse(): it should be overridden in subclass.\",\n \"1019\": \"Failed to construct, Sequence construction needs two or more actions.\",\n \"1020\": \"Failed to construct, Spawn construction needs two or more actions.\",\n \"1021\": \"cc.Speed.initWithAction(): action must be non nil\",\n \"1022\": \"cc.Follow.initWithAction(): followedNode must be non nil\",\n \"1023\": \"cc.ActionEase.initWithAction(): action must be non nil\",\n \"1024\": \"Invalid configuration. It must at least have one control point\",\n \"1025\": \"cc.Sequence.initWithTwoActions(): arguments must all be non nil\",\n \"1026\": \"cc.RepeatForever.initWithAction(): action must be non null\",\n \"1027\": \"cc.Spawn.initWithTwoActions(): arguments must all be non null\",\n \"1028\": \"cc.ReverseTime.initWithAction(): action must be non null\",\n \"1029\": \"cc.ReverseTime.initWithAction(): the action was already passed in.\",\n \"1030\": \"cc.Animate.initWithAnimation(): animation must be non-NULL\",\n \"1031\": \"Illegal parameter get passed in cc.tween: %s.\",\n \"1100\": \"Expected 'data' dict, but not found. Config file: %s\",\n \"1101\": \"Please load the resource first : %s\",\n \"1200\": \"cocos2d: Director: Error in gettimeofday\",\n \"1201\": \"cocos2d: Director: unrecognized projection\",\n \"1203\": \"cocos2d: Director: Error in gettimeofday\",\n \"1204\": \"running scene should not null\",\n \"1205\": \"the scene should not null\",\n \"1206\": \"loadScene: The scene index to load (%s) is out of range.\",\n \"1207\": \"loadScene: Unknown name type to load: '%s'\",\n \"1208\": \"loadScene: Failed to load scene '%s' because '%s' is already being loaded.\",\n \"1209\": \"loadScene: Can not load the scene '%s' because it was not in the build settings before playing.\",\n \"1210\": \"Failed to preload '%s', %s\",\n \"1211\": \"loadScene: The scene index to load (%s) is out of range.\",\n \"1212\": \"loadScene: Unknown name type to load: '%s'\",\n \"1213\": \"loadScene: Failed to load scene '%s' because '%s' is already loading\",\n \"1214\": \"loadScene: Can not load the scene '%s' because it was not in the build settings before playing.\",\n \"1215\": \"Failed to preload '%s', %s\",\n \"1216\": \"Director.runSceneImmediate: scene is not valid\",\n \"1300\": \"element type is wrong!\",\n \"1400\": \"'%s' is deprecated, please use '%s' instead.\",\n \"1404\": \"cc.spriteFrameCache is removed, please use cc.loader to load and cache sprite frames of atlas format.\",\n \"1405\": \"The '%s' has been removed, please use '%s' instead.\",\n \"1406\": \"'%s.%s' is removed\",\n \"1408\": \"'%s' is not support in the '%s', please use '%s' instead.\",\n \"1502\": \"cc.scheduler.scheduleCallbackForTarget(): target should be non-null.\",\n \"1503\": \"cc.Scheduler.pauseTarget():target should be non-null\",\n \"1504\": \"cc.Scheduler.resumeTarget():target should be non-null\",\n \"1505\": \"cc.Scheduler.isTargetPaused():target should be non-null\",\n \"1506\": \"warning: you CANNOT change update priority in scheduled function\",\n \"1507\": \"CCScheduler#scheduleSelector. Selector already scheduled. Updating interval from: %s to %s\\\"\",\n \"1508\": \"Argument callback must not be empty\",\n \"1509\": \"Argument target must be non-nullptr\",\n \"1510\": \"cc.Scheduler: Illegal target which doesn't have uuid or instanceId.\",\n \"1511\": \"cc.Scheduler: pause state of the scheduled task doesn't match the element pause state in Scheduler, the given paused state will be ignored.\",\n \"1513\": \"cc.Scheduler: scheduler stopped using `__instanceId` as id since v2.0, you should do scheduler.enableForTarget(target) before all scheduler API usage on target\",\n \"1605\": \"child already added. It can't be added again\",\n \"1606\": \"child must be non-null\",\n \"1610\": \"cocos2d: removeChildByTag(tag = %s): child not found!\",\n \"1612\": \"cc.Node.stopActionBy(): argument tag an invalid tag\",\n \"1613\": \"cc.Node.getActionByTag(): argument tag is an invalid tag\",\n \"1617\": \"child must be non-null\",\n \"1618\": \"cc.Node.runAction(): action must be non-null\",\n \"1619\": \"callback function must be non-null\",\n \"1620\": \"interval must be positive\",\n \"1623\": \"Set '%s' to normal node (not persist root node).\",\n \"1624\": \"Replacing with the same sgNode\",\n \"1625\": \"The replacement sgNode should not contain any child.\",\n \"1626\": \"Should not set alpha via 'color', set 'opacity' please.\",\n \"1627\": \"Not support for asynchronous creating node in SG\",\n \"1632\": \"Node name can not include '/'.\",\n \"1633\": \"Internal error, should not remove unknown node from parent.\",\n \"1634\": \"addChild: The child to add must be instance of cc.Node, not %s.\",\n \"1635\": \"reorderChild: this child is not in children list.\",\n \"1636\": \"Node's zIndex value can't be greater than cc.macro.MAX_ZINDEX, setting to the maximum value\",\n \"1637\": \"Node's zIndex value can't be smaller than cc.macro.MIN_ZINDEX, setting to the minimum value\",\n \"1638\": \"Private node's zIndex can't be set, it will keep cc.macro.MIN_ZINDEX as its value\",\n \"1639\": \"cc.Action is deprecated, please use cc.Tween instead\",\n \"1800\": \"cc._EventListenerKeyboard.checkAvailable(): Invalid EventListenerKeyboard!\",\n \"1801\": \"cc._EventListenerTouchOneByOne.checkAvailable(): Invalid EventListenerTouchOneByOne!\",\n \"1802\": \"cc._EventListenerTouchAllAtOnce.checkAvailable(): Invalid EventListenerTouchAllAtOnce!\",\n \"1803\": \"cc._EventListenerAcceleration.checkAvailable(): _onAccelerationEvent must be non-nil\",\n \"1900\": \"Invalid parameter.\",\n \"2000\": \"Don't call this method if the event is for touch.\",\n \"2200\": \"Design resolution not valid\",\n \"2201\": \"should set resolutionPolicy\",\n \"2300\": \"The touches is more than MAX_TOUCHES, nUnusedIndex = %s\",\n \"2400\": \"WebGL error %s\",\n \"2602\": \"cc.Sprite.setDisplayFrameWithAnimationName(): Frame not found\",\n \"2603\": \"cc.Sprite.setDisplayFrameWithAnimationName(): Invalid frame index\",\n \"2606\": \"cc.Sprite.initWithSpriteFrame(): spriteFrame should be non-null\",\n \"2607\": \"cc.Sprite.initWithSpriteFrameName(): spriteFrameName should be non-null\",\n \"2608\": \"%s is null, please check.\",\n \"2609\": \"cc.Sprite.initWithFile(): filename should be non-null\",\n \"2610\": \"cc.Sprite.setDisplayFrameWithAnimationName(): animationName must be non-null\",\n \"2614\": \"cc.Sprite.addChild(): child should be non-null\",\n \"2616\": \"cc.SpriteBatchNode.updateQuadFromSprite(): cc.SpriteBatchNode only supports cc.Sprites as children\",\n \"2617\": \"cc.SpriteBatchNode.insertQuadFromSprite(): cc.SpriteBatchNode only supports cc.Sprites as children\",\n \"2618\": \"cc.SpriteBatchNode.addChild(): cc.SpriteBatchNode only supports cc.Sprites as children\",\n \"2619\": \"cc.SpriteBatchNode.addChild(): cc.Sprite is not using the same texture\",\n \"2623\": \"cc.SpriteBatchNode.updateQuadFromSprite(): sprite should be non-null\",\n \"2625\": \"too many tiles, only 16384 tiles will be show\",\n \"2626\": \"Unrecognized fill type in bar fill\",\n \"2627\": \"Can not generate quad\",\n \"2628\": \"%s does not exist\",\n \"2712\": \"Invalid spriteFrameName\",\n \"3005\": \"cocos2d: '%s' id=%s %s x %s\",\n \"3006\": \"cocos2d: '%s' id= HTMLCanvasElement %s x %s\",\n \"3007\": \"cocos2d: TextureCache dumpDebugInfo: %s textures, HTMLCanvasElement for %s KB (%s MB)\",\n \"3103\": \"cc.Texture.addImage(): path should be non-null\",\n \"3112\": \"cc.Texture.addImage(): path should be non-null\",\n \"3113\": \"NSInternalInconsistencyException\",\n \"3116\": \"WebGLRenderingContext.CLAMP_TO_EDGE should be used in NPOT textures\",\n \"3117\": \"Mimpap texture only works in POT textures\",\n \"3119\": \"Lazy init texture with image element failed due to image loading failure: %s\",\n \"3120\": \"Loading texture with unsupported type: '%s'. Add '%s' into 'cc.macro.SUPPORT_TEXTURE_FORMATS' please.\",\n \"3121\": \"Can't find a texture format supported by the current platform! Please add a fallback format in the editor.\",\n \"3300\": \"Rect width exceeds maximum margin: %s\",\n \"3400\": \"Rect height exceeds maximum margin: %s\",\n \"3401\": \"Set texture with a url of image is not supported anymore. Please use cc.assetManager.loadRemote to load a texture first.\",\n \"3500\": \"0 priority is forbidden for fixed priority since it's used for scene graph based priority.\",\n \"3501\": \"Invalid listener type!\",\n \"3502\": \"Can't set fixed priority with scene graph based listener.\",\n \"3503\": \"Invalid parameters.\",\n \"3504\": \"listener must be a cc.EventListener object when adding a fixed priority listener\",\n \"3505\": \"The listener has been registered, please don't register it again.\",\n \"3506\": \"Unsupported listener target.\",\n \"3507\": \"Invalid scene graph priority!\",\n \"3508\": \"If program goes here, there should be event in dispatch.\",\n \"3509\": \"_inDispatch should be 1 here.\",\n \"3510\": \"%s's scene graph node not contains in the parent's children\",\n \"3511\": \"event is undefined\",\n \"3600\": \"cc.Class will automatically call super constructor of %s, you should not call it manually.\",\n \"3601\": \"The editor property 'playOnFocus' should be used with 'executeInEditMode' in class '%s'\",\n \"3602\": \"Unknown editor property '%s' in class '%s'.\",\n \"3603\": \"Use 'cc.Float' or 'cc.Integer' instead of 'cc.Number' please.\",\n \"3604\": \"Can only indicate one type attribute for %s.\",\n \"3605\": \"The default value of %s is not instance of %s.\",\n \"3606\": \"No needs to indicate the '%s' attribute for %s, which its default value is type of %s.\",\n \"3607\": \"The default value of %s must be an empty string.\",\n \"3608\": \"The type of %s must be cc.String, not String.\",\n \"3609\": \"The type of %s must be cc.Boolean, not Boolean.\",\n \"3610\": \"The type of %s must be cc.Float or cc.Integer, not Number.\",\n \"3611\": \"Can not indicate the '%s' attribute for %s, which its default value is type of %s.\",\n \"3612\": \"%s Just set the default value to 'new %s()' and it will be handled properly.\",\n \"3613\": \"'No need to use 'serializable: false' or 'editorOnly: true' for the getter of '%s.%s', every getter is actually non-serialized.\",\n \"3614\": \"Should not define constructor for cc.Component %s.\",\n \"3615\": \"Each script can have at most one Component.\",\n \"3616\": \"Should not specify class name %s for Component which defines in project.\",\n \"3617\": \"Can not instantiate CCClass '%s' with arguments.\",\n \"3618\": \"ctor of '%s' can not be another CCClass\",\n \"3619\": \"ctor of '%s' must be function type\",\n \"3620\": \"this._super declared in '%s.%s' but no super method defined\",\n \"3621\": \"Unknown type of %s.%s, maybe you want is '%s'.\",\n \"3622\": \"Unknown type of %s.%s, property should be defined in 'properties' or 'ctor'\",\n \"3623\": \"Can not use 'editor' attribute, '%s' not inherits from Components.\",\n \"3624\": \"'%s' overrided '%s' but '%s' is defined as 'false' so the super method will not be called. You can set '%s' to null to disable this warning.\",\n \"3625\": \"[isChildClassOf] superclass should be function type, not\",\n \"3626\": \"Can't remove '%s' because '%s' depends on it.\",\n \"3627\": \"Should not add renderer component (%s) to a Canvas node.\",\n \"3628\": \"Should not add %s to a node which size is already used by its other component.\",\n \"3633\": \"Properties function of '%s' should return an object!\",\n \"3634\": \"Disallow to use '.' in property name\",\n \"3635\": \"Default array must be empty, set default value of %s.%s to [], and initialize in 'onLoad' or 'ctor' please. (just like 'this.%s = [...];')\",\n \"3636\": \"Do not set default value to non-empty object, unless the object defines its own 'clone' function. Set default value of %s.%s to null or {}, and initialize in 'onLoad' or 'ctor' please. (just like 'this.%s = {foo: bar};')\",\n \"3637\": \"Can not declare %s.%s, it is already defined in the prototype of %s\",\n \"3638\": \"'%s': the getter of '%s' is already defined!\",\n \"3639\": \"Can not apply the specified attribute to the getter of '%s.%s', attribute index: %s\",\n \"3640\": \"'%s': the setter of '%s' is already defined!\",\n \"3641\": \"Can not construct %s because it contains object property.\",\n \"3642\": \"Cannot define %s.%s because static member name can not be '%s'.\",\n \"3643\": \"Can not define a member called 'constructor' in the class '%s', please use 'ctor' instead.\",\n \"3644\": \"Please define 'type' parameter of %s.%s as the actual constructor.\",\n \"3645\": \"Please define 'type' parameter of %s.%s as the constructor of %s.\",\n \"3646\": \"Unknown 'type' parameter of %s.%s%s\",\n \"3647\": \"The length of range array must be equal or greater than 2\",\n \"3648\": \"Can not declare %s.%s method, it is already defined in the properties of %s.\",\n \"3649\": \"CCClass %s have conflict between its ctor and __ctor__.\",\n \"3651\": \"Can not call `_super` or `prototype.ctor` in ES6 Classes \\\"%s\\\", use `super` instead please.\",\n \"3652\": \"Failed to `new %s()` under the hood, %s\\nIt is used for getting default values declared in TypeScript in the first place.\\nPlease ensure the constructor can be called during the script's initialization.\",\n \"3653\": \"Please do not specifiy \\\"default\\\" attribute in decorator of \\\"%s\\\" property in \\\"%s\\\" class. \\nDefault value must be initialized at their declaration:\\n \\n// Before:\\n@property({\\n type: cc.SpriteFrame\\n default: null // <--\\n})\\nmyProp;\\n// After:\\n@property({\\n type: cc.SpriteFrame\\n})\\nmyProp = null; // <--\",\n \"3654\": \"Please specifiy a default value for \\\"%s.%s\\\" at its declaration:\\n \\n// Before:\\n@property(...)\\nmyProp;\\n// After:\\n@property(...)\\nmyProp = 0;\",\n \"3655\": \"Can not specifiy \\\"get\\\" or \\\"set\\\" attribute in decorator for \\\"%s\\\" property in \\\"%s\\\" class. \\nPlease use:\\n \\n@property(...)\\nget %s () {\\n ...\\n}\\n@property\\nset %s (value) {\\n ...\\n}\",\n \"3700\": \"internal error: _prefab is undefined\",\n \"3701\": \"Failed to load prefab asset for node '%s'\",\n \"3800\": \"The target can not be made persist because it's not a cc.Node or it doesn't have _id property.\",\n \"3801\": \"The node can not be made persist because it's not under root node.\",\n \"3802\": \"The node can not be made persist because it's not in current scene.\",\n \"3803\": \"The target can not be made persist because it's not a cc.Node or it doesn't have _id property.\",\n \"3804\": \"getComponent: Type must be non-nil\",\n \"3805\": \"Can't add component '%s' because %s already contains the same component.\",\n \"3806\": \"Can't add component '%s' to %s because it conflicts with the existing '%s' derived component.\",\n \"3807\": \"addComponent: Failed to get class '%s'\",\n \"3808\": \"addComponent: Should not add component ('%s') when the scripts are still loading.\",\n \"3809\": \"addComponent: The component to add must be a constructor\",\n \"3810\": \"addComponent: The component to add must be child class of cc.Component\",\n \"3811\": \"_addComponentAt: The component to add must be a constructor\",\n \"3812\": \"_addComponentAt: Index out of range\",\n \"3813\": \"removeComponent: Component must be non-nil\",\n \"3814\": \"Argument must be non-nil\",\n \"3815\": \"Component not owned by this entity\",\n \"3816\": \"Node '%s' is already activating\",\n \"3817\": \"Sorry, the component of '%s' which with an index of %s is corrupted! It has been removed.\",\n \"3818\": \"Failed to read or parse project.json\",\n \"3819\": \"Warning: target element is not a DIV or CANVAS\",\n \"3820\": \"The renderer doesn't support the renderMode %s\",\n \"3821\": \"Cannot change hierarchy while activating or deactivating the parent.\",\n \"3900\": \"Invalid clip to add\",\n \"3901\": \"Invalid clip to remove\",\n \"3902\": \"clip is defaultClip, set force to true to force remove clip and animation state\",\n \"3903\": \"animation state is playing, set force to true to force stop and remove clip and animation state\",\n \"3904\": \"motion path of target [%s] in prop [%s] frame [%s] is not valid\",\n \"3905\": \"sprite frames must be an Array.\",\n \"3906\": \"Can't find easing type [%s]\",\n \"3907\": \"animator not added or already removed\",\n \"3912\": \"already-playing\",\n \"4003\": \"Label font size can't be shirnked less than 0!\",\n \"4004\": \"force notify all fonts loaded!\",\n \"4011\": \"Property spriteFrame of Font '%s' is invalid. Using system font instead.\",\n \"4012\": \"The texture of Font '%s' must be already loaded on JSB. Using system font instead.\",\n \"4013\": \"Sorry, lineHeight of system font not supported on JSB.\",\n \"4200\": \"MaskType: IMAGE_STENCIL only support WebGL mode.\",\n \"4201\": \"The alphaThreshold invalid in Canvas Mode.\",\n \"4202\": \"The inverted invalid in Canvas Mode.\",\n \"4300\": \"can not found the %s page.\",\n \"4400\": \"Invalid RichText img tag! The sprite frame name can't be found in the ImageAtlas!\",\n \"4600\": \"Script attached to '%s' is missing or invalid.\",\n \"4700\": \"The dom control is not created!\",\n \"4800\": \"unknown asset type\",\n \"4901\": \"loadRes: should not specify the extname in %s %s\",\n \"4902\": \"No need to release non-cached asset.\",\n \"4914\": \"Resources url '%s' does not exist.\",\n \"4915\": \"Pack indices and data do not match in size\",\n \"4916\": \"Failed to download package for %s\",\n \"4921\": \"Invalid pipe or invalid index provided!\",\n \"4922\": \"The pipe to be inserted is already in the pipeline!\",\n \"4923\": \"Uuid Loader: Parse asset [ %s ] failed : %s\",\n \"4924\": \"JSON Loader: Input item doesn't contain string content\",\n \"4925\": \"Uuid Loader: Deserialize asset [ %s ] failed : %s\",\n \"4926\": \"Audio Downloader: no web audio context.\",\n \"4927\": \"Audio Downloader: audio not supported on this browser!\",\n \"4928\": \"Load %s failed!\",\n \"4929\": \"Load Webp ( %s ) failed\",\n \"4930\": \"Load image ( %s ) failed\",\n \"4932\": \"Since v1.10, for any atlas (\\\"%s\\\") in the \\\"resources\\\" directory, it is not possible to find the contained SpriteFrames via `loadRes`, `getRes` or `releaseRes`. Load the SpriteAtlas first and then use `spriteAtlas.getSpriteFrame(name)` instead please.\",\n \"4933\": \"Download Font [ %s ] failed, using Arial or system default font instead\",\n \"5000\": \"object already destroyed\",\n \"5001\": \"object not yet destroyed\",\n \"5100\": \"Not a plist file!\",\n \"5200\": \"Warning: localStorage isn't enabled. Please confirm browser cookie or privacy option\",\n \"5201\": \"browser don't support web audio\",\n \"5202\": \"This feature supports WebGL render mode only.\",\n \"5300\": \"Type of target to deserialize not matched with data: target is %s, data is %s\",\n \"5301\": \"Can not find script '%s'\",\n \"5302\": \"Can not find class '%s'\",\n \"5303\": \"Failed to deserialize %s, missing _deserialize function.\",\n \"5304\": \"Unable to deserialize version %s data.\",\n \"5402\": \"cc.js.addon called on non-object:\",\n \"5403\": \"cc.js.mixin: arguments must be type object:\",\n \"5404\": \"The base class to extend from must be non-nil\",\n \"5405\": \"The class to extend must be non-nil\",\n \"5406\": \"Class should be extended before assigning any prototype members.\",\n \"5500\": \"'notify' can not be used in 'get/set' !\",\n \"5501\": \"'notify' must be used with 'default' !\",\n \"5507\": \"The 'default' attribute of '%s.%s' must be an array\",\n \"5508\": \"Invalid type of %s.%s\",\n \"5510\": \"The 'type' attribute of '%s.%s' can not be 'Number', use cc.Float or cc.Integer instead please.\",\n \"5511\": \"The 'type' attribute of '%s.%s' is undefined when loading script\",\n \"5512\": \"Can not serialize '%s.%s' because the specified type is anonymous, please provide a class name or set the 'serializable' attribute of '%s.%s' to 'false'.\",\n \"5513\": \"The 'default' value of '%s.%s' should not be used with a 'get' function.\",\n \"5514\": \"The 'default' value of '%s.%s' should not be used with a 'set' function.\",\n \"5515\": \"The 'default' value of '%s.%s' can not be an constructor. Set default to null please.\",\n \"5516\": \"Property '%s.%s' must define at least one of 'default', 'get' or 'set'.\",\n \"5517\": \"'%s.%s' hides inherited property '%s.%s'. To make the current property override that implementation, add the `override: true` attribute please.\",\n \"5601\": \"Can not get current scene.\",\n \"5602\": \"Scene is destroyed\",\n \"5603\": \"reference node is destroyed\",\n \"5700\": \"no %s or %s on %s\",\n \"5800\": \"%s.lerp not yet implemented.\",\n \"5801\": \"%s.clone not yet implemented.\",\n \"5802\": \"%s.equals not yet implemented.\",\n \"5900\": \"MotionStreak only support WebGL mode.\",\n \"5901\": \"cc.MotionStreak.getOpacity has not been supported.\",\n \"5902\": \"cc.MotionStreak.setOpacity has not been supported.\",\n \"6000\": \"Custom should not be false if file is not specified.\",\n \"6001\": \"The new %s must not be NaN\",\n \"6017\": \"Incomplete or corrupt PNG file\",\n \"6018\": \"Invalid filter algorithm: %s\",\n \"6019\": \"Invalid byte order value.\",\n \"6020\": \"You forgot your towel!\",\n \"6021\": \"Unknown Field Tag: %s\",\n \"6022\": \"Too many bits requested\",\n \"6023\": \"No bits requested\",\n \"6024\": \"Cannot recover from missing StripByteCounts\",\n \"6025\": \"Cannot handle sub-byte bits per sample\",\n \"6026\": \"Cannot handle sub-byte bits per pixel\",\n \"6027\": \"Palette image missing color map\",\n \"6028\": \"Unknown Photometric Interpretation: %s\",\n \"6029\": \"Unkown error\",\n \"6030\": \"cc.ParticleSystem: error decoding or ungzipping textureImageData in plist '%s'\",\n \"6031\": \"cc.ParticleSystem: unknown image format with Data in plist %s\",\n \"6032\": \"cc.ParticleSystem.initWithDictionary() : error loading the texture in plist '%s'\",\n \"6400\": \"asset.url is not usable in core process\",\n \"6402\": \"AssetLibrary has already been initialized!\",\n \"6500\": \"Widget target must be one of the parent nodes of it\",\n \"6600\": \"collider not added or already removed\",\n \"6601\": \"Can't find testFunc for (%s, $s).\",\n \"6700\": \"Can't init canvas '%s' because it conflicts with the existing '%s', the scene should only have one active canvas at the same time.\",\n \"6800\": \"Callback of event must be non-nil\",\n \"6801\": \"The message must be provided\",\n \"6900\": \"The thing you want to instantiate must be an object\",\n \"6901\": \"The thing you want to instantiate is nil\",\n \"6902\": \"The thing you want to instantiate is destroyed\",\n \"6903\": \"The instantiate method for given asset do not implemented\",\n \"6904\": \"Can not instantiate array\",\n \"6905\": \"Can not instantiate DOM element\",\n \"7100\": \"%s already defined in Enum.\",\n \"7101\": \"Sorry, 'cc.Enum' not available on this platform, please report this error here: https://github.com/cocos-creator/engine/issues/new\",\n \"7200\": \"Method 'initWithTMXFile' is no effect now, please set property 'tmxAsset' instead.\",\n \"7201\": \"Method 'initWithXML' is no effect now, please set property 'tmxAsset' instead.\",\n \"7202\": \"Add component TiledLayer into node failed.\",\n \"7203\": \"Property 'mapLoaded' is unused now. Please write the logic to the callback 'start'.\",\n \"7210\": \"TMX Hexa zOrder not supported\",\n \"7211\": \"TMX invalid value\",\n \"7215\": \"cocos2d: Warning: TMX Layer %s has no tiles\",\n \"7216\": \"cocos2d: TMXFormat: Unsupported TMX version: %s\",\n \"7217\": \"cocos2d: TMXFomat: Unsupported orientation: %s\",\n \"7218\": \"cc.TMXMapInfo.parseXMLFile(): unsupported compression method\",\n \"7219\": \"cc.TMXMapInfo.parseXMLFile(): Only base64 and/or gzip/zlib maps are supported\",\n \"7221\": \"cc.TMXMapInfo.parseXMLFile(): Texture '%s' not found.\",\n \"7222\": \"Parse %s failed.\",\n \"7236\": \"cc.TMXLayer.getTileAt(): TMXLayer: the tiles map has been released\",\n \"7237\": \"cc.TMXLayer.getTileGIDAt(): TMXLayer: the tiles map has been released\",\n \"7238\": \"cc.TMXLayer.setTileGID(): TMXLayer: the tiles map has been released\",\n \"7239\": \"cc.TMXLayer.setTileGID(): invalid gid: %s\",\n \"7240\": \"cc.TMXLayer.getTileFlagsAt(): TMXLayer: the tiles map has been released\",\n \"7241\": \"cc.TiledMap.initWithXML(): Map not found. Please check the filename.\",\n \"7401\": \"Failed to set _defaultArmatureIndex for '%s' because the index is out of range.\",\n \"7402\": \"Failed to set _animationIndex for '%s' because the index is out of range.\",\n \"7501\": \"Failed to set _defaultSkinIndex for '%s' because the index is out of range.\",\n \"7502\": \"Failed to set _animationIndex for '%s' because its skeletonData is invalid.\",\n \"7503\": \"Failed to set _animationIndex for '%s' because the index is out of range.\",\n \"7504\": \"Can not render dynamic created SkeletonData\",\n \"7506\": \"Failed to load spine atlas '$s'\",\n \"7507\": \"Please re-import '%s' because its textures is not initialized! (This workflow will be improved in the future.)\",\n \"7508\": \"The atlas asset of '%s' is not exists!\",\n \"7509\": \"Spine: Animation not found: %s\",\n \"7510\": \"Spine: Animation not found: %s\",\n \"7600\": \"The context of RenderTexture is invalid.\",\n \"7601\": \"cc.RenderTexture._initWithWidthAndHeightForWebGL() : only RGB and RGBA formats are valid for a render texture;\",\n \"7602\": \"Could not attach texture to the framebuffer\",\n \"7603\": \"clearDepth isn't supported on Cocos2d-Html5\",\n \"7604\": \"saveToFile isn't supported on Cocos2d-Html5\",\n \"7605\": \"newCCImage isn't supported on Cocos2d-Html5\",\n \"7700\": \"On the web is always keep the aspect ratio\",\n \"7701\": \"Can't know status\",\n \"7702\": \"Video player's duration is not ready to get now!\",\n \"7800\": \"Web does not support loading\",\n \"7801\": \"Web does not support query history\",\n \"7802\": \"Web does not support query history\",\n \"7803\": \"The current browser does not support the GoBack\",\n \"7804\": \"The current browser does not support the GoForward\",\n \"7805\": \"Web does not support zoom\",\n \"7900\": \"cc.math.Matrix3.assign(): current matrix equals matIn\",\n \"7901\": \"cc.math.mat4Assign(): pOut equals pIn\",\n \"7902\": \"cc.mat.Matrix4.assignFrom(): mat4 equals current matrix\",\n \"7903\": \"cc.math.Matrix4 equal: pMat1 and pMat2 are same object.\",\n \"7904\": \"cc.math.Matrix4.extractPlane: Invalid plane index\",\n \"7905\": \"cc.math.mat4Assign(): pOut equals pIn\",\n \"7906\": \"cc.mat.Matrix4.assignFrom(): mat4 equals current matrix\",\n \"7907\": \"cc.math.Matrix4 equals: pMat1 and pMat2 are same object.\",\n \"7908\": \"Invalid matrix mode specified\",\n \"7909\": \"current quaternion is an invalid value\",\n \"8000\": \"Can't handle this field type or size\",\n \"8001\": \"No bytes requested\",\n \"8002\": \"Too many bytes requested\",\n \"8003\": \"Missing StripByteCounts!\",\n \"8103\": \"cc.GLProgram.link(): Cannot link invalid program\",\n \"8104\": \"cocos2d: ERROR: Failed to link program: %s\",\n \"8105\": \"cocos2d: cc.shaderCache._loadDefaultShader, error shader type\",\n \"8106\": \"Please load the resource firset : %s\",\n \"8107\": \"cc.GLProgram.getUniformLocationForName(): uniform name should be non-null\",\n \"8108\": \"cc.GLProgram.getUniformLocationForName(): Invalid operation. Cannot get uniform location when program is not initialized\",\n \"8109\": \"modelView matrix is undefined.\",\n \"8200\": \"Please set node's active instead of rigidbody's enabled.\",\n \"8300\": \"Should only one camera exists, please check your project.\",\n \"8301\": \"Camera does not support Canvas Mode.\",\n \"8400\": \"Wrong type arguments, 'filePath' must be a String.\",\n \"8401\": \"Since 1.10, `%s` accept %s instance directly, not a URL string. Please directly reference the %s object in your script, or load %s by loader first. Don't use %s's URL anymore.\",\n \"9000\": \"Stencil manager does not support level bigger than %d in this device.\",\n \"9001\": \"Stencil manager is already empty, cannot pop any mask.\",\n \"9100\": \"LabelAtlas '%s' cannot be loaded, raw texture does not exist.\",\n \"9101\": \"LabelAtlas '%s' cannot be loaded, fnt data does not exist.\",\n \"9102\": \"Program not support highp precision, will change to mediump.\",\n \"9103\": \"%s : Failed to set property [%s], property not found.\",\n \"9104\": \"%s : Failed to define [%s], define not found.\",\n \"9105\": \"%s : Failed to set property [%s], property length not correct.\",\n \"9106\": \"%s : Set property [%s] warning : should transform object to ArrayBuffer.\",\n \"9107\": \"%s : illegal property: [%s], myabe defined an unused property;\",\n \"9200\": \"cc.view.enableAntiAlias is deprecated, please use cc.Texture2D.setFilters instead\",\n \"0100\": \"%s not yet implemented.\"\n}",null,"/****************************************************************************\n Copyright (c) 2008-2010 Ricardo Quesada\n Copyright (c) 2011-2012 cocos2d-x.org\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos2d-x.org\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nrequire('../core/platform/CCClass');\nconst misc = require('../core/utils/misc');\n\n/**\n * @module cc\n */\n\n/**\n * !#en Base class cc.Action for action classes.\n * !#zh Action 类是所有动作类型的基类。\n * @class Action\n */\ncc.Action = cc.Class({\n name: 'cc.Action',\n\n //**************Public Functions***********\n\n ctor:function () {\n this.originalTarget = null;\n this.target = null;\n this.tag = cc.Action.TAG_INVALID;\n },\n\n /**\n * !#en\n * to copy object with deep copy.\n * returns a clone of action.\n * !#zh 返回一个克隆的动作。\n * @method clone\n * @return {Action}\n */\n clone:function () {\n var action = new cc.Action();\n action.originalTarget = null;\n action.target = null;\n action.tag = this.tag;\n return action;\n },\n\n /**\n * !#en\n * return true if the action has finished.\n * !#zh 如果动作已完成就返回 true。\n * @method isDone\n * @return {Boolean}\n */\n isDone:function () {\n return true;\n },\n\n // called before the action start. It will also set the target.\n startWithTarget:function (target) {\n this.originalTarget = target;\n this.target = target;\n },\n\n // called after the action has finished. It will set the 'target' to nil.\n stop:function () {\n this.target = null;\n },\n\n // called every frame with it's delta time. <br />\n step:function (dt) {\n cc.logID(1006);\n },\n\n // Called once per frame. Time is the number of seconds of a frame interval.\n update:function (dt) {\n cc.logID(1007);\n },\n\n /**\n * !#en get the target.\n * !#zh 获取当前目标节点。\n * @method getTarget\n * @return {Node}\n */\n getTarget:function () {\n return this.target;\n },\n\n /**\n * !#en The action will modify the target properties.\n * !#zh 设置目标节点。\n * @method setTarget\n * @param {Node} target\n */\n setTarget:function (target) {\n this.target = target;\n },\n\n /**\n * !#en get the original target.\n * !#zh 获取原始目标节点。\n * @method getOriginalTarget\n * @return {Node}\n */\n getOriginalTarget:function () {\n return this.originalTarget;\n },\n\n // Set the original target, since target can be nil.\n // Is the target that were used to run the action.\n // Unless you are doing something complex, like cc.ActionManager, you should NOT call this method.\n setOriginalTarget:function (originalTarget) {\n this.originalTarget = originalTarget;\n },\n\n /**\n * !#en get tag number.\n * !#zh 获取用于识别动作的标签。\n * @method getTag\n * @return {Number}\n */\n getTag:function () {\n return this.tag;\n },\n\n /**\n * !#en set tag number.\n * !#zh 设置标签,用于识别动作。\n * @method setTag\n * @param {Number} tag\n */\n setTag:function (tag) {\n this.tag = tag;\n },\n\n // Currently JavaScript Bindigns (JSB), in some cases, needs to use retain and release. This is a bug in JSB,\n // and the ugly workaround is to use retain/release. So, these 2 methods were added to be compatible with JSB.\n // This is a hack, and should be removed once JSB fixes the retain/release bug.\n retain:function () {\n },\n\n // Currently JavaScript Bindigns (JSB), in some cases, needs to use retain and release. This is a bug in JSB,\n // and the ugly workaround is to use retain/release. So, these 2 methods were added to be compatible with JSB.\n // This is a hack, and should be removed once JSB fixes the retain/release bug.\n release:function () {\n }\n});\n\n/**\n * !#en Default Action tag.\n * !#zh 默认动作标签。\n * @property TAG_INVALID\n * @constant\n * @static\n * @type {Number}\n * @default -1\n */\ncc.Action.TAG_INVALID = -1;\n\n\n/**\n * !#en\n * Base class actions that do have a finite time duration. <br/>\n * Possible actions: <br/>\n * - An action with a duration of 0 seconds. <br/>\n * - An action with a duration of 35.5 seconds.\n *\n * Infinite time actions are valid\n * !#zh 有限时间动作,这种动作拥有时长 duration 属性。\n * @class FiniteTimeAction\n * @extends Action\n */\ncc.FiniteTimeAction = cc.Class({\n name: 'cc.FiniteTimeAction',\n extends: cc.Action,\n\n ctor:function () {\n //! duration in seconds\n this._duration = 0;\n },\n\n /**\n * !#en get duration of the action. (seconds).\n * !#zh 获取动作以秒为单位的持续时间。\n * @method getDuration\n * @return {Number}\n */\n getDuration:function () {\n return this._duration * (this._timesForRepeat || 1);\n },\n\n /**\n * !#en set duration of the action. (seconds).\n * !#zh 设置动作以秒为单位的持续时间。\n * @method setDuration\n * @param {Number} duration\n */\n setDuration:function (duration) {\n this._duration = duration;\n },\n\n /**\n * !#en\n * Returns a reversed action. <br />\n * For example: <br />\n * - The action will be x coordinates of 0 move to 100. <br />\n * - The reversed action will be x of 100 move to 0.\n * - Will be rewritten\n * !#zh 返回一个新的动作,执行与原动作完全相反的动作。\n * @method reverse\n * @return {Null}\n */\n reverse:function () {\n cc.logID(1008);\n return null;\n },\n\n /**\n * !#en\n * to copy object with deep copy.\n * returns a clone of action.\n * !#zh 返回一个克隆的动作。\n * @method clone\n * @return {FiniteTimeAction}\n */\n clone:function () {\n return new cc.FiniteTimeAction();\n }\n});\n\n/**\n * @module cc\n */\n\n/*\n * Changes the speed of an action, making it take longer (speed > 1)\n * or less (speed < 1) time. <br/>\n * Useful to simulate 'slow motion' or 'fast forward' effect.\n *\n * @warning This action can't be Sequenceable because it is not an cc.IntervalAction\n * @class Speed\n * @extends Action\n *\n * @param {ActionInterval} action\n * @param {Number} speed\n */\ncc.Speed = cc.Class({\n name: 'cc.Speed',\n extends: cc.Action,\n\n ctor:function (action, speed) {\n this._speed = 0;\n this._innerAction = null;\n\n\t\taction && this.initWithAction(action, speed);\n },\n\n /*\n * Gets the current running speed. <br />\n * Will get a percentage number, compared to the original speed.\n *\n * @method getSpeed\n * @return {Number}\n */\n getSpeed:function () {\n return this._speed;\n },\n\n /*\n * alter the speed of the inner function in runtime.\n * @method setSpeed\n * @param {Number} speed\n */\n setSpeed:function (speed) {\n this._speed = speed;\n },\n\n /*\n * initializes the action.\n * @method initWithAction\n * @param {ActionInterval} action\n * @param {Number} speed\n * @return {Boolean}\n */\n initWithAction:function (action, speed) {\n if (!action) {\n cc.errorID(1021);\n return false;\n }\n\n this._innerAction = action;\n this._speed = speed;\n return true;\n },\n\n clone:function () {\n var action = new cc.Speed();\n action.initWithAction(this._innerAction.clone(), this._speed);\n return action;\n },\n\n startWithTarget:function (target) {\n cc.Action.prototype.startWithTarget.call(this, target);\n this._innerAction.startWithTarget(target);\n },\n\n stop:function () {\n this._innerAction.stop();\n cc.Action.prototype.stop.call(this);\n },\n\n step:function (dt) {\n this._innerAction.step(dt * this._speed);\n },\n\n isDone:function () {\n return this._innerAction.isDone();\n },\n\n reverse:function () {\n return new cc.Speed(this._innerAction.reverse(), this._speed);\n },\n\n /*\n * Set inner Action.\n * @method setInnerAction\n * @param {ActionInterval} action\n */\n setInnerAction:function (action) {\n if (this._innerAction !== action) {\n this._innerAction = action;\n }\n },\n\n /*\n * Get inner Action.\n * @method getInnerAction\n * @return {ActionInterval}\n */\n getInnerAction:function () {\n return this._innerAction;\n }\n});\n\n/**\n * @module cc\n */\n\n/**\n * !#en\n * Creates the speed action which changes the speed of an action, making it take longer (speed > 1)\n * or less (speed < 1) time. <br/>\n * Useful to simulate 'slow motion' or 'fast forward' effect.\n * !#zh 修改目标动作的速率。\n * @warning This action can't be Sequenceable because it is not an cc.IntervalAction\n *\n * @method speed\n * @param {ActionInterval} action\n * @param {Number} speed\n * @return {Action}\n * @example\n * // change the target action speed;\n * var action = cc.scaleTo(0.2, 1, 0.6);\n * var newAction = cc.speed(action, 0.5);\n */\ncc.speed = function (action, speed) {\n return new cc.Speed(action, speed);\n};\n\n/*\n * cc.Follow is a follow action which makes its target follows another node.\n *\n * @example\n * //example\n * //Instead of using cc.Camera as a \"follower\", use this action instead.\n * layer.runAction(cc.follow(hero));\n *\n * @property {Number} leftBoundary - world leftBoundary.\n * @property {Number} rightBoundary - world rightBoundary.\n * @property {Number} topBoundary - world topBoundary.\n * @property {Number} bottomBoundary - world bottomBoundary.\n *\n * @param {cc.Node} followedNode\n * @param {Rect} rect\n * @example\n * // creates the action with a set boundary\n * var followAction = new cc.Follow(node, cc.rect(0, 0, s.width * 2 - 100, s.height));\n * this.runAction(followAction);\n *\n * // creates the action with no boundary set\n * var followAction = new cc.Follow(node);\n * this.runAction(followAction);\n *\n * @class\n * @extends Action\n */\ncc.Follow = cc.Class({\n name: 'cc.Follow',\n extends: cc.Action,\n\n\t/*\n * Constructor function, override it to extend the construction behavior, remember to call \"this._super()\" in the extended \"ctor\" function. <br />\n\t * creates the action with a set boundary. <br/>\n\t * creates the action with no boundary set.\n * @param {cc.Node} followedNode\n * @param {Rect} rect\n\t */\n ctor:function (followedNode, rect) {\n // node to follow\n this._followedNode = null;\n // whether camera should be limited to certain area\n this._boundarySet = false;\n // if screen size is bigger than the boundary - update not needed\n this._boundaryFullyCovered = false;\n // fast access to the screen dimensions\n this._halfScreenSize = null;\n this._fullScreenSize = null;\n\n this.leftBoundary = 0.0;\n this.rightBoundary = 0.0;\n this.topBoundary = 0.0;\n this.bottomBoundary = 0.0;\n this._worldRect = cc.rect(0, 0, 0, 0);\n\n\t\tif(followedNode)\n\t\t\trect ? this.initWithTarget(followedNode, rect)\n\t\t\t\t : this.initWithTarget(followedNode);\n },\n\n clone:function () {\n var action = new cc.Follow();\n var locRect = this._worldRect;\n var rect = new cc.Rect(locRect.x, locRect.y, locRect.width, locRect.height);\n action.initWithTarget(this._followedNode, rect);\n return action;\n },\n\n /*\n * Get whether camera should be limited to certain area.\n *\n * @return {Boolean}\n */\n isBoundarySet:function () {\n return this._boundarySet;\n },\n\n /*\n * alter behavior - turn on/off boundary.\n *\n * @param {Boolean} value\n */\n setBoundarySet:function (value) {\n this._boundarySet = value;\n },\n\n /*\n * alter behavior - turn on/off boundary.\n *\n * @param {Boolean} value\n * @deprecated since v2.4.6 , cc.Follow.setBoudarySet is deprecated, please use cc.Follow.setBoundarySet.\n */\n setBoudarySet:function (value) {\n this.setBoundarySet(value);\n },\n\n /*\n * initializes the action with a set boundary.\n *\n * @param {cc.Node} followedNode\n * @param {Rect} [rect=]\n * @return {Boolean}\n */\n initWithTarget:function (followedNode, rect) {\n if (!followedNode) {\n cc.errorID(1022);\n return false;\n }\n\n var _this = this;\n rect = rect || cc.rect(0, 0, 0, 0);\n _this._followedNode = followedNode;\n _this._worldRect = rect;\n\n _this._boundarySet = !(rect.width === 0 && rect.height === 0);\n\n _this._boundaryFullyCovered = false;\n\n var winSize = cc.winSize;\n _this._fullScreenSize = cc.v2(winSize.width, winSize.height);\n _this._halfScreenSize = _this._fullScreenSize.mul(0.5);\n\n if (_this._boundarySet) {\n _this.leftBoundary = -((rect.x + rect.width) - _this._fullScreenSize.x);\n _this.rightBoundary = -rect.x;\n _this.topBoundary = -rect.y;\n _this.bottomBoundary = -((rect.y + rect.height) - _this._fullScreenSize.y);\n\n if (_this.rightBoundary < _this.leftBoundary) {\n // screen width is larger than world's boundary width\n //set both in the middle of the world\n _this.rightBoundary = _this.leftBoundary = (_this.leftBoundary + _this.rightBoundary) / 2;\n }\n if (_this.topBoundary < _this.bottomBoundary) {\n // screen width is larger than world's boundary width\n //set both in the middle of the world\n _this.topBoundary = _this.bottomBoundary = (_this.topBoundary + _this.bottomBoundary) / 2;\n }\n\n if ((_this.topBoundary === _this.bottomBoundary) && (_this.leftBoundary === _this.rightBoundary))\n _this._boundaryFullyCovered = true;\n }\n return true;\n },\n\n step:function (dt) {\n var targetWorldPos = this.target.convertToWorldSpaceAR(cc.Vec2.ZERO);\n var followedWorldPos = this._followedNode.convertToWorldSpaceAR(cc.Vec2.ZERO);\n // compute the offset between followed and target node\n var delta = targetWorldPos.sub(followedWorldPos);\n var tempPos = this.target.parent.convertToNodeSpaceAR(delta.add(this._halfScreenSize));\n\n if (this._boundarySet) {\n // whole map fits inside a single screen, no need to modify the position - unless map boundaries are increased\n if (this._boundaryFullyCovered)\n return;\n\n\t this.target.setPosition(misc.clampf(tempPos.x, this.leftBoundary, this.rightBoundary), misc.clampf(tempPos.y, this.bottomBoundary, this.topBoundary));\n } else {\n this.target.setPosition(tempPos.x, tempPos.y);\n }\n },\n\n isDone:function () {\n return ( !this._followedNode.activeInHierarchy );\n },\n\n stop:function () {\n this.target = null;\n cc.Action.prototype.stop.call(this);\n }\n});\n\n/**\n * !#en Create a follow action which makes its target follows another node.\n * !#zh 追踪目标节点的位置。\n * @method follow\n * @param {Node} followedNode\n * @param {Rect} rect\n * @return {Action|Null} returns the cc.Follow object on success\n * @example\n * // example\n * // creates the action with a set boundary\n * var followAction = cc.follow(targetNode, cc.rect(0, 0, screenWidth * 2 - 100, screenHeight));\n * node.runAction(followAction);\n *\n * // creates the action with no boundary set\n * var followAction = cc.follow(targetNode);\n * node.runAction(followAction);\n */\ncc.follow = function (followedNode, rect) {\n return new cc.Follow(followedNode, rect);\n};\n","/****************************************************************************\n Copyright (c) 2008 Radu Gruian\n Copyright (c) 2008-2010 Ricardo Quesada\n Copyright (c) 2011 Vit Valentin\n Copyright (c) 2011-2012 cocos2d-x.org\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos2d-x.org\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n\n Orignal code by Radu Gruian: http://www.codeproject.com/Articles/30838/Overhauser-Catmull-Rom-Splines-for-Camera-Animatio.So\n\n Adapted to cocos2d-x by Vit Valentin\n\n Adapted from cocos2d-x to cocos2d-iphone by Ricardo Quesada\n ****************************************************************************/\n\n/**\n * @module cc\n */\n\n/*\n * Returns the Cardinal Spline position for a given set of control points, tension and time. <br />\n * CatmullRom Spline formula. <br />\n * s(-ttt + 2tt - t)P1 + s(-ttt + tt)P2 + (2ttt - 3tt + 1)P2 + s(ttt - 2tt + t)P3 + (-2ttt + 3tt)P3 + s(ttt - tt)P4\n *\n * @method cardinalSplineAt\n * @param {Vec2} p0\n * @param {Vec2} p1\n * @param {Vec2} p2\n * @param {Vec2} p3\n * @param {Number} tension\n * @param {Number} t\n * @return {Vec2}\n */\nfunction cardinalSplineAt (p0, p1, p2, p3, tension, t) {\n var t2 = t * t;\n var t3 = t2 * t;\n\n /*\n * Formula: s(-ttt + 2tt - t)P1 + s(-ttt + tt)P2 + (2ttt - 3tt + 1)P2 + s(ttt - 2tt + t)P3 + (-2ttt + 3tt)P3 + s(ttt - tt)P4\n */\n var s = (1 - tension) / 2;\n\n var b1 = s * ((-t3 + (2 * t2)) - t); // s(-t3 + 2 t2 - t)P1\n var b2 = s * (-t3 + t2) + (2 * t3 - 3 * t2 + 1); // s(-t3 + t2)P2 + (2 t3 - 3 t2 + 1)P2\n var b3 = s * (t3 - 2 * t2 + t) + (-2 * t3 + 3 * t2); // s(t3 - 2 t2 + t)P3 + (-2 t3 + 3 t2)P3\n var b4 = s * (t3 - t2); // s(t3 - t2)P4\n\n var x = (p0.x * b1 + p1.x * b2 + p2.x * b3 + p3.x * b4);\n var y = (p0.y * b1 + p1.y * b2 + p2.y * b3 + p3.y * b4);\n return cc.v2(x, y);\n};\n\n/*\n * returns a point from the array\n * @method getControlPointAt\n * @param {Array} controlPoints\n * @param {Number} pos\n * @return {Array}\n */\nfunction getControlPointAt (controlPoints, pos) {\n var p = Math.min(controlPoints.length - 1, Math.max(pos, 0));\n return controlPoints[p];\n};\n\nfunction reverseControlPoints (controlPoints) {\n var newArray = [];\n for (var i = controlPoints.length - 1; i >= 0; i--) {\n newArray.push(cc.v2(controlPoints[i].x, controlPoints[i].y));\n }\n return newArray;\n}\n\nfunction cloneControlPoints (controlPoints) {\n var newArray = [];\n for (var i = 0; i < controlPoints.length; i++)\n newArray.push(cc.v2(controlPoints[i].x, controlPoints[i].y));\n return newArray;\n}\n\n\n/*\n * Cardinal Spline path. http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Cardinal_spline\n * Absolute coordinates.\n *\n * @class CardinalSplineTo\n * @extends ActionInterval\n *\n * @param {Number} duration\n * @param {Array} points array of control points\n * @param {Number} tension\n *\n * @example\n * //create a cc.CardinalSplineTo\n * var action1 = cc.cardinalSplineTo(3, array, 0);\n */\ncc.CardinalSplineTo = cc.Class({\n name: 'cc.CardinalSplineTo',\n extends: cc.ActionInterval,\n\n ctor: function (duration, points, tension) {\n /* Array of control points */\n this._points = [];\n this._deltaT = 0;\n this._tension = 0;\n this._previousPosition = null;\n this._accumulatedDiff = null;\n tension !== undefined && cc.CardinalSplineTo.prototype.initWithDuration.call(this, duration, points, tension);\n },\n\n initWithDuration:function (duration, points, tension) {\n if (!points || points.length === 0) {\n cc.errorID(1024);\n return false;\n }\n\n if (cc.ActionInterval.prototype.initWithDuration.call(this, duration)) {\n this.setPoints(points);\n this._tension = tension;\n return true;\n }\n return false;\n },\n\n clone:function () {\n var action = new cc.CardinalSplineTo();\n action.initWithDuration(this._duration, cloneControlPoints(this._points), this._tension);\n return action;\n },\n\n startWithTarget:function (target) {\n cc.ActionInterval.prototype.startWithTarget.call(this, target);\n // Issue #1441 from cocos2d-iphone\n this._deltaT = 1 / (this._points.length - 1);\n this._previousPosition = cc.v2(this.target.x, this.target.y);\n this._accumulatedDiff = cc.v2(0, 0);\n },\n\n update:function (dt) {\n dt = this._computeEaseTime(dt);\n var p, lt;\n var ps = this._points;\n // eg.\n // p..p..p..p..p..p..p\n // 1..2..3..4..5..6..7\n // want p to be 1, 2, 3, 4, 5, 6\n if (dt === 1) {\n p = ps.length - 1;\n lt = 1;\n } else {\n var locDT = this._deltaT;\n p = 0 | (dt / locDT);\n lt = (dt - locDT * p) / locDT;\n }\n\n var newPos = cardinalSplineAt(\n getControlPointAt(ps, p - 1),\n getControlPointAt(ps, p - 0),\n getControlPointAt(ps, p + 1),\n getControlPointAt(ps, p + 2),\n this._tension, lt);\n\n if (cc.macro.ENABLE_STACKABLE_ACTIONS) {\n var tempX, tempY;\n tempX = this.target.x - this._previousPosition.x;\n tempY = this.target.y - this._previousPosition.y;\n if (tempX !== 0 || tempY !== 0) {\n var locAccDiff = this._accumulatedDiff;\n tempX = locAccDiff.x + tempX;\n tempY = locAccDiff.y + tempY;\n locAccDiff.x = tempX;\n locAccDiff.y = tempY;\n newPos.x += tempX;\n newPos.y += tempY;\n }\n }\n this.updatePosition(newPos);\n },\n\n reverse:function () {\n var reversePoints = reverseControlPoints(this._points);\n return cc.cardinalSplineTo(this._duration, reversePoints, this._tension);\n },\n\n /*\n * update position of target\n * @method updatePosition\n * @param {Vec2} newPos\n */\n updatePosition:function (newPos) {\n this.target.setPosition(newPos);\n this._previousPosition = newPos;\n },\n\n /*\n * Points getter\n * @method getPoints\n * @return {Array}\n */\n getPoints:function () {\n return this._points;\n },\n\n /**\n * Points setter\n * @method setPoints\n * @param {Array} points\n */\n setPoints:function (points) {\n this._points = points;\n }\n});\n\n/**\n * !#en Creates an action with a Cardinal Spline array of points and tension.\n * !#zh 按基数样条曲线轨迹移动到目标位置。\n * @method cardinalSplineTo\n * @param {Number} duration\n * @param {Array} points array of control points\n * @param {Number} tension\n * @return {ActionInterval}\n *\n * @example\n * //create a cc.CardinalSplineTo\n * var action1 = cc.cardinalSplineTo(3, array, 0);\n */\ncc.cardinalSplineTo = function (duration, points, tension) {\n return new cc.CardinalSplineTo(duration, points, tension);\n};\n\n/*\n * Cardinal Spline path. http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Cardinal_spline\n * Relative coordinates.\n *\n * @class CardinalSplineBy\n * @extends CardinalSplineTo\n *\n * @param {Number} duration\n * @param {Array} points\n * @param {Number} tension\n *\n * @example\n * //create a cc.CardinalSplineBy\n * var action1 = cc.cardinalSplineBy(3, array, 0);\n */\ncc.CardinalSplineBy = cc.Class({\n name: 'cc.CardinalSplineBy',\n extends: cc.CardinalSplineTo,\n\n ctor:function (duration, points, tension) {\n this._startPosition = cc.v2(0, 0);\n tension !== undefined && this.initWithDuration(duration, points, tension);\n },\n\n startWithTarget:function (target) {\n cc.CardinalSplineTo.prototype.startWithTarget.call(this, target);\n this._startPosition.x = target.x;\n this._startPosition.y = target.y;\n },\n\n reverse:function () {\n var copyConfig = this._points.slice();\n var current;\n //\n // convert \"absolutes\" to \"diffs\"\n //\n var p = copyConfig[0];\n for (var i = 1; i < copyConfig.length; ++i) {\n current = copyConfig[i];\n copyConfig[i] = current.sub(p);\n p = current;\n }\n\n // convert to \"diffs\" to \"reverse absolute\"\n var reverseArray = reverseControlPoints(copyConfig);\n\n // 1st element (which should be 0,0) should be here too\n p = reverseArray[ reverseArray.length - 1 ];\n reverseArray.pop();\n\n p.x = -p.x;\n p.y = -p.y;\n\n reverseArray.unshift(p);\n for (var i = 1; i < reverseArray.length; ++i) {\n current = reverseArray[i];\n current.x = -current.x;\n current.y = -current.y;\n current.x += p.x;\n current.y += p.y;\n reverseArray[i] = current;\n p = current;\n }\n return cc.cardinalSplineBy(this._duration, reverseArray, this._tension);\n },\n\n /**\n * update position of target\n * @method updatePosition\n * @param {Vec2} newPos\n */\n updatePosition:function (newPos) {\n var pos = this._startPosition;\n var posX = newPos.x + pos.x;\n var posY = newPos.y + pos.y;\n this._previousPosition.x = posX;\n this._previousPosition.y = posY;\n this.target.setPosition(posX, posY);\n },\n\n clone:function () {\n var a = new cc.CardinalSplineBy();\n a.initWithDuration(this._duration, cloneControlPoints(this._points), this._tension);\n return a;\n }\n});\n\n/**\n * !#en Creates an action with a Cardinal Spline array of points and tension.\n * !#zh 按基数样条曲线轨迹移动指定的距离。\n * @method cardinalSplineBy\n * @param {Number} duration\n * @param {Array} points\n * @param {Number} tension\n *\n * @return {ActionInterval}\n */\ncc.cardinalSplineBy = function (duration, points, tension) {\n return new cc.CardinalSplineBy(duration, points, tension);\n};\n\n/*\n * An action that moves the target with a CatmullRom curve to a destination point.<br/>\n * A Catmull Rom is a Cardinal Spline with a tension of 0.5. <br/>\n * http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Catmull.E2.80.93Rom_spline\n * Absolute coordinates.\n *\n * @class CatmullRomTo\n * @extends CardinalSplineTo\n *\n * @param {Number} dt\n * @param {Array} points\n *\n * @example\n * var action1 = cc.catmullRomTo(3, array);\n */\ncc.CatmullRomTo = cc.Class({\n name: 'cc.CatmullRomTo',\n extends: cc.CardinalSplineTo,\n\n ctor: function(dt, points) {\n points && this.initWithDuration(dt, points);\n },\n\n initWithDuration:function (dt, points) {\n return cc.CardinalSplineTo.prototype.initWithDuration.call(this, dt, points, 0.5);\n },\n\n clone:function () {\n var action = new cc.CatmullRomTo();\n action.initWithDuration(this._duration, cloneControlPoints(this._points));\n return action;\n }\n});\n\n/**\n * !#en Creates an action with a Cardinal Spline array of points and tension.\n * !#zh 按 Catmull Rom 样条曲线轨迹移动到目标位置。\n * @method catmullRomTo\n * @param {Number} dt\n * @param {Array} points\n * @return {ActionInterval}\n *\n * @example\n * var action1 = cc.catmullRomTo(3, array);\n */\ncc.catmullRomTo = function (dt, points) {\n return new cc.CatmullRomTo(dt, points);\n};\n\n/*\n * An action that moves the target with a CatmullRom curve by a certain distance. <br/>\n * A Catmull Rom is a Cardinal Spline with a tension of 0.5.<br/>\n * http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Catmull.E2.80.93Rom_spline\n * Relative coordinates.\n *\n * @class CatmullRomBy\n * @extends CardinalSplineBy\n *\n * @param {Number} dt\n * @param {Array} points\n *\n * @example\n * var action1 = cc.catmullRomBy(3, array);\n */\ncc.CatmullRomBy = cc.Class({\n name: 'cc.CatmullRomBy',\n extends: cc.CardinalSplineBy,\n\n ctor: function(dt, points) {\n points && this.initWithDuration(dt, points);\n },\n\n initWithDuration:function (dt, points) {\n return cc.CardinalSplineTo.prototype.initWithDuration.call(this, dt, points, 0.5);\n },\n\n clone:function () {\n var action = new cc.CatmullRomBy();\n action.initWithDuration(this._duration, cloneControlPoints(this._points));\n return action;\n }\n});\n\n/**\n * !#en Creates an action with a Cardinal Spline array of points and tension.\n * !#zh 按 Catmull Rom 样条曲线轨迹移动指定的距离。\n * @method catmullRomBy\n * @param {Number} dt\n * @param {Array} points\n * @return {ActionInterval}\n * @example\n * var action1 = cc.catmullRomBy(3, array);\n */\ncc.catmullRomBy = function (dt, points) {\n return new cc.CatmullRomBy(dt, points);\n};\n","/****************************************************************************\n Copyright (c) 2008-2010 Ricardo Quesada\n Copyright (c) 2011-2012 cocos2d-x.org\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos2d-x.org\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * @module cc\n */\n\n/**\n * !#en\n * Creates the action easing object with the rate parameter. <br />\n * From slow to fast.\n * !#zh 创建 easeIn 缓动对象,由慢到快。\n * @method easeIn\n * @param {Number} rate\n * @return {Object}\n * @example\n * action.easing(cc.easeIn(3.0));\n */\ncc.easeIn = function (rate) {\n return {\n _rate: rate,\n easing: function (dt) {\n return Math.pow(dt, this._rate);\n },\n reverse: function(){\n return cc.easeIn(1 / this._rate);\n }\n };\n};\n\n/**\n * !#en\n * Creates the action easing object with the rate parameter. <br />\n * From fast to slow.\n * !#zh 创建 easeOut 缓动对象,由快到慢。\n * @method easeOut\n * @param {Number} rate\n * @return {Object}\n * @example\n * action.easing(cc.easeOut(3.0));\n */\ncc.easeOut = function (rate) {\n return {\n _rate: rate,\n easing: function (dt) {\n return Math.pow(dt, 1 / this._rate);\n },\n reverse: function(){\n return cc.easeOut(1 / this._rate);\n }\n };\n};\n\n/**\n * !#en\n * Creates the action easing object with the rate parameter. <br />\n * Slow to fast then to slow.\n * !#zh 创建 easeInOut 缓动对象,慢到快,然后慢。\n * @method easeInOut\n * @param {Number} rate\n * @return {Object}\n *\n * @example\n * action.easing(cc.easeInOut(3.0));\n */\ncc.easeInOut = function (rate) {\n return {\n _rate: rate,\n easing: function (dt) {\n dt *= 2;\n if (dt < 1)\n return 0.5 * Math.pow(dt, this._rate);\n else\n return 1.0 - 0.5 * Math.pow(2 - dt, this._rate);\n },\n reverse: function(){\n return cc.easeInOut(this._rate);\n }\n };\n};\n\n/**\n * !#en\n * Creates the action easing object with the rate parameter. <br />\n * Reference easeInExpo: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeExponentialIn 缓动对象。<br />\n * EaseExponentialIn 是按指数函数缓动进入的动作。<br />\n * 参考 easeInExpohttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeExponentialIn\n * @return {Object}\n * @example\n * action.easing(cc.easeExponentialIn());\n */\nvar _easeExponentialInObj = {\n easing: function(dt){\n return dt === 0 ? 0 : Math.pow(2, 10 * (dt - 1));\n },\n reverse: function(){\n return _easeExponentialOutObj;\n }\n};\ncc.easeExponentialIn = function(){\n return _easeExponentialInObj;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Reference easeOutExpo: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeExponentialOut 缓动对象。<br />\n * EaseExponentialOut 是按指数函数缓动退出的动作。<br />\n * 参考 easeOutExpohttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeExponentialOut\n * @return {Object}\n * @example\n * action.easing(cc.easeExponentialOut());\n */\nvar _easeExponentialOutObj = {\n easing: function(dt){\n return dt === 1 ? 1 : (-(Math.pow(2, -10 * dt)) + 1);\n },\n reverse: function(){\n return _easeExponentialInObj;\n }\n};\ncc.easeExponentialOut = function(){\n return _easeExponentialOutObj;\n};\n\n/**\n * !#en\n * Creates an EaseExponentialInOut action easing object. <br />\n * Reference easeInOutExpo: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeExponentialInOut 缓动对象。<br />\n * EaseExponentialInOut 是按指数函数缓动进入并退出的动作。<br />\n * 参考 easeInOutExpohttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeExponentialInOut\n * @return {Object}\n * @example\n * action.easing(cc.easeExponentialInOut());\n */\nvar _easeExponentialInOutObj = {\n easing: function(dt){\n if( dt !== 1 && dt !== 0) {\n dt *= 2;\n if (dt < 1)\n return 0.5 * Math.pow(2, 10 * (dt - 1));\n else\n return 0.5 * (-Math.pow(2, -10 * (dt - 1)) + 2);\n }\n return dt;\n },\n reverse: function(){\n return _easeExponentialInOutObj;\n }\n};\ncc.easeExponentialInOut = function(){\n return _easeExponentialInOutObj;\n};\n\n/**\n * !#en\n * Creates an EaseSineIn action. <br />\n * Reference easeInSine: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 EaseSineIn 缓动对象。<br />\n * EaseSineIn 是按正弦函数缓动进入的动作。<br />\n * 参考 easeInSinehttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeSineIn\n * @return {Object}\n * @example\n * action.easing(cc.easeSineIn());\n */\nvar _easeSineInObj = {\n easing: function(dt){\n return (dt===0 || dt===1) ? dt : -1 * Math.cos(dt * Math.PI / 2) + 1;\n },\n reverse: function(){\n return _easeSineOutObj;\n }\n};\ncc.easeSineIn = function(){\n return _easeSineInObj;\n};\n\n/**\n * !#en\n * Creates an EaseSineOut action easing object. <br />\n * Reference easeOutSine: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 EaseSineOut 缓动对象。<br />\n * EaseSineIn 是按正弦函数缓动退出的动作。<br />\n * 参考 easeOutSinehttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeSineOut\n * @return {Object}\n * @example\n * action.easing(cc.easeSineOut());\n */\nvar _easeSineOutObj = {\n easing: function(dt){\n return (dt===0 || dt===1) ? dt : Math.sin(dt * Math.PI / 2);\n },\n reverse: function(){\n return _easeSineInObj;\n }\n};\ncc.easeSineOut = function(){\n return _easeSineOutObj;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Reference easeInOutSine: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeSineInOut 缓动对象。<br />\n * EaseSineIn 是按正弦函数缓动进入并退出的动作。<br />\n * 参考 easeInOutSinehttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeSineInOut\n * @return {Object}\n * @example\n * action.easing(cc.easeSineInOut());\n */\nvar _easeSineInOutObj = {\n easing: function(dt){\n return (dt === 0 || dt === 1) ? dt : -0.5 * (Math.cos(Math.PI * dt) - 1);\n },\n reverse: function(){\n return _easeSineInOutObj;\n }\n};\ncc.easeSineInOut = function(){\n return _easeSineInOutObj;\n};\n\n/**\n * @module cc\n */\n\n/**\n * !#en\n * Creates the action easing object with the period in radians (default is 0.3). <br />\n * Reference easeInElastic: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeElasticIn 缓动对象。<br />\n * EaseElasticIn 是按弹性曲线缓动进入的动作。<br />\n * 参数 easeInElastichttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeElasticIn\n * @param {Number} period\n * @return {Object}\n * @example\n * // example\n * action.easing(cc.easeElasticIn(3.0));\n */\n//default ease elastic in object (period = 0.3)\nvar _easeElasticInObj = {\n easing:function(dt){\n if (dt === 0 || dt === 1)\n return dt;\n dt = dt - 1;\n return -Math.pow(2, 10 * dt) * Math.sin((dt - (0.3 / 4)) * Math.PI * 2 / 0.3);\n },\n reverse:function(){\n return _easeElasticOutObj;\n }\n };\ncc.easeElasticIn = function (period) {\n if(period && period !== 0.3){\n return {\n _period: period,\n easing: function (dt) {\n if (dt === 0 || dt === 1)\n return dt;\n dt = dt - 1;\n return -Math.pow(2, 10 * dt) * Math.sin((dt - (this._period / 4)) * Math.PI * 2 / this._period);\n },\n reverse:function () {\n return cc.easeElasticOut(this._period);\n }\n };\n }\n return _easeElasticInObj;\n};\n\n/**\n * !#en\n * Creates the action easing object with the period in radians (default is 0.3). <br />\n * Reference easeOutElastic: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeElasticOut 缓动对象。<br />\n * EaseElasticOut 是按弹性曲线缓动退出的动作。<br />\n * 参考 easeOutElastichttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeElasticOut\n * @param {Number} period\n * @return {Object}\n * @example\n * // example\n * action.easing(cc.easeElasticOut(3.0));\n */\n//default ease elastic out object (period = 0.3)\nvar _easeElasticOutObj = {\n easing: function (dt) {\n return (dt === 0 || dt === 1) ? dt : Math.pow(2, -10 * dt) * Math.sin((dt - (0.3 / 4)) * Math.PI * 2 / 0.3) + 1;\n },\n reverse:function(){\n return _easeElasticInObj;\n }\n};\ncc.easeElasticOut = function (period) {\n if(period && period !== 0.3){\n return {\n _period: period,\n easing: function (dt) {\n return (dt === 0 || dt === 1) ? dt : Math.pow(2, -10 * dt) * Math.sin((dt - (this._period / 4)) * Math.PI * 2 / this._period) + 1;\n },\n reverse:function(){\n return cc.easeElasticIn(this._period);\n }\n };\n }\n return _easeElasticOutObj;\n};\n\n/**\n * !#en\n * Creates the action easing object with the period in radians (default is 0.3). <br />\n * Reference easeInOutElastic: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeElasticInOut 缓动对象。<br />\n * EaseElasticInOut 是按弹性曲线缓动进入并退出的动作。<br />\n * 参考 easeInOutElastichttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeElasticInOut\n * @param {Number} period\n * @return {Object}\n * @example\n * // example\n * action.easing(cc.easeElasticInOut(3.0));\n */\ncc.easeElasticInOut = function (period) {\n period = period || 0.3;\n return {\n _period: period,\n easing: function (dt) {\n var newT = 0;\n var locPeriod = this._period;\n if (dt === 0 || dt === 1) {\n newT = dt;\n } else {\n dt = dt * 2;\n if (!locPeriod)\n locPeriod = this._period = 0.3 * 1.5;\n var s = locPeriod / 4;\n dt = dt - 1;\n if (dt < 0)\n newT = -0.5 * Math.pow(2, 10 * dt) * Math.sin((dt - s) * Math.PI * 2 / locPeriod);\n else\n newT = Math.pow(2, -10 * dt) * Math.sin((dt - s) * Math.PI * 2 / locPeriod) * 0.5 + 1;\n }\n return newT;\n },\n reverse: function(){\n return cc.easeElasticInOut(this._period);\n }\n };\n};\n\n/**\n * @module cc\n */\n\nfunction _bounceTime (time1) {\n if (time1 < 1 / 2.75) {\n return 7.5625 * time1 * time1;\n } else if (time1 < 2 / 2.75) {\n time1 -= 1.5 / 2.75;\n return 7.5625 * time1 * time1 + 0.75;\n } else if (time1 < 2.5 / 2.75) {\n time1 -= 2.25 / 2.75;\n return 7.5625 * time1 * time1 + 0.9375;\n }\n\n time1 -= 2.625 / 2.75;\n return 7.5625 * time1 * time1 + 0.984375;\n};\n\nvar _easeBounceInObj = {\n easing: function(dt){\n return 1 - _bounceTime(1 - dt);\n },\n reverse: function(){\n return _easeBounceOutObj;\n }\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Eased bounce effect at the beginning.\n * !#zh\n * 创建 easeBounceIn 缓动对象。<br />\n * EaseBounceIn 是按弹跳动作缓动进入的动作。\n * @method easeBounceIn\n * @return {Object}\n * @example\n * // example\n * action.easing(cc.easeBounceIn());\n */\ncc.easeBounceIn = function(){\n return _easeBounceInObj;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Eased bounce effect at the ending.\n * !#zh\n * 创建 easeBounceOut 缓动对象。<br />\n * EaseBounceOut 是按弹跳动作缓动退出的动作。\n * @method easeBounceOut\n * @return {Object}\n * @example\n * // example\n * action.easing(cc.easeBounceOut());\n */\nvar _easeBounceOutObj = {\n easing: function(dt){\n return _bounceTime(dt);\n },\n reverse:function () {\n return _easeBounceInObj;\n }\n};\ncc.easeBounceOut = function(){\n return _easeBounceOutObj;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Eased bounce effect at the begining and ending.\n * !#zh\n * 创建 easeBounceInOut 缓动对象。<br />\n * EaseBounceInOut 是按弹跳动作缓动进入并退出的动作。\n * @method easeBounceInOut\n * @return {Object}\n * @example\n * // example\n * action.easing(cc.easeBounceInOut());\n */\nvar _easeBounceInOutObj = {\n easing: function (time1) {\n var newT;\n if (time1 < 0.5) {\n time1 = time1 * 2;\n newT = (1 - _bounceTime(1 - time1)) * 0.5;\n } else {\n newT = _bounceTime(time1 * 2 - 1) * 0.5 + 0.5;\n }\n return newT;\n },\n reverse: function(){\n return _easeBounceInOutObj;\n }\n};\ncc.easeBounceInOut = function(){\n return _easeBounceInOutObj;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * In the opposite direction to move slowly, and then accelerated to the right direction.\n * !#zh\n * 创建 easeBackIn 缓动对象。<br />\n * easeBackIn 是在相反的方向缓慢移动,然后加速到正确的方向。<br />\n * @method easeBackIn\n * @return {Object}\n * @example\n * // example\n * action.easing(cc.easeBackIn());\n */\nvar _easeBackInObj = {\n easing: function (time1) {\n var overshoot = 1.70158;\n return (time1===0 || time1===1) ? time1 : time1 * time1 * ((overshoot + 1) * time1 - overshoot);\n },\n reverse: function(){\n return _easeBackOutObj;\n }\n};\ncc.easeBackIn = function(){\n return _easeBackInObj;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Fast moving more than the finish, and then slowly back to the finish.\n * !#zh\n * 创建 easeBackOut 缓动对象。<br />\n * easeBackOut 快速移动超出目标,然后慢慢回到目标点。\n * @method easeBackOut\n * @return {Object}\n * @example\n * // example\n * action.easing(cc.easeBackOut());\n */\nvar _easeBackOutObj = {\n easing: function (time1) {\n if (time1 === 0) {\n return 0;\n }\n var overshoot = 1.70158;\n time1 = time1 - 1;\n return time1 * time1 * ((overshoot + 1) * time1 + overshoot) + 1;\n },\n reverse: function(){\n return _easeBackInObj;\n }\n};\ncc.easeBackOut = function(){\n return _easeBackOutObj;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Begining of cc.EaseBackIn. Ending of cc.EaseBackOut.\n * !#zh\n * 创建 easeBackInOut 缓动对象。<br />\n * @method easeBackInOut\n * @return {Object}\n * @example\n * // example\n * action.easing(cc.easeBackInOut());\n */\nvar _easeBackInOutObj = {\n easing: function (time1) {\n var overshoot = 1.70158 * 1.525;\n time1 = time1 * 2;\n if (time1 < 1) {\n return (time1 * time1 * ((overshoot + 1) * time1 - overshoot)) / 2;\n } else {\n time1 = time1 - 2;\n return (time1 * time1 * ((overshoot + 1) * time1 + overshoot)) / 2 + 1;\n }\n },\n reverse: function(){\n return _easeBackInOutObj;\n }\n};\ncc.easeBackInOut = function(){\n return _easeBackInOutObj;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Into the 4 reference point. <br />\n * To calculate the motion curve.\n * !#zh\n * 创建 easeBezierAction 缓动对象。<br />\n * EaseBezierAction 是按贝塞尔曲线缓动的动作。\n * @method easeBezierAction\n * @param {Number} p0 The first bezier parameter\n * @param {Number} p1 The second bezier parameter\n * @param {Number} p2 The third bezier parameter\n * @param {Number} p3 The fourth bezier parameter\n * @returns {Object}\n * @example\n * // example\n * action.easing(cc.easeBezierAction(0.5, 0.5, 1.0, 1.0));\n */\ncc.easeBezierAction = function(a, b, c, d){\n return {\n easing: function(t){\n return (Math.pow(1-t,3) * a + 3*t*(Math.pow(1-t,2))*b + 3*Math.pow(t,2)*(1-t)*c + Math.pow(t,3)*d);\n },\n reverse: function(){\n return cc.easeBezierAction(d, c, b, a);\n }\n };\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Reference easeInQuad: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeQuadraticActionIn 缓动对象。<br />\n * EaseQuadraticIn是按二次函数缓动进入的动作。<br />\n * 参考 easeInQuadhttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeQuadraticActionIn\n * @returns {Object}\n * @example\n * //example\n * action.easing(cc.easeQuadraticActionIn());\n */\nvar _easeQuadraticActionIn = {\n easing: function(time){\n return Math.pow(time, 2);\n },\n reverse: function(){\n return _easeQuadraticActionIn;\n }\n};\ncc.easeQuadraticActionIn = function(){\n return _easeQuadraticActionIn;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Reference easeOutQuad: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeQuadraticActionOut 缓动对象。<br />\n * EaseQuadraticOut 是按二次函数缓动退出的动作。<br />\n * 参考 easeOutQuadhttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeQuadraticActionOut\n * @returns {Object}\n * @example\n * //example\n * action.easing(cc.easeQuadraticActionOut());\n */\nvar _easeQuadraticActionOut = {\n easing: function(time){\n return -time*(time-2);\n },\n reverse: function(){\n return _easeQuadraticActionOut;\n }\n};\ncc.easeQuadraticActionOut = function(){\n return _easeQuadraticActionOut;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Reference easeInOutQuad: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeQuadraticActionInOut 缓动对象。<br />\n * EaseQuadraticInOut 是按二次函数缓动进入并退出的动作。<br />\n * 参考 easeInOutQuadhttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeQuadraticActionInOut\n * @returns {Object}\n * @example\n * //example\n * action.easing(cc.easeQuadraticActionInOut());\n */\nvar _easeQuadraticActionInOut = {\n easing: function(time){\n var resultTime = time;\n time *= 2;\n if(time < 1){\n resultTime = time * time * 0.5;\n }else{\n --time;\n resultTime = -0.5 * ( time * ( time - 2 ) - 1)\n }\n return resultTime;\n },\n reverse: function(){\n return _easeQuadraticActionInOut;\n }\n};\ncc.easeQuadraticActionInOut = function(){\n return _easeQuadraticActionInOut;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Reference easeIntQuart: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeQuarticActionIn 缓动对象。<br />\n * EaseQuarticIn 是按四次函数缓动进入的动作。<br />\n * 参考 easeIntQuarthttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeQuarticActionIn\n * @returns {Object}\n * @example\n * //example\n * action.easing(cc.easeQuarticActionIn());\n */\nvar _easeQuarticActionIn = {\n easing: function(time){\n return time * time * time * time;\n },\n reverse: function(){\n return _easeQuarticActionIn;\n }\n};\ncc.easeQuarticActionIn = function(){\n return _easeQuarticActionIn;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Reference easeOutQuart: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeQuarticActionOut 缓动对象。<br />\n * EaseQuarticOut 是按四次函数缓动退出的动作。<br />\n * 参考 easeOutQuarthttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeQuarticActionOut\n * @returns {Object}\n * @example\n * //example\n * action.easing(cc.QuarticActionOut());\n */\nvar _easeQuarticActionOut = {\n easing: function(time){\n time -= 1;\n return -(time * time * time * time - 1);\n },\n reverse: function(){\n return _easeQuarticActionOut;\n }\n};\ncc.easeQuarticActionOut = function(){\n return _easeQuarticActionOut;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Reference easeInOutQuart: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeQuarticActionInOut 缓动对象。<br />\n * EaseQuarticInOut 是按四次函数缓动进入并退出的动作。<br />\n * 参考 easeInOutQuarthttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeQuarticActionInOut\n * @returns {Object}\n */\nvar _easeQuarticActionInOut = {\n easing: function(time){\n time = time*2;\n if (time < 1)\n return 0.5 * time * time * time * time;\n time -= 2;\n return -0.5 * (time * time * time * time - 2);\n },\n reverse: function(){\n return _easeQuarticActionInOut;\n }\n};\ncc.easeQuarticActionInOut = function(){\n return _easeQuarticActionInOut;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Reference easeInQuint: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeQuinticActionIn 缓动对象。<br />\n * EaseQuinticIn 是按五次函数缓动进的动作。<br />\n * 参考 easeInQuinthttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeQuinticActionIn\n * @returns {Object}\n * @example\n * //example\n * action.easing(cc.easeQuinticActionIn());\n */\nvar _easeQuinticActionIn = {\n easing: function(time){\n return time * time * time * time * time;\n },\n reverse: function(){\n return _easeQuinticActionIn;\n }\n};\ncc.easeQuinticActionIn = function(){\n return _easeQuinticActionIn;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Reference easeOutQuint: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeQuinticActionOut 缓动对象。<br />\n * EaseQuinticOut 是按五次函数缓动退出的动作\n * 参考 easeOutQuinthttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeQuinticActionOut\n * @returns {Object}\n * @example\n * //example\n * action.easing(cc.easeQuadraticActionOut());\n */\nvar _easeQuinticActionOut = {\n easing: function(time){\n time -=1;\n return (time * time * time * time * time + 1);\n },\n reverse: function(){\n return _easeQuinticActionOut;\n }\n};\ncc.easeQuinticActionOut = function(){\n return _easeQuinticActionOut;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Reference easeInOutQuint: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeQuinticActionInOut 缓动对象。<br />\n * EaseQuinticInOut是按五次函数缓动进入并退出的动作。<br />\n * 参考 easeInOutQuinthttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeQuinticActionInOut\n * @returns {Object}\n * @example\n * //example\n * action.easing(cc.easeQuinticActionInOut());\n */\nvar _easeQuinticActionInOut = {\n easing: function(time){\n time = time*2;\n if (time < 1)\n return 0.5 * time * time * time * time * time;\n time -= 2;\n return 0.5 * (time * time * time * time * time + 2);\n },\n reverse: function(){\n return _easeQuinticActionInOut;\n }\n};\ncc.easeQuinticActionInOut = function(){\n return _easeQuinticActionInOut;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Reference easeInCirc: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeCircleActionIn 缓动对象。<br />\n * EaseCircleIn是按圆形曲线缓动进入的动作。<br />\n * 参考 easeInCirchttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeCircleActionIn\n * @returns {Object}\n * @example\n * //example\n * action.easing(cc.easeCircleActionIn());\n */\nvar _easeCircleActionIn = {\n easing: function(time){\n return -1 * (Math.sqrt(1 - time * time) - 1);\n },\n reverse: function(){\n return _easeCircleActionIn;\n }\n};\ncc.easeCircleActionIn = function(){\n return _easeCircleActionIn;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Reference easeOutCirc: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeCircleActionOut 缓动对象。<br />\n * EaseCircleOut是按圆形曲线缓动退出的动作。<br />\n * 参考 easeOutCirchttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeCircleActionOut\n * @returns {Object}\n * @example\n * //example\n * actioneasing(cc.easeCircleActionOut());\n */\nvar _easeCircleActionOut = {\n easing: function(time){\n time = time - 1;\n return Math.sqrt(1 - time * time);\n },\n reverse: function(){\n return _easeCircleActionOut;\n }\n};\ncc.easeCircleActionOut = function(){\n return _easeCircleActionOut;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Reference easeInOutCirc: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeCircleActionInOut 缓动对象。<br />\n * EaseCircleInOut 是按圆形曲线缓动进入并退出的动作。<br />\n * 参考 easeInOutCirchttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeCircleActionInOut\n * @returns {Object}\n * @example\n * //example\n * action.easing(cc.easeCircleActionInOut());\n */\nvar _easeCircleActionInOut = {\n easing: function(time){\n time = time * 2;\n if (time < 1)\n return -0.5 * (Math.sqrt(1 - time * time) - 1);\n time -= 2;\n return 0.5 * (Math.sqrt(1 - time * time) + 1);\n },\n reverse: function(){\n return _easeCircleActionInOut;\n }\n};\ncc.easeCircleActionInOut = function(){\n return _easeCircleActionInOut;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Reference easeInCubic: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeCubicActionIn 缓动对象。<br />\n * EaseCubicIn 是按三次函数缓动进入的动作。<br />\n * 参考 easeInCubichttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeCubicActionIn\n * @returns {Object}\n * @example\n * //example\n * action.easing(cc.easeCubicActionIn());\n */\nvar _easeCubicActionIn = {\n easing: function(time){\n return time * time * time;\n },\n reverse: function(){\n return _easeCubicActionIn;\n }\n};\ncc.easeCubicActionIn = function(){\n return _easeCubicActionIn;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Reference easeOutCubic: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeCubicActionOut 缓动对象。<br />\n * EaseCubicOut 是按三次函数缓动退出的动作。<br />\n * 参考 easeOutCubichttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeCubicActionOut\n * @returns {Object}\n * @example\n * //example\n * action.easing(cc.easeCubicActionOut());\n */\nvar _easeCubicActionOut = {\n easing: function(time){\n time -= 1;\n return (time * time * time + 1);\n },\n reverse: function(){\n return _easeCubicActionOut;\n }\n};\ncc.easeCubicActionOut = function(){\n return _easeCubicActionOut;\n};\n\n/**\n * !#en\n * Creates the action easing object. <br />\n * Reference easeInOutCubic: <br />\n * http://www.zhihu.com/question/21981571/answer/19925418\n * !#zh\n * 创建 easeCubicActionInOut 缓动对象。<br />\n * EaseCubicInOut是按三次函数缓动进入并退出的动作。<br />\n * 参考 easeInOutCubichttp://www.zhihu.com/question/21981571/answer/19925418\n * @method easeCubicActionInOut\n * @returns {Object}\n */\nvar _easeCubicActionInOut = {\n easing: function(time){\n time = time*2;\n if (time < 1)\n return 0.5 * time * time * time;\n time -= 2;\n return 0.5 * (time * time * time + 2);\n },\n reverse: function(){\n return _easeCubicActionInOut;\n }\n};\ncc.easeCubicActionInOut = function(){\n return _easeCubicActionInOut;\n};\n\n","/****************************************************************************\n Copyright (c) 2008-2010 Ricardo Quesada\n Copyright (c) 2011-2012 cocos2d-x.org\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos2d-x.org\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * @module cc\n */\n\n/**\n * !#en Instant actions are immediate actions. They don't have a duration like the ActionInterval actions.\n * !#zh 即时动作,这种动作立即就会执行,继承自 FiniteTimeAction。\n * @class ActionInstant\n * @extends FiniteTimeAction\n */\ncc.ActionInstant = cc.Class({\n name: 'cc.ActionInstant',\n extends: cc.FiniteTimeAction,\n isDone:function () {\n return true;\n },\n\n step:function (dt) {\n this.update(1);\n },\n\n update:function (dt) {\n //nothing\n },\n\n /**\n * returns a reversed action. <br />\n * For example: <br />\n * - The action is x coordinates of 0 move to 100. <br />\n * - The reversed action will be x of 100 move to 0.\n * @returns {Action}\n */\n reverse:function(){\n return this.clone();\n },\n\n clone:function(){\n return new cc.ActionInstant();\n }\n});\n\n/**\n * @module cc\n */\n\n/*\n * Show the node.\n * @class Show\n * @extends ActionInstant\n */\ncc.Show = cc.Class({\n name: 'cc.Show',\n extends: cc.ActionInstant,\n\n update:function (dt) {\n var _renderComps = this.target.getComponentsInChildren(cc.RenderComponent);\n for (var i = 0; i < _renderComps.length; ++i) {\n var render = _renderComps[i];\n render.enabled = true;\n }\n },\n\n reverse:function () {\n return new cc.Hide();\n },\n\n clone:function(){\n return new cc.Show();\n }\n});\n\n/**\n * !#en Show the Node.\n * !#zh 立即显示。\n * @method show\n * @return {ActionInstant}\n * @example\n * // example\n * var showAction = cc.show();\n */\ncc.show = function () {\n return new cc.Show();\n};\n\n/*\n * Hide the node.\n * @class Hide\n * @extends ActionInstant\n */\ncc.Hide = cc.Class({\n name: 'cc.Hide',\n extends: cc.ActionInstant,\n\n update:function (dt) {\n var _renderComps = this.target.getComponentsInChildren(cc.RenderComponent);\n for (var i = 0; i < _renderComps.length; ++i) {\n var render = _renderComps[i];\n render.enabled = false;\n }\n },\n\n reverse:function () {\n return new cc.Show();\n },\n\n clone:function(){\n return new cc.Hide();\n }\n});\n\n/**\n * !#en Hide the node.\n * !#zh 立即隐藏。\n * @method hide\n * @return {ActionInstant}\n * @example\n * // example\n * var hideAction = cc.hide();\n */\ncc.hide = function () {\n return new cc.Hide();\n};\n\n/*\n * Toggles the visibility of a node.\n * @class ToggleVisibility\n * @extends ActionInstant\n */\ncc.ToggleVisibility = cc.Class({\n name: 'cc.ToggleVisibility',\n extends: cc.ActionInstant,\n\n update:function (dt) {\n var _renderComps = this.target.getComponentsInChildren(cc.RenderComponent);\n for (var i = 0; i < _renderComps.length; ++i) {\n var render = _renderComps[i];\n render.enabled = !render.enabled;\n }\n },\n\n reverse:function () {\n return new cc.ToggleVisibility();\n },\n\n clone:function(){\n return new cc.ToggleVisibility();\n }\n});\n\n/**\n * !#en Toggles the visibility of a node.\n * !#zh 显隐状态切换。\n * @method toggleVisibility\n * @return {ActionInstant}\n * @example\n * // example\n * var toggleVisibilityAction = cc.toggleVisibility();\n */\ncc.toggleVisibility = function () {\n return new cc.ToggleVisibility();\n};\n\n/*\n * Delete self in the next frame.\n * @class RemoveSelf\n * @extends ActionInstant\n * @param {Boolean} [isNeedCleanUp=true]\n *\n * @example\n * // example\n * var removeSelfAction = new cc.RemoveSelf(false);\n */\ncc.RemoveSelf = cc.Class({\n name: 'cc.RemoveSelf',\n extends: cc.ActionInstant,\n\n ctor:function(isNeedCleanUp){\n this._isNeedCleanUp = true;\n\t isNeedCleanUp !== undefined && this.init(isNeedCleanUp);\n },\n\n update:function(dt){\n this.target.removeFromParent(this._isNeedCleanUp);\n },\n\n init:function(isNeedCleanUp){\n this._isNeedCleanUp = isNeedCleanUp;\n return true;\n },\n\n reverse:function(){\n return new cc.RemoveSelf(this._isNeedCleanUp);\n },\n\n clone:function(){\n return new cc.RemoveSelf(this._isNeedCleanUp);\n }\n});\n\n/**\n * !#en Create a RemoveSelf object with a flag indicate whether the target should be cleaned up while removing.\n * !#zh 从父节点移除自身。\n * @method removeSelf\n * @param {Boolean} [isNeedCleanUp = true]\n * @return {ActionInstant}\n *\n * @example\n * // example\n * var removeSelfAction = cc.removeSelf();\n */\ncc.removeSelf = function(isNeedCleanUp){\n return new cc.RemoveSelf(isNeedCleanUp);\n};\n\n/*\n * Create an action to destroy self.\n * @class DestroySelf\n * @extends ActionInstant\n *\n * @example\n * var destroySelfAction = new cc.DestroySelf();\n */\ncc.DestroySelf = cc.Class({\n name: 'cc.DestroySelf',\n extends: cc.ActionInstant,\n\n update () {\n this.target.destroy();\n },\n\n reverse () {\n return new cc.DestroySelf();\n },\n\n clone () {\n return new cc.DestroySelf();\n }\n});\n\n/**\n * !#en Destroy self\n * !#zh 创建一个销毁自身的动作。\n * @method destroySelf\n * @return {ActionInstant}\n *\n * @example\n * var destroySelfAction = cc.destroySelf();\n */\ncc.destroySelf = function () {\n return new cc.DestroySelf();\n};\n\n/*\n * Flips the sprite horizontally.\n * @class FlipX\n * @extends ActionInstant\n * @param {Boolean} flip Indicate whether the target should be flipped or not\n *\n * @example\n * var flipXAction = new cc.FlipX(true);\n */\ncc.FlipX = cc.Class({\n name: 'cc.FlipX',\n extends: cc.ActionInstant,\n\n ctor:function(flip){\n this._flippedX = false;\n\t\tflip !== undefined && this.initWithFlipX(flip);\n },\n\n /*\n * initializes the action with a set flipX.\n * @param {Boolean} flip\n * @return {Boolean}\n */\n initWithFlipX:function (flip) {\n this._flippedX = flip;\n return true;\n },\n\n update:function (dt) {\n this.target.scaleX = Math.abs(this.target.scaleX) * (this._flippedX ? -1 : 1);\n },\n\n reverse:function () {\n return new cc.FlipX(!this._flippedX);\n },\n\n clone:function(){\n var action = new cc.FlipX();\n action.initWithFlipX(this._flippedX);\n return action;\n }\n});\n\n/**\n * !#en Create a FlipX action to flip or unflip the target.\n * !#zh X轴翻转。\n * @method flipX\n * @param {Boolean} flip Indicate whether the target should be flipped or not\n * @return {ActionInstant}\n * @example\n * var flipXAction = cc.flipX(true);\n */\ncc.flipX = function (flip) {\n return new cc.FlipX(flip);\n};\n\n/*\n * Flips the sprite vertically\n * @class FlipY\n * @extends ActionInstant\n * @param {Boolean} flip\n * @example\n * var flipYAction = new cc.FlipY(true);\n */\ncc.FlipY = cc.Class({\n name: 'cc.FlipY',\n extends: cc.ActionInstant,\n\n ctor: function(flip){\n this._flippedY = false;\n\t\tflip !== undefined && this.initWithFlipY(flip);\n },\n\n /*\n * initializes the action with a set flipY.\n * @param {Boolean} flip\n * @return {Boolean}\n */\n initWithFlipY:function (flip) {\n this._flippedY = flip;\n return true;\n },\n\n update:function (dt) {\n this.target.scaleY = Math.abs(this.target.scaleY) * (this._flippedY ? -1 : 1);\n },\n\n reverse:function () {\n return new cc.FlipY(!this._flippedY);\n },\n\n clone:function(){\n var action = new cc.FlipY();\n action.initWithFlipY(this._flippedY);\n return action;\n }\n});\n\n/**\n * !#en Create a FlipY action to flip or unflip the target.\n * !#zh Y轴翻转。\n * @method flipY\n * @param {Boolean} flip\n * @return {ActionInstant}\n * @example\n * var flipYAction = cc.flipY(true);\n */\ncc.flipY = function (flip) {\n return new cc.FlipY(flip);\n};\n\n/*\n * Places the node in a certain position\n * @class Place\n * @extends ActionInstant\n * @param {Vec2|Number} pos\n * @param {Number} [y]\n * @example\n * var placeAction = new cc.Place(cc.v2(200, 200));\n * var placeAction = new cc.Place(200, 200);\n */\ncc.Place = cc.Class({\n name: 'cc.Place',\n extends: cc.ActionInstant,\n\n ctor:function(pos, y){\n this._x = 0;\n\t this._y = 0;\n\n\t\tif (pos !== undefined) {\n\t\t\tif (pos.x !== undefined) {\n\t\t\t\ty = pos.y;\n\t\t\t\tpos = pos.x;\n\t\t\t}\n\t\t\tthis.initWithPosition(pos, y);\n\t\t}\n },\n\n /*\n * Initializes a Place action with a position\n * @param {number} x\n * @param {number} y\n * @return {Boolean}\n */\n initWithPosition: function (x, y) {\n this._x = x;\n this._y = y;\n return true;\n },\n\n update:function (dt) {\n this.target.setPosition(this._x, this._y);\n },\n\n clone:function(){\n var action = new cc.Place();\n action.initWithPosition(this._x, this._y);\n return action;\n }\n});\n\n/**\n * !#en Creates a Place action with a position.\n * !#zh 放置在目标位置。\n * @method place\n * @param {Vec2|Number} pos\n * @param {Number} [y]\n * @return {ActionInstant}\n * @example\n * // example\n * var placeAction = cc.place(cc.v2(200, 200));\n * var placeAction = cc.place(200, 200);\n */\ncc.place = function (pos, y) {\n return new cc.Place(pos, y);\n};\n\n\n/*\n * Calls a 'callback'.\n * @class CallFunc\n * @extends ActionInstant\n * @param {function} selector\n * @param {object} [selectorTarget=null]\n * @param {*} [data=null] data for function, it accepts all data types.\n * @example\n * // example\n * // CallFunc without data\n * var finish = new cc.CallFunc(this.removeSprite, this);\n *\n * // CallFunc with data\n * var finish = new cc.CallFunc(this.removeFromParentAndCleanup, this, true);\n */\ncc.CallFunc = cc.Class({\n name: 'cc.CallFunc',\n extends: cc.ActionInstant,\n\n /*\n * Constructor function, override it to extend the construction behavior, remember to call \"this._super()\" in the extended \"ctor\" function. <br />\n\t * Creates a CallFunc action with the callback.\n\t * @param {function} selector\n\t * @param {object} [selectorTarget=null]\n\t * @param {*} [data=null] data for function, it accepts all data types.\n\t */\n ctor:function(selector, selectorTarget, data){\n this._selectorTarget = null;\n this._function = null;\n this._data = null;\n this.initWithFunction(selector, selectorTarget, data);\n },\n\n /*\n * Initializes the action with a function or function and its target\n * @param {function} selector\n * @param {object|Null} selectorTarget\n * @param {*|Null} [data] data for function, it accepts all data types.\n * @return {Boolean}\n */\n initWithFunction:function (selector, selectorTarget, data) {\n if (selector) {\n this._function = selector;\n }\n if (selectorTarget) {\n this._selectorTarget = selectorTarget;\n }\n if (data !== undefined) {\n this._data = data;\n }\n return true;\n },\n\n /*\n * execute the function.\n */\n execute:function () {\n if (this._function) {\n this._function.call(this._selectorTarget, this.target, this._data);\n }\n },\n\n update:function (dt) {\n this.execute();\n },\n\n /*\n * Get selectorTarget.\n * @return {object}\n */\n getTargetCallback:function () {\n return this._selectorTarget;\n },\n\n /*\n * Set selectorTarget.\n * @param {object} sel\n */\n setTargetCallback:function (sel) {\n if (sel !== this._selectorTarget) {\n if (this._selectorTarget)\n this._selectorTarget = null;\n this._selectorTarget = sel;\n }\n },\n\n clone:function(){\n var action = new cc.CallFunc();\n action.initWithFunction(this._function, this._selectorTarget, this._data);\n return action;\n }\n});\n\n/**\n * !#en Creates the action with the callback.\n * !#zh 执行回调函数。\n * @method callFunc\n * @param {function} selector\n * @param {object} [selectorTarget=null]\n * @param {*} [data=null] - data for function, it accepts all data types.\n * @return {ActionInstant}\n * @example\n * // example\n * // CallFunc without data\n * var finish = cc.callFunc(this.removeSprite, this);\n *\n * // CallFunc with data\n * var finish = cc.callFunc(this.removeFromParentAndCleanup, this._grossini, true);\n */\ncc.callFunc = function (selector, selectorTarget, data) {\n return new cc.CallFunc(selector, selectorTarget, data);\n};\n","/****************************************************************************\n Copyright (c) 2008-2010 Ricardo Quesada\n Copyright (c) 2011-2012 cocos2d-x.org\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos2d-x.org\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n\n/**\n * @module cc\n */\n\n/**\n * !#en\n * <p> An interval action is an action that takes place within a certain period of time. <br/>\n * It has an start time, and a finish time. The finish time is the parameter<br/>\n * duration plus the start time.</p>\n *\n * <p>These CCActionInterval actions have some interesting properties, like:<br/>\n * - They can run normally (default) <br/>\n * - They can run reversed with the reverse method <br/>\n * - They can run with the time altered with the Accelerate, AccelDeccel and Speed actions. </p>\n *\n * <p>For example, you can simulate a Ping Pong effect running the action normally and<br/>\n * then running it again in Reverse mode. </p>\n * !#zh 时间间隔动作,这种动作在已定时间内完成,继承 FiniteTimeAction。\n * @class ActionInterval\n * @extends FiniteTimeAction\n * @param {Number} d duration in seconds\n */\ncc.ActionInterval = cc.Class({\n name: 'cc.ActionInterval',\n extends: cc.FiniteTimeAction,\n\n ctor:function (d) {\n this.MAX_VALUE = 2;\n this._elapsed = 0;\n this._firstTick = false;\n this._easeList = null;\n this._speed = 1;\n this._timesForRepeat = 1;\n this._repeatForever = false;\n this._repeatMethod = false;//Compatible with repeat class, Discard after can be deleted\n this._speedMethod = false;//Compatible with repeat class, Discard after can be deleted\n d !== undefined && cc.ActionInterval.prototype.initWithDuration.call(this, d);\n },\n\n /*\n * How many seconds had elapsed since the actions started to run.\n * @return {Number}\n */\n getElapsed:function () {\n return this._elapsed;\n },\n\n /*\n * Initializes the action.\n * @param {Number} d duration in seconds\n * @return {Boolean}\n */\n initWithDuration:function (d) {\n this._duration = (d === 0) ? cc.macro.FLT_EPSILON : d;\n // prevent division by 0\n // This comparison could be in step:, but it might decrease the performance\n // by 3% in heavy based action games.\n this._elapsed = 0;\n this._firstTick = true;\n return true;\n },\n\n isDone:function () {\n return (this._elapsed >= this._duration);\n },\n\n _cloneDecoration: function(action){\n action._repeatForever = this._repeatForever;\n action._speed = this._speed;\n action._timesForRepeat = this._timesForRepeat;\n action._easeList = this._easeList;\n action._speedMethod = this._speedMethod;\n action._repeatMethod = this._repeatMethod;\n },\n\n _reverseEaseList: function(action){\n if(this._easeList){\n action._easeList = [];\n for(var i=0; i<this._easeList.length; i++){\n action._easeList.push(this._easeList[i].reverse());\n }\n }\n },\n\n clone:function () {\n var action = new cc.ActionInterval(this._duration);\n this._cloneDecoration(action);\n return action;\n },\n\n /**\n * !#en Implementation of ease motion.\n * !#zh 缓动运动。\n * @method easing\n * @param {Object} easeObj\n * @returns {ActionInterval}\n * @example\n * action.easing(cc.easeIn(3.0));\n */\n easing: function (easeObj) {\n if (this._easeList)\n this._easeList.length = 0;\n else\n this._easeList = [];\n for (var i = 0; i < arguments.length; i++)\n this._easeList.push(arguments[i]);\n return this;\n },\n\n _computeEaseTime: function (dt) {\n var locList = this._easeList;\n if ((!locList) || (locList.length === 0))\n return dt;\n for (var i = 0, n = locList.length; i < n; i++)\n dt = locList[i].easing(dt);\n return dt;\n },\n\n step:function (dt) {\n if (this._firstTick) {\n this._firstTick = false;\n this._elapsed = 0;\n } else\n this._elapsed += dt;\n\n //this.update((1 > (this._elapsed / this._duration)) ? this._elapsed / this._duration : 1);\n //this.update(Math.max(0, Math.min(1, this._elapsed / Math.max(this._duration, cc.macro.FLT_EPSILON))));\n var t = this._elapsed / (this._duration > 0.0000001192092896 ? this._duration : 0.0000001192092896);\n t = (1 > t ? t : 1);\n this.update(t > 0 ? t : 0);\n\n //Compatible with repeat class, Discard after can be deleted (this._repeatMethod)\n if(this._repeatMethod && this._timesForRepeat > 1 && this.isDone()){\n if(!this._repeatForever){\n this._timesForRepeat--;\n }\n //var diff = locInnerAction.getElapsed() - locInnerAction._duration;\n this.startWithTarget(this.target);\n // to prevent jerk. issue #390 ,1247\n //this._innerAction.step(0);\n //this._innerAction.step(diff);\n this.step(this._elapsed - this._duration);\n\n }\n },\n\n startWithTarget:function (target) {\n cc.Action.prototype.startWithTarget.call(this, target);\n this._elapsed = 0;\n this._firstTick = true;\n },\n\n reverse:function () {\n cc.logID(1010);\n return null;\n },\n\n /*\n * Set amplitude rate.\n * @warning It should be overridden in subclass.\n * @param {Number} amp\n */\n setAmplitudeRate:function (amp) {\n // Abstract class needs implementation\n cc.logID(1011);\n },\n\n /*\n * Get amplitude rate.\n * @warning It should be overridden in subclass.\n * @return {Number} 0\n */\n getAmplitudeRate:function () {\n // Abstract class needs implementation\n cc.logID(1012);\n return 0;\n },\n\n /**\n * !#en\n * Changes the speed of an action, making it take longer (speed>1)\n * or less (speed<1) time. <br/>\n * Useful to simulate 'slow motion' or 'fast forward' effect.\n * !#zh\n * 改变一个动作的速度使它的执行使用更长的时间speed > 1<br/>\n * 或更少speed < 1可以有效得模拟“慢动作”或“快进”的效果。\n * @param {Number} speed\n * @returns {Action}\n */\n speed: function(speed){\n if(speed <= 0){\n cc.logID(1013);\n return this;\n }\n\n this._speedMethod = true;//Compatible with repeat class, Discard after can be deleted\n this._speed *= speed;\n return this;\n },\n\n /**\n * Get this action speed.\n * @return {Number}\n */\n getSpeed: function(){\n return this._speed;\n },\n\n /**\n * Set this action speed.\n * @param {Number} speed\n * @returns {ActionInterval}\n */\n setSpeed: function(speed){\n this._speed = speed;\n return this;\n },\n\n /**\n * !#en\n * Repeats an action a number of times.\n * To repeat an action forever use the CCRepeatForever action.\n * !#zh 重复动作可以按一定次数重复一个动作,使用 RepeatForever 动作来永远重复一个动作。\n * @method repeat\n * @param {Number} times\n * @returns {ActionInterval}\n */\n repeat: function(times){\n times = Math.round(times);\n if(isNaN(times) || times < 1){\n cc.logID(1014);\n return this;\n }\n this._repeatMethod = true;//Compatible with repeat class, Discard after can be deleted\n this._timesForRepeat *= times;\n return this;\n },\n\n /**\n * !#en\n * Repeats an action for ever. <br/>\n * To repeat the an action for a limited number of times use the Repeat action. <br/>\n * !#zh 永远地重复一个动作,有限次数内重复一个动作请使用 Repeat 动作。\n * @method repeatForever\n * @returns {ActionInterval}\n */\n repeatForever: function(){\n this._repeatMethod = true;//Compatible with repeat class, Discard after can be deleted\n this._timesForRepeat = this.MAX_VALUE;\n this._repeatForever = true;\n return this;\n }\n});\n\ncc.actionInterval = function (d) {\n return new cc.ActionInterval(d);\n};\n\n/**\n * @module cc\n */\n\n/*\n * Runs actions sequentially, one after another.\n * @class Sequence\n * @extends ActionInterval\n * @param {Array|FiniteTimeAction} tempArray\n * @example\n * // create sequence with actions\n * var seq = new cc.Sequence(act1, act2);\n *\n * // create sequence with array\n * var seq = new cc.Sequence(actArray);\n */\ncc.Sequence = cc.Class({\n name: 'cc.Sequence',\n extends: cc.ActionInterval,\n\n ctor:function (tempArray) {\n this._actions = [];\n this._split = null;\n this._last = 0;\n this._reversed = false;\n\n var paramArray = (tempArray instanceof Array) ? tempArray : arguments;\n if (paramArray.length === 1) {\n cc.errorID(1019);\n return;\n }\n var last = paramArray.length - 1;\n if ((last >= 0) && (paramArray[last] == null))\n cc.logID(1015);\n\n if (last >= 0) {\n var prev = paramArray[0], action1;\n for (var i = 1; i < last; i++) {\n if (paramArray[i]) {\n action1 = prev;\n prev = cc.Sequence._actionOneTwo(action1, paramArray[i]);\n }\n }\n this.initWithTwoActions(prev, paramArray[last]);\n }\n },\n\n /*\n * Initializes the action <br/>\n * @param {FiniteTimeAction} actionOne\n * @param {FiniteTimeAction} actionTwo\n * @return {Boolean}\n */\n initWithTwoActions:function (actionOne, actionTwo) {\n if (!actionOne || !actionTwo) {\n cc.errorID(1025);\n return false;\n }\n\n var durationOne = actionOne._duration, durationTwo = actionTwo._duration;\n durationOne *= actionOne._repeatMethod ? actionOne._timesForRepeat : 1;\n durationTwo *= actionTwo._repeatMethod ? actionTwo._timesForRepeat : 1;\n var d = durationOne + durationTwo;\n this.initWithDuration(d);\n\n this._actions[0] = actionOne;\n this._actions[1] = actionTwo;\n return true;\n },\n\n clone:function () {\n var action = new cc.Sequence();\n this._cloneDecoration(action);\n action.initWithTwoActions(this._actions[0].clone(), this._actions[1].clone());\n return action;\n },\n\n startWithTarget:function (target) {\n cc.ActionInterval.prototype.startWithTarget.call(this, target);\n this._split = this._actions[0]._duration / this._duration;\n this._split *= this._actions[0]._repeatMethod ? this._actions[0]._timesForRepeat : 1;\n this._last = -1;\n },\n\n stop:function () {\n // Issue #1305\n if (this._last !== -1)\n this._actions[this._last].stop();\n cc.Action.prototype.stop.call(this);\n },\n\n update:function (dt) {\n var new_t, found = 0;\n var locSplit = this._split, locActions = this._actions, locLast = this._last, actionFound;\n\n dt = this._computeEaseTime(dt);\n if (dt < locSplit) {\n // action[0]\n new_t = (locSplit !== 0) ? dt / locSplit : 1;\n\n if (found === 0 && locLast === 1 && this._reversed) {\n // Reverse mode ?\n // XXX: Bug. this case doesn't contemplate when _last==-1, found=0 and in \"reverse mode\"\n // since it will require a hack to know if an action is on reverse mode or not.\n // \"step\" should be overriden, and the \"reverseMode\" value propagated to inner Sequences.\n locActions[1].update(0);\n locActions[1].stop();\n }\n } else {\n // action[1]\n found = 1;\n new_t = (locSplit === 1) ? 1 : (dt - locSplit) / (1 - locSplit);\n\n if (locLast === -1) {\n // action[0] was skipped, execute it.\n locActions[0].startWithTarget(this.target);\n locActions[0].update(1);\n locActions[0].stop();\n }\n if (locLast === 0) {\n // switching to action 1. stop action 0.\n locActions[0].update(1);\n locActions[0].stop();\n }\n }\n\n actionFound = locActions[found];\n // Last action found and it is done.\n if (locLast === found && actionFound.isDone())\n return;\n\n // Last action not found\n if (locLast !== found)\n actionFound.startWithTarget(this.target);\n\n new_t = new_t * actionFound._timesForRepeat;\n actionFound.update(new_t > 1 ? new_t % 1 : new_t);\n this._last = found;\n },\n\n reverse:function () {\n var action = cc.Sequence._actionOneTwo(this._actions[1].reverse(), this._actions[0].reverse());\n this._cloneDecoration(action);\n this._reverseEaseList(action);\n action._reversed = true;\n return action;\n }\n});\n\n/**\n * !#en\n * Helper constructor to create an array of sequenceable actions\n * The created action will run actions sequentially, one after another.\n * !#zh 顺序执行动作,创建的动作将按顺序依次运行。\n * @method sequence\n * @param {FiniteTimeAction|FiniteTimeAction[]} actionOrActionArray\n * @param {FiniteTimeAction} ...tempArray\n * @return {ActionInterval}\n * @example\n * // example\n * // create sequence with actions\n * var seq = cc.sequence(act1, act2);\n *\n * // create sequence with array\n * var seq = cc.sequence(actArray);\n */\n// todo: It should be use new\ncc.sequence = function (/*Multiple Arguments*/tempArray) {\n var paramArray = (tempArray instanceof Array) ? tempArray : arguments;\n if (paramArray.length === 1) {\n cc.errorID(1019);\n return null;\n }\n var last = paramArray.length - 1;\n if ((last >= 0) && (paramArray[last] == null))\n cc.logID(1015);\n\n var result = null;\n if (last >= 0) {\n result = paramArray[0];\n for (var i = 1; i <= last; i++) {\n if (paramArray[i]) {\n result = cc.Sequence._actionOneTwo(result, paramArray[i]);\n }\n }\n }\n\n return result;\n};\n\ncc.Sequence._actionOneTwo = function (actionOne, actionTwo) {\n var sequence = new cc.Sequence();\n sequence.initWithTwoActions(actionOne, actionTwo);\n return sequence;\n};\n\n/*\n * Repeats an action a number of times.\n * To repeat an action forever use the CCRepeatForever action.\n * @class Repeat\n * @extends ActionInterval\n * @param {FiniteTimeAction} action\n * @param {Number} times\n * @example\n * var rep = new cc.Repeat(cc.sequence(jump2, jump1), 5);\n */\ncc.Repeat = cc.Class({\n name: 'cc.Repeat',\n extends: cc.ActionInterval,\n\n ctor: function (action, times) {\n this._times = 0;\n this._total = 0;\n this._nextDt = 0;\n this._actionInstant = false;\n this._innerAction = null;\n\t\ttimes !== undefined && this.initWithAction(action, times);\n },\n\n /*\n * @param {FiniteTimeAction} action\n * @param {Number} times\n * @return {Boolean}\n */\n initWithAction:function (action, times) {\n var duration = action._duration * times;\n\n if (this.initWithDuration(duration)) {\n this._times = times;\n this._innerAction = action;\n if (action instanceof cc.ActionInstant){\n this._actionInstant = true;\n this._times -= 1;\n }\n this._total = 0;\n return true;\n }\n return false;\n },\n\n clone:function () {\n var action = new cc.Repeat();\n this._cloneDecoration(action);\n action.initWithAction(this._innerAction.clone(), this._times);\n return action;\n },\n\n startWithTarget:function (target) {\n this._total = 0;\n this._nextDt = this._innerAction._duration / this._duration;\n cc.ActionInterval.prototype.startWithTarget.call(this, target);\n this._innerAction.startWithTarget(target);\n },\n\n stop:function () {\n this._innerAction.stop();\n cc.Action.prototype.stop.call(this);\n },\n\n update:function (dt) {\n dt = this._computeEaseTime(dt);\n var locInnerAction = this._innerAction;\n var locDuration = this._duration;\n var locTimes = this._times;\n var locNextDt = this._nextDt;\n\n if (dt >= locNextDt) {\n while (dt > locNextDt && this._total < locTimes) {\n locInnerAction.update(1);\n this._total++;\n locInnerAction.stop();\n locInnerAction.startWithTarget(this.target);\n locNextDt += locInnerAction._duration / locDuration;\n this._nextDt = locNextDt > 1 ? 1 : locNextDt;\n }\n\n // fix for issue #1288, incorrect end value of repeat\n if (dt >= 1.0 && this._total < locTimes) {\n // fix for cocos-creator/fireball/issues/4310\n locInnerAction.update(1);\n this._total++;\n }\n\n // don't set a instant action back or update it, it has no use because it has no duration\n if (!this._actionInstant) {\n if (this._total === locTimes) {\n locInnerAction.stop();\n } else {\n // issue #390 prevent jerk, use right update\n locInnerAction.update(dt - (locNextDt - locInnerAction._duration / locDuration));\n }\n }\n } else {\n locInnerAction.update((dt * locTimes) % 1.0);\n }\n },\n\n isDone:function () {\n return this._total === this._times;\n },\n\n reverse:function () {\n var action = new cc.Repeat(this._innerAction.reverse(), this._times);\n this._cloneDecoration(action);\n this._reverseEaseList(action);\n return action;\n },\n\n /*\n * Set inner Action.\n * @param {FiniteTimeAction} action\n */\n setInnerAction:function (action) {\n if (this._innerAction !== action) {\n this._innerAction = action;\n }\n },\n\n /*\n * Get inner Action.\n * @return {FiniteTimeAction}\n */\n getInnerAction:function () {\n return this._innerAction;\n }\n});\n\n/**\n * !#en Creates a Repeat action. Times is an unsigned integer between 1 and pow(2,30)\n * !#zh 重复动作,可以按一定次数重复一个动,如果想永远重复一个动作请使用 repeatForever 动作来完成。\n * @method repeat\n * @param {FiniteTimeAction} action\n * @param {Number} times\n * @return {ActionInterval}\n * @example\n * // example\n * var rep = cc.repeat(cc.sequence(jump2, jump1), 5);\n */\ncc.repeat = function (action, times) {\n return new cc.Repeat(action, times);\n};\n\n\ncc.repeatForever = function (action) {\n return new cc.RepeatForever(action);\n}\n\n\n/*\n * Repeats an action for ever. <br/>\n * To repeat the an action for a limited number of times use the Repeat action. <br/>\n * @warning This action can't be Sequenceable because it is not an IntervalAction\n * @class RepeatForever\n * @extends ActionInterval\n * @param {FiniteTimeAction} action\n * @example\n * var rep = new cc.RepeatForever(cc.sequence(jump2, jump1), 5);\n */\ncc.RepeatForever = cc.Class({\n name: 'cc.RepeatForever',\n extends: cc.ActionInterval,\n\n ctor:function (action) {\n this._innerAction = null;\n\t\taction && this.initWithAction(action);\n },\n\n /*\n * @param {ActionInterval} action\n * @return {Boolean}\n */\n initWithAction:function (action) {\n if (!action) {\n cc.errorID(1026);\n return false;\n }\n\n this._innerAction = action;\n return true;\n },\n\n clone:function () {\n var action = new cc.RepeatForever();\n this._cloneDecoration(action);\n action.initWithAction(this._innerAction.clone());\n return action;\n },\n\n startWithTarget:function (target) {\n cc.ActionInterval.prototype.startWithTarget.call(this, target);\n this._innerAction.startWithTarget(target);\n },\n\n step:function (dt) {\n var locInnerAction = this._innerAction;\n locInnerAction.step(dt);\n if (locInnerAction.isDone()) {\n //var diff = locInnerAction.getElapsed() - locInnerAction._duration;\n locInnerAction.startWithTarget(this.target);\n // to prevent jerk. issue #390 ,1247\n //this._innerAction.step(0);\n //this._innerAction.step(diff);\n locInnerAction.step(locInnerAction.getElapsed() - locInnerAction._duration);\n }\n },\n\n isDone:function () {\n return false;\n },\n\n reverse:function () {\n var action = new cc.RepeatForever(this._innerAction.reverse());\n this._cloneDecoration(action);\n this._reverseEaseList(action);\n return action;\n },\n\n /*\n * Set inner action.\n * @param {ActionInterval} action\n */\n setInnerAction:function (action) {\n if (this._innerAction !== action) {\n this._innerAction = action;\n }\n },\n\n /*\n * Get inner action.\n * @return {ActionInterval}\n */\n getInnerAction:function () {\n return this._innerAction;\n }\n});\n\n/**\n * !#en Create a acton which repeat forever, as it runs forever, it can't be added into cc.sequence and cc.spawn.\n * !#zh 永远地重复一个动作,有限次数内重复一个动作请使用 repeat 动作,由于这个动作不会停止,所以不能被添加到 cc.sequence 或 cc.spawn 中。\n * @method repeatForever\n * @param {FiniteTimeAction} action\n * @return {ActionInterval}\n * @example\n * // example\n * var repeat = cc.repeatForever(cc.rotateBy(1.0, 360));\n */\ncc.repeatForever = function (action) {\n return new cc.RepeatForever(action);\n};\n\n\n/* \n * Spawn a new action immediately\n * @class Spawn\n * @extends ActionInterval\n */\ncc.Spawn = cc.Class({\n name: 'cc.Spawn',\n extends: cc.ActionInterval,\n\n ctor:function (tempArray) {\n this._one = null;\n this._two = null;\n\n\t\tvar paramArray = (tempArray instanceof Array) ? tempArray : arguments;\n if (paramArray.length === 1) {\n cc.errorID(1020);\n return;\n }\n\t\tvar last = paramArray.length - 1;\n\t\tif ((last >= 0) && (paramArray[last] == null))\n\t\t\tcc.logID(1015);\n\n if (last >= 0) {\n var prev = paramArray[0], action1;\n for (var i = 1; i < last; i++) {\n if (paramArray[i]) {\n action1 = prev;\n prev = cc.Spawn._actionOneTwo(action1, paramArray[i]);\n }\n }\n this.initWithTwoActions(prev, paramArray[last]);\n }\n },\n\n /* initializes the Spawn action with the 2 actions to spawn\n * @param {FiniteTimeAction} action1\n * @param {FiniteTimeAction} action2\n * @return {Boolean}\n */\n initWithTwoActions:function (action1, action2) {\n if (!action1 || !action2) {\n cc.errorID(1027);\n return false;\n }\n\n var ret = false;\n\n var d1 = action1._duration;\n var d2 = action2._duration;\n\n if (this.initWithDuration(Math.max(d1, d2))) {\n this._one = action1;\n this._two = action2;\n\n if (d1 > d2) {\n this._two = cc.Sequence._actionOneTwo(action2, cc.delayTime(d1 - d2));\n } else if (d1 < d2) {\n this._one = cc.Sequence._actionOneTwo(action1, cc.delayTime(d2 - d1));\n }\n\n ret = true;\n }\n return ret;\n },\n\n clone:function () {\n var action = new cc.Spawn();\n this._cloneDecoration(action);\n action.initWithTwoActions(this._one.clone(), this._two.clone());\n return action;\n },\n\n startWithTarget:function (target) {\n cc.ActionInterval.prototype.startWithTarget.call(this, target);\n this._one.startWithTarget(target);\n this._two.startWithTarget(target);\n },\n\n stop:function () {\n this._one.stop();\n this._two.stop();\n cc.Action.prototype.stop.call(this);\n },\n\n update:function (dt) {\n dt = this._computeEaseTime(dt);\n if (this._one)\n this._one.update(dt);\n if (this._two)\n this._two.update(dt);\n },\n\n reverse:function () {\n var action = cc.Spawn._actionOneTwo(this._one.reverse(), this._two.reverse());\n this._cloneDecoration(action);\n this._reverseEaseList(action);\n return action;\n }\n});\n\n/**\n * !#en Create a spawn action which runs several actions in parallel.\n * !#zh 同步执行动作,同步执行一组动作。\n * @method spawn\n * @param {FiniteTimeAction|FiniteTimeAction[]} actionOrActionArray\n * @param {FiniteTimeAction} ...tempArray\n * @return {FiniteTimeAction}\n * @example\n * // example\n * var action = cc.spawn(cc.jumpBy(2, cc.v2(300, 0), 50, 4), cc.rotateBy(2, 720));\n * todo: It should be the direct use new\n */\ncc.spawn = function (/*Multiple Arguments*/tempArray) {\n var paramArray = (tempArray instanceof Array) ? tempArray : arguments;\n if (paramArray.length === 1) {\n cc.errorID(1020);\n return null;\n }\n if ((paramArray.length > 0) && (paramArray[paramArray.length - 1] == null))\n cc.logID(1015);\n\n var prev = paramArray[0];\n for (var i = 1; i < paramArray.length; i++) {\n if (paramArray[i] != null)\n prev = cc.Spawn._actionOneTwo(prev, paramArray[i]);\n }\n return prev;\n};\n\ncc.Spawn._actionOneTwo = function (action1, action2) {\n var pSpawn = new cc.Spawn();\n pSpawn.initWithTwoActions(action1, action2);\n return pSpawn;\n};\n\n\n/*\n * Rotates a Node object to a certain angle by modifying its angle property. <br/>\n * The direction will be decided by the shortest angle.\n * @class RotateTo\n * @extends ActionInterval\n * @param {Number} duration duration in seconds\n * @param {Number} dstAngle dstAngle in degrees.\n * @example\n * var rotateTo = new cc.RotateTo(2, 61.0);\n */\ncc.RotateTo = cc.Class({\n name: 'cc.RotateTo',\n extends: cc.ActionInterval,\n\n statics: {\n _reverse: false,\n },\n\n ctor:function (duration, dstAngle) {\n this._startAngle = 0;\n this._dstAngle = 0;\n this._angle = 0;\n dstAngle !== undefined && this.initWithDuration(duration, dstAngle);\n },\n\n /*\n * Initializes the action.\n * @param {Number} duration\n * @param {Number} dstAngle\n * @return {Boolean}\n */\n initWithDuration:function (duration, dstAngle) {\n if (cc.ActionInterval.prototype.initWithDuration.call(this, duration)) {\n this._dstAngle = dstAngle;\n return true;\n }\n return false;\n },\n\n clone:function () {\n var action = new cc.RotateTo();\n this._cloneDecoration(action);\n action.initWithDuration(this._duration, this._dstAngle);\n return action;\n },\n\n startWithTarget:function (target) {\n cc.ActionInterval.prototype.startWithTarget.call(this, target);\n\n let startAngle = target.angle % 360;\n\n let angle = cc.RotateTo._reverse ? (this._dstAngle - startAngle) : (this._dstAngle + startAngle);\n if (angle > 180) angle -= 360;\n if (angle < -180) angle += 360;\n\n this._startAngle = startAngle;\n this._angle = cc.RotateTo._reverse ? angle : -angle;\n },\n\n reverse:function () {\n cc.logID(1016);\n },\n\n update:function (dt) {\n dt = this._computeEaseTime(dt);\n if (this.target) {\n this.target.angle = this._startAngle + this._angle * dt;\n }\n }\n});\n\n/**\n * !#en\n * Rotates a Node object to a certain angle by modifying its angle property. <br/>\n * The direction will be decided by the shortest angle.\n * !#zh 旋转到目标角度,通过逐帧修改它的 angle 属性,旋转方向将由最短的角度决定。\n * @method rotateTo\n * @param {Number} duration duration in seconds\n * @param {Number} dstAngle dstAngle in degrees.\n * @return {ActionInterval}\n * @example\n * // example\n * var rotateTo = cc.rotateTo(2, 61.0);\n */\ncc.rotateTo = function (duration, dstAngle) {\n return new cc.RotateTo(duration, dstAngle);\n};\n\n\n/*\n * Rotates a Node object clockwise a number of degrees by modifying its angle property.\n * Relative to its properties to modify.\n * @class RotateBy\n * @extends ActionInterval\n * @param {Number} duration duration in seconds\n * @param {Number} deltaAngle deltaAngle in degrees\n * @example\n * var actionBy = new cc.RotateBy(2, 360);\n */\ncc.RotateBy = cc.Class({\n name: 'cc.RotateBy',\n extends: cc.ActionInterval,\n\n statics: {\n _reverse: false,\n },\n\n ctor: function (duration, deltaAngle) {\n deltaAngle *= cc.RotateBy._reverse ? 1 : -1;\n\n this._deltaAngle = 0;\n this._startAngle = 0;\n deltaAngle !== undefined && this.initWithDuration(duration, deltaAngle);\n },\n\n /*\n * Initializes the action.\n * @param {Number} duration duration in seconds\n * @param {Number} deltaAngle deltaAngle in degrees\n * @return {Boolean}\n */\n initWithDuration:function (duration, deltaAngle) {\n if (cc.ActionInterval.prototype.initWithDuration.call(this, duration)) {\n this._deltaAngle = deltaAngle;\n return true;\n }\n return false;\n },\n\n clone:function () {\n var action = new cc.RotateBy();\n this._cloneDecoration(action);\n action.initWithDuration(this._duration, this._deltaAngle);\n return action;\n },\n\n startWithTarget:function (target) {\n cc.ActionInterval.prototype.startWithTarget.call(this, target);\n this._startAngle = target.angle;\n },\n\n update:function (dt) {\n dt = this._computeEaseTime(dt);\n if (this.target) {\n this.target.angle = this._startAngle + this._deltaAngle * dt;\n }\n },\n\n reverse:function () {\n var action = new cc.RotateBy();\n action.initWithDuration(this._duration, -this._deltaAngle);\n this._cloneDecoration(action);\n this._reverseEaseList(action);\n return action;\n }\n});\n\n/**\n * !#en\n * Rotates a Node object clockwise a number of degrees by modifying its angle property.\n * Relative to its properties to modify.\n * !#zh 旋转指定的角度。\n * @method rotateBy\n * @param {Number} duration duration in seconds\n * @param {Number} deltaAngle deltaAngle in degrees\n * @return {ActionInterval}\n * @example\n * // example\n * var actionBy = cc.rotateBy(2, 360);\n */\ncc.rotateBy = function (duration, deltaAngle) {\n return new cc.RotateBy(duration, deltaAngle);\n};\n\n\n/*\n * <p>\n * Moves a Node object x,y pixels by modifying its position property. <br/>\n * x and y are relative to the position of the object. <br/>\n * Several MoveBy actions can be concurrently called, and the resulting <br/>\n * movement will be the sum of individual movements.\n * </p>\n * @class MoveBy\n * @extends ActionInterval\n * @param {Number} duration duration in seconds\n * @param {Vec2|Number} deltaPos\n * @param {Number} [deltaY]\n * @example\n * var actionTo = cc.moveBy(2, cc.v2(windowSize.width - 40, windowSize.height - 40));\n */\ncc.MoveBy = cc.Class({\n name: 'cc.MoveBy',\n extends: cc.ActionInterval,\n\n ctor:function (duration, deltaPos, deltaY) {\n this._positionDelta = cc.v2(0, 0);\n this._startPosition = cc.v2(0, 0);\n this._previousPosition = cc.v2(0, 0);\n\n deltaPos !== undefined && cc.MoveBy.prototype.initWithDuration.call(this, duration, deltaPos, deltaY);\t\n },\n\n /*\n * Initializes the action.\n * @param {Number} duration duration in seconds\n * @param {Vec2} position\n * @param {Number} [y]\n * @return {Boolean}\n */\n initWithDuration:function (duration, position, y) {\n if (cc.ActionInterval.prototype.initWithDuration.call(this, duration)) {\n\t if(position.x !== undefined) {\n\t\t y = position.y;\n\t\t position = position.x;\n\t }\n\n this._positionDelta.x = position;\n this._positionDelta.y = y;\n return true;\n }\n return false;\n },\n\n clone:function () {\n var action = new cc.MoveBy();\n this._cloneDecoration(action);\n action.initWithDuration(this._duration, this._positionDelta);\n return action;\n },\n\n startWithTarget:function (target) {\n cc.ActionInterval.prototype.startWithTarget.call(this, target);\n var locPosX = target.x;\n var locPosY = target.y;\n this._previousPosition.x = locPosX;\n this._previousPosition.y = locPosY;\n this._startPosition.x = locPosX;\n this._startPosition.y = locPosY;\n },\n\n update:function (dt) {\n dt = this._computeEaseTime(dt);\n if (this.target) {\n var x = this._positionDelta.x * dt;\n var y = this._positionDelta.y * dt;\n var locStartPosition = this._startPosition;\n if (cc.macro.ENABLE_STACKABLE_ACTIONS) {\n var targetX = this.target.x;\n var targetY = this.target.y;\n var locPreviousPosition = this._previousPosition;\n\n locStartPosition.x = locStartPosition.x + targetX - locPreviousPosition.x;\n locStartPosition.y = locStartPosition.y + targetY - locPreviousPosition.y;\n x = x + locStartPosition.x;\n y = y + locStartPosition.y;\n\t locPreviousPosition.x = x;\n\t locPreviousPosition.y = y;\n\t this.target.setPosition(x, y);\n } else {\n this.target.setPosition(locStartPosition.x + x, locStartPosition.y + y);\n }\n }\n },\n\n reverse:function () {\n var action = new cc.MoveBy(this._duration, cc.v2(-this._positionDelta.x, -this._positionDelta.y));\n this._cloneDecoration(action);\n this._reverseEaseList(action);\n return action;\n }\n});\n\n/**\n * !#en\n * Moves a Node object x,y pixels by modifying its position property. <br/>\n * x and y are relative to the position of the object. <br/>\n * Several MoveBy actions can be concurrently called, and the resulting <br/>\n * movement will be the sum of individual movements.\n * !#zh 移动指定的距离。\n * @method moveBy\n * @param {Number} duration duration in seconds\n * @param {Vec2|Number} deltaPos\n * @param {Number} [deltaY]\n * @return {ActionInterval}\n * @example\n * // example\n * var actionTo = cc.moveBy(2, cc.v2(windowSize.width - 40, windowSize.height - 40));\n */\ncc.moveBy = function (duration, deltaPos, deltaY) {\n return new cc.MoveBy(duration, deltaPos, deltaY);\n};\n\n\n/*\n * Moves a Node object to the position x,y. x and y are absolute coordinates by modifying its position property. <br/>\n * Several MoveTo actions can be concurrently called, and the resulting <br/>\n * movement will be the sum of individual movements.\n * @class MoveTo\n * @extends MoveBy\n * @param {Number} duration duration in seconds\n * @param {Vec2|Number} position\n * @param {Number} [y]\n * @example\n * var actionBy = new cc.MoveTo(2, cc.v2(80, 80));\n */\ncc.MoveTo = cc.Class({\n name: 'cc.MoveTo',\n extends: cc.MoveBy,\n\n ctor:function (duration, position, y) {\n this._endPosition = cc.v2(0, 0);\n\t\tposition !== undefined && this.initWithDuration(duration, position, y);\n },\n\n /*\n * Initializes the action.\n * @param {Number} duration duration in seconds\n * @param {Vec2} position\n * @param {Number} [y]\n * @return {Boolean}\n */\n initWithDuration:function (duration, position, y) {\n if (cc.MoveBy.prototype.initWithDuration.call(this, duration, position, y)) {\n\t if(position.x !== undefined) {\n\t\t y = position.y;\n\t\t position = position.x;\n\t }\n\n this._endPosition.x = position;\n this._endPosition.y = y;\n return true;\n }\n return false;\n },\n\n clone:function () {\n var action = new cc.MoveTo();\n this._cloneDecoration(action);\n action.initWithDuration(this._duration, this._endPosition);\n return action;\n },\n\n startWithTarget:function (target) {\n cc.MoveBy.prototype.startWithTarget.call(this, target);\n this._positionDelta.x = this._endPosition.x - target.x;\n this._positionDelta.y = this._endPosition.y - target.y;\n }\n});\n\n/**\n * !#en\n * Moves a Node object to the position x,y. x and y are absolute coordinates by modifying its position property. <br/>\n * Several MoveTo actions can be concurrently called, and the resulting <br/>\n * movement will be the sum of individual movements.\n * !#zh 移动到目标位置。\n * @method moveTo\n * @param {Number} duration duration in seconds\n * @param {Vec2|Number} position\n * @param {Number} [y]\n * @return {ActionInterval}\n * @example\n * // example\n * var actionBy = cc.moveTo(2, cc.v2(80, 80));\n */\ncc.moveTo = function (duration, position, y) {\n return new cc.MoveTo(duration, position, y);\n};\n\n/*\n * Skews a Node object to given angles by modifying its skewX and skewY properties\n * @class SkewTo\n * @extends ActionInterval\n * @param {Number} t time in seconds\n * @param {Number} sx\n * @param {Number} sy\n * @example\n * var actionTo = new cc.SkewTo(2, 37.2, -37.2);\n */\ncc.SkewTo = cc.Class({\n name: 'cc.SkewTo',\n extends: cc.ActionInterval,\n\n ctor: function (t, sx, sy) {\n this._skewX = 0;\n this._skewY = 0;\n this._startSkewX = 0;\n this._startSkewY = 0;\n this._endSkewX = 0;\n this._endSkewY = 0;\n this._deltaX = 0;\n this._deltaY = 0;\n sy !== undefined && cc.SkewTo.prototype.initWithDuration.call(this, t, sx, sy);\n },\n\n /*\n * Initializes the action.\n * @param {Number} t time in seconds\n * @param {Number} sx\n * @param {Number} sy\n * @return {Boolean}\n */\n initWithDuration:function (t, sx, sy) {\n var ret = false;\n if (cc.ActionInterval.prototype.initWithDuration.call(this, t)) {\n this._endSkewX = sx;\n this._endSkewY = sy;\n ret = true;\n }\n return ret;\n },\n\n clone:function () {\n var action = new cc.SkewTo();\n this._cloneDecoration(action);\n action.initWithDuration(this._duration, this._endSkewX, this._endSkewY);\n return action;\n },\n\n startWithTarget:function (target) {\n cc.ActionInterval.prototype.startWithTarget.call(this, target);\n\n this._startSkewX = target.skewX % 180;\n this._deltaX = this._endSkewX - this._startSkewX;\n if (this._deltaX > 180)\n this._deltaX -= 360;\n if (this._deltaX < -180)\n this._deltaX += 360;\n\n this._startSkewY = target.skewY % 360;\n this._deltaY = this._endSkewY - this._startSkewY;\n if (this._deltaY > 180)\n this._deltaY -= 360;\n if (this._deltaY < -180)\n this._deltaY += 360;\n },\n\n update:function (dt) {\n dt = this._computeEaseTime(dt);\n this.target.skewX = this._startSkewX + this._deltaX * dt;\n this.target.skewY = this._startSkewY + this._deltaY * dt;\n }\n});\n\n/**\n * !#en\n * Create a action which skews a Node object to given angles by modifying its skewX and skewY properties.\n * Changes to the specified value.\n * !#zh 偏斜到目标角度。\n * @method skewTo\n * @param {Number} t time in seconds\n * @param {Number} sx\n * @param {Number} sy\n * @return {ActionInterval}\n * @example\n * // example\n * var actionTo = cc.skewTo(2, 37.2, -37.2);\n */\ncc.skewTo = function (t, sx, sy) {\n return new cc.SkewTo(t, sx, sy);\n};\n\n/*\n * Skews a Node object by skewX and skewY degrees.\n * Relative to its property modification.\n * @class SkewBy\n * @extends SkewTo\n * @param {Number} t time in seconds\n * @param {Number} sx skew in degrees for X axis\n * @param {Number} sy skew in degrees for Y axis\n */\ncc.SkewBy = cc.Class({\n name: 'cc.SkewBy',\n extends: cc.SkewTo,\n\n\tctor: function(t, sx, sy) {\n\t\tsy !== undefined && this.initWithDuration(t, sx, sy);\n\t},\n\n /*\n * Initializes the action.\n * @param {Number} t time in seconds\n * @param {Number} deltaSkewX skew in degrees for X axis\n * @param {Number} deltaSkewY skew in degrees for Y axis\n * @return {Boolean}\n */\n initWithDuration:function (t, deltaSkewX, deltaSkewY) {\n var ret = false;\n if (cc.SkewTo.prototype.initWithDuration.call(this, t, deltaSkewX, deltaSkewY)) {\n this._skewX = deltaSkewX;\n this._skewY = deltaSkewY;\n ret = true;\n }\n return ret;\n },\n\n clone:function () {\n var action = new cc.SkewBy();\n this._cloneDecoration(action);\n action.initWithDuration(this._duration, this._skewX, this._skewY);\n return action;\n },\n\n startWithTarget:function (target) {\n cc.SkewTo.prototype.startWithTarget.call(this, target);\n this._deltaX = this._skewX;\n this._deltaY = this._skewY;\n this._endSkewX = this._startSkewX + this._deltaX;\n this._endSkewY = this._startSkewY + this._deltaY;\n },\n\n reverse:function () {\n var action = new cc.SkewBy(this._duration, -this._skewX, -this._skewY);\n this._cloneDecoration(action);\n this._reverseEaseList(action);\n return action;\n }\n});\n\n/**\n * !#en\n * Skews a Node object by skewX and skewY degrees. <br />\n * Relative to its property modification.\n * !#zh 偏斜指定的角度。\n * @method skewBy\n * @param {Number} t time in seconds\n * @param {Number} sx sx skew in degrees for X axis\n * @param {Number} sy sy skew in degrees for Y axis\n * @return {ActionInterval}\n * @example\n * // example\n * var actionBy = cc.skewBy(2, 0, -90);\n */\ncc.skewBy = function (t, sx, sy) {\n return new cc.SkewBy(t, sx, sy);\n};\n\n\n/*\n * Moves a Node object simulating a parabolic jump movement by modifying its position property.\n * Relative to its movement.\n * @class JumpBy\n * @extends ActionInterval\n * @param {Number} duration\n * @param {Vec2|Number} position\n * @param {Number} [y]\n * @param {Number} height\n * @param {Number} jumps\n * @example\n * var actionBy = new cc.JumpBy(2, cc.v2(300, 0), 50, 4);\n * var actionBy = new cc.JumpBy(2, 300, 0, 50, 4);\n */\ncc.JumpBy = cc.Class({\n name: 'cc.JumpBy',\n extends: cc.ActionInterval,\n\n ctor:function (duration, position, y, height, jumps) {\n this._startPosition = cc.v2(0, 0);\n this._previousPosition = cc.v2(0, 0);\n this._delta = cc.v2(0, 0);\n this._height = 0;\n this._jumps = 0;\n\n height !== undefined && cc.JumpBy.prototype.initWithDuration.call(this, duration, position, y, height, jumps);\n },\n /*\n * Initializes the action.\n * @param {Number} duration\n * @param {Vec2|Number} position\n * @param {Number} [y]\n * @param {Number} height\n * @param {Number} jumps\n * @return {Boolean}\n * @example\n * actionBy.initWithDuration(2, cc.v2(300, 0), 50, 4);\n * actionBy.initWithDuration(2, 300, 0, 50, 4);\n */\n initWithDuration:function (duration, position, y, height, jumps) {\n if (cc.ActionInterval.prototype.initWithDuration.call(this, duration)) {\n\t if (jumps === undefined) {\n\t\t jumps = height;\n\t\t height = y;\n\t\t y = position.y;\n\t\t position = position.x;\n\t }\n this._delta.x = position;\n this._delta.y = y;\n this._height = height;\n this._jumps = jumps;\n return true;\n }\n return false;\n },\n\n clone:function () {\n var action = new cc.JumpBy();\n this._cloneDecoration(action);\n action.initWithDuration(this._duration, this._delta, this._height, this._jumps);\n return action;\n },\n\n startWithTarget:function (target) {\n cc.ActionInterval.prototype.startWithTarget.call(this, target);\n var locPosX = target.x;\n var locPosY = target.y;\n this._previousPosition.x = locPosX;\n this._previousPosition.y = locPosY;\n this._startPosition.x = locPosX;\n this._startPosition.y = locPosY;\n },\n\n update:function (dt) {\n dt = this._computeEaseTime(dt);\n if (this.target) {\n var frac = dt * this._jumps % 1.0;\n var y = this._height * 4 * frac * (1 - frac);\n y += this._delta.y * dt;\n\n var x = this._delta.x * dt;\n var locStartPosition = this._startPosition;\n if (cc.macro.ENABLE_STACKABLE_ACTIONS) {\n var targetX = this.target.x;\n var targetY = this.target.y;\n var locPreviousPosition = this._previousPosition;\n\n locStartPosition.x = locStartPosition.x + targetX - locPreviousPosition.x;\n locStartPosition.y = locStartPosition.y + targetY - locPreviousPosition.y;\n x = x + locStartPosition.x;\n y = y + locStartPosition.y;\n\t locPreviousPosition.x = x;\n\t locPreviousPosition.y = y;\n\t this.target.setPosition(x, y);\n } else {\n this.target.setPosition(locStartPosition.x + x, locStartPosition.y + y);\n }\n }\n },\n\n reverse:function () {\n var action = new cc.JumpBy(this._duration, cc.v2(-this._delta.x, -this._delta.y), this._height, this._jumps);\n this._cloneDecoration(action);\n this._reverseEaseList(action);\n return action;\n }\n});\n\n/**\n * !#en\n * Moves a Node object simulating a parabolic jump movement by modifying it's position property.\n * Relative to its movement.\n * !#zh 用跳跃的方式移动指定的距离。\n * @method jumpBy\n * @param {Number} duration\n * @param {Vec2|Number} position\n * @param {Number} [y]\n * @param {Number} [height]\n * @param {Number} [jumps]\n * @return {ActionInterval}\n * @example\n * // example\n * var actionBy = cc.jumpBy(2, cc.v2(300, 0), 50, 4);\n * var actionBy = cc.jumpBy(2, 300, 0, 50, 4);\n */\ncc.jumpBy = function (duration, position, y, height, jumps) {\n return new cc.JumpBy(duration, position, y, height, jumps);\n};\n\n/*\n * Moves a Node object to a parabolic position simulating a jump movement by modifying it's position property. <br />\n * Jump to the specified location.\n * @class JumpTo\n * @extends JumpBy\n * @param {Number} duration\n * @param {Vec2|Number} position\n * @param {Number} [y]\n * @param {Number} [height]\n * @param {Number} [jumps]\n * @example\n * var actionTo = new cc.JumpTo(2, cc.v2(300, 0), 50, 4);\n * var actionTo = new cc.JumpTo(2, 300, 0, 50, 4);\n */\ncc.JumpTo = cc.Class({\n name: 'cc.JumpTo',\n extends: cc.JumpBy,\n\n ctor:function (duration, position, y, height, jumps) {\n this._endPosition = cc.v2(0, 0);\n height !== undefined && this.initWithDuration(duration, position, y, height, jumps);\n },\n /*\n * Initializes the action.\n * @param {Number} duration\n * @param {Vec2|Number} position\n * @param {Number} [y]\n * @param {Number} height\n * @param {Number} jumps\n * @return {Boolean}\n * @example\n * actionTo.initWithDuration(2, cc.v2(300, 0), 50, 4);\n * actionTo.initWithDuration(2, 300, 0, 50, 4);\n */\n initWithDuration:function (duration, position, y, height, jumps) {\n if (cc.JumpBy.prototype.initWithDuration.call(this, duration, position, y, height, jumps)) {\n if (jumps === undefined) {\n y = position.y;\n position = position.x;\n }\n this._endPosition.x = position;\n this._endPosition.y = y;\n return true;\n }\n return false;\n },\n\n startWithTarget:function (target) {\n cc.JumpBy.prototype.startWithTarget.call(this, target);\n this._delta.x = this._endPosition.x - this._startPosition.x;\n this._delta.y = this._endPosition.y - this._startPosition.y;\n },\n\n clone:function () {\n var action = new cc.JumpTo();\n this._cloneDecoration(action);\n action.initWithDuration(this._duration, this._endPosition, this._height, this._jumps);\n return action;\n }\n});\n\n/**\n * !#en\n * Moves a Node object to a parabolic position simulating a jump movement by modifying its position property. <br />\n * Jump to the specified location.\n * !#zh 用跳跃的方式移动到目标位置。\n * @method jumpTo\n * @param {Number} duration\n * @param {Vec2|Number} position\n * @param {Number} [y]\n * @param {Number} [height]\n * @param {Number} [jumps]\n * @return {ActionInterval}\n * @example\n * // example\n * var actionTo = cc.jumpTo(2, cc.v2(300, 300), 50, 4);\n * var actionTo = cc.jumpTo(2, 300, 300, 50, 4);\n */\ncc.jumpTo = function (duration, position, y, height, jumps) {\n return new cc.JumpTo(duration, position, y, height, jumps);\n};\n\n/* An action that moves the target with a cubic Bezier curve by a certain distance.\n * Relative to its movement.\n * @class BezierBy\n * @extends ActionInterval\n * @param {Number} t - time in seconds\n * @param {Vec2[]} c - Array of points\n * @example\n * var bezier = [cc.v2(0, windowSize.height / 2), cc.v2(300, -windowSize.height / 2), cc.v2(300, 100)];\n * var bezierForward = new cc.BezierBy(3, bezier);\n */\nfunction bezierAt (a, b, c, d, t) {\n return (Math.pow(1 - t, 3) * a +\n 3 * t * (Math.pow(1 - t, 2)) * b +\n 3 * Math.pow(t, 2) * (1 - t) * c +\n Math.pow(t, 3) * d );\n};\ncc.BezierBy = cc.Class({\n name: 'cc.BezierBy',\n extends: cc.ActionInterval,\n\n ctor:function (t, c) {\n this._config = [];\n this._startPosition = cc.v2(0, 0);\n this._previousPosition = cc.v2(0, 0);\n c && cc.BezierBy.prototype.initWithDuration.call(this, t, c);\n },\n\n /*\n * Initializes the action.\n * @param {Number} t - time in seconds\n * @param {Vec2[]} c - Array of points\n * @return {Boolean}\n */\n initWithDuration:function (t, c) {\n if (cc.ActionInterval.prototype.initWithDuration.call(this, t)) {\n this._config = c;\n return true;\n }\n return false;\n },\n\n clone:function () {\n var action = new cc.BezierBy();\n this._cloneDecoration(action);\n var newConfigs = [];\n for (var i = 0; i < this._config.length; i++) {\n var selConf = this._config[i];\n newConfigs.push(cc.v2(selConf.x, selConf.y));\n }\n action.initWithDuration(this._duration, newConfigs);\n return action;\n },\n\n startWithTarget:function (target) {\n cc.ActionInterval.prototype.startWithTarget.call(this, target);\n var locPosX = target.x;\n var locPosY = target.y;\n this._previousPosition.x = locPosX;\n this._previousPosition.y = locPosY;\n this._startPosition.x = locPosX;\n this._startPosition.y = locPosY;\n },\n\n update:function (dt) {\n dt = this._computeEaseTime(dt);\n if (this.target) {\n var locConfig = this._config;\n var xa = 0;\n var xb = locConfig[0].x;\n var xc = locConfig[1].x;\n var xd = locConfig[2].x;\n\n var ya = 0;\n var yb = locConfig[0].y;\n var yc = locConfig[1].y;\n var yd = locConfig[2].y;\n\n var x = bezierAt(xa, xb, xc, xd, dt);\n var y = bezierAt(ya, yb, yc, yd, dt);\n\n var locStartPosition = this._startPosition;\n if (cc.macro.ENABLE_STACKABLE_ACTIONS) {\n var targetX = this.target.x;\n var targetY = this.target.y;\n var locPreviousPosition = this._previousPosition;\n\n locStartPosition.x = locStartPosition.x + targetX - locPreviousPosition.x;\n locStartPosition.y = locStartPosition.y + targetY - locPreviousPosition.y;\n x = x + locStartPosition.x;\n y = y + locStartPosition.y;\n\t locPreviousPosition.x = x;\n\t locPreviousPosition.y = y;\n\t this.target.setPosition(x, y);\n } else {\n this.target.setPosition(locStartPosition.x + x, locStartPosition.y + y);\n }\n }\n },\n\n reverse:function () {\n var locConfig = this._config;\n var x0 = locConfig[0].x, y0 = locConfig[0].y;\n var x1 = locConfig[1].x, y1 = locConfig[1].y;\n var x2 = locConfig[2].x, y2 = locConfig[2].y;\n var r = [\n cc.v2(x1 - x2, y1 - y2),\n cc.v2(x0 - x2, y0 - y2),\n cc.v2(-x2, -y2) ];\n var action = new cc.BezierBy(this._duration, r);\n this._cloneDecoration(action);\n this._reverseEaseList(action);\n return action;\n }\n});\n\n/**\n * !#en\n * An action that moves the target with a cubic Bezier curve by a certain distance.\n * Relative to its movement.\n * !#zh 按贝赛尔曲线轨迹移动指定的距离。\n * @method bezierBy\n * @param {Number} t - time in seconds\n * @param {Vec2[]} c - Array of points\n * @return {ActionInterval}\n * @example\n * // example\n * var bezier = [cc.v2(0, windowSize.height / 2), cc.v2(300, -windowSize.height / 2), cc.v2(300, 100)];\n * var bezierForward = cc.bezierBy(3, bezier);\n */\ncc.bezierBy = function (t, c) {\n return new cc.BezierBy(t, c);\n};\n\n\n/* An action that moves the target with a cubic Bezier curve to a destination point.\n * @class BezierTo\n * @extends BezierBy\n * @param {Number} t\n * @param {Vec2[]} c - Array of points\n * @example\n * var bezier = [cc.v2(0, windowSize.height / 2), cc.v2(300, -windowSize.height / 2), cc.v2(300, 100)];\n * var bezierTo = new cc.BezierTo(2, bezier);\n */\ncc.BezierTo = cc.Class({\n name: 'cc.BezierTo',\n extends: cc.BezierBy,\n\n ctor:function (t, c) {\n this._toConfig = [];\n\t\tc && this.initWithDuration(t, c);\n },\n\n /*\n * Initializes the action.\n * @param {Number} t time in seconds\n * @param {Vec2[]} c - Array of points\n * @return {Boolean}\n */\n initWithDuration:function (t, c) {\n if (cc.ActionInterval.prototype.initWithDuration.call(this, t)) {\n this._toConfig = c;\n return true;\n }\n return false;\n },\n\n clone:function () {\n var action = new cc.BezierTo();\n this._cloneDecoration(action);\n action.initWithDuration(this._duration, this._toConfig);\n return action;\n },\n\n startWithTarget:function (target) {\n cc.BezierBy.prototype.startWithTarget.call(this, target);\n var locStartPos = this._startPosition;\n var locToConfig = this._toConfig;\n var locConfig = this._config;\n\n locConfig[0] = locToConfig[0].sub(locStartPos);\n locConfig[1] = locToConfig[1].sub(locStartPos);\n locConfig[2] = locToConfig[2].sub(locStartPos);\n }\n});\n/**\n * !#en An action that moves the target with a cubic Bezier curve to a destination point.\n * !#zh 按贝赛尔曲线轨迹移动到目标位置。\n * @method bezierTo\n * @param {Number} t\n * @param {Vec2[]} c - Array of points\n * @return {ActionInterval}\n * @example\n * // example\n * var bezier = [cc.v2(0, windowSize.height / 2), cc.v2(300, -windowSize.height / 2), cc.v2(300, 100)];\n * var bezierTo = cc.bezierTo(2, bezier);\n */\ncc.bezierTo = function (t, c) {\n return new cc.BezierTo(t, c);\n};\n\n\n/* Scales a Node object to a zoom factor by modifying it's scale property.\n * @warning This action doesn't support \"reverse\"\n * @class ScaleTo\n * @extends ActionInterval\n * @param {Number} duration\n * @param {Number} sx scale parameter in X\n * @param {Number} [sy] scale parameter in Y, if Null equal to sx\n * @example\n * // It scales to 0.5 in both X and Y.\n * var actionTo = new cc.ScaleTo(2, 0.5);\n *\n * // It scales to 0.5 in x and 2 in Y\n * var actionTo = new cc.ScaleTo(2, 0.5, 2);\n */\ncc.ScaleTo = cc.Class({\n name: 'cc.ScaleTo',\n extends: cc.ActionInterval,\n\n ctor:function (duration, sx, sy) {\n this._scaleX = 1;\n this._scaleY = 1;\n this._startScaleX = 1;\n this._startScaleY = 1;\n this._endScaleX = 0;\n this._endScaleY = 0;\n this._deltaX = 0;\n this._deltaY = 0;\n sx !== undefined && cc.ScaleTo.prototype.initWithDuration.call(this, duration, sx, sy);\n },\n\n /*\n * Initializes the action.\n * @param {Number} duration\n * @param {Number} sx\n * @param {Number} [sy=]\n * @return {Boolean}\n */\n initWithDuration:function (duration, sx, sy) { //function overload here\n if (cc.ActionInterval.prototype.initWithDuration.call(this, duration)) {\n this._endScaleX = sx;\n this._endScaleY = (sy != null) ? sy : sx;\n return true;\n }\n return false;\n },\n\n clone:function () {\n var action = new cc.ScaleTo();\n this._cloneDecoration(action);\n action.initWithDuration(this._duration, this._endScaleX, this._endScaleY);\n return action;\n },\n\n startWithTarget:function (target) {\n cc.ActionInterval.prototype.startWithTarget.call(this, target);\n this._startScaleX = target.scaleX;\n this._startScaleY = target.scaleY;\n this._deltaX = this._endScaleX - this._startScaleX;\n this._deltaY = this._endScaleY - this._startScaleY;\n },\n\n update:function (dt) {\n dt = this._computeEaseTime(dt);\n if (this.target) {\n this.target.scaleX = this._startScaleX + this._deltaX * dt;\n\t this.target.scaleY = this._startScaleY + this._deltaY * dt;\n }\n }\n});\n/**\n * !#en Scales a Node object to a zoom factor by modifying it's scale property.\n * !#zh 将节点大小缩放到指定的倍数。\n * @method scaleTo\n * @param {Number} duration\n * @param {Number} sx scale parameter in X\n * @param {Number} [sy] scale parameter in Y, if Null equal to sx\n * @return {ActionInterval}\n * @example\n * // example\n * // It scales to 0.5 in both X and Y.\n * var actionTo = cc.scaleTo(2, 0.5);\n *\n * // It scales to 0.5 in x and 2 in Y\n * var actionTo = cc.scaleTo(2, 0.5, 2);\n */\ncc.scaleTo = function (duration, sx, sy) { //function overload\n return new cc.ScaleTo(duration, sx, sy);\n};\n\n\n/* Scales a Node object a zoom factor by modifying it's scale property.\n * Relative to its changes.\n * @class ScaleBy\n * @extends ScaleTo\n */\ncc.ScaleBy = cc.Class({\n name: 'cc.ScaleBy',\n extends: cc.ScaleTo,\n\n startWithTarget:function (target) {\n cc.ScaleTo.prototype.startWithTarget.call(this, target);\n this._deltaX = this._startScaleX * this._endScaleX - this._startScaleX;\n this._deltaY = this._startScaleY * this._endScaleY - this._startScaleY;\n },\n\n reverse:function () {\n var action = new cc.ScaleBy(this._duration, 1 / this._endScaleX, 1 / this._endScaleY);\n this._cloneDecoration(action);\n this._reverseEaseList(action);\n return action;\n },\n\n clone:function () {\n var action = new cc.ScaleBy();\n this._cloneDecoration(action);\n action.initWithDuration(this._duration, this._endScaleX, this._endScaleY);\n return action;\n }\n});\n/**\n * !#en\n * Scales a Node object a zoom factor by modifying it's scale property.\n * Relative to its changes.\n * !#zh 按指定的倍数缩放节点大小。\n * @method scaleBy\n * @param {Number} duration duration in seconds\n * @param {Number} sx sx scale parameter in X\n * @param {Number|Null} [sy=] sy scale parameter in Y, if Null equal to sx\n * @return {ActionInterval}\n * @example\n * // example without sy, it scales by 2 both in X and Y\n * var actionBy = cc.scaleBy(2, 2);\n *\n * //example with sy, it scales by 0.25 in X and 4.5 in Y\n * var actionBy2 = cc.scaleBy(2, 0.25, 4.5);\n */\ncc.scaleBy = function (duration, sx, sy) {\n return new cc.ScaleBy(duration, sx, sy);\n};\n\n/* Blinks a Node object by modifying it's visible property\n * @class Blink\n * @extends ActionInterval\n * @param {Number} duration duration in seconds\n * @param {Number} blinks blinks in times\n * @example\n * var action = new cc.Blink(2, 10);\n */\ncc.Blink = cc.Class({\n name: 'cc.Blink',\n extends: cc.ActionInterval,\n\n ctor:function (duration, blinks) {\n this._times = 0;\n this._originalState = false;\n\t\tblinks !== undefined && this.initWithDuration(duration, blinks);\n },\n\n /*\n * Initializes the action.\n * @param {Number} duration duration in seconds\n * @param {Number} blinks blinks in times\n * @return {Boolean}\n */\n initWithDuration:function (duration, blinks) {\n if (cc.ActionInterval.prototype.initWithDuration.call(this, duration)) {\n this._times = blinks;\n return true;\n }\n return false;\n },\n\n clone:function () {\n var action = new cc.Blink();\n this._cloneDecoration(action);\n action.initWithDuration(this._duration, this._times);\n return action;\n },\n\n update:function (dt) {\n dt = this._computeEaseTime(dt);\n if (this.target && !this.isDone()) {\n var slice = 1.0 / this._times;\n var m = dt % slice;\n this.target.opacity = (m > (slice / 2)) ? 255 : 0;\n }\n },\n\n startWithTarget:function (target) {\n cc.ActionInterval.prototype.startWithTarget.call(this, target);\n this._originalState = target.opacity;\n },\n\n stop:function () {\n this.target.opacity = this._originalState;\n cc.ActionInterval.prototype.stop.call(this);\n },\n\n reverse:function () {\n var action = new cc.Blink(this._duration, this._times);\n this._cloneDecoration(action);\n this._reverseEaseList(action);\n return action;\n }\n});\n/**\n * !#en Blinks a Node object by modifying it's visible property.\n * !#zh 闪烁(基于透明度)。\n * @method blink\n * @param {Number} duration duration in seconds\n * @param {Number} blinks blinks in times\n * @return {ActionInterval}\n * @example\n * // example\n * var action = cc.blink(2, 10);\n */\ncc.blink = function (duration, blinks) {\n return new cc.Blink(duration, blinks);\n};\n\n/* Fades an object that implements the cc.RGBAProtocol protocol. It modifies the opacity from the current value to a custom one.\n * @warning This action doesn't support \"reverse\"\n * @class FadeTo\n * @extends ActionInterval\n * @param {Number} duration\n * @param {Number} opacity 0-255, 0 is transparent\n * @example\n * var action = new cc.FadeTo(1.0, 0);\n */\ncc.FadeTo = cc.Class({\n name: 'cc.FadeTo',\n extends: cc.ActionInterval,\n\n ctor:function (duration, opacity) {\n this._toOpacity = 0;\n this._fromOpacity = 0;\n opacity !== undefined && cc.FadeTo.prototype.initWithDuration.call(this, duration, opacity);\n },\n\n /*\n * Initializes the action.\n * @param {Number} duration duration in seconds\n * @param {Number} opacity\n * @return {Boolean}\n */\n initWithDuration:function (duration, opacity) {\n if (cc.ActionInterval.prototype.initWithDuration.call(this, duration)) {\n this._toOpacity = opacity;\n return true;\n }\n return false;\n },\n\n clone:function () {\n var action = new cc.FadeTo();\n this._cloneDecoration(action);\n action.initWithDuration(this._duration, this._toOpacity);\n return action;\n },\n\n update:function (time) {\n time = this._computeEaseTime(time);\n var fromOpacity = this._fromOpacity !== undefined ? this._fromOpacity : 255;\n this.target.opacity = fromOpacity + (this._toOpacity - fromOpacity) * time;\n },\n\n startWithTarget:function (target) {\n cc.ActionInterval.prototype.startWithTarget.call(this, target);\n this._fromOpacity = target.opacity;\n }\n});\n\n/**\n * !#en\n * Fades an object that implements the cc.RGBAProtocol protocol.\n * It modifies the opacity from the current value to a custom one.\n * !#zh 修改透明度到指定值。\n * @method fadeTo\n * @param {Number} duration\n * @param {Number} opacity 0-255, 0 is transparent\n * @return {ActionInterval}\n * @example\n * // example\n * var action = cc.fadeTo(1.0, 0);\n */\ncc.fadeTo = function (duration, opacity) {\n return new cc.FadeTo(duration, opacity);\n};\n\n/* Fades In an object that implements the cc.RGBAProtocol protocol. It modifies the opacity from 0 to 255.<br/>\n * The \"reverse\" of this action is FadeOut\n * @class FadeIn\n * @extends FadeTo\n * @param {Number} duration duration in seconds\n */\ncc.FadeIn = cc.Class({\n name: 'cc.FadeIn',\n extends: cc.FadeTo,\n\n ctor:function (duration) {\n if (duration == null)\n duration = 0;\n this._reverseAction = null;\n this.initWithDuration(duration, 255);\n },\n\n reverse:function () {\n var action = new cc.FadeOut();\n action.initWithDuration(this._duration, 0);\n this._cloneDecoration(action);\n this._reverseEaseList(action);\n return action;\n },\n\n clone:function () {\n var action = new cc.FadeIn();\n this._cloneDecoration(action);\n action.initWithDuration(this._duration, this._toOpacity);\n return action;\n },\n\n startWithTarget:function (target) {\n if(this._reverseAction)\n this._toOpacity = this._reverseAction._fromOpacity;\n cc.FadeTo.prototype.startWithTarget.call(this, target);\n }\n});\n\n/**\n * !#en Fades In an object that implements the cc.RGBAProtocol protocol. It modifies the opacity from 0 to 255.\n * !#zh 渐显效果。\n * @method fadeIn\n * @param {Number} duration duration in seconds\n * @return {ActionInterval}\n * @example\n * //example\n * var action = cc.fadeIn(1.0);\n */\ncc.fadeIn = function (duration) {\n return new cc.FadeIn(duration);\n};\n\n\n/* Fades Out an object that implements the cc.RGBAProtocol protocol. It modifies the opacity from 255 to 0.\n * The \"reverse\" of this action is FadeIn\n * @class FadeOut\n * @extends FadeTo\n * @param {Number} duration duration in seconds\n */\ncc.FadeOut = cc.Class({\n name: 'cc.FadeOut',\n extends: cc.FadeTo,\n\n ctor:function (duration) {\n if (duration == null)\n duration = 0;\n this._reverseAction = null;\n this.initWithDuration(duration, 0);\n },\n\n reverse:function () {\n var action = new cc.FadeIn();\n action._reverseAction = this;\n action.initWithDuration(this._duration, 255);\n this._cloneDecoration(action);\n this._reverseEaseList(action);\n return action;\n },\n\n clone:function () {\n var action = new cc.FadeOut();\n this._cloneDecoration(action);\n action.initWithDuration(this._duration, this._toOpacity);\n return action;\n }\n});\n\n/**\n * !#en Fades Out an object that implements the cc.RGBAProtocol protocol. It modifies the opacity from 255 to 0.\n * !#zh 渐隐效果。\n * @method fadeOut\n * @param {Number} d duration in seconds\n * @return {ActionInterval}\n * @example\n * // example\n * var action = cc.fadeOut(1.0);\n */\ncc.fadeOut = function (d) {\n return new cc.FadeOut(d);\n};\n\n/* Tints a Node that implements the cc.NodeRGB protocol from current tint to a custom one.\n * @warning This action doesn't support \"reverse\"\n * @class TintTo\n * @extends ActionInterval\n * @param {Number} duration\n * @param {Number} red 0-255\n * @param {Number} green 0-255\n * @param {Number} blue 0-255\n * @example\n * var action = new cc.TintTo(2, 255, 0, 255);\n */\ncc.TintTo = cc.Class({\n name: 'cc.TintTo',\n extends: cc.ActionInterval,\n\n ctor:function (duration, red, green, blue) {\n this._to = cc.color(0, 0, 0);\n this._from = cc.color(0, 0, 0);\n\n if (red instanceof cc.Color) {\n blue = red.b;\n green = red.g;\n red = red.r;\n }\n\n blue !== undefined && this.initWithDuration(duration, red, green, blue);\n },\n\n /*\n * Initializes the action.\n * @param {Number} duration\n * @param {Number} red 0-255\n * @param {Number} green 0-255\n * @param {Number} blue 0-255\n * @return {Boolean}\n */\n initWithDuration:function (duration, red, green, blue) {\n if (cc.ActionInterval.prototype.initWithDuration.call(this, duration)) {\n this._to = cc.color(red, green, blue);\n return true;\n }\n return false;\n },\n\n clone:function () {\n var action = new cc.TintTo();\n this._cloneDecoration(action);\n var locTo = this._to;\n action.initWithDuration(this._duration, locTo.r, locTo.g, locTo.b);\n return action;\n },\n\n startWithTarget:function (target) {\n cc.ActionInterval.prototype.startWithTarget.call(this, target);\n\n this._from = this.target.color;\n },\n\n update:function (dt) {\n dt = this._computeEaseTime(dt);\n var locFrom = this._from, locTo = this._to;\n if (locFrom) {\n this.target.color = cc.color(\n locFrom.r + (locTo.r - locFrom.r) * dt,\n locFrom.g + (locTo.g - locFrom.g) * dt,\n locFrom.b + (locTo.b - locFrom.b) * dt);\n }\n }\n});\n\n/**\n * !#en Tints a Node that implements the cc.NodeRGB protocol from current tint to a custom one.\n * !#zh 修改颜色到指定值。\n * @method tintTo\n * @param {Number} duration\n * @param {Number} red 0-255\n * @param {Number} green 0-255\n * @param {Number} blue 0-255\n * @return {ActionInterval}\n * @example\n * // example\n * var action = cc.tintTo(2, 255, 0, 255);\n */\ncc.tintTo = function (duration, red, green, blue) {\n return new cc.TintTo(duration, red, green, blue);\n};\n\n\n/* Tints a Node that implements the cc.NodeRGB protocol from current tint to a custom one.\n * Relative to their own color change.\n * @class TintBy\n * @extends ActionInterval\n * @param {Number} duration duration in seconds\n * @param {Number} deltaRed\n * @param {Number} deltaGreen\n * @param {Number} deltaBlue\n * @example\n * var action = new cc.TintBy(2, -127, -255, -127);\n */\ncc.TintBy = cc.Class({\n name: 'cc.TintBy',\n extends: cc.ActionInterval,\n\n ctor:function (duration, deltaRed, deltaGreen, deltaBlue) {\n this._deltaR = 0;\n this._deltaG = 0;\n this._deltaB = 0;\n this._fromR = 0;\n this._fromG = 0;\n this._fromB = 0;\n\t\tdeltaBlue !== undefined && this.initWithDuration(duration, deltaRed, deltaGreen, deltaBlue);\n },\n\n /*\n * Initializes the action.\n * @param {Number} duration\n * @param {Number} deltaRed 0-255\n * @param {Number} deltaGreen 0-255\n * @param {Number} deltaBlue 0-255\n * @return {Boolean}\n */\n initWithDuration:function (duration, deltaRed, deltaGreen, deltaBlue) {\n if (cc.ActionInterval.prototype.initWithDuration.call(this, duration)) {\n this._deltaR = deltaRed;\n this._deltaG = deltaGreen;\n this._deltaB = deltaBlue;\n return true;\n }\n return false;\n },\n\n clone:function () {\n var action = new cc.TintBy();\n this._cloneDecoration(action);\n action.initWithDuration(this._duration, this._deltaR, this._deltaG, this._deltaB);\n return action;\n },\n\n startWithTarget:function (target) {\n cc.ActionInterval.prototype.startWithTarget.call(this, target);\n\n var color = target.color;\n this._fromR = color.r;\n this._fromG = color.g;\n this._fromB = color.b;\n },\n\n update:function (dt) {\n dt = this._computeEaseTime(dt);\n\n this.target.color = cc.color(this._fromR + this._deltaR * dt,\n this._fromG + this._deltaG * dt,\n this._fromB + this._deltaB * dt);\n },\n\n reverse:function () {\n var action = new cc.TintBy(this._duration, -this._deltaR, -this._deltaG, -this._deltaB);\n this._cloneDecoration(action);\n this._reverseEaseList(action);\n return action;\n }\n});\n\n/**\n * !#en\n * Tints a Node that implements the cc.NodeRGB protocol from current tint to a custom one.\n * Relative to their own color change.\n * !#zh 按照指定的增量修改颜色。\n * @method tintBy\n * @param {Number} duration duration in seconds\n * @param {Number} deltaRed\n * @param {Number} deltaGreen\n * @param {Number} deltaBlue\n * @return {ActionInterval}\n * @example\n * // example\n * var action = cc.tintBy(2, -127, -255, -127);\n */\ncc.tintBy = function (duration, deltaRed, deltaGreen, deltaBlue) {\n return new cc.TintBy(duration, deltaRed, deltaGreen, deltaBlue);\n};\n\n/* Delays the action a certain amount of seconds\n * @class DelayTime\n * @extends ActionInterval\n */\ncc.DelayTime = cc.Class({\n name: 'cc.DelayTime',\n extends: cc.ActionInterval,\n\n update:function (dt) {},\n\n reverse:function () {\n var action = new cc.DelayTime(this._duration);\n this._cloneDecoration(action);\n this._reverseEaseList(action);\n return action;\n },\n\n clone:function () {\n var action = new cc.DelayTime();\n this._cloneDecoration(action);\n action.initWithDuration(this._duration);\n return action;\n }\n});\n\n/**\n * !#en Delays the action a certain amount of seconds.\n * !#zh 延迟指定的时间量。\n * @method delayTime\n * @param {Number} d duration in seconds\n * @return {ActionInterval}\n * @example\n * // example\n * var delay = cc.delayTime(1);\n */\ncc.delayTime = function (d) {\n return new cc.DelayTime(d);\n};\n\n/*\n * <p>\n * Executes an action in reverse order, from time=duration to time=0 <br/>\n * @warning Use this action carefully. This action is not sequenceable. <br/>\n * Use it as the default \"reversed\" method of your own actions, but using it outside the \"reversed\" <br/>\n * scope is not recommended.\n * </p>\n * @class ReverseTime\n * @extends ActionInterval\n * @param {FiniteTimeAction} action\n * @example\n * var reverse = new cc.ReverseTime(this);\n */\ncc.ReverseTime = cc.Class({\n name: 'cc.ReverseTime',\n extends: cc.ActionInterval,\n\n ctor:function (action) {\n this._other = null;\n\t\taction && this.initWithAction(action);\n },\n\n /*\n * @param {FiniteTimeAction} action\n * @return {Boolean}\n */\n initWithAction:function (action) {\n if (!action) {\n cc.errorID(1028);\n return false;\n }\n if (action === this._other) {\n cc.errorID(1029);\n return false;\n }\n\n if (cc.ActionInterval.prototype.initWithDuration.call(this, action._duration)) {\n // Don't leak if action is reused\n this._other = action;\n return true;\n }\n return false;\n },\n\n clone:function () {\n var action = new cc.ReverseTime();\n this._cloneDecoration(action);\n action.initWithAction(this._other.clone());\n return action;\n },\n\n startWithTarget:function (target) {\n cc.ActionInterval.prototype.startWithTarget.call(this, target);\n this._other.startWithTarget(target);\n },\n\n update:function (dt) {\n dt = this._computeEaseTime(dt);\n if (this._other)\n this._other.update(1 - dt);\n },\n\n reverse:function () {\n return this._other.clone();\n },\n\n stop:function () {\n this._other.stop();\n cc.Action.prototype.stop.call(this);\n }\n});\n\n/**\n * !#en Executes an action in reverse order, from time=duration to time=0.\n * !#zh 反转目标动作的时间轴。\n * @method reverseTime\n * @param {FiniteTimeAction} action\n * @return {ActionInterval}\n * @example\n * // example\n * var reverse = cc.reverseTime(this);\n */\ncc.reverseTime = function (action) {\n return new cc.ReverseTime(action);\n};\n\n/*\n * <p>\n * Overrides the target of an action so that it always runs on the target<br/>\n * specified at action creation rather than the one specified by runAction.\n * </p>\n * @class TargetedAction\n * @extends ActionInterval\n * @param {Node} target\n * @param {FiniteTimeAction} action\n */\ncc.TargetedAction = cc.Class({\n name: 'cc.TargetedAction',\n extends: cc.ActionInterval,\n\n ctor: function (target, action) {\n this._action = null;\n this._forcedTarget = null;\n\t\taction && this.initWithTarget(target, action);\n },\n\n /*\n * Init an action with the specified action and forced target\n * @param {Node} target\n * @param {FiniteTimeAction} action\n * @return {Boolean}\n */\n initWithTarget:function (target, action) {\n if (this.initWithDuration(action._duration)) {\n this._forcedTarget = target;\n this._action = action;\n return true;\n }\n return false;\n },\n\n clone:function () {\n var action = new cc.TargetedAction();\n this._cloneDecoration(action);\n action.initWithTarget(this._forcedTarget, this._action.clone());\n return action;\n },\n\n startWithTarget:function (target) {\n cc.ActionInterval.prototype.startWithTarget.call(this, target);\n this._action.startWithTarget(this._forcedTarget);\n },\n\n stop:function () {\n this._action.stop();\n },\n\n update:function (dt) {\n dt = this._computeEaseTime(dt);\n this._action.update(dt);\n },\n\n /*\n * return the target that the action will be forced to run with\n * @return {Node}\n */\n getForcedTarget:function () {\n return this._forcedTarget;\n },\n\n /*\n * set the target that the action will be forced to run with\n * @param {Node} forcedTarget\n */\n setForcedTarget:function (forcedTarget) {\n if (this._forcedTarget !== forcedTarget)\n this._forcedTarget = forcedTarget;\n }\n});\n\n/**\n * !#en Create an action with the specified action and forced target.\n * !#zh 用已有动作和一个新的目标节点创建动作。\n * @method targetedAction\n * @param {Node} target\n * @param {FiniteTimeAction} action\n * @return {ActionInterval}\n */\ncc.targetedAction = function (target, action) {\n return new cc.TargetedAction(target, action);\n};\n","/****************************************************************************\n Copyright (c) 2008-2010 Ricardo Quesada\n Copyright (c) 2011-2012 cocos2d-x.org\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos2d-x.org\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nrequire('../core/platform/CCClass');\nvar js = require('../core/platform/js');\n\n/*\n * @class HashElement\n * @constructor\n * @private\n */\nvar HashElement = function () {\n this.actions = [];\n this.target = null; //ccobject\n this.actionIndex = 0;\n this.currentAction = null; //CCAction\n this.paused = false;\n this.lock = false;\n};\n\n/**\n * !#en\n * cc.ActionManager is a class that can manage actions.<br/>\n * Normally you won't need to use this class directly. 99% of the cases you will use the CCNode interface,\n * which uses this class's singleton object.\n * But there are some cases where you might need to use this class. <br/>\n * Examples:<br/>\n * - When you want to run an action where the target is different from a CCNode.<br/>\n * - When you want to pause / resume the actions<br/>\n * !#zh\n * cc.ActionManager 是可以管理动作的单例类。<br/>\n * 通常你并不需要直接使用这个类99%的情况您将使用 CCNode 的接口。<br/>\n * 但也有一些情况下,您可能需要使用这个类。 <br/>\n * 例如:\n * - 当你想要运行一个动作,但目标不是 CCNode 类型时。 <br/>\n * - 当你想要暂停/恢复动作时。 <br/>\n * @class ActionManager\n * @example {@link cocos2d/core/CCActionManager/ActionManager.js}\n */\ncc.ActionManager = function () {\n this._hashTargets = js.createMap(true);\n this._arrayTargets = [];\n this._currentTarget = null;\n cc.director._scheduler && cc.director._scheduler.enableForTarget(this);\n};\ncc.ActionManager.prototype = {\n constructor: cc.ActionManager,\n _elementPool: [],\n\n _searchElementByTarget: function (arr, target) {\n for (var k = 0; k < arr.length; k++) {\n if (target === arr[k].target)\n return arr[k];\n }\n return null;\n },\n\n _getElement: function (target, paused) {\n var element = this._elementPool.pop();\n if (!element) {\n element = new HashElement();\n }\n element.target = target;\n element.paused = !!paused;\n return element;\n },\n\n _putElement: function (element) {\n element.actions.length = 0;\n element.actionIndex = 0;\n element.currentAction = null;\n element.paused = false;\n element.target = null;\n element.lock = false;\n this._elementPool.push(element);\n },\n\n /**\n * !#en\n * Adds an action with a target.<br/>\n * If the target is already present, then the action will be added to the existing target.\n * If the target is not present, a new instance of this target will be created either paused or not, and the action will be added to the newly created target.\n * When the target is paused, the queued actions won't be 'ticked'.\n * !#zh\n * 增加一个动作,同时还需要提供动作的目标对象,目标对象是否暂停作为参数。<br/>\n * 如果目标已存在,动作将会被直接添加到现有的节点中。<br/>\n * 如果目标不存在,将为这一目标创建一个新的实例,并将动作添加进去。<br/>\n * 当目标状态的 paused 为 true动作将不会被执行\n *\n * @method addAction\n * @param {Action} action\n * @param {Node} target\n * @param {Boolean} paused\n */\n addAction: function (action, target, paused) {\n if (!action || !target) {\n cc.errorID(1000);\n return;\n }\n\n //check if the action target already exists\n var element = this._hashTargets[target._id];\n //if doesn't exists, create a hashelement and push in mpTargets\n if (!element) {\n element = this._getElement(target, paused);\n this._hashTargets[target._id] = element;\n this._arrayTargets.push(element);\n }\n else if (!element.actions) {\n element.actions = [];\n }\n\n element.actions.push(action);\n action.startWithTarget(target);\n },\n\n /**\n * !#en Removes all actions from all the targets.\n * !#zh 移除所有对象的所有动作。\n * @method removeAllActions\n */\n removeAllActions: function () {\n var locTargets = this._arrayTargets;\n for (var i = 0; i < locTargets.length; i++) {\n var element = locTargets[i];\n if (element)\n this._putElement(element);\n }\n this._arrayTargets.length = 0;\n this._hashTargets = js.createMap(true);\n },\n /**\n * !#en\n * Removes all actions from a certain target. <br/>\n * All the actions that belongs to the target will be removed.\n * !#zh\n * 移除指定对象上的所有动作。<br/>\n * 属于该目标的所有的动作将被删除。\n * @method removeAllActionsFromTarget\n * @param {Node} target\n * @param {Boolean} forceDelete\n */\n removeAllActionsFromTarget: function (target, forceDelete) {\n // explicit null handling\n if (target == null)\n return;\n var element = this._hashTargets[target._id];\n if (element) {\n element.actions.length = 0;\n this._deleteHashElement(element);\n }\n },\n /**\n * !#en Removes an action given an action reference.\n * !#zh 移除指定的动作。\n * @method removeAction \n * @param {Action} action\n */\n removeAction: function (action) {\n // explicit null handling\n if (!action) {\n return;\n }\n var target = action.getOriginalTarget();\n var element = this._hashTargets[target._id];\n\n if (!element) {\n return;\n }\n\n for (var i = 0; i < element.actions.length; i++) {\n if (element.actions[i] === action) {\n element.actions.splice(i, 1);\n // update actionIndex in case we are in tick. looping over the actions\n if (element.actionIndex >= i)\n element.actionIndex--;\n break;\n }\n }\n },\n\n /**\n * @internal\n */\n _removeActionByTag (tag, element, target) {\n for (var i = 0, l = element.actions.length; i < l; ++i) {\n var action = element.actions[i];\n if (action && action.getTag() === tag) {\n if (target && action.getOriginalTarget() !== target) {\n continue;\n }\n this._removeActionAtIndex(i, element);\n break;\n }\n }\n },\n\n /**\n * @internal\n */\n _removeAllActionsByTag (tag, element, target) {\n for (var i = element.actions.length - 1; i >= 0; --i) {\n var action = element.actions[i];\n if (action && action.getTag() === tag) {\n if (target && action.getOriginalTarget() !== target) {\n continue;\n }\n this._removeActionAtIndex(i, element);\n }\n }\n },\n\n /**\n * !#en Removes an action given its tag and the target.\n * !#zh 删除指定对象下特定标签的一个动作,将删除首个匹配到的动作。\n * @method removeActionByTag\n * @param {Number} tag\n * @param {Node} [target]\n */\n removeActionByTag: function (tag, target) {\n if(tag === cc.Action.TAG_INVALID)\n cc.logID(1002);\n\n let hashTargets = this._hashTargets;\n if (target) {\n var element = hashTargets[target._id];\n if (element) {\n this._removeActionByTag(tag, element, target);\n }\n }\n else {\n for (let name in hashTargets) {\n let element = hashTargets[name];\n this._removeActionByTag(tag, element);\n }\n }\n },\n\n /**\n * !#en Removes all actions given the tag and the target.\n * !#zh 删除指定对象下特定标签的所有动作。\n * @method removeAllActionsByTag\n * @param {Number} tag\n * @param {Node} [target]\n */\n removeAllActionsByTag: function (tag, target) {\n if (tag === cc.Action.TAG_INVALID)\n cc.logID(1002);\n\n let hashTargets = this._hashTargets;\n if (target) {\n var element = hashTargets[target._id];\n if (element) {\n this._removeAllActionsByTag(tag, element, target);\n }\n }\n else {\n for (let name in hashTargets) {\n let element = hashTargets[name];\n this._removeAllActionsByTag(tag, element);\n }\n }\n },\n\n /**\n * !#en Gets an action given its tag an a target.\n * !#zh 通过目标对象和标签获取一个动作。\n * @method getActionByTag\n * @param {Number} tag\n * @param {Node} target\n * @return {Action|Null} return the Action with the given tag on success\n */\n getActionByTag: function (tag, target) {\n if(tag === cc.Action.TAG_INVALID)\n cc.logID(1004);\n\n var element = this._hashTargets[target._id];\n if (element) {\n if (element.actions != null) {\n for (var i = 0; i < element.actions.length; ++i) {\n var action = element.actions[i];\n if (action && action.getTag() === tag)\n return action;\n }\n }\n cc.logID(1005, tag);\n }\n return null;\n },\n\n\n /**\n * !#en\n * Returns the numbers of actions that are running in a certain target. <br/>\n * Composable actions are counted as 1 action. <br/>\n * Example: <br/>\n * - If you are running 1 Sequence of 7 actions, it will return 1. <br/>\n * - If you are running 7 Sequences of 2 actions, it will return 7.\n * !#zh\n * 返回指定对象下所有正在运行的动作数量。 <br/>\n * 组合动作被算作一个动作。<br/>\n * 例如:<br/>\n * - 如果您正在运行 7 个动作组成的序列动作Sequence这个函数将返回 1。<br/>\n * - 如果你正在运行 2 个序列动作Sequence和 5 个普通动作,这个函数将返回 7。<br/>\n *\n * @method getNumberOfRunningActionsInTarget\n * @param {Node} target\n * @return {Number}\n */\n getNumberOfRunningActionsInTarget: function (target) {\n var element = this._hashTargets[target._id];\n if (element)\n return (element.actions) ? element.actions.length : 0;\n\n return 0;\n },\n /**\n * !#en Pauses the target: all running actions and newly added actions will be paused.\n * !#zh 暂停指定对象:所有正在运行的动作和新添加的动作都将会暂停。\n * @method pauseTarget\n * @param {Node} target\n */\n pauseTarget: function (target) {\n var element = this._hashTargets[target._id];\n if (element)\n element.paused = true;\n },\n /**\n * !#en Resumes the target. All queued actions will be resumed.\n * !#zh 让指定目标恢复运行。在执行序列中所有被暂停的动作将重新恢复运行。\n * @method resumeTarget\n * @param {Node} target\n */\n resumeTarget: function (target) {\n var element = this._hashTargets[target._id];\n if (element)\n element.paused = false;\n },\n\n /**\n * !#en Pauses all running actions, returning a list of targets whose actions were paused.\n * !#zh 暂停所有正在运行的动作,返回一个包含了那些动作被暂停了的目标对象的列表。\n * @method pauseAllRunningActions\n * @return {Array} a list of targets whose actions were paused.\n */\n pauseAllRunningActions: function () {\n var idsWithActions = [];\n var locTargets = this._arrayTargets;\n for(var i = 0; i < locTargets.length; i++){\n var element = locTargets[i];\n if(element && !element.paused){\n element.paused = true;\n idsWithActions.push(element.target);\n }\n }\n return idsWithActions;\n },\n\n /**\n * !#en Resume a set of targets (convenience function to reverse a pauseAllRunningActions or pauseTargets call).\n * !#zh 让一组指定对象恢复运行(用来逆转 pauseAllRunningActions 效果的便捷函数)。\n * @method resumeTargets\n * @param {Array} targetsToResume\n */\n resumeTargets: function (targetsToResume) {\n if (!targetsToResume)\n return;\n\n for (var i = 0; i < targetsToResume.length; i++) {\n if(targetsToResume[i])\n this.resumeTarget(targetsToResume[i]);\n }\n },\n\n /**\n * !#en Pause a set of targets.\n * !#zh 暂停一组指定对象。\n * @method pauseTargets\n * @param {Array} targetsToPause\n */\n pauseTargets: function (targetsToPause) {\n if (!targetsToPause)\n return;\n\n for (var i = 0; i < targetsToPause.length; i++) {\n if (targetsToPause[i])\n this.pauseTarget(targetsToPause[i]);\n }\n },\n\n /**\n * !#en\n * purges the shared action manager. It releases the retained instance. <br/>\n * because it uses this, so it can not be static.\n * !#zh\n * 清除共用的动作管理器。它释放了持有的实例。 <br/>\n * 因为它使用 this因此它不能是静态的。\n * @method purgeSharedManager\n */\n purgeSharedManager: function () {\n cc.director.getScheduler().unscheduleUpdate(this);\n },\n\n //protected\n _removeActionAtIndex: function (index, element) {\n var action = element.actions[index];\n\n element.actions.splice(index, 1);\n\n // update actionIndex in case we are in tick. looping over the actions\n if (element.actionIndex >= index)\n element.actionIndex--;\n\n if (element.actions.length === 0) {\n this._deleteHashElement(element);\n }\n },\n\n _deleteHashElement: function (element) {\n var ret = false;\n if (element && !element.lock) {\n if (this._hashTargets[element.target._id]) {\n delete this._hashTargets[element.target._id];\n var targets = this._arrayTargets;\n for (var i = 0, l = targets.length; i < l; i++) {\n if (targets[i] === element) {\n targets.splice(i, 1);\n break;\n }\n }\n this._putElement(element);\n ret = true;\n }\n }\n return ret;\n },\n\n /**\n * !#en The ActionManager update。\n * !#zh ActionManager 主循环。\n * @method update\n * @param {Number} dt delta time in seconds\n */\n update: function (dt) {\n var locTargets = this._arrayTargets , locCurrTarget;\n for (var elt = 0; elt < locTargets.length; elt++) {\n this._currentTarget = locTargets[elt];\n locCurrTarget = this._currentTarget;\n if (!locCurrTarget.paused && locCurrTarget.actions) {\n locCurrTarget.lock = true;\n // The 'actions' CCMutableArray may change while inside this loop.\n for (locCurrTarget.actionIndex = 0; locCurrTarget.actionIndex < locCurrTarget.actions.length; locCurrTarget.actionIndex++) {\n locCurrTarget.currentAction = locCurrTarget.actions[locCurrTarget.actionIndex];\n if (!locCurrTarget.currentAction)\n continue;\n\n //use for speed\n locCurrTarget.currentAction.step(dt * ( locCurrTarget.currentAction._speedMethod ? locCurrTarget.currentAction._speed : 1 ) );\n \n if (locCurrTarget.currentAction && locCurrTarget.currentAction.isDone()) {\n locCurrTarget.currentAction.stop();\n var action = locCurrTarget.currentAction;\n // Make currentAction nil to prevent removeAction from salvaging it.\n locCurrTarget.currentAction = null;\n this.removeAction(action);\n }\n\n locCurrTarget.currentAction = null;\n }\n locCurrTarget.lock = false;\n }\n // only delete currentTarget if no actions were scheduled during the cycle (issue #481)\n if (locCurrTarget.actions.length === 0) {\n this._deleteHashElement(locCurrTarget) && elt--;\n }\n }\n }\n};\n\nif (CC_TEST) {\n cc.ActionManager.prototype.isTargetPaused_TEST = function (target) {\n var element = this._hashTargets[target._id];\n return element.paused;\n };\n}\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nrequire('./CCActionManager');\nrequire('./CCAction');\nrequire('./CCActionInterval');\nrequire('./CCActionInstant');\nrequire('./CCActionEase');\nrequire('./CCActionCatmullRom');\nrequire('./tween');\n","import { bezier } from '../animation/bezier';\n\nlet _tweenID = 0;\n\nlet TweenAction = cc.Class({\n name: 'cc.TweenAction',\n extends: cc.ActionInterval,\n\n ctor (duration, props, opts) {\n this._opts = opts = opts || Object.create(null);\n this._props = Object.create(null);\n\n // global easing or progress used for this action\n opts.progress = opts.progress || this.progress;\n if (opts.easing && typeof opts.easing === 'string') {\n let easingName = opts.easing;\n opts.easing = cc.easing[easingName];\n !opts.easing && cc.warnID(1031, easingName);\n }\n\n let relative = this._opts.relative;\n\n for (let name in props) {\n let value = props[name];\n\n // property may have custom easing or progress function\n let easing, progress;\n if (value.value !== undefined && (value.easing || value.progress)) {\n if (typeof value.easing === 'string') {\n easing = cc.easing[value.easing];\n !easing && cc.warnID(1031, value.easing);\n }\n else {\n easing = value.easing;\n }\n progress = value.progress;\n value = value.value;\n }\n\n let isNumber = typeof value === 'number';\n if (!isNumber && (!value.lerp || (relative && !value.add && !value.mul) || !value.clone)) {\n cc.warn(`Can not animate ${name} property, because it do not have [lerp, (add|mul), clone] function.`);\n continue;\n }\n\n let prop = Object.create(null);\n prop.value = value;\n prop.easing = easing;\n prop.progress = progress;\n this._props[name] = prop;\n }\n\n this._originProps = props;\n this.initWithDuration(duration);\n },\n\n clone () {\n var action = new TweenAction(this._duration, this._originProps, this._opts);\n this._cloneDecoration(action);\n return action;\n },\n\n startWithTarget (target) {\n cc.ActionInterval.prototype.startWithTarget.call(this, target);\n\n let relative = !!this._opts.relative;\n let props = this._props;\n for (let name in props) {\n let value = target[name];\n let prop = props[name];\n\n if (typeof value === 'number') {\n prop.start = value;\n prop.current = value;\n prop.end = relative ? value + prop.value : prop.value;\n }\n else {\n prop.start = value.clone();\n prop.current = value.clone();\n prop.end = relative ? (value.add || value.mul).call(value, prop.value) : prop.value;\n }\n }\n },\n\n update (t) {\n let opts = this._opts;\n let easingTime = t;\n if (opts.easing) easingTime = opts.easing(t);\n\n let target = this.target;\n if (!target) return;\n\n let props = this._props;\n let progress = opts.progress;\n for (let name in props) {\n let prop = props[name];\n let time = prop.easing ? prop.easing(t) : easingTime;\n let current = prop.current = (prop.progress || progress)(prop.start, prop.end, prop.current, time);\n target[name] = current;\n }\n\n let onUpdate = opts.onUpdate;\n if (onUpdate) {\n onUpdate(target, t)\n }\n },\n\n progress (start, end, current, t) {\n if (typeof start === 'number') {\n current = start + (end - start) * t;\n }\n else {\n start.lerp(end, t, current);\n }\n return current;\n }\n});\n\nlet SetAction = cc.Class({\n name: 'cc.SetAction',\n extends: cc.ActionInstant,\n\n ctor (props) {\n this._props = {};\n props !== undefined && this.init(props);\n },\n\n init (props) {\n for (let name in props) {\n this._props[name] = props[name];\n }\n return true;\n },\n\n update () {\n let props = this._props;\n let target = this.target;\n for (let name in props) {\n target[name] = props[name];\n }\n },\n\n clone () {\n var action = new SetAction();\n action.init(this._props);\n return action;\n }\n});\n\n\n\n/**\n * !#en\n * Tween provide a simple and flexible way to create action. Tween's api is more flexible than `cc.Action`:\n * - Support creating an action sequence in chained api.\n * - Support animate any objects' any properties, not limited to node's properties. By contrast, `cc.Action` needs to create a new action class to support new node property.\n * - Support working with `cc.Action`.\n * - Support easing and progress function.\n * !#zh\n * Tween 提供了一个简单灵活的方法来创建 action。相对于 Cocos 传统的 `cc.Action``cc.Tween` 在创建动画上要灵活非常多:\n * - 支持以链式结构的方式创建一个动画序列。\n * - 支持对任意对象的任意属性进行缓动,不再局限于节点上的属性,而 `cc.Action` 添加一个属性的支持时还需要添加一个新的 action 类型。\n * - 支持与 `cc.Action` 混用。\n * - 支持设置 {{#crossLink \"Easing\"}}{{/crossLink}} 或者 progress 函数。\n * @class Tween\n * @example\n * cc.tween(node)\n * .to(1, {scale: 2, position: cc.v3(100, 100, 100)})\n * .call(() => { console.log('This is a callback'); })\n * .by(1, {scale: 3, position: cc.v3(200, 200, 200)}, {easing: 'sineOutIn'})\n * .start(cc.find('Canvas/cocos'));\n * @typescript Tween<T = any>\n */\nfunction Tween (target) {\n this._actions = [];\n this._finalAction = null;\n this._target = target;\n this._tag = cc.Action.TAG_INVALID;\n}\n\n/**\n * @method constructor\n * @param {Object} [target]\n */\n\n/**\n * !#en Stop all tweens\n * !#zh 停止所有缓动\n * @method stopAll\n * @static\n */\nTween.stopAll = function () {\n cc.director.getActionManager().removeAllActions();\n}\n/**\n * !#en Stop all tweens by tag\n * !#zh 停止所有指定标签的缓动\n * @method stopAllByTag\n * @static\n * @param {number} tag\n */\nTween.stopAllByTag = function (tag) {\n cc.director.getActionManager().removeAllActionsByTag(tag);\n}\n/**\n * !#en Stop all tweens by target\n * !#zh 停止所有指定对象的缓动\n * @method stopAllByTarget\n * @static\n * @param {Object} target\n */\nTween.stopAllByTarget = function (target) {\n cc.director.getActionManager().removeAllActionsFromTarget(target);\n}\n\n/**\n * !#en\n * Insert an action or tween to this sequence\n * !#zh\n * 插入一个 action 或者 tween 到队列中\n * @method then \n * @param {Action|Tween} other\n * @return {Tween}\n * @typescript then(other: Action|Tween<T>): Tween<T>\n */\nTween.prototype.then = function (other) {\n if (other instanceof cc.Action) {\n this._actions.push(other.clone());\n }\n else {\n this._actions.push(other._union());\n }\n return this;\n};\n\n\n/**\n * !#en\n * Set tween target\n * !#zh\n * 设置 tween 的 target\n * @method target\n * @param {Object} target\n * @return {Tween}\n * @typescript target(target: any): Tween<T>\n */\nTween.prototype.target = function (target) {\n this._target = target;\n return this;\n};\n\n/**\n * !#en\n * Start this tween\n * !#zh\n * 运行当前 tween\n * @method start\n * @return {Tween}\n * @typescript start(): Tween<T>\n */\nTween.prototype.start = function () {\n let target = this._target;\n if (!target) {\n cc.warn('Please set target to tween first');\n return this;\n }\n if (target instanceof cc.Object && !target.isValid) {\n return;\n }\n\n if (this._finalAction) {\n cc.director.getActionManager().removeAction(this._finalAction);\n }\n this._finalAction = this._union();\n\n if (target._id === undefined) {\n target._id = ++_tweenID;\n }\n\n this._finalAction.setTag(this._tag);\n cc.director.getActionManager().addAction(this._finalAction, target, false);\n return this;\n};\n\n/**\n * !#en\n * Stop this tween\n * !#zh\n * 停止当前 tween\n * @method stop\n * @return {Tween}\n * @typescript stop(): Tween<T>\n */\nTween.prototype.stop = function () {\n if (this._finalAction) {\n cc.director.getActionManager().removeAction(this._finalAction);\n }\n return this;\n};\n\n\n/**\n * !#en Sets tween tag\n * !#zh 设置缓动的标签\n * @method tag\n * @param {number} tag\n * @return {Tween}\n * @typescript tag(tag: number): Tween<T>\n */\nTween.prototype.tag = function (tag) {\n this._tag = tag;\n return this;\n};\n\n\n/**\n * !#en\n * Clone a tween\n * !#zh\n * 克隆当前 tween\n * @method clone\n * @param {Object} [target]\n * @return {Tween}\n * @typescript clone(target?: any): Tween<T>\n */\nTween.prototype.clone = function (target) {\n let action = this._union();\n return cc.tween(target).then(action.clone());\n};\n\n/**\n * !#en\n * Integrate all previous actions to an action.\n * !#zh\n * 将之前所有的 action 整合为一个 action。\n * @method union\n * @return {Tween}\n * @typescritp union(): Tween<T>\n */\nTween.prototype.union = function () {\n let action = this._union();\n this._actions.length = 0;\n this._actions.push(action);\n return this;\n};\n\nTween.prototype._union = function () {\n let actions = this._actions;\n\n if (actions.length === 1) {\n actions = actions[0];\n }\n else {\n actions = cc.sequence(actions);\n }\n\n return actions;\n};\n\nObject.assign(Tween.prototype, {\n /**\n * !#en Sets target's position property according to the bezier curve.\n * !#zh 按照贝塞尔路径设置目标的 position 属性。\n * @method bezierTo\n * @param {number} duration\n * @param {cc.Vec2} c1\n * @param {cc.Vec2} c2\n * @param {cc.Vec2} to\n * @return {Tween}\n * @typescript bezierTo(duration: number, c1: Vec2, c2: Vec2, to: Vec2): Tween<T>\n */\n bezierTo (duration, c1, c2, to, opts) {\n let c0x = c1.x, c0y = c1.y,\n c1x = c2.x, c1y = c2.y;\n opts = opts || Object.create(null);\n opts.progress = function (start, end, current, t) {\n current.x = bezier(start.x, c0x, c1x, end.x, t);\n current.y = bezier(start.y, c0y, c1y, end.y, t);\n return current;\n }\n return this.to(duration, { position: to }, opts);\n },\n\n /**\n * !#en Sets target's position property according to the bezier curve.\n * !#zh 按照贝塞尔路径设置目标的 position 属性。\n * @method bezierBy\n * @param {number} duration\n * @param {cc.Vec2} c1\n * @param {cc.Vec2} c2\n * @param {cc.Vec2} to\n * @return {Tween}\n * @typescript bezierBy(duration: number, c1: Vec2, c2: Vec2, to: Vec2): Tween<T>\n */\n bezierBy (duration, c1, c2, to, opts) {\n let c0x = c1.x, c0y = c1.y,\n c1x = c2.x, c1y = c2.y;\n opts = opts || Object.create(null);\n opts.progress = function (start, end, current, t) {\n let sx = start.x, sy = start.y;\n current.x = bezier(sx, c0x + sx, c1x + sx, end.x, t);\n current.y = bezier(sy, c0y + sy, c1y + sy, end.y, t);\n return current;\n }\n return this.by(duration, { position: to }, opts);\n },\n\n /**\n * !#en Flips target's scaleX\n * !#zh 翻转目标的 scaleX 属性\n * @method flipX\n * @return {Tween}\n * @typescript flipX(): Tween<T>\n */\n flipX () {\n return this.call(() => { this._target.scaleX *= -1; }, this);\n \n },\n /**\n * !#en Flips target's scaleY\n * !#zh 翻转目标的 scaleY 属性\n * @method flipY\n * @return {Tween}\n * @typescript flipY(): Tween<T>\n */\n flipY () {\n return this.call(() => { this._target.scaleY *= -1; }, this);\n },\n\n /**\n * !#en Blinks target by set target's opacity property\n * !#zh 通过设置目标的 opacity 属性达到闪烁效果\n * @method blink\n * @param {number} duration\n * @param {number} times\n * @param {Object} [opts]\n * @param {Function} [opts.progress]\n * @param {Function|String} [opts.easing]\n * @return {Tween}\n * @typescript blink(duration: number, times: number, opts?: {progress?: Function; easing?: Function|string; }): Tween<T>\n */\n blink (duration, times, opts) {\n var slice = 1.0 / times;\n opts = opts || Object.create(null);\n opts.progress = function (start, end, current, t) {\n if (t >= 1) {\n return start;\n }\n else {\n var m = t % slice;\n return (m > (slice / 2)) ? 255 : 0;\n }\n };\n return this.to(duration, { opacity: 1 }, opts);\n },\n})\n\nlet tmp_args = [];\n\nfunction wrapAction (action) {\n return function () {\n tmp_args.length = 0;\n for (let l = arguments.length, i = 0; i < l; i++) {\n let arg = tmp_args[i] = arguments[i];\n if (arg instanceof Tween) {\n tmp_args[i] = arg._union();\n }\n }\n\n return action.apply(this, tmp_args);\n };\n}\n\nlet actions = {\n /**\n * !#en\n * Add an action which calculate with absolute value\n * !#zh\n * 添加一个对属性进行绝对值计算的 action\n * @method to\n * @param {Number} duration\n * @param {Object} props - {scale: 2, position: cc.v3(100, 100, 100)}\n * @param {Object} [opts]\n * @param {Function} [opts.progress]\n * @param {Function|String} [opts.easing]\n * @return {Tween}\n * @typescript\n * to<OPTS extends Partial<{ progress: Function, easing: Function | String, onUpdate: Function }>>(duration: number, props: ConstructorType<T>, opts?: OPTS): Tween<T>\n */\n to (duration, props, opts) {\n opts = opts || Object.create(null);\n opts.relative = false;\n return new TweenAction(duration, props, opts);\n },\n\n /**\n * !#en\n * Add an action which calculate with relative value\n * !#zh\n * 添加一个对属性进行相对值计算的 action\n * @method by\n * @param {Number} duration\n * @param {Object} props - {scale: 2, position: cc.v3(100, 100, 100)}\n * @param {Object} [opts]\n * @param {Function} [opts.progress]\n * @param {Function|String} [opts.easing]\n * @return {Tween}\n * @typescript\n * by<OPTS extends Partial<{ progress: Function, easing: Function | String, onUpdate: Function }>>(duration: number, props: ConstructorType<T>, opts?: OPTS): Tween<T>\n */\n by (duration, props, opts) {\n opts = opts || Object.create(null);\n opts.relative = true;\n return new TweenAction(duration, props, opts);\n },\n\n /**\n * !#en\n * Directly set target properties\n * !#zh\n * 直接设置 target 的属性\n * @method set\n * @param {Object} props\n * @return {Tween}\n * @typescript\n * set (props: ConstructorType<T>) : Tween<T>\n */\n set (props) {\n return new SetAction(props);\n },\n\n /**\n * !#en\n * Add an delay action\n * !#zh\n * 添加一个延时 action\n * @method delay\n * @param {Number} duration\n * @return {Tween}\n * @typescript delay(duration: number): Tween<T>\n */\n delay: cc.delayTime,\n /**\n * !#en\n * Add an callback action\n * !#zh\n * 添加一个回调 action\n * @method call\n * @param {Function} callback\n * @param {object} [selectTarget]\n * @return {Tween}\n * @typescript call(callback: Function, selectTarget?: object): Tween<T>\n */\n call: cc.callFunc,\n /**\n * !#en\n * Add an hide action\n * !#zh\n * 添加一个隐藏 action\n * @method hide\n * @return {Tween}\n * @typescript hide(): Tween<T>\n */\n hide: cc.hide,\n /**\n * !#en\n * Add an show action\n * !#zh\n * 添加一个显示 action\n * @method show\n * @return {Tween}\n * @typescript show(): Tween<T>\n */\n show: cc.show,\n /**\n * !#en\n * Add an removeSelf action\n * !#zh\n * 添加一个移除自己 action\n * @method removeSelf\n * @return {Tween}\n * @typescript removeSelf(): Tween<T>\n */\n removeSelf: cc.removeSelf,\n /**\n * !#en\n * Add an sequence action\n * !#zh\n * 添加一个队列 action\n * @method sequence\n * @param {Action|Tween} action\n * @param {Action|Tween} ...actions\n * @return {Tween}\n * @typescript sequence(action: Action|Tween<T>, ...actions: (Action|Tween<T>)[]): Tween<T>\n */\n sequence: wrapAction(cc.sequence),\n /**\n * !#en\n * Add an parallel action\n * !#zh\n * 添加一个并行 action\n * @method parallel\n * @param {Action|Tween} action\n * @param {Action|Tween} ...actions\n * @return {Tween}\n * @typescript parallel(action: Action|Tween<T>, ...actions: (Action|Tween<T>)[]): Tween<T>\n */\n parallel: wrapAction(cc.spawn)\n};\n\n// these action will use previous action as their parameters\nlet previousAsInputActions = {\n /**\n * !#en\n * Add an repeat action. This action will integrate before actions to a sequence action as their parameters.\n * !#zh\n * 添加一个重复 action这个 action 会将前一个动作作为他的参数。\n * @method repeat\n * @param {Number} repeatTimes\n * @param {Action | Tween} [action]\n * @return {Tween}\n * @typescript repeat(repeatTimes: number, action?: Action|Tween<T>): Tween<T>\n */\n repeat: cc.repeat,\n /**\n * !#en\n * Add an repeat forever action. This action will integrate before actions to a sequence action as their parameters.\n * !#zh\n * 添加一个永久重复 action这个 action 会将前一个动作作为他的参数。\n * @method repeatForever\n * @param {Action | Tween} [action]\n * @return {Tween}\n * @typescript repeatForever(action?: Action|Tween<T>): Tween<T>\n */\n repeatForever: cc.repeatForever,\n /**\n * !#en\n * Add an reverse time action. This action will integrate before actions to a sequence action as their parameters.\n * !#zh\n * 添加一个倒置时间 action这个 action 会将前一个动作作为他的参数。\n * @method reverseTime\n * @param {Action | Tween} [action]\n * @return {Tween}\n * @typescript reverseTime(action?: Action|Tween<T>): Tween<T>\n */\n reverseTime: cc.reverseTime,\n};\n\n\nlet keys = Object.keys(actions);\nfor (let i = 0; i < keys.length; i++) {\n let key = keys[i];\n Tween.prototype[key] = function () {\n let action = actions[key].apply(this, arguments);\n this._actions.push(action);\n return this;\n };\n}\n\nkeys = Object.keys(previousAsInputActions);\nfor (let i = 0; i < keys.length; i++) {\n let key = keys[i];\n Tween.prototype[key] = function () {\n\n let actions = this._actions;\n let action = arguments[arguments.length - 1];\n let length = arguments.length - 1;\n\n if (action instanceof cc.Tween) {\n action = action._union();\n }\n else if (!(action instanceof cc.Action)) {\n action = actions[actions.length - 1];\n actions.length -= 1;\n length += 1;\n }\n\n let args = [action];\n for (let i = 0; i < length; i++) {\n args.push(arguments[i]);\n }\n\n action = previousAsInputActions[key].apply(this, args);\n actions.push(action);\n\n return this;\n };\n}\n\n/**\n * @module cc\n */\n\n/**\n * @method tween\n * @param {Object} [target] - the target to animate\n * @return {Tween}\n * @typescript\n * tween<T> (target?: T) : Tween<T>\n */\ncc.tween = function (target) {\n return new Tween(target);\n};\n\ncc.Tween = Tween;\n \n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst js = cc.js;\nconst Playable = require('./playable');\nconst { EventAnimCurve, EventInfo } = require('./animation-curves');\nconst WrapModeMask = require('./types').WrapModeMask;\nconst binarySearch = require('../core/utils/binary-search').binarySearchEpsilon;\n\n// The actual animator for Animation Component\n\nfunction AnimationAnimator (target, animation) {\n Playable.call(this);\n this.target = target;\n this.animation = animation;\n\n this._anims = new js.array.MutableForwardIterator([]);\n}\njs.extend(AnimationAnimator, Playable);\nlet p = AnimationAnimator.prototype;\n\np.playState = function (state, startTime) {\n if (!state.clip) {\n return;\n }\n\n if (!state.curveLoaded) {\n initClipData(this.target, state);\n }\n\n state.animator = this;\n state.play();\n\n if (typeof startTime === 'number') {\n state.setTime(startTime);\n }\n\n this.play();\n};\n\np.stopStatesExcept = function (state) {\n let iterator = this._anims;\n let array = iterator.array;\n for (iterator.i = 0; iterator.i < array.length; ++iterator.i) {\n let anim = array[iterator.i];\n if (anim === state) {\n continue;\n }\n\n this.stopState(anim);\n }\n};\n\np.addAnimation = function (anim) {\n let index = this._anims.array.indexOf(anim);\n if (index === -1) {\n this._anims.push(anim);\n }\n\n anim._setEventTarget(this.animation);\n};\n\np.removeAnimation = function (anim) {\n let index = this._anims.array.indexOf(anim);\n if (index >= 0) {\n this._anims.fastRemoveAt(index);\n\n if (this._anims.array.length === 0) {\n this.stop();\n }\n }\n else {\n cc.errorID(3907);\n }\n\n anim.animator = null;\n};\n\np.sample = function () {\n let iterator = this._anims;\n let array = iterator.array;\n for (iterator.i = 0; iterator.i < array.length; ++iterator.i) {\n let anim = array[iterator.i];\n anim.sample();\n }\n};\n\np.stopState = function (state) {\n if (state) {\n state.stop();\n }\n};\n\np.pauseState = function (state) {\n if (state) {\n state.pause();\n }\n};\n\np.resumeState = function (state) {\n if (state) {\n state.resume();\n }\n\n if (this.isPaused) {\n this.resume();\n }\n};\n\np.setStateTime = function (state, time) {\n if (time !== undefined) {\n if (state) {\n state.setTime(time);\n state.sample();\n } \n }\n else {\n time = state;\n\n let array = this._anims.array;\n for (let i = 0; i < array.length; ++i) {\n let anim = array[i];\n anim.setTime(time);\n anim.sample();\n }\n }\n};\n\np.onStop = function () {\n let iterator = this._anims;\n let array = iterator.array;\n for (iterator.i = 0; iterator.i < array.length; ++iterator.i) {\n let anim = array[iterator.i];\n anim.stop();\n }\n};\n\np.onPause = function () {\n let array = this._anims.array;\n for (let i = 0; i < array.length; ++i) {\n let anim = array[i];\n anim.pause();\n\n // need to unbind animator to anim, or it maybe cannot be gc.\n anim.animator = null;\n }\n};\n\np.onResume = function () {\n let array = this._anims.array;\n for (let i = 0; i < array.length; ++i) {\n let anim = array[i];\n \n // rebind animator to anim\n anim.animator = this;\n\n anim.resume();\n }\n};\n\np._reloadClip = function (state) {\n initClipData(this.target, state);\n};\n\n// 这个方法应该是 SampledAnimCurve 才能用\nfunction createBatchedProperty (propPath, firstDotIndex, mainValue, animValue) {\n mainValue = mainValue.clone();\n let nextValue = mainValue;\n let leftIndex = firstDotIndex + 1;\n let rightIndex = propPath.indexOf('.', leftIndex);\n\n // scan property path\n while (rightIndex !== -1) {\n let nextName = propPath.slice(leftIndex, rightIndex);\n nextValue = nextValue[nextName];\n leftIndex = rightIndex + 1;\n rightIndex = propPath.indexOf('.', leftIndex);\n }\n let lastPropName = propPath.slice(leftIndex);\n nextValue[lastPropName] = animValue;\n\n return mainValue;\n}\n\nif (CC_TEST) {\n cc._Test.createBatchedProperty = createBatchedProperty;\n}\n\n\nfunction initClipData (root, state) {\n let clip = state.clip;\n\n state.duration = clip.duration;\n state.speed = clip.speed;\n state.wrapMode = clip.wrapMode;\n state.frameRate = clip.sample;\n\n if ((state.wrapMode & WrapModeMask.Loop) === WrapModeMask.Loop) {\n state.repeatCount = Infinity;\n }\n else {\n state.repeatCount = 1;\n }\n\n let curves = state.curves = clip.createCurves(state, root);\n\n // events curve\n\n let events = clip.events;\n\n if (!CC_EDITOR && events) {\n let curve;\n\n for (let i = 0, l = events.length; i < l; i++) {\n if (!curve) {\n curve = new EventAnimCurve();\n curve.target = root;\n curves.push(curve);\n }\n\n let eventData = events[i];\n let ratio = eventData.frame / state.duration;\n\n let eventInfo;\n let index = binarySearch(curve.ratios, ratio);\n if (index >= 0) {\n eventInfo = curve.events[index];\n }\n else {\n eventInfo = new EventInfo();\n curve.ratios.push(ratio);\n curve.events.push(eventInfo);\n }\n\n eventInfo.add(eventData.func, eventData.params);\n }\n }\n}\n\nif (CC_TEST) {\n cc._Test.initClipData = initClipData;\n}\n\n\nmodule.exports = AnimationAnimator;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst WrapMode = require('./types').WrapMode;\nconst { DynamicAnimCurve, quickFindIndex } = require('./animation-curves');\nconst sampleMotionPaths = require('./motion-path-helper').sampleMotionPaths;\nconst binarySearch = require('../core/utils/binary-search').binarySearchEpsilon;\n\n/**\n * !#en Class for animation data handling.\n * !#zh 动画剪辑,用于存储动画数据。\n * @class AnimationClip\n * @extends Asset\n */\nvar AnimationClip = cc.Class({\n name: 'cc.AnimationClip',\n extends: cc.Asset,\n\n properties: {\n _duration: {\n default: 0,\n type: cc.Float,\n },\n\n /**\n * !#en Duration of this animation.\n * !#zh 动画的持续时间。\n * @property duration\n * @type {Number}\n */\n duration: {\n get: function () { return this._duration; },\n },\n\n /**\n * !#en FrameRate of this animation.\n * !#zh 动画的帧速率。\n * @property sample\n * @type {Number}\n */\n sample: {\n default: 60,\n },\n\n /**\n * !#en Speed of this animation.\n * !#zh 动画的播放速度。\n * @property speed\n * @type {Number}\n */\n speed: {\n default: 1\n },\n\n /**\n * !#en WrapMode of this animation.\n * !#zh 动画的循环模式。\n * @property wrapMode\n * @type {WrapMode}\n */\n wrapMode: {\n default: WrapMode.Normal\n },\n\n /**\n * !#en Curve data.\n * !#zh 曲线数据。\n * @property curveData\n * @type {Object}\n * @example {@link cocos2d/core/animation-clip/curve-data.js}\n */\n curveData: {\n default: {},\n visible: false,\n },\n\n /**\n * !#en Event data.\n * !#zh 事件数据。\n * @property events\n * @type {Object[]}\n * @example {@link cocos2d/core/animation-clip/event-data.js}\n * @typescript events: {frame: number, func: string, params: string[]}[]\n */\n events: {\n default: [],\n visible: false,\n }\n },\n\n statics: {\n /**\n * !#en Crate clip with a set of sprite frames\n * !#zh 使用一组序列帧图片来创建动画剪辑\n * @method createWithSpriteFrames\n * @param {[SpriteFrame]} spriteFrames\n * @param {Number} sample\n * @return {AnimationClip}\n * @static\n * @example\n *\n * var clip = cc.AnimationClip.createWithSpriteFrames(spriteFrames, 10);\n *\n */\n createWithSpriteFrames: function (spriteFrames, sample) {\n if (!Array.isArray(spriteFrames)) {\n cc.errorID(3905);\n return null;\n }\n\n var clip = new AnimationClip();\n clip.sample = sample || clip.sample;\n\n clip._duration = spriteFrames.length / clip.sample;\n\n var frames = [];\n var step = 1 / clip.sample;\n\n for (var i = 0, l = spriteFrames.length; i < l; i++) {\n frames[i] = { frame: (i * step), value: spriteFrames[i] };\n }\n\n clip.curveData = {\n comps: {\n // component\n 'cc.Sprite': {\n // component properties\n 'spriteFrame': frames\n }\n }\n };\n\n return clip;\n }\n },\n\n onLoad () {\n this._duration = Number.parseFloat(this.duration);\n this.speed = Number.parseFloat(this.speed);\n this.wrapMode = Number.parseInt(this.wrapMode);\n this.frameRate = Number.parseFloat(this.sample);\n },\n\n createPropCurve (target, propPath, keyframes) {\n let motionPaths = [];\n let isMotionPathProp = target instanceof cc.Node && propPath === 'position';\n\n let curve = new DynamicAnimCurve();\n\n // 缓存目标对象,所以 Component 必须一开始都创建好并且不能运行时动态替换……\n curve.target = target;\n curve.prop = propPath;\n\n // for each keyframes\n for (let i = 0, l = keyframes.length; i < l; i++) {\n let keyframe = keyframes[i];\n let ratio = keyframe.frame / this.duration;\n curve.ratios.push(ratio);\n\n if (isMotionPathProp) {\n motionPaths.push(keyframe.motionPath);\n }\n\n let curveValue = keyframe.value;\n curve.values.push(curveValue);\n\n let curveTypes = keyframe.curve;\n if (curveTypes) {\n if (typeof curveTypes === 'string') {\n curve.types.push(curveTypes);\n continue;\n }\n else if (Array.isArray(curveTypes)) {\n if (curveTypes[0] === curveTypes[1] &&\n curveTypes[2] === curveTypes[3]) {\n curve.types.push(DynamicAnimCurve.Linear);\n }\n else {\n curve.types.push(DynamicAnimCurve.Bezier(curveTypes));\n }\n continue;\n }\n }\n curve.types.push(DynamicAnimCurve.Linear);\n }\n \n if (isMotionPathProp) {\n sampleMotionPaths(motionPaths, curve, this.duration, this.sample, target);\n }\n\n // if every piece of ratios are the same, we can use the quick function to find frame index.\n let ratios = curve.ratios;\n let currRatioDif, lastRatioDif;\n let canOptimize = true;\n let EPSILON = 1e-6;\n for (let i = 1, l = ratios.length; i < l; i++) {\n currRatioDif = ratios[i] - ratios[i-1];\n if (i === 1) {\n lastRatioDif = currRatioDif;\n }\n else if (Math.abs(currRatioDif - lastRatioDif) > EPSILON) {\n canOptimize = false; \n break;\n }\n }\n\n curve._findFrameIndex = canOptimize ? quickFindIndex : binarySearch;\n\n // find the lerp function\n let firstValue = curve.values[0];\n if (firstValue !== undefined && firstValue !== null && !curve._lerp) {\n if (typeof firstValue === 'number') {\n curve._lerp = DynamicAnimCurve.prototype._lerpNumber;\n }\n else if (firstValue instanceof cc.Quat) {\n curve._lerp = DynamicAnimCurve.prototype._lerpQuat;\n }\n else if (firstValue instanceof cc.Vec2) {\n curve._lerp = DynamicAnimCurve.prototype._lerpVector2;\n }\n else if (firstValue instanceof cc.Vec3) {\n curve._lerp = DynamicAnimCurve.prototype._lerpVector3;\n }\n else if (firstValue.lerp) {\n curve._lerp = DynamicAnimCurve.prototype._lerpObject;\n }\n }\n\n return curve;\n },\n\n createTargetCurves (target, curveData, curves) {\n let propsData = curveData.props;\n let compsData = curveData.comps;\n\n if (propsData) {\n for (let propPath in propsData) {\n let data = propsData[propPath];\n let curve = this.createPropCurve(target, propPath, data);\n\n curves.push(curve);\n }\n }\n\n if (compsData) {\n for (let compName in compsData) {\n let comp = target.getComponent(compName);\n\n if (!comp) {\n continue;\n }\n\n let compData = compsData[compName];\n for (let propPath in compData) {\n let data = compData[propPath];\n let curve = this.createPropCurve(comp, propPath, data);\n\n curves.push(curve);\n }\n }\n }\n },\n\n createCurves (state, root) {\n let curveData = this.curveData;\n let childrenCurveDatas = curveData.paths;\n let curves = [];\n\n this.createTargetCurves(root, curveData, curves);\n\n for (let namePath in childrenCurveDatas) {\n let target = cc.find(namePath, root);\n\n if (!target) {\n continue;\n }\n\n let childCurveDatas = childrenCurveDatas[namePath];\n this.createTargetCurves(target, childCurveDatas, curves);\n }\n\n return curves;\n }\n});\n\ncc.AnimationClip = module.exports = AnimationClip;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n\nconst bezierByTime = require('./bezier').bezierByTime;\n\nconst binarySearch = require('../core/utils/binary-search').binarySearchEpsilon;\nconst WrapModeMask = require('./types').WrapModeMask;\nconst WrappedInfo = require('./types').WrappedInfo;\n\n/**\n * Compute a new ratio by curve type\n * @param {Number} ratio - The origin ratio\n * @param {Array|String} type - If it's Array, then ratio will be computed with bezierByTime. If it's string, then ratio will be computed with cc.easing function\n */\nfunction computeRatioByType (ratio, type) {\n if (typeof type === 'string') {\n var func = cc.easing[type];\n if (func) {\n ratio = func(ratio);\n }\n else {\n cc.errorID(3906, type);\n }\n }\n else if (Array.isArray(type)) {\n // bezier curve\n ratio = bezierByTime(type, ratio);\n }\n\n return ratio;\n}\n\n//\n// 动画数据类,相当于 AnimationClip。\n// 虽然叫做 AnimCurve但除了曲线可以保存任何类型的值。\n//\n// @class AnimCurve\n//\n//\nvar AnimCurve = cc.Class({\n name: 'cc.AnimCurve',\n\n //\n // @method sample\n // @param {number} time\n // @param {number} ratio - The normalized time specified as a number between 0.0 and 1.0 inclusive.\n // @param {AnimationState} state\n //\n sample: function (time, ratio, state) {},\n\n onTimeChangedManually: undefined\n});\n\n/**\n * 当每两帧之前的间隔都一样的时候可以使用此函数快速查找 index\n */\nfunction quickFindIndex (ratios, ratio) {\n var length = ratios.length - 1;\n\n if (length === 0) return 0;\n\n var start = ratios[0];\n if (ratio < start) return 0;\n\n var end = ratios[length];\n if (ratio > end) return ~ratios.length;\n\n ratio = (ratio - start) / (end - start);\n\n var eachLength = 1 / length;\n var index = ratio / eachLength;\n var floorIndex = index | 0;\n var EPSILON = 1e-6;\n\n if ((index - floorIndex) < EPSILON) {\n return floorIndex;\n }\n else if ((floorIndex + 1 - index) < EPSILON) {\n return floorIndex + 1;\n }\n\n return ~(floorIndex + 1);\n}\n\n//\n//\n// @class DynamicAnimCurve\n//\n// @extends AnimCurve\n//\nvar DynamicAnimCurve = cc.Class({\n name: 'cc.DynamicAnimCurve',\n extends: AnimCurve,\n\n ctor () {\n // cache last frame index\n this._cachedIndex = 0;\n },\n\n properties: {\n\n // The object being animated.\n // @property target\n // @type {object}\n target: null,\n\n // The name of the property being animated.\n // @property prop\n // @type {string}\n prop: '',\n\n // The values of the keyframes. (y)\n // @property values\n // @type {any[]}\n values: [],\n\n // The keyframe ratio of the keyframe specified as a number between 0.0 and 1.0 inclusive. (x)\n // @property ratios\n // @type {number[]}\n ratios: [],\n\n // @property types\n // @param {object[]}\n // Each array item maybe type:\n // - [x, x, x, x]: Four control points for bezier\n // - null: linear\n types: [],\n },\n\n _findFrameIndex: binarySearch,\n _lerp: undefined,\n\n _lerpNumber (from, to, t) {\n return from + (to - from) * t;\n },\n\n _lerpObject (from, to, t) {\n return from.lerp(to, t);\n },\n\n _lerpQuat: (function () {\n let out = cc.quat();\n return function (from, to, t) {\n return from.lerp(to, t, out);\n };\n })(),\n\n _lerpVector2: (function () {\n let out = cc.v2();\n return function (from, to, t) {\n return from.lerp(to, t, out);\n };\n })(),\n\n _lerpVector3: (function () {\n let out = cc.v3();\n return function (from, to, t) {\n return from.lerp(to, t, out);\n };\n })(),\n\n sample (time, ratio, state) {\n let values = this.values;\n let ratios = this.ratios;\n let frameCount = ratios.length;\n\n if (frameCount === 0) {\n return;\n }\n\n // only need to refind frame index when ratio is out of range of last from ratio and to ratio.\n let shoudRefind = true;\n let cachedIndex = this._cachedIndex;\n if (cachedIndex < 0) {\n cachedIndex = ~cachedIndex;\n if (cachedIndex > 0 && cachedIndex < ratios.length) {\n let fromRatio = ratios[cachedIndex - 1];\n let toRatio = ratios[cachedIndex];\n if (ratio > fromRatio && ratio < toRatio) {\n shoudRefind = false;\n }\n }\n }\n\n if (shoudRefind) {\n this._cachedIndex = this._findFrameIndex(ratios, ratio);\n }\n\n // evaluate value\n let value;\n let index = this._cachedIndex;\n if (index < 0) {\n index = ~index;\n\n if (index <= 0) {\n value = values[0];\n }\n else if (index >= frameCount) {\n value = values[frameCount - 1];\n }\n else {\n var fromVal = values[index - 1];\n\n if (!this._lerp) {\n value = fromVal;\n }\n else {\n var fromRatio = ratios[index - 1];\n var toRatio = ratios[index];\n var type = this.types[index - 1];\n var ratioBetweenFrames = (ratio - fromRatio) / (toRatio - fromRatio);\n\n if (type) {\n ratioBetweenFrames = computeRatioByType(ratioBetweenFrames, type);\n }\n\n // calculate value\n var toVal = values[index];\n\n value = this._lerp(fromVal, toVal, ratioBetweenFrames);\n }\n }\n }\n else {\n value = values[index];\n }\n\n this.target[this.prop] = value;\n }\n});\n\nDynamicAnimCurve.Linear = null;\nDynamicAnimCurve.Bezier = function (controlPoints) {\n return controlPoints;\n};\n\n\n/**\n * Event information,\n * @class EventInfo\n *\n */\nvar EventInfo = function () {\n this.events = [];\n};\n\n/**\n * @param {Function} [func] event function\n * @param {Object[]} [params] event params\n */\nEventInfo.prototype.add = function (func, params) {\n this.events.push({\n func: func || '',\n params: params || []\n });\n};\n\n\n/**\n *\n * @class EventAnimCurve\n *\n * @extends AnimCurve\n */\nvar EventAnimCurve = cc.Class({\n name: 'cc.EventAnimCurve',\n extends: AnimCurve,\n\n properties: {\n /**\n * The object being animated.\n * @property target\n * @type {object}\n */\n target: null,\n\n /** The keyframe ratio of the keyframe specified as a number between 0.0 and 1.0 inclusive. (x)\n * @property ratios\n * @type {number[]}\n */\n ratios: [],\n\n /**\n * @property events\n * @type {EventInfo[]}\n */\n events: [],\n\n _wrappedInfo: {\n default: function () {\n return new WrappedInfo();\n }\n },\n\n _lastWrappedInfo: null,\n\n _ignoreIndex: NaN\n },\n\n _wrapIterations: function (iterations) {\n if (iterations - (iterations | 0) === 0) iterations -= 1;\n return iterations | 0;\n },\n\n sample: function (time, ratio, state) {\n var length = this.ratios.length;\n\n var currentWrappedInfo = state.getWrappedInfo(state.time, this._wrappedInfo);\n var direction = currentWrappedInfo.direction;\n var currentIndex = binarySearch(this.ratios, currentWrappedInfo.ratio);\n if (currentIndex < 0) {\n currentIndex = ~currentIndex - 1;\n\n // if direction is inverse, then increase index\n if (direction < 0) currentIndex += 1;\n }\n\n if (this._ignoreIndex !== currentIndex) {\n this._ignoreIndex = NaN;\n }\n\n currentWrappedInfo.frameIndex = currentIndex;\n\n if (!this._lastWrappedInfo) {\n this._fireEvent(currentIndex);\n this._lastWrappedInfo = new WrappedInfo(currentWrappedInfo);\n return;\n }\n\n var wrapMode = state.wrapMode;\n var currentIterations = this._wrapIterations(currentWrappedInfo.iterations);\n\n var lastWrappedInfo = this._lastWrappedInfo;\n var lastIterations = this._wrapIterations(lastWrappedInfo.iterations);\n var lastIndex = lastWrappedInfo.frameIndex;\n var lastDirection = lastWrappedInfo.direction;\n\n var interationsChanged = lastIterations !== -1 && currentIterations !== lastIterations;\n\n if (lastIndex === currentIndex && interationsChanged && length === 1) {\n this._fireEvent(0);\n }\n else if (lastIndex !== currentIndex || interationsChanged) {\n direction = lastDirection;\n\n do {\n if (lastIndex !== currentIndex) {\n if (direction === -1 && lastIndex === 0 && currentIndex > 0) {\n if ((wrapMode & WrapModeMask.PingPong) === WrapModeMask.PingPong) {\n direction *= -1;\n }\n else {\n lastIndex = length;\n }\n\n lastIterations ++;\n }\n else if (direction === 1 && lastIndex === length - 1 && currentIndex < length - 1) {\n if ((wrapMode & WrapModeMask.PingPong) === WrapModeMask.PingPong) {\n direction *= -1;\n }\n else {\n lastIndex = -1;\n }\n\n lastIterations ++;\n }\n\n if (lastIndex === currentIndex) break;\n if (lastIterations > currentIterations) break;\n }\n\n lastIndex += direction;\n\n cc.director.getAnimationManager().pushDelayEvent(this, '_fireEvent', [lastIndex]);\n } while (lastIndex !== currentIndex && lastIndex > -1 && lastIndex < length);\n }\n\n this._lastWrappedInfo.set(currentWrappedInfo);\n },\n\n _fireEvent: function (index) {\n if (index < 0 || index >= this.events.length || this._ignoreIndex === index) return;\n\n var eventInfo = this.events[index];\n var events = eventInfo.events;\n \n if ( !this.target.isValid ) { \n return; \n }\n \n var components = this.target._components;\n\n for (var i = 0; i < events.length; i++) {\n var event = events[i];\n var funcName = event.func;\n\n for (var j = 0; j < components.length; j++) {\n var component = components[j];\n var func = component[funcName];\n\n if (func) func.apply(component, event.params);\n }\n }\n },\n\n onTimeChangedManually: function (time, state) {\n this._lastWrappedInfo = null;\n this._ignoreIndex = NaN;\n\n var info = state.getWrappedInfo(time, this._wrappedInfo);\n var direction = info.direction;\n var frameIndex = binarySearch(this.ratios, info.ratio);\n\n // only ignore when time not on a frame index\n if (frameIndex < 0) {\n frameIndex = ~frameIndex - 1;\n\n // if direction is inverse, then increase index\n if (direction < 0) frameIndex += 1;\n\n this._ignoreIndex = frameIndex;\n }\n }\n});\n\n\nif (CC_TEST) {\n cc._Test.DynamicAnimCurve = DynamicAnimCurve;\n cc._Test.EventAnimCurve = EventAnimCurve;\n cc._Test.quickFindIndex = quickFindIndex;\n}\n\nmodule.exports = {\n AnimCurve: AnimCurve,\n DynamicAnimCurve: DynamicAnimCurve,\n EventAnimCurve: EventAnimCurve,\n EventInfo: EventInfo,\n computeRatioByType: computeRatioByType,\n quickFindIndex: quickFindIndex\n};\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar js = cc.js;\n\nvar AnimationManager = cc.Class({\n ctor: function () {\n this._anims = new js.array.MutableForwardIterator([]);\n this._delayEvents = [];\n\n cc.director._scheduler && cc.director._scheduler.enableForTarget(this);\n },\n\n // for manager\n\n update: function (dt) {\n var iterator = this._anims;\n var array = iterator.array;\n for (iterator.i = 0; iterator.i < array.length; ++iterator.i) {\n var anim = array[iterator.i];\n if (anim._isPlaying && !anim._isPaused) {\n anim.update(dt);\n }\n }\n\n var events = this._delayEvents;\n for (let i = 0; i < events.length; i++) {\n var event = events[i];\n event.target[event.func].apply(event.target, event.args);\n }\n events.length = 0;\n \n },\n\n destruct: function () {},\n\n\n /**\n * @param {AnimationState} anim\n */\n addAnimation: function (anim) {\n var index = this._anims.array.indexOf(anim);\n if (index === -1) {\n this._anims.push(anim);\n }\n },\n\n /**\n * @param {AnimationState} anim\n */\n removeAnimation: function (anim) {\n var index = this._anims.array.indexOf(anim);\n if (index >= 0) {\n this._anims.fastRemoveAt(index);\n }\n else {\n cc.errorID(3907);\n }\n },\n\n pushDelayEvent: function (target, func, args) {\n this._delayEvents.push({\n target: target,\n func: func,\n args: args\n });\n }\n});\n\n\ncc.AnimationManager = module.exports = AnimationManager;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n\nvar js = cc.js;\nvar Playable = require('./playable');\n\nvar Types = require('./types');\nvar WrappedInfo = Types.WrappedInfo;\nvar WrapMode = Types.WrapMode;\nvar WrapModeMask = Types.WrapModeMask;\n\n/**\n * !#en\n * The AnimationState gives full control over animation playback process.\n * In most cases the Animation Component is sufficient and easier to use. Use the AnimationState if you need full control.\n * !#zh\n * AnimationState 完全控制动画播放过程。<br/>\n * 大多数情况下 动画组件 是足够和易于使用的。如果您需要更多的动画控制接口,请使用 AnimationState。\n * @class AnimationState\n * @extends Playable\n *\n */\n\n/**\n * @method constructor\n * @param {AnimationClip} clip\n * @param {String} [name]\n */\nfunction AnimationState (clip, name) {\n Playable.call(this);\n \n // Mark whether the current frame is played.\n // When set new time to animation state, we should ensure the frame at the specified time being played at next update.\n this._currentFramePlayed = false;\n \n this._delay = 0;\n this._delayTime = 0;\n\n this._wrappedInfo = new WrappedInfo();\n this._lastWrappedInfo = null;\n\n this._process = process;\n\n this._clip = clip;\n this._name = name || (clip && clip.name);\n\n /**\n * @property animator\n * @type {AnimationAnimator}\n * @private\n */\n this.animator = null;\n\n /**\n * !#en The curves list.\n * !#zh 曲线列表。\n * @property curves\n * @type {Object[]}\n */\n this.curves = [];\n\n // http://www.w3.org/TR/web-animations/#idl-def-AnimationTiming\n\n /**\n * !#en The start delay which represents the number of seconds from an animation's start time to the start of\n * the active interval.\n * !#zh 延迟多少秒播放。\n *\n * @property delay\n * @type {Number}\n * @default 0\n */\n this.delay = 0;\n\n /**\n * !#en The animation's iteration count property.\n *\n * A real number greater than or equal to zero (including positive infinity) representing the number of times\n * to repeat the animation node.\n *\n * Values less than zero and NaN values are treated as the value 1.0 for the purpose of timing model\n * calculations.\n *\n * !#zh 迭代次数,指动画播放多少次后结束, normalize time。 如 2.52次半\n *\n * @property repeatCount\n * @type {Number}\n * @default 1\n */\n this.repeatCount = 1;\n\n /**\n * !#en The iteration duration of this animation in seconds. (length)\n * !#zh 单次动画的持续时间,秒。\n *\n * @property duration\n * @type {Number}\n * @readOnly\n */\n this.duration = 1;\n\n /**\n * !#en The animation's playback speed. 1 is normal playback speed.\n * !#zh 播放速率。\n * @property speed\n * @type {Number}\n * @default: 1.0\n */\n this.speed = 1;\n\n /**\n * !#en\n * Wrapping mode of the playing animation.\n * Notice : dynamic change wrapMode will reset time and repeatCount property\n * !#zh\n * 动画循环方式。\n * 需要注意的是,动态修改 wrapMode 时,会重置 time 以及 repeatCount\n *\n * @property wrapMode\n * @type {WrapMode}\n * @default: WrapMode.Normal\n */\n this.wrapMode = WrapMode.Normal;\n\n /**\n * !#en The current time of this animation in seconds.\n * !#zh 动画当前的时间,秒。\n * @property time\n * @type {Number}\n * @default 0\n */\n this.time = 0;\n\n // Animation as event target\n this._target = null;\n this._lastframeEventOn = false;\n this.emit = function () {\n var args = new Array(arguments.length);\n for (var i = 0, l = args.length; i < l; i++) {\n args[i] = arguments[i];\n }\n cc.director.getAnimationManager().pushDelayEvent(this, '_emit', args);\n };\n}\njs.extend(AnimationState, Playable);\n\nvar proto = AnimationState.prototype;\n\nproto._emit = function (type, state) {\n if (this._target && this._target.isValid) {\n this._target.emit(type, type, state);\n }\n};\n\nproto.on = function (type, callback, target) {\n if (this._target && this._target.isValid) {\n if (type === 'lastframe') {\n this._lastframeEventOn = true;\n }\n return this._target.on(type, callback, target);\n }\n else {\n return null;\n }\n};\n\nproto.once = function (type, callback, target) {\n if (this._target && this._target.isValid) {\n if (type === 'lastframe') {\n this._lastframeEventOn = true;\n }\n let self = this;\n return this._target.once(type, function (event) {\n callback.call(target, event);\n self._lastframeEventOn = false;\n });\n }\n else {\n return null;\n }\n};\n\nproto.off = function (type, callback, target) {\n if (this._target && this._target.isValid) {\n if (type === 'lastframe') {\n if (!this._target.hasEventListener(type)) {\n this._lastframeEventOn = false;\n }\n }\n this._target.off(type, callback, target);\n }\n};\n\nproto._setEventTarget = function (target) {\n this._target = target;\n};\n\nproto.onPlay = function () {\n // replay\n this.setTime(0);\n this._delayTime = this._delay;\n \n cc.director.getAnimationManager().addAnimation(this);\n\n if (this.animator) {\n this.animator.addAnimation(this);\n }\n \n this.emit('play', this);\n};\n\nproto.onStop = function () {\n if (!this.isPaused) {\n cc.director.getAnimationManager().removeAnimation(this);\n }\n\n if (this.animator) {\n this.animator.removeAnimation(this);\n }\n\n this.emit('stop', this);\n};\n\nproto.onResume = function () {\n cc.director.getAnimationManager().addAnimation(this);\n this.emit('resume', this);\n};\n\nproto.onPause = function () {\n cc.director.getAnimationManager().removeAnimation(this);\n this.emit('pause', this);\n};\n\nproto.setTime = function (time) {\n this._currentFramePlayed = false;\n this.time = time || 0;\n\n var curves = this.curves;\n for (var i = 0, l = curves.length; i < l; i++) {\n var curve = curves[i];\n if (curve.onTimeChangedManually) {\n curve.onTimeChangedManually(time, this);\n }\n }\n};\n\nfunction process () {\n // sample\n var info = this.sample();\n\n if (this._lastframeEventOn) {\n var lastInfo;\n if (!this._lastWrappedInfo) {\n lastInfo = this._lastWrappedInfo = new WrappedInfo(info);\n } else {\n lastInfo = this._lastWrappedInfo;\n }\n\n if (this.repeatCount > 1 && ((info.iterations | 0) > (lastInfo.iterations | 0))) {\n this.emit('lastframe', this);\n }\n\n lastInfo.set(info);\n }\n\n if (info.stopped) {\n this.stop();\n this.emit('finished', this);\n }\n}\n\nfunction simpleProcess () {\n var time = this.time;\n var duration = this.duration;\n\n if (time > duration) {\n time = time % duration;\n if (time === 0) time = duration;\n }\n else if (time < 0) {\n time = time % duration;\n if (time !== 0) time += duration;\n }\n\n var ratio = time / duration;\n\n var curves = this.curves;\n for (var i = 0, len = curves.length; i < len; i++) {\n var curve = curves[i];\n curve.sample(time, ratio, this);\n }\n\n if (this._lastframeEventOn) {\n if (this._lastIterations === undefined) {\n this._lastIterations = ratio;\n }\n\n if ((this.time > 0 && this._lastIterations > ratio) || (this.time < 0 && this._lastIterations < ratio)) {\n this.emit('lastframe', this);\n }\n\n this._lastIterations = ratio;\n }\n}\n\nproto.update = function (delta) {\n // calculate delay time\n\n if (this._delayTime > 0) {\n this._delayTime -= delta;\n if (this._delayTime > 0) {\n // still waiting\n return;\n }\n }\n\n // make first frame perfect\n\n //var playPerfectFirstFrame = (this.time === 0);\n if (this._currentFramePlayed) {\n this.time += (delta * this.speed);\n }\n else {\n this._currentFramePlayed = true;\n }\n\n this._process();\n};\n\nproto._needRevers = function (currentIterations) {\n var wrapMode = this.wrapMode;\n var needRevers = false;\n\n if ((wrapMode & WrapModeMask.PingPong) === WrapModeMask.PingPong) {\n var isEnd = currentIterations - (currentIterations | 0) === 0;\n if (isEnd && (currentIterations > 0)) {\n currentIterations -= 1;\n }\n\n var isOddIteration = currentIterations & 1;\n if (isOddIteration) {\n needRevers = !needRevers;\n }\n }\n if ((wrapMode & WrapModeMask.Reverse) === WrapModeMask.Reverse) {\n needRevers = !needRevers;\n }\n return needRevers;\n};\n\nproto.getWrappedInfo = function (time, info) {\n info = info || new WrappedInfo();\n \n var stopped = false;\n var duration = this.duration;\n var repeatCount = this.repeatCount;\n\n var currentIterations = time > 0 ? (time / duration) : -(time / duration);\n if (currentIterations >= repeatCount) {\n currentIterations = repeatCount;\n\n stopped = true;\n var tempRatio = repeatCount - (repeatCount | 0);\n if (tempRatio === 0) {\n tempRatio = 1; // 如果播放过,动画不复位\n }\n time = tempRatio * duration * (time > 0 ? 1 : -1);\n }\n\n if (time > duration) {\n var tempTime = time % duration;\n time = tempTime === 0 ? duration : tempTime;\n }\n else if (time < 0) {\n time = time % duration;\n if (time !== 0 ) time += duration;\n }\n\n var needRevers = false;\n var shouldWrap = this._wrapMode & WrapModeMask.ShouldWrap;\n if (shouldWrap) {\n needRevers = this._needRevers(currentIterations);\n }\n\n var direction = needRevers ? -1 : 1;\n if (this.speed < 0) {\n direction *= -1;\n }\n\n // calculate wrapped time\n if (shouldWrap && needRevers) {\n time = duration - time;\n }\n\n info.ratio = time / duration;\n info.time = time;\n info.direction = direction;\n info.stopped = stopped;\n info.iterations = currentIterations;\n\n return info;\n};\n\nproto.sample = function () {\n var info = this.getWrappedInfo(this.time, this._wrappedInfo);\n var curves = this.curves;\n for (var i = 0, len = curves.length; i < len; i++) {\n var curve = curves[i];\n curve.sample(info.time, info.ratio, this);\n }\n\n return info;\n};\n\n\n/**\n * !#en The clip that is being played by this animation state.\n * !#zh 此动画状态正在播放的剪辑。\n * @property clip\n * @type {AnimationClip}\n * @final\n */\njs.get(proto, 'clip', function () {\n return this._clip;\n});\n\n/**\n * !#en The name of the playing animation.\n * !#zh 动画的名字\n * @property name\n * @type {String}\n * @readOnly\n */\njs.get(proto, 'name', function () {\n return this._name;\n});\n\njs.obsolete(proto, 'AnimationState.length', 'duration');\n\njs.getset(proto, 'curveLoaded',\n function () {\n return this.curves.length > 0;\n },\n function () {\n this.curves.length = 0;\n }\n);\n\n\njs.getset(proto, 'wrapMode',\n function () {\n return this._wrapMode;\n },\n function (value) {\n this._wrapMode = value;\n\n if (CC_EDITOR) return;\n\n // dynamic change wrapMode will need reset time to 0\n this.time = 0;\n\n if (value & WrapModeMask.Loop) {\n this.repeatCount = Infinity;\n }\n else {\n this.repeatCount = 1;\n }\n \n }\n);\n\njs.getset(proto, 'repeatCount',\n function () {\n return this._repeatCount;\n },\n function (value) {\n this._repeatCount = value;\n \n var shouldWrap = this._wrapMode & WrapModeMask.ShouldWrap;\n var reverse = (this.wrapMode & WrapModeMask.Reverse) === WrapModeMask.Reverse;\n if (value === Infinity && !shouldWrap && !reverse) {\n this._process = simpleProcess;\n }\n else {\n this._process = process;\n }\n }\n);\n\njs.getset(proto, 'delay', \n function () {\n return this._delay;\n },\n function (value) {\n this._delayTime = this._delay = value;\n }\n);\n\n\ncc.AnimationState = module.exports = AnimationState;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n//var bezier = (function () {\n// function B1 (t) { return (t * t * t); }\n// function B2 (t) { return (3 * t * t * (1 - t)); }\n// function B3 (t) { return (3 * t * (1 - t) * (1 - t)); }\n// function B4 (t) { return ((1 - t) * (1 - t) * (1 - t)); }\n// function bezier (C1, C2, C3, C4, t) {\n// return C1 * B1(t) + C2 * B2(t) + C3 * B3(t) + C4 * B4(t);\n// }\n//\n// //function bezier (C1, C2, C3, C4, t, out) {\n// // out.x = C1.x * B1(t) + C2.x * B2(t) + C3.x * B3(t) + C4.x * B4(t);\n// // out.y = C1.y * B1(t) + C2.y * B2(t) + C3.y * B3(t) + C4.y * B4(t);\n// //}\n//\n// return bezier;\n//})();\nfunction bezier (C1, C2, C3, C4, t) {\n var t1 = 1 - t;\n return t1 * (t1 * (C1 + (C2 * 3 - C1) * t) + C3 * 3 * t * t) + C4 * t * t * t;\n}\n//function bezier (c0, c1, c2, c3, t) {\n// var cy = 3.0 * (c1);\n// var by = 3.0 * (c3 - c1) - cy;\n// var ay = 1 - cy - by;\n// return (ay * t * t * t) + (by * t * t) + (cy * t);\n//}\n\n//var sin = Math.sin;\nvar cos = Math.cos,\n acos = Math.acos,\n max = Math.max,\n //atan2 = Math.atan2,\n pi = Math.PI,\n tau = 2 * pi,\n sqrt = Math.sqrt;\n\nfunction crt (v) {\n if (v < 0) {\n return -Math.pow(-v, 1 / 3);\n }\n else {\n return Math.pow(v, 1 / 3);\n }\n}\n\n//function align (curve, line) {\n// var tx = line.p1.x,\n// ty = line.p1.y,\n// a = -atan2(line.p2.y-ty, line.p2.x-tx);\n// curve = [{x:0, y:1}, {x: curve[0], y: 1-curve[1]}, {x: curve[2], y: 1-curve[3]}, {x:1, y:0}];\n// return curve.map(function(v) {\n// return {\n// x: (v.x-tx)*cos(a) - (v.y-ty)*sin(a),\n// y: (v.x-tx)*sin(a) + (v.y-ty)*cos(a)\n// };\n// });\n//}\n\n// Modified from http://jsbin.com/yibipofeqi/1/edit, optimized for animations.\n// The origin Cardano's algorithm is based on http://www.trans4mind.com/personal_development/mathematics/polynomials/cubicAlgebra.htm\nfunction cardano (curve, x) {\n // align curve with the intersecting line:\n //var line = {p1: {x: x, y: 0}, p2: {x: x, y: 1}};\n //var aligned = align(curve, line);\n //// and rewrite from [a(1-t)^3 + 3bt(1-t)^2 + 3c(1-t)t^2 + dt^3] form\n // pa = aligned[0].y,\n // pb = aligned[1].y,\n // pc = aligned[2].y,\n // pd = aligned[3].y;\n ////// curve = [{x:0, y:1}, {x: curve[0], y: 1-curve[1]}, {x: curve[2], y: 1-curve[3]}, {x:1, y:0}];\n var pa = x - 0;\n var pb = x - curve[0];\n var pc = x - curve[2];\n var pd = x - 1;\n\n // to [t^3 + at^2 + bt + c] form:\n var pa3 = pa * 3;\n var pb3 = pb * 3;\n var pc3 = pc * 3;\n var d = (-pa + pb3 - pc3 + pd),\n rd = 1 / d,\n r3 = 1 / 3,\n a = (pa3 - 6 * pb + pc3) * rd,\n a3 = a * r3,\n b = (-pa3 + pb3) * rd,\n c = pa * rd,\n // then, determine p and q:\n p = (3 * b - a * a) * r3,\n p3 = p * r3,\n q = (2 * a * a * a - 9 * a * b + 27 * c) / 27,\n q2 = q / 2,\n // and determine the discriminant:\n discriminant = q2 * q2 + p3 * p3 * p3,\n // and some reserved variables\n u1, v1, x1, x2, x3;\n\n // If the discriminant is negative, use polar coordinates\n // to get around square roots of negative numbers\n if (discriminant < 0) {\n var mp3 = -p * r3,\n mp33 = mp3 * mp3 * mp3,\n r = sqrt(mp33),\n // compute cosphi corrected for IEEE float rounding:\n t = -q / (2 * r),\n cosphi = t < -1 ? -1 : t > 1 ? 1 : t,\n phi = acos(cosphi),\n crtr = crt(r),\n t1 = 2 * crtr;\n x1 = t1 * cos(phi * r3) - a3;\n x2 = t1 * cos((phi + tau) * r3) - a3;\n x3 = t1 * cos((phi + 2 * tau) * r3) - a3;\n\n // choose best percentage\n if (0 <= x1 && x1 <= 1) {\n if (0 <= x2 && x2 <= 1) {\n if (0 <= x3 && x3 <= 1) {\n return max(x1, x2, x3);\n }\n else {\n return max(x1, x2);\n }\n }\n else if (0 <= x3 && x3 <= 1) {\n return max(x1, x3);\n }\n else {\n return x1;\n }\n }\n else {\n if (0 <= x2 && x2 <= 1) {\n if (0 <= x3 && x3 <= 1) {\n return max(x2, x3);\n }\n else {\n return x2;\n }\n }\n else {\n return x3;\n }\n }\n }\n else if (discriminant === 0) {\n u1 = q2 < 0 ? crt(-q2) : -crt(q2);\n x1 = 2 * u1 - a3;\n x2 = -u1 - a3;\n\n // choose best percentage\n if (0 <= x1 && x1 <= 1) {\n if (0 <= x2 && x2 <= 1) {\n return max(x1, x2);\n }\n else {\n return x1;\n }\n }\n else {\n return x2;\n }\n }\n // one real root, and two imaginary roots\n else {\n var sd = sqrt(discriminant);\n u1 = crt(-q2 + sd);\n v1 = crt(q2 + sd);\n x1 = u1 - v1 - a3;\n return x1;\n }\n}\n\nfunction bezierByTime (controlPoints, x) {\n var percent = cardano(controlPoints, x); // t\n var p1y = controlPoints[1]; // b\n var p2y = controlPoints[3]; // c\n // return bezier(0, p1y, p2y, 1, percent);\n return ((1 - percent) * (p1y + (p2y - p1y) * percent) * 3 + percent * percent) * percent;\n}\n\nif (CC_TEST) {\n cc._Test.bezier = bezier;\n cc._Test.bezierByTime = bezierByTime;\n}\n\nmodule.exports = {\n bezier: bezier,\n bezierByTime: bezierByTime\n};\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * @module cc\n */\n\n /**\n * !#en\n * This class provide easing methods for {{#crossLink \"tween\"}}{{/crossLink}} class.<br>\n * Demonstratio: https://easings.net/\n * !#zh\n * 缓动函数类,为 {{#crossLink \"Tween\"}}{{/crossLink}} 提供缓动效果函数。<br>\n * 函数效果演示: https://easings.net/\n * @class Easing\n */\n\nvar easing = {\n constant: function () { return 0; },\n linear: function (k) { return k; },\n\n // quad\n // easing equation function for a quadratic (t^2)\n // @param t: Current time (in frames or seconds).\n // @return: The correct value.\n\n /**\n * !#en Easing in with quadratic formula. From slow to fast.\n * !#zh 平方曲线缓入函数。运动由慢到快。\n * @method quadIn\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value\n */\n quadIn: function (k) { return k * k; },\n /**\n * !#en Easing out with quadratic formula. From fast to slow.\n * !#zh 平方曲线缓出函数。运动由快到慢。\n * @method quadOut\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value\n */\n quadOut: function (k) { return k * ( 2 - k ); },\n /**\n * !#en Easing in and out with quadratic formula. From slow to fast, then back to slow.\n * !#zh 平方曲线缓入缓出函数。运动由慢到快再到慢。\n * @method quadInOut\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value\n */\n quadInOut: function (k) {\n if (( k *= 2 ) < 1) {\n return 0.5 * k * k;\n }\n return -0.5 * ( --k * ( k - 2 ) - 1 );\n },\n\n // cubic\n // easing equation function for a cubic (t^3)\n // @param t: Current time (in frames or seconds).\n // @return: The correct value.\n\n /**\n * !#en Easing in with cubic formula. From slow to fast.\n * !#zh 立方曲线缓入函数。运动由慢到快。\n * @method cubicIn\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n cubicIn: function (k) { return k * k * k; },\n /**\n * !#en Easing out with cubic formula. From slow to fast.\n * !#zh 立方曲线缓出函数。运动由快到慢。\n * @method cubicOut\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n cubicOut: function (k) { return --k * k * k + 1; },\n /**\n * !#en Easing in and out with cubic formula. From slow to fast, then back to slow.\n * !#zh 立方曲线缓入缓出函数。运动由慢到快再到慢。\n * @method cubicInOut\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n cubicInOut: function (k) {\n if (( k *= 2 ) < 1) {\n return 0.5 * k * k * k;\n }\n return 0.5 * ( ( k -= 2 ) * k * k + 2 );\n },\n\n // quart\n // easing equation function for a quartic (t^4)\n // @param t: Current time (in frames or seconds).\n // @return: The correct value.\n\n /**\n * !#en Easing in with quartic formula. From slow to fast.\n * !#zh 四次方曲线缓入函数。运动由慢到快。\n * @method quartIn\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n quartIn: function (k) { return k * k * k * k; },\n /**\n * !#en Easing out with quartic formula. From fast to slow.\n * !#zh 四次方曲线缓出函数。运动由快到慢。\n * @method quartOut\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n quartOut: function (k) { return 1 - ( --k * k * k * k ); },\n /**\n * !#en Easing in and out with quartic formula. From slow to fast, then back to slow.\n * !#zh 四次方曲线缓入缓出函数。运动由慢到快再到慢。\n * @method quartInOut\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n quartInOut: function (k) {\n if (( k *= 2 ) < 1) {\n return 0.5 * k * k * k * k;\n }\n return -0.5 * ( ( k -= 2 ) * k * k * k - 2 );\n },\n\n // quint\n // easing equation function for a quintic (t^5)\n // @param t: Current time (in frames or seconds).\n // @return: The correct value.\n\n /**\n * !#en Easing in with quintic formula. From slow to fast.\n * !#zh 五次方曲线缓入函数。运动由慢到快。\n * @method quintIn\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n quintIn: function (k) { return k * k * k * k * k; },\n /**\n * !#en Easing out with quintic formula. From fast to slow.\n * !#zh 五次方曲线缓出函数。运动由快到慢。\n * @method quintOut\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n quintOut: function (k) { return --k * k * k * k * k + 1; },\n /**\n * !#en Easing in and out with quintic formula. From slow to fast, then back to slow.\n * !#zh 五次方曲线缓入缓出函数。运动由慢到快再到慢。\n * @method quintInOut\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n quintInOut: function (k) {\n if (( k *= 2 ) < 1) {\n return 0.5 * k * k * k * k * k;\n }\n return 0.5 * ( ( k -= 2 ) * k * k * k * k + 2 );\n },\n\n // sine\n // easing equation function for a sinusoidal (sin(t))\n // @param t: Current time (in frames or seconds).\n // @return: The correct value.\n\n /**\n * !#en Easing in and out with sine formula. From slow to fast.\n * !#zh 正弦曲线缓入函数。运动由慢到快。\n * @method sineIn\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n sineIn: function (k) { return 1 - Math.cos(k * Math.PI / 2); },\n /**\n * !#en Easing in and out with sine formula. From fast to slow.\n * !#zh 正弦曲线缓出函数。运动由快到慢。\n * @method sineOut\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n sineOut: function (k) { return Math.sin(k * Math.PI / 2); },\n /**\n * !#en Easing in and out with sine formula. From slow to fast, then back to slow.\n * !#zh 正弦曲线缓入缓出函数。运动由慢到快再到慢。\n * @method sineInOut\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n sineInOut: function (k) { return 0.5 * ( 1 - Math.cos(Math.PI * k) ); },\n\n // expo\n // easing equation function for an exponential (2^t)\n // param t: Current time (in frames or seconds).\n // return: The correct value.\n\n /**\n * !#en Easing in and out with exponential formula. From slow to fast.\n * !#zh 指数曲线缓入函数。运动由慢到快。\n * @method expoIn\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n expoIn: function (k) { return k === 0 ? 0 : Math.pow(1024, k - 1); },\n /**\n * !#en Easing in and out with exponential formula. From fast to slow.\n * !#zh 指数曲线缓出函数。运动由快到慢。\n * @method expoOut\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n expoOut: function (k) { return k === 1 ? 1 : 1 - Math.pow(2, -10 * k); },\n /**\n * !#en Easing in and out with exponential formula. From slow to fast.\n * !#zh 指数曲线缓入和缓出函数。运动由慢到很快再到慢。\n * @method expoInOut\n * @param {Number} t The current time as a percentage of the total time, then back to slow.\n * @return {Number} The correct value.\n */\n expoInOut: function (k) {\n if (k === 0) {\n return 0;\n }\n if (k === 1) {\n return 1;\n }\n if (( k *= 2 ) < 1) {\n return 0.5 * Math.pow(1024, k - 1);\n }\n return 0.5 * ( -Math.pow(2, -10 * ( k - 1 )) + 2 );\n },\n\n // circ\n // easing equation function for a circular (sqrt(1-t^2))\n // @param t: Current time (in frames or seconds).\n // @return:\tThe correct value.\n\n /**\n * !#en Easing in and out with circular formula. From slow to fast.\n * !#zh 循环公式缓入函数。运动由慢到快。\n * @method circIn\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n circIn: function (k) { return 1 - Math.sqrt(1 - k * k); },\n /**\n * !#en Easing in and out with circular formula. From fast to slow.\n * !#zh 循环公式缓出函数。运动由快到慢。\n * @method circOut\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n circOut: function (k) { return Math.sqrt(1 - ( --k * k )); },\n /**\n * !#en Easing in and out with circular formula. From slow to fast.\n * !#zh 指数曲线缓入缓出函数。运动由慢到很快再到慢。\n * @method circInOut\n * @param {Number} t The current time as a percentage of the total time, then back to slow.\n * @return {Number} The correct value.\n */\n circInOut: function (k) {\n if (( k *= 2 ) < 1) {\n return -0.5 * ( Math.sqrt(1 - k * k) - 1);\n }\n return 0.5 * ( Math.sqrt(1 - ( k -= 2) * k) + 1);\n },\n\n // elastic\n // easing equation function for an elastic (exponentially decaying sine wave)\n // @param t: Current time (in frames or seconds).\n // @return: The correct value.\n // recommand value: elastic (t)\n\n /**\n * !#en Easing in action with a spring oscillating effect.\n * !#zh 弹簧回震效果的缓入函数。\n * @method elasticIn\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n elasticIn: function (k) {\n var s, a = 0.1, p = 0.4;\n if (k === 0) {\n return 0;\n }\n if (k === 1) {\n return 1;\n }\n if (!a || a < 1) {\n a = 1;\n s = p / 4;\n }\n else {\n s = p * Math.asin(1 / a) / ( 2 * Math.PI );\n }\n return -( a * Math.pow(2, 10 * ( k -= 1 )) * Math.sin(( k - s ) * ( 2 * Math.PI ) / p) );\n },\n /**\n * !#en Easing out action with a spring oscillating effect.\n * !#zh 弹簧回震效果的缓出函数。\n * @method elasticOut\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n elasticOut: function (k) {\n var s, a = 0.1, p = 0.4;\n if (k === 0) {\n return 0;\n }\n if (k === 1) {\n return 1;\n }\n if (!a || a < 1) {\n a = 1;\n s = p / 4;\n }\n else {\n s = p * Math.asin(1 / a) / ( 2 * Math.PI );\n }\n return ( a * Math.pow(2, -10 * k) * Math.sin(( k - s ) * ( 2 * Math.PI ) / p) + 1 );\n },\n /**\n * !#en Easing in and out action with a spring oscillating effect.\n * !#zh 弹簧回震效果的缓入缓出函数。\n * @method elasticInOut\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n elasticInOut: function (k) {\n var s, a = 0.1, p = 0.4;\n if (k === 0) {\n return 0;\n }\n if (k === 1) {\n return 1;\n }\n if (!a || a < 1) {\n a = 1;\n s = p / 4;\n }\n else {\n s = p * Math.asin(1 / a) / ( 2 * Math.PI );\n }\n if (( k *= 2 ) < 1) {\n return -0.5 *\n ( a * Math.pow(2, 10 * ( k -= 1 )) * Math.sin(( k - s ) * ( 2 * Math.PI ) / p) );\n }\n return a * Math.pow(2, -10 * ( k -= 1 )) * Math.sin(( k - s ) * ( 2 * Math.PI ) / p) * 0.5 + 1;\n },\n\n // back\n // easing equation function for a back (overshooting cubic easing: (s+1)*t^3 - s*t^2)\n // @param t: Current time (in frames or seconds).\n // @return: The correct value.\n\n /**\n * !#en Easing in action with \"back up\" behavior.\n * !#zh 回退效果的缓入函数。\n * @method backIn\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n backIn: function (k) {\n var s = 1.70158;\n return k * k * ( ( s + 1 ) * k - s );\n },\n /**\n * !#en Easing out action with \"back up\" behavior.\n * !#zh 回退效果的缓出函数。\n * @method backOut\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n backOut: function (k) {\n var s = 1.70158;\n return --k * k * ( ( s + 1 ) * k + s ) + 1;\n },\n /**\n * !#en Easing in and out action with \"back up\" behavior.\n * !#zh 回退效果的缓入缓出函数。\n * @method backInOut\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n backInOut: function (k) {\n var s = 1.70158 * 1.525;\n if (( k *= 2 ) < 1) {\n return 0.5 * ( k * k * ( ( s + 1 ) * k - s ) );\n }\n return 0.5 * ( ( k -= 2 ) * k * ( ( s + 1 ) * k + s ) + 2 );\n },\n\n // bounce\n // easing equation function for a bounce (exponentially decaying parabolic bounce)\n // @param t: Current time (in frames or seconds).\n // @return: The correct value.\n\n /**\n * !#en Easing in action with bouncing effect.\n * !#zh 弹跳效果的缓入函数。\n * @method bounceIn\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n bounceIn: function (k) {\n return 1 - easing.bounceOut(1 - k);\n },\n /**\n * !#en Easing out action with bouncing effect.\n * !#zh 弹跳效果的缓出函数。\n * @method bounceOut\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n bounceOut: function (k) {\n if (k < ( 1 / 2.75 )) {\n return 7.5625 * k * k;\n }\n else if (k < ( 2 / 2.75 )) {\n return 7.5625 * ( k -= ( 1.5 / 2.75 ) ) * k + 0.75;\n }\n else if (k < ( 2.5 / 2.75 )) {\n return 7.5625 * ( k -= ( 2.25 / 2.75 ) ) * k + 0.9375;\n }\n else {\n return 7.5625 * ( k -= ( 2.625 / 2.75 ) ) * k + 0.984375;\n }\n },\n /**\n * !#en Easing in and out action with bouncing effect.\n * !#zh 弹跳效果的缓入缓出函数。\n * @method bounceInOut\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n bounceInOut: function (k) {\n if (k < 0.5) {\n return easing.bounceIn(k * 2) * 0.5;\n }\n return easing.bounceOut(k * 2 - 1) * 0.5 + 0.5;\n },\n\n /**\n * !#en Target will run action with smooth effect.\n * !#zh 平滑效果函数。\n * @method smooth\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n // t<=0: 0 | 0<t<1: 3*t^2 - 2*t^3 | t>=1: 1\n smooth: function (t) {\n if (t <= 0) {\n return 0;\n }\n if (t >= 1) {\n return 1;\n }\n return t * t * (3 - 2 * t);\n },\n\n /**\n * !#en Target will run action with fade effect.\n * !#zh 渐褪效果函数。\n * @method fade\n * @param {Number} t The current time as a percentage of the total time.\n * @return {Number} The correct value.\n */\n // t<=0: 0 | 0<t<1: 6*t^5 - 15*t^4 + 10*t^3 | t>=1: 1\n fade: function (t) {\n if (t <= 0) {\n return 0;\n }\n if (t >= 1) {\n return 1;\n }\n return t * t * t * (t * (t * 6 - 15) + 10);\n },\n};\n\nfunction _makeOutIn (fnIn, fnOut) {\n return function (k) {\n if (k < 0.5) {\n return fnOut(k * 2) / 2;\n }\n return fnIn(2 * k - 1) / 2 + 0.5;\n };\n}\neasing.quadOutIn = _makeOutIn(easing.quadIn, easing.quadOut);\neasing.cubicOutIn = _makeOutIn(easing.cubicIn, easing.cubicOut);\neasing.quartOutIn = _makeOutIn(easing.quartIn, easing.quartOut);\neasing.quintOutIn = _makeOutIn(easing.quintIn, easing.quintOut);\neasing.sineOutIn = _makeOutIn(easing.sineIn, easing.sineOut);\neasing.expoOutIn = _makeOutIn(easing.expoIn, easing.expoOut);\neasing.circOutIn = _makeOutIn(easing.circIn, easing.circOut);\neasing.backOutIn = _makeOutIn(easing.backIn, easing.backOut);\neasing.bounceIn = function (k) { return 1 - easing.bounceOut(1 - k); };\neasing.bounceInOut = function (k) {\n if (k < 0.5) {\n return easing.bounceIn(k * 2) * 0.5;\n }\n return easing.bounceOut(k * 2 - 1) * 0.5 + 0.5;\n};\neasing.bounceOutIn = _makeOutIn(easing.bounceIn, easing.bounceOut);\n\n/**\n * @module cc\n */\n\n/**\n * !#en This is a Easing instance.\n * !#zh 这是一个 Easing 类实例。\n * @property easing\n * @type Easing\n */\n\ncc.easing = module.exports = easing;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nrequire('./bezier');\nrequire('./easing');\nrequire('./types');\nrequire('./motion-path-helper');\nrequire('./animation-curves');\nrequire('./animation-clip');\nrequire('./animation-manager');\nrequire('./animation-state');\nrequire('./animation-animator');\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar DynamicAnimCurve = require('./animation-curves').DynamicAnimCurve;\nvar computeRatioByType = require('./animation-curves').computeRatioByType;\n\nvar bezier = require('./bezier').bezier;\nvar binarySearch = require('../core/utils/binary-search').binarySearchEpsilon;\n\nvar v2 = cc.v2;\n\nfunction Curve (points) {\n this.points = points || [];\n this.beziers = [];\n this.ratios = [];\n this.progresses = [];\n\n this.length = 0;\n\n this.computeBeziers();\n}\nCurve.prototype.computeBeziers = function () {\n this.beziers.length = 0;\n this.ratios.length = 0;\n this.progresses.length = 0;\n this.length = 0;\n\n var bezier;\n\n for (var i = 1; i < this.points.length; i++) {\n var startPoint = this.points[i - 1];\n var endPoint = this.points[i];\n bezier = new Bezier();\n bezier.start = startPoint.pos;\n bezier.startCtrlPoint = startPoint.out;\n bezier.end = endPoint.pos;\n bezier.endCtrlPoint = endPoint.in;\n this.beziers.push(bezier);\n\n this.length += bezier.getLength();\n }\n\n var current = 0;\n for (var i = 0; i < this.beziers.length; i++) {\n bezier = this.beziers[i];\n this.ratios[i] = bezier.getLength() / this.length;\n this.progresses[i] = current = current + this.ratios[i];\n }\n\n return this.beziers;\n};\n\nfunction Bezier () {\n this.start = v2();\n this.end = v2();\n this.startCtrlPoint = v2(); // cp0, cp1\n this.endCtrlPoint = v2(); // cp2, cp3\n}\n\n// Get point at relative position in curve according to arc length\n// - u [0 .. 1]\nBezier.prototype.getPointAt = function ( u ) {\n var t = this.getUtoTmapping( u );\n return this.getPoint( t );\n};\n\n\n// Get point at time t\n// - t [0 .. 1]\nBezier.prototype.getPoint = function ( t ) {\n var x = bezier(this.start.x, this.startCtrlPoint.x, this.endCtrlPoint.x, this.end.x, t);\n var y = bezier(this.start.y, this.startCtrlPoint.y, this.endCtrlPoint.y, this.end.y, t);\n\n return new v2(x, y);\n};\n\n// Get total curve arc length\nBezier.prototype.getLength = function () {\n\n var lengths = this.getLengths();\n return lengths[ lengths.length - 1 ];\n\n};\n\n// Get list of cumulative segment lengths\nBezier.prototype.getLengths = function ( divisions ) {\n\n if ( ! divisions ) divisions = (this.__arcLengthDivisions) ? (this.__arcLengthDivisions): 200;\n\n if ( this.cacheArcLengths\n && ( this.cacheArcLengths.length === divisions + 1 )) {\n\n //console.log( \"cached\", this.cacheArcLengths );\n return this.cacheArcLengths;\n\n }\n\n var cache = [];\n var current, last = this.getPoint( 0 ), vector = v2();\n var p, sum = 0;\n\n cache.push( 0 );\n\n for ( p = 1; p <= divisions; p ++ ) {\n\n current = this.getPoint ( p / divisions );\n vector.x = last.x - current.x;\n vector.y = last.y - current.y;\n sum += vector.mag();\n cache.push( sum );\n last = current;\n\n }\n\n this.cacheArcLengths = cache;\n\n return cache; // { sums: cache, sum:sum }; Sum is in the last element.\n};\n\nBezier.prototype.getUtoTmapping = function ( u, distance ) {\n\n var arcLengths = this.getLengths();\n\n var i = 0, il = arcLengths.length;\n\n var targetArcLength; // The targeted u distance value to get\n\n if ( distance ) {\n targetArcLength = distance;\n } else {\n targetArcLength = u * arcLengths[ il - 1 ];\n }\n\n //var time = Date.now();\n\n // binary search for the index with largest value smaller than target u distance\n\n var low = 0, high = il - 1, comparison;\n\n while ( low <= high ) {\n\n i = Math.floor( low + ( high - low ) / 2 ); // less likely to overflow, though probably not issue here, JS doesn't really have integers, all numbers are floats\n\n comparison = arcLengths[ i ] - targetArcLength;\n\n if ( comparison < 0 ) {\n\n low = i + 1;\n continue;\n\n } else if ( comparison > 0 ) {\n\n high = i - 1;\n continue;\n\n } else {\n\n high = i;\n break;\n\n // DONE\n\n }\n\n }\n\n i = high;\n\n //console.log('b' , i, low, high, Date.now()- time);\n\n if ( arcLengths[ i ] === targetArcLength ) {\n\n var t = i / ( il - 1 );\n return t;\n\n }\n\n // we could get finer grain at lengths, or use simple interpolatation between two points\n\n var lengthBefore = arcLengths[ i ];\n var lengthAfter = arcLengths[ i + 1 ];\n\n var segmentLength = lengthAfter - lengthBefore;\n\n // determine where we are between the 'before' and 'after' points\n\n var segmentFraction = ( targetArcLength - lengthBefore ) / segmentLength;\n\n // add that fractional amount to t\n\n var t = ( i + segmentFraction ) / ( il -1 );\n\n return t;\n};\n\n\nfunction checkMotionPath(motionPath) {\n if (!Array.isArray(motionPath)) return false;\n\n for (let i = 0, l = motionPath.length; i < l; i++) {\n let controls = motionPath[i];\n\n if (!Array.isArray(controls) || controls.length !== 6) return false;\n }\n\n return true;\n}\n\nfunction sampleMotionPaths (motionPaths, data, duration, fps, target) {\n\n function createControlPoints(array) {\n if (array instanceof cc.Vec2) {\n return {\n in: array,\n pos: array,\n out: array\n };\n }\n else if (Array.isArray(array) && array.length === 6) {\n return {\n in: v2(array[2], array[3]),\n pos: v2(array[0], array[1]),\n out: v2(array[4], array[5])\n };\n }\n\n return {\n in: cc.Vec2.ZERO,\n pos: cc.Vec2.ZERO,\n out: cc.Vec2.ZERO\n };\n }\n\n let values = data.values = data.values.map(function (value) {\n if (Array.isArray(value)) {\n value = value.length === 2 ? cc.v2(value[0], value[1]) : cc.v3(value[0], value[1], value[2]);\n }\n return value;\n });\n\n if (motionPaths.length === 0 || values.length === 0) {\n return;\n }\n\n let motionPathValid = false;\n for (let i = 0; i < motionPaths.length; i++) {\n let motionPath = motionPaths[i];\n if (motionPath && !checkMotionPath(motionPath)) {\n cc.errorID(3904, target ? target.name : '', 'position', i);\n motionPath = null;\n }\n if (motionPath && motionPath.length > 0) {\n motionPathValid = true;\n break;\n }\n }\n\n if (!motionPathValid) {\n return;\n }\n\n if (values.length === 1) {\n return;\n }\n\n var types = data.types;\n var ratios = data.ratios;\n\n var newValues = data.values = [];\n var newTypes = data.types = [];\n var newRatios = data.ratios = [];\n\n function addNewDatas (value, type, ratio) {\n newValues.push(value);\n newTypes.push(type);\n newRatios.push(ratio);\n }\n\n // ensure every ratio section's length is the same\n var startRatioOffset = 0;\n\n var EPSILON = 1e-6;\n var newType = DynamicAnimCurve.Linear;\n\n // do not need to compute last path\n for (var i = 0, l = motionPaths.length; i < l-1; i++) {\n var motionPath = motionPaths[i];\n\n var ratio = ratios[i];\n var nextRatio = ratios[i + 1];\n var betweenRatio = nextRatio - ratio;\n\n var value = values[i];\n var nextValue = values[i + 1];\n\n var type = types[i];\n\n var results = [];\n var progress = startRatioOffset / betweenRatio;\n var speed = 1 / (betweenRatio * duration * fps);\n var finalProgress;\n\n if (motionPath && motionPath.length > 0) {\n var points = [];\n points.push(createControlPoints(value));\n\n for (var j = 0, l2 = motionPath.length; j < l2; j++) {\n var controlPoints = createControlPoints(motionPath[j]);\n points.push(controlPoints);\n }\n\n points.push(createControlPoints(nextValue));\n\n // create Curve to compute beziers\n var curve = new Curve(points);\n curve.computeBeziers();\n\n // sample beziers\n var progresses = curve.progresses;\n\n while ( 1 - progress > EPSILON) {\n finalProgress = progress;\n\n finalProgress = computeRatioByType(finalProgress, type);\n\n var pos, bezier, normal, length;\n\n if (finalProgress < 0) {\n bezier = curve.beziers[0];\n length = (0 - finalProgress) * bezier.getLength();\n normal = bezier.start.sub(bezier.endCtrlPoint).normalize();\n pos = bezier.start.add(normal.mul(length));\n }\n else if (finalProgress > 1) {\n bezier = curve.beziers[curve.beziers.length - 1];\n length = (finalProgress - 1) * bezier.getLength();\n normal = bezier.end.sub(bezier.startCtrlPoint).normalize();\n pos = bezier.end.add(normal.mul(length));\n }\n else {\n var bezierIndex = binarySearch(progresses, finalProgress);\n if (bezierIndex < 0) bezierIndex = ~bezierIndex;\n\n finalProgress -= bezierIndex > 0 ? progresses[bezierIndex - 1] : 0;\n finalProgress = finalProgress / curve.ratios[bezierIndex];\n\n pos = curve.beziers[bezierIndex].getPointAt(finalProgress);\n }\n\n results.push(pos);\n progress += speed;\n }\n\n }\n else {\n while ( 1 - progress > EPSILON) {\n finalProgress = progress;\n\n finalProgress = computeRatioByType(finalProgress, type);\n\n results.push(value.lerp(nextValue, finalProgress));\n\n progress += speed;\n }\n }\n\n newType = type === 'constant' ? type : DynamicAnimCurve.Linear;\n\n for (var j = 0, l2 = results.length; j < l2; j++) {\n var newRatio = ratio + startRatioOffset + speed * j * betweenRatio;\n addNewDatas(results[j], newType, newRatio);\n }\n\n if (Math.abs(progress - 1) > EPSILON) // progress > 1\n startRatioOffset = (progress - 1) * betweenRatio;\n else\n startRatioOffset = 0;\n }\n\n if (ratios[ratios.length - 1] !== newRatios[newRatios.length -1]) {\n addNewDatas(values[values.length - 1], newType, ratios[ratios.length - 1]);\n }\n}\n\nif (CC_TEST) {\n cc._Test.sampleMotionPaths = sampleMotionPaths;\n}\n\nmodule.exports = {\n sampleMotionPaths: sampleMotionPaths,\n Curve: Curve,\n Bezier: Bezier\n};\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar js = cc.js;\nconst debug = require('../core/CCDebug');\n\n/**\n * @class Playable\n *\n */\nfunction Playable () {\n this._isPlaying = false;\n this._isPaused = false;\n this._stepOnce = false;\n}\n\nvar prototype = Playable.prototype;\n\n/**\n * !#en Is playing or paused in play mode?\n * !#zh 当前是否正在播放。\n * @property isPlaying\n * @type {boolean}\n * @default false\n * @readOnly\n */\njs.get(prototype, 'isPlaying', function () {\n return this._isPlaying;\n}, true);\n\n/**\n * !#en Is currently paused? This can be true even if in edit mode(isPlaying == false).\n * !#zh 当前是否正在暂停\n * @property isPaused\n * @type {boolean}\n * @default false\n * @readOnly\n */\njs.get(prototype, 'isPaused', function () {\n return this._isPaused;\n}, true);\n\n// virtual\n\nvar virtual = function () {};\n/**\n * @method onPlay\n * @private\n */\nprototype.onPlay = virtual;\n/**\n * @method onPause\n * @private\n */\nprototype.onPause = virtual;\n/**\n * @method onResume\n * @private\n */\nprototype.onResume = virtual;\n/**\n * @method onStop\n * @private\n */\nprototype.onStop = virtual;\n/**\n * @method onError\n * @param {string} errorCode\n * @private\n */\nprototype.onError = virtual;\n\n// public\n\n/**\n * !#en Play this animation.\n * !#zh 播放动画。\n * @method play\n */\nprototype.play = function () {\n if (this._isPlaying) {\n if (this._isPaused) {\n this._isPaused = false;\n this.onResume();\n }\n else {\n this.onError(debug.getError(3912));\n }\n }\n else {\n this._isPlaying = true;\n this.onPlay();\n }\n};\n\n/**\n * !#en Stop this animation.\n * !#zh 停止动画播放。\n * @method stop\n */\nprototype.stop = function () {\n if (this._isPlaying) {\n this._isPlaying = false;\n this.onStop();\n\n // need reset pause flag after onStop\n this._isPaused = false;\n }\n};\n\n/**\n * !#en Pause this animation.\n * !#zh 暂停动画。\n * @method pause\n */\nprototype.pause = function () {\n if (this._isPlaying && !this._isPaused) {\n this._isPaused = true;\n this.onPause();\n }\n};\n\n/**\n * !#en Resume this animation.\n * !#zh 重新播放动画。\n * @method resume\n */\nprototype.resume = function () {\n if (this._isPlaying && this._isPaused) {\n this._isPaused = false;\n this.onResume();\n }\n};\n\n/**\n * !#en Perform a single frame step.\n * !#zh 执行一帧动画。\n * @method step\n */\nprototype.step = function () {\n this.pause();\n this._stepOnce = true;\n if (!this._isPlaying) {\n this.play();\n }\n};\n\nmodule.exports = Playable;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar WrapModeMask = {\n Loop: 1 << 1,\n ShouldWrap: 1 << 2,\n // Reserved: 1 << 3,\n PingPong: 1 << 4 | 1 << 1 | 1 << 2, // Loop, ShouldWrap\n Reverse: 1 << 5 | 1 << 2, // ShouldWrap\n};\n\n/**\n * !#en Specifies how time is treated when it is outside of the keyframe range of an Animation.\n * !#zh 动画使用的循环模式。\n * @enum WrapMode\n * @memberof cc\n */\nvar WrapMode = cc.Enum({\n\n /**\n * !#en Reads the default wrap mode set higher up.\n * !#zh 向 Animation Component 或者 AnimationClip 查找 wrapMode\n * @property {Number} Default\n */\n Default: 0,\n\n /**\n * !#en All iterations are played as specified.\n * !#zh 动画只播放一遍\n * @property {Number} Normal\n */\n Normal: 1,\n\n /**\n * !#en All iterations are played in the reverse direction from the way they are specified.\n * !#zh 从最后一帧或结束位置开始反向播放,到第一帧或开始位置停止\n * @property {Number} Reverse\n */\n Reverse: WrapModeMask.Reverse,\n\n /**\n * !#en When time reaches the end of the animation, time will continue at the beginning.\n * !#zh 循环播放\n * @property {Number} Loop\n */\n Loop: WrapModeMask.Loop,\n\n /**\n * !#en All iterations are played in the reverse direction from the way they are specified.\n * And when time reaches the start of the animation, time will continue at the ending.\n * !#zh 反向循环播放\n * @property {Number} LoopReverse\n */\n LoopReverse: WrapModeMask.Loop | WrapModeMask.Reverse,\n\n /**\n * !#en Even iterations are played as specified, odd iterations are played in the reverse direction from the way they\n * are specified.\n * !#zh 从第一帧播放到最后一帧,然后反向播放回第一帧,到第一帧后再正向播放,如此循环\n * @property {Number} PingPong\n */\n PingPong: WrapModeMask.PingPong,\n\n /**\n * !#en Even iterations are played in the reverse direction from the way they are specified, odd iterations are played\n * as specified.\n * !#zh 从最后一帧开始反向播放,其他同 PingPong\n * @property {Number} PingPongReverse\n */\n PingPongReverse: WrapModeMask.PingPong | WrapModeMask.Reverse\n});\n\ncc.WrapMode = WrapMode;\n\n// For internal\nfunction WrappedInfo (info) {\n if (info) {\n this.set(info);\n return;\n }\n\n this.ratio = 0;\n this.time = 0;\n this.direction = 1;\n this.stopped = true;\n this.iterations = 0;\n this.frameIndex = undefined;\n}\n\nWrappedInfo.prototype.set = function (info) {\n this.ratio = info.ratio;\n this.time = info.time;\n this.direction = info.direction;\n this.stopped = info.stopped;\n this.iterations = info.iterations;\n this.frameIndex = info.frameIndex;\n};\n\nmodule.exports = {\n WrapModeMask,\n WrapMode,\n WrappedInfo\n};\n","/****************************************************************************\n Copyright (c) 2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst utils = require('./platform/utils');\nconst debugInfos = require('../../DebugInfos') || {};\nconst ERROR_MAP_URL = 'https://github.com/cocos-creator/engine/blob/master/EngineErrorMap.md';\n\n// the html element displays log in web page (DebugMode.INFO_FOR_WEB_PAGE)\nlet logList;\n\n/**\n * @module cc\n */\n\ncc.log = cc.warn = cc.error = cc.assert = console.log.bind ? console.log.bind(console) : console.log;\n\nlet resetDebugSetting = function (mode) {\n // reset\n cc.log = cc.warn = cc.error = cc.assert = function () {};\n\n if (mode === DebugMode.NONE)\n return;\n\n if (mode > DebugMode.ERROR) {\n //log to web page\n\n function logToWebPage (msg) {\n if (!cc.game.canvas)\n return;\n\n if (!logList) {\n var logDiv = document.createElement(\"Div\");\n logDiv.setAttribute(\"id\", \"logInfoDiv\");\n logDiv.setAttribute(\"width\", \"200\");\n logDiv.setAttribute(\"height\", cc.game.canvas.height);\n var logDivStyle = logDiv.style;\n logDivStyle.zIndex = \"99999\";\n logDivStyle.position = \"absolute\";\n logDivStyle.top = logDivStyle.left = \"0\";\n\n logList = document.createElement(\"textarea\");\n logList.setAttribute(\"rows\", \"20\");\n logList.setAttribute(\"cols\", \"30\");\n logList.setAttribute(\"disabled\", \"true\");\n var logListStyle = logList.style;\n logListStyle.backgroundColor = \"transparent\";\n logListStyle.borderBottom = \"1px solid #cccccc\";\n logListStyle.borderTopWidth = logListStyle.borderLeftWidth = logListStyle.borderRightWidth = \"0px\";\n logListStyle.borderTopStyle = logListStyle.borderLeftStyle = logListStyle.borderRightStyle = \"none\";\n logListStyle.padding = \"0px\";\n logListStyle.margin = 0;\n\n logDiv.appendChild(logList);\n cc.game.canvas.parentNode.appendChild(logDiv);\n }\n\n logList.value = logList.value + msg + \"\\r\\n\";\n logList.scrollTop = logList.scrollHeight;\n }\n\n cc.error = function () {\n logToWebPage(\"ERROR : \" + cc.js.formatStr.apply(null, arguments));\n };\n cc.assert = function (cond, msg) {\n 'use strict';\n if (!cond && msg) {\n msg = cc.js.formatStr.apply(null, cc.js.shiftArguments.apply(null, arguments));\n logToWebPage(\"ASSERT: \" + msg);\n }\n };\n if (mode !== DebugMode.ERROR_FOR_WEB_PAGE) {\n cc.warn = function () {\n logToWebPage(\"WARN : \" + cc.js.formatStr.apply(null, arguments));\n };\n }\n if (mode === DebugMode.INFO_FOR_WEB_PAGE) {\n cc.log = function () {\n logToWebPage(cc.js.formatStr.apply(null, arguments));\n };\n }\n }\n else if (console && console.log.apply) {//console is null when user doesn't open dev tool on IE9\n //log to console\n\n // For JSB\n if (!console.error) console.error = console.log;\n if (!console.warn) console.warn = console.log;\n\n /**\n * !#en\n * Outputs an error message to the Cocos Creator Console (editor) or Web Console (runtime).<br/>\n * - In Cocos Creator, error is red.<br/>\n * - In Chrome, error have a red icon along with red message text.<br/>\n * !#zh\n * 输出错误消息到 Cocos Creator 编辑器的 Console 或运行时页面端的 Console 中。<br/>\n * - 在 Cocos Creator 中,错误信息显示是红色的。<br/>\n * - 在 Chrome 中,错误信息有红色的图标以及红色的消息文本。<br/>\n *\n * @method error\n * @param {any} msg - A JavaScript string containing zero or more substitution strings.\n * @param {any} ...subst - JavaScript objects with which to replace substitution strings within msg. This gives you additional control over the format of the output.\n */\n if (CC_EDITOR) {\n cc.error = Editor.error;\n }\n else if (console.error.bind) {\n // use bind to avoid pollute call stacks\n cc.error = console.error.bind(console);\n }\n else {\n cc.error = CC_JSB || CC_RUNTIME ? console.error : function () {\n return console.error.apply(console, arguments);\n };\n }\n cc.assert = function (cond, msg) {\n if (!cond) {\n if (msg) {\n msg = cc.js.formatStr.apply(null, cc.js.shiftArguments.apply(null, arguments));\n }\n if (CC_DEV) {\n debugger;\n }\n if (CC_TEST) {\n ok(false, msg);\n }\n else {\n throw new Error(msg);\n }\n }\n }\n }\n if (mode !== DebugMode.ERROR) {\n /**\n * !#en\n * Outputs a warning message to the Cocos Creator Console (editor) or Web Console (runtime).\n * - In Cocos Creator, warning is yellow.\n * - In Chrome, warning have a yellow warning icon with the message text.\n * !#zh\n * 输出警告消息到 Cocos Creator 编辑器的 Console 或运行时 Web 端的 Console 中。<br/>\n * - 在 Cocos Creator 中,警告信息显示是黄色的。<br/>\n * - 在 Chrome 中,警告信息有着黄色的图标以及黄色的消息文本。<br/>\n * @method warn\n * @param {any} msg - A JavaScript string containing zero or more substitution strings.\n * @param {any} ...subst - JavaScript objects with which to replace substitution strings within msg. This gives you additional control over the format of the output.\n */\n if (CC_EDITOR) {\n cc.warn = Editor.warn;\n }\n else if (console.warn.bind) {\n // use bind to avoid pollute call stacks\n cc.warn = console.warn.bind(console);\n }\n else {\n cc.warn = CC_JSB || CC_RUNTIME ? console.warn : function () {\n return console.warn.apply(console, arguments);\n };\n }\n }\n if (CC_EDITOR) {\n cc.log = Editor.log;\n }\n else if (mode === DebugMode.INFO) {\n /**\n * !#en Outputs a message to the Cocos Creator Console (editor) or Web Console (runtime).\n * !#zh 输出一条消息到 Cocos Creator 编辑器的 Console 或运行时 Web 端的 Console 中。\n * @method log\n * @param {String|any} msg - A JavaScript string containing zero or more substitution strings.\n * @param {any} ...subst - JavaScript objects with which to replace substitution strings within msg. This gives you additional control over the format of the output.\n */\n if (CC_JSB || CC_RUNTIME) {\n if (scriptEngineType === \"JavaScriptCore\") {\n // console.log has to use `console` as its context for iOS 8~9. Therefore, apply it.\n cc.log = function () {\n return console.log.apply(console, arguments);\n };\n } else {\n cc.log = console.log;\n }\n }\n else if (console.log.bind) {\n // use bind to avoid pollute call stacks\n cc.log = console.log.bind(console);\n }\n else {\n cc.log = function () {\n return console.log.apply(console, arguments);\n };\n }\n }\n};\n\ncc._throw = CC_EDITOR ? Editor.error : function (error) {\n utils.callInNextTick(function () {\n throw error;\n });\n};\n\nfunction getTypedFormatter (type) {\n return function () {\n var id = arguments[0];\n var msg = CC_DEBUG ? (debugInfos[id] || 'unknown id') : `${type} ${id}, please go to ${ERROR_MAP_URL}#${id} to see details.`;\n if (arguments.length === 1) {\n return msg;\n }\n else if (arguments.length === 2) {\n return CC_DEBUG ? cc.js.formatStr(msg, arguments[1]) :\n msg + ' Arguments: ' + arguments[1];\n }\n else {\n var argsArray = cc.js.shiftArguments.apply(null, arguments);\n return CC_DEBUG ? cc.js.formatStr.apply(null, [msg].concat(argsArray)) :\n msg + ' Arguments: ' + argsArray.join(', ');\n }\n };\n}\n\nvar logFormatter = getTypedFormatter('Log');\ncc.logID = function () {\n cc.log(logFormatter.apply(null, arguments));\n};\n\nvar warnFormatter = getTypedFormatter('Warning');\ncc.warnID = function () {\n cc.warn(warnFormatter.apply(null, arguments));\n};\n\nvar errorFormatter = getTypedFormatter('Error');\ncc.errorID = function () {\n cc.error(errorFormatter.apply(null, arguments));\n};\n\nvar assertFormatter = getTypedFormatter('Assert');\ncc.assertID = function (cond) {\n 'use strict';\n if (cond) {\n return;\n }\n cc.assert(false, assertFormatter.apply(null, cc.js.shiftArguments.apply(null, arguments)));\n};\n\n/**\n* !#en Enum for debug modes.\n* !#zh 调试模式\n* @enum debug.DebugMode\n* @memberof cc\n */\nvar DebugMode = cc.Enum({\n /**\n * !#en The debug mode none.\n * !#zh 禁止模式,禁止显示任何日志信息。\n * @property NONE\n * @type {Number}\n * @static\n */\n NONE: 0,\n /**\n * !#en The debug mode info.\n * !#zh 信息模式,在 console 中显示所有日志。\n * @property INFO\n * @type {Number}\n * @static\n */\n INFO: 1,\n /**\n * !#en The debug mode warn.\n * !#zh 警告模式,在 console 中只显示 warn 级别以上的(包含 error日志。\n * @property WARN\n * @type {Number}\n * @static\n */\n WARN: 2,\n /**\n * !#en The debug mode error.\n * !#zh 错误模式,在 console 中只显示 error 日志。\n * @property ERROR\n * @type {Number}\n * @static\n */\n ERROR: 3,\n /**\n * !#en The debug mode info for web page.\n * !#zh 信息模式(仅 WEB 端有效),在画面上输出所有信息。\n * @property INFO_FOR_WEB_PAGE\n * @type {Number}\n * @static\n */\n INFO_FOR_WEB_PAGE: 4,\n /**\n * !#en The debug mode warn for web page.\n * !#zh 警告模式(仅 WEB 端有效),在画面上输出 warn 级别以上的(包含 error信息。\n * @property WARN_FOR_WEB_PAGE\n * @type {Number}\n * @static\n */\n WARN_FOR_WEB_PAGE: 5,\n /**\n * !#en The debug mode error for web page.\n * !#zh 错误模式(仅 WEB 端有效),在画面上输出 error 信息。\n * @property ERROR_FOR_WEB_PAGE\n * @type {Number}\n * @static\n */\n ERROR_FOR_WEB_PAGE: 6\n});\n/**\n * !#en An object to boot the game.\n * !#zh 包含游戏主体信息并负责驱动游戏的游戏对象。\n * @class debug\n * @main\n * @static\n */\nmodule.exports = cc.debug = {\n DebugMode: DebugMode,\n\n _resetDebugSetting: resetDebugSetting,\n\n /**\n * !#en Gets error message with the error id and possible parameters.\n * !#zh 通过 error id 和必要的参数来获取错误信息。\n * @method getError\n * @param {Number} errorId\n * @param {any} [param]\n * @return {String}\n */\n getError: getTypedFormatter('ERROR'),\n\n /**\n * !#en Returns whether or not to display the FPS informations.\n * !#zh 是否显示 FPS 信息。\n * @method isDisplayStats\n * @return {Boolean}\n */\n isDisplayStats: function () {\n return cc.profiler ? cc.profiler.isShowingStats() : false;\n },\n\n /**\n * !#en Sets whether display the FPS on the bottom-left corner.\n * !#zh 设置是否在左下角显示 FPS。\n * @method setDisplayStats\n * @param {Boolean} displayStats\n */\n setDisplayStats: function (displayStats) {\n if (cc.profiler && cc.game.renderType !== cc.game.RENDER_TYPE_CANVAS) {\n displayStats ? cc.profiler.showStats() : cc.profiler.hideStats();\n cc.game.config.showFPS = !!displayStats;\n }\n },\n}","/****************************************************************************\n Copyright (c) 2008-2010 Ricardo Quesada\n Copyright (c) 2011-2012 cocos2d-x.org\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos2d-x.org\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst EventTarget = require('./event/event-target');\nconst ComponentScheduler = require('./component-scheduler');\nconst NodeActivator = require('./node-activator');\nconst Obj = require('./platform/CCObject');\nconst game = require('./CCGame');\nconst renderer = require('./renderer');\nconst eventManager = require('./event-manager');\nconst Scheduler = require('./CCScheduler');\n\n//----------------------------------------------------------------------------------------------------------------------\n\n/**\n * !#en\n * <p>\n * ATTENTION: USE cc.director INSTEAD OF cc.Director.<br/>\n * cc.director is a singleton object which manage your game's logic flow.<br/>\n * Since the cc.director is a singleton, you don't need to call any constructor or create functions,<br/>\n * the standard way to use it is by calling:<br/>\n * - cc.director.methodName(); <br/>\n *\n * It creates and handle the main Window and manages how and when to execute the Scenes.<br/>\n * <br/>\n * The cc.director is also responsible for:<br/>\n * - initializing the OpenGL context<br/>\n * - setting the OpenGL pixel format (default on is RGB565)<br/>\n * - setting the OpenGL buffer depth (default on is 0-bit)<br/>\n * - setting the color for clear screen (default one is BLACK)<br/>\n * - setting the projection (default one is 3D)<br/>\n * - setting the orientation (default one is Portrait)<br/>\n * <br/>\n * <br/>\n * The cc.director also sets the default OpenGL context:<br/>\n * - GL_TEXTURE_2D is enabled<br/>\n * - GL_VERTEX_ARRAY is enabled<br/>\n * - GL_COLOR_ARRAY is enabled<br/>\n * - GL_TEXTURE_COORD_ARRAY is enabled<br/>\n * </p>\n * <p>\n * cc.director also synchronizes timers with the refresh rate of the display.<br/>\n * Features and Limitations:<br/>\n * - Scheduled timers & drawing are synchronizes with the refresh rate of the display<br/>\n * - Only supports animation intervals of 1/60 1/30 & 1/15<br/>\n * </p>\n *\n * !#zh\n * <p>\n * 注意:用 cc.director 代替 cc.Director。<br/>\n * cc.director 一个管理你的游戏的逻辑流程的单例对象。<br/>\n * 由于 cc.director 是一个单例,你不需要调用任何构造函数或创建函数,<br/>\n * 使用它的标准方法是通过调用:<br/>\n * - cc.director.methodName();\n * <br/>\n * 它创建和处理主窗口并且管理什么时候执行场景。<br/>\n * <br/>\n * cc.director 还负责:<br/>\n * - 初始化 OpenGL 环境。<br/>\n * - 设置OpenGL像素格式。(默认是 RGB565)<br/>\n * - 设置OpenGL缓冲区深度 (默认是 0-bit)<br/>\n * - 设置空白场景的颜色 (默认是 黑色)<br/>\n * - 设置投影 (默认是 3D)<br/>\n * - 设置方向 (默认是 Portrait)<br/>\n * <br/>\n * cc.director 设置了 OpenGL 默认环境 <br/>\n * - GL_TEXTURE_2D 启用。<br/>\n * - GL_VERTEX_ARRAY 启用。<br/>\n * - GL_COLOR_ARRAY 启用。<br/>\n * - GL_TEXTURE_COORD_ARRAY 启用。<br/>\n * </p>\n * <p>\n * cc.director 也同步定时器与显示器的刷新速率。\n * <br/>\n * 特点和局限性: <br/>\n * - 将计时器 & 渲染与显示器的刷新频率同步。<br/>\n * - 只支持动画的间隔 1/60 1/30 & 1/15。<br/>\n * </p>\n *\n * @class Director\n * @extends EventTarget\n */\ncc.Director = function () {\n EventTarget.call(this);\n\n // paused?\n this._paused = false;\n // purge?\n this._purgeDirectorInNextLoop = false;\n\n this._winSizeInPoints = null;\n\n // scenes\n this._scene = null;\n this._loadingScene = '';\n\n // FPS\n this._totalFrames = 0;\n this._lastUpdate = 0;\n this._deltaTime = 0.0;\n this._startTime = 0.0;\n\n // ParticleSystem max step delta time\n this._maxParticleDeltaTime = 0.0;\n\n // Scheduler for user registration update\n this._scheduler = null;\n // Scheduler for life-cycle methods in component\n this._compScheduler = null;\n // Node activator\n this._nodeActivator = null;\n // Action manager\n this._actionManager = null;\n\n var self = this;\n game.on(game.EVENT_SHOW, function () {\n self._lastUpdate = performance.now();\n });\n\n game.once(game.EVENT_ENGINE_INITED, this.init, this);\n};\n\ncc.Director.prototype = {\n constructor: cc.Director,\n init: function () {\n this._totalFrames = 0;\n this._lastUpdate = performance.now();\n this._startTime = this._lastUpdate;\n this._paused = false;\n this._purgeDirectorInNextLoop = false;\n this._winSizeInPoints = cc.size(0, 0);\n this._scheduler = new Scheduler();\n\n if (cc.ActionManager) {\n this._actionManager = new cc.ActionManager();\n this._scheduler.scheduleUpdate(this._actionManager, Scheduler.PRIORITY_SYSTEM, false);\n } else {\n this._actionManager = null;\n }\n\n this.sharedInit();\n return true;\n },\n\n /*\n * Manage all init process shared between the web engine and jsb engine.\n * All platform independent init process should be occupied here.\n */\n sharedInit: function () {\n this._compScheduler = new ComponentScheduler();\n this._nodeActivator = new NodeActivator();\n\n // Event manager\n if (eventManager) {\n eventManager.setEnabled(true);\n }\n\n // Animation manager\n if (cc.AnimationManager) {\n this._animationManager = new cc.AnimationManager();\n this._scheduler.scheduleUpdate(this._animationManager, Scheduler.PRIORITY_SYSTEM, false);\n }\n else {\n this._animationManager = null;\n }\n\n // collision manager\n if (cc.CollisionManager) {\n this._collisionManager = new cc.CollisionManager();\n this._scheduler.scheduleUpdate(this._collisionManager, Scheduler.PRIORITY_SYSTEM, false);\n }\n else {\n this._collisionManager = null;\n }\n\n // physics manager\n if (cc.PhysicsManager) {\n this._physicsManager = new cc.PhysicsManager();\n this._scheduler.scheduleUpdate(this._physicsManager, Scheduler.PRIORITY_SYSTEM, false);\n }\n else {\n this._physicsManager = null;\n }\n\n // physics 3d manager\n if (cc.Physics3DManager && (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON)) {\n this._physics3DManager = new cc.Physics3DManager();\n this._scheduler.scheduleUpdate(this._physics3DManager, Scheduler.PRIORITY_SYSTEM, false);\n } else {\n this._physics3DManager = null;\n }\n\n // WidgetManager\n if (cc._widgetManager) {\n cc._widgetManager.init(this);\n }\n },\n\n /**\n * calculates delta time since last time it was called\n */\n calculateDeltaTime: function (now) {\n if (!now) now = performance.now();\n\n // avoid delta time from being negative\n // negative deltaTime would be caused by the precision of now's value, for details please see: https://developer.mozilla.org/zh-CN/docs/Web/API/window/requestAnimationFrame\n this._deltaTime = now > this._lastUpdate ? (now - this._lastUpdate) / 1000 : 0;\n if (CC_DEBUG && (this._deltaTime > 1))\n this._deltaTime = 1 / 60.0;\n\n this._lastUpdate = now;\n },\n\n /**\n * !#en\n * Converts a view coordinate to an WebGL coordinate<br/>\n * Useful to convert (multi) touches coordinates to the current layout (portrait or landscape)<br/>\n * Implementation can be found in CCDirectorWebGL.\n * !#zh 将触摸点的屏幕坐标转换为 WebGL View 下的坐标。\n * @method convertToGL\n * @param {Vec2} uiPoint\n * @return {Vec2}\n * @deprecated since v2.0\n */\n convertToGL: function (uiPoint) {\n var container = game.container;\n var view = cc.view;\n var box = container.getBoundingClientRect();\n var left = box.left + window.pageXOffset - container.clientLeft;\n var top = box.top + window.pageYOffset - container.clientTop;\n var x = view._devicePixelRatio * (uiPoint.x - left);\n var y = view._devicePixelRatio * (top + box.height - uiPoint.y);\n return view._isRotated ? cc.v2(view._viewportRect.width - y, x) : cc.v2(x, y);\n },\n\n /**\n * !#en\n * Converts an OpenGL coordinate to a view coordinate<br/>\n * Useful to convert node points to window points for calls such as glScissor<br/>\n * Implementation can be found in CCDirectorWebGL.\n * !#zh 将触摸点的 WebGL View 坐标转换为屏幕坐标。\n * @method convertToUI\n * @param {Vec2} glPoint\n * @return {Vec2}\n * @deprecated since v2.0\n */\n convertToUI: function (glPoint) {\n var container = game.container;\n var view = cc.view;\n var box = container.getBoundingClientRect();\n var left = box.left + window.pageXOffset - container.clientLeft;\n var top = box.top + window.pageYOffset - container.clientTop;\n var uiPoint = cc.v2(0, 0);\n if (view._isRotated) {\n uiPoint.x = left + glPoint.y / view._devicePixelRatio;\n uiPoint.y = top + box.height - (view._viewportRect.width - glPoint.x) / view._devicePixelRatio;\n }\n else {\n uiPoint.x = left + glPoint.x * view._devicePixelRatio;\n uiPoint.y = top + box.height - glPoint.y * view._devicePixelRatio;\n }\n return uiPoint;\n },\n\n /**\n * End the life of director in the next frame\n * @method end\n */\n end: function () {\n this._purgeDirectorInNextLoop = true;\n },\n\n /**\n * !#en\n * Returns the size of the WebGL view in points.<br/>\n * It takes into account any possible rotation (device orientation) of the window.\n * !#zh 获取视图的大小,以点为单位。\n * @method getWinSize\n * @return {Size}\n * @deprecated since v2.0\n */\n getWinSize: function () {\n return cc.size(cc.winSize);\n },\n\n /**\n * !#en\n * Returns the size of the OpenGL view in pixels.<br/>\n * It takes into account any possible rotation (device orientation) of the window.<br/>\n * On Mac winSize and winSizeInPixels return the same value.\n * (The pixel here refers to the resource resolution. If you want to get the physics resolution of device, you need to use cc.view.getFrameSize())\n * !#zh\n * 获取视图大小,以像素为单位(这里的像素指的是资源分辨率。\n * 如果要获取屏幕物理分辨率,需要用 cc.view.getFrameSize()\n * @method getWinSizeInPixels\n * @return {Size}\n * @deprecated since v2.0\n */\n getWinSizeInPixels: function () {\n return cc.size(cc.winSize);\n },\n\n /**\n * !#en Pause the director's ticker, only involve the game logic execution.\n * It won't pause the rendering process nor the event manager.\n * If you want to pause the entier game including rendering, audio and event, \n * please use {{#crossLink \"Game.pause\"}}cc.game.pause{{/crossLink}}\n * !#zh 暂停正在运行的场景,该暂停只会停止游戏逻辑执行,但是不会停止渲染和 UI 响应。\n * 如果想要更彻底得暂停游戏,包含渲染,音频和事件,请使用 {{#crossLink \"Game.pause\"}}cc.game.pause{{/crossLink}}。\n * @method pause\n */\n pause: function () {\n if (this._paused)\n return;\n this._paused = true;\n },\n\n /**\n * Removes cached all cocos2d cached data.\n * @deprecated since v2.0\n */\n purgeCachedData: function () {\n cc.assetManager.releaseAll();\n },\n\n /**\n * Purge the cc.director itself, including unschedule all schedule, remove all event listeners, clean up and exit the running scene, stops all animations, clear cached data.\n */\n purgeDirector: function () {\n //cleanup scheduler\n this._scheduler.unscheduleAll();\n this._compScheduler.unscheduleAll();\n\n this._nodeActivator.reset();\n\n // Disable event dispatching\n if (eventManager)\n eventManager.setEnabled(false);\n\n if (!CC_EDITOR) {\n if (cc.isValid(this._scene)) {\n this._scene.destroy();\n }\n this._scene = null;\n\n cc.renderer.clear();\n cc.assetManager.builtins.clear();\n }\n\n cc.game.pause();\n\n // Clear all caches\n cc.assetManager.releaseAll();\n },\n\n /**\n * Reset the cc.director, can be used to restart the director after purge\n */\n reset: function () {\n this.purgeDirector();\n\n if (eventManager)\n eventManager.setEnabled(true);\n\n // Action manager\n if (this._actionManager){\n this._scheduler.scheduleUpdate(this._actionManager, cc.Scheduler.PRIORITY_SYSTEM, false);\n }\n\n // Animation manager\n if (this._animationManager) {\n this._scheduler.scheduleUpdate(this._animationManager, cc.Scheduler.PRIORITY_SYSTEM, false);\n }\n\n // Collider manager\n if (this._collisionManager) {\n this._scheduler.scheduleUpdate(this._collisionManager, cc.Scheduler.PRIORITY_SYSTEM, false);\n }\n\n // Physics manager\n if (this._physicsManager) {\n this._scheduler.scheduleUpdate(this._physicsManager, cc.Scheduler.PRIORITY_SYSTEM, false);\n }\n\n cc.game.resume();\n },\n\n /**\n * !#en\n * Run a scene. Replaces the running scene with a new one or enter the first scene.<br/>\n * The new scene will be launched immediately.\n * !#zh 立刻切换指定场景。\n * @method runSceneImmediate\n * @param {Scene|SceneAsset} scene - The need run scene.\n * @param {Function} [onBeforeLoadScene] - The function invoked at the scene before loading.\n * @param {Function} [onLaunched] - The function invoked at the scene after launch.\n */\n runSceneImmediate: function (scene, onBeforeLoadScene, onLaunched) {\n cc.assertID(scene instanceof cc.Scene || scene instanceof cc.SceneAsset, 1216);\n\n if (scene instanceof cc.SceneAsset) scene = scene.scene;\n\n CC_BUILD && CC_DEBUG && console.time('InitScene');\n scene._load(); // ensure scene initialized\n CC_BUILD && CC_DEBUG && console.timeEnd('InitScene');\n\n // Re-attach or replace persist nodes\n CC_BUILD && CC_DEBUG && console.time('AttachPersist');\n var persistNodeList = Object.keys(game._persistRootNodes).map(function (x) {\n return game._persistRootNodes[x];\n });\n for (let i = 0; i < persistNodeList.length; i++) {\n let node = persistNodeList[i];\n var existNode = scene.getChildByUuid(node.uuid);\n if (existNode) {\n // scene also contains the persist node, select the old one\n var index = existNode.getSiblingIndex();\n existNode._destroyImmediate();\n scene.insertChild(node, index);\n }\n else {\n node.parent = scene;\n }\n }\n CC_BUILD && CC_DEBUG && console.timeEnd('AttachPersist');\n\n var oldScene = this._scene;\n if (!CC_EDITOR) {\n // auto release assets\n CC_BUILD && CC_DEBUG && console.time('AutoRelease');\n cc.assetManager._releaseManager._autoRelease(oldScene, scene, game._persistRootNodes);\n CC_BUILD && CC_DEBUG && console.timeEnd('AutoRelease');\n }\n\n // unload scene\n CC_BUILD && CC_DEBUG && console.time('Destroy');\n if (cc.isValid(oldScene)) {\n oldScene.destroy();\n }\n\n this._scene = null;\n\n // purge destroyed nodes belongs to old scene\n Obj._deferredDestroy();\n CC_BUILD && CC_DEBUG && console.timeEnd('Destroy');\n\n if (onBeforeLoadScene) {\n onBeforeLoadScene();\n }\n this.emit(cc.Director.EVENT_BEFORE_SCENE_LAUNCH, scene);\n\n // Run an Entity Scene\n this._scene = scene;\n\n CC_BUILD && CC_DEBUG && console.time('Activate');\n scene._activate();\n CC_BUILD && CC_DEBUG && console.timeEnd('Activate');\n\n //start scene\n cc.game.resume();\n\n if (onLaunched) {\n onLaunched(null, scene);\n }\n this.emit(cc.Director.EVENT_AFTER_SCENE_LAUNCH, scene);\n },\n\n /**\n * !#en\n * Run a scene. Replaces the running scene with a new one or enter the first scene.\n * The new scene will be launched at the end of the current frame.\n * !#zh 运行指定场景。\n * @method runScene\n * @param {Scene|SceneAsset} scene - The need run scene.\n * @param {Function} [onBeforeLoadScene] - The function invoked at the scene before loading.\n * @param {Function} [onLaunched] - The function invoked at the scene after launch.\n */\n runScene: function (scene, onBeforeLoadScene, onLaunched) {\n cc.assertID(scene, 1205);\n cc.assertID(scene instanceof cc.Scene || scene instanceof cc.SceneAsset, 1216);\n\n if (scene instanceof cc.SceneAsset) scene = scene.scene;\n // ensure scene initialized\n scene._load();\n\n // Delay run / replace scene to the end of the frame\n this.once(cc.Director.EVENT_AFTER_DRAW, function () {\n this.runSceneImmediate(scene, onBeforeLoadScene, onLaunched);\n }, this);\n },\n\n /**\n * !#en Loads the scene by its name.\n * !#zh 通过场景名称进行加载场景。\n *\n * @method loadScene\n * @param {String} sceneName - The name of the scene to load.\n * @param {Function} [onLaunched] - callback, will be called after scene launched.\n * @return {Boolean} if error, return false\n */\n loadScene: function (sceneName, onLaunched, _onUnloaded) {\n if (this._loadingScene) {\n cc.warnID(1208, sceneName, this._loadingScene);\n return false;\n }\n var bundle = cc.assetManager.bundles.find(function (bundle) {\n return bundle.getSceneInfo(sceneName);\n });\n if (bundle) {\n this.emit(cc.Director.EVENT_BEFORE_SCENE_LOADING, sceneName);\n this._loadingScene = sceneName;\n var self = this;\n console.time('LoadScene ' + sceneName);\n bundle.loadScene(sceneName, function (err, scene) {\n console.timeEnd('LoadScene ' + sceneName);\n self._loadingScene = '';\n if (err) {\n err = 'Failed to load scene: ' + err;\n cc.error(err);\n onLaunched && onLaunched(err);\n }\n else {\n self.runSceneImmediate(scene, _onUnloaded, onLaunched);\n }\n });\n return true;\n }\n else {\n cc.errorID(1209, sceneName);\n return false;\n }\n },\n\n /**\n * !#en\n * Preloads the scene to reduces loading time. You can call this method at any time you want.\n * After calling this method, you still need to launch the scene by `cc.director.loadScene`.\n * It will be totally fine to call `cc.director.loadScene` at any time even if the preloading is not\n * yet finished, the scene will be launched after loaded automatically.\n * !#zh 预加载场景,你可以在任何时候调用这个方法。\n * 调用完后,你仍然需要通过 `cc.director.loadScene` 来启动场景,因为这个方法不会执行场景加载操作。\n * 就算预加载还没完成,你也可以直接调用 `cc.director.loadScene`,加载完成后场景就会启动。\n *\n * @method preloadScene\n * @param {String} sceneName - The name of the scene to preload.\n * @param {Function} [onProgress] - callback, will be called when the load progression change.\n * @param {Number} onProgress.completedCount - The number of the items that are already completed\n * @param {Number} onProgress.totalCount - The total number of the items\n * @param {Object} onProgress.item - The latest item which flow out the pipeline\n * @param {Function} [onLoaded] - callback, will be called after scene loaded.\n * @param {Error} onLoaded.error - null or the error object.\n */\n preloadScene (sceneName, onProgress, onLoaded) {\n var bundle = cc.assetManager.bundles.find(function (bundle) {\n return bundle.getSceneInfo(sceneName);\n });\n if (bundle) {\n bundle.preloadScene(sceneName, null, onProgress, onLoaded);\n }\n else {\n cc.errorID(1209, sceneName);\n return null;\n }\n },\n\n\n /**\n * !#en Resume game logic execution after pause, if the current scene is not paused, nothing will happen.\n * !#zh 恢复暂停场景的游戏逻辑,如果当前场景没有暂停将没任何事情发生。\n * @method resume\n */\n resume: function () {\n if (!this._paused) {\n return;\n }\n\n this._lastUpdate = performance.now();\n if (!this._lastUpdate) {\n cc.logID(1200);\n }\n\n this._paused = false;\n this._deltaTime = 0;\n },\n\n /**\n * !#en\n * Enables or disables WebGL depth test.<br/>\n * Implementation can be found in CCDirectorCanvas.js/CCDirectorWebGL.js\n * !#zh 启用/禁用深度测试(在 Canvas 渲染模式下不会生效)。\n * @method setDepthTest\n * @param {Boolean} on\n * @deprecated since v2.0\n */\n setDepthTest: function (value) {\n if (!cc.Camera.main) {\n return;\n }\n cc.Camera.main.depth = !!value;\n },\n\n /**\n * !#en\n * Set color for clear screen.<br/>\n * (Implementation can be found in CCDirectorCanvas.js/CCDirectorWebGL.js)\n * !#zh\n * 设置场景的默认擦除颜色。<br/>\n * 支持全透明,但不支持透明度为中间值。要支持全透明需手工开启 cc.macro.ENABLE_TRANSPARENT_CANVAS。\n * @method setClearColor\n * @param {Color} clearColor\n * @deprecated since v2.0\n */\n setClearColor: function (clearColor) {\n if (!cc.Camera.main) {\n return;\n }\n cc.Camera.main.backgroundColor = clearColor;\n },\n\n /**\n * !#en Returns current logic Scene.\n * !#zh 获取当前逻辑场景。\n * @method getRunningScene\n * @private\n * @return {Scene}\n * @deprecated since v2.0\n */\n getRunningScene: function () {\n return this._scene;\n },\n\n /**\n * !#en Returns current logic Scene.\n * !#zh 获取当前逻辑场景。\n * @method getScene\n * @return {Scene}\n * @example\n * // This will help you to get the Canvas node in scene\n * cc.director.getScene().getChildByName('Canvas');\n */\n getScene: function () {\n return this._scene;\n },\n\n /**\n * !#en Returns the FPS value. Please use {{#crossLink \"Game.setFrameRate\"}}cc.game.setFrameRate{{/crossLink}} to control animation interval.\n * !#zh 获取单位帧执行时间。请使用 {{#crossLink \"Game.setFrameRate\"}}cc.game.setFrameRate{{/crossLink}} 来控制游戏帧率。\n * @method getAnimationInterval\n * @deprecated since v2.0\n * @return {Number}\n */\n getAnimationInterval: function () {\n return 1000 / game.getFrameRate();\n },\n\n /**\n * Sets animation interval, this doesn't control the main loop.\n * To control the game's frame rate overall, please use {{#crossLink \"Game.setFrameRate\"}}cc.game.setFrameRate{{/crossLink}}\n * @method setAnimationInterval\n * @deprecated since v2.0\n * @param {Number} value - The animation interval desired.\n */\n setAnimationInterval: function (value) {\n game.setFrameRate(Math.round(1000 / value));\n },\n\n /**\n * !#en Returns the delta time since last frame.\n * !#zh 获取上一帧的增量时间。\n * @method getDeltaTime\n * @return {Number}\n */\n getDeltaTime: function () {\n return this._deltaTime;\n },\n\n /**\n * !#en Returns the total passed time since game start, unit: ms\n * !#zh 获取从游戏开始到现在总共经过的时间,单位为 ms\n * @method getTotalTime\n * @return {Number}\n */\n getTotalTime: function () {\n return performance.now() - this._startTime;\n },\n\n /**\n * !#en Returns how many frames were called since the director started.\n * !#zh 获取 director 启动以来游戏运行的总帧数。\n * @method getTotalFrames\n * @return {Number}\n */\n getTotalFrames: function () {\n return this._totalFrames;\n },\n\n /**\n * !#en Returns whether or not the Director is paused.\n * !#zh 是否处于暂停状态。\n * @method isPaused\n * @return {Boolean}\n */\n isPaused: function () {\n return this._paused;\n },\n\n /**\n * !#en Returns the cc.Scheduler associated with this director.\n * !#zh 获取和 director 相关联的 cc.Scheduler。\n * @method getScheduler\n * @return {Scheduler}\n */\n getScheduler: function () {\n return this._scheduler;\n },\n\n /**\n * !#en Sets the cc.Scheduler associated with this director.\n * !#zh 设置和 director 相关联的 cc.Scheduler。\n * @method setScheduler\n * @param {Scheduler} scheduler\n */\n setScheduler: function (scheduler) {\n if (this._scheduler !== scheduler) {\n this._scheduler = scheduler;\n }\n },\n\n /**\n * !#en Returns the cc.ActionManager associated with this director.\n * !#zh 获取和 director 相关联的 cc.ActionManager动作管理器。\n * @method getActionManager\n * @return {ActionManager}\n */\n getActionManager: function () {\n return this._actionManager;\n },\n /**\n * !#en Sets the cc.ActionManager associated with this director.\n * !#zh 设置和 director 相关联的 cc.ActionManager动作管理器。\n * @method setActionManager\n * @param {ActionManager} actionManager\n */\n setActionManager: function (actionManager) {\n if (this._actionManager !== actionManager) {\n if (this._actionManager) {\n this._scheduler.unscheduleUpdate(this._actionManager);\n }\n this._actionManager = actionManager;\n this._scheduler.scheduleUpdate(this._actionManager, cc.Scheduler.PRIORITY_SYSTEM, false);\n }\n },\n\n /* \n * !#en Returns the cc.AnimationManager associated with this director.\n * !#zh 获取和 director 相关联的 cc.AnimationManager动画管理器。\n * @method getAnimationManager\n * @return {AnimationManager}\n */\n getAnimationManager: function () {\n return this._animationManager;\n },\n\n /**\n * !#en Returns the cc.CollisionManager associated with this director.\n * !#zh 获取和 director 相关联的 cc.CollisionManager (碰撞管理器)。\n * @method getCollisionManager\n * @return {CollisionManager}\n */\n getCollisionManager: function () {\n return this._collisionManager;\n },\n\n /**\n * !#en Returns the cc.PhysicsManager associated with this director.\n * !#zh 返回与 director 相关联的 cc.PhysicsManager (物理管理器)。\n * @method getPhysicsManager\n * @return {PhysicsManager}\n */\n getPhysicsManager: function () {\n return this._physicsManager;\n },\n\n /**\n * !#en Returns the cc.Physics3DManager associated with this director.\n * !#zh 返回与 director 相关联的 cc.Physics3DManager (物理管理器)。\n * @method getPhysics3DManager\n * @return {Physics3DManager}\n */\n getPhysics3DManager: function () {\n return this._physics3DManager;\n },\n\n // Loop management\n /*\n * Starts Animation\n * @deprecated since v2.1.2\n */\n startAnimation: function () {\n cc.game.resume();\n },\n\n /*\n * Stops animation\n * @deprecated since v2.1.2\n */\n stopAnimation: function () {\n cc.game.pause();\n },\n\n _resetDeltaTime () {\n this._lastUpdate = performance.now();\n this._deltaTime = 0;\n },\n\n /*\n * Run main loop of director\n */\n mainLoop: CC_EDITOR ? function (deltaTime, updateAnimate) {\n this._deltaTime = deltaTime;\n\n // Update\n if (!this._paused) {\n this.emit(cc.Director.EVENT_BEFORE_UPDATE);\n\n this._compScheduler.startPhase();\n this._compScheduler.updatePhase(deltaTime);\n\n if (updateAnimate) {\n this._scheduler.update(deltaTime);\n }\n\n this._compScheduler.lateUpdatePhase(deltaTime);\n\n this.emit(cc.Director.EVENT_AFTER_UPDATE);\n }\n\n // Render\n this.emit(cc.Director.EVENT_BEFORE_DRAW);\n renderer.render(this._scene, deltaTime);\n \n // After draw\n this.emit(cc.Director.EVENT_AFTER_DRAW);\n\n this._totalFrames++;\n\n } : function (now) {\n if (this._purgeDirectorInNextLoop) {\n this._purgeDirectorInNextLoop = false;\n this.purgeDirector();\n }\n else {\n // calculate \"global\" dt\n this.calculateDeltaTime(now);\n\n // Update\n if (!this._paused) {\n // before update\n this.emit(cc.Director.EVENT_BEFORE_UPDATE);\n\n // Call start for new added components\n this._compScheduler.startPhase();\n\n // Update for components\n this._compScheduler.updatePhase(this._deltaTime);\n // Engine update with scheduler\n this._scheduler.update(this._deltaTime);\n\n // Late update for components\n this._compScheduler.lateUpdatePhase(this._deltaTime);\n\n // User can use this event to do things after update\n this.emit(cc.Director.EVENT_AFTER_UPDATE);\n \n // Destroy entities that have been removed recently\n Obj._deferredDestroy();\n }\n\n // Render\n this.emit(cc.Director.EVENT_BEFORE_DRAW);\n renderer.render(this._scene, this._deltaTime);\n\n // After draw\n this.emit(cc.Director.EVENT_AFTER_DRAW);\n\n eventManager.frameUpdateListeners();\n this._totalFrames++;\n }\n },\n\n __fastOn: function (type, callback, target) {\n this.on(type, callback, target);\n },\n\n __fastOff: function (type, callback, target) {\n this.off(type, callback, target);\n },\n};\n\n// Event target\ncc.js.addon(cc.Director.prototype, EventTarget.prototype);\n\n/**\n * !#en The event projection changed of cc.Director. This event will not get triggered since v2.0\n * !#zh cc.Director 投影变化的事件。从 v2.0 开始这个事件不会再被触发\n * @property {String} EVENT_PROJECTION_CHANGED\n * @readonly\n * @static\n * @deprecated since v2.0\n */\ncc.Director.EVENT_PROJECTION_CHANGED = \"director_projection_changed\";\n\n/**\n * !#en The event which will be triggered before loading a new scene.\n * !#zh 加载新场景之前所触发的事件。\n * @event cc.Director.EVENT_BEFORE_SCENE_LOADING\n * @param {String} sceneName - The loading scene name\n */\n/**\n * !#en The event which will be triggered before loading a new scene.\n * !#zh 加载新场景之前所触发的事件。\n * @property {String} EVENT_BEFORE_SCENE_LOADING\n * @readonly\n * @static\n */\ncc.Director.EVENT_BEFORE_SCENE_LOADING = \"director_before_scene_loading\";\n\n/*\n * !#en The event which will be triggered before launching a new scene.\n * !#zh 运行新场景之前所触发的事件。\n * @event cc.Director.EVENT_BEFORE_SCENE_LAUNCH\n * @param {String} sceneName - New scene which will be launched\n */\n/**\n * !#en The event which will be triggered before launching a new scene.\n * !#zh 运行新场景之前所触发的事件。\n * @property {String} EVENT_BEFORE_SCENE_LAUNCH\n * @readonly\n * @static\n */\ncc.Director.EVENT_BEFORE_SCENE_LAUNCH = \"director_before_scene_launch\";\n\n/**\n * !#en The event which will be triggered after launching a new scene.\n * !#zh 运行新场景之后所触发的事件。\n * @event cc.Director.EVENT_AFTER_SCENE_LAUNCH\n * @param {String} sceneName - New scene which is launched\n */\n/**\n * !#en The event which will be triggered after launching a new scene.\n * !#zh 运行新场景之后所触发的事件。\n * @property {String} EVENT_AFTER_SCENE_LAUNCH\n * @readonly\n * @static\n */\ncc.Director.EVENT_AFTER_SCENE_LAUNCH = \"director_after_scene_launch\";\n\n/**\n * !#en The event which will be triggered at the beginning of every frame.\n * !#zh 每个帧的开始时所触发的事件。\n * @event cc.Director.EVENT_BEFORE_UPDATE\n */\n/**\n * !#en The event which will be triggered at the beginning of every frame.\n * !#zh 每个帧的开始时所触发的事件。\n * @property {String} EVENT_BEFORE_UPDATE\n * @readonly\n * @static\n */\ncc.Director.EVENT_BEFORE_UPDATE = \"director_before_update\";\n\n/**\n * !#en The event which will be triggered after engine and components update logic.\n * !#zh 将在引擎和组件 “update” 逻辑之后所触发的事件。\n * @event cc.Director.EVENT_AFTER_UPDATE\n */\n/**\n * !#en The event which will be triggered after engine and components update logic.\n * !#zh 将在引擎和组件 “update” 逻辑之后所触发的事件。\n * @property {String} EVENT_AFTER_UPDATE\n * @readonly\n * @static\n */\ncc.Director.EVENT_AFTER_UPDATE = \"director_after_update\";\n\n/**\n * !#en The event is deprecated since v2.0, please use cc.Director.EVENT_BEFORE_DRAW instead\n * !#zh 这个事件从 v2.0 开始被废弃,请直接使用 cc.Director.EVENT_BEFORE_DRAW\n * @property {String} EVENT_BEFORE_VISIT\n * @readonly\n * @deprecated since v2.0\n * @static\n */\ncc.Director.EVENT_BEFORE_VISIT = \"director_before_draw\";\n\n/**\n * !#en The event is deprecated since v2.0, please use cc.Director.EVENT_BEFORE_DRAW instead\n * !#zh 这个事件从 v2.0 开始被废弃,请直接使用 cc.Director.EVENT_BEFORE_DRAW\n * @property {String} EVENT_AFTER_VISIT\n * @readonly\n * @deprecated since v2.0\n * @static\n */\ncc.Director.EVENT_AFTER_VISIT = \"director_before_draw\";\n\n/**\n * !#en The event which will be triggered before the rendering process.\n * !#zh 渲染过程之前所触发的事件。\n * @event cc.Director.EVENT_BEFORE_DRAW\n */\n/**\n * !#en The event which will be triggered before the rendering process.\n * !#zh 渲染过程之前所触发的事件。\n * @property {String} EVENT_BEFORE_DRAW\n * @readonly\n * @static\n */\ncc.Director.EVENT_BEFORE_DRAW = \"director_before_draw\";\n\n/**\n * !#en The event which will be triggered after the rendering process.\n * !#zh 渲染过程之后所触发的事件。\n * @event cc.Director.EVENT_AFTER_DRAW\n */\n/**\n * !#en The event which will be triggered after the rendering process.\n * !#zh 渲染过程之后所触发的事件。\n * @property {String} EVENT_AFTER_DRAW\n * @readonly\n * @static\n */\ncc.Director.EVENT_AFTER_DRAW = \"director_after_draw\";\n\n//Possible OpenGL projections used by director\n\n/**\n * Constant for 2D projection (orthogonal projection)\n * @property {Number} PROJECTION_2D\n * @default 0\n * @readonly\n * @static\n * @deprecated since v2.0\n */\ncc.Director.PROJECTION_2D = 0;\n\n/**\n * Constant for 3D projection with a fovy=60, znear=0.5f and zfar=1500.\n * @property {Number} PROJECTION_3D\n * @default 1\n * @readonly\n * @static\n * @deprecated since v2.0\n */\ncc.Director.PROJECTION_3D = 1;\n\n/**\n * Constant for custom projection, if cc.Director's projection set to it, it calls \"updateProjection\" on the projection delegate.\n * @property {Number} PROJECTION_CUSTOM\n * @default 3\n * @readonly\n * @static\n * @deprecated since v2.0\n */\ncc.Director.PROJECTION_CUSTOM = 3;\n\n/**\n * Constant for default projection of cc.Director, default projection is 2D projection\n * @property {Number} PROJECTION_DEFAULT\n * @default cc.Director.PROJECTION_2D\n * @readonly\n * @static\n * @deprecated since v2.0\n */\ncc.Director.PROJECTION_DEFAULT = cc.Director.PROJECTION_2D;\n\n/**\n * The event which will be triggered before the physics process.<br/>\n * 物理过程之前所触发的事件。\n * @event Director.EVENT_BEFORE_PHYSICS\n * @readonly\n */\ncc.Director.EVENT_BEFORE_PHYSICS = 'director_before_physics';\n\n/**\n * The event which will be triggered after the physics process.<br/>\n * 物理过程之后所触发的事件。\n * @event Director.EVENT_AFTER_PHYSICS\n * @readonly\n */\ncc.Director.EVENT_AFTER_PHYSICS = 'director_after_physics';\n\n/**\n * @module cc\n */\n\n/**\n * !#en Director\n * !#zh 导演类。\n * @property director\n * @type {Director}\n */\ncc.director = new cc.Director();\n\nmodule.exports = cc.director;","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar EventTarget = require('./event/event-target');\nrequire('../audio/CCAudioEngine');\nconst debug = require('./CCDebug');\nconst renderer = require('./renderer/index.js');\nconst dynamicAtlasManager = require('../core/renderer/utils/dynamic-atlas/manager');\n\n/**\n * @module cc\n */\n\n/**\n * !#en An object to boot the game.\n * !#zh 包含游戏主体信息并负责驱动游戏的游戏对象。\n * @class Game\n * @extends EventTarget\n */\nvar game = {\n /**\n * !#en Event triggered when game hide to background.\n * Please note that this event is not 100% guaranteed to be fired on Web platform,\n * on native platforms, it corresponds to enter background event, os status bar or notification center may not trigger this event.\n * !#zh 游戏进入后台时触发的事件。\n * 请注意,在 WEB 平台,这个事件不一定会 100% 触发,这完全取决于浏览器的回调行为。\n * 在原生平台,它对应的是应用被切换到后台事件,下拉菜单和上拉状态栏等不一定会触发这个事件,这取决于系统行为。\n * @property EVENT_HIDE\n * @type {String}\n * @example\n * cc.game.on(cc.game.EVENT_HIDE, function () {\n * cc.audioEngine.pauseMusic();\n * cc.audioEngine.pauseAllEffects();\n * });\n */\n EVENT_HIDE: \"game_on_hide\",\n\n /**\n * !#en Event triggered when game back to foreground\n * Please note that this event is not 100% guaranteed to be fired on Web platform,\n * on native platforms, it corresponds to enter foreground event.\n * !#zh 游戏进入前台运行时触发的事件。\n * 请注意,在 WEB 平台,这个事件不一定会 100% 触发,这完全取决于浏览器的回调行为。\n * 在原生平台,它对应的是应用被切换到前台事件。\n * @property EVENT_SHOW\n * @constant\n * @type {String}\n */\n EVENT_SHOW: \"game_on_show\",\n\n /**\n * !#en Event triggered when game restart\n * !#zh 调用restart后触发事件。\n * @property EVENT_RESTART\n * @constant\n * @type {String}\n */\n EVENT_RESTART: \"game_on_restart\",\n\n /**\n * Event triggered after game inited, at this point all engine objects and game scripts are loaded\n * @property EVENT_GAME_INITED\n * @constant\n * @type {String}\n */\n EVENT_GAME_INITED: \"game_inited\",\n\n /**\n * Event triggered after engine inited, at this point you will be able to use all engine classes.\n * It was defined as EVENT_RENDERER_INITED in cocos creator v1.x and renamed in v2.0\n * @property EVENT_ENGINE_INITED\n * @constant\n * @type {String}\n */\n EVENT_ENGINE_INITED: \"engine_inited\",\n // deprecated\n EVENT_RENDERER_INITED: \"engine_inited\",\n\n /**\n * Web Canvas 2d API as renderer backend\n * @property RENDER_TYPE_CANVAS\n * @constant\n * @type {Number}\n */\n RENDER_TYPE_CANVAS: 0,\n /**\n * WebGL API as renderer backend\n * @property RENDER_TYPE_WEBGL\n * @constant\n * @type {Number}\n */\n RENDER_TYPE_WEBGL: 1,\n /**\n * OpenGL API as renderer backend\n * @property RENDER_TYPE_OPENGL\n * @constant\n * @type {Number}\n */\n RENDER_TYPE_OPENGL: 2,\n\n _persistRootNodes: {},\n\n // states\n _paused: true,//whether the game is paused\n _configLoaded: false,//whether config loaded\n _isCloning: false, // deserializing or instantiating\n _prepared: false, //whether the engine has prepared\n _rendererInitialized: false,\n\n _renderContext: null,\n\n _intervalId: null,//interval target of main\n\n _lastTime: null,\n _frameTime: null,\n\n /**\n * !#en The outer frame of the game canvas, parent of game container.\n * !#zh 游戏画布的外框container 的父容器。\n * @property frame\n * @type {Object}\n */\n frame: null,\n /**\n * !#en The container of game canvas.\n * !#zh 游戏画布的容器。\n * @property container\n * @type {HTMLDivElement}\n */\n container: null,\n /**\n * !#en The canvas of the game.\n * !#zh 游戏的画布。\n * @property canvas\n * @type {HTMLCanvasElement}\n */\n canvas: null,\n\n /**\n * !#en The renderer backend of the game.\n * !#zh 游戏的渲染器类型。\n * @property renderType\n * @type {Number}\n */\n renderType: -1,\n\n /**\n * !#en\n * The current game configuration, including:<br/>\n * 1. debugMode<br/>\n * \"debugMode\" possible values :<br/>\n * 0 - No message will be printed. <br/>\n * 1 - cc.error, cc.assert, cc.warn, cc.log will print in console. <br/>\n * 2 - cc.error, cc.assert, cc.warn will print in console. <br/>\n * 3 - cc.error, cc.assert will print in console. <br/>\n * 4 - cc.error, cc.assert, cc.warn, cc.log will print on canvas, available only on web.<br/>\n * 5 - cc.error, cc.assert, cc.warn will print on canvas, available only on web. <br/>\n * 6 - cc.error, cc.assert will print on canvas, available only on web. <br/>\n * 2. showFPS<br/>\n * Left bottom corner fps information will show when \"showFPS\" equals true, otherwise it will be hide.<br/>\n * 3. exposeClassName<br/>\n * Expose class name to chrome debug tools, the class intantiate performance is a little bit slower when exposed.<br/>\n * 4. frameRate<br/>\n * \"frameRate\" set the wanted frame rate for your game, but the real fps depends on your game implementation and the running environment.<br/>\n * 5. id<br/>\n * \"gameCanvas\" sets the id of your canvas element on the web page, it's useful only on web.<br/>\n * 6. renderMode<br/>\n * \"renderMode\" sets the renderer type, only useful on web :<br/>\n * 0 - Automatically chosen by engine<br/>\n * 1 - Forced to use canvas renderer<br/>\n * 2 - Forced to use WebGL renderer, but this will be ignored on mobile browsers<br/>\n *<br/>\n * Please DO NOT modify this object directly, it won't have any effect.<br/>\n * !#zh\n * 当前的游戏配置,包括: <br/>\n * 1. debugModedebug 模式,但是在浏览器中这个选项会被忽略) <br/>\n * \"debugMode\" 各种设置选项的意义。 <br/>\n * 0 - 没有消息被打印出来。 <br/>\n * 1 - cc.errorcc.assertcc.warncc.log 将打印在 console 中。 <br/>\n * 2 - cc.errorcc.assertcc.warn 将打印在 console 中。 <br/>\n * 3 - cc.errorcc.assert 将打印在 console 中。 <br/>\n * 4 - cc.errorcc.assertcc.warncc.log 将打印在 canvas 中(仅适用于 web 端)。 <br/>\n * 5 - cc.errorcc.assertcc.warn 将打印在 canvas 中(仅适用于 web 端)。 <br/>\n * 6 - cc.errorcc.assert 将打印在 canvas 中(仅适用于 web 端)。 <br/>\n * 2. showFPS显示 FPS <br/>\n * 当 showFPS 为 true 的时候界面的左下角将显示 fps 的信息,否则被隐藏。 <br/>\n * 3. exposeClassName <br/>\n * 暴露类名让 Chrome DevTools 可以识别,如果开启会稍稍降低类的创建过程的性能,但对对象构造没有影响。 <br/>\n * 4. frameRate (帧率) <br/>\n * “frameRate” 设置想要的帧率你的游戏但真正的FPS取决于你的游戏实现和运行环境。 <br/>\n * 5. id <br/>\n * \"gameCanvas\" Web 页面上的 Canvas Element ID仅适用于 web 端。 <br/>\n * 6. renderMode渲染模式 <br/>\n * “renderMode” 设置渲染器类型,仅适用于 web 端: <br/>\n * 0 - 通过引擎自动选择。 <br/>\n * 1 - 强制使用 canvas 渲染。\n * 2 - 强制使用 WebGL 渲染,但是在部分 Android 浏览器中这个选项会被忽略。 <br/>\n * <br/>\n * 注意:请不要直接修改这个对象,它不会有任何效果。\n * @property config\n * @type {Object}\n */\n config: null,\n\n /**\n * !#en Callback when the scripts of engine have been load.\n * !#zh 当引擎完成启动后的回调函数。\n * @method onStart\n * @type {Function}\n */\n onStart: null,\n\n//@Public Methods\n\n// @Game play control\n /**\n * !#en Set frame rate of game.\n * !#zh 设置游戏帧率。\n * @method setFrameRate\n * @param {Number} frameRate\n */\n setFrameRate: function (frameRate) {\n var config = this.config;\n config.frameRate = frameRate;\n if (this._intervalId)\n window.cancelAnimFrame(this._intervalId);\n this._intervalId = 0;\n this._paused = true;\n this._setAnimFrame();\n this._runMainLoop();\n },\n\n /**\n * !#en Get frame rate set for the game, it doesn't represent the real frame rate.\n * !#zh 获取设置的游戏帧率(不等同于实际帧率)。\n * @method getFrameRate\n * @return {Number} frame rate\n */\n getFrameRate: function () {\n return this.config.frameRate;\n },\n\n /**\n * !#en Run the game frame by frame.\n * !#zh 执行一帧游戏循环。\n * @method step\n */\n step: function () {\n cc.director.mainLoop();\n },\n\n /**\n * !#en Pause the game main loop. This will pause:\n * game logic execution, rendering process, event manager, background music and all audio effects.\n * This is different with cc.director.pause which only pause the game logic execution.\n * !#zh 暂停游戏主循环。包含:游戏逻辑,渲染,事件处理,背景音乐和所有音效。这点和只暂停游戏逻辑的 cc.director.pause 不同。\n * @method pause\n */\n pause: function () {\n if (this._paused) return;\n this._paused = true;\n // Pause audio engine\n if (cc.audioEngine) {\n cc.audioEngine._break();\n }\n // Pause main loop\n if (this._intervalId)\n window.cancelAnimFrame(this._intervalId);\n this._intervalId = 0;\n },\n\n /**\n * !#en Resume the game from pause. This will resume:\n * game logic execution, rendering process, event manager, background music and all audio effects.\n * !#zh 恢复游戏主循环。包含:游戏逻辑,渲染,事件处理,背景音乐和所有音效。\n * @method resume\n */\n resume: function () {\n if (!this._paused) return;\n this._paused = false;\n // Resume audio engine\n if (cc.audioEngine) {\n cc.audioEngine._restore();\n }\n cc.director._resetDeltaTime();\n // Resume main loop\n this._runMainLoop();\n },\n\n /**\n * !#en Check whether the game is paused.\n * !#zh 判断游戏是否暂停。\n * @method isPaused\n * @return {Boolean}\n */\n isPaused: function () {\n return this._paused;\n },\n\n /**\n * !#en Restart game.\n * !#zh 重新开始游戏\n * @method restart\n */\n restart: function () {\n cc.director.once(cc.Director.EVENT_AFTER_DRAW, function () {\n for (var id in game._persistRootNodes) {\n game.removePersistRootNode(game._persistRootNodes[id]);\n }\n\n // Clear scene\n cc.director.getScene().destroy();\n cc.Object._deferredDestroy();\n\n // Clean up audio\n if (cc.audioEngine) {\n cc.audioEngine.uncacheAll();\n }\n\n cc.director.reset();\n\n game.pause();\n cc.assetManager.builtins.init(() => {\n game.onStart();\n game.emit(game.EVENT_RESTART);\n });\n });\n },\n\n /**\n * !#en End game, it will close the game window\n * !#zh 退出游戏\n * @method end\n */\n end: function () {\n close();\n },\n\n// @Game loading\n\n _initEngine () {\n if (this._rendererInitialized) {\n return;\n }\n\n this._initRenderer();\n\n if (!CC_EDITOR) {\n this._initEvents();\n }\n\n this.emit(this.EVENT_ENGINE_INITED);\n },\n\n _loadPreviewScript (cb) {\n if (CC_PREVIEW && window.__quick_compile_project__) {\n window.__quick_compile_project__.load(cb);\n }\n else {\n cb();\n }\n },\n\n _prepareFinished (cb) {\n // Init engine\n this._initEngine();\n this._setAnimFrame();\n cc.assetManager.builtins.init(() => {\n // Log engine version\n console.log('Cocos Creator SP v' + cc.ENGINE_VERSION);\n this._prepared = true;\n this._runMainLoop();\n\n this.emit(this.EVENT_GAME_INITED);\n\n if (cb) cb();\n });\n },\n\n eventTargetOn: EventTarget.prototype.on,\n eventTargetOnce: EventTarget.prototype.once,\n\n /**\n * !#en\n * Register an callback of a specific event type on the game object.\n * This type of event should be triggered via `emit`.\n * !#zh\n * 注册 game 的特定事件类型回调。这种类型的事件应该被 `emit` 触发。\n *\n * @method on\n * @param {String} type - A string representing the event type to listen for.\n * @param {Function} callback - The callback that will be invoked when the event is dispatched.\n * The callback is ignored if it is a duplicate (the callbacks are unique).\n * @param {any} [callback.arg1] arg1\n * @param {any} [callback.arg2] arg2\n * @param {any} [callback.arg3] arg3\n * @param {any} [callback.arg4] arg4\n * @param {any} [callback.arg5] arg5\n * @param {Object} [target] - The target (this object) to invoke the callback, can be null\n * @return {Function} - Just returns the incoming callback so you can save the anonymous function easier.\n * @typescript\n * on<T extends Function>(type: string, callback: T, target?: any, useCapture?: boolean): T\n */\n on (type, callback, target, once) {\n // Make sure EVENT_ENGINE_INITED and EVENT_GAME_INITED callbacks to be invoked\n if ((this._prepared && type === this.EVENT_ENGINE_INITED) ||\n (!this._paused && type === this.EVENT_GAME_INITED)) {\n callback.call(target);\n }\n else {\n this.eventTargetOn(type, callback, target, once);\n }\n },\n /**\n * !#en\n * Register an callback of a specific event type on the game object,\n * the callback will remove itself after the first time it is triggered.\n * !#zh\n * 注册 game 的特定事件类型回调,回调会在第一时间被触发后删除自身。\n *\n * @method once\n * @param {String} type - A string representing the event type to listen for.\n * @param {Function} callback - The callback that will be invoked when the event is dispatched.\n * The callback is ignored if it is a duplicate (the callbacks are unique).\n * @param {any} [callback.arg1] arg1\n * @param {any} [callback.arg2] arg2\n * @param {any} [callback.arg3] arg3\n * @param {any} [callback.arg4] arg4\n * @param {any} [callback.arg5] arg5\n * @param {Object} [target] - The target (this object) to invoke the callback, can be null\n */\n once (type, callback, target) {\n // Make sure EVENT_ENGINE_INITED and EVENT_GAME_INITED callbacks to be invoked\n if ((this._prepared && type === this.EVENT_ENGINE_INITED) ||\n (!this._paused && type === this.EVENT_GAME_INITED)) {\n callback.call(target);\n }\n else {\n this.eventTargetOnce(type, callback, target);\n }\n },\n\n /**\n * !#en Prepare game.\n * !#zh 准备引擎,请不要直接调用这个函数。\n * @param {Function} cb\n * @method prepare\n */\n prepare (cb) {\n // Already prepared\n if (this._prepared) {\n if (cb) cb();\n return;\n }\n\n this._loadPreviewScript(() => {\n this._prepareFinished(cb);\n });\n },\n\n /**\n * !#en Run game with configuration object and onStart function.\n * !#zh 运行游戏,并且指定引擎配置和 onStart 的回调。\n * @method run\n * @param {Object} config - Pass configuration object or onStart function\n * @param {Function} onStart - function to be executed after game initialized\n */\n run: function (config, onStart) {\n this._initConfig(config);\n this.onStart = onStart;\n this.prepare(game.onStart && game.onStart.bind(game));\n },\n\n// @ Persist root node section\n /**\n * !#en\n * Add a persistent root node to the game, the persistent node won't be destroyed during scene transition.<br/>\n * The target node must be placed in the root level of hierarchy, otherwise this API won't have any effect.\n * !#zh\n * 声明常驻根节点,该节点不会被在场景切换中被销毁。<br/>\n * 目标节点必须位于为层级的根节点,否则无效。\n * @method addPersistRootNode\n * @param {Node} node - The node to be made persistent\n */\n addPersistRootNode: function (node) {\n if (!cc.Node.isNode(node) || !node.uuid) {\n cc.warnID(3800);\n return;\n }\n var id = node.uuid;\n if (!this._persistRootNodes[id]) {\n var scene = cc.director._scene;\n if (cc.isValid(scene)) {\n if (!node.parent) {\n node.parent = scene;\n }\n else if ( !(node.parent instanceof cc.Scene) ) {\n cc.warnID(3801);\n return;\n }\n else if (node.parent !== scene) {\n cc.warnID(3802);\n return;\n }\n }\n this._persistRootNodes[id] = node;\n node._persistNode = true;\n cc.assetManager._releaseManager._addPersistNodeRef(node);\n }\n },\n\n /**\n * !#en Remove a persistent root node.\n * !#zh 取消常驻根节点。\n * @method removePersistRootNode\n * @param {Node} node - The node to be removed from persistent node list\n */\n removePersistRootNode: function (node) {\n var id = node.uuid || '';\n if (node === this._persistRootNodes[id]) {\n delete this._persistRootNodes[id];\n node._persistNode = false;\n cc.assetManager._releaseManager._removePersistNodeRef(node);\n }\n },\n\n /**\n * !#en Check whether the node is a persistent root node.\n * !#zh 检查节点是否是常驻根节点。\n * @method isPersistRootNode\n * @param {Node} node - The node to be checked\n * @return {Boolean}\n */\n isPersistRootNode: function (node) {\n return node._persistNode;\n },\n\n//@Private Methods\n\n// @Time ticker section\n _setAnimFrame: function () {\n this._lastTime = performance.now();\n var frameRate = game.config.frameRate;\n this._frameTime = 1000 / frameRate;\n cc.director._maxParticleDeltaTime = this._frameTime / 1000 * 2;\n if (CC_JSB || CC_RUNTIME) {\n jsb.setPreferredFramesPerSecond(frameRate);\n window.requestAnimFrame = window.requestAnimationFrame;\n window.cancelAnimFrame = window.cancelAnimationFrame;\n }\n else {\n let rAF = window.requestAnimationFrame = window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n window.oRequestAnimationFrame ||\n window.msRequestAnimationFrame;\n\n if (frameRate !== 60 && frameRate !== 30) {\n window.requestAnimFrame = rAF ? this._stTimeWithRAF : this._stTime;\n window.cancelAnimFrame = this._ctTime;\n }\n else {\n window.requestAnimFrame = rAF || this._stTime;\n\n window.cancelAnimFrame = window.cancelAnimationFrame ||\n window.cancelRequestAnimationFrame ||\n window.msCancelRequestAnimationFrame ||\n window.mozCancelRequestAnimationFrame ||\n window.oCancelRequestAnimationFrame ||\n window.webkitCancelRequestAnimationFrame ||\n window.msCancelAnimationFrame ||\n window.mozCancelAnimationFrame ||\n window.webkitCancelAnimationFrame ||\n window.oCancelAnimationFrame ||\n this._ctTime;\n }\n }\n },\n\n _stTimeWithRAF: function(callback){\n var currTime = performance.now();\n var timeToCall = Math.max(0, game._frameTime - (currTime - game._lastTime));\n var id = window.setTimeout(function() {\n window.requestAnimationFrame(callback);\n }, timeToCall);\n game._lastTime = currTime + timeToCall;\n return id;\n },\n\n _stTime: function(callback){\n var currTime = performance.now();\n var timeToCall = Math.max(0, game._frameTime - (currTime - game._lastTime));\n var id = window.setTimeout(function() { callback(); },\n timeToCall);\n game._lastTime = currTime + timeToCall;\n return id;\n },\n _ctTime: function(id){\n window.clearTimeout(id);\n },\n //Run game.\n _runMainLoop: function () {\n if (CC_EDITOR) {\n return;\n }\n if (!this._prepared) return;\n\n var self = this, callback, config = self.config,\n director = cc.director,\n skip = true, frameRate = config.frameRate;\n\n debug.setDisplayStats(config.showFPS);\n\n callback = function (now) {\n if (!self._paused) {\n self._intervalId = window.requestAnimFrame(callback);\n if (!CC_JSB && !CC_RUNTIME && frameRate === 30) {\n if (skip = !skip) {\n return;\n }\n }\n director.mainLoop(now);\n }\n };\n\n self._intervalId = window.requestAnimFrame(callback);\n self._paused = false;\n },\n\n// @Game loading section\n _initConfig (config) {\n // Configs adjustment\n if (typeof config.debugMode !== 'number') {\n config.debugMode = 0;\n }\n config.exposeClassName = !!config.exposeClassName;\n if (typeof config.frameRate !== 'number') {\n config.frameRate = 60;\n }\n let renderMode = config.renderMode;\n if (typeof renderMode !== 'number' || renderMode > 2 || renderMode < 0) {\n config.renderMode = 0;\n }\n if (typeof config.registerSystemEvent !== 'boolean') {\n config.registerSystemEvent = true;\n }\n if (renderMode === 1) {\n config.showFPS = false;\n }\n else {\n config.showFPS = !!config.showFPS;\n }\n\n // Collide Map and Group List\n this.collisionMatrix = config.collisionMatrix || [];\n this.groupList = config.groupList || [];\n\n debug._resetDebugSetting(config.debugMode);\n\n this.config = config;\n this._configLoaded = true;\n },\n\n _determineRenderType () {\n let config = this.config,\n userRenderMode = parseInt(config.renderMode) || 0;\n\n // Determine RenderType\n this.renderType = this.RENDER_TYPE_CANVAS;\n let supportRender = false;\n\n if (userRenderMode === 0) {\n if (cc.sys.capabilities['opengl']) {\n this.renderType = this.RENDER_TYPE_WEBGL;\n supportRender = true;\n }\n else if (cc.sys.capabilities['canvas']) {\n this.renderType = this.RENDER_TYPE_CANVAS;\n supportRender = true;\n }\n }\n else if (userRenderMode === 1 && cc.sys.capabilities['canvas']) {\n this.renderType = this.RENDER_TYPE_CANVAS;\n supportRender = true;\n }\n else if (userRenderMode === 2 && cc.sys.capabilities['opengl']) {\n this.renderType = this.RENDER_TYPE_WEBGL;\n supportRender = true;\n }\n\n if (!supportRender) {\n throw new Error(debug.getError(3820, userRenderMode));\n }\n },\n\n _initRenderer () {\n // Avoid setup to be called twice.\n if (this._rendererInitialized) return;\n\n let el = this.config.id,\n width, height,\n localCanvas, localContainer;\n\n if (CC_JSB || CC_RUNTIME) {\n this.container = localContainer = document.createElement(\"DIV\");\n this.frame = localContainer.parentNode === document.body ? document.documentElement : localContainer.parentNode;\n localCanvas = window.__canvas;\n this.canvas = localCanvas;\n }\n else {\n var element = (el instanceof HTMLElement) ? el : (document.querySelector(el) || document.querySelector('#' + el));\n\n if (element.tagName === \"CANVAS\") {\n width = element.width;\n height = element.height;\n\n //it is already a canvas, we wrap it around with a div\n this.canvas = localCanvas = element;\n this.container = localContainer = document.createElement(\"DIV\");\n if (localCanvas.parentNode)\n localCanvas.parentNode.insertBefore(localContainer, localCanvas);\n } else {\n //we must make a new canvas and place into this element\n if (element.tagName !== \"DIV\") {\n cc.warnID(3819);\n }\n width = element.clientWidth;\n height = element.clientHeight;\n this.canvas = localCanvas = document.createElement(\"CANVAS\");\n this.container = localContainer = document.createElement(\"DIV\");\n element.appendChild(localContainer);\n }\n localContainer.setAttribute('id', 'Cocos2dGameContainer');\n localContainer.appendChild(localCanvas);\n this.frame = (localContainer.parentNode === document.body) ? document.documentElement : localContainer.parentNode;\n\n function addClass (element, name) {\n var hasClass = (' ' + element.className + ' ').indexOf(' ' + name + ' ') > -1;\n if (!hasClass) {\n if (element.className) {\n element.className += \" \";\n }\n element.className += name;\n }\n }\n addClass(localCanvas, \"gameCanvas\");\n localCanvas.setAttribute(\"width\", width || 480);\n localCanvas.setAttribute(\"height\", height || 320);\n localCanvas.setAttribute(\"tabindex\", 99);\n }\n\n this._determineRenderType();\n // WebGL context created successfully\n if (this.renderType === this.RENDER_TYPE_WEBGL) {\n var opts = {\n 'stencil': true,\n // MSAA is causing serious performance dropdown on some browsers.\n 'antialias': cc.macro.ENABLE_WEBGL_ANTIALIAS,\n 'alpha': cc.macro.ENABLE_TRANSPARENT_CANVAS\n };\n renderer.initWebGL(localCanvas, opts);\n this._renderContext = renderer.device._gl;\n\n // Enable dynamic atlas manager by default\n if (!cc.macro.CLEANUP_IMAGE_CACHE && dynamicAtlasManager) {\n dynamicAtlasManager.enabled = true;\n }\n }\n if (!this._renderContext) {\n this.renderType = this.RENDER_TYPE_CANVAS;\n // Could be ignored by module settings\n renderer.initCanvas(localCanvas);\n this._renderContext = renderer.device._ctx;\n }\n\n this.canvas.oncontextmenu = function () {\n if (!cc._isContextMenuEnable) return false;\n };\n\n this._rendererInitialized = true;\n },\n\n _initEvents: function () {\n var win = window, hiddenPropName;\n\n // register system events\n if (this.config.registerSystemEvent)\n cc.internal.inputManager.registerSystemEvent(this.canvas);\n\n if (typeof document.hidden !== 'undefined') {\n hiddenPropName = \"hidden\";\n } else if (typeof document.mozHidden !== 'undefined') {\n hiddenPropName = \"mozHidden\";\n } else if (typeof document.msHidden !== 'undefined') {\n hiddenPropName = \"msHidden\";\n } else if (typeof document.webkitHidden !== 'undefined') {\n hiddenPropName = \"webkitHidden\";\n }\n\n var hidden = false;\n\n function onHidden () {\n if (!hidden) {\n hidden = true;\n game.emit(game.EVENT_HIDE);\n }\n }\n // In order to adapt the most of platforms the onshow API.\n function onShown (arg0, arg1, arg2, arg3, arg4) {\n if (hidden) {\n hidden = false;\n game.emit(game.EVENT_SHOW, arg0, arg1, arg2, arg3, arg4);\n }\n }\n\n if (hiddenPropName) {\n var changeList = [\n \"visibilitychange\",\n \"mozvisibilitychange\",\n \"msvisibilitychange\",\n \"webkitvisibilitychange\",\n \"qbrowserVisibilityChange\"\n ];\n for (var i = 0; i < changeList.length; i++) {\n document.addEventListener(changeList[i], function (event) {\n var visible = document[hiddenPropName];\n // QQ App\n visible = visible || event[\"hidden\"];\n if (visible)\n onHidden();\n else\n onShown();\n });\n }\n } else {\n win.addEventListener(\"blur\", onHidden);\n win.addEventListener(\"focus\", onShown);\n }\n\n if (navigator.userAgent.indexOf(\"MicroMessenger\") > -1) {\n win.onfocus = onShown;\n }\n\n if (\"onpageshow\" in window && \"onpagehide\" in window) {\n win.addEventListener(\"pagehide\", onHidden);\n win.addEventListener(\"pageshow\", onShown);\n // Taobao UIWebKit\n document.addEventListener(\"pagehide\", onHidden);\n document.addEventListener(\"pageshow\", onShown);\n }\n\n this.on(game.EVENT_HIDE, function () {\n game.pause();\n });\n this.on(game.EVENT_SHOW, function () {\n game.resume();\n });\n }\n};\n\nEventTarget.call(game);\ncc.js.addon(game, EventTarget.prototype);\n\n/**\n * @module cc\n */\n\n/**\n * !#en This is a Game instance.\n * !#zh 这是一个 Game 类的实例,包含游戏主体信息并负责驱动游戏的游戏对象。。\n * @property game\n * @type Game\n */\ncc.game = module.exports = game;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos2d-x.org\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n'use strict';\n\nimport { Mat4, Vec2, Vec3, Quat, Trs } from './value-types';\nimport { approx } from './value-types/utils'\n\nconst BaseNode = require('./utils/base-node');\nconst PrefabHelper = require('./utils/prefab-helper');\nconst nodeMemPool = require('./utils/trans-pool').NodeMemPool;\nconst AffineTrans = require('./utils/affine-transform');\nconst eventManager = require('./event-manager');\nconst macro = require('./platform/CCMacro');\nconst js = require('./platform/js');\nconst Event = require('./event/event');\nconst EventTarget = require('./event/event-target');\nconst RenderFlow = require('./renderer/render-flow');\n\nconst Flags = cc.Object.Flags;\nconst Destroying = Flags.Destroying;\n\nconst ERR_INVALID_NUMBER = CC_EDITOR && 'The %s is invalid';\nconst ONE_DEGREE = Math.PI / 180;\n\nvar ActionManagerExist = !!cc.ActionManager;\nvar emptyFunc = function () {};\n\n// getWorldPosition temp var\nvar _gwpVec3 = new Vec3();\nvar _gwpQuat = new Quat();\n\n// _invTransformPoint temp var\nvar _tpVec3a = new Vec3();\nvar _tpVec3b = new Vec3();\nvar _tpQuata = new Quat();\nvar _tpQuatb = new Quat();\n\n// setWorldPosition temp var\nvar _swpVec3 = new Vec3();\n\n// getWorldScale temp var\nvar _gwsVec3 = new Vec3();\n\n// setWorldScale temp var\nvar _swsVec3 = new Vec3();\n\n// getWorldRT temp var\nvar _gwrtVec3a = new Vec3();\nvar _gwrtVec3b = new Vec3();\nvar _gwrtQuata = new Quat();\nvar _gwrtQuatb = new Quat();\n\n// lookAt temp var\nvar _laVec3 = new Vec3();\nvar _laQuat = new Quat();\n\n//up、right、forward temp var\nvar _urfVec3 = new Vec3();\nvar _urfQuat = new Quat();\n\n// _hitTest temp var\nvar _htVec3a = new Vec3();\nvar _htVec3b = new Vec3();\n\n// getWorldRotation temp var\nvar _gwrQuat = new Quat();\n\n// setWorldRotation temp var\nvar _swrQuat = new Quat();\n\nvar _quata = new Quat();\nvar _mat4_temp = cc.mat4();\nvar _vec3_temp = new Vec3();\n\nconst POSITION_ON = 1 << 0;\nconst SCALE_ON = 1 << 1;\nconst ROTATION_ON = 1 << 2;\nconst SIZE_ON = 1 << 3;\nconst ANCHOR_ON = 1 << 4;\nconst COLOR_ON = 1 << 5;\n\nlet _cachedPool = new js.Pool();\n_cachedPool.get = function () {\n return this._get() || [];\n};\n\nlet BuiltinGroupIndex = cc.Enum({\n DEBUG: 31\n});\n\n/**\n * !#en Node's local dirty properties flag\n * !#zh Node 的本地属性 dirty 状态位\n * @enum Node._LocalDirtyFlag\n * @static\n * @private\n * @namespace Node\n */\nvar LocalDirtyFlag = cc.Enum({\n /**\n * !#en Flag for position dirty\n * !#zh 位置 dirty 的标记位\n * @property {Number} POSITION\n * @static\n */\n POSITION: 1 << 0,\n /**\n * !#en Flag for scale dirty\n * !#zh 缩放 dirty 的标记位\n * @property {Number} SCALE\n * @static\n */\n SCALE: 1 << 1,\n /**\n * !#en Flag for rotation dirty\n * !#zh 旋转 dirty 的标记位\n * @property {Number} ROTATION\n * @static\n */\n ROTATION: 1 << 2,\n /**\n * !#en Flag for skew dirty\n * !#zh skew dirty 的标记位\n * @property {Number} SKEW\n * @static\n */\n SKEW: 1 << 3,\n /**\n * !#en Flag for rotation, scale or position dirty\n * !#zh 旋转,缩放,或位置 dirty 的标记位\n * @property {Number} TRS\n * @static\n */\n TRS: 1 << 0 | 1 << 1 | 1 << 2,\n /**\n * !#en Flag for rotation or scale dirty\n * !#zh 旋转或缩放 dirty 的标记位\n * @property {Number} RS\n * @static\n */\n RS: 1 << 1 | 1 << 2,\n /**\n * !#en Flag for rotation, scale, position, skew dirty\n * !#zh 旋转,缩放,位置,或斜角 dirty 的标记位\n * @property {Number} TRS\n * @static\n */\n TRSS: 1 << 0 | 1 << 1 | 1 << 2 | 1 << 3,\n\n /**\n * !#en Flag for physics position dirty\n * !#zh 物理位置 dirty 的标记位\n * @property {Number} PHYSICS_POSITION\n * @static\n */\n PHYSICS_POSITION: 1 << 4,\n\n /**\n * !#en Flag for physics scale dirty\n * !#zh 物理缩放 dirty 的标记位\n * @property {Number} PHYSICS_SCALE\n * @static\n */\n PHYSICS_SCALE: 1 << 5,\n\n /**\n * !#en Flag for physics rotation dirty\n * !#zh 物理旋转 dirty 的标记位\n * @property {Number} PHYSICS_ROTATION\n * @static\n */\n PHYSICS_ROTATION: 1 << 6,\n\n /**\n * !#en Flag for physics trs dirty\n * !#zh 物理位置旋转缩放 dirty 的标记位\n * @property {Number} PHYSICS_TRS\n * @static\n */\n PHYSICS_TRS: 1 << 4 | 1 << 5 | 1 << 6,\n\n /**\n * !#en Flag for physics rs dirty\n * !#zh 物理旋转缩放 dirty 的标记位\n * @property {Number} PHYSICS_RS\n * @static\n */\n PHYSICS_RS: 1 << 5 | 1 << 6,\n\n /**\n * !#en Flag for node and physics position dirty\n * !#zh 所有位置 dirty 的标记位\n * @property {Number} ALL_POSITION\n * @static\n */\n ALL_POSITION: 1 << 0 | 1 << 4,\n\n /**\n * !#en Flag for node and physics scale dirty\n * !#zh 所有缩放 dirty 的标记位\n * @property {Number} ALL_SCALE\n * @static\n */\n ALL_SCALE: 1 << 1 | 1 << 5,\n\n /**\n * !#en Flag for node and physics rotation dirty\n * !#zh 所有旋转 dirty 的标记位\n * @property {Number} ALL_ROTATION\n * @static\n */\n ALL_ROTATION: 1 << 2 | 1 << 6,\n\n /**\n * !#en Flag for node and physics trs dirty\n * !#zh 所有trs dirty 的标记位\n * @property {Number} ALL_TRS\n * @static\n */\n ALL_TRS: 1 << 0 | 1 << 1 | 1 << 2 | 1 << 4 | 1 << 5 | 1 << 6,\n\n /**\n * !#en Flag for all dirty properties\n * !#zh 覆盖所有 dirty 状态的标记位\n * @property {Number} ALL\n * @static\n */\n ALL: 0xffff,\n});\n\n/**\n * !#en The event type supported by Node\n * !#zh Node 支持的事件类型\n * @class Node.EventType\n * @static\n * @namespace Node\n */\n// Why EventType defined as class, because the first parameter of Node.on method needs set as 'string' type.\nvar EventType = cc.Enum({\n /**\n * !#en The event type for touch start event, you can use its value directly: 'touchstart'\n * !#zh 当手指触摸到屏幕时。\n * @property {String} TOUCH_START\n * @static\n */\n TOUCH_START: 'touchstart',\n /**\n * !#en The event type for touch move event, you can use its value directly: 'touchmove'\n * !#zh 当手指在屏幕上移动时。\n * @property {String} TOUCH_MOVE\n * @static\n */\n TOUCH_MOVE: 'touchmove',\n /**\n * !#en The event type for touch end event, you can use its value directly: 'touchend'\n * !#zh 当手指在目标节点区域内离开屏幕时。\n * @property {String} TOUCH_END\n * @static\n */\n TOUCH_END: 'touchend',\n /**\n * !#en The event type for touch end event, you can use its value directly: 'touchcancel'\n * !#zh 当手指在目标节点区域外离开屏幕时。\n * @property {String} TOUCH_CANCEL\n * @static\n */\n TOUCH_CANCEL: 'touchcancel',\n\n /**\n * !#en The event type for mouse down events, you can use its value directly: 'mousedown'\n * !#zh 当鼠标按下时触发一次。\n * @property {String} MOUSE_DOWN\n * @static\n */\n MOUSE_DOWN: 'mousedown',\n /**\n * !#en The event type for mouse move events, you can use its value directly: 'mousemove'\n * !#zh 当鼠标在目标节点在目标节点区域中移动时,不论是否按下。\n * @property {String} MOUSE_MOVE\n * @static\n */\n MOUSE_MOVE: 'mousemove',\n /**\n * !#en The event type for mouse enter target events, you can use its value directly: 'mouseenter'\n * !#zh 当鼠标移入目标节点区域时,不论是否按下。\n * @property {String} MOUSE_ENTER\n * @static\n */\n MOUSE_ENTER: 'mouseenter',\n /**\n * !#en The event type for mouse leave target events, you can use its value directly: 'mouseleave'\n * !#zh 当鼠标移出目标节点区域时,不论是否按下。\n * @property {String} MOUSE_LEAVE\n * @static\n */\n MOUSE_LEAVE: 'mouseleave',\n /**\n * !#en The event type for mouse up events, you can use its value directly: 'mouseup'\n * !#zh 当鼠标从按下状态松开时触发一次。\n * @property {String} MOUSE_UP\n * @static\n */\n MOUSE_UP: 'mouseup',\n /**\n * !#en The event type for mouse wheel events, you can use its value directly: 'mousewheel'\n * !#zh 当鼠标滚轮滚动时。\n * @property {String} MOUSE_WHEEL\n * @static\n */\n MOUSE_WHEEL: 'mousewheel',\n\n /**\n * !#en The event type for position change events.\n * Performance note, this event will be triggered every time corresponding properties being changed,\n * if the event callback have heavy logic it may have great performance impact, try to avoid such scenario.\n * !#zh 当节点位置改变时触发的事件。\n * 性能警告:这个事件会在每次对应的属性被修改时触发,如果事件回调损耗较高,有可能对性能有很大的负面影响,请尽量避免这种情况。\n * @property {String} POSITION_CHANGED\n * @static\n */\n POSITION_CHANGED: 'position-changed',\n /**\n * !#en The event type for rotation change events.\n * Performance note, this event will be triggered every time corresponding properties being changed,\n * if the event callback have heavy logic it may have great performance impact, try to avoid such scenario.\n * !#zh 当节点旋转改变时触发的事件。\n * 性能警告:这个事件会在每次对应的属性被修改时触发,如果事件回调损耗较高,有可能对性能有很大的负面影响,请尽量避免这种情况。\n * @property {String} ROTATION_CHANGED\n * @static\n */\n ROTATION_CHANGED: 'rotation-changed',\n /**\n * !#en The event type for scale change events.\n * Performance note, this event will be triggered every time corresponding properties being changed,\n * if the event callback have heavy logic it may have great performance impact, try to avoid such scenario.\n * !#zh 当节点缩放改变时触发的事件。\n * 性能警告:这个事件会在每次对应的属性被修改时触发,如果事件回调损耗较高,有可能对性能有很大的负面影响,请尽量避免这种情况。\n * @property {String} SCALE_CHANGED\n * @static\n */\n SCALE_CHANGED: 'scale-changed',\n /**\n * !#en The event type for size change events.\n * Performance note, this event will be triggered every time corresponding properties being changed,\n * if the event callback have heavy logic it may have great performance impact, try to avoid such scenario.\n * !#zh 当节点尺寸改变时触发的事件。\n * 性能警告:这个事件会在每次对应的属性被修改时触发,如果事件回调损耗较高,有可能对性能有很大的负面影响,请尽量避免这种情况。\n * @property {String} SIZE_CHANGED\n * @static\n */\n SIZE_CHANGED: 'size-changed',\n /**\n * !#en The event type for anchor point change events.\n * Performance note, this event will be triggered every time corresponding properties being changed,\n * if the event callback have heavy logic it may have great performance impact, try to avoid such scenario.\n * !#zh 当节点锚点改变时触发的事件。\n * 性能警告:这个事件会在每次对应的属性被修改时触发,如果事件回调损耗较高,有可能对性能有很大的负面影响,请尽量避免这种情况。\n * @property {String} ANCHOR_CHANGED\n * @static\n */\n ANCHOR_CHANGED: 'anchor-changed',\n /**\n * !#en The event type for color change events.\n * Performance note, this event will be triggered every time corresponding properties being changed,\n * if the event callback have heavy logic it may have great performance impact, try to avoid such scenario.\n * !#zh 当节点颜色改变时触发的事件。\n * 性能警告:这个事件会在每次对应的属性被修改时触发,如果事件回调损耗较高,有可能对性能有很大的负面影响,请尽量避免这种情况。\n * @property {String} COLOR_CHANGED\n * @static\n */\n COLOR_CHANGED: 'color-changed',\n /**\n * !#en The event type for new child added events.\n * !#zh 当新的子节点被添加时触发的事件。\n * @property {String} CHILD_ADDED\n * @static\n */\n CHILD_ADDED: 'child-added',\n /**\n * !#en The event type for child removed events.\n * !#zh 当子节点被移除时触发的事件。\n * @property {String} CHILD_REMOVED\n * @static\n */\n CHILD_REMOVED: 'child-removed',\n /**\n * !#en The event type for children reorder events.\n * !#zh 当子节点顺序改变时触发的事件。\n * @property {String} CHILD_REORDER\n * @static\n */\n CHILD_REORDER: 'child-reorder',\n /**\n * !#en The event type for node group changed events.\n * !#zh 当节点归属群组发生变化时触发的事件。\n * @property {String} GROUP_CHANGED\n * @static\n */\n GROUP_CHANGED: 'group-changed',\n /**\n * !#en The event type for node's sibling order changed.\n * !#zh 当节点在兄弟节点中的顺序发生变化时触发的事件。\n * @property {String} SIBLING_ORDER_CHANGED\n * @static\n */\n SIBLING_ORDER_CHANGED: 'sibling-order-changed',\n});\n\nvar _touchEvents = [\n EventType.TOUCH_START,\n EventType.TOUCH_MOVE,\n EventType.TOUCH_END,\n EventType.TOUCH_CANCEL,\n];\nvar _mouseEvents = [\n EventType.MOUSE_DOWN,\n EventType.MOUSE_ENTER,\n EventType.MOUSE_MOVE,\n EventType.MOUSE_LEAVE,\n EventType.MOUSE_UP,\n EventType.MOUSE_WHEEL,\n];\n\nvar _skewNeedWarn = true;\nvar _skewWarn = function (value, node) {\n if (value !== 0) {\n var nodePath = \"\";\n if (CC_EDITOR) {\n var NodeUtils = Editor.require('scene://utils/node');\n nodePath = `Node: ${NodeUtils.getNodePath(node)}.`\n }\n _skewNeedWarn && cc.warn(\"`cc.Node.skewX/Y` is deprecated since v2.2.1, please use 3D node instead.\", nodePath);\n !CC_EDITOR && (_skewNeedWarn = false);\n }\n}\n\nvar _currentHovered = null;\n\nvar _touchStartHandler = function (touch, event) {\n var pos = touch.getLocation();\n var node = this.owner;\n\n if (node._hitTest(pos, this)) {\n event.type = EventType.TOUCH_START;\n event.touch = touch;\n event.bubbles = true;\n node.dispatchEvent(event);\n return true;\n }\n return false;\n};\nvar _touchMoveHandler = function (touch, event) {\n var node = this.owner;\n event.type = EventType.TOUCH_MOVE;\n event.touch = touch;\n event.bubbles = true;\n node.dispatchEvent(event);\n};\nvar _touchEndHandler = function (touch, event) {\n var pos = touch.getLocation();\n var node = this.owner;\n\n if (node._hitTest(pos, this)) {\n event.type = EventType.TOUCH_END;\n }\n else {\n event.type = EventType.TOUCH_CANCEL;\n }\n event.touch = touch;\n event.bubbles = true;\n node.dispatchEvent(event);\n};\nvar _touchCancelHandler = function (touch, event) {\n var pos = touch.getLocation();\n var node = this.owner;\n\n event.type = EventType.TOUCH_CANCEL;\n event.touch = touch;\n event.bubbles = true;\n node.dispatchEvent(event);\n};\n\nvar _mouseDownHandler = function (event) {\n var pos = event.getLocation();\n var node = this.owner;\n\n if (node._hitTest(pos, this)) {\n event.type = EventType.MOUSE_DOWN;\n event.bubbles = true;\n node.dispatchEvent(event);\n }\n};\nvar _mouseMoveHandler = function (event) {\n var pos = event.getLocation();\n var node = this.owner;\n var hit = node._hitTest(pos, this);\n if (hit) {\n if (!this._previousIn) {\n // Fix issue when hover node switched, previous hovered node won't get MOUSE_LEAVE notification\n if (_currentHovered && _currentHovered._mouseListener) {\n event.type = EventType.MOUSE_LEAVE;\n _currentHovered.dispatchEvent(event);\n _currentHovered._mouseListener._previousIn = false;\n }\n _currentHovered = this.owner;\n event.type = EventType.MOUSE_ENTER;\n node.dispatchEvent(event);\n this._previousIn = true;\n }\n event.type = EventType.MOUSE_MOVE;\n event.bubbles = true;\n node.dispatchEvent(event);\n }\n else if (this._previousIn) {\n event.type = EventType.MOUSE_LEAVE;\n node.dispatchEvent(event);\n this._previousIn = false;\n _currentHovered = null;\n }\n else {\n // continue dispatching\n return;\n }\n\n // Event processed, cleanup\n event.stopPropagation();\n};\nvar _mouseUpHandler = function (event) {\n var pos = event.getLocation();\n var node = this.owner;\n\n if (node._hitTest(pos, this)) {\n event.type = EventType.MOUSE_UP;\n event.bubbles = true;\n node.dispatchEvent(event);\n event.stopPropagation();\n }\n};\nvar _mouseWheelHandler = function (event) {\n var pos = event.getLocation();\n var node = this.owner;\n\n if (node._hitTest(pos, this)) {\n event.type = EventType.MOUSE_WHEEL;\n event.bubbles = true;\n node.dispatchEvent(event);\n event.stopPropagation();\n }\n};\n\nfunction _searchComponentsInParent (node, comp) {\n if (comp) {\n let index = 0;\n let list = null;\n for (var curr = node; curr && cc.Node.isNode(curr); curr = curr._parent, ++index) {\n if (curr.getComponent(comp)) {\n let next = {\n index: index,\n node: curr,\n };\n\n if (list) {\n list.push(next);\n } else {\n list = [next];\n }\n }\n }\n\n return list;\n }\n\n return null;\n}\n\nfunction _checkListeners (node, events) {\n if (!(node._objFlags & Destroying)) {\n if (node._bubblingListeners) {\n for (let i = 0, l = events.length; i < l; ++i) {\n if (node._bubblingListeners.hasEventListener(events[i])) {\n return true;\n }\n }\n }\n if (node._capturingListeners) {\n for (let i = 0, l = events.length; i < l; ++i) {\n if (node._capturingListeners.hasEventListener(events[i])) {\n return true;\n }\n }\n }\n return false;\n }\n return true;\n}\n\nfunction _doDispatchEvent (owner, event, cachedArray) {\n var target, i;\n event.target = owner;\n\n // Event.CAPTURING_PHASE\n cachedArray.length = 0;\n owner._getCapturingTargets(event.type, cachedArray);\n // capturing\n event.eventPhase = 1;\n for (i = cachedArray.length - 1; i >= 0; --i) {\n target = cachedArray[i];\n if (target._capturingListeners) {\n event.currentTarget = target;\n // fire event\n target._capturingListeners.emit(event.type, event, cachedArray);\n // check if propagation stopped\n if (event._propagationStopped) {\n cachedArray.length = 0;\n return;\n }\n }\n }\n cachedArray.length = 0;\n\n // Event.AT_TARGET\n // checks if destroyed in capturing callbacks\n event.eventPhase = 2;\n event.currentTarget = owner;\n if (owner._capturingListeners) {\n owner._capturingListeners.emit(event.type, event);\n }\n if (!event._propagationImmediateStopped && owner._bubblingListeners) {\n owner._bubblingListeners.emit(event.type, event);\n }\n\n if (!event._propagationStopped && event.bubbles) {\n // Event.BUBBLING_PHASE\n owner._getBubblingTargets(event.type, cachedArray);\n // propagate\n event.eventPhase = 3;\n for (i = 0; i < cachedArray.length; ++i) {\n target = cachedArray[i];\n if (target._bubblingListeners) {\n event.currentTarget = target;\n // fire event\n target._bubblingListeners.emit(event.type, event);\n // check if propagation stopped\n if (event._propagationStopped) {\n cachedArray.length = 0;\n return;\n }\n }\n }\n }\n cachedArray.length = 0;\n}\n\n// traversal the node tree, child cullingMask must keep the same with the parent.\nfunction _getActualGroupIndex (node) {\n let groupIndex = node.groupIndex;\n if (groupIndex === 0 && node.parent) {\n groupIndex = _getActualGroupIndex(node.parent);\n }\n return groupIndex;\n}\n\nfunction _updateCullingMask (node) {\n let index = _getActualGroupIndex(node);\n node._cullingMask = 1 << index;\n if (CC_JSB && CC_NATIVERENDERER) {\n node._proxy && node._proxy.updateCullingMask();\n }\n for (let i = 0; i < node._children.length; i++) {\n _updateCullingMask(node._children[i]);\n }\n}\n\n// 2D/3D matrix functions\nfunction updateLocalMatrix3D () {\n if (this._localMatDirty & LocalDirtyFlag.TRSS) {\n // Update transform\n let t = this._matrix;\n let tm = t.m;\n Trs.toMat4(t, this._trs);\n\n // skew\n if (this._skewX || this._skewY) {\n let a = tm[0], b = tm[1], c = tm[4], d = tm[5];\n let skx = Math.tan(this._skewX * ONE_DEGREE);\n let sky = Math.tan(this._skewY * ONE_DEGREE);\n if (skx === Infinity)\n skx = 99999999;\n if (sky === Infinity)\n sky = 99999999;\n tm[0] = a + c * sky;\n tm[1] = b + d * sky;\n tm[4] = c + a * skx;\n tm[5] = d + b * skx;\n }\n this._localMatDirty &= ~LocalDirtyFlag.TRSS;\n // Register dirty status of world matrix so that it can be recalculated\n this._worldMatDirty = true;\n }\n}\n\nfunction updateLocalMatrix2D () {\n let dirtyFlag = this._localMatDirty;\n if (!(dirtyFlag & LocalDirtyFlag.TRSS)) return;\n\n // Update transform\n let t = this._matrix;\n let tm = t.m;\n let trs = this._trs;\n\n if (dirtyFlag & (LocalDirtyFlag.RS | LocalDirtyFlag.SKEW)) {\n let rotation = -this._eulerAngles.z;\n let hasSkew = this._skewX || this._skewY;\n let sx = trs[7], sy = trs[8];\n\n if (rotation || hasSkew) {\n let a = 1, b = 0, c = 0, d = 1;\n // rotation\n if (rotation) {\n let rotationRadians = rotation * ONE_DEGREE;\n c = Math.sin(rotationRadians);\n d = Math.cos(rotationRadians);\n a = d;\n b = -c;\n }\n // scale\n tm[0] = a *= sx;\n tm[1] = b *= sx;\n tm[4] = c *= sy;\n tm[5] = d *= sy;\n // skew\n if (hasSkew) {\n let a = tm[0], b = tm[1], c = tm[4], d = tm[5];\n let skx = Math.tan(this._skewX * ONE_DEGREE);\n let sky = Math.tan(this._skewY * ONE_DEGREE);\n if (skx === Infinity)\n skx = 99999999;\n if (sky === Infinity)\n sky = 99999999;\n tm[0] = a + c * sky;\n tm[1] = b + d * sky;\n tm[4] = c + a * skx;\n tm[5] = d + b * skx;\n }\n }\n else {\n tm[0] = sx;\n tm[1] = 0;\n tm[4] = 0;\n tm[5] = sy;\n }\n }\n\n // position\n tm[12] = trs[0];\n tm[13] = trs[1];\n\n this._localMatDirty &= ~LocalDirtyFlag.TRSS;\n // Register dirty status of world matrix so that it can be recalculated\n this._worldMatDirty = true;\n}\n\nfunction calculWorldMatrix3D () {\n // Avoid as much function call as possible\n if (this._localMatDirty & LocalDirtyFlag.TRSS) {\n this._updateLocalMatrix();\n }\n\n if (this._parent) {\n let parentMat = this._parent._worldMatrix;\n Mat4.mul(this._worldMatrix, parentMat, this._matrix);\n }\n else {\n Mat4.copy(this._worldMatrix, this._matrix);\n }\n this._worldMatDirty = false;\n}\n\nfunction calculWorldMatrix2D () {\n // Avoid as much function call as possible\n if (this._localMatDirty & LocalDirtyFlag.TRSS) {\n this._updateLocalMatrix();\n }\n\n // Assume parent world matrix is correct\n let parent = this._parent;\n if (parent) {\n this._mulMat(this._worldMatrix, parent._worldMatrix, this._matrix);\n }\n else {\n Mat4.copy(this._worldMatrix, this._matrix);\n }\n this._worldMatDirty = false;\n}\n\nfunction mulMat2D (out, a, b) {\n let am = a.m, bm = b.m, outm = out.m;\n let aa=am[0], ab=am[1], ac=am[4], ad=am[5], atx=am[12], aty=am[13];\n let ba=bm[0], bb=bm[1], bc=bm[4], bd=bm[5], btx=bm[12], bty=bm[13];\n if (ab !== 0 || ac !== 0) {\n outm[0] = ba * aa + bb * ac;\n outm[1] = ba * ab + bb * ad;\n outm[4] = bc * aa + bd * ac;\n outm[5] = bc * ab + bd * ad;\n outm[12] = aa * btx + ac * bty + atx;\n outm[13] = ab * btx + ad * bty + aty;\n }\n else {\n outm[0] = ba * aa;\n outm[1] = bb * ad;\n outm[4] = bc * aa;\n outm[5] = bd * ad;\n outm[12] = aa * btx + atx;\n outm[13] = ad * bty + aty;\n }\n}\n\nconst mulMat3D = Mat4.mul;\n\n/**\n * !#en\n * Class of all entities in Cocos Creator scenes.<br/>\n * For events supported by Node, please refer to {{#crossLink \"Node.EventType\"}}{{/crossLink}}\n * !#zh\n * Cocos Creator 场景中的所有节点类。<br/>\n * 支持的节点事件,请参阅 {{#crossLink \"Node.EventType\"}}{{/crossLink}}。\n * @class Node\n * @extends _BaseNode\n */\nlet NodeDefines = {\n name: 'cc.Node',\n extends: BaseNode,\n\n properties: {\n // SERIALIZABLE\n _opacity: 255,\n _color: cc.Color.WHITE,\n _contentSize: cc.Size,\n _anchorPoint: cc.v2(0.5, 0.5),\n _position: undefined,\n _scale: undefined,\n _trs: null,\n _eulerAngles: cc.Vec3,\n _skewX: 0.0,\n _skewY: 0.0,\n _zIndex: {\n default: undefined,\n type: cc.Integer\n },\n _localZOrder: {\n default: 0,\n serializable: false\n },\n\n _is3DNode: false,\n\n // internal properties\n /**\n * !#en\n * Group index of node.<br/>\n * Which Group this node belongs to will resolve that this node's collision components can collide with which other collision componentns.<br/>\n * !#zh\n * 节点的分组索引。<br/>\n * 节点的分组将关系到节点的碰撞组件可以与哪些碰撞组件相碰撞。<br/>\n * @property groupIndex\n * @type {Integer}\n * @default 0\n */\n _groupIndex: {\n default: 0,\n formerlySerializedAs: 'groupIndex'\n },\n groupIndex: {\n get () {\n return this._groupIndex;\n },\n set (value) {\n this._groupIndex = value;\n _updateCullingMask(this);\n this.emit(EventType.GROUP_CHANGED, this);\n }\n },\n\n /**\n * !#en\n * Group of node.<br/>\n * Which Group this node belongs to will resolve that this node's collision components can collide with which other collision componentns.<br/>\n * !#zh\n * 节点的分组。<br/>\n * 节点的分组将关系到节点的碰撞组件可以与哪些碰撞组件相碰撞。<br/>\n * @property group\n * @type {String}\n */\n group: {\n get () {\n return cc.game.groupList[this.groupIndex] || '';\n },\n\n set (value) {\n // update the groupIndex\n this.groupIndex = cc.game.groupList.indexOf(value);\n }\n },\n\n //properties moved from base node begin\n\n /**\n * !#en The position (x, y) of the node in its parent's coordinates.\n * !#zh 节点在父节点坐标系中的位置x, y。\n * @property {Vec3} position\n * @example\n * cc.log(\"Node Position: \" + node.position);\n */\n\n /**\n * !#en x axis position of node.\n * !#zh 节点 X 轴坐标。\n * @property x\n * @type {Number}\n * @example\n * node.x = 100;\n * cc.log(\"Node Position X: \" + node.x);\n */\n x: {\n get () {\n return this._trs[0];\n },\n set (value) {\n let trs = this._trs;\n if (value !== trs[0]) {\n if (!CC_EDITOR || isFinite(value)) {\n let oldValue;\n if (CC_EDITOR) {\n oldValue = trs[0];\n }\n\n trs[0] = value;\n this.setLocalDirty(LocalDirtyFlag.ALL_POSITION);\n\n // fast check event\n if (this._eventMask & POSITION_ON) {\n // send event\n if (CC_EDITOR) {\n this.emit(EventType.POSITION_CHANGED, new cc.Vec3(oldValue, trs[1], trs[2]));\n }\n else {\n this.emit(EventType.POSITION_CHANGED);\n }\n }\n }\n else {\n cc.error(ERR_INVALID_NUMBER, 'new x');\n }\n }\n },\n },\n\n /**\n * !#en y axis position of node.\n * !#zh 节点 Y 轴坐标。\n * @property y\n * @type {Number}\n * @example\n * node.y = 100;\n * cc.log(\"Node Position Y: \" + node.y);\n */\n y: {\n get () {\n return this._trs[1];\n },\n set (value) {\n let trs = this._trs;\n if (value !== trs[1]) {\n if (!CC_EDITOR || isFinite(value)) {\n let oldValue;\n if (CC_EDITOR) {\n oldValue = trs[1];\n }\n\n trs[1] = value;\n this.setLocalDirty(LocalDirtyFlag.ALL_POSITION);\n\n // fast check event\n if (this._eventMask & POSITION_ON) {\n // send event\n if (CC_EDITOR) {\n this.emit(EventType.POSITION_CHANGED, new cc.Vec3(trs[0], oldValue, trs[2]));\n }\n else {\n this.emit(EventType.POSITION_CHANGED);\n }\n }\n }\n else {\n cc.error(ERR_INVALID_NUMBER, 'new y');\n }\n }\n },\n },\n\n /**\n * !#en z axis position of node.\n * !#zh 节点 Z 轴坐标。\n * @property z\n * @type {Number}\n */\n z: {\n get () {\n return this._trs[2];\n },\n set (value) {\n let trs = this._trs;\n if (value !== trs[2]) {\n if (!CC_EDITOR || isFinite(value)) {\n let oldValue;\n if (CC_EDITOR) {\n oldValue = trs[2];\n }\n trs[2] = value;\n this.setLocalDirty(LocalDirtyFlag.ALL_POSITION);\n !CC_NATIVERENDERER && (this._renderFlag |= RenderFlow.FLAG_WORLD_TRANSFORM);\n // fast check event\n if (this._eventMask & POSITION_ON) {\n if (CC_EDITOR) {\n this.emit(EventType.POSITION_CHANGED, new cc.Vec3(trs[0], trs[1], oldValue));\n }\n else {\n this.emit(EventType.POSITION_CHANGED);\n }\n }\n }\n else {\n cc.error(ERR_INVALID_NUMBER, 'new z');\n }\n }\n }\n },\n\n /**\n * !#en Rotation of node.\n * !#zh 该节点旋转角度。\n * @property rotation\n * @type {Number}\n * @deprecated since v2.1\n * @example\n * node.rotation = 90;\n * cc.log(\"Node Rotation: \" + node.rotation);\n */\n rotation: {\n get () {\n if (CC_DEBUG) {\n cc.warn(\"`cc.Node.rotation` is deprecated since v2.1.0, please use `-angle` instead. (`this.node.rotation` -> `-this.node.angle`)\");\n }\n return -this.angle;\n },\n set (value) {\n if (CC_DEBUG) {\n cc.warn(\"`cc.Node.rotation` is deprecated since v2.1.0, please set `-angle` instead. (`this.node.rotation = x` -> `this.node.angle = -x`)\");\n }\n this.angle = -value;\n }\n },\n\n /**\n * !#en\n * Angle of node, the positive value is anti-clockwise direction.\n * !#zh\n * 该节点的旋转角度,正值为逆时针方向。\n * @property angle\n * @type {Number}\n */\n angle: {\n get () {\n return this._eulerAngles.z;\n },\n set (value) {\n Vec3.set(this._eulerAngles, 0, 0, value);\n Trs.fromAngleZ(this._trs, value);\n this.setLocalDirty(LocalDirtyFlag.ALL_ROTATION);\n\n if (this._eventMask & ROTATION_ON) {\n this.emit(EventType.ROTATION_CHANGED);\n }\n }\n },\n\n /**\n * !#en The rotation as Euler angles in degrees, used in 3D node.\n * !#zh 该节点的欧拉角度,用于 3D 节点。\n * @property eulerAngles\n * @type {Vec3}\n * @example\n * node.is3DNode = true;\n * node.eulerAngles = cc.v3(45, 45, 45);\n * cc.log(\"Node eulerAngles (X, Y, Z): \" + node.eulerAngles.toString());\n */\n\n /**\n * !#en Rotation on x axis.\n * !#zh 该节点 X 轴旋转角度。\n * @property rotationX\n * @type {Number}\n * @deprecated since v2.1\n * @example\n * node.is3DNode = true;\n * node.eulerAngles = cc.v3(45, 0, 0);\n * cc.log(\"Node eulerAngles X: \" + node.eulerAngles.x);\n */\n rotationX: {\n get () {\n if (CC_DEBUG) {\n cc.warn(\"`cc.Node.rotationX` is deprecated since v2.1.0, please use `eulerAngles.x` instead. (`this.node.rotationX` -> `this.node.eulerAngles.x`)\");\n }\n return this._eulerAngles.x;\n },\n set (value) {\n if (CC_DEBUG) {\n cc.warn(\"`cc.Node.rotationX` is deprecated since v2.1.0, please set `eulerAngles` instead. (`this.node.rotationX = x` -> `this.node.is3DNode = true; this.node.eulerAngles = cc.v3(x, 0, 0)`\");\n }\n if (this._eulerAngles.x !== value) {\n this._eulerAngles.x = value;\n // Update quaternion from rotation\n if (this._eulerAngles.x === this._eulerAngles.y) {\n Trs.fromAngleZ(this._trs, -value);\n }\n else {\n Trs.fromEulerNumber(this._trs, value, this._eulerAngles.y, 0);\n }\n this.setLocalDirty(LocalDirtyFlag.ALL_ROTATION);\n\n if (this._eventMask & ROTATION_ON) {\n this.emit(EventType.ROTATION_CHANGED);\n }\n }\n },\n },\n\n /**\n * !#en Rotation on y axis.\n * !#zh 该节点 Y 轴旋转角度。\n * @property rotationY\n * @type {Number}\n * @deprecated since v2.1\n * @example\n * node.is3DNode = true;\n * node.eulerAngles = cc.v3(0, 45, 0);\n * cc.log(\"Node eulerAngles Y: \" + node.eulerAngles.y);\n */\n rotationY: {\n get () {\n if (CC_DEBUG) {\n cc.warn(\"`cc.Node.rotationY` is deprecated since v2.1.0, please use `eulerAngles.y` instead. (`this.node.rotationY` -> `this.node.eulerAngles.y`)\");\n }\n return this._eulerAngles.y;\n },\n set (value) {\n if (CC_DEBUG) {\n cc.warn(\"`cc.Node.rotationY` is deprecated since v2.1.0, please set `eulerAngles` instead. (`this.node.rotationY = y` -> `this.node.is3DNode = true; this.node.eulerAngles = cc.v3(0, y, 0)`\");\n }\n if (this._eulerAngles.y !== value) {\n this._eulerAngles.y = value;\n // Update quaternion from rotation\n if (this._eulerAngles.x === this._eulerAngles.y) {\n Trs.fromAngleZ(this._trs, -value);\n }\n else {\n Trs.fromEulerNumber(this._trs, this._eulerAngles.x, value, 0);\n }\n this.setLocalDirty(LocalDirtyFlag.ALL_ROTATION);\n\n if (this._eventMask & ROTATION_ON) {\n this.emit(EventType.ROTATION_CHANGED);\n }\n }\n },\n },\n\n eulerAngles: {\n get () {\n if (CC_EDITOR) {\n return this._eulerAngles;\n }\n else {\n return Trs.toEuler(this._eulerAngles, this._trs);\n }\n }, set (v) {\n if (CC_EDITOR) {\n this._eulerAngles.set(v);\n }\n\n Trs.fromEuler(this._trs, v);\n this.setLocalDirty(LocalDirtyFlag.ALL_ROTATION);\n !CC_NATIVERENDERER && (this._renderFlag |= RenderFlow.FLAG_TRANSFORM);\n\n if (this._eventMask & ROTATION_ON) {\n this.emit(EventType.ROTATION_CHANGED);\n }\n }\n },\n\n // This property is used for Mesh Skeleton Animation\n // Should be removed when node.rotation upgrade to quaternion value\n quat: {\n get () {\n let trs = this._trs;\n return new Quat(trs[3], trs[4], trs[5], trs[6]);\n }, set (v) {\n this.setRotation(v);\n }\n },\n\n /**\n * !#en The local scale relative to the parent.\n * !#zh 节点相对父节点的缩放。\n * @property scale\n * @type {Number}\n * @example\n * node.scale = 1;\n */\n scale: {\n get () {\n return this._trs[7];\n },\n set (v) {\n this.setScale(v);\n }\n },\n\n /**\n * !#en Scale on x axis.\n * !#zh 节点 X 轴缩放。\n * @property scaleX\n * @type {Number}\n * @example\n * node.scaleX = 0.5;\n * cc.log(\"Node Scale X: \" + node.scaleX);\n */\n scaleX: {\n get () {\n return this._trs[7];\n },\n set (value) {\n if (this._trs[7] !== value) {\n this._trs[7] = value;\n this.setLocalDirty(LocalDirtyFlag.ALL_SCALE);\n\n if (this._eventMask & SCALE_ON) {\n this.emit(EventType.SCALE_CHANGED);\n }\n }\n },\n },\n\n /**\n * !#en Scale on y axis.\n * !#zh 节点 Y 轴缩放。\n * @property scaleY\n * @type {Number}\n * @example\n * node.scaleY = 0.5;\n * cc.log(\"Node Scale Y: \" + node.scaleY);\n */\n scaleY: {\n get () {\n return this._trs[8];\n },\n set (value) {\n if (this._trs[8] !== value) {\n this._trs[8] = value;\n this.setLocalDirty(LocalDirtyFlag.ALL_SCALE);\n\n if (this._eventMask & SCALE_ON) {\n this.emit(EventType.SCALE_CHANGED);\n }\n }\n },\n },\n\n /**\n * !#en Scale on z axis.\n * !#zh 节点 Z 轴缩放。\n * @property scaleZ\n * @type {Number}\n */\n scaleZ: {\n get () {\n return this._trs[9];\n },\n set (value) {\n if (this._trs[9] !== value) {\n this._trs[9] = value;\n this.setLocalDirty(LocalDirtyFlag.ALL_SCALE);\n !CC_NATIVERENDERER && (this._renderFlag |= RenderFlow.FLAG_TRANSFORM);\n\n if (this._eventMask & SCALE_ON) {\n this.emit(EventType.SCALE_CHANGED);\n }\n }\n }\n },\n\n /**\n * !#en Skew x\n * !#zh 该节点 X 轴倾斜角度。\n * @property skewX\n * @type {Number}\n * @example\n * node.skewX = 0;\n * cc.log(\"Node SkewX: \" + node.skewX);\n * @deprecated since v2.2.1\n */\n skewX: {\n get () {\n return this._skewX;\n },\n set (value) {\n _skewWarn(value, this);\n\n this._skewX = value;\n this.setLocalDirty(LocalDirtyFlag.SKEW);\n if (CC_JSB && CC_NATIVERENDERER) {\n this._proxy.updateSkew();\n }\n }\n },\n\n /**\n * !#en Skew y\n * !#zh 该节点 Y 轴倾斜角度。\n * @property skewY\n * @type {Number}\n * @example\n * node.skewY = 0;\n * cc.log(\"Node SkewY: \" + node.skewY);\n * @deprecated since v2.2.1\n */\n skewY: {\n get () {\n return this._skewY;\n },\n set (value) {\n _skewWarn(value, this);\n\n this._skewY = value;\n this.setLocalDirty(LocalDirtyFlag.SKEW);\n if (CC_JSB && CC_NATIVERENDERER) {\n this._proxy.updateSkew();\n }\n }\n },\n\n /**\n * !#en Opacity of node, default value is 255.\n * !#zh 节点透明度,默认值为 255。\n * @property opacity\n * @type {Number}\n * @example\n * node.opacity = 255;\n */\n opacity: {\n get () {\n return this._opacity;\n },\n set (value) {\n value = cc.misc.clampf(value, 0, 255);\n if (this._opacity !== value) {\n this._opacity = value;\n if (CC_JSB && CC_NATIVERENDERER) {\n this._proxy.updateOpacity();\n }\n this._renderFlag |= RenderFlow.FLAG_OPACITY_COLOR;\n }\n },\n range: [0, 255]\n },\n\n /**\n * !#en Color of node, default value is white: (255, 255, 255).\n * !#zh 节点颜色。默认为白色数值为255255255。\n * @property color\n * @type {Color}\n * @example\n * node.color = new cc.Color(255, 255, 255);\n */\n color: {\n get () {\n return this._color.clone()\n },\n set (value) {\n if (!this._color.equals(value)) {\n this._color.set(value);\n if (CC_DEV && value.a !== 255) {\n cc.warnID(1626);\n }\n\n this._renderFlag |= RenderFlow.FLAG_COLOR;\n\n if (this._eventMask & COLOR_ON) {\n this.emit(EventType.COLOR_CHANGED, value);\n }\n }\n },\n },\n\n /**\n * !#en Anchor point's position on x axis.\n * !#zh 节点 X 轴锚点位置。\n * @property anchorX\n * @type {Number}\n * @example\n * node.anchorX = 0;\n */\n anchorX: {\n get () {\n return this._anchorPoint.x;\n },\n set (value) {\n var anchorPoint = this._anchorPoint;\n if (anchorPoint.x !== value) {\n anchorPoint.x = value;\n if (this._eventMask & ANCHOR_ON) {\n this.emit(EventType.ANCHOR_CHANGED);\n }\n }\n },\n },\n\n /**\n * !#en Anchor point's position on y axis.\n * !#zh 节点 Y 轴锚点位置。\n * @property anchorY\n * @type {Number}\n * @example\n * node.anchorY = 0;\n */\n anchorY: {\n get () {\n return this._anchorPoint.y;\n },\n set (value) {\n var anchorPoint = this._anchorPoint;\n if (anchorPoint.y !== value) {\n anchorPoint.y = value;\n if (this._eventMask & ANCHOR_ON) {\n this.emit(EventType.ANCHOR_CHANGED);\n }\n }\n },\n },\n\n /**\n * !#en Width of node.\n * !#zh 节点宽度。\n * @property width\n * @type {Number}\n * @example\n * node.width = 100;\n */\n width: {\n get () {\n return this._contentSize.width;\n },\n set (value) {\n if (value !== this._contentSize.width) {\n if (CC_EDITOR) {\n var clone = cc.size(this._contentSize.width, this._contentSize.height);\n }\n this._contentSize.width = value;\n if (this._eventMask & SIZE_ON) {\n if (CC_EDITOR) {\n this.emit(EventType.SIZE_CHANGED, clone);\n }\n else {\n this.emit(EventType.SIZE_CHANGED);\n }\n }\n }\n },\n },\n\n /**\n * !#en Height of node.\n * !#zh 节点高度。\n * @property height\n * @type {Number}\n * @example\n * node.height = 100;\n */\n height: {\n get () {\n return this._contentSize.height;\n },\n set (value) {\n if (value !== this._contentSize.height) {\n if (CC_EDITOR) {\n var clone = cc.size(this._contentSize.width, this._contentSize.height);\n }\n this._contentSize.height = value;\n if (this._eventMask & SIZE_ON) {\n if (CC_EDITOR) {\n this.emit(EventType.SIZE_CHANGED, clone);\n }\n else {\n this.emit(EventType.SIZE_CHANGED);\n }\n }\n }\n },\n },\n\n /**\n * !#en zIndex is the 'key' used to sort the node relative to its siblings.<br/>\n * The value of zIndex should be in the range between cc.macro.MIN_ZINDEX and cc.macro.MAX_ZINDEX.<br/>\n * The Node's parent will sort all its children based on the zIndex value and the arrival order.<br/>\n * Nodes with greater zIndex will be sorted after nodes with smaller zIndex.<br/>\n * If two nodes have the same zIndex, then the node that was added first to the children's array will be in front of the other node in the array.<br/>\n * Node's order in children list will affect its rendering order. Parent is always rendering before all children.\n * !#zh zIndex 是用来对节点进行排序的关键属性,它决定一个节点在兄弟节点之间的位置。<br/>\n * zIndex 的取值应该介于 cc.macro.MIN_ZINDEX 和 cc.macro.MAX_ZINDEX 之间\n * 父节点主要根据节点的 zIndex 和添加次序来排序,拥有更高 zIndex 的节点将被排在后面,如果两个节点的 zIndex 一致,先添加的节点会稳定排在另一个节点之前。<br/>\n * 节点在 children 中的顺序决定了其渲染顺序。父节点永远在所有子节点之前被渲染\n * @property zIndex\n * @type {Number}\n * @example\n * node.zIndex = 1;\n * cc.log(\"Node zIndex: \" + node.zIndex);\n */\n zIndex: {\n get () {\n return this._localZOrder >> 16;\n },\n set (value) {\n if (value > macro.MAX_ZINDEX) {\n cc.warnID(1636);\n value = macro.MAX_ZINDEX;\n }\n else if (value < macro.MIN_ZINDEX) {\n cc.warnID(1637);\n value = macro.MIN_ZINDEX;\n }\n\n if (this.zIndex !== value) {\n this._localZOrder = (this._localZOrder & 0x0000ffff) | (value << 16);\n this.emit(EventType.SIBLING_ORDER_CHANGED);\n\n this._onSiblingIndexChanged();\n }\n }\n },\n\n /**\n * !#en\n * Switch 2D/3D node. The 2D nodes will run faster.\n * !#zh\n * 切换 2D/3D 节点2D 节点会有更高的运行效率\n * @property {Boolean} is3DNode\n * @default false\n */\n is3DNode: {\n get () {\n return this._is3DNode;\n }, set (v) {\n if (this._is3DNode === v) {\n return;\n }\n this._is3DNode = v;\n this._update3DFunction();\n }\n },\n\n /**\n * !#en Returns a normalized vector representing the up direction (Y axis) of the node in world space.\n * !#zh 获取节点正上方y 轴)面对的方向,返回值为世界坐标系下的归一化向量\n *\n * @property up\n * @type {Vec3}\n */\n up: {\n get () {\n var _up = Vec3.transformQuat(_urfVec3, Vec3.UP, this.getWorldRotation(_urfQuat));\n return _up.clone();\n }\n },\n\n /**\n * !#en Returns a normalized vector representing the right direction (X axis) of the node in world space.\n * !#zh 获取节点正右方x 轴)面对的方向,返回值为世界坐标系下的归一化向量\n *\n * @property right\n * @type {Vec3}\n */\n right: {\n get () {\n var _right = Vec3.transformQuat(_urfVec3, Vec3.RIGHT, this.getWorldRotation(_urfQuat));\n return _right.clone();\n }\n },\n\n /**\n * !#en Returns a normalized vector representing the forward direction (Z axis) of the node in world space.\n * !#zh 获取节点正前方z 轴)面对的方向,返回值为世界坐标系下的归一化向量\n *\n * @property forward\n * @type {Vec3}\n */\n forward: {\n get () {\n var _forward = Vec3.transformQuat(_urfVec3, Vec3.FORWARD, this.getWorldRotation(_urfQuat));\n return _forward.clone();\n }\n },\n },\n\n /**\n * @method constructor\n * @param {String} [name]\n */\n ctor () {\n this._reorderChildDirty = false;\n\n // cache component\n this._widget = null;\n // fast render component access\n this._renderComponent = null;\n // Event listeners\n this._capturingListeners = null;\n this._bubblingListeners = null;\n // Touch event listener\n this._touchListener = null;\n // Mouse event listener\n this._mouseListener = null;\n\n this._initDataFromPool();\n\n this._eventMask = 0;\n this._cullingMask = 1;\n this._childArrivalOrder = 1;\n\n // Proxy\n if (CC_JSB && CC_NATIVERENDERER) {\n this._proxy = new renderer.NodeProxy(this._spaceInfo.unitID, this._spaceInfo.index, this._id, this._name);\n this._proxy.init(this);\n }\n // should reset _renderFlag for both web and native\n this._renderFlag = RenderFlow.FLAG_TRANSFORM | RenderFlow.FLAG_OPACITY_COLOR;\n },\n\n statics: {\n EventType,\n _LocalDirtyFlag: LocalDirtyFlag,\n // is node but not scene\n isNode (obj) {\n return obj instanceof Node && (obj.constructor === Node || !(obj instanceof cc.Scene));\n },\n BuiltinGroupIndex\n },\n\n // OVERRIDES\n\n _onSiblingIndexChanged () {\n // update rendering scene graph, sort them by arrivalOrder\n if (this._parent) {\n this._parent._delaySort();\n }\n },\n\n _onPreDestroy () {\n var destroyByParent = this._onPreDestroyBase();\n\n // Actions\n if (ActionManagerExist) {\n cc.director.getActionManager().removeAllActionsFromTarget(this);\n }\n\n // Remove Node.currentHovered\n if (_currentHovered === this) {\n _currentHovered = null;\n }\n\n this._bubblingListeners && this._bubblingListeners.clear();\n this._capturingListeners && this._capturingListeners.clear();\n\n // Remove all event listeners if necessary\n if (this._touchListener || this._mouseListener) {\n eventManager.removeListeners(this);\n if (this._touchListener) {\n this._touchListener.owner = null;\n this._touchListener.mask = null;\n this._touchListener = null;\n }\n if (this._mouseListener) {\n this._mouseListener.owner = null;\n this._mouseListener.mask = null;\n this._mouseListener = null;\n }\n }\n\n if (CC_JSB && CC_NATIVERENDERER) {\n this._proxy.destroy();\n this._proxy = null;\n }\n\n this._backDataIntoPool();\n\n if (this._reorderChildDirty) {\n cc.director.__fastOff(cc.Director.EVENT_AFTER_UPDATE, this.sortAllChildren, this);\n }\n\n if (!destroyByParent) {\n // simulate some destruct logic to make undo system work correctly\n if (CC_EDITOR) {\n // ensure this node can reattach to scene by undo system\n this._parent = null;\n }\n }\n },\n\n _onPostActivated (active) {\n var actionManager = ActionManagerExist ? cc.director.getActionManager() : null;\n if (active) {\n // Refresh transform\n this._renderFlag |= RenderFlow.FLAG_WORLD_TRANSFORM;\n // ActionManager & EventManager\n actionManager && actionManager.resumeTarget(this);\n eventManager.resumeTarget(this);\n // Search Mask in parent\n this._checkListenerMask();\n } else {\n // deactivate\n actionManager && actionManager.pauseTarget(this);\n eventManager.pauseTarget(this);\n }\n },\n\n _onHierarchyChanged (oldParent) {\n this._updateOrderOfArrival();\n // Fixed a bug where children and parent node groups were forced to synchronize, instead of only synchronizing `_cullingMask` value\n _updateCullingMask(this);\n if (this._parent) {\n this._parent._delaySort();\n }\n this._renderFlag |= RenderFlow.FLAG_WORLD_TRANSFORM | RenderFlow.FLAG_OPACITY_COLOR;\n this._onHierarchyChangedBase(oldParent);\n if (cc._widgetManager) {\n cc._widgetManager._nodesOrderDirty = true;\n }\n\n if (oldParent && this._activeInHierarchy) {\n //TODO: It may be necessary to update the listener mask of all child nodes.\n this._checkListenerMask();\n }\n\n // Node proxy\n if (CC_JSB && CC_NATIVERENDERER) {\n this._proxy.updateParent();\n }\n },\n\n // INTERNAL\n\n _update3DFunction () {\n if (this._is3DNode) {\n this._updateLocalMatrix = updateLocalMatrix3D;\n this._calculWorldMatrix = calculWorldMatrix3D;\n this._mulMat = mulMat3D;\n }\n else {\n this._updateLocalMatrix = updateLocalMatrix2D;\n this._calculWorldMatrix = calculWorldMatrix2D;\n this._mulMat = mulMat2D;\n }\n if (this._renderComponent && this._renderComponent._on3DNodeChanged) {\n this._renderComponent._on3DNodeChanged();\n }\n this._renderFlag |= RenderFlow.FLAG_TRANSFORM;\n this._localMatDirty = LocalDirtyFlag.ALL;\n\n if (CC_JSB && CC_NATIVERENDERER) {\n this._proxy.update3DNode();\n }\n },\n\n _initDataFromPool () {\n if (!this._spaceInfo) {\n if (CC_EDITOR || CC_TEST) {\n this._spaceInfo = {\n trs: new Float64Array(10),\n localMat: new Float64Array(16),\n worldMat: new Float64Array(16),\n };\n } else {\n this._spaceInfo = nodeMemPool.pop();\n }\n }\n\n let spaceInfo = this._spaceInfo;\n this._matrix = cc.mat4(spaceInfo.localMat);\n Mat4.identity(this._matrix);\n this._worldMatrix = cc.mat4(spaceInfo.worldMat);\n Mat4.identity(this._worldMatrix);\n this._localMatDirty = LocalDirtyFlag.ALL;\n this._worldMatDirty = true;\n\n let trs = this._trs = spaceInfo.trs;\n trs[0] = 0; // position.x\n trs[1] = 0; // position.y\n trs[2] = 0; // position.z\n trs[3] = 0; // rotation.x\n trs[4] = 0; // rotation.y\n trs[5] = 0; // rotation.z\n trs[6] = 1; // rotation.w\n trs[7] = 1; // scale.x\n trs[8] = 1; // scale.y\n trs[9] = 1; // scale.z\n },\n\n _backDataIntoPool () {\n if (!(CC_EDITOR || CC_TEST)) {\n // push back to pool\n nodeMemPool.push(this._spaceInfo);\n this._matrix = null;\n this._worldMatrix = null;\n this._trs = null;\n this._spaceInfo = null;\n }\n },\n\n _toEuler () {\n if (this.is3DNode) {\n Trs.toEuler(this._eulerAngles, this._trs);\n }\n else {\n let z = Math.asin(this._trs[5]) / ONE_DEGREE * 2;\n Vec3.set(this._eulerAngles, 0, 0, z);\n }\n },\n\n _fromEuler () {\n if (this.is3DNode) {\n Trs.fromEuler(this._trs, this._eulerAngles);\n }\n else {\n Trs.fromAngleZ(this._trs, this._eulerAngles.z);\n }\n },\n\n _initProperties () {\n if (this._is3DNode) {\n this._update3DFunction();\n }\n\n let trs = this._trs;\n if (trs) {\n let desTrs = trs;\n trs = this._trs = this._spaceInfo.trs;\n // just adapt to old trs\n if (desTrs.length === 11) {\n trs.set(desTrs.subarray(1));\n } else {\n trs.set(desTrs);\n }\n } else {\n trs = this._trs = this._spaceInfo.trs;\n }\n\n if (CC_EDITOR) {\n if (this._skewX !== 0 || this._skewY !== 0) {\n var NodeUtils = Editor.require('scene://utils/node');\n cc.warn(\"`cc.Node.skewX/Y` is deprecated since v2.2.1, please use 3D node instead.\", `Node: ${NodeUtils.getNodePath(this)}.`);\n }\n }\n\n this._fromEuler();\n\n if (CC_JSB && CC_NATIVERENDERER) {\n this._renderFlag |= RenderFlow.FLAG_TRANSFORM | RenderFlow.FLAG_OPACITY_COLOR;\n }\n },\n\n /*\n * The initializer for Node which will be called before all components onLoad\n */\n _onBatchCreated (dontSyncChildPrefab) {\n this._initProperties();\n\n // Fixed a bug where children and parent node groups were forced to synchronize, instead of only synchronizing `_cullingMask` value\n this._cullingMask = 1 << _getActualGroupIndex(this);\n if (CC_JSB && CC_NATIVERENDERER) {\n this._proxy && this._proxy.updateCullingMask();\n }\n\n if (!this._activeInHierarchy) {\n if (CC_EDITOR ? cc.director.getActionManager() : ActionManagerExist) {\n // deactivate ActionManager and EventManager by default\n cc.director.getActionManager().pauseTarget(this);\n }\n eventManager.pauseTarget(this);\n }\n\n let children = this._children;\n for (let i = 0, len = children.length; i < len; i++) {\n let child = children[i];\n if (!dontSyncChildPrefab) {\n // sync child prefab\n let prefabInfo = child._prefab;\n if (prefabInfo && prefabInfo.sync && prefabInfo.root === child) {\n PrefabHelper.syncWithPrefab(child);\n }\n child._updateOrderOfArrival();\n }\n child._onBatchCreated(dontSyncChildPrefab);\n }\n\n if (children.length > 0) {\n this._renderFlag |= RenderFlow.FLAG_CHILDREN;\n }\n\n if (CC_JSB && CC_NATIVERENDERER) {\n this._proxy.initNative();\n }\n },\n\n // EVENT TARGET\n _checkListenerMask () {\n // Because Mask may be nested, need to find all the Mask components in the parent node.\n // The click area must satisfy all Masks to trigger the click.\n if (this._touchListener) {\n var mask = this._touchListener.mask = _searchComponentsInParent(this, cc.Mask);\n if (this._mouseListener) {\n this._mouseListener.mask = mask;\n }\n } else if (this._mouseListener) {\n this._mouseListener.mask = _searchComponentsInParent(this, cc.Mask);\n }\n },\n\n _checknSetupSysEvent (type) {\n let newAdded = false;\n let forDispatch = false;\n if (_touchEvents.indexOf(type) !== -1) {\n if (!this._touchListener) {\n this._touchListener = cc.EventListener.create({\n event: cc.EventListener.TOUCH_ONE_BY_ONE,\n swallowTouches: true,\n owner: this,\n mask: _searchComponentsInParent(this, cc.Mask),\n onTouchBegan: _touchStartHandler,\n onTouchMoved: _touchMoveHandler,\n onTouchEnded: _touchEndHandler,\n onTouchCancelled: _touchCancelHandler\n });\n eventManager.addListener(this._touchListener, this);\n newAdded = true;\n }\n forDispatch = true;\n }\n else if (_mouseEvents.indexOf(type) !== -1) {\n if (!this._mouseListener) {\n this._mouseListener = cc.EventListener.create({\n event: cc.EventListener.MOUSE,\n _previousIn: false,\n owner: this,\n mask: _searchComponentsInParent(this, cc.Mask),\n onMouseDown: _mouseDownHandler,\n onMouseMove: _mouseMoveHandler,\n onMouseUp: _mouseUpHandler,\n onMouseScroll: _mouseWheelHandler,\n });\n eventManager.addListener(this._mouseListener, this);\n newAdded = true;\n }\n forDispatch = true;\n }\n if (newAdded && !this._activeInHierarchy) {\n cc.director.getScheduler().schedule(function () {\n if (!this._activeInHierarchy) {\n eventManager.pauseTarget(this);\n }\n }, this, 0, 0, 0, false);\n }\n return forDispatch;\n },\n\n /**\n * !#en\n * Register a callback of a specific event type on Node.<br/>\n * Use this method to register touch or mouse event permit propagation based on scene graph,<br/>\n * These kinds of event are triggered with dispatchEvent, the dispatch process has three steps:<br/>\n * 1. Capturing phase: dispatch in capture targets (`_getCapturingTargets`), e.g. parents in node tree, from root to the real target<br/>\n * 2. At target phase: dispatch to the listeners of the real target<br/>\n * 3. Bubbling phase: dispatch in bubble targets (`_getBubblingTargets`), e.g. parents in node tree, from the real target to root<br/>\n * In any moment of the dispatching process, it can be stopped via `event.stopPropagation()` or `event.stopPropagationImmidiate()`.<br/>\n * It's the recommended way to register touch/mouse event for Node,<br/>\n * please do not use cc.eventManager directly for Node.<br/>\n * You can also register custom event and use `emit` to trigger custom event on Node.<br/>\n * For such events, there won't be capturing and bubbling phase, your event will be dispatched directly to its listeners registered on the same node.<br/>\n * You can also pass event callback parameters with `emit` by passing parameters after `type`.\n * !#zh\n * 在节点上注册指定类型的回调函数,也可以设置 target 用于绑定响应函数的 this 对象。<br/>\n * 鼠标或触摸事件会被系统调用 dispatchEvent 方法触发,触发的过程包含三个阶段:<br/>\n * 1. 捕获阶段:派发事件给捕获目标(通过 `_getCapturingTargets` 获取),比如,节点树中注册了捕获阶段的父节点,从根节点开始派发直到目标节点。<br/>\n * 2. 目标阶段:派发给目标节点的监听器。<br/>\n * 3. 冒泡阶段:派发事件给冒泡目标(通过 `_getBubblingTargets` 获取),比如,节点树中注册了冒泡阶段的父节点,从目标节点开始派发直到根节点。<br/>\n * 同时您可以将事件派发到父节点或者通过调用 stopPropagation 拦截它。<br/>\n * 推荐使用这种方式来监听节点上的触摸或鼠标事件,请不要在节点上直接使用 cc.eventManager。<br/>\n * 你也可以注册自定义事件到节点上,并通过 emit 方法触发此类事件,对于这类事件,不会发生捕获冒泡阶段,只会直接派发给注册在该节点上的监听器<br/>\n * 你可以通过在 emit 方法调用时在 type 之后传递额外的参数作为事件回调的参数列表\n * @method on\n * @param {String|Node.EventType} type - A string representing the event type to listen for.<br>See {{#crossLink \"Node/EventTyupe/POSITION_CHANGED\"}}Node Events{{/crossLink}} for all builtin events.\n * @param {Function} callback - The callback that will be invoked when the event is dispatched. The callback is ignored if it is a duplicate (the callbacks are unique).\n * @param {Event|any} [callback.event] event or first argument when emit\n * @param {any} [callback.arg2] arg2\n * @param {any} [callback.arg3] arg3\n * @param {any} [callback.arg4] arg4\n * @param {any} [callback.arg5] arg5\n * @param {Object} [target] - The target (this object) to invoke the callback, can be null\n * @param {Boolean} [useCapture=false] - When set to true, the listener will be triggered at capturing phase which is ahead of the final target emit, otherwise it will be triggered during bubbling phase.\n * @return {Function} - Just returns the incoming callback so you can save the anonymous function easier.\n * @typescript\n * on<T extends Function>(type: string, callback: T, target?: any, useCapture?: boolean): T\n * @example\n * this.node.on(cc.Node.EventType.TOUCH_START, this.memberFunction, this); // if \"this\" is component and the \"memberFunction\" declared in CCClass.\n * node.on(cc.Node.EventType.TOUCH_START, callback, this);\n * node.on(cc.Node.EventType.TOUCH_MOVE, callback, this);\n * node.on(cc.Node.EventType.TOUCH_END, callback, this);\n * node.on(cc.Node.EventType.TOUCH_CANCEL, callback, this);\n * node.on(cc.Node.EventType.ANCHOR_CHANGED, callback);\n * node.on(cc.Node.EventType.COLOR_CHANGED, callback);\n */\n on (type, callback, target, useCapture) {\n let forDispatch = this._checknSetupSysEvent(type);\n if (forDispatch) {\n return this._onDispatch(type, callback, target, useCapture);\n }\n else {\n switch (type) {\n case EventType.POSITION_CHANGED:\n this._eventMask |= POSITION_ON;\n break;\n case EventType.SCALE_CHANGED:\n this._eventMask |= SCALE_ON;\n break;\n case EventType.ROTATION_CHANGED:\n this._eventMask |= ROTATION_ON;\n break;\n case EventType.SIZE_CHANGED:\n this._eventMask |= SIZE_ON;\n break;\n case EventType.ANCHOR_CHANGED:\n this._eventMask |= ANCHOR_ON;\n break;\n case EventType.COLOR_CHANGED:\n this._eventMask |= COLOR_ON;\n break;\n }\n if (!this._bubblingListeners) {\n this._bubblingListeners = new EventTarget();\n }\n return this._bubblingListeners.on(type, callback, target);\n }\n },\n\n /**\n * !#en\n * Register an callback of a specific event type on the Node,\n * the callback will remove itself after the first time it is triggered.\n * !#zh\n * 注册节点的特定事件类型回调,回调会在第一时间被触发后删除自身。\n *\n * @method once\n * @param {String} type - A string representing the event type to listen for.\n * @param {Function} callback - The callback that will be invoked when the event is dispatched.\n * The callback is ignored if it is a duplicate (the callbacks are unique).\n * @param {Event|any} [callback.event] event or first argument when emit\n * @param {any} [callback.arg2] arg2\n * @param {any} [callback.arg3] arg3\n * @param {any} [callback.arg4] arg4\n * @param {any} [callback.arg5] arg5\n * @param {Object} [target] - The target (this object) to invoke the callback, can be null\n * @typescript\n * once<T extends Function>(type: string, callback: T, target?: any, useCapture?: boolean): T\n * @example\n * node.once(cc.Node.EventType.ANCHOR_CHANGED, callback);\n */\n once (type, callback, target, useCapture) {\n let forDispatch = this._checknSetupSysEvent(type);\n\n let listeners = null;\n if (forDispatch && useCapture) {\n listeners = this._capturingListeners = this._capturingListeners || new EventTarget();\n }\n else {\n listeners = this._bubblingListeners = this._bubblingListeners || new EventTarget();\n }\n\n listeners.once(type, callback, target);\n listeners.once(type, () => {\n this.off(type, callback, target);\n }, undefined);\n },\n\n _onDispatch (type, callback, target, useCapture) {\n // Accept also patameters like: (type, callback, useCapture)\n if (typeof target === 'boolean') {\n useCapture = target;\n target = undefined;\n }\n else useCapture = !!useCapture;\n if (!callback) {\n cc.errorID(6800);\n return;\n }\n\n var listeners = null;\n if (useCapture) {\n listeners = this._capturingListeners = this._capturingListeners || new EventTarget();\n }\n else {\n listeners = this._bubblingListeners = this._bubblingListeners || new EventTarget();\n }\n\n if ( !listeners.hasEventListener(type, callback, target) ) {\n listeners.on(type, callback, target);\n\n if (target && target.__eventTargets) {\n target.__eventTargets.push(this);\n }\n }\n\n return callback;\n },\n\n /**\n * !#en\n * Removes the callback previously registered with the same type, callback, target and or useCapture.\n * This method is merely an alias to removeEventListener.\n * !#zh 删除之前与同类型,回调,目标或 useCapture 注册的回调。\n * @method off\n * @param {String} type - A string representing the event type being removed.\n * @param {Function} [callback] - The callback to remove.\n * @param {Object} [target] - The target (this object) to invoke the callback, if it's not given, only callback without target will be removed\n * @param {Boolean} [useCapture=false] - When set to true, the listener will be triggered at capturing phase which is ahead of the final target emit, otherwise it will be triggered during bubbling phase.\n * @example\n * this.node.off(cc.Node.EventType.TOUCH_START, this.memberFunction, this);\n * node.off(cc.Node.EventType.TOUCH_START, callback, this.node);\n * node.off(cc.Node.EventType.ANCHOR_CHANGED, callback, this);\n */\n off (type, callback, target, useCapture) {\n let touchEvent = _touchEvents.indexOf(type) !== -1;\n let mouseEvent = !touchEvent && _mouseEvents.indexOf(type) !== -1;\n if (touchEvent || mouseEvent) {\n this._offDispatch(type, callback, target, useCapture);\n\n if (touchEvent) {\n if (this._touchListener && !_checkListeners(this, _touchEvents)) {\n eventManager.removeListener(this._touchListener);\n this._touchListener = null;\n }\n }\n else if (mouseEvent) {\n if (this._mouseListener && !_checkListeners(this, _mouseEvents)) {\n eventManager.removeListener(this._mouseListener);\n this._mouseListener = null;\n }\n }\n }\n else if (this._bubblingListeners) {\n this._bubblingListeners.off(type, callback, target);\n\n var hasListeners = this._bubblingListeners.hasEventListener(type);\n // All listener removed\n if (!hasListeners) {\n switch (type) {\n case EventType.POSITION_CHANGED:\n this._eventMask &= ~POSITION_ON;\n break;\n case EventType.SCALE_CHANGED:\n this._eventMask &= ~SCALE_ON;\n break;\n case EventType.ROTATION_CHANGED:\n this._eventMask &= ~ROTATION_ON;\n break;\n case EventType.SIZE_CHANGED:\n this._eventMask &= ~SIZE_ON;\n break;\n case EventType.ANCHOR_CHANGED:\n this._eventMask &= ~ANCHOR_ON;\n break;\n case EventType.COLOR_CHANGED:\n this._eventMask &= ~COLOR_ON;\n break;\n }\n }\n }\n },\n\n _offDispatch (type, callback, target, useCapture) {\n // Accept also patameters like: (type, callback, useCapture)\n if (typeof target === 'boolean') {\n useCapture = target;\n target = undefined;\n }\n else useCapture = !!useCapture;\n if (!callback) {\n this._capturingListeners && this._capturingListeners.removeAll(type);\n this._bubblingListeners && this._bubblingListeners.removeAll(type);\n }\n else {\n var listeners = useCapture ? this._capturingListeners : this._bubblingListeners;\n if (listeners) {\n listeners.off(type, callback, target);\n\n if (target && target.__eventTargets) {\n js.array.fastRemove(target.__eventTargets, this);\n }\n }\n\n }\n },\n\n /**\n * !#en Removes all callbacks previously registered with the same target.\n * !#zh 移除目标上的所有注册事件。\n * @method targetOff\n * @param {Object} target - The target to be searched for all related callbacks\n * @example\n * node.targetOff(target);\n */\n targetOff (target) {\n let listeners = this._bubblingListeners;\n if (listeners) {\n listeners.targetOff(target);\n\n // Check for event mask reset\n if ((this._eventMask & POSITION_ON) && !listeners.hasEventListener(EventType.POSITION_CHANGED)) {\n this._eventMask &= ~POSITION_ON;\n }\n if ((this._eventMask & SCALE_ON) && !listeners.hasEventListener(EventType.SCALE_CHANGED)) {\n this._eventMask &= ~SCALE_ON;\n }\n if ((this._eventMask & ROTATION_ON) && !listeners.hasEventListener(EventType.ROTATION_CHANGED)) {\n this._eventMask &= ~ROTATION_ON;\n }\n if ((this._eventMask & SIZE_ON) && !listeners.hasEventListener(EventType.SIZE_CHANGED)) {\n this._eventMask &= ~SIZE_ON;\n }\n if ((this._eventMask & ANCHOR_ON) && !listeners.hasEventListener(EventType.ANCHOR_CHANGED)) {\n this._eventMask &= ~ANCHOR_ON;\n }\n if ((this._eventMask & COLOR_ON) && !listeners.hasEventListener(EventType.COLOR_CHANGED)) {\n this._eventMask &= ~COLOR_ON;\n }\n }\n if (this._capturingListeners) {\n this._capturingListeners.targetOff(target);\n }\n\n if (target && target.__eventTargets) {\n js.array.fastRemove(target.__eventTargets, this);\n }\n\n if (this._touchListener && !_checkListeners(this, _touchEvents)) {\n eventManager.removeListener(this._touchListener);\n this._touchListener = null;\n }\n if (this._mouseListener && !_checkListeners(this, _mouseEvents)) {\n eventManager.removeListener(this._mouseListener);\n this._mouseListener = null;\n }\n },\n\n /**\n * !#en Checks whether the EventTarget object has any callback registered for a specific type of event.\n * !#zh 检查事件目标对象是否有为特定类型的事件注册的回调。\n * @method hasEventListener\n * @param {String} type - The type of event.\n * @return {Boolean} True if a callback of the specified type is registered; false otherwise.\n */\n hasEventListener (type) {\n let has = false;\n if (this._bubblingListeners) {\n has = this._bubblingListeners.hasEventListener(type);\n }\n if (!has && this._capturingListeners) {\n has = this._capturingListeners.hasEventListener(type);\n }\n return has;\n },\n\n /**\n * !#en\n * Trigger an event directly with the event name and necessary arguments.\n * !#zh\n * 通过事件名发送自定义事件\n *\n * @method emit\n * @param {String} type - event type\n * @param {*} [arg1] - First argument in callback\n * @param {*} [arg2] - Second argument in callback\n * @param {*} [arg3] - Third argument in callback\n * @param {*} [arg4] - Fourth argument in callback\n * @param {*} [arg5] - Fifth argument in callback\n * @example\n *\n * eventTarget.emit('fire', event);\n * eventTarget.emit('fire', message, emitter);\n */\n emit (type, arg1, arg2, arg3, arg4, arg5) {\n if (this._bubblingListeners) {\n this._bubblingListeners.emit(type, arg1, arg2, arg3, arg4, arg5);\n }\n },\n\n /**\n * !#en\n * Dispatches an event into the event flow.\n * The event target is the EventTarget object upon which the dispatchEvent() method is called.\n * !#zh 分发事件到事件流中。\n *\n * @method dispatchEvent\n * @param {Event} event - The Event object that is dispatched into the event flow\n */\n dispatchEvent (event) {\n var _array = _cachedPool.get();\n _doDispatchEvent(this, event, _array);\n _cachedPool.put(_array);\n },\n\n /**\n * !#en Pause node related system events registered with the current Node. Node system events includes touch and mouse events.\n * If recursive is set to true, then this API will pause the node system events for the node and all nodes in its sub node tree.\n * Reference: http://docs.cocos2d-x.org/editors_and_tools/creator-chapters/scripting/internal-events/\n * !#zh 暂停当前节点上注册的所有节点系统事件,节点系统事件包含触摸和鼠标事件。\n * 如果传递 recursive 为 true那么这个 API 将暂停本节点和它的子树上所有节点的节点系统事件。\n * 参考https://www.cocos.com/docs/creator/scripting/internal-events.html\n * @method pauseSystemEvents\n * @param {Boolean} recursive - Whether to pause node system events on the sub node tree.\n * @example\n * node.pauseSystemEvents(true);\n */\n pauseSystemEvents (recursive) {\n eventManager.pauseTarget(this, recursive);\n },\n\n /**\n * !#en Resume node related system events registered with the current Node. Node system events includes touch and mouse events.\n * If recursive is set to true, then this API will resume the node system events for the node and all nodes in its sub node tree.\n * Reference: http://docs.cocos2d-x.org/editors_and_tools/creator-chapters/scripting/internal-events/\n * !#zh 恢复当前节点上注册的所有节点系统事件,节点系统事件包含触摸和鼠标事件。\n * 如果传递 recursive 为 true那么这个 API 将恢复本节点和它的子树上所有节点的节点系统事件。\n * 参考https://www.cocos.com/docs/creator/scripting/internal-events.html\n * @method resumeSystemEvents\n * @param {Boolean} recursive - Whether to resume node system events on the sub node tree.\n * @example\n * node.resumeSystemEvents(true);\n */\n resumeSystemEvents (recursive) {\n eventManager.resumeTarget(this, recursive);\n },\n\n _hitTest (point, listener) {\n let w = this._contentSize.width,\n h = this._contentSize.height,\n cameraPt = _htVec3a,\n testPt = _htVec3b;\n\n let camera = cc.Camera.findCamera(this);\n if (camera) {\n camera.getScreenToWorldPoint(point, cameraPt);\n }\n else {\n cameraPt.set(point);\n }\n\n this._updateWorldMatrix();\n // If scale is 0, it can't be hit.\n if (!Mat4.invert(_mat4_temp, this._worldMatrix)) {\n return false;\n }\n Vec2.transformMat4(testPt, cameraPt, _mat4_temp);\n testPt.x += this._anchorPoint.x * w;\n testPt.y += this._anchorPoint.y * h;\n\n let hit = false;\n if (testPt.x >= 0 && testPt.y >= 0 && testPt.x <= w && testPt.y <= h) {\n hit = true;\n if (listener && listener.mask) {\n let mask = listener.mask;\n let parent = this;\n let length = mask ? mask.length : 0;\n // find mask parent, should hit test it\n for (let i = 0, j = 0; parent && j < length; ++i, parent = parent.parent) {\n let temp = mask[j];\n if (i === temp.index) {\n if (parent === temp.node) {\n let comp = parent.getComponent(cc.Mask);\n if (comp && comp._enabled && !comp._hitTest(cameraPt)) {\n hit = false;\n break\n }\n\n j++;\n } else {\n // mask parent no longer exists\n mask.length = j;\n break\n }\n } else if (i > temp.index) {\n // mask parent no longer exists\n mask.length = j;\n break\n }\n }\n }\n }\n\n return hit;\n },\n\n /**\n * Get all the targets listening to the supplied type of event in the target's capturing phase.\n * The capturing phase comprises the journey from the root to the last node BEFORE the event target's node.\n * The result should save in the array parameter, and MUST SORT from child nodes to parent nodes.\n *\n * Subclasses can override this method to make event propagable.\n * @method _getCapturingTargets\n * @private\n * @param {String} type - the event type\n * @param {Array} array - the array to receive targets\n * @example {@link cocos2d/core/event/_getCapturingTargets.js}\n */\n _getCapturingTargets (type, array) {\n var parent = this.parent;\n while (parent) {\n if (parent._capturingListeners && parent._capturingListeners.hasEventListener(type)) {\n array.push(parent);\n }\n parent = parent.parent;\n }\n },\n\n /**\n * Get all the targets listening to the supplied type of event in the target's bubbling phase.\n * The bubbling phase comprises any SUBSEQUENT nodes encountered on the return trip to the root of the tree.\n * The result should save in the array parameter, and MUST SORT from child nodes to parent nodes.\n *\n * Subclasses can override this method to make event propagable.\n * @method _getBubblingTargets\n * @private\n * @param {String} type - the event type\n * @param {Array} array - the array to receive targets\n */\n _getBubblingTargets (type, array) {\n var parent = this.parent;\n while (parent) {\n if (parent._bubblingListeners && parent._bubblingListeners.hasEventListener(type)) {\n array.push(parent);\n }\n parent = parent.parent;\n }\n },\n\n// ACTIONS\n /**\n * !#en\n * Executes an action, and returns the action that is executed.<br/>\n * The node becomes the action's target. Refer to cc.Action's getTarget() <br/>\n * Calling runAction while the node is not active won't have any effect. <br/>\n * NoteYou shouldn't modify the action after runAction, that won't take any effect.<br/>\n * if you want to modify, when you define action plus.\n * !#zh\n * 执行并返回该执行的动作。该节点将会变成动作的目标。<br/>\n * 调用 runAction 时,节点自身处于不激活状态将不会有任何效果。<br/>\n * 注意:你不应该修改 runAction 后的动作,将无法发挥作用,如果想进行修改,请在定义 action 时加入。\n * @method runAction\n * @param {Action} action\n * @return {Action} An Action pointer\n * @example\n * var action = cc.scaleTo(0.2, 1, 0.6);\n * node.runAction(action);\n * node.runAction(action).repeatForever(); // fail\n * node.runAction(action.repeatForever()); // right\n */\n runAction: ActionManagerExist ? function (action) {\n if (!this.active)\n return;\n cc.assertID(action, 1618);\n let am = cc.director.getActionManager();\n if (!am._suppressDeprecation) {\n am._suppressDeprecation = true;\n cc.warnID(1639);\n }\n am.addAction(action, this, false);\n return action;\n } : emptyFunc,\n\n /**\n * !#en Pause all actions running on the current node. Equals to `cc.director.getActionManager().pauseTarget(node)`.\n * !#zh 暂停本节点上所有正在运行的动作。和 `cc.director.getActionManager().pauseTarget(node);` 等价。\n * @method pauseAllActions\n * @example\n * node.pauseAllActions();\n */\n pauseAllActions: ActionManagerExist ? function () {\n cc.director.getActionManager().pauseTarget(this);\n } : emptyFunc,\n\n /**\n * !#en Resume all paused actions on the current node. Equals to `cc.director.getActionManager().resumeTarget(node)`.\n * !#zh 恢复运行本节点上所有暂停的动作。和 `cc.director.getActionManager().resumeTarget(node);` 等价。\n * @method resumeAllActions\n * @example\n * node.resumeAllActions();\n */\n resumeAllActions: ActionManagerExist ? function () {\n cc.director.getActionManager().resumeTarget(this);\n } : emptyFunc,\n\n /**\n * !#en Stops and removes all actions from the running action list .\n * !#zh 停止并且移除所有正在运行的动作列表。\n * @method stopAllActions\n * @example\n * node.stopAllActions();\n */\n stopAllActions: ActionManagerExist ? function () {\n cc.director.getActionManager().removeAllActionsFromTarget(this);\n } : emptyFunc,\n\n /**\n * !#en Stops and removes an action from the running action list.\n * !#zh 停止并移除指定的动作。\n * @method stopAction\n * @param {Action} action An action object to be removed.\n * @example\n * var action = cc.scaleTo(0.2, 1, 0.6);\n * node.stopAction(action);\n */\n stopAction: ActionManagerExist ? function (action) {\n cc.director.getActionManager().removeAction(action);\n } : emptyFunc,\n\n /**\n * !#en Removes an action from the running action list by its tag.\n * !#zh 停止并且移除指定标签的动作。\n * @method stopActionByTag\n * @param {Number} tag A tag that indicates the action to be removed.\n * @example\n * node.stopActionByTag(1);\n */\n stopActionByTag: ActionManagerExist ? function (tag) {\n if (tag === cc.Action.TAG_INVALID) {\n cc.logID(1612);\n return;\n }\n cc.director.getActionManager().removeActionByTag(tag, this);\n } : emptyFunc,\n\n /**\n * !#en Returns an action from the running action list by its tag.\n * !#zh 通过标签获取指定动作。\n * @method getActionByTag\n * @see cc.Action#getTag and cc.Action#setTag\n * @param {Number} tag\n * @return {Action} The action object with the given tag.\n * @example\n * var action = node.getActionByTag(1);\n */\n getActionByTag: ActionManagerExist ? function (tag) {\n if (tag === cc.Action.TAG_INVALID) {\n cc.logID(1613);\n return null;\n }\n return cc.director.getActionManager().getActionByTag(tag, this);\n } : function () {\n return null;\n },\n\n /**\n * !#en\n * Returns the numbers of actions that are running plus the ones that are schedule to run (actions in actionsToAdd and actions arrays).<br/>\n * Composable actions are counted as 1 action. Example:<br/>\n * If you are running 1 Sequence of 7 actions, it will return 1. <br/>\n * If you are running 7 Sequences of 2 actions, it will return 7.</p>\n * !#zh\n * 获取运行着的动作加上正在调度运行的动作的总数。<br/>\n * 例如:<br/>\n * - 如果你正在运行 7 个动作中的 1 个 Sequence它将返回 1。<br/>\n * - 如果你正在运行 2 个动作中的 7 个 Sequence它将返回 7。<br/>\n *\n * @method getNumberOfRunningActions\n * @return {Number} The number of actions that are running plus the ones that are schedule to run\n * @example\n * var count = node.getNumberOfRunningActions();\n * cc.log(\"Running Action Count: \" + count);\n */\n getNumberOfRunningActions: ActionManagerExist ? function () {\n return cc.director.getActionManager().getNumberOfRunningActionsInTarget(this);\n } : function () {\n return 0;\n },\n\n\n// TRANSFORM RELATED\n /**\n * !#en\n * Returns a copy of the position (x, y, z) of the node in its parent's coordinates.\n * You can pass a cc.Vec2 or cc.Vec3 as the argument to receive the return values.\n * !#zh\n * 获取节点在父节点坐标系中的位置x, y, z。\n * 你可以传一个 cc.Vec2 或者 cc.Vec3 作为参数来接收返回值。\n * @method getPosition\n * @param {Vec2|Vec3} [out] - The return value to receive position\n * @return {Vec2|Vec3} The position (x, y, z) of the node in its parent's coordinates\n * @example\n * cc.log(\"Node Position: \" + node.getPosition());\n */\n getPosition (out) {\n out = out || new Vec3();\n return Trs.toPosition(out, this._trs);\n },\n\n /**\n * !#en\n * Sets the position (x, y, z) of the node in its parent's coordinates.<br/>\n * Usually we use cc.v2(x, y) to compose cc.Vec2 object, in this case, position.z will become 0.<br/>\n * and passing two numbers (x, y) is more efficient than passing cc.Vec2 object, in this case, position.z will remain unchanged.\n * For 3D node we can use cc.v3(x, y, z) to compose cc.Vec3 object,<br/>\n * and passing three numbers (x, y, z) is more efficient than passing cc.Vec3 object.\n * !#zh\n * 设置节点在父节点坐标系中的位置。<br/>\n * 可以通过下面的方式设置坐标点:<br/>\n * 1. 传入 2 个数值 x, y (此时不会改变 position.z 的值)。<br/>\n * 2. 传入 cc.v2(x, y) 类型为 cc.Vec2 的对象 (此时 position.z 的值将被设置为0)。\n * 3. 对于 3D 节点可以传入 3 个数值 x, y, z。<br/>\n * 4. 对于 3D 节点可以传入 cc.v3(x, y, z) 类型为 cc.Vec3 的对象。\n * @method setPosition\n * @param {Vec2|Vec3|Number} x - X coordinate for position or the position object\n * @param {Number} [y] - Y coordinate for position\n * @param {Number} [z] - Z coordinate for position\n */\n setPosition (newPosOrX, y, z) {\n let x;\n if (y === undefined) {\n x = newPosOrX.x;\n y = newPosOrX.y;\n z = newPosOrX.z;\n }\n else {\n x = newPosOrX;\n }\n\n let trs = this._trs;\n\n if (z === undefined) {\n z = trs[2];\n }\n\n if (trs[0] === x && trs[1] === y && trs[2] === z) {\n return;\n }\n\n if (CC_EDITOR) {\n var oldPosition = new cc.Vec3(trs[0], trs[1], trs[2]);\n }\n\n trs[0] = x;\n trs[1] = y;\n trs[2] = z;\n\n this.setLocalDirty(LocalDirtyFlag.ALL_POSITION);\n !CC_NATIVERENDERER && (this._renderFlag |= RenderFlow.FLAG_WORLD_TRANSFORM);\n\n // fast check event\n if (this._eventMask & POSITION_ON) {\n if (CC_EDITOR) {\n this.emit(EventType.POSITION_CHANGED, oldPosition);\n }\n else {\n this.emit(EventType.POSITION_CHANGED);\n }\n }\n },\n\n /**\n * !#en\n * Returns the scale factor of the node.\n * Need pass a cc.Vec2 or cc.Vec3 as the argument to receive the return values.\n * !#zh 获取节点的缩放,需要传一个 cc.Vec2 或者 cc.Vec3 作为参数来接收返回值。\n * @method getScale\n * @param {Vec2|Vec3} out\n * @return {Vec2|Vec3} The scale factor\n * @example\n * cc.log(\"Node Scale: \" + node.getScale(cc.v3()));\n */\n getScale (out) {\n if (out !== undefined) {\n return Trs.toScale(out, this._trs);\n }\n else {\n cc.errorID(1400, 'cc.Node.getScale', 'cc.Node.scale or cc.Node.getScale(cc.Vec3)');\n return this._trs[7];\n }\n },\n\n /**\n * !#en\n * Sets the scale of axis in local coordinates of the node.\n * You can operate 2 axis in 2D node, and 3 axis in 3D node.\n * When only (x, y) is passed, the value of scale.z will not be changed.\n * When a Vec2 is passed in, the value of scale.z will be set to 0.\n * !#zh\n * 设置节点在本地坐标系中坐标轴上的缩放比例。\n * 2D 节点可以操作两个坐标轴,而 3D 节点可以操作三个坐标轴。\n * 当只传入 (x, y) 时scale.z 的值不会被改变。\n * 当只传入 Vec2 对象时scale.z 的值将被设置为0。\n * @method setScale\n * @param {Number|Vec2|Vec3} x - scaleX or scale object\n * @param {Number} [y]\n * @param {Number} [z]\n * @example\n * node.setScale(cc.v2(2, 2)); // Notice: scaleZ will be 0\n * node.setScale(cc.v3(2, 2, 2)); // for 3D node\n * node.setScale(2);\n */\n setScale (newScaleOrX, y, z) {\n let x;\n // only one parameter, and it's a Vec2/Vec3:\n if (newScaleOrX && typeof newScaleOrX !== 'number') {\n x = newScaleOrX.x;\n y = newScaleOrX.y;\n z = newScaleOrX.z;\n }\n // only one parameter, and it's a number:\n else if (newScaleOrX !== undefined && y === undefined) {\n x = newScaleOrX;\n y = newScaleOrX;\n z = newScaleOrX;\n }\n // two or three paramters:\n else {\n x = newScaleOrX;\n }\n\n let trs = this._trs;\n\n if (z === undefined) {\n z = trs[9];\n }\n\n if (trs[7] !== x || trs[8] !== y || trs[9] !== z) {\n trs[7] = x;\n trs[8] = y;\n trs[9] = z;\n this.setLocalDirty(LocalDirtyFlag.ALL_SCALE);\n !CC_NATIVERENDERER && (this._renderFlag |= RenderFlow.FLAG_TRANSFORM);\n\n if (this._eventMask & SCALE_ON) {\n this.emit(EventType.SCALE_CHANGED);\n }\n }\n },\n\n /**\n * !#en\n * Get rotation of node (in quaternion).\n * Need pass a cc.Quat as the argument to receive the return values.\n * !#zh\n * 获取该节点的 quaternion 旋转角度,需要传一个 cc.Quat 作为参数来接收返回值。\n * @method getRotation\n * @param {Quat} out\n * @return {Quat} Quaternion object represents the rotation\n */\n getRotation (out) {\n if (out instanceof Quat) {\n return Trs.toRotation(out, this._trs);\n }\n else {\n if (CC_DEBUG) {\n cc.warn(\"`cc.Node.getRotation()` is deprecated since v2.1.0, please use `-cc.Node.angle` instead. (`this.node.getRotation()` -> `-this.node.angle`)\");\n }\n return -this.angle;\n }\n },\n\n /**\n * !#en Set rotation of node (in quaternion).\n * !#zh 设置该节点的 quaternion 旋转角度。\n * @method setRotation\n * @param {cc.Quat|Number} quat Quaternion object represents the rotation or the x value of quaternion\n * @param {Number} [y] y value of quternion\n * @param {Number} [z] z value of quternion\n * @param {Number} [w] w value of quternion\n */\n setRotation (rotation, y, z, w) {\n if (typeof rotation === 'number' && y === undefined) {\n if (CC_DEBUG) {\n cc.warn(\"`cc.Node.setRotation(degree)` is deprecated since v2.1.0, please set `-cc.Node.angle` instead. (`this.node.setRotation(x)` -> `this.node.angle = -x`)\");\n }\n this.angle = -rotation;\n }\n else {\n let x = rotation;\n if (y === undefined) {\n x = rotation.x;\n y = rotation.y;\n z = rotation.z;\n w = rotation.w;\n }\n\n let trs = this._trs;\n if (trs[3] !== x || trs[4] !== y || trs[5] !== z || trs[6] !== w) {\n trs[3] = x;\n trs[4] = y;\n trs[5] = z;\n trs[6] = w;\n this.setLocalDirty(LocalDirtyFlag.ALL_ROTATION);\n\n if (this._eventMask & ROTATION_ON) {\n this.emit(EventType.ROTATION_CHANGED);\n }\n\n if (CC_EDITOR) {\n this._toEuler();\n }\n }\n }\n },\n\n /**\n * !#en\n * Returns a copy the untransformed size of the node. <br/>\n * The contentSize remains the same no matter the node is scaled or rotated.<br/>\n * All nodes has a size. Layer and Scene has the same size of the screen by default. <br/>\n * !#zh 获取节点自身大小,不受该节点是否被缩放或者旋转的影响。\n * @method getContentSize\n * @return {Size} The untransformed size of the node.\n * @example\n * cc.log(\"Content Size: \" + node.getContentSize());\n */\n getContentSize () {\n return cc.size(this._contentSize.width, this._contentSize.height);\n },\n\n /**\n * !#en\n * Sets the untransformed size of the node.<br/>\n * The contentSize remains the same no matter the node is scaled or rotated.<br/>\n * All nodes has a size. Layer and Scene has the same size of the screen.\n * !#zh 设置节点原始大小,不受该节点是否被缩放或者旋转的影响。\n * @method setContentSize\n * @param {Size|Number} size - The untransformed size of the node or The untransformed size's width of the node.\n * @param {Number} [height] - The untransformed size's height of the node.\n * @example\n * node.setContentSize(cc.size(100, 100));\n * node.setContentSize(100, 100);\n */\n setContentSize (size, height) {\n var locContentSize = this._contentSize;\n var clone;\n if (height === undefined) {\n if (approx(size.width, locContentSize.width) && approx(size.height, locContentSize.height))\n return;\n if (CC_EDITOR) {\n clone = cc.size(locContentSize.width, locContentSize.height);\n }\n locContentSize.width = size.width;\n locContentSize.height = size.height;\n } else {\n if (approx(size, locContentSize.width) && approx(height, locContentSize.height))\n return;\n if (CC_EDITOR) {\n clone = cc.size(locContentSize.width, locContentSize.height);\n }\n locContentSize.width = size;\n locContentSize.height = height;\n }\n if (this._eventMask & SIZE_ON) {\n if (CC_EDITOR) {\n this.emit(EventType.SIZE_CHANGED, clone);\n }\n else {\n this.emit(EventType.SIZE_CHANGED);\n }\n }\n },\n\n /**\n * !#en\n * Returns a copy of the anchor point.<br/>\n * Anchor point is the point around which all transformations and positioning manipulations take place.<br/>\n * It's like a pin in the node where it is \"attached\" to its parent. <br/>\n * The anchorPoint is normalized, like a percentage. (0,0) means the bottom-left corner and (1,1) means the top-right corner. <br/>\n * But you can use values higher than (1,1) and lower than (0,0) too. <br/>\n * The default anchor point is (0.5,0.5), so it starts at the center of the node.\n * !#zh\n * 获取节点锚点,用百分比表示。<br/>\n * 锚点应用于所有变换和坐标点的操作,它就像在节点上连接其父节点的大头针。<br/>\n * 锚点是标准化的,就像百分比一样。(00) 表示左下角,(11) 表示右上角。<br/>\n * 但是你可以使用比11更高的值或者比00更低的值。<br/>\n * 默认的锚点是0.50.5),因此它开始于节点的中心位置。<br/>\n * 注意Creator 中的锚点仅用于定位所在的节点,子节点的定位不受影响。\n * @method getAnchorPoint\n * @return {Vec2} The anchor point of node.\n * @example\n * cc.log(\"Node AnchorPoint: \" + node.getAnchorPoint());\n */\n getAnchorPoint () {\n return cc.v2(this._anchorPoint);\n },\n\n /**\n * !#en\n * Sets the anchor point in percent. <br/>\n * anchor point is the point around which all transformations and positioning manipulations take place. <br/>\n * It's like a pin in the node where it is \"attached\" to its parent. <br/>\n * The anchorPoint is normalized, like a percentage. (0,0) means the bottom-left corner and (1,1) means the top-right corner.<br/>\n * But you can use values higher than (1,1) and lower than (0,0) too.<br/>\n * The default anchor point is (0.5,0.5), so it starts at the center of the node.\n * !#zh\n * 设置锚点的百分比。<br/>\n * 锚点应用于所有变换和坐标点的操作,它就像在节点上连接其父节点的大头针。<br/>\n * 锚点是标准化的,就像百分比一样。(00) 表示左下角,(11) 表示右上角。<br/>\n * 但是你可以使用比11更高的值或者比00更低的值。<br/>\n * 默认的锚点是0.50.5),因此它开始于节点的中心位置。<br/>\n * 注意Creator 中的锚点仅用于定位所在的节点,子节点的定位不受影响。\n * @method setAnchorPoint\n * @param {Vec2|Number} point - The anchor point of node or The x axis anchor of node.\n * @param {Number} [y] - The y axis anchor of node.\n * @example\n * node.setAnchorPoint(cc.v2(1, 1));\n * node.setAnchorPoint(1, 1);\n */\n setAnchorPoint (point, y) {\n var locAnchorPoint = this._anchorPoint;\n if (y === undefined) {\n if ((point.x === locAnchorPoint.x) && (point.y === locAnchorPoint.y))\n return;\n locAnchorPoint.x = point.x;\n locAnchorPoint.y = point.y;\n } else {\n if ((point === locAnchorPoint.x) && (y === locAnchorPoint.y))\n return;\n locAnchorPoint.x = point;\n locAnchorPoint.y = y;\n }\n this.setLocalDirty(LocalDirtyFlag.ALL_POSITION);\n if (this._eventMask & ANCHOR_ON) {\n this.emit(EventType.ANCHOR_CHANGED);\n }\n },\n\n /*\n * Transforms position from world space to local space.\n * @method _invTransformPoint\n * @param {Vec3} out\n * @param {Vec3} vec3\n */\n _invTransformPoint (out, pos) {\n if (this._parent) {\n this._parent._invTransformPoint(out, pos);\n } else {\n Vec3.copy(out, pos);\n }\n\n let ltrs = this._trs;\n // out = parent_inv_pos - pos\n Trs.toPosition(_tpVec3a, ltrs);\n Vec3.sub(out, out, _tpVec3a);\n\n // out = inv(rot) * out\n Trs.toRotation(_tpQuata, ltrs);\n Quat.conjugate(_tpQuatb, _tpQuata);\n Vec3.transformQuat(out, out, _tpQuatb);\n\n // out = (1/scale) * out\n Trs.toScale(_tpVec3a, ltrs);\n Vec3.inverseSafe(_tpVec3b, _tpVec3a);\n Vec3.mul(out, out, _tpVec3b);\n\n return out;\n },\n\n /*\n * Calculate and return world position.\n * This is not a public API yet, its usage could be updated\n * @method getWorldPosition\n * @param {Vec3} out\n * @return {Vec3}\n */\n getWorldPosition (out) {\n Trs.toPosition(out, this._trs);\n let curr = this._parent;\n let ltrs;\n while (curr) {\n ltrs = curr._trs;\n // out = parent_scale * pos\n Trs.toScale(_gwpVec3, ltrs);\n Vec3.mul(out, out, _gwpVec3);\n // out = parent_quat * out\n Trs.toRotation(_gwpQuat, ltrs);\n Vec3.transformQuat(out, out, _gwpQuat);\n // out = out + pos\n Trs.toPosition(_gwpVec3, ltrs);\n Vec3.add(out, out, _gwpVec3);\n curr = curr._parent;\n }\n return out;\n },\n\n /*\n * Set world position.\n * This is not a public API yet, its usage could be updated\n * @method setWorldPosition\n * @param {Vec3} pos\n */\n setWorldPosition (pos) {\n let ltrs = this._trs;\n if (CC_EDITOR) {\n var oldPosition = new cc.Vec3(ltrs[0], ltrs[1], ltrs[2]);\n }\n // NOTE: this is faster than invert world matrix and transform the point\n if (this._parent) {\n this._parent._invTransformPoint(_swpVec3, pos);\n }\n else {\n Vec3.copy(_swpVec3, pos);\n }\n Trs.fromPosition(ltrs, _swpVec3);\n this.setLocalDirty(LocalDirtyFlag.ALL_POSITION);\n\n // fast check event\n if (this._eventMask & POSITION_ON) {\n // send event\n if (CC_EDITOR) {\n this.emit(EventType.POSITION_CHANGED, oldPosition);\n }\n else {\n this.emit(EventType.POSITION_CHANGED);\n }\n }\n },\n\n /*\n * Calculate and return world rotation\n * This is not a public API yet, its usage could be updated\n * @method getWorldRotation\n * @param {Quat} out\n * @return {Quat}\n */\n getWorldRotation (out) {\n Trs.toRotation(_gwrQuat, this._trs);\n Quat.copy(out, _gwrQuat);\n let curr = this._parent;\n while (curr) {\n Trs.toRotation(_gwrQuat, curr._trs);\n Quat.mul(out, _gwrQuat, out);\n curr = curr._parent;\n }\n return out;\n },\n\n /*\n * Set world rotation with quaternion\n * This is not a public API yet, its usage could be updated\n * @method setWorldRotation\n * @param {Quat} val\n */\n setWorldRotation (val) {\n if (this._parent) {\n this._parent.getWorldRotation(_swrQuat);\n Quat.conjugate(_swrQuat, _swrQuat);\n Quat.mul(_swrQuat, _swrQuat, val);\n }\n else {\n Quat.copy(_swrQuat, val);\n }\n Trs.fromRotation(this._trs, _swrQuat);\n if (CC_EDITOR) {\n this._toEuler();\n }\n this.setLocalDirty(LocalDirtyFlag.ALL_ROTATION);\n },\n\n /*\n * Calculate and return world scale\n * This is not a public API yet, its usage could be updated\n * @method getWorldScale\n * @param {Vec3} out\n * @return {Vec3}\n */\n getWorldScale (out) {\n Trs.toScale(_gwsVec3, this._trs);\n Vec3.copy(out, _gwsVec3);\n let curr = this._parent;\n while (curr) {\n Trs.toScale(_gwsVec3, curr._trs);\n Vec3.mul(out, out, _gwsVec3);\n curr = curr._parent;\n }\n return out;\n },\n\n /*\n * Set world scale with vec3\n * This is not a public API yet, its usage could be updated\n * @method setWorldScale\n * @param {Vec3} scale\n */\n setWorldScale (scale) {\n if (this._parent) {\n this._parent.getWorldScale(_swsVec3);\n Vec3.div(_swsVec3, scale, _swsVec3);\n }\n else {\n Vec3.copy(_swsVec3, scale);\n }\n Trs.fromScale(this._trs, _swsVec3);\n this.setLocalDirty(LocalDirtyFlag.ALL_SCALE);\n },\n\n getWorldRT (out) {\n let opos = _gwrtVec3a;\n let orot = _gwrtQuata;\n let ltrs = this._trs;\n Trs.toPosition(opos, ltrs);\n Trs.toRotation(orot, ltrs);\n\n let curr = this._parent;\n while (curr) {\n ltrs = curr._trs;\n // opos = parent_lscale * lpos\n Trs.toScale(_gwrtVec3b, ltrs);\n Vec3.mul(opos, opos, _gwrtVec3b);\n // opos = parent_lrot * opos\n Trs.toRotation(_gwrtQuatb, ltrs);\n Vec3.transformQuat(opos, opos, _gwrtQuatb);\n // opos = opos + lpos\n Trs.toPosition(_gwrtVec3b, ltrs);\n Vec3.add(opos, opos, _gwrtVec3b);\n // orot = lrot * orot\n Quat.mul(orot, _gwrtQuatb, orot);\n curr = curr._parent;\n }\n Mat4.fromRT(out, orot, opos);\n return out;\n },\n\n /**\n * !#en Set rotation by lookAt target point, normally used by Camera Node\n * !#zh 通过观察目标来设置 rotation一般用于 Camera Node 上\n * @method lookAt\n * @param {Vec3} pos\n * @param {Vec3} [up] - default is (0,1,0)\n */\n lookAt (pos, up) {\n this.getWorldPosition(_laVec3);\n Vec3.sub(_laVec3, _laVec3, pos); // NOTE: we use -z for view-dir\n Vec3.normalize(_laVec3, _laVec3);\n Quat.fromViewUp(_laQuat, _laVec3, up);\n\n this.setWorldRotation(_laQuat);\n },\n\n _updateLocalMatrix: updateLocalMatrix2D,\n\n _calculWorldMatrix () {\n // Avoid as much function call as possible\n if (this._localMatDirty & LocalDirtyFlag.TRSS) {\n this._updateLocalMatrix();\n }\n\n // Assume parent world matrix is correct\n let parent = this._parent;\n if (parent) {\n this._mulMat(this._worldMatrix, parent._worldMatrix, this._matrix);\n }\n else {\n Mat4.copy(this._worldMatrix, this._matrix);\n }\n this._worldMatDirty = false;\n },\n\n _mulMat: mulMat2D,\n\n _updateWorldMatrix () {\n if (this._parent) {\n this._parent._updateWorldMatrix();\n }\n if (this._worldMatDirty) {\n this._calculWorldMatrix();\n // Sync dirty to children\n let children = this._children;\n for (let i = 0, l = children.length; i < l; i++) {\n children[i]._worldMatDirty = true;\n }\n }\n },\n\n setLocalDirty (flag) {\n this._localMatDirty |= flag;\n this._worldMatDirty = true;\n\n if (flag === LocalDirtyFlag.ALL_POSITION || flag === LocalDirtyFlag.POSITION) {\n this._renderFlag |= RenderFlow.FLAG_WORLD_TRANSFORM;\n }\n else {\n this._renderFlag |= RenderFlow.FLAG_TRANSFORM;\n }\n },\n\n setWorldDirty () {\n this._worldMatDirty = true;\n },\n\n /**\n * !#en\n * Get the local transform matrix (4x4), based on parent node coordinates\n * !#zh 返回局部空间坐标系的矩阵,基于父节点坐标系。\n * @method getLocalMatrix\n * @param {Mat4} out The matrix object to be filled with data\n * @return {Mat4} Same as the out matrix object\n * @example\n * let mat4 = cc.mat4();\n * node.getLocalMatrix(mat4);\n */\n getLocalMatrix (out) {\n this._updateLocalMatrix();\n return Mat4.copy(out, this._matrix);\n },\n\n /**\n * !#en\n * Get the world transform matrix (4x4)\n * !#zh 返回世界空间坐标系的矩阵。\n * @method getWorldMatrix\n * @param {Mat4} out The matrix object to be filled with data\n * @return {Mat4} Same as the out matrix object\n * @example\n * let mat4 = cc.mat4();\n * node.getWorldMatrix(mat4);\n */\n getWorldMatrix (out) {\n this._updateWorldMatrix();\n return Mat4.copy(out, this._worldMatrix);\n },\n\n /**\n * !#en\n * Converts a Point to node (local) space coordinates.\n * !#zh\n * 将一个点转换到节点 (局部) 空间坐标系。\n * @method convertToNodeSpaceAR\n * @param {Vec3|Vec2} worldPoint\n * @param {Vec3|Vec2} [out]\n * @return {Vec3|Vec2}\n * @typescript\n * convertToNodeSpaceAR<T extends cc.Vec2 | cc.Vec3>(worldPoint: T, out?: T): T\n * @example\n * var newVec2 = node.convertToNodeSpaceAR(cc.v2(100, 100));\n * var newVec3 = node.convertToNodeSpaceAR(cc.v3(100, 100, 100));\n */\n convertToNodeSpaceAR (worldPoint, out) {\n this._updateWorldMatrix();\n Mat4.invert(_mat4_temp, this._worldMatrix);\n\n if (worldPoint instanceof cc.Vec2) {\n out = out || new cc.Vec2();\n return Vec2.transformMat4(out, worldPoint, _mat4_temp);\n }\n else {\n out = out || new cc.Vec3();\n return Vec3.transformMat4(out, worldPoint, _mat4_temp);\n }\n },\n\n /**\n * !#en\n * Converts a Point in node coordinates to world space coordinates.\n * !#zh\n * 将节点坐标系下的一个点转换到世界空间坐标系。\n * @method convertToWorldSpaceAR\n * @param {Vec3|Vec2} nodePoint\n * @param {Vec3|Vec2} [out]\n * @return {Vec3|Vec2}\n * @typescript\n * convertToWorldSpaceAR<T extends cc.Vec2 | cc.Vec3>(nodePoint: T, out?: T): T\n * @example\n * var newVec2 = node.convertToWorldSpaceAR(cc.v2(100, 100));\n * var newVec3 = node.convertToWorldSpaceAR(cc.v3(100, 100, 100));\n */\n convertToWorldSpaceAR (nodePoint, out) {\n this._updateWorldMatrix();\n if (nodePoint instanceof cc.Vec2) {\n out = out || new cc.Vec2();\n return Vec2.transformMat4(out, nodePoint, this._worldMatrix);\n }\n else {\n out = out || new cc.Vec3();\n return Vec3.transformMat4(out, nodePoint, this._worldMatrix);\n }\n },\n\n// OLD TRANSFORM ACCESS APIs\n /**\n * !#en Converts a Point to node (local) space coordinates then add the anchor point position.\n * So the return position will be related to the left bottom corner of the node's bounding box.\n * This equals to the API behavior of cocos2d-x, you probably want to use convertToNodeSpaceAR instead\n * !#zh 将一个点转换到节点 (局部) 坐标系,并加上锚点的坐标。<br/>\n * 也就是说返回的坐标是相对于节点包围盒左下角的坐标。<br/>\n * 这个 API 的设计是为了和 cocos2d-x 中行为一致,更多情况下你可能需要使用 convertToNodeSpaceAR。\n * @method convertToNodeSpace\n * @deprecated since v2.1.3\n * @param {Vec2} worldPoint\n * @return {Vec2}\n * @example\n * var newVec2 = node.convertToNodeSpace(cc.v2(100, 100));\n */\n convertToNodeSpace (worldPoint) {\n this._updateWorldMatrix();\n Mat4.invert(_mat4_temp, this._worldMatrix);\n let out = new cc.Vec2();\n Vec2.transformMat4(out, worldPoint, _mat4_temp);\n out.x += this._anchorPoint.x * this._contentSize.width;\n out.y += this._anchorPoint.y * this._contentSize.height;\n return out;\n },\n\n /**\n * !#en Converts a Point related to the left bottom corner of the node's bounding box to world space coordinates.\n * This equals to the API behavior of cocos2d-x, you probably want to use convertToWorldSpaceAR instead\n * !#zh 将一个相对于节点左下角的坐标位置转换到世界空间坐标系。\n * 这个 API 的设计是为了和 cocos2d-x 中行为一致,更多情况下你可能需要使用 convertToWorldSpaceAR\n * @method convertToWorldSpace\n * @deprecated since v2.1.3\n * @param {Vec2} nodePoint\n * @return {Vec2}\n * @example\n * var newVec2 = node.convertToWorldSpace(cc.v2(100, 100));\n */\n convertToWorldSpace (nodePoint) {\n this._updateWorldMatrix();\n let out = new cc.Vec2(\n nodePoint.x - this._anchorPoint.x * this._contentSize.width,\n nodePoint.y - this._anchorPoint.y * this._contentSize.height\n );\n return Vec2.transformMat4(out, out, this._worldMatrix);\n },\n\n /**\n * !#en\n * Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.<br/>\n * The matrix is in Pixels.\n * !#zh 返回这个将节点(局部)的空间坐标系转换成父节点的空间坐标系的矩阵。这个矩阵以像素为单位。\n * @method getNodeToParentTransform\n * @deprecated since v2.0\n * @param {AffineTransform} [out] The affine transform object to be filled with data\n * @return {AffineTransform} Same as the out affine transform object\n * @example\n * let affineTransform = cc.AffineTransform.create();\n * node.getNodeToParentTransform(affineTransform);\n */\n getNodeToParentTransform (out) {\n if (!out) {\n out = AffineTrans.identity();\n }\n this._updateLocalMatrix();\n\n var contentSize = this._contentSize;\n _vec3_temp.x = -this._anchorPoint.x * contentSize.width;\n _vec3_temp.y = -this._anchorPoint.y * contentSize.height;\n\n Mat4.copy(_mat4_temp, this._matrix);\n Mat4.transform(_mat4_temp, _mat4_temp, _vec3_temp);\n return AffineTrans.fromMat4(out, _mat4_temp);\n },\n\n /**\n * !#en\n * Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.<br/>\n * The matrix is in Pixels.<br/>\n * This method is AR (Anchor Relative).\n * !#zh\n * 返回这个将节点(局部)的空间坐标系转换成父节点的空间坐标系的矩阵。<br/>\n * 这个矩阵以像素为单位。<br/>\n * 该方法基于节点坐标。\n * @method getNodeToParentTransformAR\n * @deprecated since v2.0\n * @param {AffineTransform} [out] The affine transform object to be filled with data\n * @return {AffineTransform} Same as the out affine transform object\n * @example\n * let affineTransform = cc.AffineTransform.create();\n * node.getNodeToParentTransformAR(affineTransform);\n */\n getNodeToParentTransformAR (out) {\n if (!out) {\n out = AffineTrans.identity();\n }\n this._updateLocalMatrix();\n return AffineTrans.fromMat4(out, this._matrix);\n },\n\n /**\n * !#en Returns the world affine transform matrix. The matrix is in Pixels.\n * !#zh 返回节点到世界坐标系的仿射变换矩阵。矩阵单位是像素。\n * @method getNodeToWorldTransform\n * @deprecated since v2.0\n * @param {AffineTransform} [out] The affine transform object to be filled with data\n * @return {AffineTransform} Same as the out affine transform object\n * @example\n * let affineTransform = cc.AffineTransform.create();\n * node.getNodeToWorldTransform(affineTransform);\n */\n getNodeToWorldTransform (out) {\n if (!out) {\n out = AffineTrans.identity();\n }\n this._updateWorldMatrix();\n\n var contentSize = this._contentSize;\n _vec3_temp.x = -this._anchorPoint.x * contentSize.width;\n _vec3_temp.y = -this._anchorPoint.y * contentSize.height;\n\n Mat4.copy(_mat4_temp, this._worldMatrix);\n Mat4.transform(_mat4_temp, _mat4_temp, _vec3_temp);\n\n return AffineTrans.fromMat4(out, _mat4_temp);\n },\n\n /**\n * !#en\n * Returns the world affine transform matrix. The matrix is in Pixels.<br/>\n * This method is AR (Anchor Relative).\n * !#zh\n * 返回节点到世界坐标仿射变换矩阵。矩阵单位是像素。<br/>\n * 该方法基于节点坐标。\n * @method getNodeToWorldTransformAR\n * @deprecated since v2.0\n * @param {AffineTransform} [out] The affine transform object to be filled with data\n * @return {AffineTransform} Same as the out affine transform object\n * @example\n * let affineTransform = cc.AffineTransform.create();\n * node.getNodeToWorldTransformAR(affineTransform);\n */\n getNodeToWorldTransformAR (out) {\n if (!out) {\n out = AffineTrans.identity();\n }\n this._updateWorldMatrix();\n return AffineTrans.fromMat4(out, this._worldMatrix);\n },\n\n /**\n * !#en\n * Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates.<br/>\n * The matrix is in Pixels. The returned transform is readonly and cannot be changed.\n * !#zh\n * 返回将父节点的坐标系转换成节点(局部)的空间坐标系的矩阵。<br/>\n * 该矩阵以像素为单位。返回的矩阵是只读的,不能更改。\n * @method getParentToNodeTransform\n * @deprecated since v2.0\n * @param {AffineTransform} [out] The affine transform object to be filled with data\n * @return {AffineTransform} Same as the out affine transform object\n * @example\n * let affineTransform = cc.AffineTransform.create();\n * node.getParentToNodeTransform(affineTransform);\n */\n getParentToNodeTransform (out) {\n if (!out) {\n out = AffineTrans.identity();\n }\n this._updateLocalMatrix();\n Mat4.invert(_mat4_temp, this._matrix);\n return AffineTrans.fromMat4(out, _mat4_temp);\n },\n\n /**\n * !#en Returns the inverse world affine transform matrix. The matrix is in Pixels.\n * !#en 返回世界坐标系到节点坐标系的逆矩阵。\n * @method getWorldToNodeTransform\n * @deprecated since v2.0\n * @param {AffineTransform} [out] The affine transform object to be filled with data\n * @return {AffineTransform} Same as the out affine transform object\n * @example\n * let affineTransform = cc.AffineTransform.create();\n * node.getWorldToNodeTransform(affineTransform);\n */\n getWorldToNodeTransform (out) {\n if (!out) {\n out = AffineTrans.identity();\n }\n this._updateWorldMatrix();\n Mat4.invert(_mat4_temp, this._worldMatrix);\n return AffineTrans.fromMat4(out, _mat4_temp);\n },\n\n /**\n * !#en convenience methods which take a cc.Touch instead of cc.Vec2.\n * !#zh 将触摸点转换成本地坐标系中位置。\n * @method convertTouchToNodeSpace\n * @deprecated since v2.0\n * @param {Touch} touch - The touch object\n * @return {Vec2}\n * @example\n * var newVec2 = node.convertTouchToNodeSpace(touch);\n */\n convertTouchToNodeSpace (touch) {\n return this.convertToNodeSpace(touch.getLocation());\n },\n\n /**\n * !#en converts a cc.Touch (world coordinates) into a local coordinate. This method is AR (Anchor Relative).\n * !#zh 转换一个 cc.Touch世界坐标到一个局部坐标该方法基于节点坐标。\n * @method convertTouchToNodeSpaceAR\n * @deprecated since v2.0\n * @param {Touch} touch - The touch object\n * @return {Vec2}\n * @example\n * var newVec2 = node.convertTouchToNodeSpaceAR(touch);\n */\n convertTouchToNodeSpaceAR (touch) {\n return this.convertToNodeSpaceAR(touch.getLocation());\n },\n\n /**\n * !#en\n * Returns a \"local\" axis aligned bounding box of the node. <br/>\n * The returned box is relative only to its parent.\n * !#zh 返回父节坐标系下的轴向对齐的包围盒。\n * @method getBoundingBox\n * @return {Rect} The calculated bounding box of the node\n * @example\n * var boundingBox = node.getBoundingBox();\n */\n getBoundingBox () {\n this._updateLocalMatrix();\n let width = this._contentSize.width;\n let height = this._contentSize.height;\n let rect = cc.rect(\n -this._anchorPoint.x * width,\n -this._anchorPoint.y * height,\n width,\n height);\n return rect.transformMat4(rect, this._matrix);\n },\n\n /**\n * !#en\n * Returns a \"world\" axis aligned bounding box of the node.<br/>\n * The bounding box contains self and active children's world bounding box.\n * !#zh\n * 返回节点在世界坐标系下的对齐轴向的包围盒AABB。<br/>\n * 该边框包含自身和已激活的子节点的世界边框。\n * @method getBoundingBoxToWorld\n * @return {Rect}\n * @example\n * var newRect = node.getBoundingBoxToWorld();\n */\n getBoundingBoxToWorld () {\n if (this._parent) {\n this._parent._updateWorldMatrix();\n return this._getBoundingBoxTo();\n }\n else {\n return this.getBoundingBox();\n }\n },\n\n _getBoundingBoxTo () {\n let width = this._contentSize.width;\n let height = this._contentSize.height;\n let rect = cc.rect(\n -this._anchorPoint.x * width,\n -this._anchorPoint.y * height,\n width,\n height);\n\n this._calculWorldMatrix();\n rect.transformMat4(rect, this._worldMatrix);\n\n //query child's BoundingBox\n if (!this._children)\n return rect;\n\n var locChildren = this._children;\n for (var i = 0; i < locChildren.length; i++) {\n var child = locChildren[i];\n if (child && child.active) {\n var childRect = child._getBoundingBoxTo();\n if (childRect)\n rect.union(rect, childRect);\n }\n }\n return rect;\n },\n\n _updateOrderOfArrival () {\n var arrivalOrder = this._parent ? ++this._parent._childArrivalOrder : 0;\n this._localZOrder = (this._localZOrder & 0xffff0000) | arrivalOrder;\n\n this.emit(EventType.SIBLING_ORDER_CHANGED);\n },\n\n /**\n * !#en\n * Set Group index of node without children.<br/>\n * Which Group this node belongs to will resolve that this node's collision components can collide with which other collision componentns.<br/>\n * !#zh\n * 设置节点本身的分组索引。不影响子节点<br/>\n * 节点的分组将关系到节点的碰撞组件可以与哪些碰撞组件相碰撞。<br/>\n * @property groupIndex\n * @type {Integer}\n * @default 0\n */\n setSelfGroupIndex (groupIndex) {\n this._groupIndex = groupIndex || 0;\n this._cullingMask = 1 << groupIndex;\n if (CC_JSB && CC_NATIVERENDERER) {\n this._proxy && this._proxy.updateCullingMask();\n }\n },\n\n /**\n * !#en\n * Adds a child to the node with z order and name.\n * !#zh\n * 添加子节点,并且可以修改该节点的 局部 Z 顺序和名字。\n * @method addChild\n * @param {Node} child - A child node\n * @param {Number} [zIndex] - Z order for drawing priority. Please refer to zIndex property\n * @param {String} [name] - A name to identify the node easily. Please refer to name property\n * @example\n * node.addChild(newNode, 1, \"node\");\n */\n addChild (child, zIndex, name) {\n if (CC_DEV && !cc.Node.isNode(child)) {\n return cc.errorID(1634, cc.js.getClassName(child));\n }\n cc.assertID(child, 1606);\n cc.assertID(child._parent === null, 1605);\n\n // invokes the parent setter\n child.parent = this;\n\n if (zIndex !== undefined) {\n child.zIndex = zIndex;\n }\n if (name !== undefined) {\n child.name = name;\n }\n },\n\n /**\n * !#en Stops all running actions and schedulers.\n * !#zh 停止所有正在播放的动作和计时器。\n * @method cleanup\n * @example\n * node.cleanup();\n */\n cleanup () {\n // actions\n ActionManagerExist && cc.director.getActionManager().removeAllActionsFromTarget(this);\n // event\n eventManager.removeListeners(this);\n\n // children\n var i, len = this._children.length, node;\n for (i = 0; i < len; ++i) {\n node = this._children[i];\n if (node)\n node.cleanup();\n }\n },\n\n /**\n * !#en Sorts the children array depends on children's zIndex and arrivalOrder,\n * normally you won't need to invoke this function.\n * !#zh 根据子节点的 zIndex 和 arrivalOrder 进行排序,正常情况下开发者不需要手动调用这个函数。\n *\n * @method sortAllChildren\n */\n sortAllChildren () {\n if (this._reorderChildDirty) {\n\n this._reorderChildDirty = false;\n\n // delay update arrivalOrder before sort children\n var _children = this._children, child;\n // reset arrivalOrder before sort children\n this._childArrivalOrder = 1;\n for (let i = 0, len = _children.length; i < len; i++) {\n child = _children[i];\n child._updateOrderOfArrival();\n }\n\n // Optimize reordering event code to fix problems with setting zindex\n // https://github.com/cocos-creator/2d-tasks/issues/1186\n eventManager._setDirtyForNode(this);\n\n if (_children.length > 1) {\n // insertion sort\n let child, child2;\n for (let i = 1, count = _children.length; i < count; i++) {\n child = _children[i];\n let j = i;\n for (; j > 0 &&\n (child2 = _children[j - 1])._localZOrder > child._localZOrder; j--) {\n _children[j] = child2;\n }\n _children[j] = child;\n }\n\n this.emit(EventType.CHILD_REORDER, this);\n }\n cc.director.__fastOff(cc.Director.EVENT_AFTER_UPDATE, this.sortAllChildren, this);\n }\n },\n\n _delaySort () {\n if (!this._reorderChildDirty) {\n this._reorderChildDirty = true;\n cc.director.__fastOn(cc.Director.EVENT_AFTER_UPDATE, this.sortAllChildren, this);\n }\n },\n\n _restoreProperties: CC_EDITOR && function () {\n /*\n * TODO: Refine this code after completing undo/redo 2.0.\n * The node will be destroyed when deleting in the editor,\n * but it will be reserved and reused for undo.\n */\n\n // restore 3d node\n this.is3DNode = this.is3DNode;\n\n if (!this._matrix) {\n this._matrix = cc.mat4(this._spaceInfo.localMat);\n Mat4.identity(this._matrix);\n }\n if (!this._worldMatrix) {\n this._worldMatrix = cc.mat4(this._spaceInfo.worldMat);\n Mat4.identity(this._worldMatrix);\n }\n\n this._localMatDirty = LocalDirtyFlag.ALL;\n this._worldMatDirty = true;\n\n this._fromEuler();\n\n this._renderFlag |= RenderFlow.FLAG_TRANSFORM | RenderFlow.FLAG_OPACITY_COLOR;\n if (this._renderComponent) {\n this._renderComponent.markForRender(true);\n }\n\n if (this._children.length > 0) {\n this._renderFlag |= RenderFlow.FLAG_CHILDREN;\n }\n },\n\n onRestore: CC_EDITOR && function () {\n this._onRestoreBase();\n\n this.emit(EventType.GROUP_CHANGED, this);\n this.emit(EventType.POSITION_CHANGED, this.position.clone());\n this.emit(EventType.SIZE_CHANGED, this._contentSize.clone());\n this.emit(EventType.ROTATION_CHANGED);\n this.emit(EventType.SCALE_CHANGED)\n this.emit(EventType.COLOR_CHANGED, this._color.clone());\n this.emit(EventType.ANCHOR_CHANGED);\n\n this._restoreProperties();\n\n var actionManager = cc.director.getActionManager();\n if (this._activeInHierarchy) {\n actionManager && actionManager.resumeTarget(this);\n eventManager.resumeTarget(this);\n }\n else {\n actionManager && actionManager.pauseTarget(this);\n eventManager.pauseTarget(this);\n }\n },\n\n};\n\nif (CC_EDITOR) {\n // deprecated, only used to import old data in editor\n js.mixin(NodeDefines.properties, {\n _scaleX: {\n default: undefined,\n type: cc.Float,\n editorOnly: true\n },\n _scaleY: {\n default: undefined,\n type: cc.Float,\n editorOnly: true\n },\n });\n}\n\nlet Node = cc.Class(NodeDefines);\n\n// 3D Node Property\n\n\n// Node Event\n\n/**\n * !#en\n * The position changing event, you can listen to this event through the statement this.node.on(cc.Node.EventType.POSITION_CHANGED, callback, this);\n * !#zh\n * 位置变动监听事件, 通过 this.node.on(cc.Node.EventType.POSITION_CHANGED, callback, this); 进行监听。\n * @event position-changed\n * @param {Vec2} oldPos - The old position, but this parameter is only available in editor!\n */\n/**\n * !#en\n * The size changing event, you can listen to this event through the statement this.node.on(cc.Node.EventType.SIZE_CHANGED, callback, this);\n * !#zh\n * 尺寸变动监听事件,通过 this.node.on(cc.Node.EventType.SIZE_CHANGED, callback, this); 进行监听。\n * @event size-changed\n * @param {Size} oldSize - The old size, but this parameter is only available in editor!\n */\n/**\n * !#en\n * The anchor changing event, you can listen to this event through the statement this.node.on(cc.Node.EventType.ANCHOR_CHANGED, callback, this);\n * !#zh\n * 锚点变动监听事件,通过 this.node.on(cc.Node.EventType.ANCHOR_CHANGED, callback, this); 进行监听。\n * @event anchor-changed\n */\n/**\n * !#en\n * The adding child event, you can listen to this event through the statement this.node.on(cc.Node.EventType.CHILD_ADDED, callback, this);\n * !#zh\n * 增加子节点监听事件,通过 this.node.on(cc.Node.EventType.CHILD_ADDED, callback, this); 进行监听。\n * @event child-added\n * @param {Node} child - child which have been added\n */\n/**\n * !#en\n * The removing child event, you can listen to this event through the statement this.node.on(cc.Node.EventType.CHILD_REMOVED, callback, this);\n * !#zh\n * 删除子节点监听事件,通过 this.node.on(cc.Node.EventType.CHILD_REMOVED, callback, this); 进行监听。\n * @event child-removed\n * @param {Node} child - child which have been removed\n */\n/**\n * !#en\n * The reordering child event, you can listen to this event through the statement this.node.on(cc.Node.EventType.CHILD_REORDER, callback, this);\n * !#zh\n * 子节点顺序变动监听事件,通过 this.node.on(cc.Node.EventType.CHILD_REORDER, callback, this); 进行监听。\n * @event child-reorder\n * @param {Node} node - node whose children have been reordered\n */\n/**\n * !#en\n * The group changing event, you can listen to this event through the statement this.node.on(cc.Node.EventType.GROUP_CHANGED, callback, this);\n * !#zh\n * 节点分组变动监听事件,通过 this.node.on(cc.Node.EventType.GROUP_CHANGED, callback, this); 进行监听。\n * @event group-changed\n * @param {Node} node - node whose group has changed\n */\n\n// Deprecated APIs\n\n/**\n * !#en\n * Returns the displayed opacity of Node,\n * the difference between displayed opacity and opacity is that displayed opacity is calculated based on opacity and parent node's opacity when cascade opacity enabled.\n * !#zh\n * 获取节点显示透明度,\n * 显示透明度和透明度之间的不同之处在于当启用级连透明度时,\n * 显示透明度是基于自身透明度和父节点透明度计算的。\n *\n * @method getDisplayedOpacity\n * @return {number} displayed opacity\n * @deprecated since v2.0, please use opacity property, cascade opacity is removed\n */\n\n/**\n * !#en\n * Returns the displayed color of Node,\n * the difference between displayed color and color is that displayed color is calculated based on color and parent node's color when cascade color enabled.\n * !#zh\n * 获取节点的显示颜色,\n * 显示颜色和颜色之间的不同之处在于当启用级连颜色时,\n * 显示颜色是基于自身颜色和父节点颜色计算的。\n *\n * @method getDisplayedColor\n * @return {Color}\n * @deprecated since v2.0, please use color property, cascade color is removed\n */\n\n/**\n * !#en Cascade opacity is removed from v2.0\n * Indicate whether node's opacity value affect its child nodes, default value is true.\n * !#zh 透明度级联功能从 v2.0 开始已移除\n * 节点的不透明度值是否影响其子节点,默认值为 true。\n * @property cascadeOpacity\n * @deprecated since v2.0\n * @type {Boolean}\n */\n\n/**\n * !#en Cascade opacity is removed from v2.0\n * Returns whether node's opacity value affect its child nodes.\n * !#zh 透明度级联功能从 v2.0 开始已移除\n * 返回节点的不透明度值是否影响其子节点。\n * @method isCascadeOpacityEnabled\n * @deprecated since v2.0\n * @return {Boolean}\n */\n\n/**\n * !#en Cascade opacity is removed from v2.0\n * Enable or disable cascade opacity, if cascade enabled, child nodes' opacity will be the multiplication of parent opacity and its own opacity.\n * !#zh 透明度级联功能从 v2.0 开始已移除\n * 启用或禁用级连不透明度,如果级连启用,子节点的不透明度将是父不透明度乘上它自己的不透明度。\n * @method setCascadeOpacityEnabled\n * @deprecated since v2.0\n * @param {Boolean} cascadeOpacityEnabled\n */\n\n/**\n * !#en Opacity modify RGB have been removed since v2.0\n * Set whether color should be changed with the opacity value,\n * useless in ccsg.Node, but this function is override in some class to have such behavior.\n * !#zh 透明度影响颜色配置已经被废弃\n * 设置更改透明度时是否修改RGB值\n * @method setOpacityModifyRGB\n * @deprecated since v2.0\n * @param {Boolean} opacityValue\n */\n\n/**\n * !#en Opacity modify RGB have been removed since v2.0\n * Get whether color should be changed with the opacity value.\n * !#zh 透明度影响颜色配置已经被废弃\n * 获取更改透明度时是否修改RGB值。\n * @method isOpacityModifyRGB\n * @deprecated since v2.0\n * @return {Boolean}\n */\n\n\nlet _p = Node.prototype;\njs.getset(_p, 'position', _p.getPosition, _p.setPosition, false, true);\n\nif (CC_EDITOR) {\n let vec3_tmp = new Vec3();\n cc.js.getset(_p, 'worldEulerAngles', function () {\n let angles = new Vec3(this._eulerAngles);\n let parent = this.parent;\n while (parent) {\n angles.addSelf(parent._eulerAngles);\n parent = parent.parent;\n }\n return angles;\n }, function (v) {\n vec3_tmp.set(v);\n let parent = this.parent;\n while (parent) {\n vec3_tmp.subSelf(parent._eulerAngles);\n parent = parent.parent;\n }\n this.eulerAngles = vec3_tmp;\n });\n}\n\ncc.Node = module.exports = Node;\n","/****************************************************************************\n Copyright (c) 2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n'use strict';\n\nconst Node = require('./CCNode');\nconst RenderFlow = require('./renderer/render-flow');\n\nconst HideInHierarchy = cc.Object.Flags.HideInHierarchy;\nconst LocalDirtyFlag = Node._LocalDirtyFlag;\nconst POSITION_ON = 1 << 0;\n\n/**\n * !#en\n * Class of private entities in Cocos Creator scenes.<br/>\n * The PrivateNode is hidden in editor, and completely transparent to users.<br/>\n * It's normally used as Node's private content created by components in parent node.<br/>\n * So in theory private nodes are not children, they are part of the parent node.<br/>\n * Private node have two important characteristics:<br/>\n * 1. It has the minimum z index and cannot be modified, because they can't be displayed over real children.<br/>\n * 2. The positioning of private nodes is also special, they will consider the left bottom corner of the parent node's bounding box as the origin of local coordinates.<br/>\n * In this way, they can be easily kept inside the bounding box.<br/>\n * Currently, it's used by RichText component and TileMap component.\n * !#zh\n * Cocos Creator 场景中的私有节点类。<br/>\n * 私有节点在编辑器中不可见,对用户透明。<br/>\n * 通常私有节点是被一些特殊的组件创建出来作为父节点的一部分而存在的,理论上来说,它们不是子节点,而是父节点的组成部分。<br/>\n * 私有节点有两个非常重要的特性:<br/>\n * 1. 它有着最小的渲染排序的 Z 轴深度,并且无法被更改,因为它们不能被显示在其他正常子节点之上。<br/>\n * 2. 它的定位也是特殊的,对于私有节点来说,父节点包围盒的左下角是它的局部坐标系原点,这个原点相当于父节点的位置减去它锚点的偏移。这样私有节点可以比较容易被控制在包围盒之中。<br/>\n * 目前在引擎中RichText 和 TileMap 都有可能生成私有节点。\n * @class PrivateNode\n * @constructor\n * @param {String} name\n * @extends Node\n */\nlet PrivateNode = cc.Class({\n name: 'cc.PrivateNode',\n extends: Node,\n\n properties: {\n x: {\n get () {\n return this._originPos.x;\n },\n set (value) {\n var localPosition = this._originPos;\n if (value !== localPosition.x) {\n localPosition.x = value;\n this._posDirty(true);\n }\n },\n override: true\n },\n y: {\n get () {\n return this._originPos.y;\n },\n set (value) {\n var localPosition = this._originPos;\n if (value !== localPosition.y) {\n localPosition.y = value;\n this._posDirty(true);\n }\n },\n override: true\n },\n zIndex: {\n get () {\n return cc.macro.MIN_ZINDEX;\n },\n set () {\n },\n override: true\n },\n showInEditor: {\n default: false,\n editorOnly: true,\n override: true\n }\n },\n\n /**\n * @method constructor\n * @param {String} [name]\n */\n ctor (name) {\n this._localZOrder = cc.macro.MIN_ZINDEX << 16;\n this._originPos = cc.v2();\n if (CC_EDITOR) {\n this._objFlags |= HideInHierarchy;\n }\n },\n\n _posDirty (sendEvent) {\n this.setLocalDirty(LocalDirtyFlag.POSITION);\n !CC_NATIVERENDERER && (this._renderFlag |= RenderFlow.FLAG_TRANSFORM);\n if (sendEvent === true && (this._eventMask & POSITION_ON)) {\n this.emit(Node.EventType.POSITION_CHANGED);\n }\n },\n\n _updateLocalMatrix() {\n if (!this._localMatDirty) return;\n\n let parent = this.parent;\n if (parent) {\n // Position correction for transform calculation\n this._trs[0] = this._originPos.x - (parent._anchorPoint.x - 0.5) * parent._contentSize.width;\n this._trs[1] = this._originPos.y - (parent._anchorPoint.y - 0.5) * parent._contentSize.height;\n }\n\n this._super();\n },\n\n getPosition () {\n return new cc.Vec2(this._originPos);\n },\n\n setPosition (x, y) {\n if (y === undefined) {\n x = x.x;\n y = x.y;\n }\n\n let pos = this._originPos;\n if (pos.x === x && pos.y === y) {\n return;\n }\n pos.x = x;\n pos.y = y;\n this._posDirty(true);\n },\n\n setParent(value) {\n let oldParent = this._parent;\n this._super(value);\n if (oldParent !== value) {\n if (oldParent) {\n oldParent.off(Node.EventType.ANCHOR_CHANGED, this._posDirty, this);\n }\n if (value) {\n value.on(Node.EventType.ANCHOR_CHANGED, this._posDirty, this);\n }\n }\n },\n\n // do not update order of arrival\n _updateOrderOfArrival() {},\n});\n\nlet proto = PrivateNode.prototype;\ncc.js.getset(proto, \"parent\", proto.getParent, proto.setParent);\ncc.js.getset(proto, \"position\", proto.getPosition, proto.setPosition);\n\nif (CC_EDITOR) {\n // check components to avoid missing node reference serialied in previous version\n proto._onBatchCreated = function (dontSyncChildPrefab) {\n for (let comp of this._components) {\n comp.node = this;\n }\n\n Node.prototype._onBatchCreated.call(this, dontSyncChildPrefab);\n };\n}\n\ncc.PrivateNode = module.exports = PrivateNode;\n","/****************************************************************************\n Copyright (c) 2015-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos2d-x.org\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar NIL = function () {};\n\n/**\n * !#en\n * cc.Scene is a subclass of cc.Node that is used only as an abstract concept.<br/>\n * cc.Scene and cc.Node are almost identical with the difference that users can not modify cc.Scene manually.\n * !#zh\n * cc.Scene 是 cc.Node 的子类,仅作为一个抽象的概念。<br/>\n * cc.Scene 和 cc.Node 有点不同,用户不应直接修改 cc.Scene。\n * @class Scene\n * @extends Node\n */\ncc.Scene = cc.Class({\n name: 'cc.Scene',\n extends: require('./CCNode'),\n\n properties: {\n _is3DNode: {\n default: true,\n override: true\n },\n\n /**\n * !#en Indicates whether all (directly or indirectly) static referenced assets of this scene are releasable by default after scene unloading.\n * !#zh 指示该场景中直接或间接静态引用到的所有资源是否默认在场景切换后自动释放。\n * @property {Boolean} autoReleaseAssets\n * @default false\n */\n autoReleaseAssets: false,\n },\n\n ctor: function () {\n this._anchorPoint.x = 0.0;\n this._anchorPoint.y = 0.0;\n\n this._activeInHierarchy = false;\n this._inited = !cc.game._isCloning;\n\n if (CC_EDITOR) {\n this._prefabSyncedInLiveReload = false;\n }\n\n // cache all depend assets for auto release\n this.dependAssets = null;\n },\n\n destroy: function () {\n if (cc.Object.prototype.destroy.call(this)) {\n var children = this._children;\n for (var i = 0; i < children.length; ++i) {\n children[i].active = false;\n }\n }\n this._active = false;\n this._activeInHierarchy = false;\n },\n\n _onHierarchyChanged: NIL,\n _instantiate : null,\n\n _load: function () {\n if (!this._inited) {\n if (CC_TEST) {\n cc.assert(!this._activeInHierarchy, 'Should deactivate ActionManager and EventManager by default');\n }\n this._onBatchCreated(CC_EDITOR && this._prefabSyncedInLiveReload);\n this._inited = true;\n }\n },\n\n _activate: function (active) {\n active = (active !== false);\n if (CC_EDITOR || CC_TEST) {\n // register all nodes to editor\n this._registerIfAttached(active);\n }\n cc.director._nodeActivator.activateNode(this, active);\n }\n});\n\nmodule.exports = cc.Scene;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * @module cc\n */\nconst js = require('./platform/js');\nconst IdGenerater = require('./platform/id-generater');\nconst MAX_POOL_SIZE = 20;\n\nvar idGenerater = new IdGenerater('Scheduler');\n\n//data structures\n/*\n * A list double-linked list used for \"updates with priority\"\n * @class ListEntry\n * @param {Object} target not retained (retained by hashUpdateEntry)\n * @param {Number} priority\n * @param {Boolean} paused\n * @param {Boolean} markedForDeletion selector will no longer be called and entry will be removed at end of the next tick\n */\nvar ListEntry = function (target, priority, paused, markedForDeletion) {\n this.target = target;\n this.priority = priority;\n this.paused = paused;\n this.markedForDeletion = markedForDeletion;\n};\n\nvar _listEntries = [];\nListEntry.get = function (target, priority, paused, markedForDeletion) {\n var result = _listEntries.pop();\n if (result) {\n result.target = target;\n result.priority = priority;\n result.paused = paused;\n result.markedForDeletion = markedForDeletion;\n }\n else {\n result = new ListEntry(target, priority, paused, markedForDeletion);\n }\n return result;\n};\nListEntry.put = function (entry) {\n if (_listEntries.length < MAX_POOL_SIZE) {\n entry.target = null;\n _listEntries.push(entry);\n }\n};\n\n/*\n * A update entry list\n * @class HashUpdateEntry\n * @param {Array} list Which list does it belong to ?\n * @param {ListEntry} entry entry in the list\n * @param {Object} target hash key (retained)\n * @param {function} callback\n */\nvar HashUpdateEntry = function (list, entry, target, callback) {\n this.list = list;\n this.entry = entry;\n this.target = target;\n this.callback = callback;\n};\nvar _hashUpdateEntries = [];\nHashUpdateEntry.get = function (list, entry, target, callback) {\n var result = _hashUpdateEntries.pop();\n if (result) {\n result.list = list;\n result.entry = entry;\n result.target = target;\n result.callback = callback;\n }\n else {\n result = new HashUpdateEntry(list, entry, target, callback);\n }\n return result;\n};\nHashUpdateEntry.put = function (entry) {\n if (_hashUpdateEntries.length < MAX_POOL_SIZE) {\n entry.list = entry.entry = entry.target = entry.callback = null;\n _hashUpdateEntries.push(entry);\n }\n};\n\n//\n/*\n * Hash Element used for \"selectors with interval\"\n * @class HashTimerEntry\n * @param {Array} timers\n * @param {Object} target hash key (retained)\n * @param {Number} timerIndex\n * @param {Timer} currentTimer\n * @param {Boolean} currentTimerSalvaged\n * @param {Boolean} paused\n */\nvar HashTimerEntry = function (timers, target, timerIndex, currentTimer, currentTimerSalvaged, paused) {\n var _t = this;\n _t.timers = timers;\n _t.target = target;\n _t.timerIndex = timerIndex;\n _t.currentTimer = currentTimer;\n _t.currentTimerSalvaged = currentTimerSalvaged;\n _t.paused = paused;\n};\nvar _hashTimerEntries = [];\nHashTimerEntry.get = function (timers, target, timerIndex, currentTimer, currentTimerSalvaged, paused) {\n var result = _hashTimerEntries.pop();\n if (result) {\n result.timers = timers;\n result.target = target;\n result.timerIndex = timerIndex;\n result.currentTimer = currentTimer;\n result.currentTimerSalvaged = currentTimerSalvaged;\n result.paused = paused;\n }\n else {\n result = new HashTimerEntry(timers, target, timerIndex, currentTimer, currentTimerSalvaged, paused);\n }\n return result;\n};\nHashTimerEntry.put = function (entry) {\n if (_hashTimerEntries.length < MAX_POOL_SIZE) {\n entry.timers = entry.target = entry.currentTimer = null;\n _hashTimerEntries.push(entry);\n }\n};\n\n/*\n * Light weight timer\n * @extends cc.Class\n */\nfunction CallbackTimer () {\n this._lock = false;\n this._scheduler = null;\n this._elapsed = -1;\n this._runForever = false;\n this._useDelay = false;\n this._timesExecuted = 0;\n this._repeat = 0;\n this._delay = 0;\n this._interval = 0;\n\n this._target = null;\n this._callback = null;\n}\n\nvar proto = CallbackTimer.prototype;\n\nproto.initWithCallback = function (scheduler, callback, target, seconds, repeat, delay) {\n this._lock = false;\n this._scheduler = scheduler;\n this._target = target;\n this._callback = callback;\n\n this._elapsed = -1;\n this._interval = seconds;\n this._delay = delay;\n this._useDelay = (this._delay > 0);\n this._repeat = repeat;\n this._runForever = (this._repeat === cc.macro.REPEAT_FOREVER);\n return true;\n};\n/**\n * @return {Number} returns interval of timer\n */\nproto.getInterval = function(){return this._interval;};\n/**\n * @param {Number} interval set interval in seconds\n */\nproto.setInterval = function(interval){this._interval = interval;};\n\n/**\n * triggers the timer\n * @param {Number} dt delta time\n */\nproto.update = function (dt) {\n if (this._elapsed === -1) {\n this._elapsed = 0;\n this._timesExecuted = 0;\n } else {\n this._elapsed += dt;\n if (this._runForever && !this._useDelay) {//standard timer usage\n if (this._elapsed >= this._interval) {\n this.trigger();\n this._elapsed = 0;\n }\n } else {//advanced usage\n if (this._useDelay) {\n if (this._elapsed >= this._delay) {\n this.trigger();\n\n this._elapsed -= this._delay;\n this._timesExecuted += 1;\n this._useDelay = false;\n }\n } else {\n if (this._elapsed >= this._interval) {\n this.trigger();\n\n this._elapsed = 0;\n this._timesExecuted += 1;\n }\n }\n\n if (this._callback && !this._runForever && this._timesExecuted > this._repeat)\n this.cancel();\n }\n }\n};\n\nproto.getCallback = function(){\n return this._callback;\n};\n\nproto.trigger = function () {\n if (this._target && this._callback) {\n this._lock = true;\n this._callback.call(this._target, this._elapsed);\n this._lock = false;\n }\n};\n\nproto.cancel = function () {\n //override\n this._scheduler.unschedule(this._callback, this._target);\n};\n\nvar _timers = [];\nCallbackTimer.get = function () {\n return _timers.pop() || new CallbackTimer();\n};\nCallbackTimer.put = function (timer) {\n if (_timers.length < MAX_POOL_SIZE && !timer._lock) {\n timer._scheduler = timer._target = timer._callback = null;\n _timers.push(timer);\n }\n};\n\n/**\n * !#en\n * Scheduler is responsible of triggering the scheduled callbacks.<br/>\n * You should not use NSTimer. Instead use this class.<br/>\n * <br/>\n * There are 2 different types of callbacks (selectors):<br/>\n * - update callback: the 'update' callback will be called every frame. You can customize the priority.<br/>\n * - custom callback: A custom callback will be called every frame, or with a custom interval of time<br/>\n * <br/>\n * The 'custom selectors' should be avoided when possible. It is faster,\n * and consumes less memory to use the 'update callback'. *\n * !#zh\n * Scheduler 是负责触发回调函数的类。<br/>\n * 通常情况下,建议使用 cc.director.getScheduler() 来获取系统定时器。<br/>\n * 有两种不同类型的定时器:<br/>\n * - update 定时器:每一帧都会触发。您可以自定义优先级。<br/>\n * - 自定义定时器:自定义定时器可以每一帧或者自定义的时间间隔触发。<br/>\n * 如果希望每帧都触发,应该使用 update 定时器,使用 update 定时器更快,而且消耗更少的内存。\n *\n * @class Scheduler\n */\ncc.Scheduler = function () {\n this._timeScale = 1.0;\n this._updatesNegList = []; // list of priority < 0\n this._updates0List = []; // list of priority == 0\n this._updatesPosList = []; // list of priority > 0\n this._hashForUpdates = js.createMap(true); // hash used to fetch quickly the list entries for pause, delete, etc\n this._hashForTimers = js.createMap(true); // Used for \"selectors with interval\"\n this._currentTarget = null;\n this._currentTargetSalvaged = false;\n this._updateHashLocked = false; // If true unschedule will not remove anything from a hash. Elements will only be marked for deletion.\n\n this._arrayForTimers = []; // Speed up indexing\n //this._arrayForUpdates = []; // Speed up indexing\n};\n\ncc.Scheduler.prototype = {\n constructor: cc.Scheduler,\n //-----------------------private method----------------------\n\n _removeHashElement: function (element) {\n delete this._hashForTimers[element.target._id];\n var arr = this._arrayForTimers;\n for (var i = 0, l = arr.length; i < l; i++) {\n if (arr[i] === element) {\n arr.splice(i, 1);\n break;\n }\n }\n HashTimerEntry.put(element);\n },\n\n _removeUpdateFromHash: function (entry) {\n var targetId = entry.target._id;\n var self = this, element = self._hashForUpdates[targetId];\n if (element) {\n // Remove list entry from list\n var list = element.list, listEntry = element.entry;\n for (var i = 0, l = list.length; i < l; i++) {\n if (list[i] === listEntry) {\n list.splice(i, 1);\n break;\n }\n }\n\n delete self._hashForUpdates[targetId];\n ListEntry.put(listEntry);\n HashUpdateEntry.put(element);\n }\n },\n\n _priorityIn: function (ppList, listElement, priority) {\n for (var i = 0; i < ppList.length; i++){\n if (priority < ppList[i].priority) {\n ppList.splice(i, 0, listElement);\n return;\n }\n }\n ppList.push(listElement);\n },\n\n _appendIn: function (ppList, listElement) {\n ppList.push(listElement);\n },\n\n //-----------------------public method-------------------------\n /**\n * !#en This method should be called for any target which needs to schedule tasks, and this method should be called before any scheduler API usage.\n * This method will add a `_id` property if it doesn't exist.\n * !#zh 任何需要用 Scheduler 管理任务的对象主体都应该调用这个方法,并且应该在调用任何 Scheduler API 之前调用这个方法。\n * 这个方法会给对象添加一个 `_id` 属性,如果这个属性不存在的话。\n * @method enableForTarget\n * @param {Object} target\n */\n enableForTarget: function (target) {\n if (!target._id) {\n if (target.__instanceId) {\n cc.warnID(1513);\n }\n else {\n target._id = idGenerater.getNewId();\n }\n }\n },\n\n /**\n * !#en\n * Modifies the time of all scheduled callbacks.<br/>\n * You can use this property to create a 'slow motion' or 'fast forward' effect.<br/>\n * Default is 1.0. To create a 'slow motion' effect, use values below 1.0.<br/>\n * To create a 'fast forward' effect, use values higher than 1.0.<br/>\n * NoteIt will affect EVERY scheduled selector / action.\n * !#zh\n * 设置时间间隔的缩放比例。<br/>\n * 您可以使用这个方法来创建一个 “slow motion慢动作” 或 “fast forward快进” 的效果。<br/>\n * 默认是 1.0。要创建一个 “slow motion慢动作” 效果,使用值低于 1.0。<br/>\n * 要使用 “fast forward快进” 效果,使用值大于 1.0。<br/>\n * 注意:它影响该 Scheduler 下管理的所有定时器。\n * @method setTimeScale\n * @param {Number} timeScale\n */\n setTimeScale: function (timeScale) {\n this._timeScale = timeScale;\n },\n\n /**\n * !#en Returns time scale of scheduler.\n * !#zh 获取时间间隔的缩放比例。\n * @method getTimeScale\n * @return {Number}\n */\n getTimeScale: function () {\n return this._timeScale;\n },\n\n /**\n * !#en 'update' the scheduler. (You should NEVER call this method, unless you know what you are doing.)\n * !#zh update 调度函数。(不应该直接调用这个方法,除非完全了解这么做的结果)\n * @method update\n * @param {Number} dt delta time\n */\n update: function (dt) {\n this._updateHashLocked = true;\n if(this._timeScale !== 1)\n dt *= this._timeScale;\n\n var i, list, len, entry;\n\n for(i=0,list=this._updatesNegList, len = list.length; i<len; i++){\n entry = list[i];\n if (!entry.paused && !entry.markedForDeletion)\n entry.target.update(dt);\n }\n\n for(i=0, list=this._updates0List, len=list.length; i<len; i++){\n entry = list[i];\n if (!entry.paused && !entry.markedForDeletion)\n entry.target.update(dt);\n }\n\n for(i=0, list=this._updatesPosList, len=list.length; i<len; i++){\n entry = list[i];\n if (!entry.paused && !entry.markedForDeletion)\n entry.target.update(dt);\n }\n\n // Iterate over all the custom selectors\n var elt, arr = this._arrayForTimers;\n for(i=0; i<arr.length; i++){\n elt = arr[i];\n this._currentTarget = elt;\n this._currentTargetSalvaged = false;\n\n if (!elt.paused){\n // The 'timers' array may change while inside this loop\n for (elt.timerIndex = 0; elt.timerIndex < elt.timers.length; ++(elt.timerIndex)){\n elt.currentTimer = elt.timers[elt.timerIndex];\n elt.currentTimerSalvaged = false;\n\n elt.currentTimer.update(dt);\n elt.currentTimer = null;\n }\n }\n\n // only delete currentTarget if no actions were scheduled during the cycle (issue #481)\n if (this._currentTargetSalvaged && this._currentTarget.timers.length === 0) {\n this._removeHashElement(this._currentTarget);\n --i;\n }\n }\n\n // delete all updates that are marked for deletion\n // updates with priority < 0\n for(i=0,list=this._updatesNegList; i<list.length; ){\n entry = list[i];\n if(entry.markedForDeletion)\n this._removeUpdateFromHash(entry);\n else\n i++;\n }\n\n for(i=0, list=this._updates0List; i<list.length; ){\n entry = list[i];\n if (entry.markedForDeletion)\n this._removeUpdateFromHash(entry);\n else\n i++;\n }\n\n for(i=0, list=this._updatesPosList; i<list.length; ){\n entry = list[i];\n if (entry.markedForDeletion)\n this._removeUpdateFromHash(entry);\n else\n i++;\n }\n\n this._updateHashLocked = false;\n this._currentTarget = null;\n },\n\n /**\n * !#en\n * <p>\n * The scheduled method will be called every 'interval' seconds.<br/>\n * If paused is YES, then it won't be called until it is resumed.<br/>\n * If 'interval' is 0, it will be called every frame, but if so, it recommended to use 'scheduleUpdateForTarget:' instead.<br/>\n * If the callback function is already scheduled, then only the interval parameter will be updated without re-scheduling it again.<br/>\n * repeat let the action be repeated repeat + 1 times, use cc.macro.REPEAT_FOREVER to let the action run continuously<br/>\n * delay is the amount of time the action will wait before it'll start. Unit: s.<br/>\n * </p>\n * !#zh\n * 指定回调函数,调用对象等信息来添加一个新的定时器。<br/>\n * 如果 paused 值为 true那么直到 resume 被调用才开始计时。<br/>\n * 当时间间隔达到指定值时,设置的回调函数将会被调用。<br/>\n * 如果 interval 值为 0那么回调函数每一帧都会被调用但如果是这样\n * 建议使用 scheduleUpdateForTarget 代替。<br/>\n * 如果回调函数已经被定时器使用,那么只会更新之前定时器的时间间隔参数,不会设置新的定时器。<br/>\n * repeat 值可以让定时器触发 repeat + 1 次,使用 cc.macro.REPEAT_FOREVER\n * 可以让定时器一直循环触发。<br/>\n * delay 值指定延迟时间,定时器会在延迟指定的时间之后开始计时,单位: 秒。\n * @method schedule\n * @param {Function} callback\n * @param {Object} target\n * @param {Number} interval\n * @param {Number} [repeat=cc.macro.REPEAT_FOREVER]\n * @param {Number} [delay=0]\n * @param {Boolean} paused\n * @example {@link cocos2d/core/CCScheduler/schedule.js}\n * @typescript\n * schedule(callback: Function, target: any, interval: number, repeat: number, delay: number, paused?: boolean): void\n * schedule(callback: Function, target: any, interval: number, paused?: boolean): void\n */\n schedule: function (callback, target, interval, repeat, delay, paused) {\n 'use strict';\n if (typeof callback !== 'function') {\n var tmp = callback;\n callback = target;\n target = tmp;\n }\n //selector, target, interval, repeat, delay, paused\n //selector, target, interval, paused\n if (arguments.length === 4 || arguments.length === 5) {\n paused = !!repeat;\n repeat = cc.macro.REPEAT_FOREVER;\n delay = 0;\n }\n\n cc.assertID(target, 1502);\n\n var targetId = target._id;\n if (!targetId) {\n if (target.__instanceId) {\n cc.warnID(1513);\n targetId = target._id = target.__instanceId;\n }\n else {\n cc.errorID(1510);\n }\n }\n var element = this._hashForTimers[targetId];\n if (!element) {\n // Is this the 1st element ? Then set the pause level to all the callback_fns of this target\n element = HashTimerEntry.get(null, target, 0, null, null, paused);\n this._arrayForTimers.push(element);\n this._hashForTimers[targetId] = element;\n } else if (element.paused !== paused) {\n cc.warnID(1511);\n }\n\n var timer, i;\n if (element.timers == null) {\n element.timers = [];\n }\n else {\n for (i = 0; i < element.timers.length; ++i) {\n timer = element.timers[i];\n if (timer && callback === timer._callback) {\n cc.logID(1507, timer.getInterval(), interval);\n timer._interval = interval;\n return;\n }\n }\n }\n\n timer = CallbackTimer.get();\n timer.initWithCallback(this, callback, target, interval, repeat, delay);\n element.timers.push(timer);\n\n if (this._currentTarget === element && this._currentTargetSalvaged) {\n this._currentTargetSalvaged = false;\n }\n },\n\n /**\n * !#en\n * Schedules the update callback for a given target,\n * During every frame after schedule started, the \"update\" function of target will be invoked.\n * !#zh\n * 使用指定的优先级为指定的对象设置 update 定时器。\n * update 定时器每一帧都会被触发,触发时自动调用指定对象的 \"update\" 函数。\n * 优先级的值越低,定时器被触发的越早。\n * @method scheduleUpdate\n * @param {Object} target\n * @param {Number} priority\n * @param {Boolean} paused\n */\n scheduleUpdate: function(target, priority, paused) {\n var targetId = target._id;\n if (!targetId) {\n if (target.__instanceId) {\n cc.warnID(1513);\n targetId = target._id = target.__instanceId;\n }\n else {\n cc.errorID(1510);\n }\n }\n var hashElement = this._hashForUpdates[targetId];\n if (hashElement && hashElement.entry){\n // check if priority has changed\n if (hashElement.entry.priority !== priority){\n if (this._updateHashLocked){\n cc.logID(1506);\n hashElement.entry.markedForDeletion = false;\n hashElement.entry.paused = paused;\n return;\n }else{\n // will be added again outside if (hashElement).\n this.unscheduleUpdate(target);\n }\n }else{\n hashElement.entry.markedForDeletion = false;\n hashElement.entry.paused = paused;\n return;\n }\n }\n\n var listElement = ListEntry.get(target, priority, paused, false);\n var ppList;\n\n // most of the updates are going to be 0, that's way there\n // is an special list for updates with priority 0\n if (priority === 0) {\n ppList = this._updates0List;\n this._appendIn(ppList, listElement);\n }\n else {\n ppList = priority < 0 ? this._updatesNegList : this._updatesPosList;\n this._priorityIn(ppList, listElement, priority);\n }\n\n //update hash entry for quick access\n this._hashForUpdates[targetId] = HashUpdateEntry.get(ppList, listElement, target, null);\n },\n\n /**\n * !#en\n * Unschedules a callback for a callback and a given target.\n * If you want to unschedule the \"update\", use `unscheduleUpdate()`\n * !#zh\n * 取消指定对象定时器。\n * 如果需要取消 update 定时器,请使用 unscheduleUpdate()。\n * @method unschedule\n * @param {Function} callback The callback to be unscheduled\n * @param {Object} target The target bound to the callback.\n */\n unschedule: function (callback, target) {\n //callback, target\n\n // explicity handle nil arguments when removing an object\n if (!target || !callback)\n return;\n var targetId = target._id;\n if (!targetId) {\n if (target.__instanceId) {\n cc.warnID(1513);\n targetId = target._id = target.__instanceId;\n }\n else {\n cc.errorID(1510);\n }\n }\n\n var self = this, element = self._hashForTimers[targetId];\n if (element) {\n var timers = element.timers;\n for(var i = 0, li = timers.length; i < li; i++){\n var timer = timers[i];\n if (callback === timer._callback) {\n if ((timer === element.currentTimer) && (!element.currentTimerSalvaged)) {\n element.currentTimerSalvaged = true;\n }\n timers.splice(i, 1);\n CallbackTimer.put(timer);\n //update timerIndex in case we are in tick;, looping over the actions\n if (element.timerIndex >= i) {\n element.timerIndex--;\n }\n\n if (timers.length === 0) {\n if (self._currentTarget === element) {\n self._currentTargetSalvaged = true;\n } else {\n self._removeHashElement(element);\n }\n }\n return;\n }\n }\n }\n },\n\n /** \n * !#en Unschedules the update callback for a given target.\n * !#zh 取消指定对象的 update 定时器。\n * @method unscheduleUpdate\n * @param {Object} target The target to be unscheduled.\n */\n unscheduleUpdate: function (target) {\n if (!target)\n return;\n var targetId = target._id;\n if (!targetId) {\n if (target.__instanceId) {\n cc.warnID(1513);\n targetId = target._id = target.__instanceId;\n }\n else {\n cc.errorID(1510);\n }\n }\n\n var element = this._hashForUpdates[targetId];\n if (element) {\n if (this._updateHashLocked) {\n element.entry.markedForDeletion = true;\n } else {\n this._removeUpdateFromHash(element.entry);\n }\n }\n },\n\n /** \n * !#en\n * Unschedules all scheduled callbacks for a given target.\n * This also includes the \"update\" callback.\n * !#zh 取消指定对象的所有定时器,包括 update 定时器。\n * @method unscheduleAllForTarget\n * @param {Object} target The target to be unscheduled.\n */\n unscheduleAllForTarget: function (target) {\n // explicit nullptr handling\n if (!target){\n return;\n }\n var targetId = target._id;\n if (!targetId) {\n if (target.__instanceId) {\n cc.warnID(1513);\n targetId = target._id = target.__instanceId;\n }\n else {\n cc.errorID(1510);\n }\n }\n\n // Custom Selectors\n var element = this._hashForTimers[targetId];\n if (element) {\n var timers = element.timers;\n if (timers.indexOf(element.currentTimer) > -1 && \n (!element.currentTimerSalvaged)) {\n element.currentTimerSalvaged = true;\n }\n for (var i = 0, l = timers.length; i < l; i++) {\n CallbackTimer.put(timers[i]);\n }\n timers.length = 0;\n\n if (this._currentTarget === element){\n this._currentTargetSalvaged = true;\n }else{\n this._removeHashElement(element);\n }\n }\n\n // update selector\n this.unscheduleUpdate(target);\n },\n\n /**\n * !#en\n * Unschedules all scheduled callbacks from all targets including the system callbacks.<br/>\n * You should NEVER call this method, unless you know what you are doing.\n * !#zh\n * 取消所有对象的所有定时器,包括系统定时器。<br/>\n * 不要调用此函数,除非你确定你在做什么。\n * @method unscheduleAll\n */\n unscheduleAll: function(){\n this.unscheduleAllWithMinPriority(cc.Scheduler.PRIORITY_SYSTEM);\n },\n\n /**\n * !#en\n * Unschedules all callbacks from all targets with a minimum priority.<br/>\n * You should only call this with `PRIORITY_NON_SYSTEM_MIN` or higher.\n * !#zh\n * 取消所有优先级的值大于指定优先级的定时器。<br/>\n * 你应该只取消优先级的值大于 PRIORITY_NON_SYSTEM_MIN 的定时器。\n * @method unscheduleAllWithMinPriority\n * @param {Number} minPriority The minimum priority of selector to be unscheduled. Which means, all selectors which\n * priority is higher than minPriority will be unscheduled.\n */\n unscheduleAllWithMinPriority: function(minPriority){\n // Custom Selectors\n var i, element, arr = this._arrayForTimers;\n for(i=arr.length-1; i>=0; i--){\n element = arr[i];\n this.unscheduleAllForTarget(element.target);\n }\n\n // Updates selectors\n var entry;\n var temp_length = 0;\n if(minPriority < 0){\n for(i=0; i<this._updatesNegList.length; ){\n temp_length = this._updatesNegList.length;\n entry = this._updatesNegList[i];\n if(entry && entry.priority >= minPriority)\n this.unscheduleUpdate(entry.target);\n if (temp_length == this._updatesNegList.length)\n i++;\n }\n }\n\n if(minPriority <= 0){\n for(i=0; i<this._updates0List.length; ){\n temp_length = this._updates0List.length;\n entry = this._updates0List[i];\n if (entry)\n this.unscheduleUpdate(entry.target);\n if (temp_length == this._updates0List.length)\n i++;\n }\n }\n\n for(i=0; i<this._updatesPosList.length; ){\n temp_length = this._updatesPosList.length;\n entry = this._updatesPosList[i];\n if(entry && entry.priority >= minPriority)\n this.unscheduleUpdate(entry.target);\n if (temp_length == this._updatesPosList.length)\n i++;\n }\n },\n\n /** \n * !#en Checks whether a callback for a given target is scheduled.\n * !#zh 检查指定的回调函数和回调对象组合是否存在定时器。\n * @method isScheduled\n * @param {Function} callback The callback to check.\n * @param {Object} target The target of the callback.\n * @return {Boolean} True if the specified callback is invoked, false if not.\n */\n isScheduled: function(callback, target){\n //key, target\n //selector, target\n cc.assertID(callback, 1508);\n cc.assertID(target, 1509);\n var targetId = target._id;\n if (!targetId) {\n if (target.__instanceId) {\n cc.warnID(1513);\n targetId = target._id = target.__instanceId;\n }\n else {\n cc.errorID(1510);\n }\n }\n \n var element = this._hashForTimers[targetId];\n\n if (!element) {\n return false;\n }\n\n if (element.timers == null){\n return false;\n }\n else {\n var timers = element.timers;\n for (var i = 0; i < timers.length; ++i) {\n var timer = timers[i];\n\n if (callback === timer._callback){\n return true;\n }\n }\n return false;\n }\n },\n\n /**\n * !#en\n * Pause all selectors from all targets.<br/>\n * You should NEVER call this method, unless you know what you are doing.\n * !#zh\n * 暂停所有对象的所有定时器。<br/>\n * 不要调用这个方法,除非你知道你正在做什么。\n * @method pauseAllTargets\n */\n pauseAllTargets: function () {\n return this.pauseAllTargetsWithMinPriority(cc.Scheduler.PRIORITY_SYSTEM);\n },\n\n /**\n * !#en\n * Pause all selectors from all targets with a minimum priority. <br/>\n * You should only call this with kCCPriorityNonSystemMin or higher.\n * !#zh\n * 暂停所有优先级的值大于指定优先级的定时器。<br/>\n * 你应该只暂停优先级的值大于 PRIORITY_NON_SYSTEM_MIN 的定时器。\n * @method pauseAllTargetsWithMinPriority\n * @param {Number} minPriority\n */\n pauseAllTargetsWithMinPriority: function (minPriority) {\n var idsWithSelectors = [];\n\n var self = this, element, locArrayForTimers = self._arrayForTimers;\n var i, li;\n // Custom Selectors\n for(i = 0, li = locArrayForTimers.length; i < li; i++){\n element = locArrayForTimers[i];\n if (element) {\n element.paused = true;\n idsWithSelectors.push(element.target);\n }\n }\n\n var entry;\n if(minPriority < 0){\n for(i=0; i<this._updatesNegList.length; i++){\n entry = this._updatesNegList[i];\n if (entry) {\n if(entry.priority >= minPriority){\n entry.paused = true;\n idsWithSelectors.push(entry.target);\n }\n }\n }\n }\n\n if(minPriority <= 0){\n for(i=0; i<this._updates0List.length; i++){\n entry = this._updates0List[i];\n if (entry) {\n entry.paused = true;\n idsWithSelectors.push(entry.target);\n }\n }\n }\n\n for(i=0; i<this._updatesPosList.length; i++){\n entry = this._updatesPosList[i];\n if (entry) {\n if(entry.priority >= minPriority){\n entry.paused = true;\n idsWithSelectors.push(entry.target);\n }\n }\n }\n\n return idsWithSelectors;\n },\n\n /**\n * !#en\n * Resume selectors on a set of targets.<br/>\n * This can be useful for undoing a call to pauseAllCallbacks.\n * !#zh\n * 恢复指定数组中所有对象的定时器。<br/>\n * 这个函数是 pauseAllCallbacks 的逆操作。\n * @method resumeTargets\n * @param {Array} targetsToResume\n */\n resumeTargets: function (targetsToResume) {\n if (!targetsToResume)\n return;\n\n for (var i = 0; i < targetsToResume.length; i++) {\n this.resumeTarget(targetsToResume[i]);\n }\n },\n\n /**\n * !#en\n * Pauses the target.<br/>\n * All scheduled selectors/update for a given target won't be 'ticked' until the target is resumed.<br/>\n * If the target is not present, nothing happens.\n * !#zh\n * 暂停指定对象的定时器。<br/>\n * 指定对象的所有定时器都会被暂停。<br/>\n * 如果指定的对象没有定时器,什么也不会发生。\n * @method pauseTarget\n * @param {Object} target\n */\n pauseTarget: function (target) {\n cc.assertID(target, 1503);\n var targetId = target._id;\n if (!targetId) {\n if (target.__instanceId) {\n cc.warnID(1513);\n targetId = target._id = target.__instanceId;\n }\n else {\n cc.errorID(1510);\n }\n }\n\n //customer selectors\n var self = this, \n element = self._hashForTimers[targetId];\n if (element) {\n element.paused = true;\n }\n\n //update callback\n var elementUpdate = self._hashForUpdates[targetId];\n if (elementUpdate) {\n elementUpdate.entry.paused = true;\n }\n },\n\n /**\n * !#en\n * Resumes the target.<br/>\n * The 'target' will be unpaused, so all schedule selectors/update will be 'ticked' again.<br/>\n * If the target is not present, nothing happens.\n * !#zh\n * 恢复指定对象的所有定时器。<br/>\n * 指定对象的所有定时器将继续工作。<br/>\n * 如果指定的对象没有定时器,什么也不会发生。\n * @method resumeTarget\n * @param {Object} target\n */\n resumeTarget: function (target) {\n cc.assertID(target, 1504);\n var targetId = target._id;\n if (!targetId) {\n if (target.__instanceId) {\n cc.warnID(1513);\n targetId = target._id = target.__instanceId;\n }\n else {\n cc.errorID(1510);\n }\n }\n\n // custom selectors\n var self = this,\n element = self._hashForTimers[targetId];\n if (element) {\n element.paused = false;\n }\n\n //update callback\n var elementUpdate = self._hashForUpdates[targetId];\n if (elementUpdate) {\n elementUpdate.entry.paused = false;\n }\n },\n\n /**\n * !#en Returns whether or not the target is paused.\n * !#zh 返回指定对象的定时器是否暂停了。\n * @method isTargetPaused\n * @param {Object} target\n * @return {Boolean}\n */\n isTargetPaused: function (target) {\n cc.assertID(target, 1505);\n var targetId = target._id;\n if (!targetId) {\n if (target.__instanceId) {\n cc.warnID(1513);\n targetId = target._id = target.__instanceId;\n }\n else {\n cc.errorID(1510);\n }\n }\n\n // Custom selectors\n var element = this._hashForTimers[targetId];\n if (element) {\n return element.paused;\n }\n var elementUpdate = this._hashForUpdates[targetId];\n if (elementUpdate) {\n return elementUpdate.entry.paused;\n }\n return false;\n },\n};\n\n/**\n * !#en Priority level reserved for system services.\n * !#zh 系统服务的优先级。\n * @property PRIORITY_SYSTEM\n * @type {Number}\n * @static\n */\ncc.Scheduler.PRIORITY_SYSTEM = 1 << 31;\n\n/**\n * !#en Minimum priority level for user scheduling.\n * !#zh 用户调度最低优先级。\n * @property PRIORITY_NON_SYSTEM\n * @type {Number}\n * @static\n */\ncc.Scheduler.PRIORITY_NON_SYSTEM = cc.Scheduler.PRIORITY_SYSTEM + 1;\n\nmodule.exports = cc.Scheduler;\n","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst preprocess = require('./preprocess');\nconst fetch = require('./fetch');\nconst Cache = require('./cache');\nconst helper = require('./helper');\nconst releaseManager = require('./releaseManager');\nconst dependUtil = require('./depend-util');\nconst load = require('./load');\nconst Pipeline = require('./pipeline');\nconst Task = require('./task');\nconst RequestItem = require('./request-item');\nconst downloader = require('./downloader');\nconst parser = require('./parser');\nconst packManager = require('./pack-manager');\nconst Bundle = require('./bundle');\nconst builtins = require('./builtins');\nconst factory = require('./factory');\nconst { parse, combine } = require('./urlTransformer');\nconst { parseParameters, asyncify } = require('./utilities');\nconst { assets, files, parsed, pipeline, transformPipeline, fetchPipeline, RequestType, bundles, BuiltinBundleName } = require('./shared');\n\n\n/**\n * @module cc\n */\n/**\n * !#en\n * This module controls asset's behaviors and information, include loading, releasing etc. it is a singleton\n * All member can be accessed with `cc.assetManager`.\n * \n * !#zh\n * 此模块管理资源的行为和信息,包括加载,释放等,这是一个单例,所有成员能够通过 `cc.assetManager` 调用\n * \n * @class AssetManager\n */\nfunction AssetManager () {\n\n this._preprocessPipe = preprocess;\n\n this._fetchPipe = fetch;\n\n this._loadPipe = load;\n\n /**\n * !#en \n * Normal loading pipeline\n * \n * !#zh\n * 正常加载管线\n * \n * @property pipeline\n * @type {Pipeline}\n */\n this.pipeline = pipeline.append(preprocess).append(load);\n \n /**\n * !#en \n * Fetching pipeline\n * \n * !#zh\n * 下载管线\n * \n * @property fetchPipeline\n * @type {Pipeline}\n */\n this.fetchPipeline = fetchPipeline.append(preprocess).append(fetch);\n\n /**\n * !#en \n * Url transformer\n * \n * !#zh\n * Url 转换器\n * \n * @property transformPipeline\n * @type {Pipeline}\n */\n this.transformPipeline = transformPipeline.append(parse).append(combine);\n\n\n /**\n * !#en \n * The collection of bundle which is already loaded, you can remove cache with {{#crossLink \"AssetManager/removeBundle:method\"}}{{/crossLink}}\n * \n * !#zh\n * 已加载 bundle 的集合, 你能通过 {{#crossLink \"AssetManager/removeBundle:method\"}}{{/crossLink}} 来移除缓存\n * \n * @property bundles\n * @type {Cache}\n * @typescript\n * bundles: AssetManager.Cache<AssetManager.Bundle>\n */\n this.bundles = bundles;\n\n /**\n * !#en \n * The collection of asset which is already loaded, you can remove cache with {{#crossLink \"AssetManager/releaseAsset:method\"}}{{/crossLink}}\n * \n * !#zh\n * 已加载资源的集合, 你能通过 {{#crossLink \"AssetManager/releaseAsset:method\"}}{{/crossLink}} 来移除缓存\n * \n * @property assets\n * @type {Cache}\n * @typescript\n * assets: AssetManager.Cache<cc.Asset>\n */\n this.assets = assets;\n \n this._files = files;\n \n this._parsed = parsed;\n\n this.generalImportBase = '';\n\n this.generalNativeBase = '';\n\n /**\n * !#en \n * Manage relationship between asset and its dependencies\n * \n * !#zh\n * 管理资源依赖关系\n * \n * @property dependUtil\n * @type {DependUtil}\n */\n this.dependUtil = dependUtil;\n\n this._releaseManager = releaseManager;\n\n /**\n * !#en \n * Whether or not cache the loaded asset\n * \n * !#zh\n * 是否缓存已加载的资源\n * \n * @property cacheAsset\n * @type {boolean}\n */\n this.cacheAsset = true;\n\n /**\n * !#en \n * Whether or not load asset forcely, if it is true, asset will be loaded regardless of error\n * \n * !#zh\n * 是否强制加载资源, 如果为 true ,加载资源将会忽略报错\n * \n * @property force\n * @type {boolean}\n */\n this.force = false;\n\n /**\n * !#en \n * Some useful function\n * \n * !#zh\n * 一些有用的方法\n * \n * @property utils\n * @type {Helper}\n */\n this.utils = helper;\n\n /**\n * !#en \n * Manage all downloading task\n * \n * !#zh\n * 管理所有下载任务\n * \n * @property downloader\n * @type {Downloader}\n */\n this.downloader = downloader; \n\n /**\n * !#en \n * Manage all parsing task\n * \n * !#zh\n * 管理所有解析任务\n * \n * @property parser\n * @type {Parser}\n */\n this.parser = parser;\n\n /**\n * !#en \n * Manage internal asset\n * \n * !#zh\n * 管理内置资源\n * \n * @property builtins\n * @type {Builtins}\n */\n this.builtins = builtins;\n\n /**\n * !#en \n * Manage all packed asset\n * \n * !#zh\n * 管理所有合并后的资源\n * \n * @property packManager\n * @type {PackManager}\n */\n this.packManager = packManager;\n\n this.factory = factory;\n\n /**\n * !#en \n * Cache manager is a module which controls all caches downloaded from server in non-web platform.\n * \n * !#zh\n * 缓存管理器是一个模块,在非 WEB 平台上,用于管理所有从服务器上下载下来的缓存\n * \n * @property cacheManager\n * @type {cc.AssetManager.CacheManager}\n * @typescript\n * cacheManager: cc.AssetManager.CacheManager|null\n */\n this.cacheManager = null;\n\n /**\n * !#en \n * The preset of options\n * \n * !#zh\n * 可选参数的预设集\n * \n * @property presets\n * @type {Object}\n * @typescript\n * presets: Record<string, Record<string, any>>\n */\n this.presets = {\n 'default': {\n priority: 0,\n },\n\n 'preload': {\n maxConcurrency: 2, \n maxRequestsPerFrame: 2,\n priority: -1,\n },\n\n 'scene': {\n maxConcurrency: 8, \n maxRequestsPerFrame: 8,\n priority: 1,\n },\n\n 'bundle': {\n maxConcurrency: 8, \n maxRequestsPerFrame: 8,\n priority: 2,\n },\n\n 'remote': {\n maxRetryCount: 4\n },\n\n 'script': {\n maxConcurrency: 1024,\n maxRequestsPerFrame: 1024,\n priority: 2\n }\n }\n\n}\n\nAssetManager.Pipeline = Pipeline;\nAssetManager.Task = Task;\nAssetManager.Cache = Cache;\nAssetManager.RequestItem = RequestItem;\nAssetManager.Bundle = Bundle;\nAssetManager.BuiltinBundleName = BuiltinBundleName;\n\nAssetManager.prototype = {\n\n constructor: AssetManager,\n\n /**\n * !#en \n * The builtin 'main' bundle\n * \n * !#zh\n * 内置 main 包\n * \n * @property main\n * @readonly\n * @type {Bundle}\n */\n get main () {\n return bundles.get(BuiltinBundleName.MAIN);\n },\n\n /**\n * !#en \n * The builtin 'resources' bundle\n * \n * !#zh\n * 内置 resources 包\n * \n * @property resources\n * @readonly\n * @type {Bundle}\n */\n get resources () {\n return bundles.get(BuiltinBundleName.RESOURCES);\n },\n\n /**\n * !#en \n * The builtin 'internal' bundle\n * \n * !#zh\n * 内置 internal 包\n * \n * @property internal\n * @readonly\n * @type {Bundle}\n */\n get internal () {\n return bundles.get(BuiltinBundleName.INTERNAL);\n },\n\n /**\n * !#en\n * Initialize assetManager with options\n * \n * !#zh\n * 初始化资源管理器\n * \n * @method init\n * @param {Object} options \n * \n * @typescript\n * init(options: Record<string, any>): void\n */\n init (options) {\n options = options || Object.create(null);\n this._files.clear();\n this._parsed.clear();\n this._releaseManager.init();\n this.assets.clear();\n this.bundles.clear();\n this.packManager.init();\n this.downloader.init(options.bundleVers, options.server);\n this.parser.init();\n this.dependUtil.init();\n this.generalImportBase = options.importBase;\n this.generalNativeBase = options.nativeBase;\n },\n\n /**\n * !#en \n * Get the bundle which has been loaded\n * \n * !#zh\n * 获取已加载的分包\n * \n * @method getBundle\n * @param {String} name - The name of bundle \n * @return {Bundle} - The loaded bundle\n * \n * @example\n * // ${project}/assets/test1\n * cc.assetManager.getBundle('test1');\n * \n * cc.assetManager.getBundle('resources');\n * \n * @typescript\n * getBundle (name: string): cc.AssetManager.Bundle\n */\n getBundle (name) {\n return bundles.get(name);\n },\n\n /**\n * !#en \n * Remove this bundle. NOTE: The asset whthin this bundle will not be released automatically, you can call {{#crossLink \"Bundle/releaseAll:method\"}}{{/crossLink}} manually before remove it if you need\n * \n * !#zh \n * 移除此包, 注意:这个包内的资源不会自动释放, 如果需要的话你可以在摧毁之前手动调用 {{#crossLink \"Bundle/releaseAll:method\"}}{{/crossLink}} 进行释放\n *\n * @method removeBundle\n * @param {Bundle} bundle - The bundle to be removed \n * \n * @typescript\n * removeBundle(bundle: cc.AssetManager.Bundle): void\n */\n removeBundle (bundle) {\n bundle._destroy();\n bundles.remove(bundle.name);\n },\n\n /**\n * !#en\n * General interface used to load assets with a progression callback and a complete callback. You can achieve almost all effect you want with combination of `requests` and `options`.\n * It is highly recommended that you use more simple API, such as `load`, `loadDir` etc. Every custom parameter in `options` will be distribute to each of `requests`. \n * if request already has same one, the parameter in request will be given priority. Besides, if request has dependencies, `options` will distribute to dependencies too.\n * Every custom parameter in `requests` will be tranfered to handler of `downloader` and `parser` as `options`. \n * You can register you own handler downloader or parser to collect these custom parameters for some effect.\n * \n * Reserved Keyword: `uuid`, `url`, `path`, `dir`, `scene`, `type`, `priority`, `preset`, `audioLoadMode`, `ext`, `bundle`, `onFileProgress`, `maxConcurrency`, `maxRequestsPerFrame`\n * `maxRetryCount`, `version`, `responseType`, `withCredentials`, `mimeType`, `timeout`, `header`, `reload`, `cacheAsset`, `cacheEnabled`,\n * Please DO NOT use these words as custom options!\n * \n * !#zh\n * 通用加载资源接口,可传入进度回调以及完成回调,通过组合 `request` 和 `options` 参数几乎可以实现和扩展所有想要的加载效果。非常建议你使用更简单的API例如 `load`、`loadDir` 等。\n * `options` 中的自定义参数将会分发到 `requests` 的每一项中如果request中已存在同名的参数则以 `requests` 中为准,同时如果有其他\n * 依赖资源,则 `options` 中的参数会继续向依赖项中分发。request中的自定义参数都会以 `options` 形式传入加载流程中的 `downloader`, `parser` 的方法中, 你可以\n * 扩展 `downloader`, `parser` 收集参数完成想实现的效果。\n * \n * 保留关键字: `uuid`, `url`, `path`, `dir`, `scene`, `type`, `priority`, `preset`, `audioLoadMode`, `ext`, `bundle`, `onFileProgress`, `maxConcurrency`, `maxRequestsPerFrame`\n * `maxRetryCount`, `version`, `responseType`, `withCredentials`, `mimeType`, `timeout`, `header`, `reload`, `cacheAsset`, `cacheEnabled`,\n * 请不要使用这些字段为自定义参数!\n * \n * @method loadAny\n * @param {string|string[]|Object|Object[]} requests - The request you want to load\n * @param {Object} [options] - Optional parameters\n * @param {Function} [onProgress] - Callback invoked when progression change\n * @param {Number} onProgress.finished - The number of the items that are already completed\n * @param {Number} onProgress.total - The total number of the items\n * @param {RequestItem} onProgress.item - The current request item\n * @param {Function} [onComplete] - Callback invoked when finish loading\n * @param {Error} onComplete.err - The error occured in loading process.\n * @param {Object} onComplete.data - The loaded content\n * \n * @example\n * cc.assetManager.loadAny({url: 'http://example.com/a.png'}, (err, img) => cc.log(img));\n * cc.assetManager.loadAny(['60sVXiTH1D/6Aft4MRt9VC'], (err, assets) => cc.log(assets));\n * cc.assetManager.loadAny([{ uuid: '0cbZa5Y71CTZAccaIFluuZ'}, {url: 'http://example.com/a.png'}], (err, assets) => cc.log(assets));\n * cc.assetManager.downloader.register('.asset', (url, options, onComplete) => {\n * url += '?userName=' + options.userName + \"&password=\" + options.password;\n * cc.assetManager.downloader.downloadFile(url, null, onComplete);\n * });\n * cc.assetManager.parser.register('.asset', (file, options, onComplete) => {\n * var json = JSON.parse(file);\n * var skin = json[options.skin];\n * var model = json[options.model];\n * onComplete(null, {skin, model});\n * });\n * cc.assetManager.loadAny({ url: 'http://example.com/my.asset', skin: 'xxx', model: 'xxx', userName: 'xxx', password: 'xxx' });\n * \n * @typescript\n * loadAny(requests: string | string[] | Record<string, any> | Record<string, any>[], options: Record<string, any>, onProgress: (finished: number, total: number, item: cc.AssetManager.RequestItem) => void, onComplete: (err: Error, data: any) => void): void\n * loadAny(requests: string | string[] | Record<string, any> | Record<string, any>[], onProgress: (finished: number, total: number, item: cc.AssetManager.RequestItem) => void, onComplete: (err: Error, data: any) => void): void\n * loadAny(requests: string | string[] | Record<string, any> | Record<string, any>[], options: Record<string, any>, onComplete: (err: Error, data: any) => void): void\n * loadAny(requests: string | string[] | Record<string, any> | Record<string, any>[], onComplete: (err: Error, data: any) => void): void\n * loadAny(requests: string | string[] | Record<string, any> | Record<string, any>[], options: Record<string, any>): void\n * loadAny(requests: string | string[] | Record<string, any> | Record<string, any>[]): void\n */\n loadAny (requests, options, onProgress, onComplete) {\n var { options, onProgress, onComplete } = parseParameters(options, onProgress, onComplete);\n \n options.preset = options.preset || 'default';\n requests = Array.isArray(requests) ? requests.concat() : requests;\n let task = new Task({input: requests, onProgress, onComplete: asyncify(onComplete), options});\n pipeline.async(task);\n },\n\n /**\n * !#en\n * General interface used to preload assets with a progression callback and a complete callback.It is highly recommended that you use more simple API, such as `preloadRes`, `preloadResDir` etc.\n * Everything about preload is just likes `cc.assetManager.loadAny`, the difference is `cc.assetManager.preloadAny` will only download asset but not parse asset. You need to invoke `cc.assetManager.loadAny(preloadTask)` \n * to finish loading asset\n * \n * !#zh\n * 通用预加载资源接口,可传入进度回调以及完成回调,非常建议你使用更简单的 API ,例如 `preloadRes`, `preloadResDir` 等。`preloadAny` 和 `loadAny` 几乎一样,区别在于 `preloadAny` 只会下载资源,不会去解析资源,你需要调用 `cc.assetManager.loadAny(preloadTask)`\n * 来完成资源加载。\n * \n * @method preloadAny\n * @param {string|string[]|Object|Object[]} requests - The request you want to preload\n * @param {Object} [options] - Optional parameters\n * @param {Function} [onProgress] - Callback invoked when progression change\n * @param {Number} onProgress.finished - The number of the items that are already completed\n * @param {Number} onProgress.total - The total number of the items\n * @param {RequestItem} onProgress.item - The current request item\n * @param {Function} [onComplete] - Callback invoked when finish preloading\n * @param {Error} onComplete.err - The error occured in preloading process.\n * @param {RequestItem[]} onComplete.items - The preloaded content\n * \n * @example\n * cc.assetManager.preloadAny('0cbZa5Y71CTZAccaIFluuZ', (err) => cc.assetManager.loadAny('0cbZa5Y71CTZAccaIFluuZ'));\n * \n * @typescript\n * preloadAny(requests: string | string[] | Record<string, any> | Record<string, any>[], options: Record<string, any>, onProgress: (finished: number, total: number, item: cc.AssetManager.RequestItem) => void, onComplete: (err: Error, items: cc.AssetManager.RequestItem[]) => void): void\n * preloadAny(requests: string | string[] | Record<string, any> | Record<string, any>[], onProgress: (finished: number, total: number, item: cc.AssetManager.RequestItem) => void, onComplete: (err: Error, items: cc.AssetManager.RequestItem[]) => void): void\n * preloadAny(requests: string | string[] | Record<string, any> | Record<string, any>[], options: Record<string, any>, onComplete: (err: Error, items: cc.AssetManager.RequestItem[]) => void): void\n * preloadAny(requests: string | string[] | Record<string, any> | Record<string, any>[], onComplete: (err: Error, items: cc.AssetManager.RequestItem[]) => void): void\n * preloadAny(requests: string | string[] | Record<string, any> | Record<string, any>[], options: Record<string, any>): void\n * preloadAny(requests: string | string[] | Record<string, any> | Record<string, any>[]): void\n */\n preloadAny (requests, options, onProgress, onComplete) {\n var { options, onProgress, onComplete } = parseParameters(options, onProgress, onComplete);\n \n options.preset = options.preset || 'preload';\n requests = Array.isArray(requests) ? requests.concat() : requests;\n var task = new Task({input: requests, onProgress, onComplete: asyncify(onComplete), options});\n fetchPipeline.async(task);\n },\n\n /**\n * !#en\n * Load native file of asset, if you check the option 'Async Load Assets', you may need to load native file with this before you use the asset\n * \n * !#zh\n * 加载资源的原生文件,如果你勾选了'延迟加载资源'选项,你可能需要在使用资源之前调用此方法来加载原生文件\n * \n * @method postLoadNative\n * @param {Asset} asset - The asset\n * @param {Object} [options] - Some optional parameters\n * @param {Function} [onComplete] - Callback invoked when finish loading\n * @param {Error} onComplete.err - The error occured in loading process.\n * \n * @example\n * cc.assetManager.postLoadNative(texture, (err) => console.log(err));\n * \n * @typescript\n * postLoadNative(asset: cc.Asset, options: Record<string, any>, onComplete: (err: Error) => void): void\n * postLoadNative(asset: cc.Asset, onComplete: (err: Error) => void): void\n * postLoadNative(asset: cc.Asset, options: Record<string, any>): void\n * postLoadNative(asset: cc.Asset): void\n */\n postLoadNative (asset, options, onComplete) {\n if (!(asset instanceof cc.Asset)) throw new Error('input is not asset');\n var { options, onComplete } = parseParameters(options, undefined, onComplete);\n\n if (!asset._native || asset._nativeAsset) {\n return asyncify(onComplete)(null);\n }\n\n var depend = dependUtil.getNativeDep(asset._uuid);\n if (depend) {\n if (!bundles.has(depend.bundle)) {\n var bundle = bundles.find(function (bundle) {\n return bundle.getAssetInfo(asset._uuid);\n });\n if (bundle) {\n depend.bundle = bundle.name;\n }\n }\n \n this.loadAny(depend, options, function (err, native) {\n if (!err) {\n if (asset.isValid && !asset._nativeAsset) {\n asset._nativeAsset = native\n }\n }\n else {\n cc.error(err.message, err.stack);\n }\n onComplete && onComplete(err);\n });\n }\n },\n\n /**\n * !#en\n * Load remote asset with url, such as audio, image, text and so on.\n * \n * !#zh\n * 使用 url 加载远程资源,例如音频,图片,文本等等。\n * \n * @method loadRemote\n * @param {string} url - The url of asset\n * @param {Object} [options] - Some optional parameters\n * @param {cc.AudioClip.LoadMode} [options.audioLoadMode] - Indicate which mode audio you want to load\n * @param {string} [options.ext] - If the url does not have a extension name, you can specify one manually.\n * @param {Function} [onComplete] - Callback invoked when finish loading\n * @param {Error} onComplete.err - The error occured in loading process.\n * @param {Asset} onComplete.asset - The loaded texture\n * \n * @example\n * cc.assetManager.loadRemote('http://www.cloud.com/test1.jpg', (err, texture) => console.log(err));\n * cc.assetManager.loadRemote('http://www.cloud.com/test2.mp3', (err, audioClip) => console.log(err));\n * cc.assetManager.loadRemote('http://www.cloud.com/test3', { ext: '.png' }, (err, texture) => console.log(err));\n * \n * @typescript\n * loadRemote<T extends cc.Asset>(url: string, options: Record<string, any>, onComplete: (err: Error, asset: T) => void): void\n * loadRemote<T extends cc.Asset>(url: string, onComplete: (err: Error, asset: T) => void): void\n * loadRemote<T extends cc.Asset>(url: string, options: Record<string, any>): void\n * loadRemote<T extends cc.Asset>(url: string): void\n */\n loadRemote (url, options, onComplete) {\n var { options, onComplete } = parseParameters(options, undefined, onComplete);\n\n if (this.assets.has(url)) {\n return asyncify(onComplete)(null, this.assets.get(url));\n }\n\n options.__isNative__ = true;\n options.preset = options.preset || 'remote';\n this.loadAny({url}, options, null, function (err, data) {\n if (err) {\n cc.error(err.message, err.stack);\n onComplete && onComplete(err, null);\n }\n else {\n factory.create(url, data, options.ext || cc.path.extname(url), options, function (err, out) {\n onComplete && onComplete(err, out);\n });\n }\n });\n },\n\n /**\n * !#en\n * Load script \n * \n * !#zh\n * 加载脚本\n * \n * @method loadScript\n * @param {string|string[]} url - Url of the script\n * @param {Object} [options] - Some optional paramters\n * @param {boolean} [options.async] - Indicate whether or not loading process should be async\n * @param {Function} [onComplete] - Callback when script loaded or failed\n * @param {Error} onComplete.err - The occurred error, null indicetes success\n * \n * @example\n * loadScript('http://localhost:8080/index.js', null, (err) => console.log(err));\n * \n * @typescript\n * loadScript(url: string|string[], options: Record<string, any>, onComplete: (err: Error) => void): void\n * loadScript(url: string|string[], onComplete: (err: Error) => void): void\n * loadScript(url: string|string[], options: Record<string, any>): void\n * loadScript(url: string|string[]): void\n */\n loadScript (url, options, onComplete) {\n var { options, onComplete } = parseParameters(options, undefined, onComplete);\n options.__requestType__ = RequestType.URL;\n options.preset = options.preset || 'script';\n this.loadAny(url, options, onComplete);\n },\n\n /**\n * !#en\n * load bundle\n * \n * !#zh\n * 加载资源包\n * \n * @method loadBundle\n * @param {string} nameOrUrl - The name or root path of bundle\n * @param {Object} [options] - Some optional paramter, same like downloader.downloadFile\n * @param {string} [options.version] - The version of this bundle, you can check config.json in this bundle\n * @param {Function} [onComplete] - Callback when bundle loaded or failed\n * @param {Error} onComplete.err - The occurred error, null indicetes success\n * @param {Bundle} onComplete.bundle - The loaded bundle\n * \n * @example\n * loadBundle('http://localhost:8080/test', null, (err, bundle) => console.log(err));\n * \n * @typescript\n * loadBundle(nameOrUrl: string, options: Record<string, any>, onComplete: (err: Error, bundle: cc.AssetManager.Bundle) => void): void\n * loadBundle(nameOrUrl: string, onComplete: (err: Error, bundle: cc.AssetManager.Bundle) => void): void\n * loadBundle(nameOrUrl: string, options: Record<string, any>): void\n * loadBundle(nameOrUrl: string): void\n */\n loadBundle (nameOrUrl, options, onComplete) {\n var { options, onComplete } = parseParameters(options, undefined, onComplete);\n\n let bundleName = cc.path.basename(nameOrUrl);\n\n if (this.bundles.has(bundleName)) {\n return asyncify(onComplete)(null, this.getBundle(bundleName));\n }\n\n options.preset = options.preset || 'bundle';\n options.ext = 'bundle';\n this.loadRemote(nameOrUrl, options, onComplete);\n },\n\n /**\n * !#en\n * Release asset and it's dependencies.\n * This method will not only remove the cache of the asset in assetManager, but also clean up its content.\n * For example, if you release a texture, the texture asset and its gl texture data will be freed up.\n * Notice, this method may cause the texture to be unusable, if there are still other nodes use the same texture, they may turn to black and report gl errors.\n * \n * !#zh\n * 释放资源以及其依赖资源, 这个方法不仅会从 assetManager 中删除资源的缓存引用,还会清理它的资源内容。\n * 比如说,当你释放一个 texture 资源,这个 texture 和它的 gl 贴图数据都会被释放。\n * 注意,这个函数可能会导致资源贴图或资源所依赖的贴图不可用,如果场景中存在节点仍然依赖同样的贴图,它们可能会变黑并报 GL 错误。\n *\n * @method releaseAsset\n * @param {Asset} asset - The asset to be released\n * \n * @example\n * // release a texture which is no longer need\n * cc.assetManager.releaseAsset(texture);\n *\n * @typescript\n * releaseAsset(asset: cc.Asset): void\n */\n releaseAsset (asset) {\n releaseManager.tryRelease(asset, true);\n },\n\n /**\n * !#en \n * Release all unused assets. Refer to {{#crossLink \"AssetManager/releaseAsset:method\"}}{{/crossLink}} for detailed informations.\n * \n * !#zh \n * 释放所有没有用到的资源。详细信息请参考 {{#crossLink \"AssetManager/releaseAsset:method\"}}{{/crossLink}}\n *\n * @method releaseUnusedAssets\n * @private\n * \n * @typescript\n * releaseUnusedAssets(): void\n */\n releaseUnusedAssets () {\n assets.forEach(function (asset) {\n releaseManager.tryRelease(asset);\n });\n },\n\n /**\n * !#en \n * Release all assets. Refer to {{#crossLink \"AssetManager/releaseAsset:method\"}}{{/crossLink}} for detailed informations.\n * \n * !#zh \n * 释放所有资源。详细信息请参考 {{#crossLink \"AssetManager/releaseAsset:method\"}}{{/crossLink}}\n *\n * @method releaseAll\n * \n * @typescript\n * releaseAll(): void\n */\n releaseAll () {\n assets.forEach(function (asset) {\n releaseManager.tryRelease(asset, true);\n });\n if (CC_EDITOR) {\n dependUtil._depends.clear();\n }\n },\n\n _transform (input, options) {\n var subTask = Task.create({input, options});\n var urls = [];\n try {\n var result = transformPipeline.sync(subTask);\n for (var i = 0, l = result.length; i < l; i++) {\n var item = result[i];\n var url = item.url;\n item.recycle();\n urls.push(url);\n }\n }\n catch (e) {\n for (var i = 0, l = subTask.output.length; i < l; i++) {\n subTask.output[i].recycle();\n }\n cc.error(e.message, e.stack);\n }\n subTask.recycle();\n return urls.length > 1 ? urls : urls[0];\n }\n};\n\ncc.AssetManager = AssetManager;\n/**\n * @module cc\n */\n/**\n * @property assetManager\n * @type {AssetManager}\n */\ncc.assetManager = new AssetManager();\n\nObject.defineProperty(cc, 'resources', {\n /**\n * !#en\n * cc.resources is a bundle and controls all asset under assets/resources\n * \n * !#zh\n * cc.resources 是一个 bundle用于管理所有在 assets/resources 下的资源\n * \n * @property resources\n * @readonly\n * @type {AssetManager.Bundle}\n */\n get () {\n return bundles.get(BuiltinBundleName.RESOURCES);\n }\n});\n\n\nmodule.exports = cc.assetManager;\n\n/**\n * !#en\n * This module controls asset's behaviors and information, include loading, releasing etc. \n * All member can be accessed with `cc.assetManager`. All class or enum can be accessed with `cc.AssetManager`\n * \n * !#zh\n * 此模块管理资源的行为和信息,包括加载,释放等,所有成员能够通过 `cc.assetManager` 调用. 所有类型或枚举能通过 `cc.AssetManager` 访问\n * \n * @module cc.AssetManager\n */","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nconst Cache = require('./cache');\nconst releaseManager = require('./releaseManager');\nconst { BuiltinBundleName } = require('./shared'); \n\n/**\n * @module cc.AssetManager\n */\n/**\n * !#en\n * This module contains the builtin asset, it's a singleton, all member can be accessed with `cc.assetManager.builtins` \n * \n * !#zh\n * 此模块包含内建资源,这是一个单例,所有成员能通过 `cc.assetManager.builtins` 访问\n * \n * @class Builtins\n */\nvar builtins = {\n \n _assets: new Cache({ material: new Cache(), effect: new Cache() }), // builtin assets\n\n _loadBuiltins (name, cb) {\n let dirname = name + 's';\n let builtin = this._assets.get(name);\n return cc.assetManager.internal.loadDir(dirname, null, null, (err, assets) => {\n if (err) {\n cc.error(err.message, err.stack);\n }\n else {\n for (let i = 0; i < assets.length; i++) {\n var asset = assets[i];\n builtin.add(asset.name, asset.addRef());\n }\n }\n\n cb();\n });\n },\n\n /**\n * !#en\n * Initialize\n * \n * !#zh\n * 初始化 \n * \n * @method init\n * @param {Function} cb - Callback when finish loading built-in assets\n * \n * @typescript\n * init (cb: () => void): void\n */\n init (cb) {\n this.clear();\n if (cc.game.renderType === cc.game.RENDER_TYPE_CANVAS || !cc.assetManager.bundles.has(BuiltinBundleName.INTERNAL)) {\n return cb && cb();\n }\n\n this._loadBuiltins('effect', () => {\n this._loadBuiltins('material', () => {\n this._loadBuiltinsSP(cb);\n });\n });\n },\n\n _loadBuiltinsSP(cb) {\n cc.sp.MAX_MULTITEXTURE_NUM = 8;\n // cc.renderer.device.caps.maxTextureUnits\n\n this._loadMultiEffect('multi-2d-universal', (effect) => {\n cc.sp.multi2dSpriteEffectAsset = effect;\n effect.addRef();\n cc.sp.inited = true;\n cc.sp.multiBatcher.init();\n if (cc.dynamicAtlasManager.maxAtlasCount === -1) cc.dynamicAtlasManager.maxAtlasCount = Math.max(0, cc.sp.MAX_MULTITEXTURE_NUM - cc.sp.charAtlasAutoBatchCount);\n cb();\n });\n },\n\n _loadMultiEffect(name, cb) {\n if (CC_EDITOR) {\n cc.assetManager.loadAny(Editor.assetdb.remote.urlToUuid('db://service-pack-resources/sp/effects/' + name + '.effect'), function (err, effect) {\n if (err) {\n return Editor.error(err);\n } else {\n cb(effect);\n }\n });\n } else {\n cc.assetManager.loadBundle('sp', (err, bundle) => {\n if (err) {\n cc.error(err);\n } else {\n bundle.load('effects/' + name, cc.EffectAsset, (err, effect) => {\n if (err) {\n cc.error(err);\n } else {\n cb(effect);\n }\n });\n }\n });\n }\n },\n\n /**\n * !#en\n * Get the built-in asset using specific type and name.\n * \n * !#zh\n * 通过特定的类型和名称获取内建资源\n * \n * @method getBuiltin\n * @param {string} [type] - The type of asset, such as `effect`\n * @param {string} [name] - The name of asset, such as `phong`\n * @return {Asset|Cache} Builtin-assets\n * \n * @example\n * cc.assetManaer.builtins.getBuiltin('effect', 'phone');\n * \n * @typescript\n * getBuiltin(type?: string, name?: string): cc.Asset | Cache<cc.Asset>\n */\n getBuiltin (type, name) {\n if (arguments.length === 0) return this._assets;\n else if (arguments.length === 1) return this._assets.get(type);\n else return this._assets.get(type).get(name);\n },\n\n /**\n * !#en\n * Clear all builtin assets\n * \n * !#zh\n * 清空所有内置资源\n * \n * @method clear\n * \n * @typescript\n * clear(): void\n */\n clear () {\n this._assets.forEach(function (assets) {\n assets.forEach(function (asset) {\n releaseManager.tryRelease(asset, true);\n });\n assets.clear();\n });\n }\n}\n\nmodule.exports = builtins;\n","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nconst Config = require('./config');\nconst releaseManager = require('./releaseManager');\nconst { parseParameters, parseLoadResArgs } = require('./utilities');\nconst { RequestType, assets, bundles } = require('./shared');\n\n/**\n * @module cc.AssetManager\n */\n\n/**\n * !#en\n * A bundle contains an amount of assets(includes scene), you can load, preload, release asset which is in this bundle\n * \n * !#zh\n * 一个包含一定数量资源(包括场景)的包,你可以加载,预加载,释放此包内的资源\n * \n * @class Bundle\n */\nfunction Bundle () {\n this._config = new Config();\n}\n\nBundle.prototype = {\n \n /**\n * !#en\n * Create a bundle\n * \n * !#zh\n * 创建一个 bundle\n * \n * @method constructor\n * \n * @typescript\n * constructor()\n */\n constructor: Bundle,\n\n /**\n * !#en\n * The name of this bundle\n * \n * !#zh\n * 此 bundle 的名称\n * \n * @property name\n * @type {string}\n */\n get name () {\n return this._config.name;\n },\n\n /**\n * !#en\n * The dependency of this bundle\n * \n * !#zh\n * 此 bundle 的依赖\n * \n * @property deps\n * @type {string[]}\n */\n get deps () {\n return this._config.deps;\n },\n\n /**\n * !#en\n * The root path of this bundle, such like 'http://example.com/bundle1'\n * \n * !#zh\n * 此 bundle 的根路径, 例如 'http://example.com/bundle1'\n * \n * @property base\n * @type {string}\n */\n get base () {\n return this._config.base;\n },\n\n /**\n * !#en\n * Get asset's info using path, only valid when asset is in bundle folder.\n * \n * !#zh\n * 使用 path 获取资源的配置信息\n * \n * @method getInfoWithPath\n * @param {string} path - The relative path of asset, such as 'images/a'\n * @param {Function} [type] - The constructor of asset, such as `cc.Texture2D`\n * @returns {Object} The asset info \n * \n * @example\n * var info = bundle.getInfoWithPath('image/a', cc.Texture2D);\n * \n * @typescript\n * getInfoWithPath (path: string, type?: typeof cc.Asset): Record<string, any>\n */\n getInfoWithPath (path, type) {\n return this._config.getInfoWithPath(path, type);\n },\n\n /**\n * !#en\n * Get all asset's info within specific folder\n * \n * !#zh\n * 获取在某个指定文件夹下的所有资源信息\n * \n * @method getDirWithPath\n * @param {string} path - The relative path of folder, such as 'images'\n * @param {Function} [type] - The constructor should be used to filter paths\n * @param {Array} [out] - The output array\n * @returns {Object[]} Infos\n * \n * @example \n * var infos = [];\n * bundle.getDirWithPath('images', cc.Texture2D, infos);\n * \n * @typescript\n * getDirWithPath (path: string, type: typeof cc.Asset, out: Array<Record<string, any>>): Array<Record<string, any>>\n * getDirWithPath (path: string, type: typeof cc.Asset): Array<Record<string, any>>\n * getDirWithPath (path: string): Array<Record<string, any>>\n */\n getDirWithPath (path, type, out) {\n return this._config.getDirWithPath(path, type, out);\n },\n\n /**\n * !#en\n * Get asset's info with uuid\n * \n * !#zh\n * 通过 uuid 获取资源信息\n * \n * @method getAssetInfo\n * @param {string} uuid - The asset's uuid\n * @returns {Object} info \n * \n * @example\n * var info = bundle.getAssetInfo('fcmR3XADNLgJ1ByKhqcC5Z');\n * \n * @typescript\n * getAssetInfo (uuid: string): Record<string, any>\n */\n getAssetInfo (uuid) {\n return this._config.getAssetInfo(uuid);\n },\n\n /**\n * !#en\n * Get scene'info with name\n * \n * !#zh\n * 通过场景名获取场景信息\n * \n * @method getSceneInfo\n * @param {string} name - The name of scene\n * @return {Object} info\n * \n * @example\n * var info = bundle.getSceneInfo('first.fire');\n * \n * @typescript\n * getSceneInfo(name: string): Record<string, any>\n */\n getSceneInfo (name) {\n return this._config.getSceneInfo(name);\n },\n\n /**\n * !#en\n * Initialize this bundle with options\n * \n * !#zh\n * 初始化此 bundle\n * \n * @method init\n * @param {Object} options \n * \n * @typescript\n * init(options: Record<string, any>): void\n */\n init (options) {\n this._config.init(options);\n bundles.add(options.name, this);\n },\n\n /**\n * !#en\n * Load the asset within this bundle by the path which is relative to bundle's path\n * \n * !#zh\n * 通过相对路径加载分包中的资源。路径是相对分包文件夹路径的相对路径\n *\n * @method load\n * @param {String|String[]} paths - Paths of the target assets.The path is relative to the bundle's folder, extensions must be omitted.\n * @param {Function} [type] - Only asset of type will be loaded if this argument is supplied.\n * @param {Function} [onProgress] - Callback invoked when progression change.\n * @param {Number} onProgress.finish - The number of the items that are already completed.\n * @param {Number} onProgress.total - The total number of the items.\n * @param {RequestItem} onProgress.item - The finished request item.\n * @param {Function} [onComplete] - Callback invoked when all assets loaded.\n * @param {Error} onComplete.error - The error info or null if loaded successfully.\n * @param {Asset|Asset[]} onComplete.assets - The loaded assets.\n *\n * @example\n * // load the texture (${project}/assets/resources/textures/background.jpg) from resources\n * cc.resources.load('textures/background', cc.Texture2D, (err, texture) => console.log(err));\n * \n * // load the audio (${project}/assets/resources/music/hit.mp3) from resources\n * cc.resources.load('music/hit', cc.AudioClip, (err, audio) => console.log(err));\n * \n * // load the prefab (${project}/assets/bundle1/misc/character/cocos) from bundle1 folder\n * bundle1.load('misc/character/cocos', cc.Prefab, (err, prefab) => console.log(err));\n *\n * // load the sprite frame (${project}/assets/some/xxx/bundle2/imgs/cocos.png) from bundle2 folder\n * bundle2.load('imgs/cocos', cc.SpriteFrame, null, (err, spriteFrame) => console.log(err));\n * \n * @typescript\n * load<T extends cc.Asset>(paths: string, type: { prototype: T } onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, assets: T) => void): void\n * load<T extends cc.Asset>(paths: string[], type: { prototype: T }, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, assets: Array<T>) => void): void\n * load<T extends cc.Asset>(paths: string, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, assets: T) => void): void\n * load<T extends cc.Asset>(paths: string[], onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, assets: Array<T>) => void): void\n * load<T extends cc.Asset>(paths: string, type: { prototype: T }, onComplete?: (error: Error, assets: T) => void): void\n * load<T extends cc.Asset>(paths: string[], type: { prototype: T }, onComplete?: (error: Error, assets: Array<T>) => void): void\n * load<T extends cc.Asset>(paths: string, onComplete?: (error: Error, assets: T) => void): void\n * load<T extends cc.Asset>(paths: string[], onComplete?: (error: Error, assets: Array<T>) => void): void\n */\n load (paths, type, onProgress, onComplete) {\n var { type, onProgress, onComplete } = parseLoadResArgs(type, onProgress, onComplete);\n cc.assetManager.loadAny(paths, { __requestType__: RequestType.PATH, type: type, bundle: this.name, __outputAsArray__: Array.isArray(paths) }, onProgress, onComplete);\n },\n\n /**\n * !#en\n * Preload the asset within this bundle by the path which is relative to bundle's path. \n * After calling this method, you still need to finish loading by calling `Bundle.load`.\n * It will be totally fine to call `Bundle.load` at any time even if the preloading is not\n * yet finished\n * \n * !#zh\n * 通过相对路径预加载分包中的资源。路径是相对分包文件夹路径的相对路径。调用完后,你仍然需要通过 `Bundle.load` 来完成加载。\n * 就算预加载还没完成,你也可以直接调用 `Bundle.load`。\n *\n * @method preload\n * @param {String|String[]} paths - Paths of the target asset.The path is relative to bundle folder, extensions must be omitted.\n * @param {Function} [type] - Only asset of type will be loaded if this argument is supplied.\n * @param {Function} [onProgress] - Callback invoked when progression change.\n * @param {Number} onProgress.finish - The number of the items that are already completed.\n * @param {Number} onProgress.total - The total number of the items.\n * @param {RequestItem} onProgress.item - The finished request item.\n * @param {Function} [onComplete] - Callback invoked when the resource loaded.\n * @param {Error} onComplete.error - The error info or null if loaded successfully.\n * @param {RequestItem[]} onComplete.items - The preloaded items.\n * \n * @example\n * // preload the texture (${project}/assets/resources/textures/background.jpg) from resources\n * cc.resources.preload('textures/background', cc.Texture2D);\n * \n * // preload the audio (${project}/assets/resources/music/hit.mp3) from resources\n * cc.resources.preload('music/hit', cc.AudioClip);\n * // wait for while\n * cc.resources.load('music/hit', cc.AudioClip, (err, audioClip) => {});\n * \n * * // preload the prefab (${project}/assets/bundle1/misc/character/cocos) from bundle1 folder\n * bundle1.preload('misc/character/cocos', cc.Prefab);\n *\n * // load the sprite frame of (${project}/assets/bundle2/imgs/cocos.png) from bundle2 folder\n * bundle2.preload('imgs/cocos', cc.SpriteFrame);\n * // wait for while\n * bundle2.load('imgs/cocos', cc.SpriteFrame, (err, spriteFrame) => {});\n * \n * @typescript\n * preload(paths: string|string[], type: typeof cc.Asset, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, items: RequestItem[]) => void): void\n * preload(paths: string|string[], onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, items: RequestItem[]) => void): void\n * preload(paths: string|string[], type: typeof cc.Asset, onComplete: (error: Error, items: RequestItem[]) => void): void\n * preload(paths: string|string[], type: typeof cc.Asset): void\n * preload(paths: string|string[], onComplete: (error: Error, items: RequestItem[]) => void): void\n * preload(paths: string|string[]): void\n */\n preload (paths, type, onProgress, onComplete) {\n var { type, onProgress, onComplete } = parseLoadResArgs(type, onProgress, onComplete);\n cc.assetManager.preloadAny(paths, { __requestType__: RequestType.PATH, type: type, bundle: this.name }, onProgress, onComplete);\n },\n\n /**\n * !#en\n * Load all assets under a folder inside the bundle folder.<br>\n * <br>\n * Note: All asset paths in Creator use forward slashes, paths using backslashes will not work.\n * \n * !#zh\n * 加载目标文件夹中的所有资源, 注意:路径中只能使用斜杠,反斜杠将停止工作\n *\n * @method loadDir\n * @param {string} dir - path of the target folder.The path is relative to the bundle folder, extensions must be omitted.\n * @param {Function} [type] - Only asset of type will be loaded if this argument is supplied.\n * @param {Function} [onProgress] - Callback invoked when progression change.\n * @param {Number} onProgress.finish - The number of the items that are already completed.\n * @param {Number} onProgress.total - The total number of the items.\n * @param {Object} onProgress.item - The latest request item\n * @param {Function} [onComplete] - A callback which is called when all assets have been loaded, or an error occurs.\n * @param {Error} onComplete.error - If one of the asset failed, the complete callback is immediately called with the error. If all assets are loaded successfully, error will be null.\n * @param {Asset[]|Asset} onComplete.assets - An array of all loaded assets.\n * \n * @example\n * // load all audios (resources/audios/) \n * cc.resources.loadDir('audios', cc.AudioClip, (err, audios) => {});\n *\n * // load all textures in \"resources/imgs/\"\n * cc.resources.loadDir('imgs', cc.Texture2D, null, function (err, textures) {\n * var texture1 = textures[0];\n * var texture2 = textures[1];\n * });\n * \n * // load all prefabs (${project}/assets/bundle1/misc/characters/) from bundle1 folder\n * bundle1.loadDir('misc/characters', cc.Prefab, (err, prefabs) => console.log(err));\n *\n * // load all sprite frame (${project}/assets/some/xxx/bundle2/skills/) from bundle2 folder\n * bundle2.loadDir('skills', cc.SpriteFrame, null, (err, spriteFrames) => console.log(err));\n *\n * @typescript\n * loadDir<T extends cc.Asset>(dir: string, type: { prototype: T }, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, assets: Array<T>) => void): void\n * loadDir<T extends cc.Asset>(dir: string, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, assets: Array<T>) => void): void\n * loadDir<T extends cc.Asset>(dir: string, type: { prototype: T }, onComplete: (error: Error, assets: Array<T>) => void): void\n * loadDir<T extends cc.Asset>(dir: string, type: { prototype: T }): void\n * loadDir<T extends cc.Asset>(dir: string, onComplete: (error: Error, assets: Array<T>) => void): void\n * loadDir<T extends cc.Asset>(dir: string): void\n */\n loadDir (dir, type, onProgress, onComplete) {\n var { type, onProgress, onComplete } = parseLoadResArgs(type, onProgress, onComplete);\n cc.assetManager.loadAny(dir, { __requestType__: RequestType.DIR, type: type, bundle: this.name, __outputAsArray__: true }, onProgress, onComplete);\n },\n\n /**\n * !#en\n * Preload all assets under a folder inside the bundle folder.<br> After calling this method, you still need to finish loading by calling `Bundle.loadDir`.\n * It will be totally fine to call `Bundle.loadDir` at any time even if the preloading is not yet finished\n * \n * !#zh\n * 预加载目标文件夹中的所有资源。调用完后,你仍然需要通过 `Bundle.loadDir` 来完成加载。\n * 就算预加载还没完成,你也可以直接调用 `Bundle.loadDir`。\n *\n * @method preloadDir\n * @param {string} dir - path of the target folder.The path is relative to the bundle folder, extensions must be omitted.\n * @param {Function} [type] - Only asset of type will be preloaded if this argument is supplied.\n * @param {Function} [onProgress] - Callback invoked when progression change.\n * @param {Number} onProgress.finish - The number of the items that are already completed.\n * @param {Number} onProgress.total - The total number of the items.\n * @param {Object} onProgress.item - The latest request item\n * @param {Function} [onComplete] - A callback which is called when all assets have been loaded, or an error occurs.\n * @param {Error} onComplete.error - If one of the asset failed, the complete callback is immediately called with the error. If all assets are preloaded successfully, error will be null.\n * @param {RequestItem[]} onComplete.items - An array of all preloaded items.\n * \n * @example\n * // preload all audios (resources/audios/) \n * cc.resources.preloadDir('audios', cc.AudioClip);\n *\n * // preload all textures in \"resources/imgs/\"\n * cc.resources.preloadDir('imgs', cc.Texture2D);\n * // wait for while\n * cc.resources.loadDir('imgs', cc.Texture2D, (err, textures) => {});\n * \n * // preload all prefabs (${project}/assets/bundle1/misc/characters/) from bundle1 folder\n * bundle1.preloadDir('misc/characters', cc.Prefab);\n *\n * // preload all sprite frame (${project}/assets/some/xxx/bundle2/skills/) from bundle2 folder\n * bundle2.preloadDir('skills', cc.SpriteFrame);\n * // wait for while\n * bundle2.loadDir('skills', cc.SpriteFrame, (err, spriteFrames) => {});\n * \n * @typescript\n * preloadDir(dir: string, type: typeof cc.Asset, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, items: RequestItem[]) => void): void\n * preloadDir(dir: string, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, items: RequestItem[]) => void): void\n * preloadDir(dir: string, type: typeof cc.Asset, onComplete: (error: Error, items: RequestItem[]) => void): void\n * preloadDir(dir: string, type: typeof cc.Asset): void\n * preloadDir(dir: string, onComplete: (error: Error, items: RequestItem[]) => void): void\n * preloadDir(dir: string): void\n */\n preloadDir (dir, type, onProgress, onComplete) {\n var { type, onProgress, onComplete } = parseLoadResArgs(type, onProgress, onComplete);\n cc.assetManager.preloadAny(dir, { __requestType__: RequestType.DIR, type: type, bundle: this.name }, onProgress, onComplete);\n },\n\n /**\n * !#en \n * Loads the scene within this bundle by its name. \n * \n * !#zh \n * 通过场景名称加载分包中的场景。\n *\n * @method loadScene\n * @param {String} sceneName - The name of the scene to load.\n * @param {Object} [options] - Some optional parameters\n * @param {Function} [onProgress] - Callback invoked when progression change.\n * @param {Number} onProgress.finish - The number of the items that are already completed.\n * @param {Number} onProgress.total - The total number of the items.\n * @param {Object} onProgress.item - The latest request item\n * @param {Function} [onComplete] - callback, will be called after scene launched.\n * @param {Error} onComplete.err - The occurred error, null indicetes success\n * @param {SceneAsset} onComplete.sceneAsset - The scene asset\n * \n * @example\n * bundle1.loadScene('first', (err, sceneAsset) => cc.director.runScene(sceneAsset));\n * \n * @typescript\n * loadScene(sceneName: string, options: Record<string, any>, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, sceneAsset: cc.SceneAsset) => void): void\n * loadScene(sceneName: string, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, sceneAsset: cc.SceneAsset) => void): void\n * loadScene(sceneName: string, options: Record<string, any>, onComplete: (error: Error, sceneAsset: cc.SceneAsset) => void): void\n * loadScene(sceneName: string, onComplete: (error: Error, sceneAsset: cc.SceneAsset) => void): void\n * loadScene(sceneName: string, options: Record<string, any>): void\n * loadScene(sceneName: string): void\n */\n loadScene (sceneName, options, onProgress, onComplete) {\n var { options, onProgress, onComplete } = parseParameters(options, onProgress, onComplete);\n \n options.preset = options.preset || 'scene';\n options.bundle = this.name;\n cc.assetManager.loadAny({ 'scene': sceneName }, options, onProgress, function (err, sceneAsset) {\n if (err) {\n cc.error(err.message, err.stack);\n onComplete && onComplete(err);\n }\n else if (sceneAsset instanceof cc.SceneAsset) {\n var scene = sceneAsset.scene;\n scene._id = sceneAsset._uuid;\n scene._name = sceneAsset._name;\n onComplete && onComplete(null, sceneAsset);\n }\n else {\n onComplete && onComplete(new Error('The asset ' + sceneAsset._uuid + ' is not a scene'));\n }\n });\n },\n\n /**\n * !#en\n * Preloads the scene within this bundle by its name. After calling this method, you still need to finish loading by calling `Bundle.loadScene` or `cc.director.loadScene`.\n * It will be totally fine to call `Bundle.loadDir` at any time even if the preloading is not yet finished\n * \n * !#zh \n * 通过场景名称预加载分包中的场景.调用完后,你仍然需要通过 `Bundle.loadScene` 或 `cc.director.loadScene` 来完成加载。\n * 就算预加载还没完成,你也可以直接调用 `Bundle.loadScene` 或 `cc.director.loadScene`。\n *\n * @method preloadScene\n * @param {String} sceneName - The name of the scene to preload.\n * @param {Object} [options] - Some optional parameters\n * @param {Function} [onProgress] - callback, will be called when the load progression change.\n * @param {Number} onProgress.finish - The number of the items that are already completed\n * @param {Number} onProgress.total - The total number of the items\n * @param {RequestItem} onProgress.item The latest request item\n * @param {Function} [onComplete] - callback, will be called after scene loaded.\n * @param {Error} onComplete.error - null or the error object.\n * \n * @example\n * bundle1.preloadScene('first');\n * // wait for a while\n * bundle1.loadScene('first', (err, scene) => cc.director.runScene(scene));\n * \n * @typescript\n * preloadScene(sceneName: string, options: Record<string, any>, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error) => void): void\n * preloadScene(sceneName: string, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error) => void): void\n * preloadScene(sceneName: string, options: Record<string, any>, onComplete: (error: Error) => void): void\n * preloadScene(sceneName: string, onComplete: (error: Error) => void): void\n * preloadScene(sceneName: string, options: Record<string, any>): void\n * preloadScene(sceneName: string): void\n */\n preloadScene (sceneName, options, onProgress, onComplete) {\n var { options, onProgress, onComplete } = parseParameters(options, onProgress, onComplete);\n\n options.bundle = this.name;\n cc.assetManager.preloadAny({'scene': sceneName}, options, onProgress, function (err) {\n if (err) {\n cc.errorID(1210, sceneName, err.message);\n }\n onComplete && onComplete(err);\n });\n },\n\n /**\n * !#en\n * Get asset within this bundle by path and type. <br>\n * After you load asset with {{#crossLink \"Bundle/load:method\"}}{{/crossLink}} or {{#crossLink \"Bundle/loadDir:method\"}}{{/crossLink}},\n * you can acquire them by passing the path to this API.\n * \n * !#zh\n * 通过路径与类型获取资源。在你使用 {{#crossLink \"Bundle/load:method\"}}{{/crossLink}} 或者 {{#crossLink \"Bundle/loadDir:method\"}}{{/crossLink}} 之后,\n * 你能通过传路径通过这个 API 获取到这些资源。\n * \n * @method get\n * @param {String} path - The path of asset\n * @param {Function} [type] - Only asset of type will be returned if this argument is supplied.\n * @returns {Asset} \n * \n * @example\n * bundle1.get('music/hit', cc.AudioClip);\n * \n * @typescript\n * get<T extends cc.Asset> (path: string, type?: { prototype: T }): T\n */\n get (path, type) {\n var info = this.getInfoWithPath(path, type);\n return assets.get(info && info.uuid);\n },\n\n /**\n * !#en \n * Release the asset loaded by {{#crossLink \"Bundle/load:method\"}}{{/crossLink}} or {{#crossLink \"Bundle/loadDir:method\"}}{{/crossLink}} and it's dependencies. \n * Refer to {{#crossLink \"AssetManager/releaseAsset:method\"}}{{/crossLink}} for detailed informations.\n * \n * !#zh \n * 释放通过 {{#crossLink \"Bundle/load:method\"}}{{/crossLink}} 或者 {{#crossLink \"Bundle/loadDir:method\"}}{{/crossLink}} 加载的资源。详细信息请参考 {{#crossLink \"AssetManager/releaseAsset:method\"}}{{/crossLink}}\n * \n * @method release\n * @param {String} path - The path of asset\n * @param {Function} [type] - Only asset of type will be released if this argument is supplied.\n * \n * @example\n * // release a texture which is no longer need\n * bundle1.release('misc/character/cocos');\n *\n * @typescript\n * release(path: string, type: typeof cc.Asset): void\n * release(path: string): void\n */\n release (path, type) {\n releaseManager.tryRelease(this.get(path, type), true);\n },\n\n /**\n * !#en \n * Release all unused assets within this bundle. Refer to {{#crossLink \"AssetManager/releaseAll:method\"}}{{/crossLink}} for detailed informations.\n * \n * !#zh \n * 释放此包中的所有没有用到的资源。详细信息请参考 {{#crossLink \"AssetManager/releaseAll:method\"}}{{/crossLink}}\n *\n * @method releaseUnusedAssets\n * @private\n * \n * @example\n * // release all unused asset within bundle1\n * bundle1.releaseUnusedAssets();\n * \n * @typescript\n * releaseUnusedAssets(): void\n */\n releaseUnusedAssets () {\n var self = this;\n assets.forEach(function (asset) {\n let info = self.getAssetInfo(asset._uuid);\n if (info && !info.redirect) {\n releaseManager.tryRelease(asset);\n }\n });\n },\n\n /**\n * !#en \n * Release all assets within this bundle. Refer to {{#crossLink \"AssetManager/releaseAll:method\"}}{{/crossLink}} for detailed informations.\n * \n * !#zh \n * 释放此包中的所有资源。详细信息请参考 {{#crossLink \"AssetManager/releaseAll:method\"}}{{/crossLink}}\n *\n * @method releaseAll\n * \n * @example\n * // release all asset within bundle1\n * bundle1.releaseAll();\n * \n * @typescript\n * releaseAll(): void\n */\n releaseAll () {\n var self = this;\n assets.forEach(function (asset) {\n let info = self.getAssetInfo(asset._uuid);\n if (info && !info.redirect) {\n releaseManager.tryRelease(asset, true);\n }\n });\n },\n\n _destroy () {\n this._config.destroy();\n }\n\n};\n\nmodule.exports = Bundle;","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n/**\n * @module cc.AssetManager\n */\n\nconst js = require('../platform/js');\n/**\n * !#en\n * use to cache something\n * \n * !#zh\n * 用于缓存某些内容\n * \n * @class Cache\n * @typescript Cache<T = any>\n */\nfunction Cache (map) {\n if (map) {\n this._map = map;\n this._count = Object.keys(map).length;\n }\n else {\n this._map = js.createMap(true);\n this._count = 0;\n }\n}\n\nCache.prototype = {\n \n /**\n * !#en\n * Create a cache\n * \n * !#zh\n * 创建一个 cache\n * \n * @method constructor\n * @param {Object} [map] - An object used to initialize \n * \n * @typescript\n * constructor(map?: Record<string, T>)\n */\n constructor: Cache,\n\n /**\n * !#en\n * Add Key-Value to cache\n * \n * !#zh\n * 增加键值对到缓存中\n * \n * @method add\n * @param {String} key - The key\n * @param {*} val - The value\n * @returns {*} The value\n * \n * @example\n * var cache = new Cache();\n * cache.add('test', null);\n * \n * @typescript\n * add(key: string, val: T): T\n */\n add (key, val) { \n if (!(key in this._map)) this._count++;\n return this._map[key] = val;\n },\n\n /**\n * !#en\n * Get the cached content by key\n * \n * !#zh\n * 通过 key 获取对应的 value\n * \n * @method get\n * @param {string} key - The key\n * @returns {*} The corresponding content\n * \n * @example\n * var cache = new Cache();\n * var test = cache.get('test');\n * \n * @typescript\n * get(key: string): T\n */\n get (key) {\n return this._map[key];\n },\n\n /**\n * !#en\n * Check whether or not content exists by key\n * \n * !#zh\n * 通过 Key 判断是否存在对应的内容\n * \n * @method has\n * @param {string} key - The key\n * @returns {boolean} True indecates that content of the key exists\n * \n * @example\n * var cache = new Cache();\n * var exist = cache.has('test');\n * \n * @typescript\n * has(key: string): boolean\n */\n has (key) {\n return key in this._map;\n },\n\n /**\n * !#en\n * Remove the cached content by key\n * \n * !#zh\n * 通过 Key 移除对应的内容\n * \n * @method remove\n * @param {string} key - The key\n * @returns {*} The removed content\n * \n * @example\n * var cache = new Cache();\n * var content = cache.remove('test');\n * \n * @typescript\n * remove(key: string): T\n */\n remove (key) {\n var out = this._map[key];\n if (key in this._map) {\n delete this._map[key];\n this._count--;\n }\n return out;\n },\n\n /**\n * !#en\n * Clear all content\n * \n * !#zh\n * 清除所有内容\n * \n * @method clear\n * \n * @example\n * var cache = new Cache();\n * cache.clear();\n * \n * @typescript\n * clear():void\n */\n clear () {\n if (this._count !== 0) {\n this._map = js.createMap(true);\n this._count = 0;\n }\n },\n\n /**\n * !#en\n * Enumerate all content and invoke function\n * \n * !#zh\n * 枚举所有内容并执行方法\n * \n * @method forEach\n * @param {Function} func - Function to be invoked\n * @param {*} func.val - The value \n * @param {String} func.key - The corresponding key\n * \n * @example\n * var cache = new Cache();\n * cache.forEach((val, key) => console.log(key));\n * \n * @typescript\n * forEach(func: (val: T, key: string) => void): void\n */\n forEach (func) {\n for (var key in this._map) {\n func(this._map[key], key);\n }\n },\n\n /**\n * !#en\n * Enumerate all content to find one element which can fulfill condition\n * \n * !#zh\n * 枚举所有内容,找到一个可以满足条件的元素\n * \n * @method find\n * @param {Function} predicate - The condition\n * @returns {*} content\n * \n * @example\n * var cache = new Cache();\n * var val = cache.find((val, key) => key === 'test');\n * \n * @typescript\n * find(predicate: (val: T, key: string) => boolean): T\n */\n find (predicate) {\n for (var key in this._map) {\n if (predicate(this._map[key], key)) return this._map[key];\n }\n return null;\n },\n\n /**\n * !#en\n * The count of cached content\n * \n * !#zh\n * 缓存数量\n * \n * @property count\n * @type {Number}\n */\n get count () {\n return this._count;\n },\n\n /**\n * !#en\n * Destroy this cache\n * \n * !#zh\n * 销毁这个 cache\n * \n * @method destroy\n * \n * @typescript\n * destroy(): void\n */\n destroy () {\n this._map = null;\n }\n};\n\nmodule.exports = Cache;","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nconst js = require('../platform/js');\nconst Cache = require('./cache');\nconst { normalize } = require('./helper');\nconst { processOptions } = require('./utilities');\n\nfunction Config () {\n\n this.name = '';\n\n this.base = '';\n\n this.importBase = '';\n\n this.nativeBase = '';\n\n this.deps = null;\n\n this.assetInfos = new Cache();\n\n this.scenes = new Cache();\n\n this.paths = new Cache();\n}\n\nConfig.prototype = {\n\n constructor: Config,\n\n init: function (options) {\n processOptions(options);\n\n this.importBase = options.importBase || '';\n this.nativeBase = options.nativeBase || '';\n this.base = options.base || '';\n this.name = options.name || '';\n this.deps = options.deps || [];\n // init\n this._initUuid(options.uuids);\n this._initPath(options.paths);\n this._initScene(options.scenes);\n this._initPackage(options.packs);\n this._initVersion(options.versions);\n this._initRedirect(options.redirect);\n },\n\n _initUuid: function (uuidList) {\n if (!uuidList) return;\n this.assetInfos.clear();\n for (var i = 0, l = uuidList.length; i < l; i++) {\n var uuid = uuidList[i];\n this.assetInfos.add(uuid, {uuid});\n }\n },\n\n _initPath: function (pathList) {\n if (!pathList) return;\n var paths = this.paths;\n paths.clear();\n for (var uuid in pathList) {\n var info = pathList[uuid];\n var path = info[0];\n var type = info[1];\n var isSubAsset = info.length === 3;\n\n var assetInfo = this.assetInfos.get(uuid);\n assetInfo.path = path;\n assetInfo.ctor = js._getClassById(type);\n if (paths.has(path)) {\n if (isSubAsset) {\n paths.get(path).push(assetInfo);\n }\n else {\n paths.get(path).unshift(assetInfo);\n } \n }\n else {\n paths.add(path, [assetInfo]);\n }\n }\n },\n\n _initScene: function (sceneList) {\n if (!sceneList) return;\n var scenes = this.scenes;\n scenes.clear();\n var assetInfos = this.assetInfos;\n for (var sceneName in sceneList) {\n var uuid = sceneList[sceneName];\n var assetInfo = assetInfos.get(uuid);\n assetInfo.url = sceneName;\n scenes.add(sceneName, assetInfo);\n }\n },\n\n _initPackage: function (packageList) {\n if (!packageList) return;\n var assetInfos = this.assetInfos;\n for (var packUuid in packageList) {\n var uuids = packageList[packUuid];\n var pack = {uuid: packUuid, packs: uuids, ext:'.json'};\n assetInfos.add(packUuid, pack);\n\n for (var i = 0, l = uuids.length; i < l; i++) {\n var uuid = uuids[i];\n var assetInfo = assetInfos.get(uuid);\n var assetPacks = assetInfo.packs;\n if (assetPacks) {\n if (l === 1) {\n assetPacks.unshift(pack);\n }\n else {\n assetPacks.push(pack);\n }\n }\n else {\n assetInfo.packs = [pack];\n }\n }\n }\n },\n\n _initVersion: function (versions) {\n if (!versions) return;\n var assetInfos = this.assetInfos;\n var entries = versions.import;\n if (entries) {\n for (var i = 0, l = entries.length; i < l; i += 2) {\n var uuid = entries[i];\n var assetInfo = assetInfos.get(uuid);\n assetInfo.ver = entries[i + 1];\n }\n }\n entries = versions.native;\n if (entries) {\n for (var i = 0, l = entries.length; i < l; i += 2) {\n var uuid = entries[i];\n var assetInfo = assetInfos.get(uuid);\n assetInfo.nativeVer = entries[i + 1];\n }\n }\n },\n\n _initRedirect: function (redirect) {\n if (!redirect) return;\n var assetInfos = this.assetInfos;\n for (var i = 0, l = redirect.length; i < l; i += 2) {\n var uuid = redirect[i];\n var assetInfo = assetInfos.get(uuid);\n assetInfo.redirect = redirect[i + 1];\n }\n },\n\n getInfoWithPath: function (path, type) {\n\n if (!path) {\n return null;\n }\n path = normalize(path);\n var items = this.paths.get(path);\n if (items) {\n if (type) {\n for (var i = 0, l = items.length; i < l; i++) {\n var assetInfo = items[i];\n if (js.isChildClassOf(assetInfo.ctor, type)) {\n return assetInfo;\n }\n }\n }\n else {\n return items[0];\n }\n }\n return null;\n },\n\n getDirWithPath: function (path, type, out) {\n path = normalize(path);\n if (path[path.length - 1] === '/') {\n path = path.slice(0, -1);\n }\n\n var infos = out || [];\n function isMatchByWord (path, test) {\n if (path.length > test.length) {\n var nextAscii = path.charCodeAt(test.length);\n return nextAscii === 47; // '/'\n }\n return true;\n }\n this.paths.forEach(function (items, p) {\n if ((p.startsWith(path) && isMatchByWord(p, path)) || !path) {\n for (var i = 0, l = items.length; i < l; i++) {\n var entry = items[i];\n if (!type || js.isChildClassOf(entry.ctor, type)) {\n infos.push(entry);\n }\n }\n }\n });\n\n return infos;\n },\n\n getAssetInfo: function (uuid) {\n return this.assetInfos.get(uuid);\n },\n\n getSceneInfo: function (name) {\n if (!name.endsWith('.fire')) {\n name += '.fire';\n }\n if (name[0] !== '/' && !name.startsWith('db://')) {\n name = '/' + name; // 使用全名匹配\n }\n // search scene\n var info = this.scenes.find(function (val, key) {\n return key.endsWith(name);\n });\n return info;\n },\n\n destroy: function () {\n this.paths.destroy();\n this.scenes.destroy();\n this.assetInfos.destroy();\n }\n};\n\nif (CC_TEST) {\n cc._Test.Config = Config;\n}\n\nmodule.exports = Config;","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nconst Cache = require('./cache');\nconst deserialize = require('./deserialize');\nconst { files, parsed } = require('./shared');\nimport { hasNativeDep , getDependUuidList } from '../platform/deserialize-compiled';\nimport deserializeForCompiled from '../platform/deserialize-compiled';\n\n/**\n * @module cc.AssetManager\n */\n/**\n * !#en\n * Control asset's dependency list, it is a singleton. All member can be accessed with `cc.assetManager.dependUtil`\n * \n * !#zh\n * 控制资源的依赖列表,这是一个单例, 所有成员能通过 `cc.assetManager.dependUtil` 访问\n * \n * @class DependUtil\n */\nvar dependUtil = {\n _depends: new Cache(),\n\n init () {\n this._depends.clear();\n },\n\n /**\n * !#en\n * Get asset's native dependency. For example, Texture's native dependency is image.\n * \n * !#zh\n * 获取资源的原生依赖,例如 Texture 的原生依赖是图片\n * \n * @method getNativeDep\n * @param {string} uuid - asset's uuid\n * @returns {Object} native dependency\n * \n * @example\n * var dep = dependUtil.getNativeDep('fcmR3XADNLgJ1ByKhqcC5Z');\n * \n * @typescript\n * getNativeDep(uuid: string): Record<string, any>\n */\n getNativeDep (uuid) {\n let depend = this._depends.get(uuid);\n if (depend) return depend.nativeDep && Object.assign({}, depend.nativeDep);\n return null;\n },\n\n /**\n * !#en\n * Get asset's direct referencing non-native dependency list. For example, Material's non-native dependencies are Texture.\n * \n * !#zh\n * 获取资源直接引用的非原生依赖列表,例如,材质的非原生依赖是 Texture\n * \n * @method getDeps\n * @param {string} uuid - asset's uuid\n * @returns {string[]} direct referencing non-native dependency list\n * \n * @example\n * var deps = dependUtil.getDeps('fcmR3XADNLgJ1ByKhqcC5Z');\n * \n * @typescript\n * getDeps(uuid: string): string[]\n */\n getDeps (uuid) {\n if (this._depends.has(uuid)) {\n return this._depends.get(uuid).deps;\n }\n return [];\n },\n \n /**\n * !#en\n * Get non-native dependency list of the loaded asset, include indirect reference.\n * The returned array stores the dependencies with their uuid, after retrieve dependencies,\n * \n * !#zh\n * 获取某个已经加载好的资源的所有非原生依赖资源列表,包括间接引用的资源,并保存在数组中返回。\n * 返回的数组将仅保存依赖资源的 uuid。\n *\n * @method getDependsRecursively\n * @param {String} uuid - The asset's uuid\n * @returns {string[]} non-native dependency list\n * \n * @example\n * var deps = dependUtil.getDepsRecursively('fcmR3XADNLgJ1ByKhqcC5Z');\n * \n * @typescript\n * getDepsRecursively(uuid: string): string[]\n */\n getDepsRecursively (uuid) {\n var exclude = Object.create(null), depends = [];\n this._descend(uuid, exclude, depends);\n return depends;\n },\n\n _descend (uuid, exclude, depends) {\n var deps = this.getDeps(uuid);\n for (var i = 0; i < deps.length; i++) {\n var depend = deps[i];\n if ( !exclude[depend] ) {\n exclude[depend] = true;\n depends.push(depend);\n this._descend(depend, exclude, depends);\n }\n }\n },\n\n remove (uuid) {\n this._depends.remove(uuid);\n },\n \n /**\n * !#en\n * Extract dependency list from serialized data or asset and then store in cache.\n * \n * !#zh\n * 从序列化数据或资源中提取出依赖列表,并且存储在缓存中。\n * \n * @param {string} uuid - The uuid of serialized data or asset\n * @param {Object} json - Serialized data or asset\n * @returns {Object} dependency list, include non-native and native dependency\n * \n * @example\n * downloader.downloadFile('test.json', {responseType: 'json'}, null, (err, file) => {\n * var dependencies = parse('fcmR3XADNLgJ1ByKhqcC5Z', file);\n * });\n * \n * @typescript\n * parse(uuid: string, json: any): { deps?: string[], nativeDep?: any }\n */\n parse (uuid, json) {\n var out = null;\n if (Array.isArray(json) || json.__type__) {\n\n if (out = this._depends.get(uuid)) return out;\n\n if (Array.isArray(json) && (!(CC_BUILD || deserializeForCompiled.isCompiledJson(json)) || !hasNativeDep(json))) {\n out = {\n deps: this._parseDepsFromJson(json),\n };\n }\n else {\n try {\n var asset = deserialize(json);\n out = this._parseDepsFromAsset(asset);\n out.nativeDep && (out.nativeDep.uuid = uuid);\n parsed.add(uuid + '@import', asset);\n }\n catch (e) {\n files.remove(uuid + '@import');\n out = { deps: [] };\n }\n }\n }\n // get deps from an existing asset \n else {\n if (!CC_EDITOR && (out = this._depends.get(uuid)) && out.parsedFromExistAsset) return out;\n out = this._parseDepsFromAsset(json);\n }\n // cache dependency list\n this._depends.add(uuid, out);\n return out;\n },\n\n _parseDepsFromAsset: function (asset) {\n var out = {\n deps: [],\n parsedFromExistAsset: true,\n preventPreloadNativeObject: asset.constructor.preventPreloadNativeObject,\n preventDeferredLoadDependents: asset.constructor.preventDeferredLoadDependents\n };\n let deps = asset.__depends__;\n for (var i = 0, l = deps.length; i < l; i++) {\n var dep = deps[i].uuid;\n out.deps.push(dep);\n }\n \n if (asset.__nativeDepend__) {\n out.nativeDep = asset._nativeDep;\n }\n\n return out;\n },\n\n _parseDepsFromJson: CC_EDITOR || CC_PREVIEW ? function (json) {\n\n if (deserializeForCompiled.isCompiledJson(json)) {\n let depends = getDependUuidList(json);\n depends.forEach((uuid, index) => depends[index] = cc.assetManager.utils.decodeUuid(uuid));\n return depends;\n }\n \n var depends = [];\n function parseDependRecursively (data, out) {\n if (!data || typeof data !== 'object' || data.__id__) return;\n var uuid = data.__uuid__;\n if (Array.isArray(data)) {\n for (let i = 0, l = data.length; i < l; i++) {\n parseDependRecursively(data[i], out);\n }\n }\n else if (uuid) { \n out.push(cc.assetManager.utils.decodeUuid(uuid));\n }\n else {\n for (var prop in data) {\n parseDependRecursively(data[prop], out);\n }\n }\n }\n parseDependRecursively(json, depends);\n return depends;\n } : function (json) {\n let depends = getDependUuidList(json);\n depends.forEach((uuid, index) => depends[index] = cc.assetManager.utils.decodeUuid(uuid));\n return depends;\n }\n};\n\nmodule.exports = dependUtil;","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst js = require('../platform/js');\nrequire('../CCDirector');\nconst utilities = require('./utilities');\nconst dependUtil = require('./depend-util');\nconst releaseManager = require('./releaseManager');\nconst downloader = require('./downloader');\nconst factory = require('./factory');\nconst helper = require('./helper');\n\nconst ImageFmts = ['.png', '.jpg', '.bmp', '.jpeg', '.gif', '.ico', '.tiff', '.webp', '.image', '.pvr', '.pkm'];\nconst AudioFmts = ['.mp3', '.ogg', '.wav', '.m4a'];\n\nfunction GetTrue () { return true; }\n\nconst md5Pipe = {\n transformURL (url) {\n let uuid = helper.getUuidFromURL(url);\n if (!uuid) { return url; }\n let bundle = cc.assetManager.bundles.find((b) => {\n return !!b.getAssetInfo(uuid);\n });\n if (!bundle) { return url; }\n let hashValue = '';\n let info = bundle.getAssetInfo(uuid);\n if (url.startsWith(bundle.base + bundle._config.nativeBase)) {\n hashValue = info.nativeVer || '';\n }\n else {\n hashValue = info.ver || '';\n }\n if (!hashValue || url.indexOf(hashValue) !== -1) { return url; }\n let hashPatchInFolder = false;\n if (cc.path.extname(url) === '.ttf') {\n hashPatchInFolder = true;\n }\n if (hashPatchInFolder) {\n let dirname = cc.path.dirname(url);\n let basename = cc.path.basename(url);\n url = `${dirname}.${hashValue}/${basename}`;\n } else {\n url = url.replace(/.*[/\\\\][0-9a-fA-F]{2}[/\\\\]([0-9a-fA-F-]{8,})/, (match, uuid) => {\n return match + '.' + hashValue;\n });\n }\n \n return url;\n },\n};\n\n/**\n * `cc.loader` is deprecated, please backup your project and upgrade to {{#crossLink \"AssetManager\"}}{{/crossLink}}\n *\n * @class loader\n * @static\n * @deprecated cc.loader is deprecated, please backup your project and upgrade to cc.assetManager\n */\nconst loader = {\n /**\n * `cc.loader.onProgress` is deprecated, please transfer onProgress to API as a parameter\n * @property onProgress\n * @deprecated cc.loader.onProgress is deprecated, please transfer onProgress to API as a parameter\n */\n onProgress: null,\n _autoReleaseSetting: Object.create(null),\n\n get _cache () {\n return cc.assetManager.assets._map;\n },\n\n /**\n * `cc.loader.load` is deprecated, please use {{#crossLink \"AssetManager/loadAny:method\"}}{{/crossLink}} instead\n *\n * @deprecated cc.loader.load is deprecated, please use cc.assetManager.loadAny instead\n *\n * @method load\n * @param {String|String[]|Object} resources - Url list in an array\n * @param {Function} [progressCallback] - Callback invoked when progression change\n * @param {Number} progressCallback.completedCount - The number of the items that are already completed\n * @param {Number} progressCallback.totalCount - The total number of the items\n * @param {Object} progressCallback.item - The latest item which flow out the pipeline\n * @param {Function} [completeCallback] - Callback invoked when all resources loaded\n * @typescript\n * load(resources: string|string[]|{uuid?: string, url?: string, type?: string}, completeCallback?: Function): void\n * load(resources: string|string[]|{uuid?: string, url?: string, type?: string}, progressCallback: (completedCount: number, totalCount: number, item: any) => void, completeCallback: Function|null): void\n */\n load (resources, progressCallback, completeCallback) {\n if (completeCallback === undefined) {\n if (progressCallback !== undefined) {\n completeCallback = progressCallback;\n progressCallback = null;\n }\n }\n resources = Array.isArray(resources) ? resources : [resources];\n for (var i = 0; i < resources.length; i++) {\n var item = resources[i];\n if (typeof item === 'string') {\n resources[i] = { url: item, __isNative__: true};\n }\n else {\n if (item.type) {\n item.ext = '.' + item.type;\n item.type = undefined;\n }\n\n if (item.url) {\n item.__isNative__ = true;\n }\n }\n }\n var images = [];\n var audios = [];\n cc.assetManager.loadAny(resources, null, (finish, total, item) => {\n if (item.content) {\n if (ImageFmts.includes(item.ext)) {\n images.push(item.content);\n }\n else if (AudioFmts.includes(item.ext)) {\n audios.push(item.content);\n }\n }\n progressCallback && progressCallback(finish, total, item);\n }, (err, native) => {\n var res = null;\n if (!err) {\n native = Array.isArray(native) ? native : [native];\n for (var i = 0; i < native.length; i++) {\n var item = native[i];\n if (!(item instanceof cc.Asset)) {\n var asset = item;\n var url = resources[i].url;\n if (images.includes(asset)) {\n factory.create(url, item, '.png', null, (err, image) => {\n asset = native[i] = image;\n });\n }\n else if (audios.includes(asset)) {\n factory.create(url, item, '.mp3', null, (err, audio) => {\n asset = native[i] = audio;\n });\n }\n cc.assetManager.assets.add(url, asset);\n }\n }\n if (native.length > 1) {\n var map = Object.create(null);\n native.forEach(function (asset) {\n map[asset._uuid] = asset;\n });\n res = { isCompleted: GetTrue, _map: map };\n }\n else {\n res = native[0];\n }\n }\n completeCallback && completeCallback(err, res);\n });\n },\n\n /**\n * `cc.loader.getXMLHttpRequest` is deprecated, please use `XMLHttpRequest` directly\n *\n * @method getXMLHttpRequest\n * @deprecated cc.loader.getXMLHttpRequest is deprecated, please use XMLHttpRequest directly\n * @returns {XMLHttpRequest}\n */\n getXMLHttpRequest () {\n return new XMLHttpRequest();\n },\n\n _parseLoadResArgs: utilities.parseLoadResArgs,\n\n /**\n * `cc.loader.getItem` is deprecated, please use `cc.assetManager.asset.get` instead\n *\n * @method getItem\n * @param {Object} id The id of the item\n * @return {Object}\n * @deprecated cc.loader.getItem is deprecated, please use cc.assetManager.assets.get instead\n */\n getItem (key) {\n return cc.assetManager.assets.has(key) ? { content: cc.assetManager.assets.get(key) } : null;\n },\n\n /**\n * `cc.loader.loadRes` is deprecated, please use {{#crossLink \"Bundle/load:method\"}}{{/crossLink}} instead\n *\n * @deprecated cc.loader.loadRes is deprecated, please use cc.resources.load instead\n * @method loadRes\n * @param {String} url - Url of the target resource.\n * The url is relative to the \"resources\" folder, extensions must be omitted.\n * @param {Function} [type] - Only asset of type will be loaded if this argument is supplied.\n * @param {Function} [progressCallback] - Callback invoked when progression change.\n * @param {Number} progressCallback.completedCount - The number of the items that are already completed.\n * @param {Number} progressCallback.totalCount - The total number of the items.\n * @param {Object} progressCallback.item - The latest item which flow out the pipeline.\n * @param {Function} [completeCallback] - Callback invoked when the resource loaded.\n * @param {Error} completeCallback.error - The error info or null if loaded successfully.\n * @param {Object} completeCallback.resource - The loaded resource if it can be found otherwise returns null.\n *\n * @typescript\n * loadRes(url: string, type: typeof cc.Asset, progressCallback: (completedCount: number, totalCount: number, item: any) => void, completeCallback: ((error: Error, resource: any) => void)|null): void\n * loadRes(url: string, type: typeof cc.Asset, completeCallback: (error: Error, resource: any) => void): void\n * loadRes(url: string, type: typeof cc.Asset): void\n * loadRes(url: string, progressCallback: (completedCount: number, totalCount: number, item: any) => void, completeCallback: ((error: Error, resource: any) => void)|null): void\n * loadRes(url: string, completeCallback: (error: Error, resource: any) => void): void\n * loadRes(url: string): void\n */\n loadRes (url, type, progressCallback, completeCallback) {\n var { type, onProgress, onComplete } = this._parseLoadResArgs(type, progressCallback, completeCallback);\n var extname = cc.path.extname(url);\n if (extname) {\n // strip extname\n url = url.slice(0, - extname.length);\n }\n cc.resources.load(url, type, onProgress, onComplete);\n },\n\n /**\n * `cc.loader.loadResArray` is deprecated, please use {{#crossLink \"Bundle/load:method\"}}{{/crossLink}} instead\n *\n * @deprecated cc.loader.loadResArray is deprecated, please use cc.resources.load instead\n * @method loadResArray\n * @param {String[]} urls - Array of URLs of the target resource.\n * The url is relative to the \"resources\" folder, extensions must be omitted.\n * @param {Function} [type] - Only asset of type will be loaded if this argument is supplied.\n * @param {Function} [progressCallback] - Callback invoked when progression change.\n * @param {Number} progressCallback.completedCount - The number of the items that are already completed.\n * @param {Number} progressCallback.totalCount - The total number of the items.\n * @param {Object} progressCallback.item - The latest item which flow out the pipeline.\n * @param {Function} [completeCallback] - A callback which is called when all assets have been loaded, or an error occurs.\n * @param {Error} completeCallback.error - If one of the asset failed, the complete callback is immediately called\n * with the error. If all assets are loaded successfully, error will be null.\n * @param {Asset[]|Array} completeCallback.assets - An array of all loaded assets.\n * If nothing to load, assets will be an empty array.\n * @typescript\n * loadResArray(url: string[], type: typeof cc.Asset, progressCallback: (completedCount: number, totalCount: number, item: any) => void, completeCallback: ((error: Error, resource: any[]) => void)|null): void\n * loadResArray(url: string[], type: typeof cc.Asset, completeCallback: (error: Error, resource: any[]) => void): void\n * loadResArray(url: string[], type: typeof cc.Asset): void\n * loadResArray(url: string[], progressCallback: (completedCount: number, totalCount: number, item: any) => void, completeCallback: ((error: Error, resource: any[]) => void)|null): void\n * loadResArray(url: string[], completeCallback: (error: Error, resource: any[]) => void): void\n * loadResArray(url: string[]): void\n * loadResArray(url: string[], type: typeof cc.Asset[]): void\n */\n loadResArray (urls, type, progressCallback, completeCallback) {\n var { type, onProgress, onComplete } = this._parseLoadResArgs(type, progressCallback, completeCallback);\n urls.forEach((url, i) => {\n var extname = cc.path.extname(url);\n if (extname) {\n // strip extname\n urls[i] = url.slice(0, - extname.length);\n }\n })\n cc.resources.load(urls, type, onProgress, onComplete);\n },\n\n /**\n * `cc.loader.loadResDir` is deprecated, please use {{#crossLink \"Bundle/loadDir:method\"}}{{/crossLink}} instead\n *\n * @deprecated cc.loader.loadResDir is deprecated, please use cc.resources.loadDir instead\n * @method loadResDir\n * @param {String} url - Url of the target folder.\n * The url is relative to the \"resources\" folder, extensions must be omitted.\n * @param {Function} [type] - Only asset of type will be loaded if this argument is supplied.\n * @param {Function} [progressCallback] - Callback invoked when progression change.\n * @param {Number} progressCallback.completedCount - The number of the items that are already completed.\n * @param {Number} progressCallback.totalCount - The total number of the items.\n * @param {Object} progressCallback.item - The latest item which flow out the pipeline.\n * @param {Function} [completeCallback] - A callback which is called when all assets have been loaded, or an error occurs.\n * @param {Error} completeCallback.error - If one of the asset failed, the complete callback is immediately called\n * with the error. If all assets are loaded successfully, error will be null.\n * @param {Asset[]|Array} completeCallback.assets - An array of all loaded assets.\n * If nothing to load, assets will be an empty array.\n * @param {String[]} completeCallback.urls - An array that lists all the URLs of loaded assets.\n *\n * @typescript\n * loadResDir(url: string, type: typeof cc.Asset, progressCallback: (completedCount: number, totalCount: number, item: any) => void, completeCallback: ((error: Error, resource: any[], urls: string[]) => void)|null): void\n * loadResDir(url: string, type: typeof cc.Asset, completeCallback: (error: Error, resource: any[], urls: string[]) => void): void\n * loadResDir(url: string, type: typeof cc.Asset): void\n * loadResDir(url: string, progressCallback: (completedCount: number, totalCount: number, item: any) => void, completeCallback: ((error: Error, resource: any[], urls: string[]) => void)|null): void\n * loadResDir(url: string, completeCallback: (error: Error, resource: any[], urls: string[]) => void): void\n * loadResDir(url: string): void\n */\n loadResDir (url, type, progressCallback, completeCallback) {\n var { type, onProgress, onComplete } = this._parseLoadResArgs(type, progressCallback, completeCallback);\n cc.resources.loadDir(url, type, onProgress, function (err, assets) {\n var urls = [];\n if (!err) {\n var infos = cc.resources.getDirWithPath(url, type);\n urls = infos.map(function (info) {\n return info.path;\n });\n }\n onComplete && onComplete(err, assets, urls);\n });\n },\n\n /**\n * `cc.loader.getRes` is deprecated, please use {{#crossLink \"Bundle/get:method\"}}{{/crossLink}} instead\n *\n * @method getRes\n * @param {String} url\n * @param {Function} [type] - Only asset of type will be returned if this argument is supplied.\n * @returns {*}\n * @deprecated cc.loader.getRes is deprecated, please use cc.resources.get instead\n */\n getRes (url, type) {\n return cc.assetManager.assets.has(url) ? cc.assetManager.assets.get(url) : cc.resources.get(url, type);\n },\n\n getResCount () {\n return cc.assetManager.assets.count;\n },\n\n /**\n * `cc.loader.getDependsRecursively` is deprecated, please use use {{#crossLink \"DependUtil/getDepsRecursively:method\"}}{{/crossLink}} instead\n *\n * @deprecated cc.loader.getDependsRecursively is deprecated, please use use cc.assetManager.dependUtil.getDepsRecursively instead\n * @method getDependsRecursively\n * @param {Asset|String} owner - The owner asset or the resource url or the asset's uuid\n * @returns {Array}\n */\n getDependsRecursively (owner) {\n if (!owner) return [];\n return dependUtil.getDepsRecursively(typeof owner === 'string' ? owner : owner._uuid).concat([ owner._uuid ]);\n },\n\n /**\n * `cc.loader.assetLoader` was removed, assetLoader and md5Pipe were merged into {{#crossLink \"AssetManager/transformPipeline:property\"}}{{/crossLink}}\n *\n * @property assetLoader\n * @deprecated cc.loader.assetLoader was removed, assetLoader and md5Pipe were merged into cc.assetManager.transformPipeline\n * @type {Object}\n */\n get assetLoader () {\n if (CC_DEBUG) {\n cc.error('cc.loader.assetLoader was removed, assetLoader and md5Pipe were merged into cc.assetManager.transformPipeline');\n }\n },\n\n /**\n * `cc.loader.md5Pipe` is deprecated, assetLoader and md5Pipe were merged into {{#crossLink \"AssetManager/transformPipeline:property\"}}{{/crossLink}}\n *\n * @property md5Pipe\n * @deprecated cc.loader.md5Pipe is deprecated, assetLoader and md5Pipe were merged into cc.assetManager.transformPipeline\n * @type {Object}\n */\n get md5Pipe () {\n return md5Pipe;\n },\n\n /**\n * `cc.loader.downloader` is deprecated, please use {{#crossLink \"AssetManager/downloader:property\"}}{{/crossLink}} instead\n *\n * @deprecated cc.loader.downloader is deprecated, please use cc.assetManager.downloader instead\n * @property downloader\n * @type {Object}\n */\n get downloader () {\n return cc.assetManager.downloader;\n },\n\n /**\n * `cc.loader.loader` is deprecated, please use {{#crossLink \"AssetManager/parser:property\"}}{{/crossLink}} instead\n *\n * @property loader\n * @type {Object}\n * @deprecated cc.loader.loader is deprecated, please use cc.assetManager.parser instead\n */\n get loader () {\n return cc.assetManager.parser;\n },\n\n /**\n * `cc.loader.addDownloadHandlers` is deprecated, please use `cc.assetManager.downloader.register` instead\n *\n * @method addDownloadHandlers\n * @param {Object} extMap Custom supported types with corresponded handler\n * @deprecated cc.loader.addDownloadHandlers is deprecated, please use cc.assetManager.downloader.register instead\n */\n addDownloadHandlers (extMap) {\n if (CC_DEBUG) {\n cc.warn('`cc.loader.addDownloadHandlers` is deprecated, please use `cc.assetManager.downloader.register` instead');\n }\n var handler = Object.create(null);\n for (var type in extMap) {\n var func = extMap[type];\n handler['.' + type] = function (url, options, onComplete) {\n func({url}, onComplete);\n };\n }\n cc.assetManager.downloader.register(handler);\n },\n\n /**\n * `cc.loader.addLoadHandlers` is deprecated, please use `cc.assetManager.parser.register` instead\n *\n * @method addLoadHandlers\n * @param {Object} extMap Custom supported types with corresponded handler\n * @deprecated cc.loader.addLoadHandlers is deprecated, please use cc.assetManager.parser.register instead\n */\n addLoadHandlers (extMap) {\n if (CC_DEBUG) {\n cc.warn('`cc.loader.addLoadHandlers` is deprecated, please use `cc.assetManager.parser.register` instead');\n }\n var handler = Object.create(null);\n for (var type in extMap) {\n var func = extMap[type];\n handler['.' + type] = function (file, options, onComplete) {\n func({content: file}, onComplete);\n };\n }\n cc.assetManager.parser.register(handler);\n },\n\n flowInDeps () {\n if (CC_DEBUG) {\n cc.error('cc.loader.flowInDeps was removed');\n }\n },\n\n /**\n * `cc.loader.release` is deprecated, please use {{#crossLink \"AssetManager/releaseAsset:method\"}}{{/crossLink}} instead\n *\n * @method release\n * @param {Asset|String|Array} asset\n * @deprecated cc.loader.release is deprecated, please use cc.assetManager.releaseAsset instead\n */\n release (asset) {\n if (Array.isArray(asset)) {\n for (let i = 0; i < asset.length; i++) {\n var key = asset[i];\n if (typeof key === 'string') key = cc.assetManager.assets.get(key);\n let isBuiltin = cc.assetManager.builtins._assets.find(function (assets) {\n return assets.find(builtinAsset => builtinAsset === key);\n });\n if (isBuiltin) continue;\n cc.assetManager.releaseAsset(key);\n }\n }\n else if (asset) {\n if (typeof asset === 'string') asset = cc.assetManager.assets.get(asset);\n let isBuiltin = cc.assetManager.builtins._assets.find(function (assets) {\n return assets.find(builtinAsset => builtinAsset === asset);\n });\n if (isBuiltin) return;\n cc.assetManager.releaseAsset(asset);\n }\n },\n\n /**\n * `cc.loader.releaseAsset` is deprecated, please use {{#crossLink \"AssetManager/releaseAsset:method\"}}{{/crossLink}} instead\n *\n * @deprecated cc.loader.releaseAsset is deprecated, please use cc.assetManager.releaseAsset instead\n * @method releaseAsset\n * @param {Asset} asset\n */\n releaseAsset (asset) {\n cc.assetManager.releaseAsset(asset);\n },\n\n /**\n * `cc.loader.releaseRes` is deprecated, please use {{#crossLink \"AssetManager/releaseRes:method\"}}{{/crossLink}} instead\n *\n * @deprecated cc.loader.releaseRes is deprecated, please use cc.assetManager.releaseRes instead\n * @method releaseRes\n * @param {String} url\n * @param {Function} [type] - Only asset of type will be released if this argument is supplied.\n */\n releaseRes (url, type) {\n cc.resources.release(url, type);\n },\n\n /**\n * `cc.loader.releaseResDir` was removed, please use {{#crossLink \"AssetManager/releaseRes:method\"}}{{/crossLink}} instead\n *\n * @deprecated cc.loader.releaseResDir was removed, please use cc.assetManager.releaseRes instead\n * @method releaseResDir\n */\n releaseResDir () {\n if (CC_DEBUG) {\n cc.error('cc.loader.releaseResDir was removed, please use cc.assetManager.releaseAsset instead');\n }\n },\n\n /**\n * `cc.loader.releaseAll` is deprecated, please use {{#crossLink \"AssetManager/releaseAll:method\"}}{{/crossLink}} instead\n *\n * @deprecated cc.loader.releaseAll is deprecated, please use cc.assetManager.releaseAll instead\n * @method releaseAll\n */\n releaseAll () {\n cc.assetManager.releaseAll();\n cc.assetManager.assets.clear();\n },\n\n /**\n * `cc.loader.removeItem` is deprecated, please use `cc.assetManager.assets.remove` instead\n *\n * @deprecated cc.loader.removeItem is deprecated, please use cc.assetManager.assets.remove instead\n * @method removeItem\n * @param {Object} id The id of the item\n * @return {Boolean} succeed or not\n */\n removeItem (key) {\n cc.assetManager.assets.remove(key);\n },\n\n /**\n * `cc.loader.setAutoRelease` is deprecated, if you want to prevent some asset from auto releasing, please use {{#crossLink \"Asset/addRef:method\"}}{{/crossLink}} instead\n *\n * @deprecated cc.loader.setAutoRelease is deprecated, if you want to prevent some asset from auto releasing, please use cc.Asset.addRef instead\n * @method setAutoRelease\n * @param {Asset|String} assetOrUrlOrUuid - asset object or the raw asset's url or uuid\n * @param {Boolean} autoRelease - indicates whether should release automatically\n */\n setAutoRelease (asset, autoRelease) {\n if (typeof asset === 'object') asset = asset._uuid;\n this._autoReleaseSetting[asset] = !!autoRelease;\n },\n\n /**\n * `cc.loader.setAutoReleaseRecursively` is deprecated, if you want to prevent some asset from auto releasing, please use {{#crossLink \"Asset/addRef:method\"}}{{/crossLink}} instead\n *\n * @method setAutoReleaseRecursively\n * @param {Asset|String} assetOrUrlOrUuid - asset object or the raw asset's url or uuid\n * @param {Boolean} autoRelease - indicates whether should release automatically\n * @deprecated cc.loader.setAutoReleaseRecursively is deprecated, if you want to prevent some asset from auto releasing, please use cc.Asset.addRef instead\n */\n setAutoReleaseRecursively (asset, autoRelease) {\n if (typeof asset === 'object') asset = asset._uuid;\n autoRelease = !!autoRelease;\n this._autoReleaseSetting[asset] = autoRelease;\n var depends = dependUtil.getDepsRecursively(asset);\n for (var i = 0; i < depends.length; i++) {\n var depend = depends[i];\n this._autoReleaseSetting[depend] = autoRelease;\n }\n },\n\n /**\n * `cc.loader.isAutoRelease` is deprecated\n *\n * @method isAutoRelease\n * @param {Asset|String} assetOrUrl - asset object or the raw asset's url\n * @returns {Boolean}\n * @deprecated cc.loader.isAutoRelease is deprecated\n */\n isAutoRelease (asset) {\n if (typeof asset === 'object') asset = asset._uuid;\n return !!this._autoReleaseSetting[asset];\n }\n};\n\n/**\n * @class Downloader\n */\n/**\n * `cc.loader.downloader.loadSubpackage` is deprecated, please use {{#crossLink \"AssetManager/loadBundle:method\"}}{{/crossLink}} instead\n *\n * @deprecated cc.loader.downloader.loadSubpackage is deprecated, please use AssetManager.loadBundle instead\n * @method loadSubpackage\n * @param {String} name - Subpackage name\n * @param {Function} [completeCallback] - Callback invoked when subpackage loaded\n * @param {Error} completeCallback.error - error information\n */\ndownloader.loadSubpackage = function (name, completeCallback) {\n cc.assetManager.loadBundle(name, null, completeCallback);\n};\n\n/**\n * @deprecated cc.AssetLibrary is deprecated, please backup your project and upgrade to cc.assetManager\n */\nvar AssetLibrary = {\n\n /**\n * @deprecated cc.AssetLibrary.init is deprecated, please use cc.assetManager.init instead\n */\n init (options) {\n options.importBase = options.libraryPath;\n options.nativeBase = CC_BUILD ? options.rawAssetsBase : options.libraryPath;\n cc.assetManager.init(options);\n if (options.rawAssets) {\n var resources = new cc.AssetManager.Bundle();\n resources.init({\n name: cc.AssetManager.BuiltinBundleName.RESOURCES,\n importBase: options.importBase,\n nativeBase: options.nativeBase,\n paths: options.rawAssets.assets,\n uuids: Object.keys(options.rawAssets.assets),\n });\n }\n },\n\n /**\n * @deprecated cc.AssetLibrary is deprecated, please use cc.assetManager.loadAny instead\n */\n loadAsset (uuid, onComplete) {\n cc.assetManager.loadAny(uuid, onComplete);\n },\n\n getLibUrlNoExt () {\n if (CC_DEBUG) {\n cc.error('cc.AssetLibrary.getLibUrlNoExt was removed, if you want to transform url, please use cc.assetManager.utils.getUrlWithUuid instead');\n }\n },\n\n queryAssetInfo () {\n if (CC_DEBUG) {\n cc.error('cc.AssetLibrary.queryAssetInfo was removed, only available in the editor by using cc.assetManager.editorExtend.queryAssetInfo');\n }\n }\n};\n\n/**\n * `cc.url` is deprecated\n *\n * @deprecated cc.url is deprecated\n * @class url\n * @static\n */\ncc.url = {\n normalize (url) {\n cc.warnID(1400, 'cc.url.normalize', 'cc.assetManager.utils.normalize');\n return cc.assetManager.utils.normalize(url);\n },\n\n /**\n * `cc.url.raw` is deprecated, please use `cc.resources.load` directly, or use `Asset.nativeUrl` instead.\n *\n * @deprecated cc.url.raw is deprecated, please use cc.resources.load directly, or use Asset.nativeUrl instead.\n * @method raw\n * @param {String} url\n * @return {String}\n */\n raw (url) {\n cc.warnID(1400, 'cc.url.raw', 'cc.resources.load');\n if (url.startsWith('resources/')) {\n return cc.assetManager._transform({'path': cc.path.changeExtname(url.substr(10)), bundle: cc.AssetManager.BuiltinBundleName.RESOURCES, __isNative__: true, ext: cc.path.extname(url)});\n }\n return '';\n }\n};\n\nlet onceWarns = {\n loader: true,\n assetLibrary: true,\n};\n\nObject.defineProperties(cc, {\n loader: {\n get () {\n if (CC_DEBUG) {\n if (onceWarns.loader) {\n onceWarns.loader = false;\n cc.log('cc.loader is deprecated, use cc.assetManager instead please. See https://docs.cocos.com/creator/manual/zh/release-notes/asset-manager-upgrade-guide.html');\n }\n }\n return loader;\n }\n },\n\n AssetLibrary: {\n get () {\n if (CC_DEBUG) {\n if (onceWarns.assetLibrary) {\n onceWarns.assetLibrary = false;\n cc.log('cc.AssetLibrary is deprecated, use cc.assetManager instead please. See https://docs.cocos.com/creator/manual/zh/release-notes/asset-manager-upgrade-guide.html');\n }\n }\n return AssetLibrary;\n }\n },\n\n /**\n * `cc.LoadingItems` was removed, please use {{#crossLink \"Task\"}}{{/crossLink}} instead\n *\n * @deprecated cc.LoadingItems was removed, please use cc.AssetManager.Task instead\n * @class LoadingItems\n */\n LoadingItems: {\n get () {\n cc.warnID(1400, 'cc.LoadingItems', 'cc.AssetManager.Task');\n return cc.AssetManager.Task;\n }\n },\n\n Pipeline: {\n get () {\n cc.warnID(1400, 'cc.Pipeline', 'cc.AssetManager.Pipeline');\n return cc.AssetManager.Pipeline;\n }\n }\n});\n\njs.obsolete(cc, 'cc.RawAsset', 'cc.Asset');\n\n/**\n * @class Asset\n */\n/**\n * `cc.Asset.url` is deprecated, please use {{#crossLink \"Asset/nativeUrl:property\"}}{{/crossLink}} instead\n * @property url\n * @type {String}\n * @deprecated cc.Asset.url is deprecated, please use cc.Asset.nativeUrl instead\n */\njs.obsolete(cc.Asset.prototype, 'cc.Asset.url', 'nativeUrl');\n\n/**\n * @class macro\n * @static\n */\nObject.defineProperties(cc.macro, {\n /**\n * `cc.macro.DOWNLOAD_MAX_CONCURRENT` is deprecated now, please use {{#crossLink \"Downloader/maxConcurrency:property\"}}{{/crossLink}} instead\n * \n * @property DOWNLOAD_MAX_CONCURRENT\n * @type {Number}\n * @deprecated cc.macro.DOWNLOAD_MAX_CONCURRENT is deprecated now, please use cc.assetManager.downloader.maxConcurrency instead\n */\n DOWNLOAD_MAX_CONCURRENT: {\n get () {\n return cc.assetManager.downloader.maxConcurrency;\n },\n\n set (val) {\n cc.assetManager.downloader.maxConcurrency = val;\n }\n }\n});\n\nObject.assign(cc.director, {\n _getSceneUuid (sceneName) {\n cc.assetManager.main.getSceneInfo(sceneName);\n }\n});\n\nObject.defineProperties(cc.game, {\n _sceneInfos: {\n get () {\n var scenes = [];\n cc.assetManager.main._config.scenes.forEach(function (val) {\n scenes.push(val);\n });\n return scenes;\n }\n }\n});\n\nvar parseParameters = utilities.parseParameters;\nutilities.parseParameters = function (options, onProgress, onComplete) {\n var result = parseParameters(options, onProgress, onComplete);\n result.onProgress = result.onProgress || loader.onProgress;\n return result;\n};\n\nvar autoRelease = releaseManager._autoRelease;\nreleaseManager._autoRelease = function () {\n autoRelease.apply(this, arguments);\n var releaseSettings = loader._autoReleaseSetting;\n var keys = Object.keys(releaseSettings);\n for (let i = 0; i < keys.length; i++) {\n let key = keys[i];\n if (releaseSettings[key] === true) {\n var asset = cc.assetManager.assets.get(key);\n asset && releaseManager.tryRelease(asset);\n }\n }\n};","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst helper = require('./helper');\nconst MissingClass = CC_EDITOR && Editor.require('app://editor/page/scene-utils/missing-class-reporter').MissingClass;\nrequire('../platform/deserialize');\n\nfunction deserialize (json, options) {\n var classFinder, missingClass;\n if (CC_EDITOR) {\n missingClass = MissingClass;\n classFinder = function (type, data, owner, propName) {\n var res = missingClass.classFinder(type, data, owner, propName);\n if (res) {\n return res;\n }\n return cc._MissingScript;\n };\n classFinder.onDereferenced = missingClass.classFinder.onDereferenced;\n }\n else {\n classFinder = cc._MissingScript.safeFindClass;\n }\n\n let pool = null;\n if (!CC_PREVIEW) {\n pool = cc.deserialize.Details.pool;\n }\n else {\n let { default: deserializeForCompiled } = require('../platform/deserialize-compiled');\n let deserializeForEditor = require('../platform/deserialize-editor');\n if (deserializeForCompiled.isCompiledJson(json)) {\n pool = deserializeForCompiled.Details.pool;\n }\n else {\n pool = deserializeForEditor.Details.pool;\n }\n }\n var tdInfo = pool.get();\n\n var asset;\n try {\n asset = cc.deserialize(json, tdInfo, {\n classFinder: classFinder,\n customEnv: options\n });\n }\n catch (e) {\n pool.put(tdInfo);\n throw e;\n }\n\n if (CC_EDITOR && missingClass) {\n missingClass.reportMissingClass(asset);\n missingClass.reset();\n }\n\n var uuidList = tdInfo.uuidList;\n var objList = tdInfo.uuidObjList;\n var propList = tdInfo.uuidPropList;\n var depends = [];\n\n for (var i = 0; i < uuidList.length; i++) {\n var dependUuid = uuidList[i];\n depends[i] = {\n uuid: helper.decodeUuid(dependUuid),\n owner: objList[i],\n prop: propList[i]\n };\n }\n\n // non-native deps\n asset.__depends__ = depends;\n // native dep\n asset._native && (asset.__nativeDepend__ = true);\n pool.put(tdInfo);\n return asset;\n\n}\n\nmodule.exports = deserialize;\n","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nvar __audioSupport = cc.sys.__audioSupport;\nconst { parseParameters } = require('./utilities');\n\nfunction downloadDomAudio (url, options, onComplete) {\n var { options, onComplete } = parseParameters(options, undefined, onComplete);\n\n var dom = document.createElement('audio');\n dom.src = url;\n\n var clearEvent = function () {\n clearTimeout(timer);\n dom.removeEventListener(\"canplaythrough\", success, false);\n dom.removeEventListener(\"error\", failure, false);\n if(__audioSupport.USE_LOADER_EVENT)\n dom.removeEventListener(__audioSupport.USE_LOADER_EVENT, success, false);\n };\n\n var timer = setTimeout(function () {\n if (dom.readyState === 0)\n failure();\n else\n success();\n }, 8000);\n\n var success = function () {\n clearEvent();\n onComplete && onComplete(null, dom);\n };\n \n var failure = function () {\n clearEvent();\n var message = 'load audio failure - ' + url;\n cc.log(message);\n onComplete && onComplete(new Error(message));\n };\n\n dom.addEventListener(\"canplaythrough\", success, false);\n dom.addEventListener(\"error\", failure, false);\n if(__audioSupport.USE_LOADER_EVENT)\n dom.addEventListener(__audioSupport.USE_LOADER_EVENT, success, false);\n return dom;\n}\n\nmodule.exports = downloadDomAudio;","\n/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst { parseParameters } = require('./utilities');\n\nfunction downloadDomImage (url, options, onComplete) {\n var { options, onComplete } = parseParameters(options, undefined, onComplete);\n\n var img = new Image();\n\n if (window.location.protocol !== 'file:') {\n img.crossOrigin = 'anonymous';\n }\n\n function loadCallback () {\n img.removeEventListener('load', loadCallback);\n img.removeEventListener('error', errorCallback);\n onComplete && onComplete(null, img);\n }\n \n function errorCallback () {\n img.removeEventListener('load', loadCallback);\n img.removeEventListener('error', errorCallback);\n onComplete && onComplete(new Error(cc.debug.getError(4930, url)));\n }\n\n img.addEventListener('load', loadCallback);\n img.addEventListener('error', errorCallback);\n img.src = url;\n return img;\n}\n\nmodule.exports = downloadDomImage;","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nconst { parseParameters } = require('./utilities');\n\nfunction downloadFile (url, options, onProgress, onComplete) {\n var { options, onProgress, onComplete } = parseParameters(options, onProgress, onComplete);\n\n var xhr = new XMLHttpRequest(), errInfo = 'download failed: ' + url + ', status: ';\n\n xhr.open('GET', url, true);\n\n if (options.responseType !== undefined) xhr.responseType = options.responseType;\n if (options.withCredentials !== undefined) xhr.withCredentials = options.withCredentials;\n if (options.mimeType !== undefined && xhr.overrideMimeType ) xhr.overrideMimeType(options.mimeType);\n if (options.timeout !== undefined) xhr.timeout = options.timeout;\n\n if (options.header) {\n for (var header in options.header) {\n xhr.setRequestHeader(header, options.header[header]);\n }\n }\n\n xhr.onload = function () {\n if ( xhr.status === 200 || xhr.status === 0 ) {\n onComplete && onComplete(null, xhr.response);\n } else {\n onComplete && onComplete(new Error(errInfo + xhr.status + '(no response)'));\n }\n\n };\n\n if (onProgress) {\n xhr.onprogress = function (e) {\n if (e.lengthComputable) {\n onProgress(e.loaded, e.total);\n }\n };\n }\n\n xhr.onerror = function(){\n onComplete && onComplete(new Error(errInfo + xhr.status + '(error)'));\n };\n\n xhr.ontimeout = function(){\n onComplete && onComplete(new Error(errInfo + xhr.status + '(time out)'));\n };\n\n xhr.onabort = function(){\n onComplete && onComplete(new Error(errInfo + xhr.status + '(abort)'));\n };\n\n xhr.send(null);\n \n return xhr;\n}\n\nmodule.exports = downloadFile;","\n/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nconst { parseParameters } = require('./utilities');\n\nconst downloaded = {};\n\nfunction downloadScript (url, options, onComplete) {\n var { options, onComplete } = parseParameters(options, undefined, onComplete);\n\n // no need to load script again\n if (downloaded[url]) {\n return onComplete && onComplete(null);\n }\n\n var d = document, s = document.createElement('script');\n\n if (window.location.protocol !== 'file:') {\n s.crossOrigin = 'anonymous';\n }\n\n s.async = options.async;\n s.src = url;\n function loadHandler () {\n s.parentNode.removeChild(s);\n s.removeEventListener('load', loadHandler, false);\n s.removeEventListener('error', errorHandler, false);\n downloaded[url] = true;\n onComplete && onComplete(null);\n }\n\n function errorHandler() {\n s.parentNode.removeChild(s);\n s.removeEventListener('load', loadHandler, false);\n s.removeEventListener('error', errorHandler, false);\n onComplete && onComplete(new Error(cc.debug.getError(4928, url)));\n }\n \n s.addEventListener('load', loadHandler, false);\n s.addEventListener('error', errorHandler, false);\n d.body.appendChild(s);\n}\n\nmodule.exports = downloadScript;","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n/**\n * @module cc.AssetManager\n */\nconst js = require('../platform/js');\nconst debug = require('../CCDebug');\nconst { loadFont } = require('./font-loader');\nconst callInNextTick = require('../platform/utils').callInNextTick;\nconst downloadDomImage = require('./download-dom-image');\nconst downloadDomAudio = require('./download-dom-audio');\nconst downloadFile = require('./download-file');\nconst downloadScript = require('./download-script.js');\nconst Cache = require('./cache');\nconst { files } = require('./shared');\nconst { __audioSupport, capabilities } = require('../platform/CCSys');\nconst { urlAppendTimestamp, retry } = require('./utilities');\n\nconst REGEX = /^(?:\\w+:\\/\\/|\\.+\\/).+/;\n\n\nvar formatSupport = __audioSupport.format || [];\n\nvar unsupported = function (url, options, onComplete) {\n onComplete(new Error(debug.getError(4927)));\n}\n\nvar downloadAudio = function (url, options, onComplete) {\n // web audio need to download file as arrayBuffer\n if (options.audioLoadMode !== cc.AudioClip.LoadMode.DOM_AUDIO) {\n downloadArrayBuffer(url, options, onComplete);\n }\n else {\n downloadDomAudio(url, options, onComplete);\n }\n};\n\nvar downloadAudio = (!CC_EDITOR || !Editor.isMainProcess) ? (formatSupport.length === 0 ? unsupported : (__audioSupport.WEB_AUDIO ? downloadAudio : downloadDomAudio)) : null;\n\nvar downloadImage = function (url, options, onComplete) {\n // if createImageBitmap is valid, we can transform blob to ImageBitmap. Otherwise, just use HTMLImageElement to load\n var func = capabilities.imageBitmap && cc.macro.ALLOW_IMAGE_BITMAP ? downloadBlob : downloadDomImage;\n func.apply(this, arguments);\n};\n\nvar downloadBlob = function (url, options, onComplete) {\n options.responseType = \"blob\";\n downloadFile(url, options, options.onFileProgress, onComplete);\n};\n\nvar downloadJson = function (url, options, onComplete) {\n options.responseType = \"json\";\n downloadFile(url, options, options.onFileProgress, function (err, data) {\n if (!err && typeof data === 'string') {\n try {\n data = JSON.parse(data);\n }\n catch (e) {\n err = e;\n }\n }\n onComplete && onComplete(err, data);\n });\n};\n\nvar downloadArrayBuffer = function (url, options, onComplete) {\n options.responseType = \"arraybuffer\";\n downloadFile(url, options, options.onFileProgress, onComplete);\n};\n\nvar downloadText = function (url, options, onComplete) {\n options.responseType = \"text\";\n downloadFile(url, options, options.onFileProgress, onComplete);\n};\n\nvar downloadVideo = function (url, options, onComplete) {\n onComplete(null, url);\n};\n\nvar downloadBundle = function (nameOrUrl, options, onComplete) {\n let bundleName = cc.path.basename(nameOrUrl);\n let url = nameOrUrl;\n if (!REGEX.test(url)) url = 'assets/' + bundleName;\n var version = options.version || downloader.bundleVers[bundleName];\n var count = 0;\n var config = `${url}/config.${version ? version + '.' : ''}json`;\n let out = null, error = null;\n downloadJson(config, options, function (err, response) {\n if (err) {\n error = err;\n }\n out = response;\n out && (out.base = url + '/');\n count++;\n if (count === 2) {\n onComplete(error, out);\n }\n });\n\n var js = `${url}/index.${version ? version + '.' : ''}js`;\n downloadScript(js, options, function (err) {\n if (err) {\n error = err;\n }\n count++;\n if (count === 2) {\n onComplete(error, out);\n }\n });\n};\n\nvar _downloading = new Cache();\nvar _queue = [];\nvar _queueDirty = false;\n\n// the number of loading thread\nvar _totalNum = 0;\n\n// the number of request that launched in this period\nvar _totalNumThisPeriod = 0;\n\n// last time, if now - lastTime > period, refresh _totalNumThisPeriod.\nvar _lastDate = -1;\n\n// if _totalNumThisPeriod equals max, move request to next period using setTimeOut.\nvar _checkNextPeriod = false;\n\nvar updateTime = function () {\n var now = Date.now();\n // use deltaTime as interval\n let interval = cc.director._deltaTime > downloader._maxInterval ? downloader._maxInterval : cc.director._deltaTime;\n if (now - _lastDate > interval * 1000) {\n _totalNumThisPeriod = 0;\n _lastDate = now;\n }\n};\n\n// handle the rest request in next period\nvar handleQueue = function (maxConcurrency, maxRequestsPerFrame) {\n _checkNextPeriod = false;\n updateTime();\n while (_queue.length > 0 && _totalNum < maxConcurrency && _totalNumThisPeriod < maxRequestsPerFrame) {\n if (_queueDirty) {\n _queue.sort(function (a, b) {\n return a.priority - b.priority;\n });\n _queueDirty = false;\n }\n var nextOne = _queue.pop();\n if (!nextOne) {\n break;\n }\n _totalNum++;\n _totalNumThisPeriod++;\n nextOne.invoke();\n }\n\n if (_queue.length > 0 && _totalNum < maxConcurrency) {\n callInNextTick(handleQueue, maxConcurrency, maxRequestsPerFrame);\n _checkNextPeriod = true;\n }\n}\n\n\n/**\n * !#en\n * Control all download process, it is a singleton. All member can be accessed with `cc.assetManager.downloader` , it can download several types of files:\n * 1. Text\n * 2. Image\n * 3. Audio\n * 4. Assets\n * 5. Scripts\n * \n * !#zh\n * 管理所有下载过程downloader 是个单例,所有成员能通过 `cc.assetManager.downloader` 访问,它能下载以下几种类型的文件:\n * 1. 文本\n * 2. 图片\n * 3. 音频\n * 4. 资源\n * 5. 脚本\n * \n * @class Downloader\n */\nvar downloader = {\n\n _remoteServerAddress: '',\n _maxInterval: 1 / 30,\n \n /**\n * !#en \n * The address of remote server\n * \n * !#zh\n * 远程服务器地址\n * \n * @property remoteServerAddress\n * @type {string}\n * @default ''\n */\n get remoteServerAddress () {\n return this._remoteServerAddress;\n },\n\n /**\n * !#en \n * The maximum number of concurrent when downloading\n * \n * !#zh\n * 下载时的最大并发数\n * \n * @property maxConcurrency\n * @type {number}\n * @default 6\n */\n maxConcurrency: 6,\n\n /**\n * !#en \n * The maximum number of request can be launched per frame when downloading\n * \n * !#zh\n * 下载时每帧可以启动的最大请求数\n * \n * @property maxRequestsPerFrame\n * @type {number}\n * @default 6\n */\n maxRequestsPerFrame: 6,\n\n /**\n * !#en\n * The max number of retries when fail\n * \n * !#zh\n * 失败重试次数\n * \n * @property maxRetryCount\n * @type {Number}\n */\n maxRetryCount: 3,\n\n appendTimeStamp: false,\n\n limited: true,\n\n /**\n * !#en\n * Wait for while before another retry, unit: ms\n * \n * !#zh\n * 重试的间隔时间\n * \n * @property retryInterval\n * @type {Number}\n */\n retryInterval: 2000,\n\n bundleVers: null,\n\n /*\n * !#en\n * Use Image element to download image\n * \n * !#zh\n * 使用 Image 元素来下载图片\n * \n * @method downloadDomImage\n * @param {string} url - Url of the image\n * @param {Object} [options] - Some optional paramters\n * @param {Function} [onComplete] - Callback when image loaded or failed\n * @param {Error} onComplete.err - The occurred error, null indicetes success\n * @param {HTMLImageElement} onComplete.img - The loaded Image element, null if error occurred\n * @returns {HTMLImageElement} The image element\n * \n * @example\n * downloadDomImage('http://example.com/test.jpg', null, (err, img) => console.log(err));\n * \n * @typescript\n * downloadDomImage(url: string, options?: Record<string, any> , onComplete?: (err: Error, img: HTMLImageElement) => void): HTMLImageElement\n * downloadDomImage(url: string, onComplete?: (err: Error, img: HTMLImageElement) => void): HTMLImageElement\n */\n downloadDomImage: downloadDomImage,\n\n /*\n * !#en\n * Use audio element to download audio\n * \n * !#zh\n * 使用 Audio 元素来下载音频 \n * \n * @method downloadDomAudio\n * @param {string} url - Url of the audio\n * @param {Object} [options] - Some optional paramters\n * @param {Function} [onComplete] - Callback invoked when audio loaded or failed\n * @param {Error} onComplete.err - The occurred error, null indicetes success\n * @param {HTMLAudioElement} onComplete.audio - The loaded audio element, null if error occurred\n * @returns {HTMLAudioElement} The audio element\n * \n * @example\n * downloadDomAudio('http://example.com/test.mp3', null, (err, audio) => console.log(err));\n * \n * @typescript\n * downloadDomAudio(url: string, options?: Record<string, any>, onComplete?: (err: Error, audio: HTMLAudioElement) => void): HTMLAudioElement\n * downloadDomAudio(url: string, onComplete?: (err: Error, audio: HTMLAudioElement) => void): HTMLAudioElement\n */\n downloadDomAudio: downloadDomAudio,\n \n /*\n * !#en\n * Use XMLHttpRequest to download file\n * \n * !#zh\n * 使用 XMLHttpRequest 来下载文件\n * \n * @method downloadFile\n * @param {string} url - Url of the file\n * @param {Object} [options] - Some optional paramters\n * @param {string} [options.responseType] - Indicate which type of content should be returned\n * @param {boolean} [options.withCredentials] - Indicate whether or not cross-site Access-Contorl requests should be made using credentials\n * @param {string} [options.mimeType] - Indicate which type of content should be returned. In some browsers, responseType does't work, you can use mimeType instead\n * @param {Number} [options.timeout] - Represent the number of ms a request can take before being terminated.\n * @param {Object} [options.header] - The header should be tranferred to server\n * @param {Function} [onFileProgress] - Callback continuously during download is processing\n * @param {Number} onFileProgress.loaded - Size of downloaded content.\n * @param {Number} onFileProgress.total - Total size of content.\n * @param {Function} [onComplete] - Callback when file loaded or failed\n * @param {Error} onComplete.err - The occurred error, null indicetes success\n * @param {*} onComplete.response - The loaded content, null if error occurred, type of content can be indicated by options.responseType\n * @returns {XMLHttpRequest} The xhr to be send\n * \n * @example\n * downloadFile('http://example.com/test.bin', {responseType: 'arraybuffer'}, null, (err, arrayBuffer) => console.log(err));\n * \n * @typescript\n * downloadFile(url: string, options?: Record<string, any>, onFileProgress?: (loaded: Number, total: Number) => void, onComplete?: (err: Error, response: any) => void): XMLHttpRequest\n * downloadFile(url: string, onFileProgress?: (loaded: Number, total: Number) => void, onComplete?: (err: Error, response: any) => void): XMLHttpRequest\n * downloadFile(url: string, options?: Record<string, any>, onComplete?: (err: Error, response: any) => void): XMLHttpRequest\n * downloadFile(url: string, onComplete?: (err: Error, response: any) => void): XMLHttpRequest\n */\n downloadFile: downloadFile,\n\n /*\n * !#en\n * Load script \n * \n * !#zh\n * 加载脚本\n * \n * @method downloadScript\n * @param {string} url - Url of the script\n * @param {Object} [options] - Some optional paramters\n * @param {boolean} [options.isAsync] - Indicate whether or not loading process should be async\n * @param {Function} [onComplete] - Callback when script loaded or failed\n * @param {Error} onComplete.err - The occurred error, null indicetes success\n * \n * @example\n * downloadScript('http://localhost:8080/index.js', null, (err) => console.log(err));\n * \n * @typescript\n * downloadScript(url: string, options?: Record<string, any>, onComplete?: (err: Error) => void): void\n * downloadScript(url: string, onComplete?: (err: Error) => void): void\n */\n downloadScript: downloadScript,\n\n init (bundleVers, remoteServerAddress) {\n _downloading.clear();\n _queue.length = 0;\n this._remoteServerAddress = remoteServerAddress || '';\n this.bundleVers = bundleVers || Object.create(null);\n },\n\n /**\n * !#en\n * Register custom handler if you want to change default behavior or extend downloader to download other format file\n * \n * !#zh\n * 当你想修改默认行为或者拓展 downloader 来下载其他格式文件时可以注册自定义的 handler \n * \n * @method register\n * @param {string|Object} type - Extension likes '.jpg' or map likes {'.jpg': jpgHandler, '.png': pngHandler}\n * @param {Function} [handler] - handler\n * @param {string} handler.url - url\n * @param {Object} handler.options - some optional paramters will be transferred to handler.\n * @param {Function} handler.onComplete - callback when finishing downloading\n * \n * @example\n * downloader.register('.tga', (url, options, onComplete) => onComplete(null, null));\n * downloader.register({'.tga': (url, options, onComplete) => onComplete(null, null), '.ext': (url, options, onComplete) => onComplete(null, null)});\n * \n * @typescript\n * register(type: string, handler: (url: string, options: Record<string, any>, onComplete: (err: Error, content: any) => void) => void): void\n * register(map: Record<string, (url: string, options: Record<string, any>, onComplete: (err: Error, content: any) => void) => void>): void\n */\n register (type, handler) {\n if (typeof type === 'object') {\n js.mixin(downloaders, type);\n }\n else {\n downloaders[type] = handler;\n }\n },\n\n /**\n * !#en\n * Use corresponding handler to download file under limitation \n * \n * !#zh\n * 在限制下使用对应的 handler 来下载文件\n * \n * @method download\n * @param {string} url - The url should be downloaded\n * @param {string} type - The type indicates that which handler should be used to download, such as '.jpg'\n * @param {Object} options - some optional paramters will be transferred to the corresponding handler.\n * @param {Function} [options.onFileProgress] - progressive callback will be transferred to handler.\n * @param {Number} [options.maxRetryCount] - How many times should retry when download failed\n * @param {Number} [options.maxConcurrency] - The maximum number of concurrent when downloading\n * @param {Number} [options.maxRequestsPerFrame] - The maximum number of request can be launched per frame when downloading\n * @param {Number} [options.priority] - The priority of this url, default is 0, the greater number is higher priority.\n * @param {Function} onComplete - callback when finishing downloading\n * @param {Error} onComplete.err - The occurred error, null indicetes success\n * @param {*} onComplete.contetnt - The downloaded file\n * \n * @example\n * download('http://example.com/test.tga', '.tga', {onFileProgress: (loaded, total) => console.lgo(loaded/total)}, onComplete: (err) => console.log(err));\n * \n * @typescript\n * download(id: string, url: string, type: string, options: Record<string, any>, onComplete: (err: Error, content: any) => void): void\n */\n download (id, url, type, options, onComplete) {\n let func = downloaders[type] || downloaders['default'];\n let self = this;\n // if it is downloaded, don't download again\n let file, downloadCallbacks;\n if (file = files.get(id)) {\n onComplete(null, file);\n }\n else if (downloadCallbacks = _downloading.get(id)) {\n downloadCallbacks.push(onComplete);\n for (let i = 0, l = _queue.length; i < l; i++) {\n var item = _queue[i];\n if (item.id === id) {\n var priority = options.priority || 0;\n if (item.priority < priority) {\n item.priority = priority;\n _queueDirty = true;\n } \n return;\n }\n } \n }\n else {\n // if download fail, should retry\n var maxRetryCount = typeof options.maxRetryCount !== 'undefined' ? options.maxRetryCount : this.maxRetryCount;\n var maxConcurrency = typeof options.maxConcurrency !== 'undefined' ? options.maxConcurrency : this.maxConcurrency;\n var maxRequestsPerFrame = typeof options.maxRequestsPerFrame !== 'undefined' ? options.maxRequestsPerFrame : this.maxRequestsPerFrame;\n\n function process (index, callback) {\n if (index === 0) {\n _downloading.add(id, [onComplete]);\n }\n \n if (!self.limited) return func(urlAppendTimestamp(url), options, callback);\n\n // refresh\n updateTime();\n\n function invoke () {\n func(urlAppendTimestamp(url), options, function () {\n // when finish downloading, update _totalNum\n _totalNum--;\n if (!_checkNextPeriod && _queue.length > 0) {\n callInNextTick(handleQueue, maxConcurrency, maxRequestsPerFrame);\n _checkNextPeriod = true;\n }\n callback.apply(this, arguments);\n });\n }\n\n if (_totalNum < maxConcurrency && _totalNumThisPeriod < maxRequestsPerFrame) {\n invoke();\n _totalNum++;\n _totalNumThisPeriod++;\n }\n else {\n // when number of request up to limitation, cache the rest\n _queue.push({ id, priority: options.priority || 0, invoke });\n _queueDirty = true;\n \n if (!_checkNextPeriod && _totalNum < maxConcurrency) {\n callInNextTick(handleQueue, maxConcurrency, maxRequestsPerFrame);\n _checkNextPeriod = true;\n }\n }\n }\n\n // when retry finished, invoke callbacks\n function finale (err, result) {\n if (!err) files.add(id, result);\n var callbacks = _downloading.remove(id);\n for (let i = 0, l = callbacks.length; i < l; i++) {\n callbacks[i](err, result);\n }\n }\n \n retry(process, maxRetryCount, this.retryInterval, finale);\n }\n }\n};\n\n// dafault handler map\nvar downloaders = {\n // Images\n '.png' : downloadImage,\n '.jpg' : downloadImage,\n '.bmp' : downloadImage,\n '.jpeg' : downloadImage,\n '.gif' : downloadImage,\n '.ico' : downloadImage,\n '.tiff' : downloadImage,\n '.webp' : downloadImage,\n '.image' : downloadImage,\n '.pvr': downloadArrayBuffer,\n '.pkm': downloadArrayBuffer,\n\n // Audio\n '.mp3' : downloadAudio,\n '.ogg' : downloadAudio,\n '.wav' : downloadAudio,\n '.m4a' : downloadAudio,\n\n // Txt\n '.txt' : downloadText,\n '.xml' : downloadText,\n '.vsh' : downloadText,\n '.fsh' : downloadText,\n '.atlas' : downloadText,\n\n '.tmx' : downloadText,\n '.tsx' : downloadText,\n\n '.json' : downloadJson,\n '.ExportJson' : downloadJson,\n '.plist' : downloadText,\n\n '.fnt' : downloadText,\n\n // font\n '.font' : loadFont,\n '.eot' : loadFont,\n '.ttf' : loadFont,\n '.woff' : loadFont,\n '.svg' : loadFont,\n '.ttc' : loadFont,\n\n // Video\n '.mp4': downloadVideo,\n '.avi': downloadVideo,\n '.mov': downloadVideo,\n '.mpg': downloadVideo,\n '.mpeg': downloadVideo,\n '.rm': downloadVideo,\n '.rmvb': downloadVideo,\n\n // Binary\n '.binary' : downloadArrayBuffer,\n '.bin': downloadArrayBuffer,\n '.dbbin': downloadArrayBuffer,\n '.skel': downloadArrayBuffer,\n\n '.js': downloadScript,\n\n 'bundle': downloadBundle,\n\n 'default': downloadText\n\n};\n\ndownloader._downloaders = downloaders;\nmodule.exports = downloader;\n","/****************************************************************************\n Copyright (c) 2020 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nconst Bundle = require('./bundle');\nconst Cache = require('./cache');\nconst { assets, bundles } = require('./shared');\n\nconst _creating = new Cache();\n\nfunction createTexture (id, data, options, onComplete) {\n let out = null, err = null;\n try {\n out = new cc.Texture2D();\n out._nativeUrl = id;\n out._nativeAsset = data;\n }\n catch (e) {\n err = e;\n }\n onComplete && onComplete(err, out);\n}\n\nfunction createAudioClip (id, data, options, onComplete) {\n let out = new cc.AudioClip();\n out._nativeUrl = id;\n out._nativeAsset = data;\n out.duration = data.duration;\n onComplete && onComplete(null, out);\n}\n\nfunction createVideoClip (id, data, options, onComplete) {\n let out = new cc.VideoClip();\n out._nativeUrl = id;\n out._nativeAsset = data;\n onComplete && onComplete(null, out);\n}\n\nfunction createJsonAsset (id, data, options, onComplete) {\n let out = new cc.JsonAsset();\n out.json = data;\n onComplete && onComplete(null, out);\n}\n\nfunction createTextAsset (id, data, options, onComplete) {\n let out = new cc.TextAsset();\n out.text = data;\n onComplete && onComplete(null, out);\n}\n\nfunction createFont (id, data, options, onComplete) {\n let out = new cc.TTFFont();\n out._nativeUrl = id;\n out._nativeAsset = data;\n onComplete && onComplete(null, out);\n}\n\nfunction createBufferAsset (id, data, options, onComplete) {\n let out = new cc.BufferAsset();\n out._nativeUrl = id;\n out._nativeAsset = data;\n onComplete && onComplete(null, out);\n}\n\nfunction createAsset (id, data, options, onComplete) {\n let out = new cc.Asset();\n out._nativeUrl = id;\n out._nativeAsset = data;\n onComplete && onComplete(null, out);\n}\n\nfunction createBundle (id, data, options, onComplete) {\n let bundle = bundles.get(data.name);\n if (!bundle) {\n bundle = new Bundle();\n data.base = data.base || id + '/';\n bundle.init(data);\n }\n onComplete && onComplete(null, bundle);\n}\n\nconst factory = {\n\n register (type, handler) {\n if (typeof type === 'object') {\n cc.js.mixin(producers, type);\n }\n else {\n producers[type] = handler;\n }\n },\n\n create (id, data, type, options, onComplete) {\n var func = producers[type] || producers['default'];\n let asset, creating;\n if (asset = assets.get(id)) {\n onComplete(null, asset);\n }\n else if (creating = _creating.get(id)) {\n creating.push(onComplete);\n }\n else {\n _creating.add(id, [onComplete]);\n func(id, data, options, function (err, data) {\n if (!err && data instanceof cc.Asset) {\n data._uuid = id;\n assets.add(id, data);\n }\n let callbacks = _creating.remove(id);\n for (let i = 0, l = callbacks.length; i < l; i++) {\n callbacks[i](err, data);\n }\n });\n }\n }\n};\n\nconst producers = {\n // Images\n '.png' : createTexture,\n '.jpg' : createTexture,\n '.bmp' : createTexture,\n '.jpeg' : createTexture,\n '.gif' : createTexture,\n '.ico' : createTexture,\n '.tiff' : createTexture,\n '.webp' : createTexture,\n '.image' : createTexture,\n '.pvr': createTexture,\n '.pkm': createTexture,\n\n // Audio\n '.mp3' : createAudioClip,\n '.ogg' : createAudioClip,\n '.wav' : createAudioClip,\n '.m4a' : createAudioClip,\n\n // Video\n '.mp4' : createVideoClip,\n '.avi' : createVideoClip,\n '.mov' : createVideoClip,\n '.mpg' : createVideoClip,\n '.mpeg': createVideoClip,\n '.rm' : createVideoClip,\n '.rmvb': createVideoClip,\n\n // Txt\n '.txt' : createTextAsset,\n '.xml' : createTextAsset,\n '.vsh' : createTextAsset,\n '.fsh' : createTextAsset,\n '.atlas' : createTextAsset,\n\n '.tmx' : createTextAsset,\n '.tsx' : createTextAsset,\n '.fnt' : createTextAsset,\n\n '.json' : createJsonAsset,\n '.ExportJson' : createJsonAsset,\n\n // font\n '.font' : createFont,\n '.eot' : createFont,\n '.ttf' : createFont,\n '.woff' : createFont,\n '.svg' : createFont,\n '.ttc' : createFont,\n\n // Binary\n '.binary': createBufferAsset,\n '.bin': createBufferAsset,\n '.dbbin': createBufferAsset,\n '.skel': createBufferAsset,\n\n 'bundle': createBundle,\n\n 'default': createAsset\n\n};\n\nmodule.exports = factory;\n","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nconst packManager = require('./pack-manager');\nconst Task = require('./task');\nconst { getDepends, clear, forEach } = require('./utilities');\nconst { assets, fetchPipeline } = require('./shared');\n\nfunction fetch (task, done) {\n\n let firstTask = false;\n if (!task.progress) {\n task.progress = { finish: 0, total: task.input.length, canInvoke: true }; \n firstTask = true;\n }\n\n let options = task.options, depends = [], progress = task.progress, total = progress.total;\n options.__exclude__ = options.__exclude__ || Object.create(null);\n\n task.output = [];\n\n forEach(task.input, function (item, cb) {\n \n if (!item.isNative && assets.has(item.uuid)) {\n var asset = assets.get(item.uuid);\n asset.addRef();\n handle(item, task, asset, null, asset.__asyncLoadAssets__, depends, total, done);\n return cb();\n }\n\n packManager.load(item, task.options, function (err, data) {\n if (err) {\n if (!task.isFinish) {\n if (!cc.assetManager.force || firstTask) {\n cc.error(err.message, err.stack);\n progress.canInvoke = false;\n done(err);\n }\n else {\n handle(item, task, null, null, false, depends, total, done);\n }\n }\n }\n else {\n if (!task.isFinish) handle(item, task, null, data, !item.isNative, depends, total, done);\n }\n cb();\n });\n \n }, function () {\n\n if (task.isFinish) {\n clear(task, true);\n return task.dispatch('error');\n } \n if (depends.length > 0) {\n\n // stage 2 , download depend asset\n let subTask = Task.create({\n name: task.name + ' dependencies',\n input: depends,\n progress,\n options,\n onProgress: task.onProgress,\n onError: Task.prototype.recycle,\n onComplete: function (err) {\n if (!err) {\n task.output.push.apply(task.output, this.output);\n subTask.recycle();\n }\n if (firstTask) decreaseRef(task);\n done(err);\n },\n });\n fetchPipeline.async(subTask);\n return;\n }\n if (firstTask) decreaseRef(task);\n done();\n });\n}\n\nfunction decreaseRef (task) {\n let output = task.output;\n for (let i = 0, l = output.length; i < l; i++) {\n output[i].content && output[i].content.decRef(false);\n }\n}\n\nfunction handle (item, task, content, file, loadDepends, depends, last, done) {\n\n var exclude = task.options.__exclude__;\n var progress = task.progress;\n\n item.content = content;\n item.file = file;\n task.output.push(item);\n\n if (loadDepends) {\n exclude[item.uuid] = true;\n getDepends(item.uuid, file || content, exclude, depends, true, false, item.config);\n progress.total = last + depends.length;\n }\n\n progress.canInvoke && task.dispatch('progress', ++progress.finish, progress.total, item);\n}\n\nmodule.exports = fetch;","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst textUtils = require('../utils/text-utils');\n\nlet _canvasContext = null;\n// letter symbol number CJK\nlet _testString = \"BES bswy:->@123\\u4E01\\u3041\\u1101\";\n\nlet _fontFaces = Object.create(null);\nlet _intervalId = -1;\nlet _loadingFonts = [];\n// 3 seconds timeout\nlet _timeout = 3000;\n\n// Refer to https://github.com/typekit/webfontloader/blob/master/src/core/fontwatcher.js\nlet useNativeCheck = (function () {\n var nativeCheck = undefined;\n return function () {\n if (nativeCheck === undefined) {\n if (!!window.FontFace) {\n var match = /Gecko.*Firefox\\/(\\d+)/.exec(window.navigator.userAgent);\n var safari10Match = /OS X.*Version\\/10\\..*Safari/.exec(window.navigator.userAgent) && /Apple/.exec(window.navigator.vendor);\n \n if (match) {\n nativeCheck = parseInt(match[1], 10) > 42;\n } \n else if (safari10Match) {\n nativeCheck = false;\n } \n else {\n nativeCheck = true;\n }\n \n } else {\n nativeCheck = false;\n }\n }\n\n return nativeCheck;\n \n }\n})();\n\nfunction _checkFontLoaded () {\n let allFontsLoaded = true;\n let now = Date.now();\n\n for (let i = _loadingFonts.length - 1; i >= 0; i--) {\n let fontLoadHandle = _loadingFonts[i];\n let fontFamily = fontLoadHandle.fontFamilyName;\n // load timeout\n if (now - fontLoadHandle.startTime > _timeout) {\n cc.warnID(4933, fontFamily);\n fontLoadHandle.onComplete(null, fontFamily);\n _loadingFonts.splice(i, 1);\n continue;\n }\n\n let oldWidth = fontLoadHandle.refWidth;\n let fontDesc = '40px ' + fontFamily;\n _canvasContext.font = fontDesc;\n let newWidth = textUtils.safeMeasureText(_canvasContext, _testString, fontDesc);\n // loaded successfully\n if (oldWidth !== newWidth) {\n _loadingFonts.splice(i, 1);\n fontLoadHandle.onComplete(null, fontFamily);\n }\n else {\n allFontsLoaded = false;\n }\n }\n\n if (allFontsLoaded) {\n clearInterval(_intervalId);\n _intervalId = -1;\n }\n}\n\n// refer to https://github.com/typekit/webfontloader/blob/master/src/core/nativefontwatchrunner.js\nfunction nativeCheckFontLoaded (start, font, callback) {\n var loader = new Promise(function (resolve, reject) {\n var check = function () {\n var now = Date.now();\n\n if (now - start >= _timeout) {\n reject();\n } \n else {\n document.fonts.load('40px ' + font).then(function (fonts) {\n if (fonts.length >= 1) {\n resolve();\n } \n else {\n setTimeout(check, 100);\n }\n }, function () {\n reject();\n });\n }\n };\n\n check();\n });\n \n var timeoutId = null,\n timer = new Promise(function (resolve, reject) {\n timeoutId = setTimeout(reject, _timeout);\n });\n \n Promise.race([timer, loader]).then(function () {\n if (timeoutId) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n \n callback(null, font);\n }, function () {\n cc.warnID(4933, font);\n callback(null, font);\n });\n}\n\nvar fontLoader = {\n loadFont: function (url, options, onComplete) {\n let fontFamilyName = fontLoader._getFontFamily(url);\n\n // Already loaded fonts\n if (_fontFaces[fontFamilyName]) {\n return onComplete(null, fontFamilyName);\n }\n\n if (!_canvasContext) {\n let labelCanvas = document.createElement('canvas');\n labelCanvas.width = 100;\n labelCanvas.height = 100;\n _canvasContext = labelCanvas.getContext('2d');\n }\n \n // Default width reference to test whether new font is loaded correctly\n let fontDesc = '40px ' + fontFamilyName;\n _canvasContext.font = fontDesc;\n let refWidth = textUtils.safeMeasureText(_canvasContext, _testString, fontDesc);\n\n // Setup font face style\n let fontStyle = document.createElement(\"style\");\n fontStyle.type = \"text/css\";\n let fontStr = \"\";\n if (isNaN(fontFamilyName - 0))\n fontStr += \"@font-face { font-family:\" + fontFamilyName + \"; src:\";\n else\n fontStr += \"@font-face { font-family:'\" + fontFamilyName + \"'; src:\";\n fontStr += \"url('\" + url + \"');\";\n fontStyle.textContent = fontStr + \"}\";\n document.body.appendChild(fontStyle);\n\n // Preload font with div\n let preloadDiv = document.createElement(\"div\");\n let divStyle = preloadDiv.style;\n divStyle.fontFamily = fontFamilyName;\n preloadDiv.innerHTML = \".\";\n divStyle.position = \"absolute\";\n divStyle.left = \"-100px\";\n divStyle.top = \"-100px\";\n document.body.appendChild(preloadDiv);\n\n if (useNativeCheck()) {\n nativeCheckFontLoaded(Date.now(), fontFamilyName, onComplete);\n }\n else {\n // Save loading font\n let fontLoadHandle = {\n fontFamilyName,\n refWidth,\n onComplete,\n startTime: Date.now()\n }\n _loadingFonts.push(fontLoadHandle);\n if (_intervalId === -1) {\n _intervalId = setInterval(_checkFontLoaded, 100);\n }\n }\n _fontFaces[fontFamilyName] = fontStyle;\n },\n\n _getFontFamily: function (fontHandle) {\n var ttfIndex = fontHandle.lastIndexOf(\".ttf\");\n if (ttfIndex === -1) return fontHandle;\n\n var slashPos = fontHandle.lastIndexOf(\"/\");\n var fontFamilyName;\n if (slashPos === -1) {\n fontFamilyName = fontHandle.substring(0, ttfIndex) + \"_LABEL\";\n } else {\n fontFamilyName = fontHandle.substring(slashPos + 1, ttfIndex) + \"_LABEL\";\n }\n if (fontFamilyName.indexOf(' ') !== -1) {\n fontFamilyName = '\"' + fontFamilyName + '\"';\n }\n return fontFamilyName;\n }\n};\n\nmodule.exports = fontLoader","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nconst { bundles } = require('./shared');\n/**\n * @module cc.AssetManager\n */\n/**\n * !#en\n * Provide some helpful function, it is a singleton. All member can be accessed with `cc.assetManager.utils`\n * \n * !#zh\n * 提供一些辅助方法helper 是一个单例, 所有成员能通过 `cc.assetManager.utils` 访问\n * \n * @class Helper\n */\nvar helper = {\n /**\n * !#en\n * Decode uuid, returns the original uuid\n * \n * !#zh\n * 解码 uuid返回原始 uuid\n * \n * @method decodeUuid\n * @param {String} base64 - the encoded uuid\n * @returns {String} the original uuid \n * \n * @example\n * var uuid = 'fcmR3XADNLgJ1ByKhqcC5Z';\n * var originalUuid = decodeUuid(uuid); // fc991dd7-0033-4b80-9d41-c8a86a702e59\n * \n * @typescript\n * decodeUuid(base64: string): string\n */\n decodeUuid: require('../utils/decode-uuid'),\n\n /**\n * !#en\n * Extract uuid from url\n * \n * !#zh\n * 从 url 中提取 uuid\n * \n * @method getUuidFromURL\n * @param {String} url - url\n * @returns {String} the uuid parsed from url\n * \n * @example\n * var url = 'assets/main/import/fc/fc991dd7-0033-4b80-9d41-c8a86a702e59.json';\n * var uuid = getUuidFromURL(url); // fc991dd7-0033-4b80-9d41-c8a86a702e59\n * \n * @typescript\n * getUuidFromURL(url: string): string\n */\n getUuidFromURL: (function () {\n var _uuidRegex = /.*[/\\\\][0-9a-fA-F]{2}[/\\\\]([0-9a-fA-F-]{8,})/;\n return function (url) {\n var matches = url.match(_uuidRegex);\n if (matches) {\n return matches[1];\n }\n return '';\n }\n })(),\n\n /**\n * !#en\n * Transform uuid to url\n * \n * !#zh\n * 转换 uuid 为 url\n * \n * @method getUrlWithUuid\n * @param {string} uuid - The uuid of asset\n * @param {Object} [options] - Some optional parameters\n * @param {Boolean} [options.isNative] - Indicates whether the path you want is a native resource path\n * @param {string} [options.nativeExt] - Extension of the native resource path, it is required when isNative is true\n * @returns {string} url\n * \n * @example\n * // json path, 'assets/main/import/fc/fc991dd7-0033-4b80-9d41-c8a86a702e59.json';\n * var url = getUrlWithUuid('fcmR3XADNLgJ1ByKhqcC5Z', {isNative: false});\n * \n * // png path, 'assets/main/native/fc/fc991dd7-0033-4b80-9d41-c8a86a702e59.png';\n * var url = getUrlWithUuid('fcmR3XADNLgJ1ByKhqcC5Z', {isNative: true, nativeExt: '.png'});\n * \n * @typescript\n * getUrlWithUuid(uuid: string, options?: Record<string, any>): string\n */\n getUrlWithUuid: function (uuid, options) {\n options = options || Object.create(null);\n options.__isNative__ = options.isNative;\n options.ext = options.nativeExt;\n var bundle = bundles.find(function (bundle) {\n return bundle.getAssetInfo(uuid);\n });\n\n if (bundle) {\n options.bundle = bundle.name;\n }\n\n return cc.assetManager._transform(uuid, options);\n },\n\n /**\n * !#en\n * Check if the type of asset is scene\n * \n * !#zh\n * 检查资源类型是否是场景\n * \n * @method isScene\n * @param {*} asset - asset\n * @returns {boolean} - whether or not type is cc.SceneAsset\n * \n * @typescript\n * isScene(asset: any): boolean\n */\n isScene: function (asset) {\n return asset && (asset.constructor === cc.SceneAsset || asset instanceof cc.Scene);\n },\n\n /**\n * !#en\n * Normalize url, strip './' and '/'\n * \n * !#zh\n * 标准化 url ,去除 './' 和 '/' \n * \n * @method normalize\n * @param {string} url - url\n * @returns {string} - The normalized url\n * \n * @typescript\n * normalize(url: string): string\n */\n normalize: function (url) {\n if (url) {\n if (url.charCodeAt(0) === 46 && url.charCodeAt(1) === 47) {\n // strip './'\n url = url.slice(2);\n }\n else if (url.charCodeAt(0) === 47) {\n // strip '/'\n url = url.slice(1);\n }\n }\n return url;\n }\n};\n\nmodule.exports = helper;","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nrequire('./deprecated');\nrequire('./CCAssetManager');\n\n","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nconst packManager = require('./pack-manager');\nconst Pipeline = require('./pipeline');\nconst parser = require('./parser');\nconst { getDepends, cache, gatherAsset, setProperties, forEach, clear, checkCircleReference } = require('./utilities');\nconst { assets, files, parsed, pipeline } = require('./shared');\nconst Task = require('./task');\n\nfunction load (task, done) {\n\n let firstTask = false;\n if (!task.progress) {\n task.progress = { finish: 0, total: task.input.length, canInvoke: true };\n firstTask = true;\n }\n \n var options = task.options, progress = task.progress;\n\n options.__exclude__ = options.__exclude__ || Object.create(null);\n\n task.output = [];\n \n forEach(task.input, function (item, cb) {\n\n let subTask = Task.create({ \n input: item, \n onProgress: task.onProgress, \n options, \n progress, \n onComplete: function (err, item) {\n if (err && !task.isFinish) {\n if (!cc.assetManager.force || firstTask) {\n if (!CC_EDITOR) {\n cc.error(err.message, err.stack);\n }\n progress.canInvoke = false;\n done(err);\n }\n else {\n progress.canInvoke && task.dispatch('progress', ++progress.finish, progress.total, item);\n }\n }\n task.output.push(item);\n subTask.recycle();\n cb();\n }\n });\n\n loadOneAssetPipeline.async(subTask);\n\n }, function () {\n\n options.__exclude__ = null;\n\n if (task.isFinish) {\n clear(task, true);\n return task.dispatch('error');\n }\n\n gatherAsset(task);\n clear(task, true);\n done();\n });\n}\n\nvar loadOneAssetPipeline = new Pipeline('loadOneAsset', [\n\n function fetch (task, done) {\n var item = task.output = task.input;\n var { options, isNative, uuid, file } = item;\n var { reload } = options;\n\n if (file || (!reload && !isNative && assets.has(uuid))) return done();\n\n packManager.load(item, task.options, function (err, data) {\n item.file = data;\n done(err);\n });\n },\n\n function parse (task, done) {\n\n var item = task.output = task.input, progress = task.progress, exclude = task.options.__exclude__;\n var { id, file, options } = item;\n\n if (item.isNative) {\n parser.parse(id, file, item.ext, options, function (err, asset) {\n if (err) return done(err);\n item.content = asset;\n progress.canInvoke && task.dispatch('progress', ++progress.finish, progress.total, item);\n files.remove(id);\n parsed.remove(id);\n done();\n });\n }\n else {\n var { uuid } = item;\n if (uuid in exclude) {\n \n var { finish, content, err, callbacks } = exclude[uuid];\n progress.canInvoke && task.dispatch('progress', ++progress.finish, progress.total, item);\n \n if (finish || checkCircleReference(uuid, uuid, exclude) ) {\n content && content.addRef && content.addRef();\n item.content = content;\n done(err);\n }\n else {\n callbacks.push({ done, item });\n }\n }\n else {\n if (!options.reload && assets.has(uuid)) {\n var asset = assets.get(uuid);\n if (options.__asyncLoadAssets__ || !asset.__asyncLoadAssets__) {\n item.content = asset.addRef();\n progress.canInvoke && task.dispatch('progress', ++progress.finish, progress.total, item);\n done();\n }\n else {\n loadDepends(task, asset, done, false);\n }\n }\n else {\n parser.parse(id, file, 'import', options, function (err, asset) {\n if (err) return done(err);\n asset._uuid = uuid;\n loadDepends(task, asset, done, true);\n });\n }\n }\n }\n }\n]);\n\nfunction loadDepends (task, asset, done, init) {\n\n var item = task.input, progress = task.progress;\n var { uuid, id, options, config } = item;\n var { __asyncLoadAssets__, cacheAsset } = options;\n\n var depends = [];\n // add reference avoid being released during loading dependencies\n asset.addRef && asset.addRef();\n getDepends(uuid, asset, Object.create(null), depends, false, __asyncLoadAssets__, config);\n progress.canInvoke && task.dispatch('progress', ++progress.finish, progress.total += depends.length, item);\n\n var repeatItem = task.options.__exclude__[uuid] = { content: asset, finish: false, callbacks: [{ done, item }] };\n\n let subTask = Task.create({ \n input: depends, \n options: task.options, \n onProgress: task.onProgress, \n onError: Task.prototype.recycle, \n progress, \n onComplete: function (err) {\n asset.decRef && asset.decRef(false);\n asset.__asyncLoadAssets__ = __asyncLoadAssets__;\n repeatItem.finish = true;\n repeatItem.err = err;\n\n if (!err) {\n\n var assets = Array.isArray(subTask.output) ? subTask.output : [subTask.output];\n var map = Object.create(null);\n for (let i = 0, l = assets.length; i < l; i++) {\n var dependAsset = assets[i];\n dependAsset && (map[dependAsset instanceof cc.Asset ? dependAsset._uuid + '@import' : uuid + '@native'] = dependAsset);\n }\n\n if (!init) {\n if (asset.__nativeDepend__ && !asset._nativeAsset) {\n var missingAsset = setProperties(uuid, asset, map);\n if (!missingAsset && !asset.__onLoadInvoked__) {\n try {\n asset.onLoad && asset.onLoad();\n asset.__onLoadInvoked__ = true;\n }\n catch (e) {\n cc.error(e.message, e.stack);\n }\n }\n }\n }\n else {\n var missingAsset = setProperties(uuid, asset, map);\n if (!missingAsset && !asset.__onLoadInvoked__) {\n try {\n asset.onLoad && asset.onLoad();\n asset.__onLoadInvoked__ = true;\n }\n catch (e) {\n cc.error(e.message, e.stack);\n }\n }\n files.remove(id);\n parsed.remove(id);\n cache(uuid, asset, cacheAsset !== undefined ? cacheAsset : cc.assetManager.cacheAsset); \n }\n subTask.recycle();\n }\n \n var callbacks = repeatItem.callbacks;\n\n for (var i = 0, l = callbacks.length; i < l; i++) {\n\n var cb = callbacks[i];\n asset.addRef && asset.addRef();\n cb.item.content = asset;\n cb.done(err);\n\n }\n\n callbacks.length = 0;\n }\n });\n\n pipeline.async(subTask);\n}\n\nmodule.exports = load;","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport { unpackJSONs, packCustomObjData } from '../platform/deserialize-compiled';\n\nconst downloader = require('./downloader');\nconst Cache = require('./cache');\nconst js = require('../platform/js');\nconst { files } = require('./shared');\n\nvar _loading = new Cache();\n\nfunction isLoading (val) {\n return _loading.has(val.uuid);\n}\n\n\n/**\n * @module cc.AssetManager\n */\n/**\n * !#en\n * Handle the packed asset, include unpacking, loading, cache and so on. It is a singleton. All member can be accessed with `cc.assetManager.packManager`\n * \n * !#zh\n * 处理打包资源,包括拆包,加载,缓存等等,这是一个单例, 所有成员能通过 `cc.assetManager.packManager` 访问\n * \n * @class PackManager\n */\nvar packManager = {\n\n /**\n * !#en\n * Unpack the json, revert to what it was before packing\n * \n * !#zh\n * 拆解 json 包,恢复为打包之前的内容\n * \n * @method unpackJson\n * @param {String[]} pack - The pack\n * @param {Object} json - The content of pack\n * @param {Object} options - Some optional parameters\n * @param {Function} onComplete - Callback when finish unpacking\n * @param {Error} onComplete.err - The occurred error, null indicetes success\n * @param {Object} onComplete.content - The unpacked assets\n * \n * @example\n * downloader.downloadFile('pack.json', {responseType: 'json'}, null, (err, file) => {\n * packManager.unpackJson(['a', 'b'], file, null, (err, data) => console.log(err));\n * });\n * \n * @typescript\n * unpackJson(pack: string[], json: any, options: Record<string, any>, onComplete?: (err: Error, content: any) => void): void\n */\n unpackJson (pack, json, options, onComplete) {\n\n var out = js.createMap(true), err = null;\n \n if (Array.isArray(json)) {\n\n json = unpackJSONs(json);\n\n if (json.length !== pack.length) {\n cc.errorID(4915);\n }\n for (let i = 0; i < pack.length; i++) {\n var key = pack[i] + '@import';\n out[key] = json[i];\n }\n }\n else {\n const textureType = js._getClassId(cc.Texture2D);\n if (json.type === textureType) {\n if (json.data) {\n var datas = json.data.split('|');\n if (datas.length !== pack.length) {\n cc.errorID(4915);\n }\n for (let i = 0; i < pack.length; i++) {\n out[pack[i] + '@import'] = packCustomObjData(textureType, datas[i], true);\n }\n }\n }\n else {\n err = new Error('unmatched type pack!');\n out = null;\n }\n }\n onComplete && onComplete(err, out);\n },\n\n init () {\n _loading.clear();\n },\n\n /**\n * !#en\n * Register custom handler if you want to change default behavior or extend packManager to unpack other format pack\n * \n * !#zh\n * 当你想修改默认行为或者拓展 packManager 来拆分其他格式的包时可以注册自定义的 handler\n * \n * @method register\n * @param {string|Object} type - Extension likes '.bin' or map likes {'.bin': binHandler, '.ab': abHandler}\n * @param {Function} [handler] - handler\n * @param {string} handler.packUuid - The uuid of pack\n * @param {*} handler.data - The content of pack\n * @param {Object} handler.options - Some optional parameters\n * @param {Function} handler.onComplete - Callback when finishing unpacking\n * \n * @example\n * packManager.register('.bin', (packUuid, file, options, onComplete) => onComplete(null, null));\n * packManager.register({'.bin': (packUuid, file, options, onComplete) => onComplete(null, null), '.ab': (packUuid, file, options, onComplete) => onComplete(null, null)});\n * \n * @typescript\n * register(type: string, handler: (packUuid: string, data: any, options: Record<string, any>, onComplete: (err: Error, content: any) => void) => void): void\n * register(map: Record<string, (packUuid: string, data: any, options: Record<string, any>, onComplete: (err: Error, content: any) => void) => void>): void\n */\n register (type, handler) {\n if (typeof type === 'object') {\n js.mixin(unpackers, type);\n }\n else {\n unpackers[type] = handler;\n }\n },\n \n /**\n * !#en\n * Use corresponding handler to unpack package\n * \n * !#zh\n * 用对应的 handler 来进行解包 \n * \n * @method unpack\n * @param {String[]} pack - The uuid of packed assets \n * @param {*} data - The packed data\n * @param {string} type - The type indicates that which handler should be used to download, such as '.jpg'\n * @param {Object} options - Some optional parameter\n * @param {Function} onComplete - callback when finishing unpacking\n * @param {Error} onComplete.err - The occurred error, null indicetes success\n * @param {*} onComplete.data - Original assets\n * \n * @example\n * downloader.downloadFile('pack.json', {responseType: 'json'}, null, (err, file) => {\n * packManager.unpack(['2fawq123d', '1zsweq23f'], file, '.json', null, (err, data) => console.log(err));\n * });\n * \n * @typescript\n * unpack(pack: string[], data: any, type: string, options: Record<string, any>, onComplete?: (err: Error, data: any) => void): void\n */\n unpack (pack, data, type, options, onComplete) {\n if (!data) {\n onComplete && onComplete(new Error('package data is wrong!'));\n return;\n }\n var unpacker = unpackers[type];\n unpacker(pack, data, options, onComplete);\n },\n\n /**\n * !#en\n * Download request item, If item is not in any package, download as usual. Otherwise, download the corresponding package and unpack it. \n * And then retrieve the corresponding content form it.\n * \n * !#zh\n * 下载请求对象,如果请求对象不在任何包内,则正常下载,否则下载对应的 package 并进行拆解,并取回包内对应的内容\n * \n * @method load\n * @param {RequestItem} item - Some item you want to download\n * @param {Object} options - Some optional parameters\n * @param {Function} onComplete - Callback when finished\n * @param {Err} onComplete.err - The occurred error, null indicetes success\n * @param {*} onComplete.data - The unpacked data retrieved from package\n * \n * @example\n * var requestItem = cc.AssetManager.RequestItem.create();\n * requestItem.uuid = 'fcmR3XADNLgJ1ByKhqcC5Z';\n * requestItem.info = config.getAssetInfo('fcmR3XADNLgJ1ByKhqcC5Z');\n * packManager.load(requestItem, null, (err, data) => console.log(err));\n * \n * @typescript\n * load(item: RequestItem, options: Record<string, any>, onComplete: (err: Error, data: any) => void): void\n * \n */\n load (item, options, onComplete) {\n // if not in any package, download as uausl\n if (item.isNative || !item.info || !item.info.packs) return downloader.download(item.id, item.url, item.ext, item.options, onComplete);\n\n if (files.has(item.id)) return onComplete(null, files.get(item.id));\n\n var packs = item.info.packs;\n\n // find a loading package\n var pack = packs.find(isLoading);\n \n if (pack) return _loading.get(pack.uuid).push({ onComplete, id: item.id });\n\n // download a new package\n pack = packs[0];\n _loading.add(pack.uuid, [{ onComplete, id: item.id }]);\n\n let url = cc.assetManager._transform(pack.uuid, {ext: pack.ext, bundle: item.config.name});\n\n downloader.download(pack.uuid, url, pack.ext, item.options, function (err, data) {\n files.remove(pack.uuid);\n if (err) {\n cc.error(err.message, err.stack);\n }\n // unpack package\n packManager.unpack(pack.packs, data, pack.ext, item.options, function (err, result) {\n if (!err) {\n for (var id in result) {\n files.add(id, result[id]);\n }\n } else {\n err.message = `unpack ${url} failed! details: ${err.message}`;\n }\n var callbacks = _loading.remove(pack.uuid);\n for (var i = 0, l = callbacks.length; i < l; i++) {\n var cb = callbacks[i];\n if (err) {\n cb.onComplete(err);\n continue;\n }\n\n var data = result[cb.id];\n if (!data) {\n cb.onComplete(new Error('can not retrieve data from package'));\n }\n else {\n cb.onComplete(null, data);\n }\n }\n });\n });\n }\n};\n\nvar unpackers = {\n '.json': packManager.unpackJson\n};\n\nmodule.exports = packManager;\n","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * @module cc.AssetManager\n */\n\nconst plistParser = require('../platform/CCSAXParser').plistParser;\nconst js = require('../platform/js');\nconst deserialize = require('./deserialize');\nconst Cache = require('./cache');\nconst { isScene } = require('./helper');\nconst { parsed, files } = require('./shared');\nconst { __audioSupport, capabilities } = require('../platform/CCSys');\n\nvar _parsing = new Cache();\n\n/**\n * !#en\n * Parse the downloaded file, it's a singleton, all member can be accessed with `cc.assetManager.parser`\n * \n * !#zh\n * 解析已下载的文件parser 是一个单例, 所有成员能通过 `cc.assetManaager.parser` 访问\n * \n * @class Parser\n */\nvar parser = {\n /*\n * !#en\n * Parse image file\n * \n * !#zh\n * 解析图片文件\n * \n * @method parseImage\n * @param {Blob} file - The downloaded file\n * @param {Object} options - Some optional paramters \n * @param {Function} [onComplete] - callback when finish parsing.\n * @param {Error} onComplete.err - The occurred error, null indicetes success\n * @param {ImageBitmap|HTMLImageElement} onComplete.img - The parsed content\n * \n * @example\n * downloader.downloadFile('test.jpg', {responseType: 'blob'}, null, (err, file) => {\n * parser.parseImage(file, null, (err, img) => console.log(err));\n * });\n * \n * @typescript\n * parseImage(file: Blob, options: Record<string, any>, onComplete?: (err: Error, img: ImageBitmap|HTMLImageElement) => void): void\n */\n parseImage (file, options, onComplete) {\n if (capabilities.imageBitmap && file instanceof Blob) {\n let imageOptions = {};\n imageOptions.imageOrientation = options.__flipY__ ? 'flipY' : 'none';\n imageOptions.premultiplyAlpha = options.__premultiplyAlpha__ ? 'premultiply' : 'none';\n createImageBitmap(file, imageOptions).then(function (result) {\n result.flipY = !!options.__flipY__;\n result.premultiplyAlpha = !!options.__premultiplyAlpha__;\n onComplete && onComplete(null, result);\n }, function (err) {\n onComplete && onComplete(err, null);\n });\n }\n else {\n onComplete && onComplete(null, file);\n }\n },\n\n /*\n * !#en\n * Parse audio file\n * \n * !#zh\n * 解析音频文件\n * \n * @method parseAudio\n * @param {ArrayBuffer|HTMLAudioElement} file - The downloaded file\n * @param {Object} options - Some optional paramters\n * @param {Function} onComplete - Callback when finish parsing.\n * @param {Error} onComplete.err - The occurred error, null indicetes success\n * @param {AudioBuffer|HTMLAudioElement} onComplete.audio - The parsed content\n * \n * @example\n * downloader.downloadFile('test.mp3', {responseType: 'arraybuffer'}, null, (err, file) => {\n * parser.parseAudio(file, null, (err, audio) => console.log(err));\n * });\n * \n * @typescript\n * parseAudio(file: ArrayBuffer|HTMLAudioElement, options: Record<string, any>, onComplete?: (err: Error, audio: AudioBuffer|HTMLAudioElement) => void): void\n */\n parseAudio (file, options, onComplete) {\n if (file instanceof ArrayBuffer) { \n __audioSupport.context.decodeAudioData(file, function (buffer) {\n onComplete && onComplete(null, buffer);\n }, function(e){\n onComplete && onComplete(e, null);\n });\n }\n else {\n onComplete && onComplete(null, file);\n }\n },\n\n /*\n * !#en\n * Parse pvr file \n * \n * !#zh\n * 解析压缩纹理格式 pvr 文件\n * \n * @method parsePVRTex\n * @param {ArrayBuffer|ArrayBufferView} file - The downloaded file\n * @param {Object} options - Some optional paramters\n * @param {Function} onComplete - Callback when finish parsing.\n * @param {Error} onComplete.err - The occurred error, null indicetes success\n * @param {Object} onComplete.pvrAsset - The parsed content\n * \n * @example\n * downloader.downloadFile('test.pvr', {responseType: 'arraybuffer'}, null, (err, file) => {\n * parser.parsePVRTex(file, null, (err, pvrAsset) => console.log(err));\n * });\n * \n * @typescript\n * parsePVRTex(file: ArrayBuffer|ArrayBufferView, options: Record<string, any>, onComplete: (err: Error, pvrAsset: {_data: Uint8Array, _compressed: boolean, width: number, height: number}) => void): void\n */\n parsePVRTex : (function () {\n //===============//\n // PVR constants //\n //===============//\n // https://github.com/toji/texture-tester/blob/master/js/webgl-texture-util.js#L424\n const PVR_HEADER_LENGTH = 13; // The header length in 32 bit ints.\n const PVR_MAGIC = 0x03525650; //0x50565203;\n \n // Offsets into the header array.\n const PVR_HEADER_MAGIC = 0;\n const PVR_HEADER_FORMAT = 2;\n const PVR_HEADER_HEIGHT = 6;\n const PVR_HEADER_WIDTH = 7;\n const PVR_HEADER_MIPMAPCOUNT = 11;\n const PVR_HEADER_METADATA = 12;\n \n return function (file, options, onComplete) {\n let err = null, out = null;\n try {\n let buffer = file instanceof ArrayBuffer ? file : file.buffer;\n // Get a view of the arrayBuffer that represents the DDS header.\n let header = new Int32Array(buffer, 0, PVR_HEADER_LENGTH);\n \n // Do some sanity checks to make sure this is a valid DDS file.\n if(header[PVR_HEADER_MAGIC] != PVR_MAGIC) {\n throw new Error(\"Invalid magic number in PVR header\");\n }\n \n // Gather other basic metrics and a view of the raw the DXT data.\n let width = header[PVR_HEADER_WIDTH];\n let height = header[PVR_HEADER_HEIGHT];\n let dataOffset = header[PVR_HEADER_METADATA] + 52;\n let pvrtcData = new Uint8Array(buffer, dataOffset);\n \n out = {\n _data: pvrtcData,\n _compressed: true,\n width: width,\n height: height,\n };\n \n }\n catch (e) {\n err = e;\n }\n onComplete && onComplete(err, out);\n };\n })(),\n\n /*\n * !#en\n * Parse pkm file\n * \n * !#zh\n * 解析压缩纹理格式 pkm 文件\n * \n * @method parsePKMTex\n * @param {ArrayBuffer|ArrayBufferView} file - The downloaded file\n * @param {Object} options - Some optional paramters\n * @param {Function} onComplete - Callback when finish parsing.\n * @param {Error} onComplete.err - The occurred error, null indicetes success\n * @param {Object} onComplete.etcAsset - The parsed content\n * \n * @example\n * downloader.downloadFile('test.pkm', {responseType: 'arraybuffer'}, null, (err, file) => {\n * parser.parsePKMTex(file, null, (err, etcAsset) => console.log(err));\n * });\n * \n * @typescript\n * parsePKMTex(file: ArrayBuffer|ArrayBufferView, options: Record<string, any>, onComplete: (err: Error, etcAsset: {_data: Uint8Array, _compressed: boolean, width: number, height: number}) => void): void\n */\n parsePKMTex: (function () {\n //===============//\n // ETC constants //\n //===============//\n const ETC_PKM_HEADER_SIZE = 16;\n\n const ETC_PKM_FORMAT_OFFSET = 6;\n const ETC_PKM_ENCODED_WIDTH_OFFSET = 8;\n const ETC_PKM_ENCODED_HEIGHT_OFFSET = 10;\n const ETC_PKM_WIDTH_OFFSET = 12;\n const ETC_PKM_HEIGHT_OFFSET = 14;\n\n const ETC1_RGB_NO_MIPMAPS = 0;\n const ETC2_RGB_NO_MIPMAPS = 1;\n const ETC2_RGBA_NO_MIPMAPS = 3;\n\n function readBEUint16(header, offset) {\n return (header[offset] << 8) | header[offset+1];\n }\n return function (file, options, onComplete) {\n let err = null, out = null;\n try {\n let buffer = file instanceof ArrayBuffer ? file : file.buffer;\n let header = new Uint8Array(buffer);\n let format = readBEUint16(header, ETC_PKM_FORMAT_OFFSET);\n if (format !== ETC1_RGB_NO_MIPMAPS && format !== ETC2_RGB_NO_MIPMAPS && format !== ETC2_RGBA_NO_MIPMAPS) {\n return new Error(\"Invalid magic number in ETC header\");\n }\n let width = readBEUint16(header, ETC_PKM_WIDTH_OFFSET);\n let height = readBEUint16(header, ETC_PKM_HEIGHT_OFFSET);\n let encodedWidth = readBEUint16(header, ETC_PKM_ENCODED_WIDTH_OFFSET);\n let encodedHeight = readBEUint16(header, ETC_PKM_ENCODED_HEIGHT_OFFSET);\n let etcData = new Uint8Array(buffer, ETC_PKM_HEADER_SIZE);\n out = {\n _data: etcData,\n _compressed: true,\n width: width,\n height: height\n };\n \n }\n catch (e) {\n err = e;\n }\n onComplete && onComplete(err, out);\n }\n })(),\n\n /*\n * !#en\n * Parse plist file\n * \n * !#zh\n * 解析 plist 文件\n * \n * @method parsePlist\n * @param {string} file - The downloaded file\n * @param {Object} options - Some optional paramters\n * @param {Function} onComplete - Callback when finish parsing\n * @param {Error} onComplete.err - The occurred error, null indicetes success\n * @param {*} onComplete.data - The parsed content\n * \n * @example\n * downloader.downloadFile('test.plist', {responseType: 'text'}, null, (err, file) => {\n * parser.parsePlist(file, null, (err, data) => console.log(err));\n * });\n * \n * @typescript\n * parsePlist(file: string, options: Record<string, any>, onComplete?: (err: Error, data: any) => void): void\n */\n parsePlist (file, options, onComplete) {\n var err = null;\n var result = plistParser.parse(file);\n if (!result) err = new Error('parse failed');\n onComplete && onComplete(err, result);\n },\n\n /*\n * !#en\n * Deserialize asset file\n * \n * !#zh\n * 反序列化资源文件\n * \n * @method parseImport\n * @param {Object} file - The serialized json\n * @param {Object} options - Some optional paramters\n * @param {Function} onComplete - Callback when finish parsing\n * @param {Error} onComplete.err - The occurred error, null indicetes success\n * @param {Asset} onComplete.asset - The parsed content\n * \n * @example\n * downloader.downloadFile('test.json', {responseType: 'json'}, null, (err, file) => {\n * parser.parseImport(file, null, (err, data) => console.log(err));\n * });\n * \n * @typescript\n * parseImport (file: any, options: Record<string, any>, onComplete?: (err: Error, asset: cc.Asset) => void): void\n */\n parseImport (file, options, onComplete) {\n if (!file) return onComplete && onComplete(new Error('Json is empty'));\n var result, err = null;\n try {\n result = deserialize(file, options);\n }\n catch (e) {\n err = e;\n }\n onComplete && onComplete(err, result);\n },\n\n init () {\n _parsing.clear();\n },\n\n /**\n * !#en\n * Register custom handler if you want to change default behavior or extend parser to parse other format file\n * \n * !#zh\n * 当你想修改默认行为或者拓展 parser 来解析其他格式文件时可以注册自定义的handler\n * \n * @method register\n * @param {string|Object} type - Extension likes '.jpg' or map likes {'.jpg': jpgHandler, '.png': pngHandler}\n * @param {Function} [handler] - The corresponding handler\n * @param {*} handler.file - File\n * @param {Object} handler.options - Some optional paramter\n * @param {Function} handler.onComplete - callback when finishing parsing\n * \n * @example\n * parser.register('.tga', (file, options, onComplete) => onComplete(null, null));\n * parser.register({'.tga': (file, options, onComplete) => onComplete(null, null), '.ext': (file, options, onComplete) => onComplete(null, null)});\n * \n * @typescript\n * register(type: string, handler: (file: any, options: Record<string, any>, onComplete: (err: Error, data: any) => void) => void): void\n * register(map: Record<string, (file: any, options: Record<string, any>, onComplete: (err: Error, data: any) => void) => void>): void\n */\n register (type, handler) {\n if (typeof type === 'object') {\n js.mixin(parsers, type);\n }\n else {\n parsers[type] = handler;\n }\n },\n\n /**\n * !#en\n * Use corresponding handler to parse file \n * \n * !#zh\n * 使用对应的handler来解析文件\n * \n * @method parse\n * @param {string} id - The id of file\n * @param {*} file - File\n * @param {string} type - The corresponding type of file, likes '.jpg'.\n * @param {Object} options - Some optional paramters will be transferred to the corresponding handler.\n * @param {Function} onComplete - callback when finishing downloading\n * @param {Error} onComplete.err - The occurred error, null indicetes success\n * @param {*} onComplete.contetnt - The parsed file\n * \n * @example\n * downloader.downloadFile('test.jpg', {responseType: 'blob'}, null, (err, file) => {\n * parser.parse('test.jpg', file, '.jpg', null, (err, img) => console.log(err));\n * });\n * \n * @typescript\n * parse(id: string, file: any, type: string, options: Record<string, any>, onComplete: (err: Error, content: any) => void): void\n */\n parse (id, file, type, options, onComplete) {\n let parsedAsset, parsing, parseHandler;\n if (parsedAsset = parsed.get(id)) {\n onComplete(null, parsedAsset);\n }\n else if (parsing = _parsing.get(id)){\n parsing.push(onComplete);\n }\n else if (parseHandler = parsers[type]){\n _parsing.add(id, [onComplete]);\n parseHandler(file, options, function (err, data) {\n if (err) {\n files.remove(id);\n } \n else if (!isScene(data)){\n parsed.add(id, data);\n }\n let callbacks = _parsing.remove(id);\n for (let i = 0, l = callbacks.length; i < l; i++) {\n callbacks[i](err, data);\n }\n });\n }\n else {\n onComplete(null, file);\n }\n }\n};\n\nvar parsers = {\n '.png' : parser.parseImage,\n '.jpg' : parser.parseImage,\n '.bmp' : parser.parseImage,\n '.jpeg' : parser.parseImage,\n '.gif' : parser.parseImage,\n '.ico' : parser.parseImage,\n '.tiff' : parser.parseImage,\n '.webp' : parser.parseImage,\n '.image' : parser.parseImage,\n '.pvr' : parser.parsePVRTex,\n '.pkm' : parser.parsePKMTex,\n // Audio\n '.mp3' : parser.parseAudio,\n '.ogg' : parser.parseAudio,\n '.wav' : parser.parseAudio,\n '.m4a' : parser.parseAudio,\n\n // plist\n '.plist' : parser.parsePlist,\n 'import' : parser.parseImport\n};\n\nmodule.exports = parser;","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n/**\n * @module cc.AssetManager\n */\n\nconst Task = require('./task');\n\nvar _pipelineId = 0;\n/**\n * !#en\n * Pipeline can execute the task for some effect.\n * \n * !#zh\n * 管线能执行任务达到某个效果\n * \n * @class Pipeline\n */\nfunction Pipeline (name, funcs) {\n if (!Array.isArray(funcs)) {\n cc.warn('funcs must be an array');\n return;\n } \n \n /**\n * !#en\n * The id of pipeline\n * \n * !#zh\n * 管线的 id\n * \n * @property id\n * @type {Number}\n */\n this.id = _pipelineId++;\n\n /**\n * !#en\n * The name of pipeline\n * \n * !#zh\n * 管线的名字\n * \n * @property name\n * @type {String}\n */\n this.name = name;\n\n /**\n * !#en\n * All pipes of pipeline\n * \n * !#zh\n * 所有的管道\n * \n * @property pipes\n * @type {Function[]}\n */\n this.pipes = [];\n\n for (var i = 0, l = funcs.length; i < l; i++) {\n if (typeof funcs[i] === 'function') {\n this.pipes.push(funcs[i]);\n }\n }\n\n}\n\nPipeline.prototype = {\n\n\n /**\n * !#en\n * Create a new pipeline\n * \n * !#zh\n * 创建一个管线\n * \n * @method constructor\n * @param {string} name - The name of pipeline\n * @param {Function[]} funcs - The array of pipe, every pipe must be function which take two parameters, the first is a `Task` flowed in pipeline, the second is complete callback\n * \n * @example\n * var pipeline = new Pipeline('download', [\n * (task, done) => {\n * var url = task.input;\n * cc.assetManager.downloader.downloadFile(url, null, null, (err, result) => {\n * task.output = result;\n * done(err);\n * });\n * },\n * (task, done) => {\n * var text = task.input;\n * var json = JSON.stringify(text);\n * task.output = json;\n * done();\n * }\n * ]);\n * \n * @typescript\n * constructor(name: string, funcs: Array<(task: Task, done?: (err: Error) => void) => void>)\n */\n constructor: Pipeline,\n\n /**\n * !#en\n * At specific point insert a new pipe to pipeline\n * \n * !#zh\n * 在某个特定的点为管线插入一个新的 pipe\n * \n * @method insert\n * @param {Function} func - The new pipe\n * @param {Task} func.task - The task handled with pipeline will be transferred to this function\n * @param {Function} [func.callback] - Callback you need to invoke manually when this pipe is finished. if the pipeline is synchronous, callback is unnecessary.\n * @param {number} index - The specific point you want to insert at.\n * @return {Pipeline} pipeline\n * \n * @example\n * var pipeline = new Pipeline('test', []);\n * pipeline.insert((task, done) => {\n * // do something\n * done();\n * }, 0);\n * \n * @typescript\n * insert(func: (task: Task, callback?: (err: Error) => void) => void, index: number): Pipeline\n */\n insert (func, index) {\n if (typeof func !== 'function' || index > this.pipes.length) {\n cc.warnID(4921);\n return;\n }\n \n this.pipes.splice(index, 0, func);\n return this;\n },\n\n\n /**\n * !#en\n * Append a new pipe to the pipeline\n * \n * !#zh\n * 添加一个管道到管线中\n * \n * @method append\n * @param {Function} func - The new pipe\n * @param {Task} func.task - The task handled with pipeline will be transferred to this function\n * @param {Function} [func.callback] - Callback you need to invoke manually when this pipe is finished. if the pipeline is synchronous, callback is unnecessary.\n * @return {Pipeline} pipeline\n * \n * @example\n * var pipeline = new Pipeline('test', []);\n * pipeline.append((task, done) => {\n * // do something\n * done();\n * });\n * \n * @typescript\n * append(func: (task: Task, callback?: (err: Error) => void) => void): Pipeline\n */\n append (func) {\n if (typeof func !== 'function') {\n return;\n }\n \n this.pipes.push(func);\n return this;\n },\n\n /**\n * !#en\n * Remove pipe which at specific point\n * \n * !#zh\n * 移除特定位置的管道\n * \n * @method remove\n * @param {number} index - The specific point\n * @return {Pipeline} pipeline\n * \n * @example\n * var pipeline = new Pipeline('test', (task, done) => {\n * // do something\n * done(); \n * });\n * pipeline.remove(0);\n * \n * @typescript\n * remove(index: number): Pipeline\n */\n remove (index) {\n if (typeof index !== 'number') {\n return;\n }\n \n this.pipes.splice(index, 1);\n return this;\n },\n\n /**\n * !#en\n * Execute task synchronously\n * \n * !#zh\n * 同步执行任务\n * \n * @method sync\n * @param {Task} task - The task will be executed\n * @returns {*} result\n * \n * @example\n * var pipeline = new Pipeline('sync', [(task) => {\n * let input = task.input;\n * task.output = doSomething(task.input);\n * }]);\n * \n * var task = new Task({input: 'test'});\n * console.log(pipeline.sync(task));\n * \n * @typescript\n * sync(task: Task): any \n */\n sync (task) {\n var pipes = this.pipes;\n if (!(task instanceof Task) || pipes.length === 0) return;\n if (task.output != null) {\n task.input = task.output;\n task.output = null;\n }\n task._isFinish = false;\n for (var i = 0, l = pipes.length; i < l;) {\n var pipe = pipes[i];\n var result = pipe(task);\n if (result) {\n task._isFinish = true;\n return result;\n }\n i++;\n if (i !== l) {\n task.input = task.output;\n task.output = null;\n }\n }\n task._isFinish = true;\n return task.output;\n },\n\n /**\n * !#en\n * Execute task asynchronously\n * \n * !#zh\n * 异步执行任务\n * \n * @method async\n * @param {Task} task - The task will be executed\n * \n * @example\n * var pipeline = new Pipeline('sync', [(task, done) => {\n * let input = task.input;\n * task.output = doSomething(task.input);\n * done();\n * }]);\n * var task = new Task({input: 'test', onComplete: (err, result) => console.log(result)});\n * pipeline.async(task);\n * \n * @typescript\n * async(task: Task): void\n */\n async (task) {\n var pipes = this.pipes;\n if (!(task instanceof Task) || pipes.length === 0) return;\n if (task.output != null) {\n task.input = task.output;\n task.output = null;\n }\n task._isFinish = false;\n this._flow(0, task);\n },\n\n _flow (index, task) {\n var self = this;\n var pipe = this.pipes[index];\n pipe(task, function (result) {\n if (result) {\n task._isFinish = true;\n task.onComplete && task.onComplete(result);\n }\n else {\n index++;\n if (index < self.pipes.length) {\n // move output to input\n task.input = task.output;\n task.output = null;\n self._flow(index, task);\n }\n else {\n task._isFinish = true;\n task.onComplete && task.onComplete(result, task.output);\n }\n }\n });\n }\n};\n\nmodule.exports = Pipeline;\n","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nconst Task = require('./task');\nconst { transformPipeline, RequestType } = require('./shared');\n\nfunction preprocess (task, done) {\n var options = task.options, subOptions = Object.create(null), leftOptions = Object.create(null);\n\n for (var op in options) {\n switch (op) {\n // can't set these attributes in options\n case RequestType.PATH:\n case RequestType.UUID:\n case RequestType.DIR:\n case RequestType.SCENE:\n case RequestType.URL : break;\n // only need these attributes to transform url\n case '__requestType__':\n case '__isNative__':\n case 'ext' :\n case 'type':\n case '__nativeName__':\n case 'audioLoadMode':\n case 'bundle':\n subOptions[op] = options[op];\n break;\n // other settings, left to next pipe\n case '__exclude__':\n case '__outputAsArray__':\n leftOptions[op] = options[op];\n break;\n default: \n subOptions[op] = options[op];\n leftOptions[op] = options[op];\n break;\n }\n }\n task.options = leftOptions;\n\n // transform url\n let subTask = Task.create({input: task.input, options: subOptions});\n var err = null;\n try {\n task.output = task.source = transformPipeline.sync(subTask);\n }\n catch (e) {\n err = e;\n for (var i = 0, l = subTask.output.length; i < l; i++) {\n subTask.output[i].recycle();\n }\n }\n subTask.recycle();\n done(err);\n}\n\nmodule.exports = preprocess;","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nconst dependUtil = require('./depend-util');\nconst Cache = require('./cache');\nrequire('../assets/CCAsset');\nconst { assets } = require('./shared');\nconst { callInNextTick } = require('../platform/utils');\n\nfunction visitAsset (asset, deps) {\n // Skip assets generated programmatically or by user (e.g. label texture)\n if (!asset._uuid) {\n return;\n }\n deps.push(asset._uuid);\n}\n\nfunction visitComponent (comp, deps) {\n var props = Object.getOwnPropertyNames(comp);\n for (let i = 0; i < props.length; i++) {\n var propName = props[i];\n if (propName === 'node' || propName === '__eventTargets') continue;\n var value = comp[propName];\n if (typeof value === 'object' && value) {\n if (Array.isArray(value)) {\n for (let j = 0; j < value.length; j++) {\n let val = value[j];\n if (val instanceof cc.Asset) {\n visitAsset(val, deps);\n }\n }\n }\n else if (!value.constructor || value.constructor === Object) {\n let keys = Object.getOwnPropertyNames(value);\n for (let j = 0; j < keys.length; j++) {\n let val = value[keys[j]];\n if (val instanceof cc.Asset) {\n visitAsset(val, deps);\n }\n }\n }\n else if (value instanceof cc.Asset) {\n visitAsset(value, deps);\n }\n }\n }\n}\n\nlet _temp = [];\n\nfunction visitNode (node, deps) {\n for (let i = 0; i < node._components.length; i++) {\n visitComponent(node._components[i], deps);\n }\n for (let i = 0; i < node._children.length; i++) {\n visitNode(node._children[i], deps);\n }\n}\n\nfunction descendOpRef (asset, refs, exclude, op) {\n exclude.push(asset._uuid);\n var depends = dependUtil.getDeps(asset._uuid);\n for (let i = 0, l = depends.length; i < l; i++) {\n var dependAsset = assets.get(depends[i]);\n if (dependAsset) {\n let uuid = dependAsset._uuid;\n if (!(uuid in refs)) { \n refs[uuid] = dependAsset.refCount + op;\n }\n else {\n refs[uuid] += op;\n }\n if (exclude.includes(uuid)) continue; \n descendOpRef(dependAsset, refs, exclude, op);\n }\n }\n}\n\nfunction checkCircularReference (asset) {\n // check circular reference\n var refs = Object.create(null);\n refs[asset._uuid] = asset.refCount;\n descendOpRef(asset, refs, _temp, -1);\n _temp.length = 0;\n if (refs[asset._uuid] !== 0) return refs[asset._uuid];\n\n for (let uuid in refs) {\n if (refs[uuid] !== 0) {\n descendOpRef(assets.get(uuid), refs, _temp, 1);\n }\n }\n _temp.length = 0;\n\n return refs[asset._uuid];\n}\n\nvar _persistNodeDeps = new Cache();\nvar _toDelete = new Cache();\nvar eventListener = false;\n\nfunction freeAssets () {\n eventListener = false;\n _toDelete.forEach(function (asset) {\n releaseManager._free(asset);\n });\n _toDelete.clear();\n}\n\nvar releaseManager = {\n init () {\n _persistNodeDeps.clear();\n _toDelete.clear();\n },\n\n _addPersistNodeRef (node) {\n var deps = [];\n visitNode(node, deps);\n for (let i = 0, l = deps.length; i < l; i++) {\n var dependAsset = assets.get(deps[i]);\n if (dependAsset) {\n dependAsset.addRef();\n }\n }\n _persistNodeDeps.add(node.uuid, deps);\n },\n\n _removePersistNodeRef (node) {\n if (_persistNodeDeps.has(node.uuid)) {\n var deps = _persistNodeDeps.get(node.uuid);\n for (let i = 0, l = deps.length; i < l; i++) {\n var dependAsset = assets.get(deps[i]);\n if (dependAsset) {\n dependAsset.decRef();\n }\n }\n _persistNodeDeps.remove(node.uuid);\n }\n },\n\n // do auto release\n _autoRelease (oldScene, newScene, persistNodes) { \n\n if (oldScene) {\n var childs = dependUtil.getDeps(oldScene._id);\n for (let i = 0, l = childs.length; i < l; i++) {\n let asset = assets.get(childs[i]);\n asset && asset.decRef(CC_TEST || oldScene.autoReleaseAssets);\n }\n var dependencies = dependUtil._depends.get(oldScene._id);\n if (dependencies && dependencies.persistDeps) {\n var persistDeps = dependencies.persistDeps;\n for (let i = 0, l = persistDeps.length; i < l; i++) {\n let asset = assets.get(persistDeps[i]);\n asset && asset.decRef(CC_TEST || oldScene.autoReleaseAssets);\n }\n }\n oldScene._id !== newScene._id && dependUtil.remove(oldScene._id);\n }\n\n var sceneDeps = dependUtil._depends.get(newScene._id);\n sceneDeps && (sceneDeps.persistDeps = []);\n // transfer refs from persist nodes to new scene\n for (let key in persistNodes) {\n var node = persistNodes[key];\n var deps = _persistNodeDeps.get(node.uuid);\n for (let i = 0, l = deps.length; i < l; i++) {\n var dependAsset = assets.get(deps[i]);\n if (dependAsset) {\n dependAsset.addRef();\n }\n }\n if (sceneDeps) {\n sceneDeps.persistDeps.push.apply(sceneDeps.persistDeps, deps);\n }\n }\n },\n\n _free (asset, force) {\n _toDelete.remove(asset._uuid);\n\n if (!cc.isValid(asset, true)) return;\n\n if (!force) {\n if (asset.refCount > 0) {\n if (checkCircularReference(asset) > 0) return; \n }\n }\n \n // remove from cache\n assets.remove(asset._uuid);\n var depends = dependUtil.getDeps(asset._uuid);\n for (let i = 0, l = depends.length; i < l; i++) {\n var dependAsset = assets.get(depends[i]);\n if (dependAsset) {\n dependAsset.decRef(false);\n releaseManager._free(dependAsset, false);\n }\n }\n asset.destroy();\n dependUtil.remove(asset._uuid);\n },\n\n tryRelease (asset, force) {\n if (!(asset instanceof cc.Asset)) return;\n if (force) {\n releaseManager._free(asset, force);\n }\n else {\n _toDelete.add(asset._uuid, asset);\n if (!eventListener) {\n eventListener = true;\n callInNextTick(freeAssets);\n }\n }\n }\n};\n\nmodule.exports = releaseManager;","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * @module cc.AssetManager\n */\n\nvar MAX_DEAD_NUM = 500;\nvar _deadPool = [];\n\n/**\n * !#en\n * A collection of information about a request\n * \n * !#zh\n * 请求的相关信息集合\n * \n * @class RequestItem\n */\nfunction RequestItem () {\n\n this._id = '';\n\n /**\n * !#en \n * The uuid of request\n * \n * !#zh \n * 请求资源的uuid\n * \n * @property uuid\n * @type {String}\n */\n this.uuid = '';\n\n /**\n * !#en \n * The final url of request\n * \n * !#zh\n * 请求的最终url\n * \n * @property url\n * @type {String}\n */\n this.url = '';\n\n /**\n * !#en\n * The extension name of asset\n * \n * !#zh\n * 资源的扩展名\n * \n * @property ext\n * @type {String}\n */\n this.ext = '.json';\n\n /**\n * !#en\n * The content of asset\n * \n * !#zh\n * 资源的内容\n * \n * @property content\n * @type {*}\n */\n this.content = null;\n\n /**\n * !#en\n * The file of asset\n * \n * !#zh\n * 资源的文件\n * \n * @property file\n * @type {*}\n */\n this.file = null;\n\n /**\n * !#en\n * The information of asset\n * \n * !#zh\n * 资源的相关信息\n * \n * @property info\n * @type {Object}\n */\n this.info = null;\n\n this.config = null;\n\n /**\n * !#en\n * Whether or not it is native asset\n * \n * !#zh\n * 资源是否是原生资源\n * \n * @property isNative\n * @type {Boolean}\n */\n this.isNative = false;\n\n /**\n * !#en\n * Custom options\n * \n * !#zh\n * 自定义参数\n * \n * @property options\n * @type {Object}\n */\n this.options = Object.create(null);\n}\n\nRequestItem.prototype = {\n\n /**\n * !#en\n * Create a request item\n * \n * !#zh\n * 创建一个 request item\n * \n * @method constructor\n * \n * @typescript\n * constructor()\n */\n constructor: RequestItem,\n\n /**\n * !#en\n * The id of request, combined from uuid and isNative\n * \n * !#zh\n * 请求的 id, 由 uuid 和 isNative 组合而成\n * \n * @property id\n * @type {String}\n */\n get id () {\n if (!this._id) {\n this._id = this.uuid + '@' + (this.isNative ? 'native' : 'import');\n }\n return this._id;\n },\n\n /**\n * !#en\n * Recycle this for reuse\n * \n * !#zh\n * 回收 requestItem 用于复用\n * \n * @method recycle\n * \n * @typescript\n * recycle(): void\n */\n recycle () {\n if (_deadPool.length === MAX_DEAD_NUM) return;\n this._id = '';\n this.uuid = '';\n this.url = '';\n this.ext = '.json';\n this.content = null;\n this.file = null;\n this.info = null;\n this.config = null;\n this.isNative = false;\n this.options = Object.create(null);\n _deadPool.push(this);\n }\n};\n\n/**\n * !#en\n * Create a new request item from pool\n * \n * !#zh\n * 从对象池中创建 requestItem\n * \n * @static\n * @method create\n * @returns {RequestItem} requestItem\n * \n * @typescript \n * create(): RequestItem\n */\nRequestItem.create = function () {\n var out = null;\n if (_deadPool.length !== 0) {\n out = _deadPool.pop();\n }\n else {\n out = new RequestItem();\n }\n\n return out;\n};\n\nmodule.exports = RequestItem;","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nconst Cache = require('./cache');\nconst Pipeline = require('./pipeline');\n\nvar assets = new Cache();\nvar files = new Cache();\nvar parsed = new Cache();\nvar bundles = new Cache();\nvar pipeline = new Pipeline('normal load', []);\nvar fetchPipeline = new Pipeline('fetch', []);\nvar transformPipeline = new Pipeline('transform url', []);\n\n/**\n * @module cc.AssetManager\n */\n\nvar RequestType = {\n \n UUID: 'uuid',\n\n PATH: 'path',\n\n DIR: 'dir',\n\n URL: 'url',\n\n SCENE: 'scene'\n};\n\n/**\n * !#en\n * The builtin bundles \n * \n * !#zh\n * 内置 bundle\n * \n * @enum BuiltinBundleName\n */\nvar BuiltinBundleName = {\n /**\n * !#en\n * The builtin bundle corresponds to 'assets/resources'.\n * \n * !#zh\n * 内置 bundle, 对应 'assets/resources' 目录\n * \n * @property RESOURCES\n * @readonly\n * @type {String}\n */\n RESOURCES: 'resources',\n\n /**\n * !#en\n * The builtin bundle corresponds to 'internal/resources'.\n * \n * !#zh\n * 内置 bundle, 对应 'internal/resources' 目录\n * \n * @property INTERNAL\n * @readonly\n * @type {String}\n */\n INTERNAL: 'internal',\n\n /**\n * !#en\n * The builtin bundle\n * \n * !#zh\n * 内置 bundle\n * \n * @property MAIN\n * @readonly\n * @type {String}\n */\n MAIN: 'main',\n\n /**\n * !#en\n * The builtin bundle, exists when Start Scene asset bundle is checked on the project building panel\n * \n * !#zh\n * 内置 bundle, 如果构建面板开启了首场景分包,则会有 START_SCENE bundle\n * \n * @property START_SCENE\n * @readonly\n * @type {String}\n */\n START_SCENE: 'start-scene',\n};\n\nmodule.exports = { assets, files, parsed, pipeline, fetchPipeline, transformPipeline, RequestType, bundles, BuiltinBundleName };","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * @module cc.AssetManager\n */\n\nvar _taskId = 0;\nvar MAX_DEAD_NUM = 500;\nvar _deadPool = [];\n\n/**\n * !#en\n * Task is used to run in the pipeline for some effect\n * \n * !#zh\n * 任务用于在管线中运行以达成某种效果\n * \n * @class Task\n */\nfunction Task (options) {\n /**\n * !#en\n * The id of task\n * \n * !#zh\n * 任务id\n * \n * @property id\n * @type {Number}\n */\n this.id = _taskId++;\n\n this._isFinish = true;\n\n /**\n * !#en\n * The callback when task is completed\n * \n * !#zh\n * 完成回调\n * \n * @property onComplete\n * @type {Function}\n */\n this.onComplete = null;\n\n /**\n * !#en\n * The callback of progression\n * \n * !#zh\n * 进度回调\n * \n * @property onProgress\n * @type {Function}\n */\n this.onProgress = null;\n\n /**\n * !#en\n * The callback when something goes wrong\n * \n * !#zh\n * 错误回调\n * \n * @property onError\n * @type {Function}\n */\n this.onError = null;\n\n /**\n * !#en\n * The source of task\n * \n * !#zh\n * 任务的源\n * \n * @property source\n * @type {*}\n */\n this.source = null;\n\n /**\n * !#en\n * The output of task\n * \n * !#zh\n * 任务的输出\n * \n * @property output\n * @type {*}\n */\n this.output = null\n\n /**\n * !#en\n * The input of task\n * \n * !#zh\n * 任务的输入\n * \n * @property input\n * @type {*}\n */\n this.input = null;\n\n /**\n * !#en\n * The progression of task\n * \n * !#zh\n * 任务的进度\n * \n * @property progress\n * @type {*}\n */\n this.progress = null;\n\n /**\n * !#en\n * Custom options\n * \n * !#zh\n * 自定义参数\n * \n * @property options\n * @type {Object}\n */\n this.options = null;\n this.set(options);\n};\n\nTask.prototype = {\n \n /**\n * !#en\n * Create a new Task\n * \n * !#zh\n * 创建一个任务\n * \n * @method constructor\n * @param {Object} [options] - Some optional paramters\n * @param {Function} [options.onComplete] - Callback when the task is completed, if the pipeline is synchronous, onComplete is unnecessary.\n * @param {Function} [options.onProgress] - Continuously callback when the task is runing, if the pipeline is synchronous, onProgress is unnecessary.\n * @param {Function} [options.onError] - Callback when something goes wrong, if the pipeline is synchronous, onError is unnecessary.\n * @param {*} options.input - Something will be handled with pipeline\n * @param {*} [options.progress] - Progress information, you may need to assign it manually when multiple pipeline share one progress\n * @param {Object} [options.options] - Custom parameters\n * \n * @typescript\n * constructor(options?: {onComplete?: (err: Error, result: any) => void, onError?: () => void, onProgress?: Function, input: any, progress?: any, options?: Record<string, any>})\n */\n constructor: Task,\n\n /**\n * !#en\n * Set paramters of this task\n * \n * !#zh\n * 设置任务的参数\n * \n * @method set\n * @param {Object} [options] - Some optional paramters\n * @param {Function} [options.onComplete] - Callback when the task complete, if the pipeline is synchronous, onComplete is unnecessary.\n * @param {Function} [options.onProgress] - Continuously callback when the task is runing, if the pipeline is synchronous, onProgress is unnecessary.\n * @param {Function} [options.onError] - Callback when something goes wrong, if the pipeline is synchronous, onError is unnecessary.\n * @param {*} options.input - Something will be handled with pipeline\n * @param {*} [options.progress] - Progress information, you may need to assign it manually when multiple pipeline share one progress\n * @param {Object} [options.options] - Custom parameters\n * \n * @example \n * var task = new Task();\n * task.set({input: ['test'], onComplete: (err, result) => console.log(err), onProgress: (finish, total) => console.log(finish / total)});\n * \n * @typescript\n * set(options?: {onComplete?: (err: Error, result: any) => void, onError?: () => void, onProgress?: Function, input: any, progress?: any, options?: Record<string, any>}): void\n */\n set (options) {\n options = options || Object.create(null);\n this.onComplete = options.onComplete;\n this.onProgress = options.onProgress;\n this.onError = options.onError;\n this.source = this.input = options.input;\n this.output = null;\n this.progress = options.progress;\n // custom data\n this.options = options.options || Object.create(null);\n },\n\n /**\n * !#en\n * Dispatch event\n * \n * !#zh\n * 发布事件\n * \n * @method dispatch\n * @param {string} event - The event name\n * @param {*} param1 - Parameter 1\n * @param {*} param2 - Parameter 2\n * @param {*} param3 - Parameter 3\n * @param {*} param4 - Parameter 4\n * \n * @example\n * var task = Task.create();\n * Task.onComplete = (msg) => console.log(msg);\n * Task.dispatch('complete', 'hello world');\n * \n * @typescript\n * dispatch(event: string, param1?: any, param2?: any, param3?: any, param4?: any): void\n */\n dispatch (event, param1, param2, param3, param4) {\n switch (event) {\n case 'complete' :\n this.onComplete && this.onComplete(param1, param2, param3, param4);\n break; \n case 'progress': \n this.onProgress && this.onProgress(param1, param2, param3, param4);\n break;\n case 'error': \n this.onError && this.onError(param1, param2, param3, param4);\n break;\n default:\n var str = 'on' + event[0].toUpperCase() + event.substr(1);\n if (typeof this[str] === 'function') {\n this[str](param1, param2, param3, param4);\n }\n break;\n }\n },\n\n /**\n * !#en\n * Recycle this for reuse\n * \n * !#zh\n * 回收 task 用于复用\n * \n * @method recycle\n * \n * @typescript\n * recycle(): void\n */\n recycle () {\n if (_deadPool.length === MAX_DEAD_NUM) return;\n this.onComplete = null;\n this.onProgress = null;\n this.onError = null;\n this.source = this.output = this.input = null;\n this.progress = null;\n this.options = null;\n _deadPool.push(this);\n },\n\n /**\n * !#en\n * Whether or not this task is completed\n * \n * !#zh\n * 此任务是否已经完成\n * \n * @property isFinish\n * @type {Boolean}\n */\n get isFinish () {\n return this._isFinish;\n }\n};\n\n/**\n * !#en\n * Create a new task from pool\n * \n * !#zh\n * 从对象池中创建 task\n * \n * @static\n * @method create\n * @param {Object} [options] - Some optional paramters\n * @param {Function} [options.onComplete] - Callback when the task complete, if the pipeline is synchronous, onComplete is unnecessary.\n * @param {Function} [options.onProgress] - Continuously callback when the task is runing, if the pipeline is synchronous, onProgress is unnecessary.\n * @param {Function} [options.onError] - Callback when something goes wrong, if the pipeline is synchronous, onError is unnecessary.\n * @param {*} options.input - Something will be handled with pipeline\n * @param {*} [options.progress] - Progress information, you may need to assign it manually when multiple pipeline share one progress\n * @param {Object} [options.options] - Custom parameters\n * @returns {Task} task\n * \n * @typescript \n * create(options?: {onComplete?: (err: Error, result: any) => void, onError?: () => void, onProgress?: Function, input: any, progress?: any, options?: Record<string, any>}): Task\n */\nTask.create = function (options) {\n var out = null;\n if (_deadPool.length !== 0) {\n out = _deadPool.pop();\n out.set(options);\n }\n else {\n out = new Task(options);\n }\n\n return out;\n};\n\nmodule.exports = Task;","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nconst { decodeUuid } = require('./helper');\nconst RequestItem = require('./request-item');\nconst { RequestType, bundles } = require('./shared');\n\nfunction parse (task) {\n\n var input = task.input, options = task.options;\n input = Array.isArray(input) ? input : [ input ];\n\n task.output = [];\n for (var i = 0; i < input.length; i ++ ) {\n var item = input[i];\n var out = RequestItem.create();\n if (typeof item === 'string') {\n item = Object.create(null);\n item[options.__requestType__ || RequestType.UUID] = input[i];\n }\n if (typeof item === 'object') {\n // local options will overlap glabal options\n cc.js.addon(item, options);\n if (item.preset) {\n cc.js.addon(item, cc.assetManager.presets[item.preset]);\n }\n for (var key in item) {\n switch (key) {\n case RequestType.UUID: \n var uuid = out.uuid = decodeUuid(item.uuid);\n if (bundles.has(item.bundle)) {\n var config = bundles.get(item.bundle)._config;\n var info = config.getAssetInfo(uuid);\n if (info && info.redirect) {\n if (!bundles.has(info.redirect)) throw new Error(`Please load bundle ${info.redirect} first`);\n config = bundles.get(info.redirect)._config;\n info = config.getAssetInfo(uuid);\n }\n out.config = config;\n out.info = info;\n }\n out.ext = item.ext || '.json';\n break;\n case '__requestType__':\n case 'ext': \n case 'bundle':\n case 'preset':\n case 'type': break;\n case RequestType.DIR: \n if (bundles.has(item.bundle)) {\n var infos = [];\n bundles.get(item.bundle)._config.getDirWithPath(item.dir, item.type, infos);\n for (let i = 0, l = infos.length; i < l; i++) {\n var info = infos[i];\n input.push({uuid: info.uuid, __isNative__: false, ext: '.json', bundle: item.bundle});\n }\n }\n out.recycle();\n out = null;\n break;\n case RequestType.PATH: \n if (bundles.has(item.bundle)) {\n var config = bundles.get(item.bundle)._config;\n var info = config.getInfoWithPath(item.path, item.type);\n \n if (info && info.redirect) {\n if (!bundles.has(info.redirect)) throw new Error(`you need to load bundle ${info.redirect} first`);\n config = bundles.get(info.redirect)._config;\n info = config.getAssetInfo(info.uuid);\n }\n\n if (!info) {\n out.recycle();\n throw new Error(`Bundle ${item.bundle} doesn't contain ${item.path}`);\n }\n out.config = config; \n out.uuid = info.uuid;\n out.info = info;\n }\n out.ext = item.ext || '.json';\n break;\n case RequestType.SCENE:\n if (bundles.has(item.bundle)) {\n var config = bundles.get(item.bundle)._config;\n var info = config.getSceneInfo(item.scene);\n \n if (info && info.redirect) {\n if (!bundles.has(info.redirect)) throw new Error(`you need to load bundle ${info.redirect} first`);\n config = bundles.get(info.redirect)._config;\n info = config.getAssetInfo(info.uuid);\n }\n if (!info) {\n out.recycle();\n throw new Error(`Bundle ${config.name} doesn't contain scene ${item.scene}`);\n }\n out.config = config; \n out.uuid = info.uuid;\n out.info = info;\n }\n break;\n case '__isNative__': \n out.isNative = item.__isNative__;\n break;\n case RequestType.URL: \n out.url = item.url;\n out.uuid = item.uuid || item.url;\n out.ext = item.ext || cc.path.extname(item.url);\n out.isNative = item.__isNative__ !== undefined ? item.__isNative__ : true;\n break;\n default: out.options[key] = item[key];\n }\n if (!out) break;\n }\n }\n if (!out) continue;\n task.output.push(out);\n if (!out.uuid && !out.url) throw new Error('Can not parse this input:' + JSON.stringify(item));\n }\n return null;\n}\n\nfunction combine (task) {\n var input = task.output = task.input;\n for (var i = 0; i < input.length; i++) {\n var item = input[i];\n if (item.url) continue;\n\n var url = '', base = '';\n var config = item.config;\n if (item.isNative) {\n base = (config && config.nativeBase) ? (config.base + config.nativeBase) : cc.assetManager.generalNativeBase;\n } \n else {\n base = (config && config.importBase) ? (config.base + config.importBase) : cc.assetManager.generalImportBase;\n }\n\n let uuid = item.uuid;\n \n var ver = '';\n if (item.info) {\n if (item.isNative) {\n ver = item.info.nativeVer ? ('.' + item.info.nativeVer) : '';\n }\n else {\n ver = item.info.ver ? ('.' + item.info.ver) : '';\n }\n }\n\n // ugly hack, WeChat does not support loading font likes 'myfont.dw213.ttf'. So append hash to directory\n if (item.ext === '.ttf') {\n url = `${base}/${uuid.slice(0, 2)}/${uuid}${ver}/${item.options.__nativeName__}`;\n }\n else {\n url = `${base}/${uuid.slice(0, 2)}/${uuid}${ver}${item.ext}`;\n }\n \n item.url = url;\n }\n return null;\n}\n\nmodule.exports = { parse, combine };","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nconst dependUtil = require('./depend-util');\nconst { isScene, decodeUuid } = require('./helper');\nconst { assets } = require('./shared');\nconst { callInNextTick } = require('../platform/utils');\nconst MissingObjectReporter = CC_EDITOR && Editor.require('app://editor/page/scene-utils/missing-object-reporter');\nrequire('../assets/CCAsset');\n\nvar utils = {\n\n processOptions (options) {\n if (CC_EDITOR) return;\n var uuids = options.uuids;\n var paths = options.paths;\n var types = options.types;\n var bundles = options.deps;\n var realEntries = options.paths = Object.create(null);\n\n if (options.debug === false) {\n for (let i = 0, l = uuids.length; i < l; i++) {\n uuids[i] = decodeUuid(uuids[i]);\n }\n\n for (let id in paths) {\n let entry = paths[id];\n let type = entry[1];\n entry[1] = types[type];\n }\n }\n else {\n var out = Object.create(null);\n for (let i = 0, l = uuids.length; i < l; i++) {\n let uuid = uuids[i];\n uuids[i] = out[uuid] = decodeUuid(uuid);\n }\n uuids = out;\n }\n\n for (let id in paths) {\n let entry = paths[id];\n realEntries[uuids[id]] = entry;\n }\n\n var scenes = options.scenes;\n for (let name in scenes) {\n let uuid = scenes[name];\n scenes[name] = uuids[uuid];\n }\n\n var packs = options.packs;\n for (let packId in packs) {\n let packedIds = packs[packId];\n for (let j = 0; j < packedIds.length; ++j) {\n packedIds[j] = uuids[packedIds[j]];\n }\n }\n\n var versions = options.versions;\n if (versions) {\n for (let folder in versions) {\n var entries = versions[folder];\n for (let i = 0; i < entries.length; i += 2) {\n let uuid = entries[i];\n entries[i] = uuids[uuid] || uuid;\n }\n }\n }\n\n var redirect = options.redirect;\n if (redirect) {\n for (let i = 0; i < redirect.length; i += 2) {\n redirect[i] = uuids[redirect[i]];\n redirect[i + 1] = bundles[redirect[i + 1]];\n }\n }\n\n },\n\n clear (task, clearRef) {\n for (var i = 0, l = task.input.length; i < l; i++) {\n var item = task.input[i];\n if (clearRef) {\n !item.isNative && item.content && item.content.decRef && item.content.decRef(false);\n }\n item.recycle();\n }\n task.input = null;\n },\n\n urlAppendTimestamp (url) {\n if (cc.assetManager.downloader.appendTimeStamp && typeof url === 'string') {\n if (/\\?/.test(url))\n return url + '&_t=' + (new Date() - 0);\n else\n return url + '?_t=' + (new Date() - 0);\n }\n return url;\n },\n\n retry (process, times, wait, onComplete, index) {\n index = index || 0;\n process(index, function (err, result) {\n index++;\n if (!err || index > times) {\n onComplete && onComplete(err, result);\n }\n else {\n setTimeout(function () {\n utils.retry(process, times, wait, onComplete, index);\n }, wait);\n }\n });\n },\n\n getDepends (uuid, data, exclude, depends, preload, asyncLoadAssets, config) {\n try {\n var info = dependUtil.parse(uuid, data);\n var includeNative = true;\n if (data instanceof cc.Asset && (!data.__nativeDepend__ || data._nativeAsset)) includeNative = false; \n if (!preload) {\n asyncLoadAssets = !CC_EDITOR && (!!data.asyncLoadAssets || (asyncLoadAssets && !info.preventDeferredLoadDependents));\n for (let i = 0, l = info.deps.length; i < l; i++) {\n let dep = info.deps[i];\n if (!(dep in exclude)) {\n exclude[dep] = true;\n depends.push({uuid: dep, __asyncLoadAssets__: asyncLoadAssets, bundle: config && config.name});\n }\n }\n\n if (includeNative && !asyncLoadAssets && !info.preventPreloadNativeObject && info.nativeDep) {\n config && (info.nativeDep.bundle = config.name);\n depends.push(Object.assign({}, info.nativeDep));\n }\n \n } else {\n for (let i = 0, l = info.deps.length; i < l; i++) {\n let dep = info.deps[i];\n if (!(dep in exclude)) {\n exclude[dep] = true;\n depends.push({uuid: dep, bundle: config && config.name});\n }\n }\n if (includeNative && info.nativeDep) {\n config && (info.nativeDep.bundle = config.name);\n depends.push(Object.assign({}, info.nativeDep));\n }\n }\n }\n catch (e) {\n cc.error(e.message, e.stack);\n }\n },\n \n cache (id, asset, cacheAsset) {\n if (!asset) return;\n var _isScene = isScene(asset);\n if (!_isScene && cacheAsset) {\n assets.add(id, asset);\n }\n if (_isScene) {\n if (CC_EDITOR && !asset.scene) {\n Editor.error('Sorry, the scene data of \"%s\" is corrupted!', asset._uuid);\n }\n }\n },\n\n setProperties (uuid, asset, assetsMap) {\n\n var missingAsset = false;\n let depends = asset.__depends__;\n if (depends) {\n var missingAssetReporter = null;\n for (var i = 0, l = depends.length; i < l; i++) {\n var depend = depends[i];\n var dependAsset = assetsMap[depend.uuid + '@import'];\n if (!dependAsset) {\n if (CC_EDITOR) {\n !missingAssetReporter && (missingAssetReporter = new MissingObjectReporter(asset));\n missingAssetReporter.stashByOwner(depend.owner, depend.prop, Editor.serialize.asAsset(depend.uuid));\n }\n else {\n cc.error('The asset ' + depend.uuid + ' is missing!');\n }\n missingAsset = true;\n }\n else {\n depend.owner[depend.prop] = dependAsset.addRef();\n }\n }\n\n missingAssetReporter && missingAssetReporter.reportByOwner();\n asset.__depends__ = undefined;\n }\n \n if (asset.__nativeDepend__) {\n if (!asset._nativeAsset) {\n if (assetsMap[uuid + '@native']) {\n asset._nativeAsset = assetsMap[uuid + '@native'];\n }\n else {\n missingAsset = true;\n if (CC_EDITOR) {\n console.error(`the native asset of ${uuid} is missing!`);\n }\n }\n }\n asset.__nativeDepend__ = undefined;\n }\n return missingAsset;\n },\n\n gatherAsset (task) {\n let source = task.source;\n if (!task.options.__outputAsArray__ && source.length === 1) {\n task.output = source[0].content;\n }\n else {\n let output = task.output = [];\n for (var i = 0, l = source.length; i < l; i++) {\n output.push(source[i].content);\n }\n }\n },\n\n forEach (array, process, onComplete) {\n var count = 0;\n var errs = [];\n if (array.length === 0) onComplete && onComplete(errs);\n for (var i = 0, l = array.length; i < l; i++) {\n process(array[i], function (err) {\n if (err) {\n errs.push(err);\n }\n count ++;\n if (count === l) {\n onComplete && onComplete(errs);\n }\n });\n }\n },\n\n parseParameters (options, onProgress, onComplete) {\n if (onComplete === undefined) {\n var isCallback = typeof options === 'function';\n if (onProgress) {\n onComplete = onProgress;\n if (!isCallback) {\n onProgress = null;\n }\n }\n else if (onProgress === undefined && isCallback) {\n onComplete = options;\n options = null;\n onProgress = null;\n }\n if (onProgress !== undefined && isCallback) {\n onProgress = options;\n options = null;\n }\n }\n options = options || Object.create(null);\n return { options, onProgress, onComplete };\n },\n\n parseLoadResArgs (type, onProgress, onComplete) {\n if (onComplete === undefined) {\n var isValidType = cc.js.isChildClassOf(type, cc.Asset);\n if (onProgress) {\n onComplete = onProgress;\n if (isValidType) {\n onProgress = null;\n }\n }\n else if (onProgress === undefined && !isValidType) {\n onComplete = type;\n onProgress = null;\n type = null;\n }\n if (onProgress !== undefined && !isValidType) {\n onProgress = type;\n type = null;\n }\n }\n return { type, onProgress, onComplete };\n },\n\n checkCircleReference (owner, uuid, map, checked) {\n if (!checked) { \n checked = Object.create(null);\n }\n let item = map[uuid];\n if (!item || checked[uuid]) {\n return false;\n }\n checked[uuid] = true;\n var result = false;\n var deps = dependUtil.getDeps(uuid);\n if (deps) {\n for (var i = 0, l = deps.length; i < l; i++) {\n var dep = deps[i];\n if (dep === owner || utils.checkCircleReference(owner, dep, map, checked)) {\n result = true;\n break;\n }\n }\n }\n return result;\n },\n\n asyncify (cb) {\n return function (p1, p2) {\n if (!cb) return;\n let refs = [];\n if (Array.isArray(p2)) {\n p2.forEach(x => x instanceof cc.Asset && refs.push(x.addRef()));\n } else {\n p2 instanceof cc.Asset && refs.push(p2.addRef());\n }\n callInNextTick(() => {\n refs.forEach(x => x.decRef(false));\n cb(p1, p2);\n }); \n }\n }\n};\n\nmodule.exports = utils;","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar CCObject = require('../platform/CCObject');\n\n/**\n * !#en\n * Base class for handling assets used in Creator.<br/>\n *\n * You may want to override:<br/>\n * - createNode<br/>\n * - getset functions of _nativeAsset<br/>\n * - cc.Object._serialize<br/>\n * - cc.Object._deserialize<br/>\n * !#zh\n * Creator 中的资源基类。<br/>\n *\n * 您可能需要重写:<br/>\n * - createNode <br/>\n * - _nativeAsset 的 getset 方法<br/>\n * - cc.Object._serialize<br/>\n * - cc.Object._deserialize<br/>\n *\n * @class Asset\n * @extends Object\n */\ncc.Asset = cc.Class({\n name: 'cc.Asset', extends: CCObject,\n\n ctor () {\n /**\n * @property {String} _uuid\n * @private\n */\n // enumerable is false by default, to avoid uuid being assigned to empty string during destroy\n Object.defineProperty(this, '_uuid', {\n value: '',\n writable: true,\n });\n /**\n * !#en\n * Whether the asset is loaded or not.\n * !#zh\n * 该资源是否已经成功加载。\n *\n * @property loaded\n * @type {Boolean}\n */\n this.loaded = true;\n this._nativeUrl = '';\n this._ref = 0;\n },\n\n properties: {\n /**\n * !#en\n * Returns the url of this asset's native object, if none it will returns an empty string.\n * !#zh\n * 返回该资源对应的目标平台资源的 URL如果没有将返回一个空字符串。\n * @property nativeUrl\n * @type {String}\n * @readOnly\n */\n nativeUrl: {\n get: function () {\n if (!this._nativeUrl) {\n if (this._native) {\n var name = this._native;\n if (name.charCodeAt(0) === 47) { // '/'\n // remove library tag\n // not imported in library, just created on-the-fly\n return name.slice(1);\n }\n if (name.charCodeAt(0) === 46) { // '.'\n // imported in dir where json exist\n this._nativeUrl = cc.assetManager.utils.getUrlWithUuid(this._uuid, {nativeExt: name, isNative: true });\n }\n else {\n // imported in an independent dir\n this._nativeUrl = cc.assetManager.utils.getUrlWithUuid(this._uuid, {__nativeName__: name, nativeExt: cc.path.extname(name), isNative: true});\n }\n }\n }\n return this._nativeUrl;\n },\n visible: false\n },\n\n /**\n * !#en\n * The number of reference\n *\n * !#zh\n * 引用的数量\n *\n * @property refCount\n * @type {Number}\n */\n refCount: {\n get () {\n return this._ref;\n }\n },\n\n /**\n * !#en\n * Serializable url for native asset.\n * !#zh\n * 保存原生资源的 URL。\n * @property {String} _native\n * @default undefined\n * @private\n */\n _native: \"\",\n\n /**\n * !#en\n * The underlying native asset of this asset if one is available.\n * This property can be used to access additional details or functionality releated to the asset.\n * This property will be initialized by the loader if `_native` is available.\n * !#zh\n * 此资源依赖的底层原生资源(如果有的话)。\n * 此属性可用于访问与资源相关的其他详细信息或功能。\n * 如果 `_native` 可用,则此属性将由加载器初始化。\n * @property {Object} _nativeAsset\n * @default null\n * @private\n */\n _nativeAsset: {\n get () {\n return this._$nativeAsset;\n },\n set (obj) {\n this._$nativeAsset = obj;\n }\n },\n\n _nativeDep: {\n get () {\n if (this._native) {\n return {__isNative__: true, uuid: this._uuid, ext: this._native};\n }\n }\n }\n },\n\n statics: {\n /**\n * !#en\n * Provide this method at the request of AssetDB.\n * !#zh\n * 应 AssetDB 要求提供这个方法。\n *\n * @method deserialize\n * @param {String} data\n * @return {Asset}\n * @static\n * @private\n */\n deserialize: CC_EDITOR && function (data) {\n return cc.deserialize(data);\n },\n\n /**\n * !#en Indicates whether its dependent raw assets can support deferred load if the owner scene (or prefab) is marked as `asyncLoadAssets`.\n * !#zh 当场景或 Prefab 被标记为 `asyncLoadAssets`,禁止延迟加载该资源所依赖的其它原始资源。\n *\n * @property {Boolean} preventDeferredLoadDependents\n * @default false\n * @static\n */\n preventDeferredLoadDependents: false,\n\n /**\n * !#en Indicates whether its native object should be preloaded from native url.\n * !#zh 禁止预加载原生对象。\n *\n * @property {Boolean} preventPreloadNativeObject\n * @default false\n * @static\n */\n preventPreloadNativeObject: false\n\n },\n\n /**\n * !#en\n * Returns the asset's url.\n\n * The `Asset` object overrides the `toString()` method of the `Object` object.\n * For `Asset` objects, the `toString()` method returns a string representation of the object.\n * JavaScript calls the `toString()` method automatically when an asset is to be represented as a text value or when a texture is referred to in a string concatenation.\n * !#zh\n * 返回资源的 URL。\n *\n * Asset 对象将会重写 Object 对象的 `toString()` 方法。\n * 对于 Asset 对象,`toString()` 方法返回该对象的字符串表示形式。\n * 当资源要表示为文本值时或在字符串连接时引用时JavaScript 会自动调用 `toString()` 方法。\n * @method toString\n * @return {String}\n */\n toString () {\n return this.nativeUrl;\n },\n\n /**\n * !#en\n * Provide this method at the request of AssetDB.\n * !#zh\n * 应 AssetDB 要求提供这个方法。\n *\n * @method serialize\n * @return {String}\n * @private\n */\n serialize: CC_EDITOR && function () {\n return Editor.serialize(this);\n },\n\n /**\n * !#en\n * Create a new node using this asset in the scene.<br/>\n * If this type of asset dont have its corresponding node type, this method should be null.\n * !#zh\n * 使用该资源在场景中创建一个新节点。<br/>\n * 如果这类资源没有相应的节点类型,该方法应该是空的。\n *\n * @method createNode\n * @param {Function} callback\n * @param {String} callback.error - null or the error info\n * @param {Object} callback.node - the created node or null\n */\n createNode: null,\n\n /**\n * !#en\n * Set native file name for this asset.\n * !#zh\n * 为此资源设置原生文件名。\n *\n * @seealso nativeUrl\n *\n * @method _setRawAsset\n * @param {String} filename\n * @param {Boolean} [inLibrary=true]\n * @private\n */\n _setRawAsset: function (filename, inLibrary) {\n if (inLibrary !== false) {\n this._native = filename || undefined;\n }\n else {\n this._native = '/' + filename; // simply use '/' to tag location where is not in the library\n }\n },\n\n /**\n * !#en\n * Add references of asset\n *\n * !#zh\n * 增加资源的引用\n *\n * @method addRef\n * @return {Asset} itself\n *\n * @typescript\n * addRef(): cc.Asset\n */\n addRef () {\n this._ref++;\n return this;\n },\n\n /**\n * !#en\n * Reduce references of asset and it will be auto released when refCount equals 0.\n *\n * !#zh\n * 减少资源的引用并尝试进行自动释放。\n *\n * @method decRef\n * @return {Asset} itself\n *\n * @typescript\n * decRef(): cc.Asset\n */\n decRef (autoRelease) {\n this._ref > 0 && this._ref--;\n autoRelease !== false && cc.assetManager._releaseManager.tryRelease(this);\n return this;\n },\n\n destroy () {\n this.loaded = false;\n return this._super();\n }\n});\n\nmodule.exports = cc.Asset;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst Asset = require('./CCAsset');\nconst EventTarget = require('../event/event-target');\n\nvar LoadMode = cc.Enum({\n WEB_AUDIO: 0,\n DOM_AUDIO: 1,\n});\n\n/**\n * !#en Class for audio data handling.\n * !#zh 音频资源类。\n * @class AudioClip\n * @extends Asset\n * @uses EventTarget\n */\nvar AudioClip = cc.Class({\n name: 'cc.AudioClip',\n extends: Asset,\n mixins: [EventTarget],\n\n ctor () {\n this._loading = false;\n this.loaded = false;\n\n // the web audio buffer or <audio> element\n this._audio = null;\n },\n\n properties: {\n /**\n * !#en Get the audio clip duration\n * !#zh 获取音频剪辑的长度\n * @property duration\n * @type {Number}\n */\n duration: 0,\n loadMode: {\n default: LoadMode.WEB_AUDIO,\n type: LoadMode\n },\n _nativeAsset: {\n get () {\n return this._audio;\n },\n set (value) {\n // HACK: fix load mp3 as audioClip, _nativeAsset is set as audioClip.\n // Should load mp3 as audioBuffer indeed.\n if (value instanceof cc.AudioClip) {\n this._audio = value._nativeAsset;\n }\n else {\n this._audio = value;\n }\n if (this._audio) {\n this.loaded = true;\n this.emit('load');\n }\n },\n override: true\n },\n\n _nativeDep: {\n get () {\n return { uuid: this._uuid, audioLoadMode: this.loadMode, ext: cc.path.extname(this._native), __isNative__: true };\n },\n override: true\n }\n },\n\n statics: {\n LoadMode: LoadMode,\n _loadByUrl: function (url, callback) {\n var audioClip = cc.assetManager.assets.get(url);\n if (!audioClip) {\n cc.assetManager.loadRemote(url, function (error, data) {\n if (error) {\n return callback(error);\n }\n callback(null, data);\n });\n }\n else {\n callback(null, audioClip);\n }\n }\n },\n\n _ensureLoaded (onComplete) {\n if (!this.isValid) {\n return;\n }\n if (this.loaded) {\n return onComplete && onComplete();\n }\n else {\n if (onComplete) {\n this.once('load', onComplete);\n }\n if (!this._loading) {\n this._loading = true;\n let self = this;\n cc.assetManager.postLoadNative(this, function (err) {\n self._loading = false;\n });\n }\n }\n },\n\n destroy () {\n cc.audioEngine.uncache(this);\n this._super();\n }\n});\n\n/**\n * !#zh\n * 当该资源加载成功后触发该事件\n * !#en\n * This event is emitted when the asset is loaded\n *\n * @event load\n */\n\ncc.AudioClip = AudioClip;\nmodule.exports = AudioClip;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nlet FontLetterDefinition = function() {\n this.u = 0;\n this.v = 0;\n this.w = 0;\n this.h = 0;\n this.offsetX = 0;\n this.offsetY = 0;\n this.textureID = 0;\n this.valid = false;\n this.xAdvance = 0;\n};\n\nlet FontAtlas = function (texture) {\n this._letterDefinitions = {};\n this._texture = texture;\n};\n\nFontAtlas.prototype = {\n constructor: FontAtlas,\n addLetterDefinitions (letter, letterDefinition) {\n this._letterDefinitions[letter] = letterDefinition;\n },\n cloneLetterDefinition () {\n let copyLetterDefinitions = {};\n for (let key in this._letterDefinitions) {\n let value = new FontLetterDefinition();\n cc.js.mixin(value, this._letterDefinitions[key]);\n copyLetterDefinitions[key] = value;\n }\n return copyLetterDefinitions;\n },\n getTexture () {\n return this._texture;\n },\n getLetter (key) {\n return this._letterDefinitions[key];\n },\n getLetterDefinitionForChar (char) {\n let key = char.charCodeAt(0);\n let hasKey = this._letterDefinitions.hasOwnProperty(key);\n let letter;\n if (hasKey) {\n letter = this._letterDefinitions[key];\n } else {\n letter = null;\n }\n return letter;\n },\n clear () {\n this._letterDefinitions = {};\n }\n};\n\n/**\n * @module cc\n */\n/**\n * !#en Class for BitmapFont handling.\n * !#zh 位图字体资源类。\n * @class BitmapFont\n * @extends Font\n *\n */\nvar BitmapFont = cc.Class({\n name: 'cc.BitmapFont',\n extends: cc.Font,\n\n properties: {\n fntDataStr: {\n default: ''\n },\n\n spriteFrame: {\n default: null,\n type: cc.SpriteFrame\n },\n\n fontSize: {\n default: -1\n },\n //用来缓存 BitmapFont 解析之后的数据\n _fntConfig: null,\n _fontDefDictionary: null\n },\n\n onLoad () {\n let spriteFrame = this.spriteFrame;\n if (!this._fontDefDictionary) {\n this._fontDefDictionary = new FontAtlas();\n if (spriteFrame) {\n this._fontDefDictionary._texture = spriteFrame._texture;\n }\n }\n\n let fntConfig = this._fntConfig;\n if (!fntConfig) {\n return;\n }\n let fontDict = fntConfig.fontDefDictionary;\n for (let fontDef in fontDict) {\n let letter = new FontLetterDefinition();\n\n let rect = fontDict[fontDef].rect;\n letter.offsetX = fontDict[fontDef].xOffset;\n letter.offsetY = fontDict[fontDef].yOffset;\n letter.w = rect.width;\n letter.h = rect.height;\n letter.u = rect.x;\n letter.v = rect.y;\n //FIXME: only one texture supported for now\n letter.textureID = 0;\n letter.valid = true;\n letter.xAdvance = fontDict[fontDef].xAdvance;\n\n this._fontDefDictionary.addLetterDefinitions(fontDef, letter);\n }\n }\n});\n\ncc.BitmapFont = BitmapFont;\ncc.BitmapFont.FontLetterDefinition = FontLetterDefinition;\ncc.BitmapFont.FontAtlas = FontAtlas;\nmodule.exports = BitmapFont;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos.com\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * @class BufferAsset\n * @extends Asset\n */\nvar BufferAsset = cc.Class({\n name: 'cc.BufferAsset',\n extends: cc.Asset,\n\n ctor () {\n this._buffer = null;\n },\n\n properties: {\n _nativeAsset: {\n get () {\n return this._buffer;\n },\n set (bin) {\n this._buffer = bin.buffer || bin;\n },\n override: true\n },\n buffer () {\n return this._buffer;\n }\n }\n});\n\ncc.BufferAsset = module.exports = BufferAsset;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * !#en Class for Font handling.\n * !#zh 字体资源类。\n * @class Font\n * @extends Asset\n */\nvar Font = cc.Class({\n name: 'cc.Font',\n extends: cc.Asset\n});\n\ncc.Font = module.exports = Font;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * !#en\n * Class for JSON file. When the JSON file is loaded, this object is returned.\n * The parsed JSON object can be accessed through the `json` attribute in it.<br>\n * If you want to get the original JSON text, you should modify the extname to `.txt`\n * so that it is loaded as a `TextAsset` instead of a `JsonAsset`.\n *\n * !#zh\n * JSON 资源类。JSON 文件加载后,将会返回该对象。可以通过其中的 `json` 属性访问解析后的 JSON 对象。<br>\n * 如果你想要获得 JSON 的原始文本,那么应该修改源文件的后缀为 `.txt`,这样就会加载为一个 `TextAsset` 而不是 `JsonAsset`。\n *\n * @class JsonAsset\n * @extends Asset\n */\nvar JsonAsset = cc.Class({\n name: 'cc.JsonAsset',\n extends: cc.Asset,\n properties: {\n /**\n * @property {Object} json - The loaded JSON object.\n */\n json: null,\n },\n});\n\nmodule.exports = cc.JsonAsset = JsonAsset;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * @module cc\n */\n/**\n * !#en Class for LabelAtlas handling.\n * !#zh 艺术数字字体资源类。\n * @class LabelAtlas\n * @extends BitmapFont\n *\n */\nvar LabelAtlas = cc.Class({\n name: 'cc.LabelAtlas',\n extends: cc.BitmapFont,\n\n onLoad () {\n if (!this.spriteFrame) {\n cc.warnID(9100, this.name);\n return;\n }\n if (!this._fntConfig) {\n cc.warnID(9101, this.name);\n return;\n }\n this._super();\n }\n\n});\n\ncc.LabelAtlas = LabelAtlas;\nmodule.exports = LabelAtlas;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * !#zh\n * Prefab 创建实例所用的优化策略,配合 {{#crossLink \"Prefab.optimizationPolicy\"}}cc.Prefab#optimizationPolicy{{/crossLink}} 使用。\n * !#en\n * An enumeration used with the {{#crossLink \"Prefab.optimizationPolicy\"}}cc.Prefab#optimizationPolicy{{/crossLink}}\n * to specify how to optimize the instantiate operation.\n *\n * @enum Prefab.OptimizationPolicy\n * @since 1.10.0\n */\nvar OptimizationPolicy = cc.Enum({\n /**\n * !#zh\n * 根据创建次数自动调整优化策略。初次创建实例时,行为等同 SINGLE_INSTANCE多次创建后将自动采用 MULTI_INSTANCE。\n * !#en\n * The optimization policy is automatically chosen based on the number of instantiations.\n * When you first create an instance, the behavior is the same as SINGLE_INSTANCE. MULTI_INSTANCE will be automatically used after multiple creation.\n * @property {Number} AUTO\n */\n AUTO: 0,\n /**\n * !#zh\n * 优化单次创建性能。<br>\n * 该选项会跳过针对这个 prefab 的代码生成优化操作。当该 prefab 加载后,一般只会创建一个实例时,请选择此项。\n * !#en\n * Optimize for single instance creation.<br>\n * This option skips code generation for this prefab.\n * When this prefab will usually create only one instances, please select this option.\n * @property {Number} SINGLE_INSTANCE\n */\n SINGLE_INSTANCE: 1,\n /**\n * !#zh\n * 优化多次创建性能。<br>\n * 该选项会启用针对这个 prefab 的代码生成优化操作。当该 prefab 加载后,一般会创建多个实例时,请选择此项。如果该 prefab 在场景中的节点启用了自动关联,并且在场景中有多份实例,也建议选择此项。\n * !#en\n * Optimize for creating instances multiple times.<br>\n * This option enables code generation for this prefab.\n * When this prefab will usually create multiple instances, please select this option.\n * It is also recommended to select this option if the prefab instance in the scene has Auto Sync enabled and there are multiple instances in the scene.\n * @property {Number} MULTI_INSTANCE\n */\n MULTI_INSTANCE: 2,\n});\n\n/**\n * !#en Class for prefab handling.\n * !#zh 预制资源类。\n * @class Prefab\n * @extends Asset\n */\nvar Prefab = cc.Class({\n name: 'cc.Prefab',\n extends: cc.Asset,\n ctor () {\n /**\n * Cache function to optimize instance creaton.\n * @property {Function} _createFunction\n * @private\n */\n this._createFunction = null;\n\n this._instantiatedTimes = 0;\n },\n\n properties: {\n /**\n * @property {Node} data - the main cc.Node in the prefab\n */\n data: null,\n\n /**\n * !#zh\n * 设置实例化这个 prefab 时所用的优化策略。根据使用情况设置为合适的值,能优化该 prefab 实例化所用的时间。\n * !#en\n * Indicates the optimization policy for instantiating this prefab.\n * Set to a suitable value based on usage, can optimize the time it takes to instantiate this prefab.\n *\n * @property {Prefab.OptimizationPolicy} optimizationPolicy\n * @default Prefab.OptimizationPolicy.AUTO\n * @since 1.10.0\n * @example\n * prefab.optimizationPolicy = cc.Prefab.OptimizationPolicy.MULTI_INSTANCE;\n */\n optimizationPolicy: OptimizationPolicy.AUTO,\n\n /**\n * !#en Indicates the raw assets of this prefab can be load after prefab loaded.\n * !#zh 指示该 Prefab 依赖的资源可否在 Prefab 加载后再延迟加载。\n * @property {Boolean} asyncLoadAssets\n * @default false\n */\n asyncLoadAssets: false,\n\n /**\n * @property {Boolean} readonly\n * @default false\n */\n readonly: {\n default: false,\n editorOnly: true\n }\n },\n\n statics: {\n OptimizationPolicy,\n OptimizationPolicyThreshold: 3,\n },\n\n createNode: CC_EDITOR && function (cb) {\n var node = cc.instantiate(this);\n node.name = this.name;\n cb(null, node);\n },\n\n /**\n * Dynamically translation prefab data into minimized code.<br/>\n * This method will be called automatically before the first time the prefab being instantiated,\n * but you can re-call to refresh the create function once you modified the original prefab data in script.\n * @method compileCreateFunction\n */\n compileCreateFunction: function () {\n var jit = require('../platform/instantiate-jit');\n this._createFunction = jit.compile(this.data);\n },\n\n // just instantiate, will not initialize the Node, this will be called during Node's initialization.\n // @param {Node} [rootToRedirect] - specify an instantiated prefabRoot that all references to prefabRoot in prefab\n // will redirect to\n _doInstantiate: function (rootToRedirect) {\n if (!this.data._prefab) {\n // temp guard code\n cc.warnID(3700);\n }\n if (!this._createFunction) {\n this.compileCreateFunction();\n }\n return this._createFunction(rootToRedirect); // this.data._instantiate();\n },\n\n _instantiate: function () {\n var node, useJit = false;\n if (CC_SUPPORT_JIT) {\n if (this.optimizationPolicy === OptimizationPolicy.SINGLE_INSTANCE) {\n useJit = false;\n }\n else if (this.optimizationPolicy === OptimizationPolicy.MULTI_INSTANCE) {\n useJit = true;\n }\n else {\n // auto\n useJit = (this._instantiatedTimes + 1) >= Prefab.OptimizationPolicyThreshold;\n }\n }\n if (useJit) {\n // instantiate node\n node = this._doInstantiate();\n // initialize node\n this.data._instantiate(node);\n }\n else {\n // instantiate node\n node = this.data._instantiate();\n }\n ++this._instantiatedTimes;\n\n // link prefab in editor\n if (CC_EDITOR || CC_TEST) {\n var PrefabUtils = Editor.require('scene://utils/prefab');\n // This operation is not necessary, but some old prefab asset may not contain complete data.\n PrefabUtils.linkPrefab(this, node);\n }\n return node;\n },\n\n destroy () {\n this.data && this.data.destroy();\n this._super();\n },\n});\n\ncc.Prefab = module.exports = Prefab;\ncc.js.obsolete(cc, 'cc._Prefab', 'Prefab');\n","const renderer = require('../renderer');\nconst Texture2D = require('./CCTexture2D');\n\nimport gfx from '../../renderer/gfx';\n\n/**\n * !#en The depth buffer and stencil buffer format for RenderTexture.\n * !#zh RenderTexture 的深度缓冲以及模板缓冲格式。\n * @enum RenderTexture.DepthStencilFormat\n */\nlet DepthStencilFormat = cc.Enum({\n /**\n * !#en 24 bit depth buffer and 8 bit stencil buffer\n * !#zh 24 位深度缓冲和 8 位模板缓冲\n * @property RB_FMT_D24S8\n * @readonly\n * @type {number}\n */\n RB_FMT_D24S8: gfx.RB_FMT_D24S8,\n /**\n * !#en Only 8 bit stencil buffer\n * !#zh 只申请 8 位模板缓冲\n * @property RB_FMT_S8\n * @readonly\n * @type {number}\n */\n RB_FMT_S8: gfx.RB_FMT_S8,\n /**\n * !#en Only 16 bit depth buffer\n * !#zh 只申请 16 位深度缓冲\n * @property RB_FMT_D16\n * @readonly\n * @type {number}\n */\n RB_FMT_D16: gfx.RB_FMT_D16\n})\n\n/**\n * Render textures are textures that can be rendered to.\n * @class RenderTexture\n * @extends Texture2D\n */\nlet RenderTexture = cc.Class({\n name: 'cc.RenderTexture',\n extends: Texture2D,\n\n statics: {\n DepthStencilFormat\n },\n\n ctor () {\n this._framebuffer = null;\n },\n\n /**\n * !#en\n * Init the render texture with size.\n * !#zh\n * 初始化 render texture \n * @param {Number} [width] \n * @param {Number} [height]\n * @param {Number} [depthStencilFormat]\n * @method initWithSize\n */\n initWithSize (width, height, depthStencilFormat) {\n this.width = Math.floor(width || cc.visibleRect.width);\n this.height = Math.floor(height || cc.visibleRect.height);\n this._resetUnderlyingMipmaps();\n \n let opts = {\n colors: [ this._texture ],\n };\n\n if (this._depthStencilBuffer) this._depthStencilBuffer.destroy();\n let depthStencilBuffer;\n if (depthStencilFormat) {\n depthStencilBuffer = new gfx.RenderBuffer(renderer.device, depthStencilFormat, width, height);\n if (depthStencilFormat === gfx.RB_FMT_D24S8) {\n opts.depthStencil = depthStencilBuffer;\n }\n else if (depthStencilFormat === gfx.RB_FMT_S8) {\n opts.stencil = depthStencilBuffer;\n }\n else if (depthStencilFormat === gfx.RB_FMT_D16) {\n opts.depth = depthStencilBuffer;\n }\n }\n this._depthStencilBuffer = depthStencilBuffer;\n if (this._framebuffer) this._framebuffer.destroy();\n this._framebuffer = new gfx.FrameBuffer(renderer.device, width, height, opts);\n\n this._packable = false;\n \n this.loaded = true;\n this.emit(\"load\");\n },\n\n updateSize(width, height) {\n this.width = Math.floor(width || cc.visibleRect.width);\n this.height = Math.floor(height || cc.visibleRect.height);\n this._resetUnderlyingMipmaps();\n\n let rbo = this._depthStencilBuffer;\n if (rbo) rbo.update(this.width, this.height);\n this._framebuffer._width = width;\n this._framebuffer._height = height;\n },\n\n /**\n * !#en Draw a texture to the specified position\n * !#zh 将指定的图片渲染到指定的位置上\n * @param {Texture2D} texture \n * @param {Number} x \n * @param {Number} y \n */\n drawTextureAt (texture, x, y) {\n if (!texture._image || texture._image.width === 0) return;\n\n this._texture.updateSubImage({\n x, y,\n image: texture._image,\n width: texture.width,\n height: texture.height,\n level: 0,\n flipY: false,\n premultiplyAlpha: texture._premultiplyAlpha\n })\n },\n\n /**\n * !#en\n * Get pixels from render texture, the pixels data stores in a RGBA Uint8Array.\n * It will return a new (width * height * 4) length Uint8Array by default。\n * You can specify a data to store the pixels to reuse the data, \n * you and can specify other params to specify the texture region to read.\n * !#zh\n * 从 render texture 读取像素数据,数据类型为 RGBA 格式的 Uint8Array 数组。\n * 默认每次调用此函数会生成一个大小为 (长 x 高 x 4 的 Uint8Array。\n * 你可以通过传入 data 来接收像素数据,也可以通过传参来指定需要读取的区域的像素。\n * @method readPixels\n * @param {Uint8Array} [data]\n * @param {Number} [x] \n * @param {Number} [y] \n * @param {Number} [w] \n * @param {Number} [h] \n * @return {Uint8Array}\n */\n readPixels (data, x, y, w, h) {\n if (!this._framebuffer || !this._texture) return data;\n\n x = x || 0;\n y = y || 0;\n let width = w || this.width;\n let height = h || this.height\n data = data || new Uint8Array(width * height * 4);\n\n let gl = cc.game._renderContext;\n let oldFBO = gl.getParameter(gl.FRAMEBUFFER_BINDING);\n gl.bindFramebuffer(gl.FRAMEBUFFER, this._framebuffer.getHandle());\n gl.readPixels(x, y, width, height, gl.RGBA, gl.UNSIGNED_BYTE, data);\n gl.bindFramebuffer(gl.FRAMEBUFFER, oldFBO);\n\n return data;\n },\n\n destroy () {\n this._super();\n if (this._framebuffer) {\n this._framebuffer.destroy();\n this._framebuffer = null;\n }\n }\n});\n\ncc.RenderTexture = module.exports = RenderTexture;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * !#en Class for scene handling.\n * !#zh 场景资源类。\n * @class SceneAsset\n * @extends Asset\n *\n */\nvar Scene = cc.Class({\n name: 'cc.SceneAsset',\n extends: cc.Asset,\n\n properties: {\n\n /**\n * @property {Scene} scene\n * @default null\n */\n scene: null,\n\n /**\n * !#en Indicates the raw assets of this scene can be load after scene launched.\n * !#zh 指示该场景依赖的资源可否在场景切换后再延迟加载。\n * @property {Boolean} asyncLoadAssets\n * @default false\n */\n asyncLoadAssets: undefined,\n\n //// backup prefab assets in editor\n //// {string} assetUuid: {cc.Node} rootInPrefab\n //_prefabDatas: {\n // default: null,\n // editorOnly: true\n //}\n },\n});\n\ncc.SceneAsset = Scene;\nmodule.exports = Scene;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * !#en Class for script handling.\n * !#zh Script 资源类。\n * @class _Script\n * @extends Asset\n *\n * @private\n */\nvar Script = cc.Class({\n name: 'cc.Script',\n extends: cc.Asset,\n});\n\ncc._Script = Script;\n\n/**\n * !#en Class for JavaScript handling.\n * !#zh JavaScript 资源类。\n * @class _JavaScript\n * @extends Asset\n * @private\n *\n */\nvar JavaScript = cc.Class({\n name: 'cc.JavaScript',\n extends: Script,\n});\n\ncc._JavaScript = JavaScript;\n\n/**\n * !#en Class for TypeScript handling.\n * !#zh TypeScript 资源类。\n * @class TypeScript\n * @extends Asset\n *\n */\nvar TypeScript = cc.Class({\n name: 'cc.TypeScript',\n extends: Script,\n});\n\ncc._TypeScript = TypeScript;","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * !#en Class for sprite atlas handling.\n * !#zh 精灵图集资源类。\n * @class SpriteAtlas\n * @extends Asset\n */\nvar SpriteAtlas = cc.Class({\n name: 'cc.SpriteAtlas',\n extends: cc.Asset,\n properties: {\n _spriteFrames: {\n default: {}\n },\n },\n\n /**\n * Returns the texture of the sprite atlas\n * @method getTexture\n * @returns {Texture2D}\n */\n getTexture: function () {\n var keys = Object.keys(this._spriteFrames);\n if (keys.length > 0) {\n var spriteFrame = this._spriteFrames[keys[0]];\n return spriteFrame ? spriteFrame.getTexture() : null;\n }\n else {\n return null;\n }\n },\n\n /**\n * Returns the sprite frame correspond to the given key in sprite atlas.\n * @method getSpriteFrame\n * @param {String} key\n * @returns {SpriteFrame}\n */\n getSpriteFrame: function (key) {\n let sf = this._spriteFrames[key];\n if (!sf) {\n return null;\n } \n if (!sf.name) {\n sf.name = key;\n }\n return sf;\n },\n\n /**\n * Returns the sprite frames in sprite atlas.\n * @method getSpriteFrames\n * @returns {[SpriteFrame]}\n */\n getSpriteFrames: function () {\n var frames = [];\n var spriteFrames = this._spriteFrames;\n\n for (var key in spriteFrames) {\n frames.push(this.getSpriteFrame(key));\n }\n\n return frames;\n }\n});\n\ncc.SpriteAtlas = SpriteAtlas;\nmodule.exports = SpriteAtlas;\n","/****************************************************************************\n Copyright (c) 2008-2010 Ricardo Quesada\n Copyright (c) 2011-2012 cocos2d-x.org\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos2d-x.org\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst EventTarget = require(\"../event/event-target\");\n\nconst INSET_LEFT = 0;\nconst INSET_TOP = 1;\nconst INSET_RIGHT = 2;\nconst INSET_BOTTOM = 3;\n\nlet temp_uvs = [{u: 0, v: 0}, {u: 0, v: 0}, {u: 0, v: 0}, {u: 0, v: 0}];\n\n/**\n * !#en\n * A cc.SpriteFrame has:<br/>\n * - texture: A cc.Texture2D that will be used by render components<br/>\n * - rectangle: A rectangle of the texture\n *\n * !#zh\n * 一个 SpriteFrame 包含:<br/>\n * - 纹理:会被渲染组件使用的 Texture2D 对象。<br/>\n * - 矩形:在纹理中的矩形区域。\n *\n * @class SpriteFrame\n * @extends Asset\n * @uses EventTarget\n * @example\n * // load a cc.SpriteFrame with image path (Recommend)\n * var self = this;\n * var url = \"test assets/PurpleMonster\";\n * cc.resources.load(url, cc.SpriteFrame, null, function (err, spriteFrame) {\n * var node = new cc.Node(\"New Sprite\");\n * var sprite = node.addComponent(cc.Sprite);\n * sprite.spriteFrame = spriteFrame;\n * node.parent = self.node\n * });\n */\nlet SpriteFrame = cc.Class(/** @lends cc.SpriteFrame# */{\n name: 'cc.SpriteFrame',\n extends: require('../assets/CCAsset'),\n mixins: [EventTarget],\n\n properties: {\n // Use this property to set texture when loading dependency\n _textureSetter: {\n set: function (texture) {\n if (texture) {\n if (CC_EDITOR && Editor.isBuilder) {\n // just building\n this._texture = texture;\n return;\n }\n if (this._texture !== texture) {\n this._refreshTexture(texture);\n }\n }\n }\n },\n\n /**\n * !#en Top border of the sprite\n * !#zh sprite 的顶部边框\n * @property insetTop\n * @type {Number}\n * @default 0\n */\n insetTop: {\n get: function () {\n return this._capInsets[INSET_TOP];\n },\n set: function (value) {\n this._capInsets[INSET_TOP] = value;\n if (this._texture) {\n this._calculateSlicedUV();\n }\n }\n },\n\n /**\n * !#en Bottom border of the sprite\n * !#zh sprite 的底部边框\n * @property insetBottom\n * @type {Number}\n * @default 0\n */\n insetBottom: {\n get: function () {\n return this._capInsets[INSET_BOTTOM];\n },\n set: function (value) {\n this._capInsets[INSET_BOTTOM] = value;\n if (this._texture) {\n this._calculateSlicedUV();\n }\n }\n },\n\n /**\n * !#en Left border of the sprite\n * !#zh sprite 的左边边框\n * @property insetLeft\n * @type {Number}\n * @default 0\n */\n insetLeft: {\n get: function () {\n return this._capInsets[INSET_LEFT];\n },\n set: function (value) {\n this._capInsets[INSET_LEFT] = value;\n if (this._texture) {\n this._calculateSlicedUV();\n }\n }\n },\n\n /**\n * !#en Right border of the sprite\n * !#zh sprite 的左边边框\n * @property insetRight\n * @type {Number}\n * @default 0\n */\n insetRight: {\n get: function () {\n return this._capInsets[INSET_RIGHT];\n },\n set: function (value) {\n this._capInsets[INSET_RIGHT] = value;\n if (this._texture) {\n this._calculateSlicedUV();\n }\n }\n },\n },\n\n /**\n * !#en\n * Constructor of SpriteFrame class.\n * !#zh\n * SpriteFrame 类的构造函数。\n * @method constructor\n * @param {String|Texture2D} [filename]\n * @param {Rect} [rect]\n * @param {Boolean} [rotated] - Whether the frame is rotated in the texture\n * @param {Vec2} [offset] - The offset of the frame in the texture\n * @param {Size} [originalSize] - The size of the frame in the texture\n */\n ctor: function () {\n // Init EventTarget data\n EventTarget.call(this);\n\n let filename = arguments[0];\n let rect = arguments[1];\n let rotated = arguments[2];\n let offset = arguments[3];\n let originalSize = arguments[4];\n\n // the location of the sprite on rendering texture\n this._rect = null;\n // uv data of frame\n this.uv = [];\n // texture of frame\n this._texture = null;\n // store original info before packed to dynamic atlas\n this._original = null;\n\n // for trimming\n this._offset = null;\n\n // for trimming\n this._originalSize = null;\n\n this._rotated = false;\n\n this._flipX = false;\n this._flipY = false;\n\n this.vertices = null;\n\n this._capInsets = [0, 0, 0, 0];\n\n this.uvSliced = [];\n\n if (CC_EDITOR) {\n // Atlas asset uuid\n this._atlasUuid = '';\n }\n\n if (filename !== undefined) {\n this.setTexture(filename, rect, rotated, offset, originalSize);\n } else {\n //todo log Error\n }\n },\n\n /**\n * !#en Returns whether the texture have been loaded\n * !#zh 返回是否已加载纹理\n * @method textureLoaded\n * @returns {boolean}\n */\n textureLoaded: function () {\n return this._texture && this._texture.loaded;\n },\n\n onTextureLoaded (callback, target) {\n if (this.textureLoaded()) {\n callback.call(target);\n }\n else {\n this.once('load', callback, target);\n this.ensureLoadTexture();\n return false;\n }\n\n return true;\n },\n\n /**\n * !#en Returns whether the sprite frame is rotated in the texture.\n * !#zh 获取 SpriteFrame 是否旋转\n * @method isRotated\n * @return {Boolean}\n */\n isRotated: function () {\n return this._rotated;\n },\n\n /**\n * !#en Set whether the sprite frame is rotated in the texture.\n * !#zh 设置 SpriteFrame 是否旋转\n * @method setRotated\n * @param {Boolean} bRotated\n */\n setRotated: function (bRotated) {\n this._rotated = bRotated;\n if (this._texture)\n this._calculateUV();\n },\n\n /**\n * !#en Returns whether the sprite frame is flip x axis in the texture.\n * !#zh 获取 SpriteFrame 是否反转 x 轴\n * @method isFlipX\n * @return {Boolean}\n */\n isFlipX: function () {\n return this._flipX;\n },\n\n /**\n * !#en Returns whether the sprite frame is flip y axis in the texture.\n * !#zh 获取 SpriteFrame 是否反转 y 轴\n * @method isFlipY\n * @return {Boolean}\n */\n isFlipY: function () {\n return this._flipY;\n },\n\n /**\n * !#en Set whether the sprite frame is flip x axis in the texture.\n * !#zh 设置 SpriteFrame 是否翻转 x 轴\n * @method setFlipX\n * @param {Boolean} flipX\n */\n setFlipX: function (flipX) {\n this._flipX = flipX;\n if (this._texture) {\n this._calculateUV();\n }\n },\n\n /**\n * !#en Set whether the sprite frame is flip y axis in the texture.\n * !#zh 设置 SpriteFrame 是否翻转 y 轴\n * @method setFlipY\n * @param {Boolean} flipY\n */\n setFlipY: function (flipY) {\n this._flipY = flipY;\n if (this._texture) {\n this._calculateUV();\n }\n },\n\n /**\n * !#en Returns the rect of the sprite frame in the texture.\n * !#zh 获取 SpriteFrame 的纹理矩形区域\n * @method getRect\n * @return {Rect}\n */\n getRect: function () {\n return cc.rect(this._rect);\n },\n\n /**\n * !#en Sets the rect of the sprite frame in the texture.\n * !#zh 设置 SpriteFrame 的纹理矩形区域\n * @method setRect\n * @param {Rect} rect\n */\n setRect: function (rect) {\n this._rect = rect;\n if (this._texture)\n this._calculateUV();\n },\n \n /**\n * !#en Returns the original size of the trimmed image.\n * !#zh 获取修剪前的原始大小\n * @method getOriginalSize\n * @return {Size}\n */\n getOriginalSize: function () {\n return cc.size(this._originalSize);\n },\n\n /**\n * !#en Sets the original size of the trimmed image.\n * !#zh 设置修剪前的原始大小\n * @method setOriginalSize\n * @param {Size} size\n */\n setOriginalSize: function (size) {\n if (!this._originalSize) {\n this._originalSize = cc.size(size);\n } else {\n this._originalSize.width = size.width;\n this._originalSize.height = size.height;\n }\n },\n\n /**\n * !#en Returns the texture of the frame.\n * !#zh 获取使用的纹理实例\n * @method getTexture\n * @return {Texture2D}\n */\n getTexture: function () {\n return this._texture;\n },\n\n _textureLoadedCallback () {\n let self = this;\n let texture = this._texture;\n if (!texture) {\n // clearTexture called while loading texture...\n return;\n }\n let w = texture.width, h = texture.height;\n\n if (self._rect) {\n self._checkRect(self._texture);\n }\n else {\n self._rect = cc.rect(0, 0, w, h);\n }\n\n if (!self._originalSize) {\n self.setOriginalSize(cc.size(w, h));\n }\n\n if (!self._offset) {\n self.setOffset(cc.v2(0, 0));\n }\n\n self._calculateUV();\n\n // dispatch 'load' event of cc.SpriteFrame\n self.emit(\"load\");\n },\n\n /*\n * !#en Sets the texture of the frame.\n * !#zh 设置使用的纹理实例。\n * @method _refreshTexture\n * @param {Texture2D} texture\n */\n _refreshTexture: function (texture) {\n this._texture = texture;\n if (texture.loaded) {\n this._textureLoadedCallback();\n }\n else {\n texture.once('load', this._textureLoadedCallback, this);\n }\n },\n\n /**\n * !#en Returns the offset of the frame in the texture.\n * !#zh 获取偏移量\n * @method getOffset\n * @return {Vec2}\n */\n getOffset: function () {\n return cc.v2(this._offset);\n },\n\n /**\n * !#en Sets the offset of the frame in the texture.\n * !#zh 设置偏移量\n * @method setOffset\n * @param {Vec2} offsets\n */\n setOffset: function (offsets) {\n this._offset = cc.v2(offsets);\n },\n\n /**\n * !#en Clone the sprite frame.\n * !#zh 克隆 SpriteFrame\n * @method clone\n * @return {SpriteFrame}\n */\n clone: function() {\n return new SpriteFrame(this._texture, this.getRect(), this._rotated, this.getOffset(), this.getOriginalSize());\n },\n\n /**\n * !#en Set SpriteFrame with Texture, rect, rotated, offset and originalSize.<br/>\n * !#zh 通过 Texturerectrotatedoffset 和 originalSize 设置 SpriteFrame。\n * @method setTexture\n * @param {Texture2D} texture\n * @param {Rect} [rect=null]\n * @param {Boolean} [rotated=false]\n * @param {Vec2} [offset=cc.v2(0,0)]\n * @param {Size} [originalSize=rect.size]\n * @return {Boolean}\n */\n setTexture: function (texture, rect, rotated, offset, originalSize) {\n if (arguments.length === 1 && texture === this._texture) return;\n\n if (rect) {\n this._rect = rect;\n }\n else {\n this._rect = null;\n }\n\n if (offset) {\n this.setOffset(offset);\n }\n else {\n this._offset = null;\n }\n\n if (originalSize) {\n this.setOriginalSize(originalSize);\n }\n else {\n this._originalSize = null;\n }\n\n this._rotated = rotated || false;\n\n if (typeof texture === 'string') {\n cc.errorID(3401);\n return;\n }\n if (texture instanceof cc.Texture2D) {\n this._refreshTexture(texture);\n }\n\n return true;\n },\n\n /**\n * !#en If a loading scene (or prefab) is marked as `asyncLoadAssets`, all the textures of the SpriteFrame which\n * associated by user's custom Components in the scene, will not preload automatically.\n * These textures will be load when Sprite component is going to render the SpriteFrames.\n * You can call this method if you want to load the texture early.\n * !#zh 当加载中的场景或 Prefab 被标记为 `asyncLoadAssets` 时,用户在场景中由自定义组件关联到的所有 SpriteFrame 的贴图都不会被提前加载。\n * 只有当 Sprite 组件要渲染这些 SpriteFrame 时,才会检查贴图是否加载。如果你希望加载过程提前,你可以手工调用这个方法。\n *\n * @method ensureLoadTexture\n * @example\n * if (spriteFrame.textureLoaded()) {\n * this._onSpriteFrameLoaded();\n * }\n * else {\n * spriteFrame.once('load', this._onSpriteFrameLoaded, this);\n * spriteFrame.ensureLoadTexture();\n * }\n */\n ensureLoadTexture: function () {\n if (this._texture) {\n if (!this._texture.loaded) {\n // load exists texture\n this._refreshTexture(this._texture);\n cc.assetManager.postLoadNative(this._texture);\n }\n }\n },\n\n /**\n * !#en\n * If you do not need to use the SpriteFrame temporarily, you can call this method so that its texture could be garbage collected. Then when you need to render the SpriteFrame, you should call `ensureLoadTexture` manually to reload texture.\n * !#zh\n * 当你暂时不再使用这个 SpriteFrame 时,可以调用这个方法来保证引用的贴图对象能被 GC。然后当你要渲染 SpriteFrame 时,你需要手动调用 `ensureLoadTexture` 来重新加载贴图。\n * @method clearTexture\n * @deprecated since 2.1\n */\n\n _checkRect: function (texture) {\n let rect = this._rect;\n let maxX = rect.x, maxY = rect.y;\n if (this._rotated) {\n maxX += rect.height;\n maxY += rect.width;\n }\n else {\n maxX += rect.width;\n maxY += rect.height;\n }\n if (maxX > texture.width) {\n cc.errorID(3300, texture.nativeUrl + '/' + this.name, maxX, texture.width);\n }\n if (maxY > texture.height) {\n cc.errorID(3400, texture.nativeUrl + '/' + this.name, maxY, texture.height);\n }\n },\n\n _flipXY (uvs) {\n if (this._flipX) {\n let tempVal = uvs[0];\n uvs[0] = uvs[1];\n uvs[1] = tempVal;\n\n tempVal = uvs[2];\n uvs[2] = uvs[3];\n uvs[3] = tempVal;\n }\n\n if (this._flipY) {\n let tempVal = uvs[0];\n uvs[0] = uvs[2];\n uvs[2] = tempVal;\n\n tempVal = uvs[1];\n uvs[1] = uvs[3];\n uvs[3] = tempVal;\n }\n },\n\n _calculateSlicedUV () {\n let rect = this._rect;\n let atlasWidth = this._texture.width;\n let atlasHeight = this._texture.height;\n let leftWidth = this._capInsets[INSET_LEFT];\n let rightWidth = this._capInsets[INSET_RIGHT];\n let centerWidth = rect.width - leftWidth - rightWidth;\n let topHeight = this._capInsets[INSET_TOP];\n let bottomHeight = this._capInsets[INSET_BOTTOM];\n let centerHeight = rect.height - topHeight - bottomHeight;\n\n let uvSliced = this.uvSliced;\n uvSliced.length = 0;\n if (this._rotated) {\n temp_uvs[0].u = (rect.x) / atlasWidth;\n temp_uvs[1].u = (rect.x + bottomHeight) / atlasWidth;\n temp_uvs[2].u = (rect.x + bottomHeight + centerHeight) / atlasWidth;\n temp_uvs[3].u = (rect.x + rect.height) / atlasWidth;\n temp_uvs[3].v = (rect.y) / atlasHeight;\n temp_uvs[2].v = (rect.y + leftWidth) / atlasHeight;\n temp_uvs[1].v = (rect.y + leftWidth + centerWidth) / atlasHeight;\n temp_uvs[0].v = (rect.y + rect.width) / atlasHeight;\n\n this._flipXY(temp_uvs);\n\n for (let row = 0; row < 4; ++row) {\n let rowD = temp_uvs[row];\n for (let col = 0; col < 4; ++col) {\n let colD = temp_uvs[3 - col];\n uvSliced.push({\n u: rowD.u,\n v: colD.v\n });\n }\n }\n }\n else {\n temp_uvs[0].u = (rect.x) / atlasWidth;\n temp_uvs[1].u = (rect.x + leftWidth) / atlasWidth;\n temp_uvs[2].u = (rect.x + leftWidth + centerWidth) / atlasWidth;\n temp_uvs[3].u = (rect.x + rect.width) / atlasWidth;\n temp_uvs[3].v = (rect.y) / atlasHeight;\n temp_uvs[2].v = (rect.y + topHeight) / atlasHeight;\n temp_uvs[1].v = (rect.y + topHeight + centerHeight) / atlasHeight;\n temp_uvs[0].v = (rect.y + rect.height) / atlasHeight;\n\n this._flipXY(temp_uvs);\n\n for (let row = 0; row < 4; ++row) {\n let rowD = temp_uvs[row];\n for (let col = 0; col < 4; ++col) {\n let colD = temp_uvs[col];\n uvSliced.push({\n u: colD.u,\n v: rowD.v\n });\n }\n }\n }\n },\n\n _setDynamicAtlasFrame (frame) {\n if (!frame) return;\n\n this._original = {\n _texture : this._texture,\n _x : this._rect.x,\n _y : this._rect.y\n }\n \n this._texture = frame.texture;\n this._rect.x = frame.x;\n this._rect.y = frame.y;\n this._calculateUV();\n },\n\n _resetDynamicAtlasFrame () {\n if (!this._original) return;\n this._rect.x = this._original._x;\n this._rect.y = this._original._y;\n this._texture = this._original._texture;\n this._original = null;\n if (this._texture.loaded) {\n this._calculateUV();\n } else {\n this.ensureLoadTexture()\n }\n this.emit(\"_resetDynamicAtlasFrame\");\n },\n\n _calculateUV () {\n let rect = this._rect,\n texture = this._texture,\n uv = this.uv,\n texw = texture.width,\n texh = texture.height;\n\n if (this._rotated) {\n let l = texw === 0 ? 0 : rect.x / texw;\n let r = texw === 0 ? 0 : (rect.x + rect.height) / texw;\n let b = texh === 0 ? 0 : (rect.y + rect.width) / texh;\n let t = texh === 0 ? 0 : rect.y / texh;\n uv[0] = l;\n uv[1] = t;\n uv[2] = l;\n uv[3] = b;\n uv[4] = r;\n uv[5] = t;\n uv[6] = r;\n uv[7] = b;\n }\n else {\n let l = texw === 0 ? 0 : rect.x / texw;\n let r = texw === 0 ? 0 : (rect.x + rect.width) / texw;\n let b = texh === 0 ? 0 : (rect.y + rect.height) / texh;\n let t = texh === 0 ? 0 : rect.y / texh;\n uv[0] = l;\n uv[1] = b;\n uv[2] = r;\n uv[3] = b;\n uv[4] = l;\n uv[5] = t;\n uv[6] = r;\n uv[7] = t;\n }\n\n if (this._flipX) {\n let tempVal = uv[0];\n uv[0] = uv[2];\n uv[2] = tempVal;\n\n tempVal = uv[1];\n uv[1] = uv[3];\n uv[3] = tempVal;\n\n tempVal = uv[4];\n uv[4] = uv[6];\n uv[6] = tempVal;\n\n tempVal = uv[5];\n uv[5] = uv[7];\n uv[7] = tempVal;\n }\n\n if (this._flipY) {\n let tempVal = uv[0];\n uv[0] = uv[4];\n uv[4] = tempVal;\n\n tempVal = uv[1];\n uv[1] = uv[5];\n uv[5] = tempVal;\n\n tempVal = uv[2];\n uv[2] = uv[6];\n uv[6] = tempVal;\n\n tempVal = uv[3];\n uv[3] = uv[7];\n uv[7] = tempVal;\n }\n\n let vertices = this.vertices;\n if (vertices) {\n vertices.nu.length = 0;\n vertices.nv.length = 0;\n for (let i = 0; i < vertices.u.length; i++) {\n vertices.nu[i] = vertices.u[i]/texw;\n vertices.nv[i] = vertices.v[i]/texh;\n }\n }\n\n this._calculateSlicedUV();\n },\n\n // SERIALIZATION\n\n _serialize: (CC_EDITOR || CC_TEST) && function (exporting, ctx) {\n let rect = this._rect;\n let offset = this._offset;\n let size = this._originalSize;\n let uuid;\n let texture = this._texture;\n if (texture) {\n uuid = texture._uuid;\n }\n if (!uuid) {\n let url = this._textureFilename;\n if (url) {\n uuid = Editor.Utils.UuidCache.urlToUuid(url);\n }\n }\n if (uuid && exporting) {\n uuid = Editor.Utils.UuidUtils.compressUuid(uuid, true);\n ctx.dependsOn('_textureSetter', uuid);\n }\n\n let vertices;\n if (this.vertices) {\n vertices = {\n triangles: this.vertices.triangles,\n x: this.vertices.x,\n y: this.vertices.y,\n u: this.vertices.u,\n v: this.vertices.v\n };\n }\n\n return {\n name: this._name,\n texture: (!exporting && uuid) || undefined,\n atlas: exporting ? undefined : this._atlasUuid, // strip from json if exporting\n rect: rect ? [rect.x, rect.y, rect.width, rect.height] : undefined,\n offset: offset ? [offset.x, offset.y] : undefined,\n originalSize: size ? [size.width, size.height] : undefined,\n rotated: this._rotated ? 1 : undefined,\n capInsets: this._capInsets,\n vertices: vertices\n };\n },\n\n _deserialize: function (data, handle) {\n let rect = data.rect;\n if (rect) {\n this._rect = new cc.Rect(rect[0], rect[1], rect[2], rect[3]);\n }\n if (data.offset) {\n this.setOffset(new cc.Vec2(data.offset[0], data.offset[1]));\n }\n if (data.originalSize) {\n this.setOriginalSize(new cc.Size(data.originalSize[0], data.originalSize[1]));\n }\n this._rotated = data.rotated === 1;\n this._name = data.name;\n\n let capInsets = data.capInsets;\n if (capInsets) {\n this._capInsets[INSET_LEFT] = capInsets[INSET_LEFT];\n this._capInsets[INSET_TOP] = capInsets[INSET_TOP];\n this._capInsets[INSET_RIGHT] = capInsets[INSET_RIGHT];\n this._capInsets[INSET_BOTTOM] = capInsets[INSET_BOTTOM];\n }\n\n if (CC_EDITOR) {\n this._atlasUuid = data.atlas;\n }\n\n this.vertices = data.vertices;\n if (this.vertices) {\n // initialize normal uv arrays\n this.vertices.nu = [];\n this.vertices.nv = [];\n }\n\n if (!CC_BUILD) {\n // manually load texture via _textureSetter\n let textureUuid = data.texture;\n if (textureUuid) {\n handle.result.push(this, '_textureSetter', textureUuid);\n }\n }\n },\n\n destroy() {\n cc.dynamicAtlasManager && cc.dynamicAtlasManager.deleteSpriteFrame(this);\n this._super();\n }\n});\n\nlet proto = SpriteFrame.prototype;\n\nproto.copyWithZone = proto.clone;\nproto.copy = proto.clone;\nproto.initWithTexture = proto.setTexture;\n\ncc.SpriteFrame = SpriteFrame;\n\nmodule.exports = SpriteFrame;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst Font = require('./CCFont');\n\n/**\n * @module cc\n */\n/**\n * !#en Class for TTFFont handling.\n * !#zh TTF 字体资源类。\n * @class TTFFont\n * @extends Font\n *\n */\nvar TTFFont = cc.Class({\n name: 'cc.TTFFont',\n extends: Font,\n\n properties: {\n _fontFamily: null,\n _nativeAsset: {\n type: cc.String,\n get () {\n return this._fontFamily;\n },\n set (value) {\n this._fontFamily = value || 'Arial';\n },\n override: true\n },\n\n _nativeDep: {\n get () {\n return { uuid: this._uuid, __nativeName__: this._native, ext: cc.path.extname(this._native), __isNative__: true };\n },\n override: true\n }\n }\n});\n\ncc.TTFFont = module.exports = TTFFont;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * !#en Class for text file.\n * !#zh 文本资源类。\n * @class TextAsset\n * @extends Asset\n */\nvar TextAsset = cc.Class({\n name: 'cc.TextAsset',\n extends: cc.Asset,\n properties: {\n /**\n * @property {String} text - The text contents of the resource.\n */\n text: \"\",\n },\n\n toString () {\n return this.text;\n },\n});\n\nmodule.exports = cc.TextAsset = TextAsset;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst EventTarget = require('../event/event-target');\nconst renderer = require('../renderer');\nrequire('../platform/CCClass');\n\nimport gfx from '../../renderer/gfx';\n\nconst GL_NEAREST = 9728; // gl.NEAREST\nconst GL_LINEAR = 9729; // gl.LINEAR\nconst GL_REPEAT = 10497; // gl.REPEAT\nconst GL_CLAMP_TO_EDGE = 33071; // gl.CLAMP_TO_EDGE\nconst GL_MIRRORED_REPEAT = 33648; // gl.MIRRORED_REPEAT\nconst GL_RGBA = 6408; // gl.RGBA\n\nconst CHAR_CODE_0 = 48; // '0'\nconst CHAR_CODE_1 = 49; // '1'\n\nvar idGenerater = new (require('../platform/id-generater'))('Tex');\n\n\n/**\n * <p>\n * This class allows to easily create OpenGL or Canvas 2D textures from images, text or raw data. <br/>\n * The created cc.Texture2D object will always have power-of-two dimensions. <br/>\n * Depending on how you create the cc.Texture2D object, the actual image area of the texture might be smaller than the texture dimensions <br/>\n * i.e. \"contentSize\" != (pixelsWide, pixelsHigh) and (maxS, maxT) != (1.0, 1.0). <br/>\n * Be aware that the content of the generated textures will be upside-down! </p>\n\n * @class Texture2D\n * @uses EventTarget\n * @extends Asset\n */\n\n// define a specified number for the pixel format which gfx do not have a standard definition.\nlet CUSTOM_PIXEL_FORMAT = 1024;\n\n/**\n * The texture pixel format, default value is RGBA8888, \n * you should note that textures loaded by normal image files (png, jpg) can only support RGBA8888 format,\n * other formats are supported by compressed file types or raw data.\n * @enum Texture2D.PixelFormat\n */\nconst PixelFormat = cc.Enum({\n /**\n * 16-bit texture without Alpha channel\n * @property RGB565\n * @readonly\n * @type {Number}\n */\n RGB565: gfx.TEXTURE_FMT_R5_G6_B5,\n /**\n * 16-bit textures: RGB5A1\n * @property RGB5A1\n * @readonly\n * @type {Number}\n */\n RGB5A1: gfx.TEXTURE_FMT_R5_G5_B5_A1,\n /**\n * 16-bit textures: RGBA4444\n * @property RGBA4444\n * @readonly\n * @type {Number}\n */\n RGBA4444: gfx.TEXTURE_FMT_R4_G4_B4_A4,\n /**\n * 24-bit texture: RGB888\n * @property RGB888\n * @readonly\n * @type {Number}\n */\n RGB888: gfx.TEXTURE_FMT_RGB8,\n /**\n * 32-bit texture: RGBA8888\n * @property RGBA8888\n * @readonly\n * @type {Number}\n */\n RGBA8888: gfx.TEXTURE_FMT_RGBA8,\n /**\n * 32-bit float texture: RGBA32F\n * @property RGBA32F\n * @readonly\n * @type {Number}\n */\n RGBA32F: gfx.TEXTURE_FMT_RGBA32F,\n /**\n * 8-bit textures used as masks\n * @property A8\n * @readonly\n * @type {Number}\n */\n A8: gfx.TEXTURE_FMT_A8,\n /**\n * 8-bit intensity texture\n * @property I8\n * @readonly\n * @type {Number}\n */\n I8: gfx.TEXTURE_FMT_L8,\n /**\n * 16-bit textures used as masks\n * @property AI88\n * @readonly\n * @type {Number}\n */\n AI8: gfx.TEXTURE_FMT_L8_A8,\n\n /**\n * rgb 2 bpp pvrtc\n * @property RGB_PVRTC_2BPPV1\n * @readonly\n * @type {Number}\n */\n RGB_PVRTC_2BPPV1: gfx.TEXTURE_FMT_RGB_PVRTC_2BPPV1,\n /**\n * rgba 2 bpp pvrtc\n * @property RGBA_PVRTC_2BPPV1\n * @readonly\n * @type {Number}\n */\n RGBA_PVRTC_2BPPV1: gfx.TEXTURE_FMT_RGBA_PVRTC_2BPPV1,\n /**\n * rgb separate a 2 bpp pvrtc\n * RGB_A_PVRTC_2BPPV1 texture is a 2x height RGB_PVRTC_2BPPV1 format texture.\n * It separate the origin alpha channel to the bottom half atlas, the origin rgb channel to the top half atlas\n * @property RGB_A_PVRTC_2BPPV1\n * @readonly\n * @type {Number}\n */\n RGB_A_PVRTC_2BPPV1: CUSTOM_PIXEL_FORMAT++,\n /**\n * rgb 4 bpp pvrtc\n * @property RGB_PVRTC_4BPPV1\n * @readonly\n * @type {Number}\n */\n RGB_PVRTC_4BPPV1: gfx.TEXTURE_FMT_RGB_PVRTC_4BPPV1,\n /**\n * rgba 4 bpp pvrtc\n * @property RGBA_PVRTC_4BPPV1\n * @readonly\n * @type {Number}\n */\n RGBA_PVRTC_4BPPV1: gfx.TEXTURE_FMT_RGBA_PVRTC_4BPPV1,\n /**\n * rgb a 4 bpp pvrtc\n * RGB_A_PVRTC_4BPPV1 texture is a 2x height RGB_PVRTC_4BPPV1 format texture.\n * It separate the origin alpha channel to the bottom half atlas, the origin rgb channel to the top half atlas\n * @property RGB_A_PVRTC_4BPPV1\n * @readonly\n * @type {Number}\n */\n RGB_A_PVRTC_4BPPV1: CUSTOM_PIXEL_FORMAT++,\n /**\n * rgb etc1\n * @property RGB_ETC1\n * @readonly\n * @type {Number}\n */\n RGB_ETC1: gfx.TEXTURE_FMT_RGB_ETC1,\n /**\n * rgba etc1\n * @property RGBA_ETC1\n * @readonly\n * @type {Number}\n */\n RGBA_ETC1: CUSTOM_PIXEL_FORMAT++,\n\n /**\n * rgb etc2\n * @property RGB_ETC2\n * @readonly\n * @type {Number}\n */\n RGB_ETC2: gfx.TEXTURE_FMT_RGB_ETC2,\n /**\n * rgba etc2\n * @property RGBA_ETC2\n * @readonly\n * @type {Number}\n */\n RGBA_ETC2: gfx.TEXTURE_FMT_RGBA_ETC2,\n});\n\n/**\n * The texture wrap mode\n * @enum Texture2D.WrapMode\n */\nconst WrapMode = cc.Enum({\n /**\n * The constant variable equals gl.REPEAT for texture\n * @property REPEAT\n * @type {Number}\n * @readonly\n */\n REPEAT: GL_REPEAT,\n /**\n * The constant variable equals gl.CLAMP_TO_EDGE for texture\n * @property CLAMP_TO_EDGE\n * @type {Number}\n * @readonly\n */\n CLAMP_TO_EDGE: GL_CLAMP_TO_EDGE,\n /**\n * The constant variable equals gl.MIRRORED_REPEAT for texture\n * @property MIRRORED_REPEAT\n * @type {Number}\n * @readonly\n */\n MIRRORED_REPEAT: GL_MIRRORED_REPEAT\n});\n\n/**\n * The texture filter mode\n * @enum Texture2D.Filter\n */\nconst Filter = cc.Enum({\n /**\n * The constant variable equals gl.LINEAR for texture\n * @property LINEAR\n * @type {Number}\n * @readonly\n */\n LINEAR: GL_LINEAR,\n /**\n * The constant variable equals gl.NEAREST for texture\n * @property NEAREST\n * @type {Number}\n * @readonly\n */\n NEAREST: GL_NEAREST\n});\n\nconst FilterIndex = {\n 9728: 0, // GL_NEAREST\n 9729: 1, // GL_LINEAR\n};\n\nlet _images = [];\nlet _sharedOpts = {\n width: undefined,\n height: undefined,\n minFilter: undefined,\n magFilter: undefined,\n wrapS: undefined,\n wrapT: undefined,\n format: undefined,\n genMipmaps: undefined,\n images: undefined,\n image: undefined,\n flipY: undefined,\n premultiplyAlpha: undefined\n};\nfunction _getSharedOptions () {\n for (var key in _sharedOpts) {\n _sharedOpts[key] = undefined;\n }\n _images.length = 0;\n _sharedOpts.images = _images;\n return _sharedOpts;\n}\n\n/**\n * This class allows to easily create OpenGL or Canvas 2D textures from images or raw data.\n *\n * @class Texture2D\n * @uses EventTarget\n * @extends Asset\n */\nvar Texture2D = cc.Class({\n name: 'cc.Texture2D',\n extends: require('../assets/CCAsset'),\n mixins: [EventTarget],\n\n properties: {\n _nativeAsset: {\n get () {\n // maybe returned to pool in webgl\n return this._image;\n },\n set (data) {\n if (data._compressed && data._data) {\n this.initWithData(data._data, this._format, data.width, data.height);\n }\n else {\n this.initWithElement(data);\n }\n },\n override: true\n },\n _format: PixelFormat.RGBA8888,\n _premultiplyAlpha: false,\n _flipY: false,\n _minFilter: Filter.LINEAR,\n _magFilter: Filter.LINEAR,\n _mipFilter: Filter.LINEAR,\n _wrapS: WrapMode.CLAMP_TO_EDGE,\n _wrapT: WrapMode.CLAMP_TO_EDGE,\n\n _isAlphaAtlas: false,\n\n _genMipmaps: false,\n /**\n * !#en Sets whether generate mipmaps for the texture\n * !#zh 是否为纹理设置生成 mipmaps。\n * @property {Boolean} genMipmaps\n * @default false\n */\n genMipmaps: {\n get () {\n return this._genMipmaps;\n },\n set (genMipmaps) {\n if (this._genMipmaps !== genMipmaps) {\n var opts = _getSharedOptions();\n opts.genMipmaps = genMipmaps;\n this.update(opts);\n }\n }\n },\n\n _packable: true,\n /**\n * !#en \n * Sets whether texture can be packed into texture atlas.\n * If need use texture uv in custom Effect, please sets packable to false.\n * !#zh \n * 设置纹理是否允许参与合图。\n * 如果需要在自定义 Effect 中使用纹理 UV需要禁止该选项。\n * @property {Boolean} packable\n * @default true\n */\n packable: {\n get () {\n return this._packable;\n },\n set (val) {\n this._packable = val;\n }\n },\n \n _nativeDep: {\n get () {\n return {\n __isNative__: true, \n uuid: this._uuid, \n ext: this._native, \n __flipY__: this._flipY,\n __premultiplyAlpha__: this._premultiplyAlpha\n };\n },\n override: true\n }\n },\n\n statics: {\n PixelFormat: PixelFormat,\n WrapMode: WrapMode,\n Filter: Filter,\n _FilterIndex: FilterIndex,\n // predefined most common extnames\n extnames: ['.png', '.jpg', '.jpeg', '.bmp', '.webp', '.pvr', '.pkm'],\n\n _parseExt (extIdStr, defaultFormat) {\n let device = cc.renderer.device;\n let extIds = extIdStr.split('_');\n\n let defaultExt = '';\n let bestExt = '';\n let bestIndex = 999;\n let bestFormat = defaultFormat;\n let SupportTextureFormats = cc.macro.SUPPORT_TEXTURE_FORMATS;\n for (let i = 0; i < extIds.length; i++) {\n let extFormat = extIds[i].split('@');\n let tmpExt = extFormat[0];\n tmpExt = Texture2D.extnames[tmpExt.charCodeAt(0) - CHAR_CODE_0] || tmpExt;\n\n let index = SupportTextureFormats.indexOf(tmpExt);\n if (index !== -1 && index < bestIndex) {\n \n let tmpFormat = extFormat[1] ? parseInt(extFormat[1]) : defaultFormat;\n\n // check whether or not support compressed texture\n if ( tmpExt === '.pvr' && !device.ext('WEBGL_compressed_texture_pvrtc')) {\n continue;\n }\n else if ((tmpFormat === PixelFormat.RGB_ETC1 || tmpFormat === PixelFormat.RGBA_ETC1) && !device.ext('WEBGL_compressed_texture_etc1')) {\n continue;\n }\n else if ((tmpFormat === PixelFormat.RGB_ETC2 || tmpFormat === PixelFormat.RGBA_ETC2) && !device.ext('WEBGL_compressed_texture_etc')) {\n continue;\n }\n else if (tmpExt === '.webp' && !cc.sys.capabilities.webp) {\n continue;\n }\n\n bestIndex = index;\n bestExt = tmpExt;\n bestFormat = tmpFormat;\n }\n else if (!defaultExt) {\n defaultExt = tmpExt;\n }\n }\n return { bestExt, bestFormat, defaultExt };\n }\n },\n\n ctor () {\n // Id for generate hash in material\n this._id = idGenerater.getNewId();\n\n /**\n * !#en\n * Whether the texture is loaded or not\n * !#zh\n * 贴图是否已经成功加载\n * @property loaded\n * @type {Boolean}\n */\n this.loaded = false;\n /**\n * !#en\n * Texture width in pixel\n * !#zh\n * 贴图像素宽度\n * @property width\n * @type {Number}\n */\n this.width = 0;\n /**\n * !#en\n * Texture height in pixel\n * !#zh\n * 贴图像素高度\n * @property height\n * @type {Number}\n */\n this.height = 0;\n\n this._hashDirty = true;\n this._hash = 0;\n this._texture = null;\n \n if (CC_EDITOR) {\n this._exportedExts = null;\n }\n\n // multi batcher\n this._multiMaterial = null;\n },\n\n /**\n * !#en\n * Get renderer texture implementation object\n * extended from render.Texture2D\n * !#zh 返回渲染器内部贴图对象\n * @method getImpl\n */\n getImpl () {\n if (!this._texture) this._texture = new renderer.Texture2D(renderer.device, {});\n return this._texture;\n },\n\n getId () {\n return this._id;\n },\n\n toString () {\n return this.nativeUrl || '';\n },\n\n /**\n * Update texture options, not available in Canvas render mode.\n * image, format, premultiplyAlpha can not be updated in native.\n * @method update\n * @param {Object} options\n * @param {DOMImageElement} options.image\n * @param {Boolean} options.genMipmaps\n * @param {PixelFormat} options.format\n * @param {Filter} options.minFilter\n * @param {Filter} options.magFilter\n * @param {WrapMode} options.wrapS\n * @param {WrapMode} options.wrapT\n * @param {Boolean} options.premultiplyAlpha\n */\n update (options) {\n if (options) {\n let updateImg = false;\n if (options.width !== undefined) {\n this.width = options.width;\n }\n if (options.height !== undefined) {\n this.height = options.height;\n }\n if (options.minFilter !== undefined) {\n this._minFilter = options.minFilter;\n options.minFilter = FilterIndex[options.minFilter];\n }\n if (options.magFilter !== undefined) {\n this._magFilter = options.magFilter;\n options.magFilter = FilterIndex[options.magFilter];\n }\n if (options.mipFilter !== undefined) {\n this._mipFilter = options.mipFilter;\n options.mipFilter = FilterIndex[options.mipFilter];\n }\n if (options.wrapS !== undefined) {\n this._wrapS = options.wrapS;\n }\n if (options.wrapT !== undefined) {\n this._wrapT = options.wrapT;\n }\n if (options.format !== undefined) {\n this._format = options.format;\n }\n if (options.flipY !== undefined) {\n this._flipY = options.flipY;\n updateImg = true;\n }\n if (options.premultiplyAlpha !== undefined) {\n this._premultiplyAlpha = options.premultiplyAlpha;\n updateImg = true;\n }\n if (options.genMipmaps !== undefined) {\n this._genMipmaps = options.genMipmaps;\n }\n\n if (cc.sys.capabilities.imageBitmap && this._image instanceof ImageBitmap) {\n this._checkImageBitmap(this._upload.bind(this, options, updateImg));\n }\n else {\n this._upload(options, updateImg);\n }\n \n }\n },\n\n\n _upload (options, updateImg) {\n if (updateImg && this._image) {\n options.image = this._image;\n }\n if (options.images && options.images.length > 0) {\n this._image = options.images[0];\n }\n else if (options.image !== undefined) {\n this._image = options.image;\n if (!options.images) {\n _images.length = 0;\n options.images = _images;\n }\n // webgl texture 2d uses images\n options.images.push(options.image);\n }\n\n this._texture && this._texture.update(options);\n\n this._hashDirty = true;\n },\n\n /**\n * !#en\n * Init with HTML element.\n * !#zh 用 HTML Image 或 Canvas 对象初始化贴图。\n * @method initWithElement\n * @param {HTMLImageElement|HTMLCanvasElement} element\n * @example\n * var img = new Image();\n * img.src = dataURL;\n * texture.initWithElement(img);\n */\n initWithElement (element) {\n if (!element)\n return;\n this._image = element;\n if (element.complete || element instanceof HTMLCanvasElement) {\n this.handleLoadedTexture();\n }\n else if (cc.sys.capabilities.imageBitmap && element instanceof ImageBitmap) {\n this._checkImageBitmap(this.handleLoadedTexture.bind(this));\n }\n else {\n var self = this;\n element.addEventListener('load', function () {\n self.handleLoadedTexture();\n });\n element.addEventListener('error', function (err) {\n cc.warnID(3119, err.message);\n });\n }\n },\n\n /**\n * !#en\n * Intializes with texture data in ArrayBufferView.\n * !#zh 使用一个存储在 ArrayBufferView 中的图像数据raw data初始化数据。\n * @method initWithData\n * @param {ArrayBufferView} data\n * @param {Number} pixelFormat\n * @param {Number} pixelsWidth\n * @param {Number} pixelsHeight\n * @return {Boolean}\n */\n initWithData (data, pixelFormat, pixelsWidth, pixelsHeight) {\n var opts = _getSharedOptions();\n opts.image = data;\n // webgl texture 2d uses images\n opts.images = [opts.image];\n opts.genMipmaps = this._genMipmaps;\n opts.premultiplyAlpha = this._premultiplyAlpha;\n opts.flipY = this._flipY;\n opts.minFilter = FilterIndex[this._minFilter];\n opts.magFilter = FilterIndex[this._magFilter];\n opts.wrapS = this._wrapS;\n opts.wrapT = this._wrapT;\n opts.format = this._getGFXPixelFormat(pixelFormat);\n opts.width = pixelsWidth;\n opts.height = pixelsHeight;\n if (!this._texture) {\n this._texture = new renderer.Texture2D(renderer.device, opts);\n }\n else {\n this._texture.update(opts);\n }\n this.width = pixelsWidth;\n this.height = pixelsHeight;\n\n this._updateFormat();\n this._checkPackable();\n\n this.loaded = true;\n this.emit(\"load\");\n return true;\n },\n\n /**\n * !#en\n * HTMLElement Object getter, available only on web.<br/>\n * Note: texture is packed into texture atlas by default<br/>\n * you should set texture.packable as false before getting Html element object.\n * !#zh 获取当前贴图对应的 HTML Image 或 Canvas 对象,只在 Web 平台下有效。<br/>\n * 注意:<br/>\n * texture 默认参与动态合图,如果需要获取到正确的 Html 元素对象,需要先设置 texture.packable 为 false\n * @method getHtmlElementObj\n * @return {HTMLImageElement|HTMLCanvasElement}\n */\n getHtmlElementObj () {\n return this._image;\n },\n \n /**\n * !#en\n * Destory this texture and immediately release its video memory. (Inherit from cc.Object.destroy)<br>\n * After destroy, this object is not usable anymore.\n * You can use cc.isValid(obj) to check whether the object is destroyed before accessing it.\n * !#zh\n * 销毁该贴图,并立即释放它对应的显存。(继承自 cc.Object.destroy<br/>\n * 销毁后,该对象不再可用。您可以在访问对象之前使用 cc.isValid(obj) 来检查对象是否已被销毁。\n * @method destroy\n * @return {Boolean} inherit from the CCObject\n */\n destroy () {\n if (cc.sys.capabilities.imageBitmap && this._image instanceof ImageBitmap) {\n this._image.close && this._image.close();\n }\n this._packable && cc.dynamicAtlasManager && cc.dynamicAtlasManager.deleteAtlasTexture(this);\n\n this.unlinkMaterial();\n\n this._image = null;\n this._texture && this._texture.destroy();\n this._super();\n },\n\n /**\n * !#en\n * Pixel format of the texture.\n * !#zh 获取纹理的像素格式。\n * @method getPixelFormat\n * @return {Number}\n */\n getPixelFormat () {\n //support only in WebGl rendering mode\n return this._format;\n },\n\n /**\n * !#en\n * Whether or not the texture has their Alpha premultiplied.\n * !#zh 检查纹理在上传 GPU 时预乘选项是否开启。\n * @method hasPremultipliedAlpha\n * @return {Boolean}\n */\n hasPremultipliedAlpha () {\n return this._premultiplyAlpha || false;\n },\n\n isAlphaAtlas () {\n return this._isAlphaAtlas;\n },\n\n /**\n * !#en\n * Handler of texture loaded event.\n * Since v2.0, you don't need to invoke this function, it will be invoked automatically after texture loaded.\n * !#zh 贴图加载事件处理器。v2.0 之后你将不在需要手动执行这个函数,它会在贴图加载成功之后自动执行。\n * @method handleLoadedTexture\n * @param {Boolean} [premultiplied]\n */\n handleLoadedTexture () {\n if (!this._image || !this._image.width || !this._image.height)\n return;\n \n this.width = this._image.width;\n this.height = this._image.height;\n let opts = _getSharedOptions();\n opts.image = this._image;\n // webgl texture 2d uses images\n opts.images = [opts.image];\n opts.width = this.width;\n opts.height = this.height;\n opts.genMipmaps = this._genMipmaps;\n opts.format = this._getGFXPixelFormat(this._format);\n opts.premultiplyAlpha = this._premultiplyAlpha;\n opts.flipY = this._flipY;\n opts.minFilter = FilterIndex[this._minFilter];\n opts.magFilter = FilterIndex[this._magFilter];\n opts.wrapS = this._wrapS;\n opts.wrapT = this._wrapT;\n \n if (!this._texture) {\n this._texture = new renderer.Texture2D(renderer.device, opts);\n }\n else {\n this._texture.update(opts);\n }\n\n this._updateFormat();\n this._checkPackable();\n\n //dispatch load event to listener.\n this.loaded = true;\n this.emit(\"load\");\n\n if (cc.macro.CLEANUP_IMAGE_CACHE) {\n this._cleanupImageCache();\n }\n },\n \n _cleanupImageCache () {\n if (this._image instanceof HTMLImageElement) {\n this._clearImage();\n }\n else if (cc.sys.capabilities.imageBitmap && this._image instanceof ImageBitmap) {\n this._image.close && this._image.close();\n }\n },\n\n /**\n * !#en\n * Description of cc.Texture2D.\n * !#zh cc.Texture2D 描述。\n * @method description\n * @returns {String}\n */\n description () {\n return \"<cc.Texture2D | Name = \" + this.nativeUrl + \" | Dimensions = \" + this.width + \" x \" + this.height + \">\";\n },\n\n /**\n * !#en\n * Release texture, please use destroy instead.\n * !#zh 释放纹理,请使用 destroy 替代。\n * @method releaseTexture\n * @deprecated since v2.0\n */\n releaseTexture () {\n this._image = null;\n this._texture && this._texture.destroy();\n },\n\n /**\n * !#en Sets the wrap s and wrap t options. <br/>\n * If the texture size is NPOT (non power of 2), then in can only use gl.CLAMP_TO_EDGE in gl.TEXTURE_WRAP_{S,T}.\n * !#zh 设置纹理包装模式。\n * 若纹理贴图尺寸是 NPOTnon power of 2则只能使用 Texture2D.WrapMode.CLAMP_TO_EDGE。\n * @method setWrapMode\n * @param {Texture2D.WrapMode} wrapS\n * @param {Texture2D.WrapMode} wrapT\n */\n setWrapMode (wrapS, wrapT) {\n if (this._wrapS !== wrapS || this._wrapT !== wrapT) {\n var opts = _getSharedOptions();\n opts.wrapS = wrapS;\n opts.wrapT = wrapT;\n this.update(opts);\n }\n },\n\n /**\n * !#en Sets the minFilter and magFilter options\n * !#zh 设置纹理贴图缩小和放大过滤器算法选项。\n * @method setFilters\n * @param {Texture2D.Filter} minFilter\n * @param {Texture2D.Filter} magFilter\n */\n setFilters (minFilter, magFilter) {\n if (this._minFilter !== minFilter || this._magFilter !== magFilter) {\n var opts = _getSharedOptions();\n opts.minFilter = minFilter;\n opts.magFilter = magFilter;\n this.update(opts);\n }\n },\n\n /**\n * !#en\n * Sets the flipY options\n * !#zh 设置贴图的纵向翻转选项。\n * @method setFlipY\n * @param {Boolean} flipY\n */\n setFlipY (flipY) {\n if (this._flipY !== flipY) {\n var opts = _getSharedOptions();\n opts.flipY = flipY;\n opts.premultiplyAlpha = this._premultiplyAlpha;\n this.update(opts);\n }\n },\n\n /**\n * !#en\n * Sets the premultiply alpha options\n * !#zh 设置贴图的预乘选项。\n * @method setPremultiplyAlpha\n * @param {Boolean} premultiply\n */\n setPremultiplyAlpha (premultiply) {\n if (this._premultiplyAlpha !== premultiply) {\n var opts = _getSharedOptions();\n opts.flipY = this._flipY;\n opts.premultiplyAlpha = premultiply;\n this.update(opts);\n }\n },\n\n _updateFormat () {\n this._isAlphaAtlas = this._format === PixelFormat.RGBA_ETC1 || this._format === PixelFormat.RGB_A_PVRTC_4BPPV1 || this._format === PixelFormat.RGB_A_PVRTC_2BPPV1;\n if (CC_JSB) {\n this._texture.setAlphaAtlas(this._isAlphaAtlas);\n }\n },\n\n _checkPackable () {\n let dynamicAtlas = cc.dynamicAtlasManager;\n if (!dynamicAtlas) return;\n\n if (this._isCompressed()) {\n this._packable = false;\n return;\n }\n\n let w = this.width, h = this.height;\n if (!this._image ||\n w > dynamicAtlas.maxFrameSize || h > dynamicAtlas.maxFrameSize || \n this._getHash() !== dynamicAtlas.Atlas.DEFAULT_HASH) {\n this._packable = false;\n return;\n }\n\n if (this._image && this._image instanceof HTMLCanvasElement) {\n this._packable = true;\n }\n },\n\n _getOpts() {\n let opts = _getSharedOptions();\n opts.width = this.width;\n opts.height = this.height;\n opts.genMipmaps = this._genMipmaps;\n opts.format = this._format;\n opts.premultiplyAlpha = this._premultiplyAlpha;\n opts.anisotropy = this._anisotropy;\n opts.flipY = this._flipY;\n opts.minFilter = FilterIndex[this._minFilter];\n opts.magFilter = FilterIndex[this._magFilter];\n opts.mipFilter = FilterIndex[this._mipFilter];\n opts.wrapS = this._wrapS;\n opts.wrapT = this._wrapT;\n return opts;\n },\n\n _getGFXPixelFormat (format) {\n if (format === PixelFormat.RGBA_ETC1) {\n format = PixelFormat.RGB_ETC1;\n }\n else if (format === PixelFormat.RGB_A_PVRTC_4BPPV1) {\n format = PixelFormat.RGB_PVRTC_4BPPV1;\n }\n else if (format === PixelFormat.RGB_A_PVRTC_2BPPV1) {\n format = PixelFormat.RGB_PVRTC_2BPPV1;\n }\n return format;\n },\n\n _resetUnderlyingMipmaps(mipmapSources) {\n const opts = this._getOpts();\n opts.images = mipmapSources || [null];\n if (!this._texture) {\n this._texture = new renderer.Texture2D(renderer.device, opts);\n } else {\n this._texture.update(opts);\n }\n },\n\n // SERIALIZATION\n\n _serialize: (CC_EDITOR || CC_TEST) && function () {\n let extId = \"\";\n let exportedExts = this._exportedExts;\n if (!exportedExts && this._native) {\n exportedExts = [this._native];\n }\n if (exportedExts) {\n let exts = [];\n for (let i = 0; i < exportedExts.length; i++) {\n let extId = \"\";\n let ext = exportedExts[i];\n if (ext) {\n // ext@format\n let extFormat = ext.split('@');\n extId = Texture2D.extnames.indexOf(extFormat[0]);\n if (extId < 0) {\n extId = ext;\n }\n if (extFormat[1]) {\n extId += '@' + extFormat[1];\n }\n }\n exts.push(extId);\n }\n extId = exts.join('_');\n }\n let asset = `${extId},${this._minFilter},${this._magFilter},${this._wrapS},${this._wrapT},` +\n `${this._premultiplyAlpha ? 1 : 0},${this._genMipmaps ? 1 : 0},${this._packable ? 1 : 0}`;\n return asset;\n },\n\n _deserialize: function (data) {\n let fields = data.split(',');\n // decode extname\n let extIdStr = fields[0];\n if (extIdStr) {\n var result = Texture2D._parseExt(extIdStr, this._format);\n\n if (result.bestExt) {\n this._setRawAsset(result.bestExt);\n this._format = result.bestFormat;\n }\n else if (result.defaultExt) {\n this._setRawAsset(result.defaultExt);\n cc.warnID(3120, result.defaultExt, result.defaultExt);\n }\n else {\n throw new Error(cc.debug.getError(3121));\n }\n }\n if (fields.length === 8) {\n // decode filters\n this._minFilter = parseInt(fields[1]);\n this._magFilter = parseInt(fields[2]);\n // decode wraps\n this._wrapS = parseInt(fields[3]);\n this._wrapT = parseInt(fields[4]);\n // decode premultiply alpha\n this._premultiplyAlpha = fields[5].charCodeAt(0) === CHAR_CODE_1;\n this._genMipmaps = fields[6].charCodeAt(0) === CHAR_CODE_1;\n this._packable = fields[7].charCodeAt(0) === CHAR_CODE_1;\n }\n },\n\n _getHash () {\n if (!this._hashDirty) {\n return this._hash;\n }\n let genMipmaps = this._genMipmaps ? 1 : 0;\n let premultiplyAlpha = this._premultiplyAlpha ? 1 : 0;\n let flipY = this._flipY ? 1 : 0;\n let minFilter = this._minFilter === Filter.LINEAR ? 1 : 2;\n let magFilter = this._magFilter === Filter.LINEAR ? 1 : 2;\n let wrapS = this._wrapS === WrapMode.REPEAT ? 1 : (this._wrapS === WrapMode.CLAMP_TO_EDGE ? 2 : 3);\n let wrapT = this._wrapT === WrapMode.REPEAT ? 1 : (this._wrapT === WrapMode.CLAMP_TO_EDGE ? 2 : 3);\n let pixelFormat = this._format;\n let image = this._image;\n if (CC_JSB && image) {\n if (image._glFormat && image._glFormat !== GL_RGBA)\n pixelFormat = 0;\n premultiplyAlpha = image._premultiplyAlpha ? 1 : 0;\n }\n\n this._hash = Number(`${minFilter}${magFilter}${pixelFormat}${wrapS}${wrapT}${genMipmaps}${premultiplyAlpha}${flipY}`);\n this._hashDirty = false;\n return this._hash;\n },\n\n _isCompressed () {\n return this._format < PixelFormat.A8 || this._format > PixelFormat.RGBA32F;\n },\n \n _clearImage () {\n this._image.src = \"\";\n },\n\n _checkImageBitmap (cb) {\n let image = this._image;\n let flipY = this._flipY;\n let premultiplyAlpha = this._premultiplyAlpha;\n if (this._flipY !== image.flipY || this._premultiplyAlpha !== image.premultiplyAlpha) {\n createImageBitmap(image, {\n imageOrientation: flipY !== image.flipY ? 'flipY' : 'none',\n premultiplyAlpha: premultiplyAlpha ? 'premultiply' : 'none'}\n ).then((result) => {\n image.close && image.close();\n result.flipY = flipY;\n result.premultiplyAlpha = premultiplyAlpha;\n this._image = result;\n cb();\n }, (err) => {\n cc.error(err.message);\n });\n }\n else {\n cb();\n }\n },\n\n linkMaterial(material, index) {\n const handler = material.getMultiHandler();\n if (handler) {\n if (index == null) {\n if (handler.autoSetTexture(this) === -1) {\n return false;\n }\n } else {\n handler.setTexture(index, this);\n }\n this.unlinkMaterial();\n this._multiMaterial = material;\n return true;\n } else {\n return false;\n }\n },\n\n unlinkMaterial() {\n if (this._multiMaterial) {\n const handler = this._multiMaterial.getMultiHandler();\n const _texture = this.getImpl();\n handler.removeTexture(_texture);\n this._multiMaterial = null;\n }\n },\n\n getLinkedMaterial() {\n return this._multiMaterial;\n },\n\n hasLinkedMaterial() {\n return !!this._multiMaterial;\n },\n\n});\n\n/**\n * !#zh\n * 当该资源加载成功后触发该事件\n * !#en\n * This event is emitted when the asset is loaded\n *\n * @event load\n */\n\ncc.Texture2D = module.exports = Texture2D;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst Asset = require('./CCAsset');\nconst EventTarget = require('../event/event-target');\n\n/**\n * !#en Class for video data handling.\n * !#zh 视频资源类。\n * @class VideoClip\n * @extends Asset\n * @uses EventTarget\n */\nvar VideoClip = cc.Class({\n name: 'cc.VideoClip',\n extends: Asset,\n mixins: [EventTarget],\n});\n\ncc.VideoClip = VideoClip;\nmodule.exports = VideoClip;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nrequire('./CCAsset');\nrequire('./CCFont');\nrequire('./CCPrefab');\nrequire('./CCAudioClip');\nrequire('./CCVideoClip');\nrequire('./CCScripts');\nrequire('./CCSceneAsset');\nrequire('./CCSpriteFrame');\nrequire('./CCTexture2D');\nrequire('./CCRenderTexture');\nrequire('./CCTTFFont');\nrequire('./CCSpriteAtlas');\nrequire('./CCBitmapFont');\nrequire('./CCLabelAtlas');\nrequire('./CCTextAsset');\nrequire('./CCJsonAsset');\nrequire('./CCBufferAsset');\nrequire('./material');\n","import Asset from '../CCAsset';\nimport { parseEffect } from './effect-parser';\n\n/**\n * !#en Effect Asset.\n * !#zh Effect 资源类型。\n * @class EffectAsset\n * @extends Asset\n */\nlet EffectAsset = cc.Class({\n name: 'cc.EffectAsset',\n extends: Asset,\n\n ctor () {\n this._effect = null;\n },\n\n properties: {\n properties: Object,\n techniques: [],\n shaders: []\n },\n\n onLoad () {\n if (cc.game.renderType === cc.game.RENDER_TYPE_CANVAS) {\n return;\n }\n \n let lib = cc.renderer._forward._programLib;\n for (let i = 0; i < this.shaders.length; i++) {\n lib.define(this.shaders[i]);\n }\n\n this._initEffect();\n },\n\n _initEffect () {\n if (this._effect) return;\n this._effect = parseEffect(this);\n Object.freeze(this._effect);\n },\n\n getInstantiatedEffect () {\n this._initEffect();\n return this._effect.clone();\n },\n\n getEffect () {\n this._initEffect();\n return this._effect;\n }\n});\n\nmodule.exports = cc.EffectAsset = EffectAsset;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos.com\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst Asset = require('../CCAsset');\nconst Texture = require('../CCTexture2D');\nconst PixelFormat = Texture.PixelFormat;\nconst EffectAsset = require('./CCEffectAsset');\nconst textureUtil = require('../../utils/texture-util');\nconst gfx = cc.gfx;\n\n/**\n * !#en Material builtin name\n * !#zh 内置材质名字\n * @enum Material.BUILTIN_NAME\n */\nconst BUILTIN_NAME = cc.Enum({\n /**\n * @property SPRITE\n * @readonly\n * @type {String}\n */\n SPRITE: '2d-sprite',\n /**\n * @property GRAY_SPRITE\n * @readonly\n * @type {String}\n */\n GRAY_SPRITE: '2d-gray-sprite',\n /**\n * @property UNLIT\n * @readonly\n * @type {String}\n */\n UNLIT: 'unlit',\n});\n\n\n/**\n * !#en Material Asset.\n * !#zh 材质资源类。\n * @class Material\n * @extends Asset\n */\nlet Material = cc.Class({\n name: 'cc.Material',\n extends: Asset,\n\n ctor () {\n this.loaded = false;\n this._manualHash = false;\n this._dirty = true;\n this._effect = null;\n this._multiHandler = null;\n },\n\n properties: {\n // deprecated\n _defines: {\n default: undefined,\n type: Object\n },\n // deprecated\n _props: {\n default: undefined,\n type: Object\n },\n\n _effectAsset: {\n type: EffectAsset,\n default: null,\n },\n\n _techniqueIndex: 0,\n _techniqueData: Object,\n\n effectName: CC_EDITOR ? {\n get () {\n return this._effectAsset && this._effectAsset.name;\n },\n set (val) {\n let effectAsset = cc.assetManager.builtins.getBuiltin('effect', val);\n if (!effectAsset) {\n Editor.warn(`no effect named '${val}' found`);\n return;\n }\n this.effectAsset = effectAsset;\n }\n } : undefined,\n\n effectAsset: {\n get () {\n return this._effectAsset;\n },\n set (asset) {\n if (cc.game.renderType === cc.game.RENDER_TYPE_CANVAS) {\n return;\n }\n\n this._effectAsset = asset;\n if (!asset) {\n cc.error('Can not set an empty effect asset.');\n return;\n }\n\n this._effect = this._effectAsset.getInstantiatedEffect();\n\n this.updateMultiSupport();\n }\n },\n\n effect: {\n get () {\n return this._effect;\n }\n },\n\n techniqueIndex: {\n get () {\n return this._techniqueIndex;\n },\n set (v) {\n this._techniqueIndex = v;\n this._effect.switchTechnique(v);\n this.updateMultiSupport();\n }\n }\n },\n\n statics: {\n /**\n * !#en Get built-in materials\n * !#zh 获取内置材质\n * @static\n * @method getBuiltinMaterial\n * @param {string} name \n * @return {Material}\n */\n getBuiltinMaterial (name) {\n if (cc.game.renderType === cc.game.RENDER_TYPE_CANVAS) {\n return new cc.Material();\n }\n return cc.assetManager.builtins.getBuiltin('material', 'builtin-' + name);\n },\n\n BUILTIN_NAME,\n \n /**\n * !#en Creates a Material with builtin Effect.\n * !#zh 使用内建 Effect 创建一个材质。\n * @static\n * @method createWithBuiltin\n * @param {string} effectName \n * @param {number} [techniqueIndex] \n * @return {Material}\n */\n createWithBuiltin (effectName, techniqueIndex = 0) {\n let effectAsset = cc.assetManager.builtins.getBuiltin('effect', 'builtin-' + effectName);\n return Material.create(effectAsset, techniqueIndex);\n },\n /**\n * !#en Creates a Material.\n * !#zh 创建一个材质。\n * @static\n * @method create\n * @param {EffectAsset} effectAsset \n * @param {number} [techniqueIndex] \n * @return {Material}\n */\n create (effectAsset, techniqueIndex = 0) {\n if (!effectAsset) return null;\n let material = new Material();\n material.effectAsset = effectAsset;\n material.techniqueIndex = techniqueIndex;\n return material;\n }\n },\n\n /**\n * !#en Sets the Material property\n * !#zh 设置材质的属性\n * @method setProperty\n * @param {string} name\n * @param {Object} val\n * @param {number} [passIdx]\n * @param {boolean} [directly]\n */\n setProperty (name, val, passIdx, directly) {\n if (cc.game.renderType === cc.game.RENDER_TYPE_CANVAS) return;\n\n if (typeof passIdx === 'string') {\n passIdx = parseInt(passIdx);\n }\n\n if (val instanceof Texture) {\n let isAlphaAtlas = val.isAlphaAtlas();\n let key = 'CC_USE_ALPHA_ATLAS_' + name;\n let def = this.getDefine(key, passIdx);\n if (isAlphaAtlas || def) {\n this.define(key, isAlphaAtlas);\n }\n if (!val.loaded) {\n cc.assetManager.postLoadNative(val);\n }\n }\n\n this._effect.setProperty(name, val, passIdx, directly);\n },\n\n /**\n * !#en Gets the Material property.\n * !#zh 获取材质的属性。\n * @method getProperty\n * @param {string} name \n * @param {number} passIdx \n * @return {Object}\n */\n getProperty (name, passIdx) {\n if (typeof passIdx === 'string') {\n passIdx = parseInt(passIdx);\n }\n return this._effect.getProperty(name, passIdx);\n },\n\n /**\n * !#en Sets the Material define.\n * !#zh 设置材质的宏定义。\n * @method define\n * @param {string} name\n * @param {boolean|number} val\n * @param {number} [passIdx]\n * @param {boolean} [force]\n */\n define (name, val, passIdx, force) {\n if (cc.game.renderType === cc.game.RENDER_TYPE_CANVAS) return;\n\n if (typeof passIdx === 'string') {\n passIdx = parseInt(passIdx);\n }\n this._effect.define(name, val, passIdx, force);\n },\n\n /**\n * !#en Gets the Material define.\n * !#zh 获取材质的宏定义。\n * @method getDefine\n * @param {string} name \n * @param {number} [passIdx] \n * @return {boolean|number}\n */\n getDefine (name, passIdx) {\n if (typeof passIdx === 'string') {\n passIdx = parseInt(passIdx);\n }\n return this._effect.getDefine(name, passIdx);\n },\n\n /**\n * !#en Sets the Material cull mode.\n * !#zh 设置材质的裁减模式。\n * @method setCullMode\n * @param {number} cullMode \n * @param {number} passIdx \n */\n setCullMode (cullMode = gfx.CULL_BACK, passIdx) {\n this._effect.setCullMode(cullMode, passIdx);\n },\n\n /**\n * !#en Sets the Material depth states.\n * !#zh 设置材质的深度渲染状态。\n * @method setDepth\n * @param {boolean} depthTest \n * @param {boolean} depthWrite \n * @param {number} depthFunc \n * @param {number} passIdx \n */\n setDepth (\n depthTest = false,\n depthWrite = false,\n depthFunc = gfx.DS_FUNC_LESS,\n passIdx\n ) {\n this._effect.setDepth(depthTest, depthWrite, depthFunc, passIdx);\n },\n\n /**\n * !#en Sets the Material blend states.\n * !#zh 设置材质的混合渲染状态。\n * @method setBlend\n * @param {boolean} enabled \n * @param {number} blendEq \n * @param {number} blendSrc \n * @param {number} blendDst \n * @param {number} blendAlphaEq \n * @param {number} blendSrcAlpha \n * @param {number} blendDstAlpha \n * @param {number} blendColor \n * @param {number} passIdx \n */\n setBlend (\n enabled = false,\n blendEq = gfx.BLEND_FUNC_ADD,\n blendSrc = gfx.BLEND_SRC_ALPHA,\n blendDst = gfx.BLEND_ONE_MINUS_SRC_ALPHA,\n blendAlphaEq = gfx.BLEND_FUNC_ADD,\n blendSrcAlpha = gfx.BLEND_SRC_ALPHA,\n blendDstAlpha = gfx.BLEND_ONE_MINUS_SRC_ALPHA,\n blendColor = 0xffffffff,\n passIdx\n ) {\n this._effect.setBlend(enabled, blendEq, blendSrc, blendDst, blendAlphaEq, blendSrcAlpha, blendDstAlpha, blendColor, passIdx);\n },\n\n /**\n * !#en Sets whether enable the stencil test.\n * !#zh 设置是否开启模板测试。\n * @method setStencilEnabled\n * @param {number} stencilTest \n * @param {number} passIdx \n */\n setStencilEnabled (stencilTest = gfx.STENCIL_INHERIT, passIdx) {\n this._effect.setStencilEnabled(stencilTest, passIdx);\n },\n\n /**\n * !#en Sets the Material stencil render states.\n * !#zh 设置材质的模板测试渲染参数。\n * @method setStencil\n * @param {number} stencilTest \n * @param {number} stencilFunc \n * @param {number} stencilRef \n * @param {number} stencilMask \n * @param {number} stencilFailOp \n * @param {number} stencilZFailOp \n * @param {number} stencilZPassOp \n * @param {number} stencilWriteMask \n * @param {number} passIdx \n */\n setStencil (\n stencilTest = gfx.STENCIL_INHERIT,\n stencilFunc = gfx.DS_FUNC_ALWAYS,\n stencilRef = 0,\n stencilMask = 0xff,\n stencilFailOp = gfx.STENCIL_OP_KEEP,\n stencilZFailOp = gfx.STENCIL_OP_KEEP,\n stencilZPassOp = gfx.STENCIL_OP_KEEP,\n stencilWriteMask = 0xff,\n passIdx\n ) {\n this._effect.setStencil(stencilTest, stencilFunc, stencilRef, stencilMask, stencilFailOp, stencilZFailOp, stencilZPassOp, stencilWriteMask, passIdx);\n },\n\n updateHash (hash) {\n this._manualHash = hash;\n this._effect && this._effect.updateHash(hash);\n },\n\n getHash () {\n return this._manualHash || (this._effect && this._effect.getHash());\n },\n\n onLoad () {\n this.effectAsset = this._effectAsset;\n if (!this._effect) return;\n\n if (this._techniqueIndex) {\n this._effect.switchTechnique(this._techniqueIndex);\n }\n\n this._techniqueData = this._techniqueData || {};\n\n let passDatas = this._techniqueData;\n for (let index in passDatas) {\n index = parseInt(index);\n let passData = passDatas[index];\n if (!passData) continue;\n\n for (let def in passData.defines) {\n this.define(def, passData.defines[def], index);\n }\n for (let prop in passData.props) {\n this.setProperty(prop, passData.props[prop], index);\n }\n }\n\n this.updateMultiSupport();\n if (this._multiHandler) this._multiHandler.syncTextures();\n },\n\n updateMultiSupport() {\n const passes = this._effect.technique.passes;\n if (passes.length > 0 && passes[0].getDefine(\"USE_MULTI_TEXTURE\")) {\n this.setMultiSupport(true);\n } else {\n this.setMultiSupport(false);\n }\n },\n\n isMultiSupport() {\n return !!this._multiHandler;\n },\n\n setMultiSupport(bool) {\n if (bool) {\n if (this._multiHandler) {\n this._multiHandler.syncTextures();\n } else {\n this._multiHandler = new cc.sp.MultiHandler(this);\n }\n } else if (!bool) {\n this._multiHandler = null;\n }\n },\n\n getMultiHandler() {\n return this._multiHandler;\n },\n\n});\n\nexport default Material;\ncc.Material = Material;\n","import Pass from '../../../renderer/core/pass';\nimport enums from '../../../renderer/enums';\n\nconst gfx = cc.gfx;\n\nexport default class EffectBase {\n _dirty = true;\n\n _name = '';\n get name () {\n return this._name;\n }\n\n _technique = null;\n get technique () {\n return this._technique;\n }\n\n get passes (): Pass[] {\n return [];\n }\n\n _createPassProp (name, pass) {\n let prop = pass._properties[name];\n if (!prop) {\n return;\n }\n\n let uniform = Object.create(null);\n uniform.name = name;\n uniform.type = prop.type;\n if (prop.value instanceof Float32Array) {\n uniform.value = new Float32Array(prop.value);\n }\n else if (prop.value instanceof Float64Array) {\n uniform.value = new Float64Array(prop.value);\n }\n else {\n uniform.value = prop.value;\n }\n pass._properties[name] = uniform;\n\n return uniform;\n }\n\n _setPassProperty (name, value, pass, directly) {\n let properties = pass._properties;\n\n if (!properties.hasOwnProperty(name)) {\n this._createPassProp(name, pass);\n }\n\n let prop = properties[name];\n\n let compareValue = value;\n if (prop.type === enums.PARAM_TEXTURE_2D) {\n compareValue = value && value.getImpl();\n }\n\n if (prop.value === compareValue) {\n return true;\n }\n\n this._dirty = true;\n return Pass.prototype.setProperty.call(pass, name, value, directly);\n }\n\n setProperty (name, value, passIdx, directly) {\n let success = false;\n let passes = this.passes;\n let start = 0, end = passes.length;\n if (passIdx !== undefined) {\n start = passIdx, end = passIdx + 1;\n }\n for (let i = start; i < end; i++) {\n if (this._setPassProperty(name, value, passes[i], directly)) {\n success = true;\n }\n }\n if (!success) {\n cc.warnID(9103, this.name, name);\n }\n }\n\n getProperty (name, passIdx) {\n let passes = this.passes;\n if (passIdx >= passes.length) return;\n\n let start = 0, end = passes.length;\n if (passIdx !== undefined) {\n start = passIdx, end = passIdx + 1;\n }\n for (let i = start; i < end; i++) {\n let value = passes[i].getProperty(name);\n if (value !== undefined) {\n return value;\n }\n }\n }\n\n define (name, value, passIdx, force) {\n let success = false;\n let passes = this.passes;\n let start = 0, end = passes.length;\n if (passIdx !== undefined) {\n start = passIdx, end = passIdx + 1;\n }\n for (let i = start; i < end; i++) {\n if (passes[i].define(name, value, force)) {\n success = true;\n }\n }\n if (!success) {\n cc.warnID(9104, this.name, name);\n }\n }\n\n getDefine (name, passIdx) {\n let passes = this.passes;\n if (passIdx >= passes.length) return;\n let start = 0, end = passes.length;\n if (passIdx !== undefined) {\n start = passIdx, end = passIdx + 1;\n }\n for (let i = start; i < end; i++) {\n let value = passes[i].getDefine(name);\n if (value !== undefined) {\n return value;\n }\n }\n }\n\n setCullMode (cullMode = gfx.CULL_BACK, passIdx) {\n let passes = this.passes;\n let start = 0, end = passes.length;\n if (passIdx !== undefined) {\n start = passIdx, end = passIdx + 1;\n }\n for (let i = start; i < end; i++) {\n passes[i].setCullMode(cullMode);\n }\n this._dirty = true;\n }\n\n setDepth (depthTest, depthWrite, depthFunc, passIdx) {\n let passes = this.passes;\n let start = 0, end = passes.length;\n if (passIdx !== undefined) {\n start = passIdx, end = passIdx + 1;\n }\n for (let i = start; i < end; i++) {\n passes[i].setDepth(depthTest, depthWrite, depthFunc);\n }\n this._dirty = true;\n }\n\n setBlend (enabled, blendEq, blendSrc, blendDst, blendAlphaEq, blendSrcAlpha, blendDstAlpha, blendColor, passIdx) {\n let passes = this.passes;\n let start = 0, end = passes.length;\n if (passIdx !== undefined) {\n start = passIdx, end = passIdx + 1;\n }\n for (let i = start; i < end; i++) {\n passes[i].setBlend(\n enabled,\n blendEq,\n blendSrc, blendDst,\n blendAlphaEq,\n blendSrcAlpha, blendDstAlpha, blendColor\n );\n }\n this._dirty = true;\n }\n\n setStencilEnabled (stencilTest = gfx.STENCIL_INHERIT, passIdx) {\n let passes = this.passes;\n let start = 0, end = passes.length;\n if (passIdx !== undefined) {\n start = passIdx, end = passIdx + 1;\n }\n for (let i = start; i < end; i++) {\n passes[i].setStencilEnabled(stencilTest);\n }\n this._dirty = true;\n }\n\n setStencil (enabled, stencilFunc, stencilRef, stencilMask, stencilFailOp, stencilZFailOp, stencilZPassOp, stencilWriteMask, passIdx) {\n let passes = this.passes;\n let start = 0, end = passes.length;\n if (passIdx !== undefined) {\n start = passIdx, end = passIdx + 1;\n }\n for (let i = start; i < end; i++) {\n let pass = passes[i];\n pass.setStencilFront(enabled, stencilFunc, stencilRef, stencilMask, stencilFailOp, stencilZFailOp, stencilZPassOp, stencilWriteMask);\n pass.setStencilBack(enabled, stencilFunc, stencilRef, stencilMask, stencilFailOp, stencilZFailOp, stencilZPassOp, stencilWriteMask);\n }\n this._dirty = true;\n }\n}\n\ncc.EffectBase = EffectBase;\n","import Pass from '../../../renderer/core/pass';\nimport { getInspectorProps, enums2default } from '../../../renderer/types';\nimport enums from '../../../renderer/enums';\nimport Effect from './effect';\nimport Technique from '../../../renderer/core/technique';\n\nfunction getInvolvedProgram (programName) {\n let lib = cc.renderer._forward._programLib;\n return lib.getTemplate(programName);\n}\n\n// extract properties from each passes and check whether properties is defined but not used.\nfunction parseProperties (effectAsset, passJson) {\n let propertiesJson = passJson.properties || {};\n let program = getInvolvedProgram(passJson.program);\n\n // check whether properties are defined in the shaders \n for (let prop in propertiesJson) {\n let uniformInfo = program.uniforms.find(u => u.name === prop);\n // the property is not defined in all the shaders used in techs\n if (!uniformInfo) {\n cc.warnID(9107, effectAsset.name, prop);\n continue;\n }\n }\n\n // create properties\n let properties = {};\n program.uniforms.forEach(u => {\n let name = u.name,\n prop = properties[name] = Object.assign({}, u),\n propInfo = propertiesJson[name];\n\n let value;\n if (propInfo) {\n if (propInfo.type === enums.PARAM_TEXTURE_2D) {\n value = null;\n }\n else if (propInfo.type === enums.PARAM_INT || propInfo.type === enums.PARAM_FLOAT) {\n value = Array.isArray(propInfo.value) ? propInfo.value[0] : propInfo.value;\n }\n else {\n value = new Float32Array(propInfo.value);\n }\n }\n else {\n value = enums2default[u.type];\n }\n\n if (value === undefined) {\n value = null;\n }\n\n prop.value = value;\n });\n\n return properties;\n};\n\nfunction passDefines (pass) {\n let defines = {};\n let program = getInvolvedProgram(pass.program);\n program.defines.forEach(d => {\n defines[d.name] = enums2default[d.type];\n })\n return defines;\n}\n\nfunction parseTechniques (effectAsset) {\n let techNum = effectAsset.techniques.length;\n let techniques = new Array(techNum);\n for (let j = 0; j < techNum; ++j) {\n let tech = effectAsset.techniques[j];\n let techName = tech.name || j;\n\n let passNum = tech.passes.length;\n let passes = new Array(passNum);\n for (let k = 0; k < passNum; ++k) {\n let pass = tech.passes[k];\n\n let passName = pass.name || k;\n let detailName = `${effectAsset.name}-${techName}-${passName}`;\n let stage = pass.stage || 'opaque';\n let properties = parseProperties(effectAsset, pass);\n let defines = passDefines(pass);\n\n let newPass = passes[k] = new Pass(passName, detailName, pass.program, stage, properties, defines);\n\n // rasterizer state\n if (pass.rasterizerState) {\n newPass.setCullMode(pass.rasterizerState.cullMode);\n }\n\n // blend state\n let blendState = pass.blendState && pass.blendState.targets[0];\n if (blendState) {\n newPass.setBlend(blendState.blend, blendState.blendEq, blendState.blendSrc,\n blendState.blendDst, blendState.blendAlphaEq, blendState.blendSrcAlpha, blendState.blendDstAlpha, blendState.blendColor);\n }\n\n // depth stencil state\n let depthStencilState = pass.depthStencilState;\n if (depthStencilState) {\n newPass.setDepth(depthStencilState.depthTest, depthStencilState.depthWrite, depthStencilState.depthFunc);\n newPass.setStencilFront(depthStencilState.stencilTest, depthStencilState.stencilFuncFront, depthStencilState.stencilRefFront, depthStencilState.stencilMaskFront,\n depthStencilState.stencilFailOpFront, depthStencilState.stencilZFailOpFront, depthStencilState.stencilZPassOpFront, depthStencilState.stencilWriteMaskFront);\n newPass.setStencilBack(depthStencilState.stencilTest, depthStencilState.stencilFuncBack, depthStencilState.stencilRefBack, depthStencilState.stencilMaskBack,\n depthStencilState.stencilFailOpBack, depthStencilState.stencilZFailOpBack, depthStencilState.stencilZPassOpBack, depthStencilState.stencilWriteMaskBack);\n }\n }\n techniques[j] = new Technique(techName, passes);\n }\n\n return techniques;\n};\n\nexport function parseEffect (effect) {\n let techniques = parseTechniques(effect);\n return new Effect(effect.name, techniques, 0, effect);\n};\n\nif (CC_EDITOR) {\n // inspector only need properties defined in CCEffect\n Effect.parseForInspector = function (effectAsset) {\n return effectAsset.techniques.map((tech, techIdx) => {\n let passes = tech.passes.map((pass, passIdx) => {\n let program = getInvolvedProgram(pass.program);\n\n let newProps = {};\n let props = pass.properties;\n for (let name in props) {\n newProps[name] = getInspectorProps(props[name]);\n \n let u = program.uniforms.find(u => u.name === name);\n newProps[name].defines = u.defines || [];\n }\n\n let newDefines = {};\n program.defines.map(def => {\n newDefines[def.name] = getInspectorProps(def);\n })\n\n return {\n name: pass.name || passIdx,\n props: newProps,\n defines: newDefines,\n };\n })\n\n return {\n name: tech.name || techIdx,\n passes: passes,\n };\n })\n };\n}\n","import murmurhash2 from '../../../renderer/murmurhash2_gc';\nimport utils from './utils';\nimport Pass from '../../../renderer/core/pass';\nimport Effect from './effect';\nimport EffectBase from './effect-base';\n\nconst gfx = cc.gfx;\n\nexport default class EffectVariant extends EffectBase {\n _effect: Effect;\n _passes: Pass[] = [];\n _stagePasses = {};\n _hash = 0;\n\n get effect () {\n return this._effect;\n }\n\n get name () {\n return this._effect && (this._effect.name + ' (variant)');\n }\n\n get passes () {\n return this._passes;\n }\n\n get stagePasses () {\n return this._stagePasses;\n }\n\n constructor (effect: Effect) {\n super();\n this.init(effect);\n }\n\n _onEffectChanged () {\n }\n\n init (effect: Effect) {\n if (effect instanceof EffectVariant) {\n effect = effect.effect;\n }\n\n this._effect = effect;\n this._dirty = true;\n \n if (effect) {\n let passes = effect.passes;\n let variantPasses = this._passes;\n variantPasses.length = 0;\n let stagePasses = this._stagePasses = {};\n for (let i = 0; i < passes.length; i++) {\n let variant = variantPasses[i] = Object.setPrototypeOf({}, passes[i]);\n variant._properties = Object.setPrototypeOf({}, passes[i]._properties);\n variant._defines = Object.setPrototypeOf({}, passes[i]._defines);\n\n if (!stagePasses[variant._stage]) {\n stagePasses[variant._stage] = [];\n }\n stagePasses[variant._stage].push(variant);\n }\n }\n }\n\n updateHash (hash: number) {\n\n }\n\n getHash () {\n if (!this._dirty) return this._hash;\n this._dirty = false;\n\n let hash = '';\n hash += utils.serializePasses(this._passes);\n\n let effect = this._effect;\n if (effect) {\n hash += effect._id;\n }\n\n this._hash = murmurhash2(hash, 666);\n\n this.updateHash(this._hash);\n\n return this._hash;\n }\n}\n\ncc.EffectVariant = EffectVariant;\n","// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\nimport Technique from '../../../renderer/core/technique';\nimport EffectBase from './effect-base';\n\nexport default class Effect extends EffectBase {\n\n _techniques: Technique[] = [];\n _asset = null;\n static id = 0;\n _id = '';\n \n get technique () {\n return this._technique;\n }\n\n get passes () {\n return this._technique.passes;\n }\n\n /**\n * @param {Array} techniques\n */\n constructor (name, techniques, techniqueIndex, asset) {\n super();\n this.init(name, techniques, techniqueIndex, asset, true);\n this._id = '|' + Effect.id++;\n }\n\n init (name, techniques, techniqueIndex, asset, createNative) {\n this._name = name;\n this._techniques = techniques;\n this._technique = techniques[techniqueIndex];\n this._asset = asset;\n }\n\n switchTechnique (index) {\n if (index >= this._techniques.length) {\n cc.warn(`Can not switch to technique with index [${index}]`);\n return;\n }\n\n this._technique = this._techniques[index];\n }\n\n clear () {\n this._techniques = [];\n }\n\n clone () {\n let techniques = [];\n for (let i = 0; i < this._techniques.length; i++) {\n techniques.push(this._techniques[i].clone());\n }\n\n let techniqueIndex = this._techniques.indexOf(this._technique);\n return new Effect(this._name, techniques, techniqueIndex, this._asset);\n }\n}\n\ncc.Effect = Effect;\n","import './CCEffectAsset';\nimport './CCMaterial';\nimport './material-variant';\n","import utils from './utils';\nimport Pool from '../../utils/pool';\n\n/**\n * {\n * effectUuid: {\n * defineSerializeKey: []\n * }\n * }\n */\nclass MaterialPool extends Pool {\n // default disabled material pool\n enabled = false;\n \n _pool = {};\n\n get (exampleMat, renderComponent) {\n let pool = this._pool;\n\n if (exampleMat instanceof cc.MaterialVariant) {\n if (exampleMat._owner) {\n if (exampleMat._owner === renderComponent) {\n return exampleMat;\n }\n else {\n exampleMat = exampleMat.material;\n }\n }\n else {\n exampleMat._owner = renderComponent;\n return exampleMat;\n }\n }\n\n let instance;\n if (this.enabled) {\n let uuid = exampleMat.effectAsset._uuid;\n if (pool[uuid]) {\n let key = \n utils.serializeDefines(exampleMat._effect._defines) +\n utils.serializeTechniques(exampleMat._effect._techniques);\n instance = pool[uuid][key] && pool[uuid][key].pop();\n }\n }\n \n if (!instance) {\n instance = new cc.MaterialVariant(exampleMat);\n instance._name = exampleMat._name + ' (Instance)';\n instance._uuid = exampleMat._uuid;\n }\n else {\n this.count--;\n }\n \n instance._owner = renderComponent;\n \n return instance;\n }\n \n put (mat) {\n if (!this.enabled || !mat._owner) {\n return;\n }\n\n let pool = this._pool;\n let uuid = mat.effectAsset._uuid;\n if (!pool[uuid]) {\n pool[uuid] = {};\n }\n let key = \n utils.serializeDefines(mat._effect._defines) +\n utils.serializeTechniques(mat._effect._techniques);\n if (!pool[uuid][key]) {\n pool[uuid][key] = [];\n }\n if (this.count > this.maxSize) return;\n\n this._clean(mat);\n pool[uuid][key].push(mat);\n this.count++;\n }\n\n clear () {\n this._pool = {};\n this.count = 0;\n }\n\n _clean (mat) {\n mat._owner = null;\n }\n}\n\nlet materialPool = new MaterialPool();\nPool.register('material', materialPool);\nexport default materialPool;\n","\nimport Material from './CCMaterial';\nimport EffectVariant from './effect-variant';\nimport MaterialPool from './material-pool';\n\nlet { ccclass, } = cc._decorator;\n\n/**\n * !#en\n * Material Variant is an extension of the Material Asset.\n * Changes to Material Variant do not affect other Material Variant or Material Asset,\n * and changes to Material Asset are synchronized to the Material Variant.\n * However, when a Material Variant had already modifies a state, the Material Asset state is not synchronized to the Material Variant.\n * !#zh\n * 材质变体是材质资源的一个延伸。\n * 材质变体的修改不会影响到其他的材质变体或者材质资源,而材质资源的修改会同步体现到材质变体上,\n * 但是当材质变体对一个状态修改后,材质资源再对这个状态修改是不会同步到材质变体上的。\n * @class MaterialVariant\n * @extends Material\n */\n@ccclass('cc.MaterialVariant')\nexport default class MaterialVariant extends Material {\n _owner: cc.RenderComponent = null;\n _material: Material = null;\n\n /**\n * @method createWithBuiltin\n * @param {Material.BUILTIN_NAME} materialName\n * @param {RenderComponent} [owner]\n * @typescript\n * static createWithBuiltin (materialName: string, owner: cc.RenderComponent): MaterialVariant | null\n */\n static createWithBuiltin (materialName: string, owner: cc.RenderComponent): MaterialVariant | null {\n return MaterialVariant.create(Material.getBuiltinMaterial(materialName), owner);\n }\n\n /**\n * @method create\n * @param {Material} material\n * @param {RenderComponent} [owner]\n * @typescript\n * static create (material: Material, owner: cc.RenderComponent): MaterialVariant | null\n */\n static create (material: Material, owner: cc.RenderComponent): MaterialVariant | null {\n if (!material) return null;\n return MaterialPool.get(material, owner);\n }\n\n get uuid () {\n return this._material._uuid;\n }\n\n get owner () {\n return this._owner;\n }\n\n get material () {\n return this._material;\n }\n\n constructor (material: Material) {\n super();\n this.init(material);\n }\n\n init (material) {\n this._effect = new EffectVariant(material.effect);\n this._effectAsset = material._effectAsset;\n this._material = material;\n }\n}\n\ncc.MaterialVariant = MaterialVariant;\n","// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. \n\nimport enums from '../../../renderer/enums';\n\n// function genHashCode (str) {\n// var hash = 0;\n// if (str.length == 0) {\n// return hash;\n// }\n// for (var i = 0; i < str.length; i++) {\n// var char = str.charCodeAt(i);\n// hash = ((hash<<5)-hash)+char;\n// hash = hash & hash; // Convert to 32bit integer\n// }\n// return hash;\n// }\n\nconst hashArray = [];\n\nfunction serializeDefines (defines, names) {\n let i = 0;\n for (const name in defines) {\n if (Object.hasOwnProperty.call(defines, name)) {\n hashArray[i] = name + defines[name];\n i++;\n }\n }\n hashArray.length = i;\n return hashArray.join('');\n}\n\nfunction serializePass (pass, excludeProperties) {\n let str = pass._programName + pass._cullMode;\n if (pass._blend) {\n str += pass._blendEq + pass._blendAlphaEq + pass._blendSrc + pass._blendDst\n + pass._blendSrcAlpha + pass._blendDstAlpha + pass._blendColor;\n }\n if (pass._depthTest) {\n str += pass._depthWrite + pass._depthFunc;\n }\n if (pass._stencilTest) {\n str += pass._stencilFuncFront + pass._stencilRefFront + pass._stencilMaskFront\n + pass._stencilFailOpFront + pass._stencilZFailOpFront + pass._stencilZPassOpFront\n + pass._stencilWriteMaskFront\n + pass._stencilFuncBack + pass._stencilRefBack + pass._stencilMaskBack\n + pass._stencilFailOpBack + pass._stencilZFailOpBack + pass._stencilZPassOpBack\n + pass._stencilWriteMaskBack;\n }\n\n if (!excludeProperties) {\n str += serializeUniforms(pass._properties, pass._propertyNames);\n }\n str += serializeDefines(pass._defines, pass._defineNames);\n\n return str;\n}\n\nfunction serializePasses (passes) {\n let hashData = '';\n for (let i = 0; i < passes.length; i++) {\n hashData += serializePass(passes[i]);\n }\n return hashData;\n}\n\nfunction serializeUniforms (uniforms, names) {\n let index = 0;\n for (const name in uniforms) {\n if (Object.hasOwnProperty.call(uniforms, name)) {\n const param = uniforms[name];\n let prop = param.value;\n\n if (!prop) {\n continue;\n }\n\n if (param.type === enums.PARAM_TEXTURE_2D || param.type === enums.PARAM_TEXTURE_CUBE) {\n hashArray[index] = prop._id;\n }\n else {\n hashArray[index] = prop.toString();\n }\n index++;\n }\n }\n hashArray.length = index;\n return hashArray.join(';');\n}\n\nexport default {\n serializeDefines,\n serializePasses,\n serializeUniforms\n};\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar Event;\n\n// Support serializing widget in asset db, see cocos-creator/2d-tasks/issues/1894\nif (!CC_EDITOR || !Editor.isMainProcess) {\n Event = require('../CCNode').EventType;\n}\n\nvar TOP = 1 << 0;\nvar MID = 1 << 1; // vertical center\nvar BOT = 1 << 2;\nvar LEFT = 1 << 3;\nvar CENTER = 1 << 4; // horizontal center\nvar RIGHT = 1 << 5;\nvar HORIZONTAL = LEFT | CENTER | RIGHT;\nvar VERTICAL = TOP | MID | BOT;\n\nvar AlignMode = cc.Enum({\n ONCE: 0,\n ON_WINDOW_RESIZE: 1,\n ALWAYS: 2,\n});\n\n// returns a readonly size of the node\nfunction getReadonlyNodeSize (parent) {\n if (parent instanceof cc.Scene) {\n return CC_EDITOR ? cc.engine.getDesignResolutionSize() : cc.visibleRect;\n }\n else {\n return parent._contentSize;\n }\n}\n\nfunction computeInverseTransForTarget (widgetNode, target, out_inverseTranslate, out_inverseScale) {\n var scaleX = widgetNode._parent.scaleX;\n var scaleY = widgetNode._parent.scaleY;\n var translateX = 0;\n var translateY = 0;\n for (var node = widgetNode._parent;;) {\n translateX += node.x;\n translateY += node.y;\n node = node._parent; // loop increment\n if (!node) {\n // ERROR: widgetNode should be child of target\n out_inverseTranslate.x = out_inverseTranslate.y = 0;\n out_inverseScale.x = out_inverseScale.y = 1;\n return;\n }\n if (node !== target) {\n var sx = node.scaleX;\n var sy = node.scaleY;\n translateX *= sx;\n translateY *= sy;\n scaleX *= sx;\n scaleY *= sy;\n }\n else {\n break;\n }\n }\n out_inverseScale.x = scaleX !== 0 ? (1 / scaleX) : 1;\n out_inverseScale.y = scaleY !== 0 ? (1 / scaleY) : 1;\n out_inverseTranslate.x = -translateX;\n out_inverseTranslate.y = -translateY;\n}\n\nvar tInverseTranslate = cc.Vec2.ZERO;\nvar tInverseScale = cc.Vec2.ONE;\n\n// align to borders by adjusting node's position and size (ignore rotation)\nfunction align (node, widget) {\n var hasTarget = widget._target;\n var target;\n var inverseTranslate, inverseScale;\n if (hasTarget) {\n target = hasTarget;\n inverseTranslate = tInverseTranslate;\n inverseScale = tInverseScale;\n computeInverseTransForTarget(node, target, inverseTranslate, inverseScale);\n }\n else {\n target = node._parent;\n }\n var targetSize = getReadonlyNodeSize(target);\n var targetAnchor = target._anchorPoint;\n\n var isRoot = !CC_EDITOR && target instanceof cc.Scene;\n var x = node.x, y = node.y;\n var anchor = node._anchorPoint;\n\n if (widget._alignFlags & HORIZONTAL) {\n\n var localLeft, localRight, targetWidth = targetSize.width;\n if (isRoot) {\n localLeft = cc.visibleRect.left.x;\n localRight = cc.visibleRect.right.x;\n }\n else {\n localLeft = -targetAnchor.x * targetWidth;\n localRight = localLeft + targetWidth;\n }\n\n // adjust borders according to offsets\n localLeft += widget._isAbsLeft ? widget._left : widget._left * targetWidth;\n localRight -= widget._isAbsRight ? widget._right : widget._right * targetWidth;\n\n if (hasTarget) {\n localLeft += inverseTranslate.x;\n localLeft *= inverseScale.x;\n localRight += inverseTranslate.x;\n localRight *= inverseScale.x;\n }\n\n var width, anchorX = anchor.x, scaleX = node.scaleX;\n if (scaleX < 0) {\n anchorX = 1.0 - anchorX;\n scaleX = -scaleX;\n }\n if (widget.isStretchWidth) {\n width = localRight - localLeft;\n if (scaleX !== 0) {\n node.width = width / scaleX;\n }\n x = localLeft + anchorX * width;\n }\n else {\n width = node.width * scaleX;\n if (widget.isAlignHorizontalCenter) {\n var localHorizontalCenter = widget._isAbsHorizontalCenter ? widget._horizontalCenter : widget._horizontalCenter * targetWidth;\n var targetCenter = (0.5 - targetAnchor.x) * targetSize.width;\n if (hasTarget) {\n localHorizontalCenter *= inverseScale.x;\n targetCenter += inverseTranslate.x;\n targetCenter *= inverseScale.x;\n }\n x = targetCenter + (anchorX - 0.5) * width + localHorizontalCenter;\n }\n else if (widget.isAlignLeft) {\n x = localLeft + anchorX * width;\n }\n else {\n x = localRight + (anchorX - 1) * width;\n }\n }\n }\n\n if (widget._alignFlags & VERTICAL) {\n\n var localTop, localBottom, targetHeight = targetSize.height;\n if (isRoot) {\n localBottom = cc.visibleRect.bottom.y;\n localTop = cc.visibleRect.top.y;\n }\n else {\n localBottom = -targetAnchor.y * targetHeight;\n localTop = localBottom + targetHeight;\n }\n\n // adjust borders according to offsets\n localBottom += widget._isAbsBottom ? widget._bottom : widget._bottom * targetHeight;\n localTop -= widget._isAbsTop ? widget._top : widget._top * targetHeight;\n\n if (hasTarget) {\n // transform\n localBottom += inverseTranslate.y;\n localBottom *= inverseScale.y;\n localTop += inverseTranslate.y;\n localTop *= inverseScale.y;\n }\n\n var height, anchorY = anchor.y, scaleY = node.scaleY;\n if (scaleY < 0) {\n anchorY = 1.0 - anchorY;\n scaleY = -scaleY;\n }\n if (widget.isStretchHeight) {\n height = localTop - localBottom;\n if (scaleY !== 0) {\n node.height = height / scaleY;\n }\n y = localBottom + anchorY * height;\n }\n else {\n height = node.height * scaleY;\n if (widget.isAlignVerticalCenter) {\n var localVerticalCenter = widget._isAbsVerticalCenter ? widget._verticalCenter : widget._verticalCenter * targetHeight;\n var targetMiddle = (0.5 - targetAnchor.y) * targetSize.height;\n if (hasTarget) {\n localVerticalCenter *= inverseScale.y;\n targetMiddle += inverseTranslate.y;\n targetMiddle *= inverseScale.y;\n }\n y = targetMiddle + (anchorY - 0.5) * height + localVerticalCenter;\n }\n else if (widget.isAlignBottom) {\n y = localBottom + anchorY * height;\n }\n else {\n y = localTop + (anchorY - 1) * height;\n }\n }\n }\n\n node.setPosition(x, y);\n}\n\nfunction visitNode (node) {\n var widget = node._widget;\n if (widget) {\n if (CC_DEV) {\n widget._validateTargetInDEV();\n }\n align(node, widget);\n if ((!CC_EDITOR || animationState.animatedSinceLastFrame) && widget.alignMode !== AlignMode.ALWAYS) {\n widgetManager.remove(widget);\n }\n else {\n activeWidgets.push(widget);\n }\n }\n var children = node._children;\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (child._active) {\n visitNode(child);\n }\n }\n}\n\nif (CC_EDITOR) {\n var animationState = {\n previewing: false,\n time: 0,\n animatedSinceLastFrame: false,\n };\n}\n\nfunction refreshScene () {\n // check animation editor\n if (CC_EDITOR && !Editor.isBuilder) {\n var AnimUtils = Editor.require('scene://utils/animation');\n var EditMode = Editor.require('scene://edit-mode');\n if (AnimUtils && EditMode) {\n var nowPreviewing = (EditMode.curMode().name === 'animation' && !!AnimUtils.Cache.animation);\n if (nowPreviewing !== animationState.previewing) {\n animationState.previewing = nowPreviewing;\n if (nowPreviewing) {\n animationState.animatedSinceLastFrame = true;\n let component = cc.engine.getInstanceById(AnimUtils.Cache.component);\n if (component) {\n let animation = component.getAnimationState(AnimUtils.Cache.animation);\n if (animation) {\n animationState.time = animation.time;\n }\n }\n }\n else {\n animationState.animatedSinceLastFrame = false;\n }\n }\n else if (nowPreviewing) {\n let component = cc.engine.getInstanceById(AnimUtils.Cache.component);\n if (component) {\n let animation = component.getAnimationState(AnimUtils.Cache.animation);\n if (animation && animationState.time !== animation.time) {\n animationState.animatedSinceLastFrame = true;\n animationState.time = AnimUtils.Cache.animation.time;\n }\n }\n }\n }\n }\n\n var scene = cc.director.getScene();\n if (scene) {\n widgetManager.isAligning = true;\n if (widgetManager._nodesOrderDirty) {\n activeWidgets.length = 0;\n visitNode(scene);\n widgetManager._nodesOrderDirty = false;\n }\n else {\n var i, widget, iterator = widgetManager._activeWidgetsIterator;\n var AnimUtils;\n if (CC_EDITOR &&\n (AnimUtils = Editor.require('scene://utils/animation')) &&\n AnimUtils.Cache.animation) {\n var editingNode = cc.engine.getInstanceById(AnimUtils.Cache.rNode);\n if (editingNode) {\n for (i = activeWidgets.length - 1; i >= 0; i--) {\n widget = activeWidgets[i];\n var node = widget.node;\n if (widget.alignMode !== AlignMode.ALWAYS &&\n animationState.animatedSinceLastFrame &&\n node.isChildOf(editingNode)\n ) {\n // widget contains in activeWidgets should aligned at least once\n widgetManager.remove(widget);\n }\n else {\n align(node, widget);\n }\n }\n }\n }\n else {\n // loop reversely will not help to prevent out of sync\n // because user may remove more than one item during a step.\n for (iterator.i = 0; iterator.i < activeWidgets.length; ++iterator.i) {\n widget = activeWidgets[iterator.i];\n align(widget.node, widget);\n }\n }\n }\n widgetManager.isAligning = false;\n }\n\n // check animation editor\n if (CC_EDITOR) {\n animationState.animatedSinceLastFrame = false;\n }\n}\n\nvar adjustWidgetToAllowMovingInEditor = CC_EDITOR && function (oldPos) {\n if (widgetManager.isAligning) {\n return;\n }\n var newPos = this.node.position;\n var delta = newPos.sub(oldPos);\n\n var target = this.node._parent;\n var inverseScale = cc.Vec2.ONE;\n\n if (this._target) {\n target = this._target;\n computeInverseTransForTarget(this.node, target, new cc.Vec2(), inverseScale);\n }\n\n var targetSize = getReadonlyNodeSize(target);\n var deltaInPercent;\n if (targetSize.width !== 0 && targetSize.height !== 0) {\n deltaInPercent = new cc.Vec2(delta.x / targetSize.width, delta.y / targetSize.height);\n }\n else {\n deltaInPercent = cc.Vec2.ZERO;\n }\n\n if (this.isAlignTop) {\n this.top -= (this.isAbsoluteTop ? delta.y : deltaInPercent.y) * inverseScale.y;\n }\n if (this.isAlignBottom) {\n this.bottom += (this.isAbsoluteBottom ? delta.y : deltaInPercent.y) * inverseScale.y;\n }\n if (this.isAlignLeft) {\n this.left += (this.isAbsoluteLeft ? delta.x : deltaInPercent.x) * inverseScale.x;\n }\n if (this.isAlignRight) {\n this.right -= (this.isAbsoluteRight ? delta.x : deltaInPercent.x) * inverseScale.x;\n }\n if (this.isAlignHorizontalCenter) {\n this.horizontalCenter += (this.isAbsoluteHorizontalCenter ? delta.x : deltaInPercent.x) * inverseScale.x;\n }\n if (this.isAlignVerticalCenter) {\n this.verticalCenter += (this.isAbsoluteVerticalCenter ? delta.y : deltaInPercent.y) * inverseScale.y;\n }\n};\n\nvar adjustWidgetToAllowResizingInEditor = CC_EDITOR && function (oldSize) {\n if (widgetManager.isAligning) {\n return;\n }\n var newSize = this.node.getContentSize();\n var delta = cc.v2(newSize.width - oldSize.width, newSize.height - oldSize.height);\n\n var target = this.node._parent;\n var inverseScale = cc.Vec2.ONE;\n if (this._target) {\n target = this._target;\n computeInverseTransForTarget(this.node, target, new cc.Vec2(), inverseScale);\n }\n\n var targetSize = getReadonlyNodeSize(target);\n var deltaInPercent;\n if (targetSize.width !== 0 && targetSize.height !== 0) {\n deltaInPercent = new cc.Vec2(delta.x / targetSize.width, delta.y / targetSize.height);\n }\n else {\n deltaInPercent = cc.Vec2.ZERO;\n }\n\n var anchor = this.node._anchorPoint;\n\n if (this.isAlignTop) {\n this.top -= (this.isAbsoluteTop ? delta.y : deltaInPercent.y) * (1 - anchor.y) * inverseScale.y;\n }\n if (this.isAlignBottom) {\n this.bottom -= (this.isAbsoluteBottom ? delta.y : deltaInPercent.y) * anchor.y * inverseScale.y;\n }\n if (this.isAlignLeft) {\n this.left -= (this.isAbsoluteLeft ? delta.x : deltaInPercent.x) * anchor.x * inverseScale.x;\n }\n if (this.isAlignRight) {\n this.right -= (this.isAbsoluteRight ? delta.x : deltaInPercent.x) * (1 - anchor.x) * inverseScale.x;\n }\n};\n\nvar activeWidgets = [];\n\n// updateAlignment from scene to node recursively\nfunction updateAlignment (node) {\n var parent = node._parent;\n if (cc.Node.isNode(parent)) {\n updateAlignment(parent);\n }\n var widget = node._widget ||\n node.getComponent(cc.Widget); // node._widget will be null when widget is disabled\n if (widget && parent) {\n align(node, widget);\n }\n}\n\nvar widgetManager = cc._widgetManager = module.exports = {\n _AlignFlags: {\n TOP: TOP,\n MID: MID, // vertical center\n BOT: BOT,\n LEFT: LEFT,\n CENTER: CENTER, // horizontal center\n RIGHT: RIGHT\n },\n isAligning: false,\n _nodesOrderDirty: false,\n _activeWidgetsIterator: new cc.js.array.MutableForwardIterator(activeWidgets),\n\n init: function (director) {\n director.on(cc.Director.EVENT_AFTER_UPDATE, refreshScene);\n\n if (CC_EDITOR && cc.engine) {\n cc.engine.on('design-resolution-changed', this.onResized.bind(this));\n }\n else {\n let thisOnResized = this.onResized.bind(this);\n cc.view.on('canvas-resize', thisOnResized);\n window.addEventListener('orientationchange', thisOnResized);\n }\n },\n add: function (widget) {\n widget.node._widget = widget;\n this._nodesOrderDirty = true;\n if (CC_EDITOR && !cc.engine.isPlaying) {\n widget.node.on(Event.POSITION_CHANGED, adjustWidgetToAllowMovingInEditor, widget);\n widget.node.on(Event.SIZE_CHANGED, adjustWidgetToAllowResizingInEditor, widget);\n }\n },\n remove: function (widget) {\n widget.node._widget = null;\n this._activeWidgetsIterator.remove(widget);\n if (CC_EDITOR && !cc.engine.isPlaying) {\n widget.node.off(Event.POSITION_CHANGED, adjustWidgetToAllowMovingInEditor, widget);\n widget.node.off(Event.SIZE_CHANGED, adjustWidgetToAllowResizingInEditor, widget);\n }\n },\n onResized () {\n var scene = cc.director.getScene();\n if (scene) {\n this.refreshWidgetOnResized(scene);\n }\n },\n refreshWidgetOnResized (node) {\n var widget = cc.Node.isNode(node) && node.getComponent(cc.Widget);\n if (widget && widget.enabled && widget.alignMode === AlignMode.ON_WINDOW_RESIZE) {\n this.add(widget);\n }\n\n var children = node._children;\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n this.refreshWidgetOnResized(child);\n }\n },\n updateAlignment: updateAlignment,\n AlignMode: AlignMode,\n};\n\nif (CC_EDITOR) {\n module.exports._computeInverseTransForTarget = computeInverseTransForTarget;\n module.exports._getReadonlyNodeSize = getReadonlyNodeSize;\n}\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport { Mat4, Vec2, Vec3 } from '../value-types';\nimport { Ray } from '../geom-utils';\n\nconst AffineTrans = require('../utils/affine-transform');\nconst renderer = require('../renderer/index');\nconst RenderFlow = require('../renderer/render-flow');\nconst game = require('../CCGame');\n\nlet RendererCamera = null;\nif (CC_JSB && CC_NATIVERENDERER) {\n RendererCamera = window.renderer.Camera;\n} else {\n RendererCamera = require('../../renderer/scene/camera');\n}\n\nlet _mat4_temp_1 = cc.mat4();\nlet _mat4_temp_2 = cc.mat4();\n\nlet _v3_temp_1 = cc.v3();\nlet _v3_temp_2 = cc.v3();\nlet _v3_temp_3 = cc.v3();\n\nlet _cameras = []; // unstable array\n\nfunction updateMainCamera () {\n for (let i = 0, minDepth = Number.MAX_VALUE; i < _cameras.length; i++) {\n let camera = _cameras[i];\n if (camera._depth < minDepth) {\n Camera.main = camera;\n minDepth = camera._depth;\n }\n }\n}\n\nlet _debugCamera = null;\n\nfunction repositionDebugCamera () {\n if (!_debugCamera) return;\n\n let node = _debugCamera.getNode();\n let canvas = cc.game.canvas;\n node.z = canvas.height / 1.1566;\n node.x = canvas.width / 2;\n node.y = canvas.height / 2;\n}\n\n/**\n * !#en Values for Camera.clearFlags, determining what to clear when rendering a Camera.\n * !#zh 摄像机清除标记位,决定摄像机渲染时会清除哪些状态\n * @enum Camera.ClearFlags\n */\nlet ClearFlags = cc.Enum({\n /**\n * !#en\n * Clear the background color.\n * !#zh\n * 清除背景颜色\n * @property COLOR\n */\n COLOR: 1,\n /**\n * !#en\n * Clear the depth buffer.\n * !#zh\n * 清除深度缓冲区\n * @property DEPTH\n */\n DEPTH: 2,\n /**\n * !#en\n * Clear the stencil.\n * !#zh\n * 清除模板缓冲区\n * @property STENCIL\n */\n STENCIL: 4,\n});\n\nlet StageFlags = cc.Enum({\n OPAQUE: 1,\n TRANSPARENT: 2\n});\n\n/**\n * !#en\n * Camera is usefull when making reel game or other games which need scroll screen.\n * Using camera will be more efficient than moving node to scroll screen.\n * Camera \n * !#zh\n * 摄像机在制作卷轴或是其他需要移动屏幕的游戏时比较有用,使用摄像机将会比移动节点来移动屏幕更加高效。\n * @class Camera\n * @extends Component\n */\nlet Camera = cc.Class({\n name: 'cc.Camera',\n extends: cc.Component,\n\n ctor () {\n if (game.renderType !== game.RENDER_TYPE_CANVAS) {\n let camera = new RendererCamera();\n\n camera.setStages([\n 'opaque',\n ]);\n\n camera.dirty = true;\n\n this._inited = false;\n this._camera = camera;\n }\n else {\n this._inited = true;\n }\n },\n\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.others/Camera',\n inspector: 'packages://inspector/inspectors/comps/camera.js',\n executeInEditMode: true\n },\n\n properties: {\n _cullingMask: 0xffffffff,\n _clearFlags: ClearFlags.DEPTH | ClearFlags.STENCIL,\n _backgroundColor: cc.color(0, 0, 0, 255),\n _depth: 0,\n _zoomRatio: 1,\n _targetTexture: null,\n _fov: 60,\n _orthoSize: 10,\n _nearClip: 1,\n _farClip: 4096,\n _ortho: true,\n _rect: cc.rect(0, 0, 1, 1),\n _renderStages: 1,\n _alignWithScreen: true,\n\n /**\n * !#en\n * The camera zoom ratio, only support 2D camera.\n * !#zh\n * 摄像机缩放比率, 只支持 2D camera。\n * @property {Number} zoomRatio\n */\n zoomRatio: {\n get () {\n return this._zoomRatio;\n },\n set (value) {\n this._zoomRatio = value;\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.camera.zoomRatio',\n },\n\n /**\n * !#en\n * Field of view. The width of the Cameras view angle, measured in degrees along the local Y axis.\n * !#zh\n * 决定摄像机视角的宽度,当摄像机处于透视投影模式下这个属性才会生效。\n * @property {Number} fov\n * @default 60\n */\n fov: {\n get () {\n return this._fov;\n },\n set (v) {\n this._fov = v;\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.camera.fov',\n },\n\n /**\n * !#en\n * The viewport size of the Camera when set to orthographic projection.\n * !#zh\n * 摄像机在正交投影模式下的视窗大小。\n * @property {Number} orthoSize\n * @default 10\n */\n orthoSize: {\n get () {\n return this._orthoSize;\n },\n set (v) {\n this._orthoSize = v;\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.camera.orthoSize',\n },\n\n /**\n * !#en\n * The near clipping plane.\n * !#zh\n * 摄像机的近剪裁面。\n * @property {Number} nearClip\n * @default 0.1\n */\n nearClip: {\n get () {\n return this._nearClip;\n },\n set (v) {\n this._nearClip = v;\n this._updateClippingpPlanes();\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.camera.nearClip',\n },\n\n /**\n * !#en\n * The far clipping plane.\n * !#zh\n * 摄像机的远剪裁面。\n * @property {Number} farClip\n * @default 4096\n */\n farClip: {\n get () {\n return this._farClip;\n },\n set (v) {\n this._farClip = v;\n this._updateClippingpPlanes();\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.camera.farClip',\n },\n\n /**\n * !#en\n * Is the camera orthographic (true) or perspective (false)?\n * !#zh\n * 设置摄像机的投影模式是正交还是透视模式。\n * @property {Boolean} ortho\n * @default false\n */\n ortho: {\n get () {\n return this._ortho;\n },\n set (v) {\n this._ortho = v;\n this._updateProjection();\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.camera.ortho',\n },\n\n /**\n * !#en\n * Four values (0 ~ 1) that indicate where on the screen this camera view will be drawn.\n * !#zh\n * 决定摄像机绘制在屏幕上哪个位置值为0 ~ 1。\n * @property {Rect} rect\n * @default cc.rect(0,0,1,1)\n */\n rect: {\n get () {\n return this._rect;\n },\n set (v) {\n this._rect = v;\n this._updateRect();\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.camera.rect',\n },\n\n /**\n * !#en\n * This is used to render parts of the scene selectively.\n * !#zh\n * 决定摄像机会渲染场景的哪一部分。\n * @property {Number} cullingMask\n */\n cullingMask: {\n get () {\n return this._cullingMask;\n },\n set (value) {\n this._cullingMask = value;\n this._updateCameraMask();\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.camera.cullingMask',\n },\n\n /**\n * !#en\n * Determining what to clear when camera rendering.\n * !#zh\n * 决定摄像机渲染时会清除哪些状态。\n * @property {Camera.ClearFlags} clearFlags\n */\n clearFlags: {\n get () {\n return this._clearFlags;\n },\n set (value) {\n this._clearFlags = value;\n if (this._camera) {\n this._camera.setClearFlags(value);\n }\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.camera.clearFlags',\n },\n\n /**\n * !#en\n * The color with which the screen will be cleared.\n * !#zh\n * 摄像机用于清除屏幕的背景色。\n * @property {Color} backgroundColor\n */\n backgroundColor: {\n get () {\n return this._backgroundColor;\n },\n set (value) {\n if (!this._backgroundColor.equals(value)) {\n this._backgroundColor.set(value);\n this._updateBackgroundColor();\n }\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.camera.backgroundColor',\n },\n\n /**\n * !#en\n * Camera's depth in the camera rendering order. Cameras with higher depth are rendered after cameras with lower depth.\n * !#zh\n * 摄像机深度。用于决定摄像机的渲染顺序,值越大渲染在越上层。\n * @property {Number} depth\n */\n depth: {\n get () {\n return this._depth;\n },\n set (value) {\n if (Camera.main === this) {\n if (this._depth < value) {\n updateMainCamera();\n }\n }\n else if (Camera.main && value < Camera.main._depth && _cameras.includes(this)) {\n Camera.main = this;\n }\n\n this._depth = value;\n if (this._camera) {\n this._camera.setPriority(value);\n }\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.camera.depth',\n },\n\n /**\n * !#en\n * Destination render texture.\n * Usually cameras render directly to screen, but for some effects it is useful to make a camera render into a texture.\n * !#zh\n * 摄像机渲染的目标 RenderTexture。\n * 一般摄像机会直接渲染到屏幕上,但是有一些效果可以使用摄像机渲染到 RenderTexture 上再对 RenderTexture 进行处理来实现。\n * @property {RenderTexture} targetTexture\n */\n targetTexture: {\n get () {\n return this._targetTexture;\n },\n set (value) {\n this._targetTexture = value;\n this._updateTargetTexture();\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.camera.targetTexture',\n },\n\n /**\n * !#en\n * Sets the camera's render stages.\n * !#zh\n * 设置摄像机渲染的阶段\n * @property {Number} renderStages\n */\n renderStages: {\n get () {\n return this._renderStages;\n },\n set (val) {\n this._renderStages = val;\n this._updateStages();\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.camera.renderStages',\n },\n\n /**\n * !#en Whether auto align camera viewport to screen\n * !#zh 是否自动将摄像机的视口对准屏幕\n * @property {Boolean} alignWithScreen\n */\n alignWithScreen: {\n get () {\n return this._alignWithScreen;\n },\n set (v) {\n this._alignWithScreen = v;\n }\n },\n\n _is3D: {\n get () {\n return this.node && this.node._is3DNode;\n }\n }\n },\n\n statics: {\n /**\n * !#en\n * The primary camera in the scene. Returns the rear most rendered camera, which is the camera with the lowest depth.\n * !#zh\n * 当前场景中激活的主摄像机。将会返回渲染在屏幕最底层,也就是 depth 最小的摄像机。\n * @property {Camera} main\n * @static\n */\n main: null,\n\n /**\n * !#en\n * All enabled cameras.\n * !#zh\n * 当前激活的所有摄像机。\n * @property {[Camera]} cameras\n * @static\n */\n cameras: _cameras,\n\n ClearFlags: ClearFlags,\n\n /**\n * !#en\n * Get the first camera which the node belong to.\n * !#zh\n * 获取节点所在的第一个摄像机。\n * @method findCamera\n * @param {Node} node \n * @return {Camera}\n * @static\n */\n findCamera (node) {\n for (let i = 0, l = _cameras.length; i < l; i++) {\n let camera = _cameras[i];\n if (camera.containsNode(node)) {\n return camera;\n }\n }\n\n return null;\n },\n\n _findRendererCamera (node) {\n let cameras = renderer.scene._cameras;\n for (let i = 0; i < cameras._count; i++) {\n if (cameras._data[i]._cullingMask & node._cullingMask) {\n return cameras._data[i];\n }\n }\n return null;\n },\n\n _setupDebugCamera () {\n if (_debugCamera) return;\n if (game.renderType === game.RENDER_TYPE_CANVAS) return;\n let camera = new RendererCamera();\n _debugCamera = camera;\n\n camera.setStages([\n 'opaque',\n ]);\n \n camera.setFov(Math.PI * 60 / 180);\n camera.setNear(0.1);\n camera.setFar(4096);\n\n camera.dirty = true;\n\n camera.cullingMask = 1 << cc.Node.BuiltinGroupIndex.DEBUG;\n camera.setPriority(cc.macro.MAX_ZINDEX);\n camera.setClearFlags(0);\n camera.setColor(0, 0, 0, 0);\n\n let node = new cc.Node();\n camera.setNode(node);\n\n repositionDebugCamera();\n cc.view.on('design-resolution-changed', repositionDebugCamera);\n\n renderer.scene.addCamera(camera);\n }\n },\n\n _updateCameraMask () {\n if (this._camera) {\n let mask = this._cullingMask & (~(1 << cc.Node.BuiltinGroupIndex.DEBUG));\n this._camera.cullingMask = mask;\n }\n },\n\n _updateBackgroundColor () {\n if (!this._camera) return;\n\n let color = this._backgroundColor;\n this._camera.setColor(\n color.r / 255,\n color.g / 255,\n color.b / 255,\n color.a / 255,\n );\n },\n\n _updateTargetTexture () {\n if (!this._camera) return;\n\n let texture = this._targetTexture;\n this._camera.setFrameBuffer(texture ? texture._framebuffer : null);\n },\n\n _updateClippingpPlanes () {\n if (!this._camera) return;\n this._camera.setNear(this._nearClip);\n this._camera.setFar(this._farClip);\n },\n\n _updateProjection () {\n if (!this._camera) return;\n let type = this._ortho ? 1 : 0;\n this._camera.setType(type);\n },\n\n _updateRect () {\n if (!this._camera) return;\n let rect = this._rect;\n this._camera.setRect(rect.x, rect.y, rect.width, rect.height);\n },\n\n _updateStages () {\n let flags = this._renderStages;\n let stages = [];\n if (flags & StageFlags.OPAQUE) {\n stages.push('opaque');\n }\n if (flags & StageFlags.TRANSPARENT) {\n stages.push('transparent');\n }\n this._camera.setStages(stages);\n },\n\n _init () {\n if (this._inited) return;\n this._inited = true;\n\n let camera = this._camera;\n if (!camera) return;\n camera.setNode(this.node);\n camera.setClearFlags(this._clearFlags);\n camera.setPriority(this._depth);\n this._updateBackgroundColor();\n this._updateCameraMask();\n this._updateTargetTexture();\n this._updateClippingpPlanes();\n this._updateProjection();\n this._updateStages();\n this._updateRect();\n\n if (!CC_EDITOR) {\n this.beforeDraw();\n }\n },\n\n __preload () {\n this._init();\n },\n\n onEnable () {\n if (!CC_EDITOR && game.renderType !== game.RENDER_TYPE_CANVAS) {\n cc.director.on(cc.Director.EVENT_BEFORE_DRAW, this.beforeDraw, this);\n renderer.scene.addCamera(this._camera);\n }\n _cameras.push(this);\n if (!Camera.main || (this._depth < Camera.main._depth)) {\n Camera.main = this;\n }\n },\n\n onDisable () {\n if (!CC_EDITOR && game.renderType !== game.RENDER_TYPE_CANVAS) {\n cc.director.off(cc.Director.EVENT_BEFORE_DRAW, this.beforeDraw, this);\n renderer.scene.removeCamera(this._camera);\n }\n cc.js.array.fastRemove(_cameras, this);\n if (Camera.main === this) {\n Camera.main = null;\n updateMainCamera();\n }\n },\n\n /**\n * !#en\n * Get the screen to world matrix, only support 2D camera which alignWithScreen is true.\n * !#zh\n * 获取屏幕坐标系到世界坐标系的矩阵,只适用于 alignWithScreen 为 true 的 2D 摄像机。\n * @method getScreenToWorldMatrix2D\n * @param {Mat4} out - the matrix to receive the result\n * @return {Mat4} out\n */\n getScreenToWorldMatrix2D (out) {\n this.getWorldToScreenMatrix2D(out);\n Mat4.invert(out, out);\n return out;\n },\n\n /**\n * !#en\n * Get the world to camera matrix, only support 2D camera which alignWithScreen is true.\n * !#zh\n * 获取世界坐标系到摄像机坐标系的矩阵,只适用于 alignWithScreen 为 true 的 2D 摄像机。\n * @method getWorldToScreenMatrix2D\n * @param {Mat4} out - the matrix to receive the result\n * @return {Mat4} out\n */\n getWorldToScreenMatrix2D (out) {\n this.node.getWorldRT(_mat4_temp_1);\n\n let zoomRatio = this.zoomRatio;\n let _mat4_temp_1m = _mat4_temp_1.m;\n _mat4_temp_1m[0] *= zoomRatio;\n _mat4_temp_1m[1] *= zoomRatio;\n _mat4_temp_1m[4] *= zoomRatio;\n _mat4_temp_1m[5] *= zoomRatio;\n\n let m12 = _mat4_temp_1m[12];\n let m13 = _mat4_temp_1m[13];\n\n let center = cc.visibleRect.center;\n _mat4_temp_1m[12] = center.x - (_mat4_temp_1m[0] * m12 + _mat4_temp_1m[4] * m13);\n _mat4_temp_1m[13] = center.y - (_mat4_temp_1m[1] * m12 + _mat4_temp_1m[5] * m13);\n\n if (out !== _mat4_temp_1) {\n Mat4.copy(out, _mat4_temp_1);\n }\n return out;\n },\n\n /**\n * !#en\n * Convert point from screen to world.\n * !#zh\n * 将坐标从屏幕坐标系转换到世界坐标系。\n * @method getScreenToWorldPoint\n * @param {Vec3|Vec2} screenPosition \n * @param {Vec3|Vec2} [out] \n * @return {Vec3|Vec2} out\n */\n getScreenToWorldPoint (screenPosition, out) {\n if (this.node.is3DNode) {\n out = out || new cc.Vec3();\n this._camera.screenToWorld(out, screenPosition, cc.visibleRect.width, cc.visibleRect.height);\n }\n else {\n out = out || new cc.Vec2();\n this.getScreenToWorldMatrix2D(_mat4_temp_1);\n Vec2.transformMat4(out, screenPosition, _mat4_temp_1);\n }\n return out;\n },\n\n /**\n * !#en\n * Convert point from world to screen.\n * !#zh\n * 将坐标从世界坐标系转化到屏幕坐标系。\n * @method getWorldToScreenPoint\n * @param {Vec3|Vec2} worldPosition \n * @param {Vec3|Vec2} [out] \n * @return {Vec3|Vec2} out\n */\n getWorldToScreenPoint (worldPosition, out) {\n if (this.node.is3DNode) {\n out = out || new cc.Vec3();\n this._camera.worldToScreen(out, worldPosition, cc.visibleRect.width, cc.visibleRect.height);\n }\n else {\n out = out || new cc.Vec2();\n this.getWorldToScreenMatrix2D(_mat4_temp_1);\n Vec2.transformMat4(out, worldPosition, _mat4_temp_1);\n }\n \n return out;\n },\n\n /**\n * !#en\n * Get a ray from screen position\n * !#zh\n * 从屏幕坐标获取一条射线\n * @method getRay\n * @param {Vec2} screenPos\n * @return {Ray}\n */\n getRay (screenPos) {\n if (!cc.geomUtils) return screenPos;\n \n Vec3.set(_v3_temp_3, screenPos.x, screenPos.y, 1);\n this._camera.screenToWorld(_v3_temp_2, _v3_temp_3, cc.visibleRect.width, cc.visibleRect.height);\n\n if (this.ortho) {\n Vec3.set(_v3_temp_3, screenPos.x, screenPos.y, -1);\n this._camera.screenToWorld(_v3_temp_1, _v3_temp_3, cc.visibleRect.width, cc.visibleRect.height);\n }\n else {\n this.node.getWorldPosition(_v3_temp_1);\n }\n\n return Ray.fromPoints(new Ray(), _v3_temp_1, _v3_temp_2);\n },\n\n /**\n * !#en\n * Check whether the node is in the camera.\n * !#zh\n * 检测节点是否被此摄像机影响\n * @method containsNode\n * @param {Node} node - the node which need to check\n * @return {Boolean}\n */\n containsNode (node) {\n return (node._cullingMask & this.cullingMask) > 0;\n },\n\n /**\n * !#en\n * Render the camera manually.\n * !#zh\n * 手动渲染摄像机。\n * @method render\n * @param {Node} [rootNode] \n */\n render (rootNode) {\n rootNode = rootNode || cc.director.getScene();\n if (!rootNode) return null;\n\n // force update node world matrix\n this.node.getWorldMatrix(_mat4_temp_1);\n this.beforeDraw();\n\n RenderFlow.renderCamera(this._camera, rootNode);\n },\n\n _onAlignWithScreen () {\n let height = cc.game.canvas.height / cc.view._scaleY;\n\n let targetTexture = this._targetTexture;\n if (targetTexture) {\n if (CC_EDITOR) {\n height = cc.engine.getDesignResolutionSize().height;\n }\n else {\n height = cc.visibleRect.height;\n }\n }\n\n let fov = this._fov * cc.macro.RAD;\n this.node.z = height / (Math.tan(fov / 2) * 2);\n\n fov = Math.atan(Math.tan(fov / 2) / this.zoomRatio) * 2;\n this._camera.setFov(fov);\n this._camera.setOrthoHeight(height / 2 / this.zoomRatio);\n this.node.setRotation(0, 0, 0, 1);\n },\n\n beforeDraw () {\n if (!this._camera) return;\n\n if (this._alignWithScreen) {\n this._onAlignWithScreen();\n }\n else {\n let fov = this._fov * cc.macro.RAD;\n fov = Math.atan(Math.tan(fov / 2) / this.zoomRatio) * 2;\n this._camera.setFov(fov);\n\n this._camera.setOrthoHeight(this._orthoSize / this.zoomRatio);\n }\n\n this._camera.dirty = true;\n }\n});\n\n// deprecated\ncc.js.mixin(Camera.prototype, {\n /**\n * !#en\n * Returns the matrix that transform the node's (local) space coordinates into the camera's space coordinates.\n * !#zh\n * 返回一个将节点坐标系转换到摄像机坐标系下的矩阵\n * @method getNodeToCameraTransform\n * @deprecated since v2.0.0\n * @param {Node} node - the node which should transform\n * @return {AffineTransform}\n */\n getNodeToCameraTransform (node) {\n let out = AffineTrans.identity();\n node.getWorldMatrix(_mat4_temp_2);\n if (this.containsNode(node)) {\n this.getWorldToCameraMatrix(_mat4_temp_1);\n Mat4.mul(_mat4_temp_2, _mat4_temp_2, _mat4_temp_1);\n }\n AffineTrans.fromMat4(out, _mat4_temp_2);\n return out;\n },\n\n /**\n * !#en\n * Conver a camera coordinates point to world coordinates.\n * !#zh\n * 将一个摄像机坐标系下的点转换到世界坐标系下。\n * @method getCameraToWorldPoint\n * @deprecated since v2.1.3\n * @param {Vec2} point - the point which should transform\n * @param {Vec2} [out] - the point to receive the result\n * @return {Vec2} out\n */\n getCameraToWorldPoint (point, out) {\n return this.getScreenToWorldPoint(point, out);\n },\n\n /**\n * !#en\n * Conver a world coordinates point to camera coordinates.\n * !#zh\n * 将一个世界坐标系下的点转换到摄像机坐标系下。\n * @method getWorldToCameraPoint\n * @deprecated since v2.1.3\n * @param {Vec2} point \n * @param {Vec2} [out] - the point to receive the result\n * @return {Vec2} out\n */\n getWorldToCameraPoint (point, out) {\n return this.getWorldToScreenPoint(point, out);\n },\n\n /**\n * !#en\n * Get the camera to world matrix\n * !#zh\n * 获取摄像机坐标系到世界坐标系的矩阵\n * @method getCameraToWorldMatrix\n * @deprecated since v2.1.3\n * @param {Mat4} out - the matrix to receive the result\n * @return {Mat4} out\n */\n getCameraToWorldMatrix (out) {\n return this.getScreenToWorldMatrix2D(out);\n },\n\n\n /**\n * !#en\n * Get the world to camera matrix\n * !#zh\n * 获取世界坐标系到摄像机坐标系的矩阵\n * @method getWorldToCameraMatrix\n * @deprecated since v2.1.3\n * @param {Mat4} out - the matrix to receive the result\n * @return {Mat4} out\n */\n getWorldToCameraMatrix (out) {\n return this.getWorldToScreenMatrix2D(out);\n },\n});\n\nmodule.exports = cc.Camera = Camera;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nrequire('./platform/CCClass');\nvar Flags = require('./platform/CCObject').Flags;\nvar jsArray = require('./platform/js').array;\n\nvar IsStartCalled = Flags.IsStartCalled;\nvar IsOnEnableCalled = Flags.IsOnEnableCalled;\nvar IsEditorOnEnableCalled = Flags.IsEditorOnEnableCalled;\n\nvar callerFunctor = CC_EDITOR && require('./utils/misc').tryCatchFunctor_EDITOR;\nvar callOnEnableInTryCatch = CC_EDITOR && callerFunctor('onEnable');\nvar callOnDisableInTryCatch = CC_EDITOR && callerFunctor('onDisable');\n\nfunction sortedIndex (array, comp) {\n var order = comp.constructor._executionOrder;\n var id = comp._id;\n for (var l = 0, h = array.length - 1, m = h >>> 1;\n l <= h;\n m = (l + h) >>> 1\n ) {\n var test = array[m];\n var testOrder = test.constructor._executionOrder;\n if (testOrder > order) {\n h = m - 1;\n }\n else if (testOrder < order) {\n l = m + 1;\n }\n else {\n var testId = test._id;\n if (testId > id) {\n h = m - 1;\n }\n else if (testId < id) {\n l = m + 1;\n }\n else {\n return m;\n }\n }\n }\n return ~l;\n}\n\n// remove disabled and not invoked component from array\nfunction stableRemoveInactive (iterator, flagToClear) {\n var array = iterator.array;\n var next = iterator.i + 1;\n while (next < array.length) {\n var comp = array[next];\n if (comp._enabled && comp.node && comp.node._activeInHierarchy) {\n ++next;\n }\n else {\n iterator.removeAt(next);\n if (flagToClear) {\n comp._objFlags &= ~flagToClear;\n }\n }\n }\n}\n\n// This class contains some queues used to invoke life-cycle methods by script execution order\nvar LifeCycleInvoker = cc.Class({\n __ctor__ (invokeFunc) {\n var Iterator = jsArray.MutableForwardIterator;\n // components which priority === 0 (default)\n this._zero = new Iterator([]);\n // components which priority < 0\n this._neg = new Iterator([]);\n // components which priority > 0\n this._pos = new Iterator([]);\n\n if (CC_TEST) {\n cc.assert(typeof invokeFunc === 'function', 'invokeFunc must be type function');\n }\n this._invoke = invokeFunc;\n },\n statics: {\n stableRemoveInactive\n },\n add: null,\n remove: null,\n invoke: null,\n});\n\nfunction compareOrder (a, b) {\n return a.constructor._executionOrder - b.constructor._executionOrder;\n}\n\n// for onLoad: sort once all components registered, invoke once\nvar OneOffInvoker = cc.Class({\n extends: LifeCycleInvoker,\n add (comp) {\n var order = comp.constructor._executionOrder;\n (order === 0 ? this._zero : (order < 0 ? this._neg : this._pos)).array.push(comp);\n },\n remove (comp) {\n var order = comp.constructor._executionOrder;\n (order === 0 ? this._zero : (order < 0 ? this._neg : this._pos)).fastRemove(comp);\n },\n cancelInactive (flagToClear) {\n stableRemoveInactive(this._zero, flagToClear);\n stableRemoveInactive(this._neg, flagToClear);\n stableRemoveInactive(this._pos, flagToClear);\n },\n invoke () {\n var compsNeg = this._neg;\n if (compsNeg.array.length > 0) {\n compsNeg.array.sort(compareOrder);\n this._invoke(compsNeg);\n compsNeg.array.length = 0;\n }\n\n this._invoke(this._zero);\n this._zero.array.length = 0;\n\n var compsPos = this._pos;\n if (compsPos.array.length > 0) {\n compsPos.array.sort(compareOrder);\n this._invoke(compsPos);\n compsPos.array.length = 0;\n }\n },\n});\n\n// for update: sort every time new component registered, invoke many times\nvar ReusableInvoker = cc.Class({\n extends: LifeCycleInvoker,\n add (comp) {\n var order = comp.constructor._executionOrder;\n if (order === 0) {\n this._zero.array.push(comp);\n }\n else {\n var array = order < 0 ? this._neg.array : this._pos.array;\n var i = sortedIndex(array, comp);\n if (i < 0) {\n array.splice(~i, 0, comp);\n }\n else if (CC_DEV) {\n cc.error('component already added');\n }\n }\n },\n remove (comp) {\n var order = comp.constructor._executionOrder;\n if (order === 0) {\n this._zero.fastRemove(comp);\n }\n else {\n var iterator = order < 0 ? this._neg : this._pos;\n var i = sortedIndex(iterator.array, comp);\n if (i >= 0) {\n iterator.removeAt(i);\n }\n }\n },\n invoke (dt) {\n if (this._neg.array.length > 0) {\n this._invoke(this._neg, dt);\n }\n\n this._invoke(this._zero, dt);\n\n if (this._pos.array.length > 0) {\n this._invoke(this._pos, dt);\n }\n },\n});\n\nfunction enableInEditor (comp) {\n if (!(comp._objFlags & IsEditorOnEnableCalled)) {\n cc.engine.emit('component-enabled', comp.uuid);\n comp._objFlags |= IsEditorOnEnableCalled;\n }\n}\n\n// return function to simply call each component with try catch protection\nfunction createInvokeImpl (indiePath, useDt, ensureFlag, fastPath) {\n if (CC_SUPPORT_JIT) {\n // function (it) {\n // var a = it.array;\n // for (it.i = 0; it.i < a.length; ++it.i) {\n // var c = a[it.i];\n // // ...\n // }\n // }\n let body = 'var a=it.array;' +\n 'for(it.i=0;it.i<a.length;++it.i){' +\n 'var c=a[it.i];' +\n indiePath +\n '}';\n fastPath = useDt ? Function('it', 'dt', body) : Function('it', body);\n indiePath = Function('c', 'dt', indiePath);\n }\n return function (iterator, dt) {\n try {\n fastPath(iterator, dt);\n }\n catch (e) {\n // slow path\n cc._throw(e);\n var array = iterator.array;\n if (ensureFlag) {\n array[iterator.i]._objFlags |= ensureFlag;\n }\n ++iterator.i; // invoke next callback\n for (; iterator.i < array.length; ++iterator.i) {\n try {\n indiePath(array[iterator.i], dt);\n }\n catch (e) {\n cc._throw(e);\n if (ensureFlag) {\n array[iterator.i]._objFlags |= ensureFlag;\n }\n }\n }\n }\n };\n}\n\nvar invokeStart = CC_SUPPORT_JIT ?\n createInvokeImpl('c.start();c._objFlags|=' + IsStartCalled, false, IsStartCalled) :\n createInvokeImpl(function (c) {\n c.start();\n c._objFlags |= IsStartCalled;\n },\n false,\n IsStartCalled,\n function (iterator) {\n var array = iterator.array;\n for (iterator.i = 0; iterator.i < array.length; ++iterator.i) {\n let comp = array[iterator.i];\n comp.start();\n comp._objFlags |= IsStartCalled;\n }\n }\n );\nvar invokeUpdate = CC_SUPPORT_JIT ?\n createInvokeImpl('c.update(dt)', true) :\n createInvokeImpl(function (c, dt) {\n c.update(dt);\n },\n true,\n undefined,\n function (iterator, dt) {\n var array = iterator.array;\n for (iterator.i = 0; iterator.i < array.length; ++iterator.i) {\n array[iterator.i].update(dt);\n }\n }\n );\nvar invokeLateUpdate = CC_SUPPORT_JIT ?\n createInvokeImpl('c.lateUpdate(dt)', true) :\n createInvokeImpl(function (c, dt) {\n c.lateUpdate(dt);\n },\n true,\n undefined,\n function (iterator, dt) {\n var array = iterator.array;\n for (iterator.i = 0; iterator.i < array.length; ++iterator.i) {\n array[iterator.i].lateUpdate(dt);\n }\n }\n );\n/**\n * The Manager for Component's life-cycle methods.\n */\nfunction ctor () {\n // invokers\n this.startInvoker = new OneOffInvoker(invokeStart);\n this.updateInvoker = new ReusableInvoker(invokeUpdate);\n this.lateUpdateInvoker = new ReusableInvoker(invokeLateUpdate);\n\n // components deferred to next frame\n this._deferredComps = [];\n\n // during a loop\n this._updating = false;\n}\nvar ComponentScheduler = cc.Class({\n ctor: ctor,\n unscheduleAll: ctor,\n\n statics: {\n LifeCycleInvoker,\n OneOffInvoker,\n createInvokeImpl,\n invokeOnEnable: CC_EDITOR ? function (iterator) {\n var compScheduler = cc.director._compScheduler;\n var array = iterator.array;\n for (iterator.i = 0; iterator.i < array.length; ++iterator.i) {\n let comp = array[iterator.i];\n if (comp._enabled) {\n callOnEnableInTryCatch(comp);\n var deactivatedDuringOnEnable = !comp.node._activeInHierarchy;\n if (!deactivatedDuringOnEnable) {\n compScheduler._onEnabled(comp);\n }\n }\n }\n } : function (iterator) {\n var compScheduler = cc.director._compScheduler;\n var array = iterator.array;\n for (iterator.i = 0; iterator.i < array.length; ++iterator.i) {\n let comp = array[iterator.i];\n if (comp._enabled) {\n comp.onEnable();\n var deactivatedDuringOnEnable = !comp.node._activeInHierarchy;\n if (!deactivatedDuringOnEnable) {\n compScheduler._onEnabled(comp);\n }\n }\n }\n }\n },\n\n _onEnabled (comp) {\n cc.director.getScheduler().resumeTarget(comp);\n comp._objFlags |= IsOnEnableCalled;\n\n // schedule\n if (this._updating) {\n this._deferredComps.push(comp);\n }\n else {\n this._scheduleImmediate(comp);\n }\n },\n\n _onDisabled (comp) {\n cc.director.getScheduler().pauseTarget(comp);\n comp._objFlags &= ~IsOnEnableCalled;\n\n // cancel schedule task\n var index = this._deferredComps.indexOf(comp);\n if (index >= 0) {\n jsArray.fastRemoveAt(this._deferredComps, index);\n return;\n }\n\n // unschedule\n if (comp.start && !(comp._objFlags & IsStartCalled)) {\n this.startInvoker.remove(comp);\n }\n if (comp.update) {\n this.updateInvoker.remove(comp);\n }\n if (comp.lateUpdate) {\n this.lateUpdateInvoker.remove(comp);\n }\n },\n\n enableComp: CC_EDITOR ? function (comp, invoker) {\n if (cc.engine.isPlaying || comp.constructor._executeInEditMode) {\n if (!(comp._objFlags & IsOnEnableCalled)) {\n if (comp.onEnable) {\n if (invoker) {\n invoker.add(comp);\n enableInEditor(comp);\n return;\n }\n else {\n callOnEnableInTryCatch(comp);\n\n var deactivatedDuringOnEnable = !comp.node._activeInHierarchy;\n if (deactivatedDuringOnEnable) {\n return;\n }\n }\n }\n this._onEnabled(comp);\n }\n }\n enableInEditor(comp);\n } : function (comp, invoker) {\n if (!(comp._objFlags & IsOnEnableCalled)) {\n if (comp.onEnable) {\n if (invoker) {\n invoker.add(comp);\n return;\n }\n else {\n comp.onEnable();\n\n var deactivatedDuringOnEnable = !comp.node._activeInHierarchy;\n if (deactivatedDuringOnEnable) {\n return;\n }\n }\n }\n this._onEnabled(comp);\n }\n },\n\n disableComp: CC_EDITOR ? function (comp) {\n if (cc.engine.isPlaying || comp.constructor._executeInEditMode) {\n if (comp._objFlags & IsOnEnableCalled) {\n if (comp.onDisable) {\n callOnDisableInTryCatch(comp);\n }\n this._onDisabled(comp);\n }\n }\n if (comp._objFlags & IsEditorOnEnableCalled) {\n cc.engine.emit('component-disabled', comp.uuid);\n comp._objFlags &= ~IsEditorOnEnableCalled;\n }\n } : function (comp) {\n if (comp._objFlags & IsOnEnableCalled) {\n if (comp.onDisable) {\n comp.onDisable();\n }\n this._onDisabled(comp);\n }\n },\n\n _scheduleImmediate (comp) {\n if (typeof comp.start === 'function' && !(comp._objFlags & IsStartCalled)) {\n this.startInvoker.add(comp);\n }\n if (typeof comp.update === 'function') {\n this.updateInvoker.add(comp);\n }\n if (typeof comp.lateUpdate === 'function') {\n this.lateUpdateInvoker.add(comp);\n }\n },\n\n _deferredSchedule () {\n var comps = this._deferredComps;\n for (var i = 0, len = comps.length; i < len; i++) {\n this._scheduleImmediate(comps[i]);\n }\n comps.length = 0;\n },\n\n // Call new registered start schedule immediately since last time start phase calling in this frame\n // See cocos-creator/2d-tasks/issues/256\n _startForNewComps () {\n if (this._deferredComps.length > 0) {\n this._deferredSchedule();\n this.startInvoker.invoke();\n }\n },\n\n startPhase () {\n // Start of this frame\n this._updating = true;\n\n // call start\n this.startInvoker.invoke();\n\n // Start components of new activated nodes during start\n this._startForNewComps();\n\n // if (CC_PREVIEW) {\n // try {\n // this.startInvoker.invoke();\n // }\n // catch (e) {\n // // prevent start from getting into infinite loop\n // this.startInvoker._neg.array.length = 0;\n // this.startInvoker._zero.array.length = 0;\n // this.startInvoker._pos.array.length = 0;\n // throw e;\n // }\n // }\n // else {\n // this.startInvoker.invoke();\n // }\n },\n\n updatePhase (dt) {\n this.updateInvoker.invoke(dt);\n },\n\n lateUpdatePhase (dt) {\n this.lateUpdateInvoker.invoke(dt);\n\n // End of this frame\n this._updating = false;\n\n // Start components of new activated nodes during update and lateUpdate\n // The start callback will be invoked immediately,\n // update and lateUpdate callback will be running in the next frame\n this._startForNewComps();\n },\n});\n\nmodule.exports = ComponentScheduler;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst AnimationAnimator = require('../../animation/animation-animator');\nconst AnimationClip = require('../../animation/animation-clip');\nconst EventTarget = require('../event/event-target');\nconst js = require('../platform/js');\n\nlet equalClips = CC_EDITOR ? function (clip1, clip2) {\n return clip1 === clip2 || (clip1 && clip2 && (clip1.name === clip2.name || clip1._uuid === clip2._uuid));\n} : function (clip1, clip2) {\n return clip1 === clip2;\n};\n\n/**\n * !#en The event type supported by Animation\n * !#zh Animation 支持的事件类型\n * @class Animation.EventType\n * @static\n * @namespace Animationd\n */\nlet EventType = cc.Enum({\n /**\n * !#en Emit when begin playing animation\n * !#zh 开始播放时触发\n * @property {String} PLAY\n * @static\n */\n PLAY: 'play',\n /**\n * !#en Emit when stop playing animation\n * !#zh 停止播放时触发\n * @property {String} STOP\n * @static\n */\n STOP: 'stop',\n /**\n * !#en Emit when pause animation\n * !#zh 暂停播放时触发\n * @property {String} PAUSE\n * @static\n */\n PAUSE: 'pause',\n /**\n * !#en Emit when resume animation\n * !#zh 恢复播放时触发\n * @property {String} RESUME\n * @static\n */\n RESUME: 'resume',\n /**\n * !#en If animation repeat count is larger than 1, emit when animation play to the last frame\n * !#zh 假如动画循环次数大于 1当动画播放到最后一帧时触发\n * @property {String} LASTFRAME\n * @static\n */\n LASTFRAME: 'lastframe',\n /**\n * !#en Emit when finish playing animation\n * !#zh 动画播放完成时触发\n * @property {String} FINISHED\n * @static\n */\n FINISHED: 'finished'\n});\n\n/**\n * !#en The animation component is used to play back animations.\n *\n * Animation provide several events to register\n * - play : Emit when begin playing animation\n * - stop : Emit when stop playing animation\n * - pause : Emit when pause animation\n * - resume : Emit when resume animation\n * - lastframe : If animation repeat count is larger than 1, emit when animation play to the last frame\n * - finished : Emit when finish playing animation\n *\n * !#zh Animation 组件用于播放动画。\n *\n * Animation 提供了一系列可注册的事件:\n * - play : 开始播放时\n * - stop : 停止播放时\n * - pause : 暂停播放时\n * - resume : 恢复播放时\n * - lastframe : 假如动画循环次数大于 1当动画播放到最后一帧时\n * - finished : 动画播放完成时\n *\n * @class Animation\n * @extends Component\n * @uses EventTarget\n */\nlet Animation = cc.Class({\n name: 'cc.Animation',\n extends: require('./CCComponent'),\n mixins: [EventTarget],\n\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.others/Animation',\n help: 'i18n:COMPONENT.help_url.animation',\n executeInEditMode: true,\n },\n\n statics: {\n EventType\n },\n\n ctor: function () {\n cc.EventTarget.call(this);\n\n // The actual implement for Animation\n this._animator = null;\n\n this._nameToState = js.createMap(true);\n this._didInit = false;\n\n this._currentClip = null;\n },\n\n properties: {\n\n _defaultClip: {\n default: null,\n type: AnimationClip,\n },\n\n /**\n * !#en Animation will play the default clip when start game.\n * !#zh 在勾选自动播放或调用 play() 时默认播放的动画剪辑。\n * @property defaultClip\n * @type {AnimationClip}\n */\n defaultClip: {\n type: AnimationClip,\n get: function () {\n return this._defaultClip;\n },\n set: function (value) {\n if (!CC_EDITOR || (cc.engine && cc.engine.isPlaying)) {\n return;\n }\n\n this._defaultClip = value;\n if (!value) {\n return;\n }\n\n const contain = this._clips.findIndex((clip) => equalClips(clip, value)) >= 0;\n if (!contain) {\n this.addClip(value);\n }\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.animation.default_clip'\n },\n\n /**\n * !#en Current played clip.\n * !#zh 当前播放的动画剪辑。\n * @property currentClip\n * @type {AnimationClip}\n */\n currentClip: {\n get: function () {\n return this._currentClip;\n },\n set: function (value) {\n this._currentClip = value;\n },\n type: AnimationClip,\n visible: false\n },\n\n // This property is used to watch clip changes in editor.\n // Don't use in your game, use addClip/removeClip instead.\n _writableClips: {\n get () {\n return this._clips;\n },\n set (val) {\n this._didInit = false;\n this._clips = val;\n this._init();\n },\n type: [AnimationClip],\n },\n\n /**\n * !#en All the clips used in this animation.\n * !#zh 通过脚本可以访问并播放的 AnimationClip 列表。\n * @property _clips\n * @type {AnimationClip[]}\n * @private\n */\n _clips: {\n default: [],\n type: [AnimationClip],\n tooltip: CC_DEV && 'i18n:COMPONENT.animation.clips',\n visible: true\n },\n\n /**\n * !#en Whether the animation should auto play the default clip when start game.\n * !#zh 是否在运行游戏后自动播放默认动画剪辑。\n * @property playOnLoad\n * @type {Boolean}\n * @default true\n */\n playOnLoad: {\n default: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.animation.play_on_load'\n }\n },\n\n start: function () {\n if (!CC_EDITOR && this.playOnLoad && this._defaultClip) {\n let isPlaying = this._animator && this._animator.isPlaying;\n if (!isPlaying) {\n let state = this.getAnimationState(this._defaultClip.name);\n this._animator.playState(state);\n }\n }\n },\n\n onEnable: function () {\n if (this._animator) {\n this._animator.resume();\n }\n },\n\n onDisable: function () {\n if (this._animator) {\n this._animator.pause();\n }\n },\n\n onDestroy: function () {\n this.stop();\n },\n\n ///////////////////////////////////////////////////////////////////////////////\n // Public Methods\n ///////////////////////////////////////////////////////////////////////////////\n\n /**\n * !#en Get all the clips used in this animation.\n * !#zh 获取动画组件上的所有动画剪辑。\n * @method getClips\n * @return {AnimationClip[]}\n */\n getClips: function () {\n return this._clips;\n },\n\n /**\n * !#en Plays an animation and stop other animations.\n * !#zh 播放指定的动画,并且停止当前正在播放动画。如果没有指定动画,则播放默认动画。\n * @method play\n * @param {String} [name] - The name of animation to play. If no name is supplied then the default animation will be played.\n * @param {Number} [startTime] - play an animation from startTime\n * @return {AnimationState} - The AnimationState of playing animation. In cases where the animation can't be played (ie, there is no default animation or no animation with the specified name), the function will return null.\n * @example\n * var animCtrl = this.node.getComponent(cc.Animation);\n * animCtrl.play(\"linear\");\n */\n play: function (name, startTime) {\n let state = this.playAdditive(name, startTime);\n this._animator.stopStatesExcept(state);\n return state;\n },\n\n /**\n * !#en\n * Plays an additive animation, it will not stop other animations.\n * If there are other animations playing, then will play several animations at the same time.\n * !#zh 播放指定的动画(将不会停止当前播放的动画)。如果没有指定动画,则播放默认动画。\n * @method playAdditive\n * @param {String} [name] - The name of animation to play. If no name is supplied then the default animation will be played.\n * @param {Number} [startTime] - play an animation from startTime\n * @return {AnimationState} - The AnimationState of playing animation. In cases where the animation can't be played (ie, there is no default animation or no animation with the specified name), the function will return null.\n * @example\n * // linear_1 and linear_2 at the same time playing.\n * var animCtrl = this.node.getComponent(cc.Animation);\n * animCtrl.playAdditive(\"linear_1\");\n * animCtrl.playAdditive(\"linear_2\");\n */\n playAdditive: function (name, startTime) {\n this._init();\n let state = this.getAnimationState(name || (this._defaultClip && this._defaultClip.name));\n\n if (state) {\n this.enabled = true;\n\n let animator = this._animator;\n if (animator.isPlaying && state.isPlaying) {\n if (state.isPaused) {\n animator.resumeState(state);\n }\n else {\n animator.stopState(state);\n animator.playState(state, startTime);\n }\n }\n else {\n animator.playState(state, startTime);\n }\n\n // Animation cannot be played when the component is not enabledInHierarchy.\n // That would cause an error for the animation lost the reference after destroying the node.\n // If users play the animation when the component is not enabledInHierarchy,\n // we pause the animator here so that it will automatically resume the animation when users enable the component.\n if (!this.enabledInHierarchy) {\n animator.pause();\n }\n\n this.currentClip = state.clip;\n }\n return state;\n },\n\n /**\n * !#en Stops an animation named name. If no name is supplied then stops all playing animations that were started with this Animation. <br/>\n * Stopping an animation also Rewinds it to the Start.\n * !#zh 停止指定的动画。如果没有指定名字,则停止当前正在播放的动画。\n * @method stop\n * @param {String} [name] - The animation to stop, if not supplied then stops all playing animations.\n */\n stop: function (name) {\n if (!this._didInit) {\n return;\n }\n if (name) {\n let state = this._nameToState[name];\n if (state) {\n this._animator.stopState(state);\n }\n }\n else {\n this._animator.stop();\n }\n },\n\n /**\n * !#en Pauses an animation named name. If no name is supplied then pauses all playing animations that were started with this Animation.\n * !#zh 暂停当前或者指定的动画。如果没有指定名字,则暂停当前正在播放的动画。\n * @method pause\n * @param {String} [name] - The animation to pauses, if not supplied then pauses all playing animations.\n */\n pause: function (name) {\n if (!this._didInit) {\n return;\n }\n if (name) {\n let state = this._nameToState[name];\n if (state) {\n this._animator.pauseState(state);\n }\n }\n else {\n this.enabled = false;\n }\n },\n\n /**\n * !#en Resumes an animation named name. If no name is supplied then resumes all paused animations that were started with this Animation.\n * !#zh 重新播放指定的动画,如果没有指定名字,则重新播放当前正在播放的动画。\n * @method resume\n * @param {String} [name] - The animation to resumes, if not supplied then resumes all paused animations.\n */\n resume: function (name) {\n if (!this._didInit) {\n return;\n }\n if (name) {\n let state = this.getAnimationState(name);\n if (state) {\n this._animator.resumeState(state);\n }\n }\n else {\n this.enabled = true;\n }\n },\n\n /**\n * !#en Make an animation named name go to the specified time. If no name is supplied then make all animations go to the specified time.\n * !#zh 设置指定动画的播放时间。如果没有指定名字,则设置当前播放动画的播放时间。\n * @method setCurrentTime\n * @param {Number} [time] - The time to go to\n * @param {String} [name] - Specified animation name, if not supplied then make all animations go to the time.\n */\n setCurrentTime: function (time, name) {\n this._init();\n if (name) {\n let state = this.getAnimationState(name);\n if (state) {\n this._animator.setStateTime(state, time);\n }\n }\n else {\n this._animator.setStateTime(time);\n }\n },\n\n /**\n * !#en Returns the animation state named name. If no animation with the specified name, the function will return null.\n * !#zh 获取当前或者指定的动画状态,如果未找到指定动画剪辑则返回 null。\n * @method getAnimationState\n * @param {String} name\n * @return {AnimationState}\n */\n getAnimationState: function (name) {\n this._init();\n let state = this._nameToState[name];\n\n if (CC_EDITOR && (!state || !cc.js.array.contains(this._clips, state.clip))) {\n this._didInit = false;\n\n if (this._animator) {\n this._animator.stop();\n }\n\n this._init();\n state = this._nameToState[name];\n }\n\n if (state && !state.curveLoaded) {\n this._animator._reloadClip(state);\n }\n\n return state || null;\n },\n\n /**\n * !#en Check whether the animation State with the name already exists.\n * !#zh 通过名称判断是否包含某动画状态。也可用来判断是否已经添加了同名 clip.\n * @method hasAnimationState\n * @param {String} name\n * @return {boolean} - Whether the animation State with the name already exists.\n */\n hasAnimationState: function (name) {\n this._init();\n return !!(this._nameToState[name]);\n },\n\n /**\n * !#en Adds a clip to the animation with name newName. If a clip with that name already exists it will be replaced with the new clip.\n * !#zh 添加动画剪辑,并且可以重新设置该动画剪辑的名称。\n * @method addClip\n * @param {AnimationClip} clip - the clip to add\n * @param {String} [newName]\n * @return {AnimationState} - The AnimationState which gives full control over the animation clip.\n */\n addClip: function (clip, newName) {\n if (!clip) {\n cc.warnID(3900);\n return;\n }\n this._init();\n\n // add clip\n if (!cc.js.array.contains(this._clips, clip)) {\n this._clips.push(clip);\n }\n\n // replace same name clip\n newName = newName || clip.name;\n let oldState = this._nameToState[newName];\n if (oldState) {\n if (oldState.clip === clip) {\n return oldState;\n }\n else {\n var index = this._clips.indexOf(oldState.clip);\n if (index !== -1) {\n this._clips.splice(index, 1);\n }\n }\n }\n\n // replace state\n let newState = new cc.AnimationState(clip, newName);\n this._nameToState[newName] = newState;\n return newState;\n },\n\n /**\n * !#en\n * Remove clip from the animation list. This will remove the clip and any animation states based on it.\n * If there are animation states depand on the clip are playing or clip is defaultClip, it will not delete the clip.\n * But if force is true, then will always remove the clip and any animation states based on it. If clip is defaultClip, defaultClip will be reset to null\n * !#zh\n * 从动画列表中移除指定的动画剪辑,<br/>\n * 如果依赖于 clip 的 AnimationState 正在播放或者 clip 是 defaultClip 的话,默认是不会删除 clip 的。\n * 但是如果 force 参数为 true则会强制停止该动画然后移除该动画剪辑和相关的动画。这时候如果 clip 是 defaultClipdefaultClip 将会被重置为 null。\n * @method removeClip\n * @param {AnimationClip} clip\n * @param {Boolean} [force=false] - If force is true, then will always remove the clip and any animation states based on it.\n */\n removeClip: function (clip, force) {\n if (!clip) {\n cc.warnID(3901);\n return;\n }\n this._init();\n\n let state;\n for (let name in this._nameToState) {\n state = this._nameToState[name];\n if (equalClips(state.clip, clip)) {\n break;\n }\n }\n\n if (clip === this._defaultClip) {\n if (force) this._defaultClip = null;\n else {\n if (!CC_TEST) cc.warnID(3902);\n return;\n }\n }\n\n if (state && state.isPlaying) {\n if (force) this.stop(state.name);\n else {\n if (!CC_TEST) cc.warnID(3903);\n return;\n }\n }\n\n this._clips = this._clips.filter(function (item) {\n return !equalClips(item, clip);\n });\n\n if (state) {\n delete this._nameToState[state.name];\n }\n },\n\n /**\n * !#en\n * Samples animations at the current state.<br/>\n * This is useful when you explicitly want to set up some animation state, and sample it once.\n * !#zh 对指定或当前动画进行采样。你可以手动将动画设置到某一个状态,然后采样一次。\n * @method sample\n * @param {String} name\n */\n sample: function (name) {\n this._init();\n\n if (name) {\n let state = this.getAnimationState(name);\n if (state) {\n state.sample();\n }\n }\n else {\n this._animator.sample();\n }\n },\n\n /**\n * !#en\n * Register animation event callback.\n * The event arguments will provide the AnimationState which emit the event.\n * When play an animation, will auto register the event callback to the AnimationState, and unregister the event callback from the AnimationState when animation stopped.\n * !#zh\n * 注册动画事件回调。\n * 回调的事件里将会附上发送事件的 AnimationState。\n * 当播放一个动画时,会自动将事件注册到对应的 AnimationState 上,停止播放时会将事件从这个 AnimationState 上取消注册。\n * @method on\n * @param {String} type - A string representing the event type to listen for.\n * @param {Function} callback - The callback that will be invoked when the event is dispatched.\n * The callback is ignored if it is a duplicate (the callbacks are unique).\n * @param {cc.AnimationState} state\n * @param {Object} [target] - The target (this object) to invoke the callback, can be null\n * @param {Boolean} [useCapture=false] - When set to true, the capture argument prevents callback\n * from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE.\n * When false, callback will NOT be invoked when event's eventPhase attribute value is CAPTURING_PHASE.\n * Either way, callback will be invoked when event's eventPhase attribute value is AT_TARGET.\n *\n * @return {Function} - Just returns the incoming callback so you can save the anonymous function easier.\n * @typescript\n * on(type: string, callback: (event: Event.EventCustom) => void, target?: any, useCapture?: boolean): (event: Event.EventCustom) => void\n * on<T>(type: string, callback: (event: T) => void, target?: any, useCapture?: boolean): (event: T) => void\n * on(type: string, callback: (type: string, state: cc.AnimationState) => void, target?: any, useCapture?: boolean): (type: string, state: cc.AnimationState) => void\n * @example\n * onPlay: function (type, state) {\n * // callback\n * }\n *\n * // register event to all animation\n * animation.on('play', this.onPlay, this);\n */\n on: function (type, callback, target, useCapture) {\n this._init();\n\n let ret = this._EventTargetOn(type, callback, target, useCapture);\n\n if (type === 'lastframe') {\n let states = this._nameToState;\n for (let name in states) {\n states[name]._lastframeEventOn = true;\n }\n }\n\n return ret;\n },\n\n\n /**\n * !#en\n * Unregister animation event callback.\n * !#zh\n * 取消注册动画事件回调。\n * @method off\n * @param {String} type - A string representing the event type being removed.\n * @param {Function} [callback] - The callback to remove.\n * @param {Object} [target] - The target (this object) to invoke the callback, if it's not given, only callback without target will be removed\n * @param {Boolean} [useCapture=false] - Specifies whether the callback being removed was registered as a capturing callback or not.\n * If not specified, useCapture defaults to false. If a callback was registered twice,\n * one with capture and one without, each must be removed separately. Removal of a capturing callback\n * does not affect a non-capturing version of the same listener, and vice versa.\n *\n * @example\n * // unregister event to all animation\n * animation.off('play', this.onPlay, this);\n */\n off: function (type, callback, target, useCapture) {\n this._init();\n\n if (type === 'lastframe') {\n let states = this._nameToState;\n for (let name in states) {\n states[name]._lastframeEventOn = false;\n }\n }\n\n this._EventTargetOff(type, callback, target, useCapture);\n },\n\n ///////////////////////////////////////////////////////////////////////////////\n // Internal Methods\n ///////////////////////////////////////////////////////////////////////////////\n\n // Dont forget to call _init before every actual process in public methods.\n // Just invoking _init by onLoad is not enough because onLoad is called only if the entity is active.\n\n _init: function () {\n if (this._didInit) {\n return;\n }\n this._didInit = true;\n this._animator = new AnimationAnimator(this.node, this);\n this._createStates();\n },\n\n _createStates: function() {\n this._nameToState = js.createMap(true);\n\n // create animation states\n let state = null;\n let defaultClipState = false;\n for (let i = 0; i < this._clips.length; ++i) {\n let clip = this._clips[i];\n if (clip) {\n state = new cc.AnimationState(clip);\n\n if (CC_EDITOR) {\n this._animator._reloadClip(state);\n }\n\n this._nameToState[state.name] = state;\n if (equalClips(this._defaultClip, clip)) {\n defaultClipState = state;\n }\n }\n }\n if (this._defaultClip && !defaultClipState) {\n state = new cc.AnimationState(this._defaultClip);\n\n if (CC_EDITOR) {\n this._animator._reloadClip(state);\n }\n\n this._nameToState[state.name] = state;\n }\n }\n});\n\nAnimation.prototype._EventTargetOn = EventTarget.prototype.on;\nAnimation.prototype._EventTargetOff = EventTarget.prototype.off;\n\ncc.Animation = module.exports = Animation;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst BlockEvents = ['touchstart', 'touchmove', 'touchend',\n 'mousedown', 'mousemove', 'mouseup',\n 'mouseenter', 'mouseleave', 'mousewheel'];\n\nfunction stopPropagation (event) {\n event.stopPropagation();\n}\n\n/**\n * !#en\n * This component will block all input events (mouse and touch) within the bounding box of the node, preventing the input from penetrating into the underlying node, typically for the background of the top UI.<br>\n * This component does not have any API interface and can be added directly to the scene to take effect.\n * !#zh\n * 该组件将拦截所属节点 bounding box 内的所有输入事件(鼠标和触摸),防止输入穿透到下层节点,一般用于上层 UI 的背景。<br>\n * 该组件没有任何 API 接口,直接添加到场景即可生效。\n *\n * @class BlockInputEvents\n * @extends Component\n */\nconst BlockInputEvents = cc.Class({\n name: 'cc.BlockInputEvents',\n extends: require('./CCComponent'),\n editor: {\n menu: 'i18n:MAIN_MENU.component.ui/Block Input Events',\n inspector: 'packages://inspector/inspectors/comps/block-input-events.js',\n help: 'i18n:COMPONENT.help_url.block_input_events',\n },\n\n onEnable () {\n for (var i = 0; i < BlockEvents.length; i++) {\n // supply the 'this' parameter so that the callback could be added and removed correctly,\n // even if the same component is added more than once to a Node.\n this.node.on(BlockEvents[i], stopPropagation, this);\n }\n },\n onDisable () {\n for (var i = 0; i < BlockEvents.length; i++) {\n this.node.off(BlockEvents[i], stopPropagation, this);\n }\n }\n});\n\ncc.BlockInputEvents = module.exports = BlockInputEvents;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst Component = require('./CCComponent');\nconst GraySpriteState = require('../utils/gray-sprite-state');\n\n/**\n * !#en Enum for transition type.\n * !#zh 过渡类型\n * @enum Button.Transition\n */\nlet Transition = cc.Enum({\n /**\n * !#en The none type.\n * !#zh 不做任何过渡\n * @property {Number} NONE\n */\n NONE: 0,\n\n /**\n * !#en The color type.\n * !#zh 颜色过渡\n * @property {Number} COLOR\n */\n COLOR: 1,\n\n /**\n * !#en The sprite type.\n * !#zh 精灵过渡\n * @property {Number} SPRITE\n */\n SPRITE: 2,\n /**\n * !#en The scale type\n * !#zh 缩放过渡\n * @property {Number} SCALE\n */\n SCALE: 3\n});\n\nconst State = cc.Enum({\n NORMAL: 0,\n HOVER: 1,\n PRESSED: 2,\n DISABLED: 3,\n});\n\n/**\n * !#en\n * Button component. Can be pressed or clicked. Button has 4 Transition types:\n * \n * - Button.Transition.NONE // Button will do nothing\n * - Button.Transition.COLOR // Button will change target's color\n * - Button.Transition.SPRITE // Button will change target Sprite's sprite\n * - Button.Transition.SCALE // Button will change target node's scale\n *\n * The button can bind events (but you must be on the button's node to bind events).<br/>\n * The following events can be triggered on all platforms.\n * \n * - cc.Node.EventType.TOUCH_START // Press\n * - cc.Node.EventType.TOUCH_MOVE // After pressing and moving\n * - cc.Node.EventType.TOUCH_END // After pressing and releasing\n * - cc.Node.EventType.TOUCH_CANCEL // Press to cancel\n * \n * The following events are only triggered on the PC platform:\n *\n * - cc.Node.EventType.MOUSE_DOWN\n * - cc.Node.EventType.MOUSE_MOVE\n * - cc.Node.EventType.MOUSE_ENTER\n * - cc.Node.EventType.MOUSE_LEAVE\n * - cc.Node.EventType.MOUSE_UP\n * - cc.Node.EventType.MOUSE_WHEEL\n *\n * User can get the current clicked node with 'event.target' from event object which is passed as parameter in the callback function of click event.\n *\n * !#zh\n * 按钮组件。可以被按下,或者点击。\n *\n * 按钮可以通过修改 Transition 来设置按钮状态过渡的方式:\n * \n * - Button.Transition.NONE // 不做任何过渡\n * - Button.Transition.COLOR // 进行颜色之间过渡\n * - Button.Transition.SPRITE // 进行精灵之间过渡\n * - Button.Transition.SCALE // 进行缩放过渡\n *\n * 按钮可以绑定事件(但是必须要在按钮的 Node 上才能绑定事件):<br/>\n * 以下事件可以在全平台上都触发:\n * \n * - cc.Node.EventType.TOUCH_START // 按下时事件\n * - cc.Node.EventType.TOUCH_MOVE // 按住移动后事件\n * - cc.Node.EventType.TOUCH_END // 按下后松开后事件\n * - cc.Node.EventType.TOUCH_CANCEL // 按下取消事件\n * \n * 以下事件只在 PC 平台上触发:\n * \n * - cc.Node.EventType.MOUSE_DOWN // 鼠标按下时事件\n * - cc.Node.EventType.MOUSE_MOVE // 鼠标按住移动后事件\n * - cc.Node.EventType.MOUSE_ENTER // 鼠标进入目标事件\n * - cc.Node.EventType.MOUSE_LEAVE // 鼠标离开目标事件\n * - cc.Node.EventType.MOUSE_UP // 鼠标松开事件\n * - cc.Node.EventType.MOUSE_WHEEL // 鼠标滚轮事件\n * \n * 用户可以通过获取 __点击事件__ 回调函数的参数 event 的 target 属性获取当前点击对象。\n * @class Button\n * @extends Component\n * @uses GraySpriteState\n * @example\n *\n * // Add an event to the button.\n * button.node.on(cc.Node.EventType.TOUCH_START, function (event) {\n * cc.log(\"This is a callback after the trigger event\");\n * });\n\n * // You could also add a click event\n * //Note: In this way, you can't get the touch event info, so use it wisely.\n * button.node.on('click', function (button) {\n * //The event is a custom event, you could get the Button component via first argument\n * })\n *\n */\nlet Button = cc.Class({\n name: 'cc.Button',\n extends: Component,\n mixins: [GraySpriteState],\n\n ctor () {\n this._pressed = false;\n this._hovered = false;\n this._fromColor = null;\n this._toColor = null;\n this._time = 0;\n this._transitionFinished = true;\n // init _originalScale in __preload()\n this._fromScale = cc.Vec2.ZERO;\n this._toScale = cc.Vec2.ZERO;\n this._originalScale = null;\n\n this._graySpriteMaterial = null;\n this._spriteMaterial = null;\n\n this._sprite = null;\n },\n\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.ui/Button',\n help: 'i18n:COMPONENT.help_url.button',\n inspector: 'packages://inspector/inspectors/comps/button.js',\n executeInEditMode: true\n },\n\n properties: {\n /**\n * !#en\n * Whether the Button is disabled.\n * If true, the Button will trigger event and do transition.\n * !#zh\n * 按钮事件是否被响应,如果为 false则按钮将被禁用。\n * @property {Boolean} interactable\n * @default true\n */\n interactable: {\n default: true,\n tooltip: CC_DEV && 'i18n:COMPONENT.button.interactable',\n notify () {\n this._updateState();\n\n if (!this.interactable) {\n this._resetState();\n }\n },\n animatable: false\n },\n\n _resizeToTarget: {\n animatable: false,\n set (value) {\n if (value) {\n this._resizeNodeToTargetNode();\n }\n }\n },\n\n /**\n * !#en When this flag is true, Button target sprite will turn gray when interactable is false.\n * !#zh 如果这个标记为 true当 button 的 interactable 属性为 false 的时候,会使用内置 shader 让 button 的 target 节点的 sprite 组件变灰\n * @property {Boolean} enableAutoGrayEffect\n */\n enableAutoGrayEffect: {\n default: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.button.auto_gray_effect',\n notify () {\n this._updateDisabledState(true);\n }\n },\n\n /**\n * !#en Transition type\n * !#zh 按钮状态改变时过渡方式。\n * @property {Button.Transition} transition\n * @default Button.Transition.Node\n */\n transition: {\n default: Transition.NONE,\n tooltip: CC_DEV && 'i18n:COMPONENT.button.transition',\n type: Transition,\n animatable: false,\n notify (oldValue) {\n this._updateTransition(oldValue);\n },\n formerlySerializedAs: 'transition'\n },\n\n // color transition\n\n /**\n * !#en Normal state color.\n * !#zh 普通状态下按钮所显示的颜色。\n * @property {Color} normalColor\n */\n normalColor: {\n default: cc.Color.WHITE,\n displayName: 'Normal',\n tooltip: CC_DEV && 'i18n:COMPONENT.button.normal_color',\n notify () {\n if (this.transition === Transition.Color && this._getButtonState() === State.NORMAL) {\n this._getTarget().opacity = this.normalColor.a;\n }\n this._updateState();\n }\n },\n\n /**\n * !#en Pressed state color\n * !#zh 按下状态时按钮所显示的颜色。\n * @property {Color} pressedColor\n */\n pressedColor: {\n default: cc.color(211, 211, 211),\n displayName: 'Pressed',\n tooltip: CC_DEV && 'i18n:COMPONENT.button.pressed_color',\n notify () {\n if (this.transition === Transition.Color && this._getButtonState() === State.PRESSED) {\n this._getTarget().opacity = this.pressedColor.a;\n }\n this._updateState();\n },\n formerlySerializedAs: 'pressedColor'\n },\n\n /**\n * !#en Hover state color\n * !#zh 悬停状态下按钮所显示的颜色。\n * @property {Color} hoverColor\n */\n hoverColor: {\n default: cc.Color.WHITE,\n displayName: 'Hover',\n tooltip: CC_DEV && 'i18n:COMPONENT.button.hover_color',\n notify () {\n if (this.transition === Transition.Color && this._getButtonState() === State.HOVER) {\n this._getTarget().opacity = this.hoverColor.a;\n }\n this._updateState();\n },\n formerlySerializedAs: 'hoverColor'\n },\n\n /**\n * !#en Disabled state color\n * !#zh 禁用状态下按钮所显示的颜色。\n * @property {Color} disabledColor\n */\n disabledColor: {\n default: cc.color(124, 124, 124),\n displayName: 'Disabled',\n tooltip: CC_DEV && 'i18n:COMPONENT.button.disabled_color',\n notify () {\n if (this.transition === Transition.Color && this._getButtonState() === State.DISABLED) {\n this._getTarget().opacity = this.disabledColor.a;\n }\n this._updateState();\n }\n },\n\n /**\n * !#en Color and Scale transition duration\n * !#zh 颜色过渡和缩放过渡时所需时间\n * @property {Number} duration\n */\n duration: {\n default: 0.1,\n range: [0, 10],\n tooltip: CC_DEV && 'i18n:COMPONENT.button.duration',\n },\n\n /**\n * !#en When user press the button, the button will zoom to a scale.\n * The final scale of the button equals (button original scale * zoomScale)\n * !#zh 当用户点击按钮后,按钮会缩放到一个值,这个值等于 Button 原始 scale * zoomScale\n * @property {Number} zoomScale\n */\n zoomScale: {\n default: 1.2,\n tooltip: CC_DEV && 'i18n:COMPONENT.button.zoom_scale'\n },\n\n // sprite transition\n /**\n * !#en Normal state sprite\n * !#zh 普通状态下按钮所显示的 Sprite 。\n * @property {SpriteFrame} normalSprite\n */\n normalSprite: {\n default: null,\n type: cc.SpriteFrame,\n displayName: 'Normal',\n tooltip: CC_DEV && 'i18n:COMPONENT.button.normal_sprite',\n notify () {\n this._updateState();\n }\n },\n\n /**\n * !#en Pressed state sprite\n * !#zh 按下状态时按钮所显示的 Sprite 。\n * @property {SpriteFrame} pressedSprite\n */\n pressedSprite: {\n default: null,\n type: cc.SpriteFrame,\n displayName: 'Pressed',\n tooltip: CC_DEV && 'i18n:COMPONENT.button.pressed_sprite',\n formerlySerializedAs: 'pressedSprite',\n notify () {\n this._updateState();\n }\n },\n\n /**\n * !#en Hover state sprite\n * !#zh 悬停状态下按钮所显示的 Sprite 。\n * @property {SpriteFrame} hoverSprite\n */\n hoverSprite: {\n default: null,\n type: cc.SpriteFrame,\n displayName: 'Hover',\n tooltip: CC_DEV && 'i18n:COMPONENT.button.hover_sprite',\n formerlySerializedAs: 'hoverSprite',\n notify () {\n this._updateState();\n }\n },\n\n /**\n * !#en Disabled state sprite\n * !#zh 禁用状态下按钮所显示的 Sprite 。\n * @property {SpriteFrame} disabledSprite\n */\n disabledSprite: {\n default: null,\n type: cc.SpriteFrame,\n displayName: 'Disabled',\n tooltip: CC_DEV && 'i18n:COMPONENT.button.disabled_sprite',\n notify () {\n this._updateState();\n }\n },\n\n /**\n * !#en\n * Transition target.\n * When Button state changed:\n * If Transition type is Button.Transition.NONE, Button will do nothing\n * If Transition type is Button.Transition.COLOR, Button will change target's color\n * If Transition type is Button.Transition.SPRITE, Button will change target Sprite's sprite\n * !#zh\n * 需要过渡的目标。\n * 当前按钮状态改变规则:\n * -如果 Transition type 选择 Button.Transition.NONE按钮不做任何过渡。\n * -如果 Transition type 选择 Button.Transition.COLOR按钮会对目标颜色进行颜色之间的过渡。\n * -如果 Transition type 选择 Button.Transition.Sprite按钮会对目标 Sprite 进行 Sprite 之间的过渡。\n * @property {Node} target\n */\n target: {\n default: null,\n type: cc.Node,\n tooltip: CC_DEV && \"i18n:COMPONENT.button.target\",\n notify (oldValue) {\n this._applyTarget();\n if (oldValue && this.target !== oldValue) {\n this._unregisterTargetEvent(oldValue);\n }\n }\n },\n\n /**\n * !#en If Button is clicked, it will trigger event's handler\n * !#zh 按钮的点击事件列表。\n * @property {Component.EventHandler[]} clickEvents\n */\n clickEvents: {\n default: [],\n type: cc.Component.EventHandler,\n tooltip: CC_DEV && 'i18n:COMPONENT.button.click_events',\n }\n },\n\n statics: {\n Transition: Transition,\n },\n\n __preload () {\n this._applyTarget();\n this._resetState();\n },\n\n _resetState () {\n this._pressed = false;\n this._hovered = false;\n // // Restore button status\n let target = this._getTarget();\n let transition = this.transition;\n let originalScale = this._originalScale;\n\n if (transition === Transition.COLOR && this.interactable) {\n this._setTargetColor(this.normalColor);\n }\n else if (transition === Transition.SCALE && originalScale) {\n target.setScale(originalScale.x, originalScale.y);\n }\n this._transitionFinished = true;\n },\n\n onEnable () {\n // check sprite frames\n if (this.normalSprite) {\n this.normalSprite.ensureLoadTexture();\n }\n if (this.hoverSprite) {\n this.hoverSprite.ensureLoadTexture();\n }\n if (this.pressedSprite) {\n this.pressedSprite.ensureLoadTexture();\n }\n if (this.disabledSprite) {\n this.disabledSprite.ensureLoadTexture();\n }\n \n if (!CC_EDITOR) {\n this._registerNodeEvent();\n }\n\n this._updateState();\n },\n\n onDisable () {\n this._resetState();\n\n if (!CC_EDITOR) {\n this._unregisterNodeEvent();\n }\n },\n\n _getTarget () {\n return this.target ? this.target : this.node;\n },\n\n _onTargetSpriteFrameChanged (comp) {\n if (this.transition === Transition.SPRITE) {\n this._setCurrentStateSprite(comp.spriteFrame);\n }\n },\n\n _onTargetColorChanged (color) {\n if (this.transition === Transition.COLOR) {\n this._setCurrentStateColor(color);\n }\n },\n\n _onTargetScaleChanged () {\n let target = this._getTarget();\n // update _originalScale if target scale changed\n if (this._originalScale) {\n if (this.transition !== Transition.SCALE || this._transitionFinished) {\n this._originalScale.x = target.scaleX;\n this._originalScale.y = target.scaleY;\n }\n }\n },\n\n _setTargetColor (color) {\n let target = this._getTarget();\n let cloneColor = color.clone();\n target.opacity = cloneColor.a;\n cloneColor.a = 255; // don't set node opacity via node.color.a\n target.color = cloneColor;\n },\n\n _getStateColor (state) {\n switch (state) {\n case State.NORMAL:\n return this.normalColor;\n case State.HOVER:\n return this.hoverColor;\n case State.PRESSED:\n return this.pressedColor;\n case State.DISABLED:\n return this.disabledColor;\n }\n },\n\n _getStateSprite (state) {\n switch (state) {\n case State.NORMAL:\n return this.normalSprite;\n case State.HOVER:\n return this.hoverSprite;\n case State.PRESSED:\n return this.pressedSprite;\n case State.DISABLED:\n return this.disabledSprite;\n }\n },\n\n _setCurrentStateColor (color) {\n switch ( this._getButtonState() ) {\n case State.NORMAL:\n this.normalColor = color;\n break;\n case State.HOVER:\n this.hoverColor = color;\n break;\n case State.PRESSED:\n this.pressedColor = color;\n break;\n case State.DISABLED:\n this.disabledColor = color;\n break;\n }\n },\n\n _setCurrentStateSprite (spriteFrame) {\n switch ( this._getButtonState() ) {\n case State.NORMAL:\n this.normalSprite = spriteFrame;\n break;\n case State.HOVER:\n this.hoverSprite = spriteFrame;\n break;\n case State.PRESSED:\n this.pressedSprite = spriteFrame;\n break;\n case State.DISABLED:\n this.disabledSprite = spriteFrame;\n break;\n }\n },\n\n update (dt) {\n let target = this._getTarget();\n if (this._transitionFinished) return;\n if (this.transition !== Transition.COLOR && this.transition !== Transition.SCALE) return;\n\n this.time += dt;\n let ratio = 1.0;\n if (this.duration > 0) {\n ratio = this.time / this.duration;\n }\n\n // clamp ratio\n if (ratio >= 1) {\n ratio = 1;\n }\n\n if (this.transition === Transition.COLOR) {\n let color = this._fromColor.lerp(this._toColor, ratio);\n this._setTargetColor(color);\n }\n // Skip if _originalScale is invalid\n else if (this.transition === Transition.SCALE && this._originalScale) {\n target.scale = this._fromScale.lerp(this._toScale, ratio);\n }\n\n if (ratio === 1) {\n this._transitionFinished = true;\n }\n\n },\n\n _registerNodeEvent () {\n this.node.on(cc.Node.EventType.TOUCH_START, this._onTouchBegan, this);\n this.node.on(cc.Node.EventType.TOUCH_MOVE, this._onTouchMove, this);\n this.node.on(cc.Node.EventType.TOUCH_END, this._onTouchEnded, this);\n this.node.on(cc.Node.EventType.TOUCH_CANCEL, this._onTouchCancel, this);\n\n this.node.on(cc.Node.EventType.MOUSE_ENTER, this._onMouseMoveIn, this);\n this.node.on(cc.Node.EventType.MOUSE_LEAVE, this._onMouseMoveOut, this);\n },\n\n _unregisterNodeEvent () {\n this.node.off(cc.Node.EventType.TOUCH_START, this._onTouchBegan, this);\n this.node.off(cc.Node.EventType.TOUCH_MOVE, this._onTouchMove, this);\n this.node.off(cc.Node.EventType.TOUCH_END, this._onTouchEnded, this);\n this.node.off(cc.Node.EventType.TOUCH_CANCEL, this._onTouchCancel, this);\n\n this.node.off(cc.Node.EventType.MOUSE_ENTER, this._onMouseMoveIn, this);\n this.node.off(cc.Node.EventType.MOUSE_LEAVE, this._onMouseMoveOut, this);\n },\n\n _registerTargetEvent (target) {\n if (CC_EDITOR) {\n target.on('spriteframe-changed', this._onTargetSpriteFrameChanged, this);\n target.on(cc.Node.EventType.COLOR_CHANGED, this._onTargetColorChanged, this);\n }\n target.on(cc.Node.EventType.SCALE_CHANGED, this._onTargetScaleChanged, this);\n },\n\n _unregisterTargetEvent (target) {\n if (CC_EDITOR) {\n target.off('spriteframe-changed', this._onTargetSpriteFrameChanged, this);\n target.off(cc.Node.EventType.COLOR_CHANGED, this._onTargetColorChanged, this);\n }\n target.off(cc.Node.EventType.SCALE_CHANGED, this._onTargetScaleChanged, this);\n },\n\n _getTargetSprite (target) {\n let sprite = null;\n if (target) {\n sprite = target.getComponent(cc.Sprite);\n }\n return sprite;\n },\n\n _applyTarget () {\n let target = this._getTarget();\n this._sprite = this._getTargetSprite(target);\n if (!this._originalScale) {\n this._originalScale = cc.Vec2.ZERO;\n }\n this._originalScale.x = target.scaleX;\n this._originalScale.y = target.scaleY;\n\n this._registerTargetEvent(target);\n },\n\n // touch event handler\n _onTouchBegan (event) {\n if (!this.interactable || !this.enabledInHierarchy) return;\n\n this._pressed = true;\n this._updateState();\n event.stopPropagation();\n },\n\n _onTouchMove (event) {\n if (!this.interactable || !this.enabledInHierarchy || !this._pressed) return;\n // mobile phone will not emit _onMouseMoveOut,\n // so we have to do hit test when touch moving\n let touch = event.touch;\n let hit = this.node._hitTest(touch.getLocation());\n let target = this._getTarget();\n let originalScale = this._originalScale;\n\n if (this.transition === Transition.SCALE && originalScale) {\n if (hit) {\n this._fromScale.x = originalScale.x;\n this._fromScale.y = originalScale.y;\n this._toScale.x = originalScale.x * this.zoomScale;\n this._toScale.y = originalScale.y * this.zoomScale;\n this._transitionFinished = false;\n } else {\n this.time = 0;\n this._transitionFinished = true;\n target.setScale(originalScale.x, originalScale.y);\n }\n } else {\n let state;\n if (hit) {\n state = State.PRESSED;\n } else {\n state = State.NORMAL;\n }\n this._applyTransition(state);\n }\n event.stopPropagation();\n },\n\n _onTouchEnded (event) {\n if (!this.interactable || !this.enabledInHierarchy) return;\n\n if (this._pressed) {\n cc.Component.EventHandler.emitEvents(this.clickEvents, event);\n this.node.emit('click', this);\n }\n this._pressed = false;\n this._updateState();\n event.stopPropagation();\n },\n\n _onTouchCancel () {\n if (!this.interactable || !this.enabledInHierarchy) return;\n\n this._pressed = false;\n this._updateState();\n },\n\n _onMouseMoveIn () {\n if (this._pressed || !this.interactable || !this.enabledInHierarchy) return;\n if (this.transition === Transition.SPRITE && !this.hoverSprite) return;\n\n if (!this._hovered) {\n this._hovered = true;\n this._updateState();\n }\n },\n\n _onMouseMoveOut () {\n if (this._hovered) {\n this._hovered = false;\n this._updateState();\n }\n },\n\n // state handler\n _updateState () {\n let state = this._getButtonState();\n this._applyTransition(state);\n this._updateDisabledState();\n },\n\n _getButtonState () {\n let state;\n if (!this.interactable) {\n state = State.DISABLED;\n }\n else if (this._pressed) {\n state = State.PRESSED;\n }\n else if (this._hovered) {\n state = State.HOVER;\n }\n else {\n state = State.NORMAL;\n }\n return state;\n },\n\n _updateColorTransitionImmediately (state) {\n let color = this._getStateColor(state);\n this._setTargetColor(color);\n this._fromColor = color.clone();\n this._toColor = color;\n },\n\n _updateColorTransition (state) {\n if (CC_EDITOR || state === State.DISABLED) {\n this._updateColorTransitionImmediately(state);\n } else {\n let target = this._getTarget();\n let color = this._getStateColor(state);\n this._fromColor = target.color.clone();\n this._toColor = color;\n this.time = 0;\n this._transitionFinished = false;\n }\n },\n\n _updateSpriteTransition (state) {\n let sprite = this._getStateSprite(state);\n if (this._sprite && sprite) {\n this._sprite.spriteFrame = sprite;\n }\n },\n\n _updateScaleTransition (state) {\n if (state === State.PRESSED) {\n this._zoomUp();\n } else {\n this._zoomBack();\n }\n },\n\n _zoomUp () {\n // skip before __preload()\n if (!this._originalScale) {\n return;\n }\n\n this._fromScale.x = this._originalScale.x;\n this._fromScale.y = this._originalScale.y;\n this._toScale.x = this._originalScale.x * this.zoomScale;\n this._toScale.y = this._originalScale.y * this.zoomScale;\n this.time = 0;\n this._transitionFinished = false;\n },\n\n _zoomBack () {\n // skip before __preload()\n if (!this._originalScale) {\n return;\n }\n\n let target = this._getTarget();\n this._fromScale.x = target.scaleX;\n this._fromScale.y = target.scaleY;\n this._toScale.x = this._originalScale.x;\n this._toScale.y = this._originalScale.y;\n this.time = 0;\n this._transitionFinished = false;\n },\n\n _updateTransition (oldTransition) {\n // Reset to normal data when change transition.\n if (oldTransition === Transition.COLOR) {\n this._updateColorTransitionImmediately(State.NORMAL);\n }\n else if (oldTransition === Transition.SPRITE) {\n this._updateSpriteTransition(State.NORMAL);\n }\n this._updateState();\n },\n\n _applyTransition (state) {\n let transition = this.transition;\n if (transition === Transition.COLOR) {\n this._updateColorTransition(state);\n } else if (transition === Transition.SPRITE) {\n this._updateSpriteTransition(state);\n } else if (transition === Transition.SCALE) {\n this._updateScaleTransition(state);\n }\n },\n\n _resizeNodeToTargetNode: CC_EDITOR && function () {\n this.node.setContentSize(this._getTarget().getContentSize());\n },\n\n _updateDisabledState (force) {\n if (!this._sprite) return;\n\n if (this.enableAutoGrayEffect || force) {\n let useGrayMaterial = false;\n\n if (!(this.transition === Transition.SPRITE && this.disabledSprite)) {\n useGrayMaterial = this.enableAutoGrayEffect && !this.interactable;\n }\n this._switchGrayMaterial(useGrayMaterial, this._sprite);\n }\n }\n});\n\ncc.Button = module.exports = Button;\n\n/**\n * !#en\n * Note: This event is emitted from the node to which the component belongs.\n * !#zh\n * 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。\n * @event click\n * @param {Event.EventCustom} event\n * @param {Button} button - The Button component.\n */\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar Camera = require('../camera/CCCamera');\nvar Component = require('./CCComponent');\n\n// Screen adaptation strategy for Canvas + Widget\nfunction resetWidgetComponent (canvas) {\n let widget = canvas.node.getComponent(cc.Widget);\n if (!widget) {\n widget = canvas.node.addComponent(cc.Widget);\n }\n widget.isAlignTop = true;\n widget.isAlignBottom = true;\n widget.isAlignLeft = true;\n widget.isAlignRight = true;\n widget.top = 0;\n widget.bottom = 0;\n widget.left = 0;\n widget.right = 0;\n}\n\n/**\n * !#zh 作为 UI 根节点,为所有子节点提供视窗四边的位置信息以供对齐,另外提供屏幕适配策略接口,方便从编辑器设置。<br>\n * 注:由于本节点的尺寸会跟随屏幕拉伸,所以 anchorPoint 只支持 (0.5, 0.5),否则适配不同屏幕时坐标会有偏差。\n *\n * @class Canvas\n * @extends Component\n */\nvar Canvas = cc.Class({\n name: 'cc.Canvas',\n extends: Component,\n\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.ui/Canvas',\n help: 'i18n:COMPONENT.help_url.canvas',\n executeInEditMode: true,\n disallowMultiple: true,\n },\n\n resetInEditor: CC_EDITOR && function () {\n _Scene._applyCanvasPreferences(this);\n resetWidgetComponent(this);\n },\n\n statics: {\n /**\n * !#en Current active canvas, the scene should only have one active canvas at the same time.\n * !#zh 当前激活的画布组件,场景同一时间只能有一个激活的画布。\n * @property {Canvas} instance\n * @static\n */\n instance: null\n },\n\n properties: {\n\n /**\n * !#en The desigin resolution for current scene.\n * !#zh 当前场景设计分辨率。\n * @property {Size} designResolution\n * @default new cc.Size(960, 640)\n */\n _designResolution: cc.size(960, 640),\n designResolution: {\n get: function () {\n return cc.size(this._designResolution);\n },\n set: function (value) {\n this._designResolution.width = value.width;\n this._designResolution.height = value.height;\n this.applySettings();\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.canvas.design_resolution'\n },\n\n _fitWidth: false,\n _fitHeight: true,\n\n /**\n * !#en TODO\n * !#zh: 是否优先将设计分辨率高度撑满视图高度。\n * @property {Boolean} fitHeight\n * @default false\n */\n fitHeight: {\n get: function () {\n return this._fitHeight;\n },\n set: function (value) {\n if (this._fitHeight !== value) {\n this._fitHeight = value;\n this.applySettings();\n }\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.canvas.fit_height'\n },\n\n /**\n * !#en TODO\n * !#zh: 是否优先将设计分辨率宽度撑满视图宽度。\n * @property {Boolean} fitWidth\n * @default false\n */\n fitWidth: {\n get: function () {\n return this._fitWidth;\n },\n set: function (value) {\n if (this._fitWidth !== value) {\n this._fitWidth = value;\n this.applySettings();\n }\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.canvas.fit_width'\n }\n },\n\n // fit canvas node to design resolution\n _fitDesignResolution: CC_EDITOR && function () {\n // TODO: support paddings of locked widget\n var designSize = cc.engine.getDesignResolutionSize();\n this.node.setPosition(designSize.width * 0.5, designSize.height * 0.5);\n this.node.setContentSize(designSize);\n },\n\n __preload: function () {\n if (CC_DEV) {\n var Flags = cc.Object.Flags;\n this._objFlags |= (Flags.IsPositionLocked | Flags.IsAnchorLocked | Flags.IsSizeLocked);\n }\n\n if (Canvas.instance) {\n return cc.warnID(6700,\n this.node.name, Canvas.instance.node.name);\n }\n Canvas.instance = this;\n\n // Align node to fit the screen\n this.applySettings();\n\n // Stretch to matched size during the scene initialization\n let widget = this.getComponent(cc.Widget);\n if (widget) {\n widget.updateAlignment();\n }\n else if (CC_EDITOR) {\n this._fitDesignResolution();\n }\n\n // Constantly align canvas node in edit mode\n if (CC_EDITOR) {\n cc.director.on(cc.Director.EVENT_AFTER_UPDATE, this._fitDesignResolution, this);\n cc.engine.on('design-resolution-changed', this._fitDesignResolution, this);\n }\n },\n\n start () {\n if (!Camera.main && cc.game.renderType !== cc.game.RENDER_TYPE_CANVAS) {\n // Create default Main Camera\n let cameraNode = new cc.Node('Main Camera');\n cameraNode.parent = this.node;\n cameraNode.setSiblingIndex(0);\n\n let camera = cameraNode.addComponent(Camera);\n let ClearFlags = Camera.ClearFlags;\n camera.clearFlags = ClearFlags.COLOR | ClearFlags.DEPTH | ClearFlags.STENCIL;\n camera.depth = -1;\n }\n },\n\n onDestroy: function () {\n if (CC_EDITOR) {\n cc.director.off(cc.Director.EVENT_AFTER_UPDATE, this._fitDesignResolution, this);\n cc.engine.off('design-resolution-changed', this._fitDesignResolution, this);\n }\n\n if (Canvas.instance === this) {\n Canvas.instance = null;\n }\n },\n\n applySettings: function () {\n var ResolutionPolicy = cc.ResolutionPolicy;\n var policy;\n\n if (this.fitHeight && this.fitWidth) {\n policy = ResolutionPolicy.SHOW_ALL;\n }\n else if (!this.fitHeight && !this.fitWidth) {\n policy = ResolutionPolicy.NO_BORDER;\n }\n else if (this.fitWidth) {\n policy = ResolutionPolicy.FIXED_WIDTH;\n }\n else { // fitHeight\n policy = ResolutionPolicy.FIXED_HEIGHT;\n }\n\n var designRes = this._designResolution;\n if (CC_EDITOR) {\n cc.engine.setDesignResolutionSize(designRes.width, designRes.height);\n }\n else {\n cc.view.setDesignResolutionSize(designRes.width, designRes.height, policy);\n }\n }\n});\n\n\ncc.Canvas = module.exports = Canvas;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar CCObject = require('../platform/CCObject');\nvar js = require('../platform/js');\nvar idGenerater = new (require('../platform/id-generater'))('Comp');\n\nvar IsOnEnableCalled = CCObject.Flags.IsOnEnableCalled;\nvar IsOnLoadCalled = CCObject.Flags.IsOnLoadCalled;\n\nvar ActionManagerExist = !!cc.ActionManager;\n\n/**\n * !#en\n * Base class for everything attached to Node(Entity).<br/>\n * <br/>\n * NOTE: Not allowed to use construction parameters for Component's subclasses,\n * because Component is created by the engine.\n * !#zh\n * 所有附加到节点的基类。<br/>\n * <br/>\n * 注意:不允许使用组件的子类构造参数,因为组件是由引擎创建的。\n *\n * @class Component\n * @extends Object\n */\nvar Component = cc.Class({\n name: 'cc.Component',\n extends: CCObject,\n\n ctor: CC_EDITOR ? function () {\n if ((typeof _Scene !== \"undefined\") && _Scene.AssetsWatcher) {\n _Scene.AssetsWatcher.initComponent(this);\n }\n this._id = Editor.Utils.UuidUtils.uuid();\n\n /**\n * !#en\n * Register all related EventTargets,\n * all event callbacks will be removed in `_onPreDestroy`.\n * !#zh\n * 注册所有相关的 EventTargets所有事件回调将在 `_onPreDestroy` 中删除。\n * @property {Array} __eventTargets\n * @private\n */\n this.__eventTargets = [];\n } : function () {\n this._id = idGenerater.getNewId();\n\n this.__eventTargets = [];\n },\n\n properties: {\n /**\n * !#en The node this component is attached to. A component is always attached to a node.\n * !#zh 该组件被附加到的节点。组件总会附加到一个节点。\n * @property node\n * @type {Node}\n * @example\n * cc.log(comp.node);\n */\n node: {\n default: null,\n visible: false\n },\n\n name: {\n get () {\n if (this._name) {\n return this._name;\n }\n var className = cc.js.getClassName(this);\n var trimLeft = className.lastIndexOf('.');\n if (trimLeft >= 0) {\n className = className.slice(trimLeft + 1);\n }\n return this.node.name + '<' + className + '>';\n },\n set (value) {\n this._name = value;\n },\n visible: false\n },\n\n /**\n * !#en The uuid for editor.\n * !#zh 组件的 uuid用于编辑器。\n * @property uuid\n * @type {String}\n * @readOnly\n * @example\n * cc.log(comp.uuid);\n */\n uuid: {\n get () {\n return this._id;\n },\n visible: false\n },\n\n __scriptAsset: CC_EDITOR && {\n get () {},\n //set (value) {\n // if (this.__scriptUuid !== value) {\n // if (value && Editor.Utils.UuidUtils.isUuid(value._uuid)) {\n // var classId = Editor.Utils.UuidUtils.compressUuid(value._uuid);\n // var NewComp = cc.js._getClassById(classId);\n // if (js.isChildClassOf(NewComp, cc.Component)) {\n // cc.warn('Sorry, replacing component script is not yet implemented.');\n // //Editor.Ipc.sendToWins('reload:window-scripts', Editor._Sandbox.compiled);\n // }\n // else {\n // cc.error('Can not find a component in the script which uuid is \"%s\".', value._uuid);\n // }\n // }\n // else {\n // cc.error('Invalid Script');\n // }\n // }\n //},\n displayName: 'Script',\n type: cc._Script,\n tooltip: CC_DEV && 'i18n:INSPECTOR.component.script'\n },\n\n /**\n * @property _enabled\n * @type {Boolean}\n * @private\n */\n _enabled: true,\n\n /**\n * !#en indicates whether this component is enabled or not.\n * !#zh 表示该组件自身是否启用。\n * @property enabled\n * @type {Boolean}\n * @default true\n * @example\n * comp.enabled = true;\n * cc.log(comp.enabled);\n */\n enabled: {\n get () {\n return this._enabled;\n },\n set (value) {\n if (this._enabled !== value) {\n this._enabled = value;\n if (this.node._activeInHierarchy) {\n var compScheduler = cc.director._compScheduler;\n if (value) {\n compScheduler.enableComp(this);\n }\n else {\n compScheduler.disableComp(this);\n }\n }\n }\n },\n visible: false,\n animatable: true\n },\n\n /**\n * !#en indicates whether this component is enabled and its node is also active in the hierarchy.\n * !#zh 表示该组件是否被启用并且所在的节点也处于激活状态。\n * @property enabledInHierarchy\n * @type {Boolean}\n * @readOnly\n * @example\n * cc.log(comp.enabledInHierarchy);\n */\n enabledInHierarchy: {\n get () {\n if (CC_EDITOR) {\n // _activeInHierarchy will not be updated before node's onRestore\n return this._enabled && this.node?._active && this.node?._parent?._activeInHierarchy;\n }\n return this._enabled && this.node && this.node._activeInHierarchy;\n },\n visible: false\n },\n\n /**\n * !#en Returns a value which used to indicate the onLoad get called or not.\n * !#zh 返回一个值用来判断 onLoad 是否被调用过,不等于 0 时调用过,等于 0 时未调用。\n * @property _isOnLoadCalled\n * @type {Number}\n * @readOnly\n * @example\n * cc.log(this._isOnLoadCalled > 0);\n */\n _isOnLoadCalled: {\n get () {\n return this._objFlags & IsOnLoadCalled;\n }\n },\n },\n\n // LIFECYCLE METHODS\n\n // Fireball provides lifecycle methods that you can specify to hook into this process.\n // We provide Pre methods, which are called right before something happens, and Post methods which are called right after something happens.\n\n /**\n * !#en Update is called every frame, if the Component is enabled.<br/>\n * This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere.\n * !#zh 如果该组件启用,则每帧调用 update。<br/>\n * 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。\n * @method update\n * @param {Number} dt - the delta time in seconds it took to complete the last frame\n * @protected\n */\n update: null,\n\n /**\n * !#en LateUpdate is called every frame, if the Component is enabled.<br/>\n * This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere.\n * !#zh 如果该组件启用,则每帧调用 LateUpdate。<br/>\n * 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。\n * @method lateUpdate\n * @param {Number} dt - the delta time in seconds it took to complete the last frame\n * @protected\n */\n lateUpdate: null,\n\n /**\n * `__preload` is called before every onLoad.\n * It is used to initialize the builtin components internally,\n * to avoid checking whether onLoad is called before every public method calls.\n * This method should be removed if script priority is supported.\n *\n * @method __preload\n * @private\n */\n __preload: null,\n\n /**\n * !#en\n * When attaching to an active node or its node first activated.\n * onLoad is always called before any start functions, this allows you to order initialization of scripts.<br/>\n * This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere.\n * !#zh\n * 当附加到一个激活的节点上或者其节点第一次激活时候调用。onLoad 总是会在任何 start 方法调用前执行,这能用于安排脚本的初始化顺序。<br/>\n * 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。\n * @method onLoad\n * @protected\n */\n onLoad: null,\n\n /**\n * !#en\n * Called before all scripts' update if the Component is enabled the first time.\n * Usually used to initialize some logic which need to be called after all components' `onload` methods called.<br/>\n * This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere.\n * !#zh\n * 如果该组件第一次启用,则在所有组件的 update 之前调用。通常用于需要在所有组件的 onLoad 初始化完毕后执行的逻辑。<br/>\n * 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。\n * @method start\n * @protected\n */\n start: null,\n\n /**\n * !#en Called when this component becomes enabled and its node is active.<br/>\n * This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere.\n * !#zh 当该组件被启用,并且它的节点也激活时。<br/>\n * 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。\n * @method onEnable\n * @protected\n */\n onEnable: null,\n\n /**\n * !#en Called when this component becomes disabled or its node becomes inactive.<br/>\n * This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere.\n * !#zh 当该组件被禁用或节点变为无效时调用。<br/>\n * 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。\n * @method onDisable\n * @protected\n */\n onDisable: null,\n\n /**\n * !#en Called when this component will be destroyed.<br/>\n * This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere.\n * !#zh 当该组件被销毁时调用<br/>\n * 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。\n * @method onDestroy\n * @protected\n */\n onDestroy: null,\n\n /**\n * @method onFocusInEditor\n * @protected\n */\n onFocusInEditor: null,\n /**\n * @method onLostFocusInEditor\n * @protected\n */\n onLostFocusInEditor: null,\n /**\n * !#en Called to initialize the component or nodes properties when adding the component the first time or when the Reset command is used. This function is only called in editor.\n * !#zh 用来初始化组件或节点的一些属性,当该组件被第一次添加到节点上或用户点击了它的 Reset 菜单时调用。这个回调只会在编辑器下调用。\n * @method resetInEditor\n * @protected\n */\n resetInEditor: null,\n\n // PUBLIC\n\n /**\n * !#en Adds a component class to the node. You can also add component to node by passing in the name of the script.\n * !#zh 向节点添加一个组件类,你还可以通过传入脚本的名称来添加组件。\n *\n * @method addComponent\n * @param {Function|String} typeOrClassName - the constructor or the class name of the component to add\n * @return {Component} - the newly added component\n * @example\n * var sprite = node.addComponent(cc.Sprite);\n * var test = node.addComponent(\"Test\");\n * @typescript\n * addComponent<T extends Component>(type: {new(): T}): T\n * addComponent(className: string): any\n */\n addComponent (typeOrClassName) {\n return this.node.addComponent(typeOrClassName);\n },\n\n /**\n * !#en\n * Returns the component of supplied type if the node has one attached, null if it doesn't.<br/>\n * You can also get component in the node by passing in the name of the script.\n * !#zh\n * 获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。<br/>\n * 传入参数也可以是脚本的名称。\n *\n * @method getComponent\n * @param {Function|String} typeOrClassName\n * @return {Component}\n * @example\n * // get sprite component.\n * var sprite = node.getComponent(cc.Sprite);\n * // get custom test calss.\n * var test = node.getComponent(\"Test\");\n * @typescript\n * getComponent<T extends Component>(type: {prototype: T}): T\n * getComponent(className: string): any\n */\n getComponent (typeOrClassName) {\n return this.node.getComponent(typeOrClassName);\n },\n\n /**\n * !#en Returns all components of supplied Type in the node.\n * !#zh 返回节点上指定类型的所有组件。\n *\n * @method getComponents\n * @param {Function|String} typeOrClassName\n * @return {Component[]}\n * @example\n * var sprites = node.getComponents(cc.Sprite);\n * var tests = node.getComponents(\"Test\");\n * @typescript\n * getComponents<T extends Component>(type: {prototype: T}): T[]\n * getComponents(className: string): any[]\n */\n getComponents (typeOrClassName) {\n return this.node.getComponents(typeOrClassName);\n },\n\n /**\n * !#en Returns the component of supplied type in any of its children using depth first search.\n * !#zh 递归查找所有子节点中第一个匹配指定类型的组件。\n *\n * @method getComponentInChildren\n * @param {Function|String} typeOrClassName\n * @returns {Component}\n * @example\n * var sprite = node.getComponentInChildren(cc.Sprite);\n * var Test = node.getComponentInChildren(\"Test\");\n * @typescript\n * getComponentInChildren<T extends Component>(type: {prototype: T}): T\n * getComponentInChildren(className: string): any\n */\n getComponentInChildren (typeOrClassName) {\n return this.node.getComponentInChildren(typeOrClassName);\n },\n\n /**\n * !#en Returns the components of supplied type in self or any of its children using depth first search.\n * !#zh 递归查找自身或所有子节点中指定类型的组件\n *\n * @method getComponentsInChildren\n * @param {Function|String} typeOrClassName\n * @returns {Component[]}\n * @example\n * var sprites = node.getComponentsInChildren(cc.Sprite);\n * var tests = node.getComponentsInChildren(\"Test\");\n * @typescript\n * getComponentsInChildren<T extends Component>(type: {prototype: T}): T[]\n * getComponentsInChildren(className: string): any[]\n */\n getComponentsInChildren (typeOrClassName) {\n return this.node.getComponentsInChildren(typeOrClassName);\n },\n\n // VIRTUAL\n\n /**\n * !#en\n * If the component's bounding box is different from the node's, you can implement this method to supply\n * a custom axis aligned bounding box (AABB), so the editor's scene view can perform hit test properly.\n * !#zh\n * 如果组件的包围盒与节点不同您可以实现该方法以提供自定义的轴向对齐的包围盒AABB\n * 以便编辑器的场景视图可以正确地执行点选测试。\n *\n * @method _getLocalBounds\n * @param {Rect} out_rect - the Rect to receive the bounding box\n */\n _getLocalBounds: null,\n\n /**\n * !#en\n * onRestore is called after the user clicks the Reset item in the Inspector's context menu or performs\n * an undo operation on this component.<br/>\n * <br/>\n * If the component contains the \"internal state\", short for \"temporary member variables which not included<br/>\n * in its CCClass properties\", then you may need to implement this function.<br/>\n * <br/>\n * The editor will call the getset accessors of your component to record/restore the component's state<br/>\n * for undo/redo operation. However, in extreme cases, it may not works well. Then you should implement<br/>\n * this function to manually synchronize your component's \"internal states\" with its public properties.<br/>\n * Once you implement this function, all the getset accessors of your component will not be called when<br/>\n * the user performs an undo/redo operation. Which means that only the properties with default value<br/>\n * will be recorded or restored by editor.<br/>\n * <br/>\n * Similarly, the editor may failed to reset your component correctly in extreme cases. Then if you need<br/>\n * to support the reset menu, you should manually synchronize your component's \"internal states\" with its<br/>\n * properties in this function. Once you implement this function, all the getset accessors of your component<br/>\n * will not be called during reset operation. Which means that only the properties with default value<br/>\n * will be reset by editor.\n *\n * This function is only called in editor mode.\n * !#zh\n * onRestore 是用户在检查器菜单点击 Reset 时,对此组件执行撤消操作后调用的。<br/>\n * <br/>\n * 如果组件包含了“内部状态”(不在 CCClass 属性中定义的临时成员变量),那么你可能需要实现该方法。<br/>\n * <br/>\n * 编辑器执行撤销/重做操作时,将调用组件的 get set 来录制和还原组件的状态。然而,在极端的情况下,它可能无法良好运作。<br/>\n * 那么你就应该实现这个方法,手动根据组件的属性同步“内部状态”。一旦你实现这个方法,当用户撤销或重做时,组件的所有 get set 都不会再被调用。这意味着仅仅指定了默认值的属性将被编辑器记录和还原。<br/>\n * <br/>\n * 同样的,编辑可能无法在极端情况下正确地重置您的组件。如果你需要支持组件重置菜单,则需要在该方法中手工同步组件属性到“内部状态”。一旦你实现这个方法,组件的所有 get set 都不会在重置操作时被调用。这意味着仅仅指定了默认值的属性将被编辑器重置。\n * <br/>\n * 此方法仅在编辑器下会被调用。\n * @method onRestore\n */\n onRestore: null,\n\n // OVERRIDE\n\n destroy () {\n if (CC_EDITOR) {\n var depend = this.node._getDependComponent(this);\n if (depend) {\n return cc.errorID(3626,\n cc.js.getClassName(this), cc.js.getClassName(depend));\n }\n }\n if (this._super()) {\n if (this._enabled && this.node._activeInHierarchy) {\n cc.director._compScheduler.disableComp(this);\n }\n }\n },\n\n _onPreDestroy () {\n if (ActionManagerExist) {\n cc.director.getActionManager().removeAllActionsFromTarget(this);\n }\n\n // Schedules\n this.unscheduleAllCallbacks();\n\n // Remove all listeners\n var eventTargets = this.__eventTargets;\n for (var i = eventTargets.length - 1; i >= 0; --i) {\n var target = eventTargets[i];\n target && target.targetOff(this);\n }\n eventTargets.length = 0;\n\n //\n if (CC_EDITOR && !CC_TEST) {\n _Scene.AssetsWatcher.stop(this);\n }\n\n // onDestroy\n cc.director._nodeActivator.destroyComp(this);\n\n // do remove component\n this.node._removeComponent(this);\n },\n\n _instantiate (cloned) {\n if (!cloned) {\n cloned = cc.instantiate._clone(this, this);\n }\n cloned.node = null;\n return cloned;\n },\n\n// Scheduler\n\n /**\n * !#en\n * Schedules a custom selector.<br/>\n * If the selector is already scheduled, then the interval parameter will be updated without scheduling it again.\n * !#zh\n * 调度一个自定义的回调函数。<br/>\n * 如果回调函数已调度,那么将不会重复调度它,只会更新时间间隔参数。\n * @method schedule\n * @param {function} callback The callback function\n * @param {Number} [interval=0] Tick interval in seconds. 0 means tick every frame.\n * @param {Number} [repeat=cc.macro.REPEAT_FOREVER] The selector will be executed (repeat + 1) times, you can use cc.macro.REPEAT_FOREVER for tick infinitely.\n * @param {Number} [delay=0] The amount of time that the first tick will wait before execution. Unit: s\n * @example\n * var timeCallback = function (dt) {\n * cc.log(\"time: \" + dt);\n * }\n * this.schedule(timeCallback, 1);\n */\n schedule (callback, interval, repeat, delay) {\n cc.assertID(callback, 1619);\n\n interval = interval || 0;\n cc.assertID(interval >= 0, 1620);\n\n repeat = isNaN(repeat) ? cc.macro.REPEAT_FOREVER : repeat;\n delay = delay || 0;\n\n var scheduler = cc.director.getScheduler();\n\n // should not use enabledInHierarchy to judge whether paused,\n // because enabledInHierarchy is assigned after onEnable.\n // Actually, if not yet scheduled, resumeTarget/pauseTarget has no effect on component,\n // therefore there is no way to guarantee the paused state other than isTargetPaused.\n var paused = scheduler.isTargetPaused(this);\n\n scheduler.schedule(callback, this, interval, repeat, delay, paused);\n },\n\n /**\n * !#en Schedules a callback function that runs only once, with a delay of 0 or larger.\n * !#zh 调度一个只运行一次的回调函数,可以指定 0 让回调函数在下一帧立即执行或者在一定的延时之后执行。\n * @method scheduleOnce\n * @see cc.Node#schedule\n * @param {function} callback A function wrapped as a selector\n * @param {Number} [delay=0] The amount of time that the first tick will wait before execution. Unit: s\n * @example\n * var timeCallback = function (dt) {\n * cc.log(\"time: \" + dt);\n * }\n * this.scheduleOnce(timeCallback, 2);\n */\n scheduleOnce (callback, delay) {\n this.schedule(callback, 0, 0, delay);\n },\n\n /**\n * !#en Unschedules a custom callback function.\n * !#zh 取消调度一个自定义的回调函数。\n * @method unschedule\n * @see cc.Node#schedule\n * @param {function} callback_fn A function wrapped as a selector\n * @example\n * this.unschedule(_callback);\n */\n unschedule (callback_fn) {\n if (!callback_fn)\n return;\n\n cc.director.getScheduler().unschedule(callback_fn, this);\n },\n\n /**\n * !#en\n * unschedule all scheduled callback functions: custom callback functions, and the 'update' callback function.<br/>\n * Actions are not affected by this method.\n * !#zh 取消调度所有已调度的回调函数:定制的回调函数以及 `update` 回调函数。动作不受此方法影响。\n * @method unscheduleAllCallbacks\n * @example\n * this.unscheduleAllCallbacks();\n */\n unscheduleAllCallbacks () {\n cc.director.getScheduler().unscheduleAllForTarget(this);\n },\n});\n\nComponent._requireComponent = null;\nComponent._executionOrder = 0;\nif (CC_EDITOR && CC_PREVIEW) Component._disallowMultiple = null;\n\nif (CC_EDITOR || CC_TEST) {\n\n // INHERITABLE STATIC MEMBERS\n\n Component._executeInEditMode = false;\n Component._playOnFocus = false;\n Component._help = '';\n\n // NON-INHERITED STATIC MEMBERS\n // (TypeScript 2.3 will still inherit them, so always check hasOwnProperty before using)\n\n js.value(Component, '_inspector', '', true);\n js.value(Component, '_icon', '', true);\n\n // COMPONENT HELPERS\n\n cc._componentMenuItems = [];\n\n Component._addMenuItem = function (cls, path, priority) {\n cc._componentMenuItems.push({\n component: cls,\n menuPath: path,\n priority: priority\n });\n };\n}\n\n// We make this non-enumerable, to prevent inherited by sub classes.\njs.value(Component, '_registerEditorProps', function (cls, props) {\n var reqComp = props.requireComponent;\n if (reqComp) {\n cls._requireComponent = reqComp;\n }\n var order = props.executionOrder;\n if (order && typeof order === 'number') {\n cls._executionOrder = order;\n }\n if ((CC_EDITOR || CC_PREVIEW) && 'disallowMultiple' in props) {\n cls._disallowMultiple = cls;\n }\n if (CC_EDITOR || CC_TEST) {\n var name = cc.js.getClassName(cls);\n for (var key in props) {\n var val = props[key];\n switch (key) {\n case 'executeInEditMode':\n cls._executeInEditMode = !!val;\n break;\n\n case 'playOnFocus':\n if (val) {\n var willExecuteInEditMode = ('executeInEditMode' in props) ? props.executeInEditMode : cls._executeInEditMode;\n if (willExecuteInEditMode) {\n cls._playOnFocus = true;\n }\n else {\n cc.warnID(3601, name);\n }\n }\n break;\n\n case 'inspector':\n js.value(cls, '_inspector', val, true);\n break;\n\n case 'icon':\n js.value(cls, '_icon', val, true);\n break;\n\n case 'menu':\n Component._addMenuItem(cls, val, props.menuPriority);\n break;\n\n case 'requireComponent':\n case 'executionOrder':\n case 'disallowMultiple':\n // skip here\n break;\n\n case 'help':\n cls._help = val;\n break;\n\n default:\n cc.warnID(3602, key, name);\n break;\n }\n }\n }\n});\n\nComponent.prototype.__scriptUuid = '';\n\ncc.Component = module.exports = Component;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * !#en\n * Component will register a event to target component's handler.\n * And it will trigger the handler when a certain event occurs.\n *\n * !@zh\n * “EventHandler” 类用来设置场景中的事件回调,\n * 该类允许用户设置回调目标节点,目标组件名,组件方法名,\n * 并可通过 emit 方法调用目标函数。\n * @class Component.EventHandler\n * @example\n * // Let's say we have a MainMenu component on newTarget\n * // file: MainMenu.js\n * cc.Class({\n * extends: cc.Component,\n * // sender: the node MainMenu.js belongs to\n * // eventType: CustomEventData\n * onClick (sender, eventType) {\n * cc.log('click');\n * }\n * })\n * // Create new EventHandler\n * var eventHandler = new cc.Component.EventHandler();\n * eventHandler.target = newTarget;\n * eventHandler.component = \"MainMenu\";\n * eventHandler.handler = \"onClick\";\n * eventHandler.customEventData = \"my data\";\n */\ncc.Component.EventHandler = cc.Class({\n name: 'cc.ClickEvent',\n properties: {\n /**\n * !#en the node that contains target callback, such as the node example script belongs to\n * !#zh 事件响应函数所在节点 ,比如例子中脚本归属的节点本身\n * @property target\n * @type {Node}\n * @default null\n */\n target: {\n default: null,\n type: cc.Node,\n },\n /**\n * !#en name of the component(script) that contains target callback, such as the name 'MainMenu' of script in example\n * !#zh 事件响应函数所在组件名(脚本名), 比如例子中的脚本名 'MainMenu'\n * @property component\n * @type {String}\n * @default ''\n */\n // only for deserializing old project component field\n component: '',\n _componentId: '',\n _componentName: {\n get () {\n this._genCompIdIfNeeded();\n\n return this._compId2Name(this._componentId);\n },\n set (value) {\n this._componentId = this._compName2Id(value);\n },\n },\n /**\n * !#en Event handler, such as function's name 'onClick' in example\n * !#zh 响应事件函数名,比如例子中的 'onClick'\n * @property handler\n * @type {String}\n * @default ''\n */\n handler: {\n default: '',\n },\n\n /**\n * !#en Custom Event Data, such as 'eventType' in example\n * !#zh 自定义事件数据,比如例子中的 eventType\n * @property customEventData\n * @default ''\n * @type {String}\n */\n customEventData: {\n default: ''\n }\n },\n\n statics: {\n /**\n * @method emitEvents\n * @param {Component.EventHandler[]} events\n * @param {any} ...params\n * @static\n */\n emitEvents: function(events) {\n 'use strict';\n let args;\n if (arguments.length > 0) {\n args = new Array(arguments.length - 1);\n for (let i = 0, l = args.length; i < l; i++) {\n args[i] = arguments[i+1];\n }\n }\n for (let i = 0, l = events.length; i < l; i++) {\n var event = events[i];\n if (!(event instanceof cc.Component.EventHandler)) continue;\n\n event.emit(args);\n }\n }\n },\n\n /**\n * !#en Emit event with params\n * !#zh 触发目标组件上的指定 handler 函数,该参数是回调函数的参数值(可不填)。\n * @method emit\n * @param {Array} params\n * @example\n * // Call Function\n * var eventHandler = new cc.Component.EventHandler();\n * eventHandler.target = newTarget;\n * eventHandler.component = \"MainMenu\";\n * eventHandler.handler = \"OnClick\"\n * eventHandler.emit([\"param1\", \"param2\", ....]);\n */\n emit: function(params) {\n var target = this.target;\n if (!cc.isValid(target)) return;\n\n this._genCompIdIfNeeded();\n var compType = cc.js._getClassById(this._componentId);\n \n var comp = target.getComponent(compType);\n if (!cc.isValid(comp)) return;\n\n var handler = comp[this.handler];\n if (typeof(handler) !== 'function') return;\n\n if (this.customEventData != null && this.customEventData !== '') {\n params = params.slice();\n params.push(this.customEventData);\n }\n\n handler.apply(comp, params);\n },\n\n _compName2Id (compName) {\n let comp = cc.js.getClassByName(compName);\n return cc.js._getClassId(comp);\n },\n\n _compId2Name (compId) {\n let comp = cc.js._getClassById(compId);\n return cc.js.getClassName(comp);\n },\n\n // to be deprecated in the future\n _genCompIdIfNeeded () {\n if (!this._componentId) {\n this._componentName = this.component;\n this.component = '';\n }\n },\n});\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst macro = require('../platform/CCMacro');\nconst RenderComponent = require('./CCRenderComponent');\nconst Material = require('../assets/material/CCMaterial');\nconst LabelFrame = require('../renderer/utils/label/label-frame');\nconst BlendFunc = require('../utils/blend-func');\nconst deleteFromDynamicAtlas = require('../renderer/utils/utils').deleteFromDynamicAtlas;\n\n/**\n * !#en Enum for text alignment.\n * !#zh 文本横向对齐类型\n * @enum Label.HorizontalAlign\n */\n/**\n * !#en Alignment left for text.\n * !#zh 文本内容左对齐。\n * @property {Number} LEFT\n */\n/**\n * !#en Alignment center for text.\n * !#zh 文本内容居中对齐。\n * @property {Number} CENTER\n */\n/**\n * !#en Alignment right for text.\n * !#zh 文本内容右边对齐。\n * @property {Number} RIGHT\n */\nconst HorizontalAlign = macro.TextAlignment;\n\n/**\n * !#en Enum for vertical text alignment.\n * !#zh 文本垂直对齐类型\n * @enum Label.VerticalAlign\n */\n/**\n * !#en Vertical alignment top for text.\n * !#zh 文本顶部对齐。\n * @property {Number} TOP\n */\n/**\n * !#en Vertical alignment center for text.\n * !#zh 文本居中对齐。\n * @property {Number} CENTER\n */\n/**\n * !#en Vertical alignment bottom for text.\n * !#zh 文本底部对齐。\n * @property {Number} BOTTOM\n */\nconst VerticalAlign = macro.VerticalTextAlignment;\n\n/**\n * !#en Enum for Overflow.\n * !#zh Overflow 类型\n * @enum Label.Overflow\n */\n/**\n * !#en NONE.\n * !#zh 不做任何限制。\n * @property {Number} NONE\n */\n/**\n * !#en In CLAMP mode, when label content goes out of the bounding box, it will be clipped.\n * !#zh CLAMP 模式中,当文本内容超出边界框时,多余的会被截断。\n * @property {Number} CLAMP\n */\n/**\n * !#en In SHRINK mode, the font size will change dynamically to adapt the content size. This mode may takes up more CPU resources when the label is refreshed.\n * !#zh SHRINK 模式,字体大小会动态变化,以适应内容大小。这个模式在文本刷新的时候可能会占用较多 CPU 资源。\n * @property {Number} SHRINK\n */\n/**\n * !#en In RESIZE_HEIGHT mode, you can only change the width of label and the height is changed automatically.\n * !#zh 在 RESIZE_HEIGHT 模式下,只能更改文本的宽度,高度是自动改变的。\n * @property {Number} RESIZE_HEIGHT\n */\nconst Overflow = cc.Enum({\n NONE: 0,\n CLAMP: 1,\n SHRINK: 2,\n RESIZE_HEIGHT: 3\n});\n\n/**\n * !#en Enum for font type.\n * !#zh Type 类型\n * @enum Label.Type\n */\n/**\n * !#en The TTF font type.\n * !#zh TTF字体\n * @property {Number} TTF\n */\n/**\n * !#en The bitmap font type.\n * !#zh 位图字体\n * @property {Number} BMFont\n */\n/**\n * !#en The system font type.\n * !#zh 系统字体\n * @property {Number} SystemFont\n */\n\n/**\n * !#en Enum for cache mode.\n * !#zh CacheMode 类型\n * @enum Label.CacheMode\n */\n /**\n * !#en Do not do any caching.\n * !#zh 不做任何缓存。\n * @property {Number} NONE\n */\n/**\n * !#en In BITMAP mode, cache the label as a static image and add it to the dynamic atlas for batch rendering, and can batching with Sprites using broken images.\n * !#zh BITMAP 模式,将 label 缓存成静态图像并加入到动态图集,以便进行批次合并,可与使用碎图的 Sprite 进行合批(注:动态图集在 Chrome 以及微信小游戏暂时关闭,该功能无效)。\n * @property {Number} BITMAP\n */\n/**\n * !#en In CHAR mode, split text into characters and cache characters into a dynamic atlas which the size of 2048*2048. \n * !#zh CHAR 模式,将文本拆分为字符,并将字符缓存到一张单独的大小为 2048*2048 的图集中进行重复使用,不再使用动态图集(注:当图集满时将不再进行缓存,暂时不支持 SHRINK 自适应文本尺寸(后续完善))。\n * @property {Number} CHAR\n */\nconst CacheMode = cc.Enum({\n NONE: 0,\n BITMAP: 1,\n CHAR: 2,\n});\n\nconst BOLD_FLAG = 1 << 0;\nconst ITALIC_FLAG = 1 << 1;\nconst UNDERLINE_FLAG = 1 << 2;\n\n/**\n * !#en The Label Component.\n * !#zh 文字标签组件\n * @class Label\n * @extends RenderComponent\n */\nlet Label = cc.Class({\n name: 'cc.Label',\n extends: RenderComponent,\n mixins: [BlendFunc],\n\n ctor () {\n if (CC_EDITOR) {\n this._userDefinedFont = null;\n }\n\n this._actualFontSize = 0;\n this._assemblerData = null;\n\n this._frame = null;\n this._ttfTexture = null;\n this._letterTexture = null;\n\n if (cc.game.renderType === cc.game.RENDER_TYPE_CANVAS) {\n this._updateMaterial = this._updateMaterialCanvas;\n }\n else {\n this._updateMaterial = this._updateMaterialWebgl;\n }\n },\n\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.renderers/Label',\n help: 'i18n:COMPONENT.help_url.label',\n inspector: 'packages://service-pack/inspectors/comps/label.js',\n },\n\n properties: {\n /**\n * !#en Content string of label.\n * !#zh 标签显示的文本内容。\n * @property {String} string\n */\n _string: {\n default: '',\n formerlySerializedAs: '_N$string',\n },\n string: {\n get () {\n return this._string;\n },\n set (value) {\n let oldValue = this._string;\n this._string = '' + value;\n\n if (this.string !== oldValue) {\n this.setVertsDirty();\n }\n\n this._checkStringEmpty();\n },\n multiline: true,\n tooltip: CC_DEV && 'i18n:COMPONENT.label.string'\n },\n\n /**\n * !#en Horizontal Alignment of label.\n * !#zh 文本内容的水平对齐方式。\n * @property {Label.HorizontalAlign} horizontalAlign\n */\n horizontalAlign: {\n default: HorizontalAlign.LEFT,\n type: HorizontalAlign,\n tooltip: CC_DEV && 'i18n:COMPONENT.label.horizontal_align',\n notify (oldValue) {\n if (this.horizontalAlign === oldValue) return;\n this.setVertsDirty();\n },\n animatable: false\n },\n\n /**\n * !#en Vertical Alignment of label.\n * !#zh 文本内容的垂直对齐方式。\n * @property {Label.VerticalAlign} verticalAlign\n */\n verticalAlign: {\n default: VerticalAlign.TOP,\n type: VerticalAlign,\n tooltip: CC_DEV && 'i18n:COMPONENT.label.vertical_align',\n notify (oldValue) {\n if (this.verticalAlign === oldValue) return;\n this.setVertsDirty();\n },\n animatable: false\n },\n\n\n /**\n * !#en The actual rendering font size in shrink mode\n * !#zh SHRINK 模式下面文本实际渲染的字体大小\n * @property {Number} actualFontSize\n */\n actualFontSize: {\n displayName: 'Actual Font Size',\n animatable: false,\n readonly: true,\n get () {\n return this._actualFontSize;\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.label.actualFontSize',\n },\n\n _fontSize: 40,\n /**\n * !#en Font size of label.\n * !#zh 文本字体大小。\n * @property {Number} fontSize\n */\n fontSize: {\n get () {\n return this._fontSize;\n },\n set (value) {\n if (this._fontSize === value) return;\n\n this._fontSize = value;\n this.setVertsDirty();\n },\n range: [0, 512],\n tooltip: CC_DEV && 'i18n:COMPONENT.label.font_size',\n },\n\n /**\n * !#en Font family of label, only take effect when useSystemFont property is true.\n * !#zh 文本字体名称, 只在 useSystemFont 属性为 true 的时候生效。\n * @property {String} fontFamily\n */\n fontFamily: {\n default: \"Arial\",\n tooltip: CC_DEV && 'i18n:COMPONENT.label.font_family',\n notify (oldValue) {\n if (this.fontFamily === oldValue) return;\n this.setVertsDirty();\n },\n animatable: false\n },\n\n _lineHeight: 40,\n /**\n * !#en Line Height of label.\n * !#zh 文本行高。\n * @property {Number} lineHeight\n */\n lineHeight: {\n get () {\n return this._lineHeight;\n },\n set (value) {\n if (this._lineHeight === value) return;\n this._lineHeight = value;\n this.setVertsDirty();\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.label.line_height',\n },\n /**\n * !#en Overflow of label.\n * !#zh 文字显示超出范围时的处理方式。\n * @property {Label.Overflow} overflow\n */\n overflow: {\n default: Overflow.NONE,\n type: Overflow,\n tooltip: CC_DEV && 'i18n:COMPONENT.label.overflow',\n notify (oldValue) {\n if (this.overflow === oldValue) return;\n this.setVertsDirty();\n },\n animatable: false\n },\n\n _enableWrapText: true,\n /**\n * !#en Whether auto wrap label when string width is large than label width.\n * !#zh 是否自动换行。\n * @property {Boolean} enableWrapText\n */\n enableWrapText: {\n get () {\n return this._enableWrapText;\n },\n set (value) {\n if (this._enableWrapText === value) return;\n\n this._enableWrapText = value;\n this.setVertsDirty();\n },\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.label.wrap',\n },\n\n // 这个保存了旧项目的 file 数据\n _N$file: null,\n\n /**\n * !#en The font of label.\n * !#zh 文本字体。\n * @property {Font} font\n */\n font: {\n get () {\n return this._N$file;\n },\n set (value) {\n if (this.font === value) return;\n \n //if delete the font, we should change isSystemFontUsed to true\n if (!value) {\n this._isSystemFontUsed = true;\n }\n\n if (CC_EDITOR && value) {\n this._userDefinedFont = value;\n }\n this._N$file = value;\n if (value && this._isSystemFontUsed)\n this._isSystemFontUsed = false;\n\n if (!this.enabledInHierarchy) return;\n\n this._forceUpdateRenderData();\n },\n type: cc.Font,\n tooltip: CC_DEV && 'i18n:COMPONENT.label.font',\n animatable: false\n },\n\n _isSystemFontUsed: true,\n\n /**\n * !#en Whether use system font name or not.\n * !#zh 是否使用系统字体。\n * @property {Boolean} useSystemFont\n */\n useSystemFont: {\n get () {\n return this._isSystemFontUsed;\n },\n set (value) {\n if (this._isSystemFontUsed === value) return;\n this._isSystemFontUsed = !!value;\n if (CC_EDITOR) {\n if (!value && this._userDefinedFont) {\n this.font = this._userDefinedFont;\n this.spacingX = this._spacingX;\n return;\n }\n }\n\n if (value) {\n this.font = null;\n\n if (!this.enabledInHierarchy) return;\n \n this._forceUpdateRenderData();\n }\n this.markForValidate();\n },\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.label.system_font',\n },\n\n _bmFontOriginalSize: {\n displayName: 'BMFont Original Size',\n get () {\n if (this._N$file instanceof cc.BitmapFont) {\n return this._N$file.fontSize;\n }\n else {\n return -1;\n }\n },\n visible: true,\n animatable: false\n },\n\n _spacingX: 0,\n\n /**\n * !#en The spacing of the x axis between characters, only take Effect when using bitmap fonts.\n * !#zh 文字之间 x 轴的间距,仅在使用位图字体时生效。\n * @property {Number} spacingX\n */\n spacingX: {\n get () {\n return this._spacingX;\n },\n set (value) {\n this._spacingX = value;\n this.setVertsDirty();\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.label.spacingX',\n },\n\n //For compatibility with v2.0.x temporary reservation.\n _batchAsBitmap: false,\n\n /**\n * !#en The cache mode of label. This mode only supports system fonts.\n * !#zh 文本缓存模式, 该模式只支持系统字体。\n * @property {Label.CacheMode} cacheMode\n */\n cacheMode: {\n default: CacheMode.NONE,\n type: CacheMode,\n tooltip: CC_DEV && 'i18n:COMPONENT.label.cacheMode',\n notify (oldValue) {\n if (this.cacheMode === oldValue) return;\n \n if (oldValue === CacheMode.BITMAP && !(this.font instanceof cc.BitmapFont)) {\n deleteFromDynamicAtlas(this, this._frame);\n }\n\n if (oldValue === CacheMode.CHAR) {\n this._ttfTexture = null;\n const material = this._materials[0];\n if (material && material.material && cc.Label._shareAtlas.material === material.material) {\n this.setMaterial(0, this._getDefaultMaterial());\n }\n }\n\n if (!this.enabledInHierarchy) return;\n\n this._forceUpdateRenderData();\n },\n animatable: false\n },\n\n _styleFlags: 0,\n\n /**\n * !#en Whether enable bold.\n * !#zh 是否启用黑体。\n * @property {Boolean} enableBold\n */\n enableBold: {\n get () {\n return !!(this._styleFlags & BOLD_FLAG);\n },\n set (value) {\n if (value) {\n this._styleFlags |= BOLD_FLAG;\n } else {\n this._styleFlags &= ~BOLD_FLAG;\n }\n\n this.setVertsDirty();\n },\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.label.bold'\n },\n\n /**\n * !#en Whether enable italic.\n * !#zh 是否启用斜体。\n * @property {Boolean} enableItalic\n */\n enableItalic: {\n get () {\n return !!(this._styleFlags & ITALIC_FLAG);\n },\n set (value) {\n if (value) {\n this._styleFlags |= ITALIC_FLAG;\n } else {\n this._styleFlags &= ~ITALIC_FLAG;\n }\n \n this.setVertsDirty();\n },\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.label.italic'\n },\n\n /**\n * !#en Whether enable underline.\n * !#zh 是否启用下划线。\n * @property {Boolean} enableUnderline\n */\n enableUnderline: {\n get () {\n return !!(this._styleFlags & UNDERLINE_FLAG);\n },\n set (value) {\n if (value) {\n this._styleFlags |= UNDERLINE_FLAG;\n } else {\n this._styleFlags &= ~UNDERLINE_FLAG;\n }\n\n this.setVertsDirty();\n },\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.label.underline'\n },\n\n _underlineHeight: 0,\n /**\n * !#en The height of underline.\n * !#zh 下划线高度。\n * @property {Number} underlineHeight\n */\n underlineHeight: {\n get () {\n return this._underlineHeight;\n },\n set (value) {\n if (this._underlineHeight === value) return;\n \n this._underlineHeight = value;\n this.setVertsDirty();\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.label.underline_height',\n },\n\n autoSwitchMaterial: {\n type: RenderComponent.EnableType,\n default: RenderComponent.EnableType.GLOBAL,\n notify(oldValue) {\n if (this.autoSwitchMaterial === oldValue) return;\n this.setVertsDirty();\n },\n },\n allowDynamicAtlas: {\n type: RenderComponent.EnableType,\n default: RenderComponent.EnableType.GLOBAL,\n notify(oldValue) {\n if (this.allowDynamicAtlas === oldValue) return;\n this.setVertsDirty();\n },\n },\n enableRetina: {\n type: RenderComponent.EnableType,\n default: RenderComponent.EnableType.GLOBAL,\n notify(oldValue) {\n if (this.enableRetina === oldValue) return;\n this.setVertsDirty();\n }\n },\n },\n\n statics: {\n HorizontalAlign: HorizontalAlign,\n VerticalAlign: VerticalAlign,\n Overflow: Overflow,\n CacheMode: CacheMode,\n\n _shareAtlas: null,\n /**\n * !#zh 需要保证当前场景中没有使用CHAR缓存的Label才可以清除否则已渲染的文字没有重新绘制会不显示\n * !#en It can be cleared that need to ensure there is not use the CHAR cache in the current scene. Otherwise, the rendered text will not be displayed without repainting.\n * @method clearCharCache\n * @static\n */\n clearCharCache () {\n if (Label._shareAtlas) {\n Label._shareAtlas.clearAllCache();\n }\n }\n },\n\n onLoad () {\n // For compatibility with v2.0.x temporary reservation.\n if (this._batchAsBitmap && this.cacheMode === CacheMode.NONE) {\n this.cacheMode = CacheMode.BITMAP;\n this._batchAsBitmap = false;\n }\n\n if (cc.game.renderType === cc.game.RENDER_TYPE_CANVAS) {\n // CacheMode is not supported in Canvas.\n this.cacheMode = CacheMode.NONE;\n }\n },\n\n onEnable () {\n this._super();\n\n // Keep track of Node size\n this.node.on(cc.Node.EventType.SIZE_CHANGED, this._nodeSizeChanged, this);\n this.node.on(cc.Node.EventType.ANCHOR_CHANGED, this.setVertsDirty, this);\n this.node.on(cc.Node.EventType.COLOR_CHANGED, this._nodeColorChanged, this);\n\n this._forceUpdateRenderData();\n },\n\n onDisable () {\n this._super();\n this.node.off(cc.Node.EventType.SIZE_CHANGED, this._nodeSizeChanged, this);\n this.node.off(cc.Node.EventType.ANCHOR_CHANGED, this.setVertsDirty, this);\n this.node.off(cc.Node.EventType.COLOR_CHANGED, this._nodeColorChanged, this);\n },\n\n onDestroy () {\n this._assembler && this._assembler._resetAssemblerData && this._assembler._resetAssemblerData(this._assemblerData);\n this._assemblerData = null;\n this._letterTexture = null;\n if (this._ttfTexture) {\n // HACK 由于会出现多个 uuid 一样的情况,销毁时会将动态图集中的区域直接销毁,导致其它使用该区域的 Label 显示错误,所以先将 packable = false不走销毁逻辑在下方走 frame 的回收逻辑\n this._ttfTexture._packable = false;\n this._ttfTexture.destroy();\n this._ttfTexture = null;\n }\n this._resetFrame();\n this._super();\n },\n\n _nodeSizeChanged () {\n // Because the content size is automatically updated when overflow is NONE.\n // And this will conflict with the alignment of the CCWidget.\n if (CC_EDITOR || this.overflow !== Overflow.NONE) {\n this.setVertsDirty();\n }\n },\n\n _nodeColorChanged () {\n if (!(this.font instanceof cc.BitmapFont)) {\n this.setVertsDirty();\n }\n },\n\n setVertsDirty() {\n if(CC_JSB && this._nativeTTF()) {\n this._assembler && this._assembler.updateRenderData(this)\n }\n this._super();\n },\n\n _updateColor () {\n if (!(this.font instanceof cc.BitmapFont)) {\n if (!(this._srcBlendFactor === cc.macro.BlendFactor.SRC_ALPHA && this.node._renderFlag & cc.RenderFlow.FLAG_OPACITY)) {\n this.setVertsDirty();\n }\n }\n RenderComponent.prototype._updateColor.call(this);\n },\n\n _validateRender () {\n if (!this.string) {\n this.disableRender();\n return;\n }\n\n if (this._materials[0]) {\n let font = this.font;\n if (font instanceof cc.BitmapFont) {\n let spriteFrame = font.spriteFrame;\n if (spriteFrame && \n spriteFrame.textureLoaded() &&\n font._fntConfig) {\n return;\n }\n }\n else {\n return;\n }\n }\n\n this.disableRender();\n },\n\n _resetAssembler () {\n this._resetFrame();\n RenderComponent.prototype._resetAssembler.call(this);\n },\n\n _resetFrame () {\n if (this._frame && !(this.font instanceof cc.BitmapFont)) {\n deleteFromDynamicAtlas(this, this._frame);\n this._frame = null;\n }\n },\n\n _checkStringEmpty () {\n this.markForRender(!!this.string);\n },\n\n _on3DNodeChanged () {\n this._resetAssembler();\n this._applyFontTexture();\n },\n\n _onBMFontTextureLoaded () {\n this._frame._texture = this.font.spriteFrame._texture;\n this.markForRender(true);\n this._updateMaterial();\n this._assembler && this._assembler.updateRenderData(this);\n },\n\n _onBlendChanged () {\n if (!this.useSystemFont || !this.enabledInHierarchy) return;\n \n this._forceUpdateRenderData();\n },\n\n _applyFontTexture () {\n let font = this.font;\n if (font instanceof cc.BitmapFont) {\n let spriteFrame = font.spriteFrame;\n this._frame = spriteFrame;\n if (spriteFrame) {\n spriteFrame.onTextureLoaded(this._onBMFontTextureLoaded, this);\n }\n }\n else {\n if(!this._nativeTTF()){\n if (!this._frame) {\n this._frame = new LabelFrame();\n }\n \n if (this.cacheMode === CacheMode.CHAR) {\n this._letterTexture = this._assembler._getAssemblerData();\n this._frame._refreshTexture(this._letterTexture);\n } else if (!this._ttfTexture) {\n this._ttfTexture = new cc.Texture2D();\n this._assemblerData = this._assembler._getAssemblerData();\n this._ttfTexture.initWithElement(this._assemblerData.canvas);\n } \n\n if (this.cacheMode !== CacheMode.CHAR) {\n deleteFromDynamicAtlas(this, this._frame);\n this._frame._refreshTexture(this._ttfTexture);\n if (this._srcBlendFactor === cc.macro.BlendFactor.ONE && !CC_NATIVERENDERER) {\n this._ttfTexture.setPremultiplyAlpha(true);\n }\n }\n this._updateMaterial();\n }\n this._assembler && this._assembler.updateRenderData(this);\n }\n this.markForValidate();\n },\n\n _updateMaterialCanvas () {\n if (!this._frame) return;\n this._frame._texture._nativeUrl = this.uuid + '_texture';\n },\n\n _updateMaterialWebgl () {\n\n let material = this.getMaterial(0);\n if(this._nativeTTF()) {\n if(material) this._assembler._updateTTFMaterial(this)\n return;\n }\n\n if (!this._frame) return;\n\n if (material) {\n // 根据材质更新 uniform\n const isMultiMaterial = material.material.isMultiSupport();\n if (isMultiMaterial) {\n // 贴图在 updateRenderData 才确定下来\n // if (texture) this._updateMultiTexId(material, texture);\n this._texIdDirty = true;\n } else {\n material.setProperty('texture', this._frame._texture);\n }\n\n // 根据材质更新 assembler\n if (this._assembler) {\n if ((isMultiMaterial && !this._assembler.isMulti) || !isMultiMaterial && this._assembler.isMulti) {\n RenderComponent.prototype._resetAssembler.call(this);\n }\n }\n }\n\n BlendFunc.prototype._updateMaterial.call(this);\n },\n\n _forceUseCanvas: false,\n \n _useNativeTTF() {\n return cc.macro.ENABLE_NATIVE_TTF_RENDERER && !this._forceUseCanvas;\n }, \n\n _nativeTTF() {\n return this._useNativeTTF() && !!this._assembler && !!this._assembler._updateTTFMaterial;\n },\n\n _forceUpdateRenderData () {\n this.setVertsDirty();\n this._resetAssembler();\n this._applyFontTexture();\n },\n\n /**\n * @deprecated `label._enableBold` is deprecated, use `label.enableBold = true` instead please.\n */\n _enableBold (enabled) {\n if (CC_DEBUG) {\n cc.warn('`label._enableBold` is deprecated, use `label.enableBold = true` instead please');\n }\n this.enableBold = !!enabled;\n },\n\n /**\n * @deprecated `label._enableItalics` is deprecated, use `label.enableItalics = true` instead please.\n */\n _enableItalics (enabled) {\n if (CC_DEBUG) {\n cc.warn('`label._enableItalics` is deprecated, use `label.enableItalics = true` instead please');\n }\n this.enableItalic = !!enabled;\n },\n\n /**\n * @deprecated `label._enableUnderline` is deprecated, use `label.enableUnderline = true` instead please.\n */\n _enableUnderline (enabled) {\n if (CC_DEBUG) {\n cc.warn('`label._enableUnderline` is deprecated, use `label.enableUnderline = true` instead please');\n }\n this.enableUnderline = !!enabled;\n },\n });\n\n cc.Label = module.exports = Label;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * !#en Outline effect used to change the display, only for system fonts or TTF fonts\n * !#zh 描边效果组件,用于字体描边,只能用于系统字体\n * @class LabelOutline\n * @extends Component\n * @example\n * // Create a new node and add label components.\n * var node = new cc.Node(\"New Label\");\n * var label = node.addComponent(cc.Label);\n * label.string = \"hello world\";\n * var outline = node.addComponent(cc.LabelOutline);\n * node.parent = this.node;\n */\n\nlet LabelOutline = cc.Class({\n name: 'cc.LabelOutline',\n extends: require('./CCComponent'),\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.renderers/LabelOutline',\n executeInEditMode: true,\n requireComponent: cc.Label,\n },\n\n properties: {\n _color: cc.Color.WHITE,\n _width: 1,\n\n /**\n * !#en outline color\n * !#zh 改变描边的颜色\n * @property color\n * @type {Color}\n * @example\n * outline.color = cc.Color.BLACK;\n */\n color: {\n tooltip: CC_DEV && 'i18n:COMPONENT.outline.color',\n get: function () {\n return this._color.clone();\n },\n set: function (value) {\n if (!this._color.equals(value)) {\n this._color.set(value);\n }\n this._updateRenderData();\n }\n },\n\n /**\n * !#en Change the outline width\n * !#zh 改变描边的宽度\n * @property width\n * @type {Number}\n * @example\n * outline.width = 3;\n */\n width: {\n tooltip: CC_DEV && 'i18n:COMPONENT.outline.width',\n get: function () {\n return this._width;\n },\n set: function (value) {\n if (this._width === value) return;\n\n this._width = value;\n this._updateRenderData();\n },\n range: [0, 512],\n }\n },\n\n onEnable () {\n this._updateRenderData();\n },\n\n onDisable () {\n this._updateRenderData();\n },\n\n _updateRenderData () {\n let label = this.node.getComponent(cc.Label);\n if (label) {\n label.setVertsDirty();\n }\n }\n\n});\n\ncc.LabelOutline = module.exports = LabelOutline;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * !#en Shadow effect for Label component, only for system fonts or TTF fonts\n * !#zh 用于给 Label 组件添加阴影效果,只能用于系统字体或 ttf 字体\n * @class LabelShadow\n * @extends Component\n * @example\n * // Create a new node and add label components.\n * var node = new cc.Node(\"New Label\");\n * var label = node.addComponent(cc.Label);\n * label.string = \"hello world\";\n * var labelShadow = node.addComponent(cc.LabelShadow);\n * node.parent = this.node;\n */\n\nlet LabelShadow = cc.Class({\n name: 'cc.LabelShadow',\n extends: require('./CCComponent'),\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.renderers/LabelShadow',\n executeInEditMode: true,\n requireComponent: cc.Label,\n },\n\n properties: {\n _color: cc.Color.WHITE,\n _offset: cc.v2(2, 2),\n _blur: 2,\n\n /**\n * !#en The shadow color\n * !#zh 阴影的颜色\n * @property color\n * @type {Color}\n * @example\n * labelShadow.color = cc.Color.YELLOW;\n */\n color: {\n tooltip: CC_DEV && 'i18n:COMPONENT.shadow.color',\n get: function () {\n return this._color.clone();\n },\n set: function (value) {\n if (!this._color.equals(value)) {\n this._color.set(value);\n }\n this._updateRenderData();\n }\n },\n\n /**\n * !#en Offset between font and shadow\n * !#zh 字体与阴影的偏移\n * @property offset\n * @type {Vec2}\n * @example\n * labelShadow.offset = new cc.Vec2(2, 2);\n */\n offset: {\n tooltip: CC_DEV && 'i18n:COMPONENT.shadow.offset',\n get: function () {\n return this._offset;\n },\n set: function (value) {\n this._offset = value;\n this._updateRenderData();\n }\n },\n\n /**\n * !#en A non-negative float specifying the level of shadow blur\n * !#zh 阴影的模糊程度\n * @property blur\n * @type {Number}\n * @example\n * labelShadow.blur = 2;\n */\n blur: {\n tooltip: CC_DEV && 'i18n:COMPONENT.shadow.blur',\n get: function () {\n return this._blur;\n },\n set: function (value) {\n this._blur = value;\n this._updateRenderData();\n },\n range: [0, 1024],\n },\n },\n\n onEnable () {\n this._updateRenderData();\n },\n\n onDisable () {\n this._updateRenderData();\n },\n\n _updateRenderData () {\n let label = this.node.getComponent(cc.Label);\n if (label) {\n label.setVertsDirty();\n }\n }\n\n});\n\ncc.LabelShadow = module.exports = LabelShadow;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst NodeEvent = require('../CCNode').EventType;\n\n/**\n * !#en Enum for Layout type\n * !#zh 布局类型\n * @enum Layout.Type\n */\nvar Type = cc.Enum({\n /**\n * !#en None Layout\n * !#zh 取消布局\n *@property {Number} NONE\n */\n NONE: 0,\n /**\n * !#en Horizontal Layout\n * !#zh 水平布局\n * @property {Number} HORIZONTAL\n */\n HORIZONTAL: 1,\n\n /**\n * !#en Vertical Layout\n * !#zh 垂直布局\n * @property {Number} VERTICAL\n */\n VERTICAL: 2,\n /**\n * !#en Grid Layout\n * !#zh 网格布局\n * @property {Number} GRID\n */\n GRID: 3,\n});\n\n/**\n * !#en Enum for Layout Resize Mode\n * !#zh 缩放模式\n * @enum Layout.ResizeMode\n */\nvar ResizeMode = cc.Enum({\n /**\n * !#en Don't do any scale.\n * !#zh 不做任何缩放\n * @property {Number} NONE\n */\n NONE: 0,\n /**\n * !#en The container size will be expanded with its children's size.\n * !#zh 容器的大小会根据子节点的大小自动缩放。\n * @property {Number} CONTAINER\n */\n CONTAINER: 1,\n /**\n * !#en Child item size will be adjusted with the container's size.\n * !#zh 子节点的大小会随着容器的大小自动缩放。\n * @property {Number} CHILDREN\n */\n CHILDREN: 2\n});\n\n/**\n * !#en Enum for Grid Layout start axis direction.\n * The items in grid layout will be arranged in each axis at first.;\n * !#zh 布局轴向,只用于 GRID 布局。\n * @enum Layout.AxisDirection\n */\nvar AxisDirection = cc.Enum({\n /**\n * !#en The horizontal axis.\n * !#zh 进行水平方向布局\n * @property {Number} HORIZONTAL\n */\n HORIZONTAL: 0,\n /**\n * !#en The vertical axis.\n * !#zh 进行垂直方向布局\n * @property {Number} VERTICAL\n */\n VERTICAL: 1,\n});\n\n/**\n * !#en Enum for vertical layout direction.\n * Used in Grid Layout together with AxisDirection is VERTICAL\n * !#zh 垂直方向布局方式\n * @enum Layout.VerticalDirection\n */\nvar VerticalDirection = cc.Enum({\n /**\n * !#en Items arranged from bottom to top.\n * !#zh 从下到上排列\n * @property {Number} BOTTOM_TO_TOP\n */\n BOTTOM_TO_TOP: 0,\n /**\n * !#en Items arranged from top to bottom.\n * !#zh 从上到下排列\n * @property {Number} TOP_TO_BOTTOM\n */\n TOP_TO_BOTTOM: 1,\n});\n\n/**\n * !#en Enum for horizontal layout direction.\n * Used in Grid Layout together with AxisDirection is HORIZONTAL\n * !#zh 水平方向布局方式\n * @enum Layout.HorizontalDirection\n */\nvar HorizontalDirection = cc.Enum({\n /**\n * !#en Items arranged from left to right.\n * !#zh 从左往右排列\n * @property {Number} LEFT_TO_RIGHT\n */\n LEFT_TO_RIGHT: 0,\n /**\n * !#en Items arranged from right to left.\n * !#zh 从右往左排列\n *@property {Number} RIGHT_TO_LEFT\n */\n RIGHT_TO_LEFT: 1,\n});\n\n/**\n * !#en\n * The Layout is a container component, use it to arrange child elements easily.<br>\n * Note<br>\n * 1.Scaling and rotation of child nodes are not considered.<br>\n * 2.After setting the Layout, the results need to be updated until the next frame,\n * unless you manually call {{#crossLink \"Layout/updateLayout:method\"}}{{/crossLink}}。\n * !#zh\n * Layout 组件相当于一个容器,能自动对它的所有子节点进行统一排版。<br>\n * 注意:<br>\n * 1.不会考虑子节点的缩放和旋转。<br>\n * 2.对 Layout 设置后结果需要到下一帧才会更新,除非你设置完以后手动调用 {{#crossLink \"Layout/updateLayout:method\"}}{{/crossLink}}。\n * @class Layout\n * @extends Component\n */\nvar Layout = cc.Class({\n name: 'cc.Layout',\n extends: require('./CCComponent'),\n\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.ui/Layout',\n help: 'i18n:COMPONENT.help_url.layout',\n inspector: 'packages://inspector/inspectors/comps/cclayout.js',\n executeInEditMode: true,\n },\n\n properties: {\n _layoutSize: cc.size(300, 200),\n _layoutDirty: {\n default: true,\n serializable: false,\n },\n\n _resize: ResizeMode.NONE,\n\n //TODO: refactoring this name after data upgrade machanism is out.\n _N$layoutType: Type.NONE,\n /**\n * !#en The layout type.\n * !#zh 布局类型\n * @property {Layout.Type} type\n * @default Layout.Type.NONE\n */\n type: {\n type: Type,\n get: function () {\n return this._N$layoutType;\n },\n set: function (value) {\n this._N$layoutType = value;\n\n if (CC_EDITOR && this.type !== Type.NONE && this._resize === ResizeMode.CONTAINER && !cc.engine.isPlaying) {\n var reLayouted = _Scene.DetectConflict.checkConflict_Layout(this);\n if (reLayouted) {\n return;\n }\n }\n this._doLayoutDirty();\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.layout.layout_type',\n animatable: false,\n },\n\n\n /**\n * !#en\n * The are three resize modes for Layout.\n * None, resize Container and resize children.\n * !#zh 缩放模式\n * @property {Layout.ResizeMode} resizeMode\n * @default ResizeMode.NONE\n */\n resizeMode: {\n type: ResizeMode,\n tooltip: CC_DEV && 'i18n:COMPONENT.layout.resize_mode',\n animatable: false,\n get: function () {\n return this._resize;\n },\n set: function (value) {\n if (this.type === Type.NONE && value === ResizeMode.CHILDREN) {\n return;\n }\n\n this._resize = value;\n if (CC_EDITOR && value === ResizeMode.CONTAINER && !cc.engine.isPlaying) {\n var reLayouted = _Scene.DetectConflict.checkConflict_Layout(this);\n if (reLayouted) {\n return;\n }\n }\n this._doLayoutDirty();\n },\n },\n\n /**\n * !#en The cell size for grid layout.\n * !#zh 每个格子的大小,只有布局类型为 GRID 的时候才有效。\n * @property {Size} cellSize\n * @default cc.size(40, 40)\n */\n cellSize: {\n default: cc.size(40, 40),\n tooltip: CC_DEV && 'i18n:COMPONENT.layout.cell_size',\n type: cc.Size,\n notify: function () {\n this._doLayoutDirty();\n },\n },\n\n /**\n * !#en\n * The start axis for grid layout. If you choose horizontal, then children will layout horizontally at first,\n * and then break line on demand. Choose vertical if you want to layout vertically at first .\n * !#zh 起始轴方向类型,可进行水平和垂直布局排列,只有布局类型为 GRID 的时候才有效。\n * @property {Layout.AxisDirection} startAxis\n */\n startAxis: {\n default: AxisDirection.HORIZONTAL,\n tooltip: CC_DEV && 'i18n:COMPONENT.layout.start_axis',\n type: AxisDirection,\n notify: function () {\n if (CC_EDITOR && this._resize === ResizeMode.CONTAINER && !cc.engine.isPlaying) {\n var reLayouted = _Scene.DetectConflict.checkConflict_Layout(this);\n if (reLayouted) {\n return;\n }\n }\n this._doLayoutDirty();\n },\n animatable: false\n },\n\n /**\n * !#en The left padding of layout, it only effect the layout in one direction.\n * !#zh 容器内左边距,只会在一个布局方向上生效。\n * @property {Number} paddingLeft\n */\n paddingLeft: {\n default: 0,\n tooltip: CC_DEV && 'i18n:COMPONENT.layout.padding_left',\n notify: function () {\n this._doLayoutDirty();\n },\n },\n\n /**\n * !#en The right padding of layout, it only effect the layout in one direction.\n * !#zh 容器内右边距,只会在一个布局方向上生效。\n * @property {Number} paddingRight\n */\n paddingRight: {\n default: 0,\n tooltip: CC_DEV && 'i18n:COMPONENT.layout.padding_right',\n notify: function () {\n this._doLayoutDirty();\n },\n },\n\n /**\n * !#en The top padding of layout, it only effect the layout in one direction.\n * !#zh 容器内上边距,只会在一个布局方向上生效。\n * @property {Number} paddingTop\n */\n paddingTop: {\n default: 0,\n tooltip: CC_DEV && 'i18n:COMPONENT.layout.padding_top',\n notify: function () {\n this._doLayoutDirty();\n },\n },\n\n /**\n * !#en The bottom padding of layout, it only effect the layout in one direction.\n * !#zh 容器内下边距,只会在一个布局方向上生效。\n * @property {Number} paddingBottom\n */\n paddingBottom: {\n default: 0,\n tooltip: CC_DEV && 'i18n:COMPONENT.layout.padding_bottom',\n notify: function () {\n this._doLayoutDirty();\n },\n },\n\n /**\n * !#en The distance in x-axis between each element in layout.\n * !#zh 子节点之间的水平间距。\n * @property {Number} spacingX\n */\n spacingX: {\n default: 0,\n notify: function () {\n this._doLayoutDirty();\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.layout.space_x'\n },\n\n /**\n * !#en The distance in y-axis between each element in layout.\n * !#zh 子节点之间的垂直间距。\n * @property {Number} spacingY\n */\n spacingY: {\n default: 0,\n notify: function () {\n this._doLayoutDirty();\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.layout.space_y'\n },\n\n /**\n * !#en\n * Only take effect in Vertical layout mode.\n * This option changes the start element's positioning.\n * !#zh 垂直排列子节点的方向。\n * @property {Layout.VerticalDirection} verticalDirection\n */\n verticalDirection: {\n default: VerticalDirection.TOP_TO_BOTTOM,\n type: VerticalDirection,\n notify: function () {\n this._doLayoutDirty();\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.layout.vertical_direction',\n animatable: false\n },\n\n /**\n * !#en\n * Only take effect in Horizontal layout mode.\n * This option changes the start element's positioning.\n * !#zh 水平排列子节点的方向。\n * @property {Layout.HorizontalDirection} horizontalDirection\n */\n horizontalDirection: {\n default: HorizontalDirection.LEFT_TO_RIGHT,\n type: HorizontalDirection,\n notify: function () {\n this._doLayoutDirty();\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.layout.horizontal_direction',\n animatable: false\n },\n\n /**\n * !#en Adjust the layout if the children scaled.\n * !#zh 子节点缩放比例是否影响布局。\n * @property affectedByScale\n * @type {Boolean}\n * @default false\n */\n affectedByScale: {\n default: false,\n notify: function () {\n // every time you switch this state, the layout will be calculated.\n this._doLayoutDirty();\n },\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.layout.affected_by_scale'\n }\n },\n\n statics: {\n Type: Type,\n VerticalDirection: VerticalDirection,\n HorizontalDirection: HorizontalDirection,\n ResizeMode: ResizeMode,\n AxisDirection: AxisDirection,\n },\n\n onEnable: function () {\n this._addEventListeners();\n\n if (this.node.getContentSize().equals(cc.size(0, 0))) {\n this.node.setContentSize(this._layoutSize);\n }\n\n this._doLayoutDirty();\n },\n\n onDisable: function () {\n this._removeEventListeners();\n },\n\n _doLayoutDirty: function () {\n this._layoutDirty = true;\n },\n\n _doScaleDirty: function () {\n this._layoutDirty = this._layoutDirty || this.affectedByScale;\n },\n\n _addEventListeners: function () {\n cc.director.on(cc.Director.EVENT_AFTER_UPDATE, this.updateLayout, this);\n this.node.on(NodeEvent.SIZE_CHANGED, this._resized, this);\n this.node.on(NodeEvent.ANCHOR_CHANGED, this._doLayoutDirty, this);\n this.node.on(NodeEvent.CHILD_ADDED, this._childAdded, this);\n this.node.on(NodeEvent.CHILD_REMOVED, this._childRemoved, this);\n this.node.on(NodeEvent.CHILD_REORDER, this._doLayoutDirty, this);\n this._addChildrenEventListeners();\n },\n\n _removeEventListeners: function () {\n cc.director.off(cc.Director.EVENT_AFTER_UPDATE, this.updateLayout, this);\n this.node.off(NodeEvent.SIZE_CHANGED, this._resized, this);\n this.node.off(NodeEvent.ANCHOR_CHANGED, this._doLayoutDirty, this);\n this.node.off(NodeEvent.CHILD_ADDED, this._childAdded, this);\n this.node.off(NodeEvent.CHILD_REMOVED, this._childRemoved, this);\n this.node.off(NodeEvent.CHILD_REORDER, this._doLayoutDirty, this);\n this._removeChildrenEventListeners();\n },\n\n _addChildrenEventListeners: function () {\n var children = this.node.children;\n for (var i = 0; i < children.length; ++i) {\n var child = children[i];\n child.on(NodeEvent.SCALE_CHANGED, this._doScaleDirty, this);\n child.on(NodeEvent.SIZE_CHANGED, this._doLayoutDirty, this);\n child.on(NodeEvent.POSITION_CHANGED, this._doLayoutDirty, this);\n child.on(NodeEvent.ANCHOR_CHANGED, this._doLayoutDirty, this);\n child.on('active-in-hierarchy-changed', this._doLayoutDirty, this);\n }\n },\n\n _removeChildrenEventListeners: function () {\n var children = this.node.children;\n for (var i = 0; i < children.length; ++i) {\n var child = children[i];\n child.off(NodeEvent.SCALE_CHANGED, this._doScaleDirty, this);\n child.off(NodeEvent.SIZE_CHANGED, this._doLayoutDirty, this);\n child.off(NodeEvent.POSITION_CHANGED, this._doLayoutDirty, this);\n child.off(NodeEvent.ANCHOR_CHANGED, this._doLayoutDirty, this);\n child.off('active-in-hierarchy-changed', this._doLayoutDirty, this);\n }\n },\n\n _childAdded: function (child) {\n child.on(NodeEvent.SCALE_CHANGED, this._doScaleDirty, this);\n child.on(NodeEvent.SIZE_CHANGED, this._doLayoutDirty, this);\n child.on(NodeEvent.POSITION_CHANGED, this._doLayoutDirty, this);\n child.on(NodeEvent.ANCHOR_CHANGED, this._doLayoutDirty, this);\n child.on('active-in-hierarchy-changed', this._doLayoutDirty, this);\n\n this._doLayoutDirty();\n },\n\n _childRemoved: function (child) {\n child.off(NodeEvent.SCALE_CHANGED, this._doScaleDirty, this);\n child.off(NodeEvent.SIZE_CHANGED, this._doLayoutDirty, this);\n child.off(NodeEvent.POSITION_CHANGED, this._doLayoutDirty, this);\n child.off(NodeEvent.ANCHOR_CHANGED, this._doLayoutDirty, this);\n child.off('active-in-hierarchy-changed', this._doLayoutDirty, this);\n\n this._doLayoutDirty();\n },\n\n _resized: function () {\n this._layoutSize = this.node.getContentSize();\n this._doLayoutDirty();\n },\n\n _doLayoutHorizontally: function (baseWidth, rowBreak, fnPositionY, applyChildren) {\n var layoutAnchor = this.node.getAnchorPoint();\n var children = this.node.children;\n\n var sign = 1;\n var paddingX = this.paddingLeft;\n var leftBoundaryOfLayout = -layoutAnchor.x * baseWidth;\n if (this.horizontalDirection === HorizontalDirection.RIGHT_TO_LEFT) {\n sign = -1;\n leftBoundaryOfLayout = (1 - layoutAnchor.x) * baseWidth;\n paddingX = this.paddingRight;\n }\n\n var nextX = leftBoundaryOfLayout + sign * paddingX - sign * this.spacingX;\n var rowMaxHeight = 0;\n var tempMaxHeight = 0;\n var secondMaxHeight = 0;\n var row = 0;\n var containerResizeBoundary = 0;\n\n var maxHeightChildAnchorY = 0;\n\n var activeChildCount = 0;\n for (var i = 0; i < children.length; ++i) {\n var child = children[i];\n if (child.activeInHierarchy) {\n activeChildCount++;\n }\n }\n\n var newChildWidth = this.cellSize.width;\n if (this.type !== Type.GRID && this.resizeMode === ResizeMode.CHILDREN) {\n newChildWidth = (baseWidth - (this.paddingLeft + this.paddingRight) - (activeChildCount - 1) * this.spacingX) / activeChildCount;\n }\n\n for (var i = 0; i < children.length; ++i) {\n var child = children[i];\n let childScaleX = this._getUsedScaleValue(child.scaleX);\n let childScaleY = this._getUsedScaleValue(child.scaleY);\n if (!child.activeInHierarchy) {\n continue;\n }\n\n //for resizing children\n if (this._resize === ResizeMode.CHILDREN) {\n child.width = newChildWidth / childScaleX;\n if (this.type === Type.GRID) {\n child.height = this.cellSize.height / childScaleY;\n }\n }\n\n var anchorX = child.anchorX;\n var childBoundingBoxWidth = child.width * childScaleX;\n var childBoundingBoxHeight = child.height * childScaleY;\n\n if (secondMaxHeight > tempMaxHeight) {\n tempMaxHeight = secondMaxHeight;\n }\n\n if (childBoundingBoxHeight >= tempMaxHeight) {\n secondMaxHeight = tempMaxHeight;\n tempMaxHeight = childBoundingBoxHeight;\n maxHeightChildAnchorY = child.getAnchorPoint().y;\n }\n\n if (this.horizontalDirection === HorizontalDirection.RIGHT_TO_LEFT) {\n anchorX = 1 - child.anchorX;\n }\n nextX = nextX + sign * anchorX * childBoundingBoxWidth + sign * this.spacingX;\n var rightBoundaryOfChild = sign * (1 - anchorX) * childBoundingBoxWidth;\n\n if (rowBreak) {\n var rowBreakBoundary = nextX + rightBoundaryOfChild + sign * (sign > 0 ? this.paddingRight : this.paddingLeft);\n var leftToRightRowBreak = this.horizontalDirection === HorizontalDirection.LEFT_TO_RIGHT && rowBreakBoundary > (1 - layoutAnchor.x) * baseWidth;\n var rightToLeftRowBreak = this.horizontalDirection === HorizontalDirection.RIGHT_TO_LEFT && rowBreakBoundary < -layoutAnchor.x * baseWidth;\n\n if (leftToRightRowBreak || rightToLeftRowBreak) {\n\n if (childBoundingBoxHeight >= tempMaxHeight) {\n if (secondMaxHeight === 0) {\n secondMaxHeight = tempMaxHeight;\n }\n rowMaxHeight += secondMaxHeight;\n secondMaxHeight = tempMaxHeight;\n }\n else {\n rowMaxHeight += tempMaxHeight;\n secondMaxHeight = childBoundingBoxHeight;\n tempMaxHeight = 0;\n }\n nextX = leftBoundaryOfLayout + sign * (paddingX + anchorX * childBoundingBoxWidth);\n row++;\n }\n }\n\n var finalPositionY = fnPositionY(child, rowMaxHeight, row);\n if (baseWidth >= (childBoundingBoxWidth + this.paddingLeft + this.paddingRight)) {\n if (applyChildren) {\n child.setPosition(cc.v2(nextX, finalPositionY));\n }\n }\n\n var signX = 1;\n var tempFinalPositionY;\n var topMarign = (tempMaxHeight === 0) ? childBoundingBoxHeight : tempMaxHeight;\n\n if (this.verticalDirection === VerticalDirection.TOP_TO_BOTTOM) {\n containerResizeBoundary = containerResizeBoundary || this.node._contentSize.height;\n signX = -1;\n tempFinalPositionY = finalPositionY + signX * (topMarign * maxHeightChildAnchorY + this.paddingBottom);\n if (tempFinalPositionY < containerResizeBoundary) {\n containerResizeBoundary = tempFinalPositionY;\n }\n }\n else {\n containerResizeBoundary = containerResizeBoundary || -this.node._contentSize.height;\n tempFinalPositionY = finalPositionY + signX * (topMarign * maxHeightChildAnchorY + this.paddingTop);\n if (tempFinalPositionY > containerResizeBoundary) {\n containerResizeBoundary = tempFinalPositionY;\n }\n }\n\n nextX += rightBoundaryOfChild;\n }\n\n return containerResizeBoundary;\n },\n\n _getVerticalBaseHeight: function (children) {\n var newHeight = 0;\n var activeChildCount = 0;\n if (this.resizeMode === ResizeMode.CONTAINER) {\n for (var i = 0; i < children.length; ++i) {\n var child = children[i];\n if (child.activeInHierarchy) {\n activeChildCount++;\n newHeight += child.height * this._getUsedScaleValue(child.scaleY);\n }\n }\n\n newHeight += (activeChildCount - 1) * this.spacingY + this.paddingBottom + this.paddingTop;\n }\n else {\n newHeight = this.node.getContentSize().height;\n }\n return newHeight;\n },\n\n _doLayoutVertically: function (baseHeight, columnBreak, fnPositionX, applyChildren) {\n var layoutAnchor = this.node.getAnchorPoint();\n var children = this.node.children;\n\n var sign = 1;\n var paddingY = this.paddingBottom;\n var bottomBoundaryOfLayout = -layoutAnchor.y * baseHeight;\n if (this.verticalDirection === VerticalDirection.TOP_TO_BOTTOM) {\n sign = -1;\n bottomBoundaryOfLayout = (1 - layoutAnchor.y) * baseHeight;\n paddingY = this.paddingTop;\n }\n\n var nextY = bottomBoundaryOfLayout + sign * paddingY - sign * this.spacingY;\n var columnMaxWidth = 0;\n var tempMaxWidth = 0;\n var secondMaxWidth = 0;\n var column = 0;\n var containerResizeBoundary = 0;\n var maxWidthChildAnchorX = 0;\n\n var activeChildCount = 0;\n for (var i = 0; i < children.length; ++i) {\n var child = children[i];\n if (child.activeInHierarchy) {\n activeChildCount++;\n }\n }\n\n var newChildHeight = this.cellSize.height;\n if (this.type !== Type.GRID && this.resizeMode === ResizeMode.CHILDREN) {\n newChildHeight = (baseHeight - (this.paddingTop + this.paddingBottom) - (activeChildCount - 1) * this.spacingY) / activeChildCount;\n }\n\n for (var i = 0; i < children.length; ++i) {\n var child = children[i];\n let childScaleX = this._getUsedScaleValue(child.scaleX);\n let childScaleY = this._getUsedScaleValue(child.scaleY);\n if (!child.activeInHierarchy) {\n continue;\n }\n\n //for resizing children\n if (this.resizeMode === ResizeMode.CHILDREN) {\n child.height = newChildHeight / childScaleY;\n if (this.type === Type.GRID) {\n child.width = this.cellSize.width / childScaleX;\n }\n }\n\n var anchorY = child.anchorY;\n var childBoundingBoxWidth = child.width * childScaleX;\n var childBoundingBoxHeight = child.height * childScaleY;\n\n if (secondMaxWidth > tempMaxWidth) {\n tempMaxWidth = secondMaxWidth;\n }\n\n if (childBoundingBoxWidth >= tempMaxWidth) {\n secondMaxWidth = tempMaxWidth;\n tempMaxWidth = childBoundingBoxWidth;\n maxWidthChildAnchorX = child.getAnchorPoint().x;\n }\n\n if (this.verticalDirection === VerticalDirection.TOP_TO_BOTTOM) {\n anchorY = 1 - child.anchorY;\n }\n nextY = nextY + sign * anchorY * childBoundingBoxHeight + sign * this.spacingY;\n var topBoundaryOfChild = sign * (1 - anchorY) * childBoundingBoxHeight;\n\n if (columnBreak) {\n var columnBreakBoundary = nextY + topBoundaryOfChild + sign * (sign > 0 ? this.paddingTop : this.paddingBottom);\n var bottomToTopColumnBreak = this.verticalDirection === VerticalDirection.BOTTOM_TO_TOP && columnBreakBoundary > (1 - layoutAnchor.y) * baseHeight;\n var topToBottomColumnBreak = this.verticalDirection === VerticalDirection.TOP_TO_BOTTOM && columnBreakBoundary < -layoutAnchor.y * baseHeight;\n\n if (bottomToTopColumnBreak || topToBottomColumnBreak) {\n if (childBoundingBoxWidth >= tempMaxWidth) {\n if (secondMaxWidth === 0) {\n secondMaxWidth = tempMaxWidth;\n }\n columnMaxWidth += secondMaxWidth;\n secondMaxWidth = tempMaxWidth;\n }\n else {\n columnMaxWidth += tempMaxWidth;\n secondMaxWidth = childBoundingBoxWidth;\n tempMaxWidth = 0;\n }\n nextY = bottomBoundaryOfLayout + sign * (paddingY + anchorY * childBoundingBoxHeight);\n column++;\n }\n }\n\n var finalPositionX = fnPositionX(child, columnMaxWidth, column);\n if (baseHeight >= (childBoundingBoxHeight + (this.paddingTop + this.paddingBottom))) {\n if (applyChildren) {\n child.setPosition(cc.v2(finalPositionX, nextY));\n }\n }\n\n var signX = 1;\n var tempFinalPositionX;\n //when the item is the last column break item, the tempMaxWidth will be 0.\n var rightMarign = (tempMaxWidth === 0) ? childBoundingBoxWidth : tempMaxWidth;\n\n if (this.horizontalDirection === HorizontalDirection.RIGHT_TO_LEFT) {\n signX = -1;\n containerResizeBoundary = containerResizeBoundary || this.node._contentSize.width;\n tempFinalPositionX = finalPositionX + signX * (rightMarign * maxWidthChildAnchorX + this.paddingLeft);\n if (tempFinalPositionX < containerResizeBoundary) {\n containerResizeBoundary = tempFinalPositionX;\n }\n }\n else {\n containerResizeBoundary = containerResizeBoundary || -this.node._contentSize.width;\n tempFinalPositionX = finalPositionX + signX * (rightMarign * maxWidthChildAnchorX + this.paddingRight);\n if (tempFinalPositionX > containerResizeBoundary) {\n containerResizeBoundary = tempFinalPositionX;\n }\n }\n\n nextY += topBoundaryOfChild;\n }\n\n return containerResizeBoundary;\n },\n\n _doLayoutBasic: function () {\n var children = this.node.children;\n\n var allChildrenBoundingBox = null;\n\n for (var i = 0; i < children.length; ++i) {\n var child = children[i];\n if (child.activeInHierarchy) {\n if (!allChildrenBoundingBox) {\n allChildrenBoundingBox = child.getBoundingBoxToWorld();\n } else {\n allChildrenBoundingBox.union(allChildrenBoundingBox, child.getBoundingBoxToWorld());\n }\n }\n }\n\n if (allChildrenBoundingBox) {\n var leftBottomSpace = this.node.convertToNodeSpaceAR(cc.v2(allChildrenBoundingBox.x, allChildrenBoundingBox.y));\n leftBottomSpace = cc.v2(leftBottomSpace.x - this.paddingLeft, leftBottomSpace.y - this.paddingBottom);\n\n var rightTopSpace = this.node.convertToNodeSpaceAR(cc.v2(allChildrenBoundingBox.xMax, allChildrenBoundingBox.yMax));\n rightTopSpace = cc.v2(rightTopSpace.x + this.paddingRight, rightTopSpace.y + this.paddingTop);\n\n var newSize = rightTopSpace.sub(leftBottomSpace);\n newSize = cc.size(parseFloat(newSize.x.toFixed(2)), parseFloat(newSize.y.toFixed(2)));\n\n if (newSize.width !== 0) {\n // Invert is to get the coordinate point of the child node in the parent coordinate system\n var newAnchorX = (-leftBottomSpace.x) / newSize.width;\n this.node.anchorX = parseFloat(newAnchorX.toFixed(2));\n }\n if (newSize.height !== 0) {\n // Invert is to get the coordinate point of the child node in the parent coordinate system\n var newAnchorY = (-leftBottomSpace.y) / newSize.height;\n this.node.anchorY = parseFloat(newAnchorY.toFixed(2));\n }\n this.node.setContentSize(newSize);\n }\n },\n\n _doLayoutGridAxisHorizontal: function (layoutAnchor, layoutSize) {\n var baseWidth = layoutSize.width;\n\n var sign = 1;\n var bottomBoundaryOfLayout = -layoutAnchor.y * layoutSize.height;\n var paddingY = this.paddingBottom;\n if (this.verticalDirection === VerticalDirection.TOP_TO_BOTTOM) {\n sign = -1;\n bottomBoundaryOfLayout = (1 - layoutAnchor.y) * layoutSize.height;\n paddingY = this.paddingTop;\n }\n\n var fnPositionY = function (child, topOffset, row) {\n return bottomBoundaryOfLayout + sign * (topOffset + child.anchorY * child.height * this._getUsedScaleValue(child.scaleY) + paddingY + row * this.spacingY);\n }.bind(this);\n\n\n var newHeight = 0;\n if (this.resizeMode === ResizeMode.CONTAINER) {\n //calculate the new height of container, it won't change the position of it's children\n var boundary = this._doLayoutHorizontally(baseWidth, true, fnPositionY, false);\n newHeight = bottomBoundaryOfLayout - boundary;\n if (newHeight < 0) {\n newHeight *= -1;\n }\n\n bottomBoundaryOfLayout = -layoutAnchor.y * newHeight;\n\n if (this.verticalDirection === VerticalDirection.TOP_TO_BOTTOM) {\n sign = -1;\n bottomBoundaryOfLayout = (1 - layoutAnchor.y) * newHeight;\n }\n }\n\n this._doLayoutHorizontally(baseWidth, true, fnPositionY, true);\n\n if (this.resizeMode === ResizeMode.CONTAINER) {\n this.node.setContentSize(baseWidth, newHeight);\n }\n },\n\n _doLayoutGridAxisVertical: function (layoutAnchor, layoutSize) {\n var baseHeight = layoutSize.height;\n\n var sign = 1;\n var leftBoundaryOfLayout = -layoutAnchor.x * layoutSize.width;\n var paddingX = this.paddingLeft;\n if (this.horizontalDirection === HorizontalDirection.RIGHT_TO_LEFT) {\n sign = -1;\n leftBoundaryOfLayout = (1 - layoutAnchor.x) * layoutSize.width;\n paddingX = this.paddingRight;\n }\n\n var fnPositionX = function (child, leftOffset, column) {\n return leftBoundaryOfLayout + sign * (leftOffset + child.anchorX * child.width * this._getUsedScaleValue(child.scaleX) + paddingX + column * this.spacingX);\n }.bind(this);\n\n var newWidth = 0;\n if (this.resizeMode === ResizeMode.CONTAINER) {\n var boundary = this._doLayoutVertically(baseHeight, true, fnPositionX, false);\n newWidth = leftBoundaryOfLayout - boundary;\n if (newWidth < 0) {\n newWidth *= -1;\n }\n\n leftBoundaryOfLayout = -layoutAnchor.x * newWidth;\n\n if (this.horizontalDirection === HorizontalDirection.RIGHT_TO_LEFT) {\n sign = -1;\n leftBoundaryOfLayout = (1 - layoutAnchor.x) * newWidth;\n }\n }\n\n this._doLayoutVertically(baseHeight, true, fnPositionX, true);\n\n if (this.resizeMode === ResizeMode.CONTAINER) {\n this.node.setContentSize(newWidth, baseHeight);\n }\n },\n\n _doLayoutGrid: function () {\n var layoutAnchor = this.node.getAnchorPoint();\n var layoutSize = this.node.getContentSize();\n\n if (this.startAxis === AxisDirection.HORIZONTAL) {\n this._doLayoutGridAxisHorizontal(layoutAnchor, layoutSize);\n\n }\n else if (this.startAxis === AxisDirection.VERTICAL) {\n this._doLayoutGridAxisVertical(layoutAnchor, layoutSize);\n }\n\n },\n\n _getHorizontalBaseWidth: function (children) {\n var newWidth = 0;\n var activeChildCount = 0;\n if (this.resizeMode === ResizeMode.CONTAINER) {\n for (var i = 0; i < children.length; ++i) {\n var child = children[i];\n if (child.activeInHierarchy) {\n activeChildCount++;\n newWidth += child.width * this._getUsedScaleValue(child.scaleX);\n }\n }\n newWidth += (activeChildCount - 1) * this.spacingX + this.paddingLeft + this.paddingRight;\n }\n else {\n newWidth = this.node.getContentSize().width;\n }\n return newWidth;\n },\n\n _doLayout: function () {\n if (this.type === Type.HORIZONTAL) {\n var newWidth = this._getHorizontalBaseWidth(this.node.children);\n\n var fnPositionY = function (child) {\n return child.y;\n };\n\n this._doLayoutHorizontally(newWidth, false, fnPositionY, true);\n\n this.node.width = newWidth;\n }\n else if (this.type === Type.VERTICAL) {\n var newHeight = this._getVerticalBaseHeight(this.node.children);\n\n var fnPositionX = function (child) {\n return child.x;\n };\n\n this._doLayoutVertically(newHeight, false, fnPositionX, true);\n\n this.node.height = newHeight;\n }\n else if (this.type === Type.NONE) {\n if (this.resizeMode === ResizeMode.CONTAINER) {\n this._doLayoutBasic();\n }\n }\n else if (this.type === Type.GRID) {\n this._doLayoutGrid();\n }\n },\n\n _getUsedScaleValue (value) {\n return this.affectedByScale ? Math.abs(value) : 1;\n },\n\n /**\n * !#en Perform the layout update\n * !#zh 立即执行更新布局\n *\n * @method updateLayout\n *\n * @example\n * layout.type = cc.Layout.HORIZONTAL;\n * layout.node.addChild(childNode);\n * cc.log(childNode.x); // not yet changed\n * layout.updateLayout();\n * cc.log(childNode.x); // changed\n */\n updateLayout: function () {\n if (this._layoutDirty && this.node.children.length > 0) {\n var activeChild = this.node.children.find((node) => node.activeInHierarchy);\n if(activeChild) {\n this._doLayout();\n this._layoutDirty = false;\n }\n }\n }\n});\n\ncc.Layout = module.exports = Layout;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport gfx from '../../renderer/gfx';\n\nconst misc = require('../utils/misc');\nconst RenderComponent = require('./CCRenderComponent');\nconst RenderFlow = require('../renderer/render-flow');\nconst Graphics = require('../graphics/graphics');\n\nimport Mat4 from '../value-types/mat4';\nimport Vec2 from '../value-types/vec2';\nimport MaterialVariant from '../assets/material/material-variant';\n\nlet _vec2_temp = new Vec2();\nlet _mat4_temp = new Mat4();\n\nlet _circlepoints =[];\nfunction _calculateCircle (center, radius, segements) {\n _circlepoints.length = 0;\n let anglePerStep = Math.PI * 2 / segements;\n for (let step = 0; step < segements; ++step) {\n _circlepoints.push(cc.v2(radius.x * Math.cos(anglePerStep * step) + center.x,\n radius.y * Math.sin(anglePerStep * step) + center.y));\n }\n\n return _circlepoints;\n}\n\n/**\n * !#en the type for mask.\n * !#zh 遮罩组件类型\n * @enum Mask.Type\n */\nlet MaskType = cc.Enum({\n /**\n * !#en Rect mask.\n * !#zh 使用矩形作为遮罩\n * @property {Number} RECT\n */\n RECT: 0,\n /**\n * !#en Ellipse Mask.\n * !#zh 使用椭圆作为遮罩\n * @property {Number} ELLIPSE\n */\n ELLIPSE: 1,\n /**\n * !#en Image Stencil Mask.\n * !#zh 使用图像模版作为遮罩\n * @property {Number} IMAGE_STENCIL\n */\n IMAGE_STENCIL: 2,\n});\n\nconst SEGEMENTS_MIN = 3;\nconst SEGEMENTS_MAX = 10000;\n\n/**\n * !#en The Mask Component\n * !#zh 遮罩组件\n * @class Mask\n * @extends RenderComponent\n */\nlet Mask = cc.Class({\n name: 'cc.Mask',\n extends: RenderComponent,\n\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.renderers/Mask',\n help: 'i18n:COMPONENT.help_url.mask',\n inspector: 'packages://inspector/inspectors/comps/mask.js'\n },\n\n ctor () {\n this._graphics = null;\n\n this._enableMaterial = null;\n this._exitMaterial = null;\n this._clearMaterial = null;\n },\n\n properties: {\n _spriteFrame: {\n default: null,\n type: cc.SpriteFrame\n },\n\n /**\n * !#en The mask type.\n * !#zh 遮罩类型\n * @property type\n * @type {Mask.Type}\n * @example\n * mask.type = cc.Mask.Type.RECT;\n */\n _type: MaskType.RECT,\n type: {\n get: function () {\n return this._type;\n },\n set: function (value) {\n if (this._type !== value) {\n this._resetAssembler();\n }\n\n this._type = value;\n if (this._type !== MaskType.IMAGE_STENCIL) {\n this.spriteFrame = null;\n this.alphaThreshold = 0;\n this._updateGraphics();\n }\n \n this._activateMaterial();\n },\n type: MaskType,\n tooltip: CC_DEV && 'i18n:COMPONENT.mask.type',\n },\n\n /**\n * !#en The mask image\n * !#zh 遮罩所需要的贴图\n * @property spriteFrame\n * @type {SpriteFrame}\n * @default null\n * @example\n * mask.spriteFrame = newSpriteFrame;\n */\n spriteFrame: {\n type: cc.SpriteFrame,\n tooltip: CC_DEV && 'i18n:COMPONENT.mask.spriteFrame',\n get: function () {\n return this._spriteFrame;\n },\n set: function (value) {\n let lastSprite = this._spriteFrame;\n if (CC_EDITOR) {\n if ((lastSprite && lastSprite._uuid) === (value && value._uuid)) {\n return;\n }\n }\n else {\n if (lastSprite === value) {\n return;\n }\n }\n\n if (lastSprite) {\n lastSprite.off('load', this.setVertsDirty, this);\n }\n\n this._spriteFrame = value;\n \n this.setVertsDirty();\n this._updateMaterial();\n },\n },\n\n /**\n * !#en\n * The alpha threshold.(Not supported Canvas Mode) <br/>\n * The content is drawn only where the stencil have pixel with alpha greater than the alphaThreshold. <br/>\n * Should be a float between 0 and 1. <br/>\n * This default to 0.1.\n * When it's set to 1, the stencil will discard all pixels, nothing will be shown.\n * !#zh\n * Alpha 阈值(不支持 Canvas 模式)<br/>\n * 只有当模板的像素的 alpha 大于等于 alphaThreshold 时,才会绘制内容。<br/>\n * 该数值 0 ~ 1 之间的浮点数,默认值为 0.1\n * 当被设置为 1 时,会丢弃所有蒙版像素,所以不会显示任何内容\n * @property alphaThreshold\n * @type {Number}\n * @default 0.1\n */\n alphaThreshold: {\n default: 0.1,\n type: cc.Float,\n range: [0, 1, 0.1],\n slide: true,\n tooltip: CC_DEV && 'i18n:COMPONENT.mask.alphaThreshold',\n notify: function () {\n if (cc.game.renderType === cc.game.RENDER_TYPE_CANVAS) {\n cc.warnID(4201);\n return;\n }\n this._updateMaterial();\n }\n },\n\n /**\n * !#en Reverse mask (Not supported Canvas Mode)\n * !#zh 反向遮罩(不支持 Canvas 模式)\n * @property inverted\n * @type {Boolean}\n * @default false\n */\n inverted: {\n default: false,\n type: cc.Boolean,\n tooltip: CC_DEV && 'i18n:COMPONENT.mask.inverted',\n notify: function () {\n if (cc.game.renderType === cc.game.RENDER_TYPE_CANVAS) {\n cc.warnID(4202);\n }\n }\n },\n\n /**\n * TODO: remove segments, not supported by graphics\n * !#en The segements for ellipse mask.\n * !#zh 椭圆遮罩的曲线细分数\n * @property segements\n * @type {Number}\n * @default 64\n */\n _segments: 64,\n segements: {\n get: function () {\n return this._segments;\n },\n set: function (value) {\n this._segments = misc.clampf(value, SEGEMENTS_MIN, SEGEMENTS_MAX);\n this._updateGraphics();\n },\n type: cc.Integer,\n tooltip: CC_DEV && 'i18n:COMPONENT.mask.segements',\n },\n\n _resizeToTarget: {\n animatable: false,\n set: function (value) {\n if(value) {\n this._resizeNodeToTargetNode();\n }\n }\n }\n },\n\n statics: {\n Type: MaskType,\n },\n\n onRestore () {\n this._activateMaterial();\n },\n\n onEnable () {\n this._super();\n if (this._type !== MaskType.IMAGE_STENCIL) {\n this._updateGraphics();\n }\n else if (this._spriteFrame) {\n this._spriteFrame.once('load', this.setVertsDirty, this);\n }\n\n this.node.on(cc.Node.EventType.POSITION_CHANGED, this._updateGraphics, this);\n this.node.on(cc.Node.EventType.ROTATION_CHANGED, this._updateGraphics, this);\n this.node.on(cc.Node.EventType.SCALE_CHANGED, this._updateGraphics, this);\n this.node.on(cc.Node.EventType.SIZE_CHANGED, this._updateGraphics, this);\n this.node.on(cc.Node.EventType.ANCHOR_CHANGED, this._updateGraphics, this);\n },\n\n onDisable () {\n this._super();\n\n this.node.off(cc.Node.EventType.POSITION_CHANGED, this._updateGraphics, this);\n this.node.off(cc.Node.EventType.ROTATION_CHANGED, this._updateGraphics, this);\n this.node.off(cc.Node.EventType.SCALE_CHANGED, this._updateGraphics, this);\n this.node.off(cc.Node.EventType.SIZE_CHANGED, this._updateGraphics, this);\n this.node.off(cc.Node.EventType.ANCHOR_CHANGED, this._updateGraphics, this);\n \n this.node._renderFlag &= ~RenderFlow.FLAG_POST_RENDER;\n },\n\n onDestroy () {\n this._super();\n this._removeGraphics();\n\n if (this._spriteFrame) {\n this._spriteFrame.off('load', this.setVertsDirty, this);\n }\n },\n\n _resizeNodeToTargetNode: CC_EDITOR && function () {\n if(this.spriteFrame) {\n let rect = this.spriteFrame.getRect();\n this.node.setContentSize(rect.width, rect.height);\n }\n },\n\n _validateRender () {\n if (this._type !== MaskType.IMAGE_STENCIL) return;\n\n let spriteFrame = this._spriteFrame;\n if (spriteFrame && \n spriteFrame.textureLoaded()) {\n return;\n }\n\n this.disableRender();\n },\n\n _activateMaterial () {\n this._createGraphics();\n \n // Init material\n let material = this._materials[0];\n if (!material) {\n material = MaterialVariant.createWithBuiltin('2d-sprite', this);\n }\n else {\n material = MaterialVariant.create(material, this);\n }\n\n material.define('USE_ALPHA_TEST', true);\n\n // Reset material\n if (this._type === MaskType.IMAGE_STENCIL) {\n material.define('CC_USE_MODEL', false);\n material.define('USE_TEXTURE', true);\n }\n else {\n material.define('CC_USE_MODEL', true);\n material.define('USE_TEXTURE', false);\n }\n\n if (!this._enableMaterial) {\n this._enableMaterial = MaterialVariant.createWithBuiltin('2d-sprite', this);\n }\n \n if (!this._exitMaterial) {\n this._exitMaterial = MaterialVariant.createWithBuiltin('2d-sprite', this);\n this._exitMaterial.setStencilEnabled(gfx.STENCIL_DISABLE);\n }\n\n if (!this._clearMaterial) {\n this._clearMaterial = MaterialVariant.createWithBuiltin('clear-stencil', this);\n }\n\n this.setMaterial(0, material);\n\n this._graphics._materials[0] = material;\n\n this._updateMaterial();\n },\n\n _updateMaterial () {\n let material = this._materials[0];\n if (!material) return;\n\n if (this._type === MaskType.IMAGE_STENCIL && this.spriteFrame) {\n let texture = this.spriteFrame.getTexture();\n material.setProperty('texture', texture);\n }\n material.setProperty('alphaThreshold', this.alphaThreshold);\n },\n\n _createGraphics () {\n if (!this._graphics) {\n this._graphics = new Graphics();\n cc.Assembler.init(this._graphics);\n this._graphics.node = this.node;\n this._graphics.lineWidth = 0;\n this._graphics.strokeColor = cc.color(0, 0, 0, 0);\n }\n },\n\n _updateGraphics () {\n if (!this.enabledInHierarchy) return;\n let node = this.node;\n let graphics = this._graphics;\n // Share render data with graphics content\n graphics.clear(false);\n let width = node._contentSize.width;\n let height = node._contentSize.height;\n let x = -width * node._anchorPoint.x;\n let y = -height * node._anchorPoint.y;\n if (this._type === MaskType.RECT) {\n graphics.rect(x, y, width, height);\n }\n else if (this._type === MaskType.ELLIPSE) {\n let center = cc.v2(x + width / 2, y + height / 2);\n let radius = {\n x: width / 2,\n y: height / 2\n };\n let points = _calculateCircle(center, radius, this._segments);\n for (let i = 0; i < points.length; ++i) {\n let point = points[i];\n if (i === 0) {\n graphics.moveTo(point.x, point.y);\n }\n else {\n graphics.lineTo(point.x, point.y);\n }\n }\n graphics.close();\n }\n if (cc.game.renderType === cc.game.RENDER_TYPE_CANVAS) {\n graphics.stroke();\n }\n else {\n graphics.fill();\n }\n this.setVertsDirty();\n },\n\n _removeGraphics () {\n if (this._graphics) {\n this._graphics.destroy();\n this._graphics._destroyImmediate(); // FIX: cocos-creator/2d-tasks#2511. TODO: cocos-creator/2d-tasks#2516\n this._graphics = null;\n }\n },\n\n _hitTest (cameraPt) {\n let node = this.node;\n let size = node.getContentSize(),\n w = size.width,\n h = size.height,\n testPt = _vec2_temp;\n \n node._updateWorldMatrix();\n // If scale is 0, it can't be hit.\n if (!Mat4.invert(_mat4_temp, node._worldMatrix)) {\n return false;\n }\n Vec2.transformMat4(testPt, cameraPt, _mat4_temp);\n testPt.x += node._anchorPoint.x * w;\n testPt.y += node._anchorPoint.y * h;\n\n let result = false;\n if (this.type === MaskType.RECT || this.type === MaskType.IMAGE_STENCIL) {\n result = testPt.x >= 0 && testPt.y >= 0 && testPt.x <= w && testPt.y <= h;\n }\n else if (this.type === MaskType.ELLIPSE) {\n let rx = w / 2, ry = h / 2;\n let px = testPt.x - 0.5 * w, py = testPt.y - 0.5 * h;\n result = px * px / (rx * rx) + py * py / (ry * ry) < 1;\n }\n if (this.inverted) {\n result = !result;\n }\n return result;\n },\n\n markForRender (enable) {\n let flag = RenderFlow.FLAG_RENDER | RenderFlow.FLAG_UPDATE_RENDER_DATA | RenderFlow.FLAG_POST_RENDER;\n if (enable) {\n this.node._renderFlag |= flag;\n this.markForValidate();\n }\n else if (!enable) {\n this.node._renderFlag &= ~flag;\n }\n },\n\n disableRender () {\n this.node._renderFlag &= ~(RenderFlow.FLAG_RENDER | RenderFlow.FLAG_UPDATE_RENDER_DATA | \n RenderFlow.FLAG_POST_RENDER);\n },\n});\n\ncc.Mask = module.exports = Mask;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst RenderComponent = require('../components/CCRenderComponent');\nconst BlendFunc = require('../../core/utils/blend-func');\n\n/**\n * !#en\n * cc.MotionStreak manages a Ribbon based on it's motion in absolute space. <br/>\n * You construct it with a fadeTime, minimum segment size, texture path, texture <br/>\n * length and color. The fadeTime controls how long it takes each vertex in <br/>\n * the streak to fade out, the minimum segment size it how many pixels the <br/>\n * streak will move before adding a new ribbon segment, and the texture <br/>\n * length is the how many pixels the texture is stretched across. The texture <br/>\n * is vertically aligned along the streak segment.\n * !#zh 运动轨迹,用于游戏对象的运动轨迹上实现拖尾渐隐效果。\n * @class MotionStreak\n * @extends Component\n * @uses BlendFunc\n */\nvar MotionStreak = cc.Class({\n name: 'cc.MotionStreak',\n\n // To avoid conflict with other render component, we haven't use ComponentUnderSG,\n // its implementation also requires some different approach:\n // 1.Needed a parent node to make motion streak's position global related.\n // 2.Need to update the position in each frame by itself because we don't know\n // whether the global position have changed\n extends: RenderComponent,\n mixins: [BlendFunc],\n\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.others/MotionStreak',\n help: 'i18n:COMPONENT.help_url.motionStreak',\n playOnFocus: true,\n executeInEditMode: true\n },\n\n ctor () {\n this._points = [];\n this._lastWPos = new cc.Vec2();\n },\n\n properties: {\n /**\n * !#en\n * !#zh 在编辑器模式下预览拖尾效果。\n * @property {Boolean} preview\n * @default false\n */\n preview: {\n default: false,\n editorOnly: true,\n notify: CC_EDITOR && function () {\n this.reset();\n },\n animatable: false\n },\n\n /**\n * !#en The fade time to fade.\n * !#zh 拖尾的渐隐时间,以秒为单位。\n * @property fadeTime\n * @type {Number}\n * @example\n * motionStreak.fadeTime = 3;\n */\n _fadeTime: 1,\n fadeTime: {\n get () {\n return this._fadeTime;\n },\n set (value) {\n this._fadeTime = value;\n this.reset();\n },\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.motionStreak.fadeTime'\n },\n\n /**\n * !#en The minimum segment size.\n * !#zh 拖尾之间最小距离。\n * @property minSeg\n * @type {Number}\n * @example\n * motionStreak.minSeg = 3;\n */\n _minSeg: 1,\n minSeg: {\n get () {\n return this._minSeg;\n },\n set (value) {\n this._minSeg = value;\n },\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.motionStreak.minSeg'\n },\n\n /**\n * !#en The stroke's width.\n * !#zh 拖尾的宽度。\n * @property stroke\n * @type {Number}\n * @example\n * motionStreak.stroke = 64;\n */\n _stroke: 64,\n stroke: {\n get () {\n return this._stroke;\n },\n set (value) {\n this._stroke = value;\n },\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.motionStreak.stroke'\n },\n\n /**\n * !#en The texture of the MotionStreak.\n * !#zh 拖尾的贴图。\n * @property texture\n * @type {Texture2D}\n * @example\n * motionStreak.texture = newTexture;\n */\n _texture: {\n default: null,\n type: cc.Texture2D\n },\n texture: {\n get () {\n return this._texture;\n },\n set (value) {\n if (this._texture === value) return;\n\n this._texture = value;\n\n // 自动切换材质\n this._checkSwitchMaterial();\n\n this._updateMaterial();\n },\n type: cc.Texture2D,\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.motionStreak.texture'\n },\n\n /**\n * !#en The color of the MotionStreak.\n * !#zh 拖尾的颜色\n * @property color\n * @type {Color}\n * @default cc.Color.WHITE\n * @example\n * motionStreak.color = new cc.Color(255, 255, 255);\n */\n _color: cc.Color.WHITE,\n color: {\n get () {\n return this._color.clone();\n },\n set (value) {\n if (!this._color.equals(value)) {\n this._color.set(value);\n }\n },\n type: cc.Color,\n tooltip: CC_DEV && 'i18n:COMPONENT.motionStreak.color'\n },\n\n /**\n * !#en The fast Mode.\n * !#zh 是否启用了快速模式。当启用快速模式,新的点会被更快地添加,但精度较低。\n * @property fastMode\n * @type {Boolean}\n * @default false\n * @example\n * motionStreak.fastMode = true;\n */\n _fastMode: false,\n fastMode: {\n get () {\n return this._fastMode;\n },\n set (value) {\n this._fastMode = value;\n },\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.motionStreak.fastMode'\n },\n\n autoSwitchMaterial: {\n type: RenderComponent.EnableType,\n default: RenderComponent.EnableType.GLOBAL,\n notify(oldValue) {\n if (this.autoSwitchMaterial === oldValue) return;\n this.setVertsDirty();\n },\n },\n },\n\n setVertsDirty() {\n // 自动切换材质\n this._checkSwitchMaterial();\n\n this._updateMaterial();\n this._super();\n },\n\n __preload() {\n this._super();\n this._checkSwitchMaterial();\n },\n\n _checkSwitchMaterial() {\n if (this._assembler) {\n const material = this._materials[0];\n if (!material) return;\n if (!this._texture) return;\n this._assembler.checkAndSwitchMaterial(this, this._texture, material);\n }\n },\n\n onEnable () {\n this._super();\n this.reset();\n },\n\n _updateMaterial () {\n let material = this.getMaterial(0);\n\n // 根据材质更新 uniform\n const isMultiMaterial = material.material.isMultiSupport();\n if (isMultiMaterial) {\n if (!this._texture) return;\n this._updateMultiTexId(material, this._texture);\n } else {\n const textureImpl = this._texture && this._texture.getImpl();\n if (material.getProperty('texture') !== textureImpl) {\n material.setProperty('texture', this._texture);\n }\n }\n\n // 根据材质更新 assembler\n if (this._assembler) {\n if ((isMultiMaterial && !this._assembler.isMulti) || !isMultiMaterial && this._assembler.isMulti) {\n this._resetAssembler();\n }\n }\n\n // texId\n if (isMultiMaterial && this._texIdDirty && this._assembler) {\n if (!this._texture) return;\n this._assembler.updateTexId(this);\n this._texIdDirty = false;\n }\n\n BlendFunc.prototype._updateMaterial.call(this);\n },\n\n onFocusInEditor: CC_EDITOR && function () {\n if (this.preview) {\n this.reset();\n }\n },\n\n onLostFocusInEditor: CC_EDITOR && function () {\n if (this.preview) {\n this.reset();\n }\n },\n\n /**\n * !#en Remove all living segments of the ribbon.\n * !#zh 删除当前所有的拖尾片段。\n * @method reset\n * @example\n * // Remove all living segments of the ribbon.\n * myMotionStreak.reset();\n */\n reset () {\n this._points.length = 0;\n this._assembler && this._assembler._renderData.clear();\n this._lastWPos.x = 0;\n this._lastWPos.y = 0;\n if (CC_EDITOR) {\n cc.engine.repaintInEditMode();\n }\n },\n\n lateUpdate (dt) {\n this._assembler && this._assembler.update(this, dt);\n }\n});\n\ncc.MotionStreak = module.exports = MotionStreak;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport Assembler from '../renderer/assembler';\nimport MaterialVariant from '../assets/material/material-variant';\nimport { Color } from '../value-types';\n\nconst Component = require('./CCComponent');\nconst RenderFlow = require('../renderer/render-flow');\nconst Material = require('../assets/material/CCMaterial');\n\nlet _temp_color = new Color();\n\n/**\n * !#en enable type\n * !#zh 启用类型\n * @enum RenderComponent.EnableType\n */\nvar EnableType = cc.Enum({\n /**\n * !#en Global.\n * !#zh 使用全局值\n * @property {Number} GLOBAL\n */\n GLOBAL: 0,\n /**\n * !#en Enable.\n * !#zh 开启\n * @property {Number} ENABLE\n */\n ENABLE: 1,\n /**\n * !#en Disable.\n * !#zh 关闭\n * @property {Number} DISABLE\n */\n DISABLE: 2,\n});\n\n/**\n * !#en\n * Base class for components which supports rendering features.\n * !#zh\n * 所有支持渲染的组件的基类\n *\n * @class RenderComponent\n * @extends Component\n */\nlet RenderComponent = cc.Class({\n name: 'RenderComponent',\n extends: Component,\n\n editor: CC_EDITOR && {\n executeInEditMode: true,\n disallowMultiple: true\n },\n\n statics: {\n EnableType: EnableType,\n },\n\n properties: {\n _materials: {\n default: [],\n type: Material,\n },\n\n /**\n * !#en The materials used by this render component.\n * !#zh 渲染组件使用的材质。\n * @property {[Material]} sharedMaterials\n */\n materials: {\n get () {\n return this._materials;\n },\n set (val) {\n this._materials = val;\n this._activateMaterial();\n },\n type: [Material],\n displayName: 'Materials',\n animatable: false\n }\n },\n\n ctor () {\n this._vertsDirty = true;\n this._texIdDirty = true;\n this._texId = 0;\n this._assembler = null;\n },\n\n _resetAssembler () {\n Assembler.init(this);\n this._updateColor();\n // 切换 Assembler 时texId 与 vDatas 数据不同步\n this._texId = 0;\n this.setVertsDirty();\n },\n\n __preload () {\n this._resetAssembler();\n this._activateMaterial();\n },\n\n onEnable () {\n if (this.node._renderComponent) {\n this.node._renderComponent.enabled = false;\n }\n this.node._renderComponent = this;\n this.node._renderFlag |= RenderFlow.FLAG_OPACITY_COLOR;\n\n this.setVertsDirty();\n },\n\n onDisable () {\n this.node._renderComponent = null;\n this.disableRender();\n },\n\n onDestroy () {\n let materials = this._materials;\n for (let i = 0; i < materials.length; i++) {\n cc.pool.material.put(materials[i]);\n }\n materials.length = 0;\n\n cc.pool.assembler.put(this._assembler);\n\n this.disableRender();\n },\n\n setVertsDirty () {\n this._vertsDirty = true;\n this.markForRender(true);\n },\n\n _on3DNodeChanged () {\n this._resetAssembler();\n },\n\n _validateRender () {\n },\n\n markForValidate () {\n cc.RenderFlow.registerValidate(this);\n },\n\n markForRender (enable) {\n let flag = RenderFlow.FLAG_RENDER | RenderFlow.FLAG_UPDATE_RENDER_DATA;\n if (enable) {\n this.node._renderFlag |= flag;\n this.markForValidate();\n }\n else {\n this.node._renderFlag &= ~flag;\n }\n },\n\n disableRender () {\n this.node._renderFlag &= ~(RenderFlow.FLAG_RENDER | RenderFlow.FLAG_UPDATE_RENDER_DATA);\n },\n\n /**\n * !#en Get the material by index.\n * !#zh 根据指定索引获取材质\n * @method getMaterial\n * @param {Number} index\n * @return {MaterialVariant}\n */\n getMaterial (index) {\n if (index < 0 || index >= this._materials.length) {\n return null;\n }\n\n let material = this._materials[index];\n if (!material) return null;\n\n let instantiated = MaterialVariant.create(material, this);\n if (instantiated !== material) {\n this.setMaterial(index, instantiated);\n }\n\n return instantiated;\n },\n\n /**\n * !#en Gets all the materials.\n * !#zh 获取所有材质。\n * @method getMaterials\n * @return {[MaterialVariant]}\n */\n getMaterials () {\n let materials = this._materials;\n for (let i = 0; i < materials.length; i++) {\n materials[i] = MaterialVariant.create(materials[i], this);\n }\n return materials;\n },\n\n /**\n * !#en Set the material by index.\n * !#zh 根据指定索引设置材质\n * @method setMaterial\n * @param {Number} index\n * @param {Material} material\n * @return {Material}\n */\n setMaterial (index, material) {\n if (material !== this._materials[index]) {\n material = MaterialVariant.create(material, this);\n this._materials[index] = material;\n }\n this._updateMaterial();\n this.markForRender(true);\n return material;\n },\n\n _getDefaultMaterial () {\n return Material.getBuiltinMaterial('2d-sprite');\n },\n\n /**\n * Init material.\n */\n _activateMaterial () {\n let materials = this._materials;\n if (!materials[0]) {\n let material = this._getDefaultMaterial();\n materials[0] = material;\n }\n\n for (let i = 0; i < materials.length; i++) {\n materials[i] = MaterialVariant.create(materials[i], this);\n }\n\n this._updateMaterial();\n },\n\n /**\n * Update material properties.\n */\n _updateMaterial () {\n\n },\n\n _updateColor () {\n if (this._assembler.updateColor) {\n let premultiply = this.srcBlendFactor === cc.macro.BlendFactor.ONE;\n premultiply && Color.premultiplyAlpha(_temp_color, this.node._color);\n let color = premultiply ? _temp_color._val : null;\n this._assembler.updateColor(this, color);\n }\n },\n\n _checkBacth (renderer, cullingMask) {\n let material = this._materials[0];\n if ((material && material.getHash() !== renderer.material.getHash()) ||\n renderer.cullingMask !== cullingMask) {\n renderer._flush();\n\n renderer.node = material.getDefine('CC_USE_MODEL') ? this.node : renderer._dummyNode;\n renderer.material = material;\n renderer.cullingMask = cullingMask;\n }\n },\n\n _updateMultiTexId(material, texture) {\n const multi = material.material.getMultiHandler();\n\n const spTexture = texture;\n const nSpTexture = spTexture.getImpl();\n\n // 快速检查插槽上的贴图是否相同\n // 如果是当作普通材质使用multi.getTexture(this._texId) !== nSpTexture 会一直为 true\n const same = this._texId === 0\n ? material.getProperty('texture') !== nSpTexture\n : multi.getTexture(this._texId) !== nSpTexture;\n\n if (same) {\n // 如果材质变体被修改了,则直接跳过位置检查\n const isChanged = Object.prototype.hasOwnProperty.call(material._effect._passes['0']._properties, 'texture');\n const texId = isChanged ? -1 : multi.getIndex(nSpTexture);\n\n if (texId !== -1) {\n // 插槽位置不对,则更新位置\n this._texId = texId;\n this._texIdDirty = true;\n } else {\n // 插槽根本没有该纹理,则修改变体的 texture\n material.setProperty('texture', spTexture);\n if (this._texId !== 0) {\n this._texId = 0;\n this._texIdDirty = true;\n }\n // cc.warn('renderComponent use multi-material but not has valid property.');\n }\n } else {\n this._texIdDirty = false;\n }\n },\n\n});\n\ncc.RenderComponent = module.exports = RenderComponent;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst js = require('../platform/js');\nconst macro = require('../platform/CCMacro');\nconst textUtils = require('../utils/text-utils');\nconst HtmlTextParser = require('../utils/html-text-parser');\nimport MaterialVariant from '../assets/material/material-variant';\nconst _htmlTextParser = new HtmlTextParser();\n\nconst HorizontalAlign = macro.TextAlignment;\nconst VerticalAlign = macro.VerticalTextAlignment;\nconst RichTextChildName = \"RICHTEXT_CHILD\";\nconst RichTextChildImageName = \"RICHTEXT_Image_CHILD\";\nconst CacheMode = cc.Label.CacheMode;\n\nconst RenderComponent = require('./CCRenderComponent');\n\n// Returns a function, that, as long as it continues to be invoked, will not\n// be triggered. The function will be called after it stops being called for\n// N milliseconds. If `immediate` is passed, trigger the function on the\n// leading edge, instead of the trailing.\nfunction debounce(func, wait, immediate) {\n let timeout;\n return function () {\n let context = this;\n let later = function () {\n timeout = null;\n if (!immediate) func.apply(context, arguments);\n };\n let callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, arguments);\n };\n}\n\n/**\n * RichText pool\n */\nlet pool = new js.Pool(function (node) {\n if (CC_EDITOR) {\n cc.isValid(node) && node.destroy();\n return false;\n }\n if (CC_DEV) {\n cc.assert(!node._parent, 'Recycling node\\'s parent should be null!');\n }\n if (!cc.isValid(node)) {\n return false;\n } else {\n let outline = node.getComponent(cc.LabelOutline);\n if (outline) {\n outline.width = 0;\n }\n }\n\n return true;\n}, 20);\n\npool.get = function (string, richtext) {\n let labelNode = this._get();\n if (!labelNode) {\n labelNode = new cc.PrivateNode(RichTextChildName);\n labelNode._objFlags |= cc.Object.Flags.DontSave;\n }\n\n labelNode.setPosition(0, 0);\n labelNode.setAnchorPoint(0.5, 0.5);\n labelNode.skewX = 0;\n\n let labelComponent = labelNode.getComponent(cc.Label);\n if (!labelComponent) {\n labelComponent = labelNode.addComponent(cc.Label);\n }\n\n labelComponent.string = \"\";\n labelComponent.horizontalAlign = HorizontalAlign.LEFT;\n labelComponent.verticalAlign = VerticalAlign.CENTER;\n labelComponent._forceUseCanvas = true;\n\n return labelNode;\n};\n\n/**\n * !#en The RichText Component.\n * !#zh 富文本组件\n * @class RichText\n * @extends Component\n */\nlet RichText = cc.Class({\n name: 'cc.RichText',\n extends: cc.Component,\n\n ctor: function () {\n this._textArray = null;\n this._labelSegments = [];\n this._labelSegmentsCache = [];\n this._linesWidth = [];\n\n if (CC_EDITOR) {\n this._userDefinedFont = null;\n this._updateRichTextStatus = debounce(this._updateRichText, 200);\n }\n else {\n this._updateRichTextStatus = this._updateRichText;\n }\n },\n\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.renderers/RichText',\n help: 'i18n:COMPONENT.help_url.richtext',\n inspector: 'packages://service-pack/inspectors/comps/richtext.js',\n executeInEditMode: true\n },\n\n properties: {\n /**\n * !#en Content string of RichText.\n * !#zh 富文本显示的文本内容。\n * @property {String} string\n */\n string: {\n default: '<color=#00ff00>Rich</c><color=#0fffff>Text</color>',\n multiline: true,\n tooltip: CC_DEV && 'i18n:COMPONENT.richtext.string',\n notify: function () {\n this._updateRichTextStatus();\n }\n },\n\n /**\n * !#en Horizontal Alignment of each line in RichText.\n * !#zh 文本内容的水平对齐方式。\n * @property {macro.TextAlignment} horizontalAlign\n */\n horizontalAlign: {\n default: HorizontalAlign.LEFT,\n type: HorizontalAlign,\n tooltip: CC_DEV && 'i18n:COMPONENT.richtext.horizontal_align',\n animatable: false,\n notify: function (oldValue) {\n if (this.horizontalAlign === oldValue) return;\n\n this._layoutDirty = true;\n this._updateRichTextStatus();\n }\n },\n\n /**\n * !#en Font size of RichText.\n * !#zh 富文本字体大小。\n * @property {Number} fontSize\n */\n fontSize: {\n default: 40,\n tooltip: CC_DEV && 'i18n:COMPONENT.richtext.font_size',\n notify: function (oldValue) {\n if (this.fontSize === oldValue) return;\n\n this._layoutDirty = true;\n this._updateRichTextStatus();\n }\n },\n\n /**\n * !#en Custom System font of RichText\n * !#zh 富文本定制系统字体\n * @property {String} fontFamily\n */\n _fontFamily: \"Arial\",\n fontFamily: {\n tooltip: CC_DEV && 'i18n:COMPONENT.richtext.font_family',\n get () {\n return this._fontFamily;\n },\n set (value) {\n if (this._fontFamily === value) return;\n this._fontFamily = value;\n this._layoutDirty = true;\n this._updateRichTextStatus();\n },\n animatable: false\n },\n\n /**\n * !#en Custom TTF font of RichText\n * !#zh 富文本定制字体\n * @property {cc.TTFFont} font\n */\n font: {\n default: null,\n type: cc.TTFFont,\n tooltip: CC_DEV && 'i18n:COMPONENT.richtext.font',\n notify: function (oldValue) {\n if (this.font === oldValue) return;\n\n this._layoutDirty = true;\n if (this.font) {\n if (CC_EDITOR) {\n this._userDefinedFont = this.font;\n }\n this.useSystemFont = false;\n this._onTTFLoaded();\n }\n else {\n this.useSystemFont = true;\n }\n this._updateRichTextStatus();\n }\n },\n\n /**\n * !#en Whether use system font name or not.\n * !#zh 是否使用系统字体。\n * @property {Boolean} useSystemFont\n */\n _isSystemFontUsed: true,\n useSystemFont: {\n get () {\n return this._isSystemFontUsed;\n },\n set (value) {\n if (this._isSystemFontUsed === value) {\n return;\n }\n this._isSystemFontUsed = value;\n\n if (CC_EDITOR) {\n if (value) {\n this.font = null;\n }\n else if (this._userDefinedFont) {\n this.font = this._userDefinedFont;\n return;\n }\n }\n\n this._layoutDirty = true;\n this._updateRichTextStatus();\n },\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.richtext.system_font',\n },\n\n /**\n * !#en The cache mode of label. This mode only supports system fonts.\n * !#zh 文本缓存模式, 该模式只支持系统字体。\n * @property {Label.CacheMode} cacheMode\n */\n cacheMode: {\n default: CacheMode.NONE,\n type: CacheMode,\n tooltip: CC_DEV && 'i18n:COMPONENT.label.cacheMode',\n notify (oldValue) {\n if (this.cacheMode === oldValue) return;\n\n this._updateRichTextStatus();\n },\n animatable: false\n },\n\n /**\n * !#en The maximize width of the RichText\n * !#zh 富文本的最大宽度\n * @property {Number} maxWidth\n */\n maxWidth: {\n default: 0,\n tooltip: CC_DEV && 'i18n:COMPONENT.richtext.max_width',\n notify: function (oldValue) {\n if (this.maxWidth === oldValue) return;\n\n this._layoutDirty = true;\n this._updateRichTextStatus();\n }\n },\n\n /**\n * !#en Line Height of RichText.\n * !#zh 富文本行高。\n * @property {Number} lineHeight\n */\n lineHeight: {\n default: 40,\n tooltip: CC_DEV && 'i18n:COMPONENT.richtext.line_height',\n notify: function (oldValue) {\n if (this.lineHeight === oldValue) return;\n\n this._layoutDirty = true;\n this._updateRichTextStatus();\n }\n },\n\n /**\n * !#en The image atlas for the img tag. For each src value in the img tag, there should be a valid spriteFrame in the image atlas.\n * !#zh 对于 img 标签里面的 src 属性名称,都需要在 imageAtlas 里面找到一个有效的 spriteFrame否则 img tag 会判定为无效。\n * @property {SpriteAtlas} imageAtlas\n */\n imageAtlas: {\n default: null,\n type: cc.SpriteAtlas,\n tooltip: CC_DEV && 'i18n:COMPONENT.richtext.image_atlas',\n notify: function (oldValue) {\n if (this.imageAtlas === oldValue) return;\n\n this._layoutDirty = true;\n this._updateRichTextStatus();\n }\n },\n\n /**\n * !#en\n * Once checked, the RichText will block all input events (mouse and touch) within\n * the bounding box of the node, preventing the input from penetrating into the underlying node.\n * !#zh\n * 选中此选项后RichText 将阻止节点边界框中的所有输入事件(鼠标和触摸),从而防止输入事件穿透到底层节点。\n * @property {Boolean} handleTouchEvent\n * @default true\n */\n handleTouchEvent: {\n default: true,\n tooltip: CC_DEV && 'i18n:COMPONENT.richtext.handleTouchEvent',\n notify: function (oldValue) {\n if (this.handleTouchEvent === oldValue) return;\n if (this.enabledInHierarchy) {\n this.handleTouchEvent ? this._addEventListeners() : this._removeEventListeners();\n }\n }\n },\n\n /**\n * 自定义内部使用的材质\n */\n customMaterial: {\n default: null,\n type: cc.Material,\n notify: function (oldValue) {\n if (this.customMaterial === oldValue) return;\n const material = this.customMaterial == null ? this._getDefaultMaterial() : this.customMaterial;\n for (let i = 0; i < this._labelSegments.length; i++) {\n const labelComponent = this._labelSegments[i].getComponent(cc.Label);\n if (labelComponent) {\n if (labelComponent._materials.length === 0) {\n labelComponent._materials[0] = MaterialVariant.create(material, labelComponent);\n } else {\n labelComponent.setMaterial(0, material);\n }\n }\n const spriteComponent = this._labelSegments[i].getComponent(cc.Sprite);\n if (spriteComponent) {\n if (spriteComponent._materials.length === 0) {\n spriteComponent._materials[0] = MaterialVariant.create(material, spriteComponent);\n } else {\n spriteComponent.setMaterial(0, material);\n }\n }\n }\n for (let i = 0; i < this._labelSegmentsCache.length; i++) {\n const labelComponent = this._labelSegmentsCache[i].getComponent(cc.Label);\n if (labelComponent) {\n if (labelComponent._materials.length === 0) {\n labelComponent._materials[0] = MaterialVariant.create(material, labelComponent);\n } else {\n labelComponent.setMaterial(0, material);\n }\n }\n }\n }\n },\n\n autoSwitchMaterial: {\n type: RenderComponent.EnableType,\n default: RenderComponent.EnableType.GLOBAL,\n notify: function (oldValue) {\n if (this.autoSwitchMaterial === oldValue) return;\n for (let i = 0; i < this._labelSegments.length; i++) {\n const labelComponent = this._labelSegments[i].getComponent(cc.Label);\n if (labelComponent) {\n labelComponent.autoSwitchMaterial = this.autoSwitchMaterial;\n }\n const spriteComponent = this._labelSegments[i].getComponent(cc.Sprite);\n if (spriteComponent) {\n spriteComponent.autoSwitchMaterial = this.autoSwitchMaterial;\n }\n }\n for (let i = 0; i < this._labelSegmentsCache.length; i++) {\n const labelComponent = this._labelSegmentsCache[i].getComponent(cc.Label);\n if (labelComponent) {\n labelComponent.autoSwitchMaterial = this.autoSwitchMaterial;\n }\n }\n }\n },\n\n allowDynamicAtlas: {\n type: RenderComponent.EnableType,\n default: RenderComponent.EnableType.GLOBAL,\n notify: function (oldValue) {\n if (this.allowDynamicAtlas === oldValue) return;\n for (let i = 0; i < this._labelSegments.length; i++) {\n const labelComponent = this._labelSegments[i].getComponent(cc.Label);\n if (labelComponent) {\n labelComponent.allowDynamicAtlas = this.allowDynamicAtlas;\n }\n const spriteComponent = this._labelSegments[i].getComponent(cc.Sprite);\n if (spriteComponent) {\n spriteComponent.allowDynamicAtlas = this.allowDynamicAtlas;\n }\n }\n for (let i = 0; i < this._labelSegmentsCache.length; i++) {\n const labelComponent = this._labelSegmentsCache[i].getComponent(cc.Label);\n if (labelComponent) {\n labelComponent.allowDynamicAtlas = this.allowDynamicAtlas;\n }\n }\n }\n },\n\n enableRetina: {\n type: RenderComponent.EnableType,\n default: RenderComponent.EnableType.GLOBAL,\n notify: function (oldValue) {\n if (this.enableRetina === oldValue) return;\n for (let i = 0; i < this._labelSegments.length; i++) {\n const labelComponent = this._labelSegments[i].getComponent(cc.Label);\n if (labelComponent) {\n labelComponent.enableRetina = this.enableRetina;\n }\n }\n for (let i = 0; i < this._labelSegmentsCache.length; i++) {\n const labelComponent = this._labelSegmentsCache[i].getComponent(cc.Label);\n if (labelComponent) {\n labelComponent.enableRetina = this.enableRetina;\n }\n }\n }\n },\n },\n\n statics: {\n HorizontalAlign: HorizontalAlign,\n VerticalAlign: VerticalAlign\n },\n\n onEnable () {\n if (this.handleTouchEvent) {\n this._addEventListeners();\n }\n this._onTTFLoaded();\n this._activateChildren(true);\n },\n\n onDisable () {\n if (this.handleTouchEvent) {\n this._removeEventListeners();\n }\n this._activateChildren(false);\n },\n\n _onColorChanged (parentColor) {\n let children = this.node.children;\n children.forEach(function (childNode) {\n childNode.color = parentColor;\n });\n },\n\n _addEventListeners () {\n this.node.on(cc.Node.EventType.TOUCH_END, this._onTouchEnded, this);\n this.node.on(cc.Node.EventType.COLOR_CHANGED, this._onColorChanged, this);\n },\n\n _removeEventListeners () {\n this.node.off(cc.Node.EventType.TOUCH_END, this._onTouchEnded, this);\n this.node.off(cc.Node.EventType.COLOR_CHANGED, this._onColorChanged, this);\n },\n\n _updateLabelSegmentTextAttributes () {\n this._labelSegments.forEach(function (item) {\n this._applyTextAttribute(item, null, true);\n }.bind(this));\n },\n\n _createFontLabel (string) {\n return pool.get(string, this);\n },\n\n _onTTFLoaded () {\n if (this.font instanceof cc.TTFFont) {\n if (this.font._nativeAsset) {\n this._layoutDirty = true;\n this._updateRichTextStatus();\n }\n else {\n let self = this;\n cc.assetManager.postLoadNative(this.font, function (err) {\n self._layoutDirty = true;\n self._updateRichTextStatus();\n });\n }\n }\n else {\n this._layoutDirty = true;\n this._updateRichTextStatus();\n }\n },\n\n _measureText (styleIndex, string) {\n let self = this;\n let func = function (string) {\n let label;\n if (self._labelSegmentsCache.length === 0) {\n label = self._createFontLabel(string);\n self._labelSegmentsCache.push(label);\n } else {\n label = self._labelSegmentsCache[0];\n }\n label._styleIndex = styleIndex;\n self._applyTextAttribute(label, string, true);\n let labelSize = label.getContentSize();\n return labelSize.width;\n };\n if (string) {\n return func(string);\n }\n else {\n return func;\n }\n },\n\n _onTouchEnded (event) {\n let components = this.node.getComponents(cc.Component);\n\n for (let i = 0; i < this._labelSegments.length; ++i) {\n let labelSegment = this._labelSegments[i];\n let clickHandler = labelSegment._clickHandler;\n let clickParam = labelSegment._clickParam;\n if (clickHandler && this._containsTouchLocation(labelSegment, event.touch.getLocation())) {\n components.forEach(function (component) {\n if (component.enabledInHierarchy && component[clickHandler]) {\n component[clickHandler](event, clickParam);\n }\n });\n event.stopPropagation();\n }\n }\n },\n\n _containsTouchLocation (label, point) {\n let myRect = label.getBoundingBoxToWorld();\n return myRect.contains(point);\n },\n\n _resetState () {\n let children = this.node.children;\n for (let i = children.length - 1; i >= 0; i--) {\n let child = children[i];\n if (child.name === RichTextChildName || child.name === RichTextChildImageName) {\n if (child.parent === this.node) {\n child.parent = null;\n }\n else {\n // In case child.parent !== this.node, child cannot be removed from children\n children.splice(i, 1);\n }\n if (child.name === RichTextChildName) {\n pool.put(child);\n }\n }\n }\n\n this._labelSegments.length = 0;\n this._labelSegmentsCache.length = 0;\n this._linesWidth.length = 0;\n this._lineOffsetX = 0;\n this._lineCount = 1;\n this._labelWidth = 0;\n this._labelHeight = 0;\n this._layoutDirty = true;\n },\n\n onRestore: CC_EDITOR && function () {\n // Because undo/redo will not call onEnable/onDisable,\n // we need call onEnable/onDisable manually to active/disactive children nodes.\n if (this.enabledInHierarchy) {\n this.onEnable();\n }\n else {\n this.onDisable();\n }\n },\n\n _activateChildren (active) {\n for (let i = this.node.children.length - 1; i >= 0; i--) {\n let child = this.node.children[i];\n if (child.name === RichTextChildName || child.name === RichTextChildImageName) {\n child.active = active;\n }\n }\n },\n\n _addLabelSegment (stringToken, styleIndex) {\n let labelSegment;\n if (this._labelSegmentsCache.length === 0) {\n labelSegment = this._createFontLabel(stringToken);\n } else {\n labelSegment = this._labelSegmentsCache.pop();\n }\n labelSegment._styleIndex = styleIndex;\n labelSegment._lineCount = this._lineCount;\n labelSegment.active = this.node.active;\n\n labelSegment.setAnchorPoint(0, 0);\n this._applyTextAttribute(labelSegment, stringToken, !!CC_EDITOR);\n\n this.node.addChild(labelSegment);\n this._labelSegments.push(labelSegment);\n\n return labelSegment;\n },\n\n _updateRichTextWithMaxWidth (labelString, labelWidth, styleIndex) {\n let fragmentWidth = labelWidth;\n let labelSegment;\n\n if (this._lineOffsetX > 0 && fragmentWidth + this._lineOffsetX > this.maxWidth) {\n //concat previous line\n let checkStartIndex = 0;\n while (this._lineOffsetX <= this.maxWidth) {\n let checkEndIndex = this._getFirstWordLen(labelString,\n checkStartIndex,\n labelString.length);\n let checkString = labelString.substr(checkStartIndex, checkEndIndex);\n let checkStringWidth = this._measureText(styleIndex, checkString);\n\n if (this._lineOffsetX + checkStringWidth <= this.maxWidth) {\n this._lineOffsetX += checkStringWidth;\n checkStartIndex += checkEndIndex;\n }\n else {\n\n if (checkStartIndex > 0) {\n let remainingString = labelString.substr(0, checkStartIndex);\n this._addLabelSegment(remainingString, styleIndex);\n labelString = labelString.substr(checkStartIndex, labelString.length);\n fragmentWidth = this._measureText(styleIndex, labelString);\n }\n this._updateLineInfo();\n break;\n }\n }\n }\n if (fragmentWidth > this.maxWidth) {\n let fragments = textUtils.fragmentText(labelString,\n fragmentWidth,\n this.maxWidth,\n this._measureText(styleIndex));\n for (let k = 0; k < fragments.length; ++k) {\n let splitString = fragments[k];\n labelSegment = this._addLabelSegment(splitString, styleIndex);\n let labelSize = labelSegment.getContentSize();\n this._lineOffsetX += labelSize.width;\n if (fragments.length > 1 && k < fragments.length - 1) {\n this._updateLineInfo();\n }\n }\n }\n else {\n this._lineOffsetX += fragmentWidth;\n this._addLabelSegment(labelString, styleIndex);\n }\n },\n\n _isLastComponentCR (stringToken) {\n return stringToken.length - 1 === stringToken.lastIndexOf(\"\\n\");\n },\n\n _updateLineInfo () {\n this._linesWidth.push(this._lineOffsetX);\n this._lineOffsetX = 0;\n this._lineCount++;\n },\n\n _needsUpdateTextLayout (newTextArray) {\n if (this._layoutDirty || !this._textArray || !newTextArray) {\n return true;\n }\n\n if (this._textArray.length !== newTextArray.length) {\n return true;\n }\n\n for (let i = 0; i < this._textArray.length; ++i) {\n let oldItem = this._textArray[i];\n let newItem = newTextArray[i];\n if (oldItem.text !== newItem.text) {\n return true;\n }\n else {\n let oldStyle = oldItem.style, newStyle = newItem.style;\n if (oldStyle) {\n if (newStyle) {\n if (!oldStyle.outline !== !newStyle.outline) {\n return true;\n }\n if (oldStyle.size !== newStyle.size\n || !oldStyle.italic !== !newStyle.italic\n || oldStyle.isImage !== newStyle.isImage) {\n return true;\n }\n if (oldStyle.src !== newStyle.src ||\n oldStyle.imageAlign !== newStyle.imageAlign ||\n oldStyle.imageHeight !== newStyle.imageHeight ||\n oldStyle.imageWidth !== newStyle.imageWidth ||\n oldStyle.imageOffset !== newStyle.imageOffset) {\n return true;\n }\n }\n else {\n if (oldStyle.size || oldStyle.italic || oldStyle.isImage || oldStyle.outline) {\n return true;\n }\n }\n }\n else {\n if (newStyle) {\n if (newStyle.size || newStyle.italic || newStyle.isImage || newStyle.outline) {\n return true;\n }\n }\n }\n }\n }\n return false;\n },\n\n _addRichTextImageElement (richTextElement) {\n let spriteFrameName = richTextElement.style.src;\n let spriteFrame = this.imageAtlas.getSpriteFrame(spriteFrameName);\n if (spriteFrame) {\n let spriteNode = new cc.PrivateNode(RichTextChildImageName);\n spriteNode._objFlags |= cc.Object.Flags.DontSave;\n let spriteComponent = spriteNode.addComponent(cc.Sprite);\n\n spriteComponent.autoSwitchMaterial = this.autoSwitchMaterial;\n spriteComponent.allowDynamicAtlas = this.allowDynamicAtlas;\n\n // 更新材质\n if (this.customMaterial) {\n if (spriteComponent._materials.length === 0) {\n spriteComponent._materials[0] = MaterialVariant.create(this.customMaterial, spriteComponent);\n } else {\n if (spriteComponent._materials[0].material !== this.customMaterial) {\n spriteComponent.setMaterial(0, this.customMaterial);\n }\n }\n }\n\n switch (richTextElement.style.imageAlign)\n {\n case 'top':\n spriteNode.setAnchorPoint(0, 1);\n break;\n case 'center':\n spriteNode.setAnchorPoint(0, 0.5);\n break;\n default:\n spriteNode.setAnchorPoint(0, 0);\n break;\n }\n if (richTextElement.style.imageOffset) spriteNode._imageOffset = richTextElement.style.imageOffset;\n spriteComponent.type = cc.Sprite.Type.SLICED;\n spriteComponent.sizeMode = cc.Sprite.SizeMode.CUSTOM;\n this.node.addChild(spriteNode);\n this._labelSegments.push(spriteNode);\n\n let spriteRect = spriteFrame.getRect();\n let scaleFactor = 1;\n let spriteWidth = spriteRect.width;\n let spriteHeight = spriteRect.height;\n let expectWidth = richTextElement.style.imageWidth;\n let expectHeight = richTextElement.style.imageHeight;\n\n if (expectHeight > 0) {\n scaleFactor = expectHeight / spriteHeight;\n spriteWidth = spriteWidth * scaleFactor;\n spriteHeight = spriteHeight * scaleFactor;\n }\n else {\n scaleFactor = this.lineHeight / spriteHeight;\n spriteWidth = spriteWidth * scaleFactor;\n spriteHeight = spriteHeight * scaleFactor;\n }\n\n if (expectWidth > 0) spriteWidth = expectWidth;\n\n if (this.maxWidth > 0) {\n if (this._lineOffsetX + spriteWidth > this.maxWidth) {\n this._updateLineInfo();\n }\n this._lineOffsetX += spriteWidth;\n\n }\n else {\n this._lineOffsetX += spriteWidth;\n if (this._lineOffsetX > this._labelWidth) {\n this._labelWidth = this._lineOffsetX;\n }\n }\n spriteComponent.spriteFrame = spriteFrame;\n spriteNode.setContentSize(spriteWidth, spriteHeight);\n spriteNode._lineCount = this._lineCount;\n\n if (richTextElement.style.event) {\n if (richTextElement.style.event.click) {\n spriteNode._clickHandler = richTextElement.style.event.click;\n }\n if (richTextElement.style.event.param) {\n spriteNode._clickParam = richTextElement.style.event.param;\n }\n else {\n spriteNode._clickParam = '';\n }\n }\n else {\n spriteNode._clickHandler = null;\n }\n }\n else {\n cc.warnID(4400);\n }\n },\n\n _updateRichText () {\n if (!this.enabledInHierarchy) return;\n\n let newTextArray = _htmlTextParser.parse(this.string);\n if (!this._needsUpdateTextLayout(newTextArray)) {\n this._textArray = newTextArray;\n this._updateLabelSegmentTextAttributes();\n return;\n }\n\n this._textArray = newTextArray;\n this._resetState();\n\n let lastEmptyLine = false;\n let label;\n let labelSize;\n\n for (let i = 0; i < this._textArray.length; ++i) {\n let richTextElement = this._textArray[i];\n let text = richTextElement.text;\n //handle <br/> <img /> tag\n if (text === \"\") {\n if (richTextElement.style && richTextElement.style.newline) {\n this._updateLineInfo();\n continue;\n }\n if (richTextElement.style && richTextElement.style.isImage && this.imageAtlas) {\n this._addRichTextImageElement(richTextElement);\n continue;\n }\n }\n let multilineTexts = text.split(\"\\n\");\n\n for (let j = 0; j < multilineTexts.length; ++j) {\n let labelString = multilineTexts[j];\n if (labelString === \"\") {\n //for continues \\n\n if (this._isLastComponentCR(text)\n && j === multilineTexts.length - 1) {\n continue;\n }\n this._updateLineInfo();\n lastEmptyLine = true;\n continue;\n }\n lastEmptyLine = false;\n\n if (this.maxWidth > 0) {\n let labelWidth = this._measureText(i, labelString);\n this._updateRichTextWithMaxWidth(labelString, labelWidth, i);\n\n if (multilineTexts.length > 1 && j < multilineTexts.length - 1) {\n this._updateLineInfo();\n }\n }\n else {\n label = this._addLabelSegment(labelString, i);\n labelSize = label.getContentSize();\n\n this._lineOffsetX += labelSize.width;\n if (this._lineOffsetX > this._labelWidth) {\n this._labelWidth = this._lineOffsetX;\n }\n\n if (multilineTexts.length > 1 && j < multilineTexts.length - 1) {\n this._updateLineInfo();\n }\n }\n }\n }\n if (!lastEmptyLine) {\n this._linesWidth.push(this._lineOffsetX);\n }\n\n if (this.maxWidth > 0) {\n this._labelWidth = this.maxWidth;\n }\n this._labelHeight = (this._lineCount + textUtils.BASELINE_RATIO) * this.lineHeight;\n\n // trigger \"size-changed\" event\n this.node.setContentSize(this._labelWidth, this._labelHeight);\n\n this._updateRichTextPosition();\n this._layoutDirty = false;\n },\n\n _getFirstWordLen (text, startIndex, textLen) {\n let character = text.charAt(startIndex);\n if (textUtils.isUnicodeCJK(character)\n || textUtils.isUnicodeSpace(character)) {\n return 1;\n }\n\n let len = 1;\n for (let index = startIndex + 1; index < textLen; ++index) {\n character = text.charAt(index);\n if (textUtils.isUnicodeSpace(character)\n || textUtils.isUnicodeCJK(character)) {\n break;\n }\n len++;\n }\n\n return len;\n },\n\n _updateRichTextPosition () {\n let nextTokenX = 0;\n let nextLineIndex = 1;\n let totalLineCount = this._lineCount;\n for (let i = 0; i < this._labelSegments.length; ++i) {\n let label = this._labelSegments[i];\n let lineCount = label._lineCount;\n if (lineCount > nextLineIndex) {\n nextTokenX = 0;\n nextLineIndex = lineCount;\n }\n let lineOffsetX = 0;\n // let nodeAnchorXOffset = (0.5 - this.node.anchorX) * this._labelWidth;\n switch (this.horizontalAlign) {\n case HorizontalAlign.LEFT:\n lineOffsetX = - this._labelWidth / 2;\n break;\n case HorizontalAlign.CENTER:\n lineOffsetX = - this._linesWidth[lineCount - 1] / 2;\n break;\n case HorizontalAlign.RIGHT:\n lineOffsetX = this._labelWidth / 2 - this._linesWidth[lineCount - 1];\n break;\n default:\n break;\n }\n label.x = nextTokenX + lineOffsetX;\n\n let labelSize = label.getContentSize();\n\n label.y = this.lineHeight * (totalLineCount - lineCount) - this._labelHeight / 2;\n\n if (lineCount === nextLineIndex) {\n nextTokenX += labelSize.width;\n }\n\n let sprite = label.getComponent(cc.Sprite);\n if (sprite) {\n // adjust img align (from <img align=top|center|bottom>)\n let lineHeightSet = this.lineHeight;\n let lineHeightReal = this.lineHeight * (1 + textUtils.BASELINE_RATIO); //single line node height\n switch (label.anchorY)\n {\n case 1:\n label.y += ( lineHeightSet + ( ( lineHeightReal - lineHeightSet) / 2 ) );\n break;\n case 0.5:\n label.y += ( lineHeightReal / 2 );\n break;\n default:\n label.y += ( (lineHeightReal - lineHeightSet) / 2 );\n break;\n }\n // adjust img offset (from <img offset=12|12,34>)\n if (label._imageOffset)\n {\n let offsets = label._imageOffset.split(',');\n if (offsets.length === 1 && offsets[0])\n {\n let offsetY = parseFloat(offsets[0]);\n if (Number.isInteger(offsetY)) label.y += offsetY;\n }\n else if(offsets.length === 2)\n {\n let offsetX = parseFloat(offsets[0]);\n let offsetY = parseFloat(offsets[1]);\n if (Number.isInteger(offsetX)) label.x += offsetX;\n if (Number.isInteger(offsetY)) label.y += offsetY;\n }\n }\n }\n\n //adjust y for label with outline\n let outline = label.getComponent(cc.LabelOutline);\n if (outline && outline.width) label.y = label.y - outline.width;\n }\n },\n\n _convertLiteralColorValue (color) {\n let colorValue = color.toUpperCase();\n if (cc.Color[colorValue]) {\n return cc.Color[colorValue];\n }\n else {\n let out = cc.color();\n return out.fromHEX(color);\n }\n },\n\n // When string is null, it means that the text does not need to be updated.\n _applyTextAttribute (labelNode, string, force) {\n let labelComponent = labelNode.getComponent(cc.Label);\n if (!labelComponent) {\n return;\n }\n\n let index = labelNode._styleIndex;\n\n let textStyle = null;\n if (this._textArray[index]) {\n textStyle = this._textArray[index].style;\n }\n\n if (textStyle && textStyle.color) {\n labelNode.color = this._convertLiteralColorValue(textStyle.color);\n }else {\n labelNode.color = this.node.color;\n }\n\n labelComponent.cacheMode = this.cacheMode;\n\n labelComponent.autoSwitchMaterial = this.autoSwitchMaterial;\n labelComponent.allowDynamicAtlas = this.allowDynamicAtlas;\n labelComponent.enableRetina = this.enableRetina;\n\n // 更新材质\n if (this.customMaterial) {\n if (labelComponent._materials.length === 0) {\n labelComponent._materials[0] = MaterialVariant.create(this.customMaterial, labelComponent);\n } else {\n if (labelComponent._materials[0].material !== this.customMaterial) {\n labelComponent.setMaterial(0, this.customMaterial);\n }\n }\n }\n\n let isAsset = this.font instanceof cc.Font;\n if (isAsset && !this._isSystemFontUsed) {\n labelComponent.font = this.font;\n } else {\n labelComponent.fontFamily = this.fontFamily;\n }\n\n labelComponent.useSystemFont = this._isSystemFontUsed;\n labelComponent.lineHeight = this.lineHeight;\n labelComponent.enableBold = textStyle && textStyle.bold;\n labelComponent.enableItalics = textStyle && textStyle.italic;\n //TODO: temporary implementation, the italic effect should be implemented in the internal of label-assembler.\n if (textStyle && textStyle.italic) {\n labelNode.skewX = 12;\n }\n\n labelComponent.enableUnderline = textStyle && textStyle.underline;\n\n if (textStyle && textStyle.outline) {\n let labelOutlineComponent = labelNode.getComponent(cc.LabelOutline);\n if (!labelOutlineComponent) {\n labelOutlineComponent = labelNode.addComponent(cc.LabelOutline);\n }\n labelOutlineComponent.color = this._convertLiteralColorValue(textStyle.outline.color);\n labelOutlineComponent.width = textStyle.outline.width;\n }\n\n if (textStyle && textStyle.size) {\n labelComponent.fontSize = textStyle.size;\n }\n else {\n labelComponent.fontSize = this.fontSize;\n }\n\n if (string !== null) {\n if (typeof string !== 'string') {\n string = '' + string;\n }\n labelComponent.string = string;\n }\n\n force && labelComponent._forceUpdateRenderData();\n\n if (textStyle && textStyle.event) {\n if (textStyle.event.click) {\n labelNode._clickHandler = textStyle.event.click;\n }\n if (textStyle.event.param) {\n labelNode._clickParam = textStyle.event.param;\n }\n else {\n labelNode._clickParam = '';\n }\n }\n else {\n labelNode._clickHandler = null;\n }\n },\n\n onDestroy () {\n for (let i = 0; i < this._labelSegments.length; ++i) {\n this._labelSegments[i].removeFromParent();\n pool.put(this._labelSegments[i]);\n }\n },\n});\n\ncc.RichText = module.exports = RichText;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst misc = require('../utils/misc');\nconst Component = require('./CCComponent');\n\nvar GETTINGSHORTERFACTOR = 20;\n\n/**\n * Enum for Scrollbar direction\n * @enum Scrollbar.Direction\n */\nvar Direction = cc.Enum({\n /**\n * @property {Number} HORIZONTAL\n */\n HORIZONTAL: 0,\n\n /**\n * @property {Number} VERTICAL\n */\n VERTICAL: 1\n});\n\n/**\n * !#en\n * The Scrollbar control allows the user to scroll an image or other view that is too large to see completely\n * !#zh 滚动条组件\n * @class Scrollbar\n * @extends Component\n */\nvar Scrollbar = cc.Class({\n name: 'cc.Scrollbar',\n extends: require('./CCComponent'),\n\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.ui/ScrollBar',\n help: 'i18n:COMPONENT.help_url.scrollbar',\n },\n\n properties: {\n _scrollView: null,\n _touching: false,\n _autoHideRemainingTime: {\n default: 0,\n serializable: false\n },\n _opacity: 255,\n\n /**\n * !#en The \"handle\" part of the scrollbar.\n * !#zh 作为当前滚动区域位置显示的滑块 Sprite。\n * @property {Sprite} handle\n */\n handle: {\n default: null,\n type: cc.Sprite,\n tooltip: CC_DEV && 'i18n:COMPONENT.scrollbar.handle',\n notify: function() {\n this._onScroll(cc.v2(0, 0));\n },\n animatable: false\n },\n\n /**\n * !#en The direction of scrollbar.\n * !#zh ScrollBar 的滚动方向。\n * @property {Scrollbar.Direction} direction\n */\n direction: {\n default: Direction.HORIZONTAL,\n type: Direction,\n tooltip: CC_DEV && 'i18n:COMPONENT.scrollbar.direction',\n notify: function() {\n this._onScroll(cc.v2(0, 0));\n },\n animatable: false\n },\n\n /**\n * !#en Whether enable auto hide or not.\n * !#zh 是否在没有滚动动作时自动隐藏 ScrollBar。\n * @property {Boolean} enableAutoHide\n */\n enableAutoHide: {\n default: true,\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.scrollbar.auto_hide',\n },\n\n /**\n * !#en\n * The time to hide scrollbar when scroll finished.\n * Note: This value is only useful when enableAutoHide is true.\n * !#zh\n * 没有滚动动作后经过多久会自动隐藏。\n * 注意:只要当 “enableAutoHide” 为 true 时,才有效。\n * @property {Number} autoHideTime\n */\n autoHideTime: {\n default: 1.0,\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.scrollbar.auto_hide_time',\n }\n },\n\n statics: {\n Direction: Direction\n },\n\n setTargetScrollView: function(scrollView) {\n this._scrollView = scrollView;\n },\n\n _convertToScrollViewSpace: function(content) {\n let scrollViewNode = this._scrollView.node;\n var worldSpacePos = content.convertToWorldSpaceAR(cc.v2(-content.anchorX * content.width, -content.anchorY * content.height));\n var scrollViewSpacePos = scrollViewNode.convertToNodeSpaceAR(worldSpacePos);\n scrollViewSpacePos.x += scrollViewNode.anchorX * scrollViewNode.width;\n scrollViewSpacePos.y += scrollViewNode.anchorY * scrollViewNode.height;\n return scrollViewSpacePos;\n },\n\n _setOpacity: function(opacity) {\n if (this.handle) {\n this.node.opacity = opacity;\n this.handle.node.opacity = opacity;\n }\n },\n\n _onScroll: function(outOfBoundary) {\n if (this._scrollView) {\n\n var content = this._scrollView.content;\n if(content){\n var contentSize = content.getContentSize();\n var scrollViewSize = this._scrollView.node.getContentSize();\n var handleNodeSize = this.node.getContentSize();\n\n if(this._conditionalDisableScrollBar(contentSize, scrollViewSize)) {\n return;\n }\n\n if (this.enableAutoHide) {\n this._autoHideRemainingTime = this.autoHideTime;\n this._setOpacity(this._opacity);\n }\n\n var contentMeasure = 0;\n var scrollViewMeasure = 0;\n var outOfBoundaryValue = 0;\n var contentPosition = 0;\n var handleNodeMeasure = 0;\n\n if (this.direction === Direction.HORIZONTAL) {\n contentMeasure = contentSize.width;\n scrollViewMeasure = scrollViewSize.width;\n handleNodeMeasure = handleNodeSize.width;\n outOfBoundaryValue = outOfBoundary.x;\n\n contentPosition = -this._convertToScrollViewSpace(content).x;\n } else if (this.direction === Direction.VERTICAL) {\n contentMeasure = contentSize.height;\n scrollViewMeasure = scrollViewSize.height;\n handleNodeMeasure = handleNodeSize.height;\n outOfBoundaryValue = outOfBoundary.y;\n\n contentPosition = -this._convertToScrollViewSpace(content).y;\n }\n\n var length = this._calculateLength(contentMeasure, scrollViewMeasure, handleNodeMeasure, outOfBoundaryValue);\n var position = this._calculatePosition(contentMeasure, scrollViewMeasure, handleNodeMeasure, contentPosition, outOfBoundaryValue, length);\n\n this._updateLength(length);\n this._updateHanlderPosition(position);\n }\n }\n },\n\n _updateHanlderPosition: function(position) {\n if (this.handle) {\n var oldPosition = this._fixupHandlerPosition();\n\n this.handle.node.setPosition(position.x + oldPosition.x, position.y + oldPosition.y);\n }\n },\n\n _fixupHandlerPosition: function() {\n var barSize = this.node.getContentSize();\n var barAnchor = this.node.getAnchorPoint();\n var handleSize = this.handle.node.getContentSize();\n\n var handleParent = this.handle.node.parent;\n\n var leftBottomWorldPosition = this.node.convertToWorldSpaceAR(cc.v2(-barSize.width * barAnchor.x, -barSize.height * barAnchor.y));\n var fixupPosition = handleParent.convertToNodeSpaceAR(leftBottomWorldPosition);\n\n if (this.direction === Direction.HORIZONTAL) {\n fixupPosition = cc.v2(fixupPosition.x, fixupPosition.y + (barSize.height - handleSize.height) / 2);\n } else if (this.direction === Direction.VERTICAL) {\n fixupPosition = cc.v2(fixupPosition.x + (barSize.width - handleSize.width) / 2, fixupPosition.y);\n }\n\n this.handle.node.setPosition(fixupPosition);\n\n return fixupPosition;\n },\n\n _onTouchBegan: function() {\n if (!this.enableAutoHide) {\n return;\n }\n this._touching = true;\n },\n\n _conditionalDisableScrollBar: function (contentSize, scrollViewSize) {\n if(contentSize.width <= scrollViewSize.width\n && this.direction === Direction.HORIZONTAL){\n return true;\n }\n\n if(contentSize.height <= scrollViewSize.height\n && this.direction === Direction.VERTICAL){\n return true;\n }\n return false;\n },\n\n _onTouchEnded: function() {\n if (!this.enableAutoHide) {\n return;\n }\n\n this._touching = false;\n\n if (this.autoHideTime <= 0) {\n return;\n }\n\n\n if (this._scrollView) {\n var content = this._scrollView.content;\n if(content){\n var contentSize = content.getContentSize();\n var scrollViewSize = this._scrollView.node.getContentSize();\n\n if(this._conditionalDisableScrollBar(contentSize, scrollViewSize)) {\n return;\n }\n }\n }\n\n this._autoHideRemainingTime = this.autoHideTime;\n },\n\n _calculateLength: function(contentMeasure, scrollViewMeasure, handleNodeMeasure, outOfBoundary) {\n var denominatorValue = contentMeasure;\n if (outOfBoundary) {\n denominatorValue += (outOfBoundary > 0 ? outOfBoundary : -outOfBoundary) * GETTINGSHORTERFACTOR;\n }\n\n var lengthRation = scrollViewMeasure / denominatorValue;\n return handleNodeMeasure * lengthRation;\n },\n\n _calculatePosition: function(contentMeasure, scrollViewMeasure, handleNodeMeasure, contentPosition, outOfBoundary, actualLenth) {\n var denominatorValue = contentMeasure - scrollViewMeasure;\n if (outOfBoundary) {\n denominatorValue += Math.abs(outOfBoundary);\n }\n\n var positionRatio = 0;\n if (denominatorValue) {\n positionRatio = contentPosition / denominatorValue;\n positionRatio = misc.clamp01(positionRatio);\n }\n\n var position = (handleNodeMeasure - actualLenth) * positionRatio;\n if (this.direction === Direction.VERTICAL) {\n return cc.v2(0, position);\n } else {\n return cc.v2(position, 0);\n }\n },\n\n _updateLength: function(length) {\n if (this.handle) {\n var handleNode = this.handle.node;\n var handleNodeSize = handleNode.getContentSize();\n handleNode.setAnchorPoint(cc.v2(0, 0));\n if (this.direction === Direction.HORIZONTAL) {\n handleNode.setContentSize(length, handleNodeSize.height);\n } else {\n handleNode.setContentSize(handleNodeSize.width, length);\n }\n }\n },\n\n _processAutoHide: function(deltaTime) {\n if (!this.enableAutoHide || this._autoHideRemainingTime <= 0) {\n return;\n } else if (this._touching) {\n return;\n }\n\n\n this._autoHideRemainingTime -= deltaTime;\n if (this._autoHideRemainingTime <= this.autoHideTime) {\n this._autoHideRemainingTime = Math.max(0, this._autoHideRemainingTime);\n var opacity = this._opacity * (this._autoHideRemainingTime / this.autoHideTime);\n this._setOpacity(opacity);\n }\n },\n\n start: function() {\n if (this.enableAutoHide) {\n this._setOpacity(0);\n }\n },\n\n hide: function() {\n this._autoHideRemainingTime = 0;\n this._setOpacity(0);\n },\n\n show: function() {\n this._autoHideRemainingTime = this.autoHideTime;\n this._setOpacity(this._opacity);\n },\n\n update: function(dt) {\n this._processAutoHide(dt);\n }\n});\n\n\ncc.Scrollbar = module.exports = Scrollbar;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst NodeEvent = require('../CCNode').EventType;\n\nconst NUMBER_OF_GATHERED_TOUCHES_FOR_MOVE_SPEED = 5;\nconst OUT_OF_BOUNDARY_BREAKING_FACTOR = 0.05;\nconst EPSILON = 1e-4;\nconst MOVEMENT_FACTOR = 0.7;\n\nlet _tempPoint = cc.v2();\nlet _tempPrevPoint = cc.v2();\n\nlet quintEaseOut = function(time) {\n time -= 1;\n return (time * time * time * time * time + 1);\n};\n\nlet getTimeInMilliseconds = function() {\n let currentTime = new Date();\n return currentTime.getMilliseconds();\n};\n\n/**\n * !#en Enum for ScrollView event type.\n * !#zh 滚动视图事件类型\n * @enum ScrollView.EventType\n */\nconst EventType = cc.Enum({\n /**\n * !#en The event emmitted when ScrollView scroll to the top boundary of inner container\n * !#zh 滚动视图滚动到顶部边界事件\n * @property {Number} SCROLL_TO_TOP\n */\n SCROLL_TO_TOP : 0,\n /**\n * !#en The event emmitted when ScrollView scroll to the bottom boundary of inner container\n * !#zh 滚动视图滚动到底部边界事件\n * @property {Number} SCROLL_TO_BOTTOM\n */\n SCROLL_TO_BOTTOM : 1,\n /**\n * !#en The event emmitted when ScrollView scroll to the left boundary of inner container\n * !#zh 滚动视图滚动到左边界事件\n * @property {Number} SCROLL_TO_LEFT\n */\n SCROLL_TO_LEFT : 2,\n /**\n * !#en The event emmitted when ScrollView scroll to the right boundary of inner container\n * !#zh 滚动视图滚动到右边界事件\n * @property {Number} SCROLL_TO_RIGHT\n */\n SCROLL_TO_RIGHT : 3,\n /**\n * !#en The event emmitted when ScrollView is scrolling\n * !#zh 滚动视图正在滚动时发出的事件\n * @property {Number} SCROLLING\n */\n SCROLLING : 4,\n /**\n * !#en The event emmitted when ScrollView scroll to the top boundary of inner container and start bounce\n * !#zh 滚动视图滚动到顶部边界并且开始回弹时发出的事件\n * @property {Number} BOUNCE_TOP\n */\n BOUNCE_TOP : 5,\n /**\n * !#en The event emmitted when ScrollView scroll to the bottom boundary of inner container and start bounce\n * !#zh 滚动视图滚动到底部边界并且开始回弹时发出的事件\n * @property {Number} BOUNCE_BOTTOM\n */\n BOUNCE_BOTTOM : 6,\n /**\n * !#en The event emmitted when ScrollView scroll to the left boundary of inner container and start bounce\n * !#zh 滚动视图滚动到左边界并且开始回弹时发出的事件\n * @property {Number} BOUNCE_LEFT\n */\n BOUNCE_LEFT : 7,\n /**\n * !#en The event emmitted when ScrollView scroll to the right boundary of inner container and start bounce\n * !#zh 滚动视图滚动到右边界并且开始回弹时发出的事件\n * @property {Number} BOUNCE_RIGHT\n */\n BOUNCE_RIGHT : 8,\n /**\n * !#en The event emmitted when ScrollView auto scroll ended\n * !#zh 滚动视图滚动结束的时候发出的事件\n * @property {Number} SCROLL_ENDED\n */\n SCROLL_ENDED : 9,\n /**\n * !#en The event emmitted when user release the touch\n * !#zh 当用户松手的时候会发出一个事件\n * @property {Number} TOUCH_UP\n */\n TOUCH_UP : 10,\n /**\n * !#en The event emmitted when ScrollView auto scroll ended with a threshold\n * !#zh 滚动视图自动滚动快要结束的时候发出的事件\n * @property {Number} AUTOSCROLL_ENDED_WITH_THRESHOLD\n */\n AUTOSCROLL_ENDED_WITH_THRESHOLD: 11,\n /**\n * !#en The event emmitted when ScrollView scroll began\n * !#zh 滚动视图滚动开始时发出的事件\n * @property {Number} SCROLL_BEGAN\n */\n SCROLL_BEGAN: 12\n});\n\nconst eventMap = {\n 'scroll-to-top' : EventType.SCROLL_TO_TOP,\n 'scroll-to-bottom': EventType.SCROLL_TO_BOTTOM,\n 'scroll-to-left' : EventType.SCROLL_TO_LEFT,\n 'scroll-to-right' : EventType.SCROLL_TO_RIGHT,\n 'scrolling' : EventType.SCROLLING,\n 'bounce-bottom' : EventType.BOUNCE_BOTTOM,\n 'bounce-left' : EventType.BOUNCE_LEFT,\n 'bounce-right' : EventType.BOUNCE_RIGHT,\n 'bounce-top' : EventType.BOUNCE_TOP,\n 'scroll-ended': EventType.SCROLL_ENDED,\n 'touch-up' : EventType.TOUCH_UP,\n 'scroll-ended-with-threshold' : EventType.AUTOSCROLL_ENDED_WITH_THRESHOLD,\n 'scroll-began': EventType.SCROLL_BEGAN\n};\n\n/**\n * !#en\n * Layout container for a view hierarchy that can be scrolled by the user,\n * allowing it to be larger than the physical display.\n *\n * !#zh\n * 滚动视图组件\n * @class ScrollView\n * @extends Component\n */\nlet ScrollView = cc.Class({\n name: 'cc.ScrollView',\n extends: require('./CCViewGroup'),\n\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.ui/ScrollView',\n help: 'i18n:COMPONENT.help_url.scrollview',\n inspector: 'packages://inspector/inspectors/comps/scrollview.js',\n executeInEditMode: false,\n },\n\n ctor () {\n this._topBoundary = 0;\n this._bottomBoundary = 0;\n this._leftBoundary = 0;\n this._rightBoundary = 0;\n\n this._touchMoveDisplacements = [];\n this._touchMoveTimeDeltas = [];\n this._touchMovePreviousTimestamp = 0;\n this._touchMoved = false;\n\n this._autoScrolling = false;\n this._autoScrollAttenuate = false;\n this._autoScrollStartPosition = cc.v2(0, 0);\n this._autoScrollTargetDelta = cc.v2(0, 0);\n this._autoScrollTotalTime = 0;\n this._autoScrollAccumulatedTime = 0;\n this._autoScrollCurrentlyOutOfBoundary = false;\n this._autoScrollBraking = false;\n this._autoScrollBrakingStartPosition = cc.v2(0, 0);\n\n this._outOfBoundaryAmount = cc.v2(0, 0);\n this._outOfBoundaryAmountDirty = true;\n this._stopMouseWheel = false;\n this._mouseWheelEventElapsedTime = 0.0;\n this._isScrollEndedWithThresholdEventFired = false;\n //use bit wise operations to indicate the direction\n this._scrollEventEmitMask = 0;\n this._isBouncing = false;\n this._scrolling = false;\n },\n\n properties: {\n /**\n * !#en This is a reference to the UI element to be scrolled.\n * !#zh 可滚动展示内容的节点。\n * @property {Node} content\n */\n content: {\n default: undefined,\n type: cc.Node,\n tooltip: CC_DEV && 'i18n:COMPONENT.scrollview.content',\n formerlySerializedAs: 'content',\n notify (oldValue) {\n this._calculateBoundary();\n }\n },\n\n /**\n * !#en Enable horizontal scroll.\n * !#zh 是否开启水平滚动。\n * @property {Boolean} horizontal\n */\n horizontal: {\n default: true,\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.scrollview.horizontal',\n },\n\n /**\n * !#en Enable vertical scroll.\n * !#zh 是否开启垂直滚动。\n * @property {Boolean} vertical\n */\n vertical: {\n default: true,\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.scrollview.vertical',\n },\n\n /**\n * !#en When inertia is set, the content will continue to move when touch ended.\n * !#zh 是否开启滚动惯性。\n * @property {Boolean} inertia\n */\n inertia: {\n default: true,\n tooltip: CC_DEV && 'i18n:COMPONENT.scrollview.inertia',\n },\n\n /**\n * !#en\n * It determines how quickly the content stop moving. A value of 1 will stop the movement immediately.\n * A value of 0 will never stop the movement until it reaches to the boundary of scrollview.\n * !#zh\n * 开启惯性后在用户停止触摸后滚动多快停止0表示永不停止1表示立刻停止。\n * @property {Number} brake\n */\n brake: {\n default: 0.5,\n type: cc.Float,\n range: [0, 1, 0.1],\n tooltip: CC_DEV && 'i18n:COMPONENT.scrollview.brake',\n },\n\n /**\n * !#en When elastic is set, the content will be bounce back when move out of boundary.\n * !#zh 是否允许滚动内容超过边界,并在停止触摸后回弹。\n * @property {Boolean} elastic\n */\n elastic: {\n default: true,\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.scrollview.elastic',\n },\n\n /**\n * !#en The elapse time of bouncing back. A value of 0 will bounce back immediately.\n * !#zh 回弹持续的时间0 表示将立即反弹。\n * @property {Number} bounceDuration\n */\n bounceDuration: {\n default: 1,\n range: [0, 10],\n tooltip: CC_DEV && 'i18n:COMPONENT.scrollview.bounceDuration',\n },\n\n /**\n * !#en The horizontal scrollbar reference.\n * !#zh 水平滚动的 ScrollBar。\n * @property {Scrollbar} horizontalScrollBar\n */\n horizontalScrollBar: {\n default: undefined,\n type: cc.Scrollbar,\n tooltip: CC_DEV && 'i18n:COMPONENT.scrollview.horizontal_bar',\n notify () {\n if (this.horizontalScrollBar) {\n this.horizontalScrollBar.setTargetScrollView(this);\n this._updateScrollBar(0);\n }\n },\n animatable: false\n },\n\n /**\n * !#en The vertical scrollbar reference.\n * !#zh 垂直滚动的 ScrollBar。\n * @property {Scrollbar} verticalScrollBar\n */\n verticalScrollBar: {\n default: undefined,\n type: cc.Scrollbar,\n tooltip: CC_DEV && 'i18n:COMPONENT.scrollview.vertical_bar',\n notify () {\n if (this.verticalScrollBar) {\n this.verticalScrollBar.setTargetScrollView(this);\n this._updateScrollBar(0);\n }\n },\n animatable: false\n },\n\n /**\n * !#en Scrollview events callback\n * !#zh 滚动视图的事件回调函数\n * @property {Component.EventHandler[]} scrollEvents\n */\n scrollEvents: {\n default: [],\n type: cc.Component.EventHandler,\n tooltip: CC_DEV && 'i18n:COMPONENT.scrollview.scrollEvents'\n },\n\n /**\n * !#en If cancelInnerEvents is set to true, the scroll behavior will cancel touch events on inner content nodes\n * It's set to true by default.\n * !#zh 如果这个属性被设置为 true那么滚动行为会取消子节点上注册的触摸事件默认被设置为 true。\n * 注意,子节点上的 touchstart 事件仍然会触发,触点移动距离非常短的情况下 touchmove 和 touchend 也不会受影响。\n * @property {Boolean} cancelInnerEvents\n */\n cancelInnerEvents: {\n default: true,\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.scrollview.cancelInnerEvents'\n },\n\n // private object\n _view: {\n get: function () {\n if (this.content) {\n return this.content.parent;\n }\n }\n }\n },\n\n statics: {\n EventType: EventType,\n },\n\n /**\n * !#en Scroll the content to the bottom boundary of ScrollView.\n * !#zh 视图内容将在规定时间内滚动到视图底部。\n * @method scrollToBottom\n * @param {Number} [timeInSecond=0] - Scroll time in second, if you don't pass timeInSecond,\n * the content will jump to the bottom boundary immediately.\n * @param {Boolean} [attenuated=true] - Whether the scroll acceleration attenuated, default is true.\n * @example\n * // Scroll to the bottom of the view.\n * scrollView.scrollToBottom(0.1);\n */\n scrollToBottom (timeInSecond, attenuated) {\n let moveDelta = this._calculateMovePercentDelta({\n anchor: cc.v2(0, 0),\n applyToHorizontal: false,\n applyToVertical: true,\n });\n\n if (timeInSecond) {\n this._startAutoScroll(moveDelta, timeInSecond, attenuated !== false);\n } else {\n this._moveContent(moveDelta, true);\n }\n },\n\n /**\n * !#en Scroll the content to the top boundary of ScrollView.\n * !#zh 视图内容将在规定时间内滚动到视图顶部。\n * @method scrollToTop\n * @param {Number} [timeInSecond=0] - Scroll time in second, if you don't pass timeInSecond,\n * the content will jump to the top boundary immediately.\n * @param {Boolean} [attenuated=true] - Whether the scroll acceleration attenuated, default is true.\n * @example\n * // Scroll to the top of the view.\n * scrollView.scrollToTop(0.1);\n */\n scrollToTop (timeInSecond, attenuated) {\n let moveDelta = this._calculateMovePercentDelta({\n anchor: cc.v2(0, 1),\n applyToHorizontal: false,\n applyToVertical: true,\n });\n\n if (timeInSecond) {\n this._startAutoScroll(moveDelta, timeInSecond, attenuated !== false);\n } else {\n this._moveContent(moveDelta);\n }\n },\n\n /**\n * !#en Scroll the content to the left boundary of ScrollView.\n * !#zh 视图内容将在规定时间内滚动到视图左边。\n * @method scrollToLeft\n * @param {Number} [timeInSecond=0] - Scroll time in second, if you don't pass timeInSecond,\n * the content will jump to the left boundary immediately.\n * @param {Boolean} [attenuated=true] - Whether the scroll acceleration attenuated, default is true.\n * @example\n * // Scroll to the left of the view.\n * scrollView.scrollToLeft(0.1);\n */\n scrollToLeft (timeInSecond, attenuated) {\n let moveDelta = this._calculateMovePercentDelta({\n anchor: cc.v2(0, 0),\n applyToHorizontal: true,\n applyToVertical: false,\n });\n\n if (timeInSecond) {\n this._startAutoScroll(moveDelta, timeInSecond, attenuated !== false);\n } else {\n this._moveContent(moveDelta);\n }\n },\n\n /**\n * !#en Scroll the content to the right boundary of ScrollView.\n * !#zh 视图内容将在规定时间内滚动到视图右边。\n * @method scrollToRight\n * @param {Number} [timeInSecond=0] - Scroll time in second, if you don't pass timeInSecond,\n * the content will jump to the right boundary immediately.\n * @param {Boolean} [attenuated=true] - Whether the scroll acceleration attenuated, default is true.\n * @example\n * // Scroll to the right of the view.\n * scrollView.scrollToRight(0.1);\n */\n scrollToRight (timeInSecond, attenuated) {\n let moveDelta = this._calculateMovePercentDelta({\n anchor: cc.v2(1, 0),\n applyToHorizontal: true,\n applyToVertical: false,\n });\n\n if (timeInSecond) {\n this._startAutoScroll(moveDelta, timeInSecond, attenuated !== false);\n } else {\n this._moveContent(moveDelta);\n }\n },\n\n /**\n * !#en Scroll the content to the top left boundary of ScrollView.\n * !#zh 视图内容将在规定时间内滚动到视图左上角。\n * @method scrollToTopLeft\n * @param {Number} [timeInSecond=0] - Scroll time in second, if you don't pass timeInSecond,\n * the content will jump to the top left boundary immediately.\n * @param {Boolean} [attenuated=true] - Whether the scroll acceleration attenuated, default is true.\n * @example\n * // Scroll to the upper left corner of the view.\n * scrollView.scrollToTopLeft(0.1);\n */\n scrollToTopLeft (timeInSecond, attenuated) {\n let moveDelta = this._calculateMovePercentDelta({\n anchor: cc.v2(0, 1),\n applyToHorizontal: true,\n applyToVertical: true,\n });\n\n if (timeInSecond) {\n this._startAutoScroll(moveDelta, timeInSecond, attenuated !== false);\n } else {\n this._moveContent(moveDelta);\n }\n },\n\n /**\n * !#en Scroll the content to the top right boundary of ScrollView.\n * !#zh 视图内容将在规定时间内滚动到视图右上角。\n * @method scrollToTopRight\n * @param {Number} [timeInSecond=0] - Scroll time in second, if you don't pass timeInSecond,\n * the content will jump to the top right boundary immediately.\n * @param {Boolean} [attenuated=true] - Whether the scroll acceleration attenuated, default is true.\n * @example\n * // Scroll to the top right corner of the view.\n * scrollView.scrollToTopRight(0.1);\n */\n scrollToTopRight (timeInSecond, attenuated) {\n let moveDelta = this._calculateMovePercentDelta({\n anchor: cc.v2(1, 1),\n applyToHorizontal: true,\n applyToVertical: true,\n });\n\n if (timeInSecond) {\n this._startAutoScroll(moveDelta, timeInSecond, attenuated !== false);\n } else {\n this._moveContent(moveDelta);\n }\n },\n\n /**\n * !#en Scroll the content to the bottom left boundary of ScrollView.\n * !#zh 视图内容将在规定时间内滚动到视图左下角。\n * @method scrollToBottomLeft\n * @param {Number} [timeInSecond=0] - Scroll time in second, if you don't pass timeInSecond,\n * the content will jump to the bottom left boundary immediately.\n * @param {Boolean} [attenuated=true] - Whether the scroll acceleration attenuated, default is true.\n * @example\n * // Scroll to the lower left corner of the view.\n * scrollView.scrollToBottomLeft(0.1);\n */\n scrollToBottomLeft (timeInSecond, attenuated) {\n let moveDelta = this._calculateMovePercentDelta({\n anchor: cc.v2(0, 0),\n applyToHorizontal: true,\n applyToVertical: true,\n });\n\n if (timeInSecond) {\n this._startAutoScroll(moveDelta, timeInSecond, attenuated !== false);\n } else {\n this._moveContent(moveDelta);\n }\n },\n\n /**\n * !#en Scroll the content to the bottom right boundary of ScrollView.\n * !#zh 视图内容将在规定时间内滚动到视图右下角。\n * @method scrollToBottomRight\n * @param {Number} [timeInSecond=0] - Scroll time in second, if you don't pass timeInSecond,\n * the content will jump to the bottom right boundary immediately.\n * @param {Boolean} [attenuated=true] - Whether the scroll acceleration attenuated, default is true.\n * @example\n * // Scroll to the lower right corner of the view.\n * scrollView.scrollToBottomRight(0.1);\n */\n scrollToBottomRight (timeInSecond, attenuated) {\n let moveDelta = this._calculateMovePercentDelta({\n anchor: cc.v2(1, 0),\n applyToHorizontal: true,\n applyToVertical: true,\n });\n\n if (timeInSecond) {\n this._startAutoScroll(moveDelta, timeInSecond, attenuated !== false);\n } else {\n this._moveContent(moveDelta);\n }\n },\n\n\n /**\n * !#en Scroll with an offset related to the ScrollView's top left origin, if timeInSecond is omitted, then it will jump to the\n * specific offset immediately.\n * !#zh 视图内容在规定时间内将滚动到 ScrollView 相对左上角原点的偏移位置, 如果 timeInSecond参数不传则立即滚动到指定偏移位置。\n * @method scrollToOffset\n * @param {Vec2} offset - A Vec2, the value of which each axis between 0 and maxScrollOffset\n * @param {Number} [timeInSecond=0] - Scroll time in second, if you don't pass timeInSecond,\n * the content will jump to the specific offset of ScrollView immediately.\n * @param {Boolean} [attenuated=true] - Whether the scroll acceleration attenuated, default is true.\n * @example\n * // Scroll to middle position in 0.1 second in x-axis\n * let maxScrollOffset = this.getMaxScrollOffset();\n * scrollView.scrollToOffset(cc.v2(maxScrollOffset.x / 2, 0), 0.1);\n */\n scrollToOffset (offset, timeInSecond, attenuated) {\n let maxScrollOffset = this.getMaxScrollOffset();\n\n let anchor = cc.v2(0, 0);\n //if maxScrollOffset is 0, then always align the content's top left origin to the top left corner of its parent\n if (maxScrollOffset.x === 0) {\n anchor.x = 0;\n } else {\n anchor.x = offset.x / maxScrollOffset.x;\n }\n\n if (maxScrollOffset.y === 0) {\n anchor.y = 1;\n } else {\n anchor.y = (maxScrollOffset.y - offset.y ) / maxScrollOffset.y;\n }\n\n this.scrollTo(anchor, timeInSecond, attenuated);\n },\n\n /**\n * !#en Get the positive offset value corresponds to the content's top left boundary.\n * !#zh 获取滚动视图相对于左上角原点的当前滚动偏移\n * @method getScrollOffset\n * @return {Vec2} - A Vec2 value indicate the current scroll offset.\n */\n getScrollOffset () {\n let topDelta = this._getContentTopBoundary() - this._topBoundary;\n let leftDeta = this._getContentLeftBoundary() - this._leftBoundary;\n\n return cc.v2(leftDeta, topDelta);\n },\n\n /**\n * !#en Get the maximize available scroll offset\n * !#zh 获取滚动视图最大可以滚动的偏移量\n * @method getMaxScrollOffset\n * @return {Vec2} - A Vec2 value indicate the maximize scroll offset in x and y axis.\n */\n getMaxScrollOffset () {\n let viewSize = this._view.getContentSize();\n let contentSize = this.content.getContentSize();\n let horizontalMaximizeOffset = contentSize.width - viewSize.width;\n let verticalMaximizeOffset = contentSize.height - viewSize.height;\n horizontalMaximizeOffset = horizontalMaximizeOffset >= 0 ? horizontalMaximizeOffset : 0;\n verticalMaximizeOffset = verticalMaximizeOffset >=0 ? verticalMaximizeOffset : 0;\n\n return cc.v2(horizontalMaximizeOffset, verticalMaximizeOffset);\n },\n\n /**\n * !#en Scroll the content to the horizontal percent position of ScrollView.\n * !#zh 视图内容在规定时间内将滚动到 ScrollView 水平方向的百分比位置上。\n * @method scrollToPercentHorizontal\n * @param {Number} percent - A value between 0 and 1.\n * @param {Number} [timeInSecond=0] - Scroll time in second, if you don't pass timeInSecond,\n * the content will jump to the horizontal percent position of ScrollView immediately.\n * @param {Boolean} [attenuated=true] - Whether the scroll acceleration attenuated, default is true.\n * @example\n * // Scroll to middle position.\n * scrollView.scrollToBottomRight(0.5, 0.1);\n */\n scrollToPercentHorizontal (percent, timeInSecond, attenuated) {\n let moveDelta = this._calculateMovePercentDelta({\n anchor: cc.v2(percent, 0),\n applyToHorizontal: true,\n applyToVertical: false,\n });\n\n if (timeInSecond) {\n this._startAutoScroll(moveDelta, timeInSecond, attenuated !== false);\n } else {\n this._moveContent(moveDelta);\n }\n },\n\n /**\n * !#en Scroll the content to the percent position of ScrollView in any direction.\n * !#zh 视图内容在规定时间内进行垂直方向和水平方向的滚动,并且滚动到指定百分比位置上。\n * @method scrollTo\n * @param {Vec2} anchor - A point which will be clamp between cc.v2(0,0) and cc.v2(1,1).\n * @param {Number} [timeInSecond=0] - Scroll time in second, if you don't pass timeInSecond,\n * the content will jump to the percent position of ScrollView immediately.\n * @param {Boolean} [attenuated=true] - Whether the scroll acceleration attenuated, default is true.\n * @example\n * // Vertical scroll to the bottom of the view.\n * scrollView.scrollTo(cc.v2(0, 1), 0.1);\n *\n * // Horizontal scroll to view right.\n * scrollView.scrollTo(cc.v2(1, 0), 0.1);\n */\n scrollTo (anchor, timeInSecond, attenuated) {\n let moveDelta = this._calculateMovePercentDelta({\n anchor: cc.v2(anchor),\n applyToHorizontal: true,\n applyToVertical: true,\n });\n\n if (timeInSecond) {\n this._startAutoScroll(moveDelta, timeInSecond, attenuated !== false);\n } else {\n this._moveContent(moveDelta);\n }\n },\n\n /**\n * !#en Scroll the content to the vertical percent position of ScrollView.\n * !#zh 视图内容在规定时间内滚动到 ScrollView 垂直方向的百分比位置上。\n * @method scrollToPercentVertical\n * @param {Number} percent - A value between 0 and 1.\n * @param {Number} [timeInSecond=0] - Scroll time in second, if you don't pass timeInSecond,\n * the content will jump to the vertical percent position of ScrollView immediately.\n * @param {Boolean} [attenuated=true] - Whether the scroll acceleration attenuated, default is true.\n * // Scroll to middle position.\n * scrollView.scrollToPercentVertical(0.5, 0.1);\n */\n scrollToPercentVertical (percent, timeInSecond, attenuated) {\n let moveDelta = this._calculateMovePercentDelta({\n anchor: cc.v2(0, percent),\n applyToHorizontal: false,\n applyToVertical: true,\n });\n\n if (timeInSecond) {\n this._startAutoScroll(moveDelta, timeInSecond, attenuated !== false);\n } else {\n this._moveContent(moveDelta);\n }\n },\n\n /**\n * !#en Stop auto scroll immediately\n * !#zh 停止自动滚动, 调用此 API 可以让 Scrollview 立即停止滚动\n * @method stopAutoScroll\n */\n stopAutoScroll () {\n this._autoScrolling = false;\n this._autoScrollAccumulatedTime = this._autoScrollTotalTime;\n },\n\n /**\n * !#en Modify the content position.\n * !#zh 设置当前视图内容的坐标点。\n * @method setContentPosition\n * @param {Vec2} position - The position in content's parent space.\n */\n setContentPosition (position) {\n if (position.fuzzyEquals(this.getContentPosition(), EPSILON)) {\n return;\n }\n\n this.content.setPosition(position);\n this._outOfBoundaryAmountDirty = true;\n },\n\n /**\n * !#en Query the content's position in its parent space.\n * !#zh 获取当前视图内容的坐标点。\n * @method getContentPosition\n * @returns {Vec2} - The content's position in its parent space.\n */\n getContentPosition () {\n return this.content.getPosition();\n },\n \n /**\n * !#en Query whether the user is currently dragging the ScrollView to scroll it\n * !#zh 用户是否在拖拽当前滚动视图\n * @method isScrolling\n * @returns {Boolean} - Whether the user is currently dragging the ScrollView to scroll it\n */\n isScrolling () {\n return this._scrolling;\n },\n\n /**\n * !#en Query whether the ScrollView is currently scrolling because of a bounceback or inertia slowdown.\n * !#zh 当前滚动视图是否在惯性滚动\n * @method isAutoScrolling\n * @returns {Boolean} - Whether the ScrollView is currently scrolling because of a bounceback or inertia slowdown.\n */\n isAutoScrolling () {\n return this._autoScrolling;\n },\n \n //private methods\n _registerEvent () {\n this.node.on(cc.Node.EventType.TOUCH_START, this._onTouchBegan, this, true);\n this.node.on(cc.Node.EventType.TOUCH_MOVE, this._onTouchMoved, this, true);\n this.node.on(cc.Node.EventType.TOUCH_END, this._onTouchEnded, this, true);\n this.node.on(cc.Node.EventType.TOUCH_CANCEL, this._onTouchCancelled, this, true);\n this.node.on(cc.Node.EventType.MOUSE_WHEEL, this._onMouseWheel, this, true);\n },\n\n _unregisterEvent () {\n this.node.off(cc.Node.EventType.TOUCH_START, this._onTouchBegan, this, true);\n this.node.off(cc.Node.EventType.TOUCH_MOVE, this._onTouchMoved, this, true);\n this.node.off(cc.Node.EventType.TOUCH_END, this._onTouchEnded, this, true);\n this.node.off(cc.Node.EventType.TOUCH_CANCEL, this._onTouchCancelled, this, true);\n this.node.off(cc.Node.EventType.MOUSE_WHEEL, this._onMouseWheel, this, true);\n },\n\n _onMouseWheel (event, captureListeners) {\n if (!this.enabledInHierarchy) return;\n if (this.hasNestedViewGroup(event, captureListeners)) return;\n\n let deltaMove = cc.v2(0, 0);\n let wheelPrecision = -0.1;\n //On the windows platform, the scrolling speed of the mouse wheel of ScrollView on chrome and firebox is different\n if (cc.sys.os === cc.sys.OS_WINDOWS && cc.sys.browserType === cc.sys.BROWSER_TYPE_FIREFOX) {\n wheelPrecision = -0.1/3;\n }\n if(CC_JSB || CC_RUNTIME) {\n wheelPrecision = -7;\n }\n if(this.vertical) {\n deltaMove = cc.v2(0, event.getScrollY() * wheelPrecision);\n }\n else if(this.horizontal) {\n deltaMove = cc.v2(event.getScrollY() * wheelPrecision, 0);\n }\n\n this._mouseWheelEventElapsedTime = 0;\n this._processDeltaMove(deltaMove);\n\n if(!this._stopMouseWheel) {\n this._handlePressLogic();\n this.schedule(this._checkMouseWheel, 1.0 / 60);\n this._stopMouseWheel = true;\n }\n\n this._stopPropagationIfTargetIsMe(event);\n },\n\n _checkMouseWheel (dt) {\n let currentOutOfBoundary = this._getHowMuchOutOfBoundary();\n let maxElapsedTime = 0.1;\n\n if (!currentOutOfBoundary.fuzzyEquals(cc.v2(0, 0), EPSILON)) {\n this._processInertiaScroll();\n this.unschedule(this._checkMouseWheel);\n this._dispatchEvent('scroll-ended');\n this._stopMouseWheel = false;\n return;\n }\n\n this._mouseWheelEventElapsedTime += dt;\n\n // mouse wheel event is ended\n if (this._mouseWheelEventElapsedTime > maxElapsedTime) {\n this._onScrollBarTouchEnded();\n this.unschedule(this._checkMouseWheel);\n this._dispatchEvent('scroll-ended');\n this._stopMouseWheel = false;\n }\n },\n\n _calculateMovePercentDelta (options) {\n let anchor = options.anchor;\n let applyToHorizontal = options.applyToHorizontal;\n let applyToVertical = options.applyToVertical;\n this._calculateBoundary();\n\n anchor = anchor.clampf(cc.v2(0, 0), cc.v2(1, 1));\n\n let scrollSize = this._view.getContentSize();\n let contentSize = this.content.getContentSize();\n let bottomDeta = this._getContentBottomBoundary() - this._bottomBoundary;\n bottomDeta = -bottomDeta;\n\n let leftDeta = this._getContentLeftBoundary() - this._leftBoundary;\n leftDeta = -leftDeta;\n\n let moveDelta = cc.v2(0, 0);\n let totalScrollDelta = 0;\n if (applyToHorizontal) {\n totalScrollDelta = contentSize.width - scrollSize.width;\n moveDelta.x = leftDeta - totalScrollDelta * anchor.x;\n }\n\n if (applyToVertical) {\n totalScrollDelta = contentSize.height - scrollSize.height;\n moveDelta.y = bottomDeta - totalScrollDelta * anchor.y;\n }\n\n return moveDelta;\n },\n\n _moveContentToTopLeft (scrollViewSize) {\n let contentSize = this.content.getContentSize();\n\n let bottomDeta = this._getContentBottomBoundary() - this._bottomBoundary;\n bottomDeta = -bottomDeta;\n let moveDelta = cc.v2(0, 0);\n let totalScrollDelta = 0;\n\n let leftDeta = this._getContentLeftBoundary() - this._leftBoundary;\n leftDeta = -leftDeta;\n\n if (contentSize.height < scrollViewSize.height) {\n totalScrollDelta = contentSize.height - scrollViewSize.height;\n moveDelta.y = bottomDeta - totalScrollDelta;\n }\n\n if (contentSize.width < scrollViewSize.width) {\n totalScrollDelta = contentSize.width - scrollViewSize.width;\n moveDelta.x = leftDeta;\n }\n\n this._updateScrollBarState();\n this._moveContent(moveDelta);\n this._adjustContentOutOfBoundary();\n },\n\n _calculateBoundary () {\n if (this.content) {\n //refresh content size\n let layout = this.content.getComponent(cc.Layout);\n if(layout && layout.enabledInHierarchy) {\n layout.updateLayout();\n }\n let viewSize = this._view.getContentSize();\n\n let anchorX = viewSize.width * this._view.anchorX;\n let anchorY = viewSize.height * this._view.anchorY;\n\n this._leftBoundary = -anchorX;\n this._bottomBoundary = -anchorY;\n\n this._rightBoundary = this._leftBoundary + viewSize.width;\n this._topBoundary = this._bottomBoundary + viewSize.height;\n\n this._moveContentToTopLeft(viewSize);\n }\n },\n\n /**\n * !#en Whether this scroll view has the nested view group.\n * !#zh 此 Scoll View 是否含有嵌套的 View Group\n * @method hasNestedViewGroup\n * @returns {Boolean} - Whether this ScrollView has the nested view group.\n */\n hasNestedViewGroup (event, captureListeners) {\n if (event.eventPhase !== cc.Event.CAPTURING_PHASE) return;\n\n if (captureListeners) {\n //captureListeners are arranged from child to parent\n for (let i = 0; i < captureListeners.length; ++i){\n let item = captureListeners[i];\n\n if (this.node === item) {\n if (event.target.getComponent(cc.ViewGroup)) {\n return true;\n }\n return false;\n }\n\n if(item.getComponent(cc.ViewGroup)) {\n return true;\n }\n }\n }\n return false;\n },\n\n //This is for Scrollview as children of a Button\n _stopPropagationIfTargetIsMe (event) {\n if (event.eventPhase === cc.Event.AT_TARGET && event.target === this.node) {\n event.stopPropagation();\n }\n },\n\n // touch event handler\n _onTouchBegan (event, captureListeners) {\n if (!this.enabledInHierarchy) return;\n if (this.hasNestedViewGroup(event, captureListeners)) return;\n\n let touch = event.touch;\n if (this.content) {\n this._handlePressLogic(touch);\n }\n this._touchMoved = false;\n this._stopPropagationIfTargetIsMe(event);\n },\n\n _onTouchMoved (event, captureListeners) {\n if (!this.enabledInHierarchy) return;\n if (this.hasNestedViewGroup(event, captureListeners)) return;\n\n let touch = event.touch;\n if (this.content) {\n this._handleMoveLogic(touch);\n }\n // Do not prevent touch events in inner nodes\n if (!this.cancelInnerEvents) {\n return;\n }\n\n let deltaMove = touch.getLocation().sub(touch.getStartLocation());\n //FIXME: touch move delta should be calculated by DPI.\n if (deltaMove.mag() > 7) {\n if (!this._touchMoved && event.target !== this.node) {\n // Simulate touch cancel for target node\n let cancelEvent = new cc.Event.EventTouch(event.getTouches(), event.bubbles);\n cancelEvent.type = cc.Node.EventType.TOUCH_CANCEL;\n cancelEvent.touch = event.touch;\n cancelEvent.simulate = true;\n event.target.dispatchEvent(cancelEvent);\n this._touchMoved = true;\n }\n }\n this._stopPropagationIfTargetIsMe(event);\n },\n\n _onTouchEnded (event, captureListeners) {\n if (!this.enabledInHierarchy) return;\n if (this.hasNestedViewGroup(event, captureListeners)) return;\n\n this._dispatchEvent('touch-up');\n\n let touch = event.touch;\n if (this.content) {\n this._handleReleaseLogic(touch);\n }\n if (this._touchMoved) {\n event.stopPropagation();\n } else {\n this._stopPropagationIfTargetIsMe(event);\n }\n },\n\n _onTouchCancelled (event, captureListeners) {\n if (!this.enabledInHierarchy) return;\n if (this.hasNestedViewGroup(event, captureListeners)) return;\n\n // Filte touch cancel event send from self\n if (!event.simulate) {\n let touch = event.touch;\n if(this.content){\n this._handleReleaseLogic(touch);\n }\n }\n this._stopPropagationIfTargetIsMe(event);\n },\n\n _processDeltaMove (deltaMove) {\n this._scrollChildren(deltaMove);\n this._gatherTouchMove(deltaMove);\n },\n\n // Contains node angle calculations\n _getLocalAxisAlignDelta (touch) {\n this.node.convertToNodeSpaceAR(touch.getLocation(), _tempPoint);\n this.node.convertToNodeSpaceAR(touch.getPreviousLocation(), _tempPrevPoint);\n return _tempPoint.sub(_tempPrevPoint);\n },\n\n _handleMoveLogic (touch) {\n let deltaMove = this._getLocalAxisAlignDelta(touch);\n this._processDeltaMove(deltaMove);\n },\n\n _scrollChildren (deltaMove) {\n deltaMove = this._clampDelta(deltaMove);\n\n let realMove = deltaMove;\n let outOfBoundary;\n if (this.elastic) {\n outOfBoundary = this._getHowMuchOutOfBoundary();\n realMove.x *= (outOfBoundary.x === 0 ? 1 : 0.5);\n realMove.y *= (outOfBoundary.y === 0 ? 1 : 0.5);\n }\n\n if (!this.elastic) {\n outOfBoundary = this._getHowMuchOutOfBoundary(realMove);\n realMove = realMove.add(outOfBoundary);\n }\n\n let vertical_scrollEventType = \"\";\n let horizontal_scrollEventType = \"\";\n \n if (this.vertical) {\n if (realMove.y > 0) { //up\n let icBottomPos = this.content.y - this.content.anchorY * this.content.height;\n\n if (icBottomPos + realMove.y >= this._bottomBoundary) {\n vertical_scrollEventType = 'scroll-to-bottom';\n }\n }\n else if (realMove.y < 0) { //down\n let icTopPos = this.content.y - this.content.anchorY * this.content.height + this.content.height;\n\n if (icTopPos + realMove.y <= this._topBoundary) {\n vertical_scrollEventType = 'scroll-to-top';\n }\n }\n }\n if (this.horizontal) {\n if (realMove.x < 0) { //left\n let icRightPos = this.content.x - this.content.anchorX * this.content.width + this.content.width;\n if (icRightPos + realMove.x <= this._rightBoundary) {\n horizontal_scrollEventType = 'scroll-to-right';\n }\n }\n else if (realMove.x > 0) { //right\n let icLeftPos = this.content.x - this.content.anchorX * this.content.width;\n if (icLeftPos + realMove.x >= this._leftBoundary) {\n horizontal_scrollEventType = 'scroll-to-left';\n }\n }\n }\n\n this._moveContent(realMove, false);\n\n if ((this.horizontal && realMove.x !== 0) || (this.vertical && realMove.y !== 0)) {\n if (!this._scrolling) {\n this._scrolling = true;\n this._dispatchEvent('scroll-began');\n }\n this._dispatchEvent('scrolling');\n }\n\n if (vertical_scrollEventType !== '') {\n this._dispatchEvent(vertical_scrollEventType);\n }\n\n if (horizontal_scrollEventType !== '') {\n this._dispatchEvent(horizontal_scrollEventType);\n }\n\n },\n\n _handlePressLogic () {\n if (this._autoScrolling) {\n this._dispatchEvent('scroll-ended');\n }\n this._autoScrolling = false;\n this._isBouncing = false;\n\n this._touchMovePreviousTimestamp = getTimeInMilliseconds();\n this._touchMoveDisplacements.length = 0;\n this._touchMoveTimeDeltas.length = 0;\n\n this._onScrollBarTouchBegan();\n },\n\n _clampDelta (delta) {\n let contentSize = this.content.getContentSize();\n let scrollViewSize = this._view.getContentSize();\n if (contentSize.width < scrollViewSize.width) {\n delta.x = 0;\n }\n if (contentSize.height < scrollViewSize.height) {\n delta.y = 0;\n }\n\n return delta;\n },\n\n _gatherTouchMove (delta) {\n delta = this._clampDelta(delta);\n\n while (this._touchMoveDisplacements.length >= NUMBER_OF_GATHERED_TOUCHES_FOR_MOVE_SPEED) {\n this._touchMoveDisplacements.shift();\n this._touchMoveTimeDeltas.shift();\n }\n\n this._touchMoveDisplacements.push(delta);\n\n let timeStamp = getTimeInMilliseconds();\n this._touchMoveTimeDeltas.push((timeStamp - this._touchMovePreviousTimestamp) / 1000);\n this._touchMovePreviousTimestamp = timeStamp;\n },\n\n _startBounceBackIfNeeded () {\n if (!this.elastic) {\n return false;\n }\n\n let bounceBackAmount = this._getHowMuchOutOfBoundary();\n bounceBackAmount = this._clampDelta(bounceBackAmount);\n\n if (bounceBackAmount.fuzzyEquals(cc.v2(0, 0), EPSILON)) {\n return false;\n }\n\n let bounceBackTime = Math.max(this.bounceDuration, 0);\n this._startAutoScroll(bounceBackAmount, bounceBackTime, true);\n\n if (!this._isBouncing) {\n if (bounceBackAmount.y > 0) this._dispatchEvent('bounce-top');\n if (bounceBackAmount.y < 0) this._dispatchEvent('bounce-bottom');\n if (bounceBackAmount.x > 0) this._dispatchEvent('bounce-right');\n if (bounceBackAmount.x < 0) this._dispatchEvent('bounce-left');\n this._isBouncing = true;\n }\n\n return true;\n },\n\n _processInertiaScroll () {\n let bounceBackStarted = this._startBounceBackIfNeeded();\n if (!bounceBackStarted && this.inertia) {\n let touchMoveVelocity = this._calculateTouchMoveVelocity();\n if (!touchMoveVelocity.fuzzyEquals(cc.v2(0, 0), EPSILON) && this.brake < 1) {\n this._startInertiaScroll(touchMoveVelocity);\n }\n }\n\n this._onScrollBarTouchEnded();\n },\n\n _handleReleaseLogic (touch) {\n let delta = this._getLocalAxisAlignDelta(touch);\n this._gatherTouchMove(delta);\n this._processInertiaScroll();\n if (this._scrolling) {\n this._scrolling = false;\n if (!this._autoScrolling) {\n this._dispatchEvent('scroll-ended');\n }\n }\n },\n\n _isOutOfBoundary () {\n let outOfBoundary = this._getHowMuchOutOfBoundary();\n return !outOfBoundary.fuzzyEquals(cc.v2(0, 0), EPSILON);\n },\n\n _isNecessaryAutoScrollBrake () {\n if (this._autoScrollBraking) {\n return true;\n }\n\n if (this._isOutOfBoundary()) {\n if (!this._autoScrollCurrentlyOutOfBoundary) {\n this._autoScrollCurrentlyOutOfBoundary = true;\n this._autoScrollBraking = true;\n this._autoScrollBrakingStartPosition = this.getContentPosition();\n return true;\n }\n\n } else {\n this._autoScrollCurrentlyOutOfBoundary = false;\n }\n\n return false;\n },\n\n getScrollEndedEventTiming () {\n return EPSILON;\n },\n\n _processAutoScrolling (dt) {\n let isAutoScrollBrake = this._isNecessaryAutoScrollBrake();\n let brakingFactor = isAutoScrollBrake ? OUT_OF_BOUNDARY_BREAKING_FACTOR : 1;\n this._autoScrollAccumulatedTime += dt * (1 / brakingFactor);\n\n let percentage = Math.min(1, this._autoScrollAccumulatedTime / this._autoScrollTotalTime);\n if (this._autoScrollAttenuate) {\n percentage = quintEaseOut(percentage);\n }\n\n let newPosition = this._autoScrollStartPosition.add(this._autoScrollTargetDelta.mul(percentage));\n let reachedEnd = Math.abs(percentage - 1) <= EPSILON;\n\n let fireEvent = Math.abs(percentage - 1) <= this.getScrollEndedEventTiming();\n if (fireEvent && !this._isScrollEndedWithThresholdEventFired) {\n this._dispatchEvent('scroll-ended-with-threshold');\n this._isScrollEndedWithThresholdEventFired = true;\n }\n\n if (this.elastic) {\n let brakeOffsetPosition = newPosition.sub(this._autoScrollBrakingStartPosition);\n if (isAutoScrollBrake) {\n brakeOffsetPosition = brakeOffsetPosition.mul(brakingFactor);\n }\n newPosition = this._autoScrollBrakingStartPosition.add(brakeOffsetPosition);\n } else {\n let moveDelta = newPosition.sub(this.getContentPosition());\n let outOfBoundary = this._getHowMuchOutOfBoundary(moveDelta);\n if (!outOfBoundary.fuzzyEquals(cc.v2(0, 0), EPSILON)) {\n newPosition = newPosition.add(outOfBoundary);\n reachedEnd = true;\n }\n }\n\n if (reachedEnd) {\n this._autoScrolling = false;\n }\n\n let deltaMove = newPosition.sub(this.getContentPosition());\n this._moveContent(this._clampDelta(deltaMove), reachedEnd);\n this._dispatchEvent('scrolling');\n\n // scollTo API controll move\n if (!this._autoScrolling) {\n this._isBouncing = false;\n this._scrolling = false;\n this._dispatchEvent('scroll-ended');\n }\n },\n\n _startInertiaScroll (touchMoveVelocity) {\n let inertiaTotalMovement = touchMoveVelocity.mul(MOVEMENT_FACTOR);\n this._startAttenuatingAutoScroll(inertiaTotalMovement, touchMoveVelocity);\n },\n\n _calculateAttenuatedFactor (distance) {\n if (this.brake <= 0){\n return (1 - this.brake);\n }\n\n //attenuate formula from: http://learnopengl.com/#!Lighting/Light-casters\n return (1 - this.brake) * (1 / (1 + distance * 0.000014 + distance * distance * 0.000000008));\n },\n\n _startAttenuatingAutoScroll (deltaMove, initialVelocity) {\n let time = this._calculateAutoScrollTimeByInitalSpeed(initialVelocity.mag());\n\n\n let targetDelta = deltaMove.normalize();\n let contentSize = this.content.getContentSize();\n let scrollviewSize = this._view.getContentSize();\n\n let totalMoveWidth = (contentSize.width - scrollviewSize.width);\n let totalMoveHeight = (contentSize.height - scrollviewSize.height);\n\n let attenuatedFactorX = this._calculateAttenuatedFactor(totalMoveWidth);\n let attenuatedFactorY = this._calculateAttenuatedFactor(totalMoveHeight);\n\n targetDelta = cc.v2(targetDelta.x * totalMoveWidth * (1 - this.brake) * attenuatedFactorX, targetDelta.y * totalMoveHeight * attenuatedFactorY * (1 - this.brake));\n\n let originalMoveLength = deltaMove.mag();\n let factor = targetDelta.mag() / originalMoveLength;\n targetDelta = targetDelta.add(deltaMove);\n\n if (this.brake > 0 && factor > 7) {\n factor = Math.sqrt(factor);\n targetDelta = deltaMove.mul(factor).add(deltaMove);\n }\n\n if (this.brake > 0 && factor > 3) {\n factor = 3;\n time = time * factor;\n }\n\n if (this.brake === 0 && factor > 1) {\n time = time * factor;\n }\n\n this._startAutoScroll(targetDelta, time, true);\n },\n\n _calculateAutoScrollTimeByInitalSpeed (initalSpeed) {\n return Math.sqrt(Math.sqrt(initalSpeed / 5));\n },\n\n _startAutoScroll (deltaMove, timeInSecond, attenuated) {\n let adjustedDeltaMove = this._flattenVectorByDirection(deltaMove);\n\n this._autoScrolling = true;\n this._autoScrollTargetDelta = adjustedDeltaMove;\n this._autoScrollAttenuate = attenuated;\n this._autoScrollStartPosition = this.getContentPosition();\n this._autoScrollTotalTime = timeInSecond;\n this._autoScrollAccumulatedTime = 0;\n this._autoScrollBraking = false;\n this._isScrollEndedWithThresholdEventFired = false;\n this._autoScrollBrakingStartPosition = cc.v2(0, 0);\n\n let currentOutOfBoundary = this._getHowMuchOutOfBoundary();\n if (!currentOutOfBoundary.fuzzyEquals(cc.v2(0, 0), EPSILON)) {\n this._autoScrollCurrentlyOutOfBoundary = true;\n }\n },\n\n _calculateTouchMoveVelocity () {\n let totalTime = 0;\n totalTime = this._touchMoveTimeDeltas.reduce(function(a, b) {\n return a + b;\n }, totalTime);\n\n if (totalTime <= 0 || totalTime >= 0.5) {\n return cc.v2(0, 0);\n }\n\n let totalMovement = cc.v2(0, 0);\n totalMovement = this._touchMoveDisplacements.reduce(function(a, b) {\n return a.add(b);\n }, totalMovement);\n\n return cc.v2(totalMovement.x * (1 - this.brake) / totalTime,\n totalMovement.y * (1 - this.brake) / totalTime);\n },\n\n _flattenVectorByDirection (vector) {\n let result = vector;\n result.x = this.horizontal ? result.x : 0;\n result.y = this.vertical ? result.y : 0;\n return result;\n },\n\n _moveContent (deltaMove, canStartBounceBack) {\n let adjustedMove = this._flattenVectorByDirection(deltaMove);\n let newPosition = this.getContentPosition().add(adjustedMove);\n\n this.setContentPosition(newPosition);\n\n let outOfBoundary = this._getHowMuchOutOfBoundary();\n this._updateScrollBar(outOfBoundary);\n\n if (this.elastic && canStartBounceBack) {\n this._startBounceBackIfNeeded();\n }\n },\n\n _getContentLeftBoundary () {\n let contentPos = this.getContentPosition();\n return contentPos.x - this.content.getAnchorPoint().x * this.content.getContentSize().width;\n },\n\n _getContentRightBoundary () {\n let contentSize = this.content.getContentSize();\n return this._getContentLeftBoundary() + contentSize.width;\n },\n\n _getContentTopBoundary () {\n let contentSize = this.content.getContentSize();\n return this._getContentBottomBoundary() + contentSize.height;\n },\n\n _getContentBottomBoundary () {\n let contentPos = this.getContentPosition();\n return contentPos.y - this.content.getAnchorPoint().y * this.content.getContentSize().height;\n },\n\n _getHowMuchOutOfBoundary (addition) {\n addition = addition || cc.v2(0, 0);\n if (addition.fuzzyEquals(cc.v2(0, 0), EPSILON) && !this._outOfBoundaryAmountDirty) {\n return this._outOfBoundaryAmount;\n }\n\n let outOfBoundaryAmount = cc.v2(0, 0);\n if (this._getContentLeftBoundary() + addition.x > this._leftBoundary) {\n outOfBoundaryAmount.x = this._leftBoundary - (this._getContentLeftBoundary() + addition.x);\n } else if (this._getContentRightBoundary() + addition.x < this._rightBoundary) {\n outOfBoundaryAmount.x = this._rightBoundary - (this._getContentRightBoundary() + addition.x);\n }\n\n if (this._getContentTopBoundary() + addition.y < this._topBoundary) {\n outOfBoundaryAmount.y = this._topBoundary - (this._getContentTopBoundary() + addition.y);\n } else if (this._getContentBottomBoundary() + addition.y > this._bottomBoundary) {\n outOfBoundaryAmount.y = this._bottomBoundary - (this._getContentBottomBoundary() + addition.y);\n }\n\n if (addition.fuzzyEquals(cc.v2(0, 0), EPSILON)) {\n this._outOfBoundaryAmount = outOfBoundaryAmount;\n this._outOfBoundaryAmountDirty = false;\n }\n\n outOfBoundaryAmount = this._clampDelta(outOfBoundaryAmount);\n\n return outOfBoundaryAmount;\n },\n\n _updateScrollBarState () {\n if (!this.content) {\n return;\n }\n let contentSize = this.content.getContentSize();\n let scrollViewSize = this._view.getContentSize();\n if (this.verticalScrollBar) {\n if (contentSize.height < scrollViewSize.height) {\n this.verticalScrollBar.hide();\n } else {\n this.verticalScrollBar.show();\n }\n }\n\n if (this.horizontalScrollBar) {\n if (contentSize.width < scrollViewSize.width) {\n this.horizontalScrollBar.hide();\n } else {\n this.horizontalScrollBar.show();\n }\n }\n },\n\n _updateScrollBar (outOfBoundary) {\n if (this.horizontalScrollBar) {\n this.horizontalScrollBar._onScroll(outOfBoundary);\n }\n\n if (this.verticalScrollBar) {\n this.verticalScrollBar._onScroll(outOfBoundary);\n }\n },\n\n _onScrollBarTouchBegan () {\n if (this.horizontalScrollBar) {\n this.horizontalScrollBar._onTouchBegan();\n }\n\n if (this.verticalScrollBar) {\n this.verticalScrollBar._onTouchBegan();\n }\n },\n\n _onScrollBarTouchEnded () {\n if (this.horizontalScrollBar) {\n this.horizontalScrollBar._onTouchEnded();\n }\n\n if (this.verticalScrollBar) {\n this.verticalScrollBar._onTouchEnded();\n }\n },\n\n _dispatchEvent (event) {\n if (event === 'scroll-ended') {\n this._scrollEventEmitMask = 0;\n\n } else if (event === 'scroll-to-top'\n || event === 'scroll-to-bottom'\n || event === 'scroll-to-left'\n || event === 'scroll-to-right') {\n\n let flag = (1 << eventMap[event]);\n if (this._scrollEventEmitMask & flag) {\n return;\n } else {\n this._scrollEventEmitMask |= flag;\n }\n }\n\n cc.Component.EventHandler.emitEvents(this.scrollEvents, this, eventMap[event]);\n this.node.emit(event, this);\n },\n\n _adjustContentOutOfBoundary () {\n this._outOfBoundaryAmountDirty = true;\n if (this._isOutOfBoundary()) {\n let outOfBoundary = this._getHowMuchOutOfBoundary(cc.v2(0, 0));\n let newPosition = this.getContentPosition().add(outOfBoundary);\n if (this.content) {\n this.content.setPosition(newPosition);\n this._updateScrollBar(0);\n }\n }\n },\n\n start () {\n this._calculateBoundary();\n //Because widget component will adjust content position and scrollview position is correct after visit\n //So this event could make sure the content is on the correct position after loading.\n if (this.content) {\n cc.director.once(cc.Director.EVENT_BEFORE_DRAW, this._adjustContentOutOfBoundary, this);\n }\n },\n\n _hideScrollbar () {\n if (this.horizontalScrollBar) {\n this.horizontalScrollBar.hide();\n }\n\n if (this.verticalScrollBar) {\n this.verticalScrollBar.hide();\n }\n },\n\n onDisable () {\n if (!CC_EDITOR) {\n this._unregisterEvent();\n if (this.content) {\n this.content.off(NodeEvent.SIZE_CHANGED, this._calculateBoundary, this);\n this.content.off(NodeEvent.SCALE_CHANGED, this._calculateBoundary, this);\n if (this._view) {\n this._view.off(NodeEvent.POSITION_CHANGED, this._calculateBoundary, this);\n this._view.off(NodeEvent.SCALE_CHANGED, this._calculateBoundary, this);\n this._view.off(NodeEvent.SIZE_CHANGED, this._calculateBoundary, this);\n }\n }\n }\n this._hideScrollbar();\n this.stopAutoScroll();\n },\n\n onEnable () {\n if (!CC_EDITOR) {\n this._registerEvent();\n if (this.content) {\n this.content.on(NodeEvent.SIZE_CHANGED, this._calculateBoundary, this);\n this.content.on(NodeEvent.SCALE_CHANGED, this._calculateBoundary, this);\n if (this._view) {\n this._view.on(NodeEvent.POSITION_CHANGED, this._calculateBoundary, this);\n this._view.on(NodeEvent.SCALE_CHANGED, this._calculateBoundary, this);\n this._view.on(NodeEvent.SIZE_CHANGED, this._calculateBoundary, this);\n }\n }\n }\n this._updateScrollBarState();\n },\n\n update (dt) {\n if (this._autoScrolling) {\n this._processAutoScrolling(dt);\n }\n }\n});\n\ncc.ScrollView = module.exports = ScrollView;\n\n/**\n * !#en\n * Note: This event is emitted from the node to which the component belongs.\n * !#zh\n * 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。\n * @event scroll-to-top\n * @param {Event.EventCustom} event\n * @param {ScrollView} scrollView - The ScrollView component.\n */\n\n/**\n * !#en\n * Note: This event is emitted from the node to which the component belongs.\n * !#zh\n * 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。\n * @event scroll-to-bottom\n * @param {Event.EventCustom} event\n * @param {ScrollView} scrollView - The ScrollView component.\n */\n\n/**\n * !#en\n * Note: This event is emitted from the node to which the component belongs.\n * !#zh\n * 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。\n * @event scroll-to-left\n * @param {Event.EventCustom} event\n * @param {ScrollView} scrollView - The ScrollView component.\n */\n\n/**\n * !#en\n * Note: This event is emitted from the node to which the component belongs.\n * !#zh\n * 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。\n * @event scroll-to-right\n * @param {Event.EventCustom} event\n * @param {ScrollView} scrollView - The ScrollView component.\n */\n\n/**\n * !#en\n * Note: This event is emitted from the node to which the component belongs.\n * !#zh\n * 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。\n * @event scrolling\n * @param {Event.EventCustom} event\n * @param {ScrollView} scrollView - The ScrollView component.\n */\n\n/**\n * !#en\n * Note: This event is emitted from the node to which the component belongs.\n * !#zh\n * 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。\n * @event bounce-bottom\n * @param {Event.EventCustom} event\n * @param {ScrollView} scrollView - The ScrollView component.\n */\n\n/**\n * !#en\n * Note: This event is emitted from the node to which the component belongs.\n * !#zh\n * 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。\n * @event bounce-top\n * @param {Event.EventCustom} event\n * @param {ScrollView} scrollView - The ScrollView component.\n */\n\n/**\n * !#en\n * Note: This event is emitted from the node to which the component belongs.\n * !#zh\n * 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。\n * @event bounce-left\n * @param {Event.EventCustom} event\n * @param {ScrollView} scrollView - The ScrollView component.\n */\n\n/**\n * !#en\n * Note: This event is emitted from the node to which the component belongs.\n * !#zh\n * 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。\n * @event bounce-right\n * @param {Event.EventCustom} event\n * @param {ScrollView} scrollView - The ScrollView component.\n */\n\n/**\n * !#en\n * Note: This event is emitted from the node to which the component belongs.\n * !#zh\n * 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。\n * @event scroll-ended\n * @param {Event.EventCustom} event\n * @param {ScrollView} scrollView - The ScrollView component.\n */\n\n/**\n * !#en\n * Note: This event is emitted from the node to which the component belongs.\n * !#zh\n * 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。\n * @event touch-up\n * @param {Event.EventCustom} event\n * @param {ScrollView} scrollView - The ScrollView component.\n */\n\n /**\n * !#en\n * Note: This event is emitted from the node to which the component belongs.\n * !#zh\n * 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。\n * @event scroll-began\n * @param {Event.EventCustom} event\n * @param {ScrollView} scrollView - The ScrollView component.\n */\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst misc = require('../utils/misc');\nconst Component = require('./CCComponent');\n\n/**\n * !#en The Slider Direction\n * !#zh 滑动器方向\n * @enum Slider.Direction\n */\nvar Direction = cc.Enum({\n /**\n * !#en The horizontal direction.\n * !#zh 水平方向\n * @property {Number} Horizontal\n */\n Horizontal: 0,\n /**\n * !#en The vertical direction.\n * !#zh 垂直方向\n * @property {Number} Vertical\n */\n Vertical: 1\n});\n\n/**\n * !#en The Slider Control\n * !#zh 滑动器组件\n * @class Slider\n * @extends Component\n */\nvar Slider = cc.Class({\n name: 'cc.Slider',\n extends: Component,\n\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.ui/Slider',\n help: 'i18n:COMPONENT.help_url.slider'\n },\n\n ctor: function () {\n this._offset = cc.v2();\n this._touchHandle = false;\n this._dragging = false;\n },\n\n properties: {\n /**\n * !#en The \"handle\" part of the slider\n * !#zh 滑动器滑块按钮部件\n * @property {Button} handle\n */\n handle: {\n default: null,\n type: cc.Button,\n tooltip: CC_DEV && 'i18n:COMPONENT.slider.handle',\n notify: function() {\n if (CC_EDITOR && this.handle) {\n this._updateHandlePosition();\n }\n }\n },\n\n /**\n * !#en The slider direction\n * !#zh 滑动器方向\n * @property {Slider.Direction} direction\n */\n direction: {\n default: Direction.Horizontal,\n type: Direction,\n tooltip: CC_DEV && 'i18n:COMPONENT.slider.direction'\n },\n\n /**\n * !#en The current progress of the slider. The valid value is between 0-1\n * !#zh 当前进度值,该数值的区间是 0-1 之间\n * @property {Number} progress\n */\n progress: {\n default: 0.5,\n type: cc.Float,\n range: [0, 1, 0.1],\n slide: true,\n tooltip: CC_DEV && 'i18n:COMPONENT.slider.progress',\n notify: function() {\n this._updateHandlePosition();\n }\n },\n\n /**\n * !#en The slider slide events' callback array\n * !#zh 滑动器组件滑动事件回调函数数组\n * @property {Component.EventHandler[]} slideEvents\n */\n slideEvents: {\n default: [],\n type: cc.Component.EventHandler,\n tooltip: CC_DEV && 'i18n:COMPONENT.slider.slideEvents'\n }\n },\n\n statics: {\n Direction: Direction\n },\n\n __preload: function () {\n this._updateHandlePosition();\n },\n\n // 注册事件\n onEnable: function () {\n this.node.on(cc.Node.EventType.TOUCH_START, this._onTouchBegan, this);\n this.node.on(cc.Node.EventType.TOUCH_MOVE, this._onTouchMoved, this);\n this.node.on(cc.Node.EventType.TOUCH_END, this._onTouchEnded, this);\n this.node.on(cc.Node.EventType.TOUCH_CANCEL, this._onTouchCancelled, this);\n if (this.handle && this.handle.isValid) {\n this.handle.node.on(cc.Node.EventType.TOUCH_START, this._onHandleDragStart, this);\n this.handle.node.on(cc.Node.EventType.TOUCH_MOVE, this._onTouchMoved, this);\n this.handle.node.on(cc.Node.EventType.TOUCH_END, this._onTouchEnded, this);\n }\n },\n\n onDisable: function() {\n this.node.off(cc.Node.EventType.TOUCH_START, this._onTouchBegan, this);\n this.node.off(cc.Node.EventType.TOUCH_MOVE, this._onTouchMoved, this);\n this.node.off(cc.Node.EventType.TOUCH_END, this._onTouchEnded, this);\n this.node.off(cc.Node.EventType.TOUCH_CANCEL, this._onTouchCancelled, this);\n if (this.handle && this.handle.isValid) {\n this.handle.node.off(cc.Node.EventType.TOUCH_START, this._onHandleDragStart, this);\n this.handle.node.off(cc.Node.EventType.TOUCH_MOVE, this._onTouchMoved, this);\n this.handle.node.off(cc.Node.EventType.TOUCH_END, this._onTouchEnded, this);\n }\n },\n\n _onHandleDragStart: function (event) {\n this._dragging = true;\n this._touchHandle = true;\n this._offset = this.handle.node.convertToNodeSpaceAR(event.touch.getLocation());\n event.stopPropagation();\n },\n\n _onTouchBegan: function (event) {\n if (!this.handle) { return; }\n this._dragging = true;\n if (!this._touchHandle) {\n this._handleSliderLogic(event.touch);\n }\n event.stopPropagation();\n },\n\n _onTouchMoved: function (event) {\n if (!this._dragging) { return; }\n this._handleSliderLogic(event.touch);\n event.stopPropagation();\n },\n\n _onTouchEnded: function (event) {\n this._dragging = false;\n this._touchHandle = false;\n this._offset = cc.v2();\n event.stopPropagation();\n },\n\n _onTouchCancelled: function (event) {\n this._dragging = false;\n event.stopPropagation();\n },\n\n _handleSliderLogic: function (touch) {\n this._updateProgress(touch);\n this._emitSlideEvent();\n },\n\n _emitSlideEvent: function () {\n cc.Component.EventHandler.emitEvents(this.slideEvents, this);\n this.node.emit('slide', this);\n },\n\n _updateProgress: function (touch) {\n if (!this.handle) { return; }\n let node = this.node;\n var localTouchPos = node.convertToNodeSpaceAR(touch.getLocation());\n if (this.direction === Direction.Horizontal) {\n this.progress = misc.clamp01((localTouchPos.x - this._offset.x + node.anchorX * node.width) / node.width);\n }\n else {\n this.progress = misc.clamp01((localTouchPos.y - this._offset.y + node.anchorY * node.height) / node.height);\n }\n },\n\n _updateHandlePosition: function () {\n if (!this.handle) { return; }\n var handlelocalPos;\n if (this.direction === Direction.Horizontal) {\n handlelocalPos = cc.v2(-this.node.width * this.node.anchorX + this.progress * this.node.width, 0);\n }\n else {\n handlelocalPos = cc.v2(0, -this.node.height * this.node.anchorY + this.progress * this.node.height);\n }\n var worldSpacePos = this.node.convertToWorldSpaceAR(handlelocalPos);\n this.handle.node.position = this.handle.node.parent.convertToNodeSpaceAR(worldSpacePos);\n }\n\n});\n\ncc.Slider = module.exports = Slider;\n\n/**\n * !#en\n * Note: This event is emitted from the node to which the component belongs.\n * !#zh\n * 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。\n * @event slide\n * @param {Event.EventCustom} event\n * @param {Slider} slider - The slider component.\n */\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst misc = require('../utils/misc');\nconst NodeEvent = require('../CCNode').EventType;\nconst RenderComponent = require('./CCRenderComponent');\nconst BlendFunc = require('../utils/blend-func');\n\n\n/**\n * !#en Enum for sprite type.\n * !#zh Sprite 类型\n * @enum Sprite.Type\n */\nvar SpriteType = cc.Enum({\n /**\n * !#en The simple type.\n * !#zh 普通类型\n * @property {Number} SIMPLE\n */\n SIMPLE: 0,\n /**\n * !#en The sliced type.\n * !#zh 切片(九宫格)类型\n * @property {Number} SLICED\n */\n SLICED: 1,\n /**\n * !#en The tiled type.\n * !#zh 平铺类型\n * @property {Number} TILED\n */\n TILED: 2,\n /**\n * !#en The filled type.\n * !#zh 填充类型\n * @property {Number} FILLED\n */\n FILLED: 3,\n /**\n * !#en The mesh type.\n * !#zh 以 Mesh 三角形组成的类型\n * @property {Number} MESH\n */\n MESH: 4\n});\n\n/**\n * !#en Enum for fill type.\n * !#zh 填充类型\n * @enum Sprite.FillType\n */\nvar FillType = cc.Enum({\n /**\n * !#en The horizontal fill.\n * !#zh 水平方向填充\n * @property {Number} HORIZONTAL\n */\n HORIZONTAL: 0,\n /**\n * !#en The vertical fill.\n * !#zh 垂直方向填充\n * @property {Number} VERTICAL\n */\n VERTICAL: 1,\n /**\n * !#en The radial fill.\n * !#zh 径向填充\n * @property {Number} RADIAL\n */\n RADIAL:2,\n});\n\n/**\n * !#en Sprite Size can track trimmed size, raw size or none.\n * !#zh 精灵尺寸调整模式\n * @enum Sprite.SizeMode\n */\nvar SizeMode = cc.Enum({\n /**\n * !#en Use the customized node size.\n * !#zh 使用节点预设的尺寸\n * @property {Number} CUSTOM\n */\n CUSTOM: 0,\n /**\n * !#en Match the trimmed size of the sprite frame automatically.\n * !#zh 自动适配为精灵裁剪后的尺寸\n * @property {Number} TRIMMED\n */\n TRIMMED: 1,\n /**\n * !#en Match the raw size of the sprite frame automatically.\n * !#zh 自动适配为精灵原图尺寸\n * @property {Number} RAW\n */\n RAW: 2\n});\n/**\n * !#en Sprite state can choice the normal or grayscale.\n * !#zh 精灵颜色通道模式。\n * @enum Sprite.State\n * @deprecated\n */\nvar State = cc.Enum({\n /**\n * !#en The normal state\n * !#zh 正常状态\n * @property {Number} NORMAL\n */\n NORMAL: 0,\n /**\n * !#en The gray state, all color will be modified to grayscale value.\n * !#zh 灰色状态,所有颜色会被转换成灰度值\n * @property {Number} GRAY\n */\n GRAY: 1\n});\n\n/**\n * !#en Renders a sprite in the scene.\n * !#zh 该组件用于在场景中渲染精灵。\n * @class Sprite\n * @extends RenderComponent\n * @uses BlendFunc\n * @example\n * // Create a new node and add sprite components.\n * var node = new cc.Node(\"New Sprite\");\n * var sprite = node.addComponent(cc.Sprite);\n * node.parent = this.node;\n */\nvar Sprite = cc.Class({\n name: 'cc.Sprite',\n extends: RenderComponent,\n mixins: [BlendFunc],\n\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.renderers/Sprite',\n help: 'i18n:COMPONENT.help_url.sprite',\n inspector: 'packages://service-pack/inspectors/comps/sprite.js',\n },\n\n properties: {\n _spriteFrame: {\n default: null,\n type: cc.SpriteFrame\n },\n _type: SpriteType.SIMPLE,\n _sizeMode: SizeMode.TRIMMED,\n _fillType: 0,\n _fillCenter: cc.v2(0,0),\n _fillStart: 0,\n _fillRange: 0,\n _isTrimmedMode: true,\n _atlas: {\n default: null,\n type: cc.SpriteAtlas,\n tooltip: CC_DEV && 'i18n:COMPONENT.sprite.atlas',\n editorOnly: true,\n visible: true,\n animatable: false\n },\n\n /**\n * !#en The sprite frame of the sprite.\n * !#zh 精灵的精灵帧\n * @property spriteFrame\n * @type {SpriteFrame}\n * @example\n * sprite.spriteFrame = newSpriteFrame;\n */\n spriteFrame: {\n get () {\n return this._spriteFrame;\n },\n set (value, force) {\n var lastSprite = this._spriteFrame;\n if (CC_EDITOR) {\n if (!force && ((lastSprite && lastSprite._uuid) === (value && value._uuid))) {\n return;\n }\n }\n else {\n if (lastSprite === value) {\n return;\n }\n }\n this._spriteFrame = value;\n this._applySpriteFrame(lastSprite);\n if (CC_EDITOR) {\n this.node.emit('spriteframe-changed', this);\n }\n },\n type: cc.SpriteFrame,\n },\n\n /**\n * !#en The sprite render type.\n * !#zh 精灵渲染类型\n * @property type\n * @type {Sprite.Type}\n * @example\n * sprite.type = cc.Sprite.Type.SIMPLE;\n */\n type: {\n get () {\n return this._type;\n },\n set (value) {\n if (this._type !== value) {\n this._type = value;\n this.setVertsDirty();\n this._resetAssembler();\n }\n },\n type: SpriteType,\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.sprite.type',\n },\n\n /**\n * !#en\n * The fill type, This will only have any effect if the \"type\" is set to “cc.Sprite.Type.FILLED”.\n * !#zh\n * 精灵填充类型,仅渲染类型设置为 cc.Sprite.Type.FILLED 时有效。\n * @property fillType\n * @type {Sprite.FillType}\n * @example\n * sprite.fillType = cc.Sprite.FillType.HORIZONTAL;\n */\n fillType : {\n get () {\n return this._fillType;\n },\n set (value) {\n if (value !== this._fillType) {\n this._fillType = value;\n this.setVertsDirty();\n this._resetAssembler();\n }\n },\n type: FillType,\n tooltip: CC_DEV && 'i18n:COMPONENT.sprite.fill_type'\n },\n\n /**\n * !#en\n * The fill Center, This will only have any effect if the \"type\" is set to “cc.Sprite.Type.FILLED”.\n * !#zh\n * 填充中心点,仅渲染类型设置为 cc.Sprite.Type.FILLED 时有效。\n * @property fillCenter\n * @type {Vec2}\n * @example\n * sprite.fillCenter = new cc.Vec2(0, 0);\n */\n fillCenter: {\n get () {\n return this._fillCenter;\n },\n set (value) {\n this._fillCenter.x = value.x;\n this._fillCenter.y = value.y;\n if (this._type === SpriteType.FILLED) {\n this.setVertsDirty();\n }\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.sprite.fill_center',\n },\n\n /**\n * !#en\n * The fill Start, This will only have any effect if the \"type\" is set to “cc.Sprite.Type.FILLED”.\n * !#zh\n * 填充起始点,仅渲染类型设置为 cc.Sprite.Type.FILLED 时有效。\n * @property fillStart\n * @type {Number}\n * @example\n * // -1 To 1 between the numbers\n * sprite.fillStart = 0.5;\n */\n fillStart: {\n get () {\n return this._fillStart;\n },\n set (value) {\n this._fillStart = misc.clampf(value, -1, 1);\n if (this._type === SpriteType.FILLED) {\n this.setVertsDirty();\n }\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.sprite.fill_start'\n },\n\n /**\n * !#en\n * The fill Range, This will only have any effect if the \"type\" is set to “cc.Sprite.Type.FILLED”.\n * !#zh\n * 填充范围,仅渲染类型设置为 cc.Sprite.Type.FILLED 时有效。\n * @property fillRange\n * @type {Number}\n * @example\n * // -1 To 1 between the numbers\n * sprite.fillRange = 1;\n */\n fillRange: {\n get () {\n return this._fillRange;\n },\n set (value) {\n this._fillRange = misc.clampf(value, -1, 1);\n if (this._type === SpriteType.FILLED) {\n this.setVertsDirty();\n }\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.sprite.fill_range'\n },\n /**\n * !#en specify the frame is trimmed or not.\n * !#zh 是否使用裁剪模式\n * @property trim\n * @type {Boolean}\n * @example\n * sprite.trim = true;\n */\n trim: {\n get () {\n return this._isTrimmedMode;\n },\n set (value) {\n if (this._isTrimmedMode !== value) {\n this._isTrimmedMode = value;\n if (this._type === SpriteType.SIMPLE || this._type === SpriteType.MESH) {\n this.setVertsDirty();\n }\n if (CC_EDITOR) {\n this.node.emit('trim-changed', this);\n }\n }\n },\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.sprite.trim'\n },\n\n\n /**\n * !#en specify the size tracing mode.\n * !#zh 精灵尺寸调整模式\n * @property sizeMode\n * @type {Sprite.SizeMode}\n * @example\n * sprite.sizeMode = cc.Sprite.SizeMode.CUSTOM;\n */\n sizeMode: {\n get () {\n return this._sizeMode;\n },\n set (value) {\n this._sizeMode = value;\n if (value !== SizeMode.CUSTOM) {\n this._applySpriteSize();\n }\n },\n animatable: false,\n type: SizeMode,\n tooltip: CC_DEV && 'i18n:COMPONENT.sprite.size_mode'\n },\n\n autoSwitchMaterial: {\n type: RenderComponent.EnableType,\n default: RenderComponent.EnableType.GLOBAL,\n notify(oldValue) {\n if (this.autoSwitchMaterial === oldValue) return;\n this.setVertsDirty();\n },\n },\n allowDynamicAtlas: {\n type: RenderComponent.EnableType,\n default: RenderComponent.EnableType.GLOBAL,\n notify(oldValue) {\n if (this.allowDynamicAtlas === oldValue) return;\n this.setVertsDirty();\n },\n },\n },\n\n statics: {\n FillType: FillType,\n Type: SpriteType,\n SizeMode: SizeMode,\n State: State,\n },\n\n setVisible (visible) {\n this.enabled = visible;\n },\n\n /**\n * Change the state of sprite.\n * @method setState\n * @see `Sprite.State`\n * @param state {Sprite.State} NORMAL or GRAY State.\n * @deprecated\n */\n setState () {},\n\n /**\n * Gets the current state.\n * @method getState\n * @see `Sprite.State`\n * @return {Sprite.State}\n * @deprecated\n */\n getState () {},\n\n __preload () {\n this._super();\n CC_EDITOR && this.node.on(NodeEvent.SIZE_CHANGED, this._resizedInEditor, this);\n this._applySpriteFrame();\n },\n\n onEnable () {\n this._super();\n this._spriteFrame && this._spriteFrame.isValid && this._spriteFrame.ensureLoadTexture();\n\n this.node.on(cc.Node.EventType.SIZE_CHANGED, this.setVertsDirty, this);\n this.node.on(cc.Node.EventType.ANCHOR_CHANGED, this.setVertsDirty, this);\n },\n\n onDisable () {\n this._super();\n\n this.node.off(cc.Node.EventType.SIZE_CHANGED, this.setVertsDirty, this);\n this.node.off(cc.Node.EventType.ANCHOR_CHANGED, this.setVertsDirty, this);\n },\n\n onRestore: CC_EDITOR && function () {\n // Because undo/redo will not call onEnable/onDisable,\n // we need call onEnable/onDisable manually to active/disactive children nodes.\n if (this.enabledInHierarchy) {\n this.node._renderComponent = null;\n this.onEnable();\n }\n else {\n this.onDisable();\n }\n },\n\n _updateMaterial () {\n let texture = null;\n\n if (this._spriteFrame) {\n texture = this._spriteFrame.getTexture();\n }\n\n // make sure material is belong to self.\n let material = this.getMaterial(0);\n if (material) {\n let oldDefine = material.getDefine('USE_TEXTURE');\n if (oldDefine !== undefined && !oldDefine) {\n material.define('USE_TEXTURE', true);\n }\n\n // 根据材质更新 uniform\n const isMultiMaterial = material.material.isMultiSupport();\n if (isMultiMaterial) {\n // 在 assembler 中进行更新性能会更好,不需要每次 setSpriteFrame 都更新,并且动态图集会导致两次触发\n // if (texture) this._updateMultiTexId(material, texture);\n this._texIdDirty = true;\n } else {\n const textureImpl = texture && texture.getImpl();\n if (material.getProperty('texture') !== textureImpl) {\n material.setProperty('texture', texture);\n }\n }\n\n // 根据材质更新 assembler\n if (this._assembler) {\n if ((isMultiMaterial && !this._assembler.isMulti) || !isMultiMaterial && this._assembler.isMulti) {\n this._resetAssembler();\n }\n }\n }\n\n BlendFunc.prototype._updateMaterial.call(this);\n },\n\n _applyAtlas: CC_EDITOR && function (spriteFrame) {\n // Set atlas\n if (spriteFrame && spriteFrame.isValid && spriteFrame._atlasUuid) {\n var self = this;\n cc.assetManager.loadAny(spriteFrame._atlasUuid, function (err, asset) {\n self._atlas = asset;\n });\n } else {\n this._atlas = null;\n }\n },\n\n _validateRender () {\n let spriteFrame = this._spriteFrame;\n if (this._materials[0] &&\n spriteFrame &&\n spriteFrame.textureLoaded()) {\n return;\n }\n\n this.disableRender();\n },\n\n _applySpriteSize () {\n if (!this.isValid || !this._spriteFrame || !this._spriteFrame.isValid) {\n return;\n }\n\n if (SizeMode.RAW === this._sizeMode) {\n var size = this._spriteFrame._originalSize;\n this.node.setContentSize(size);\n } else if (SizeMode.TRIMMED === this._sizeMode) {\n var rect = this._spriteFrame._rect;\n this.node.setContentSize(rect.width, rect.height);\n }\n\n this.setVertsDirty();\n },\n\n _applySpriteFrame (oldFrame) {\n if (!this.isValid) return;\n\n let oldTexture = oldFrame && oldFrame.isValid && oldFrame.getTexture();\n if (oldTexture && !oldTexture.loaded) {\n oldFrame.off('load', this._applySpriteSize, this);\n }\n\n let spriteFrame = this._spriteFrame;\n const frameValid = spriteFrame && spriteFrame.isValid;\n let newTexture = frameValid && spriteFrame.getTexture();\n\n if (oldTexture !== newTexture) {\n this._updateMaterial();\n }\n\n if (newTexture && newTexture.loaded) {\n this._applySpriteSize();\n }\n else {\n this.disableRender();\n if (frameValid) {\n spriteFrame.once('load', this._applySpriteSize, this);\n }\n }\n\n if (CC_EDITOR) {\n // Set atlas\n this._applyAtlas(spriteFrame);\n }\n },\n});\n\nif (CC_EDITOR) {\n Sprite.prototype._resizedInEditor = function () {\n if (this._spriteFrame && this._spriteFrame.isValid) {\n var actualSize = this.node.getContentSize();\n var expectedW = actualSize.width;\n var expectedH = actualSize.height;\n if (this._sizeMode === SizeMode.RAW) {\n var size = this._spriteFrame.getOriginalSize();\n expectedW = size.width;\n expectedH = size.height;\n } else if (this._sizeMode === SizeMode.TRIMMED) {\n var rect = this._spriteFrame.getRect();\n expectedW = rect.width;\n expectedH = rect.height;\n\n }\n\n if (expectedW !== actualSize.width || expectedH !== actualSize.height) {\n this._sizeMode = SizeMode.CUSTOM;\n }\n }\n };\n\n // override onDestroy\n Sprite.prototype.__superOnDestroy = RenderComponent.prototype.onDestroy;\n Sprite.prototype.onDestroy = function () {\n if (this.__superOnDestroy) this.__superOnDestroy();\n this.node.off(NodeEvent.SIZE_CHANGED, this._resizedInEditor, this);\n };\n}\n\ncc.Sprite = module.exports = Sprite;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst GraySpriteState = require('../utils/gray-sprite-state');\n\n/**\n * !#en The toggle component is a CheckBox, when it used together with a ToggleGroup, it\n * could be treated as a RadioButton.\n * !#zh Toggle 是一个 CheckBox当它和 ToggleGroup 一起使用的时候,可以变成 RadioButton。\n * @class Toggle\n * @extends Button\n * @uses GraySpriteState\n */\nlet Toggle = cc.Class({\n name: 'cc.Toggle',\n extends: require('./CCButton'),\n mixins: [GraySpriteState],\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.ui/Toggle',\n help: 'i18n:COMPONENT.help_url.toggle',\n inspector: 'packages://inspector/inspectors/comps/toggle.js',\n },\n\n properties: {\n /**\n * !#en When this value is true, the check mark component will be enabled, otherwise\n * the check mark component will be disabled.\n * !#zh 如果这个设置为 true则 check mark 组件会处于 enabled 状态,否则处于 disabled 状态。\n * @property {Boolean} isChecked\n */\n _N$isChecked: true,\n isChecked: {\n get: function () {\n return this._N$isChecked;\n },\n set: function (value) {\n if (value === this._N$isChecked) {\n return;\n }\n\n var group = this.toggleGroup || this._toggleContainer;\n if (group && group.enabled && this._N$isChecked) {\n if (!group.allowSwitchOff) {\n return;\n }\n\n }\n\n this._N$isChecked = value;\n this._updateCheckMark();\n\n if (group && group.enabled) {\n group.updateToggles(this);\n }\n\n if (cc.Toggle._triggerEventInScript_isChecked) {\n this._emitToggleEvents();\n }\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.toggle.isChecked',\n },\n\n /**\n * !#en The toggle group which the toggle belongs to, when it is null, the toggle is a CheckBox.\n * Otherwise, the toggle is a RadioButton.\n * !#zh Toggle 所属的 ToggleGroup这个属性是可选的。如果这个属性为 null则 Toggle 是一个 CheckBox\n * 否则Toggle 是一个 RadioButton。\n * @property {ToggleGroup} toggleGroup\n */\n toggleGroup: {\n default: null,\n tooltip: CC_DEV && 'i18n:COMPONENT.toggle.toggleGroup',\n type: require('./CCToggleGroup')\n },\n\n /**\n * !#en The image used for the checkmark.\n * !#zh Toggle 处于选中状态时显示的图片\n * @property {Sprite} checkMark\n */\n checkMark: {\n default: null,\n type: cc.Sprite,\n tooltip: CC_DEV && 'i18n:COMPONENT.toggle.checkMark'\n },\n\n /**\n * !#en If Toggle is clicked, it will trigger event's handler\n * !#zh Toggle 按钮的点击事件列表。\n * @property {Component.EventHandler[]} checkEvents\n */\n checkEvents: {\n default: [],\n type: cc.Component.EventHandler\n },\n\n _resizeToTarget: {\n animatable: false,\n set: function (value) {\n if (value) {\n this._resizeNodeToTargetNode();\n }\n }\n },\n\n },\n\n statics: {\n _triggerEventInScript_check: false,\n _triggerEventInScript_isChecked: false,\n },\n\n onEnable: function () {\n this._super();\n if (!CC_EDITOR) {\n this._registerToggleEvent();\n }\n if (this.toggleGroup && this.toggleGroup.enabledInHierarchy) {\n this.toggleGroup.addToggle(this);\n }\n },\n\n onDisable: function () {\n this._super();\n if (!CC_EDITOR) {\n this._unregisterToggleEvent();\n }\n if (this.toggleGroup && this.toggleGroup.enabledInHierarchy) {\n this.toggleGroup.removeToggle(this);\n }\n },\n\n _hideCheckMark () {\n this._N$isChecked = false;\n this._updateCheckMark();\n },\n\n toggle: function (event) {\n this.isChecked = !this.isChecked;\n if (!cc.Toggle._triggerEventInScript_isChecked && (cc.Toggle._triggerEventInScript_check || event)) {\n this._emitToggleEvents();\n }\n },\n\n /**\n * !#en Make the toggle button checked.\n * !#zh 使 toggle 按钮处于选中状态\n * @method check\n */\n check: function () {\n this.isChecked = true;\n if (!cc.Toggle._triggerEventInScript_isChecked && cc.Toggle._triggerEventInScript_check) {\n this._emitToggleEvents();\n }\n },\n\n /**\n * !#en Make the toggle button unchecked.\n * !#zh 使 toggle 按钮处于未选中状态\n * @method uncheck\n */\n uncheck: function () {\n this.isChecked = false;\n if (!cc.Toggle._triggerEventInScript_isChecked && cc.Toggle._triggerEventInScript_check) {\n this._emitToggleEvents();\n }\n },\n\n _updateCheckMark: function () {\n if (this.checkMark) {\n this.checkMark.node.active = !!this.isChecked;\n }\n },\n\n _updateDisabledState: function () {\n this._super();\n\n if (this.enableAutoGrayEffect && this.checkMark) {\n let useGrayMaterial = !this.interactable;\n this._switchGrayMaterial(useGrayMaterial, this.checkMark);\n }\n },\n\n _registerToggleEvent: function () {\n this.node.on('click', this.toggle, this);\n },\n\n _unregisterToggleEvent: function () {\n this.node.off('click', this.toggle, this);\n },\n\n _emitToggleEvents: function () {\n this.node.emit('toggle', this);\n if (this.checkEvents) {\n cc.Component.EventHandler.emitEvents(this.checkEvents, this);\n }\n }\n\n});\n\ncc.Toggle = module.exports = Toggle;\n\nconst js = require('../platform/js');\n\njs.get(Toggle.prototype, '_toggleContainer',\n function () {\n let parent = this.node.parent;\n if (cc.Node.isNode(parent)) {\n return parent.getComponent(cc.ToggleContainer);\n }\n return null;\n }\n);\n\n/**\n * !#en\n * Note: This event is emitted from the node to which the component belongs.\n * !#zh\n * 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。\n * @event toggle\n * @param {Event.EventCustom} event\n * @param {Toggle} toggle - The Toggle component.\n */\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * !#en ToggleContainer is not a visiable UI component but a way to modify the behavior of a set of Toggles. <br/>\n * Toggles that belong to the same group could only have one of them to be switched on at a time.<br/>\n * Note: All the first layer child node containing the toggle component will auto be added to the container\n * !#zh ToggleContainer 不是一个可见的 UI 组件,它可以用来修改一组 Toggle 组件的行为。<br/>\n * 当一组 Toggle 属于同一个 ToggleContainer 的时候,任何时候只能有一个 Toggle 处于选中状态。<br/>\n * 注意:所有包含 Toggle 组件的一级子节点都会自动被添加到该容器中\n * @class ToggleContainer\n * @extends Component\n */\nvar ToggleContainer = cc.Class({\n name: 'cc.ToggleContainer',\n extends: cc.Component,\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.ui/ToggleContainer',\n help: 'i18n:COMPONENT.help_url.toggleContainer',\n executeInEditMode: true\n },\n\n properties: {\n /**\n * !#en If this setting is true, a toggle could be switched off and on when pressed.\n * If it is false, it will make sure there is always only one toggle could be switched on\n * and the already switched on toggle can't be switched off.\n * !#zh 如果这个设置为 true 那么 toggle 按钮在被点击的时候可以反复地被选中和未选中。\n * @property {Boolean} allowSwitchOff\n */\n allowSwitchOff: {\n tooltip: CC_DEV && 'i18n:COMPONENT.toggle_group.allowSwitchOff',\n default: false\n },\n\n /**\n * !#en If Toggle is clicked, it will trigger event's handler\n * !#zh Toggle 按钮的点击事件列表。\n * @property {Component.EventHandler[]} checkEvents\n */\n checkEvents: {\n default: [],\n type: cc.Component.EventHandler\n },\n },\n\n updateToggles: function (toggle) {\n if(!this.enabledInHierarchy) return;\n\n if (toggle.isChecked) {\n this.toggleItems.forEach(function (item) {\n if (item !== toggle && item.isChecked && item.enabled) {\n item._hideCheckMark();\n }\n });\n\n if (this.checkEvents) {\n cc.Component.EventHandler.emitEvents(this.checkEvents, toggle);\n }\n }\n },\n\n _allowOnlyOneToggleChecked: function () {\n var isChecked = false;\n this.toggleItems.forEach(function (item) {\n if (isChecked) {\n item._hideCheckMark();\n }\n else if (item.isChecked) {\n isChecked = true;\n }\n });\n\n return isChecked;\n },\n\n _makeAtLeastOneToggleChecked: function () {\n var isChecked = this._allowOnlyOneToggleChecked();\n\n if (!isChecked && !this.allowSwitchOff) {\n var toggleItems = this.toggleItems;\n if (toggleItems.length > 0) {\n toggleItems[0].check();\n }\n }\n },\n\n onEnable: function () {\n this._makeAtLeastOneToggleChecked();\n this.node.on('child-added', this._allowOnlyOneToggleChecked, this);\n this.node.on('child-removed', this._makeAtLeastOneToggleChecked, this);\n },\n\n onDisable: function () {\n this.node.off('child-added', this._allowOnlyOneToggleChecked, this);\n this.node.off('child-removed', this._makeAtLeastOneToggleChecked, this);\n },\n});\n\n/**\n * !#en Read only property, return the toggle items array reference managed by ToggleContainer.\n * !#zh 只读属性,返回 ToggleContainer 管理的 toggle 数组引用\n * @property {Toggle[]} toggleItems\n */\nvar js = require('../platform/js');\njs.get(ToggleContainer.prototype, 'toggleItems',\n function () {\n return this.node._children.map(function (item) {\n return item.getComponent(cc.Toggle);\n }).filter(Boolean);\n }\n);\n\ncc.ToggleContainer = module.exports = ToggleContainer;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * !#en ToggleGroup is not a visiable UI component but a way to modify the behavior of a set of Toggles.\n * Toggles that belong to the same group could only have one of them to be switched on at a time.\n * !#zh ToggleGroup 不是一个可见的 UI 组件,它可以用来修改一组 Toggle 组件的行为。当一组 Toggle 属于同一个 ToggleGroup 的时候,\n * 任何时候只能有一个 Toggle 处于选中状态。\n * @class ToggleGroup\n * @extends Component\n */\nvar ToggleGroup = cc.Class({\n name: 'cc.ToggleGroup',\n extends: cc.Component,\n ctor: function () {\n this._toggleItems = [];\n },\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.ui/ToggleGroup (Legacy)',\n help: 'i18n:COMPONENT.help_url.toggleGroup'\n },\n\n properties: {\n /**\n * !#en If this setting is true, a toggle could be switched off and on when pressed.\n * If it is false, it will make sure there is always only one toggle could be switched on\n * and the already switched on toggle can't be switched off.\n * !#zh 如果这个设置为 true 那么 toggle 按钮在被点击的时候可以反复地被选中和未选中。\n * @property {Boolean} allowSwitchOff\n */\n allowSwitchOff: {\n tooltip: CC_DEV && 'i18n:COMPONENT.toggle_group.allowSwitchOff',\n default: false\n },\n\n /**\n * !#en Read only property, return the toggle items array reference managed by toggleGroup.\n * !#zh 只读属性,返回 toggleGroup 管理的 toggle 数组引用\n * @property {Array} toggleItems\n */\n toggleItems: {\n get: function () {\n return this._toggleItems;\n }\n }\n },\n\n updateToggles: function (toggle) {\n if(!this.enabledInHierarchy) return;\n\n this._toggleItems.forEach(function (item){\n if(toggle.isChecked) {\n if (item !== toggle && item.isChecked && item.enabled) {\n item._hideCheckMark();\n }\n }\n });\n },\n\n addToggle: function (toggle) {\n var index = this._toggleItems.indexOf(toggle);\n if (index === -1) {\n this._toggleItems.push(toggle);\n }\n this._allowOnlyOneToggleChecked();\n },\n\n removeToggle: function (toggle) {\n var index = this._toggleItems.indexOf(toggle);\n if(index > -1) {\n this._toggleItems.splice(index, 1);\n }\n this._makeAtLeastOneToggleChecked();\n },\n\n _allowOnlyOneToggleChecked: function () {\n var isChecked = false;\n this._toggleItems.forEach(function (item) {\n if(isChecked && item.enabled) {\n item._hideCheckMark();\n }\n\n if (item.isChecked && item.enabled) {\n isChecked = true;\n }\n });\n\n return isChecked;\n },\n\n _makeAtLeastOneToggleChecked: function () {\n var isChecked = this._allowOnlyOneToggleChecked();\n\n if(!isChecked && !this.allowSwitchOff) {\n if(this._toggleItems.length > 0) {\n this._toggleItems[0].isChecked = true;\n }\n }\n },\n\n start: function () {\n this._makeAtLeastOneToggleChecked();\n }\n});\n\nvar js = require('../platform/js');\nvar showed = false;\njs.get(cc, 'ToggleGroup', function () {\n if (!showed) {\n cc.errorID(1405, 'cc.ToggleGroup', 'cc.ToggleContainer');\n showed = true;\n }\n return ToggleGroup;\n});\n\nmodule.exports = ToggleGroup;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * !#en\n * Handling touch events in a ViewGroup takes special care,\n * because it's common for a ViewGroup to have children that are targets for different touch events than the ViewGroup itself.\n * To make sure that each view correctly receives the touch events intended for it,\n * ViewGroup should register capture phase event and handle the event propagation properly.\n * Please refer to Scrollview for more information.\n *\n * !#zh\n * ViewGroup的事件处理比较特殊因为 ViewGroup 里面的子节点关心的事件跟 ViewGroup 本身可能不一样。\n * 为了让子节点能够正确地处理事件ViewGroup 需要注册 capture 阶段的事件,并且合理地处理 ViewGroup 之间的事件传递。\n * 请参考 ScrollView 的实现来获取更多信息。\n * @class ViewGroup\n * @extends Component\n */\nvar ViewGroup = cc.Class({\n name: 'cc.ViewGroup',\n extends: require('./CCComponent')\n\n});\n\n\ncc.ViewGroup = module.exports = ViewGroup;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar WidgetManager = require('../base-ui/CCWidgetManager');\n\n/**\n * !#en Enum for Widget's alignment mode, indicating when the widget should refresh.\n * !#zh Widget 的对齐模式,表示 Widget 应该何时刷新。\n * @enum Widget.AlignMode\n */\n/**\n * !#en\n * Only align once when the Widget is enabled for the first time.\n * This will allow the script or animation to continue controlling the current node.\n * It will only be aligned once before the end of frame when onEnable is called,\n * then immediately disables the Widget.\n * !#zh\n * 仅在 Widget 第一次激活时对齐一次,便于脚本或动画继续控制当前节点。\n * 开启后会在 onEnable 时所在的那一帧结束前对齐一次,然后立刻禁用该 Widget。\n * @property {Number} ONCE\n */\n/**\n * !#en Align first from the beginning as ONCE, and then realign it every time the window is resized.\n * !#zh 一开始会像 ONCE 一样对齐一次,之后每当窗口大小改变时还会重新对齐。\n * @property {Number} ON_WINDOW_RESIZE\n */\n/**\n * !#en Keep aligning all the way.\n * !#zh 始终保持对齐。\n * @property {Number} ALWAYS\n */\nvar AlignMode = WidgetManager.AlignMode;\n\nvar AlignFlags = WidgetManager._AlignFlags;\nvar TOP = AlignFlags.TOP;\nvar MID = AlignFlags.MID;\nvar BOT = AlignFlags.BOT;\nvar LEFT = AlignFlags.LEFT;\nvar CENTER = AlignFlags.CENTER;\nvar RIGHT = AlignFlags.RIGHT;\nvar TOP_BOT = TOP | BOT;\nvar LEFT_RIGHT = LEFT | RIGHT;\n\n/**\n * !#en\n * Stores and manipulate the anchoring based on its parent.\n * Widget are used for GUI but can also be used for other things.\n * Widget will adjust current node's position and size automatically, but the results after adjustment can not be obtained until the next frame unless you call {{#crossLink \"Widget/updateAlignment:method\"}}{{/crossLink}} manually.\n * !#zh\n * Widget 组件用于设置和适配其相对于父节点的边距Widget 通常被用于 UI 界面,也可以用于其他地方。\n * Widget 会自动调整当前节点的坐标和宽高,不过目前调整后的结果要到下一帧才能在脚本里获取到,除非你先手动调用 {{#crossLink \"Widget/updateAlignment:method\"}}{{/crossLink}}。\n *\n * @class Widget\n * @extends Component\n */\nvar Widget = cc.Class({\n name: 'cc.Widget', extends: require('./CCComponent'),\n\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.ui/Widget',\n help: 'i18n:COMPONENT.help_url.widget',\n inspector: 'packages://inspector/inspectors/comps/ccwidget.js',\n executeInEditMode: true,\n disallowMultiple: true,\n },\n\n properties: {\n\n /**\n * !#en Specifies an alignment target that can only be one of the parent nodes of the current node.\n * The default value is null, and when null, indicates the current parent.\n * !#zh 指定一个对齐目标,只能是当前节点的其中一个父节点,默认为空,为空时表示当前父节点。\n * @property {Node} target\n * @default null\n */\n target: {\n get: function () {\n return this._target;\n },\n set: function (value) {\n this._target = value;\n if (CC_EDITOR && !cc.engine._isPlaying && this.node._parent) {\n // adjust the offsets to keep the size and position unchanged after target chagned\n WidgetManager.updateOffsetsToStayPut(this);\n }\n },\n type: cc.Node,\n tooltip: CC_DEV && 'i18n:COMPONENT.widget.target',\n },\n\n // ENABLE ALIGN ?\n\n /**\n * !#en Whether to align the top.\n * !#zh 是否对齐上边。\n * @property isAlignTop\n * @type {Boolean}\n * @default false\n */\n isAlignTop: {\n get: function () {\n return (this._alignFlags & TOP) > 0;\n },\n set: function (value) {\n this._setAlign(TOP, value);\n },\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.widget.align_top',\n },\n\n /**\n * !#en\n * Vertically aligns the midpoint, This will open the other vertical alignment options cancel.\n * !#zh\n * 是否垂直方向对齐中点,开启此项会将垂直方向其他对齐选项取消。\n * @property isAlignVerticalCenter\n * @type {Boolean}\n * @default false\n */\n isAlignVerticalCenter: {\n get: function () {\n return (this._alignFlags & MID) > 0;\n },\n set: function (value) {\n if (value) {\n this.isAlignTop = false;\n this.isAlignBottom = false;\n this._alignFlags |= MID;\n }\n else {\n this._alignFlags &= ~MID;\n }\n },\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.widget.align_v_center',\n },\n\n /**\n * !#en Whether to align the bottom.\n * !#zh 是否对齐下边。\n * @property isAlignBottom\n * @type {Boolean}\n * @default false\n */\n isAlignBottom: {\n get: function () {\n return (this._alignFlags & BOT) > 0;\n },\n set: function (value) {\n this._setAlign(BOT, value);\n },\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.widget.align_bottom',\n },\n\n /**\n * !#en Whether to align the left.\n * !#zh 是否对齐左边\n * @property isAlignLeft\n * @type {Boolean}\n * @default false\n */\n isAlignLeft: {\n get: function () {\n return (this._alignFlags & LEFT) > 0;\n },\n set: function (value) {\n this._setAlign(LEFT, value);\n },\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.widget.align_left',\n },\n\n /**\n * !#en\n * Horizontal aligns the midpoint. This will open the other horizontal alignment options canceled.\n * !#zh\n * 是否水平方向对齐中点,开启此选项会将水平方向其他对齐选项取消。\n * @property isAlignHorizontalCenter\n * @type {Boolean}\n * @default false\n */\n isAlignHorizontalCenter: {\n get: function () {\n return (this._alignFlags & CENTER) > 0;\n },\n set: function (value) {\n if (value) {\n this.isAlignLeft = false;\n this.isAlignRight = false;\n this._alignFlags |= CENTER;\n }\n else {\n this._alignFlags &= ~CENTER;\n }\n },\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.widget.align_h_center',\n },\n\n /**\n * !#en Whether to align the right.\n * !#zh 是否对齐右边。\n * @property isAlignRight\n * @type {Boolean}\n * @default false\n */\n isAlignRight: {\n get: function () {\n return (this._alignFlags & RIGHT) > 0;\n },\n set: function (value) {\n this._setAlign(RIGHT, value);\n },\n animatable: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.widget.align_right',\n },\n\n /**\n * !#en\n * Whether the stretched horizontally, when enable the left and right alignment will be stretched horizontally,\n * the width setting is invalid (read only).\n * !#zh\n * 当前是否水平拉伸。当同时启用左右对齐时,节点将会被水平拉伸,此时节点的宽度只读。\n * @property isStretchWidth\n * @type {Boolean}\n * @default false\n * @readOnly\n */\n isStretchWidth: {\n get: function () {\n return (this._alignFlags & LEFT_RIGHT) === LEFT_RIGHT;\n },\n visible: false\n },\n /**\n * !#en\n * Whether the stretched vertically, when enable the left and right alignment will be stretched vertically,\n * then height setting is invalid (read only)\n * !#zh\n * 当前是否垂直拉伸。当同时启用上下对齐时,节点将会被垂直拉伸,此时节点的高度只读。\n * @property isStretchHeight\n * @type {Boolean}\n * @default false\n * @readOnly\n */\n isStretchHeight: {\n get: function () {\n return (this._alignFlags & TOP_BOT) === TOP_BOT;\n },\n visible: false\n },\n\n // ALIGN MARGINS\n\n /**\n * !#en\n * The margins between the top of this node and the top of parent node,\n * the value can be negative, Only available in 'isAlignTop' open.\n * !#zh\n * 本节点顶边和父节点顶边的距离,可填写负值,只有在 isAlignTop 开启时才有作用。\n * @property top\n * @type {Number}\n * @default 0\n */\n top: {\n get: function () {\n return this._top;\n },\n set: function (value) {\n this._top = value;\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.widget.top',\n },\n\n /**\n * !#en\n * The margins between the bottom of this node and the bottom of parent node,\n * the value can be negative, Only available in 'isAlignBottom' open.\n * !#zh\n * 本节点底边和父节点底边的距离,可填写负值,只有在 isAlignBottom 开启时才有作用。\n * @property bottom\n * @type {Number}\n * @default 0\n */\n bottom: {\n get: function () {\n return this._bottom;\n },\n set: function (value) {\n this._bottom = value;\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.widget.bottom',\n },\n\n /**\n * !#en\n * The margins between the left of this node and the left of parent node,\n * the value can be negative, Only available in 'isAlignLeft' open.\n * !#zh\n * 本节点左边和父节点左边的距离,可填写负值,只有在 isAlignLeft 开启时才有作用。\n * @property left\n * @type {Number}\n * @default 0\n */\n left: {\n get: function () {\n return this._left;\n },\n set: function (value) {\n this._left = value;\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.widget.left',\n },\n\n /**\n * !#en\n * The margins between the right of this node and the right of parent node,\n * the value can be negative, Only available in 'isAlignRight' open.\n * !#zh\n * 本节点右边和父节点右边的距离,可填写负值,只有在 isAlignRight 开启时才有作用。\n * @property right\n * @type {Number}\n * @default 0\n */\n right: {\n get: function () {\n return this._right;\n },\n set: function (value) {\n this._right = value;\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.widget.right',\n },\n\n /**\n * !#en\n * Horizontal aligns the midpoint offset value,\n * the value can be negative, Only available in 'isAlignHorizontalCenter' open.\n * !#zh 水平居中的偏移值,可填写负值,只有在 isAlignHorizontalCenter 开启时才有作用。\n * @property horizontalCenter\n * @type {Number}\n * @default 0\n */\n horizontalCenter: {\n get: function () {\n return this._horizontalCenter;\n },\n set: function (value) {\n this._horizontalCenter = value;\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.widget.horizontal_center',\n },\n\n /**\n * !#en\n * Vertical aligns the midpoint offset value,\n * the value can be negative, Only available in 'isAlignVerticalCenter' open.\n * !#zh 垂直居中的偏移值,可填写负值,只有在 isAlignVerticalCenter 开启时才有作用。\n * @property verticalCenter\n * @type {Number}\n * @default 0\n */\n verticalCenter: {\n get: function () {\n return this._verticalCenter;\n },\n set: function (value) {\n this._verticalCenter = value;\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.widget.vertical_center',\n },\n\n // PARCENTAGE OR ABSOLUTE\n\n /**\n * !#en If true, horizontalCenter is pixel margin, otherwise is percentage (0 - 1) margin.\n * !#zh 如果为 true\"horizontalCenter\" 将会以像素作为偏移值反之为百分比0 到 1。\n * @property isAbsoluteHorizontalCenter\n * @type {Boolean}\n * @default true\n */\n isAbsoluteHorizontalCenter: {\n get: function () {\n return this._isAbsHorizontalCenter;\n },\n set: function (value) {\n this._isAbsHorizontalCenter = value;\n },\n animatable: false\n },\n\n /**\n * !#en If true, verticalCenter is pixel margin, otherwise is percentage (0 - 1) margin.\n * !#zh 如果为 true\"verticalCenter\" 将会以像素作为偏移值反之为百分比0 到 1。\n * @property isAbsoluteVerticalCenter\n * @type {Boolean}\n * @default true\n */\n isAbsoluteVerticalCenter: {\n get: function () {\n return this._isAbsVerticalCenter;\n },\n set: function (value) {\n this._isAbsVerticalCenter = value;\n },\n animatable: false\n },\n\n /**\n * !#en\n * If true, top is pixel margin, otherwise is percentage (0 - 1) margin relative to the parent's height.\n * !#zh\n * 如果为 true\"top\" 将会以像素作为边距否则将会以相对父物体高度的百分比0 到 1作为边距。\n * @property isAbsoluteTop\n * @type {Boolean}\n * @default true\n */\n isAbsoluteTop: {\n get: function () {\n return this._isAbsTop;\n },\n set: function (value) {\n this._isAbsTop = value;\n },\n animatable: false\n },\n\n /**\n * !#en\n * If true, bottom is pixel margin, otherwise is percentage (0 - 1) margin relative to the parent's height.\n * !#zh\n * 如果为 true\"bottom\" 将会以像素作为边距否则将会以相对父物体高度的百分比0 到 1作为边距。\n * @property isAbsoluteBottom\n * @type {Boolean}\n * @default true\n */\n isAbsoluteBottom: {\n get: function () {\n return this._isAbsBottom;\n },\n set: function (value) {\n this._isAbsBottom = value;\n },\n animatable: false\n },\n\n /**\n * !#en\n * If true, left is pixel margin, otherwise is percentage (0 - 1) margin relative to the parent's width.\n * !#zh\n * 如果为 true\"left\" 将会以像素作为边距否则将会以相对父物体宽度的百分比0 到 1作为边距。\n * @property isAbsoluteLeft\n * @type {Boolean}\n * @default true\n */\n isAbsoluteLeft: {\n get: function () {\n return this._isAbsLeft;\n },\n set: function (value) {\n this._isAbsLeft = value;\n },\n animatable: false\n },\n\n /**\n * !#en\n * If true, right is pixel margin, otherwise is percentage (0 - 1) margin relative to the parent's width.\n * !#zh\n * 如果为 true\"right\" 将会以像素作为边距否则将会以相对父物体宽度的百分比0 到 1作为边距。\n * @property isAbsoluteRight\n * @type {Boolean}\n * @default true\n */\n isAbsoluteRight: {\n get: function () {\n return this._isAbsRight;\n },\n set: function (value) {\n this._isAbsRight = value;\n },\n animatable: false\n },\n\n /**\n * !#en Specifies the alignment mode of the Widget, which determines when the widget should refresh.\n * !#zh 指定 Widget 的对齐模式,用于决定 Widget 应该何时刷新。\n * @property {Widget.AlignMode} alignMode\n * @example\n * widget.alignMode = cc.Widget.AlignMode.ON_WINDOW_RESIZE;\n */\n alignMode: {\n default: AlignMode.ON_WINDOW_RESIZE,\n type: AlignMode,\n tooltip: CC_DEV && 'i18n:COMPONENT.widget.align_mode',\n },\n\n //\n\n _wasAlignOnce: {\n default: undefined,\n formerlySerializedAs: 'isAlignOnce',\n },\n\n _target: null,\n\n /**\n * !#zh: 对齐开关,由 AlignFlags 组成\n *\n * @property _alignFlags\n * @type {Number}\n * @default 0\n * @private\n */\n _alignFlags: 0,\n\n _left: 0,\n _right: 0,\n _top: 0,\n _bottom: 0,\n _verticalCenter: 0,\n _horizontalCenter: 0,\n _isAbsLeft: true,\n _isAbsRight: true,\n _isAbsTop: true,\n _isAbsBottom: true,\n _isAbsHorizontalCenter: true,\n _isAbsVerticalCenter: true,\n\n // original size before align\n _originalWidth: 0,\n _originalHeight: 0\n },\n\n statics: {\n AlignMode: AlignMode,\n },\n\n onLoad: function () {\n if (this._wasAlignOnce !== undefined) {\n // migrate for old version\n this.alignMode = this._wasAlignOnce ? AlignMode.ONCE : AlignMode.ALWAYS;\n this._wasAlignOnce = undefined;\n }\n },\n\n onEnable: function () {\n WidgetManager.add(this);\n },\n\n onDisable: function () {\n WidgetManager.remove(this);\n },\n\n _validateTargetInDEV: CC_DEV && function () {\n var target = this._target;\n if (target) {\n var isParent = this.node !== target && this.node.isChildOf(target);\n if (!isParent) {\n cc.errorID(6500);\n this._target = null;\n }\n }\n\n },\n\n _setAlign: function (flag, isAlign) {\n var current = (this._alignFlags & flag) > 0;\n if (isAlign === current) {\n return;\n }\n var isHorizontal = (flag & LEFT_RIGHT) > 0;\n if (isAlign) {\n this._alignFlags |= flag;\n\n if (isHorizontal) {\n this.isAlignHorizontalCenter = false;\n if (this.isStretchWidth) {\n // become stretch\n this._originalWidth = this.node.width;\n // test check conflict\n if (CC_EDITOR && !cc.engine.isPlaying) {\n _Scene.DetectConflict.checkConflict_Widget(this);\n }\n }\n }\n else {\n this.isAlignVerticalCenter = false;\n if (this.isStretchHeight) {\n // become stretch\n this._originalHeight = this.node.height;\n // test check conflict\n if (CC_EDITOR && !cc.engine.isPlaying) {\n _Scene.DetectConflict.checkConflict_Widget(this);\n }\n }\n }\n\n if (CC_EDITOR && !cc.engine._isPlaying && this.node._parent) {\n // adjust the offsets to keep the size and position unchanged after alignment chagned\n WidgetManager.updateOffsetsToStayPut(this, flag);\n }\n }\n else {\n if (isHorizontal) {\n if (this.isStretchWidth) {\n // will cancel stretch\n this.node.width = this._originalWidth;\n }\n }\n else {\n if (this.isStretchHeight) {\n // will cancel stretch\n this.node.height = this._originalHeight;\n }\n }\n\n this._alignFlags &= ~flag;\n }\n },\n\n /**\n * !#en\n * Immediately perform the widget alignment. You need to manually call this method only if\n * you need to get the latest results after the alignment before the end of current frame.\n * !#zh\n * 立刻执行 widget 对齐操作。这个接口一般不需要手工调用。\n * 只有当你需要在当前帧结束前获得 widget 对齐后的最新结果时才需要手动调用这个方法。\n *\n * @method updateAlignment\n *\n * @example\n * widget.top = 10; // change top margin\n * cc.log(widget.node.y); // not yet changed\n * widget.updateAlignment();\n * cc.log(widget.node.y); // changed\n */\n updateAlignment: function () {\n WidgetManager.updateAlignment(this.node);\n },\n});\n\n/**\n * !#en\n * When turned on, it will only be aligned once at the end of the onEnable frame,\n * then immediately disables the current component.\n * This will allow the script or animation to continue controlling the current node.\n * Note: It will still be aligned at the frame when onEnable is called.\n * !#zh\n * 开启后仅会在 onEnable 的当帧结束时对齐一次,然后立刻禁用当前组件。\n * 这样便于脚本或动画继续控制当前节点。\n * 注意onEnable 时所在的那一帧仍然会进行对齐。\n * @property {Boolean} isAlignOnce\n * @default false\n * @deprecated\n */\nObject.defineProperty(Widget.prototype, 'isAlignOnce', {\n get () {\n if (CC_DEBUG) {\n cc.warn('`widget.isAlignOnce` is deprecated, use `widget.alignMode === cc.Widget.AlignMode.ONCE` instead please.');\n }\n return this.alignMode === AlignMode.ONCE;\n },\n set (value) {\n if (CC_DEBUG) {\n cc.warn('`widget.isAlignOnce` is deprecated, use `widget.alignMode = cc.Widget.AlignMode.*` instead please.');\n }\n this.alignMode = value ? AlignMode.ONCE : AlignMode.ALWAYS;\n }\n});\n\n\ncc.Widget = module.exports = Widget;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nrequire('./CCComponent');\nrequire('./CCComponentEventHandler');\nrequire('./missing-script');\n\n// In case subContextView modules are excluded\nlet SubContextView = require('./SubContextView');\nif (!SubContextView) {\n SubContextView = cc.Class({\n name: 'cc.SubContextView',\n extends: cc.Component,\n });\n cc.SubContextView = cc.WXSubContextView = cc.SwanSubContextView = SubContextView;\n}\n\nvar components = [\n require('./CCSprite'),\n require('./CCWidget'),\n require('./CCCanvas'),\n require('./CCAudioSource'),\n require('./CCAnimation'),\n require('./CCButton'),\n require('./CCLabel'),\n require('./CCProgressBar'),\n require('./CCMask'),\n require('./CCScrollBar'),\n require('./CCScrollView'),\n require('./CCPageViewIndicator'),\n require('./CCPageView'),\n require('./CCSlider'),\n require('./CCLayout'),\n require('./editbox/CCEditBox'),\n require('./CCLabelOutline'),\n require('./CCLabelShadow'),\n require('./CCRichText'),\n require('./CCToggleContainer'),\n require('./CCToggleGroup'),\n require('./CCToggle'),\n require('./CCBlockInputEvents'),\n require('./CCMotionStreak'),\n require('./CCSafeArea'),\n SubContextView,\n];\n\nmodule.exports = components;","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar js = cc.js;\n\n/*\n * A temp fallback to contain the original serialized data which can not be loaded.\n * Deserialized as a component by default.\n */\nvar MissingScript = cc.Class({\n name: 'cc.MissingScript', \n extends: cc.Component,\n editor: {\n inspector: 'packages://inspector/inspectors/comps/missing-script.js',\n },\n properties: {\n //_scriptUuid: {\n // get: function () {\n // var id = this._$erialized.__type__;\n // if (Editor.Utils.UuidUtils.isUuid(id)) {\n // return Editor.Utils.UuidUtils.decompressUuid(id);\n // }\n // return '';\n // },\n // set: function (value) {\n // if ( !sandbox.compiled ) {\n // cc.error('Scripts not yet compiled, please fix script errors and compile first.');\n // return;\n // }\n // if (value && Editor.Utils.UuidUtils.isUuid(value._uuid)) {\n // var classId = Editor.Utils.UuidUtils.compressUuid(value);\n // if (cc.js._getClassById(classId)) {\n // this._$erialized.__type__ = classId;\n // Editor.Ipc.sendToWins('reload:window-scripts', sandbox.compiled);\n // }\n // else {\n // cc.error('Can not find a component in the script which uuid is \"%s\".', value);\n // }\n // }\n // else {\n // cc.error('invalid script');\n // }\n // }\n //},\n compiled: {\n default: false,\n serializable: false\n },\n // the serialized data for original script object\n _$erialized: {\n default: null,\n visible: false,\n editorOnly: true\n }\n },\n ctor: CC_EDITOR && function () {\n this.compiled = _Scene.Sandbox.compiled;\n },\n statics: {\n /*\n * @param {string} id\n * @return {function} constructor\n */\n safeFindClass: function (id) {\n var cls = js._getClassById(id);\n if (cls) {\n return cls;\n }\n cc.deserialize.reportMissingClass(id);\n return MissingScript;\n },\n },\n onLoad: function () {\n cc.warnID(4600, this.node.name);\n }\n});\n\ncc._MissingScript = module.exports = MissingScript;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar js = cc.js;\n\nrequire('../event/event');\n\n/**\n * !#en The mouse event\n * !#zh 鼠标事件类型\n * @class Event.EventMouse\n *\n * @extends Event\n * @param {Number} eventType - The mouse event type, UP, DOWN, MOVE, CANCELED\n * @param {Boolean} [bubbles=false] - A boolean indicating whether the event bubbles up through the tree or not\n */\nvar EventMouse = function (eventType, bubbles) {\n cc.Event.call(this, cc.Event.MOUSE, bubbles);\n this._eventType = eventType;\n this._button = 0;\n this._x = 0;\n this._y = 0;\n this._prevX = 0;\n this._prevY = 0;\n this._scrollX = 0;\n this._scrollY = 0;\n};\n\njs.extend(EventMouse, cc.Event);\nvar proto = EventMouse.prototype;\n\n/**\n * !#en Sets scroll data.\n * !#zh 设置鼠标的滚动数据。\n * @method setScrollData\n * @param {Number} scrollX\n * @param {Number} scrollY\n */\nproto.setScrollData = function (scrollX, scrollY) {\n this._scrollX = scrollX;\n this._scrollY = scrollY;\n};\n\n/**\n * !#en Returns the x axis scroll value.\n * !#zh 获取鼠标滚动的X轴距离只有滚动时才有效。\n * @method getScrollX\n * @returns {Number}\n */\nproto.getScrollX = function () {\n return this._scrollX;\n};\n\n/**\n * !#en Returns the y axis scroll value.\n * !#zh 获取滚轮滚动的 Y 轴距离,只有滚动时才有效。\n * @method getScrollY\n * @returns {Number}\n */\nproto.getScrollY = function () {\n return this._scrollY;\n};\n\n/**\n * !#en Sets cursor location.\n * !#zh 设置当前鼠标位置。\n * @method setLocation\n * @param {Number} x\n * @param {Number} y\n */\nproto.setLocation = function (x, y) {\n this._x = x;\n this._y = y;\n};\n\n/**\n * !#en Returns cursor location.\n * !#zh 获取鼠标位置对象,对象包含 x 和 y 属性。\n * @method getLocation\n * @return {Vec2} location\n */\nproto.getLocation = function () {\n return cc.v2(this._x, this._y);\n};\n\n/**\n * !#en Returns the current cursor location in screen coordinates.\n * !#zh 获取当前事件在游戏窗口内的坐标位置对象,对象包含 x 和 y 属性。\n * @method getLocationInView\n * @return {Vec2}\n */\nproto.getLocationInView = function() {\n return cc.v2(this._x, cc.view._designResolutionSize.height - this._y);\n};\n\nproto._setPrevCursor = function (x, y) {\n this._prevX = x;\n this._prevY = y;\n};\n\n/**\n * !#en Returns the previous touch location.\n * !#zh 获取鼠标点击在上一次事件时的位置对象,对象包含 x 和 y 属性。\n * @method getPreviousLocation\n * @return {Vec2}\n */\nproto.getPreviousLocation = function () {\n return cc.v2(this._prevX, this._prevY);\n};\n\n/**\n * !#en Returns the delta distance from the previous location to current location.\n * !#zh 获取鼠标距离上一次事件移动的距离对象,对象包含 x 和 y 属性。\n * @method getDelta\n * @return {Vec2}\n */\nproto.getDelta = function () {\n return cc.v2(this._x - this._prevX, this._y - this._prevY);\n};\n\n/**\n * !#en Returns the X axis delta distance from the previous location to current location.\n * !#zh 获取鼠标距离上一次事件移动的 X 轴距离。\n * @method getDeltaX\n * @return {Number}\n */\nproto.getDeltaX = function () {\n return this._x - this._prevX;\n};\n\n/**\n * !#en Returns the Y axis delta distance from the previous location to current location.\n * !#zh 获取鼠标距离上一次事件移动的 Y 轴距离。\n * @method getDeltaY\n * @return {Number}\n */\nproto.getDeltaY = function () {\n return this._y - this._prevY;\n};\n\n/**\n * !#en Sets mouse button.\n * !#zh 设置鼠标按键。\n * @method setButton\n * @param {Number} button\n */\nproto.setButton = function (button) {\n this._button = button;\n};\n\n/**\n * !#en Returns mouse button.\n * !#zh 获取鼠标按键。\n * @method getButton\n * @returns {Number}\n */\nproto.getButton = function () {\n return this._button;\n};\n\n/**\n * !#en Returns location X axis data.\n * !#zh 获取鼠标当前位置 X 轴。\n * @method getLocationX\n * @returns {Number}\n */\nproto.getLocationX = function () {\n return this._x;\n};\n\n/**\n * !#en Returns location Y axis data.\n * !#zh 获取鼠标当前位置 Y 轴。\n * @method getLocationY\n * @returns {Number}\n */\nproto.getLocationY = function () {\n return this._y;\n};\n\n//Inner event types of MouseEvent\n/**\n * !#en The none event code of mouse event.\n * !#zh 无。\n * @property NONE\n * @static\n * @type {Number}\n */\nEventMouse.NONE = 0;\n/**\n * !#en The event type code of mouse down event.\n * !#zh 鼠标按下事件。\n * @property DOWN\n * @static\n * @type {Number}\n */\nEventMouse.DOWN = 1;\n/**\n * !#en The event type code of mouse up event.\n * !#zh 鼠标按下后释放事件。\n * @property UP\n * @static\n * @type {Number}\n */\nEventMouse.UP = 2;\n/**\n * !#en The event type code of mouse move event.\n * !#zh 鼠标移动事件。\n * @property MOVE\n * @static\n * @type {Number}\n */\nEventMouse.MOVE = 3;\n/**\n * !#en The event type code of mouse scroll event.\n * !#zh 鼠标滚轮事件。\n * @property SCROLL\n * @static\n * @type {Number}\n */\nEventMouse.SCROLL = 4;\n\n/**\n * !#en The tag of Mouse left button.\n * !#zh 鼠标左键的标签。\n * @property BUTTON_LEFT\n * @static\n * @type {Number}\n */\nEventMouse.BUTTON_LEFT = 0;\n\n/**\n * !#en The tag of Mouse right button (The right button number is 2 on browser).\n * !#zh 鼠标右键的标签。\n * @property BUTTON_RIGHT\n * @static\n * @type {Number}\n */\nEventMouse.BUTTON_RIGHT = 2;\n\n/**\n * !#en The tag of Mouse middle button (The right button number is 1 on browser).\n * !#zh 鼠标中键的标签。\n * @property BUTTON_MIDDLE\n * @static\n * @type {Number}\n */\nEventMouse.BUTTON_MIDDLE = 1;\n\n/**\n * !#en The tag of Mouse button 4.\n * !#zh 鼠标按键 4 的标签。\n * @property BUTTON_4\n * @static\n * @type {Number}\n */\nEventMouse.BUTTON_4 = 3;\n\n/**\n * !#en The tag of Mouse button 5.\n * !#zh 鼠标按键 5 的标签。\n * @property BUTTON_5\n * @static\n * @type {Number}\n */\nEventMouse.BUTTON_5 = 4;\n\n/**\n * !#en The tag of Mouse button 6.\n * !#zh 鼠标按键 6 的标签。\n * @property BUTTON_6\n * @static\n * @type {Number}\n */\nEventMouse.BUTTON_6 = 5;\n\n/**\n * !#en The tag of Mouse button 7.\n * !#zh 鼠标按键 7 的标签。\n * @property BUTTON_7\n * @static\n * @type {Number}\n */\nEventMouse.BUTTON_7 = 6;\n\n/**\n * !#en The tag of Mouse button 8.\n * !#zh 鼠标按键 8 的标签。\n * @property BUTTON_8\n * @static\n * @type {Number}\n */\nEventMouse.BUTTON_8 = 7;\n\n/**\n * !#en The touch event\n * !#zh 触摸事件\n * @class Event.EventTouch\n * @constructor\n * @extends Event\n */\n/**\n * @method constructor\n * @param {Array} touchArr - The array of the touches\n * @param {Boolean} bubbles - A boolean indicating whether the event bubbles up through the tree or not\n */\nvar EventTouch = function (touchArr, bubbles) {\n cc.Event.call(this, cc.Event.TOUCH, bubbles);\n this._eventCode = 0;\n this._touches = touchArr || [];\n /**\n * !#en The current touch object\n * !#zh 当前触点对象\n * @property touch\n * @type {Touch}\n */\n this.touch = null;\n // Actually duplicated, because of history issue, currentTouch was in the original design, touch was added in creator engine\n // They should point to the same object\n this.currentTouch = null;\n};\n\njs.extend(EventTouch, cc.Event);\nproto = EventTouch.prototype;\n\n/**\n * !#en Returns event code.\n * !#zh 获取事件类型。\n * @method getEventCode\n * @returns {Number}\n */\nproto.getEventCode = function () {\n return this._eventCode;\n};\n\n/**\n * !#en Returns touches of event.\n * !#zh 获取触摸点的列表。\n * @method getTouches\n * @returns {Array}\n */\nproto.getTouches = function () {\n return this._touches;\n};\n\nproto._setEventCode = function (eventCode) {\n this._eventCode = eventCode;\n};\n\nproto._setTouches = function (touches) {\n this._touches = touches;\n};\n\n/**\n * !#en Sets touch location.\n * !#zh 设置当前触点位置\n * @method setLocation\n * @param {Number} x\n * @param {Number} y\n */\nproto.setLocation = function (x, y) {\n this.touch && this.touch.setTouchInfo(this.touch.getID(), x, y);\n};\n\n/**\n * !#en Returns touch location.\n * !#zh 获取触点位置。\n * @method getLocation\n * @return {Vec2} location\n */\nproto.getLocation = function () {\n return this.touch ? this.touch.getLocation() : cc.v2();\n};\n\n/**\n * !#en Returns the current touch location in screen coordinates.\n * !#zh 获取当前触点在游戏窗口中的位置。\n * @method getLocationInView\n * @return {Vec2}\n */\nproto.getLocationInView = function() {\n return this.touch ? this.touch.getLocationInView() : cc.v2();\n};\n\n/**\n * !#en Returns the previous touch location.\n * !#zh 获取触点在上一次事件时的位置对象,对象包含 x 和 y 属性。\n * @method getPreviousLocation\n * @return {Vec2}\n */\nproto.getPreviousLocation = function () {\n return this.touch ? this.touch.getPreviousLocation() : cc.v2();\n};\n\n/**\n * !#en Returns the start touch location.\n * !#zh 获取触点落下时的位置对象,对象包含 x 和 y 属性。\n * @method getStartLocation\n * @returns {Vec2}\n */\nproto.getStartLocation = function() {\n return this.touch ? this.touch.getStartLocation() : cc.v2();\n};\n\n/**\n * !#en Returns the id of cc.Touch.\n * !#zh 触点的标识 ID可以用来在多点触摸中跟踪触点。\n * @method getID\n * @return {Number}\n */\nproto.getID = function () {\n return this.touch ? this.touch.getID() : null;\n};\n\n/**\n * !#en Returns the delta distance from the previous location to current location.\n * !#zh 获取触点距离上一次事件移动的距离对象,对象包含 x 和 y 属性。\n * @method getDelta\n * @return {Vec2}\n */\nproto.getDelta = function () {\n return this.touch ? this.touch.getDelta() : cc.v2();\n};\n\n/**\n * !#en Returns the X axis delta distance from the previous location to current location.\n * !#zh 获取触点距离上一次事件移动的 x 轴距离。\n * @method getDeltaX\n * @return {Number}\n */\nproto.getDeltaX = function () {\n return this.touch ? this.touch.getDelta().x : 0;\n};\n\n/**\n * !#en Returns the Y axis delta distance from the previous location to current location.\n * !#zh 获取触点距离上一次事件移动的 y 轴距离。\n * @method getDeltaY\n * @return {Number}\n */\nproto.getDeltaY = function () {\n return this.touch ? this.touch.getDelta().y : 0;\n};\n\n/**\n * !#en Returns location X axis data.\n * !#zh 获取当前触点 X 轴位置。\n * @method getLocationX\n * @returns {Number}\n */\nproto.getLocationX = function () {\n return this.touch ? this.touch.getLocationX() : 0;\n};\n\n/**\n * !#en Returns location Y axis data.\n * !#zh 获取当前触点 Y 轴位置。\n * @method getLocationY\n * @returns {Number}\n */\nproto.getLocationY = function () {\n return this.touch ? this.touch.getLocationY() : 0;\n};\n\n/**\n * !#en The maximum touch numbers\n * !#zh 最大触摸数量。\n * @constant\n * @type {Number}\n */\nEventTouch.MAX_TOUCHES = 5;\n\n/**\n * !#en The event type code of touch began event.\n * !#zh 开始触摸事件\n * @constant\n * @type {Number}\n */\nEventTouch.BEGAN = 0;\n/**\n * !#en The event type code of touch moved event.\n * !#zh 触摸后移动事件\n * @constant\n * @type {Number}\n */\nEventTouch.MOVED = 1;\n/**\n * !#en The event type code of touch ended event.\n * !#zh 结束触摸事件\n * @constant\n * @type {Number}\n */\nEventTouch.ENDED = 2;\n/**\n * !#en The event type code of touch cancelled event.\n * !#zh 取消触摸事件\n * @constant\n * @type {Number}\n */\nEventTouch.CANCELED = 3;\n\n/**\n * !#en The acceleration event\n * !#zh 加速度事件\n * @class Event.EventAcceleration\n * @extends Event\n *\n * @param {Object} acc - The acceleration\n * @param {Boolean} bubbles - A boolean indicating whether the event bubbles up through the tree or not\n */\nvar EventAcceleration = function (acc, bubbles) {\n cc.Event.call(this, cc.Event.ACCELERATION, bubbles);\n this.acc = acc;\n};\njs.extend(EventAcceleration, cc.Event);\n\n/**\n * !#en The keyboard event\n * !#zh 键盘事件\n * @class Event.EventKeyboard\n * @extends Event\n *\n * @param {Number} keyCode - The key code of which triggered this event\n * @param {Boolean} isPressed - A boolean indicating whether the key have been pressed\n * @param {Boolean} bubbles - A boolean indicating whether the event bubbles up through the tree or not\n */\nvar EventKeyboard = function (keyCode, isPressed, bubbles) {\n cc.Event.call(this, cc.Event.KEYBOARD, bubbles);\n /**\n * !#en\n * The keyCode read-only property represents a system and implementation dependent numerical code identifying the unmodified value of the pressed key.\n * This is usually the decimal ASCII (RFC 20) or Windows 1252 code corresponding to the key.\n * If the key can't be identified, this value is 0.\n *\n * !#zh\n * keyCode 是只读属性它表示一个系统和依赖于实现的数字代码,可以识别按键的未修改值。\n * 这通常是十进制 ASCII (RFC20) 或者 Windows 1252 代码,所对应的密钥。\n * 如果无法识别该键,则该值为 0。\n *\n * @property keyCode\n * @type {Number}\n */\n this.keyCode = keyCode;\n this.isPressed = isPressed;\n};\njs.extend(EventKeyboard, cc.Event);\n\ncc.Event.EventMouse = EventMouse;\ncc.Event.EventTouch = EventTouch;\ncc.Event.EventAcceleration = EventAcceleration;\ncc.Event.EventKeyboard = EventKeyboard;\n\nmodule.exports = cc.Event;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar js = require('../platform/js');\n\n/**\n * !#en\n * <p>\n * The base class of event listener. <br/>\n * If you need custom listener which with different callback, you need to inherit this class. <br/>\n * For instance, you could refer to EventListenerAcceleration, EventListenerKeyboard, <br/>\n * EventListenerTouchOneByOne, EventListenerCustom.\n * </p>\n *\n * !#zh\n * 封装用户的事件处理逻辑。\n * 注意:这是一个抽象类,开发者不应该直接实例化这个类,请参考 {{#crossLink \"EventListener/create:method\"}}cc.EventListener.create{{/crossLink}}。\n *\n * @class EventListener\n */\n\n/**\n * Constructor\n * @method constructor\n * @param {Number} type\n * @param {Number} listenerID\n * @param {Number} callback\n */\ncc.EventListener = function (type, listenerID, callback) {\n this._onEvent = callback; // Event callback function\n this._type = type || 0; // Event listener type\n this._listenerID = listenerID || \"\"; // Event listener ID\n this._registered = false; // Whether the listener has been added to dispatcher.\n\n this._fixedPriority = 0; // The higher the number, the higher the priority, 0 is for scene graph base priority.\n this._node = null; // scene graph based priority\n this._target = null;\n this._paused = true; // Whether the listener is paused\n this._isEnabled = true; // Whether the listener is enabled\n};\n\ncc.EventListener.prototype = {\n constructor: cc.EventListener,\n /*\n * <p>\n * Sets paused state for the listener\n * The paused state is only used for scene graph priority listeners.\n * `EventDispatcher::resumeAllEventListenersForTarget(node)` will set the paused state to `true`,\n * while `EventDispatcher::pauseAllEventListenersForTarget(node)` will set it to `false`.\n * @note 1) Fixed priority listeners will never get paused. If a fixed priority doesn't want to receive events,\n * call `setEnabled(false)` instead.\n * 2) In `Node`'s onEnter and onExit, the `paused state` of the listeners which associated with that node will be automatically updated.\n * </p>\n * @param {Boolean} paused\n * @private\n */\n _setPaused: function (paused) {\n this._paused = paused;\n },\n\n /*\n * Checks whether the listener is paused.\n * @returns {Boolean}\n * @private\n */\n _isPaused: function () {\n return this._paused;\n },\n\n /*\n * Marks the listener was registered by EventDispatcher.\n * @param {Boolean} registered\n * @private\n */\n _setRegistered: function (registered) {\n this._registered = registered;\n },\n\n /*\n * Checks whether the listener was registered by EventDispatcher\n * @returns {Boolean}\n * @private\n */\n _isRegistered: function () {\n return this._registered;\n },\n\n /*\n * Gets the type of this listener\n * @note It's different from `EventType`, e.g. TouchEvent has two kinds of event listeners - EventListenerOneByOne, EventListenerAllAtOnce\n * @returns {Number}\n * @private\n */\n _getType: function () {\n return this._type;\n },\n\n /*\n * Gets the listener ID of this listener\n * When event is being dispatched, listener ID is used as key for searching listeners according to event type.\n * @returns {String}\n * @private\n */\n _getListenerID: function () {\n return this._listenerID;\n },\n\n /*\n * Sets the fixed priority for this listener\n * @note This method is only used for `fixed priority listeners`, it needs to access a non-zero value. 0 is reserved for scene graph priority listeners\n * @param {Number} fixedPriority\n * @private\n */\n _setFixedPriority: function (fixedPriority) {\n this._fixedPriority = fixedPriority;\n },\n\n /*\n * Gets the fixed priority of this listener\n * @returns {Number} 0 if it's a scene graph priority listener, non-zero for fixed priority listener\n * @private\n */\n _getFixedPriority: function () {\n return this._fixedPriority;\n },\n\n /*\n * Sets scene graph priority for this listener\n * @param {cc.Node} node\n * @private\n */\n _setSceneGraphPriority: function (node) {\n this._target = node;\n this._node = node;\n },\n\n /*\n * Gets scene graph priority of this listener\n * @returns {cc.Node} if it's a fixed priority listener, non-null for scene graph priority listener\n * @private\n */\n _getSceneGraphPriority: function () {\n return this._node;\n },\n\n /**\n * !#en Checks whether the listener is available.\n * !#zh 检测监听器是否有效\n * @method checkAvailable\n * @returns {Boolean}\n */\n checkAvailable: function () {\n return this._onEvent !== null;\n },\n\n /**\n * !#en Clones the listener, its subclasses have to override this method.\n * !#zh 克隆监听器,它的子类必须重写此方法。\n * @method clone\n * @returns {EventListener}\n */\n clone: function () {\n return null;\n },\n\n /**\n * !#en Enables or disables the listener\n * !#zh 启用或禁用监听器。\n * @method setEnabled\n * @param {Boolean} enabled\n * @note Only listeners with `enabled` state will be able to receive events.\n * When an listener was initialized, it's enabled by default.\n * An event listener can receive events when it is enabled and is not paused.\n * paused state is always false when it is a fixed priority listener.\n */\n setEnabled: function(enabled){\n this._isEnabled = enabled;\n },\n\n /**\n * !#en Checks whether the listener is enabled\n * !#zh 检查监听器是否可用。\n * @method isEnabled\n * @returns {Boolean}\n */\n isEnabled: function(){\n return this._isEnabled;\n },\n\n /*\n * <p>Currently JavaScript Bindings (JSB), in some cases, needs to use retain and release. This is a bug in JSB,\n * and the ugly workaround is to use retain/release. So, these 2 methods were added to be compatible with JSB.\n * This is a hack, and should be removed once JSB fixes the retain/release bug<br/>\n * You will need to retain an object if you created a listener and haven't added it any target node during the same frame.<br/>\n * Otherwise, JSB's native autorelease pool will consider this object a useless one and release it directly,<br/>\n * when you want to use it later, a \"Invalid Native Object\" error will be raised.<br/>\n * The retain function can increase a reference count for the native object to avoid it being released,<br/>\n * you need to manually invoke release function when you think this object is no longer needed, otherwise, there will be memory learks.<br/>\n * retain and release function call should be paired in developer's game code.</p>\n *\n * @method retain\n * @see cc.EventListener#release\n */\n retain:function () {\n },\n /*\n * <p>Currently JavaScript Bindings (JSB), in some cases, needs to use retain and release. This is a bug in JSB,\n * and the ugly workaround is to use retain/release. So, these 2 methods were added to be compatible with JSB.\n * This is a hack, and should be removed once JSB fixes the retain/release bug<br/>\n * You will need to retain an object if you created a listener and haven't added it any target node during the same frame.<br/>\n * Otherwise, JSB's native autorelease pool will consider this object a useless one and release it directly,<br/>\n * when you want to use it later, a \"Invalid Native Object\" error will be raised.<br/>\n * The retain function can increase a reference count for the native object to avoid it being released,<br/>\n * you need to manually invoke release function when you think this object is no longer needed, otherwise, there will be memory learks.<br/>\n * retain and release function call should be paired in developer's game code.</p>\n *\n * @method release\n * @see cc.EventListener#retain\n */\n release:function () {\n }\n};\n\n// event listener type\n/**\n * !#en The type code of unknown event listener.\n * !#zh 未知的事件监听器类型\n * @property UNKNOWN\n * @type {Number}\n * @static\n */\ncc.EventListener.UNKNOWN = 0;\n/*\n * !#en The type code of one by one touch event listener.\n * !#zh 触摸事件监听器类型,触点会一个一个得分开被派发\n * @property TOUCH_ONE_BY_ONE\n * @type {Number}\n * @static\n */\ncc.EventListener.TOUCH_ONE_BY_ONE = 1;\n/*\n * !#en The type code of all at once touch event listener.\n * !#zh 触摸事件监听器类型,触点会被一次性全部派发\n * @property TOUCH_ALL_AT_ONCE\n * @type {Number}\n * @static\n */\ncc.EventListener.TOUCH_ALL_AT_ONCE = 2;\n/**\n * !#en The type code of keyboard event listener.\n * !#zh 键盘事件监听器类型\n * @property KEYBOARD\n * @type {Number}\n * @static\n */\ncc.EventListener.KEYBOARD = 3;\n/*\n * !#en The type code of mouse event listener.\n * !#zh 鼠标事件监听器类型\n * @property MOUSE\n * @type {Number}\n * @static\n */\ncc.EventListener.MOUSE = 4;\n/**\n * !#en The type code of acceleration event listener.\n * !#zh 加速器事件监听器类型\n * @property ACCELERATION\n * @type {Number}\n * @static\n */\ncc.EventListener.ACCELERATION = 6;\n/*\n * !#en The type code of custom event listener.\n * !#zh 自定义事件监听器类型\n * @property CUSTOM\n * @type {Number}\n * @static\n */\ncc.EventListener.CUSTOM = 8;\n\nvar ListenerID = cc.EventListener.ListenerID = {\n MOUSE: '__cc_mouse',\n TOUCH_ONE_BY_ONE: '__cc_touch_one_by_one',\n TOUCH_ALL_AT_ONCE: '__cc_touch_all_at_once',\n KEYBOARD: '__cc_keyboard',\n ACCELERATION: '__cc_acceleration',\n};\n\nvar Custom = function (listenerId, callback) {\n this._onCustomEvent = callback;\n cc.EventListener.call(this, cc.EventListener.CUSTOM, listenerId, this._callback);\n};\njs.extend(Custom, cc.EventListener);\njs.mixin(Custom.prototype, {\n _onCustomEvent: null,\n \n _callback: function (event) {\n if (this._onCustomEvent !== null)\n this._onCustomEvent(event);\n },\n\n checkAvailable: function () {\n return (cc.EventListener.prototype.checkAvailable.call(this) && this._onCustomEvent !== null);\n },\n\n clone: function () {\n return new Custom(this._listenerID, this._onCustomEvent);\n }\n});\n\nvar Mouse = function () {\n cc.EventListener.call(this, cc.EventListener.MOUSE, ListenerID.MOUSE, this._callback);\n};\njs.extend(Mouse, cc.EventListener);\njs.mixin(Mouse.prototype, {\n onMouseDown: null,\n onMouseUp: null,\n onMouseMove: null,\n onMouseScroll: null,\n\n _callback: function (event) {\n var eventType = cc.Event.EventMouse;\n switch (event._eventType) {\n case eventType.DOWN:\n if (this.onMouseDown)\n this.onMouseDown(event);\n break;\n case eventType.UP:\n if (this.onMouseUp)\n this.onMouseUp(event);\n break;\n case eventType.MOVE:\n if (this.onMouseMove)\n this.onMouseMove(event);\n break;\n case eventType.SCROLL:\n if (this.onMouseScroll)\n this.onMouseScroll(event);\n break;\n default:\n break;\n }\n },\n\n clone: function () {\n var eventListener = new Mouse();\n eventListener.onMouseDown = this.onMouseDown;\n eventListener.onMouseUp = this.onMouseUp;\n eventListener.onMouseMove = this.onMouseMove;\n eventListener.onMouseScroll = this.onMouseScroll;\n return eventListener;\n },\n\n checkAvailable: function () {\n return true;\n }\n});\n\nvar TouchOneByOne = function () {\n cc.EventListener.call(this, cc.EventListener.TOUCH_ONE_BY_ONE, ListenerID.TOUCH_ONE_BY_ONE, null);\n this._claimedTouches = [];\n};\njs.extend(TouchOneByOne, cc.EventListener);\njs.mixin(TouchOneByOne.prototype, {\n constructor: TouchOneByOne,\n _claimedTouches: null,\n swallowTouches: false,\n onTouchBegan: null,\n onTouchMoved: null,\n onTouchEnded: null,\n onTouchCancelled: null,\n\n setSwallowTouches: function (needSwallow) {\n this.swallowTouches = needSwallow;\n },\n\n isSwallowTouches: function(){\n return this.swallowTouches;\n },\n\n clone: function () {\n var eventListener = new TouchOneByOne();\n eventListener.onTouchBegan = this.onTouchBegan;\n eventListener.onTouchMoved = this.onTouchMoved;\n eventListener.onTouchEnded = this.onTouchEnded;\n eventListener.onTouchCancelled = this.onTouchCancelled;\n eventListener.swallowTouches = this.swallowTouches;\n return eventListener;\n },\n\n checkAvailable: function () {\n if(!this.onTouchBegan){\n cc.logID(1801);\n return false;\n }\n return true;\n }\n});\n\nvar TouchAllAtOnce = function () {\n cc.EventListener.call(this, cc.EventListener.TOUCH_ALL_AT_ONCE, ListenerID.TOUCH_ALL_AT_ONCE, null);\n};\njs.extend(TouchAllAtOnce, cc.EventListener);\njs.mixin(TouchAllAtOnce.prototype, {\n constructor: TouchAllAtOnce,\n onTouchesBegan: null,\n onTouchesMoved: null,\n onTouchesEnded: null,\n onTouchesCancelled: null,\n\n clone: function(){\n var eventListener = new TouchAllAtOnce();\n eventListener.onTouchesBegan = this.onTouchesBegan;\n eventListener.onTouchesMoved = this.onTouchesMoved;\n eventListener.onTouchesEnded = this.onTouchesEnded;\n eventListener.onTouchesCancelled = this.onTouchesCancelled;\n return eventListener;\n },\n\n checkAvailable: function(){\n if (this.onTouchesBegan === null && this.onTouchesMoved === null\n && this.onTouchesEnded === null && this.onTouchesCancelled === null) {\n cc.logID(1802);\n return false;\n }\n return true;\n }\n});\n\n//Acceleration\nvar Acceleration = function (callback) {\n this._onAccelerationEvent = callback;\n cc.EventListener.call(this, cc.EventListener.ACCELERATION, ListenerID.ACCELERATION, this._callback);\n};\njs.extend(Acceleration, cc.EventListener);\njs.mixin(Acceleration.prototype, {\n constructor: Acceleration,\n _onAccelerationEvent: null,\n\n _callback: function (event) {\n this._onAccelerationEvent(event.acc, event);\n },\n\n checkAvailable: function () {\n cc.assertID(this._onAccelerationEvent, 1803);\n\n return true;\n },\n\n clone: function () {\n return new Acceleration(this._onAccelerationEvent);\n }\n});\n\n\n//Keyboard\nvar Keyboard = function () {\n cc.EventListener.call(this, cc.EventListener.KEYBOARD, ListenerID.KEYBOARD, this._callback);\n};\njs.extend(Keyboard, cc.EventListener);\njs.mixin(Keyboard.prototype, {\n constructor: Keyboard,\n onKeyPressed: null,\n onKeyReleased: null,\n\n _callback: function (event) {\n if (event.isPressed) {\n if (this.onKeyPressed)\n this.onKeyPressed(event.keyCode, event);\n } else {\n if (this.onKeyReleased)\n this.onKeyReleased(event.keyCode, event);\n }\n },\n\n clone: function () {\n var eventListener = new Keyboard();\n eventListener.onKeyPressed = this.onKeyPressed;\n eventListener.onKeyReleased = this.onKeyReleased;\n return eventListener;\n },\n\n checkAvailable: function () {\n if (this.onKeyPressed === null && this.onKeyReleased === null) {\n cc.logID(1800);\n return false;\n }\n return true;\n }\n});\n\n/**\n * !#en\n * Create a EventListener object with configuration including the event type, handlers and other parameters.\n * In handlers, this refer to the event listener object itself.\n * You can also pass custom parameters in the configuration object,\n * all custom parameters will be polyfilled into the event listener object and can be accessed in handlers.\n * !#zh 通过指定不同的 Event 对象来设置想要创建的事件监听器。\n * @method create\n * @param {Object} argObj a json object\n * @returns {EventListener}\n * @static\n * @example {@link cocos2d/core/event-manager/CCEventListener/create.js}\n */\ncc.EventListener.create = function (argObj) {\n cc.assertID(argObj&&argObj.event, 1900);\n\n var listenerType = argObj.event;\n delete argObj.event;\n\n var listener = null;\n if(listenerType === cc.EventListener.TOUCH_ONE_BY_ONE)\n listener = new TouchOneByOne();\n else if(listenerType === cc.EventListener.TOUCH_ALL_AT_ONCE)\n listener = new TouchAllAtOnce();\n else if(listenerType === cc.EventListener.MOUSE)\n listener = new Mouse();\n else if(listenerType === cc.EventListener.CUSTOM){\n listener = new Custom(argObj.eventName, argObj.callback);\n delete argObj.eventName;\n delete argObj.callback;\n } else if(listenerType === cc.EventListener.KEYBOARD)\n listener = new Keyboard();\n else if(listenerType === cc.EventListener.ACCELERATION){\n listener = new Acceleration(argObj.callback);\n delete argObj.callback;\n }\n\n for(var key in argObj) {\n listener[key] = argObj[key];\n }\n return listener;\n};\n\nmodule.exports = cc.EventListener;","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nvar js = require('../platform/js');\nrequire('./CCEventListener');\nvar ListenerID = cc.EventListener.ListenerID;\n\nvar _EventListenerVector = function () {\n this._fixedListeners = [];\n this._sceneGraphListeners = [];\n this.gt0Index = 0;\n};\n_EventListenerVector.prototype = {\n constructor: _EventListenerVector,\n size: function () {\n return this._fixedListeners.length + this._sceneGraphListeners.length;\n },\n\n empty: function () {\n return (this._fixedListeners.length === 0) && (this._sceneGraphListeners.length === 0);\n },\n\n push: function (listener) {\n if (listener._getFixedPriority() === 0)\n this._sceneGraphListeners.push(listener);\n else\n this._fixedListeners.push(listener);\n },\n\n clearSceneGraphListeners: function () {\n this._sceneGraphListeners.length = 0;\n },\n\n clearFixedListeners: function () {\n this._fixedListeners.length = 0;\n },\n\n clear: function () {\n this._sceneGraphListeners.length = 0;\n this._fixedListeners.length = 0;\n },\n\n getFixedPriorityListeners: function () {\n return this._fixedListeners;\n },\n\n getSceneGraphPriorityListeners: function () {\n return this._sceneGraphListeners;\n }\n};\n\nvar __getListenerID = function (event) {\n var eventType = cc.Event, type = event.type;\n if (type === eventType.ACCELERATION)\n return ListenerID.ACCELERATION;\n if (type === eventType.KEYBOARD)\n return ListenerID.KEYBOARD;\n if (type.startsWith(eventType.MOUSE))\n return ListenerID.MOUSE;\n if (type.startsWith(eventType.TOUCH)){\n // Touch listener is very special, it contains two kinds of listeners, EventListenerTouchOneByOne and EventListenerTouchAllAtOnce.\n // return UNKNOWN instead.\n cc.logID(2000);\n }\n return \"\";\n};\n\n/**\n * !#en\n * This class has been deprecated, please use cc.systemEvent or cc.EventTarget instead. See [Listen to and launch events](../../../manual/en/scripting/events.html) for details.<br>\n * <br>\n * cc.eventManager is a singleton object which manages event listener subscriptions and event dispatching.\n * The EventListener list is managed in such way so that event listeners can be added and removed\n * while events are being dispatched.\n *\n * !#zh\n * 该类已废弃,请使用 cc.systemEvent 或 cc.EventTarget 代替,详见 [监听和发射事件](../../../manual/zh/scripting/events.html)。<br>\n * <br>\n * 事件管理器,它主要管理事件监听器注册和派发系统事件。\n *\n * @class eventManager\n * @static\n * @example {@link cocos2d/core/event-manager/CCEventManager/addListener.js}\n * @deprecated\n */\nvar eventManager = {\n //Priority dirty flag\n DIRTY_NONE: 0,\n DIRTY_FIXED_PRIORITY: 1 << 0,\n DIRTY_SCENE_GRAPH_PRIORITY: 1 << 1,\n DIRTY_ALL: 3,\n \n _listenersMap: {},\n _priorityDirtyFlagMap: {},\n _nodeListenersMap: {},\n _toAddedListeners: [],\n _toRemovedListeners: [],\n _dirtyListeners: {},\n _inDispatch: 0,\n _isEnabled: false,\n _currentTouch: null,\n _currentTouchListener: null,\n\n _internalCustomListenerIDs:[],\n\n _setDirtyForNode: function (node) {\n // Mark the node dirty only when there is an event listener associated with it.\n let selListeners = this._nodeListenersMap[node._id];\n if (selListeners) {\n for (let j = 0, len = selListeners.length; j < len; j++) {\n let selListener = selListeners[j];\n let listenerID = selListener._getListenerID();\n if (this._dirtyListeners[listenerID] == null)\n this._dirtyListeners[listenerID] = true;\n }\n }\n if (node.childrenCount > 0) {\n let children = node._children;\n for(let i = 0, len = children.length; i < len; i++)\n this._setDirtyForNode(children[i]);\n }\n },\n\n /**\n * !#en Pauses all listeners which are associated the specified target.\n * !#zh 暂停传入的 node 相关的所有监听器的事件响应。\n * @method pauseTarget\n * @param {Node} node\n * @param {Boolean} [recursive=false]\n */\n pauseTarget: function (node, recursive) {\n if (!(node instanceof cc._BaseNode)) {\n cc.warnID(3506);\n return;\n }\n var listeners = this._nodeListenersMap[node._id], i, len;\n if (listeners) {\n for (i = 0, len = listeners.length; i < len; i++) {\n const listener = listeners[i];\n listener._setPaused(true);\n if (listener._claimedTouches && listener._claimedTouches.includes(this._currentTouch)) {\n this._clearCurTouch();\n }\n }\n }\n if (recursive === true) {\n var locChildren = node._children;\n for (i = 0, len = locChildren ? locChildren.length : 0; i < len; i++)\n this.pauseTarget(locChildren[i], true);\n }\n },\n\n /**\n * !#en Resumes all listeners which are associated the specified target.\n * !#zh 恢复传入的 node 相关的所有监听器的事件响应。\n * @method resumeTarget\n * @param {Node} node\n * @param {Boolean} [recursive=false]\n */\n resumeTarget: function (node, recursive) {\n if (!(node instanceof cc._BaseNode)) {\n cc.warnID(3506);\n return;\n }\n var listeners = this._nodeListenersMap[node._id], i, len;\n if (listeners){\n for ( i = 0, len = listeners.length; i < len; i++)\n listeners[i]._setPaused(false);\n }\n this._setDirtyForNode(node);\n if (recursive === true) {\n var locChildren = node._children;\n for (i = 0, len = locChildren ? locChildren.length : 0; i < len; i++)\n this.resumeTarget(locChildren[i], true);\n }\n },\n\n _addListener: function (listener) {\n if (this._inDispatch === 0)\n this._forceAddEventListener(listener);\n else\n this._toAddedListeners.push(listener);\n },\n\n _forceAddEventListener: function (listener) {\n var listenerID = listener._getListenerID();\n var listeners = this._listenersMap[listenerID];\n if (!listeners) {\n listeners = new _EventListenerVector();\n this._listenersMap[listenerID] = listeners;\n }\n listeners.push(listener);\n\n if (listener._getFixedPriority() === 0) {\n this._setDirty(listenerID, this.DIRTY_SCENE_GRAPH_PRIORITY);\n\n var node = listener._getSceneGraphPriority();\n if (node === null)\n cc.logID(3507);\n\n this._associateNodeAndEventListener(node, listener);\n if (node.activeInHierarchy)\n this.resumeTarget(node);\n } else\n this._setDirty(listenerID, this.DIRTY_FIXED_PRIORITY);\n },\n\n _getListeners: function (listenerID) {\n return this._listenersMap[listenerID];\n },\n\n _updateDirtyFlagForSceneGraph: function () {\n let locDirtyListeners = this._dirtyListeners\n for (var selKey in locDirtyListeners) {\n this._setDirty(selKey, this.DIRTY_SCENE_GRAPH_PRIORITY);\n }\n\n this._dirtyListeners = {};\n },\n\n _removeAllListenersInVector: function (listenerVector) {\n if (!listenerVector)\n return;\n var selListener;\n for (var i = listenerVector.length - 1; i >= 0; i--) {\n selListener = listenerVector[i];\n selListener._setRegistered(false);\n if (selListener._getSceneGraphPriority() != null) {\n this._dissociateNodeAndEventListener(selListener._getSceneGraphPriority(), selListener);\n selListener._setSceneGraphPriority(null); // NULL out the node pointer so we don't have any dangling pointers to destroyed nodes.\n }\n\n if (this._inDispatch === 0)\n cc.js.array.removeAt(listenerVector, i);\n }\n },\n\n _removeListenersForListenerID: function (listenerID) {\n var listeners = this._listenersMap[listenerID], i;\n if (listeners) {\n var fixedPriorityListeners = listeners.getFixedPriorityListeners();\n var sceneGraphPriorityListeners = listeners.getSceneGraphPriorityListeners();\n\n this._removeAllListenersInVector(sceneGraphPriorityListeners);\n this._removeAllListenersInVector(fixedPriorityListeners);\n\n // Remove the dirty flag according the 'listenerID'.\n // No need to check whether the dispatcher is dispatching event.\n delete this._priorityDirtyFlagMap[listenerID];\n\n if (!this._inDispatch) {\n listeners.clear();\n delete this._listenersMap[listenerID];\n }\n }\n\n var locToAddedListeners = this._toAddedListeners, listener;\n for (i = locToAddedListeners.length - 1; i >= 0; i--) {\n listener = locToAddedListeners[i];\n if (listener && listener._getListenerID() === listenerID)\n cc.js.array.removeAt(locToAddedListeners, i);\n }\n },\n\n _sortEventListeners: function (listenerID) {\n var dirtyFlag = this.DIRTY_NONE, locFlagMap = this._priorityDirtyFlagMap;\n if (locFlagMap[listenerID])\n dirtyFlag = locFlagMap[listenerID];\n \n if (dirtyFlag !== this.DIRTY_NONE) {\n // Clear the dirty flag first, if `rootNode` is null, then set its dirty flag of scene graph priority\n locFlagMap[listenerID] = this.DIRTY_NONE;\n\n if (dirtyFlag & this.DIRTY_FIXED_PRIORITY)\n this._sortListenersOfFixedPriority(listenerID);\n\n if (dirtyFlag & this.DIRTY_SCENE_GRAPH_PRIORITY){\n var rootEntity = cc.director.getScene();\n if(rootEntity)\n this._sortListenersOfSceneGraphPriority(listenerID);\n }\n }\n },\n\n _sortListenersOfSceneGraphPriority: function (listenerID) {\n var listeners = this._getListeners(listenerID);\n if (!listeners)\n return;\n\n var sceneGraphListener = listeners.getSceneGraphPriorityListeners();\n if (!sceneGraphListener || sceneGraphListener.length === 0)\n return;\n\n // After sort: priority < 0, > 0\n listeners.getSceneGraphPriorityListeners().sort(this._sortEventListenersOfSceneGraphPriorityDes);\n },\n\n _sortEventListenersOfSceneGraphPriorityDes: function (l1, l2) {\n let node1 = l1._getSceneGraphPriority(),\n node2 = l2._getSceneGraphPriority();\n\n if (!l2 || !node2 || !node2._activeInHierarchy || node2._parent === null)\n return -1;\n else if (!l1 || !node1 || !node1._activeInHierarchy || node1._parent === null)\n return 1;\n \n let p1 = node1, p2 = node2, ex = false;\n while (p1._parent._id !== p2._parent._id) {\n p1 = p1._parent._parent === null ? (ex = true) && node2 : p1._parent;\n p2 = p2._parent._parent === null ? (ex = true) && node1 : p2._parent;\n }\n\n if (p1._id === p2._id) {\n if (p1._id === node2._id) \n return -1;\n if (p1._id === node1._id)\n return 1;\n }\n\n return ex ? p1._localZOrder - p2._localZOrder : p2._localZOrder - p1._localZOrder;\n },\n\n _sortListenersOfFixedPriority: function (listenerID) {\n var listeners = this._listenersMap[listenerID];\n if (!listeners)\n return;\n\n var fixedListeners = listeners.getFixedPriorityListeners();\n if(!fixedListeners || fixedListeners.length === 0)\n return;\n // After sort: priority < 0, > 0\n fixedListeners.sort(this._sortListenersOfFixedPriorityAsc);\n\n // FIXME: Should use binary search\n var index = 0;\n for (var len = fixedListeners.length; index < len;) {\n if (fixedListeners[index]._getFixedPriority() >= 0)\n break;\n ++index;\n }\n listeners.gt0Index = index;\n },\n\n _sortListenersOfFixedPriorityAsc: function (l1, l2) {\n return l1._getFixedPriority() - l2._getFixedPriority();\n },\n\n _onUpdateListeners: function (listeners) {\n var fixedPriorityListeners = listeners.getFixedPriorityListeners();\n var sceneGraphPriorityListeners = listeners.getSceneGraphPriorityListeners();\n var i, selListener, idx, toRemovedListeners = this._toRemovedListeners;\n\n if (sceneGraphPriorityListeners) {\n for (i = sceneGraphPriorityListeners.length - 1; i >= 0; i--) {\n selListener = sceneGraphPriorityListeners[i];\n if (!selListener._isRegistered()) {\n cc.js.array.removeAt(sceneGraphPriorityListeners, i);\n // if item in toRemove list, remove it from the list\n idx = toRemovedListeners.indexOf(selListener);\n if(idx !== -1)\n toRemovedListeners.splice(idx, 1);\n }\n }\n }\n\n if (fixedPriorityListeners) {\n for (i = fixedPriorityListeners.length - 1; i >= 0; i--) {\n selListener = fixedPriorityListeners[i];\n if (!selListener._isRegistered()) {\n cc.js.array.removeAt(fixedPriorityListeners, i);\n // if item in toRemove list, remove it from the list\n idx = toRemovedListeners.indexOf(selListener);\n if(idx !== -1)\n toRemovedListeners.splice(idx, 1);\n }\n }\n }\n\n if (sceneGraphPriorityListeners && sceneGraphPriorityListeners.length === 0)\n listeners.clearSceneGraphListeners();\n\n if (fixedPriorityListeners && fixedPriorityListeners.length === 0)\n listeners.clearFixedListeners();\n },\n\n frameUpdateListeners: function () {\n var locListenersMap = this._listenersMap, locPriorityDirtyFlagMap = this._priorityDirtyFlagMap;\n for (var selKey in locListenersMap) {\n if (locListenersMap[selKey].empty()) {\n delete locPriorityDirtyFlagMap[selKey];\n delete locListenersMap[selKey];\n }\n }\n\n var locToAddedListeners = this._toAddedListeners;\n if (locToAddedListeners.length !== 0) {\n for (var i = 0, len = locToAddedListeners.length; i < len; i++)\n this._forceAddEventListener(locToAddedListeners[i]);\n locToAddedListeners.length = 0;\n }\n if (this._toRemovedListeners.length !== 0) {\n this._cleanToRemovedListeners();\n }\n },\n\n _updateTouchListeners: function (event) {\n var locInDispatch = this._inDispatch;\n cc.assertID(locInDispatch > 0, 3508);\n\n if (locInDispatch > 1)\n return;\n\n var listeners;\n listeners = this._listenersMap[ListenerID.TOUCH_ONE_BY_ONE];\n if (listeners) {\n this._onUpdateListeners(listeners);\n }\n listeners = this._listenersMap[ListenerID.TOUCH_ALL_AT_ONCE];\n if (listeners) {\n this._onUpdateListeners(listeners);\n }\n\n cc.assertID(locInDispatch === 1, 3509);\n\n var locToAddedListeners = this._toAddedListeners;\n if (locToAddedListeners.length !== 0) {\n for (var i = 0, len = locToAddedListeners.length; i < len; i++)\n this._forceAddEventListener(locToAddedListeners[i]);\n this._toAddedListeners.length = 0;\n }\n\n if (this._toRemovedListeners.length !== 0) {\n this._cleanToRemovedListeners();\n }\n },\n\n //Remove all listeners in _toRemoveListeners list and cleanup\n _cleanToRemovedListeners: function () {\n var toRemovedListeners = this._toRemovedListeners;\n for (var i = 0; i < toRemovedListeners.length; i++) {\n var selListener = toRemovedListeners[i];\n var listeners = this._listenersMap[selListener._getListenerID()];\n if (!listeners)\n continue;\n\n var idx, fixedPriorityListeners = listeners.getFixedPriorityListeners(),\n sceneGraphPriorityListeners = listeners.getSceneGraphPriorityListeners();\n\n if (sceneGraphPriorityListeners) {\n idx = sceneGraphPriorityListeners.indexOf(selListener);\n if (idx !== -1) {\n sceneGraphPriorityListeners.splice(idx, 1);\n }\n }\n if (fixedPriorityListeners) {\n idx = fixedPriorityListeners.indexOf(selListener);\n if (idx !== -1) {\n fixedPriorityListeners.splice(idx, 1);\n }\n }\n }\n toRemovedListeners.length = 0;\n },\n\n _onTouchEventCallback: function (listener, argsObj) {\n // Skip if the listener was removed.\n if (!listener._isRegistered())\n return false;\n\n var event = argsObj.event, selTouch = event.currentTouch;\n event.currentTarget = listener._node;\n\n var isClaimed = false, removedIdx;\n var getCode = event.getEventCode(), EventTouch = cc.Event.EventTouch;\n if (getCode === EventTouch.BEGAN) {\n if (!cc.macro.ENABLE_MULTI_TOUCH && eventManager._currentTouch) {\n let node = eventManager._currentTouchListener._node;\n if (node && node.activeInHierarchy) {\n return false;\n }\n }\n\n if (listener.onTouchBegan) {\n isClaimed = listener.onTouchBegan(selTouch, event);\n if (isClaimed && listener._registered) {\n listener._claimedTouches.push(selTouch);\n eventManager._currentTouchListener = listener;\n eventManager._currentTouch = selTouch;\n }\n }\n } else if (listener._claimedTouches.length > 0\n && ((removedIdx = listener._claimedTouches.indexOf(selTouch)) !== -1)) {\n isClaimed = true;\n \n if (!cc.macro.ENABLE_MULTI_TOUCH && eventManager._currentTouch && eventManager._currentTouch !== selTouch) {\n return false;\n }\n\n if (getCode === EventTouch.MOVED && listener.onTouchMoved) {\n listener.onTouchMoved(selTouch, event);\n } else if (getCode === EventTouch.ENDED) {\n if (listener.onTouchEnded)\n listener.onTouchEnded(selTouch, event);\n if (listener._registered)\n listener._claimedTouches.splice(removedIdx, 1);\n eventManager._clearCurTouch();\n } else if (getCode === EventTouch.CANCELED) {\n if (listener.onTouchCancelled)\n listener.onTouchCancelled(selTouch, event);\n if (listener._registered)\n listener._claimedTouches.splice(removedIdx, 1);\n eventManager._clearCurTouch();\n }\n }\n\n // If the event was stopped, return directly.\n if (event.isStopped()) {\n eventManager._updateTouchListeners(event);\n return true;\n }\n\n if (isClaimed && listener.swallowTouches) {\n if (argsObj.needsMutableSet)\n argsObj.touches.splice(selTouch, 1);\n return true;\n }\n return false;\n },\n\n _dispatchTouchEvent: function (event) {\n this._sortEventListeners(ListenerID.TOUCH_ONE_BY_ONE);\n this._sortEventListeners(ListenerID.TOUCH_ALL_AT_ONCE);\n\n var oneByOneListeners = this._getListeners(ListenerID.TOUCH_ONE_BY_ONE);\n var allAtOnceListeners = this._getListeners(ListenerID.TOUCH_ALL_AT_ONCE);\n\n // If there aren't any touch listeners, return directly.\n if (null === oneByOneListeners && null === allAtOnceListeners)\n return;\n\n var originalTouches = event.getTouches(), mutableTouches = cc.js.array.copy(originalTouches);\n var oneByOneArgsObj = {event: event, needsMutableSet: (oneByOneListeners && allAtOnceListeners), touches: mutableTouches, selTouch: null};\n\n //\n // process the target handlers 1st\n //\n if (oneByOneListeners) {\n for (var i = 0; i < originalTouches.length; i++) {\n event.currentTouch = originalTouches[i];\n event._propagationStopped = event._propagationImmediateStopped = false;\n this._dispatchEventToListeners(oneByOneListeners, this._onTouchEventCallback, oneByOneArgsObj);\n }\n }\n\n //\n // process standard handlers 2nd\n //\n if (allAtOnceListeners && mutableTouches.length > 0) {\n this._dispatchEventToListeners(allAtOnceListeners, this._onTouchesEventCallback, {event: event, touches: mutableTouches});\n if (event.isStopped())\n return;\n }\n this._updateTouchListeners(event);\n },\n\n _onTouchesEventCallback: function (listener, callbackParams) {\n // Skip if the listener was removed.\n if (!listener._registered)\n return false;\n\n var EventTouch = cc.Event.EventTouch, event = callbackParams.event, touches = callbackParams.touches, getCode = event.getEventCode();\n event.currentTarget = listener._node;\n if (getCode === EventTouch.BEGAN && listener.onTouchesBegan)\n listener.onTouchesBegan(touches, event);\n else if (getCode === EventTouch.MOVED && listener.onTouchesMoved)\n listener.onTouchesMoved(touches, event);\n else if (getCode === EventTouch.ENDED && listener.onTouchesEnded)\n listener.onTouchesEnded(touches, event);\n else if (getCode === EventTouch.CANCELED && listener.onTouchesCancelled)\n listener.onTouchesCancelled(touches, event);\n\n // If the event was stopped, return directly.\n if (event.isStopped()) {\n eventManager._updateTouchListeners(event);\n return true;\n }\n return false;\n },\n\n _associateNodeAndEventListener: function (node, listener) {\n var listeners = this._nodeListenersMap[node._id];\n if (!listeners) {\n listeners = [];\n this._nodeListenersMap[node._id] = listeners;\n }\n listeners.push(listener);\n },\n\n _dissociateNodeAndEventListener: function (node, listener) {\n var listeners = this._nodeListenersMap[node._id];\n if (listeners) {\n cc.js.array.remove(listeners, listener);\n if (listeners.length === 0)\n delete this._nodeListenersMap[node._id];\n }\n },\n\n _dispatchEventToListeners: function (listeners, onEvent, eventOrArgs) {\n var shouldStopPropagation = false;\n var fixedPriorityListeners = listeners.getFixedPriorityListeners();\n var sceneGraphPriorityListeners = listeners.getSceneGraphPriorityListeners();\n\n var i = 0, j, selListener;\n if (fixedPriorityListeners) { // priority < 0\n if (fixedPriorityListeners.length !== 0) {\n for (; i < listeners.gt0Index; ++i) {\n selListener = fixedPriorityListeners[i];\n if (selListener.isEnabled() && !selListener._isPaused() && selListener._isRegistered() && onEvent(selListener, eventOrArgs)) {\n shouldStopPropagation = true;\n break;\n }\n }\n }\n }\n\n if (sceneGraphPriorityListeners && !shouldStopPropagation) { // priority == 0, scene graph priority\n for (j = 0; j < sceneGraphPriorityListeners.length; j++) {\n selListener = sceneGraphPriorityListeners[j];\n if (selListener.isEnabled() && !selListener._isPaused() && selListener._isRegistered() && onEvent(selListener, eventOrArgs)) {\n shouldStopPropagation = true;\n break;\n }\n }\n }\n\n if (fixedPriorityListeners && !shouldStopPropagation) { // priority > 0\n for (; i < fixedPriorityListeners.length; ++i) {\n selListener = fixedPriorityListeners[i];\n if (selListener.isEnabled() && !selListener._isPaused() && selListener._isRegistered() && onEvent(selListener, eventOrArgs)) {\n shouldStopPropagation = true;\n break;\n }\n }\n }\n },\n\n _setDirty: function (listenerID, flag) {\n var locDirtyFlagMap = this._priorityDirtyFlagMap;\n if (locDirtyFlagMap[listenerID] == null)\n locDirtyFlagMap[listenerID] = flag;\n else\n locDirtyFlagMap[listenerID] = flag | locDirtyFlagMap[listenerID];\n },\n\n _sortNumberAsc: function (a, b) {\n return a - b;\n },\n\n /**\n * !#en Query whether the specified event listener id has been added.\n * !#zh 查询指定的事件 ID 是否存在\n * @method hasEventListener\n * @param {String|Number} listenerID - The listener id.\n * @return {Boolean} true or false\n */\n hasEventListener: function (listenerID) {\n return !!this._getListeners(listenerID);\n },\n\n /**\n * !#en\n * <p>\n * Adds a event listener for a specified event.<br/>\n * if the parameter \"nodeOrPriority\" is a node,\n * it means to add a event listener for a specified event with the priority of scene graph.<br/>\n * if the parameter \"nodeOrPriority\" is a Number,\n * it means to add a event listener for a specified event with the fixed priority.<br/>\n * </p>\n * !#zh\n * 将事件监听器添加到事件管理器中。<br/>\n * 如果参数 “nodeOrPriority” 是节点,优先级由 node 的渲染顺序决定,显示在上层的节点将优先收到事件。<br/>\n * 如果参数 “nodeOrPriority” 是数字,优先级则固定为该参数的数值,数字越小,优先级越高。<br/>\n *\n * @method addListener\n * @param {EventListener|Object} listener - The listener of a specified event or a object of some event parameters.\n * @param {Node|Number} nodeOrPriority - The priority of the listener is based on the draw order of this node or fixedPriority The fixed priority of the listener.\n * @note The priority of scene graph will be fixed value 0. So the order of listener item in the vector will be ' <0, scene graph (0 priority), >0'.\n * A lower priority will be called before the ones that have a higher value. 0 priority is forbidden for fixed priority since it's used for scene graph based priority.\n * The listener must be a cc.EventListener object when adding a fixed priority listener, because we can't remove a fixed priority listener without the listener handler,\n * except calls removeAllListeners().\n * @return {EventListener} Return the listener. Needed in order to remove the event from the dispatcher.\n */\n addListener: function (listener, nodeOrPriority) {\n cc.assertID(listener && nodeOrPriority, 3503);\n if (!(cc.js.isNumber(nodeOrPriority) || nodeOrPriority instanceof cc._BaseNode)) {\n cc.warnID(3506);\n return;\n }\n if (!(listener instanceof cc.EventListener)) {\n cc.assertID(!cc.js.isNumber(nodeOrPriority), 3504);\n listener = cc.EventListener.create(listener);\n } else {\n if (listener._isRegistered()) {\n cc.logID(3505);\n return;\n }\n }\n\n if (!listener.checkAvailable())\n return;\n\n if (cc.js.isNumber(nodeOrPriority)) {\n if (nodeOrPriority === 0) {\n cc.logID(3500);\n return;\n }\n\n listener._setSceneGraphPriority(null);\n listener._setFixedPriority(nodeOrPriority);\n listener._setRegistered(true);\n listener._setPaused(false);\n this._addListener(listener);\n } else {\n listener._setSceneGraphPriority(nodeOrPriority);\n listener._setFixedPriority(0);\n listener._setRegistered(true);\n this._addListener(listener);\n }\n\n return listener;\n },\n\n /*\n * !#en Adds a Custom event listener. It will use a fixed priority of 1.\n * !#zh 向事件管理器添加一个自定义事件监听器。\n * @method addCustomListener\n * @param {String} eventName\n * @param {Function} callback\n * @return {EventListener} the generated event. Needed in order to remove the event from the dispatcher\n */\n addCustomListener: function (eventName, callback) {\n var listener = new cc.EventListener.create({\n event: cc.EventListener.CUSTOM,\n eventName: eventName, \n callback: callback\n });\n this.addListener(listener, 1);\n return listener;\n },\n\n /**\n * !#en Remove a listener.\n * !#zh 移除一个已添加的监听器。\n * @method removeListener\n * @param {EventListener} listener - an event listener or a registered node target\n * @example {@link cocos2d/core/event-manager/CCEventManager/removeListener.js}\n */\n removeListener: function (listener) {\n if (listener == null)\n return;\n\n var isFound, locListener = this._listenersMap;\n for (var selKey in locListener) {\n var listeners = locListener[selKey];\n var fixedPriorityListeners = listeners.getFixedPriorityListeners(), sceneGraphPriorityListeners = listeners.getSceneGraphPriorityListeners();\n\n isFound = this._removeListenerInVector(sceneGraphPriorityListeners, listener);\n if (isFound){\n // fixed #4160: Dirty flag need to be updated after listeners were removed.\n this._setDirty(listener._getListenerID(), this.DIRTY_SCENE_GRAPH_PRIORITY);\n }else{\n isFound = this._removeListenerInVector(fixedPriorityListeners, listener);\n if (isFound)\n this._setDirty(listener._getListenerID(), this.DIRTY_FIXED_PRIORITY);\n }\n\n if (listeners.empty()) {\n delete this._priorityDirtyFlagMap[listener._getListenerID()];\n delete locListener[selKey];\n }\n\n if (isFound)\n break;\n }\n\n if (!isFound) {\n var locToAddedListeners = this._toAddedListeners;\n for (var i = locToAddedListeners.length - 1; i >= 0; i--) {\n var selListener = locToAddedListeners[i];\n if (selListener === listener) {\n cc.js.array.removeAt(locToAddedListeners, i);\n selListener._setRegistered(false);\n break;\n }\n }\n }\n\n this._currentTouchListener === listener && this._clearCurTouch();\n },\n\n _clearCurTouch () {\n this._currentTouchListener = null;\n this._currentTouch = null;\n },\n\n _removeListenerInCallback: function(listeners, callback){\n if (listeners == null)\n return false;\n\n for (var i = listeners.length - 1; i >= 0; i--) {\n var selListener = listeners[i];\n if (selListener._onCustomEvent === callback || selListener._onEvent === callback) {\n selListener._setRegistered(false);\n if (selListener._getSceneGraphPriority() != null){\n this._dissociateNodeAndEventListener(selListener._getSceneGraphPriority(), selListener);\n selListener._setSceneGraphPriority(null); // NULL out the node pointer so we don't have any dangling pointers to destroyed nodes.\n }\n\n if (this._inDispatch === 0)\n cc.js.array.removeAt(listeners, i);\n else\n this._toRemovedListeners.push(selListener);\n return true;\n }\n }\n return false;\n },\n\n _removeListenerInVector: function (listeners, listener) {\n if (listeners == null)\n return false;\n\n for (var i = listeners.length - 1; i >= 0; i--) {\n var selListener = listeners[i];\n if (selListener === listener) {\n selListener._setRegistered(false);\n if (selListener._getSceneGraphPriority() != null) {\n this._dissociateNodeAndEventListener(selListener._getSceneGraphPriority(), selListener);\n selListener._setSceneGraphPriority(null); // NULL out the node pointer so we don't have any dangling pointers to destroyed nodes.\n }\n\n if (this._inDispatch === 0)\n cc.js.array.removeAt(listeners, i);\n else\n this._toRemovedListeners.push(selListener);\n return true;\n }\n }\n return false;\n },\n\n /**\n * !#en Removes all listeners with the same event listener type or removes all listeners of a node.\n * !#zh\n * 移除注册到 eventManager 中指定类型的所有事件监听器。<br/>\n * 1. 如果传入的第一个参数类型是 Node那么事件管理器将移除与该对象相关的所有事件监听器。\n * (如果第二参数 recursive 是 true 的话,就会连同该对象的子控件上所有的事件监听器也一并移除)<br/>\n * 2. 如果传入的第一个参数类型是 Number该类型 EventListener 中定义的事件类型),\n * 那么事件管理器将移除该类型的所有事件监听器。<br/>\n *\n * 下列是目前存在监听器类型: <br/>\n * cc.EventListener.UNKNOWN <br/>\n * cc.EventListener.KEYBOARD <br/>\n * cc.EventListener.ACCELERATION<br/>\n *\n * @method removeListeners\n * @param {Number|Node} listenerType - listenerType or a node\n * @param {Boolean} [recursive=false]\n */\n removeListeners: function (listenerType, recursive) {\n var i, _t = this;\n if (!(cc.js.isNumber(listenerType) || listenerType instanceof cc._BaseNode)) {\n cc.warnID(3506);\n return;\n }\n if (listenerType._id !== undefined) {\n // Ensure the node is removed from these immediately also.\n // Don't want any dangling pointers or the possibility of dealing with deleted objects..\n var listeners = _t._nodeListenersMap[listenerType._id], i;\n if (listeners) {\n var listenersCopy = cc.js.array.copy(listeners);\n for (i = 0; i < listenersCopy.length; i++)\n _t.removeListener(listenersCopy[i]);\n delete _t._nodeListenersMap[listenerType._id];\n }\n\n // Bug fix: ensure there are no references to the node in the list of listeners to be added.\n // If we find any listeners associated with the destroyed node in this list then remove them.\n // This is to catch the scenario where the node gets destroyed before it's listener\n // is added into the event dispatcher fully. This could happen if a node registers a listener\n // and gets destroyed while we are dispatching an event (touch etc.)\n var locToAddedListeners = _t._toAddedListeners;\n for (i = 0; i < locToAddedListeners.length; ) {\n var listener = locToAddedListeners[i];\n if (listener._getSceneGraphPriority() === listenerType) {\n listener._setSceneGraphPriority(null); // Ensure no dangling ptr to the target node.\n listener._setRegistered(false);\n locToAddedListeners.splice(i, 1);\n } else\n ++i;\n }\n\n if (recursive === true) {\n var locChildren = listenerType.children, len;\n for (i = 0, len = locChildren.length; i< len; i++)\n _t.removeListeners(locChildren[i], true);\n }\n } else {\n if (listenerType === cc.EventListener.TOUCH_ONE_BY_ONE)\n _t._removeListenersForListenerID(ListenerID.TOUCH_ONE_BY_ONE);\n else if (listenerType === cc.EventListener.TOUCH_ALL_AT_ONCE)\n _t._removeListenersForListenerID(ListenerID.TOUCH_ALL_AT_ONCE);\n else if (listenerType === cc.EventListener.MOUSE)\n _t._removeListenersForListenerID(ListenerID.MOUSE);\n else if (listenerType === cc.EventListener.ACCELERATION)\n _t._removeListenersForListenerID(ListenerID.ACCELERATION);\n else if (listenerType === cc.EventListener.KEYBOARD)\n _t._removeListenersForListenerID(ListenerID.KEYBOARD);\n else\n cc.logID(3501);\n }\n },\n\n /*\n * !#en Removes all custom listeners with the same event name.\n * !#zh 移除同一事件名的自定义事件监听器。\n * @method removeCustomListeners\n * @param {String} customEventName\n */\n removeCustomListeners: function (customEventName) {\n this._removeListenersForListenerID(customEventName);\n },\n\n /**\n * !#en Removes all listeners\n * !#zh 移除所有事件监听器。\n * @method removeAllListeners\n */\n removeAllListeners: function () {\n var locListeners = this._listenersMap, locInternalCustomEventIDs = this._internalCustomListenerIDs;\n for (var selKey in locListeners){\n if(locInternalCustomEventIDs.indexOf(selKey) === -1)\n this._removeListenersForListenerID(selKey);\n }\n },\n\n /**\n * !#en Sets listener's priority with fixed value.\n * !#zh 设置 FixedPriority 类型监听器的优先级。\n * @method setPriority\n * @param {EventListener} listener\n * @param {Number} fixedPriority\n */\n setPriority: function (listener, fixedPriority) {\n if (listener == null)\n return;\n\n var locListeners = this._listenersMap;\n for (var selKey in locListeners) {\n var selListeners = locListeners[selKey];\n var fixedPriorityListeners = selListeners.getFixedPriorityListeners();\n if (fixedPriorityListeners) {\n var found = fixedPriorityListeners.indexOf(listener);\n if (found !== -1) {\n if(listener._getSceneGraphPriority() != null)\n cc.logID(3502);\n if (listener._getFixedPriority() !== fixedPriority) {\n listener._setFixedPriority(fixedPriority);\n this._setDirty(listener._getListenerID(), this.DIRTY_FIXED_PRIORITY);\n }\n return;\n }\n }\n }\n },\n\n /**\n * !#en Whether to enable dispatching events\n * !#zh 启用或禁用事件管理器,禁用后不会分发任何事件。\n * @method setEnabled\n * @param {Boolean} enabled\n */\n setEnabled: function (enabled) {\n this._isEnabled = enabled;\n },\n\n /**\n * !#en Checks whether dispatching events is enabled\n * !#zh 检测事件管理器是否启用。\n * @method isEnabled\n * @returns {Boolean}\n */\n isEnabled: function () {\n return this._isEnabled;\n },\n\n /*\n * !#en Dispatches the event, also removes all EventListeners marked for deletion from the event dispatcher list.\n * !#zh 分发事件。\n * @method dispatchEvent\n * @param {Event} event\n */\n dispatchEvent: function (event) {\n if (!this._isEnabled)\n return;\n\n this._updateDirtyFlagForSceneGraph();\n this._inDispatch++;\n if (!event || !event.getType) {\n cc.errorID(3511);\n return;\n }\n if (event.getType().startsWith(cc.Event.TOUCH)) {\n this._dispatchTouchEvent(event);\n this._inDispatch--;\n return;\n }\n\n var listenerID = __getListenerID(event);\n this._sortEventListeners(listenerID);\n var selListeners = this._listenersMap[listenerID];\n if (selListeners != null) {\n this._dispatchEventToListeners(selListeners, this._onListenerCallback, event);\n this._onUpdateListeners(selListeners);\n }\n\n this._inDispatch--;\n },\n\n _onListenerCallback: function(listener, event){\n event.currentTarget = listener._target;\n listener._onEvent(event);\n return event.isStopped();\n },\n\n /*\n * !#en Dispatches a Custom Event with a event name an optional user data\n * !#zh 分发自定义事件。\n * @method dispatchCustomEvent\n * @param {String} eventName\n * @param {*} optionalUserData\n */\n dispatchCustomEvent: function (eventName, optionalUserData) {\n var ev = new cc.Event.EventCustom(eventName);\n ev.setUserData(optionalUserData);\n this.dispatchEvent(ev);\n }\n};\n\n\njs.get(cc, 'eventManager', function () {\n cc.errorID(1405, 'cc.eventManager', 'cc.EventTarget or cc.systemEvent');\n return eventManager;\n});\n\nmodule.exports = cc.internal.eventManager = eventManager;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * !#en The touch event class\n * !#zh 封装了触摸相关的信息。\n * @class Touch\n *\n * @param {Number} x\n * @param {Number} y\n * @param {Number} id\n */\ncc.Touch = function (x, y, id) {\n this._lastModified = 0;\n this.setTouchInfo(id, x, y);\n};\ncc.Touch.prototype = {\n constructor: cc.Touch,\n /**\n * !#en Returns the current touch location in OpenGL coordinates.、\n * !#zh 获取当前触点位置。\n * @method getLocation\n * @return {Vec2}\n */\n getLocation:function () {\n return cc.v2(this._point.x, this._point.y);\n },\n\n\t/**\n\t * !#en Returns X axis location value.\n * !#zh 获取当前触点 X 轴位置。\n * @method getLocationX\n\t * @returns {Number}\n\t */\n\tgetLocationX: function () {\n\t\treturn this._point.x;\n\t},\n\n\t/**\n * !#en Returns Y axis location value.\n * !#zh 获取当前触点 Y 轴位置。\n * @method getLocationY\n\t * @returns {Number}\n\t */\n\tgetLocationY: function () {\n\t\treturn this._point.y;\n\t},\n\n /**\n * !#en Returns the previous touch location in OpenGL coordinates.\n * !#zh 获取触点在上一次事件时的位置对象,对象包含 x 和 y 属性。\n * @method getPreviousLocation\n * @return {Vec2}\n */\n getPreviousLocation:function () {\n return cc.v2(this._prevPoint.x, this._prevPoint.y);\n },\n\n /**\n * !#en Returns the start touch location in OpenGL coordinates.\n * !#zh 获取触点落下时的位置对象,对象包含 x 和 y 属性。\n * @method getStartLocation\n * @returns {Vec2}\n */\n getStartLocation: function() {\n return cc.v2(this._startPoint.x, this._startPoint.y);\n },\n\n /**\n * !#en Returns the delta distance from the previous touche to the current one in screen coordinates.\n * !#zh 获取触点距离上一次事件移动的距离对象,对象包含 x 和 y 属性。\n * @method getDelta\n * @return {Vec2}\n */\n getDelta:function () {\n return this._point.sub(this._prevPoint);\n },\n\n /**\n * !#en Returns the current touch location in screen coordinates.\n * !#zh 获取当前事件在游戏窗口内的坐标位置对象,对象包含 x 和 y 属性。\n * @method getLocationInView\n * @return {Vec2}\n */\n getLocationInView: function() {\n return cc.v2(this._point.x, cc.view._designResolutionSize.height - this._point.y);\n },\n\n /**\n * !#en Returns the previous touch location in screen coordinates.\n * !#zh 获取触点在上一次事件时在游戏窗口中的位置对象,对象包含 x 和 y 属性。\n * @method getPreviousLocationInView\n * @return {Vec2}\n */\n getPreviousLocationInView: function(){\n return cc.v2(this._prevPoint.x, cc.view._designResolutionSize.height - this._prevPoint.y);\n },\n\n /**\n * !#en Returns the start touch location in screen coordinates.\n * !#zh 获取触点落下时在游戏窗口中的位置对象,对象包含 x 和 y 属性。\n * @method getStartLocationInView\n * @return {Vec2}\n */\n getStartLocationInView: function(){\n return cc.v2(this._startPoint.x, cc.view._designResolutionSize.height - this._startPoint.y);\n },\n\n /**\n * !#en Returns the id of cc.Touch.\n * !#zh 触点的标识 ID可以用来在多点触摸中跟踪触点。\n * @method getID\n * @return {Number}\n */\n getID:function () {\n return this._id;\n },\n\n /**\n * !#en Sets information to touch.\n * !#zh 设置触摸相关的信息。用于监控触摸事件。\n * @method setTouchInfo\n * @param {Number} id\n * @param {Number} x\n * @param {Number} y\n */\n setTouchInfo:function (id, x, y) {\n this._prevPoint = this._point;\n this._point = cc.v2(x || 0, y || 0);\n this._id = id;\n if(!this._startPointCaptured){\n this._startPoint = cc.v2(this._point);\n cc.view._convertPointWithScale(this._startPoint);\n this._startPointCaptured = true;\n }\n },\n\n _setPoint: function(x, y){\n if(y === undefined){\n this._point.x = x.x;\n this._point.y = x.y;\n }else{\n this._point.x = x;\n this._point.y = y;\n }\n },\n\n _setPrevPoint:function (x, y) {\n if(y === undefined)\n this._prevPoint = cc.v2(x.x, x.y);\n else\n this._prevPoint = cc.v2(x || 0, y || 0);\n }\n};","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nrequire('./CCEvent');\nrequire('./CCTouch');\nrequire('./CCEventListener');\n\nvar eventManager = require('./CCEventManager');;\n\nmodule.exports = eventManager;\n\nif (CC_TEST) {\n cc._Test.eventManager = eventManager;\n}\n\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst js = cc.js;\nconst CallbacksInvoker = require('../platform/callbacks-invoker');\n\n// Extends CallbacksInvoker to handle and invoke event callbacks.\nfunction EventListeners () {\n CallbacksInvoker.call(this);\n}\njs.extend(EventListeners, CallbacksInvoker);\n\nEventListeners.prototype.emit = function (event, captureListeners) {\n let key = event.type;\n const list = this._callbackTable[key];\n if (list) {\n let rootInvoker = !list.isInvoking;\n list.isInvoking = true;\n\n const infos = list.callbackInfos;\n for (let i = 0, len = infos.length; i < len; ++i) {\n const info = infos[i];\n if (info && info.callback) {\n info.callback.call(info.target, event, captureListeners);\n if (event._propagationImmediateStopped) {\n break;\n }\n }\n }\n\n if (rootInvoker) {\n list.isInvoking = false;\n if (list.containCanceled) {\n list.purgeCanceled();\n }\n }\n }\n};\n\nmodule.exports = EventListeners;\nif (CC_TEST) {\n cc._Test.EventListeners = EventListeners;\n}\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst js = require('../platform/js');\nconst CallbacksInvoker = require('../platform/callbacks-invoker');\n\nvar fastRemove = js.array.fastRemove;\n\n/**\n * !#en\n * EventTarget is an object to which an event is dispatched when something has occurred.\n * Entity are the most common event targets, but other objects can be event targets too.\n *\n * Event targets are an important part of the Fireball event model.\n * The event target serves as the focal point for how events flow through the scene graph.\n * When an event such as a mouse click or a keypress occurs, Fireball dispatches an event object\n * into the event flow from the root of the hierarchy. The event object then makes its way through\n * the scene graph until it reaches the event target, at which point it begins its return trip through\n * the scene graph. This round-trip journey to the event target is conceptually divided into three phases:\n * - The capture phase comprises the journey from the root to the last node before the event target's node\n * - The target phase comprises only the event target node\n * - The bubbling phase comprises any subsequent nodes encountered on the return trip to the root of the tree\n * See also: http://www.w3.org/TR/DOM-Level-3-Events/#event-flow\n *\n * Event targets can implement the following methods:\n * - _getCapturingTargets\n * - _getBubblingTargets\n *\n * !#zh\n * 事件目标是事件触发时分派的事件对象Node 是最常见的事件目标,\n * 但是其他对象也可以是事件目标。<br/>\n *\n * @class EventTarget\n * @extends CallbacksInvoker\n */\nfunction EventTarget () {\n CallbacksInvoker.call(this);\n}\njs.extend(EventTarget, CallbacksInvoker);\n\nvar proto = EventTarget.prototype;\n\n/**\n * !#en Checks whether the EventTarget object has any callback registered for a specific type of event.\n * !#zh 检查事件目标对象是否有为特定类型的事件注册的回调。\n * @method hasEventListener\n * @param {String} type - The type of event.\n * @return {Boolean} True if a callback of the specified type is registered; false otherwise.\n */\n\n/**\n * !#en\n * Register an callback of a specific event type on the EventTarget.\n * This type of event should be triggered via `emit`.\n * !#zh\n * 注册事件目标的特定事件类型回调。这种类型的事件应该被 `emit` 触发。\n *\n * @method on\n * @param {String} type - A string representing the event type to listen for.\n * @param {Function} callback - The callback that will be invoked when the event is dispatched.\n * The callback is ignored if it is a duplicate (the callbacks are unique).\n * @param {any} [callback.arg1] arg1\n * @param {any} [callback.arg2] arg2\n * @param {any} [callback.arg3] arg3\n * @param {any} [callback.arg4] arg4\n * @param {any} [callback.arg5] arg5\n * @param {Object} [target] - The target (this object) to invoke the callback, can be null\n * @return {Function} - Just returns the incoming callback so you can save the anonymous function easier.\n * @typescript\n * on<T extends Function>(type: string, callback: T, target?: any, useCapture?: boolean): T\n * @example\n * eventTarget.on('fire', function () {\n * cc.log(\"fire in the hole\");\n * }, node);\n */\nproto.__on = proto.on;\nproto.on = function (type, callback, target, once) {\n if (!callback) {\n cc.errorID(6800);\n return;\n }\n\n if ( !this.hasEventListener(type, callback, target) ) {\n this.__on(type, callback, target, once);\n\n if (target && target.__eventTargets) {\n target.__eventTargets.push(this);\n }\n }\n return callback;\n};\n\n/**\n * !#en\n * Removes the listeners previously registered with the same type, callback, target and or useCapture,\n * if only type is passed as parameter, all listeners registered with that type will be removed.\n * !#zh\n * 删除之前用同类型,回调,目标或 useCapture 注册的事件监听器,如果只传递 type将会删除 type 类型的所有事件监听器。\n *\n * @method off\n * @param {String} type - A string representing the event type being removed.\n * @param {Function} [callback] - The callback to remove.\n * @param {Object} [target] - The target (this object) to invoke the callback, if it's not given, only callback without target will be removed\n * @example\n * // register fire eventListener\n * var callback = eventTarget.on('fire', function () {\n * cc.log(\"fire in the hole\");\n * }, target);\n * // remove fire event listener\n * eventTarget.off('fire', callback, target);\n * // remove all fire event listeners\n * eventTarget.off('fire');\n */\nproto.__off = proto.off;\nproto.off = function (type, callback, target) {\n if (!callback) {\n let list = this._callbackTable[type];\n if (!list) return;\n let infos = list.callbackInfos;\n for (let i = 0; i < infos.length; ++i) {\n let target = infos[i] && infos[i].target;\n if (target && target.__eventTargets) {\n fastRemove(target.__eventTargets, this);\n }\n }\n this.removeAll(type);\n }\n else {\n this.__off(type, callback, target);\n\n if (target && target.__eventTargets) {\n fastRemove(target.__eventTargets, this);\n }\n }\n};\n\n/**\n * !#en Removes all callbacks previously registered with the same target (passed as parameter).\n * This is not for removing all listeners in the current event target,\n * and this is not for removing all listeners the target parameter have registered.\n * It's only for removing all listeners (callback and target couple) registered on the current event target by the target parameter.\n * !#zh 在当前 EventTarget 上删除指定目标target 参数)注册的所有事件监听器。\n * 这个函数无法删除当前 EventTarget 的所有事件监听器,也无法删除 target 参数所注册的所有事件监听器。\n * 这个函数只能删除 target 参数在当前 EventTarget 上注册的所有事件监听器。\n * @method targetOff\n * @param {Object} target - The target to be searched for all related listeners\n */\nproto.targetOff = function (target) {\n this.removeAll(target);\n \n if (target && target.__eventTargets) {\n fastRemove(target.__eventTargets, this);\n }\n};\n\n/**\n * !#en\n * Register an callback of a specific event type on the EventTarget,\n * the callback will remove itself after the first time it is triggered.\n * !#zh\n * 注册事件目标的特定事件类型回调,回调会在第一时间被触发后删除自身。\n *\n * @method once\n * @param {String} type - A string representing the event type to listen for.\n * @param {Function} callback - The callback that will be invoked when the event is dispatched.\n * The callback is ignored if it is a duplicate (the callbacks are unique).\n * @param {any} [callback.arg1] arg1\n * @param {any} [callback.arg2] arg2\n * @param {any} [callback.arg3] arg3\n * @param {any} [callback.arg4] arg4\n * @param {any} [callback.arg5] arg5\n * @param {Object} [target] - The target (this object) to invoke the callback, can be null\n * @example\n * eventTarget.once('fire', function () {\n * cc.log(\"this is the callback and will be invoked only once\");\n * }, node);\n */\nproto.once = function (type, callback, target) {\n this.on(type, callback, target, true);\n};\n\n/**\n * !#en\n * Send an event with the event object.\n * !#zh\n * 通过事件对象派发事件\n *\n * @method dispatchEvent\n * @param {Event} event\n */\nproto.dispatchEvent = function (event) {\n this.emit(event.type, event);\n};\n\n/**\n * !#en\n * Destroy all callbackInfos.\n * !#zh\n * 销毁记录的事件\n *\n * @method clear\n */\nproto.clear = function () {\n // remove all callback\n for (const key in this._callbackTable) {\n const list = this._callbackTable[key];\n const infos = list.callbackInfos;\n for (let i = infos.length - 1; i >= 0; i--) {\n const info = infos[i];\n if (info) {\n this.off(key, info.callback, info.target);\n }\n }\n }\n};\n\ncc.EventTarget = module.exports = EventTarget;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar js = require(\"../platform/js\");\n\n/**\n * !#en Base class of all kinds of events.\n * !#zh 包含事件相关信息的对象。\n * @class Event\n */\n\n/**\n * @method constructor\n * @param {String} type - The name of the event (case-sensitive), e.g. \"click\", \"fire\", or \"submit\"\n * @param {Boolean} bubbles - A boolean indicating whether the event bubbles up through the tree or not\n */\ncc.Event = function(type, bubbles) {\n /**\n * !#en The name of the event (case-sensitive), e.g. \"click\", \"fire\", or \"submit\".\n * !#zh 事件类型。\n * @property type\n * @type {String}\n */\n this.type = type;\n\n /**\n * !#en Indicate whether the event bubbles up through the tree or not.\n * !#zh 表示该事件是否进行冒泡。\n * @property bubbles\n * @type {Boolean}\n */\n this.bubbles = !!bubbles;\n\n /**\n * !#en A reference to the target to which the event was originally dispatched.\n * !#zh 最初事件触发的目标\n * @property target\n * @type {Object}\n */\n this.target = null;\n\n /**\n * !#en A reference to the currently registered target for the event.\n * !#zh 当前目标\n * @property currentTarget\n * @type {Object}\n */\n this.currentTarget = null;\n\n /**\n * !#en\n * Indicates which phase of the event flow is currently being evaluated.\n * Returns an integer value represented by 4 constants:\n * - Event.NONE = 0\n * - Event.CAPTURING_PHASE = 1\n * - Event.AT_TARGET = 2\n * - Event.BUBBLING_PHASE = 3\n * The phases are explained in the [section 3.1, Event dispatch and DOM event flow]\n * (http://www.w3.org/TR/DOM-Level-3-Events/#event-flow), of the DOM Level 3 Events specification.\n * !#zh 事件阶段\n * @property eventPhase\n * @type {Number}\n */\n this.eventPhase = 0;\n\n /*\n * Indicates whether or not event.stopPropagation() has been called on the event.\n * @property _propagationStopped\n * @type {Boolean}\n * @private\n */\n this._propagationStopped = false;\n\n /*\n * Indicates whether or not event.stopPropagationImmediate() has been called on the event.\n * @property _propagationImmediateStopped\n * @type {Boolean}\n * @private\n */\n this._propagationImmediateStopped = false;\n};\ncc.Event.prototype = {\n constructor: cc.Event,\n\n /**\n * !#en Reset the event for being stored in the object pool.\n * !#zh 重置对象池中存储的事件。\n * @method unuse\n * @returns {String}\n */\n unuse: function () {\n this.type = cc.Event.NO_TYPE;\n this.target = null;\n this.currentTarget = null;\n this.eventPhase = cc.Event.NONE;\n this._propagationStopped = false;\n this._propagationImmediateStopped = false;\n },\n\n /**\n * !#en Reuse the event for being used again by the object pool.\n * !#zh 用于对象池再次使用的事件。\n * @method reuse\n * @returns {String}\n */\n reuse: function (type, bubbles) {\n this.type = type;\n this.bubbles = bubbles || false;\n },\n\n /**\n * !#en Stops propagation for current event.\n * !#zh 停止传递当前事件。\n * @method stopPropagation\n */\n stopPropagation: function () {\n this._propagationStopped = true;\n },\n\n /**\n * !#en Stops propagation for current event immediately,\n * the event won't even be dispatched to the listeners attached in the current target.\n * !#zh 立即停止当前事件的传递,事件甚至不会被分派到所连接的当前目标。\n * @method stopPropagationImmediate\n */\n stopPropagationImmediate: function () {\n this._propagationImmediateStopped = true;\n },\n\n /**\n * !#en Checks whether the event has been stopped.\n * !#zh 检查该事件是否已经停止传递.\n * @method isStopped\n * @returns {Boolean}\n */\n isStopped: function () {\n return this._propagationStopped || this._propagationImmediateStopped;\n },\n\n /**\n * !#en\n * <p>\n * Gets current target of the event <br/>\n * note: It only be available when the event listener is associated with node. <br/>\n * It returns 0 when the listener is associated with fixed priority.\n * </p>\n * !#zh 获取当前目标节点\n * @method getCurrentTarget\n * @returns {Node} The target with which the event associates.\n */\n getCurrentTarget: function () {\n return this.currentTarget;\n },\n\n /**\n * !#en Gets the event type.\n * !#zh 获取事件类型\n * @method getType\n * @returns {String}\n */\n getType: function () {\n return this.type;\n }\n};\n\n//event type\n/**\n * !#en Code for event without type.\n * !#zh 没有类型的事件\n * @property NO_TYPE\n * @static\n * @type {string}\n */\ncc.Event.NO_TYPE = 'no_type';\n\n/**\n * !#en The type code of Touch event.\n * !#zh 触摸事件类型\n * @property TOUCH\n * @static\n * @type {String}\n */\ncc.Event.TOUCH = 'touch';\n/**\n * !#en The type code of Mouse event.\n * !#zh 鼠标事件类型\n * @property MOUSE\n * @static\n * @type {String}\n */\ncc.Event.MOUSE = 'mouse';\n/**\n * !#en The type code of Keyboard event.\n * !#zh 键盘事件类型\n * @property KEYBOARD\n * @static\n * @type {String}\n */\ncc.Event.KEYBOARD = 'keyboard';\n/**\n * !#en The type code of Acceleration event.\n * !#zh 加速器事件类型\n * @property ACCELERATION\n * @static\n * @type {String}\n */\ncc.Event.ACCELERATION = 'acceleration';\n\n//event phase\n/**\n * !#en Events not currently dispatched are in this phase\n * !#zh 尚未派发事件阶段\n * @property NONE\n * @type {Number}\n * @static\n */\ncc.Event.NONE = 0;\n/**\n * !#en\n * The capturing phase comprises the journey from the root to the last node before the event target's node\n * see http://www.w3.org/TR/DOM-Level-3-Events/#event-flow\n * !#zh 捕获阶段,包括事件目标节点之前从根节点到最后一个节点的过程。\n * @property CAPTURING_PHASE\n * @type {Number}\n * @static\n */\ncc.Event.CAPTURING_PHASE = 1;\n/**\n * !#en\n * The target phase comprises only the event target node\n * see http://www.w3.org/TR/DOM-Level-3-Events/#event-flow\n * !#zh 目标阶段仅包括事件目标节点。\n * @property AT_TARGET\n * @type {Number}\n * @static\n */\ncc.Event.AT_TARGET = 2;\n/**\n * !#en\n * The bubbling phase comprises any subsequent nodes encountered on the return trip to the root of the hierarchy\n * see http://www.w3.org/TR/DOM-Level-3-Events/#event-flow\n * !#zh 冒泡阶段, 包括回程遇到到层次根节点的任何后续节点。\n * @property BUBBLING_PHASE\n * @type {Number}\n * @static\n */\ncc.Event.BUBBLING_PHASE = 3;\n\n/**\n * !#en The Custom event\n * !#zh 自定义事件\n * @class Event.EventCustom\n *\n * @extends Event\n */\n\n/**\n * @method constructor\n * @param {String} type - The name of the event (case-sensitive), e.g. \"click\", \"fire\", or \"submit\"\n * @param {Boolean} bubbles - A boolean indicating whether the event bubbles up through the tree or not\n */\nvar EventCustom = function (type, bubbles) {\n cc.Event.call(this, type, bubbles);\n\n /**\n * !#en A reference to the detailed data of the event\n * !#zh 事件的详细数据\n * @property detail\n * @type {Object}\n */\n this.detail = null;\n};\n\njs.extend(EventCustom, cc.Event);\n\nEventCustom.prototype.reset = EventCustom;\n\n/**\n * !#en Sets user data\n * !#zh 设置用户数据\n * @method setUserData\n * @param {*} data\n */\nEventCustom.prototype.setUserData = function (data) {\n this.detail = data;\n};\n\n/**\n * !#en Gets user data\n * !#zh 获取用户数据\n * @method getUserData\n * @returns {*}\n */\nEventCustom.prototype.getUserData = function () {\n return this.detail;\n};\n\n/**\n * !#en Gets event name\n * !#zh 获取事件名称\n * @method getEventName\n * @returns {String}\n */\nEventCustom.prototype.getEventName = cc.Event.prototype.getType;\n\nvar MAX_POOL_SIZE = 10;\nvar _eventPool = new js.Pool(MAX_POOL_SIZE);\nEventCustom.put = function (event) {\n _eventPool.put(event);\n};\nEventCustom.get = function (type, bubbles) {\n var event = _eventPool._get();\n if (event) {\n event.reset(type, bubbles);\n }\n else {\n event = new EventCustom(type, bubbles);\n }\n return event;\n};\n\ncc.Event.EventCustom = EventCustom;\n\nmodule.exports = cc.Event;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n \nrequire('./event');\nrequire('./event-listeners');\nrequire('./event-target');\nrequire('./system-event');\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar EventTarget = require('../event/event-target');\nvar eventManager = require('../event-manager');\nvar inputManger = require('../platform/CCInputManager');;\n\n/**\n * !#en The event type supported by SystemEvent\n * !#zh SystemEvent 支持的事件类型\n * @class SystemEvent.EventType\n * @static\n * @namespace SystemEvent\n */\nvar EventType = cc.Enum({\n /**\n * !#en The event type for press the key down event, you can use its value directly: 'keydown'\n * !#zh 当按下按键时触发的事件\n * @property KEY_DOWN\n * @type {String}\n * @static\n */\n KEY_DOWN: 'keydown',\n /**\n * !#en The event type for press the key up event, you can use its value directly: 'keyup'\n * !#zh 当松开按键时触发的事件\n * @property KEY_UP\n * @type {String}\n * @static\n */\n KEY_UP: 'keyup',\n /**\n * !#en The event type for press the devicemotion event, you can use its value directly: 'devicemotion'\n * !#zh 重力感应\n * @property DEVICEMOTION\n * @type {String}\n * @static\n */\n DEVICEMOTION: 'devicemotion'\n\n});\n\n/**\n * !#en\n * The System event, it currently supports keyboard events and accelerometer events.<br>\n * You can get the SystemEvent instance with cc.systemEvent.<br>\n * !#zh\n * 系统事件,它目前支持按键事件和重力感应事件。<br>\n * 你可以通过 cc.systemEvent 获取到 SystemEvent 的实例。<br>\n * @class SystemEvent\n * @extends EventTarget\n * @example\n * cc.systemEvent.on(cc.SystemEvent.EventType.DEVICEMOTION, this.onDeviceMotionEvent, this);\n * cc.systemEvent.off(cc.SystemEvent.EventType.DEVICEMOTION, this.onDeviceMotionEvent, this);\n */\n\nvar keyboardListener = null;\nvar accelerationListener = null;\nvar SystemEvent = cc.Class({\n name: 'SystemEvent',\n extends: EventTarget,\n\n statics: {\n EventType: EventType\n },\n\n /**\n * !#en whether enable accelerometer event\n * !#zh 是否启用加速度计事件\n * @method setAccelerometerEnabled\n * @param {Boolean} isEnable\n */\n setAccelerometerEnabled: function (isEnable) {\n if (CC_EDITOR) {\n return;\n }\n\n // for iOS 13+\n if (isEnable && window.DeviceMotionEvent && typeof DeviceMotionEvent.requestPermission === 'function') {\n DeviceMotionEvent.requestPermission().then(response => {\n console.log(`Device Motion Event request permission: ${response}`);\n inputManger.setAccelerometerEnabled(response === 'granted');\n });\n } else {\n inputManger.setAccelerometerEnabled(isEnable);\n }\n },\n\n /**\n * !#en set accelerometer interval value\n * !#zh 设置加速度计间隔值\n * @method setAccelerometerInterval\n * @param {Number} interval\n */\n setAccelerometerInterval: function(interval) {\n if (CC_EDITOR) {\n return;\n }\n inputManger.setAccelerometerInterval(interval);\n },\n\n on: function (type, callback, target, once) {\n if (CC_EDITOR) {\n return;\n }\n this._super(type, callback, target, once);\n\n // Keyboard\n if (type === EventType.KEY_DOWN || type === EventType.KEY_UP) {\n if (!keyboardListener) {\n keyboardListener = cc.EventListener.create({\n event: cc.EventListener.KEYBOARD,\n onKeyPressed: function (keyCode, event) {\n event.type = EventType.KEY_DOWN;\n cc.systemEvent.dispatchEvent(event);\n },\n onKeyReleased: function (keyCode, event) {\n event.type = EventType.KEY_UP;\n cc.systemEvent.dispatchEvent(event);\n }\n });\n }\n if (!eventManager.hasEventListener(cc.EventListener.ListenerID.KEYBOARD)) {\n eventManager.addListener(keyboardListener, 1);\n }\n }\n\n // Acceleration\n if (type === EventType.DEVICEMOTION) {\n if (!accelerationListener) {\n accelerationListener = cc.EventListener.create({\n event: cc.EventListener.ACCELERATION,\n callback: function (acc, event) {\n event.type = EventType.DEVICEMOTION;\n cc.systemEvent.dispatchEvent(event);\n }\n });\n }\n if (!eventManager.hasEventListener(cc.EventListener.ListenerID.ACCELERATION)) {\n eventManager.addListener(accelerationListener, 1);\n }\n }\n },\n\n\n off: function (type, callback, target) {\n if (CC_EDITOR) {\n return;\n }\n this._super(type, callback, target);\n\n // Keyboard\n if (keyboardListener && (type === EventType.KEY_DOWN || type === EventType.KEY_UP)) {\n var hasKeyDownEventListener = this.hasEventListener(EventType.KEY_DOWN);\n var hasKeyUpEventListener = this.hasEventListener(EventType.KEY_UP);\n if (!hasKeyDownEventListener && !hasKeyUpEventListener) {\n eventManager.removeListener(keyboardListener);\n }\n }\n\n // Acceleration\n if (accelerationListener && type === EventType.DEVICEMOTION) {\n eventManager.removeListener(accelerationListener);\n }\n }\n\n});\n\ncc.SystemEvent = module.exports = SystemEvent;\n/**\n * @module cc\n */\n\n/**\n * !#en The System event singleton for global usage\n * !#zh 系统事件单例,方便全局使用\n * @property systemEvent\n * @type {SystemEvent}\n */\ncc.systemEvent = new cc.SystemEvent();\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst RenderComponent = require('../components/CCRenderComponent');\nconst Material = require('../assets/material/CCMaterial');\n\nconst Types = require('./types');\nconst LineCap = Types.LineCap;\nconst LineJoin = Types.LineJoin;\n\n/**\n * @class Graphics\n * @extends RenderComponent\n */\nlet Graphics = cc.Class({\n name: 'cc.Graphics',\n extends: RenderComponent,\n\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.renderers/Graphics',\n },\n\n ctor () {\n this._impl = new Graphics._Impl(this);\n },\n\n properties: {\n _lineWidth: 2,\n _strokeColor: cc.Color.BLACK,\n _lineJoin: LineJoin.MITER,\n _lineCap: LineCap.BUTT,\n _fillColor: cc.Color.WHITE,\n _miterLimit: 10,\n \n /**\n * !#en\n * Current line width.\n * !#zh\n * 当前线条宽度\n * @property {Number} lineWidth\n * @default 1\n */\n lineWidth: {\n get () {\n return this._lineWidth;\n },\n set (value) {\n this._lineWidth = value;\n this._impl.lineWidth = value;\n }\n },\n\n /**\n * !#en\n * lineJoin determines how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together.\n * !#zh\n * lineJoin 用来设置2个长度不为0的相连部分线段圆弧曲线如何连接在一起的属性。\n * @property {Graphics.LineJoin} lineJoin\n * @default LineJoin.MITER\n */\n lineJoin: {\n get () {\n return this._lineJoin;\n },\n set (value) {\n this._lineJoin = value;\n this._impl.lineJoin = value;\n },\n type: LineJoin\n },\n\n /**\n * !#en\n * lineCap determines how the end points of every line are drawn.\n * !#zh\n * lineCap 指定如何绘制每一条线段末端。\n * @property {Graphics.LineCap} lineCap\n * @default LineCap.BUTT\n */\n lineCap: {\n get () {\n return this._lineCap;\n },\n set (value) {\n this._lineCap = value;\n this._impl.lineCap = value;\n },\n type: LineCap\n },\n\n /**\n * !#en\n * stroke color\n * !#zh\n * 线段颜色\n * @property {Color} strokeColor\n * @default Color.BLACK\n */\n strokeColor: {\n get () {\n return this._strokeColor;\n },\n set (value) {\n this._impl.strokeColor = this._strokeColor = cc.color(value);\n }\n },\n\n /**\n * !#en\n * fill color\n * !#zh\n * 填充颜色\n * @property {Color} fillColor\n * @default Color.WHITE\n */\n fillColor: {\n get () {\n return this._fillColor;\n },\n set (value) {\n this._impl.fillColor = this._fillColor = cc.color(value);\n }\n },\n\n /**\n * !#en\n * Sets the miter limit ratio\n * !#zh\n * 设置斜接面限制比例\n * @property {Number} miterLimit\n * @default 10\n */\n miterLimit: {\n get () {\n return this._miterLimit;\n },\n set (value) {\n this._miterLimit = value;\n this._impl.miterLimit = value;\n }\n }\n },\n\n statics: {\n LineJoin: LineJoin,\n LineCap: LineCap\n },\n\n onRestore () {\n if (!this._impl) {\n this._impl = new Graphics._Impl(this);\n }\n },\n\n onDestroy () {\n this.clear(true);\n this._super();\n this._impl = null;\n },\n\n _getDefaultMaterial () {\n return Material.getBuiltinMaterial('2d-graphics');\n },\n\n _updateMaterial () {\n let material = this._materials[0];\n if (!material) return;\n if (material.getDefine('CC_USE_MODEL') !== undefined) {\n material.define('CC_USE_MODEL', true);\n }\n if (material.getDefine('CC_SUPPORT_standard_derivatives') !== undefined && cc.sys.glExtension('OES_standard_derivatives')) {\n material.define('CC_SUPPORT_standard_derivatives', true);\n }\n },\n\n /**\n * !#en Move path start point to (x,y).\n * !#zh 移动路径起点到坐标(x, y)\n * @method moveTo\n * @param {Number} [x] The x axis of the coordinate for the end point.\n * @param {Number} [y] The y axis of the coordinate for the end point.\n */\n moveTo (x, y) {\n if (CC_DEBUG && x instanceof cc.Vec2) {\n cc.warn('[moveTo] : Can not pass Vec2 as [x, y] value, please check it.');\n return;\n }\n this._impl.moveTo(x, y);\n },\n\n /**\n * !#en Adds a straight line to the path\n * !#zh 绘制直线路径\n * @method lineTo\n * @param {Number} [x] The x axis of the coordinate for the end point.\n * @param {Number} [y] The y axis of the coordinate for the end point.\n */\n lineTo (x, y) {\n if (CC_DEBUG && x instanceof cc.Vec2) {\n cc.warn('[moveTo] : Can not pass Vec2 as [x, y] value, please check it.');\n return;\n }\n this._impl.lineTo(x, y);\n },\n\n /**\n * !#en Adds a cubic Bézier curve to the path\n * !#zh 绘制三次贝赛尔曲线路径\n * @method bezierCurveTo\n * @param {Number} [c1x] The x axis of the coordinate for the first control point.\n * @param {Number} [c1y] The y axis of the coordinate for first control point.\n * @param {Number} [c2x] The x axis of the coordinate for the second control point.\n * @param {Number} [c2y] The y axis of the coordinate for the second control point.\n * @param {Number} [x] The x axis of the coordinate for the end point.\n * @param {Number} [y] The y axis of the coordinate for the end point.\n */\n bezierCurveTo (c1x, c1y, c2x, c2y, x, y) {\n this._impl.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n },\n\n /**\n * !#en Adds a quadratic Bézier curve to the path\n * !#zh 绘制二次贝赛尔曲线路径\n * @method quadraticCurveTo\n * @param {Number} [cx] The x axis of the coordinate for the control point.\n * @param {Number} [cy] The y axis of the coordinate for the control point.\n * @param {Number} [x] The x axis of the coordinate for the end point.\n * @param {Number} [y] The y axis of the coordinate for the end point.\n */\n quadraticCurveTo (cx, cy, x, y) {\n this._impl.quadraticCurveTo(cx, cy, x, y);\n },\n\n /**\n * !#en Adds an arc to the path which is centered at (cx, cy) position with radius r starting at startAngle and ending at endAngle going in the given direction by counterclockwise (defaulting to false).\n * !#zh 绘制圆弧路径。圆弧路径的圆心在 (cx, cy) 位置,半径为 r ,根据 counterclockwise 默认为false指定的方向从 startAngle 开始绘制,到 endAngle 结束。\n * @method arc\n * @param {Number} [cx] The x axis of the coordinate for the center point.\n * @param {Number} [cy] The y axis of the coordinate for the center point.\n * @param {Number} [r] The arc's radius.\n * @param {Number} [startAngle] The angle at which the arc starts, measured clockwise from the positive x axis and expressed in radians.\n * @param {Number} [endAngle] The angle at which the arc ends, measured clockwise from the positive x axis and expressed in radians.\n * @param {Boolean} [counterclockwise] An optional Boolean which, if true, causes the arc to be drawn counter-clockwise between the two angles. By default it is drawn clockwise.\n */\n arc (cx, cy, r, startAngle, endAngle, counterclockwise) {\n this._impl.arc(cx, cy, r, startAngle, endAngle, counterclockwise);\n },\n\n /**\n * !#en Adds an ellipse to the path.\n * !#zh 绘制椭圆路径。\n * @method ellipse\n * @param {Number} [cx] The x axis of the coordinate for the center point.\n * @param {Number} [cy] The y axis of the coordinate for the center point.\n * @param {Number} [rx] The ellipse's x-axis radius.\n * @param {Number} [ry] The ellipse's y-axis radius.\n */\n ellipse (cx, cy, rx, ry) {\n this._impl.ellipse(cx, cy, rx, ry);\n },\n\n /**\n * !#en Adds an circle to the path.\n * !#zh 绘制圆形路径。\n * @method circle\n * @param {Number} [cx] The x axis of the coordinate for the center point.\n * @param {Number} [cy] The y axis of the coordinate for the center point.\n * @param {Number} [r] The circle's radius.\n */\n circle (cx, cy, r) {\n this._impl.circle(cx, cy, r);\n },\n\n /**\n * !#en Adds an rectangle to the path.\n * !#zh 绘制矩形路径。\n * @method rect\n * @param {Number} [x] The x axis of the coordinate for the rectangle starting point.\n * @param {Number} [y] The y axis of the coordinate for the rectangle starting point.\n * @param {Number} [w] The rectangle's width.\n * @param {Number} [h] The rectangle's height.\n */\n rect (x, y, w, h) {\n this._impl.rect(x, y, w, h);\n },\n\n /**\n * !#en Adds an round corner rectangle to the path. \n * !#zh 绘制圆角矩形路径。\n * @method roundRect\n * @param {Number} [x] The x axis of the coordinate for the rectangle starting point.\n * @param {Number} [y] The y axis of the coordinate for the rectangle starting point.\n * @param {Number} [w] The rectangles width.\n * @param {Number} [h] The rectangle's height.\n * @param {Number} [r] The radius of the rectangle.\n */\n roundRect (x, y, w, h, r) {\n this._impl.roundRect(x, y, w, h, r);\n },\n\n /**\n * !#en Draws a filled rectangle.\n * !#zh 绘制填充矩形。\n * @method fillRect\n * @param {Number} [x] The x axis of the coordinate for the rectangle starting point.\n * @param {Number} [y] The y axis of the coordinate for the rectangle starting point.\n * @param {Number} [w] The rectangle's width.\n * @param {Number} [h] The rectangle's height.\n */\n fillRect (x, y, w, h) {\n this.rect(x, y, w, h);\n this.fill();\n },\n\n /**\n * !#en Erasing any previously drawn content.\n * !#zh 擦除之前绘制的所有内容的方法。\n * @method clear\n * @param {Boolean} [clean] Whether to clean the graphics inner cache.\n */\n clear (clean) {\n this._impl.clear(clean);\n if (this._assembler) {\n this._assembler.clear(clean);\n }\n },\n\n /**\n * !#en Causes the point of the pen to move back to the start of the current path. It tries to add a straight line from the current point to the start.\n * !#zh 将笔点返回到当前路径起始点的。它尝试从当前点到起始点绘制一条直线。\n * @method close\n */\n close () {\n this._impl.close();\n },\n\n /**\n * !#en Strokes the current or given path with the current stroke style.\n * !#zh 根据当前的画线样式,绘制当前或已经存在的路径。\n * @method stroke\n */\n stroke () {\n if (!this._assembler) {\n this._resetAssembler();\n }\n this._assembler.stroke(this);\n },\n\n /**\n * !#en Fills the current or given path with the current fill style.\n * !#zh 根据当前的画线样式,填充当前或已经存在的路径。\n * @method fill\n */\n fill () {\n if (!this._assembler) {\n this._resetAssembler();\n }\n this._assembler.fill(this);\n }\n});\n\ncc.Graphics = module.exports = Graphics;\ncc.Graphics.Types = Types;\ncc.Graphics.Helper = require('./helper');\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst PointFlags = require('./types').PointFlags;\n\nvar PI = Math.PI;\nvar min = Math.min;\nvar max = Math.max;\nvar cos = Math.cos;\nvar sin = Math.sin;\nvar abs = Math.abs;\nvar sign = Math.sign;\n\nvar KAPPA90 = 0.5522847493;\n\nfunction arc (ctx, cx, cy, r, startAngle, endAngle, counterclockwise) {\n counterclockwise = counterclockwise || false;\n\n var a = 0, da = 0, hda = 0, kappa = 0;\n var dx = 0, dy = 0, x = 0, y = 0, tanx = 0, tany = 0;\n var px = 0, py = 0, ptanx = 0, ptany = 0;\n var i, ndivs;\n\n // Clamp angles\n da = endAngle - startAngle;\n if (counterclockwise) {\n if (abs(da) >= PI * 2) {\n da = PI * 2;\n } else {\n while (da < 0) da += PI * 2;\n }\n } else {\n if (abs(da) >= PI * 2) {\n da = -PI * 2;\n } else {\n while (da > 0) da -= PI * 2;\n }\n }\n\n // Split arc into max 90 degree segments.\n ndivs = max(1, min(abs(da) / (PI * 0.5) + 0.5, 5)) | 0;\n hda = da / ndivs / 2.0;\n kappa = abs(4.0 / 3.0 * (1 - cos(hda)) / sin(hda));\n\n if (!counterclockwise) kappa = -kappa;\n\n for (i = 0; i <= ndivs; i++) {\n a = startAngle + da * (i / ndivs);\n dx = cos(a);\n dy = sin(a);\n x = cx + dx * r;\n y = cy + dy * r;\n tanx = -dy * r * kappa;\n tany = dx * r * kappa;\n\n if (i === 0) {\n ctx.moveTo(x, y);\n } else {\n ctx.bezierCurveTo(px + ptanx, py + ptany, x - tanx, y - tany, x, y);\n }\n px = x;\n py = y;\n ptanx = tanx;\n ptany = tany;\n }\n}\n\nfunction ellipse (ctx, cx, cy, rx, ry) {\n ctx.moveTo(cx - rx, cy);\n ctx.bezierCurveTo(cx - rx, cy + ry * KAPPA90, cx - rx * KAPPA90, cy + ry, cx, cy + ry);\n ctx.bezierCurveTo(cx + rx * KAPPA90, cy + ry, cx + rx, cy + ry * KAPPA90, cx + rx, cy);\n ctx.bezierCurveTo(cx + rx, cy - ry * KAPPA90, cx + rx * KAPPA90, cy - ry, cx, cy - ry);\n ctx.bezierCurveTo(cx - rx * KAPPA90, cy - ry, cx - rx, cy - ry * KAPPA90, cx - rx, cy);\n ctx.close();\n}\n\nfunction roundRect (ctx, x, y, w, h, r) {\n if (r < 0.1) {\n ctx.rect(x, y, w, h);\n return;\n } else {\n var rx = min(r, abs(w) * 0.5) * sign(w),\n ry = min(r, abs(h) * 0.5) * sign(h);\n\n ctx.moveTo(x, y + ry);\n ctx.lineTo(x, y + h - ry);\n ctx.bezierCurveTo(x, y + h - ry * (1 - KAPPA90), x + rx * (1 - KAPPA90), y + h, x + rx, y + h);\n ctx.lineTo(x + w - rx, y + h);\n ctx.bezierCurveTo(x + w - rx * (1 - KAPPA90), y + h, x + w, y + h - ry * (1 - KAPPA90), x + w, y + h - ry);\n ctx.lineTo(x + w, y + ry);\n ctx.bezierCurveTo(x + w, y + ry * (1 - KAPPA90), x + w - rx * (1 - KAPPA90), y, x + w - rx, y);\n ctx.lineTo(x + rx, y);\n ctx.bezierCurveTo(x + rx * (1 - KAPPA90), y, x, y + ry * (1 - KAPPA90), x, y + ry);\n ctx.close();\n }\n}\n\nfunction tesselateBezier (ctx, x1, y1, x2, y2, x3, y3, x4, y4, level, type) {\n var x12, y12, x23, y23, x34, y34, x123, y123, x234, y234, x1234, y1234;\n var dx, dy, d2, d3;\n\n if (level > 10) return;\n\n x12 = (x1 + x2) * 0.5;\n y12 = (y1 + y2) * 0.5;\n x23 = (x2 + x3) * 0.5;\n y23 = (y2 + y3) * 0.5;\n x34 = (x3 + x4) * 0.5;\n y34 = (y3 + y4) * 0.5;\n x123 = (x12 + x23) * 0.5;\n y123 = (y12 + y23) * 0.5;\n\n dx = x4 - x1;\n dy = y4 - y1;\n d2 = abs((x2 - x4) * dy - (y2 - y4) * dx);\n d3 = abs((x3 - x4) * dy - (y3 - y4) * dx);\n\n if ((d2 + d3) * (d2 + d3) < ctx._tessTol * (dx * dx + dy * dy)) {\n ctx._addPoint(x4, y4, type === 0 ? type | PointFlags.PT_BEVEL : type);\n return;\n }\n\n x234 = (x23 + x34) * 0.5;\n y234 = (y23 + y34) * 0.5;\n x1234 = (x123 + x234) * 0.5;\n y1234 = (y123 + y234) * 0.5;\n\n tesselateBezier(ctx, x1, y1, x12, y12, x123, y123, x1234, y1234, level + 1, 0);\n tesselateBezier(ctx, x1234, y1234, x234, y234, x34, y34, x4, y4, level + 1, type);\n}\n\nmodule.exports = {\n arc: arc,\n ellipse: ellipse,\n roundRect: roundRect,\n tesselateBezier: tesselateBezier\n};\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n'use strict';\n\nrequire('./graphics');\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n \n'use strict';\n\n/**\n * !#en Enum for LineCap.\n * !#zh 线段末端属性\n * @enum Graphics.LineCap\n */\nvar LineCap = cc.Enum({\n /**\n * !#en The ends of lines are squared off at the endpoints.\n * !#zh 线段末端以方形结束。\n * @property {Number} BUTT\n */\n BUTT: 0,\n\n /**\n * !#en The ends of lines are rounded.\n * !#zh 线段末端以圆形结束。\n * @property {Number} ROUND\n */\n ROUND: 1,\n\n /**\n * !#en The ends of lines are squared off by adding a box with an equal width and half the height of the line's thickness.\n * !#zh 线段末端以方形结束,但是增加了一个宽度和线段相同,高度是线段厚度一半的矩形区域。\n * @property {Number} SQUARE\n */\n SQUARE: 2,\n});\n\n/**\n * !#en Enum for LineJoin.\n * !#zh 线段拐角属性\n * @enum Graphics.LineJoin\n */\nvar LineJoin = cc.Enum({\n /**\n * !#en Fills an additional triangular area between the common endpoint of connected segments, and the separate outside rectangular corners of each segment.\n * !#zh 在相连部分的末端填充一个额外的以三角形为底的区域, 每个部分都有各自独立的矩形拐角。\n * @property {Number} BEVEL\n */\n BEVEL: 0,\n\n /**\n * !#en Rounds off the corners of a shape by filling an additional sector of disc centered at the common endpoint of connected segments. The radius for these rounded corners is equal to the line width.\n * !#zh 通过填充一个额外的,圆心在相连部分末端的扇形,绘制拐角的形状。 圆角的半径是线段的宽度。\n * @property {Number} ROUND\n */\n ROUND: 1,\n\n /**\n * !#en Connected segments are joined by extending their outside edges to connect at a single point, with the effect of filling an additional lozenge-shaped area.\n * !#zh 通过延伸相连部分的外边缘,使其相交于一点,形成一个额外的菱形区域。\n * @property {Number} MITER\n */\n MITER: 2\n});\n\n\n// PointFlags\nvar PointFlags = cc.Enum({\n PT_CORNER: 0x01,\n PT_LEFT: 0x02,\n PT_BEVEL: 0x04,\n PT_INNERBEVEL: 0x08,\n});\n\nmodule.exports = {\n LineCap: LineCap,\n LineJoin: LineJoin,\n PointFlags: PointFlags\n};\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nrequire('./platform');\nrequire('./assets');\n\nif (!CC_EDITOR || !Editor.isMainProcess) {\n require('./CCNode');\n require('./CCPrivateNode');\n require('./CCScene');\n\n require('./components');\n require('./graphics');\n require('./collider');\n // CCIntersection can be used separately.\n require('./collider/CCIntersection');\n require('./physics');\n require('./camera/CCCamera');\n require('./geom-utils');\n\n require('./sp');\n}\n\nrequire('./mesh');\nrequire('./3d');\n\nrequire('./base-ui/CCWidgetManager');\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar CompScheduler = require('./component-scheduler');\nvar Flags = require('./platform/CCObject').Flags;\nvar js = require('./platform/js');\nvar callerFunctor = CC_EDITOR && require('./utils/misc').tryCatchFunctor_EDITOR;\n\nvar MAX_POOL_SIZE = 4;\n\nvar IsPreloadStarted = Flags.IsPreloadStarted;\nvar IsOnLoadStarted = Flags.IsOnLoadStarted;\nvar IsOnLoadCalled = Flags.IsOnLoadCalled;\nvar Deactivating = Flags.Deactivating;\n\nvar callPreloadInTryCatch = CC_EDITOR && callerFunctor('__preload');\nvar callOnLoadInTryCatch = CC_EDITOR && function (c) {\n try {\n c.onLoad();\n }\n catch (e) {\n cc._throw(e);\n }\n c._objFlags |= IsOnLoadCalled;\n _onLoadInEditor(c);\n};\nvar callOnDestroyInTryCatch = CC_EDITOR && callerFunctor('onDestroy');\nvar callOnFocusInTryCatch = CC_EDITOR && callerFunctor('onFocusInEditor');\nvar callOnLostFocusInTryCatch = CC_EDITOR && callerFunctor('onLostFocusInEditor');\n\n// for __preload: use internally, no sort\nvar UnsortedInvoker = cc.Class({\n extends: CompScheduler.LifeCycleInvoker,\n add (comp) {\n this._zero.array.push(comp);\n },\n remove (comp) {\n this._zero.fastRemove(comp);\n },\n cancelInactive (flagToClear) {\n CompScheduler.LifeCycleInvoker.stableRemoveInactive(this._zero, flagToClear);\n },\n invoke () {\n this._invoke(this._zero);\n this._zero.array.length = 0;\n },\n});\n\nvar invokePreload = CC_SUPPORT_JIT ?\n CompScheduler.createInvokeImpl('c.__preload();') :\n CompScheduler.createInvokeImpl(function (c) { c.__preload(); }, false, undefined, function (iterator) {\n var array = iterator.array;\n for (iterator.i = 0; iterator.i < array.length; ++iterator.i) {\n array[iterator.i].__preload();\n }\n });\nvar invokeOnLoad = CC_SUPPORT_JIT ?\n CompScheduler.createInvokeImpl('c.onLoad();c._objFlags|=' + IsOnLoadCalled, false, IsOnLoadCalled) :\n CompScheduler.createInvokeImpl(function (c) {\n c.onLoad();\n c._objFlags |= IsOnLoadCalled;\n },\n false,\n IsOnLoadCalled,\n function (iterator) {\n var array = iterator.array;\n for (iterator.i = 0; iterator.i < array.length; ++iterator.i) {\n let comp = array[iterator.i];\n comp.onLoad();\n comp._objFlags |= IsOnLoadCalled;\n }\n }\n );\n\n\nvar activateTasksPool = new js.Pool(MAX_POOL_SIZE);\nactivateTasksPool.get = function getActivateTask () {\n var task = this._get() || {\n preload: new UnsortedInvoker(invokePreload),\n onLoad: new CompScheduler.OneOffInvoker(invokeOnLoad),\n onEnable: new CompScheduler.OneOffInvoker(CompScheduler.invokeOnEnable)\n };\n\n // reset index to -1 so we can skip invoked component in cancelInactive\n task.preload._zero.i = -1;\n var invoker = task.onLoad;\n invoker._zero.i = -1;\n invoker._neg.i = -1;\n invoker._pos.i = -1;\n invoker = task.onEnable;\n invoker._zero.i = -1;\n invoker._neg.i = -1;\n invoker._pos.i = -1;\n\n return task;\n};\n\nfunction _componentCorrupted (node, comp, index) {\n if (CC_DEV) {\n cc.errorID(3817, node.name, index);\n console.log('Corrupted component value:', comp);\n }\n if (comp) {\n node._removeComponent(comp);\n }\n else {\n js.array.removeAt(node._components, index);\n }\n}\n\nfunction _onLoadInEditor (comp) {\n if (comp.onLoad && !cc.engine._isPlaying) {\n var focused = Editor.Selection.curActivate('node') === comp.node.uuid;\n if (focused) {\n comp.onFocusInEditor && callOnFocusInTryCatch(comp);\n }\n else {\n comp.onLostFocusInEditor && callOnLostFocusInTryCatch(comp);\n }\n }\n if ( !CC_TEST ) {\n _Scene.AssetsWatcher.start(comp);\n }\n}\n\n/**\n * The class used to perform activating and deactivating operations of node and component.\n */\nfunction ctor () {\n // a stack of node's activating tasks\n this._activatingStack = [];\n}\nvar NodeActivator = cc.Class({\n ctor: ctor,\n reset: ctor,\n\n _activateNodeRecursively (node, preloadInvoker, onLoadInvoker, onEnableInvoker) {\n if (node._objFlags & Deactivating) {\n // en:\n // Forbid reactive the same node during its deactivating procedure\n // to avoid endless loop and simplify the implementation.\n // zh:\n // 对相同节点而言,无法撤销反激活,防止反激活 - 激活 - 反激活的死循环发生。\n // 这样设计简化了一些引擎的实现,而且对调用者来说能保证反激活操作都能成功。\n cc.errorID(3816, node.name);\n return;\n }\n\n node._activeInHierarchy = true;\n\n // component maybe added during onEnable, and the onEnable of new component is already called\n // so we should record the origin length\n var originCount = node._components.length;\n // activate components\n for (let i = 0; i < originCount; ++i) {\n let component = node._components[i];\n if (component instanceof cc.Component) {\n this.activateComp(component, preloadInvoker, onLoadInvoker, onEnableInvoker);\n }\n else {\n _componentCorrupted(node, component, i);\n --i;\n --originCount;\n }\n }\n\n node._childArrivalOrder = node._children.length;\n \n // activate children recursively\n for (let i = 0, len = node._children.length; i < len; ++i) {\n let child = node._children[i];\n child._localZOrder = (child._localZOrder & 0xffff0000) | (i + 1);\n if (child._active) {\n this._activateNodeRecursively(child, preloadInvoker, onLoadInvoker, onEnableInvoker);\n }\n }\n node._onPostActivated(true);\n },\n\n _deactivateNodeRecursively (node) {\n if (CC_DEV) {\n cc.assert(!(node._objFlags & Deactivating), 'node should not deactivating');\n // ensures _activeInHierarchy is always changing when Deactivating flagged\n cc.assert(node._activeInHierarchy, 'node should not deactivated');\n }\n node._objFlags |= Deactivating;\n node._activeInHierarchy = false;\n\n // component maybe added during onEnable, and the onEnable of new component is already called\n // so we should record the origin length\n var originCount = node._components.length;\n for (let c = 0; c < originCount; ++c) {\n let component = node._components[c];\n if (component._enabled) {\n cc.director._compScheduler.disableComp(component);\n\n if (node._activeInHierarchy) {\n // reactivated from root\n node._objFlags &= ~Deactivating;\n return;\n }\n }\n }\n for (let i = 0, len = node._children.length; i < len; ++i) {\n let child = node._children[i];\n if (child._activeInHierarchy) {\n this._deactivateNodeRecursively(child);\n\n if (node._activeInHierarchy) {\n // reactivated from root\n node._objFlags &= ~Deactivating;\n return;\n }\n }\n }\n\n node._onPostActivated(false);\n node._objFlags &= ~Deactivating;\n },\n\n activateNode (node, active) {\n if (active) {\n var task = activateTasksPool.get();\n this._activatingStack.push(task);\n\n this._activateNodeRecursively(node, task.preload, task.onLoad, task.onEnable);\n task.preload.invoke();\n task.onLoad.invoke();\n task.onEnable.invoke();\n\n this._activatingStack.pop();\n activateTasksPool.put(task);\n }\n else {\n this._deactivateNodeRecursively(node);\n\n // remove children of this node from previous activating tasks to debounce\n // (this is an inefficient operation but it ensures general case could be implemented in a efficient way)\n var stack = this._activatingStack;\n for (var i = 0; i < stack.length; i++) {\n var lastTask = stack[i];\n lastTask.preload.cancelInactive(IsPreloadStarted);\n lastTask.onLoad.cancelInactive(IsOnLoadStarted);\n lastTask.onEnable.cancelInactive();\n }\n }\n node.emit('active-in-hierarchy-changed', node);\n },\n\n activateComp: CC_EDITOR ? function (comp, preloadInvoker, onLoadInvoker, onEnableInvoker) {\n if (!cc.isValid(comp, true)) {\n // destroyed before activating\n return;\n }\n if (cc.engine._isPlaying || comp.constructor._executeInEditMode) {\n if (!(comp._objFlags & IsPreloadStarted)) {\n comp._objFlags |= IsPreloadStarted;\n if (comp.__preload) {\n if (preloadInvoker) {\n preloadInvoker.add(comp);\n }\n else {\n callPreloadInTryCatch(comp);\n }\n }\n }\n if (!(comp._objFlags & IsOnLoadStarted)) {\n comp._objFlags |= IsOnLoadStarted;\n if (comp.onLoad) {\n if (onLoadInvoker) {\n onLoadInvoker.add(comp);\n }\n else {\n callOnLoadInTryCatch(comp);\n }\n }\n else {\n comp._objFlags |= IsOnLoadCalled;\n _onLoadInEditor(comp);\n }\n }\n }\n if (comp._enabled) {\n var deactivatedOnLoading = !comp.node._activeInHierarchy;\n if (deactivatedOnLoading) {\n return;\n }\n cc.director._compScheduler.enableComp(comp, onEnableInvoker);\n }\n } : function (comp, preloadInvoker, onLoadInvoker, onEnableInvoker) {\n if (!cc.isValid(comp, true)) {\n // destroyed before activating\n return;\n }\n if (!(comp._objFlags & IsPreloadStarted)) {\n comp._objFlags |= IsPreloadStarted;\n if (comp.__preload) {\n if (preloadInvoker) {\n preloadInvoker.add(comp);\n }\n else {\n comp.__preload();\n }\n }\n }\n if (!(comp._objFlags & IsOnLoadStarted)) {\n comp._objFlags |= IsOnLoadStarted;\n if (comp.onLoad) {\n if (onLoadInvoker) {\n onLoadInvoker.add(comp);\n }\n else {\n comp.onLoad();\n comp._objFlags |= IsOnLoadCalled;\n }\n }\n else {\n comp._objFlags |= IsOnLoadCalled;\n }\n }\n if (comp._enabled) {\n var deactivatedOnLoading = !comp.node._activeInHierarchy;\n if (deactivatedOnLoading) {\n return;\n }\n cc.director._compScheduler.enableComp(comp, onEnableInvoker);\n }\n },\n\n destroyComp: CC_EDITOR ? function (comp) {\n // ensure onDisable called\n cc.director._compScheduler.disableComp(comp);\n\n if (comp.onDestroy && (comp._objFlags & IsOnLoadCalled)) {\n if (cc.engine._isPlaying || comp.constructor._executeInEditMode) {\n callOnDestroyInTryCatch(comp);\n comp._objFlags &= ~IsOnLoadCalled; // In case call onDestroy twice in undo operation\n }\n }\n } : function (comp) {\n // ensure onDisable called\n cc.director._compScheduler.disableComp(comp);\n\n if (comp.onDestroy && (comp._objFlags & IsOnLoadCalled)) {\n comp.onDestroy();\n }\n },\n\n resetComp: CC_EDITOR && function (comp, didResetToDefault) {\n if (comp.resetInEditor) {\n try {\n comp.resetInEditor(didResetToDefault);\n }\n catch (e) {\n cc._throw(e);\n }\n }\n }\n});\n\nmodule.exports = NodeActivator;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar js = require('./js');\nvar Enum = require('./CCEnum');\nvar utils = require('./utils');\nvar _isPlainEmptyObj_DEV = utils.isPlainEmptyObj_DEV;\nvar _cloneable_DEV = utils.cloneable_DEV;\nvar Attr = require('./attribute');\nvar DELIMETER = Attr.DELIMETER;\nvar preprocess = require('./preprocess-class');\nrequire('./requiring-frame');\n\nvar BUILTIN_ENTRIES = ['name', 'extends', 'mixins', 'ctor', '__ctor__', 'properties', 'statics', 'editor', '__ES6__'];\n\nvar INVALID_STATICS_DEV = CC_DEV && ['name', '__ctors__', '__props__', '__values__', 'arguments', 'call', 'apply', 'caller',\n 'length', 'prototype'];\n\nfunction pushUnique (array, item) {\n if (array.indexOf(item) < 0) {\n array.push(item);\n }\n}\n\nvar deferredInitializer = {\n\n // Configs for classes which needs deferred initialization\n datas: null,\n\n // register new class\n // data - {cls: cls, cb: properties, mixins: options.mixins}\n push: function (data) {\n if (this.datas) {\n this.datas.push(data);\n }\n else {\n this.datas = [data];\n // start a new timer to initialize\n var self = this;\n setTimeout(function () {\n self.init();\n }, 0);\n }\n },\n\n init: function () {\n var datas = this.datas;\n if (datas) {\n for (var i = 0; i < datas.length; ++i) {\n var data = datas[i];\n var cls = data.cls;\n var properties = data.props;\n if (typeof properties === 'function') {\n properties = properties();\n }\n var name = js.getClassName(cls);\n if (properties) {\n declareProperties(cls, name, properties, cls.$super, data.mixins);\n }\n else {\n cc.errorID(3633, name);\n }\n }\n this.datas = null;\n }\n }\n};\n\n// both getter and prop must register the name into __props__ array\nfunction appendProp (cls, name) {\n if (CC_DEV) {\n //if (!IDENTIFIER_RE.test(name)) {\n // cc.error('The property name \"' + name + '\" is not compliant with JavaScript naming standards');\n // return;\n //}\n if (name.indexOf('.') !== -1) {\n cc.errorID(3634);\n return;\n }\n }\n pushUnique(cls.__props__, name);\n}\n\nfunction defineProp (cls, className, propName, val, es6) {\n var defaultValue = val.default;\n\n if (CC_DEV) {\n if (!es6) {\n // check default object value\n if (typeof defaultValue === 'object' && defaultValue) {\n if (Array.isArray(defaultValue)) {\n // check array empty\n if (defaultValue.length > 0) {\n cc.errorID(3635, className, propName, propName);\n return;\n }\n }\n else if (!_isPlainEmptyObj_DEV(defaultValue)) {\n // check cloneable\n if (!_cloneable_DEV(defaultValue)) {\n cc.errorID(3636, className, propName, propName);\n return;\n }\n }\n }\n }\n\n // check base prototype to avoid name collision\n if (CCClass.getInheritanceChain(cls)\n .some(function (x) { return x.prototype.hasOwnProperty(propName); }))\n {\n cc.errorID(3637, className, propName, className);\n return;\n }\n }\n\n // set default value\n Attr.setClassAttr(cls, propName, 'default', defaultValue);\n\n appendProp(cls, propName);\n\n // apply attributes\n parseAttributes(cls, val, className, propName, false);\n if ((CC_EDITOR && !Editor.isBuilder) || CC_TEST) {\n for (let i = 0; i < onAfterProps_ET.length; i++) {\n onAfterProps_ET[i](cls, propName);\n }\n onAfterProps_ET.length = 0;\n }\n}\n\nfunction defineGetSet (cls, name, propName, val, es6) {\n var getter = val.get;\n var setter = val.set;\n var proto = cls.prototype;\n var d = Object.getOwnPropertyDescriptor(proto, propName);\n var setterUndefined = !d;\n\n if (getter) {\n if (CC_DEV && !es6 && d && d.get) {\n cc.errorID(3638, name, propName);\n return;\n }\n\n parseAttributes(cls, val, name, propName, true);\n if ((CC_EDITOR && !Editor.isBuilder) || CC_TEST) {\n onAfterProps_ET.length = 0;\n }\n\n Attr.setClassAttr(cls, propName, 'serializable', false);\n\n if (CC_DEV) {\n // 不论是否 visible 都要添加到 props否则 asset watcher 不能正常工作\n appendProp(cls, propName);\n }\n\n if (!es6) {\n js.get(proto, propName, getter, setterUndefined, setterUndefined);\n }\n\n if (CC_EDITOR || CC_DEV) {\n Attr.setClassAttr(cls, propName, 'hasGetter', true); // 方便 editor 做判断\n }\n }\n\n if (setter) {\n if (!es6) {\n if (CC_DEV && d && d.set) {\n return cc.errorID(3640, name, propName);\n }\n js.set(proto, propName, setter, setterUndefined, setterUndefined);\n }\n if (CC_EDITOR || CC_DEV) {\n Attr.setClassAttr(cls, propName, 'hasSetter', true); // 方便 editor 做判断\n }\n }\n}\n\nfunction getDefault (defaultVal) {\n if (typeof defaultVal === 'function') {\n if (CC_EDITOR) {\n try {\n return defaultVal();\n }\n catch (e) {\n cc._throw(e);\n return undefined;\n }\n }\n else {\n return defaultVal();\n }\n }\n return defaultVal;\n}\n\nfunction mixinWithInherited (dest, src, filter) {\n for (var prop in src) {\n if (!dest.hasOwnProperty(prop) && (!filter || filter(prop))) {\n Object.defineProperty(dest, prop, js.getPropertyDescriptor(src, prop));\n }\n }\n}\n\nfunction doDefine (className, baseClass, mixins, options) {\n var shouldAddProtoCtor;\n var __ctor__ = options.__ctor__;\n var ctor = options.ctor;\n var __es6__ = options.__ES6__;\n\n if (CC_DEV) {\n // check ctor\n var ctorToUse = __ctor__ || ctor;\n if (ctorToUse) {\n if (CCClass._isCCClass(ctorToUse)) {\n cc.errorID(3618, className);\n }\n else if (typeof ctorToUse !== 'function') {\n cc.errorID(3619, className);\n }\n else {\n if (baseClass && /\\bprototype.ctor\\b/.test(ctorToUse)) {\n if (__es6__) {\n cc.errorID(3651, className || \"\");\n }\n else {\n cc.warnID(3600, className || \"\");\n shouldAddProtoCtor = true;\n }\n }\n }\n if (ctor) {\n if (__ctor__) {\n cc.errorID(3649, className);\n }\n else {\n ctor = options.ctor = _validateCtor_DEV(ctor, baseClass, className, options);\n }\n }\n }\n }\n\n var ctors;\n var fireClass;\n if (__es6__) {\n ctors = [ctor];\n fireClass = ctor;\n }\n else {\n ctors = __ctor__ ? [__ctor__] : _getAllCtors(baseClass, mixins, options);\n fireClass = _createCtor(ctors, baseClass, className, options);\n\n // extend - Create a new Class that inherits from this Class\n js.value(fireClass, 'extend', function (options) {\n options.extends = this;\n return CCClass(options);\n }, true);\n }\n\n js.value(fireClass, '__ctors__', ctors.length > 0 ? ctors : null, true);\n\n\n var prototype = fireClass.prototype;\n if (baseClass) {\n if (!__es6__) {\n js.extend(fireClass, baseClass); // 这里会把父类的 __props__ 复制给子类\n prototype = fireClass.prototype; // get extended prototype\n }\n fireClass.$super = baseClass;\n if (CC_DEV && shouldAddProtoCtor) {\n prototype.ctor = function () {};\n }\n }\n\n if (mixins) {\n for (var m = mixins.length - 1; m >= 0; m--) {\n var mixin = mixins[m];\n mixinWithInherited(prototype, mixin.prototype);\n\n // mixin statics (this will also copy editor attributes for component)\n mixinWithInherited(fireClass, mixin, function (prop) {\n return mixin.hasOwnProperty(prop) && (!CC_DEV || INVALID_STATICS_DEV.indexOf(prop) < 0);\n });\n\n // mixin attributes\n if (CCClass._isCCClass(mixin)) {\n mixinWithInherited(Attr.getClassAttrs(fireClass), Attr.getClassAttrs(mixin));\n }\n }\n // restore constuctor overridden by mixin\n prototype.constructor = fireClass;\n }\n\n if (!__es6__) {\n prototype.__initProps__ = compileProps;\n }\n\n js.setClassName(className, fireClass);\n return fireClass;\n}\n\nfunction define (className, baseClass, mixins, options) {\n var Component = cc.Component;\n var frame = cc._RF.peek();\n if (frame && js.isChildClassOf(baseClass, Component)) {\n // project component\n if (js.isChildClassOf(frame.cls, Component)) {\n cc.errorID(3615);\n return null;\n }\n if (CC_DEV && frame.uuid && className) {\n cc.warnID(3616, className);\n }\n className = className || frame.script;\n }\n\n var cls = doDefine(className, baseClass, mixins, options);\n\n if (frame) {\n if (js.isChildClassOf(baseClass, Component)) {\n var uuid = frame.uuid;\n if (uuid) {\n js._setClassId(uuid, cls);\n if (CC_EDITOR) {\n Component._addMenuItem(cls, 'i18n:MAIN_MENU.component.scripts/' + className, -1);\n cls.prototype.__scriptUuid = Editor.Utils.UuidUtils.decompressUuid(uuid);\n }\n }\n frame.cls = cls;\n }\n else if (!js.isChildClassOf(frame.cls, Component)) {\n frame.cls = cls;\n }\n }\n return cls;\n}\n\nfunction normalizeClassName_DEV (className) {\n var DefaultName = 'CCClass';\n if (className) {\n className = className.replace(/^[^$A-Za-z_]/, '_').replace(/[^0-9A-Za-z_$]/g, '_');\n try {\n // validate name\n Function('function ' + className + '(){}')();\n return className;\n }\n catch (e) {\n ;\n }\n }\n return DefaultName;\n}\n\nfunction getNewValueTypeCodeJit (value) {\n var clsName = js.getClassName(value);\n var type = value.constructor;\n var res = 'new ' + clsName + '(';\n for (var i = 0; i < type.__props__.length; i++) {\n var prop = type.__props__[i];\n var propVal = value[prop];\n if (CC_DEV && typeof propVal === 'object') {\n cc.errorID(3641, clsName);\n return 'new ' + clsName + '()';\n }\n res += propVal;\n if (i < type.__props__.length - 1) {\n res += ',';\n }\n }\n return res + ')';\n}\n\n// TODO - move escapeForJS, IDENTIFIER_RE, getNewValueTypeCodeJit to misc.js or a new source file\n\n// convert a normal string including newlines, quotes and unicode characters into a string literal\n// ready to use in JavaScript source\nfunction escapeForJS (s) {\n return JSON.stringify(s).\n // see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify\n replace(/\\u2028/g, '\\\\u2028').\n replace(/\\u2029/g, '\\\\u2029');\n}\n\nfunction getInitPropsJit (attrs, propList) {\n // functions for generated code\n var F = [];\n var func = '';\n\n for (var i = 0; i < propList.length; i++) {\n var prop = propList[i];\n var attrKey = prop + DELIMETER + 'default';\n if (attrKey in attrs) { // getter does not have default\n var statement;\n if (IDENTIFIER_RE.test(prop)) {\n statement = 'this.' + prop + '=';\n }\n else {\n statement = 'this[' + escapeForJS(prop) + ']=';\n }\n var expression;\n var def = attrs[attrKey];\n if (typeof def === 'object' && def) {\n if (def instanceof cc.ValueType) {\n expression = getNewValueTypeCodeJit(def);\n }\n else if (Array.isArray(def)) {\n expression = '[]';\n }\n else {\n expression = '{}';\n }\n }\n else if (typeof def === 'function') {\n var index = F.length;\n F.push(def);\n expression = 'F[' + index + ']()';\n if (CC_EDITOR) {\n func += 'try {\\n' + statement + expression + ';\\n}\\ncatch(e) {\\ncc._throw(e);\\n' + statement + 'undefined;\\n}\\n';\n continue;\n }\n }\n else if (typeof def === 'string') {\n expression = escapeForJS(def);\n }\n else {\n // number, boolean, null, undefined\n expression = def;\n }\n statement = statement + expression + ';\\n';\n func += statement;\n }\n }\n\n // if (CC_TEST && !isPhantomJS) {\n // console.log(func);\n // }\n\n var initProps;\n if (F.length === 0) {\n initProps = Function(func);\n }\n else {\n initProps = Function('F', 'return (function(){\\n' + func + '})')(F);\n }\n\n return initProps;\n}\n\nfunction getInitProps (attrs, propList) {\n var props = null;\n var simpleEnd = 0;\n var valueTypeEnd = 0;\n\n (function () {\n\n // triage properties\n\n var simples = null;\n var valueTypes = null;\n var advanceds = null;\n\n for (let i = 0; i < propList.length; ++i) {\n var prop = propList[i];\n var attrKey = prop + DELIMETER + 'default';\n if (attrKey in attrs) { // getter does not have default\n var def = attrs[attrKey];\n if ((typeof def === 'object' && def) || typeof def === 'function') {\n if (def instanceof cc.ValueType) {\n if (!valueTypes) {\n valueTypes = [];\n }\n valueTypes.push(prop, def);\n }\n else {\n if (!advanceds) {\n advanceds = [];\n }\n advanceds.push(prop, def);\n }\n }\n else {\n // number, boolean, null, undefined, string\n if (!simples) {\n simples = [];\n }\n simples.push(prop, def);\n }\n }\n }\n\n // concat in compact memory\n\n simpleEnd = simples ? simples.length : 0;\n valueTypeEnd = simpleEnd + (valueTypes ? valueTypes.length : 0);\n let totalLength = valueTypeEnd + (advanceds ? advanceds.length : 0);\n props = new Array(totalLength);\n\n for (let i = 0; i < simpleEnd; ++i) {\n props[i] = simples[i];\n }\n for (let i = simpleEnd; i < valueTypeEnd; ++i) {\n props[i] = valueTypes[i - simpleEnd];\n }\n for (let i = valueTypeEnd; i < totalLength; ++i) {\n props[i] = advanceds[i - valueTypeEnd];\n }\n })();\n\n return function () {\n let i = 0;\n for (; i < simpleEnd; i += 2) {\n this[props[i]] = props[i + 1];\n }\n for (; i < valueTypeEnd; i += 2) {\n this[props[i]] = props[i + 1].clone();\n }\n for (; i < props.length; i += 2) {\n var def = props[i + 1];\n if (Array.isArray(def)) {\n this[props[i]] = [];\n }\n else {\n var value;\n if (typeof def === 'object') {\n value = {};\n }\n else {\n // def is function\n if (CC_EDITOR) {\n try {\n value = def();\n }\n catch (err) {\n cc._throw(e);\n continue;\n }\n }\n else {\n value = def();\n }\n }\n this[props[i]] = value;\n }\n }\n };\n}\n\n// simple test variable name\nvar IDENTIFIER_RE = /^[A-Za-z_$][0-9A-Za-z_$]*$/;\nfunction compileProps (actualClass) {\n // init deferred properties\n var attrs = Attr.getClassAttrs(actualClass);\n var propList = actualClass.__props__;\n if (propList === null) {\n deferredInitializer.init();\n propList = actualClass.__props__;\n }\n\n // Overwite __initProps__ to avoid compile again.\n var initProps = CC_SUPPORT_JIT ? getInitPropsJit(attrs, propList) : getInitProps(attrs, propList);\n actualClass.prototype.__initProps__ = initProps;\n\n // call instantiateProps immediately, no need to pass actualClass into it anymore\n // (use call to manually bind `this` because `this` may not instanceof actualClass)\n initProps.call(this);\n}\n\nvar _createCtor = CC_SUPPORT_JIT ? function (ctors, baseClass, className, options) {\n var superCallBounded = baseClass && boundSuperCalls(baseClass, options, className);\n\n var ctorName = CC_DEV ? normalizeClassName_DEV(className) : 'CCClass';\n var body = 'return function ' + ctorName + '(){\\n';\n\n if (superCallBounded) {\n body += 'this._super=null;\\n';\n }\n\n // instantiate props\n body += 'this.__initProps__(' + ctorName + ');\\n';\n\n // call user constructors\n var ctorLen = ctors.length;\n if (ctorLen > 0) {\n var useTryCatch = CC_DEV && ! (className && className.startsWith('cc.'));\n if (useTryCatch) {\n body += 'try{\\n';\n }\n var SNIPPET = '].apply(this,arguments);\\n';\n if (ctorLen === 1) {\n body += ctorName + '.__ctors__[0' + SNIPPET;\n }\n else {\n body += 'var cs=' + ctorName + '.__ctors__;\\n';\n for (var i = 0; i < ctorLen; i++) {\n body += 'cs[' + i + SNIPPET;\n }\n }\n if (useTryCatch) {\n body += '}catch(e){\\n' +\n 'cc._throw(e);\\n' +\n '}\\n';\n }\n }\n body += '}';\n\n return Function(body)();\n} : function (ctors, baseClass, className, options) {\n var superCallBounded = baseClass && boundSuperCalls(baseClass, options, className);\n var ctorLen = ctors.length;\n\n var Class;\n\n if (ctorLen > 0) {\n if (superCallBounded) {\n if (ctorLen === 2) {\n // User Component\n Class = function () {\n this._super = null;\n this.__initProps__(Class);\n ctors[0].apply(this, arguments);\n ctors[1].apply(this, arguments);\n };\n }\n else {\n Class = function () {\n this._super = null;\n this.__initProps__(Class);\n for (let i = 0; i < ctors.length; ++i) {\n ctors[i].apply(this, arguments);\n }\n };\n }\n }\n else {\n if (ctorLen === 3) {\n // Node\n Class = function () {\n this.__initProps__(Class);\n ctors[0].apply(this, arguments);\n ctors[1].apply(this, arguments);\n ctors[2].apply(this, arguments);\n };\n }\n else {\n Class = function () {\n this.__initProps__(Class);\n var ctors = Class.__ctors__;\n for (let i = 0; i < ctors.length; ++i) {\n ctors[i].apply(this, arguments);\n }\n };\n }\n }\n }\n else {\n Class = function () {\n if (superCallBounded) {\n this._super = null;\n }\n this.__initProps__(Class);\n };\n }\n return Class;\n};\n\nfunction _validateCtor_DEV (ctor, baseClass, className, options) {\n if (CC_EDITOR && baseClass) {\n // check super call in constructor\n var originCtor = ctor;\n if (SuperCallReg.test(ctor)) {\n if (options.__ES6__) {\n cc.errorID(3651, className);\n }\n else {\n cc.warnID(3600, className);\n // suppresss super call\n ctor = function () {\n this._super = function () {};\n var ret = originCtor.apply(this, arguments);\n this._super = null;\n return ret;\n };\n }\n }\n }\n\n // check ctor\n if (ctor.length > 0 && (!className || !className.startsWith('cc.'))) {\n // To make a unified CCClass serialization process,\n // we don't allow parameters for constructor when creating instances of CCClass.\n // For advanced user, construct arguments can still get from 'arguments'.\n cc.warnID(3617, className);\n }\n\n return ctor;\n}\n\nfunction _getAllCtors (baseClass, mixins, options) {\n // get base user constructors\n function getCtors (cls) {\n if (CCClass._isCCClass(cls)) {\n return cls.__ctors__ || [];\n }\n else {\n return [cls];\n }\n }\n\n var ctors = [];\n // if (options.__ES6__) {\n // if (mixins) {\n // let baseOrMixins = getCtors(baseClass);\n // for (let b = 0; b < mixins.length; b++) {\n // let mixin = mixins[b];\n // if (mixin) {\n // let baseCtors = getCtors(mixin);\n // for (let c = 0; c < baseCtors.length; c++) {\n // if (baseOrMixins.indexOf(baseCtors[c]) < 0) {\n // pushUnique(ctors, baseCtors[c]);\n // }\n // }\n // }\n // }\n // }\n // }\n // else {\n let baseOrMixins = [baseClass].concat(mixins);\n for (let b = 0; b < baseOrMixins.length; b++) {\n let baseOrMixin = baseOrMixins[b];\n if (baseOrMixin) {\n let baseCtors = getCtors(baseOrMixin);\n for (let c = 0; c < baseCtors.length; c++) {\n pushUnique(ctors, baseCtors[c]);\n }\n }\n }\n // }\n\n // append subclass user constructors\n var ctor = options.ctor;\n if (ctor) {\n ctors.push(ctor);\n }\n\n return ctors;\n}\n\nvar SuperCallReg = /xyz/.test(function(){xyz}) ? /\\b\\._super\\b/ : /.*/;\nvar SuperCallRegStrict = /xyz/.test(function(){xyz}) ? /this\\._super\\s*\\(/ : /(NONE){99}/;\nfunction boundSuperCalls (baseClass, options, className) {\n var hasSuperCall = false;\n for (var funcName in options) {\n if (BUILTIN_ENTRIES.indexOf(funcName) >= 0) {\n continue;\n }\n var func = options[funcName];\n if (typeof func !== 'function') {\n continue;\n }\n var pd = js.getPropertyDescriptor(baseClass.prototype, funcName);\n if (pd) {\n var superFunc = pd.value;\n // ignore pd.get, assume that function defined by getter is just for warnings\n if (typeof superFunc === 'function') {\n if (SuperCallReg.test(func)) {\n hasSuperCall = true;\n // boundSuperCall\n options[funcName] = (function (superFunc, func) {\n return function () {\n var tmp = this._super;\n\n // Add a new ._super() method that is the same method but on the super-Class\n this._super = superFunc;\n\n var ret = func.apply(this, arguments);\n\n // The method only need to be bound temporarily, so we remove it when we're done executing\n this._super = tmp;\n\n return ret;\n };\n })(superFunc, func);\n }\n continue;\n }\n }\n if (CC_DEV && SuperCallRegStrict.test(func)) {\n cc.warnID(3620, className, funcName);\n }\n }\n return hasSuperCall;\n}\n\nfunction declareProperties (cls, className, properties, baseClass, mixins, es6) {\n cls.__props__ = [];\n\n if (baseClass && baseClass.__props__) {\n cls.__props__ = baseClass.__props__.slice();\n }\n\n if (mixins) {\n for (var m = 0; m < mixins.length; ++m) {\n var mixin = mixins[m];\n if (mixin.__props__) {\n cls.__props__ = cls.__props__.concat(mixin.__props__.filter(function (x) {\n return cls.__props__.indexOf(x) < 0;\n }));\n }\n }\n }\n\n if (properties) {\n // 预处理属性\n preprocess.preprocessAttrs(properties, className, cls, es6);\n\n for (var propName in properties) {\n var val = properties[propName];\n if ('default' in val) {\n defineProp(cls, className, propName, val, es6);\n }\n else {\n defineGetSet(cls, className, propName, val, es6);\n }\n }\n }\n\n var attrs = Attr.getClassAttrs(cls);\n cls.__values__ = cls.__props__.filter(function (prop) {\n return attrs[prop + DELIMETER + 'serializable'] !== false;\n });\n}\n\n/**\n * @module cc\n */\n\n/**\n * !#en Defines a CCClass using the given specification, please see [Class](/docs/editors_and_tools/creator-chapters/scripting/class.html) for details.\n * !#zh 定义一个 CCClass传入参数必须是一个包含类型参数的字面量对象具体用法请查阅[类型定义](/docs/creator/scripting/class.html)。\n *\n * @method Class\n *\n * @param {Object} [options]\n * @param {String} [options.name] - The class name used for serialization.\n * @param {Function} [options.extends] - The base class.\n * @param {Function} [options.ctor] - The constructor.\n * @param {Function} [options.__ctor__] - The same as ctor, but less encapsulated.\n * @param {Object} [options.properties] - The property definitions.\n * @param {Object} [options.statics] - The static members.\n * @param {Function[]} [options.mixins]\n *\n * @param {Object} [options.editor] - attributes for Component listed below.\n * @param {Boolean} [options.editor.executeInEditMode=false] - Allows the current component to run in edit mode. By default, all components are executed only at runtime, meaning that they will not have their callback functions executed while the Editor is in edit mode.\n * @param {Function} [options.editor.requireComponent] - Automatically add required component as a dependency.\n * @param {String} [options.editor.menu] - The menu path to register a component to the editors \"Component\" menu. Eg. \"Rendering/Camera\".\n * @param {Number} [options.editor.executionOrder=0] - The execution order of lifecycle methods for Component. Those less than 0 will execute before while those greater than 0 will execute after. The order will only affect onLoad, onEnable, start, update and lateUpdate while onDisable and onDestroy will not be affected.\n * @param {Boolean} [options.editor.disallowMultiple] - If specified to a type, prevents Component of the same type (or subtype) to be added more than once to a Node.\n * @param {Boolean} [options.editor.playOnFocus=false] - This property is only available when executeInEditMode is set. If specified, the editor's scene view will keep updating this node in 60 fps when it is selected, otherwise, it will update only if necessary.\n * @param {String} [options.editor.inspector] - Customize the page url used by the current component to render in the Properties.\n * @param {String} [options.editor.icon] - Customize the icon that the current component displays in the editor.\n * @param {String} [options.editor.help] - The custom documentation URL\n *\n * @param {Function} [options.update] - lifecycle method for Component, see {{#crossLink \"Component/update:method\"}}{{/crossLink}}\n * @param {Function} [options.lateUpdate] - lifecycle method for Component, see {{#crossLink \"Component/lateUpdate:method\"}}{{/crossLink}}\n * @param {Function} [options.onLoad] - lifecycle method for Component, see {{#crossLink \"Component/onLoad:method\"}}{{/crossLink}}\n * @param {Function} [options.start] - lifecycle method for Component, see {{#crossLink \"Component/start:method\"}}{{/crossLink}}\n * @param {Function} [options.onEnable] - lifecycle method for Component, see {{#crossLink \"Component/onEnable:method\"}}{{/crossLink}}\n * @param {Function} [options.onDisable] - lifecycle method for Component, see {{#crossLink \"Component/onDisable:method\"}}{{/crossLink}}\n * @param {Function} [options.onDestroy] - lifecycle method for Component, see {{#crossLink \"Component/onDestroy:method\"}}{{/crossLink}}\n * @param {Function} [options.onFocusInEditor] - lifecycle method for Component, see {{#crossLink \"Component/onFocusInEditor:method\"}}{{/crossLink}}\n * @param {Function} [options.onLostFocusInEditor] - lifecycle method for Component, see {{#crossLink \"Component/onLostFocusInEditor:method\"}}{{/crossLink}}\n * @param {Function} [options.resetInEditor] - lifecycle method for Component, see {{#crossLink \"Component/resetInEditor:method\"}}{{/crossLink}}\n * @param {Function} [options.onRestore] - for Component only, see {{#crossLink \"Component/onRestore:method\"}}{{/crossLink}}\n * @param {Function} [options._getLocalBounds] - for Component only, see {{#crossLink \"Component/_getLocalBounds:method\"}}{{/crossLink}}\n *\n * @return {Function} - the created class\n *\n * @example\n\n // define base class\n var Node = cc.Class();\n\n // define sub class\n var Sprite = cc.Class({\n name: 'Sprite',\n extends: Node,\n\n ctor: function () {\n this.url = \"\";\n this.id = 0;\n },\n\n statics: {\n // define static members\n count: 0,\n getBounds: function (spriteList) {\n // compute bounds...\n }\n },\n\n properties {\n width: {\n default: 128,\n type: cc.Integer,\n tooltip: 'The width of sprite'\n },\n height: 128,\n size: {\n get: function () {\n return cc.v2(this.width, this.height);\n }\n }\n },\n\n load: function () {\n // load this.url...\n };\n });\n\n // instantiate\n\n var obj = new Sprite();\n obj.url = 'sprite.png';\n obj.load();\n */\nfunction CCClass (options) {\n options = options || {};\n\n var name = options.name;\n var base = options.extends/* || CCObject*/;\n var mixins = options.mixins;\n\n // create constructor\n var cls = define(name, base, mixins, options);\n if (!name) {\n name = cc.js.getClassName(cls);\n }\n\n cls._sealed = true;\n if (base) {\n base._sealed = false;\n }\n\n // define Properties\n var properties = options.properties;\n if (typeof properties === 'function' ||\n (base && base.__props__ === null) ||\n (mixins && mixins.some(function (x) {\n return x.__props__ === null;\n }))\n ) {\n if (CC_DEV && options.__ES6__) {\n cc.error('not yet implement deferred properties for ES6 Classes');\n }\n else {\n deferredInitializer.push({cls: cls, props: properties, mixins: mixins});\n cls.__props__ = cls.__values__ = null;\n }\n }\n else {\n declareProperties(cls, name, properties, base, options.mixins, options.__ES6__);\n }\n\n // define statics\n var statics = options.statics;\n if (statics) {\n var staticPropName;\n if (CC_DEV) {\n for (staticPropName in statics) {\n if (INVALID_STATICS_DEV.indexOf(staticPropName) !== -1) {\n cc.errorID(3642, name, staticPropName,\n staticPropName);\n }\n }\n }\n for (staticPropName in statics) {\n cls[staticPropName] = statics[staticPropName];\n }\n }\n\n // define functions\n for (var funcName in options) {\n if (BUILTIN_ENTRIES.indexOf(funcName) >= 0) {\n continue;\n }\n var func = options[funcName];\n if (!preprocess.validateMethodWithProps(func, funcName, name, cls, base)) {\n continue;\n }\n // use value to redefine some super method defined as getter\n js.value(cls.prototype, funcName, func, true, true);\n }\n\n\n var editor = options.editor;\n if (editor) {\n cc.Component._registerEditorProps(cls, editor);\n }\n\n return cls;\n}\n\n/**\n * Checks whether the constructor is created by cc.Class\n *\n * @method _isCCClass\n * @param {Function} constructor\n * @return {Boolean}\n * @private\n */\nCCClass._isCCClass = function (constructor) {\n return constructor &&\n constructor.hasOwnProperty('__ctors__'); // is not inherited __ctors__\n};\n\n//\n// Optimized define function only for internal classes\n//\n// @method _fastDefine\n// @param {String} className\n// @param {Function} constructor\n// @param {Object} serializableFields\n// @private\n//\nCCClass._fastDefine = function (className, constructor, serializableFields) {\n js.setClassName(className, constructor);\n //constructor.__ctors__ = constructor.__ctors__ || null;\n var props = constructor.__props__ = constructor.__values__ = Object.keys(serializableFields);\n var attrs = Attr.getClassAttrs(constructor);\n for (var i = 0; i < props.length; i++) {\n var key = props[i];\n attrs[key + DELIMETER + 'visible'] = false;\n attrs[key + DELIMETER + 'default'] = serializableFields[key];\n }\n};\n\nCCClass.Attr = Attr;\nCCClass.attr = Attr.attr;\n\n/*\n * Return all super classes\n * @method getInheritanceChain\n * @param {Function} constructor\n * @return {Function[]}\n */\nCCClass.getInheritanceChain = function (klass) {\n var chain = [];\n for (;;) {\n klass = js.getSuper(klass);\n if (!klass) {\n break;\n }\n if (klass !== Object) {\n chain.push(klass);\n }\n }\n return chain;\n};\n\nvar PrimitiveTypes = {\n // Specify that the input value must be integer in Properties.\n // Also used to indicates that the type of elements in array or the type of value in dictionary is integer.\n Integer: 'Number',\n // Indicates that the type of elements in array or the type of value in dictionary is double.\n Float: 'Number',\n Boolean: 'Boolean',\n String: 'String',\n};\nvar onAfterProps_ET = [];\nfunction parseAttributes (cls, attributes, className, propName, usedInGetter) {\n var ERR_Type = CC_DEV ? 'The %s of %s must be type %s' : '';\n\n var attrs = null;\n var propNamePrefix = '';\n function initAttrs () {\n propNamePrefix = propName + DELIMETER;\n return attrs = Attr.getClassAttrs(cls);\n }\n\n if ((CC_EDITOR && !Editor.isBuilder) || CC_TEST) {\n onAfterProps_ET.length = 0;\n }\n\n var type = attributes.type;\n if (type) {\n var primitiveType = PrimitiveTypes[type];\n if (primitiveType) {\n (attrs || initAttrs())[propNamePrefix + 'type'] = type;\n if (((CC_EDITOR && !Editor.isBuilder) || CC_TEST) && !attributes._short) {\n onAfterProps_ET.push(Attr.getTypeChecker_ET(primitiveType, 'cc.' + type));\n }\n }\n else if (type === 'Object') {\n if (CC_DEV) {\n cc.errorID(3644, className, propName);\n }\n }\n else {\n if (type === Attr.ScriptUuid) {\n (attrs || initAttrs())[propNamePrefix + 'type'] = 'Script';\n attrs[propNamePrefix + 'ctor'] = cc.ScriptAsset;\n }\n else {\n if (typeof type === 'object') {\n if (Enum.isEnum(type)) {\n (attrs || initAttrs())[propNamePrefix + 'type'] = 'Enum';\n attrs[propNamePrefix + 'enumList'] = Enum.getList(type);\n }\n else if (CC_DEV) {\n cc.errorID(3645, className, propName, type);\n }\n }\n else if (typeof type === 'function') {\n (attrs || initAttrs())[propNamePrefix + 'type'] = 'Object';\n attrs[propNamePrefix + 'ctor'] = type;\n if (((CC_EDITOR && !Editor.isBuilder) || CC_TEST) && !attributes._short) {\n onAfterProps_ET.push(Attr.getObjTypeChecker_ET(type));\n }\n }\n else if (CC_DEV) {\n cc.errorID(3646, className, propName, type);\n }\n }\n }\n }\n\n function parseSimpleAttr (attrName, expectType) {\n if (attrName in attributes) {\n var val = attributes[attrName];\n if (typeof val === expectType) {\n (attrs || initAttrs())[propNamePrefix + attrName] = val;\n }\n else if (CC_DEV) {\n cc.error(ERR_Type, attrName, className, propName, expectType);\n }\n }\n }\n\n if (attributes.editorOnly) {\n if (CC_DEV && usedInGetter) {\n cc.errorID(3613, \"editorOnly\", name, propName);\n }\n else {\n (attrs || initAttrs())[propNamePrefix + 'editorOnly'] = true;\n }\n }\n //parseSimpleAttr('preventDeferredLoad', 'boolean');\n if (CC_DEV) {\n parseSimpleAttr('displayName', 'string');\n parseSimpleAttr('multiline', 'boolean');\n if (attributes.readonly) {\n (attrs || initAttrs())[propNamePrefix + 'readonly'] = true;\n }\n parseSimpleAttr('tooltip', 'string');\n parseSimpleAttr('slide', 'boolean');\n }\n\n if (attributes.serializable === false) {\n if (CC_DEV && usedInGetter) {\n cc.errorID(3613, \"serializable\", name, propName);\n }\n else {\n (attrs || initAttrs())[propNamePrefix + 'serializable'] = false;\n }\n }\n\n // if (CC_BUILD || CC_TEST) {\n // let fsa = attributes.formerlySerializedAs;\n // if (fsa) {\n // // js.set(cls.prototype, fsa, function (val) {\n // // this[propName] = val;\n // // });\n // (attrs || initAttrs())[propNamePrefix + 'formerlySerializedAs'] = fsa;\n // // used by deserialize-compiled\n // attrs[fsa + DELIMETER + 'deserializeAs'] = propName;\n // cls.__FSA__ = true; // inheritable\n // }\n // }\n // else {\n // parseSimpleAttr('formerlySerializedAs', 'string');\n // }\n\n parseSimpleAttr('formerlySerializedAs', 'string');\n\n if (CC_EDITOR) {\n parseSimpleAttr('notifyFor', 'string');\n\n parseSimpleAttr('precision', 'number');\n\n if ('animatable' in attributes) {\n (attrs || initAttrs())[propNamePrefix + 'animatable'] = !!attributes.animatable;\n }\n }\n\n if (CC_DEV) {\n var visible = attributes.visible;\n if (typeof visible !== 'undefined') {\n if (!visible) {\n (attrs || initAttrs())[propNamePrefix + 'visible'] = false;\n }\n else if (typeof visible === 'function') {\n (attrs || initAttrs())[propNamePrefix + 'visible'] = visible;\n }\n }\n else {\n var startsWithUS = (propName.charCodeAt(0) === 95);\n if (startsWithUS) {\n (attrs || initAttrs())[propNamePrefix + 'visible'] = false;\n }\n }\n }\n\n var range = attributes.range;\n if (range) {\n if (Array.isArray(range)) {\n if (range.length >= 2) {\n (attrs || initAttrs())[propNamePrefix + 'min'] = range[0];\n attrs[propNamePrefix + 'max'] = range[1];\n if (range.length > 2) {\n attrs[propNamePrefix + 'step'] = range[2];\n }\n }\n else if (CC_DEV) {\n cc.errorID(3647);\n }\n }\n else if (CC_DEV) {\n cc.error(ERR_Type, 'range', className, propName, 'array');\n }\n }\n parseSimpleAttr('min', 'number');\n parseSimpleAttr('max', 'number');\n parseSimpleAttr('step', 'number');\n parseSimpleAttr('userData', 'object');\n}\n\ncc.Class = CCClass;\n\nmodule.exports = {\n isArray: function (defaultVal) {\n defaultVal = getDefault(defaultVal);\n return Array.isArray(defaultVal);\n },\n fastDefine: CCClass._fastDefine,\n getNewValueTypeCode: CC_SUPPORT_JIT && getNewValueTypeCodeJit,\n IDENTIFIER_RE,\n escapeForJS,\n getDefault,\n};\n\nif (CC_TEST) {\n js.mixin(CCClass, module.exports);\n}\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n// const FIX_BABEL6 = true;\n\n/**\n * !#en Some JavaScript decorators which can be accessed with \"cc._decorator\".\n * !#zh 一些 JavaScript 装饰器,目前可以通过 \"cc._decorator\" 来访问。\n * (这些 API 仍不完全稳定,有可能随着 JavaScript 装饰器的标准实现而调整)\n *\n * @submodule _decorator\n * @module _decorator\n * @main\n */\n\n// inspired by toddlxt (https://github.com/toddlxt/Creator-TypeScript-Boilerplate)\n\nrequire('./CCClass');\nconst Preprocess = require('./preprocess-class');\nconst js = require('./js');\nconst isPlainEmptyObj_DEV = CC_DEV && require('./utils').isPlainEmptyObj_DEV;\n\n// caches for class construction\nconst CACHE_KEY = '__ccclassCache__';\n\nfunction fNOP (ctor) {\n return ctor;\n}\n\nfunction getSubDict (obj, key) {\n return obj[key] || (obj[key] = {});\n}\n\nfunction checkCtorArgument (decorate) {\n return function (target) {\n if (typeof target === 'function') {\n // no parameter, target is ctor\n return decorate(target);\n }\n return function (ctor) {\n return decorate(ctor, target);\n };\n };\n}\n\nfunction _checkNormalArgument (validator_DEV, decorate, decoratorName) {\n return function (target) {\n if (CC_DEV && validator_DEV(target, decoratorName) === false) {\n return function () {\n return fNOP;\n };\n }\n return function (ctor) {\n return decorate(ctor, target);\n };\n };\n}\n\nvar checkCompArgument = _checkNormalArgument.bind(null, CC_DEV && function (arg, decoratorName) {\n if (!cc.Class._isCCClass(arg)) {\n cc.error('The parameter for %s is missing.', decoratorName);\n return false;\n }\n});\n\nfunction _argumentChecker (type) {\n return _checkNormalArgument.bind(null, CC_DEV && function (arg, decoratorName) {\n if (arg instanceof cc.Component || arg === undefined) {\n cc.error('The parameter for %s is missing.', decoratorName);\n return false;\n }\n else if (typeof arg !== type) {\n cc.error('The parameter for %s must be type %s.', decoratorName, type);\n return false;\n }\n });\n}\nvar checkStringArgument = _argumentChecker('string');\nvar checkNumberArgument = _argumentChecker('number');\n// var checkBooleanArgument = _argumentChecker('boolean');\n\n\nfunction getClassCache (ctor, decoratorName) {\n if (CC_DEV && cc.Class._isCCClass(ctor)) {\n cc.error('`@%s` should be used after @ccclass for class \"%s\"', decoratorName, js.getClassName(ctor));\n return null;\n }\n return getSubDict(ctor, CACHE_KEY);\n}\n\nfunction getDefaultFromInitializer (initializer) {\n var value;\n try {\n value = initializer();\n }\n catch (e) {\n // just lazy initialize by CCClass\n return initializer;\n }\n if (typeof value !== 'object' || value === null) {\n // string boolean number function undefined null\n return value;\n }\n else {\n // The default attribute will not be used in ES6 constructor actually,\n // so we dont need to simplify into `{}` or `[]` or vec2 completely.\n return initializer;\n }\n}\n\n\nfunction extractActualDefaultValues (ctor) {\n var dummyObj;\n try {\n dummyObj = new ctor();\n }\n catch (e) {\n if (CC_DEV) {\n cc.errorID(3652, js.getClassName(ctor), e);\n }\n return {};\n }\n return dummyObj;\n}\n\nfunction genProperty (ctor, properties, propName, options, desc, cache) {\n var fullOptions;\n var isGetset = desc && (desc.get || desc.set);\n if (options) {\n fullOptions = Preprocess.getFullFormOfProperty(options, isGetset);\n }\n var existsProperty = properties[propName];\n var prop = js.mixin(existsProperty || {}, fullOptions || options || {});\n\n if (isGetset) {\n // typescript or babel\n if (CC_DEV && options && ((fullOptions || options).get || (fullOptions || options).set)) {\n var errorProps = getSubDict(cache, 'errorProps');\n if (!errorProps[propName]) {\n errorProps[propName] = true;\n cc.warnID(3655, propName, js.getClassName(ctor), propName, propName);\n }\n }\n if (desc.get) {\n prop.get = desc.get;\n }\n if (desc.set) {\n prop.set = desc.set;\n }\n }\n else {\n if (CC_DEV && (prop.get || prop.set)) {\n // @property({\n // get () { ... },\n // set (...) { ... },\n // })\n // value;\n cc.errorID(3655, propName, js.getClassName(ctor), propName, propName);\n return;\n }\n // member variables\n var defaultValue = undefined;\n var isDefaultValueSpecified = false;\n if (desc) {\n // babel\n if (desc.initializer) {\n // @property(...)\n // value = null;\n defaultValue = getDefaultFromInitializer(desc.initializer);\n isDefaultValueSpecified = true;\n }\n else {\n // @property(...)\n // value;\n }\n }\n else {\n // typescript\n var actualDefaultValues = cache.default || (cache.default = extractActualDefaultValues(ctor));\n if (actualDefaultValues.hasOwnProperty(propName)) {\n // @property(...)\n // value = null;\n defaultValue = actualDefaultValues[propName];\n isDefaultValueSpecified = true;\n }\n else {\n // @property(...)\n // value;\n }\n }\n\n if ((CC_EDITOR && !Editor.isBuilder) || CC_TEST) {\n if (!fullOptions && options && options.hasOwnProperty('default')) {\n cc.warnID(3653, propName, js.getClassName(ctor));\n // prop.default = options.default;\n }\n else if (!isDefaultValueSpecified) {\n cc.warnID(3654, js.getClassName(ctor), propName);\n // prop.default = fullOptions.hasOwnProperty('default') ? fullOptions.default : undefined;\n }\n }\n prop.default = defaultValue;\n }\n\n properties[propName] = prop;\n}\n\n/**\n * !#en\n * Declare the standard [ES6 Class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes)\n * as CCClass, please see [Class](../../../manual/en/scripting/class.html) for details.\n * !#zh\n * 将标准写法的 [ES6 Class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) 声明为 CCClass具体用法请参阅[类型定义](../../../manual/zh/scripting/class.html)。\n *\n * @method ccclass\n * @param {String} [name] - The class name used for serialization.\n * @example\n * const {ccclass} = cc._decorator;\n *\n * // define a CCClass, omit the name\n * &#64;ccclass\n * class NewScript extends cc.Component {\n * // ...\n * }\n *\n * // define a CCClass with a name\n * &#64;ccclass('LoginData')\n * class LoginData {\n * // ...\n * }\n * @typescript\n * ccclass(name?: string): Function\n * ccclass(_class?: Function): void\n */\nvar ccclass = checkCtorArgument(function (ctor, name) {\n // if (FIX_BABEL6) {\n // eval('if(typeof _classCallCheck===\"function\"){_classCallCheck=function(){};}');\n // }\n var base = js.getSuper(ctor);\n if (base === Object) {\n base = null;\n }\n\n var proto = {\n name,\n extends: base,\n ctor,\n __ES6__: true,\n };\n var cache = ctor[CACHE_KEY];\n if (cache) {\n var decoratedProto = cache.proto;\n if (decoratedProto) {\n // decoratedProto.properties = createProperties(ctor, decoratedProto.properties);\n js.mixin(proto, decoratedProto);\n }\n ctor[CACHE_KEY] = undefined;\n }\n\n var res = cc.Class(proto);\n\n // validate methods\n if (CC_DEV) {\n var propNames = Object.getOwnPropertyNames(ctor.prototype);\n for (var i = 0; i < propNames.length; ++i) {\n var prop = propNames[i];\n if (prop !== 'constructor') {\n var desc = Object.getOwnPropertyDescriptor(ctor.prototype, prop);\n var func = desc && desc.value;\n if (typeof func === 'function') {\n Preprocess.doValidateMethodWithProps_DEV(func, prop, js.getClassName(ctor), ctor, base);\n }\n }\n }\n }\n\n return res;\n});\n\n/**\n * !#en\n * Declare property for [CCClass](../../../manual/en/scripting/reference/attributes.html).\n * !#zh\n * 定义 [CCClass](../../../manual/zh/scripting/reference/attributes.html) 所用的属性。\n *\n * @method property\n * @param {Object} [options] - an object with some property attributes\n * @param {Any} [options.type]\n * @param {Boolean|Function} [options.visible]\n * @param {String} [options.displayName]\n * @param {String} [options.tooltip]\n * @param {Boolean} [options.multiline]\n * @param {Boolean} [options.readonly]\n * @param {Number} [options.min]\n * @param {Number} [options.max]\n * @param {Number} [options.step]\n * @param {Number[]} [options.range]\n * @param {Boolean} [options.slide]\n * @param {Boolean} [options.serializable]\n * @param {Boolean} [options.editorOnly]\n * @param {Boolean} [options.override]\n * @param {Boolean} [options.animatable]\n * @param {String} [options.formerlySerializedAs]\n * @example\n * const {ccclass, property} = cc._decorator;\n *\n * &#64;ccclass\n * class NewScript extends cc.Component {\n * &#64;property({\n * type: cc.Node\n * })\n * targetNode1 = null;\n *\n * &#64;property(cc.Node)\n * targetNode2 = null;\n *\n * &#64;property(cc.Button)\n * targetButton = null;\n *\n * &#64;property\n * _width = 100;\n *\n * &#64;property\n * get width () {\n * return this._width;\n * }\n *\n * &#64;property\n * set width (value) {\n * this._width = value;\n * }\n *\n * &#64;property\n * offset = new cc.Vec2(100, 100);\n *\n * &#64;property(cc.Vec2)\n * offsets = [];\n *\n * &#64;property(cc.SpriteFrame)\n * frame = null;\n * }\n *\n * // above is equivalent to (上面的代码相当于):\n *\n * var NewScript = cc.Class({\n * properties: {\n * targetNode1: {\n * default: null,\n * type: cc.Node\n * },\n *\n * targetNode2: {\n * default: null,\n * type: cc.Node\n * },\n *\n * targetButton: {\n * default: null,\n * type: cc.Button\n * },\n *\n * _width: 100,\n *\n * width: {\n * get () {\n * return this._width;\n * },\n * set (value) {\n * this._width = value;\n * }\n * },\n *\n * offset: new cc.Vec2(100, 100)\n *\n * offsets: {\n * default: [],\n * type: cc.Vec2\n * }\n *\n * frame: {\n * default: null,\n * type: cc.SpriteFrame\n * },\n * }\n * });\n * @typescript\n * property(options?: {type?: any; visible?: boolean|(() => boolean); displayName?: string; tooltip?: string; multiline?: boolean; readonly?: boolean; min?: number; max?: number; step?: number; range?: number[]; slide?: boolean; serializable?: boolean; formerlySerializedAs?: string; editorOnly?: boolean; override?: boolean; animatable?: boolean, userData?: Record<string, any> } | any[]|Function|cc.ValueType|number|string|boolean): Function\n * property(_target: Object, _key: any, _desc?: any): void\n */\nfunction property (ctorProtoOrOptions, propName, desc) {\n var options = null;\n function normalized (ctorProto, propName, desc) {\n var cache = getClassCache(ctorProto.constructor);\n if (cache) {\n var ccclassProto = getSubDict(cache, 'proto');\n var properties = getSubDict(ccclassProto, 'properties');\n genProperty(ctorProto.constructor, properties, propName, options, desc, cache);\n }\n }\n if (typeof propName === 'undefined') {\n options = ctorProtoOrOptions;\n return normalized;\n }\n else {\n normalized(ctorProtoOrOptions, propName, desc);\n }\n}\n\n// Editor Decorators\n\nfunction createEditorDecorator (argCheckFunc, editorPropName, staticValue) {\n return argCheckFunc(function (ctor, decoratedValue) {\n var cache = getClassCache(ctor, editorPropName);\n if (cache) {\n var value = (staticValue !== undefined) ? staticValue : decoratedValue;\n var proto = getSubDict(cache, 'proto');\n getSubDict(proto, 'editor')[editorPropName] = value;\n }\n }, editorPropName);\n}\n\nfunction createDummyDecorator (argCheckFunc) {\n return argCheckFunc(fNOP);\n}\n\n/**\n * !#en\n * Makes a CCClass that inherit from component execute in edit mode.<br>\n * By default, all components are only executed in play mode,\n * which means they will not have their callback functions executed while the Editor is in edit mode.\n * !#zh\n * 允许继承自 Component 的 CCClass 在编辑器里执行。<br>\n * 默认情况下,所有 Component 都只会在运行时才会执行,也就是说它们的生命周期回调不会在编辑器里触发。\n *\n * @method executeInEditMode\n * @example\n * const {ccclass, executeInEditMode} = cc._decorator;\n *\n * &#64;ccclass\n * &#64;executeInEditMode\n * class NewScript extends cc.Component {\n * // ...\n * }\n * @typescript\n * executeInEditMode(): Function\n * executeInEditMode(_class: Function): void\n */\nvar executeInEditMode = (CC_DEV ? createEditorDecorator : createDummyDecorator)(checkCtorArgument, 'executeInEditMode', true);\n\n/**\n * !#en\n * Automatically add required component as a dependency for the CCClass that inherit from component.\n * !#zh\n * 为声明为 CCClass 的组件添加依赖的其它组件。当组件添加到节点上时,如果依赖的组件不存在,引擎将会自动将依赖组件添加到同一个节点,防止脚本出错。该设置在运行时同样有效。\n *\n * @method requireComponent\n * @param {Component} requiredComponent\n * @example\n * const {ccclass, requireComponent} = cc._decorator;\n *\n * &#64;ccclass\n * &#64;requireComponent(cc.Sprite)\n * class SpriteCtrl extends cc.Component {\n * // ...\n * }\n * @typescript\n * requireComponent(requiredComponent: typeof cc.Component): Function\n */\nvar requireComponent = createEditorDecorator(checkCompArgument, 'requireComponent');\n\n/**\n * !#en\n * The menu path to register a component to the editors \"Component\" menu. Eg. \"Rendering/CameraCtrl\".\n * !#zh\n * 将当前组件添加到组件菜单中,方便用户查找。例如 \"Rendering/CameraCtrl\"。\n *\n * @method menu\n * @param {String} path - The path is the menu represented like a pathname.\n * For example the menu could be \"Rendering/CameraCtrl\".\n * @example\n * const {ccclass, menu} = cc._decorator;\n *\n * &#64;ccclass\n * &#64;menu(\"Rendering/CameraCtrl\")\n * class NewScript extends cc.Component {\n * // ...\n * }\n * @typescript\n * menu(path: string): Function\n */\nvar menu = (CC_DEV ? createEditorDecorator : createDummyDecorator)(checkStringArgument, 'menu');\n\n/**\n * !#en\n * The execution order of lifecycle methods for Component.\n * Those less than 0 will execute before while those greater than 0 will execute after.\n * The order will only affect onLoad, onEnable, start, update and lateUpdate while onDisable and onDestroy will not be affected.\n * !#zh\n * 设置脚本生命周期方法调用的优先级。优先级小于 0 的组件将会优先执行,优先级大于 0 的组件将会延后执行。优先级仅会影响 onLoad, onEnable, start, update 和 lateUpdate而 onDisable 和 onDestroy 不受影响。\n *\n * @method executionOrder\n * @param {Number} order - The execution order of lifecycle methods for Component. Those less than 0 will execute before while those greater than 0 will execute after.\n * @example\n * const {ccclass, executionOrder} = cc._decorator;\n *\n * &#64;ccclass\n * &#64;executionOrder(1)\n * class CameraCtrl extends cc.Component {\n * // ...\n * }\n * @typescript\n * executionOrder(order: number): Function\n */\nvar executionOrder = createEditorDecorator(checkNumberArgument, 'executionOrder');\n\n/**\n * !#en\n * Prevents Component of the same type (or subtype) to be added more than once to a Node.\n * !#zh\n * 防止多个相同类型(或子类型)的组件被添加到同一个节点。\n *\n * @method disallowMultiple\n * @example\n * const {ccclass, disallowMultiple} = cc._decorator;\n *\n * &#64;ccclass\n * &#64;disallowMultiple\n * class CameraCtrl extends cc.Component {\n * // ...\n * }\n * @typescript\n * disallowMultiple(): Function\n * disallowMultiple(_class: Function): void\n */\nvar disallowMultiple = (CC_DEV ? createEditorDecorator : createDummyDecorator)(checkCtorArgument, 'disallowMultiple');\n\n/**\n * !#en\n * If specified, the editor's scene view will keep updating this node in 60 fps when it is selected, otherwise, it will update only if necessary.<br>\n * This property is only available if executeInEditMode is true.\n * !#zh\n * 当指定了 \"executeInEditMode\" 以后playOnFocus 可以在选中当前组件所在的节点时,提高编辑器的场景刷新频率到 60 FPS否则场景就只会在必要的时候进行重绘。\n *\n * @method playOnFocus\n * @example\n * const {ccclass, playOnFocus, executeInEditMode} = cc._decorator;\n *\n * &#64;ccclass\n * &#64;executeInEditMode\n * &#64;playOnFocus\n * class CameraCtrl extends cc.Component {\n * // ...\n * }\n * @typescript\n * playOnFocus(): Function\n * playOnFocus(_class: Function): void\n */\nvar playOnFocus = (CC_DEV ? createEditorDecorator : createDummyDecorator)(checkCtorArgument, 'playOnFocus', true);\n\n/**\n * !#en\n * Specifying the url of the custom html to draw the component in **Properties**.\n * !#zh\n * 自定义当前组件在 **属性检查器** 中渲染时所用的网页 url。\n *\n * @method inspector\n * @param {String} url\n * @example\n * const {ccclass, inspector} = cc._decorator;\n *\n * &#64;ccclass\n * &#64;inspector(\"packages://inspector/inspectors/comps/camera-ctrl.js\")\n * class NewScript extends cc.Component {\n * // ...\n * }\n * @typescript\n * inspector(path: string): Function\n */\nvar inspector = (CC_DEV ? createEditorDecorator : createDummyDecorator)(checkStringArgument, 'inspector');\n\n/**\n * !#en\n * Specifying the url of the icon to display in the editor.\n * !#zh\n * 自定义当前组件在编辑器中显示的图标 url。\n *\n * @method icon\n * @param {String} url\n * @private\n * @example\n * const {ccclass, icon} = cc._decorator;\n *\n * &#64;ccclass\n * &#64;icon(\"xxxx.png\")\n * class NewScript extends cc.Component {\n * // ...\n * }\n * @typescript\n * icon(path: string): Function\n */\nvar icon = (CC_DEV ? createEditorDecorator : createDummyDecorator)(checkStringArgument, 'icon');\n\n/**\n * !#en\n * The custom documentation URL.\n * !#zh\n * 指定当前组件的帮助文档的 url设置过后在 **属性检查器** 中就会出现一个帮助图标,用户点击将打开指定的网页。\n *\n * @method help\n * @param {String} url\n * @example\n * const {ccclass, help} = cc._decorator;\n *\n * &#64;ccclass\n * &#64;help(\"app://docs/html/components/spine.html\")\n * class NewScript extends cc.Component {\n * // ...\n * }\n * @typescript\n * help(path: string): Function\n */\nvar help = (CC_DEV ? createEditorDecorator : createDummyDecorator)(checkStringArgument, 'help');\n\n// Other Decorators\n\n/**\n * NOTE:<br>\n * The old mixins implemented in cc.Class(ES5) behaves exact the same as multiple inheritance.\n * But since ES6, class constructor can't be function-called and class methods become non-enumerable,\n * so we can not mix in ES6 Classes.<br>\n * See:<br>\n * [https://esdiscuss.org/topic/traits-are-now-impossible-in-es6-until-es7-since-rev32](https://esdiscuss.org/topic/traits-are-now-impossible-in-es6-until-es7-since-rev32)<br>\n * One possible solution (but IDE unfriendly):<br>\n * [http://justinfagnani.com/2015/12/21/real-mixins-with-javascript-classes](http://justinfagnani.com/2015/12/21/real-mixins-with-javascript-classes/)<br>\n * <br>\n * NOTE:<br>\n * You must manually call mixins constructor, this is different from cc.Class(ES5).\n *\n * @method mixins\n * @param {Function} ...ctor - constructors to mix, only support ES5 constructors or classes defined by using `cc.Class`,\n * not support ES6 Classes.\n * @example\n * const {ccclass, mixins} = cc._decorator;\n *\n * class Animal { ... }\n *\n * const Fly = cc.Class({\n * constructor () { ... }\n * });\n *\n * &#64;ccclass\n * &#64;mixins(cc.EventTarget, Fly)\n * class Bird extends Animal {\n * constructor () {\n * super();\n *\n * // You must manually call mixins constructor, this is different from cc.Class(ES5)\n * cc.EventTarget.call(this);\n * Fly.call(this);\n * }\n * // ...\n * }\n * @typescript\n * mixins(ctor: Function, ...rest: Function[]): Function\n */\nfunction mixins () {\n var mixins = [];\n for (var i = 0; i < arguments.length; i++) {\n mixins[i] = arguments[i];\n }\n return function (ctor) {\n var cache = getClassCache(ctor, 'mixins');\n if (cache) {\n getSubDict(cache, 'proto').mixins = mixins;\n }\n }\n}\n\ncc._decorator = module.exports = {\n ccclass,\n property,\n executeInEditMode,\n requireComponent,\n menu,\n executionOrder,\n disallowMultiple,\n playOnFocus,\n inspector,\n icon,\n help,\n mixins,\n};\n\n// fix submodule pollute ...\n/**\n * @submodule cc\n */\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar js = require('./js');\n\n// enum\n\n/**\n * !#en\n * Define an enum type. <br/>\n * If a enum item has a value of -1, it will be given an Integer number according to it's order in the list.<br/>\n * Otherwise it will use the value specified by user who writes the enum definition.\n *\n * !#zh\n * 定义一个枚举类型。<br/>\n * 用户可以把枚举值设为任意的整数,如果设为 -1系统将会分配为上一个枚举值 + 1。\n *\n * @method Enum\n * @param {object} obj - a JavaScript literal object containing enum names and values, or a TypeScript enum type\n * @return {object} the defined enum type\n * @example {@link cocos2d/core/platform/CCEnum/Enum.js}\n * @typescript Enum<T>(obj: T): T\n */\nfunction Enum (obj) {\n if ('__enums__' in obj) {\n return obj;\n }\n js.value(obj, '__enums__', null, true);\n\n var lastIndex = -1;\n var keys = Object.keys(obj);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var val = obj[key];\n\n if (val === -1) {\n val = ++lastIndex;\n obj[key] = val;\n }\n else {\n if (typeof val === 'number') {\n lastIndex = val;\n }\n else if (typeof val === 'string' && Number.isInteger(parseFloat(key))) {\n continue;\n }\n }\n var reverseKey = '' + val;\n if (key !== reverseKey) {\n if ((CC_EDITOR || CC_TEST) && reverseKey in obj && obj[reverseKey] !== key) {\n cc.errorID(7100, reverseKey);\n continue;\n }\n js.value(obj, reverseKey, key);\n }\n }\n return obj;\n}\n\nEnum.isEnum = function (enumType) {\n return enumType && enumType.hasOwnProperty('__enums__');\n};\n\n/**\n * @method getList\n * @param {Object} enumDef - the enum type defined from cc.Enum\n * @return {Object[]}\n * @private\n */\nEnum.getList = function (enumDef) {\n if (enumDef.__enums__)\n return enumDef.__enums__;\n\n var enums = enumDef.__enums__ = [];\n for (var name in enumDef) {\n var value = enumDef[name];\n if (Number.isInteger(value)) {\n enums.push({ name, value });\n }\n }\n enums.sort( function ( a, b ) { return a.value - b.value; } );\n return enums;\n};\n\nif (CC_DEV) {\n // check key order in object literal\n var _TestEnum = Enum({\n ZERO: -1,\n ONE: -1,\n TWO: -1,\n THREE: -1\n });\n if (_TestEnum.ZERO !== 0 || _TestEnum.ONE !== 1 || _TestEnum.THREE !== 3) {\n cc.errorID(7101);\n }\n}\n\nmodule.exports = cc.Enum = Enum;\n","/****************************************************************************\n Copyright (c) 2011-2012 cocos2d-x.org\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos2d-x.org\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst eventManager = require('../event-manager');\nconst inputManager = require(\"./CCInputManager\");\n\nconst PORTRAIT = 0;\nconst LANDSCAPE_LEFT = -90;\nconst PORTRAIT_UPSIDE_DOWN = 180;\nconst LANDSCAPE_RIGHT = 90;\n\nlet _didAccelerateFun;\n\n/**\n * !#en the device accelerometer reports values for each axis in units of g-force.\n * !#zh 设备重力传感器传递的各个轴的数据。\n * @class Acceleration\n * @method constructor\n * @param {Number} x\n * @param {Number} y\n * @param {Number} z\n * @param {Number} timestamp\n */\ncc.Acceleration = function (x, y, z, timestamp) {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.timestamp = timestamp || 0;\n};\n\n/**\n * whether enable accelerometer event\n * @method setAccelerometerEnabled\n * @param {Boolean} isEnable\n */\ninputManager.setAccelerometerEnabled = function (isEnable) {\n let _t = this;\n if(_t._accelEnabled === isEnable)\n return;\n\n _t._accelEnabled = isEnable;\n let scheduler = cc.director.getScheduler();\n scheduler.enableForTarget(_t);\n if (_t._accelEnabled) {\n _t._registerAccelerometerEvent();\n _t._accelCurTime = 0;\n scheduler.scheduleUpdate(_t);\n } else {\n _t._unregisterAccelerometerEvent();\n _t._accelCurTime = 0;\n scheduler.unscheduleUpdate(_t);\n }\n\n if (CC_JSB || CC_RUNTIME) {\n jsb.device.setMotionEnabled(isEnable);\n }\n};\n\n/**\n * set accelerometer interval value\n * @method setAccelerometerInterval\n * @param {Number} interval\n */\ninputManager.setAccelerometerInterval = function (interval) {\n if (this._accelInterval !== interval) {\n this._accelInterval = interval;\n\n if (CC_JSB || CC_RUNTIME) {\n jsb.device.setMotionInterval(interval);\n }\n }\n};\n\ninputManager._registerKeyboardEvent = function () {\n cc.game.canvas.addEventListener(\"keydown\", function (e) {\n eventManager.dispatchEvent(new cc.Event.EventKeyboard(e.keyCode, true));\n e.stopPropagation();\n e.preventDefault();\n }, false);\n cc.game.canvas.addEventListener(\"keyup\", function (e) {\n eventManager.dispatchEvent(new cc.Event.EventKeyboard(e.keyCode, false));\n e.stopPropagation();\n e.preventDefault();\n }, false);\n};\n\ninputManager._registerAccelerometerEvent = function () {\n let w = window, _t = this;\n _t._acceleration = new cc.Acceleration();\n _t._accelDeviceEvent = w.DeviceMotionEvent || w.DeviceOrientationEvent;\n\n //TODO fix DeviceMotionEvent bug on QQ Browser version 4.1 and below.\n if (cc.sys.browserType === cc.sys.BROWSER_TYPE_MOBILE_QQ)\n _t._accelDeviceEvent = window.DeviceOrientationEvent;\n\n let _deviceEventType = (_t._accelDeviceEvent === w.DeviceMotionEvent) ? \"devicemotion\" : \"deviceorientation\";\n let ua = navigator.userAgent;\n if (/Android/.test(ua) || (/Adr/.test(ua) && cc.sys.browserType === cc.BROWSER_TYPE_UC)) {\n _t._minus = -1;\n }\n\n _didAccelerateFun = _t.didAccelerate.bind(_t);\n w.addEventListener(_deviceEventType, _didAccelerateFun, false);\n};\n\ninputManager._unregisterAccelerometerEvent = function () {\n let w = window, _t = this;\n let _deviceEventType = (_t._accelDeviceEvent === w.DeviceMotionEvent) ? \"devicemotion\" : \"deviceorientation\";\n if (_didAccelerateFun) {\n w.removeEventListener(_deviceEventType, _didAccelerateFun, false);\n }\n};\n\ninputManager.didAccelerate = function (eventData) {\n let _t = this, w = window;\n if (!_t._accelEnabled)\n return;\n\n let mAcceleration = _t._acceleration;\n\n let x, y, z;\n\n if (_t._accelDeviceEvent === window.DeviceMotionEvent) {\n let eventAcceleration = eventData[\"accelerationIncludingGravity\"];\n x = _t._accelMinus * eventAcceleration.x * 0.1;\n y = _t._accelMinus * eventAcceleration.y * 0.1;\n z = eventAcceleration.z * 0.1;\n } else {\n x = (eventData[\"gamma\"] / 90) * 0.981;\n y = -(eventData[\"beta\"] / 90) * 0.981;\n z = (eventData[\"alpha\"] / 90) * 0.981;\n }\n\n if (cc.view._isRotated) {\n let tmp = x;\n x = -y;\n y = tmp;\n }\n mAcceleration.x = x;\n mAcceleration.y = y;\n mAcceleration.z = z;\n\n mAcceleration.timestamp = eventData.timeStamp || Date.now();\n\n let tmpX = mAcceleration.x;\n if (w.orientation === LANDSCAPE_RIGHT) {\n mAcceleration.x = -mAcceleration.y;\n mAcceleration.y = tmpX;\n } else if (w.orientation === LANDSCAPE_LEFT) {\n mAcceleration.x = mAcceleration.y;\n mAcceleration.y = -tmpX;\n } else if (w.orientation === PORTRAIT_UPSIDE_DOWN) {\n mAcceleration.x = -mAcceleration.x;\n mAcceleration.y = -mAcceleration.y;\n }\n // fix android acc values are opposite\n if (cc.sys.os === cc.sys.OS_ANDROID &&\n cc.sys.browserType !== cc.sys.BROWSER_TYPE_MOBILE_QQ) {\n mAcceleration.x = -mAcceleration.x;\n mAcceleration.y = -mAcceleration.y;\n }\n};","/****************************************************************************\n Copyright (c) 2011-2012 cocos2d-x.org\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos2d-x.org\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst macro = require('./CCMacro');\nconst sys = require('./CCSys');\nconst eventManager = require('../event-manager');\n\nlet _vec2 = cc.v2();\n\n/**\n * This class manages all events of input. include: touch, mouse, accelerometer, keyboard\n */\nlet inputManager = {\n _mousePressed: false,\n\n _isRegisterEvent: false,\n\n _preTouchPoint: cc.v2(0,0),\n _prevMousePoint: cc.v2(0,0),\n\n _preTouchPool: [],\n _preTouchPoolPointer: 0,\n\n // All touches pool\n _touches: [],\n // Maximum available touches, it's also the length of _touches array\n _maxTouches: 10,\n // Global touches map with touch id as key and index in _touches as value \n _touchesIntegerDict:{},\n // A bit mask for index of _touches, every bit indicates whether the correspond touch is currently valid\n _indexBitsUsed: 0,\n\n // A global touches map with touch id as key and touch object as value, only contains currently valid touches\n _touchesCache: {},\n // Current global touches count (only valid touches)\n _touchCount: 0,\n\n _accelEnabled: false,\n _accelInterval: 1/5,\n _accelMinus: 1,\n _accelCurTime: 0,\n _acceleration: null,\n _accelDeviceEvent: null,\n\n _canvasBoundingRect: {\n left: 0,\n top: 0,\n adjustedLeft: 0,\n adjustedTop: 0,\n width: 0,\n height: 0,\n },\n\n _getUnUsedIndex () {\n let now = cc.sys.now();\n const timeout = macro.TOUCH_TIMEOUT\n\n let temp = this._indexBitsUsed;\n let unused = -1;\n\n let locTouches = this._touches;\n let locTouchesIntDict = this._touchesIntegerDict;\n let locTouchesCache = this._touchesCache;\n\n for (let i = 0; i < this._maxTouches; i++) {\n if (!(temp & 0x00000001)) {\n if (unused === -1){\n unused = i;\n this._indexBitsUsed |= (1 << i);\n }\n } else {\n const ccTouch = locTouches[i];\n if (ccTouch && (now - ccTouch._lastModified > timeout)) {\n const touchID = ccTouch.getID();\n delete locTouchesIntDict[touchID];\n delete locTouchesCache[touchID];\n this._touchCount--;\n\n if (unused === -1) {\n unused = i;\n this._indexBitsUsed |= (1 << i);\n } else {\n this._indexBitsUsed &= ~(1 << i);\n }\n }\n }\n\n temp >>= 1;\n }\n\n return unused;\n },\n\n _glView: null,\n\n _updateCanvasBoundingRect () {\n let element = cc.game.canvas;\n let canvasBoundingRect = this._canvasBoundingRect;\n\n let docElem = document.documentElement;\n let leftOffset = window.pageXOffset - docElem.clientLeft;\n let topOffset = window.pageYOffset - docElem.clientTop;\n if (element.getBoundingClientRect) {\n let box = element.getBoundingClientRect();\n canvasBoundingRect.left = box.left + leftOffset;\n canvasBoundingRect.top = box.top + topOffset;\n canvasBoundingRect.width = box.width;\n canvasBoundingRect.height = box.height;\n }\n else if (element instanceof HTMLCanvasElement) {\n canvasBoundingRect.left = leftOffset;\n canvasBoundingRect.top = topOffset;\n canvasBoundingRect.width = element.width;\n canvasBoundingRect.height = element.height;\n }\n else {\n canvasBoundingRect.left = leftOffset;\n canvasBoundingRect.top = topOffset;\n canvasBoundingRect.width = parseInt(element.style.width);\n canvasBoundingRect.height = parseInt(element.style.height);\n }\n },\n\n /**\n * @method handleTouchesBegin\n * @param {Array} touches\n */\n handleTouchesBegin (touches) {\n let now = sys.now();\n\n let selTouch, index, touchID, handleTouches = [];\n\n let locTouches = this._touches;\n let locTouchesIntDict = this._touchesIntegerDict;\n let locTouchesCache = this._touchesCache;\n\n for (let i = 0, len = touches.length; i < len; i ++) {\n selTouch = touches[i];\n touchID = selTouch.getID();\n\n index = locTouchesIntDict[touchID];\n if (index === undefined) {\n let unusedIndex = this._getUnUsedIndex();\n if (unusedIndex === -1) {\n cc.logID(2300, unusedIndex);\n continue;\n }\n\n let ccTouch = new cc.Touch(selTouch._point.x, selTouch._point.y, touchID);\n ccTouch._setPrevPoint(selTouch._prevPoint);\n ccTouch._lastModified = now;\n\n locTouches[unusedIndex] = ccTouch;\n locTouchesIntDict[touchID] = unusedIndex;\n locTouchesCache[touchID] = ccTouch;\n this._touchCount++;\n\n handleTouches.push(ccTouch);\n }\n }\n if (handleTouches.length > 0) {\n this._glView._convertTouchesWithScale(handleTouches);\n let touchEvent = new cc.Event.EventTouch(handleTouches);\n touchEvent._eventCode = cc.Event.EventTouch.BEGAN;\n eventManager.dispatchEvent(touchEvent);\n }\n },\n\n /**\n * @method handleTouchesMove\n * @param {Array} touches\n */\n handleTouchesMove (touches) {\n let now = sys.now();\n\n let selTouch, index, touchID, handleTouches = [];\n\n let locTouches = this._touches;\n let locTouchesIntDict = this._touchesIntegerDict;\n\n for (let i = 0, len = touches.length; i < len; i++) {\n selTouch = touches[i];\n touchID = selTouch.getID();\n\n index = locTouchesIntDict[touchID];\n if (index === undefined) {\n //cc.log(\"if the index doesn't exist, it is an error\");\n continue;\n }\n\n const ccTouch = locTouches[index];\n if (ccTouch) {\n ccTouch._setPoint(selTouch._point);\n ccTouch._setPrevPoint(selTouch._prevPoint);\n ccTouch._lastModified = now;\n handleTouches.push(ccTouch);\n }\n }\n\n if (handleTouches.length > 0) {\n this._glView._convertTouchesWithScale(handleTouches);\n let touchEvent = new cc.Event.EventTouch(handleTouches);\n touchEvent._eventCode = cc.Event.EventTouch.MOVED;\n eventManager.dispatchEvent(touchEvent);\n }\n },\n\n /**\n * @method handleTouchesEnd\n * @param {Array} touches\n */\n handleTouchesEnd (touches) {\n let handleTouches = this.getSetOfTouchesEndOrCancel(touches);\n if (handleTouches.length > 0) {\n this._glView._convertTouchesWithScale(handleTouches);\n let touchEvent = new cc.Event.EventTouch(handleTouches);\n touchEvent._eventCode = cc.Event.EventTouch.ENDED;\n eventManager.dispatchEvent(touchEvent);\n }\n this._preTouchPool.length = 0;\n },\n\n /**\n * @method handleTouchesCancel\n * @param {Array} touches\n */\n handleTouchesCancel (touches) {\n let handleTouches = this.getSetOfTouchesEndOrCancel(touches);\n if (handleTouches.length > 0) {\n this._glView._convertTouchesWithScale(handleTouches);\n let touchEvent = new cc.Event.EventTouch(handleTouches);\n touchEvent._eventCode = cc.Event.EventTouch.CANCELED;\n eventManager.dispatchEvent(touchEvent);\n }\n this._preTouchPool.length = 0;\n },\n\n /**\n * @method getSetOfTouchesEndOrCancel\n * @param {Array} touches\n * @returns {Array}\n */\n getSetOfTouchesEndOrCancel (touches) {\n let selTouch, index, touchID, handleTouches = [];\n\n let locTouches = this._touches;\n let locTouchesIntDict = this._touchesIntegerDict;\n let locTouchesCache = this._touchesCache;\n for (let i = 0, len = touches.length; i< len; i ++) {\n selTouch = touches[i];\n touchID = selTouch.getID();\n index = locTouchesIntDict[touchID];\n\n if (index === undefined) {\n continue; //cc.log(\"if the index doesn't exist, it is an error\");\n }\n\n const ccTouch = locTouches[index];\n if (ccTouch) {\n ccTouch._setPoint(selTouch._point);\n ccTouch._setPrevPoint(selTouch._prevPoint);\n handleTouches.push(ccTouch);\n delete locTouchesIntDict[touchID];\n delete locTouchesCache[touchID];\n this._touchCount--;\n\n this._indexBitsUsed &= ~(1 << index);\n }\n }\n return handleTouches;\n },\n\n /**\n * Gets the count of all currently valid touches.\n * @method getGlobalTouchCount\n * @return Current global touches count (only valid touches)\n */\n getGlobalTouchCount () {\n return this._touchCount;\n },\n\n /**\n * Gets global touches map, please do not modify the touches, otherwise all event listener will be affected\n * @method getGlobalTouches\n * @return A global touches map with touch id as key and touch object as value, only contains currently valid touches\n */\n getGlobalTouches () {\n return this._touchesCache;\n },\n\n /**\n * @method getPreTouch\n * @param {Touch} touch\n * @return {Touch}\n */\n getPreTouch (touch) {\n let preTouch = null;\n let locPreTouchPool = this._preTouchPool;\n let id = touch.getID();\n for (let i = locPreTouchPool.length - 1; i >= 0; i--) {\n if (locPreTouchPool[i].getID() === id) {\n preTouch = locPreTouchPool[i];\n break;\n }\n }\n if (!preTouch)\n preTouch = touch;\n return preTouch;\n },\n\n /**\n * @method setPreTouch\n * @param {Touch} touch\n */\n setPreTouch (touch) {\n let find = false;\n let locPreTouchPool = this._preTouchPool;\n let id = touch.getID();\n for (let i = locPreTouchPool.length - 1; i >= 0; i--) {\n if (locPreTouchPool[i].getID() === id) {\n locPreTouchPool[i] = touch;\n find = true;\n break;\n }\n }\n if (!find) {\n if (locPreTouchPool.length <= 50) {\n locPreTouchPool.push(touch);\n } else {\n locPreTouchPool[this._preTouchPoolPointer] = touch;\n this._preTouchPoolPointer = (this._preTouchPoolPointer + 1) % 50;\n }\n }\n },\n\n /**\n * @method getTouchByXY\n * @param {Number} tx\n * @param {Number} ty\n * @param {Vec2} pos\n * @return {Touch}\n */\n getTouchByXY (tx, ty, pos) {\n let locPreTouch = this._preTouchPoint;\n let location = this._glView.convertToLocationInView(tx, ty, pos);\n let touch = new cc.Touch(location.x, location.y, 0);\n touch._setPrevPoint(locPreTouch.x, locPreTouch.y);\n locPreTouch.x = location.x;\n locPreTouch.y = location.y;\n return touch;\n },\n\n /**\n * @method getMouseEvent\n * @param {Vec2} location\n * @param {Vec2} pos\n * @param {Number} eventType\n * @returns {Event.EventMouse}\n */\n getMouseEvent (location, pos, eventType) {\n let locPreMouse = this._prevMousePoint;\n let mouseEvent = new cc.Event.EventMouse(eventType);\n mouseEvent._setPrevCursor(locPreMouse.x, locPreMouse.y);\n locPreMouse.x = location.x;\n locPreMouse.y = location.y;\n this._glView._convertMouseToLocationInView(locPreMouse, pos);\n mouseEvent.setLocation(locPreMouse.x, locPreMouse.y);\n return mouseEvent;\n },\n\n /**\n * @method getPointByEvent\n * @param {Touch} event\n * @param {Vec2} pos\n * @return {Vec2}\n */\n getPointByEvent (event, pos) {\n // qq , uc and safari browser can't calculate pageY correctly, need to refresh canvas bounding rect\n if (cc.sys.browserType === cc.sys.BROWSER_TYPE_QQ\n || cc.sys.browserType === cc.sys.BROWSER_TYPE_UC\n || cc.sys.browserType === cc.sys.BROWSER_TYPE_SAFARI) {\n this._updateCanvasBoundingRect();\n }\n\n if (event.pageX != null) //not avalable in <= IE8\n return {x: event.pageX, y: event.pageY};\n\n pos.left -= document.body.scrollLeft;\n pos.top -= document.body.scrollTop;\n\n return {x: event.clientX, y: event.clientY};\n },\n\n /**\n * @method getTouchesByEvent\n * @param {Touch} event\n * @param {Vec2} pos\n * @returns {Array}\n */\n getTouchesByEvent (event, pos) {\n let touchArr = [], locView = this._glView;\n let touch_event, touch, preLocation;\n let locPreTouch = this._preTouchPoint;\n\n let length = event.changedTouches.length;\n for (let i = 0; i < length; i++) {\n touch_event = event.changedTouches[i];\n if (touch_event) {\n let location;\n if (sys.BROWSER_TYPE_FIREFOX === sys.browserType)\n location = locView.convertToLocationInView(touch_event.pageX, touch_event.pageY, pos, _vec2);\n else\n location = locView.convertToLocationInView(touch_event.clientX, touch_event.clientY, pos, _vec2);\n if (touch_event.identifier != null) {\n touch = new cc.Touch(location.x, location.y, touch_event.identifier);\n //use Touch Pool\n preLocation = this.getPreTouch(touch).getLocation();\n touch._setPrevPoint(preLocation.x, preLocation.y);\n this.setPreTouch(touch);\n } else {\n touch = new cc.Touch(location.x, location.y);\n touch._setPrevPoint(locPreTouch.x, locPreTouch.y);\n }\n locPreTouch.x = location.x;\n locPreTouch.y = location.y;\n touchArr.push(touch);\n }\n }\n return touchArr;\n },\n\n /**\n * @method registerSystemEvent\n * @param {HTMLElement} element\n */\n registerSystemEvent (element) {\n if(this._isRegisterEvent) return;\n\n this._glView = cc.view;\n let selfPointer = this;\n let canvasBoundingRect = this._canvasBoundingRect;\n\n window.addEventListener('resize', this._updateCanvasBoundingRect.bind(this));\n\n let prohibition = sys.isMobile;\n let supportMouse = ('mouse' in sys.capabilities);\n let supportTouches = ('touches' in sys.capabilities);\n\n if (supportMouse) {\n //HACK\n // - At the same time to trigger the ontouch event and onmouse event\n // - The function will execute 2 times\n //The known browser:\n // liebiao\n // miui\n // WECHAT\n if (!prohibition) {\n window.addEventListener('mousedown', function () {\n selfPointer._mousePressed = true;\n }, false);\n\n window.addEventListener('mouseup', function (event) {\n if (!selfPointer._mousePressed)\n return;\n\n selfPointer._mousePressed = false;\n\n let location = selfPointer.getPointByEvent(event, canvasBoundingRect);\n if (!cc.rect(canvasBoundingRect.left, canvasBoundingRect.top, canvasBoundingRect.width, canvasBoundingRect.height).contains(location)){\n selfPointer.handleTouchesEnd([selfPointer.getTouchByXY(location.x, location.y, canvasBoundingRect)]);\n\n let mouseEvent = selfPointer.getMouseEvent(location, canvasBoundingRect, cc.Event.EventMouse.UP);\n mouseEvent.setButton(event.button);\n eventManager.dispatchEvent(mouseEvent);\n }\n }, false);\n }\n\n // register canvas mouse event\n let EventMouse = cc.Event.EventMouse;\n let _mouseEventsOnElement = [\n !prohibition && [\"mousedown\", EventMouse.DOWN, function (event, mouseEvent, location, canvasBoundingRect) {\n selfPointer._mousePressed = true;\n selfPointer.handleTouchesBegin([selfPointer.getTouchByXY(location.x, location.y, canvasBoundingRect)]);\n element.focus();\n }],\n !prohibition && [\"mouseup\", EventMouse.UP, function (event, mouseEvent, location, canvasBoundingRect) {\n selfPointer._mousePressed = false;\n selfPointer.handleTouchesEnd([selfPointer.getTouchByXY(location.x, location.y, canvasBoundingRect)]);\n }],\n !prohibition && [\"mousemove\", EventMouse.MOVE, function (event, mouseEvent, location, canvasBoundingRect) {\n selfPointer.handleTouchesMove([selfPointer.getTouchByXY(location.x, location.y, canvasBoundingRect)]);\n if (!selfPointer._mousePressed) {\n mouseEvent.setButton(null);\n }\n }],\n [\"mousewheel\", EventMouse.SCROLL, function (event, mouseEvent) {\n mouseEvent.setScrollData(0, event.wheelDelta);\n }],\n /* firefox fix */\n [\"DOMMouseScroll\", EventMouse.SCROLL, function (event, mouseEvent) {\n mouseEvent.setScrollData(0, event.detail * -120);\n }]\n ];\n for (let i = 0; i < _mouseEventsOnElement.length; ++i) {\n let entry = _mouseEventsOnElement[i];\n if (entry) {\n let name = entry[0];\n let type = entry[1];\n let handler = entry[2];\n element.addEventListener(name, function (event) {\n let location = selfPointer.getPointByEvent(event, canvasBoundingRect);\n let mouseEvent = selfPointer.getMouseEvent(location, canvasBoundingRect, type);\n mouseEvent.setButton(event.button);\n\n handler(event, mouseEvent, location, canvasBoundingRect);\n\n eventManager.dispatchEvent(mouseEvent);\n event.stopPropagation();\n event.preventDefault();\n }, false);\n }\n }\n }\n\n if (window.navigator.msPointerEnabled) {\n let _pointerEventsMap = {\n \"MSPointerDown\" : selfPointer.handleTouchesBegin,\n \"MSPointerMove\" : selfPointer.handleTouchesMove,\n \"MSPointerUp\" : selfPointer.handleTouchesEnd,\n \"MSPointerCancel\" : selfPointer.handleTouchesCancel\n };\n for (let eventName in _pointerEventsMap) {\n let touchEvent = _pointerEventsMap[eventName];\n element.addEventListener(eventName, function (event){\n let documentElement = document.documentElement;\n canvasBoundingRect.adjustedLeft = canvasBoundingRect.left - documentElement.scrollLeft;\n canvasBoundingRect.adjustedTop = canvasBoundingRect.top - documentElement.scrollTop;\n\n touchEvent.call(selfPointer, [selfPointer.getTouchByXY(event.clientX, event.clientY, canvasBoundingRect)]);\n event.stopPropagation();\n }, false);\n }\n }\n\n //register touch event\n if (supportTouches) {\n let _touchEventsMap = {\n \"touchstart\": function (touchesToHandle) {\n selfPointer.handleTouchesBegin(touchesToHandle);\n element.focus();\n },\n \"touchmove\": function (touchesToHandle) {\n selfPointer.handleTouchesMove(touchesToHandle);\n },\n \"touchend\": function (touchesToHandle) {\n selfPointer.handleTouchesEnd(touchesToHandle);\n },\n \"touchcancel\": function (touchesToHandle) {\n selfPointer.handleTouchesCancel(touchesToHandle);\n }\n };\n\n let registerTouchEvent = function (eventName) {\n let handler = _touchEventsMap[eventName];\n element.addEventListener(eventName, (function(event) {\n if (!event.changedTouches) return;\n let body = document.body;\n\n canvasBoundingRect.adjustedLeft = canvasBoundingRect.left - (body.scrollLeft || window.scrollX || 0);\n canvasBoundingRect.adjustedTop = canvasBoundingRect.top - (body.scrollTop || window.scrollY || 0);\n handler(selfPointer.getTouchesByEvent(event, canvasBoundingRect));\n event.stopPropagation();\n event.preventDefault();\n }), false);\n };\n for (let eventName in _touchEventsMap) {\n registerTouchEvent(eventName);\n }\n }\n\n this._registerKeyboardEvent();\n\n this._isRegisterEvent = true;\n },\n\n _registerKeyboardEvent () {},\n\n _registerAccelerometerEvent () {},\n\n /**\n * @method update\n * @param {Number} dt\n */\n update (dt) {\n if (this._accelCurTime > this._accelInterval) {\n this._accelCurTime -= this._accelInterval;\n eventManager.dispatchEvent(new cc.Event.EventAcceleration(this._acceleration));\n }\n this._accelCurTime += dt;\n },\n\n};\n\nmodule.exports = cc.internal.inputManager = inputManager;\n","/****************************************************************************\n Copyright (c) 2008-2010 Ricardo Quesada\n Copyright (c) 2011-2012 cocos2d-x.org\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos2d-x.org\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * Predefined constants\n * @class macro\n * @static\n */\ncc.macro = {\n /**\n * PI / 180\n * @property RAD\n * @type {Number}\n */\n RAD: Math.PI / 180,\n\n /**\n * One degree\n * @property DEG\n * @type {Number}\n */\n DEG: 180 / Math.PI,\n\n /**\n * @property REPEAT_FOREVER\n * @type {Number}\n */\n REPEAT_FOREVER: (Number.MAX_VALUE - 1),\n\n /**\n * @property FLT_EPSILON\n * @type {Number}\n */\n FLT_EPSILON: 0.0000001192092896,\n\n /**\n * Minimum z index value for node\n * @property MIN_ZINDEX\n * @type {Number}\n */\n MIN_ZINDEX: -Math.pow(2, 15),\n\n /**\n * Maximum z index value for node\n * @property MAX_ZINDEX\n * @type {Number}\n */\n MAX_ZINDEX: Math.pow(2, 15) - 1,\n\n //some gl constant variable\n /**\n * @property ONE\n * @type {Number}\n */\n ONE: 1,\n\n /**\n * @property ZERO\n * @type {Number}\n */\n ZERO: 0,\n\n /**\n * @property SRC_ALPHA\n * @type {Number}\n */\n SRC_ALPHA: 0x0302,\n\n /**\n * @property SRC_ALPHA_SATURATE\n * @type {Number}\n */\n SRC_ALPHA_SATURATE: 0x308,\n\n /**\n * @property SRC_COLOR\n * @type {Number}\n */\n SRC_COLOR: 0x300,\n\n /**\n * @property DST_ALPHA\n * @type {Number}\n */\n DST_ALPHA: 0x304,\n\n /**\n * @property DST_COLOR\n * @type {Number}\n */\n DST_COLOR: 0x306,\n\n /**\n * @property ONE_MINUS_SRC_ALPHA\n * @type {Number}\n */\n ONE_MINUS_SRC_ALPHA: 0x0303,\n\n /**\n * @property ONE_MINUS_SRC_COLOR\n * @type {Number}\n */\n ONE_MINUS_SRC_COLOR: 0x301,\n\n /**\n * @property ONE_MINUS_DST_ALPHA\n * @type {Number}\n */\n ONE_MINUS_DST_ALPHA: 0x305,\n\n /**\n * @property ONE_MINUS_DST_COLOR\n * @type {Number}\n */\n ONE_MINUS_DST_COLOR: 0x0307,\n\n /**\n * @property ONE_MINUS_CONSTANT_ALPHA\n * @type {Number}\n */\n ONE_MINUS_CONSTANT_ALPHA: 0x8004,\n\n /**\n * @property ONE_MINUS_CONSTANT_COLOR\n * @type {Number}\n */\n ONE_MINUS_CONSTANT_COLOR: 0x8002,\n\n //Possible device orientations\n /**\n * Oriented vertically\n * @property ORIENTATION_PORTRAIT\n * @type {Number}\n */\n ORIENTATION_PORTRAIT: 1,\n\n /**\n * Oriented horizontally\n * @property ORIENTATION_LANDSCAPE\n * @type {Number}\n */\n ORIENTATION_LANDSCAPE: 2,\n\n /**\n * Oriented automatically\n * @property ORIENTATION_AUTO\n * @type {Number}\n */\n ORIENTATION_AUTO: 3,\n\n DENSITYDPI_DEVICE: 'device-dpi',\n DENSITYDPI_HIGH: 'high-dpi',\n DENSITYDPI_MEDIUM: 'medium-dpi',\n DENSITYDPI_LOW: 'low-dpi',\n\n // General configurations\n\n /**\n * <p>\n * If enabled, the texture coordinates will be calculated by using this formula: <br/>\n * - texCoord.left = (rect.x*2+1) / (texture.wide*2); <br/>\n * - texCoord.right = texCoord.left + (rect.width*2-2)/(texture.wide*2); <br/>\n * <br/>\n * The same for bottom and top. <br/>\n * <br/>\n * This formula prevents artifacts by using 99% of the texture. <br/>\n * The \"correct\" way to prevent artifacts is by expand the texture's border with the same color by 1 pixel<br/>\n * <br/>\n * Affected component: <br/>\n * - cc.TMXLayer <br/>\n * <br/>\n * Enabled by default. To disabled set it to 0. <br/>\n * To modify it, in Web engine please refer to CCMacro.js, in JSB please refer to CCConfig.h\n * </p>\n *\n * @property {Number} FIX_ARTIFACTS_BY_STRECHING_TEXEL_TMX\n */\n FIX_ARTIFACTS_BY_STRECHING_TEXEL_TMX: true,\n\n /**\n * Position of the FPS (Default: 0,0 (bottom-left corner))<br/>\n * To modify it, in Web engine please refer to CCMacro.js, in JSB please refer to CCConfig.h\n * @property {Vec2} DIRECTOR_STATS_POSITION\n */\n DIRECTOR_STATS_POSITION: cc.v2(0, 0),\n\n /**\n * <p>\n * If enabled, actions that alter the position property (eg: CCMoveBy, CCJumpBy, CCBezierBy, etc..) will be stacked. <br/>\n * 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. <br/>\n * If disabled, only the last run action will take effect.\n * </p>\n * @property {Number} ENABLE_STACKABLE_ACTIONS\n */\n ENABLE_STACKABLE_ACTIONS: true,\n\n /**\n * !#en \n * The timeout to determine whether a touch is no longer active and should be removed.\n * The reason to add this timeout is due to an issue in X5 browser core, \n * when X5 is presented in wechat on Android, if a touch is glissed from the bottom up, and leave the page area,\n * no touch cancel event is triggered, and the touch will be considered active forever. \n * After multiple times of this action, our maximum touches number will be reached and all new touches will be ignored.\n * So this new mechanism can remove the touch that should be inactive if it's not updated during the last 5000 milliseconds.\n * 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.\n * You can modify this value to have a better behavior if you find it's not enough.\n * !#zh\n * 用于甄别一个触点对象是否已经失效并且可以被移除的延时时长\n * 添加这个时长的原因是 X5 内核在微信浏览器中出现的一个 bug。\n * 在这个环境下,如果用户将一个触点从底向上移出页面区域,将不会触发任何 touch cancel 或 touch end 事件,而这个触点会被永远当作停留在页面上的有效触点。\n * 重复这样操作几次之后,屏幕上的触点数量将达到我们的事件系统所支持的最高触点数量,之后所有的触摸事件都将被忽略。\n * 所以这个新的机制可以在触点在一定时间内没有任何更新的情况下视为失效触点并从事件系统中移除。\n * 当然,这也可能移除一个真实的触点,如果用户的触点真的在一定时间段内完全没有移动(这在当前手机屏幕的灵敏度下会很难)。\n * 你可以修改这个值来获得你需要的效果,默认值是 5000 毫秒。\n * @property {Number} TOUCH_TIMEOUT\n */\n TOUCH_TIMEOUT: 5000,\n\n /**\n * !#en \n * The maximum vertex count for a single batched draw call.\n * !#zh\n * 最大可以被单次批处理渲染的顶点数量。\n * @property {Number} BATCH_VERTEX_COUNT\n */\n BATCH_VERTEX_COUNT: 20000,\n\n /**\n * !#en \n * 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.\n * !#zh\n * 是否开启瓦片地图的自动裁减功能。瓦片地图如果设置了 skew, rotation 或者采用了摄像机的话,需要手动关闭,否则渲染会出错。\n * @property {Boolean} ENABLE_TILEDMAP_CULLING\n * @default true\n */\n ENABLE_TILEDMAP_CULLING: true,\n\n /**\n * !#en \n * Boolean that indicates if the canvas contains an alpha channel, default sets to false for better performance.\n * Though if you want to make your canvas background transparent and show other dom elements at the background, \n * you can set it to true before `cc.game.run`.\n * Web only.\n * !#zh\n * 用于设置 Canvas 背景是否支持 alpha 通道,默认为 false这样可以有更高的性能表现。\n * 如果你希望 Canvas 背景是透明的,并显示背后的其他 DOM 元素,你可以在 `cc.game.run` 之前将这个值设为 true。\n * 仅支持 Web\n * @property {Boolean} ENABLE_TRANSPARENT_CANVAS\n * @default false\n */\n ENABLE_TRANSPARENT_CANVAS: false,\n\n /**\n * !#en\n * Boolean that indicates if the WebGL context is created with `antialias` option turned on, default value is false.\n * Set it to true could make your game graphics slightly smoother, like texture hard edges when rotated.\n * Whether to use this really depend on your game design and targeted platform, \n * device with retina display usually have good detail on graphics with or without this option, \n * you probably don't want antialias if your game style is pixel art based.\n * Also, it could have great performance impact with some browser / device using software MSAA.\n * You can set it to true before `cc.game.run`.\n * Web only.\n * !#zh\n * 用于设置在创建 WebGL Context 时是否开启抗锯齿选项,默认值是 false。\n * 将这个选项设置为 true 会让你的游戏画面稍稍平滑一些,比如旋转硬边贴图时的锯齿。是否开启这个选项很大程度上取决于你的游戏和面向的平台。\n * 在大多数拥有 retina 级别屏幕的设备上用户往往无法区分这个选项带来的变化;如果你的游戏选择像素艺术风格,你也多半不会想开启这个选项。\n * 同时,在少部分使用软件级别抗锯齿算法的设备或浏览器上,这个选项会对性能产生比较大的影响。\n * 你可以在 `cc.game.run` 之前设置这个值,否则它不会生效。\n * 仅支持 Web\n * @property {Boolean} ENABLE_WEBGL_ANTIALIAS\n * @default false\n */\n ENABLE_WEBGL_ANTIALIAS: false,\n\n /**\n * !#en\n * Whether or not enable auto culling.\n * This feature have been removed in v2.0 new renderer due to overall performance consumption.\n * We have no plan currently to re-enable auto culling.\n * If your game have more dynamic objects, we suggest to disable auto culling.\n * If your game have more static objects, we suggest to enable auto culling.\n * !#zh\n * 是否开启自动裁减功能,开启裁减功能将会把在屏幕外的物体从渲染队列中去除掉。\n * 这个功能在 v2.0 的新渲染器中被移除了,因为它在大多数游戏中所带来的损耗要高于性能的提升,目前我们没有计划重新支持自动裁剪。\n * 如果游戏中的动态物体比较多的话,建议将此选项关闭。\n * 如果游戏中的静态物体比较多的话,建议将此选项打开。\n * @property {Boolean} ENABLE_CULLING\n * @deprecated since v2.0\n * @default false\n */\n ENABLE_CULLING: false,\n\n /**\n * !#en\n * Whether to clear the original image cache after uploaded a texture to GPU. If cleared, [Dynamic Atlas](https://docs.cocos.com/creator/manual/en/advanced-topics/dynamic-atlas.html) will not be supported.\n * Normally you don't need to enable this option on the web platform, because Image object doesn't consume too much memory.\n * But on WeChat Game platform, the current version cache decoded data in Image object, which has high memory usage.\n * So we enabled this option by default on WeChat, so that we can release Image cache immediately after uploaded to GPU.\n * !#zh\n * 是否在将贴图上传至 GPU 之后删除原始图片缓存,删除之后图片将无法进行 [动态合图](https://docs.cocos.com/creator/manual/zh/advanced-topics/dynamic-atlas.html)。\n * 在 Web 平台,你通常不需要开启这个选项,因为在 Web 平台 Image 对象所占用的内存很小。\n * 但是在微信小游戏平台的当前版本Image 对象会缓存解码后的图片数据,它所占用的内存空间很大。\n * 所以我们在微信平台默认开启了这个选项,这样我们就可以在上传 GL 贴图之后立即释放 Image 对象的内存,避免过高的内存占用。\n * @property {Boolean} CLEANUP_IMAGE_CACHE\n * @default false\n */\n CLEANUP_IMAGE_CACHE: false,\n\n /**\n * !#en\n * Whether or not show mesh wire frame.\n * !#zh\n * 是否显示网格的线框。\n * @property {Boolean} SHOW_MESH_WIREFRAME\n * @default false\n */\n SHOW_MESH_WIREFRAME: false,\n\n /**\n * !#en\n * Whether or not show mesh normal.\n * !#zh\n * 是否显示网格的法线。\n * @property {Boolean} SHOW_MESH_NORMAL\n * @default false\n */\n SHOW_MESH_NORMAL: false,\n\n /**\n * !#en\n * Whether to enable multi-touch.\n * !#zh\n * 是否开启多点触摸\n * @property {Boolean} ENABLE_MULTI_TOUCH\n * @default true\n */\n ENABLE_MULTI_TOUCH: true,\n\n /**\n * References: \n * https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap\n * https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/createImageBitmap\n * \n * !#en\n * Whether to use image bitmap first. If enabled, memory usage will increase.\n * \n * !#zh\n * 是否优先使用 image bitmap启用之后内存占用会变高\n * \n * @property {Boolean} ALLOW_IMAGE_BITMAP\n * @default true\n */\n ALLOW_IMAGE_BITMAP: !cc.sys.isMobile,\n\n /**\n * !#en\n * Whether to use native TTF renderer which is faster but layout slightly different.\n * \n * !#zh\n * 是否使用原生的文本渲染机制, 布局和编辑器有差异.\n * \n * @property {Boolean} ENABLE_NATIVE_TTF_RENDERER\n * @default false\n */\n ENABLE_NATIVE_TTF_RENDERER: false\n\n};\n\nObject.defineProperty(cc.macro, 'ROTATE_ACTION_CCW', {\n set (value) {\n if (cc.RotateTo && cc.RotateBy) {\n cc.RotateTo._reverse = cc.RotateBy._reverse = value;\n }\n }\n});\n\nlet SUPPORT_TEXTURE_FORMATS = ['.pkm', '.pvr', '.webp', '.jpg', '.jpeg', '.bmp', '.png'];\n\n/**\n * !#en\n * The image format supported by the engine defaults, and the supported formats may differ in different build platforms and device types.\n * Currently all platform and device support ['.webp', '.jpg', '.jpeg', '.bmp', '.png'], The iOS mobile platform also supports the PVR format。\n * !#zh\n * 引擎默认支持的图片格式,支持的格式可能在不同的构建平台和设备类型上有所差别。\n * 目前所有平台和设备支持的格式有 ['.webp', '.jpg', '.jpeg', '.bmp', '.png']. 另外 Ios 手机平台还额外支持了 PVR 格式。\n * @property {String[]} SUPPORT_TEXTURE_FORMATS\n */\ncc.macro.SUPPORT_TEXTURE_FORMATS = SUPPORT_TEXTURE_FORMATS;\n\n\n/**\n * !#en Key map for keyboard event\n * !#zh 键盘事件的按键值\n * @enum macro.KEY\n * @example {@link cocos2d/core/platform/CCCommon/KEY.js}\n */\ncc.macro.KEY = {\n /**\n * !#en None\n * !#zh 没有分配\n * @property none\n * @type {Number}\n * @readonly\n */\n none:0,\n\n // android\n /**\n * !#en The back key\n * !#zh 返回键\n * @property back\n * @type {Number}\n * @readonly\n */\n back:6,\n /**\n * !#en The menu key\n * !#zh 菜单键\n * @property menu\n * @type {Number}\n * @readonly\n */\n menu:18,\n\n /**\n * !#en The backspace key\n * !#zh 退格键\n * @property backspace\n * @type {Number}\n * @readonly\n */\n backspace:8,\n\n /**\n * !#en The tab key\n * !#zh Tab 键\n * @property tab\n * @type {Number}\n * @readonly\n */\n tab:9,\n\n /**\n * !#en The enter key\n * !#zh 回车键\n * @property enter\n * @type {Number}\n * @readonly\n */\n enter:13,\n\n /**\n * !#en The shift key\n * !#zh Shift 键\n * @property shift\n * @type {Number}\n * @readonly\n */\n shift:16, //should use shiftkey instead\n\n /**\n * !#en The ctrl key\n * !#zh Ctrl 键\n * @property ctrl\n * @type {Number}\n * @readonly\n */\n ctrl:17, //should use ctrlkey\n\n /**\n * !#en The alt key\n * !#zh Alt 键\n * @property alt\n * @type {Number}\n * @readonly\n */\n alt:18, //should use altkey\n\n /**\n * !#en The pause key\n * !#zh 暂停键\n * @property pause\n * @type {Number}\n * @readonly\n */\n pause:19,\n\n /**\n * !#en The caps lock key\n * !#zh 大写锁定键\n * @property capslock\n * @type {Number}\n * @readonly\n */\n capslock:20,\n\n /**\n * !#en The esc key\n * !#zh ESC 键\n * @property escape\n * @type {Number}\n * @readonly\n */\n escape:27,\n\n /**\n * !#en The space key\n * !#zh 空格键\n * @property space\n * @type {Number}\n * @readonly\n */\n space:32,\n\n /**\n * !#en The page up key\n * !#zh 向上翻页键\n * @property pageup\n * @type {Number}\n * @readonly\n */\n pageup:33,\n\n /**\n * !#en The page down key\n * !#zh 向下翻页键\n * @property pagedown\n * @type {Number}\n * @readonly\n */\n pagedown:34,\n\n /**\n * !#en The end key\n * !#zh 结束键\n * @property end\n * @type {Number}\n * @readonly\n */\n end:35,\n\n /**\n * !#en The home key\n * !#zh 主菜单键\n * @property home\n * @type {Number}\n * @readonly\n */\n home:36,\n\n /**\n * !#en The left key\n * !#zh 向左箭头键\n * @property left\n * @type {Number}\n * @readonly\n */\n left:37,\n\n /**\n * !#en The up key\n * !#zh 向上箭头键\n * @property up\n * @type {Number}\n * @readonly\n */\n up:38,\n\n /**\n * !#en The right key\n * !#zh 向右箭头键\n * @property right\n * @type {Number}\n * @readonly\n */\n right:39,\n\n /**\n * !#en The down key\n * !#zh 向下箭头键\n * @property down\n * @type {Number}\n * @readonly\n */\n down:40,\n\n /**\n * !#en The select key\n * !#zh Select 键\n * @property select\n * @type {Number}\n * @readonly\n */\n select:41,\n\n /**\n * !#en The insert key\n * !#zh 插入键\n * @property insert\n * @type {Number}\n * @readonly\n */\n insert:45,\n\n /**\n * !#en The Delete key\n * !#zh 删除键\n * @property Delete\n * @type {Number}\n * @readonly\n */\n Delete:46,\n\n /**\n * !#en The '0' key on the top of the alphanumeric keyboard.\n * !#zh 字母键盘上的 0 键\n * @property 0\n * @type {Number}\n * @readonly\n */\n 0:48,\n\n /**\n * !#en The '1' key on the top of the alphanumeric keyboard.\n * !#zh 字母键盘上的 1 键\n * @property 1\n * @type {Number}\n * @readonly\n */\n 1:49,\n\n /**\n * !#en The '2' key on the top of the alphanumeric keyboard.\n * !#zh 字母键盘上的 2 键\n * @property 2\n * @type {Number}\n * @readonly\n */\n 2:50,\n\n /**\n * !#en The '3' key on the top of the alphanumeric keyboard.\n * !#zh 字母键盘上的 3 键\n * @property 3\n * @type {Number}\n * @readonly\n */\n 3:51,\n\n /**\n * !#en The '4' key on the top of the alphanumeric keyboard.\n * !#zh 字母键盘上的 4 键\n * @property 4\n * @type {Number}\n * @readonly\n */\n 4:52,\n\n /**\n * !#en The '5' key on the top of the alphanumeric keyboard.\n * !#zh 字母键盘上的 5 键\n * @property 5\n * @type {Number}\n * @readonly\n */\n 5:53,\n\n /**\n * !#en The '6' key on the top of the alphanumeric keyboard.\n * !#zh 字母键盘上的 6 键\n * @property 6\n * @type {Number}\n * @readonly\n */\n 6:54,\n\n /**\n * !#en The '7' key on the top of the alphanumeric keyboard.\n * !#zh 字母键盘上的 7 键\n * @property 7\n * @type {Number}\n * @readonly\n */\n 7:55,\n\n /**\n * !#en The '8' key on the top of the alphanumeric keyboard.\n * !#zh 字母键盘上的 8 键\n * @property 8\n * @type {Number}\n * @readonly\n */\n 8:56,\n\n /**\n * !#en The '9' key on the top of the alphanumeric keyboard.\n * !#zh 字母键盘上的 9 键\n * @property 9\n * @type {Number}\n * @readonly\n */\n 9:57,\n\n /**\n * !#en The a key\n * !#zh A 键\n * @property a\n * @type {Number}\n * @readonly\n */\n a:65,\n\n /**\n * !#en The b key\n * !#zh B 键\n * @property b\n * @type {Number}\n * @readonly\n */\n b:66,\n\n /**\n * !#en The c key\n * !#zh C 键\n * @property c\n * @type {Number}\n * @readonly\n */\n c:67,\n\n /**\n * !#en The d key\n * !#zh D 键\n * @property d\n * @type {Number}\n * @readonly\n */\n d:68,\n\n /**\n * !#en The e key\n * !#zh E 键\n * @property e\n * @type {Number}\n * @readonly\n */\n e:69,\n\n /**\n * !#en The f key\n * !#zh F 键\n * @property f\n * @type {Number}\n * @readonly\n */\n f:70,\n\n /**\n * !#en The g key\n * !#zh G 键\n * @property g\n * @type {Number}\n * @readonly\n */\n g:71,\n\n /**\n * !#en The h key\n * !#zh H 键\n * @property h\n * @type {Number}\n * @readonly\n */\n h:72,\n\n /**\n * !#en The i key\n * !#zh I 键\n * @property i\n * @type {Number}\n * @readonly\n */\n i:73,\n\n /**\n * !#en The j key\n * !#zh J 键\n * @property j\n * @type {Number}\n * @readonly\n */\n j:74,\n\n /**\n * !#en The k key\n * !#zh K 键\n * @property k\n * @type {Number}\n * @readonly\n */\n k:75,\n\n /**\n * !#en The l key\n * !#zh L 键\n * @property l\n * @type {Number}\n * @readonly\n */\n l:76,\n\n /**\n * !#en The m key\n * !#zh M 键\n * @property m\n * @type {Number}\n * @readonly\n */\n m:77,\n\n /**\n * !#en The n key\n * !#zh N 键\n * @property n\n * @type {Number}\n * @readonly\n */\n n:78,\n\n /**\n * !#en The o key\n * !#zh O 键\n * @property o\n * @type {Number}\n * @readonly\n */\n o:79,\n\n /**\n * !#en The p key\n * !#zh P 键\n * @property p\n * @type {Number}\n * @readonly\n */\n p:80,\n\n /**\n * !#en The q key\n * !#zh Q 键\n * @property q\n * @type {Number}\n * @readonly\n */\n q:81,\n\n /**\n * !#en The r key\n * !#zh R 键\n * @property r\n * @type {Number}\n * @readonly\n */\n r:82,\n\n /**\n * !#en The s key\n * !#zh S 键\n * @property s\n * @type {Number}\n * @readonly\n */\n s:83,\n\n /**\n * !#en The t key\n * !#zh T 键\n * @property t\n * @type {Number}\n * @readonly\n */\n t:84,\n\n /**\n * !#en The u key\n * !#zh U 键\n * @property u\n * @type {Number}\n * @readonly\n */\n u:85,\n\n /**\n * !#en The v key\n * !#zh V 键\n * @property v\n * @type {Number}\n * @readonly\n */\n v:86,\n\n /**\n * !#en The w key\n * !#zh W 键\n * @property w\n * @type {Number}\n * @readonly\n */\n w:87,\n\n /**\n * !#en The x key\n * !#zh X 键\n * @property x\n * @type {Number}\n * @readonly\n */\n x:88,\n\n /**\n * !#en The y key\n * !#zh Y 键\n * @property y\n * @type {Number}\n * @readonly\n */\n y:89,\n\n /**\n * !#en The z key\n * !#zh Z 键\n * @property z\n * @type {Number}\n * @readonly\n */\n z:90,\n\n /**\n * !#en The numeric keypad 0\n * !#zh 数字键盘 0\n * @property num0\n * @type {Number}\n * @readonly\n */\n num0:96,\n\n /**\n * !#en The numeric keypad 1\n * !#zh 数字键盘 1\n * @property num1\n * @type {Number}\n * @readonly\n */\n num1:97,\n\n /**\n * !#en The numeric keypad 2\n * !#zh 数字键盘 2\n * @property num2\n * @type {Number}\n * @readonly\n */\n num2:98,\n\n /**\n * !#en The numeric keypad 3\n * !#zh 数字键盘 3\n * @property num3\n * @type {Number}\n * @readonly\n */\n num3:99,\n\n /**\n * !#en The numeric keypad 4\n * !#zh 数字键盘 4\n * @property num4\n * @type {Number}\n * @readonly\n */\n num4:100,\n\n /**\n * !#en The numeric keypad 5\n * !#zh 数字键盘 5\n * @property num5\n * @type {Number}\n * @readonly\n */\n num5:101,\n\n /**\n * !#en The numeric keypad 6\n * !#zh 数字键盘 6\n * @property num6\n * @type {Number}\n * @readonly\n */\n num6:102,\n\n /**\n * !#en The numeric keypad 7\n * !#zh 数字键盘 7\n * @property num7\n * @type {Number}\n * @readonly\n */\n num7:103,\n\n /**\n * !#en The numeric keypad 8\n * !#zh 数字键盘 8\n * @property num8\n * @type {Number}\n * @readonly\n */\n num8:104,\n\n /**\n * !#en The numeric keypad 9\n * !#zh 数字键盘 9\n * @property num9\n * @type {Number}\n * @readonly\n */\n num9:105,\n\n /**\n * !#en The numeric keypad '*'\n * !#zh 数字键盘 *\n * @property *\n * @type {Number}\n * @readonly\n */\n '*':106,\n\n /**\n * !#en The numeric keypad '+'\n * !#zh 数字键盘 +\n * @property +\n * @type {Number}\n * @readonly\n */\n '+':107,\n\n /**\n * !#en The numeric keypad '-'\n * !#zh 数字键盘 -\n * @property -\n * @type {Number}\n * @readonly\n */\n '-':109,\n\n /**\n * !#en The numeric keypad 'delete'\n * !#zh 数字键盘删除键\n * @property numdel\n * @type {Number}\n * @readonly\n */\n 'numdel':110,\n\n /**\n * !#en The numeric keypad '/'\n * !#zh 数字键盘 /\n * @property /\n * @type {Number}\n * @readonly\n */\n '/':111,\n\n /**\n * !#en The F1 function key\n * !#zh F1 功能键\n * @property f1\n * @type {Number}\n * @readonly\n */\n f1:112, //f1-f12 dont work on ie\n\n /**\n * !#en The F2 function key\n * !#zh F2 功能键\n * @property f2\n * @type {Number}\n * @readonly\n */\n f2:113,\n\n /**\n * !#en The F3 function key\n * !#zh F3 功能键\n * @property f3\n * @type {Number}\n * @readonly\n */\n f3:114,\n\n /**\n * !#en The F4 function key\n * !#zh F4 功能键\n * @property f4\n * @type {Number}\n * @readonly\n */\n f4:115,\n\n /**\n * !#en The F5 function key\n * !#zh F5 功能键\n * @property f5\n * @type {Number}\n * @readonly\n */\n f5:116,\n\n /**\n * !#en The F6 function key\n * !#zh F6 功能键\n * @property f6\n * @type {Number}\n * @readonly\n */\n f6:117,\n\n /**\n * !#en The F7 function key\n * !#zh F7 功能键\n * @property f7\n * @type {Number}\n * @readonly\n */\n f7:118,\n\n /**\n * !#en The F8 function key\n * !#zh F8 功能键\n * @property f8\n * @type {Number}\n * @readonly\n */\n f8:119,\n\n /**\n * !#en The F9 function key\n * !#zh F9 功能键\n * @property f9\n * @type {Number}\n * @readonly\n */\n f9:120,\n\n /**\n * !#en The F10 function key\n * !#zh F10 功能键\n * @property f10\n * @type {Number}\n * @readonly\n */\n f10:121,\n\n /**\n * !#en The F11 function key\n * !#zh F11 功能键\n * @property f11\n * @type {Number}\n * @readonly\n */\n f11:122,\n\n /**\n * !#en The F12 function key\n * !#zh F12 功能键\n * @property f12\n * @type {Number}\n * @readonly\n */\n f12:123,\n\n /**\n * !#en The numlock key\n * !#zh 数字锁定键\n * @property numlock\n * @type {Number}\n * @readonly\n */\n numlock:144,\n\n /**\n * !#en The scroll lock key\n * !#zh 滚动锁定键\n * @property scrolllock\n * @type {Number}\n * @readonly\n */\n scrolllock:145,\n\n /**\n * !#en The ';' key.\n * !#zh 分号键\n * @property ;\n * @type {Number}\n * @readonly\n */\n ';':186,\n\n /**\n * !#en The ';' key.\n * !#zh 分号键\n * @property semicolon\n * @type {Number}\n * @readonly\n */\n semicolon:186,\n\n /**\n * !#en The '=' key.\n * !#zh 等于号键\n * @property equal\n * @type {Number}\n * @readonly\n */\n equal:187,\n\n /**\n * !#en The '=' key.\n * !#zh 等于号键\n * @property =\n * @type {Number}\n * @readonly\n */\n '=':187,\n\n /**\n * !#en The ',' key.\n * !#zh 逗号键\n * @property ,\n * @type {Number}\n * @readonly\n */\n ',':188,\n\n /**\n * !#en The ',' key.\n * !#zh 逗号键\n * @property comma\n * @type {Number}\n * @readonly\n */\n comma:188,\n\n /**\n * !#en The dash '-' key.\n * !#zh 中划线键\n * @property dash\n * @type {Number}\n * @readonly\n */\n dash:189,\n\n /**\n * !#en The '.' key.\n * !#zh 句号键\n * @property .\n * @type {Number}\n * @readonly\n */\n '.':190,\n\n /**\n * !#en The '.' key\n * !#zh 句号键\n * @property period\n * @type {Number}\n * @readonly\n */\n period:190,\n\n /**\n * !#en The forward slash key\n * !#zh 正斜杠键\n * @property forwardslash\n * @type {Number}\n * @readonly\n */\n forwardslash:191,\n\n /**\n * !#en The grave key\n * !#zh 按键 `\n * @property grave\n * @type {Number}\n * @readonly\n */\n grave:192,\n\n /**\n * !#en The '[' key\n * !#zh 按键 [\n * @property [\n * @type {Number}\n * @readonly\n */\n '[':219,\n\n /**\n * !#en The '[' key\n * !#zh 按键 [\n * @property openbracket\n * @type {Number}\n * @readonly\n */\n openbracket:219,\n\n /**\n * !#en The '\\' key\n * !#zh 反斜杠键\n * @property backslash\n * @type {Number}\n * @readonly\n */\n backslash:220,\n\n /**\n * !#en The ']' key\n * !#zh 按键 ]\n * @property ]\n * @type {Number}\n * @readonly\n */\n ']':221,\n\n /**\n * !#en The ']' key\n * !#zh 按键 ]\n * @property closebracket\n * @type {Number}\n * @readonly\n */\n closebracket:221,\n\n /**\n * !#en The quote key\n * !#zh 单引号键\n * @property quote\n * @type {Number}\n * @readonly\n */\n quote:222,\n\n // gamepad controll\n\n /**\n * !#en The dpad left key\n * !#zh 导航键 向左\n * @property dpadLeft\n * @type {Number}\n * @readonly\n */\n dpadLeft:1000,\n\n /**\n * !#en The dpad right key\n * !#zh 导航键 向右\n * @property dpadRight\n * @type {Number}\n * @readonly\n */\n dpadRight:1001,\n\n /**\n * !#en The dpad up key\n * !#zh 导航键 向上\n * @property dpadUp\n * @type {Number}\n * @readonly\n */\n dpadUp:1003,\n\n /**\n * !#en The dpad down key\n * !#zh 导航键 向下\n * @property dpadDown\n * @type {Number}\n * @readonly\n */\n dpadDown:1004,\n\n /**\n * !#en The dpad center key\n * !#zh 导航键 确定键\n * @property dpadCenter\n * @type {Number}\n * @readonly\n */\n dpadCenter:1005\n};\n\n/**\n * Image formats\n * @enum macro.ImageFormat\n */\ncc.macro.ImageFormat = cc.Enum({\n /**\n * Image Format:JPG\n * @property JPG\n * @type {Number}\n */\n JPG: 0,\n /**\n * Image Format:PNG\n * @property PNG\n * @type {Number}\n */\n PNG: 1,\n /**\n * Image Format:TIFF\n * @property TIFF\n * @type {Number}\n */\n TIFF: 2,\n /**\n * Image Format:WEBP\n * @property WEBP\n * @type {Number}\n */\n WEBP: 3,\n /**\n * Image Format:PVR\n * @property PVR\n * @type {Number}\n */\n PVR: 4,\n /**\n * Image Format:ETC\n * @property ETC\n * @type {Number}\n */\n ETC: 5,\n /**\n * Image Format:S3TC\n * @property S3TC\n * @type {Number}\n */\n S3TC: 6,\n /**\n * Image Format:ATITC\n * @property ATITC\n * @type {Number}\n */\n ATITC: 7,\n /**\n * Image Format:TGA\n * @property TGA\n * @type {Number}\n */\n TGA: 8,\n /**\n * Image Format:RAWDATA\n * @property RAWDATA\n * @type {Number}\n */\n RAWDATA: 9,\n /**\n * Image Format:UNKNOWN\n * @property UNKNOWN\n * @type {Number}\n */\n UNKNOWN: 10\n});\n\n/**\n * !#en\n * Enum for blend factor\n * Refer to: http://www.andersriggelsen.dk/glblendfunc.php\n * !#zh\n * 混合因子\n * 可参考: http://www.andersriggelsen.dk/glblendfunc.php\n * @enum macro.BlendFactor\n */\ncc.macro.BlendFactor = cc.Enum({\n /**\n * !#en All use\n * !#zh 全部使用\n * @property {Number} ONE\n */\n ONE: 1, //cc.macro.ONE\n /**\n * !#en Not all\n * !#zh 全部不用\n * @property {Number} ZERO\n */\n ZERO: 0, //cc.ZERO\n /**\n * !#en Using the source alpha\n * !#zh 使用源颜色的透明度\n * @property {Number} SRC_ALPHA\n */\n SRC_ALPHA: 0x302, //cc.SRC_ALPHA\n /**\n * !#en Using the source color\n * !#zh 使用源颜色\n * @property {Number} SRC_COLOR\n */\n SRC_COLOR: 0x300, //cc.SRC_COLOR\n /**\n * !#en Using the target alpha\n * !#zh 使用目标颜色的透明度\n * @property {Number} DST_ALPHA\n */\n DST_ALPHA: 0x304, //cc.DST_ALPHA\n /**\n * !#en Using the target color\n * !#zh 使用目标颜色\n * @property {Number} DST_COLOR\n */\n DST_COLOR: 0x306, //cc.DST_COLOR\n /**\n * !#en Minus the source alpha\n * !#zh 减去源颜色的透明度\n * @property {Number} ONE_MINUS_SRC_ALPHA\n */\n ONE_MINUS_SRC_ALPHA: 0x303, //cc.ONE_MINUS_SRC_ALPHA\n /**\n * !#en Minus the source color\n * !#zh 减去源颜色\n * @property {Number} ONE_MINUS_SRC_COLOR\n */\n ONE_MINUS_SRC_COLOR: 0x301, //cc.ONE_MINUS_SRC_COLOR\n /**\n * !#en Minus the target alpha\n * !#zh 减去目标颜色的透明度\n * @property {Number} ONE_MINUS_DST_ALPHA\n */\n ONE_MINUS_DST_ALPHA: 0x305, //cc.ONE_MINUS_DST_ALPHA\n /**\n * !#en Minus the target color\n * !#zh 减去目标颜色\n * @property {Number} ONE_MINUS_DST_COLOR\n */\n ONE_MINUS_DST_COLOR: 0x307, //cc.ONE_MINUS_DST_COLOR\n});\n\n/**\n * @enum macro.TextAlignment\n */\ncc.macro.TextAlignment = cc.Enum({\n /**\n * @property {Number} LEFT\n */\n LEFT: 0,\n /**\n * @property {Number} CENTER\n */\n CENTER: 1,\n /**\n * @property {Number} RIGHT\n */\n RIGHT: 2\n});\n\n/**\n * @enum VerticalTextAlignment\n */\ncc.macro.VerticalTextAlignment = cc.Enum({\n /**\n * @property {Number} TOP\n */\n TOP: 0,\n /**\n * @property {Number} CENTER\n */\n CENTER: 1,\n /**\n * @property {Number} BOTTOM\n */\n BOTTOM: 2\n});\n\nmodule.exports = cc.macro;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar js = require('./js');\nvar CCClass = require('./CCClass');\n\n// definitions for CCObject.Flags\n\nvar Destroyed = 1 << 0;\nvar RealDestroyed = 1 << 1;\nvar ToDestroy = 1 << 2;\nvar DontSave = 1 << 3;\nvar EditorOnly = 1 << 4;\nvar Dirty = 1 << 5;\nvar DontDestroy = 1 << 6;\nvar Destroying = 1 << 7;\nvar Deactivating = 1 << 8;\nvar LockedInEditor = 1 << 9;\n//var HideInGame = 1 << 9;\nvar HideInHierarchy = 1 << 10;\n\nvar IsOnEnableCalled = 1 << 11;\nvar IsEditorOnEnableCalled = 1 << 12;\nvar IsPreloadStarted = 1 << 13;\nvar IsOnLoadCalled = 1 << 14;\nvar IsOnLoadStarted = 1 << 15;\nvar IsStartCalled = 1 << 16;\n\nvar IsRotationLocked = 1 << 17;\nvar IsScaleLocked = 1 << 18;\nvar IsAnchorLocked = 1 << 19;\nvar IsSizeLocked = 1 << 20;\nvar IsPositionLocked = 1 << 21;\n\n// var Hide = HideInGame | HideInHierarchy;\n// should not clone or serialize these flags\nvar PersistentMask = ~(ToDestroy | Dirty | Destroying | DontDestroy | Deactivating |\n IsPreloadStarted | IsOnLoadStarted | IsOnLoadCalled | IsStartCalled |\n IsOnEnableCalled | IsEditorOnEnableCalled |\n IsRotationLocked | IsScaleLocked | IsAnchorLocked | IsSizeLocked | IsPositionLocked\n /*RegisteredInEditor*/);\n\n/**\n * The base class of most of all the objects in Fireball.\n * @class Object\n *\n * @main\n * @private\n */\nfunction CCObject () {\n /**\n * @property {String} _name\n * @default \"\"\n * @private\n */\n this._name = '';\n\n /**\n * @property {Number} _objFlags\n * @default 0\n * @private\n */\n this._objFlags = 0;\n}\nCCClass.fastDefine('cc.Object', CCObject, { _name: '', _objFlags: 0 });\n\n/**\n * Bit mask that controls object states.\n * @enum Flags\n * @static\n * @private\n */\njs.value(CCObject, 'Flags', {\n\n Destroyed,\n //ToDestroy: ToDestroy,\n\n /**\n * !#en The object will not be saved.\n * !#zh 该对象将不会被保存。\n * @property {Number} DontSave\n */\n DontSave,\n\n /**\n * !#en The object will not be saved when building a player.\n * !#zh 构建项目时,该对象将不会被保存。\n * @property {Number} EditorOnly\n */\n EditorOnly,\n\n Dirty,\n\n /**\n * !#en Dont destroy automatically when loading a new scene.\n * !#zh 加载一个新场景时,不自动删除该对象。\n * @property DontDestroy\n * @private\n */\n DontDestroy,\n\n PersistentMask,\n\n // FLAGS FOR ENGINE\n\n Destroying,\n\n /**\n * !#en The node is deactivating.\n * !#zh 节点正在反激活的过程中。\n * @property Deactivating\n * @private\n */\n Deactivating,\n\n /**\n * !#en The lock node, when the node is locked, cannot be clicked in the scene.\n * !#zh 锁定节点,锁定后场景内不能点击。\n * \n * @property LockedInEditor\n * @private\n */\n LockedInEditor,\n\n ///**\n // * !#en\n // * Hide in game and hierarchy.\n // * This flag is readonly, it can only be used as an argument of `scene.addEntity()` or `Entity.createWithFlags()`.\n // * !#zh\n // * 在游戏和层级中隐藏该对象。<br/>\n // * 该标记只读,它只能被用作 `scene.addEntity()` 或者 `Entity.createWithFlags()` 的一个参数。\n // * @property {Number} HideInGame\n // */\n //HideInGame: HideInGame,\n\n // FLAGS FOR EDITOR\n\n /**\n * !#en Hide the object in editor.\n * !#zh 在编辑器中隐藏该对象。\n * @property {Number} HideInHierarchy\n */\n HideInHierarchy: HideInHierarchy,\n\n ///**\n // * !#en\n // * Hide in game view, hierarchy, and scene view... etc.\n // * This flag is readonly, it can only be used as an argument of `scene.addEntity()` or `Entity.createWithFlags()`.\n // * !#zh\n // * 在游戏视图,层级,场景视图等等...中隐藏该对象。\n // * 该标记只读,它只能被用作 `scene.addEntity()` 或者 `Entity.createWithFlags()` 的一个参数。\n // * @property {Number} Hide\n // */\n //Hide: Hide,\n\n // FLAGS FOR COMPONENT\n\n IsPreloadStarted,\n IsOnLoadStarted,\n IsOnLoadCalled,\n IsOnEnableCalled,\n IsStartCalled,\n IsEditorOnEnableCalled,\n\n IsPositionLocked,\n IsRotationLocked,\n IsScaleLocked,\n IsAnchorLocked,\n IsSizeLocked,\n});\n\nvar objectsToDestroy = [];\n\nfunction deferredDestroy () {\n var deleteCount = objectsToDestroy.length;\n for (var i = 0; i < deleteCount; ++i) {\n var obj = objectsToDestroy[i];\n if (!(obj._objFlags & Destroyed)) {\n obj._destroyImmediate();\n }\n }\n // if we called b.destory() in a.onDestroy(), objectsToDestroy will be resized,\n // but we only destroy the objects which called destory in this frame.\n if (deleteCount === objectsToDestroy.length) {\n objectsToDestroy.length = 0;\n }\n else {\n objectsToDestroy.splice(0, deleteCount);\n }\n\n if (CC_EDITOR) {\n deferredDestroyTimer = null;\n }\n}\n\njs.value(CCObject, '_deferredDestroy', deferredDestroy);\n\nif (CC_EDITOR) {\n js.value(CCObject, '_clearDeferredDestroyTimer', function () {\n if (deferredDestroyTimer !== null) {\n clearImmediate(deferredDestroyTimer);\n deferredDestroyTimer = null;\n }\n });\n}\n\n// MEMBER\n\n/**\n * @class Object\n */\n\nvar prototype = CCObject.prototype;\n\n/**\n * !#en The name of the object.\n * !#zh 该对象的名称。\n * @property {String} name\n * @default \"\"\n * @example\n * obj.name = \"New Obj\";\n */\njs.getset(prototype, 'name',\n function () {\n return this._name;\n },\n function (value) {\n this._name = value;\n },\n true\n);\n\n/**\n * !#en\n * Indicates whether the object is not yet destroyed. (It will not be available after being destroyed)<br>\n * When an object's `destroy` is called, it is actually destroyed after the end of this frame.\n * So `isValid` will return false from the next frame, while `isValid` in the current frame will still be true.\n * If you want to determine whether the current frame has called `destroy`, use `cc.isValid(obj, true)`,\n * but this is often caused by a particular logical requirements, which is not normally required.\n *\n * !#zh\n * 表示该对象是否可用(被 destroy 后将不可用)。<br>\n * 当一个对象的 `destroy` 调用以后,会在这一帧结束后才真正销毁。因此从下一帧开始 `isValid` 就会返回 false而当前帧内 `isValid` 仍然会是 true。如果希望判断当前帧是否调用过 `destroy`,请使用 `cc.isValid(obj, true)`,不过这往往是特殊的业务需求引起的,通常情况下不需要这样。\n *\n * @property {Boolean} isValid\n * @default true\n * @readOnly\n * @example\n * var node = new cc.Node();\n * cc.log(node.isValid); // true\n * node.destroy();\n * cc.log(node.isValid); // true, still valid in this frame\n * // after a frame...\n * cc.log(node.isValid); // false, destroyed in the end of last frame\n */\njs.get(prototype, 'isValid', function () {\n return !(this._objFlags & Destroyed);\n}, true);\n\nif (CC_EDITOR || CC_TEST) {\n js.get(prototype, 'isRealValid', function () {\n return !(this._objFlags & RealDestroyed);\n });\n}\n\nvar deferredDestroyTimer = null;\n\n/**\n * !#en\n * Destroy this Object, and release all its own references to other objects.<br/>\n * Actual object destruction will delayed until before rendering.\n * From the next frame, this object is not usable anymore.\n * You can use `cc.isValid(obj)` to check whether the object is destroyed before accessing it.\n * !#zh\n * 销毁该对象,并释放所有它对其它对象的引用。<br/>\n * 实际销毁操作会延迟到当前帧渲染前执行。从下一帧开始,该对象将不再可用。\n * 您可以在访问对象之前使用 `cc.isValid(obj)` 来检查对象是否已被销毁。\n * @method destroy\n * @return {Boolean} whether it is the first time the destroy being called\n * @example\n * obj.destroy();\n */\nprototype.destroy = function () {\n if (this._objFlags & Destroyed) {\n cc.warnID(5000);\n return false;\n }\n if (this._objFlags & ToDestroy) {\n return false;\n }\n this._objFlags |= ToDestroy;\n objectsToDestroy.push(this);\n\n if (CC_EDITOR && deferredDestroyTimer === null && cc.engine && ! cc.engine._isUpdating) {\n // auto destroy immediate in edit mode\n deferredDestroyTimer = setImmediate(deferredDestroy);\n }\n return true;\n};\n\nif (CC_EDITOR || CC_TEST) {\n /*\n * !#en\n * In fact, Object's \"destroy\" will not trigger the destruct operation in Firebal Editor.\n * The destruct operation will be executed by Undo system later.\n * !#zh\n * 事实上,对象的 “destroy” 不会在编辑器中触发析构操作,\n * 析构操作将在 Undo 系统中 **延后** 执行。\n * @method realDestroyInEditor\n * @private\n */\n prototype.realDestroyInEditor = function () {\n if ( !(this._objFlags & Destroyed) ) {\n cc.warnID(5001);\n return;\n }\n if (this._objFlags & RealDestroyed) {\n cc.warnID(5000);\n return;\n }\n this._destruct();\n this._objFlags |= RealDestroyed;\n };\n}\n\nfunction compileDestruct (obj, ctor) {\n var shouldSkipId = obj instanceof cc._BaseNode || obj instanceof cc.Component;\n var idToSkip = shouldSkipId ? '_id' : null;\n\n var key, propsToReset = {};\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n if (key === idToSkip) {\n continue;\n }\n switch (typeof obj[key]) {\n case 'string':\n propsToReset[key] = '';\n break;\n case 'object':\n case 'function':\n propsToReset[key] = null;\n break;\n }\n }\n }\n // Overwrite propsToReset according to Class\n if (cc.Class._isCCClass(ctor)) {\n var attrs = cc.Class.Attr.getClassAttrs(ctor);\n var propList = ctor.__props__;\n for (var i = 0; i < propList.length; i++) {\n key = propList[i];\n var attrKey = key + cc.Class.Attr.DELIMETER + 'default';\n if (attrKey in attrs) {\n if (shouldSkipId && key === '_id') {\n continue;\n }\n switch (typeof attrs[attrKey]) {\n case 'string':\n propsToReset[key] = '';\n break;\n case 'object':\n case 'function':\n propsToReset[key] = null;\n break;\n case 'undefined':\n propsToReset[key] = undefined;\n break;\n }\n }\n }\n }\n\n if (CC_SUPPORT_JIT) {\n // compile code\n var func = '';\n for (key in propsToReset) {\n var statement;\n if (CCClass.IDENTIFIER_RE.test(key)) {\n statement = 'o.' + key + '=';\n }\n else {\n statement = 'o[' + CCClass.escapeForJS(key) + ']=';\n }\n var val = propsToReset[key];\n if (val === '') {\n val = '\"\"';\n }\n func += (statement + val + ';\\n');\n }\n return Function('o', func);\n }\n else {\n return function (o) {\n for (var key in propsToReset) {\n o[key] = propsToReset[key];\n }\n };\n }\n}\n\n/**\n * !#en\n * Clear all references in the instance.\n *\n * NOTE: this method will not clear the `getter` or `setter` functions which defined in the instance of `CCObject`.\n * You can override the `_destruct` method if you need, for example:\n * ```js\n * _destruct: function () {\n * for (var key in this) {\n * if (this.hasOwnProperty(key)) {\n * switch (typeof this[key]) {\n * case 'string':\n * this[key] = '';\n * break;\n * case 'object':\n * case 'function':\n * this[key] = null;\n * break;\n * }\n * }\n * }\n * ```\n * !#zh\n * 清除实例中的所有引用。\n * \n * 注意:此方法不会清除在 `CCObject` 实例中定义的 `getter` 或 `setter`。如果需要,你可以重写 `_destruct` 方法。例如:\n * \n * ```js\n * _destruct: function () {\n * for (var key in this) {\n * if (this.hasOwnProperty(key)) {\n * switch (typeof this[key]) {\n * case 'string':\n * this[key] = '';\n * break;\n * case 'object':\n * case 'function':\n * this[key] = null;\n * break;\n * }\n * }\n * }\n * ```\n * @method _destruct\n * @private\n */\nprototype._destruct = function () {\n var ctor = this.constructor;\n var destruct = ctor.__destruct__;\n if (!destruct) {\n destruct = compileDestruct(this, ctor);\n js.value(ctor, '__destruct__', destruct, true);\n }\n destruct(this);\n};\n\n/**\n * !#en\n * Called before the object being destroyed.\n * !#zh\n * 在对象被销毁之前调用。\n * @method _onPreDestroy\n * @private\n */\nprototype._onPreDestroy = null;\n\nprototype._destroyImmediate = function () {\n if (this._objFlags & Destroyed) {\n cc.errorID(5000);\n return;\n }\n // engine internal callback\n if (this._onPreDestroy) {\n this._onPreDestroy();\n }\n\n if ((CC_TEST ? (/* make CC_EDITOR mockable*/ Function('return !CC_EDITOR'))() : !CC_EDITOR) || cc.engine._isPlaying) {\n this._destruct();\n }\n\n this._objFlags |= Destroyed;\n};\n\nif (CC_EDITOR) {\n /**\n * !#en\n * The customized serialization for this object. (Editor Only)\n * !#zh\n * 为此对象定制序列化。\n * @method _serialize\n * @param {Boolean} exporting\n * @return {object} the serialized json data object\n * @private\n */\n prototype._serialize = null;\n}\n\n/**\n * !#en\n * Init this object from the custom serialized data.\n * !#zh\n * 从自定义序列化数据初始化此对象。\n * @method _deserialize\n * @param {Object} data - the serialized json data\n * @param {_Deserializer} ctx\n * @private\n */\nprototype._deserialize = null;\n\n/**\n * @module cc\n */\n\n/**\n * !#en\n * Checks whether the object is non-nil and not yet destroyed.<br>\n * When an object's `destroy` is called, it is actually destroyed after the end of this frame.\n * So `isValid` will return false from the next frame, while `isValid` in the current frame will still be true.\n * If you want to determine whether the current frame has called `destroy`, use `cc.isValid(obj, true)`,\n * but this is often caused by a particular logical requirements, which is not normally required.\n *\n * !#zh\n * 检查该对象是否不为 null 并且尚未销毁。<br>\n * 当一个对象的 `destroy` 调用以后,会在这一帧结束后才真正销毁。因此从下一帧开始 `isValid` 就会返回 false而当前帧内 `isValid` 仍然会是 true。如果希望判断当前帧是否调用过 `destroy`,请使用 `cc.isValid(obj, true)`,不过这往往是特殊的业务需求引起的,通常情况下不需要这样。\n *\n * @method isValid\n * @param {any} value\n * @param {Boolean} [strictMode=false] - If true, Object called destroy() in this frame will also treated as invalid.\n * @return {Boolean} whether is valid\n * @example\n * var node = new cc.Node();\n * cc.log(cc.isValid(node)); // true\n * node.destroy();\n * cc.log(cc.isValid(node)); // true, still valid in this frame\n * // after a frame...\n * cc.log(cc.isValid(node)); // false, destroyed in the end of last frame\n */\ncc.isValid = function (value, strictMode) {\n if (typeof value === 'object') {\n return !!value && !(value._objFlags & (strictMode ? (Destroyed | ToDestroy) : Destroyed));\n }\n else {\n return typeof value !== 'undefined';\n }\n};\n\nif (CC_EDITOR || CC_TEST) {\n js.value(CCObject, '_willDestroy', function (obj) {\n return !(obj._objFlags & Destroyed) && (obj._objFlags & ToDestroy) > 0;\n });\n js.value(CCObject, '_cancelDestroy', function (obj) {\n obj._objFlags &= ~ToDestroy;\n js.array.fastRemove(objectsToDestroy, obj);\n });\n}\n\ncc.Object = module.exports = CCObject;\n","/****************************************************************************\n Copyright (c) 2008-2010 Ricardo Quesada\n Copyright (c) 2011-2012 cocos2d-x.org\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos2d-x.org\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar js = require('../platform/js');\n\n/**\n * A SAX Parser\n * @class saxParser\n */\ncc.SAXParser = function () {\n if (!(CC_EDITOR && Editor.isMainProcess) && window.DOMParser) {\n this._isSupportDOMParser = true;\n this._parser = new DOMParser();\n } else {\n this._isSupportDOMParser = false;\n this._parser = null;\n }\n};\ncc.SAXParser.prototype = {\n constructor: cc.SAXParser,\n /**\n * @method parse\n * @param {String} xmlTxt\n * @return {Document}\n */\n parse : function(xmlTxt){\n return this._parseXML(xmlTxt);\n },\n\n _parseXML: function (textxml) {\n // get a reference to the requested corresponding xml file\n var xmlDoc;\n if (this._isSupportDOMParser) {\n xmlDoc = this._parser.parseFromString(textxml, \"text/xml\");\n } else {\n // Internet Explorer (untested!)\n xmlDoc = new ActiveXObject(\"Microsoft.XMLDOM\");\n xmlDoc.async = \"false\";\n xmlDoc.loadXML(textxml);\n }\n return xmlDoc;\n }\n};\n\n/**\n *\n * cc.plistParser is a singleton object for parsing plist files\n * @class plistParser\n * @extends SAXParser\n */\ncc.PlistParser = function () {\n cc.SAXParser.call(this);\n};\njs.extend(cc.PlistParser, cc.SAXParser);\njs.mixin(cc.PlistParser.prototype, {\n /**\n * parse a xml string as plist object.\n * @param {String} xmlTxt - plist xml contents\n * @return {*} plist object\n */\n parse : function (xmlTxt) {\n var xmlDoc = this._parseXML(xmlTxt);\n var plist = xmlDoc.documentElement;\n if (plist.tagName !== 'plist') {\n cc.warnID(5100);\n return {};\n }\n\n // Get first real node\n var node = null;\n for (var i = 0, len = plist.childNodes.length; i < len; i++) {\n node = plist.childNodes[i];\n if (node.nodeType === 1)\n break;\n }\n xmlDoc = null;\n return this._parseNode(node);\n },\n\n _parseNode: function (node) {\n var data = null, tagName = node.tagName;\n if(tagName === \"dict\"){\n data = this._parseDict(node);\n }else if(tagName === \"array\"){\n data = this._parseArray(node);\n }else if(tagName === \"string\"){\n if (node.childNodes.length === 1)\n data = node.firstChild.nodeValue;\n else {\n //handle Firefox's 4KB nodeValue limit\n data = \"\";\n for (var i = 0; i < node.childNodes.length; i++)\n data += node.childNodes[i].nodeValue;\n }\n }else if(tagName === \"false\"){\n data = false;\n }else if(tagName === \"true\"){\n data = true;\n }else if(tagName === \"real\"){\n data = parseFloat(node.firstChild.nodeValue);\n }else if(tagName === \"integer\"){\n data = parseInt(node.firstChild.nodeValue, 10);\n }\n return data;\n },\n\n _parseArray: function (node) {\n var data = [];\n for (var i = 0, len = node.childNodes.length; i < len; i++) {\n var child = node.childNodes[i];\n if (child.nodeType !== 1)\n continue;\n data.push(this._parseNode(child));\n }\n return data;\n },\n\n _parseDict: function (node) {\n var data = {};\n var key = null;\n for (var i = 0, len = node.childNodes.length; i < len; i++) {\n var child = node.childNodes[i];\n if (child.nodeType !== 1)\n continue;\n\n // Grab the key, next noe should be the value\n if (child.tagName === 'key')\n key = child.firstChild.nodeValue;\n else\n data[key] = this._parseNode(child); // Parse the value node\n }\n return data;\n }\n});\n\ncc.saxParser = new cc.SAXParser();\n/**\n * @type {PlistParser}\n * @name plistParser\n * A Plist Parser\n */\ncc.plistParser = new cc.PlistParser();\n\nmodule.exports = {\n saxParser: cc.saxParser,\n plistParser: cc.plistParser\n}\n","/****************************************************************************\n Copyright (c) 2008-2010 Ricardo Quesada\n Copyright (c) 2011-2012 cocos2d-x.org\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n \n http://www.cocos2d-x.org\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * The fullscreen API provides an easy way for web content to be presented using the user's entire screen.\n * It's invalid on safari, QQbrowser and android browser\n * @class screen\n */\ncc.screen = /** @lends cc.screen# */{\n _supportsFullScreen: false,\n _onfullscreenchange: null,\n _onfullscreenerror: null,\n // the pre fullscreenchange function\n _preOnFullScreenChange: null,\n _preOnFullScreenError: null,\n _preOnTouch: null,\n _touchEvent: \"\",\n _fn: null,\n // Function mapping for cross browser support\n _fnMap: [\n [\n 'requestFullscreen',\n 'exitFullscreen',\n 'fullscreenchange',\n 'fullscreenEnabled',\n 'fullscreenElement',\n 'fullscreenerror',\n ],\n [\n 'requestFullScreen',\n 'exitFullScreen',\n 'fullScreenchange',\n 'fullScreenEnabled',\n 'fullScreenElement',\n 'fullscreenerror',\n ],\n [\n 'webkitRequestFullScreen',\n 'webkitCancelFullScreen',\n 'webkitfullscreenchange',\n 'webkitIsFullScreen',\n 'webkitCurrentFullScreenElement',\n 'webkitfullscreenerror',\n ],\n [\n 'mozRequestFullScreen',\n 'mozCancelFullScreen',\n 'mozfullscreenchange',\n 'mozFullScreen',\n 'mozFullScreenElement',\n 'mozfullscreenerror',\n ],\n [\n 'msRequestFullscreen',\n 'msExitFullscreen',\n 'MSFullscreenChange',\n 'msFullscreenEnabled',\n 'msFullscreenElement',\n 'msfullscreenerror',\n ]\n ],\n \n /**\n * initialize\n * @method init\n */\n init: function () {\n this._fn = {};\n var i, l, val, map = this._fnMap, valL;\n for (i = 0, l = map.length; i < l; i++) {\n val = map[i];\n if (val && (typeof document[val[1]] !== 'undefined')) {\n for (i = 0, valL = val.length; i < valL; i++) {\n this._fn[map[0][i]] = val[i];\n }\n break;\n }\n }\n\n this._supportsFullScreen = (this._fn.requestFullscreen !== undefined);\n\n // Bug fix only for v2.1, don't merge into v2.0\n // In v2.0, screen touchend events conflict with editBox touchend events if it's not stayOnTop.\n // While in v2.1, editBox always keep stayOnTop and it doesn't support touchend events.\n this._touchEvent = ('ontouchend' in window) ? 'touchend' : 'mousedown';\n },\n \n /**\n * return true if it's full now.\n * @method fullScreen\n * @returns {Boolean}\n */\n fullScreen: function () {\n if (!this._supportsFullScreen) return false;\n else if (!document[this._fn.fullscreenElement] && !document[this._fn.webkitFullscreenElement] && !document[this._fn.mozFullScreenElement]) {\n return false;\n }\n else {\n return true;\n }\n },\n \n /**\n * change the screen to full mode.\n * @method requestFullScreen\n * @param {Element} element\n * @param {Function} onFullScreenChange\n * @param {Function} onFullScreenError\n */\n requestFullScreen: function (element, onFullScreenChange, onFullScreenError) {\n if (element && element.tagName.toLowerCase() === \"video\") {\n if (cc.sys.os === cc.sys.OS_IOS && cc.sys.isBrowser && element.readyState > 0) {\n element.webkitEnterFullscreen && element.webkitEnterFullscreen();\n return;\n }\n else {\n element.setAttribute(\"x5-video-player-fullscreen\", \"true\");\n }\n }\n\n if (!this._supportsFullScreen) {\n return;\n }\n\n element = element || document.documentElement;\n\n if (onFullScreenChange) {\n let eventName = this._fn.fullscreenchange;\n if (this._onfullscreenchange) {\n document.removeEventListener(eventName, this._onfullscreenchange);\n }\n this._onfullscreenchange = onFullScreenChange;\n document.addEventListener(eventName, onFullScreenChange, false);\n }\n if (onFullScreenError) {\n let eventName = this._fn.fullscreenerror;\n if (this._onfullscreenerror) {\n document.removeEventListener(eventName, this._onfullscreenerror);\n }\n this._onfullscreenerror = onFullScreenError;\n document.addEventListener(eventName, onFullScreenError, { once: true });\n }\n\n let requestPromise = element[this._fn.requestFullscreen]();\n // the requestFullscreen API can only be initiated by user gesture.\n if (typeof document[this._fn.fullscreenerror] === 'undefined' \n && window.Promise && requestPromise instanceof Promise) {\n requestPromise.catch(function (err) {\n // do nothing ... \n });\n }\n },\n \n /**\n * exit the full mode.\n * @method exitFullScreen\n * @return {Boolean}\n */\n exitFullScreen: function (element) {\n if (element && element.tagName.toLowerCase() === \"video\") {\n if (cc.sys.os === cc.sys.OS_IOS && cc.sys.isBrowser) {\n element.webkitExitFullscreen && element.webkitExitFullscreen();\n return;\n }\n else {\n element.setAttribute(\"x5-video-player-fullscreen\", \"false\");\n }\n }\n return this._supportsFullScreen ? document[this._fn.exitFullscreen]() : true;\n },\n \n /**\n * Automatically request full screen with a touch/click event\n * @method autoFullScreen\n * @param {Element} element\n * @param {Function} onFullScreenChange\n */\n autoFullScreen: function (element, onFullScreenChange) {\n element = element || document.body;\n\n this._ensureFullScreen(element, onFullScreenChange);\n this.requestFullScreen(element, onFullScreenChange);\n },\n\n disableAutoFullScreen (element) {\n let touchTarget = cc.game.canvas || element;\n let touchEventName = this._touchEvent;\n if (this._preOnTouch) {\n touchTarget.removeEventListener(touchEventName, this._preOnTouch);\n this._preOnTouch = null;\n }\n },\n\n // Register touch event if request full screen failed\n _ensureFullScreen (element, onFullScreenChange) {\n let self = this;\n let touchTarget = cc.game.canvas || element;\n let fullScreenErrorEventName = this._fn.fullscreenerror;\n let touchEventName = this._touchEvent;\n \n function onFullScreenError () {\n self._preOnFullScreenError = null;\n\n // handle touch event listener\n function onTouch() {\n self._preOnTouch = null;\n self.requestFullScreen(element, onFullScreenChange);\n }\n if (self._preOnTouch) {\n touchTarget.removeEventListener(touchEventName, self._preOnTouch);\n }\n self._preOnTouch = onTouch;\n touchTarget.addEventListener(touchEventName, self._preOnTouch, { once: true });\n }\n\n // handle full screen error\n if (this._preOnFullScreenError) {\n element.removeEventListener(fullScreenErrorEventName, this._preOnFullScreenError);\n }\n this._preOnFullScreenError = onFullScreenError;\n element.addEventListener(fullScreenErrorEventName, onFullScreenError, { once: true });\n },\n};\ncc.screen.init();\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nlet settingPlatform;\n if (!CC_EDITOR) {\n settingPlatform = window._CCSettings ? _CCSettings.platform: undefined;\n }\nconst isVivoGame = (settingPlatform === 'qgame');\nconst isOppoGame = (settingPlatform === 'quickgame');\nconst isHuaweiGame = (settingPlatform === 'huawei');\nconst isJKWGame = (settingPlatform === 'jkw-game');\nconst isQttGame = (settingPlatform === 'qtt-game');\nconst isLinkSure = (settingPlatform === 'link-sure');\n\nconst _global = typeof window === 'undefined' ? global : window;\n \nfunction initSys () {\n /**\n * System variables\n * @class sys\n * @main\n * @static\n */\n cc.sys = {};\n var sys = cc.sys;\n\n /**\n * English language code\n * @property {String} LANGUAGE_ENGLISH\n * @readOnly\n */\n sys.LANGUAGE_ENGLISH = \"en\";\n\n /**\n * Chinese language code\n * @property {String} LANGUAGE_CHINESE\n * @readOnly\n */\n sys.LANGUAGE_CHINESE = \"zh\";\n\n /**\n * French language code\n * @property {String} LANGUAGE_FRENCH\n * @readOnly\n */\n sys.LANGUAGE_FRENCH = \"fr\";\n\n /**\n * Italian language code\n * @property {String} LANGUAGE_ITALIAN\n * @readOnly\n */\n sys.LANGUAGE_ITALIAN = \"it\";\n\n /**\n * German language code\n * @property {String} LANGUAGE_GERMAN\n * @readOnly\n */\n sys.LANGUAGE_GERMAN = \"de\";\n\n /**\n * Spanish language code\n * @property {String} LANGUAGE_SPANISH\n * @readOnly\n */\n sys.LANGUAGE_SPANISH = \"es\";\n\n /**\n * Spanish language code\n * @property {String} LANGUAGE_DUTCH\n * @readOnly\n */\n sys.LANGUAGE_DUTCH = \"du\";\n\n /**\n * Russian language code\n * @property {String} LANGUAGE_RUSSIAN\n * @readOnly\n */\n sys.LANGUAGE_RUSSIAN = \"ru\";\n\n /**\n * Korean language code\n * @property {String} LANGUAGE_KOREAN\n * @readOnly\n */\n sys.LANGUAGE_KOREAN = \"ko\";\n\n /**\n * Japanese language code\n * @property {String} LANGUAGE_JAPANESE\n * @readOnly\n */\n sys.LANGUAGE_JAPANESE = \"ja\";\n\n /**\n * Hungarian language code\n * @property {String} LANGUAGE_HUNGARIAN\n * @readonly\n */\n sys.LANGUAGE_HUNGARIAN = \"hu\";\n\n /**\n * Portuguese language code\n * @property {String} LANGUAGE_PORTUGUESE\n * @readOnly\n */\n sys.LANGUAGE_PORTUGUESE = \"pt\";\n\n /**\n * Arabic language code\n * @property {String} LANGUAGE_ARABIC\n * @readOnly\n */\n sys.LANGUAGE_ARABIC = \"ar\";\n\n /**\n * Norwegian language code\n * @property {String} LANGUAGE_NORWEGIAN\n * @readOnly\n */\n sys.LANGUAGE_NORWEGIAN = \"no\";\n\n /**\n * Polish language code\n * @property {String} LANGUAGE_POLISH\n * @readOnly\n */\n sys.LANGUAGE_POLISH = \"pl\";\n\n /**\n * Turkish language code\n * @property {String} LANGUAGE_TURKISH\n * @readOnly\n */\n sys.LANGUAGE_TURKISH = \"tr\";\n\n /**\n * Ukrainian language code\n * @property {String} LANGUAGE_UKRAINIAN\n * @readOnly\n */\n sys.LANGUAGE_UKRAINIAN = \"uk\";\n\n /**\n * Romanian language code\n * @property {String} LANGUAGE_ROMANIAN\n * @readOnly\n */\n sys.LANGUAGE_ROMANIAN = \"ro\";\n\n /**\n * Bulgarian language code\n * @property {String} LANGUAGE_BULGARIAN\n * @readOnly\n */\n sys.LANGUAGE_BULGARIAN = \"bg\";\n\n /**\n * Unknown language code\n * @property {String} LANGUAGE_UNKNOWN\n * @readOnly\n */\n sys.LANGUAGE_UNKNOWN = \"unknown\";\n\n /**\n * @property {String} OS_IOS\n * @readOnly\n */\n sys.OS_IOS = \"iOS\";\n /**\n * @property {String} OS_ANDROID\n * @readOnly\n */\n sys.OS_ANDROID = \"Android\";\n /**\n * @property {String} OS_WINDOWS\n * @readOnly\n */\n sys.OS_WINDOWS = \"Windows\";\n /**\n * @property {String} OS_MARMALADE\n * @readOnly\n */\n sys.OS_MARMALADE = \"Marmalade\";\n /**\n * @property {String} OS_LINUX\n * @readOnly\n */\n sys.OS_LINUX = \"Linux\";\n /**\n * @property {String} OS_BADA\n * @readOnly\n */\n sys.OS_BADA = \"Bada\";\n /**\n * @property {String} OS_BLACKBERRY\n * @readOnly\n */\n sys.OS_BLACKBERRY = \"Blackberry\";\n /**\n * @property {String} OS_OSX\n * @readOnly\n */\n sys.OS_OSX = \"OS X\";\n /**\n * @property {String} OS_WP8\n * @readOnly\n */\n sys.OS_WP8 = \"WP8\";\n /**\n * @property {String} OS_WINRT\n * @readOnly\n */\n sys.OS_WINRT = \"WINRT\";\n /**\n * @property {String} OS_UNKNOWN\n * @readOnly\n */\n sys.OS_UNKNOWN = \"Unknown\";\n\n /**\n * @property {Number} UNKNOWN\n * @readOnly\n * @default -1\n */\n sys.UNKNOWN = -1;\n /**\n * @property {Number} WIN32\n * @readOnly\n * @default 0\n */\n sys.WIN32 = 0;\n /**\n * @property {Number} LINUX\n * @readOnly\n * @default 1\n */\n sys.LINUX = 1;\n /**\n * @property {Number} MACOS\n * @readOnly\n * @default 2\n */\n sys.MACOS = 2;\n /**\n * @property {Number} ANDROID\n * @readOnly\n * @default 3\n */\n sys.ANDROID = 3;\n /**\n * @property {Number} IPHONE\n * @readOnly\n * @default 4\n */\n sys.IPHONE = 4;\n /**\n * @property {Number} IPAD\n * @readOnly\n * @default 5\n */\n sys.IPAD = 5;\n /**\n * @property {Number} BLACKBERRY\n * @readOnly\n * @default 6\n */\n sys.BLACKBERRY = 6;\n /**\n * @property {Number} NACL\n * @readOnly\n * @default 7\n */\n sys.NACL = 7;\n /**\n * @property {Number} EMSCRIPTEN\n * @readOnly\n * @default 8\n */\n sys.EMSCRIPTEN = 8;\n /**\n * @property {Number} TIZEN\n * @readOnly\n * @default 9\n */\n sys.TIZEN = 9;\n /**\n * @property {Number} WINRT\n * @readOnly\n * @default 10\n */\n sys.WINRT = 10;\n /**\n * @property {Number} WP8\n * @readOnly\n * @default 11\n */\n sys.WP8 = 11;\n /**\n * @property {Number} MOBILE_BROWSER\n * @readOnly\n * @default 100\n */\n sys.MOBILE_BROWSER = 100;\n /**\n * @property {Number} DESKTOP_BROWSER\n * @readOnly\n * @default 101\n */\n sys.DESKTOP_BROWSER = 101;\n\n /**\n * Indicates whether executes in editor's window process (Electron's renderer context)\n * @property {Number} EDITOR_PAGE\n * @readOnly\n * @default 102\n */\n sys.EDITOR_PAGE = 102;\n /**\n * Indicates whether executes in editor's main process (Electron's browser context)\n * @property {Number} EDITOR_CORE\n * @readOnly\n * @default 103\n */\n sys.EDITOR_CORE = 103;\n /**\n * @property {Number} WECHAT_GAME\n * @readOnly\n * @default 104\n */\n sys.WECHAT_GAME = 104;\n /**\n * @property {Number} QQ_PLAY\n * @readOnly\n * @default 105\n */\n sys.QQ_PLAY = 105;\n /**\n * @property {Number} FB_PLAYABLE_ADS\n * @readOnly\n * @default 106\n */\n sys.FB_PLAYABLE_ADS = 106;\n /**\n * @property {Number} BAIDU_GAME\n * @readOnly\n * @default 107\n */\n sys.BAIDU_GAME = 107;\n /**\n * @property {Number} VIVO_GAME\n * @readOnly\n * @default 108\n */\n sys.VIVO_GAME = 108;\n /**\n * @property {Number} OPPO_GAME\n * @readOnly\n * @default 109\n */\n sys.OPPO_GAME = 109;\n /**\n * @property {Number} HUAWEI_GAME\n * @readOnly\n * @default 110\n */\n sys.HUAWEI_GAME = 110;\n /**\n * @property {Number} XIAOMI_GAME\n * @readOnly\n * @default 111\n */\n sys.XIAOMI_GAME = 111;\n /**\n * @property {Number} JKW_GAME\n * @readOnly\n * @default 112\n */\n sys.JKW_GAME = 112;\n /**\n * @property {Number} ALIPAY_GAME\n * @readOnly\n * @default 113\n */\n sys.ALIPAY_GAME = 113;\n /**\n * @property {Number} WECHAT_GAME_SUB\n * @readOnly\n * @default 114\n */\n sys.WECHAT_GAME_SUB = 114;\n /**\n * @property {Number} BAIDU_GAME_SUB\n * @readOnly\n * @default 115\n */\n sys.BAIDU_GAME_SUB = 115;\n /**\n * @property {Number} QTT_GAME\n * @readOnly\n * @default 116\n */\n sys.QTT_GAME = 116;\n /**\n * @property {Number} BYTEDANCE_GAME\n * @readOnly\n * @default 117\n */\n sys.BYTEDANCE_GAME = 117;\n /**\n * @property {Number} BYTEDANCE_GAME_SUB\n * @readOnly\n * @default 118\n */\n sys.BYTEDANCE_GAME_SUB = 118;\n /**\n * @property {Number} LINKSURE\n * @readOnly\n * @default 119\n */\n sys.LINKSURE = 119;\n /**\n * @property {Number} TAOBAO\n * @readOnly\n * @default 120\n */\n sys.TAOBAO = 120;\n /**\n * BROWSER_TYPE_WECHAT\n * @property {String} BROWSER_TYPE_WECHAT\n * @readOnly\n * @default \"wechat\"\n */\n sys.BROWSER_TYPE_WECHAT = \"wechat\";\n /**\n *\n * @property {String} BROWSER_TYPE_ANDROID\n * @readOnly\n * @default \"androidbrowser\"\n */\n sys.BROWSER_TYPE_ANDROID = \"androidbrowser\";\n /**\n *\n * @property {String} BROWSER_TYPE_IE\n * @readOnly\n * @default \"ie\"\n */\n sys.BROWSER_TYPE_IE = \"ie\";\n /**\n *\n * @property {String} BROWSER_TYPE_EDGE\n * @readOnly\n * @default \"edge\"\n */\n sys.BROWSER_TYPE_EDGE = \"edge\";\n /**\n *\n * @property {String} BROWSER_TYPE_QQ\n * @readOnly\n * @default \"qqbrowser\"\n */\n sys.BROWSER_TYPE_QQ = \"qqbrowser\";\n /**\n *\n * @property {String} BROWSER_TYPE_MOBILE_QQ\n * @readOnly\n * @default \"mqqbrowser\"\n */\n sys.BROWSER_TYPE_MOBILE_QQ = \"mqqbrowser\";\n /**\n *\n * @property {String} BROWSER_TYPE_UC\n * @readOnly\n * @default \"ucbrowser\"\n */\n sys.BROWSER_TYPE_UC = \"ucbrowser\";\n /**\n * uc third party integration.\n * @property {String} BROWSER_TYPE_UCBS\n * @readOnly\n * @default \"ucbs\"\n */\n sys.BROWSER_TYPE_UCBS = \"ucbs\";\n /**\n *\n * @property {String} BROWSER_TYPE_360\n * @readOnly\n * @default \"360browser\"\n */\n sys.BROWSER_TYPE_360 = \"360browser\";\n /**\n *\n * @property {String} BROWSER_TYPE_BAIDU_APP\n * @readOnly\n * @default \"baiduboxapp\"\n */\n sys.BROWSER_TYPE_BAIDU_APP = \"baiduboxapp\";\n /**\n *\n * @property {String} BROWSER_TYPE_BAIDU\n * @readOnly\n * @default \"baidubrowser\"\n */\n sys.BROWSER_TYPE_BAIDU = \"baidubrowser\";\n /**\n *\n * @property {String} BROWSER_TYPE_MAXTHON\n * @readOnly\n * @default \"maxthon\"\n */\n sys.BROWSER_TYPE_MAXTHON = \"maxthon\";\n /**\n *\n * @property {String} BROWSER_TYPE_OPERA\n * @readOnly\n * @default \"opera\"\n */\n sys.BROWSER_TYPE_OPERA = \"opera\";\n /**\n *\n * @property {String} BROWSER_TYPE_OUPENG\n * @readOnly\n * @default \"oupeng\"\n */\n sys.BROWSER_TYPE_OUPENG = \"oupeng\";\n /**\n *\n * @property {String} BROWSER_TYPE_MIUI\n * @readOnly\n * @default \"miuibrowser\"\n */\n sys.BROWSER_TYPE_MIUI = \"miuibrowser\";\n /**\n *\n * @property {String} BROWSER_TYPE_FIREFOX\n * @readOnly\n * @default \"firefox\"\n */\n sys.BROWSER_TYPE_FIREFOX = \"firefox\";\n /**\n *\n * @property {String} BROWSER_TYPE_SAFARI\n * @readOnly\n * @default \"safari\"\n */\n sys.BROWSER_TYPE_SAFARI = \"safari\";\n /**\n *\n * @property {String} BROWSER_TYPE_CHROME\n * @readOnly\n * @default \"chrome\"\n */\n sys.BROWSER_TYPE_CHROME = \"chrome\";\n /**\n *\n * @property {String} BROWSER_TYPE_LIEBAO\n * @readOnly\n * @default \"liebao\"\n */\n sys.BROWSER_TYPE_LIEBAO = \"liebao\";\n /**\n *\n * @property {String} BROWSER_TYPE_QZONE\n * @readOnly\n * @default \"qzone\"\n */\n sys.BROWSER_TYPE_QZONE = \"qzone\";\n /**\n *\n * @property {String} BROWSER_TYPE_SOUGOU\n * @readOnly\n * @default \"sogou\"\n */\n sys.BROWSER_TYPE_SOUGOU = \"sogou\";\n /**\n *\n * @property {String} BROWSER_TYPE_HUAWEI\n * @readOnly\n * @default \"huawei\"\n */\n sys.BROWSER_TYPE_HUAWEI = \"huawei\";\n /**\n *\n * @property {String} BROWSER_TYPE_UNKNOWN\n * @readOnly\n * @default \"unknown\"\n */\n sys.BROWSER_TYPE_UNKNOWN = \"unknown\";\n\n /**\n * Is native ? This is set to be true in jsb auto.\n * @property {Boolean} isNative\n */\n sys.isNative = CC_JSB;\n\n /**\n * Is web browser ?\n * @property {Boolean} isBrowser\n */\n sys.isBrowser = typeof window === 'object' && typeof document === 'object' && !CC_JSB && !CC_RUNTIME;\n\n /**\n * Is webgl extension support?\n * @method glExtension\n * @param name\n * @return {Boolean}\n */\n sys.glExtension = function (name) {\n return !!cc.renderer.device.ext(name);\n }\n\n /**\n * Get max joint matrix size for skinned mesh renderer.\n * @method getMaxJointMatrixSize\n */\n sys.getMaxJointMatrixSize = function () {\n if (!sys._maxJointMatrixSize) {\n const JOINT_MATRICES_SIZE = 50;\n const LEFT_UNIFORM_SIZE = 10;\n\n let gl = cc.game._renderContext;\n let maxUniforms = Math.floor(gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS) / 4) - LEFT_UNIFORM_SIZE;\n if (maxUniforms < JOINT_MATRICES_SIZE) {\n sys._maxJointMatrixSize = 0;\n }\n else {\n sys._maxJointMatrixSize = JOINT_MATRICES_SIZE;\n }\n }\n return sys._maxJointMatrixSize;\n };\n\n /**\n * !#en\n * Returns the safe area of the screen (in design resolution). If the screen is not notched, the visibleRect will be returned by default.\n * Currently supports Android, iOS and WeChat Mini Game platform.\n * !#zh\n * 返回手机屏幕安全区域(设计分辨率为单位),如果不是异形屏将默认返回 visibleRect。目前支持安卓、iOS 原生平台和微信小游戏平台。\n * @method getSafeAreaRect\n * @return {Rect}\n */\n sys.getSafeAreaRect = function () {\n let visibleSize = cc.view.getVisibleSize();\n return cc.rect(0, 0, visibleSize.width, visibleSize.height);\n };\n\n if (_global.__globalAdapter && _global.__globalAdapter.adaptSys) {\n // init sys info in adapter\n _global.__globalAdapter.adaptSys(sys);\n }\n else if (CC_EDITOR && Editor.isMainProcess) {\n sys.isMobile = false;\n sys.platform = sys.EDITOR_CORE;\n sys.language = sys.LANGUAGE_UNKNOWN;\n sys.languageCode = undefined;\n sys.os = ({\n darwin: sys.OS_OSX,\n win32: sys.OS_WINDOWS,\n linux: sys.OS_LINUX\n })[process.platform] || sys.OS_UNKNOWN;\n sys.browserType = null;\n sys.browserVersion = null;\n sys.windowPixelResolution = {\n width: 0,\n height: 0\n };\n sys.capabilities = {\n 'imageBitmap': false\n };\n sys.__audioSupport = {};\n }\n else if (CC_JSB || CC_RUNTIME) {\n let platform;\n if (isVivoGame) {\n platform = sys.VIVO_GAME;\n } else if (isOppoGame) {\n platform = sys.OPPO_GAME;\n } else if (isHuaweiGame) {\n platform = sys.HUAWEI_GAME;\n } else if (isJKWGame) {\n platform = sys.JKW_GAME;\n } else if (isQttGame) {\n platform = sys.QTT_GAME;\n } else if (isLinkSure) {\n platform = sys.LINKSURE;\n }\n else {\n platform = __getPlatform();\n }\n sys.platform = platform;\n sys.isMobile = (platform === sys.ANDROID ||\n platform === sys.IPAD ||\n platform === sys.IPHONE ||\n platform === sys.WP8 ||\n platform === sys.TIZEN ||\n platform === sys.BLACKBERRY ||\n platform === sys.XIAOMI_GAME ||\n isVivoGame ||\n isOppoGame ||\n isHuaweiGame ||\n isJKWGame ||\n isQttGame);\n\n sys.os = __getOS();\n sys.language = __getCurrentLanguage();\n var languageCode; \n if (CC_JSB) {\n languageCode = __getCurrentLanguageCode();\n }\n sys.languageCode = languageCode ? languageCode.toLowerCase() : undefined;\n sys.osVersion = __getOSVersion();\n sys.osMainVersion = parseInt(sys.osVersion);\n sys.browserType = null;\n sys.browserVersion = null;\n\n var w = window.innerWidth;\n var h = window.innerHeight;\n var ratio = window.devicePixelRatio || 1;\n sys.windowPixelResolution = {\n width: ratio * w,\n height: ratio * h\n };\n\n sys.localStorage = window.localStorage;\n\n var capabilities;\n capabilities = sys.capabilities = {\n \"canvas\": false,\n \"opengl\": true,\n \"webp\": true,\n };\n\n if (sys.isMobile) {\n capabilities[\"accelerometer\"] = true;\n } else {\n // desktop\n capabilities[\"keyboard\"] = true;\n capabilities[\"mouse\"] = true;\n }\n // support touches on Web platform\n capabilities[\"touches\"] = sys.isBrowser || sys.isMobile;\n\n capabilities['imageBitmap'] = false;\n\n sys.__audioSupport = {\n ONLY_ONE: false,\n WEB_AUDIO: false,\n DELAY_CREATE_CTX: false,\n format: ['.mp3']\n };\n }\n else {\n // browser or runtime\n var win = window, nav = win.navigator, doc = document, docEle = doc.documentElement;\n var ua = nav.userAgent.toLowerCase();\n\n if (CC_EDITOR) {\n sys.isMobile = false;\n sys.platform = sys.EDITOR_PAGE;\n }\n else {\n /**\n * Indicate whether system is mobile system\n * @property {Boolean} isMobile\n */\n sys.isMobile = /mobile|android|iphone|ipad/.test(ua);\n\n /**\n * Indicate the running platform\n * @property {Number} platform\n */\n if (typeof FbPlayableAd !== \"undefined\") {\n sys.platform = sys.FB_PLAYABLE_ADS;\n }\n else {\n sys.platform = sys.isMobile ? sys.MOBILE_BROWSER : sys.DESKTOP_BROWSER;\n }\n }\n\n var currLanguage = nav.language;\n currLanguage = currLanguage ? currLanguage : nav.browserLanguage;\n\n /**\n * Get current language iso 639-1 code.\n * Examples of valid language codes include \"zh-tw\", \"en\", \"en-us\", \"fr\", \"fr-fr\", \"es-es\", etc.\n * The actual value totally depends on results provided by destination platform.\n * @property {String} languageCode\n */\n sys.languageCode = currLanguage.toLowerCase();\n\n currLanguage = currLanguage ? currLanguage.split(\"-\")[0] : sys.LANGUAGE_ENGLISH;\n\n /**\n * Indicate the current language of the running system\n * @property {String} language\n */\n sys.language = currLanguage;\n\n // Get the os of system\n var isAndroid = false, iOS = false, osVersion = '', osMainVersion = 0;\n var uaResult = /android\\s*(\\d+(?:\\.\\d+)*)/i.exec(ua) || /android\\s*(\\d+(?:\\.\\d+)*)/i.exec(nav.platform);\n if (uaResult) {\n isAndroid = true;\n osVersion = uaResult[1] || '';\n osMainVersion = parseInt(osVersion) || 0;\n }\n uaResult = /(iPad|iPhone|iPod).*OS ((\\d+_?){2,3})/i.exec(ua);\n if (uaResult) {\n iOS = true;\n osVersion = uaResult[2] || '';\n osMainVersion = parseInt(osVersion) || 0;\n }\n // refer to https://github.com/cocos-creator/engine/pull/5542 , thanks for contribition from @krapnikkk\n // ipad OS 13 safari identifies itself as \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko)\" \n // so use maxTouchPoints to check whether it's desktop safari or not. \n // reference: https://stackoverflow.com/questions/58019463/how-to-detect-device-name-in-safari-on-ios-13-while-it-doesnt-show-the-correct\n // FIXME: should remove it when touch-enabled macs are available\n else if (/(iPhone|iPad|iPod)/.exec(nav.platform) || (nav.platform === 'MacIntel' && nav.maxTouchPoints && nav.maxTouchPoints > 1)) { \n iOS = true;\n osVersion = '';\n osMainVersion = 0;\n }\n\n var osName = sys.OS_UNKNOWN;\n if (nav.appVersion.indexOf(\"Win\") !== -1) osName = sys.OS_WINDOWS;\n else if (iOS) osName = sys.OS_IOS;\n else if (nav.appVersion.indexOf(\"Mac\") !== -1) osName = sys.OS_OSX;\n else if (nav.appVersion.indexOf(\"X11\") !== -1 && nav.appVersion.indexOf(\"Linux\") === -1) osName = sys.OS_UNIX;\n else if (isAndroid) osName = sys.OS_ANDROID;\n else if (nav.appVersion.indexOf(\"Linux\") !== -1 || ua.indexOf(\"ubuntu\") !== -1) osName = sys.OS_LINUX;\n\n /**\n * Indicate the running os name\n * @property {String} os\n */\n sys.os = osName;\n /**\n * Indicate the running os version\n * @property {String} osVersion\n */\n sys.osVersion = osVersion;\n /**\n * Indicate the running os main version\n * @property {Number} osMainVersion\n */\n sys.osMainVersion = osMainVersion;\n\n /**\n * Indicate the running browser type\n * @property {String | null} browserType\n */\n sys.browserType = sys.BROWSER_TYPE_UNKNOWN;\n /* Determine the browser type */\n (function(){\n var typeReg1 = /mqqbrowser|micromessenger|qqbrowser|sogou|qzone|liebao|maxthon|ucbs|360 aphone|360browser|baiduboxapp|baidubrowser|maxthon|mxbrowser|miuibrowser/i;\n var typeReg2 = /qq|ucbrowser|ubrowser|edge|HuaweiBrowser/i;\n var typeReg3 = /chrome|safari|firefox|trident|opera|opr\\/|oupeng/i;\n var browserTypes = typeReg1.exec(ua) || typeReg2.exec(ua) || typeReg3.exec(ua);\n\n var browserType = browserTypes ? browserTypes[0].toLowerCase() : sys.BROWSER_TYPE_UNKNOWN;\n\n if (browserType === \"safari\" && isAndroid)\n browserType = sys.BROWSER_TYPE_ANDROID;\n else if (browserType === \"qq\" && ua.match(/android.*applewebkit/i))\n browserType = sys.BROWSER_TYPE_ANDROID;\n let typeMap = {\n 'micromessenger': sys.BROWSER_TYPE_WECHAT,\n 'trident': sys.BROWSER_TYPE_IE,\n 'edge': sys.BROWSER_TYPE_EDGE,\n '360 aphone': sys.BROWSER_TYPE_360,\n 'mxbrowser': sys.BROWSER_TYPE_MAXTHON,\n 'opr/': sys.BROWSER_TYPE_OPERA,\n 'ubrowser': sys.BROWSER_TYPE_UC,\n 'huaweibrowser': sys.BROWSER_TYPE_HUAWEI,\n };\n \n if(browserType === \"qqbrowser\" || browserType === \"mqqbrowser\"){\n if(ua.match(/wechat|micromessenger/i)){\n browserType = sys.BROWSER_TYPE_WECHAT;\n }\n }\n\n sys.browserType = typeMap[browserType] || browserType;\n })();\n\n /**\n * Indicate the running browser version\n * @property {String | null} browserVersion\n */\n sys.browserVersion = \"\";\n /* Determine the browser version number */\n (function(){\n var versionReg1 = /(mqqbrowser|micromessenger|qqbrowser|sogou|qzone|liebao|maxthon|uc|ucbs|360 aphone|360|baiduboxapp|baidu|maxthon|mxbrowser|miui(?:.hybrid)?)(mobile)?(browser)?\\/?([\\d.]+)/i;\n var versionReg2 = /(qq|chrome|safari|firefox|trident|opera|opr\\/|oupeng)(mobile)?(browser)?\\/?([\\d.]+)/i;\n var tmp = ua.match(versionReg1);\n if(!tmp) tmp = ua.match(versionReg2);\n sys.browserVersion = tmp ? tmp[4] : \"\";\n })();\n\n var w = window.innerWidth || document.documentElement.clientWidth;\n var h = window.innerHeight || document.documentElement.clientHeight;\n var ratio = window.devicePixelRatio || 1;\n\n /**\n * Indicate the real pixel resolution of the whole game window\n * @property {Size} windowPixelResolution\n */\n sys.windowPixelResolution = {\n width: ratio * w,\n height: ratio * h\n };\n\n sys._checkWebGLRenderMode = function () {\n if (cc.game.renderType !== cc.game.RENDER_TYPE_WEBGL)\n throw new Error(\"This feature supports WebGL render mode only.\");\n };\n\n var _tmpCanvas1 = document.createElement(\"canvas\");\n\n var create3DContext = function (canvas, opt_attribs, opt_contextType) {\n if (opt_contextType) {\n try {\n return canvas.getContext(opt_contextType, opt_attribs);\n } catch (e) {\n return null;\n }\n }\n else {\n return create3DContext(canvas, opt_attribs, \"webgl\") ||\n create3DContext(canvas, opt_attribs, \"experimental-webgl\") ||\n create3DContext(canvas, opt_attribs, \"webkit-3d\") ||\n create3DContext(canvas, opt_attribs, \"moz-webgl\") ||\n null;\n }\n };\n\n /**\n * cc.sys.localStorage is a local storage component.\n * @property {Object} localStorage\n */\n try {\n var localStorage = sys.localStorage = win.localStorage;\n localStorage.setItem(\"storage\", \"\");\n localStorage.removeItem(\"storage\");\n localStorage = null;\n } catch (e) {\n var warn = function () {\n cc.warnID(5200);\n };\n sys.localStorage = {\n getItem : warn,\n setItem : warn,\n removeItem : warn,\n clear : warn\n };\n }\n\n var _supportWebp = _tmpCanvas1.toDataURL('image/webp').startsWith('data:image/webp');\n var _supportCanvas = !!_tmpCanvas1.getContext(\"2d\");\n var _supportWebGL = false;\n if (CC_TEST) {\n _supportWebGL = false;\n }\n else if (win.WebGLRenderingContext) {\n _supportWebGL = true;\n }\n\n /**\n * The capabilities of the current platform\n * @property {Object} capabilities\n */\n var capabilities = sys.capabilities = {\n \"canvas\": _supportCanvas,\n \"opengl\": _supportWebGL,\n \"webp\": _supportWebp,\n 'imageBitmap': false,\n };\n\n if (typeof createImageBitmap !== 'undefined' && typeof Blob !== 'undefined') {\n _tmpCanvas1.width = _tmpCanvas1.height = 2;\n createImageBitmap(_tmpCanvas1, {}).then(imageBitmap => {\n capabilities.imageBitmap = true;\n imageBitmap.close && imageBitmap.close();\n }).catch(err => {});\n }\n if (docEle['ontouchstart'] !== undefined || doc['ontouchstart'] !== undefined || nav.msPointerEnabled)\n capabilities[\"touches\"] = true;\n if (docEle['onmouseup'] !== undefined)\n capabilities[\"mouse\"] = true;\n if (docEle['onkeyup'] !== undefined)\n capabilities[\"keyboard\"] = true;\n if (win.DeviceMotionEvent || win.DeviceOrientationEvent)\n capabilities[\"accelerometer\"] = true;\n\n var __audioSupport;\n\n /**\n * Audio support in the browser\n *\n * MULTI_CHANNEL : Multiple audio while playing - If it doesn't, you can only play background music\n * WEB_AUDIO : Support for WebAudio - Support W3C WebAudio standards, all of the audio can be played\n * AUTOPLAY : Supports auto-play audio - if Dont support it, On a touch detecting background music canvas, and then replay\n * REPLAY_AFTER_TOUCH : The first music will fail, must be replay after touchstart\n * USE_EMPTIED_EVENT : Whether to use the emptied event to replace load callback\n * DELAY_CREATE_CTX : delay created the context object - only webAudio\n * NEED_MANUAL_LOOP : loop attribute failure, need to perform loop manually\n *\n * May be modifications for a few browser version\n */\n (function(){\n\n var DEBUG = false;\n\n var version = sys.browserVersion;\n\n // check if browser supports Web Audio\n // check Web Audio's context\n var supportWebAudio = !!(window.AudioContext || window.webkitAudioContext || window.mozAudioContext);\n\n __audioSupport = { ONLY_ONE: false, WEB_AUDIO: supportWebAudio, DELAY_CREATE_CTX: false };\n\n if (sys.os === sys.OS_IOS) {\n // IOS no event that used to parse completed callback\n // this time is not complete, can not play\n //\n __audioSupport.USE_LOADER_EVENT = 'loadedmetadata';\n }\n\n if (sys.browserType === sys.BROWSER_TYPE_FIREFOX) {\n __audioSupport.DELAY_CREATE_CTX = true;\n __audioSupport.USE_LOADER_EVENT = 'canplay';\n }\n\n if (sys.os === sys.OS_ANDROID) {\n if (sys.browserType === sys.BROWSER_TYPE_UC) {\n __audioSupport.ONE_SOURCE = true;\n }\n }\n\n if(DEBUG){\n setTimeout(function(){\n cc.log('browse type: ' + sys.browserType);\n cc.log('browse version: ' + version);\n cc.log('MULTI_CHANNEL: ' + __audioSupport.MULTI_CHANNEL);\n cc.log('WEB_AUDIO: ' + __audioSupport.WEB_AUDIO);\n cc.log('AUTOPLAY: ' + __audioSupport.AUTOPLAY);\n }, 0);\n }\n })();\n\n try {\n if (__audioSupport.WEB_AUDIO) {\n __audioSupport.context = new (window.AudioContext || window.webkitAudioContext || window.mozAudioContext)();\n if(__audioSupport.DELAY_CREATE_CTX) {\n setTimeout(function(){ __audioSupport.context = new (window.AudioContext || window.webkitAudioContext || window.mozAudioContext)(); }, 0);\n }\n }\n } catch(error) {\n __audioSupport.WEB_AUDIO = false;\n cc.logID(5201);\n }\n\n var formatSupport = [];\n\n (function(){\n var audio = document.createElement('audio');\n if(audio.canPlayType) {\n var ogg = audio.canPlayType('audio/ogg; codecs=\"vorbis\"');\n if (ogg) formatSupport.push('.ogg');\n var mp3 = audio.canPlayType('audio/mpeg');\n if (mp3) formatSupport.push('.mp3');\n var wav = audio.canPlayType('audio/wav; codecs=\"1\"');\n if (wav) formatSupport.push('.wav');\n var mp4 = audio.canPlayType('audio/mp4');\n if (mp4) formatSupport.push('.mp4');\n var m4a = audio.canPlayType('audio/x-m4a');\n if (m4a) formatSupport.push('.m4a');\n }\n })();\n __audioSupport.format = formatSupport;\n\n sys.__audioSupport = __audioSupport;\n }\n\n /**\n * !#en\n * Network type enumeration\n * !#zh\n * 网络类型枚举\n *\n * @enum sys.NetworkType\n */\n sys.NetworkType = {\n /**\n * !#en\n * Network is unreachable.\n * !#zh\n * 网络不通\n *\n * @property {Number} NONE\n */\n NONE: 0,\n /**\n * !#en\n * Network is reachable via WiFi or cable.\n * !#zh\n * 通过无线或者有线本地网络连接因特网\n *\n * @property {Number} LAN\n */\n LAN: 1,\n /**\n * !#en\n * Network is reachable via Wireless Wide Area Network\n * !#zh\n * 通过蜂窝移动网络连接因特网\n *\n * @property {Number} WWAN\n */\n WWAN: 2\n };\n\n /**\n * @class sys\n */\n\n /**\n * !#en\n * Get the network type of current device, return cc.sys.NetworkType.LAN if failure.\n * !#zh\n * 获取当前设备的网络类型, 如果网络类型无法获取,默认将返回 cc.sys.NetworkType.LAN\n *\n * @method getNetworkType\n * @return {sys.NetworkType}\n */\n sys.getNetworkType = function() {\n // TODO: need to implement this for mobile phones.\n return sys.NetworkType.LAN;\n };\n\n /**\n * !#en\n * Get the battery level of current device, return 1.0 if failure.\n * !#zh\n * 获取当前设备的电池电量,如果电量无法获取,默认将返回 1\n *\n * @method getBatteryLevel\n * @return {Number} - 0.0 ~ 1.0\n */\n sys.getBatteryLevel = function() {\n // TODO: need to implement this for mobile phones.\n return 1.0;\n };\n\n /**\n * Forces the garbage collection, only available in JSB\n * @method garbageCollect\n */\n sys.garbageCollect = function () {\n // N/A in web\n };\n\n /**\n * Restart the JS VM, only available in JSB\n * @method restartVM\n */\n sys.restartVM = function () {\n // N/A in web\n };\n\n /**\n * Check whether an object is valid,\n * In web engine, it will return true if the object exist\n * In native engine, it will return true if the JS object and the correspond native object are both valid\n * @method isObjectValid\n * @param {Object} obj\n * @return {Boolean} Validity of the object\n */\n sys.isObjectValid = function (obj) {\n if (obj) {\n return true;\n }\n return false;\n };\n\n /**\n * Dump system informations\n * @method dump\n */\n sys.dump = function () {\n var self = this;\n var str = \"\";\n str += \"isMobile : \" + self.isMobile + \"\\r\\n\";\n str += \"language : \" + self.language + \"\\r\\n\";\n str += \"browserType : \" + self.browserType + \"\\r\\n\";\n str += \"browserVersion : \" + self.browserVersion + \"\\r\\n\";\n str += \"capabilities : \" + JSON.stringify(self.capabilities) + \"\\r\\n\";\n str += \"os : \" + self.os + \"\\r\\n\";\n str += \"osVersion : \" + self.osVersion + \"\\r\\n\";\n str += \"platform : \" + self.platform + \"\\r\\n\";\n str += \"Using \" + (cc.game.renderType === cc.game.RENDER_TYPE_WEBGL ? \"WEBGL\" : \"CANVAS\") + \" renderer.\" + \"\\r\\n\";\n cc.log(str);\n };\n\n /**\n * Open a url in browser\n * @method openURL\n * @param {String} url\n */\n sys.openURL = function (url) {\n if (CC_JSB || CC_RUNTIME) {\n jsb.openURL(url);\n }\n else {\n window.open(url);\n }\n };\n\n /**\n * Get the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.\n * @method now\n * @return {Number}\n */\n sys.now = function () {\n if (Date.now) {\n return Date.now();\n }\n else {\n return +(new Date);\n }\n };\n\n return sys;\n}\n\nvar sys = cc && cc.sys ? cc.sys : initSys();\n\nmodule.exports = sys;\n","/****************************************************************************\n Copyright (c) 2008-2010 Ricardo Quesada\n Copyright (c) 2011-2012 cocos2d-x.org\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos2d-x.org\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst EventTarget = require('../event/event-target');\nconst js = require('../platform/js');\nconst renderer = require('../renderer');\nrequire('../platform/CCClass');\n\nvar __BrowserGetter = {\n init: function(){\n this.html = document.getElementsByTagName(\"html\")[0];\n },\n availWidth: function(frame){\n if (!frame || frame === this.html)\n return window.innerWidth;\n else\n return frame.clientWidth;\n },\n availHeight: function(frame){\n if (!frame || frame === this.html)\n return window.innerHeight;\n else\n return frame.clientHeight;\n },\n meta: {\n \"width\": \"device-width\"\n },\n adaptationType: cc.sys.browserType\n};\n\nif (cc.sys.os === cc.sys.OS_IOS) // All browsers are WebView\n __BrowserGetter.adaptationType = cc.sys.BROWSER_TYPE_SAFARI;\n\nswitch (__BrowserGetter.adaptationType) {\n case cc.sys.BROWSER_TYPE_SAFARI:\n case cc.sys.BROWSER_TYPE_SOUGOU:\n case cc.sys.BROWSER_TYPE_UC:\n __BrowserGetter.meta[\"minimal-ui\"] = \"true\";\n __BrowserGetter.availWidth = function(frame){\n return frame.clientWidth;\n };\n __BrowserGetter.availHeight = function(frame){\n return frame.clientHeight;\n };\n break;\n}\n\nvar _scissorRect = null;\n\n/**\n * cc.view is the singleton object which represents the game window.<br/>\n * It's main task include: <br/>\n * - Apply the design resolution policy<br/>\n * - Provide interaction with the window, like resize event on web, retina display support, etc...<br/>\n * - Manage the game view port which can be different with the window<br/>\n * - Manage the content scale and translation<br/>\n * <br/>\n * Since the cc.view is a singleton, you don't need to call any constructor or create functions,<br/>\n * the standard way to use it is by calling:<br/>\n * - cc.view.methodName(); <br/>\n *\n * @class View\n * @extends EventTarget\n */\nvar View = function () {\n EventTarget.call(this);\n\n var _t = this, _strategyer = cc.ContainerStrategy, _strategy = cc.ContentStrategy;\n\n __BrowserGetter.init(this);\n\n // Size of parent node that contains cc.game.container and cc.game.canvas\n _t._frameSize = cc.size(0, 0);\n\n // resolution size, it is the size appropriate for the app resources.\n _t._designResolutionSize = cc.size(0, 0);\n _t._originalDesignResolutionSize = cc.size(0, 0);\n _t._scaleX = 1;\n _t._scaleY = 1;\n // Viewport is the container's rect related to content's coordinates in pixel\n _t._viewportRect = cc.rect(0, 0, 0, 0);\n // The visible rect in content's coordinate in point\n _t._visibleRect = cc.rect(0, 0, 0, 0);\n // Auto full screen disabled by default\n _t._autoFullScreen = false;\n // The device's pixel ratio (for retina displays)\n _t._devicePixelRatio = 1;\n if(CC_JSB) {\n _t._maxPixelRatio = 4;\n } else {\n _t._maxPixelRatio = 2;\n }\n // Retina disabled by default\n _t._retinaEnabled = false;\n // Custom callback for resize event\n _t._resizeCallback = null;\n _t._resizing = false;\n _t._resizeWithBrowserSize = false;\n _t._orientationChanging = true;\n _t._isRotated = false;\n _t._orientation = cc.macro.ORIENTATION_AUTO;\n _t._isAdjustViewport = true;\n _t._antiAliasEnabled = false;\n\n // Setup system default resolution policies\n _t._resolutionPolicy = null;\n _t._rpExactFit = new cc.ResolutionPolicy(_strategyer.EQUAL_TO_FRAME, _strategy.EXACT_FIT);\n _t._rpShowAll = new cc.ResolutionPolicy(_strategyer.EQUAL_TO_FRAME, _strategy.SHOW_ALL);\n _t._rpNoBorder = new cc.ResolutionPolicy(_strategyer.EQUAL_TO_FRAME, _strategy.NO_BORDER);\n _t._rpFixedHeight = new cc.ResolutionPolicy(_strategyer.EQUAL_TO_FRAME, _strategy.FIXED_HEIGHT);\n _t._rpFixedWidth = new cc.ResolutionPolicy(_strategyer.EQUAL_TO_FRAME, _strategy.FIXED_WIDTH);\n\n cc.game.once(cc.game.EVENT_ENGINE_INITED, this.init, this);\n};\n\ncc.js.extend(View, EventTarget);\n\ncc.js.mixin(View.prototype, {\n init () {\n this._initFrameSize();\n\n var w = cc.game.canvas.width, h = cc.game.canvas.height;\n this._designResolutionSize.width = w;\n this._designResolutionSize.height = h;\n this._originalDesignResolutionSize.width = w;\n this._originalDesignResolutionSize.height = h;\n this._viewportRect.width = w;\n this._viewportRect.height = h;\n this._visibleRect.width = w;\n this._visibleRect.height = h;\n\n cc.winSize.width = this._visibleRect.width;\n cc.winSize.height = this._visibleRect.height;\n cc.visibleRect && cc.visibleRect.init(this._visibleRect);\n },\n\n // Resize helper functions\n _resizeEvent: function (forceOrEvent) {\n var view;\n if (this.setDesignResolutionSize) {\n view = this;\n } else {\n view = cc.view;\n }\n // HACK: some browsers can't update window size immediately\n // need to handle resize event callback on the next tick\n let sys = cc.sys;\n if (sys.browserType === sys.BROWSER_TYPE_UC && sys.os === sys.OS_IOS) {\n setTimeout(function () {\n view._resizeEvent(forceOrEvent);\n }, 0)\n return;\n }\n\n // Check frame size changed or not\n var prevFrameW = view._frameSize.width, prevFrameH = view._frameSize.height, prevRotated = view._isRotated;\n if (cc.sys.isMobile) {\n var containerStyle = cc.game.container.style,\n margin = containerStyle.margin;\n containerStyle.margin = '0';\n containerStyle.display = 'none';\n view._initFrameSize();\n containerStyle.margin = margin;\n containerStyle.display = 'block';\n }\n else {\n view._initFrameSize();\n }\n if (forceOrEvent !== true && view._isRotated === prevRotated && view._frameSize.width === prevFrameW && view._frameSize.height === prevFrameH)\n return;\n\n // Frame size changed, do resize works\n var width = view._originalDesignResolutionSize.width;\n var height = view._originalDesignResolutionSize.height;\n view._resizing = true;\n if (width > 0)\n view.setDesignResolutionSize(width, height, view._resolutionPolicy);\n view._resizing = false;\n\n view.emit('canvas-resize');\n if (view._resizeCallback) {\n view._resizeCallback.call();\n }\n },\n\n _orientationChange: function () {\n cc.view._orientationChanging = true;\n cc.view._resizeEvent();\n // HACK: show nav bar on iOS safari\n // safari will enter fullscreen when rotate to landscape\n // need to exit fullscreen when rotate back to portrait, scrollTo(0, 1) works.\n if (cc.sys.browserType === cc.sys.BROWSER_TYPE_SAFARI && cc.sys.isMobile) {\n setTimeout(() => {\n if (window.innerHeight > window.innerWidth) {\n window.scrollTo(0, 1);\n }\n }, 500);\n }\n },\n\n _resize: function() {\n //force resize when size is changed at native\n cc.view._resizeEvent(CC_JSB);\n },\n\n /**\n * !#en\n * Sets view's target-densitydpi for android mobile browser. it can be set to: <br/>\n * 1. cc.macro.DENSITYDPI_DEVICE, value is \"device-dpi\" <br/>\n * 2. cc.macro.DENSITYDPI_HIGH, value is \"high-dpi\" (default value) <br/>\n * 3. cc.macro.DENSITYDPI_MEDIUM, value is \"medium-dpi\" (browser's default value) <br/>\n * 4. cc.macro.DENSITYDPI_LOW, value is \"low-dpi\" <br/>\n * 5. Custom value, e.g: \"480\" <br/>\n * !#zh 设置目标内容的每英寸像素点密度。\n *\n * @method setTargetDensityDPI\n * @param {String} densityDPI\n * @deprecated since v2.0\n */\n\n /**\n * !#en\n * Returns the current target-densitydpi value of cc.view.\n * !#zh 获取目标内容的每英寸像素点密度。\n * @method getTargetDensityDPI\n * @returns {String}\n * @deprecated since v2.0\n */\n\n /**\n * !#en\n * Sets whether resize canvas automatically when browser's size changed.<br/>\n * Useful only on web.\n * !#zh 设置当发现浏览器的尺寸改变时,是否自动调整 canvas 尺寸大小。\n * 仅在 Web 模式下有效。\n * @method resizeWithBrowserSize\n * @param {Boolean} enabled - Whether enable automatic resize with browser's resize event\n */\n resizeWithBrowserSize: function (enabled) {\n if (enabled) {\n //enable\n if (!this._resizeWithBrowserSize) {\n this._resizeWithBrowserSize = true;\n window.addEventListener('resize', this._resize);\n window.addEventListener('orientationchange', this._orientationChange);\n }\n } else {\n //disable\n if (this._resizeWithBrowserSize) {\n this._resizeWithBrowserSize = false;\n window.removeEventListener('resize', this._resize);\n window.removeEventListener('orientationchange', this._orientationChange);\n }\n }\n },\n\n /**\n * !#en\n * Sets the callback function for cc.view's resize action,<br/>\n * this callback will be invoked before applying resolution policy, <br/>\n * so you can do any additional modifications within the callback.<br/>\n * Useful only on web.\n * !#zh 设置 cc.view 调整视窗尺寸行为的回调函数,\n * 这个回调函数会在应用适配模式之前被调用,\n * 因此你可以在这个回调函数内添加任意附加改变,\n * 仅在 Web 平台下有效。\n * @method setResizeCallback\n * @param {Function|Null} callback - The callback function\n */\n setResizeCallback: function (callback) {\n if (CC_EDITOR) return;\n if (typeof callback === 'function' || callback == null) {\n this._resizeCallback = callback;\n }\n },\n\n /**\n * !#en\n * Sets the orientation of the game, it can be landscape, portrait or auto.\n * When set it to landscape or portrait, and screen w/h ratio doesn't fit,\n * cc.view will automatically rotate the game canvas using CSS.\n * Note that this function doesn't have any effect in native,\n * in native, you need to set the application orientation in native project settings\n * !#zh 设置游戏屏幕朝向,它能够是横版,竖版或自动。\n * 当设置为横版或竖版,并且屏幕的宽高比例不匹配时,\n * cc.view 会自动用 CSS 旋转游戏场景的 canvas\n * 这个方法不会对 native 部分产生任何影响,对于 native 而言,你需要在应用设置中的设置排版。\n * @method setOrientation\n * @param {Number} orientation - Possible values: cc.macro.ORIENTATION_LANDSCAPE | cc.macro.ORIENTATION_PORTRAIT | cc.macro.ORIENTATION_AUTO\n */\n setOrientation: function (orientation) {\n orientation = orientation & cc.macro.ORIENTATION_AUTO;\n if (orientation && this._orientation !== orientation) {\n this._orientation = orientation;\n var designWidth = this._originalDesignResolutionSize.width;\n var designHeight = this._originalDesignResolutionSize.height;\n this.setDesignResolutionSize(designWidth, designHeight, this._resolutionPolicy);\n }\n },\n\n _initFrameSize: function () {\n var locFrameSize = this._frameSize;\n var w = __BrowserGetter.availWidth(cc.game.frame);\n var h = __BrowserGetter.availHeight(cc.game.frame);\n var isLandscape = w >= h;\n\n if (CC_EDITOR || !cc.sys.isMobile ||\n (isLandscape && this._orientation & cc.macro.ORIENTATION_LANDSCAPE) ||\n (!isLandscape && this._orientation & cc.macro.ORIENTATION_PORTRAIT)) {\n locFrameSize.width = w;\n locFrameSize.height = h;\n cc.game.container.style['-webkit-transform'] = 'rotate(0deg)';\n cc.game.container.style.transform = 'rotate(0deg)';\n this._isRotated = false;\n }\n else {\n locFrameSize.width = h;\n locFrameSize.height = w;\n cc.game.container.style['-webkit-transform'] = 'rotate(90deg)';\n cc.game.container.style.transform = 'rotate(90deg)';\n cc.game.container.style['-webkit-transform-origin'] = '0px 0px 0px';\n cc.game.container.style.transformOrigin = '0px 0px 0px';\n this._isRotated = true;\n }\n if (this._orientationChanging) {\n setTimeout(function () {\n cc.view._orientationChanging = false;\n }, 1000);\n }\n },\n\n _setViewportMeta: function (metas, overwrite) {\n var vp = document.getElementById(\"cocosMetaElement\");\n if(vp && overwrite){\n document.head.removeChild(vp);\n }\n\n var elems = document.getElementsByName(\"viewport\"),\n currentVP = elems ? elems[0] : null,\n content, key, pattern;\n\n content = currentVP ? currentVP.content : \"\";\n vp = vp || document.createElement(\"meta\");\n vp.id = \"cocosMetaElement\";\n vp.name = \"viewport\";\n vp.content = \"\";\n\n for (key in metas) {\n if (content.indexOf(key) == -1) {\n content += \",\" + key + \"=\" + metas[key];\n }\n else if (overwrite) {\n pattern = new RegExp(key+\"\\s*=\\s*[^,]+\");\n content = content.replace(pattern, key + \"=\" + metas[key]);\n }\n }\n if(/^,/.test(content))\n content = content.substr(1);\n\n vp.content = content;\n // For adopting certain android devices which don't support second viewport\n if (currentVP)\n currentVP.content = content;\n\n document.head.appendChild(vp);\n },\n\n _adjustViewportMeta: function () {\n if (this._isAdjustViewport && !CC_JSB && !CC_RUNTIME) {\n this._setViewportMeta(__BrowserGetter.meta, false);\n this._isAdjustViewport = false;\n }\n },\n\n /**\n * !#en\n * Sets whether the engine modify the \"viewport\" meta in your web page.<br/>\n * It's enabled by default, we strongly suggest you not to disable it.<br/>\n * And even when it's enabled, you can still set your own \"viewport\" meta, it won't be overridden<br/>\n * Only useful on web\n * !#zh 设置引擎是否调整 viewport meta 来配合屏幕适配。\n * 默认设置为启动,我们强烈建议你不要将它设置为关闭。\n * 即使当它启动时,你仍然能够设置你的 viewport meta它不会被覆盖。\n * 仅在 Web 模式下有效\n * @method adjustViewportMeta\n * @param {Boolean} enabled - Enable automatic modification to \"viewport\" meta\n */\n adjustViewportMeta: function (enabled) {\n this._isAdjustViewport = enabled;\n },\n\n /**\n * !#en\n * Retina support is enabled by default for Apple device but disabled for other devices,<br/>\n * it takes effect only when you called setDesignResolutionPolicy<br/>\n * Only useful on web\n * !#zh 对于 Apple 这种支持 Retina 显示的设备上默认进行优化而其他类型设备默认不进行优化,\n * 它仅会在你调用 setDesignResolutionPolicy 方法时有影响。\n * 仅在 Web 模式下有效。\n * @method enableRetina\n * @param {Boolean} enabled - Enable or disable retina display\n */\n enableRetina: function(enabled) {\n this._retinaEnabled = !!enabled;\n },\n\n /**\n * !#en\n * Check whether retina display is enabled.<br/>\n * Only useful on web\n * !#zh 检查是否对 Retina 显示设备进行优化。\n * 仅在 Web 模式下有效。\n * @method isRetinaEnabled\n * @return {Boolean}\n */\n isRetinaEnabled: function() {\n return this._retinaEnabled;\n },\n\n /**\n * !#en Whether to Enable on anti-alias\n * !#zh 控制抗锯齿是否开启\n * @method enableAntiAlias\n * @param {Boolean} enabled - Enable or not anti-alias\n * @deprecated cc.view.enableAntiAlias is deprecated, please use cc.Texture2D.setFilters instead\n * @since v2.3.0\n */\n enableAntiAlias: function (enabled) {\n cc.warnID(9200);\n if (this._antiAliasEnabled === enabled) {\n return;\n }\n this._antiAliasEnabled = enabled;\n if(cc.game.renderType === cc.game.RENDER_TYPE_WEBGL) {\n var cache = cc.assetManager.assets;\n cache.forEach(function (asset) {\n if (asset instanceof cc.Texture2D) {\n var Filter = cc.Texture2D.Filter;\n if (enabled) {\n asset.setFilters(Filter.LINEAR, Filter.LINEAR);\n }\n else {\n asset.setFilters(Filter.NEAREST, Filter.NEAREST);\n }\n }\n });\n }\n else if(cc.game.renderType === cc.game.RENDER_TYPE_CANVAS) {\n var ctx = cc.game.canvas.getContext('2d');\n ctx.imageSmoothingEnabled = enabled;\n ctx.mozImageSmoothingEnabled = enabled;\n }\n },\n\n /**\n * !#en Returns whether the current enable on anti-alias\n * !#zh 返回当前是否抗锯齿\n * @method isAntiAliasEnabled\n * @return {Boolean}\n */\n isAntiAliasEnabled: function () {\n return this._antiAliasEnabled;\n },\n /**\n * !#en\n * If enabled, the application will try automatically to enter full screen mode on mobile devices<br/>\n * You can pass true as parameter to enable it and disable it by passing false.<br/>\n * Only useful on web\n * !#zh 启动时,移动端游戏会在移动端自动尝试进入全屏模式。\n * 你能够传入 true 为参数去启动它,用 false 参数来关闭它。\n * @method enableAutoFullScreen\n * @param {Boolean} enabled - Enable or disable auto full screen on mobile devices\n */\n enableAutoFullScreen: function(enabled) {\n if (enabled &&\n enabled !== this._autoFullScreen &&\n cc.sys.isMobile) {\n // Automatically full screen when user touches on mobile version\n this._autoFullScreen = true;\n cc.screen.autoFullScreen(cc.game.frame);\n }\n else {\n this._autoFullScreen = false;\n cc.screen.disableAutoFullScreen(cc.game.frame);\n }\n },\n\n /**\n * !#en\n * Check whether auto full screen is enabled.<br/>\n * Only useful on web\n * !#zh 检查自动进入全屏模式是否启动。\n * 仅在 Web 模式下有效。\n * @method isAutoFullScreenEnabled\n * @return {Boolean} Auto full screen enabled or not\n */\n isAutoFullScreenEnabled: function() {\n return this._autoFullScreen;\n },\n\n /*\n * Not support on native.<br/>\n * On web, it sets the size of the canvas.\n * !#zh 这个方法并不支持 native 平台,在 Web 平台下,可以用来设置 canvas 尺寸。\n * @method setCanvasSize\n * @param {Number} width\n * @param {Number} height\n */\n setCanvasSize: function (width, height) {\n var canvas = cc.game.canvas;\n var container = cc.game.container;\n\n canvas.width = width * this._devicePixelRatio;\n canvas.height = height * this._devicePixelRatio;\n\n canvas.style.width = width + 'px';\n canvas.style.height = height + 'px';\n\n container.style.width = width + 'px';\n container.style.height = height + 'px';\n\n this._resizeEvent();\n },\n\n /**\n * !#en\n * Returns the canvas size of the view.<br/>\n * On native platforms, it returns the screen size since the view is a fullscreen view.<br/>\n * On web, it returns the size of the canvas element.\n * !#zh 返回视图中 canvas 的尺寸。\n * 在 native 平台下,它返回全屏视图下屏幕的尺寸。\n * 在 Web 平台下,它返回 canvas 元素尺寸。\n * @method getCanvasSize\n * @return {Size}\n */\n getCanvasSize: function () {\n return cc.size(cc.game.canvas.width, cc.game.canvas.height);\n },\n\n /**\n * !#en\n * Returns the frame size of the view.<br/>\n * On native platforms, it returns the screen size since the view is a fullscreen view.<br/>\n * On web, it returns the size of the canvas's outer DOM element.\n * !#zh 返回视图中边框尺寸。\n * 在 native 平台下,它返回全屏视图下屏幕的尺寸。\n * 在 web 平台下,它返回 canvas 元素的外层 DOM 元素尺寸。\n * @method getFrameSize\n * @return {Size}\n */\n getFrameSize: function () {\n return cc.size(this._frameSize.width, this._frameSize.height);\n },\n\n /**\n * !#en\n * On native, it sets the frame size of view.<br/>\n * On web, it sets the size of the canvas's outer DOM element.\n * !#zh 在 native 平台下,设置视图框架尺寸。\n * 在 web 平台下,设置 canvas 外层 DOM 元素尺寸。\n * @method setFrameSize\n * @param {Number} width\n * @param {Number} height\n */\n setFrameSize: function (width, height) {\n this._frameSize.width = width;\n this._frameSize.height = height;\n cc.game.frame.style.width = width + \"px\";\n cc.game.frame.style.height = height + \"px\";\n this._resizeEvent(true);\n },\n\n /**\n * !#en\n * Returns the visible area size of the view port.\n * !#zh 返回视图窗口可见区域尺寸。\n * @method getVisibleSize\n * @return {Size}\n */\n getVisibleSize: function () {\n return cc.size(this._visibleRect.width,this._visibleRect.height);\n },\n\n /**\n * !#en\n * Returns the visible area size of the view port.\n * !#zh 返回视图窗口可见区域像素尺寸。\n * @method getVisibleSizeInPixel\n * @return {Size}\n */\n getVisibleSizeInPixel: function () {\n return cc.size( this._visibleRect.width * this._scaleX,\n this._visibleRect.height * this._scaleY );\n },\n\n /**\n * !#en\n * Returns the visible origin of the view port.\n * !#zh 返回视图窗口可见区域原点。\n * @method getVisibleOrigin\n * @return {Vec2}\n */\n getVisibleOrigin: function () {\n return cc.v2(this._visibleRect.x,this._visibleRect.y);\n },\n\n /**\n * !#en\n * Returns the visible origin of the view port.\n * !#zh 返回视图窗口可见区域像素原点。\n * @method getVisibleOriginInPixel\n * @return {Vec2}\n */\n getVisibleOriginInPixel: function () {\n return cc.v2(this._visibleRect.x * this._scaleX,\n this._visibleRect.y * this._scaleY);\n },\n\n /**\n * !#en\n * Returns the current resolution policy\n * !#zh 返回当前分辨率方案\n * @see cc.ResolutionPolicy\n * @method getResolutionPolicy\n * @return {ResolutionPolicy}\n */\n getResolutionPolicy: function () {\n return this._resolutionPolicy;\n },\n\n /**\n * !#en\n * Sets the current resolution policy\n * !#zh 设置当前分辨率模式\n * @see cc.ResolutionPolicy\n * @method setResolutionPolicy\n * @param {ResolutionPolicy|Number} resolutionPolicy\n */\n setResolutionPolicy: function (resolutionPolicy) {\n var _t = this;\n if (resolutionPolicy instanceof cc.ResolutionPolicy) {\n _t._resolutionPolicy = resolutionPolicy;\n }\n // Ensure compatibility with JSB\n else {\n var _locPolicy = cc.ResolutionPolicy;\n if(resolutionPolicy === _locPolicy.EXACT_FIT)\n _t._resolutionPolicy = _t._rpExactFit;\n if(resolutionPolicy === _locPolicy.SHOW_ALL)\n _t._resolutionPolicy = _t._rpShowAll;\n if(resolutionPolicy === _locPolicy.NO_BORDER)\n _t._resolutionPolicy = _t._rpNoBorder;\n if(resolutionPolicy === _locPolicy.FIXED_HEIGHT)\n _t._resolutionPolicy = _t._rpFixedHeight;\n if(resolutionPolicy === _locPolicy.FIXED_WIDTH)\n _t._resolutionPolicy = _t._rpFixedWidth;\n }\n },\n\n /**\n * !#en\n * Sets the resolution policy with designed view size in points.<br/>\n * The resolution policy include: <br/>\n * [1] ResolutionExactFit Fill screen by stretch-to-fit: if the design resolution ratio of width to height is different from the screen resolution ratio, your game view will be stretched.<br/>\n * [2] ResolutionNoBorder Full screen without black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two areas of your game view will be cut.<br/>\n * [3] ResolutionShowAll Full screen with black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two black borders will be shown.<br/>\n * [4] ResolutionFixedHeight Scale the content's height to screen's height and proportionally scale its width<br/>\n * [5] ResolutionFixedWidth Scale the content's width to screen's width and proportionally scale its height<br/>\n * [cc.ResolutionPolicy] [Web only feature] Custom resolution policy, constructed by cc.ResolutionPolicy<br/>\n * !#zh 通过设置设计分辨率和匹配模式来进行游戏画面的屏幕适配。\n * @method setDesignResolutionSize\n * @param {Number} width Design resolution width.\n * @param {Number} height Design resolution height.\n * @param {ResolutionPolicy|Number} resolutionPolicy The resolution policy desired\n */\n setDesignResolutionSize: function (width, height, resolutionPolicy) {\n // Defensive code\n if( !(width > 0 && height > 0) ){\n cc.errorID(2200);\n return;\n }\n\n this.setResolutionPolicy(resolutionPolicy);\n var policy = this._resolutionPolicy;\n if (policy) {\n policy.preApply(this);\n }\n\n // Reinit frame size\n if (cc.sys.isMobile)\n this._adjustViewportMeta();\n\n // Permit to re-detect the orientation of device.\n this._orientationChanging = true;\n // If resizing, then frame size is already initialized, this logic should be improved\n if (!this._resizing)\n this._initFrameSize();\n\n if (!policy) {\n cc.logID(2201);\n return;\n }\n\n this._originalDesignResolutionSize.width = this._designResolutionSize.width = width;\n this._originalDesignResolutionSize.height = this._designResolutionSize.height = height;\n\n var result = policy.apply(this, this._designResolutionSize);\n\n if(result.scale && result.scale.length === 2){\n this._scaleX = result.scale[0];\n this._scaleY = result.scale[1];\n }\n\n if(result.viewport){\n var vp = this._viewportRect,\n vb = this._visibleRect,\n rv = result.viewport;\n\n vp.x = rv.x;\n vp.y = rv.y;\n vp.width = rv.width;\n vp.height = rv.height;\n\n vb.x = 0;\n vb.y = 0;\n vb.width = rv.width / this._scaleX;\n vb.height = rv.height / this._scaleY;\n }\n\n policy.postApply(this);\n cc.winSize.width = this._visibleRect.width;\n cc.winSize.height = this._visibleRect.height;\n\n cc.visibleRect && cc.visibleRect.init(this._visibleRect);\n\n renderer.updateCameraViewport();\n cc.internal.inputManager._updateCanvasBoundingRect();\n this.emit('design-resolution-changed');\n },\n\n /**\n * !#en\n * Returns the designed size for the view.\n * Default resolution size is the same as 'getFrameSize'.\n * !#zh 返回视图的设计分辨率。\n * 默认下分辨率尺寸同 `getFrameSize` 方法相同\n * @method getDesignResolutionSize\n * @return {Size}\n */\n getDesignResolutionSize: function () {\n return cc.size(this._designResolutionSize.width, this._designResolutionSize.height);\n },\n\n /**\n * !#en\n * Sets the container to desired pixel resolution and fit the game content to it.\n * This function is very useful for adaptation in mobile browsers.\n * In some HD android devices, the resolution is very high, but its browser performance may not be very good.\n * In this case, enabling retina display is very costy and not suggested, and if retina is disabled, the image may be blurry.\n * But this API can be helpful to set a desired pixel resolution which is in between.\n * This API will do the following:\n * 1. Set viewport's width to the desired width in pixel\n * 2. Set body width to the exact pixel resolution\n * 3. The resolution policy will be reset with designed view size in points.\n * !#zh 设置容器container需要的像素分辨率并且适配相应分辨率的游戏内容。\n * @method setRealPixelResolution\n * @param {Number} width Design resolution width.\n * @param {Number} height Design resolution height.\n * @param {ResolutionPolicy|Number} resolutionPolicy The resolution policy desired\n */\n setRealPixelResolution: function (width, height, resolutionPolicy) {\n if (!CC_JSB && !CC_RUNTIME) {\n // Set viewport's width\n this._setViewportMeta({\"width\": width}, true);\n\n // Set body width to the exact pixel resolution\n document.documentElement.style.width = width + \"px\";\n document.body.style.width = width + \"px\";\n document.body.style.left = \"0px\";\n document.body.style.top = \"0px\";\n }\n\n // Reset the resolution size and policy\n this.setDesignResolutionSize(width, height, resolutionPolicy);\n },\n\n /**\n * !#en\n * Sets view port rectangle with points.\n * !#zh 用设计分辨率下的点尺寸来设置视窗。\n * @method setViewportInPoints\n * @deprecated since v2.0\n * @param {Number} x\n * @param {Number} y\n * @param {Number} w width\n * @param {Number} h height\n */\n setViewportInPoints: function (x, y, w, h) {\n var locScaleX = this._scaleX, locScaleY = this._scaleY;\n cc.game._renderContext.viewport((x * locScaleX + this._viewportRect.x),\n (y * locScaleY + this._viewportRect.y),\n (w * locScaleX),\n (h * locScaleY));\n },\n\n /**\n * !#en\n * Sets Scissor rectangle with points.\n * !#zh 用设计分辨率下的点的尺寸来设置 scissor 剪裁区域。\n * @method setScissorInPoints\n * @deprecated since v2.0\n * @param {Number} x\n * @param {Number} y\n * @param {Number} w\n * @param {Number} h\n */\n setScissorInPoints: function (x, y, w, h) {\n let scaleX = this._scaleX, scaleY = this._scaleY;\n let sx = Math.ceil(x * scaleX + this._viewportRect.x);\n let sy = Math.ceil(y * scaleY + this._viewportRect.y);\n let sw = Math.ceil(w * scaleX);\n let sh = Math.ceil(h * scaleY);\n let gl = cc.game._renderContext;\n\n if (!_scissorRect) {\n var boxArr = gl.getParameter(gl.SCISSOR_BOX);\n _scissorRect = cc.rect(boxArr[0], boxArr[1], boxArr[2], boxArr[3]);\n }\n\n if (_scissorRect.x !== sx || _scissorRect.y !== sy || _scissorRect.width !== sw || _scissorRect.height !== sh) {\n _scissorRect.x = sx;\n _scissorRect.y = sy;\n _scissorRect.width = sw;\n _scissorRect.height = sh;\n gl.scissor(sx, sy, sw, sh);\n }\n },\n\n /**\n * !#en\n * Returns whether GL_SCISSOR_TEST is enable\n * !#zh 检查 scissor 是否生效。\n * @method isScissorEnabled\n * @deprecated since v2.0\n * @return {Boolean}\n */\n isScissorEnabled: function () {\n return cc.game._renderContext.isEnabled(gl.SCISSOR_TEST);\n },\n\n /**\n * !#en\n * Returns the current scissor rectangle\n * !#zh 返回当前的 scissor 剪裁区域。\n * @method getScissorRect\n * @deprecated since v2.0\n * @return {Rect}\n */\n getScissorRect: function () {\n if (!_scissorRect) {\n var boxArr = gl.getParameter(gl.SCISSOR_BOX);\n _scissorRect = cc.rect(boxArr[0], boxArr[1], boxArr[2], boxArr[3]);\n }\n var scaleXFactor = 1 / this._scaleX;\n var scaleYFactor = 1 / this._scaleY;\n return cc.rect(\n (_scissorRect.x - this._viewportRect.x) * scaleXFactor,\n (_scissorRect.y - this._viewportRect.y) * scaleYFactor,\n _scissorRect.width * scaleXFactor,\n _scissorRect.height * scaleYFactor\n );\n },\n\n /**\n * !#en\n * Returns the view port rectangle.\n * !#zh 返回视窗剪裁区域。\n * @method getViewportRect\n * @return {Rect}\n */\n getViewportRect: function () {\n return this._viewportRect;\n },\n\n /**\n * !#en\n * Returns scale factor of the horizontal direction (X axis).\n * !#zh 返回横轴的缩放比,这个缩放比是将画布像素分辨率放到设计分辨率的比例。\n * @method getScaleX\n * @return {Number}\n */\n getScaleX: function () {\n return this._scaleX;\n },\n\n /**\n * !#en\n * Returns scale factor of the vertical direction (Y axis).\n * !#zh 返回纵轴的缩放比,这个缩放比是将画布像素分辨率缩放到设计分辨率的比例。\n * @method getScaleY\n * @return {Number}\n */\n getScaleY: function () {\n return this._scaleY;\n },\n\n /**\n * !#en\n * Returns device pixel ratio for retina display.\n * !#zh 返回设备或浏览器像素比例。\n * @method getDevicePixelRatio\n * @return {Number}\n */\n getDevicePixelRatio: function() {\n return this._devicePixelRatio;\n },\n\n /**\n * !#en\n * Returns the real location in view for a translation based on a related position\n * !#zh 将屏幕坐标转换为游戏视图下的坐标。\n * @method convertToLocationInView\n * @param {Number} tx - The X axis translation\n * @param {Number} ty - The Y axis translation\n * @param {Object} relatedPos - The related position object including \"left\", \"top\", \"width\", \"height\" informations\n * @return {Vec2}\n */\n convertToLocationInView: function (tx, ty, relatedPos, out) {\n let result = out || cc.v2();\n let posLeft = relatedPos.adjustedLeft ? relatedPos.adjustedLeft : relatedPos.left;\n let posTop = relatedPos.adjustedTop ? relatedPos.adjustedTop : relatedPos.top;\n let x = this._devicePixelRatio * (tx - posLeft);\n let y = this._devicePixelRatio * (posTop + relatedPos.height - ty);\n if (this._isRotated) {\n result.x = cc.game.canvas.width - y;\n result.y = x;\n }\n else {\n result.x = x;\n result.y = y;\n }\n return result;\n },\n\n _convertMouseToLocationInView: function (in_out_point, relatedPos) {\n var viewport = this._viewportRect, _t = this;\n in_out_point.x = ((_t._devicePixelRatio * (in_out_point.x - relatedPos.left)) - viewport.x) / _t._scaleX;\n in_out_point.y = (_t._devicePixelRatio * (relatedPos.top + relatedPos.height - in_out_point.y) - viewport.y) / _t._scaleY;\n },\n\n _convertPointWithScale: function (point) {\n var viewport = this._viewportRect;\n point.x = (point.x - viewport.x) / this._scaleX;\n point.y = (point.y - viewport.y) / this._scaleY;\n },\n\n _convertTouchesWithScale: function (touches) {\n var viewport = this._viewportRect, scaleX = this._scaleX, scaleY = this._scaleY,\n selTouch, selPoint, selPrePoint;\n for (var i = 0; i < touches.length; i++) {\n selTouch = touches[i];\n selPoint = selTouch._point;\n selPrePoint = selTouch._prevPoint;\n\n selPoint.x = (selPoint.x - viewport.x) / scaleX;\n selPoint.y = (selPoint.y - viewport.y) / scaleY;\n selPrePoint.x = (selPrePoint.x - viewport.x) / scaleX;\n selPrePoint.y = (selPrePoint.y - viewport.y) / scaleY;\n }\n }\n});\n\n/**\n * !#en\n * Emit when design resolution changed.\n * !#zh\n * 当设计分辨率改变时发送。\n * @event design-resolution-changed\n */\n /**\n * !#en\n * Emit when canvas resize.\n * !#zh\n * 当画布大小改变时发送。\n * @event canvas-resize\n */\n\n\n/**\n * <p>cc.game.containerStrategy class is the root strategy class of container's scale strategy,\n * it controls the behavior of how to scale the cc.game.container and cc.game.canvas object</p>\n *\n * @class ContainerStrategy\n */\ncc.ContainerStrategy = cc.Class({\n name: \"ContainerStrategy\",\n /**\n * !#en\n * Manipulation before appling the strategy\n * !#zh 在应用策略之前的操作\n * @method preApply\n * @param {View} view - The target view\n */\n preApply: function (view) {\n },\n\n /**\n * !#en\n * Function to apply this strategy\n * !#zh 策略应用方法\n * @method apply\n * @param {View} view\n * @param {Size} designedResolution\n */\n apply: function (view, designedResolution) {\n },\n\n /**\n * !#en\n * Manipulation after applying the strategy\n * !#zh 策略调用之后的操作\n * @method postApply\n * @param {View} view The target view\n */\n postApply: function (view) {\n\n },\n\n _setupContainer: function (view, w, h) {\n var locCanvas = cc.game.canvas;\n\n this._setupStyle(view, w, h);\n\n // Setup pixel ratio for retina display\n var devicePixelRatio = view._devicePixelRatio = 1;\n if(CC_JSB){\n // view.isRetinaEnabled only work on web.\n devicePixelRatio = view._devicePixelRatio = window.devicePixelRatio;\n }else if (view.isRetinaEnabled()) {\n devicePixelRatio = view._devicePixelRatio = Math.min(view._maxPixelRatio, window.devicePixelRatio || 1);\n }\n // Setup canvas\n locCanvas.width = w * devicePixelRatio;\n locCanvas.height = h * devicePixelRatio;\n },\n\n _setupStyle: function (view, w, h) {\n let locCanvas = cc.game.canvas;\n let locContainer = cc.game.container;\n if (cc.sys.os === cc.sys.OS_ANDROID) {\n document.body.style.width = (view._isRotated ? h : w) + 'px';\n document.body.style.height = (view._isRotated ? w : h) + 'px';\n }\n // Setup style\n locContainer.style.width = locCanvas.style.width = w + 'px';\n locContainer.style.height = locCanvas.style.height = h + 'px';\n },\n\n _fixContainer: function () {\n // Add container to document body\n document.body.insertBefore(cc.game.container, document.body.firstChild);\n // Set body's width height to window's size, and forbid overflow, so that game will be centered\n var bs = document.body.style;\n bs.width = window.innerWidth + \"px\";\n bs.height = window.innerHeight + \"px\";\n bs.overflow = \"hidden\";\n // Body size solution doesn't work on all mobile browser so this is the aleternative: fixed container\n var contStyle = cc.game.container.style;\n contStyle.position = \"fixed\";\n contStyle.left = contStyle.top = \"0px\";\n // Reposition body\n document.body.scrollTop = 0;\n }\n});\n\n/**\n * <p>cc.ContentStrategy class is the root strategy class of content's scale strategy,\n * it controls the behavior of how to scale the scene and setup the viewport for the game</p>\n *\n * @class ContentStrategy\n */\ncc.ContentStrategy = cc.Class({\n name: \"ContentStrategy\",\n\n ctor: function () {\n this._result = {\n scale: [1, 1],\n viewport: null\n };\n },\n\n _buildResult: function (containerW, containerH, contentW, contentH, scaleX, scaleY) {\n // Makes content fit better the canvas\n Math.abs(containerW - contentW) < 2 && (contentW = containerW);\n Math.abs(containerH - contentH) < 2 && (contentH = containerH);\n\n var viewport = cc.rect((containerW - contentW) / 2, (containerH - contentH) / 2, contentW, contentH);\n\n // Translate the content\n if (cc.game.renderType === cc.game.RENDER_TYPE_CANVAS){\n //TODO: modify something for setTransform\n //cc.game._renderContext.translate(viewport.x, viewport.y + contentH);\n }\n\n this._result.scale = [scaleX, scaleY];\n this._result.viewport = viewport;\n return this._result;\n },\n\n /**\n * !#en\n * Manipulation before applying the strategy\n * !#zh 策略应用前的操作\n * @method preApply\n * @param {View} view - The target view\n */\n preApply: function (view) {\n },\n\n /**\n * !#en Function to apply this strategy\n * The return value is {scale: [scaleX, scaleY], viewport: {cc.Rect}},\n * The target view can then apply these value to itself, it's preferred not to modify directly its private variables\n * !#zh 调用策略方法\n * @method apply\n * @param {View} view\n * @param {Size} designedResolution\n * @return {Object} scaleAndViewportRect\n */\n apply: function (view, designedResolution) {\n return {\"scale\": [1, 1]};\n },\n\n /**\n * !#en\n * Manipulation after applying the strategy\n * !#zh 策略调用之后的操作\n * @method postApply\n * @param {View} view - The target view\n */\n postApply: function (view) {\n }\n});\n\n(function () {\n\n// Container scale strategys\n /**\n * @class EqualToFrame\n * @extends ContainerStrategy\n */\n var EqualToFrame = cc.Class({\n name: \"EqualToFrame\",\n extends: cc.ContainerStrategy,\n apply: function (view) {\n var frameH = view._frameSize.height, containerStyle = cc.game.container.style;\n this._setupContainer(view, view._frameSize.width, view._frameSize.height);\n // Setup container's margin and padding\n if (view._isRotated) {\n containerStyle.margin = '0 0 0 ' + frameH + 'px';\n }\n else {\n containerStyle.margin = '0px';\n }\n containerStyle.padding = \"0px\";\n }\n });\n\n /**\n * @class ProportionalToFrame\n * @extends ContainerStrategy\n */\n var ProportionalToFrame = cc.Class({\n name: \"ProportionalToFrame\",\n extends: cc.ContainerStrategy,\n apply: function (view, designedResolution) {\n var frameW = view._frameSize.width, frameH = view._frameSize.height, containerStyle = cc.game.container.style,\n designW = designedResolution.width, designH = designedResolution.height,\n scaleX = frameW / designW, scaleY = frameH / designH,\n containerW, containerH;\n\n scaleX < scaleY ? (containerW = frameW, containerH = designH * scaleX) : (containerW = designW * scaleY, containerH = frameH);\n\n // Adjust container size with integer value\n var offx = Math.round((frameW - containerW) / 2);\n var offy = Math.round((frameH - containerH) / 2);\n containerW = frameW - 2 * offx;\n containerH = frameH - 2 * offy;\n\n this._setupContainer(view, containerW, containerH);\n if (!CC_EDITOR) {\n // Setup container's margin and padding\n if (view._isRotated) {\n containerStyle.margin = '0 0 0 ' + frameH + 'px';\n }\n else {\n containerStyle.margin = '0px';\n }\n containerStyle.paddingLeft = offx + \"px\";\n containerStyle.paddingRight = offx + \"px\";\n containerStyle.paddingTop = offy + \"px\";\n containerStyle.paddingBottom = offy + \"px\";\n }\n }\n });\n\n /**\n * @class EqualToWindow\n * @extends EqualToFrame\n */\n var EqualToWindow = cc.Class({\n name: \"EqualToWindow\",\n extends: EqualToFrame,\n preApply: function (view) {\n this._super(view);\n cc.game.frame = document.documentElement;\n },\n\n apply: function (view) {\n this._super(view);\n this._fixContainer();\n }\n });\n\n /**\n * @class ProportionalToWindow\n * @extends ProportionalToFrame\n */\n var ProportionalToWindow = cc.Class({\n name: \"ProportionalToWindow\",\n extends: ProportionalToFrame,\n preApply: function (view) {\n this._super(view);\n cc.game.frame = document.documentElement;\n },\n\n apply: function (view, designedResolution) {\n this._super(view, designedResolution);\n this._fixContainer();\n }\n });\n\n /**\n * @class OriginalContainer\n * @extends ContainerStrategy\n */\n var OriginalContainer = cc.Class({\n name: \"OriginalContainer\",\n extends: cc.ContainerStrategy,\n apply: function (view) {\n this._setupContainer(view, cc.game.canvas.width, cc.game.canvas.height);\n }\n });\n\n // need to adapt prototype before instantiating\n let _global = typeof window === 'undefined' ? global : window;\n let globalAdapter = _global.__globalAdapter;\n if (globalAdapter) {\n if (globalAdapter.adaptContainerStrategy) {\n globalAdapter.adaptContainerStrategy(cc.ContainerStrategy.prototype);\n }\n if (globalAdapter.adaptView) {\n globalAdapter.adaptView(View.prototype);\n }\n }\n\n// #NOT STABLE on Android# Alias: Strategy that makes the container's size equals to the window's size\n// cc.ContainerStrategy.EQUAL_TO_WINDOW = new EqualToWindow();\n// #NOT STABLE on Android# Alias: Strategy that scale proportionally the container's size to window's size\n// cc.ContainerStrategy.PROPORTION_TO_WINDOW = new ProportionalToWindow();\n// Alias: Strategy that makes the container's size equals to the frame's size\n cc.ContainerStrategy.EQUAL_TO_FRAME = new EqualToFrame();\n// Alias: Strategy that scale proportionally the container's size to frame's size\n cc.ContainerStrategy.PROPORTION_TO_FRAME = new ProportionalToFrame();\n// Alias: Strategy that keeps the original container's size\n cc.ContainerStrategy.ORIGINAL_CONTAINER = new OriginalContainer();\n\n// Content scale strategys\n var ExactFit = cc.Class({\n name: \"ExactFit\",\n extends: cc.ContentStrategy,\n apply: function (view, designedResolution) {\n var containerW = cc.game.canvas.width, containerH = cc.game.canvas.height,\n scaleX = containerW / designedResolution.width, scaleY = containerH / designedResolution.height;\n\n return this._buildResult(containerW, containerH, containerW, containerH, scaleX, scaleY);\n }\n });\n\n var ShowAll = cc.Class({\n name: \"ShowAll\",\n extends: cc.ContentStrategy,\n apply: function (view, designedResolution) {\n var containerW = cc.game.canvas.width, containerH = cc.game.canvas.height,\n designW = designedResolution.width, designH = designedResolution.height,\n scaleX = containerW / designW, scaleY = containerH / designH, scale = 0,\n contentW, contentH;\n\n scaleX < scaleY ? (scale = scaleX, contentW = containerW, contentH = designH * scale)\n : (scale = scaleY, contentW = designW * scale, contentH = containerH);\n\n return this._buildResult(containerW, containerH, contentW, contentH, scale, scale);\n }\n });\n\n var NoBorder = cc.Class({\n name: \"NoBorder\",\n extends: cc.ContentStrategy,\n apply: function (view, designedResolution) {\n var containerW = cc.game.canvas.width, containerH = cc.game.canvas.height,\n designW = designedResolution.width, designH = designedResolution.height,\n scaleX = containerW / designW, scaleY = containerH / designH, scale,\n contentW, contentH;\n\n scaleX < scaleY ? (scale = scaleY, contentW = designW * scale, contentH = containerH)\n : (scale = scaleX, contentW = containerW, contentH = designH * scale);\n\n return this._buildResult(containerW, containerH, contentW, contentH, scale, scale);\n }\n });\n\n var FixedHeight = cc.Class({\n name: \"FixedHeight\",\n extends: cc.ContentStrategy,\n apply: function (view, designedResolution) {\n var containerW = cc.game.canvas.width, containerH = cc.game.canvas.height,\n designH = designedResolution.height, scale = containerH / designH,\n contentW = containerW, contentH = containerH;\n\n return this._buildResult(containerW, containerH, contentW, contentH, scale, scale);\n }\n });\n\n var FixedWidth = cc.Class({\n name: \"FixedWidth\",\n extends: cc.ContentStrategy,\n apply: function (view, designedResolution) {\n var containerW = cc.game.canvas.width, containerH = cc.game.canvas.height,\n designW = designedResolution.width, scale = containerW / designW,\n contentW = containerW, contentH = containerH;\n\n return this._buildResult(containerW, containerH, contentW, contentH, scale, scale);\n }\n });\n\n// Alias: Strategy to scale the content's size to container's size, non proportional\n cc.ContentStrategy.EXACT_FIT = new ExactFit();\n// Alias: Strategy to scale the content's size proportionally to maximum size and keeps the whole content area to be visible\n cc.ContentStrategy.SHOW_ALL = new ShowAll();\n// Alias: Strategy to scale the content's size proportionally to fill the whole container area\n cc.ContentStrategy.NO_BORDER = new NoBorder();\n// Alias: Strategy to scale the content's height to container's height and proportionally scale its width\n cc.ContentStrategy.FIXED_HEIGHT = new FixedHeight();\n// Alias: Strategy to scale the content's width to container's width and proportionally scale its height\n cc.ContentStrategy.FIXED_WIDTH = new FixedWidth();\n\n})();\n\n/**\n * <p>cc.ResolutionPolicy class is the root strategy class of scale strategy,\n * its main task is to maintain the compatibility with Cocos2d-x</p>\n *\n * @class ResolutionPolicy\n */\n/**\n * @method constructor\n * @param {ContainerStrategy} containerStg The container strategy\n * @param {ContentStrategy} contentStg The content strategy\n */\ncc.ResolutionPolicy = cc.Class({\n name: \"cc.ResolutionPolicy\",\n /**\n * Constructor of cc.ResolutionPolicy\n * @param {ContainerStrategy} containerStg\n * @param {ContentStrategy} contentStg\n */\n ctor: function (containerStg, contentStg) {\n this._containerStrategy = null;\n this._contentStrategy = null;\n this.setContainerStrategy(containerStg);\n this.setContentStrategy(contentStg);\n },\n\n /**\n * !#en Manipulation before applying the resolution policy\n * !#zh 策略应用前的操作\n * @method preApply\n * @param {View} view The target view\n */\n preApply: function (view) {\n this._containerStrategy.preApply(view);\n this._contentStrategy.preApply(view);\n },\n\n /**\n * !#en Function to apply this resolution policy\n * The return value is {scale: [scaleX, scaleY], viewport: {cc.Rect}},\n * The target view can then apply these value to itself, it's preferred not to modify directly its private variables\n * !#zh 调用策略方法\n * @method apply\n * @param {View} view - The target view\n * @param {Size} designedResolution - The user defined design resolution\n * @return {Object} An object contains the scale X/Y values and the viewport rect\n */\n apply: function (view, designedResolution) {\n this._containerStrategy.apply(view, designedResolution);\n return this._contentStrategy.apply(view, designedResolution);\n },\n\n /**\n * !#en Manipulation after appyling the strategy\n * !#zh 策略应用之后的操作\n * @method postApply\n * @param {View} view - The target view\n */\n postApply: function (view) {\n this._containerStrategy.postApply(view);\n this._contentStrategy.postApply(view);\n },\n\n /**\n * !#en\n * Setup the container's scale strategy\n * !#zh 设置容器的适配策略\n * @method setContainerStrategy\n * @param {ContainerStrategy} containerStg\n */\n setContainerStrategy: function (containerStg) {\n if (containerStg instanceof cc.ContainerStrategy)\n this._containerStrategy = containerStg;\n },\n\n /**\n * !#en\n * Setup the content's scale strategy\n * !#zh 设置内容的适配策略\n * @method setContentStrategy\n * @param {ContentStrategy} contentStg\n */\n setContentStrategy: function (contentStg) {\n if (contentStg instanceof cc.ContentStrategy)\n this._contentStrategy = contentStg;\n }\n});\n\njs.get(cc.ResolutionPolicy.prototype, \"canvasSize\", function () {\n return cc.v2(cc.game.canvas.width, cc.game.canvas.height);\n});\n\n/**\n * The entire application is visible in the specified area without trying to preserve the original aspect ratio.<br/>\n * Distortion can occur, and the application may appear stretched or compressed.\n * @property {Number} EXACT_FIT\n * @readonly\n * @static\n */\ncc.ResolutionPolicy.EXACT_FIT = 0;\n\n/**\n * The entire application fills the specified area, without distortion but possibly with some cropping,<br/>\n * while maintaining the original aspect ratio of the application.\n * @property {Number} NO_BORDER\n * @readonly\n * @static\n */\ncc.ResolutionPolicy.NO_BORDER = 1;\n\n/**\n * The entire application is visible in the specified area without distortion while maintaining the original<br/>\n * aspect ratio of the application. Borders can appear on two sides of the application.\n * @property {Number} SHOW_ALL\n * @readonly\n * @static\n */\ncc.ResolutionPolicy.SHOW_ALL = 2;\n\n/**\n * The application takes the height of the design resolution size and modifies the width of the internal<br/>\n * canvas so that it fits the aspect ratio of the device<br/>\n * no distortion will occur however you must make sure your application works on different<br/>\n * aspect ratios\n * @property {Number} FIXED_HEIGHT\n * @readonly\n * @static\n */\ncc.ResolutionPolicy.FIXED_HEIGHT = 3;\n\n/**\n * The application takes the width of the design resolution size and modifies the height of the internal<br/>\n * canvas so that it fits the aspect ratio of the device<br/>\n * no distortion will occur however you must make sure your application works on different<br/>\n * aspect ratios\n * @property {Number} FIXED_WIDTH\n * @readonly\n * @static\n */\ncc.ResolutionPolicy.FIXED_WIDTH = 4;\n\n/**\n * Unknow policy\n * @property {Number} UNKNOWN\n * @readonly\n * @static\n */\ncc.ResolutionPolicy.UNKNOWN = 5;\n\n/**\n * @module cc\n */\n\n/**\n * !#en cc.view is the shared view object.\n * !#zh cc.view 是全局的视图对象。\n * @property view\n * @static\n * @type {View}\n */\ncc.view = new View();\n\n/**\n * !#en cc.winSize is the alias object for the size of the current game window.\n * !#zh cc.winSize 为当前的游戏窗口的大小。\n * @property winSize\n * @type Size\n */\ncc.winSize = cc.size();\n\nmodule.exports = cc.view;\n","/****************************************************************************\n Copyright (c) 2011-2012 cocos2d-x.org\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos2d-x.org\n\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * cc.visibleRect is a singleton object which defines the actual visible rect of the current view,\n * it should represent the same rect as cc.view.getViewportRect()\n *\n * @class visibleRect\n */\ncc.visibleRect = {\n topLeft:cc.v2(0,0),\n topRight:cc.v2(0,0),\n top:cc.v2(0,0),\n bottomLeft:cc.v2(0,0),\n bottomRight:cc.v2(0,0),\n bottom:cc.v2(0,0),\n center:cc.v2(0,0),\n left:cc.v2(0,0),\n right:cc.v2(0,0),\n width:0,\n height:0,\n\n /**\n * initialize\n * @static\n * @method init\n * @param {Rect} visibleRect\n */\n init:function(visibleRect){\n\n var w = this.width = visibleRect.width;\n var h = this.height = visibleRect.height;\n var l = visibleRect.x,\n b = visibleRect.y,\n t = b + h,\n r = l + w;\n\n //top\n this.topLeft.x = l;\n this.topLeft.y = t;\n this.topRight.x = r;\n this.topRight.y = t;\n this.top.x = l + w/2;\n this.top.y = t;\n\n //bottom\n this.bottomLeft.x = l;\n this.bottomLeft.y = b;\n this.bottomRight.x = r;\n this.bottomRight.y = b;\n this.bottom.x = l + w/2;\n this.bottom.y = b;\n\n //center\n this.center.x = l + w/2;\n this.center.y = b + h/2;\n\n //left\n this.left.x = l;\n this.left.y = b + h/2;\n\n //right\n this.right.x = r;\n this.right.y = b + h/2;\n }\n};\n\n/**\n * Top left coordinate of the screen related to the game scene.\n * @static\n * @property {Vec2} topLeft\n */\n\n/**\n * Top right coordinate of the screen related to the game scene.\n * @static\n * @property {Vec2} topRight\n */\n\n/**\n * Top center coordinate of the screen related to the game scene.\n * @static\n * @property {Vec2} top\n */\n\n/**\n * Bottom left coordinate of the screen related to the game scene.\n * @static\n * @property {Vec2} bottomLeft\n */\n\n/**\n * Bottom right coordinate of the screen related to the game scene.\n * @static\n * @property {Vec2} bottomRight\n */\n\n/**\n * Bottom center coordinate of the screen related to the game scene.\n * @static\n * @property {Vec2} bottom\n */\n\n/**\n * Center coordinate of the screen related to the game scene.\n * @static\n * @property {Vec2} center\n */\n\n/**\n * Left center coordinate of the screen related to the game scene.\n * @static\n * @property {Vec2} left\n */\n\n/**\n * Right center coordinate of the screen related to the game scene.\n * @static\n * @property {Vec2} right\n */\n\n/**\n * Width of the screen.\n * @static\n * @property {Number} width\n */\n\n/**\n * Height of the screen.\n * @static\n * @property {Number} height\n */\n\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar js = require('./js');\nvar isPlainEmptyObj = require('./utils').isPlainEmptyObj_DEV;\n\nconst DELIMETER = '$_$';\n\nfunction createAttrsSingle (owner, superAttrs) {\n var attrs = superAttrs ? Object.create(superAttrs) : {};\n js.value(owner, '__attrs__', attrs);\n return attrs;\n}\n\n// subclass should not have __attrs__\nfunction createAttrs (subclass) {\n if (typeof subclass !== 'function') {\n // attributes only in instance\n let instance = subclass;\n return createAttrsSingle(instance, getClassAttrs(instance.constructor));\n }\n var superClass;\n var chains = cc.Class.getInheritanceChain(subclass);\n for (var i = chains.length - 1; i >= 0; i--) {\n var cls = chains[i];\n var attrs = cls.hasOwnProperty('__attrs__') && cls.__attrs__;\n if (!attrs) {\n superClass = chains[i + 1];\n createAttrsSingle(cls, superClass && superClass.__attrs__);\n }\n }\n superClass = chains[0];\n createAttrsSingle(subclass, superClass && superClass.__attrs__);\n return subclass.__attrs__;\n}\n\n// /**\n// * @class Class\n// */\n\n// *\n// * Tag the class with any meta attributes, then return all current attributes assigned to it.\n// * This function holds only the attributes, not their implementations.\n// *\n// * @method attr\n// * @param {Function|Object} ctor - the class or instance. If instance, the attribute will be dynamic and only available for the specified instance.\n// * @param {String} propName - the name of property or function, used to retrieve the attributes\n// * @param {Object} [newAttrs] - the attribute table to mark, new attributes will merged with existed attributes. Attribute whose key starts with '_' will be ignored.\n// * @static\n// * @private\nfunction attr (ctor, propName, newAttrs) {\n var attrs = getClassAttrs(ctor);\n if (!CC_DEV || typeof newAttrs === 'undefined') {\n // get\n var prefix = propName + DELIMETER;\n var ret = {};\n for (let key in attrs) {\n if (key.startsWith(prefix)) {\n ret[key.slice(prefix.length)] = attrs[key];\n }\n }\n return ret;\n }\n else if (CC_DEV && typeof newAttrs === 'object') {\n // set\n cc.warn(`\\`cc.Class.attr(obj, prop, { key: value });\\` is deprecated, use \\`cc.Class.Attr.setClassAttr(obj, prop, 'key', value);\\` instead please.`);\n for (let key in newAttrs) {\n attrs[propName + DELIMETER + key] = newAttrs[key];\n }\n }\n}\n\n// returns a readonly meta object\nfunction getClassAttrs (ctor) {\n return (ctor.hasOwnProperty('__attrs__') && ctor.__attrs__) || createAttrs(ctor);\n}\n\nfunction setClassAttr (ctor, propName, key, value) {\n getClassAttrs(ctor)[propName + DELIMETER + key] = value;\n}\n\n/**\n * @module cc\n */\n\nfunction PrimitiveType (name, def) {\n this.name = name;\n this.default = def;\n}\nPrimitiveType.prototype.toString = function () {\n return this.name;\n};\n\n/**\n * Specify that the input value must be integer in Inspector.\n * Also used to indicates that the elements in array should be type integer.\n * @property {string} Integer\n * @readonly\n * @example\n * // in cc.Class\n * member: {\n * default: [],\n * type: cc.Integer\n * }\n * // ES6 ccclass\n * @cc._decorator.property({\n * type: cc.Integer\n * })\n * member = [];\n */\ncc.Integer = new PrimitiveType('Integer', 0);\n\n/**\n * Indicates that the elements in array should be type double.\n * @property {string} Float\n * @readonly\n * @example\n * // in cc.Class\n * member: {\n * default: [],\n * type: cc.Float\n * }\n * // ES6 ccclass\n * @cc._decorator.property({\n * type: cc.Float\n * })\n * member = [];\n */\ncc.Float = new PrimitiveType('Float', 0);\n\nif (CC_EDITOR) {\n js.get(cc, 'Number', function () {\n cc.warnID(3603);\n return cc.Float;\n });\n}\n\n/**\n * Indicates that the elements in array should be type boolean.\n * @property {string} Boolean\n * @readonly\n * @example\n * // in cc.Class\n * member: {\n * default: [],\n * type: cc.Boolean\n * }\n * // ES6 ccclass\n * @cc._decorator.property({\n * type: cc.Boolean\n * })\n * member = [];\n */\ncc.Boolean = new PrimitiveType('Boolean', false);\n\n/**\n * Indicates that the elements in array should be type string.\n * @property {string} String\n * @readonly\n * @example\n * // in cc.Class\n * member: {\n * default: [],\n * type: cc.String\n * }\n * // ES6 ccclass\n * @cc._decorator.property({\n * type: cc.String\n * })\n * member = [];\n */\ncc.String = new PrimitiveType('String', '');\n\n// Ensures the type matches its default value\nfunction getTypeChecker (type, attrName) {\n return function (constructor, mainPropName) {\n var propInfo = '\"' + js.getClassName(constructor) + '.' + mainPropName + '\"';\n var mainPropAttrs = attr(constructor, mainPropName);\n\n var mainPropAttrsType = mainPropAttrs.type;\n if (mainPropAttrsType === cc.Integer || mainPropAttrsType === cc.Float) {\n mainPropAttrsType = 'Number';\n }\n else if (mainPropAttrsType === cc.String || mainPropAttrsType === cc.Boolean) {\n mainPropAttrsType = '' + mainPropAttrsType;\n }\n if (mainPropAttrsType !== type) {\n cc.warnID(3604, propInfo);\n return;\n }\n\n if (!mainPropAttrs.hasOwnProperty('default')) {\n return;\n }\n var defaultVal = mainPropAttrs.default;\n if (typeof defaultVal === 'undefined') {\n return;\n }\n var isContainer = Array.isArray(defaultVal) || isPlainEmptyObj(defaultVal);\n if (isContainer) {\n return;\n }\n var defaultType = typeof defaultVal;\n var type_lowerCase = type.toLowerCase();\n if (defaultType === type_lowerCase) {\n if (type_lowerCase === 'object') {\n if (defaultVal && !(defaultVal instanceof mainPropAttrs.ctor)) {\n cc.warnID(3605, propInfo, js.getClassName(mainPropAttrs.ctor));\n }\n else {\n return;\n }\n }\n else if (type !== 'Number') {\n cc.warnID(3606, attrName, propInfo, type);\n }\n }\n else if (defaultType !== 'function') {\n if (type === cc.String && defaultVal == null) {\n cc.warnID(3607, propInfo);\n }\n else {\n cc.warnID(3611, attrName, propInfo, defaultType);\n }\n }\n else {\n return;\n }\n delete mainPropAttrs.type;\n };\n}\n\n// Ensures the type matches its default value\nfunction getObjTypeChecker (typeCtor) {\n return function (classCtor, mainPropName) {\n getTypeChecker('Object', 'type')(classCtor, mainPropName);\n // check ValueType\n var defaultDef = getClassAttrs(classCtor)[mainPropName + DELIMETER + 'default'];\n var defaultVal = require('./CCClass').getDefault(defaultDef);\n if (!Array.isArray(defaultVal) && js.isChildClassOf(typeCtor, cc.ValueType)) {\n var typename = js.getClassName(typeCtor);\n var info = cc.js.formatStr('No need to specify the \"type\" of \"%s.%s\" because %s is a child class of ValueType.',\n js.getClassName(classCtor), mainPropName, typename);\n if (defaultDef) {\n cc.log(info);\n }\n else {\n cc.warnID(3612, info, typename, js.getClassName(classCtor), mainPropName, typename);\n }\n }\n };\n}\n\nmodule.exports = {\n PrimitiveType,\n attr: attr,\n getClassAttrs: getClassAttrs,\n setClassAttr: setClassAttr,\n DELIMETER: DELIMETER,\n getTypeChecker_ET: ((CC_EDITOR && !Editor.isBuilder) || CC_TEST) && getTypeChecker,\n getObjTypeChecker_ET: ((CC_EDITOR && !Editor.isBuilder) || CC_TEST) && getObjTypeChecker,\n ScriptUuid: {}, // the value will be represented as a uuid string\n};\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst js = require('./js');\nconst fastRemoveAt = js.array.fastRemoveAt;\n\nfunction empty () {}\n\nfunction CallbackInfo () {\n this.callback = empty;\n this.target = undefined;\n this.once = false;\n}\n\nCallbackInfo.prototype.set = function (callback, target, once) {\n this.callback = callback;\n this.target = target;\n this.once = !!once;\n};\n\nlet callbackInfoPool = new js.Pool(function (info) {\n info.callback = empty;\n info.target = undefined;\n info.once = false;\n return true;\n}, 32);\n\ncallbackInfoPool.get = function () {\n return this._get() || new CallbackInfo();\n};\n\nfunction CallbackList () {\n this.callbackInfos = [];\n this.isInvoking = false;\n this.containCanceled = false;\n}\n\nlet proto = CallbackList.prototype;\n\n/**\n * !#zh\n * 从列表中移除与指定目标相同回调函数的事件。\n * @param cb\n */\nproto.removeByCallback = function (cb) {\n for (let i = 0; i < this.callbackInfos.length; ++i) {\n let info = this.callbackInfos[i];\n if (info && info.callback === cb) {\n callbackInfoPool.put(info);\n fastRemoveAt(this.callbackInfos, i);\n --i;\n }\n }\n};\n\n/**\n * !#zh\n * 从列表中移除与指定目标相同调用者的事件。\n * @param target\n */\nproto.removeByTarget = function (target) {\n for (let i = 0; i < this.callbackInfos.length; ++i) {\n const info = this.callbackInfos[i];\n if (info && info.target === target) {\n callbackInfoPool.put(info);\n fastRemoveAt(this.callbackInfos, i);\n --i;\n }\n }\n};\n\n/**\n * !#zh\n * 移除指定编号事件。\n *\n * @param index\n */\nproto.cancel = function (index) {\n const info = this.callbackInfos[index];\n if (info) {\n callbackInfoPool.put(info);\n this.callbackInfos[index] = null;\n }\n this.containCanceled = true;\n};\n\n/**\n * !#zh\n * 注销所有事件。\n */\nproto.cancelAll = function () {\n for (let i = 0; i < this.callbackInfos.length; i++) {\n const info = this.callbackInfos[i];\n if (info) {\n callbackInfoPool.put(info);\n this.callbackInfos[i] = null;\n }\n }\n this.containCanceled = true;\n};\n\n// filter all removed callbacks and compact array\nproto.purgeCanceled = function () {\n for (let i = this.callbackInfos.length - 1; i >= 0; --i) {\n const info = this.callbackInfos[i];\n if (!info) {\n fastRemoveAt(this.callbackInfos, i);\n }\n }\n this.containCanceled = false;\n};\n\nproto.clear = function () {\n this.cancelAll();\n this.callbackInfos.length = 0;\n this.isInvoking = false;\n this.containCanceled = false;\n};\n\nconst MAX_SIZE = 16;\nlet callbackListPool = new js.Pool(function (info) {\n info.callbackInfos = [];\n info.isInvoking = false;\n info.containCanceled = false;\n return true;\n}, MAX_SIZE);\n\ncallbackListPool.get = function () {\n return this._get() || new CallbackList();\n};\n\n/**\n * !#en The callbacks invoker to handle and invoke callbacks by key.\n * !#zh CallbacksInvoker 用来根据 Key 管理并调用回调方法。\n * @class CallbacksInvoker\n */\nfunction CallbacksInvoker () {\n this._callbackTable = js.createMap(true);\n}\n\nproto = CallbacksInvoker.prototype;\n\n/**\n * !#zh\n * 事件添加管理\n *\n * @param key\n * @param callback\n * @param target\n * @param once\n */\nproto.on = function (key, callback, target, once) {\n let list = this._callbackTable[key];\n if (!list) {\n list = this._callbackTable[key] = callbackListPool.get();\n }\n let info = callbackInfoPool.get();\n info.set(callback, target, once);\n list.callbackInfos.push(info);\n};\n\n/**\n *\n * !#zh\n * 检查指定事件是否已注册回调。\n *\n * !#en\n * Check if the specified key has any registered callback. If a callback is also specified,\n * it will only return true if the callback is registered.\n *\n * @method hasEventListener\n * @param {String} key\n * @param {Function} [callback]\n * @param {Object} [target]\n * @return {Boolean}\n */\nproto.hasEventListener = function (key, callback, target) {\n const list = this._callbackTable[key];\n if (!list) {\n return false;\n }\n\n // check any valid callback\n const infos = list.callbackInfos;\n if (!callback) {\n // Make sure no cancelled callbacks\n if (list.isInvoking) {\n for (let i = 0; i < infos.length; ++i) {\n if (infos[i]) {\n return true;\n }\n }\n return false;\n }\n else {\n return infos.length > 0;\n }\n }\n\n for (let i = 0; i < infos.length; ++i) {\n const info = infos[i];\n if (info && info.callback === callback && info.target === target) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * !#zh\n * 移除在特定事件类型中注册的所有回调或在某个目标中注册的所有回调。\n *\n * !#en\n * Removes all callbacks registered in a certain event type or all callbacks registered with a certain target\n * @method removeAll\n * @param {String|Object} keyOrTarget - The event key to be removed or the target to be removed\n */\nproto.removeAll = function (keyOrTarget) {\n if (typeof keyOrTarget === 'string') {\n // remove by key\n const list = this._callbackTable[keyOrTarget];\n if (list) {\n if (list.isInvoking) {\n list.cancelAll();\n }\n else {\n list.clear();\n callbackListPool.put(list);\n delete this._callbackTable[keyOrTarget];\n }\n }\n }\n else if (keyOrTarget) {\n // remove by target\n for (const key in this._callbackTable) {\n const list = this._callbackTable[key];\n if (list.isInvoking) {\n const infos = list.callbackInfos;\n for (let i = 0; i < infos.length; ++i) {\n const info = infos[i];\n if (info && info.target === keyOrTarget) {\n list.cancel(i);\n }\n }\n }\n else {\n list.removeByTarget(keyOrTarget);\n }\n }\n }\n};\n\n/**\n * !#zh\n * 删除之前与同类型,回调,目标注册的回调。\n *\n * @method off\n * @param {String} key\n * @param {Function} callback\n * @param {Object} [target]\n */\nproto.off = function (key, callback, target) {\n const list = this._callbackTable[key];\n if (list) {\n const infos = list.callbackInfos;\n for (let i = 0; i < infos.length; ++i) {\n const info = infos[i];\n if (info && info.callback === callback && info.target === target) {\n if (list.isInvoking) {\n list.cancel(i);\n }\n else {\n fastRemoveAt(infos, i);\n callbackInfoPool.put(info);\n }\n break;\n }\n }\n }\n};\n\n\n/**\n * !#en\n * Trigger an event directly with the event name and necessary arguments.\n * !#zh\n * 通过事件名发送自定义事件\n *\n * @method emit\n * @param {String} key - event type\n * @param {*} [arg1] - First argument\n * @param {*} [arg2] - Second argument\n * @param {*} [arg3] - Third argument\n * @param {*} [arg4] - Fourth argument\n * @param {*} [arg5] - Fifth argument\n * @example\n *\n * eventTarget.emit('fire', event);\n * eventTarget.emit('fire', message, emitter);\n */\nproto.emit = function (key, arg1, arg2, arg3, arg4, arg5) {\n const list = this._callbackTable[key];\n if (list) {\n const rootInvoker = !list.isInvoking;\n list.isInvoking = true;\n\n const infos = list.callbackInfos;\n for (let i = 0, len = infos.length; i < len; ++i) {\n const info = infos[i];\n if (info) {\n let target = info.target;\n let callback = info.callback;\n if (info.once) {\n this.off(key, callback, target);\n }\n\n if (target) {\n callback.call(target, arg1, arg2, arg3, arg4, arg5);\n }\n else {\n callback(arg1, arg2, arg3, arg4, arg5);\n }\n }\n }\n\n if (rootInvoker) {\n list.isInvoking = false;\n if (list.containCanceled) {\n list.purgeCanceled();\n }\n }\n }\n};\n\nif (CC_TEST) {\n cc._Test.CallbacksInvoker = CallbacksInvoker;\n}\n\nmodule.exports = CallbacksInvoker;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nfunction deepFlatten (strList, array) {\n for (var i = 0; i < array.length; i++) {\n var item = array[i];\n if (Array.isArray(item)) {\n deepFlatten(strList, item);\n }\n // else if (item instanceof Declaration) {\n // strList.push(item.toString());\n // }\n else {\n strList.push(item);\n }\n }\n}\n\nfunction flattenCodeArray (array) {\n var separator = CC_DEV ? '\\n' : '';\n var strList = [];\n deepFlatten(strList, array);\n return strList.join(separator);\n}\n\nmodule.exports = {\n flattenCodeArray\n};\n","/****************************************************************************\n Copyright (c) present Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport js from './js';\nimport ValueType from '../value-types/value-type';\nimport Vec2 from '../value-types/vec2';\nimport Vec3 from '../value-types/vec3';\nimport Vec4 from '../value-types/vec4';\nimport Color from '../value-types/color';\nimport Size from '../value-types/size';\nimport Rect from '../value-types/rect';\nimport Quat from '../value-types/quat';\nimport Mat4 from '../value-types/mat4';\n// import Attr from './attribute';\n\n/****************************************************************************\n * BUILT-IN TYPES / CONSTAINTS\n ****************************************************************************/\n\nconst SUPPORT_MIN_FORMAT_VERSION = 1;\nconst EMPTY_PLACEHOLDER = 0;\n\n// Used for Data.ValueType.\n// If a value type is not registered in this list, it will be serialized to Data.Class.\nconst BuiltinValueTypes: Array<typeof ValueType> = [\n Vec2, // 0\n Vec3, // 1\n Vec4, // 2\n Quat, // 3\n Color, // 4\n Size, // 5\n Rect, // 6\n Mat4, // 7\n];\n\n// Used for Data.ValueTypeCreated.\nfunction BuiltinValueTypeParsers_xyzw (obj: Vec4, data: Array<number>) {\n obj.x = data[1];\n obj.y = data[2];\n obj.z = data[3];\n obj.w = data[4];\n}\nconst BuiltinValueTypeSetters: Array<((obj: ValueType, data: Array<number>) => void)> = [\n function (obj: Vec2, data: Array<number>) {\n obj.x = data[1];\n obj.y = data[2];\n },\n function (obj: Vec3, data: Array<number>) {\n obj.x = data[1];\n obj.y = data[2];\n obj.z = data[3];\n },\n BuiltinValueTypeParsers_xyzw, // Vec4\n BuiltinValueTypeParsers_xyzw, // Quat\n function (obj: Color, data: Array<number>) {\n obj._val = data[1];\n },\n function (obj: Size, data: Array<number>) {\n obj.width = data[1];\n obj.height = data[2];\n },\n function (obj: Rect, data: Array<number>) {\n obj.x = data[1];\n obj.y = data[2];\n obj.width = data[3];\n obj.height = data[4];\n },\n function (obj: Mat4, data: Array<number>) {\n Mat4.fromArray(obj, data, 1);\n }\n];\n\nfunction serializeBuiltinValueTypes(obj: ValueType): IValueTypeData | null {\n let ctor = obj.constructor as typeof ValueType;\n let typeId = BuiltinValueTypes.indexOf(ctor);\n switch (ctor) {\n case Vec2:\n // @ts-ignore\n return [typeId, obj.x, obj.y];\n case Vec3:\n // @ts-ignore\n return [typeId, obj.x, obj.y, obj.z];\n case Vec4:\n case Quat:\n // @ts-ignore\n return [typeId, obj.x, obj.y, obj.z, obj.w];\n case Color:\n // @ts-ignore\n return [typeId, obj._val];\n case Size:\n // @ts-ignore\n return [typeId, obj.width, obj.height];\n case Rect:\n // @ts-ignore\n return [typeId, obj.x, obj.y, obj.width, obj.height];\n case Mat4:\n // @ts-ignore\n let res: IValueTypeData = new Array(1 + 16);\n res[0] = typeId;\n Mat4.toArray(res, obj as Mat4, 1);\n return res;\n default:\n return null;\n }\n}\n\n// // TODO: Used for Data.TypedArray.\n// const TypedArrays = [\n// Float32Array,\n// Float64Array,\n//\n// Int8Array,\n// Int16Array,\n// Int32Array,\n//\n// Uint8Array,\n// Uint16Array,\n// Uint32Array,\n//\n// Uint8ClampedArray,\n// // BigInt64Array,\n// // BigUint64Array,\n// ];\n\n\n/****************************************************************************\n * TYPE DECLARATIONS\n ****************************************************************************/\n\n// Includes Bitwise NOT value.\n// Both T and U have non-negative integer ranges.\n// When the value >= 0 represents T\n// When the value is < 0, it represents ~U. Use ~x to extract the value of U.\nexport type Bnot<T extends number, U extends number> = T|U;\n\n// Combines a boolean and a number into one value.\n// The number must >= 0.\n// When the value >= 0, the boolean is true, the number is value.\n// When the value < 0, the boolean is false, the number is ~value.\nexport type BoolAndNum<B extends boolean, N extends number> = Bnot<N, N>;\n\nexport type SharedString = string;\nexport type Empty = typeof EMPTY_PLACEHOLDER;\nexport type StringIndex = number;\nexport type InstanceIndex = number;\nexport type RootInstanceIndex = InstanceIndex;\nexport type NoNativeDep = boolean; // Indicates whether the asset depends on a native asset\nexport type RootInfo = BoolAndNum<NoNativeDep, RootInstanceIndex>;\n\n// When the value >= 0 represents the string index\n// When the value is < 0, it just represents non-negative integer. Use ~x to extract the value.\nexport type StringIndexBnotNumber = Bnot<StringIndex, number>;\n\n// A reverse index used to assign current parsing object to target command buffer so it could be assembled later.\n// Should >= REF.OBJ_OFFSET\nexport type ReverseIndex = number;\n\n// Used to index the current object\nexport type InstanceBnotReverseIndex = Bnot<InstanceIndex, ReverseIndex>;\n\n/*@__DROP_PURE_EXPORT__*/\nconst enum DataTypeID {\n\n // Fields that can be assigned directly, can be values in any JSON, or even a complex JSON array, object (no type).\n // Contains null, no undefined, JSON does not support serialization of undefined.\n // This is the only type that supports null, and all other advanced fields are forbidden with null values.\n // If the value of an object is likely to be null, it needs to exist as a new class,\n // but the probability of this is very low and will be analyzed below.\n SimpleType = 0,\n\n //--------------------------------------------------------------------------\n // Except Simple, the rest belong to Advanced Type.\n\n // Rarely will it be NULL, as NULL will be dropped as the default value.\n InstanceRef,\n\n // Arrays of exactly equal types.\n // Arrays will have default values that developers will rarely assign to null manually.\n Array_InstanceRef,\n Array_AssetRefByInnerObj,\n\n // Embedded object\n // Rarely will it be NULL, as NULL will be dropped as the default value.\n Class,\n\n // Existing ValueType (created by the Class constructor).\n // Developers will rarely manually assign a null.\n ValueTypeCreated,\n\n // Resource reference for embedded objects (such as arrays), the value is the index of DEPEND_OBJS.\n // (The objects in INSTANCES do not need to dynamically resolve resource reference relationships, so there is no need to have the AssetRef type.)\n AssetRefByInnerObj,\n\n // Common TypedArray for cc.Node only. Never be null.\n TRS,\n\n // // From the point of view of simplified implementation,\n // // it is not supported to deserialize TypedArray that is initialized to null in the constructor.\n // // Also, the length of TypedArray cannot be changed.\n // // Developers will rarely manually assign a null.\n // TypedArray,\n\n // ValueType without default value (in arrays, dictionaries).\n // Developers will rarely manually assign a null.\n ValueType,\n\n Array_Class,\n\n // CustomizedClass embedded in Class\n CustomizedClass,\n\n // Universal dictionary with unlimited types of values (except TypedArray)\n Dict,\n\n // Universal arrays, of any type (except TypedArray) and can be unequal.\n // (The editor doesn't seem to have a good way of stopping arrays of unequal types either)\n Array,\n\n ARRAY_LENGTH,\n}\n\nexport type DataTypes = {\n [DataTypeID.SimpleType]: number | string | boolean | null | object;\n [DataTypeID.InstanceRef]: InstanceBnotReverseIndex;\n [DataTypeID.Array_InstanceRef]: Array<DataTypes[DataTypeID.InstanceRef]>;\n [DataTypeID.Array_AssetRefByInnerObj]: Array<DataTypes[DataTypeID.AssetRefByInnerObj]>;\n [DataTypeID.Class]: IClassObjectData;\n [DataTypeID.ValueTypeCreated]: IValueTypeData;\n [DataTypeID.AssetRefByInnerObj]: number;\n [DataTypeID.TRS]: ITRSData;\n // [DataTypeID.TypedArray]: Array<InstanceOrReverseIndex>;\n [DataTypeID.ValueType]: IValueTypeData;\n [DataTypeID.Array_Class]: Array<DataTypes[DataTypeID.Class]>;\n [DataTypeID.CustomizedClass]: ICustomObjectData;\n [DataTypeID.Dict]: IDictData;\n [DataTypeID.Array]: IArrayData;\n};\n\nexport type PrimitiveObjectTypeID = (\n DataTypeID.SimpleType | // SimpleType also includes any pure JSON object\n DataTypeID.Array |\n DataTypeID.Array_Class |\n DataTypeID.Array_AssetRefByInnerObj |\n DataTypeID.Array_InstanceRef |\n DataTypeID.Dict\n);\n\nexport type AdvancedTypeID = Exclude<DataTypeID, DataTypeID.SimpleType>\n\n\n// Collection of all data types\nexport type AnyData = DataTypes[keyof DataTypes];\n\nexport type AdvancedData = DataTypes[Exclude<keyof DataTypes, DataTypeID.SimpleType>];\n\nexport type OtherObjectData = ICustomObjectDataContent | Exclude<DataTypes[PrimitiveObjectTypeID], (number|string|boolean|null)>;\n\n// class Index of DataTypeID.CustomizedClass or PrimitiveObjectTypeID\nexport type OtherObjectTypeID = Bnot<number, PrimitiveObjectTypeID>;\n\nexport interface Ctor<T> extends Function {\n new(): T;\n}\n// Includes normal CCClass and fast defined class\nexport interface CCClass<T> extends Ctor<T> {\n __values__: string[]\n}\nexport type AnyCtor = Ctor<Object>;\nexport type AnyCCClass = CCClass<Object>;\n\n/**\n * If the value type is different, different Classes will be generated\n */\nconst CLASS_TYPE = 0;\nconst CLASS_KEYS = 1;\nconst CLASS_PROP_TYPE_OFFSET = 2;\nexport type IClass = [\n string|AnyCtor,\n string[],\n // offset - It is used to specify the correspondence between the elements in 1 and their AdvancedType,\n // which is only valid for AdvancedType.\n // When parsing, the type of IClass[1][x] is IClass[x + IClass[2]]\n // When serializing, IClass[2] = 2 + 1 - (The number of SimpleType)\n number,\n // The AdvancedType type corresponding to the property.\n ...DataTypeID[]\n];\n\n/**\n * Mask is used to define the properties and types that need to be deserialized.\n * Instances of the same class may have different Masks due to different default properties removed.\n */\nconst MASK_CLASS = 0;\nexport type IMask = [\n // The index of its Class\n number,\n // The indices of the property that needs to be deserialized in IClass, except that the last number represents OFFSET.\n // All properties before OFFSET are SimpleType, and those starting at OFFSET are AdvancedType.\n // default is 1\n ...number[]\n];\n\nconst OBJ_DATA_MASK = 0;\nexport type IClassObjectData = [\n // The index of its Mask\n number,\n // Starting from 1, the values corresponding to the properties in the Mask\n ...AnyData[]\n];\n\nexport type ICustomObjectDataContent = any;\n\nconst CUSTOM_OBJ_DATA_CLASS = 0;\nconst CUSTOM_OBJ_DATA_CONTENT = 1;\nexport interface ICustomObjectData extends Array<any> {\n // The index of its Class\n [0]: number;\n // Content\n [1]: ICustomObjectDataContent;\n}\n\nconst VALUETYPE_SETTER = 0;\nexport type IValueTypeData = [\n // Predefined parsing function index\n number,\n // Starting with 1, the corresponding value in the attributes are followed in order\n ...number[]\n];\n\nexport type ITRSData = [number, number, number, number, number,\n number, number, number, number, number];\n\nconst DICT_JSON_LAYOUT = 0;\nexport interface IDictData extends Array<any> {\n // The raw json object\n [0]: any,\n // key\n // Shared strings are not considered here, can be defined as CCClass if it is required.\n [1]: string;\n // value type\n // Should not be SimpleType, SimpleType is built directly into 0.\n [2]: AdvancedTypeID;\n // value\n [3]: AdvancedData;\n // More repeated key values\n [index: number]: any,\n}\n\nconst ARRAY_ITEM_VALUES = 0;\nexport type IArrayData = [\n AnyData[],\n // types\n ...DataTypeID[]\n];\n\n// const TYPEDARRAY_TYPE = 0;\n// const TYPEDARRAY_ELEMENTS = 1;\n// export interface ITypedArrayData extends Array<number|number[]> {\n// [TYPEDARRAY_TYPE]: number,\n// [TYPEDARRAY_ELEMENTS]: number[],\n// }\n\n/*@__DROP_PURE_EXPORT__*/\nconst enum Refs {\n EACH_RECORD_LENGTH = 3,\n OWNER_OFFSET = 0,\n KEY_OFFSET = 1,\n TARGET_OFFSET = 2,\n}\n\nexport interface IRefs extends Array<number> {\n // owner\n // The owner of all the objects in the front is of type object, starting from OFFSET * 3 are of type InstanceIndex\n [0]: (object | InstanceIndex),\n // property name\n [1]?: StringIndexBnotNumber;\n // target object\n [2]?: InstanceIndex;\n // All the following objects are arranged in the order of the first three values,\n // except that the last number represents OFFSET.\n [index: number]: any;\n}\n\n/*@__DROP_PURE_EXPORT__*/\nconst enum File {\n Version = 0,\n Context = 0,\n\n SharedUuids,\n SharedStrings,\n SharedClasses,\n SharedMasks,\n\n Instances,\n InstanceTypes,\n\n Refs,\n\n DependObjs,\n DependKeys,\n DependUuidIndices,\n\n ARRAY_LENGTH,\n}\n\n// Main file structure\nexport interface IFileData extends Array<any> {\n // version\n [File.Version]: number | FileInfo | any;\n\n // Shared data area, the higher the number of references, the higher the position\n\n [File.SharedUuids]: SharedString[] | Empty; // Shared uuid strings for dependent assets\n [File.SharedStrings]: SharedString[] | Empty;\n [File.SharedClasses]: (IClass|string|AnyCCClass)[];\n [File.SharedMasks]: IMask[] | Empty; // Shared Object layouts for IClassObjectData\n\n // Data area\n\n // A one-dimensional array to represent object datas, layout is [...IClassObjectData[], ...OtherObjectData[], RootInfo]\n // If the last element is not RootInfo(number), the first element will be the root object to return and it doesn't have native asset\n [File.Instances]: (IClassObjectData|OtherObjectData|RootInfo)[];\n [File.InstanceTypes]: OtherObjectTypeID[] | Empty;\n // Object references infomation\n [File.Refs]: IRefs | Empty;\n\n // Result area\n\n // Asset-dependent objects that are deserialized and parsed into object arrays\n [File.DependObjs]: (object|InstanceIndex)[];\n // Asset-dependent key name or array index\n [File.DependKeys]: (StringIndexBnotNumber|string)[];\n // UUID of dependent assets\n [File.DependUuidIndices]: (StringIndex|string)[];\n}\n\n// type Body = Pick<IFileData, File.Instances | File.InstanceTypes | File.Refs | File.DependObjs | File.DependKeys | File.DependUuidIndices>\ntype Shared = Pick<IFileData, File.Version | File.SharedUuids | File.SharedStrings | File.SharedClasses | File.SharedMasks>\nconst PACKED_SECTIONS = File.Instances;\nexport interface IPackedFileData extends Shared {\n [PACKED_SECTIONS]: IFileData[];\n}\n\ninterface ICustomHandler {\n result: Details,\n customEnv: any,\n}\ntype ClassFinder = {\n (type: string): AnyCtor;\n // // for editor\n // onDereferenced: (curOwner: object, curPropName: string, newOwner: object, newPropName: string) => void;\n};\ninterface IOptions extends Partial<ICustomHandler> {\n classFinder?: ClassFinder;\n _version?: number;\n}\ninterface ICustomClass {\n _deserialize: (content: any, context: ICustomHandler) => void;\n}\n\n/****************************************************************************\n * IMPLEMENTS\n ****************************************************************************/\n\n/**\n * !#en Contains meta information collected during deserialization\n * !#zh 包含反序列化后附带的元信息\n * @class Details\n */\nclass Details {\n /**\n * the obj list whose field needs to load asset by uuid\n * @property {Object[]} uuidObjList\n */\n uuidObjList: IFileData[File.DependObjs] | null = null;\n /**\n * the corresponding field name which referenced to the asset\n * @property {(String|Number)[]} uuidPropList\n */\n uuidPropList: IFileData[File.DependKeys] | null = null;\n /**\n * list of the depends assets' uuid\n * @property {String[]} uuidList\n */\n uuidList: IFileData[File.DependUuidIndices] | null = null;\n\n static pool = new js.Pool(function (obj) {\n obj.reset();\n }, 5);\n\n /**\n * @method init\n * @param {Object} data\n */\n init (data: IFileData) {\n this.uuidObjList = data[File.DependObjs];\n this.uuidPropList = data[File.DependKeys];\n this.uuidList = data[File.DependUuidIndices];\n }\n\n /**\n * @method reset\n */\n reset () {\n this.uuidList = null;\n this.uuidObjList = null;\n this.uuidPropList = null;\n };\n\n /**\n * @method push\n * @param {Object} obj\n * @param {String} propName\n * @param {String} uuid\n */\n push (obj: object, propName: string, uuid: string) {\n (this.uuidObjList as object[]).push(obj);\n (this.uuidPropList as string[]).push(propName);\n (this.uuidList as string[]).push(uuid);\n };\n}\nDetails.pool.get = function () {\n return this._get() || new Details();\n};\nif (CC_EDITOR || CC_TEST) {\n // @ts-ignore\n Details.prototype.assignAssetsBy = function (getter: (uuid: string) => any) {\n for (var i = 0, len = (this.uuidList as string[]).length; i < len; i++) {\n var obj = (this.uuidObjList as object)[i];\n var prop = (this.uuidPropList as any[])[i];\n var uuid = (this.uuidList as string[])[i];\n obj[prop] = getter(uuid as string);\n }\n };\n}\n\nfunction dereference(refs: IRefs, instances: IFileData[File.Instances], strings: IFileData[File.SharedStrings]): void {\n let dataLength = refs.length - 1;\n let i = 0;\n // owner is object\n let instanceOffset: number = refs[dataLength] * Refs.EACH_RECORD_LENGTH;\n for (; i < instanceOffset; i += Refs.EACH_RECORD_LENGTH) {\n const owner = refs[i] as any;\n\n const target = instances[refs[i + Refs.TARGET_OFFSET]];\n const keyIndex = refs[i + Refs.KEY_OFFSET] as StringIndexBnotNumber;\n if (keyIndex >= 0) {\n owner[strings[keyIndex]] = target;\n }\n else {\n owner[~keyIndex] = target;\n }\n }\n // owner is instance index\n for (; i < dataLength; i += Refs.EACH_RECORD_LENGTH) {\n const owner = instances[refs[i]] as any;\n\n const target = instances[refs[i + Refs.TARGET_OFFSET]];\n const keyIndex = refs[i + Refs.KEY_OFFSET] as StringIndexBnotNumber;\n if (keyIndex >= 0) {\n owner[strings[keyIndex]] = target;\n }\n else {\n owner[~keyIndex] = target;\n }\n }\n}\n\n//\n\nfunction deserializeCCObject (data: IFileData, objectData: IClassObjectData) {\n let mask = data[File.SharedMasks][objectData[0]];\n let clazz = mask[0];\n let ctor = clazz[0] as Exclude<AnyCtor, ICustomClass>;\n // if (!ctor) {\n // return null;\n // }\n\n let obj = new ctor();\n\n let keys = clazz[1];\n let classTypeOffset = clazz[2];\n let maskTypeOffset = mask[mask.length - 1];\n\n // parse simple type\n let i = 0 + 1;\n for (; i < maskTypeOffset; ++i) {\n let key = keys[mask[i]];\n obj[key] = objectData[i];\n }\n\n // parse advanced type\n for (; i < objectData.length; ++i) {\n let key = keys[mask[i]];\n let type = clazz[mask[i] + classTypeOffset];\n let op = ASSIGNMENTS[type];\n op(data, obj, key, objectData[i]);\n }\n\n return obj;\n}\n\nfunction deserializeCustomCCObject (data: IFileData, ctor: Ctor<ICustomClass>, value: ICustomObjectDataContent) {\n let obj = new ctor();\n if (obj._deserialize) {\n obj._deserialize(value, data[File.Context]);\n }\n else {\n cc.errorID(5303, js.getClassName(ctor));\n }\n return obj;\n}\n\n// Parse Functions\n\ntype ParseFunction = (data: IFileData, owner: any, key: string, value: AnyData) => void;\n\nfunction assignSimple (data: IFileData, owner: any, key: string, value: DataTypes[DataTypeID.SimpleType]) {\n owner[key] = value;\n}\n\nfunction assignInstanceRef (data: IFileData, owner: any, key: string, value: InstanceBnotReverseIndex) {\n if (value >= 0) {\n owner[key] = data[File.Instances][value];\n }\n else {\n (data[File.Refs] as IRefs)[(~value) * Refs.EACH_RECORD_LENGTH] = owner;\n }\n}\n\nfunction genArrayParser (parser: ParseFunction): ParseFunction {\n return function (data: IFileData, owner: any, key: string, value: Array<any>) {\n owner[key] = value;\n for (let i = 0; i < value.length; ++i) {\n // @ts-ignore\n parser(data, value, i, value[i]);\n }\n };\n}\n\nfunction parseAssetRefByInnerObj (data: IFileData, owner: any, key: string, value: number) {\n owner[key] = null;\n data[File.DependObjs][value] = owner;\n}\n\nfunction parseClass (data: IFileData, owner: any, key: string, value: IClassObjectData) {\n owner[key] = deserializeCCObject(data, value);\n}\n\nfunction parseCustomClass (data: IFileData, owner: any, key: string, value: ICustomObjectData) {\n let ctor = data[File.SharedClasses][value[0]] as CCClass<ICustomClass>;\n owner[key] = deserializeCustomCCObject(data, ctor, value[1]);\n}\n\nfunction parseValueTypeCreated (data: IFileData, owner: any, key: string, value: IValueTypeData) {\n BuiltinValueTypeSetters[value[0]](owner[key], value);\n}\n\nfunction parseValueType (data: IFileData, owner: any, key: string, value: IValueTypeData) {\n let val: ValueType = new BuiltinValueTypes[value[0]]();\n BuiltinValueTypeSetters[value[0]](val, value);\n owner[key] = val;\n}\n\nfunction parseTRS (data: IFileData, owner: any, key: string, value: ITRSData) {\n let typedArray = owner[key] as (Float32Array | Float64Array);\n typedArray.set(value);\n}\n\nfunction parseDict (data: IFileData, owner: any, key: string, value: IDictData) {\n let dict = value[0];\n owner[key] = dict;\n for (let i = 0 + 1; i < value.length; i += 3) {\n let key = value[i] as string;\n let type = value[i + 1] as DataTypeID;\n let subValue = value[i + 2] as AnyData;\n let op = ASSIGNMENTS[type];\n op(data, dict, key, subValue);\n }\n}\n\nfunction parseArray (data: IFileData, owner: any, key: string, value: IArrayData) {\n let array = value[0];\n owner[key] = array;\n for (let i = 0; i < array.length; ++i) {\n let subValue = array[i] as AnyData;\n let type = value[i + 1] as DataTypeID;\n if (type !== DataTypeID.SimpleType) {\n let op = ASSIGNMENTS[type];\n // @ts-ignore\n op(data, array, i, subValue);\n }\n }\n}\n\n// function parseTypedArray (data: IFileData, owner: any, key: string, value: ITypedArrayData) {\n// let val: ValueType = new TypedArrays[value[TYPEDARRAY_TYPE]]();\n// BuiltinValueTypeSetters[value[0]](val, value);\n// // obj = new window[serialized.ctor](array.length);\n// // for (let i = 0; i < array.length; ++i) {\n// // obj[i] = array[i];\n// // }\n// // return obj;\n// owner[key] = val;\n// }\n\nconst ASSIGNMENTS = new Array<ParseFunction>(DataTypeID.ARRAY_LENGTH);\nASSIGNMENTS[DataTypeID.SimpleType] = assignSimple; // Only be used in the instances array\nASSIGNMENTS[DataTypeID.InstanceRef] = assignInstanceRef;\nASSIGNMENTS[DataTypeID.Array_InstanceRef] = genArrayParser(assignInstanceRef);\nASSIGNMENTS[DataTypeID.Array_AssetRefByInnerObj] = genArrayParser(parseAssetRefByInnerObj);\nASSIGNMENTS[DataTypeID.Class] = parseClass;\nASSIGNMENTS[DataTypeID.ValueTypeCreated] = parseValueTypeCreated;\nASSIGNMENTS[DataTypeID.AssetRefByInnerObj] = parseAssetRefByInnerObj;\nASSIGNMENTS[DataTypeID.TRS] = parseTRS;\nASSIGNMENTS[DataTypeID.ValueType] = parseValueType;\nASSIGNMENTS[DataTypeID.Array_Class] = genArrayParser(parseClass);\nASSIGNMENTS[DataTypeID.CustomizedClass] = parseCustomClass;\nASSIGNMENTS[DataTypeID.Dict] = parseDict;\nASSIGNMENTS[DataTypeID.Array] = parseArray;\n// ASSIGNMENTS[DataTypeID.TypedArray] = parseTypedArray;\n\n\n\nfunction parseInstances (data: IFileData): RootInstanceIndex {\n let instances = data[File.Instances];\n let instanceTypes = data[File.InstanceTypes];\n let instanceTypesLen = instanceTypes === 0 ? 0 : (instanceTypes as OtherObjectTypeID[]).length;\n let rootIndex = instances[instances.length - 1];\n let normalObjectCount = instances.length - instanceTypesLen;\n if (typeof rootIndex !== 'number') {\n rootIndex = 0;\n }\n else {\n if (rootIndex < 0) {\n rootIndex = ~rootIndex;\n }\n --normalObjectCount;\n }\n\n // DataTypeID.Class\n\n let insIndex = 0;\n for (; insIndex < normalObjectCount; ++insIndex) {\n instances[insIndex] = deserializeCCObject(data, instances[insIndex] as IClassObjectData);\n }\n\n let classes = data[File.SharedClasses];\n for (let typeIndex = 0; typeIndex < instanceTypesLen; ++typeIndex, ++insIndex) {\n let type = instanceTypes[typeIndex] as OtherObjectTypeID;\n let eachData = instances[insIndex];\n if (type >= 0) {\n\n // class index for DataTypeID.CustomizedClass\n\n let ctor = classes[type] as CCClass<ICustomClass>; // class\n instances[insIndex] = deserializeCustomCCObject(data, ctor, eachData as ICustomObjectDataContent);\n }\n else {\n\n // Other\n\n type = (~type) as PrimitiveObjectTypeID;\n let op = ASSIGNMENTS[type];\n // @ts-ignore\n op(data, instances, insIndex, eachData);\n }\n }\n\n return rootIndex;\n}\n\n// const DESERIALIZE_AS = Attr.DELIMETER + 'deserializeAs';\n// function deserializeAs(klass: AnyCCClass, klassLayout: IClass) {\n// var attrs = Attr.getClassAttrs(klass);\n// let keys = klassLayout[1];\n// for (let i = 0; i < keys.length; ++i) {\n// let newKey = attrs[keys[i] + DESERIALIZE_AS];\n// if (newKey) {\n// // @ts-ignore\n// if (keys.includes(newKey)) {\n// // %s cannot be deserialized by property %s because %s was also present in the serialized data.\n// cc.warnID(, newKey, keys[i], newKey);\n// }\n// else {\n// keys[i] = newKey;\n// }\n// }\n// }\n// }\n\nfunction getMissingClass (hasCustomFinder, type) {\n if (!hasCustomFinder) {\n // @ts-ignore\n deserialize.reportMissingClass(type);\n }\n return Object;\n}\nfunction doLookupClass(classFinder, type: string, container: any[], index: number, silent: boolean, hasCustomFinder) {\n let klass = classFinder(type);\n if (!klass) {\n // if (klass.__FSA__) {\n // deserializeAs(klass, klassLayout as IClass);\n // }\n if (silent) {\n // generate a lazy proxy for ctor\n container[index] = (function (container, index, type) {\n return function proxy () {\n let klass = classFinder(type) || getMissingClass(hasCustomFinder, type);\n container[index] = klass;\n return new klass();\n };\n })(container, index, type);\n return;\n }\n else {\n klass = getMissingClass(hasCustomFinder, type);\n }\n }\n container[index] = klass;\n}\n\nfunction lookupClasses (data: IPackedFileData, silent: boolean, customFinder?: ClassFinder) {\n let classFinder = customFinder || js._getClassById;\n let classes = data[File.SharedClasses];\n for (let i = 0; i < classes.length; ++i) {\n let klassLayout = classes[i];\n if (typeof klassLayout !== 'string') {\n if (CC_DEBUG) {\n if (typeof klassLayout[0] === 'function') {\n throw new Error('Can not deserialize the same JSON data again.');\n }\n }\n let type: string = klassLayout[0];\n doLookupClass(classFinder, type, klassLayout as IClass, CLASS_TYPE, silent, customFinder);\n }\n else {\n doLookupClass(classFinder, klassLayout, classes, i, silent, customFinder);\n }\n }\n}\n\nfunction cacheMasks (data: IPackedFileData) {\n let masks = data[File.SharedMasks];\n if (masks) {\n let classes = data[File.SharedClasses];\n for (let i = 0; i < masks.length; ++i) {\n let mask = masks[i];\n // @ts-ignore\n mask[0] = classes[mask[0]];\n }\n }\n}\n\nfunction parseResult (data: IFileData) {\n let instances = data[File.Instances];\n let sharedStrings = data[File.SharedStrings];\n let dependSharedUuids = data[File.SharedUuids];\n\n let dependObjs = data[File.DependObjs];\n let dependKeys = data[File.DependKeys];\n let dependUuids = data[File.DependUuidIndices];\n\n for (let i = 0; i < dependObjs.length; ++i) {\n let obj: any = dependObjs[i];\n if (typeof obj === 'number') {\n dependObjs[i] = instances[obj];\n }\n else {\n // assigned by DataTypeID.AssetRefByInnerObj or added by Details object directly in _deserialize\n }\n let key: any = dependKeys[i];\n if (typeof key === 'number') {\n if (key >= 0) {\n key = sharedStrings[key];\n }\n else {\n key = ~key;\n }\n dependKeys[i] = key;\n }\n else {\n // added by Details object directly in _deserialize\n }\n let uuid = dependUuids[i];\n if (typeof uuid === 'number') {\n dependUuids[i] = (dependSharedUuids as SharedString[])[uuid as StringIndex];\n }\n else {\n // added by Details object directly in _deserialize\n }\n }\n}\n\nexport default function deserialize (data: IFileData, details: Details, options?: IOptions): object {\n // @ts-ignore\n if (CC_EDITOR && Buffer.isBuffer(data)) {\n // @ts-ignore\n data = data.toString();\n }\n if (typeof data === 'string') {\n data = JSON.parse(data);\n }\n let borrowDetails = !details;\n details = details || Details.pool.get();\n details.init(data);\n options = options || {};\n\n let version = data[File.Version];\n let preprocessed = false;\n if (typeof version === 'object') {\n preprocessed = version.preprocessed;\n version = version.version;\n }\n if (version < 1) {\n throw new Error(cc.debug.getError(5304, version));\n }\n options._version = version;\n options.result = details;\n data[File.Context] = options;\n\n if (!preprocessed) {\n lookupClasses(data, false, options.classFinder);\n cacheMasks(data);\n }\n\n cc.game._isCloning = true;\n let instances = data[File.Instances];\n let rootIndex = parseInstances(data);\n cc.game._isCloning = false;\n\n if (data[File.Refs]) {\n dereference(data[File.Refs] as IRefs, instances, data[File.SharedStrings]);\n }\n\n parseResult(data);\n\n if (borrowDetails) {\n Details.pool.put(details);\n }\n\n return instances[rootIndex];\n};\n\ndeserialize.Details = Details;\n\nclass FileInfo {\n declare version: number;\n preprocessed = true;\n constructor (version: number) {\n this.version = version;\n }\n}\n\nexport function unpackJSONs (data: IPackedFileData, classFinder?: ClassFinder): IFileData[] {\n if (data[File.Version] < 1) {\n throw new Error(cc.debug.getError(5304, data[File.Version]));\n }\n lookupClasses(data, true, classFinder);\n cacheMasks(data);\n\n let version = new FileInfo(data[File.Version]);\n let sharedUuids = data[File.SharedUuids];\n let sharedStrings = data[File.SharedStrings];\n let sharedClasses = data[File.SharedClasses];\n let sharedMasks = data[File.SharedMasks];\n\n let sections = data[PACKED_SECTIONS];\n for (let i = 0; i < sections.length; ++i) {\n sections[i].unshift(version, sharedUuids, sharedStrings, sharedClasses, sharedMasks);\n }\n return sections;\n}\n\nexport function packCustomObjData (type: string, data: IClassObjectData|OtherObjectData, hasNativeDep?: boolean): IFileData {\n return [\n 1, EMPTY_PLACEHOLDER, EMPTY_PLACEHOLDER,\n [type],\n EMPTY_PLACEHOLDER,\n hasNativeDep ? [data, ~0] : [data],\n [0],\n EMPTY_PLACEHOLDER, [], [], []\n ];\n}\n\nexport function hasNativeDep (data: IFileData): boolean {\n let instances = data[File.Instances];\n let rootInfo = instances[instances.length - 1];\n if (typeof rootInfo !== 'number') {\n return false;\n }\n else {\n return rootInfo < 0;\n }\n}\n\nif (CC_PREVIEW) {\n deserialize.isCompiledJson = function (json: object): boolean {\n if (Array.isArray(json)) {\n let version = json[0];\n // array[0] will not be a number in the editor version\n return typeof version === 'number' || version instanceof FileInfo;\n }\n else {\n return false;\n }\n };\n}\n\nexport function getDependUuidList (json: IFileData): Array<string> {\n let sharedUuids = json[File.SharedUuids];\n return json[File.DependUuidIndices].map(index => sharedUuids[index]);\n}\n\nif (CC_EDITOR || CC_TEST) {\n cc._deserializeCompiled = deserialize;\n deserialize.macros = {\n EMPTY_PLACEHOLDER,\n CUSTOM_OBJ_DATA_CLASS,\n CUSTOM_OBJ_DATA_CONTENT,\n CLASS_TYPE,\n CLASS_KEYS,\n CLASS_PROP_TYPE_OFFSET,\n MASK_CLASS,\n OBJ_DATA_MASK,\n DICT_JSON_LAYOUT,\n ARRAY_ITEM_VALUES,\n PACKED_SECTIONS,\n };\n deserialize._BuiltinValueTypes = BuiltinValueTypes;\n deserialize._serializeBuiltinValueTypes = serializeBuiltinValueTypes;\n}\n\nif (CC_TEST) {\n cc._Test.deserializeCompiled = {\n deserialize,\n dereference,\n deserializeCCObject,\n deserializeCustomCCObject,\n parseInstances,\n parseResult,\n cacheMasks,\n File: {\n Version: File.Version,\n Context: File.Context,\n SharedUuids: File.SharedUuids,\n SharedStrings: File.SharedStrings,\n SharedClasses: File.SharedClasses,\n SharedMasks: File.SharedMasks,\n Instances: File.Instances,\n InstanceTypes: File.InstanceTypes,\n Refs: File.Refs,\n DependObjs: File.DependObjs,\n DependKeys: File.DependKeys,\n DependUuidIndices: File.DependUuidIndices,\n // ArrayLength: File.ArrayLength,\n },\n DataTypeID: {\n SimpleType: DataTypeID.SimpleType,\n InstanceRef: DataTypeID.InstanceRef,\n Array_InstanceRef: DataTypeID.Array_InstanceRef,\n Array_AssetRefByInnerObj: DataTypeID.Array_AssetRefByInnerObj,\n Class: DataTypeID.Class,\n ValueTypeCreated: DataTypeID.ValueTypeCreated,\n AssetRefByInnerObj: DataTypeID.AssetRefByInnerObj,\n TRS: DataTypeID.TRS,\n ValueType: DataTypeID.ValueType,\n Array_Class: DataTypeID.Array_Class,\n CustomizedClass: DataTypeID.CustomizedClass,\n Dict: DataTypeID.Dict,\n Array: DataTypeID.Array,\n // TypedArray: DataTypeID.TypedArray,\n },\n BuiltinValueTypes,\n unpackJSONs,\n };\n}\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport deserializeForCompiled from './deserialize-compiled';\n\ndeserializeForCompiled.reportMissingClass = function (id) {\n if (CC_EDITOR && Editor.Utils.UuidUtils.isUuid(id)) {\n id = Editor.Utils.UuidUtils.decompressUuid(id);\n cc.warnID(5301, id);\n }\n else {\n cc.warnID(5302, id);\n }\n};\n\nif (CC_BUILD) {\n cc.deserialize = deserializeForCompiled;\n}\nelse {\n let deserializeForEditor = require('./deserialize-editor');\n\n cc.deserialize = function (data, details, options) {\n if (CC_EDITOR && Buffer.isBuffer(data)) {\n data = data.toString();\n }\n if (typeof data === 'string') {\n data = JSON.parse(data);\n }\n if (CC_PREVIEW) {\n // support for loading Asset Bundle from server\n if (deserializeForCompiled.isCompiledJson(data)) {\n return deserializeForCompiled(data, details, options);\n }\n }\n return deserializeForEditor(data, details, options);\n };\n cc.deserialize.reportMissingClass = deserializeForCompiled.reportMissingClass;\n cc.deserialize.Details = deserializeForEditor.Details;\n}\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n// ID generater for runtime\n\nvar NonUuidMark = '.';\n\n/*\n * @param {string} [category] - You can specify a unique category to avoid id collision with other instance of IdGenerater\n */\nfunction IdGenerater (category) {\n // init with a random id to emphasize that the returns id should not be stored in persistence data\n this.id = 0 | (Math.random() * 998);\n \n this.prefix = category ? (category + NonUuidMark) : '';\n}\n\n/*\n * @method getNewId\n * @return {string}\n */\nIdGenerater.prototype.getNewId = function () {\n return this.prefix + (++this.id);\n};\n\n/*\n * The global id generater might have a conflict problem once every 365 days,\n * if the game runs at 60 FPS and each frame 4760273 counts of new id are requested.\n */\nIdGenerater.global = new IdGenerater('global');\n\nmodule.exports = IdGenerater;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nrequire('./js');\nrequire('./CCClass');\nrequire('./CCClassDecorator');\nrequire('./CCEnum');\nrequire('./CCObject');\nrequire('./callbacks-invoker');\nrequire('./deserialize');\nrequire('./instantiate');\nrequire('./instantiate-jit');\nrequire('./requiring-frame');\nrequire('./CCSys');\nrequire('./CCMacro');\n\nif (!(CC_EDITOR && Editor.isMainProcess)) {\n require('./CCVisibleRect');\n}","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n// Some helper methods for compile instantiation code\n\nvar CCObject = require('./CCObject');\nvar Destroyed = CCObject.Flags.Destroyed;\nvar PersistentMask = CCObject.Flags.PersistentMask;\nvar Attr = require('./attribute');\nvar js = require('./js');\nvar CCClass = require('./CCClass');\nvar Compiler = require('./compiler');\n\nvar DEFAULT = Attr.DELIMETER + 'default';\nvar IDENTIFIER_RE = CCClass.IDENTIFIER_RE;\nvar escapeForJS = CCClass.escapeForJS;\n\nconst VAR = 'var ';\nconst LOCAL_OBJ = 'o';\nconst LOCAL_TEMP_OBJ = 't';\nconst LOCAL_ARRAY = 'a';\nconst LINE_INDEX_OF_NEW_OBJ = 0;\n\nconst DEFAULT_MODULE_CACHE = {\n 'cc.Node': 'cc.Node',\n 'cc.Sprite': 'cc.Sprite',\n 'cc.Label': 'cc.Label',\n 'cc.Button': 'cc.Button',\n 'cc.Widget': 'cc.Widget',\n 'cc.Animation': 'cc.Animation',\n 'cc.ClickEvent': false,\n 'cc.PrefabInfo': false\n};\n\ntry {\n // compatible for IE\n !Float32Array.name && (Float32Array.name = 'Float32Array');\n !Float64Array.name && (Float64Array.name = 'Float64Array');\n\n !Int8Array.name && (Int8Array.name = 'Int8Array');\n !Int16Array.name && (Int16Array.name = 'Int16Array');\n !Int32Array.name && (Int32Array.name = 'Int32Array');\n\n !Uint8Array.name && (Uint8Array.name = 'Uint8Array');\n !Uint16Array.name && (Uint16Array.name = 'Uint16Array');\n !Uint32Array.name && (Uint32Array.name = 'Uint32Array');\n\n !Uint8ClampedArray.name && (Uint8ClampedArray.name = 'Uint8ClampedArray');\n}\ncatch (e) {}\n\n// compatible for iOS 9\nfunction getTypedArrayName (constructor) {\n if (constructor === Float32Array) { return 'Float32Array'; }\n else if (constructor === Float64Array) { return 'Float64Array'; }\n\n else if (constructor === Int8Array) { return 'Int8Array'; }\n else if (constructor === Int16Array) { return 'Int16Array'; }\n else if (constructor === Int32Array) { return 'Int32Array'; }\n\n else if (constructor === Uint8Array) { return 'Uint8Array'; }\n else if (constructor === Uint16Array) { return 'Uint16Array'; }\n else if (constructor === Uint32Array) { return 'Uint32Array'; }\n\n else if (constructor === Uint8ClampedArray) { return 'Uint8ClampedArray'; }\n else {\n throw new Error(`Unknown TypedArray to instantiate: ${constructor}`);\n }\n}\n\n// HELPER CLASSES\n\n// ('foo', 'bar')\n// -> 'var foo = bar;'\nfunction Declaration (varName, expression) {\n this.varName = varName;\n this.expression = expression;\n}\nDeclaration.prototype.toString = function () {\n return VAR + this.varName + '=' + this.expression + ';';\n};\n\n// ('a =', 'var b = x')\n// -> 'var b = a = x';\n// ('a =', 'x')\n// -> 'a = x';\nfunction mergeDeclaration (statement, expression) {\n if (expression instanceof Declaration) {\n return new Declaration(expression.varName, statement + expression.expression);\n }\n else {\n return statement + expression;\n }\n}\n\n// ('a', ['var b = x', 'b.foo = bar'])\n// -> 'var b = a = x;'\n// -> 'b.foo = bar;'\n// ('a', 'var b = x')\n// -> 'var b = a = x;'\n// ('a', 'x')\n// -> 'a = x;'\nfunction writeAssignment (codeArray, statement, expression) {\n if (Array.isArray(expression)) {\n expression[0] = mergeDeclaration(statement, expression[0]);\n codeArray.push(expression);\n }\n else {\n codeArray.push(mergeDeclaration(statement, expression) + ';');\n }\n}\n\n// ('foo', 'bar')\n// -> 'targetExpression.foo = bar'\n// ('foo1', 'bar1')\n// ('foo2', 'bar2')\n// -> 't = targetExpression;'\n// -> 't.foo1 = bar1;'\n// -> 't.foo2 = bar2;'\nfunction Assignments (targetExpression) {\n this._exps = [];\n this._targetExp = targetExpression;\n}\nAssignments.prototype.append = function (key, expression) {\n this._exps.push([key, expression]);\n};\nAssignments.prototype.writeCode = function (codeArray) {\n var targetVar;\n if (this._exps.length > 1) {\n codeArray.push(LOCAL_TEMP_OBJ + '=' + this._targetExp + ';');\n targetVar = LOCAL_TEMP_OBJ;\n }\n else if (this._exps.length === 1) {\n targetVar = this._targetExp;\n }\n else {\n return;\n }\n for (var i = 0; i < this._exps.length; i++) {\n var pair = this._exps[i];\n writeAssignment(codeArray, targetVar + getPropAccessor(pair[0]) + '=', pair[1]);\n }\n};\n\nAssignments.pool = new js.Pool(function (obj) {\n obj._exps.length = 0;\n obj._targetExp = null;\n }, 1);\nAssignments.pool.get = function (targetExpression) {\n var cache = this._get() || new Assignments();\n cache._targetExp = targetExpression;\n return cache;\n};\n\n// HELPER FUNCTIONS\n\nfunction equalsToDefault (def, value) {\n if (typeof def === 'function') {\n try {\n def = def();\n }\n catch (e) {\n return false;\n }\n }\n if (def === value) {\n return true;\n }\n if (def && value &&\n typeof def === 'object' && typeof value === 'object' &&\n def.constructor === value.constructor)\n {\n if (def instanceof cc.ValueType) {\n if (def.equals(value)) {\n return true;\n }\n }\n else if (Array.isArray(def)) {\n return def.length === 0 && value.length === 0;\n }\n else if (def.constructor === Object) {\n return js.isEmptyObject(def) && js.isEmptyObject(value);\n }\n }\n return false;\n}\n\nfunction getPropAccessor (key) {\n return IDENTIFIER_RE.test(key) ? ('.' + key) : ('[' + escapeForJS(key) + ']');\n}\n\n//\n\n/*\n * Variables:\n * {Object[]} O - objs list\n * {Function[]} F - constructor list\n * {Node} [R] - specify an instantiated prefabRoot that all references to prefabRoot in prefab will redirect to\n * {Object} o - current creating object\n */\n\n/*\n * @param {Object} obj - the object to parse\n * @param {Node} [parent]\n */\nfunction Parser (obj, parent) {\n this.parent = parent;\n\n this.objsToClear_iN$t = []; // used to reset _iN$t variable\n this.codeArray = [];\n\n // datas for generated code\n this.objs = [];\n this.funcs = [];\n\n this.funcModuleCache = js.createMap();\n js.mixin(this.funcModuleCache, DEFAULT_MODULE_CACHE);\n\n // {String[]} - variable names for circular references,\n // not really global, just local variables shared between sub functions\n this.globalVariables = [];\n // incremental id for new global variables\n this.globalVariableId = 0;\n // incremental id for new local variables\n this.localVariableId = 0;\n\n // generate codeArray\n //if (Array.isArray(obj)) {\n // this.codeArray.push(this.instantiateArray(obj));\n //}\n //else {\n this.codeArray.push(VAR + LOCAL_OBJ + ',' + LOCAL_TEMP_OBJ + ';',\n 'if(R){',\n LOCAL_OBJ + '=R;',\n '}else{',\n LOCAL_OBJ + '=R=new ' + this.getFuncModule(obj.constructor, true) + '();',\n '}');\n js.value(obj, '_iN$t', { globalVar: 'R' }, true);\n this.objsToClear_iN$t.push(obj);\n this.enumerateObject(this.codeArray, obj);\n //}\n\n // generate code\n var globalVariablesDeclaration;\n if (this.globalVariables.length > 0) {\n globalVariablesDeclaration = VAR + this.globalVariables.join(',') + ';';\n }\n var code = Compiler.flattenCodeArray(['return (function(R){',\n globalVariablesDeclaration || [],\n this.codeArray,\n 'return o;',\n '})']);\n\n // generate method and bind with objs\n this.result = Function('O', 'F', code)(this.objs, this.funcs);\n\n // if (CC_TEST && !isPhantomJS) {\n // console.log(code);\n // }\n\n // cleanup\n for (var i = 0, len = this.objsToClear_iN$t.length; i < len; ++i) {\n this.objsToClear_iN$t[i]._iN$t = null;\n }\n this.objsToClear_iN$t.length = 0;\n}\n\nvar proto = Parser.prototype;\n\nproto.getFuncModule = function (func, usedInNew) {\n var clsName = js.getClassName(func);\n if (clsName) {\n var cache = this.funcModuleCache[clsName];\n if (cache) {\n return cache;\n }\n else if (cache === undefined) {\n var clsNameIsModule = clsName.indexOf('.') !== -1;\n if (clsNameIsModule) {\n try {\n // ensure is module\n clsNameIsModule = (func === Function('return ' + clsName)());\n if (clsNameIsModule) {\n this.funcModuleCache[clsName] = clsName;\n return clsName;\n }\n }\n catch (e) {}\n }\n }\n }\n var index = this.funcs.indexOf(func);\n if (index < 0) {\n index = this.funcs.length;\n this.funcs.push(func);\n }\n var res = 'F[' + index + ']';\n if (usedInNew) {\n res = '(' + res + ')';\n }\n this.funcModuleCache[clsName] = res;\n return res;\n};\n\nproto.getObjRef = function (obj) {\n var index = this.objs.indexOf(obj);\n if (index < 0) {\n index = this.objs.length;\n this.objs.push(obj);\n }\n return 'O[' + index + ']';\n};\n\nproto.setValueType = function (codeArray, defaultValue, srcValue, targetExpression) {\n var assignments = Assignments.pool.get(targetExpression);\n var fastDefinedProps = defaultValue.constructor.__props__;\n if (!fastDefinedProps) {\n fastDefinedProps = Object.keys(defaultValue);\n }\n for (var i = 0; i < fastDefinedProps.length; i++) {\n var propName = fastDefinedProps[i];\n var prop = srcValue[propName];\n if (defaultValue[propName] === prop) {\n continue;\n }\n var expression = this.enumerateField(srcValue, propName, prop);\n assignments.append(propName, expression);\n }\n assignments.writeCode(codeArray);\n Assignments.pool.put(assignments);\n};\n\nproto.enumerateCCClass = function (codeArray, obj, klass) {\n var props = klass.__values__;\n var attrs = Attr.getClassAttrs(klass);\n for (var p = 0; p < props.length; p++) {\n var key = props[p];\n var val = obj[key];\n var defaultValue = attrs[key + DEFAULT];\n if (equalsToDefault(defaultValue, val)) {\n continue;\n }\n if (typeof val === 'object' && val instanceof cc.ValueType) {\n defaultValue = CCClass.getDefault(defaultValue);\n if (defaultValue && defaultValue.constructor === val.constructor) {\n // fast case\n var targetExpression = LOCAL_OBJ + getPropAccessor(key);\n this.setValueType(codeArray, defaultValue, val, targetExpression);\n continue;\n }\n }\n this.setObjProp(codeArray, obj, key, val);\n }\n};\n\nproto.instantiateArray = function (value) {\n if (value.length === 0) {\n return '[]';\n }\n\n var arrayVar = LOCAL_ARRAY + (++this.localVariableId);\n var declaration = new Declaration(arrayVar, 'new Array(' + value.length + ')');\n var codeArray = [declaration];\n\n // assign a _iN$t flag to indicate that this object has been parsed.\n js.value(value, '_iN$t', {\n globalVar: '', // the name of declared global variable used to access this object\n source: codeArray, // the source code array for this object\n }, true);\n this.objsToClear_iN$t.push(value);\n\n for (var i = 0; i < value.length; ++i) {\n var statement = arrayVar + '[' + i + ']=';\n var expression = this.enumerateField(value, i, value[i]);\n writeAssignment(codeArray, statement, expression);\n }\n return codeArray;\n};\n\nproto.instantiateTypedArray = function (value) {\n let type = value.constructor.name || getTypedArrayName(value.constructor);\n if (value.length === 0) {\n return 'new ' + type;\n }\n\n let arrayVar = LOCAL_ARRAY + (++this.localVariableId);\n let declaration = new Declaration(arrayVar, 'new ' + type + '(' + value.length + ')');\n let codeArray = [declaration];\n\n // assign a _iN$t flag to indicate that this object has been parsed.\n value._iN$t = {\n globalVar: '', // the name of declared global variable used to access this object\n source: codeArray, // the source code array for this object\n };\n this.objsToClear_iN$t.push(value);\n\n for (var i = 0; i < value.length; ++i) {\n if (value[i] !== 0) {\n var statement = arrayVar + '[' + i + ']=';\n writeAssignment(codeArray, statement, value[i]);\n }\n }\n return codeArray;\n};\n\nproto.enumerateField = function (obj, key, value) {\n if (typeof value === 'object' && value) {\n var _iN$t = value._iN$t;\n if (_iN$t) {\n // parsed\n var globalVar = _iN$t.globalVar;\n if (!globalVar) {\n // declare a global var\n globalVar = _iN$t.globalVar = 'v' + (++this.globalVariableId);\n this.globalVariables.push(globalVar);\n // insert assignment statement to assign to global var\n var line = _iN$t.source[LINE_INDEX_OF_NEW_OBJ];\n _iN$t.source[LINE_INDEX_OF_NEW_OBJ] = mergeDeclaration(globalVar + '=', line);\n // if (typeof line ==='string' && line.startsWith(VAR)) {\n // // var o=xxx -> var o=global=xxx\n // var LEN_OF_VAR_O = 5;\n // _iN$t.source[LINE_INDEX_OF_NEW_OBJ] = line.slice(0, LEN_OF_VAR_O) + '=' + globalVar + line.slice(LEN_OF_VAR_O);\n // }\n }\n return globalVar;\n }\n else if (ArrayBuffer.isView(value)) {\n return this.instantiateTypedArray(value);\n }\n else if (Array.isArray(value)) {\n return this.instantiateArray(value);\n }\n else {\n return this.instantiateObj(value);\n }\n }\n else if (typeof value === 'function') {\n return this.getFuncModule(value);\n }\n else if (typeof value === 'string') {\n return escapeForJS(value);\n }\n else {\n if (key === '_objFlags' && (obj instanceof CCObject)) {\n value &= PersistentMask;\n }\n return value;\n }\n};\n\nproto.setObjProp = function (codeArray, obj, key, value) {\n var statement = LOCAL_OBJ + getPropAccessor(key) + '=';\n var expression = this.enumerateField(obj, key, value);\n writeAssignment(codeArray, statement, expression);\n};\n\n// codeArray - the source code array for this object\nproto.enumerateObject = function (codeArray, obj) {\n var klass = obj.constructor;\n if (cc.Class._isCCClass(klass)) {\n this.enumerateCCClass(codeArray, obj, klass);\n }\n else {\n // primitive javascript object\n for (var key in obj) {\n if (!obj.hasOwnProperty(key) ||\n (key.charCodeAt(0) === 95 && key.charCodeAt(1) === 95 && // starts with \"__\"\n key !== '__type__')\n ) {\n continue;\n }\n var value = obj[key];\n if (typeof value === 'object' && value && value === obj._iN$t) {\n continue;\n }\n this.setObjProp(codeArray, obj, key, value);\n }\n }\n};\n\nproto.instantiateObj = function (obj) {\n if (obj instanceof cc.ValueType) {\n return CCClass.getNewValueTypeCode(obj);\n }\n if (obj instanceof cc.Asset) {\n // register to asset list and just return the reference.\n return this.getObjRef(obj);\n }\n if (obj._objFlags & Destroyed) {\n // the same as cc.isValid(obj)\n return null;\n }\n\n var createCode;\n var ctor = obj.constructor;\n if (cc.Class._isCCClass(ctor)) {\n if (this.parent) {\n if (this.parent instanceof cc.Component) {\n if (obj instanceof cc._BaseNode || obj instanceof cc.Component) {\n return this.getObjRef(obj);\n }\n }\n else if (this.parent instanceof cc._BaseNode) {\n if (obj instanceof cc._BaseNode) {\n if (!obj.isChildOf(this.parent)) {\n // should not clone other nodes if not descendant\n return this.getObjRef(obj);\n }\n }\n else if (obj instanceof cc.Component) {\n if (!obj.node?.isChildOf(this.parent)) {\n // should not clone other component if not descendant\n return this.getObjRef(obj);\n }\n }\n }\n }\n createCode = new Declaration(LOCAL_OBJ, 'new ' + this.getFuncModule(ctor, true) + '()');\n }\n else if (ctor === Object) {\n createCode = new Declaration(LOCAL_OBJ, '{}');\n }\n else if (!ctor) {\n createCode = new Declaration(LOCAL_OBJ, 'Object.create(null)');\n }\n else {\n // do not clone unknown type\n return this.getObjRef(obj);\n }\n\n var codeArray = [createCode];\n\n // assign a _iN$t flag to indicate that this object has been parsed.\n js.value(obj, '_iN$t', {\n globalVar: '', // the name of declared global variable used to access this object\n source: codeArray, // the source code array for this object\n //propName: '', // the propName this object defined in its source code,\n // // if defined, use LOCAL_OBJ.propName to access the obj, else just use o\n }, true);\n this.objsToClear_iN$t.push(obj);\n\n this.enumerateObject(codeArray, obj);\n return ['(function(){',\n codeArray,\n 'return o;})();'];\n};\n\n\nfunction compile (node) {\n var root = (node instanceof cc._BaseNode) && node;\n var parser = new Parser(node, root);\n return parser.result;\n}\n\nmodule.exports = {\n compile: compile,\n equalsToDefault: equalsToDefault\n};\n\nif (CC_TEST) {\n cc._Test.IntantiateJit = module.exports;\n}\n","/****************************************************************************\r\n Copyright (c) 2013-2016 Chukong Technologies Inc.\r\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\r\n\r\n https://www.cocos.com/\r\n\r\n Permission is hereby granted, free of charge, to any person obtaining a copy\r\n of this software and associated engine source code (the \"Software\"), a limited,\r\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\r\n to use Cocos Creator solely to develop games on your target platforms. You shall\r\n not use Cocos Creator software for developing other software or tools that's\r\n used for developing games. You are not granted to publish, distribute,\r\n sublicense, and/or sell copies of Cocos Creator.\r\n\r\n The software or tools in this License Agreement are licensed, not sold.\r\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\r\n\r\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n THE SOFTWARE.\r\n ****************************************************************************/\r\n\r\nvar CCObject = require('./CCObject');\r\nvar CCValueType = require('../value-types/value-type');\r\nvar Destroyed = CCObject.Flags.Destroyed;\r\nvar PersistentMask = CCObject.Flags.PersistentMask;\r\nvar _isDomNode = require('./utils').isDomNode;\r\nvar js = require('./js');\r\n\r\n/**\r\n * !#en Clones the object `original` and returns the clone, or instantiate a node from the Prefab.\r\n * !#zh 克隆指定的任意类型的对象,或者从 Prefab 实例化出新节点。\r\n *\r\n * Instantiate 时function 和 dom 等非可序列化对象会直接保留原有引用Asset 会直接进行浅拷贝,可序列化类型会进行深拷贝。)\r\n *\r\n * @method instantiate\r\n * @param {Prefab|Node|Object} original - An existing object that you want to make a copy of.\r\n * @return {Node|Object} the newly instantiated object\r\n * @typescript\r\n * instantiate(original: Prefab): Node\r\n * instantiate<T>(original: T): T\r\n * @example\r\n * // instantiate node from prefab\r\n * var scene = cc.director.getScene();\r\n * var node = cc.instantiate(prefabAsset);\r\n * node.parent = scene;\r\n * // clone node\r\n * var scene = cc.director.getScene();\r\n * var node = cc.instantiate(targetNode);\r\n * node.parent = scene;\r\n */\r\nfunction instantiate (original, internal_force) {\r\n if (!internal_force) {\r\n if (typeof original !== 'object' || Array.isArray(original)) {\r\n if (CC_DEV) {\r\n cc.errorID(6900);\r\n }\r\n return null;\r\n }\r\n if (!original) {\r\n if (CC_DEV) {\r\n cc.errorID(6901);\r\n }\r\n return null;\r\n }\r\n if (!cc.isValid(original)) {\r\n if (CC_DEV) {\r\n cc.errorID(6902);\r\n }\r\n return null;\r\n }\r\n if (CC_DEV && original instanceof cc.Component) {\r\n cc.warn('Should not instantiate a single cc.Component directly, you must instantiate the entire node.');\r\n }\r\n }\r\n\r\n var clone;\r\n if (original instanceof CCObject) {\r\n // Invoke _instantiate method if supplied.\r\n // The _instantiate callback will be called only on the root object, its associated object will not be called.\r\n // @callback associated\r\n // @param {Object} [instantiated] - If supplied, _instantiate just need to initialize the instantiated object,\r\n // no need to create new object by itself.\r\n // @returns {Object} - the instantiated object\r\n if (original._instantiate) {\r\n cc.game._isCloning = true;\r\n clone = original._instantiate(null, true);\r\n cc.game._isCloning = false;\r\n return clone;\r\n }\r\n else if (original instanceof cc.Asset) {\r\n // 不允许用通用方案实例化资源\r\n if (CC_DEV) {\r\n cc.errorID(6903);\r\n }\r\n return null;\r\n }\r\n }\r\n\r\n cc.game._isCloning = true;\r\n clone = doInstantiate(original);\r\n cc.game._isCloning = false;\r\n return clone;\r\n}\r\n\r\nvar objsToClearTmpVar = []; // used to reset _iN$t variable\r\n\r\n///**\r\n// * Do instantiate object, the object to instantiate must be non-nil.\r\n// * 这是一个通用的 instantiate 方法,可能效率比较低。\r\n// * 之后可以给各种类型重写快速实例化的特殊实现,但应该在单元测试中将结果和这个方法的结果进行对比。\r\n// * 值得注意的是,这个方法不可重入。\r\n// *\r\n// * @param {Object} obj - 该方法仅供内部使用,用户需负责保证参数合法。什么参数是合法的请参考 cc.instantiate 的实现。\r\n// * @param {Node} [parent] - 只有在该对象下的场景物体会被克隆。\r\n// * @return {Object}\r\n// * @private\r\n// */\r\nfunction doInstantiate (obj, parent) {\r\n if (Array.isArray(obj)) {\r\n if (CC_DEV) {\r\n cc.errorID(6904);\r\n }\r\n return null;\r\n }\r\n if (_isDomNode && _isDomNode(obj)) {\r\n if (CC_DEV) {\r\n cc.errorID(6905);\r\n }\r\n return null;\r\n }\r\n\r\n var clone;\r\n if (obj._iN$t) {\r\n // User can specify an existing object by assigning the \"_iN$t\" property.\r\n // enumerateObject will always push obj to objsToClearTmpVar\r\n clone = obj._iN$t;\r\n }\r\n else if (obj.constructor) {\r\n var klass = obj.constructor;\r\n clone = new klass();\r\n }\r\n else {\r\n clone = Object.create(null);\r\n }\r\n\r\n enumerateObject(obj, clone, parent);\r\n\r\n for (var i = 0, len = objsToClearTmpVar.length; i < len; ++i) {\r\n objsToClearTmpVar[i]._iN$t = null;\r\n }\r\n objsToClearTmpVar.length = 0;\r\n\r\n return clone;\r\n}\r\n\r\n// @param {Object} obj - The object to instantiate, typeof must be 'object' and should not be an array.\r\n\r\nfunction enumerateCCClass (klass, obj, clone, parent) {\r\n var props = klass.__values__;\r\n for (var p = 0; p < props.length; p++) {\r\n var key = props[p];\r\n var value = obj[key];\r\n if (typeof value === 'object' && value) {\r\n var initValue = clone[key];\r\n if (initValue instanceof CCValueType &&\r\n initValue.constructor === value.constructor) {\r\n initValue.set(value);\r\n }\r\n else {\r\n clone[key] = value._iN$t || instantiateObj(value, parent);\r\n }\r\n }\r\n else {\r\n clone[key] = value;\r\n }\r\n }\r\n}\r\n\r\nfunction enumerateObject (obj, clone, parent) {\r\n // 目前使用“_iN$t”这个特殊字段来存实例化后的对象这样做主要是为了防止循环引用\r\n // 注意为了避免循环引用所有新创建的实例必须在赋值前被设为源对象的_iN$t\r\n js.value(obj, '_iN$t', clone, true);\r\n objsToClearTmpVar.push(obj);\r\n var klass = obj.constructor;\r\n if (cc.Class._isCCClass(klass)) {\r\n enumerateCCClass(klass, obj, clone, parent);\r\n }\r\n else {\r\n // primitive javascript object\r\n for (var key in obj) {\r\n if (!obj.hasOwnProperty(key) ||\r\n (key.charCodeAt(0) === 95 && key.charCodeAt(1) === 95 && // starts with \"__\"\r\n key !== '__type__')\r\n ) {\r\n continue;\r\n }\r\n var value = obj[key];\r\n if (typeof value === 'object' && value) {\r\n if (value === clone) {\r\n continue; // value is obj._iN$t\r\n }\r\n clone[key] = value._iN$t || instantiateObj(value, parent);\r\n }\r\n else {\r\n clone[key] = value;\r\n }\r\n }\r\n }\r\n if (obj instanceof CCObject) {\r\n clone._objFlags &= PersistentMask;\r\n }\r\n}\r\n\r\n/*\r\n * @param {Object|Array} obj - the original non-nil object, typeof must be 'object'\r\n * @return {Object|Array} - the original non-nil object, typeof must be 'object'\r\n */\r\nfunction instantiateObj (obj, parent) {\r\n if (obj instanceof CCValueType) {\r\n return obj.clone();\r\n }\r\n if (obj instanceof cc.Asset) {\r\n // 所有资源直接引用,不需要拷贝\r\n return obj;\r\n }\r\n var clone;\r\n if (ArrayBuffer.isView(obj)) {\r\n let len = obj.length;\r\n clone = new (obj.constructor)(len);\r\n obj._iN$t = clone;\r\n objsToClearTmpVar.push(obj);\r\n for (let i = 0; i < len; ++i) {\r\n clone[i] = obj[i];\r\n }\r\n return clone;\r\n }\r\n if (Array.isArray(obj)) {\r\n let len = obj.length;\r\n clone = new Array(len);\r\n js.value(obj, '_iN$t', clone, true);\r\n objsToClearTmpVar.push(obj);\r\n for (let i = 0; i < len; ++i) {\r\n var value = obj[i];\r\n if (typeof value === 'object' && value) {\r\n clone[i] = value._iN$t || instantiateObj(value, parent);\r\n }\r\n else {\r\n clone[i] = value;\r\n }\r\n }\r\n return clone;\r\n }\r\n else if (obj._objFlags & Destroyed) {\r\n // the same as cc.isValid(obj)\r\n return null;\r\n }\r\n\r\n var ctor = obj.constructor;\r\n if (cc.Class._isCCClass(ctor)) {\r\n if (parent) {\r\n if (parent instanceof cc.Component) {\r\n if (obj instanceof cc._BaseNode || obj instanceof cc.Component) {\r\n return obj;\r\n }\r\n }\r\n else if (parent instanceof cc._BaseNode) {\r\n if (obj instanceof cc._BaseNode) {\r\n if (!obj.isChildOf(parent)) {\r\n // should not clone other nodes if not descendant\r\n return obj;\r\n }\r\n }\r\n else if (obj instanceof cc.Component) {\r\n if (!obj.node?.isChildOf(parent)) {\r\n // should not clone other component if not descendant\r\n return obj;\r\n }\r\n }\r\n }\r\n }\r\n clone = new ctor();\r\n }\r\n else if (ctor === Object) {\r\n clone = {};\r\n }\r\n else if (!ctor) {\r\n clone = Object.create(null);\r\n }\r\n else {\r\n // unknown type\r\n return obj;\r\n }\r\n enumerateObject(obj, clone, parent);\r\n return clone;\r\n}\r\n\r\ninstantiate._clone = doInstantiate;\r\ncc.instantiate = instantiate;\r\nmodule.exports = instantiate;\r\n","/****************************************************************************\n Copyright (c) 2008-2010 Ricardo Quesada\n Copyright (c) 2011-2012 cocos2d-x.org\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos2d-x.org\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst tempCIDGenerater = new (require('./id-generater'))('TmpCId.');\n\n\nfunction _getPropertyDescriptor (obj, name) {\n while (obj) {\n var pd = Object.getOwnPropertyDescriptor(obj, name);\n if (pd) {\n return pd;\n }\n obj = Object.getPrototypeOf(obj);\n }\n return null;\n}\n\nfunction _copyprop(name, source, target) {\n var pd = _getPropertyDescriptor(source, name);\n Object.defineProperty(target, name, pd);\n}\n\n/**\n * !#en This module provides some JavaScript utilities. All members can be accessed with `cc.js`.\n * !#zh 这个模块封装了 JavaScript 相关的一些实用函数,你可以通过 `cc.js` 来访问这个模块。\n * @submodule js\n * @module js\n */\nvar js = {\n\n /**\n * Check the obj whether is number or not\n * If a number is created by using 'new Number(10086)', the typeof it will be \"object\"...\n * Then you can use this function if you care about this case.\n * @method isNumber\n * @param {*} obj\n * @returns {Boolean}\n */\n isNumber: function(obj) {\n return typeof obj === 'number' || obj instanceof Number;\n },\n\n /**\n * Check the obj whether is string or not.\n * If a string is created by using 'new String(\"blabla\")', the typeof it will be \"object\"...\n * Then you can use this function if you care about this case.\n * @method isString\n * @param {*} obj\n * @returns {Boolean}\n */\n isString: function(obj) {\n return typeof obj === 'string' || obj instanceof String;\n },\n\n /**\n * Copy all properties not defined in obj from arguments[1...n]\n * @method addon\n * @param {Object} obj object to extend its properties\n * @param {Object} ...sourceObj source object to copy properties from\n * @return {Object} the result obj\n */\n addon: function (obj) {\n 'use strict';\n obj = obj || {};\n for (var i = 1, length = arguments.length; i < length; i++) {\n var source = arguments[i];\n if (source) {\n if (typeof source !== 'object') {\n cc.errorID(5402, source);\n continue;\n }\n for ( var name in source) {\n if ( !(name in obj) ) {\n _copyprop( name, source, obj);\n }\n }\n }\n }\n return obj;\n },\n\n /**\n * copy all properties from arguments[1...n] to obj\n * @method mixin\n * @param {Object} obj\n * @param {Object} ...sourceObj\n * @return {Object} the result obj\n */\n mixin: function (obj) {\n 'use strict';\n obj = obj || {};\n for (var i = 1, length = arguments.length; i < length; i++) {\n var source = arguments[i];\n if (source) {\n if (typeof source !== 'object') {\n cc.errorID(5403, source);\n continue;\n }\n for ( var name in source) {\n _copyprop( name, source, obj);\n }\n }\n }\n return obj;\n },\n\n /**\n * Derive the class from the supplied base class.\n * Both classes are just native javascript constructors, not created by cc.Class, so\n * usually you will want to inherit using {{#crossLink \"cc/Class:method\"}}cc.Class {{/crossLink}} instead.\n * @method extend\n * @param {Function} cls\n * @param {Function} base - the baseclass to inherit\n * @return {Function} the result class\n */\n extend: function (cls, base) {\n if (CC_DEV) {\n if (!base) {\n cc.errorID(5404);\n return;\n }\n if (!cls) {\n cc.errorID(5405);\n return;\n }\n if (Object.keys(cls.prototype).length > 0) {\n cc.errorID(5406);\n }\n }\n for (var p in base) if (base.hasOwnProperty(p)) cls[p] = base[p];\n cls.prototype = Object.create(base.prototype, {\n constructor: {\n value: cls,\n writable: true,\n configurable: true\n }\n });\n return cls;\n },\n\n /**\n * Get super class\n * @method getSuper\n * @param {Function} ctor - the constructor of subclass\n * @return {Function}\n */\n getSuper (ctor) {\n var proto = ctor.prototype; // binded function do not have prototype\n var dunderProto = proto && Object.getPrototypeOf(proto);\n return dunderProto && dunderProto.constructor;\n },\n\n /**\n * Checks whether subclass is child of superclass or equals to superclass\n *\n * @method isChildClassOf\n * @param {Function} subclass\n * @param {Function} superclass\n * @return {Boolean}\n */\n isChildClassOf (subclass, superclass) {\n if (subclass && superclass) {\n if (typeof subclass !== 'function') {\n return false;\n }\n if (typeof superclass !== 'function') {\n if (CC_DEV) {\n cc.warnID(3625, superclass);\n }\n return false;\n }\n if (subclass === superclass) {\n return true;\n }\n for (;;) {\n subclass = js.getSuper(subclass);\n if (!subclass) {\n return false;\n }\n if (subclass === superclass) {\n return true;\n }\n }\n }\n return false;\n },\n\n /**\n * Removes all enumerable properties from object\n * @method clear\n * @param {any} obj\n */\n clear: function (obj) {\n var keys = Object.keys(obj);\n for (var i = 0; i < keys.length; i++) {\n delete obj[keys[i]];\n }\n },\n\n /**\n * Checks whether obj is an empty object\n * @method isEmptyObject\n * @param {any} obj \n * @returns {Boolean}\n */\n isEmptyObject: function (obj) {\n for (var key in obj) {\n return false;\n }\n return true;\n },\n\n /**\n * Get property descriptor in object and all its ancestors\n * @method getPropertyDescriptor\n * @param {Object} obj\n * @param {String} name\n * @return {Object}\n */\n getPropertyDescriptor: _getPropertyDescriptor\n};\n\n\nvar tmpValueDesc = {\n value: undefined,\n enumerable: false,\n writable: false,\n configurable: true\n};\n\n/**\n * Define value, just help to call Object.defineProperty.<br>\n * The configurable will be true.\n * @method value\n * @param {Object} obj\n * @param {String} prop\n * @param {any} value\n * @param {Boolean} [writable=false]\n * @param {Boolean} [enumerable=false]\n */\njs.value = function (obj, prop, value, writable, enumerable) {\n tmpValueDesc.value = value;\n tmpValueDesc.writable = writable;\n tmpValueDesc.enumerable = enumerable;\n Object.defineProperty(obj, prop, tmpValueDesc);\n tmpValueDesc.value = undefined;\n};\n\nvar tmpGetSetDesc = {\n get: null,\n set: null,\n enumerable: false,\n};\n\n/**\n * Define get set accessor, just help to call Object.defineProperty(...)\n * @method getset\n * @param {Object} obj\n * @param {String} prop\n * @param {Function} getter\n * @param {Function} [setter=null]\n * @param {Boolean} [enumerable=false]\n * @param {Boolean} [configurable=false]\n */\njs.getset = function (obj, prop, getter, setter, enumerable, configurable) {\n if (typeof setter !== 'function') {\n enumerable = setter;\n setter = undefined;\n }\n tmpGetSetDesc.get = getter;\n tmpGetSetDesc.set = setter;\n tmpGetSetDesc.enumerable = enumerable;\n tmpGetSetDesc.configurable = configurable;\n Object.defineProperty(obj, prop, tmpGetSetDesc);\n tmpGetSetDesc.get = null;\n tmpGetSetDesc.set = null;\n};\n\nvar tmpGetDesc = {\n get: null,\n enumerable: false,\n configurable: false\n};\n\n/**\n * Define get accessor, just help to call Object.defineProperty(...)\n * @method get\n * @param {Object} obj\n * @param {String} prop\n * @param {Function} getter\n * @param {Boolean} [enumerable=false]\n * @param {Boolean} [configurable=false]\n */\njs.get = function (obj, prop, getter, enumerable, configurable) {\n tmpGetDesc.get = getter;\n tmpGetDesc.enumerable = enumerable;\n tmpGetDesc.configurable = configurable;\n Object.defineProperty(obj, prop, tmpGetDesc);\n tmpGetDesc.get = null;\n};\n\nvar tmpSetDesc = {\n set: null,\n enumerable: false,\n configurable: false\n};\n\n/**\n * Define set accessor, just help to call Object.defineProperty(...)\n * @method set\n * @param {Object} obj\n * @param {String} prop\n * @param {Function} setter\n * @param {Boolean} [enumerable=false]\n * @param {Boolean} [configurable=false]\n */\njs.set = function (obj, prop, setter, enumerable, configurable) {\n tmpSetDesc.set = setter;\n tmpSetDesc.enumerable = enumerable;\n tmpSetDesc.configurable = configurable;\n Object.defineProperty(obj, prop, tmpSetDesc);\n tmpSetDesc.set = null;\n};\n\n/**\n * Get class name of the object, if object is just a {} (and which class named 'Object'), it will return \"\".\n * (modified from <a href=\"http://stackoverflow.com/questions/1249531/how-to-get-a-javascript-objects-class\">the code from this stackoverflow post</a>)\n * @method getClassName\n * @param {Object|Function} objOrCtor - instance or constructor\n * @return {String}\n */\njs.getClassName = function (objOrCtor) {\n if (typeof objOrCtor === 'function') {\n var prototype = objOrCtor.prototype;\n if (prototype && prototype.hasOwnProperty('__classname__') && prototype.__classname__) {\n return prototype.__classname__;\n }\n var retval = '';\n // for browsers which have name property in the constructor of the object, such as chrome\n if (objOrCtor.name) {\n retval = objOrCtor.name;\n }\n if (objOrCtor.toString) {\n var arr, str = objOrCtor.toString();\n if (str.charAt(0) === '[') {\n // str is \"[object objectClass]\"\n arr = str.match(/\\[\\w+\\s*(\\w+)\\]/);\n }\n else {\n // str is function objectClass () {} for IE Firefox\n arr = str.match(/function\\s*(\\w+)/);\n }\n if (arr && arr.length === 2) {\n retval = arr[1];\n }\n }\n return retval !== 'Object' ? retval : '';\n }\n else if (objOrCtor && objOrCtor.constructor) {\n return js.getClassName(objOrCtor.constructor);\n }\n return '';\n};\n\nfunction isTempClassId (id) {\n return typeof id !== 'string' || id.startsWith(tempCIDGenerater.prefix);\n}\n\n// id 注册\n(function () {\n var _idToClass = {};\n var _nameToClass = {};\n\n function setup (key, publicName, table) {\n js.getset(js, publicName,\n function () {\n return Object.assign({}, table);\n },\n function (value) {\n js.clear(table);\n Object.assign(table, value);\n }\n );\n return function (id, constructor) {\n // deregister old\n if (constructor.prototype.hasOwnProperty(key)) {\n delete table[constructor.prototype[key]];\n }\n js.value(constructor.prototype, key, id);\n // register class\n if (id) {\n var registered = table[id];\n if (registered && registered !== constructor) {\n var error = 'A Class already exists with the same ' + key + ' : \"' + id + '\".';\n if (CC_TEST) {\n error += ' (This may be caused by error of unit test.) \\\nIf you dont need serialization, you can set class id to \"\". You can also call \\\ncc.js.unregisterClass to remove the id of unused class';\n }\n cc.error(error);\n }\n else {\n table[id] = constructor;\n }\n //if (id === \"\") {\n // console.trace(\"\", table === _nameToClass);\n //}\n }\n };\n }\n\n /**\n * Register the class by specified id, if its classname is not defined, the class name will also be set.\n * @method _setClassId\n * @param {String} classId\n * @param {Function} constructor\n * @private\n */\n /**\n * !#en All classes registered in the engine, indexed by ID.\n * !#zh 引擎中已注册的所有类型,通过 ID 进行索引。\n * @property _registeredClassIds\n * @example\n * // save all registered classes before loading scripts\n * let builtinClassIds = cc.js._registeredClassIds;\n * let builtinClassNames = cc.js._registeredClassNames;\n * // load some scripts that contain CCClass\n * ...\n * // clear all loaded classes\n * cc.js._registeredClassIds = builtinClassIds;\n * cc.js._registeredClassNames = builtinClassNames;\n */\n js._setClassId = setup('__cid__', '_registeredClassIds', _idToClass);\n\n /**\n * !#en All classes registered in the engine, indexed by name.\n * !#zh 引擎中已注册的所有类型,通过名称进行索引。\n * @property _registeredClassNames\n * @example\n * // save all registered classes before loading scripts\n * let builtinClassIds = cc.js._registeredClassIds;\n * let builtinClassNames = cc.js._registeredClassNames;\n * // load some scripts that contain CCClass\n * ...\n * // clear all loaded classes\n * cc.js._registeredClassIds = builtinClassIds;\n * cc.js._registeredClassNames = builtinClassNames;\n */\n var doSetClassName = setup('__classname__', '_registeredClassNames', _nameToClass);\n\n /**\n * Register the class by specified name manually\n * @method setClassName\n * @param {String} className\n * @param {Function} constructor\n */\n js.setClassName = function (className, constructor) {\n doSetClassName(className, constructor);\n // auto set class id\n if (!constructor.prototype.hasOwnProperty('__cid__')) {\n var id = className || tempCIDGenerater.getNewId();\n if (id) {\n js._setClassId(id, constructor);\n }\n }\n };\n\n /**\n * Unregister a class from fireball.\n *\n * If you dont need a registered class anymore, you should unregister the class so that Fireball will not keep its reference anymore.\n * Please note that its still your responsibility to free other references to the class.\n *\n * @method unregisterClass\n * @param {Function} ...constructor - the class you will want to unregister, any number of classes can be added\n */\n js.unregisterClass = function () {\n for (var i = 0; i < arguments.length; i++) {\n var p = arguments[i].prototype;\n var classId = p.__cid__;\n if (classId) {\n delete _idToClass[classId];\n }\n var classname = p.__classname__;\n if (classname) {\n delete _nameToClass[classname];\n }\n }\n };\n\n /**\n * Get the registered class by id\n * @method _getClassById\n * @param {String} classId\n * @return {Function} constructor\n * @private\n */\n js._getClassById = function (classId) {\n return _idToClass[classId];\n };\n\n /**\n * Get the registered class by name\n * @method getClassByName\n * @param {String} classname\n * @return {Function} constructor\n */\n js.getClassByName = function (classname) {\n return _nameToClass[classname];\n };\n\n /**\n * Get class id of the object\n * @method _getClassId\n * @param {Object|Function} obj - instance or constructor\n * @param {Boolean} [allowTempId=true] - can return temp id in editor\n * @return {String}\n * @private\n */\n js._getClassId = function (obj, allowTempId) {\n allowTempId = (typeof allowTempId !== 'undefined' ? allowTempId: true);\n\n var res;\n if (typeof obj === 'function' && obj.prototype.hasOwnProperty('__cid__')) {\n res = obj.prototype.__cid__;\n if (!allowTempId && (CC_DEV || CC_EDITOR) && isTempClassId(res)) {\n return '';\n }\n return res;\n }\n if (obj && obj.constructor) {\n var prototype = obj.constructor.prototype;\n if (prototype && prototype.hasOwnProperty('__cid__')) {\n res = obj.__cid__;\n if (!allowTempId && (CC_DEV || CC_EDITOR) && isTempClassId(res)) {\n return '';\n }\n return res;\n }\n }\n return '';\n };\n})();\n\n/**\n * Defines a polyfill field for deprecated codes.\n * @method obsolete\n * @param {any} obj - YourObject or YourClass.prototype\n * @param {String} obsoleted - \"OldParam\" or \"YourClass.OldParam\"\n * @param {String} newExpr - \"NewParam\" or \"YourClass.NewParam\"\n * @param {Boolean} [writable=false]\n */\njs.obsolete = function (obj, obsoleted, newExpr, writable) {\n var extractPropName = /([^.]+)$/;\n var oldProp = extractPropName.exec(obsoleted)[0];\n var newProp = extractPropName.exec(newExpr)[0];\n function get () {\n if (CC_DEV) {\n cc.warnID(1400, obsoleted, newExpr);\n }\n return this[newProp];\n }\n if (writable) {\n js.getset(obj, oldProp,\n get,\n function (value) {\n if (CC_DEV) {\n cc.warnID(1400, obsoleted, newExpr);\n }\n this[newProp] = value;\n }\n );\n }\n else {\n js.get(obj, oldProp, get);\n }\n};\n\n/**\n * Defines all polyfill fields for obsoleted codes corresponding to the enumerable properties of props.\n * @method obsoletes\n * @param {any} obj - YourObject or YourClass.prototype\n * @param {any} objName - \"YourObject\" or \"YourClass\"\n * @param {Object} props\n * @param {Boolean} [writable=false]\n */\njs.obsoletes = function (obj, objName, props, writable) {\n for (var obsoleted in props) {\n var newName = props[obsoleted];\n js.obsolete(obj, objName + '.' + obsoleted, newName, writable);\n }\n};\n\nvar REGEXP_NUM_OR_STR = /(%d)|(%s)/;\nvar REGEXP_STR = /%s/;\n\n/**\n * A string tool to construct a string with format string.\n * @method formatStr\n * @param {String|any} msg - A JavaScript string containing zero or more substitution strings (%s).\n * @param {any} ...subst - JavaScript objects with which to replace substitution strings within msg. This gives you additional control over the format of the output.\n * @returns {String}\n * @example\n * cc.js.formatStr(\"a: %s, b: %s\", a, b);\n * cc.js.formatStr(a, b, c);\n */\njs.formatStr = function () {\n var argLen = arguments.length;\n if (argLen === 0) {\n return '';\n }\n var msg = arguments[0];\n if (argLen === 1) {\n return '' + msg;\n }\n\n var hasSubstitution = typeof msg === 'string' && REGEXP_NUM_OR_STR.test(msg);\n if (hasSubstitution) {\n for (let i = 1; i < argLen; ++i) {\n var arg = arguments[i];\n var regExpToTest = typeof arg === 'number' ? REGEXP_NUM_OR_STR : REGEXP_STR;\n if (regExpToTest.test(msg)) {\n const notReplaceFunction = '' + arg;\n msg = msg.replace(regExpToTest, notReplaceFunction);\n }\n else\n msg += ' ' + arg;\n }\n }\n else {\n for (let i = 1; i < argLen; ++i) {\n msg += ' ' + arguments[i];\n }\n }\n return msg;\n};\n\n// see https://github.com/petkaantonov/bluebird/issues/1389\njs.shiftArguments = function () {\n var len = arguments.length - 1;\n var args = new Array(len);\n for(var i = 0; i < len; ++i) {\n args[i] = arguments[i + 1];\n }\n return args;\n};\n\n/**\n * !#en\n * A simple wrapper of `Object.create(null)` which ensures the return object have no prototype (and thus no inherited members). So we can skip `hasOwnProperty` calls on property lookups. It is a worthwhile optimization than the `{}` literal when `hasOwnProperty` calls are necessary.\n * !#zh\n * 该方法是对 `Object.create(null)` 的简单封装。`Object.create(null)` 用于创建无 prototype (也就无继承)的空对象。这样我们在该对象上查找属性时,就不用进行 `hasOwnProperty` 判断。在需要频繁判断 `hasOwnProperty` 时,使用这个方法性能会比 `{}` 更高。\n *\n * @method createMap\n * @param {Boolean} [forceDictMode=false] - Apply the delete operator to newly created map object. This causes V8 to put the object in \"dictionary mode\" and disables creation of hidden classes which are very expensive for objects that are constantly changing shape.\n * @return {Object}\n */\njs.createMap = function (forceDictMode) {\n var map = Object.create(null);\n if (forceDictMode) {\n const INVALID_IDENTIFIER_1 = '.';\n const INVALID_IDENTIFIER_2 = '/';\n map[INVALID_IDENTIFIER_1] = true;\n map[INVALID_IDENTIFIER_2] = true;\n delete map[INVALID_IDENTIFIER_1];\n delete map[INVALID_IDENTIFIER_2];\n }\n return map;\n};\n\n/**\n * @class array\n * @static\n */\n\n/**\n * Removes the array item at the specified index.\n * @method removeAt\n * @param {any[]} array\n * @param {Number} index\n */\nfunction removeAt (array, index) {\n array.splice(index, 1);\n}\n\n/**\n * Removes the array item at the specified index.\n * It's faster but the order of the array will be changed.\n * @method fastRemoveAt\n * @param {any[]} array\n * @param {Number} index\n */\nfunction fastRemoveAt (array, index) {\n var length = array.length;\n if (index < 0 || index >= length) {\n return;\n }\n array[index] = array[length - 1];\n array.length = length - 1;\n}\n\n/**\n * Removes the first occurrence of a specific object from the array.\n * @method remove\n * @param {any[]} array\n * @param {any} value\n * @return {Boolean}\n */\nfunction remove (array, value) {\n var index = array.indexOf(value);\n if (index >= 0) {\n removeAt(array, index);\n return true;\n }\n else {\n return false;\n }\n}\n\n/**\n * Removes the first occurrence of a specific object from the array.\n * It's faster but the order of the array will be changed.\n * @method fastRemove\n * @param {any[]} array\n * @param {Number} value\n */\nfunction fastRemove (array, value) {\n var index = array.indexOf(value);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n --array.length;\n }\n}\n\n/**\n * Verify array's Type\n * @method verifyType\n * @param {array} array\n * @param {Function} type\n * @return {Boolean}\n */\nfunction verifyType (array, type) {\n if (array && array.length > 0) {\n for (var i = 0; i < array.length; i++) {\n if (!(array[i] instanceof type)) {\n cc.logID(1300);\n return false;\n }\n }\n }\n return true;\n}\n\n/**\n * Removes from array all values in minusArr. For each Value in minusArr, the first matching instance in array will be removed.\n * @method removeArray\n * @param {Array} array Source Array\n * @param {Array} minusArr minus Array\n */\nfunction removeArray (array, minusArr) {\n for (var i = 0, l = minusArr.length; i < l; i++) {\n remove(array, minusArr[i]);\n }\n}\n\n/**\n * Inserts some objects at index\n * @method appendObjectsAt\n * @param {Array} array\n * @param {Array} addObjs\n * @param {Number} index\n * @return {Array}\n */\nfunction appendObjectsAt (array, addObjs, index) {\n array.splice.apply(array, [index, 0].concat(addObjs));\n return array;\n}\n\n/**\n * Determines whether the array contains a specific value.\n * @method contains\n * @param {any[]} array\n * @param {any} value\n * @return {Boolean}\n */\nfunction contains (array, value) {\n return array.indexOf(value) >= 0;\n}\n\n/**\n * Copy an array's item to a new array (its performance is better than Array.slice)\n * @method copy\n * @param {Array} array\n * @return {Array}\n */\nfunction copy (array) {\n var i, len = array.length, arr_clone = new Array(len);\n for (i = 0; i < len; i += 1)\n arr_clone[i] = array[i];\n return arr_clone;\n}\n\njs.array = {\n remove,\n fastRemove,\n removeAt,\n fastRemoveAt,\n contains,\n verifyType,\n removeArray,\n appendObjectsAt,\n copy,\n MutableForwardIterator: require('../utils/mutable-forward-iterator')\n};\n\n// OBJECT POOL\n\n/**\n * !#en\n * A fixed-length object pool designed for general type.<br>\n * The implementation of this object pool is very simple,\n * it can helps you to improve your game performance for objects which need frequent release and recreate operations<br/>\n * !#zh\n * 长度固定的对象缓存池,可以用来缓存各种对象类型。<br/>\n * 这个对象池的实现非常精简,它可以帮助您提高游戏性能,适用于优化对象的反复创建和销毁。\n * @class Pool\n * @example\n *\n *Example 1:\n *\n *function Details () {\n * this.uuidList = [];\n *};\n *Details.prototype.reset = function () {\n * this.uuidList.length = 0;\n *};\n *Details.pool = new js.Pool(function (obj) {\n * obj.reset();\n *}, 5);\n *Details.pool.get = function () {\n * return this._get() || new Details();\n *};\n *\n *var detail = Details.pool.get();\n *...\n *Details.pool.put(detail);\n *\n *Example 2:\n *\n *function Details (buffer) {\n * this.uuidList = buffer;\n *};\n *...\n *Details.pool.get = function (buffer) {\n * var cached = this._get();\n * if (cached) {\n * cached.uuidList = buffer;\n * return cached;\n * }\n * else {\n * return new Details(buffer);\n * }\n *};\n *\n *var detail = Details.pool.get( [] );\n *...\n */\n/**\n * !#en\n * Constructor for creating an object pool for the specific object type.\n * You can pass a callback argument for process the cleanup logic when the object is recycled.\n * !#zh\n * 使用构造函数来创建一个指定对象类型的对象池,您可以传递一个回调函数,用于处理对象回收时的清理逻辑。\n * @method constructor\n * @param {Function} [cleanupFunc] - the callback method used to process the cleanup logic when the object is recycled.\n * @param {Object} cleanupFunc.obj\n * @param {Number} size - initializes the length of the array\n * @typescript\n * constructor(cleanupFunc: (obj: any) => void, size: number)\n * constructor(size: number)\n */\nfunction Pool (cleanupFunc, size) {\n if (size === undefined) {\n size = cleanupFunc;\n cleanupFunc = null;\n }\n this.get = null;\n this.count = 0;\n this._pool = new Array(size);\n this._cleanup = cleanupFunc;\n}\n\n/**\n * !#en\n * Get and initialize an object from pool. This method defaults to null and requires the user to implement it.\n * !#zh\n * 获取并初始化对象池中的对象。这个方法默认为空,需要用户自己实现。\n * @method get\n * @param {any} ...params - parameters to used to initialize the object\n * @returns {Object}\n */\n\n/**\n * !#en\n * The current number of available objects, the default is 0, it will gradually increase with the recycle of the object,\n * the maximum will not exceed the size specified when the constructor is called.\n * !#zh\n * 当前可用对象数量,一开始默认是 0随着对象的回收会逐渐增大最大不会超过调用构造函数时指定的 size。\n * @property {Number} count\n * @default 0\n */\n\n/**\n * !#en\n * Get an object from pool, if no available object in the pool, null will be returned.\n * !#zh\n * 获取对象池中的对象,如果对象池没有可用对象,则返回空。\n * @method _get\n * @returns {Object|null}\n */\nPool.prototype._get = function () {\n if (this.count > 0) {\n --this.count;\n var cache = this._pool[this.count];\n this._pool[this.count] = null;\n return cache;\n }\n return null;\n};\n\n/**\n * !#en Put an object into the pool.\n * !#zh 向对象池返还一个不再需要的对象。\n * @method put\n */\nPool.prototype.put = function (obj) {\n var pool = this._pool;\n if (this.count < pool.length) {\n if (this._cleanup && this._cleanup(obj) === false) {\n return;\n }\n pool[this.count] = obj;\n ++this.count;\n }\n};\n\n/**\n * !#en Resize the pool.\n * !#zh 设置对象池容量。\n * @method resize\n */\nPool.prototype.resize = function (length) {\n if (length >= 0) {\n this._pool.length = length;\n if (this.count > length) {\n this.count = length;\n }\n }\n};\n\njs.Pool = Pool;\n\n//\n\ncc.js = js;\n\nmodule.exports = js;\n\n// fix submodule pollute ...\n/**\n * @submodule cc\n */\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst js = require('./js');\nconst Attrs = require('./attribute');\n\n// 增加预处理属性这个步骤的目的是降低 CCClass 的实现难度,将比较稳定的通用逻辑和一些需求比较灵活的属性需求分隔开。\n\nvar SerializableAttrs = {\n default: {},\n serializable: {},\n editorOnly: {},\n formerlySerializedAs: {}\n};\n\nvar TYPO_TO_CORRECT_DEV = CC_DEV && {\n extend: 'extends',\n property: 'properties',\n static: 'statics',\n constructor: 'ctor'\n};\n\n// 预处理 notify 等扩展属性\nfunction parseNotify (val, propName, notify, properties) {\n if (val.get || val.set) {\n if (CC_DEV) {\n cc.warnID(5500);\n }\n return;\n }\n if (val.hasOwnProperty('default')) {\n // 添加新的内部属性,将原来的属性修改为 getter/setter 形式\n // (以 _ 开头将自动设置property 为 visible: false\n var newKey = \"_N$\" + propName;\n\n val.get = function () {\n return this[newKey];\n };\n val.set = function (value) {\n var oldValue = this[newKey];\n this[newKey] = value;\n notify.call(this, oldValue);\n };\n\n if (CC_EDITOR) {\n val.notifyFor = newKey;\n }\n\n var newValue = {};\n properties[newKey] = newValue;\n // 将不能用于get方法中的属性移动到newValue中\n for (var attr in SerializableAttrs) {\n var v = SerializableAttrs[attr];\n if (val.hasOwnProperty(attr)) {\n newValue[attr] = val[attr];\n if (!v.canUsedInGet) {\n delete val[attr];\n }\n }\n }\n }\n else if (CC_DEV) {\n cc.warnID(5501);\n }\n}\n\nfunction parseType (val, type, className, propName) {\n const STATIC_CHECK = (CC_EDITOR && CC_DEV) || CC_TEST;\n\n if (Array.isArray(type)) {\n if (STATIC_CHECK && 'default' in val) {\n var isArray = require('./CCClass').isArray; // require lazily to avoid circular require() calls\n if (!isArray(val.default)) {\n cc.warnID(5507, className, propName);\n }\n }\n if (type.length > 0) {\n val.type = type = type[0];\n }\n else {\n return cc.errorID(5508, className, propName);\n }\n }\n if (typeof type === 'function') {\n if (type === String) {\n val.type = cc.String;\n if (STATIC_CHECK) {\n cc.warnID(3608, `\"${className}.${propName}\"`);\n }\n }\n else if (type === Boolean) {\n val.type = cc.Boolean;\n if (STATIC_CHECK) {\n cc.warnID(3609, `\"${className}.${propName}\"`);\n }\n }\n else if (type === Number) {\n val.type = cc.Float;\n if (STATIC_CHECK) {\n cc.warnID(3610, `\"${className}.${propName}\"`);\n }\n }\n }\n else if (STATIC_CHECK) {\n switch (type) {\n case 'Number':\n cc.warnID(5510, className, propName);\n break;\n case 'String':\n cc.warn(`The type of \"${className}.${propName}\" must be cc.String, not \"String\".`);\n break;\n case 'Boolean':\n cc.warn(`The type of \"${className}.${propName}\" must be cc.Boolean, not \"Boolean\".`);\n break;\n case 'Float':\n cc.warn(`The type of \"${className}.${propName}\" must be cc.Float, not \"Float\".`);\n break;\n case 'Integer':\n cc.warn(`The type of \"${className}.${propName}\" must be cc.Integer, not \"Integer\".`);\n break;\n case null:\n cc.warnID(5511, className, propName);\n break;\n }\n }\n\n if (CC_EDITOR && typeof type === 'function') {\n if (cc.Class._isCCClass(type) && val.serializable !== false && !js._getClassId(type, false)) {\n cc.warnID(5512, className, propName, className, propName);\n }\n }\n}\n\nfunction getBaseClassWherePropertyDefined_DEV (propName, cls) {\n if (CC_DEV) {\n var res;\n for (; cls && cls.__props__ && cls.__props__.indexOf(propName) !== -1; cls = cls.$super) {\n res = cls;\n }\n if (!res) {\n cc.error('unknown error');\n }\n return res;\n }\n}\n\nfunction _wrapOptions (isES6Getset, _default, type) {\n let res = isES6Getset ? { _short: true } : { _short: true, default: _default };\n if (type) {\n res.type = type;\n }\n return res;\n}\n\nexports.getFullFormOfProperty = function (options, isES6Getset) {\n var isLiteral = options && options.constructor === Object;\n if (isLiteral) {\n return null;\n }\n if (Array.isArray(options) && options.length > 0) {\n return _wrapOptions(isES6Getset, [], options);\n }\n else if (typeof options === 'function') {\n return _wrapOptions(isES6Getset, js.isChildClassOf(options, cc.ValueType) ? new options() : null, options);\n }\n else if (options instanceof Attrs.PrimitiveType) {\n return _wrapOptions(isES6Getset, options.default);\n }\n else {\n return _wrapOptions(isES6Getset, options);\n }\n};\n\nexports.preprocessAttrs = function (properties, className, cls, es6) {\n for (var propName in properties) {\n var val = properties[propName];\n var fullForm = exports.getFullFormOfProperty(val, false);\n if (fullForm) {\n val = properties[propName] = fullForm;\n }\n if (val) {\n if (CC_EDITOR) {\n if ('default' in val) {\n if (val.get) {\n cc.errorID(5513, className, propName);\n }\n else if (val.set) {\n cc.errorID(5514, className, propName);\n }\n else if (cc.Class._isCCClass(val.default)) {\n val.default = null;\n cc.errorID(5515, className, propName);\n }\n }\n else if (!val.get && !val.set) {\n var maybeTypeScript = es6;\n if (!maybeTypeScript) {\n cc.errorID(5516, className, propName);\n }\n }\n }\n if (CC_DEV && !val.override && cls.__props__.indexOf(propName) !== -1) {\n // check override\n var baseClass = js.getClassName(getBaseClassWherePropertyDefined_DEV(propName, cls));\n cc.warnID(5517, className, propName, baseClass, propName);\n }\n var notify = val.notify;\n if (notify) {\n if (CC_DEV && es6) {\n cc.error('not yet support notify attribute for ES6 Classes');\n }\n else {\n parseNotify(val, propName, notify, properties);\n }\n }\n\n if ('type' in val) {\n parseType(val, val.type, className, propName);\n }\n }\n }\n};\n\nif (CC_DEV) {\n const CALL_SUPER_DESTROY_REG_DEV = /\\b\\._super\\b|destroy\\s*\\.\\s*call\\s*\\(\\s*\\w+\\s*[,|)]/;\n exports.doValidateMethodWithProps_DEV = function (func, funcName, className, cls, base) {\n if (cls.__props__ && cls.__props__.indexOf(funcName) >= 0) {\n // find class that defines this method as a property\n var baseClassName = js.getClassName(getBaseClassWherePropertyDefined_DEV(funcName, cls));\n cc.errorID(3648, className, funcName, baseClassName);\n return false;\n }\n if (funcName === 'destroy' &&\n js.isChildClassOf(base, cc.Component) &&\n !CALL_SUPER_DESTROY_REG_DEV.test(func)\n ) {\n cc.error(`Overwriting '${funcName}' function in '${className}' class without calling super is not allowed. Call the super function in '${funcName}' please.`);\n }\n };\n}\n\nexports.validateMethodWithProps = function (func, funcName, className, cls, base) {\n if (CC_DEV && funcName === 'constructor') {\n cc.errorID(3643, className);\n return false;\n }\n if (typeof func === 'function' || func === null) {\n if (CC_DEV) {\n this.doValidateMethodWithProps_DEV(func, funcName, className, cls, base);\n }\n }\n else {\n if (CC_DEV) {\n if (func === false && base && base.prototype) {\n // check override\n var overrided = base.prototype[funcName];\n if (typeof overrided === 'function') {\n var baseFuc = js.getClassName(base) + '.' + funcName;\n var subFuc = className + '.' + funcName;\n cc.warnID(3624, subFuc, baseFuc, subFuc, subFuc);\n }\n }\n var correct = TYPO_TO_CORRECT_DEV[funcName];\n if (correct) {\n cc.warnID(3621, className, funcName, correct);\n }\n else if (func) {\n cc.errorID(3622, className, funcName);\n }\n }\n return false;\n }\n return true;\n};\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar requiringFrames = []; // the requiring frame infos\n\ncc._RF = {\n push: function (module, uuid, script) {\n if (script === undefined) {\n script = uuid;\n uuid = '';\n }\n requiringFrames.push({\n uuid: uuid,\n script: script,\n module: module,\n exports: module.exports, // original exports\n beh: null\n });\n },\n pop: function () {\n var frameInfo = requiringFrames.pop();\n // check exports\n var module = frameInfo.module;\n var exports = module.exports;\n if (exports === frameInfo.exports) {\n for (var anyKey in exports) {\n // exported\n return;\n }\n // auto export component\n module.exports = exports = frameInfo.cls;\n }\n },\n peek: function () {\n return requiringFrames[requiringFrames.length - 1];\n }\n};\n\nif (CC_EDITOR) {\n cc._RF.reset = function () {\n requiringFrames = [];\n };\n}\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n// TODO - merge with misc.js\nconst js = require('./js');\n\nmodule.exports = {\n contains: function (refNode, otherNode) {\n if(typeof refNode.contains == 'function'){\n return refNode.contains(otherNode);\n }else if(typeof refNode.compareDocumentPosition == 'function' ) {\n return !!(refNode.compareDocumentPosition(otherNode) & 16);\n }else {\n var node = otherNode.parentNode;\n if (node) {\n do {\n if (node === refNode) {\n return true;\n } else {\n node = node.parentNode;\n }\n } while (node !==null);\n }\n return false;\n }\n },\n\n isDomNode: typeof window === 'object' && (typeof Node === 'function' ?\n function (obj) {\n // If \"TypeError: Right-hand side of 'instanceof' is not callback\" is thrown,\n // it should because window.Node was overwritten.\n return obj instanceof Node;\n } :\n function (obj) {\n return obj &&\n typeof obj === 'object' &&\n typeof obj.nodeType === 'number' &&\n typeof obj.nodeName === 'string';\n }\n ),\n\n callInNextTick: CC_EDITOR ?\n function (callback, p1, p2) {\n if (callback) {\n process.nextTick(function () {\n callback(p1, p2);\n });\n }\n }\n :\n (\n \n function (callback, p1, p2) {\n if (callback) {\n setTimeout(function () {\n callback(p1, p2);\n }, 0);\n }\n }\n )\n};\n\nif (CC_DEV) {\n ///**\n // * @param {Object} obj\n // * @return {Boolean} is {} ?\n // */\n module.exports.isPlainEmptyObj_DEV = function (obj) {\n if (!obj || obj.constructor !== Object) {\n return false;\n }\n \n return js.isEmptyObject(obj);\n };\n module.exports.cloneable_DEV = function (obj) {\n return obj &&\n typeof obj.clone === 'function' &&\n ( (obj.constructor && obj.constructor.prototype.hasOwnProperty('clone')) || obj.hasOwnProperty('clone') );\n };\n}\n\nif (CC_TEST) {\n // editor mocks using in unit tests\n if (typeof Editor === 'undefined') {\n window.Editor = {\n UuidUtils: {\n NonUuidMark: '.',\n uuid: function () {\n return '' + ((new Date()).getTime() + Math.random());\n }\n }\n };\n }\n}\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n// predefine some modules for cocos\nrequire('./platform/js');\nrequire('./value-types');\nrequire('./utils');\nrequire('./platform/CCInputManager');\nrequire('./platform/CCInputExtension');\nrequire('./event');\nrequire('./platform/CCSys');\nrequire('./platform/CCMacro');\nrequire('./asset-manager');\nrequire('./CCDirector');\nrequire('./renderer');\n\nif (!(CC_EDITOR && Editor.isMainProcess)) {\n require('./platform/CCView');\n require('./platform/CCScreen');\n require('./CCScheduler');\n require('./event-manager');\n}\n","import Assembler from './assembler';\nimport dynamicAtlasManager from './utils/dynamic-atlas/manager';\nimport RenderData from './webgl/render-data';\n\nexport default class Assembler2D extends Assembler {\n constructor () {\n super();\n\n this._renderData = new RenderData();\n this._renderData.init(this);\n \n this.initData();\n this.initLocal();\n }\n\n get verticesFloats () {\n return this.verticesCount * this.floatsPerVert;\n }\n\n initData () {\n let data = this._renderData;\n data.createQuadData(0, this.verticesFloats, this.indicesCount);\n }\n initLocal () {\n this._local = [];\n this._local.length = 4;\n }\n\n updateColor (comp, color) {\n let uintVerts = this._renderData.uintVDatas[0];\n if (!uintVerts) return;\n color = color != null ? color : comp.node.color._val;\n let floatsPerVert = this.floatsPerVert;\n let colorOffset = this.colorOffset;\n for (let i = colorOffset, l = uintVerts.length; i < l; i += floatsPerVert) {\n uintVerts[i] = color;\n }\n }\n\n getBuffer () {\n return cc.renderer._handle._meshBuffer;\n }\n\n updateWorldVerts (comp) {\n let local = this._local;\n let verts = this._renderData.vDatas[0];\n\n let matrix = comp.node._worldMatrix;\n let matrixm = matrix.m,\n a = matrixm[0], b = matrixm[1], c = matrixm[4], d = matrixm[5],\n tx = matrixm[12], ty = matrixm[13];\n\n let vl = local[0], vr = local[2],\n vb = local[1], vt = local[3];\n \n let floatsPerVert = this.floatsPerVert;\n let vertexOffset = 0;\n let justTranslate = a === 1 && b === 0 && c === 0 && d === 1;\n\n if (justTranslate) {\n // left bottom\n verts[vertexOffset] = vl + tx;\n verts[vertexOffset + 1] = vb + ty;\n vertexOffset += floatsPerVert;\n // right bottom\n verts[vertexOffset] = vr + tx;\n verts[vertexOffset + 1] = vb + ty;\n vertexOffset += floatsPerVert;\n // left top\n verts[vertexOffset] = vl + tx;\n verts[vertexOffset + 1] = vt + ty;\n vertexOffset += floatsPerVert;\n // right top\n verts[vertexOffset] = vr + tx;\n verts[vertexOffset + 1] = vt + ty;\n } else {\n let al = a * vl, ar = a * vr,\n bl = b * vl, br = b * vr,\n cb = c * vb, ct = c * vt,\n db = d * vb, dt = d * vt;\n\n // left bottom\n verts[vertexOffset] = al + cb + tx;\n verts[vertexOffset + 1] = bl + db + ty;\n vertexOffset += floatsPerVert;\n // right bottom\n verts[vertexOffset] = ar + cb + tx;\n verts[vertexOffset + 1] = br + db + ty;\n vertexOffset += floatsPerVert;\n // left top\n verts[vertexOffset] = al + ct + tx;\n verts[vertexOffset + 1] = bl + dt + ty;\n vertexOffset += floatsPerVert;\n // right top\n verts[vertexOffset] = ar + ct + tx;\n verts[vertexOffset + 1] = br + dt + ty;\n }\n }\n\n fillBuffers (comp, renderer) {\n if (renderer.worldMatDirty) {\n this.updateWorldVerts(comp);\n }\n\n let renderData = this._renderData;\n let vData = renderData.vDatas[0];\n let iData = renderData.iDatas[0];\n\n let buffer = this.getBuffer(renderer);\n let offsetInfo = buffer.request(this.verticesCount, this.indicesCount);\n\n // buffer data may be realloc, need get reference after request.\n\n // fill vertices\n let vertexOffset = offsetInfo.byteOffset >> 2,\n vbuf = buffer._vData;\n\n if (vData.length + vertexOffset > vbuf.length) {\n vbuf.set(vData.subarray(0, vbuf.length - vertexOffset), vertexOffset);\n } else {\n vbuf.set(vData, vertexOffset);\n }\n\n // fill indices\n let ibuf = buffer._iData,\n indiceOffset = offsetInfo.indiceOffset,\n vertexId = offsetInfo.vertexOffset;\n for (let i = 0, l = iData.length; i < l; i++) {\n ibuf[indiceOffset++] = vertexId + iData[i];\n }\n }\n\n updateTexId(comp) {\n const texId = comp._texId;\n let texIdOffset = this.texIdOffset;\n let floatsPerVert = this.floatsPerVert;\n let verts = this._renderData.vDatas[0];\n for (let i = 0, l = verts.length; i < l; i++) {\n verts[floatsPerVert * i + texIdOffset] = texId;\n }\n }\n}\n\ncc.js.addon(Assembler2D.prototype, {\n floatsPerVert: 5,\n\n verticesCount: 4,\n indicesCount: 6,\n\n uvOffset: 2,\n colorOffset: 4,\n\n isMulti: false,\n});\n\ncc.Assembler2D = Assembler2D;\n","import Pool from '../utils/pool';\n\nlet _assemblerId = 0;\n\nfunction getAssemblerId (assemblerCtor) {\n if (!Object.getOwnPropertyDescriptor(assemblerCtor, '__assemblerId__')) {\n assemblerCtor.__assemblerId__ = ++_assemblerId;\n }\n return assemblerCtor.__assemblerId__;\n}\n\n/**\n * {\n * assembler_ctor_id: []\n * }\n */\nclass AssemblerPool extends Pool {\n _pool = {};\n\n put (assembler) {\n if (!assembler) return;\n if (!this.enabled) {\n if (CC_JSB && CC_NATIVERENDERER) {\n assembler.destroy && assembler.destroy();\n }\n return;\n }\n\n let id = getAssemblerId(assembler.constructor);\n let pool = this._pool;\n if (!pool[id]) {\n pool[id] = [];\n }\n if (this.count > this.maxSize) return;\n\n this._clean(assembler);\n pool[id].push(assembler);\n this.count++;\n }\n\n get (assemblerCtor) {\n let assembler;\n \n if (this.enabled) {\n let pool = this._pool;\n let id = getAssemblerId(assemblerCtor);\n assembler = pool[id] && pool[id].pop();\n }\n\n if (!assembler) {\n assembler = new assemblerCtor();\n }\n else {\n this.count--;\n }\n return assembler;\n }\n\n clear () {\n if (CC_JSB && CC_NATIVERENDERER) {\n let pool = this._pool;\n for (let name in pool) {\n let assemblers = pool[name];\n if (!assemblers) continue;\n\n for (let i = 0; i < assemblers.length; i++) {\n assemblers[i].destroy && assemblers[i].destroy();\n }\n }\n }\n \n this._pool = {};\n this.count = 0;\n }\n\n _clean (assembler) {\n if (CC_JSB && CC_NATIVERENDERER) {\n assembler.reset();\n }\n assembler._renderComp = null;\n }\n}\n\nlet pool = new AssemblerPool();\nPool.register('assembler', pool);\nexport default pool;\n","import { vfmtPosUvColor } from './webgl/vertex-format';\nimport assemblerPool from './assembler-pool';\nimport dynamicAtlasManager from './utils/dynamic-atlas/manager';\n\nexport default class Assembler {\n constructor () {\n this._extendNative && this._extendNative();\n }\n init (renderComp) {\n this._renderComp = renderComp;\n }\n \n updateRenderData (comp) {\n }\n\n updateRenderDataForSwitchMaterial(comp) {\n\n }\n\n fillBuffers (comp, renderer) {\n }\n \n getVfmt () {\n return vfmtPosUvColor;\n }\n\n packDynamicAtlasAndCheckMaterial(comp, frame) {\n if (CC_TEST) return false;\n\n const allowDynamicAtlas = comp.allowDynamicAtlas;\n if ((cc.sp.allowDynamicAtlas && allowDynamicAtlas === 0) || allowDynamicAtlas === 1) {\n if (!frame._original && dynamicAtlasManager && frame._texture.packable && frame._texture.loaded) {\n let packedFrame = dynamicAtlasManager.insertSpriteFrame(frame);\n if (packedFrame) {\n frame._setDynamicAtlasFrame(packedFrame);\n }\n }\n }\n\n const material = comp._materials[0];\n if (!material) return false;\n\n // 自动切换材质\n if (this.checkAndSwitchMaterial(comp, frame._texture, material)) {\n return true;\n }\n\n if (material.material.isMultiSupport()) {\n comp._texIdDirty = true;\n } else {\n if (material.getProperty('texture') !== frame._texture._texture) {\n // texture was packed to dynamic atlas, should update uvs\n comp._vertsDirty = true;\n comp._updateMaterial();\n }\n }\n\n return false;\n }\n\n checkAndSwitchMaterial(comp, texture, material) {\n const autoSwitchMaterial = comp.autoSwitchMaterial;\n if ((cc.sp.autoSwitchMaterial && autoSwitchMaterial === 0) || autoSwitchMaterial === 1) {\n if (texture._multiMaterial) {\n if (material.material !== texture._multiMaterial) {\n // 避免在 Native 平台时再次进入渲染待刷新队列\n if (CC_JSB) comp.node._inJsbDirtyList = true;\n comp.setMaterial(0, texture._multiMaterial);\n if (CC_JSB) comp.node._inJsbDirtyList = false;\n // setMaterial 中会置 comp._texIdDirty = true;\n if (!this.isMulti) {\n if (comp._assembler) comp._assembler.updateRenderDataForSwitchMaterial(comp);\n return true;\n }\n }\n }\n }\n }\n\n}\n\n\nAssembler.register = function (renderCompCtor, assembler) {\n renderCompCtor.__assembler__ = assembler;\n};\n\nAssembler.init = function (renderComp) {\n let renderCompCtor = renderComp.constructor;\n let assemblerCtor = renderCompCtor.__assembler__;\n while (!assemblerCtor) {\n renderCompCtor = renderCompCtor.$super;\n if (!renderCompCtor) {\n cc.warn(`Can not find assembler for render component : [${cc.js.getClassName(renderComp)}]`);\n return;\n }\n assemblerCtor = renderCompCtor.__assembler__;\n }\n if (assemblerCtor.getConstructor) {\n assemblerCtor = assemblerCtor.getConstructor(renderComp);\n }\n \n if (!renderComp._assembler || renderComp._assembler.constructor !== assemblerCtor) {\n let assembler = assemblerPool.get(assemblerCtor);\n assembler.init(renderComp);\n renderComp._assembler = assembler;\n }\n};\n\ncc.Assembler = Assembler;\n","\n// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. \n \nvar Device = function Device(canvasEL) {\n var ctx;\n\n try {\n ctx = canvasEL.getContext('2d');\n } catch (err) {\n console.error(err);\n return;\n }\n\n // statics\n this._canvas = canvasEL;\n this._ctx = ctx;\n this._caps = {}; // capability\n this._stats = {\n drawcalls: 0,\n };\n\n // runtime\n this._vx = this._vy = this._vw = this._vh = 0;\n this._sx = this._sy = this._sw = this._sh = 0;\n};\n\nDevice.prototype._restoreTexture = function _restoreTexture (unit) {\n};\n\n// ===============================\n// Immediate Settings\n// ===============================\n\n/**\n * @method setViewport\n * @param {Number} x\n * @param {Number} y\n * @param {Number} w\n * @param {Number} h\n */\nDevice.prototype.setViewport = function setViewport (x, y, w, h) {\n if (\n this._vx !== x ||\n this._vy !== y ||\n this._vw !== w ||\n this._vh !== h\n ) {\n this._vx = x;\n this._vy = y;\n this._vw = w;\n this._vh = h;\n }\n};\n\n/**\n * @method setScissor\n * @param {Number} x\n * @param {Number} y\n * @param {Number} w\n * @param {Number} h\n */\nDevice.prototype.setScissor = function setScissor (x, y, w, h) {\n if (\n this._sx !== x ||\n this._sy !== y ||\n this._sw !== w ||\n this._sh !== h\n ) {\n this._sx = x;\n this._sy = y;\n this._sw = w;\n this._sh = h;\n }\n};\n\nDevice.prototype.clear = function clear (color) {\n var ctx = this._ctx;\n ctx.clearRect(this._vx, this._vy, this._vw, this._vh);\n if (color && (color[0] !== 0 || color[1] !== 0 || color[2] !== 0)) {\n ctx.fillStyle = 'rgb(' + color[0] + ',' + color[1] + ',' + color[2] +')';\n ctx.globalAlpha = color[3];\n ctx.fillRect(this._vx, this._vy, this._vw, this._vh);\n }\n};\n\nDevice.prototype.resetDrawCalls = function () {\n this._stats.drawcalls = 0;\n}\n\nDevice.prototype.getDrawCalls = function () {\n return this._stats.drawcalls;\n}\n\nmodule.exports = Device;\n","\n// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. \n \nvar Texture2D = function Texture2D(device, options) {\n this._device = device;\n \n this._width = 4;\n this._height = 4;\n\n this._image = null;\n\n if (options) {\n if (options.width !== undefined) {\n this._width = options.width;\n }\n if (options.height !== undefined) {\n this._height = options.height;\n }\n\n this.updateImage(options);\n }\n};\n\nTexture2D.prototype.update = function update (options) {\n this.updateImage(options);\n};\n\nTexture2D.prototype.updateImage = function updateImage (options) {\n if (options.images && options.images[0]) {\n var image = options.images[0];\n if (image && image !== this._image) {\n this._image = image;\n }\n }\n};\n\nTexture2D.prototype.destroy = function destroy () {\n this._image = null;\n};\n\nmodule.exports = Texture2D;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nimport gfx from '../../renderer/gfx';\n\nimport InputAssembler from '../../renderer/core/input-assembler';\nimport Pass from '../../renderer/core/pass';\n\n// const RenderFlow = require('./render-flow');\n\nfunction _initBuiltins(device) {\n let defaultTexture = new gfx.Texture2D(device, {\n images: [],\n width: 128,\n height: 128,\n wrapS: gfx.WRAP_REPEAT,\n wrapT: gfx.WRAP_REPEAT,\n format: gfx.TEXTURE_FMT_RGB8,\n genMipmaps: false,\n });\n\n return {\n defaultTexture: defaultTexture,\n programTemplates: [],\n programChunks: {},\n };\n}\n\n/**\n * @module cc\n */\n\n/**\n * !#en The renderer object which provide access to render system APIs, \n * detailed APIs will be available progressively.\n * !#zh 提供基础渲染接口的渲染器对象,渲染层的基础接口将逐步开放给用户\n * @class renderer\n * @static\n */\nexport default cc.renderer = {\n Texture2D: null,\n\n InputAssembler: InputAssembler,\n Pass: Pass,\n\n /**\n * !#en The render engine is available only after cc.game.EVENT_ENGINE_INITED event.<br/>\n * Normally it will be inited as the webgl render engine, but in wechat open context domain,\n * it will be inited as the canvas render engine. Canvas render engine is no longer available for other use case since v2.0.\n * !#zh 基础渲染引擎对象只在 cc.game.EVENT_ENGINE_INITED 事件触发后才可获取。<br/>\n * 大多数情况下,它都会是 WebGL 渲染引擎实例,但是在微信开放数据域当中,它会是 Canvas 渲染引擎实例。请注意,从 2.0 开始,我们在其他平台和环境下都废弃了 Canvas 渲染器。\n * @property renderEngine\n * @deprecated\n * @type {Object}\n */\n renderEngine: null,\n\n /*\n * !#en The canvas object which provides the rendering context\n * !#zh 用于渲染的 Canvas 对象\n * @property canvas\n * @type {HTMLCanvasElement}\n */\n canvas: null,\n /*\n * !#en The device object which provides device related rendering functionality, it divers for different render engine type.\n * !#zh 提供设备渲染能力的对象,它对于不同的渲染环境功能也不相同。\n * @property device\n * @type {renderer.Device}\n */\n device: null,\n scene: null,\n /**\n * !#en The total draw call count in last rendered frame.\n * !#zh 上一次渲染帧所提交的渲染批次总数。\n * @property drawCalls\n * @type {Number}\n */\n drawCalls: 0,\n // Render component handler\n _handle: null,\n _cameraNode: null,\n _camera: null,\n _forward: null,\n _flow: null,\n\n initWebGL (canvas, opts) {\n require('./webgl/assemblers');\n const ModelBatcher = require('./webgl/model-batcher');\n\n this.Texture2D = gfx.Texture2D;\n this.canvas = canvas;\n this._flow = cc.RenderFlow;\n \n if (CC_JSB && CC_NATIVERENDERER) {\n // native codes will create an instance of Device, so just use the global instance.\n this.device = gfx.Device.getInstance();\n this.scene = new renderer.Scene();\n let builtins = _initBuiltins(this.device);\n this._forward = new renderer.ForwardRenderer(this.device, builtins);\n let nativeFlow = new renderer.RenderFlow(this.device, this.scene, this._forward);\n this._flow.init(nativeFlow);\n }\n else {\n let Scene = require('../../renderer/scene/scene');\n let ForwardRenderer = require('../../renderer/renderers/forward-renderer');\n this.device = new gfx.Device(canvas, opts);\n this.scene = new Scene();\n let builtins = _initBuiltins(this.device);\n this._forward = new ForwardRenderer(this.device, builtins);\n this._handle = new ModelBatcher(this.device, this.scene);\n this._flow.init(this._handle, this._forward);\n }\n },\n\n initCanvas (canvas) {\n const canvasRenderer = require('./canvas');\n const Texture2D = require('./canvas/Texture2D');\n const Device = require('./canvas/Device');\n\n // It's actually running with original render engine\n this.Device = Device;\n\n this.Texture2D = Texture2D;\n\n this.canvas = canvas;\n this.device = new Device(canvas);\n this._camera = {\n a: 1, b: 0, c: 0, d: 1, tx: 0, ty: 0\n };\n this._handle = new canvasRenderer.RenderComponentHandle(this.device, this._camera);\n this._forward = new canvasRenderer.ForwardRenderer();\n this._flow = cc.RenderFlow;\n this._flow.init(this._handle, this._forward);\n },\n\n updateCameraViewport () {\n // TODO: remove HACK\n if (!CC_EDITOR && cc.director) {\n let ecScene = cc.director.getScene();\n if (ecScene) ecScene.setScale(1, 1, 1);\n }\n\n if (cc.game.renderType === cc.game.RENDER_TYPE_CANVAS) {\n let vp = cc.view.getViewportRect();\n this.device.setViewport(vp.x, vp.y, vp.width, vp.height);\n this._camera.a = cc.view.getScaleX();\n this._camera.d = cc.view.getScaleY();\n this._camera.tx = vp.x;\n this._camera.ty = vp.y + vp.height;\n }\n },\n\n render (ecScene, dt) {\n this.device.resetDrawCalls();\n if (ecScene) {\n // walk entity component scene to generate models\n this._flow.render(ecScene, dt);\n this.drawCalls = this.device.getDrawCalls();\n }\n },\n\n clear () {\n this._handle.reset();\n this._forward.clear();\n }\n};\n","let FlagOfset = 0;\n\nconst DONOTHING = 1 << FlagOfset++;\nconst BREAK_FLOW = 1 << FlagOfset++;\nconst LOCAL_TRANSFORM = 1 << FlagOfset++;\nconst WORLD_TRANSFORM = 1 << FlagOfset++;\nconst TRANSFORM = LOCAL_TRANSFORM | WORLD_TRANSFORM;\nconst UPDATE_RENDER_DATA = 1 << FlagOfset++;\nconst OPACITY = 1 << FlagOfset++;\nconst COLOR = 1 << FlagOfset++;\nconst OPACITY_COLOR = OPACITY | COLOR;\nconst RENDER = 1 << FlagOfset++;\nconst CHILDREN = 1 << FlagOfset++;\nconst POST_RENDER = 1 << FlagOfset++;\nconst FINAL = 1 << FlagOfset++;\n\nlet _batcher, _forward;\nlet _cullingMask = 0;\n\nfunction RenderFlow () {\n this._func = init;\n this._next = null;\n}\n\nlet _proto = RenderFlow.prototype;\n_proto._doNothing = function () {\n};\n\n_proto._localTransform = function (node) {\n node._updateLocalMatrix();\n node._renderFlag &= ~LOCAL_TRANSFORM;\n this._next._func(node);\n};\n\n_proto._worldTransform = function (node) {\n _batcher.worldMatDirty ++;\n\n let t = node._matrix;\n let trs = node._trs;\n let tm = t.m;\n tm[12] = trs[0];\n tm[13] = trs[1];\n tm[14] = trs[2];\n\n node._mulMat(node._worldMatrix, node._parent._worldMatrix, t);\n node._renderFlag &= ~WORLD_TRANSFORM;\n this._next._func(node);\n\n _batcher.worldMatDirty --;\n};\n\n_proto._updateRenderData = function (node) {\n let comp = node._renderComponent;\n comp._assembler.updateRenderData(comp);\n node._renderFlag &= ~UPDATE_RENDER_DATA;\n this._next._func(node);\n};\n\n_proto._opacity = function (node) {\n _batcher.parentOpacityDirty++;\n\n this._next._func(node);\n\n node._renderFlag &= ~OPACITY;\n _batcher.parentOpacityDirty--;\n};\n\n_proto._color = function (node) {\n let comp = node._renderComponent;\n if (comp) {\n comp._updateColor();\n }\n\n node._renderFlag &= ~COLOR;\n this._next._func(node);\n};\n\n_proto._render = function (node) {\n let comp = node._renderComponent;\n comp._checkBacth(_batcher, node._cullingMask);\n comp._assembler.fillBuffers(comp, _batcher);\n this._next._func(node);\n};\n\n_proto._children = function (node) {\n let cullingMask = _cullingMask;\n let batcher = _batcher;\n\n let parentOpacity = batcher.parentOpacity;\n let opacity = (batcher.parentOpacity *= (node._opacity / 255));\n\n let worldTransformFlag = batcher.worldMatDirty ? WORLD_TRANSFORM : 0;\n let worldOpacityFlag = batcher.parentOpacityDirty ? OPACITY_COLOR : 0;\n let worldDirtyFlag = worldTransformFlag | worldOpacityFlag;\n\n let children = node._children;\n for (let i = 0, l = children.length; i < l; i++) {\n let c = children[i];\n\n // Advance the modification of the flag to avoid node attribute modification is invalid when opacity === 0.\n c._renderFlag |= worldDirtyFlag;\n if (!c._activeInHierarchy || c._opacity === 0) continue;\n\n _cullingMask = c._cullingMask = c.groupIndex === 0 ? cullingMask : 1 << c.groupIndex;\n\n // TODO: Maybe has better way to implement cascade opacity\n let colorVal = c._color._val;\n c._color._fastSetA(c._opacity * opacity);\n flows[c._renderFlag]._func(c);\n c._color._val = colorVal;\n }\n\n batcher.parentOpacity = parentOpacity;\n\n this._next._func(node);\n};\n\n_proto._postRender = function (node) {\n let comp = node._renderComponent;\n comp._checkBacth(_batcher, node._cullingMask);\n comp._assembler.postFillBuffers(comp, _batcher);\n this._next._func(node);\n};\n\nconst EMPTY_FLOW = new RenderFlow();\nEMPTY_FLOW._func = EMPTY_FLOW._doNothing;\nEMPTY_FLOW._next = EMPTY_FLOW;\n\nlet flows = {};\n\nfunction createFlow (flag, next) {\n if (flag === DONOTHING || flag === BREAK_FLOW) {\n return EMPTY_FLOW\n }\n \n let flow = new RenderFlow();\n flow._next = next || EMPTY_FLOW;\n\n switch (flag) {\n case LOCAL_TRANSFORM: \n flow._func = flow._localTransform;\n break;\n case WORLD_TRANSFORM: \n flow._func = flow._worldTransform;\n break;\n case UPDATE_RENDER_DATA:\n flow._func = flow._updateRenderData;\n break;\n case OPACITY:\n flow._func = flow._opacity;\n break;\n case COLOR:\n flow._func = flow._color;\n break;\n case RENDER: \n flow._func = flow._render;\n break;\n case CHILDREN: \n flow._func = flow._children;\n break;\n case POST_RENDER: \n flow._func = flow._postRender;\n break;\n }\n\n return flow;\n}\n\nfunction getFlow (flag) {\n let flow = null;\n let tFlag = FINAL;\n while (tFlag > 0) {\n if (tFlag & flag)\n flow = createFlow(tFlag, flow);\n tFlag = tFlag >> 1;\n }\n return flow;\n}\n\n// \nfunction init (node) {\n let flag = node._renderFlag;\n let r = flows[flag] = getFlow(flag);\n r._func(node);\n}\n\nRenderFlow.flows = flows;\nRenderFlow.createFlow = createFlow;\n\n// validate whether render component is ready to be rendered.\nlet _validateList = [];\nRenderFlow.registerValidate = function (renderComp) {\n if (renderComp._inValidateList) return;\n _validateList.push(renderComp);\n renderComp._inValidateList = true;\n};\nRenderFlow.validateRenderers = function () {\n for (let i = 0, l = _validateList.length; i < l; i++) {\n let renderComp = _validateList[i];\n if (!renderComp.isValid) continue;\n if (!renderComp.enabledInHierarchy) {\n renderComp.disableRender();\n }\n else {\n renderComp._validateRender();\n }\n renderComp._inValidateList = false;\n }\n _validateList.length = 0;\n};\n\n\nRenderFlow.visitRootNode = function (rootNode) {\n RenderFlow.validateRenderers(); \n\n let preCullingMask = _cullingMask;\n _cullingMask = rootNode._cullingMask;\n\n if (rootNode._renderFlag & WORLD_TRANSFORM) {\n _batcher.worldMatDirty ++;\n rootNode._calculWorldMatrix();\n rootNode._renderFlag &= ~WORLD_TRANSFORM;\n\n flows[rootNode._renderFlag]._func(rootNode);\n\n _batcher.worldMatDirty --;\n }\n else {\n flows[rootNode._renderFlag]._func(rootNode);\n }\n\n _cullingMask = preCullingMask;\n};\n\nRenderFlow.render = function (rootNode, dt) {\n _batcher.reset();\n _batcher.walking = true;\n\n RenderFlow.visitRootNode(rootNode);\n\n _batcher.terminate();\n _batcher.walking = false;\n\n _forward.render(_batcher._renderScene, dt);\n};\n\nRenderFlow.renderCamera = function (camera, rootNode) {\n _batcher.reset();\n _batcher.walking = true;\n\n RenderFlow.visitRootNode(rootNode);\n\n _batcher.terminate();\n _batcher.walking = false;\n\n _forward.renderCamera(camera, _batcher._renderScene);\n};\n\nRenderFlow.init = function (batcher, forwardRenderer) {\n _batcher = batcher;\n _forward = forwardRenderer;\n\n flows[0] = EMPTY_FLOW;\n for (let i = 1; i < FINAL; i++) {\n flows[i] = new RenderFlow();\n }\n};\n\nRenderFlow.getBachther = function () {\n return _batcher;\n};\n\nRenderFlow.FLAG_DONOTHING = DONOTHING;\nRenderFlow.FLAG_BREAK_FLOW = BREAK_FLOW;\nRenderFlow.FLAG_LOCAL_TRANSFORM = LOCAL_TRANSFORM;\nRenderFlow.FLAG_WORLD_TRANSFORM = WORLD_TRANSFORM;\nRenderFlow.FLAG_TRANSFORM = TRANSFORM;\nRenderFlow.FLAG_UPDATE_RENDER_DATA = UPDATE_RENDER_DATA;\nRenderFlow.FLAG_OPACITY = OPACITY;\nRenderFlow.FLAG_COLOR = COLOR;\nRenderFlow.FLAG_OPACITY_COLOR = OPACITY_COLOR;\nRenderFlow.FLAG_RENDER = RENDER;\nRenderFlow.FLAG_CHILDREN = CHILDREN;\nRenderFlow.FLAG_POST_RENDER = POST_RENDER;\nRenderFlow.FLAG_FINAL = FINAL;\n\nmodule.exports = cc.RenderFlow = RenderFlow;\n","// const Atlas = require('./atlas');\nimport { Atlas, Rect } from './reusable-atlas';\n\nlet _atlases = [];\nlet _atlasIndex = -1;\n\nlet _maxAtlasCount = -1;\nlet _textureSize = 2048;\nlet _maxFrameSize = 512;\nlet _textureBleeding = true;\nlet _autoMultiBatch = true;\nlet _autoResetBeforeSceneLoad = true;\n\nlet _debugNode = null;\n\nfunction newAtlas () {\n let atlas = _atlases[++_atlasIndex]\n if (!atlas) {\n atlas = new Atlas(_textureSize, _textureSize);\n _atlases.push(atlas);\n if (dynamicAtlasManager.autoMultiBatch) cc.sp.multiBatcher.requsetMaterial(atlas._texture);\n }\n return atlas;\n}\n\nfunction beforeSceneLoad() {\n if (_autoResetBeforeSceneLoad) {\n dynamicAtlasManager.reset();\n }\n}\n\nlet _enabled = false;\n\n/**\n * !#en Manage Dynamic Atlas Manager. Dynamic Atlas Manager is used for merging textures at runtime, see [Dynamic Atlas](https://docs.cocos.com/creator/manual/en/advanced-topics/dynamic-atlas.html) for details.\n * !#zh 管理动态图集。动态图集用于在运行时对贴图进行合并,详见 [动态合图](https://docs.cocos.com/creator/manual/zh/advanced-topics/dynamic-atlas.html)。\n * @class DynamicAtlasManager\n */\nlet dynamicAtlasManager = {\n Atlas: Atlas,\n Rect: Rect,\n\n /**\n * !#en Enable or disable the dynamic atlas, see [Dynamic Atlas](https://docs.cocos.com/creator/manual/en/advanced-topics/dynamic-atlas.html) for details.\n * !#zh 开启或者关闭动态图集,详见 [动态合图](https://docs.cocos.com/creator/manual/zh/advanced-topics/dynamic-atlas.html)。\n * @property enabled\n * @type {Boolean}\n */\n get enabled() {\n return _enabled;\n },\n set enabled(value) {\n if (_enabled === value) return;\n\n if (value) {\n this.reset();\n cc.director.on(cc.Director.EVENT_BEFORE_SCENE_LAUNCH, beforeSceneLoad);\n }\n else {\n cc.director.off(cc.Director.EVENT_BEFORE_SCENE_LAUNCH, beforeSceneLoad);\n }\n\n _enabled = value;\n },\n\n /**\n * !#en The maximum number of atlas that can be created.\n * !#zh 可以创建的最大图集数量。\n * @property maxAtlasCount\n * @type {Number}\n */\n get maxAtlasCount() {\n return _maxAtlasCount;\n },\n set maxAtlasCount(value) {\n _maxAtlasCount = value;\n },\n\n /**\n * !#en Get the current created atlas count.\n * !#zh 获取当前已经创建的图集数量。\n * @property atlasCount\n * @type {Number}\n */\n get atlasCount() {\n return _atlases.length;\n },\n\n /**\n * !#en Is enable textureBleeding.\n * !#zh 是否开启 textureBleeding\n * @property textureBleeding\n * @type {Boolean}\n */\n get textureBleeding() {\n return _textureBleeding;\n },\n\n set textureBleeding(enable) {\n _textureBleeding = enable;\n },\n\n /**\n * !#en The size of the atlas that was created\n * !#zh 创建的图集的宽高\n * @property textureSize\n * @type {Number}\n */\n get textureSize() {\n return _textureSize;\n },\n set textureSize(value) {\n _textureSize = value;\n },\n\n /**\n * !#en The maximum size of the picture that can be added to the atlas.\n * !#zh 可以添加进图集的图片的最大尺寸。\n * @property maxFrameSize\n * @type {Number}\n */\n get maxFrameSize() {\n return _maxFrameSize;\n },\n set maxFrameSize(value) {\n _maxFrameSize = value;\n },\n\n /**\n * !#en Is enable autoMultiBatch.\n * !#zh 是否开启自动多纹理合批\n * @property autoMultiBatch\n * @type {Boolean}\n */\n get autoMultiBatch() {\n return _autoMultiBatch;\n },\n\n set autoMultiBatch(enable) {\n if (_autoMultiBatch === enable) return;\n\n if (enable) {\n for (let i = 0, l = _atlases.length; i < l; i++) {\n cc.sp.multiBatcher.requsetMaterial(_atlases[i]._texture);\n }\n }\n\n _autoMultiBatch = enable;\n },\n\n /**\n * !#en Is enable autoResetBeforeSceneLoad.\n * !#zh 是否在场景切换时清空所有图集\n * @property autoResetBeforeSceneLoad\n * @type {Boolean}\n */\n get autoResetBeforeSceneLoad() {\n return _autoResetBeforeSceneLoad;\n },\n\n set autoResetBeforeSceneLoad(enable) {\n if (_autoResetBeforeSceneLoad === enable) return;\n _autoResetBeforeSceneLoad = enable;\n },\n\n /**\n * !#en atlases\n * !#zh 图集数组\n * @property atlases\n * @type {Atlas}\n */\n get atlases() {\n return _atlases;\n },\n\n /**\n * 已用空间集合\n */\n rects: Object.create(null),\n\n /**\n * !#en The minimum size of the picture that can be added to the atlas.\n * !#zh 可以添加进图集的图片的最小尺寸。\n * @property minFrameSize\n * @type {Number}\n * @deprecated\n */\n\n /**\n * !#en Append a sprite frame into the dynamic atlas.\n * !#zh 添加碎图进入动态图集。\n * @method insertSpriteFrame\n * @param {SpriteFrame} spriteFrame\n */\n insertSpriteFrame(spriteFrame) {\n if (CC_EDITOR) return null;\n if (!_enabled || !spriteFrame || spriteFrame._original) return null;\n\n let atlas, frame;\n\n // 是否贴图已经在图集中\n let rect = spriteFrame._rect,\n texture = spriteFrame._texture,\n info = this.rects[texture._uuid];\n\n let sx = rect.x, sy = rect.y;\n\n if (info) {\n sx += info.x;\n sy += info.y;\n\n info.spriteFrames.push(spriteFrame);\n\n frame = {\n x: sx,\n y: sy,\n texture: info.atlas._texture,\n };\n\n return frame;\n }\n\n // 尝试加入已有图集\n for (let i = 0; i <= _atlasIndex; i++) {\n atlas = _atlases[i];\n frame = atlas.insertSpriteFrame(spriteFrame);\n if (frame) {\n return frame;\n }\n }\n\n // 创建新图集尝试加入\n if (_atlasIndex + 1 < _maxAtlasCount) {\n atlas = newAtlas();\n return atlas.insertSpriteFrame(spriteFrame);\n }\n\n return frame;\n },\n\n /**\n * !#en Delete a sprite frame from the dynamic atlas.\n * !#zh 使精灵帧取消使用动态图集\n * @method deleteSpriteFrame\n * @param {SpriteFrame} spriteFrame\n */\n deleteSpriteFrame(spriteFrame) {\n if (spriteFrame && !CC_TEST) {\n if (spriteFrame._original) {\n this.deleteAtlasSpriteFrame(spriteFrame);\n spriteFrame._resetDynamicAtlasFrame();\n }\n }\n },\n\n /**\n * !#en Delete a texture from the dynamic atlas.\n * !#zh 从动态图集删除该贴图,使用该贴图的精灵帧会被还原\n * @method deleteTexture\n * @param {Texture2D} texture\n */\n deleteTexture(texture) {\n this.deleteAtlasTexture(texture);\n },\n\n /**\n * !#en Resets all dynamic atlas, and the existing ones will be destroyed.\n * !#zh 重置所有动态图集,已有的动态图集会被销毁。\n * @method reset\n */\n reset () {\n for (let i = 0, l = _atlases.length; i < l; i++) {\n _atlases[i].destroy();\n }\n _atlases.length = 0;\n _atlasIndex = -1;\n },\n\n deleteAtlasSpriteFrame (spriteFrame) {\n if (!spriteFrame._original) return;\n\n let texture = spriteFrame._original._texture;\n for (let i = _atlases.length - 1; i >= 0; i--) {\n if (_atlases[i].deleteSpriteFrame(texture, spriteFrame)) {\n return;\n }\n }\n },\n\n deleteAtlasTexture (texture) {\n if (texture) {\n for (let i = _atlases.length - 1; i >= 0; i--) {\n if (_atlases[i].deleteInnerTexture(texture, true)) {\n return;\n }\n }\n }\n },\n\n /**\n * !#en Displays all the dynamic atlas in the current scene, which you can use to view the current atlas state.\n * !#zh 在当前场景中显示所有动态图集,可以用来查看当前的合图状态。\n * @method showDebug\n * @param {Boolean} show\n * @return {Node}\n */\n showDebug (show) {\n if (show) {\n if (!_debugNode || !_debugNode.isValid) {\n let width = cc.visibleRect.width;\n let height = cc.visibleRect.height;\n\n _debugNode = new cc.Node('DYNAMIC_ATLAS_DEBUG_NODE');\n _debugNode.width = width;\n _debugNode.height = height;\n _debugNode.x = width/2;\n _debugNode.y = height/2;\n _debugNode.zIndex = cc.macro.MAX_ZINDEX;\n _debugNode.parent = cc.director.getScene();\n\n _debugNode.groupIndex = cc.Node.BuiltinGroupIndex.DEBUG;\n cc.Camera._setupDebugCamera();\n\n let scroll = _debugNode.addComponent(cc.ScrollView);\n\n let content = new cc.Node('CONTENT');\n let layout = content.addComponent(cc.Layout);\n layout.type = cc.Layout.Type.VERTICAL;\n layout.resizeMode = cc.Layout.ResizeMode.CONTAINER;\n content.parent = _debugNode;\n content.width = _textureSize;\n content.anchorY = 1;\n content.x = _textureSize;\n\n scroll.content = content;\n\n for (let i = 0; i <= _atlasIndex; i++) {\n let node = new cc.Node('ATLAS');\n\n let texture = _atlases[i]._texture;\n let spriteFrame = new cc.SpriteFrame();\n spriteFrame.setTexture(_atlases[i]._texture);\n\n let sprite = node.addComponent(cc.Sprite);\n sprite.spriteFrame = spriteFrame;\n\n node.parent = content;\n }\n }\n return _debugNode;\n }\n else {\n if (_debugNode) {\n _debugNode.parent = null;\n _debugNode = null;\n }\n }\n },\n\n update () {\n if (!this.enabled) return;\n\n for (let i = 0; i <= _atlasIndex; i++) {\n _atlases[i].update();\n }\n },\n};\n\n/**\n * @module cc\n */\n\n/**\n * @property dynamicAtlasManager\n * @type DynamicAtlasManager\n */\nmodule.exports = cc.dynamicAtlasManager = dynamicAtlasManager;\n","// @ts-expect-error\nconst RenderTexture = require('../../../assets/CCRenderTexture');\n\n\n/**\n * 矩形\n */\nexport class Rect {\n\n /**\n * 对象池\n */\n static pool: Rect[] = [];\n\n /**\n * 对象池指针\n */\n static pointer: number = 0;\n\n\n /**\n * 复用\n */\n static reuse(atlas: Atlas, width: number, height: number, x: number, y: number) {\n if (this.pointer === 0) {\n for (let i = 0; i < 128; i++) {\n Rect.pool[i] = new Rect(atlas, 0, 0, 0, 0);\n }\n this.pointer += 128;\n }\n\n this.pointer--;\n const rect = this.pool[this.pointer];\n\n rect.atlas = atlas;\n rect.width = width;\n rect.height = height;\n rect.x = x;\n rect.y = y;\n\n return rect;\n }\n\n\n /**\n * 回收\n */\n static recycle(rect: Rect) {\n rect.atlas = undefined!;\n rect.uuid = \"\";\n rect.spriteFrames.length = 0;\n rect.parentRect = undefined;\n rect.subRectA = undefined;\n rect.subRectB = undefined;\n rect.subRectC = undefined;\n\n rect.cacheIndex = -1;\n\n this.pool[this.pointer] = rect;\n this.pointer++;\n }\n\n\n /**\n * 所属 Atlas\n */\n atlas: Atlas;\n\n /**\n * 宽度\n */\n width: number = 0;\n\n /**\n * 高度\n */\n height: number = 0;\n\n /**\n * 横坐标\n */\n x: number = 0;\n\n /**\n * 纵坐标\n */\n y: number = 0;\n\n /**\n * 在 freeRects 中的下标\n */\n cacheIndex: number = -1;\n\n /**\n * cc.Texture2D UUID\n */\n uuid: string = '';\n\n /**\n * 使用该贴图的精灵帧数组\n */\n spriteFrames: any[] = [];\n\n /**\n * 父矩形\n */\n parentRect: Rect | undefined;\n\n /**\n * 子矩形之一\n */\n subRectA: Rect | undefined;\n\n /**\n * 子矩形之一\n */\n subRectB: Rect | undefined;\n\n /**\n * 子矩形之一\n */\n subRectC: Rect | undefined;\n\n /**\n * 子矩形或自身计数\n */\n used: number = 0;\n\n /**\n * 像素数\n */\n get sizes() {\n return this.width * this.height;\n }\n\n\n constructor(atlas: Atlas, width: number, height: number, x: number, y: number) {\n this.atlas = atlas;\n this.width = width;\n this.height = height;\n this.x = x;\n this.y = y;\n }\n\n}\n\n\n/**\n * 动态图集\n *\n * 装箱算法:类似断头台装箱算法\n * 合并算法:树形回退模式\n */\nexport class Atlas {\n\n /**\n * 当自由空间的某边长度不足该值则直接忽略该空间\n */\n static ignoreRectSize: number = 10;\n\n /**\n * 默认 Atlas\n */\n static DEFAULT_HASH = (new RenderTexture())._getHash();\n\n /**\n * 宽度\n */\n width: number = 0;\n\n /**\n * 高度\n */\n height: number = 0;\n\n /**\n * 间距\n */\n padding: number = 0;\n\n /**\n * 边距\n */\n border: number = 0;\n\n /**\n * 根矩形\n */\n rootRect: Rect;\n\n /**\n * 自由空间\n */\n freeRects: Rect[] = [];\n\n /**\n * 已使用数量\n */\n _count = 0;\n\n /**\n * cc.RenderTexture\n */\n _texture: any;\n\n /**\n * texture update dirty\n */\n _dirty: boolean = false;\n\n\n constructor(width: number, height: number, padding: number = 2, border: number = 2) {\n const texture = new RenderTexture();\n texture.initWithSize(width, height);\n texture.update();\n this._texture = texture;\n\n this.width = width;\n this.height = height;\n this.padding = padding;\n this.border = border;\n\n this.rootRect = Rect.reuse(\n this,\n this.width + this.padding - this.border * 2,\n this.height + this.padding - this.border * 2,\n this.border,\n this.border,\n );\n this.pushFreeRect(this.rootRect);\n }\n\n\n /**\n * push to free rects\n */\n protected pushFreeRect(rect: Rect) {\n const i = this.freeRects.push(rect) - 1;\n rect.cacheIndex = i;\n }\n\n\n /**\n * faster remove from free rects\n */\n protected removeFreeRect(index: number) {\n const temp = this.freeRects[index];\n const temp2 = this.freeRects[this.freeRects.length - 1];\n temp2.cacheIndex = index;\n temp.cacheIndex = -1;\n this.freeRects[index] = temp2;\n this.freeRects.pop();\n }\n\n\n /**\n * change member from free rects\n */\n protected replaceFreeRect(index: number, rect: Rect) {\n this.freeRects[index].cacheIndex = -1;\n rect.cacheIndex = index;\n this.freeRects[index] = rect;\n }\n\n\n /**\n * 插入 SpriteFrame\n */\n insertSpriteFrame(spriteFrame: any) {\n let rect = spriteFrame._rect,\n texture = spriteFrame._texture;\n\n let sx = rect.x, sy = rect.y;\n let width = texture.width, height = texture.height;\n\n const result = this.insert(texture);\n\n if (!result) {\n return null;\n }\n\n // texture bleeding\n if (cc.dynamicAtlasManager.textureBleeding) {\n // Smaller frame is more likely to be affected by linear filter\n if (width <= 8 || height <= 8) {\n this._texture.drawTextureAt(texture, result.x - 1, result.y - 1);\n this._texture.drawTextureAt(texture, result.x - 1, result.y + 1);\n this._texture.drawTextureAt(texture, result.x + 1, result.y - 1);\n this._texture.drawTextureAt(texture, result.x + 1, result.y + 1);\n }\n\n this._texture.drawTextureAt(texture, result.x - 1, result.y);\n this._texture.drawTextureAt(texture, result.x + 1, result.y);\n this._texture.drawTextureAt(texture, result.x, result.y - 1);\n this._texture.drawTextureAt(texture, result.x, result.y + 1);\n }\n\n this._texture.drawTextureAt(texture, result.x, result.y);\n\n this._count++;\n\n sx += result.x;\n sy += result.y;\n\n result.spriteFrames.push(spriteFrame);\n\n this._dirty = true;\n\n let frame = {\n x: sx,\n y: sy,\n texture: this._texture,\n };\n\n return frame;\n }\n\n\n /**\n * 插入子函数\n */\n insert(texture: any) {\n const width = texture.width + this.padding, height = texture.height + this.padding;\n let score = Number.MAX_VALUE;\n let areaFit = 0;\n let original: Rect | undefined = undefined;\n let originalIndex = 0;\n\n // 查找足够容纳的空区域\n for (let i = 0; i < this.freeRects.length; i++) {\n const rect = this.freeRects[i];\n if (rect.width >= width && rect.height >= height) {\n areaFit = rect.sizes - width * height;\n if (areaFit < score) {\n original = rect;\n originalIndex = i;\n score = areaFit;\n }\n }\n }\n\n // 切割空区域\n if (original) {\n if (original.width === width && original.height === height) {\n original.uuid = texture._uuid;\n original.used++;\n if (original.parentRect) original.parentRect.used++;\n cc.dynamicAtlasManager.rects[texture._uuid] = original;\n this.removeFreeRect(originalIndex);\n return original;\n }\n\n const best = Rect.reuse(this, width, height, original.x, original.y);\n let tmp: Rect;\n if (best.y + best.height < original.y + original.height) {\n tmp = Rect.reuse(\n this,\n original.width,\n original.y + original.height - (best.y + best.height),\n original.x,\n best.y + best.height,\n );\n\n tmp.parentRect = original;\n original.subRectB = tmp;\n\n if (tmp.width > Atlas.ignoreRectSize && tmp.height > Atlas.ignoreRectSize) {\n // 替换旧区域\n this.replaceFreeRect(originalIndex, tmp);\n originalIndex = -1;\n }\n }\n\n if (best.x + best.width < original.x + original.width) {\n tmp = Rect.reuse(\n this,\n original.x + original.width - (best.x + best.width),\n original.height - (original.y + original.height - (best.y + best.height)),\n best.x + best.width,\n original.y,\n );\n\n tmp.parentRect = original;\n original.subRectC = tmp;\n\n if (tmp.width > Atlas.ignoreRectSize && tmp.height > Atlas.ignoreRectSize) {\n if (originalIndex !== -1) {\n // 替换旧区域\n this.replaceFreeRect(originalIndex, tmp);\n originalIndex = -1;\n } else {\n this.pushFreeRect(tmp);\n }\n }\n }\n\n if (originalIndex !== -1) {\n this.removeFreeRect(originalIndex);\n }\n\n best.parentRect = original;\n original.subRectA = best;\n best.used++;\n original.used++;\n if (original.used === 1 && original.parentRect) original.parentRect.used++;\n best.uuid = texture._uuid;\n cc.dynamicAtlasManager.rects[texture._uuid] = best;\n return best;\n } else {\n return undefined;\n }\n }\n\n\n /**\n * update texture\n */\n update() {\n if (!this._dirty) return;\n this._texture.update();\n this._dirty = false;\n }\n\n\n /**\n * 删除精灵帧\n */\n deleteSpriteFrame(texture: any, frame: any) {\n if (texture) {\n const rect: Rect | undefined = cc.dynamicAtlasManager.rects[texture._uuid];\n if (rect) {\n const index = rect.spriteFrames.indexOf(frame);\n if (index !== -1) {\n rect.spriteFrames.splice(index, 1);\n\n // 判断如果没有引用则删除 Texture\n if (rect.spriteFrames.length === 0) {\n rect.atlas.deleteInnerRect(rect);\n }\n } else {\n cc.warn('[Dynamic Atlas] can\\'t find spriteFrame in Rect.');\n }\n\n return true;\n }\n }\n\n return false;\n }\n\n\n /**\n * 删除子矩形\n */\n deleteInnerRect(rect: Rect) {\n delete cc.dynamicAtlasManager.rects[rect.uuid];\n rect.uuid = \"\";\n this._count--;\n\n // 还原 SpriteFrame\n for (const spriteFrame of rect.spriteFrames) {\n if (spriteFrame.isValid) {\n spriteFrame._resetDynamicAtlasFrame();\n }\n }\n rect.spriteFrames.length = 0;\n\n this.tryMergeRecycle(rect);\n }\n\n\n /**\n * 删除贴图\n */\n deleteInnerTexture(texture: any) {\n if (texture) {\n const rect: Rect | undefined = cc.dynamicAtlasManager.rects[texture._uuid];\n if (rect) {\n rect.atlas.deleteInnerRect(rect);\n return true;\n }\n }\n return false;\n }\n\n\n /**\n * 尝试合并和回收\n */\n protected tryMergeRecycle(rect: Rect) {\n let old: Rect | undefined = undefined;\n let parent: Rect | undefined = rect;\n while (parent) {\n parent.used--;\n if (parent.used === 0) {\n // 回收所有子矩形\n if (parent.subRectA) {\n // 可能是 ignoreRect\n const i = parent.subRectA.cacheIndex;\n if (i !== -1) {\n this.removeFreeRect(i);\n }\n Rect.recycle(parent.subRectA);\n parent.subRectA = undefined;\n }\n if (parent.subRectB) {\n const i = parent.subRectB.cacheIndex;\n if (i !== -1) {\n this.removeFreeRect(i);\n }\n Rect.recycle(parent.subRectB);\n parent.subRectB = undefined;\n }\n if (parent.subRectC) {\n const i = parent.subRectC.cacheIndex;\n if (i !== -1) {\n this.removeFreeRect(i);\n }\n Rect.recycle(parent.subRectC);\n parent.subRectC = undefined;\n }\n old = parent;\n parent = parent.parentRect;\n } else {\n if (old) {\n if (old.width > Atlas.ignoreRectSize && old.height > Atlas.ignoreRectSize) {\n this.pushFreeRect(old);\n }\n }\n old = parent;\n parent = undefined;\n }\n }\n\n if (old === this.rootRect && old.used === 0) {\n this.pushFreeRect(old);\n }\n }\n\n\n /**\n * 是否未使用\n */\n isEmpty() {\n return this._count <= 0;\n }\n\n\n /**\n * 清空\n */\n reset() {\n const rects = cc.dynamicAtlasManager.rects;\n for (const key in rects) {\n const rect: Rect = rects[key];\n if (rect.atlas === this) {\n delete rects[key];\n for (const spriteFrame of rect.spriteFrames) {\n if (spriteFrame.isValid) {\n spriteFrame._resetDynamicAtlasFrame();\n }\n }\n Rect.recycle(rect);\n }\n }\n\n for (const rect of this.freeRects) {\n Rect.recycle(rect);\n }\n\n this.freeRects.length = 0;\n this._count = 0;\n\n this.rootRect = Rect.reuse(\n this,\n this.width + this.padding - this.border * 2,\n this.height + this.padding - this.border * 2,\n this.border,\n this.border,\n );\n this.pushFreeRect(this.rootRect)\n }\n\n\n /**\n * 销毁\n */\n destroy() {\n this.reset();\n this._texture.destroy();\n }\n\n}\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport Assembler2D from '../../assembler-2d';\n\nconst textUtils = require('../../../utils/text-utils');\nconst macro = require('../../../platform/CCMacro');\nconst Label = require('../../../components/CCLabel');\nconst Overflow = Label.Overflow;\n\nconst shareLabelInfo = require('../utils').shareLabelInfo;\n\nlet LetterInfo = function() {\n this.char = '';\n this.valid = true;\n this.x = 0;\n this.y = 0;\n this.line = 0;\n this.hash = \"\";\n};\n\nlet _tmpRect = cc.rect();\n\nlet _comp = null;\n\nlet _horizontalKernings = [];\nlet _lettersInfo = [];\nlet _linesWidth = [];\nlet _linesOffsetX = [];\n\nlet _fntConfig = null;\nlet _numberOfLines = 0;\nlet _textDesiredHeight = 0;\nlet _letterOffsetY = 0;\nlet _tailoredTopY = 0;\n\nlet _tailoredBottomY = 0;\nlet _bmfontScale = 1.0;\n\nlet _lineBreakWithoutSpaces = false;\nlet _spriteFrame = null;\nlet _lineSpacing = 0;\nlet _contentSize = cc.size();\nlet _string = '';\nlet _fontSize = 0;\nlet _originFontSize = 0;\nlet _hAlign = 0;\nlet _vAlign = 0;\nlet _spacingX = 0;\nlet _lineHeight = 0;\nlet _overflow = 0;\nlet _isWrapText = false;\nlet _labelWidth = 0;\nlet _labelHeight = 0;\nlet _maxLineWidth = 0;\nlet _isRetina = false;\nlet _retinaScale = 1;\n\nexport default class BmfontAssembler extends Assembler2D {\n updateRenderData (comp) {\n if (!comp._vertsDirty) return;\n if (_comp === comp) return;\n\n _comp = comp;\n \n this._reserveQuads(comp, comp.string.toString().length);\n\n const assemblerChanged = this._updateFontFamily(comp);\n\n // 打包到动态图集时可能会切换 Assembler\n if (!assemblerChanged) {\n this._aftUpdateRenderData(comp);\n }\n\n return assemblerChanged;\n }\n\n _preUpdateRenderData(comp) {\n _comp = comp;\n\n this._reserveQuads(comp, comp.string.toString().length);\n\n let fontAsset = comp.font;\n _spriteFrame = fontAsset.spriteFrame;\n _fntConfig = fontAsset._fntConfig;\n shareLabelInfo.fontAtlas = fontAsset._fontDefDictionary;\n }\n\n _aftUpdateRenderData(comp) {\n this._updateProperties(comp);\n this._updateLabelInfo(comp);\n this._updateContent();\n this.updateWorldVerts(comp);\n\n if (_isRetina) {\n _contentSize.width /= _retinaScale;\n _contentSize.height /= _retinaScale;\n _fontSize /= _retinaScale;\n }\n\n _comp._actualFontSize = _fontSize;\n _comp.node.setContentSize(_contentSize);\n\n _comp._vertsDirty = false;\n _comp = null;\n this._resetProperties();\n }\n\n _updateFontScale () {\n _bmfontScale = _fontSize / _originFontSize;\n }\n\n _updateFontFamily (comp) {\n let fontAsset = comp.font;\n _spriteFrame = fontAsset.spriteFrame;\n _fntConfig = fontAsset._fntConfig;\n shareLabelInfo.fontAtlas = fontAsset._fontDefDictionary;\n\n return this.packDynamicAtlasAndCheckMaterial(comp, _spriteFrame);\n }\n\n _updateLabelInfo() {\n // clear\n shareLabelInfo.hash = \"\";\n shareLabelInfo.margin = 0;\n }\n\n getTTFTextureSizeScale() {\n return _isRetina ? _retinaScale : 1;\n }\n\n _updateProperties (comp) {\n _string = comp.string.toString();\n _isRetina = !(comp.font instanceof cc.BitmapFont) && (cc.sp.enableLabelRetina && comp.enableRetina === 0) || comp.enableRetina === 1;\n _retinaScale = cc.sp.labelRetinaScale;\n _fontSize = comp.fontSize;\n _originFontSize = _fntConfig ? _fntConfig.fontSize : comp.fontSize;\n _hAlign = comp.horizontalAlign;\n _vAlign = comp.verticalAlign;\n _spacingX = comp.spacingX;\n _overflow = comp.overflow;\n _lineHeight = comp._lineHeight;\n \n _contentSize.width = comp.node.width;\n _contentSize.height = comp.node.height;\n\n if (_isRetina) {\n _fontSize *= _retinaScale;\n if (!_fntConfig) _originFontSize *= _retinaScale;\n _contentSize.width *= _retinaScale;\n _contentSize.height *= _retinaScale;\n _lineHeight *= _retinaScale;\n shareLabelInfo.margin *= _retinaScale;\n }\n\n // should wrap text\n if (_overflow === Overflow.NONE) {\n _isWrapText = false;\n _contentSize.width += shareLabelInfo.margin * 2;\n _contentSize.height += shareLabelInfo.margin * 2;\n }\n else if (_overflow === Overflow.RESIZE_HEIGHT) {\n _isWrapText = true;\n _contentSize.height += shareLabelInfo.margin * 2;\n }\n else {\n _isWrapText = comp.enableWrapText;\n }\n \n shareLabelInfo.lineHeight = _lineHeight;\n shareLabelInfo.fontSize = _fontSize;\n\n this._setupBMFontOverflowMetrics();\n }\n\n _resetProperties () {\n _fntConfig = null;\n _spriteFrame = null;\n shareLabelInfo.hash = \"\";\n shareLabelInfo.margin = 0;\n }\n\n _updateContent () {\n this._updateFontScale();\n this._computeHorizontalKerningForText();\n this._alignText();\n }\n\n _computeHorizontalKerningForText () {\n let string = _string;\n let stringLen = string.length;\n\n let horizontalKernings = _horizontalKernings;\n let kerningDict;\n _fntConfig && (kerningDict = _fntConfig.kerningDict);\n if (kerningDict && !cc.js.isEmptyObject(kerningDict)) {\n let prev = -1;\n for (let i = 0; i < stringLen; ++i) {\n let key = string.charCodeAt(i);\n let kerningAmount = kerningDict[(prev << 16) | (key & 0xffff)] || 0;\n if (i < stringLen - 1) {\n horizontalKernings[i] = kerningAmount;\n } else {\n horizontalKernings[i] = 0;\n }\n prev = key;\n }\n } else {\n horizontalKernings.length = 0;\n }\n }\n\n _multilineTextWrap (nextTokenFunc) {\n let textLen = _string.length;\n\n let lineIndex = 0;\n let nextTokenX = 0;\n let nextTokenY = 0;\n let longestLine = 0;\n let letterRight = 0;\n\n let highestY = 0;\n let lowestY = 0;\n let letterDef = null;\n let letterPosition = cc.v2(0, 0);\n\n for (let index = 0; index < textLen;) {\n let character = _string.charAt(index);\n if (character === \"\\n\") {\n _linesWidth.push(letterRight);\n letterRight = 0;\n lineIndex++;\n nextTokenX = 0;\n nextTokenY -= _lineHeight * this._getFontScale() + _lineSpacing;\n this._recordPlaceholderInfo(index, character);\n index++;\n continue;\n }\n\n let tokenLen = nextTokenFunc(_string, index, textLen);\n let tokenHighestY = highestY;\n let tokenLowestY = lowestY;\n let tokenRight = letterRight;\n let nextLetterX = nextTokenX;\n let newLine = false;\n\n for (let tmp = 0; tmp < tokenLen; ++tmp) {\n let letterIndex = index + tmp;\n character = _string.charAt(letterIndex);\n if (character === \"\\r\") {\n this._recordPlaceholderInfo(letterIndex, character);\n continue;\n }\n letterDef = shareLabelInfo.fontAtlas.getLetterDefinitionForChar(character, shareLabelInfo);\n if (!letterDef) {\n this._recordPlaceholderInfo(letterIndex, character);\n let atlasName = \"\";\n _fntConfig && (atlasName = _fntConfig.atlasName);\n console.log(\"Can't find letter definition in texture atlas \" + atlasName + \" for letter:\" + character);\n continue;\n }\n\n let letterX = nextLetterX + letterDef.offsetX * _bmfontScale - shareLabelInfo.margin;\n\n if (_isWrapText\n && _maxLineWidth > 0\n && nextTokenX > 0\n && letterX + letterDef.w * _bmfontScale > _maxLineWidth\n && !textUtils.isUnicodeSpace(character)) {\n _linesWidth.push(letterRight);\n letterRight = 0;\n lineIndex++;\n nextTokenX = 0;\n nextTokenY -= (_lineHeight * this._getFontScale() + _lineSpacing);\n newLine = true;\n break;\n } else {\n letterPosition.x = letterX;\n }\n\n letterPosition.y = nextTokenY - letterDef.offsetY * _bmfontScale + shareLabelInfo.margin;\n this._recordLetterInfo(letterPosition, character, letterIndex, lineIndex);\n\n if (letterIndex + 1 < _horizontalKernings.length && letterIndex < textLen - 1) {\n nextLetterX += _horizontalKernings[letterIndex + 1];\n }\n\n nextLetterX += letterDef.xAdvance * _bmfontScale + _spacingX - shareLabelInfo.margin * 2;\n\n tokenRight = letterPosition.x + letterDef.w * _bmfontScale - shareLabelInfo.margin;\n\n if (tokenHighestY < letterPosition.y) {\n tokenHighestY = letterPosition.y;\n }\n\n if (tokenLowestY > letterPosition.y - letterDef.h * _bmfontScale) {\n tokenLowestY = letterPosition.y - letterDef.h * _bmfontScale;\n }\n\n } //end of for loop\n\n if (newLine) continue;\n\n nextTokenX = nextLetterX;\n letterRight = tokenRight;\n\n if (highestY < tokenHighestY) {\n highestY = tokenHighestY;\n }\n if (lowestY > tokenLowestY) {\n lowestY = tokenLowestY;\n }\n if (longestLine < letterRight) {\n longestLine = letterRight;\n }\n\n index += tokenLen;\n } //end of for loop\n\n this._finishMultilineTextWrap();\n\n _linesWidth.push(letterRight);\n\n _numberOfLines = lineIndex + 1;\n _textDesiredHeight = _numberOfLines * _lineHeight * this._getFontScale();\n if (_numberOfLines > 1) {\n _textDesiredHeight += (_numberOfLines - 1) * _lineSpacing;\n }\n\n _contentSize.width = _labelWidth;\n _contentSize.height = _labelHeight;\n if (_labelWidth <= 0) {\n _contentSize.width = parseFloat(longestLine.toFixed(2)) + shareLabelInfo.margin * 2;\n }\n if (_labelHeight <= 0) {\n _contentSize.height = parseFloat(_textDesiredHeight.toFixed(2)) + shareLabelInfo.margin * 2;\n }\n\n _tailoredTopY = _contentSize.height;\n _tailoredBottomY = 0;\n\n if (_overflow !== Overflow.CLAMP) {\n if (highestY > 0) {\n _tailoredTopY = _contentSize.height + highestY;\n }\n \n if (lowestY < -_textDesiredHeight) {\n _tailoredBottomY = _textDesiredHeight + lowestY;\n }\n }\n\n return true;\n }\n\n _getFirstCharLen () {\n return 1;\n }\n\n _getFontScale () {\n return _overflow === Overflow.SHRINK ? _bmfontScale : 1;\n }\n\n _getFirstWordLen (text, startIndex, textLen) {\n let character = text.charAt(startIndex);\n if (textUtils.isUnicodeCJK(character)\n || character === \"\\n\"\n || textUtils.isUnicodeSpace(character)) {\n return 1;\n }\n\n let len = 1;\n let letterDef = shareLabelInfo.fontAtlas.getLetterDefinitionForChar(character, shareLabelInfo);\n if (!letterDef) {\n return len;\n }\n let nextLetterX = letterDef.xAdvance * _bmfontScale + _spacingX;\n let letterX;\n for (let index = startIndex + 1; index < textLen; ++index) {\n character = text.charAt(index);\n\n letterDef = shareLabelInfo.fontAtlas.getLetterDefinitionForChar(character, shareLabelInfo);\n if (!letterDef) {\n break;\n }\n letterX = nextLetterX + letterDef.offsetX * _bmfontScale;\n\n if(letterX + letterDef.w * _bmfontScale > _maxLineWidth\n && !textUtils.isUnicodeSpace(character)\n && _maxLineWidth > 0) {\n return len;\n }\n nextLetterX += letterDef.xAdvance * _bmfontScale + _spacingX;\n if (character === \"\\n\"\n || textUtils.isUnicodeSpace(character)\n || textUtils.isUnicodeCJK(character)) {\n break;\n }\n len++;\n }\n\n return len;\n }\n\n _multilineTextWrapByWord () {\n return this._multilineTextWrap(this._getFirstWordLen);\n }\n\n _multilineTextWrapByChar () {\n return this._multilineTextWrap(this._getFirstCharLen);\n }\n\n _recordPlaceholderInfo (letterIndex, char) {\n if (letterIndex >= _lettersInfo.length) {\n let tmpInfo = new LetterInfo();\n _lettersInfo.push(tmpInfo);\n }\n\n _lettersInfo[letterIndex].char = char;\n _lettersInfo[letterIndex].hash = char.charCodeAt(0) + shareLabelInfo.hash;\n _lettersInfo[letterIndex].valid = false;\n }\n\n _recordLetterInfo (letterPosition, character, letterIndex, lineIndex) {\n if (letterIndex >= _lettersInfo.length) {\n let tmpInfo = new LetterInfo();\n _lettersInfo.push(tmpInfo);\n }\n let char = character.charCodeAt(0);\n let key = char + shareLabelInfo.hash;\n\n _lettersInfo[letterIndex].line= lineIndex;\n _lettersInfo[letterIndex].char = character;\n _lettersInfo[letterIndex].hash = key;\n _lettersInfo[letterIndex].valid = shareLabelInfo.fontAtlas.getLetter(key).valid;\n _lettersInfo[letterIndex].x = letterPosition.x;\n _lettersInfo[letterIndex].y = letterPosition.y;\n }\n\n _alignText () {\n _textDesiredHeight = 0;\n _linesWidth.length = 0;\n\n if (!_lineBreakWithoutSpaces) {\n this._multilineTextWrapByWord();\n } else {\n this._multilineTextWrapByChar();\n }\n\n this._computeAlignmentOffset();\n\n //shrink\n if (_overflow === Overflow.SHRINK) {\n if (_fontSize > 0 && this._isVerticalClamp()) {\n this._shrinkLabelToContentSize(this._isVerticalClamp);\n }\n }\n\n if (!this._updateQuads()) {\n if (_overflow === Overflow.SHRINK) {\n this._shrinkLabelToContentSize(this._isHorizontalClamp);\n }\n }\n }\n\n _scaleFontSizeDown (fontSize) {\n let shouldUpdateContent = true;\n if (!fontSize) {\n fontSize = 0.1;\n shouldUpdateContent = false;\n }\n _fontSize = fontSize;\n\n if (shouldUpdateContent) {\n this._updateContent();\n }\n }\n\n _shrinkLabelToContentSize (lambda) {\n let fontSize = _fontSize;\n\n let left = 0, right = fontSize | 0, mid = 0;\n while (left < right) {\n mid = (left + right + 1) >> 1;\n\n let newFontSize = mid;\n if (newFontSize <= 0) {\n break;\n }\n\n _bmfontScale = newFontSize / _originFontSize;\n \n if (!_lineBreakWithoutSpaces) {\n this._multilineTextWrapByWord();\n } else {\n this._multilineTextWrapByChar();\n }\n this._computeAlignmentOffset();\n\n if (lambda()) {\n right = mid - 1;\n } else {\n left = mid;\n }\n }\n\n let actualFontSize = left;\n if (actualFontSize >= 0) {\n this._scaleFontSizeDown(actualFontSize);\n }\n }\n\n _isVerticalClamp () {\n if (_textDesiredHeight > _contentSize.height) {\n return true;\n } else {\n return false;\n }\n }\n\n _isHorizontalClamp () {\n let letterClamp = false;\n for (let ctr = 0, l = _string.length; ctr < l; ++ctr) {\n let letterInfo = _lettersInfo[ctr];\n if (letterInfo.valid) {\n let letterDef = shareLabelInfo.fontAtlas.getLetter(letterInfo.hash);\n\n let px = letterInfo.x + letterDef.w * _bmfontScale;\n let lineIndex = letterInfo.line;\n if (_labelWidth > 0) {\n if (!_isWrapText) {\n if(px > _contentSize.width){\n letterClamp = true;\n break;\n }\n }else{\n let wordWidth = _linesWidth[lineIndex];\n if (wordWidth > _contentSize.width && (px > _contentSize.width || px < 0)) {\n letterClamp = true;\n break;\n }\n }\n }\n }\n }\n\n return letterClamp;\n }\n\n _isHorizontalClamped (px, lineIndex) {\n let wordWidth = _linesWidth[lineIndex];\n let letterOverClamp = (px > _contentSize.width || px < 0);\n\n if(!_isWrapText){\n return letterOverClamp;\n }else{\n return (wordWidth > _contentSize.width && letterOverClamp);\n }\n }\n\n _updateQuads () {\n let texture = _spriteFrame ? _spriteFrame._texture : shareLabelInfo.fontAtlas.getTexture();\n\n let node = _comp.node;\n\n this.verticesCount = this.indicesCount = 0;\n \n // Need to reset dataLength in Canvas rendering mode.\n this._renderData && (this._renderData.dataLength = 0);\n\n let contentSize = _contentSize,\n appx = node._anchorPoint.x * contentSize.width,\n appy = node._anchorPoint.y * contentSize.height;\n \n let ret = true;\n for (let ctr = 0, l = _string.length; ctr < l; ++ctr) {\n let letterInfo = _lettersInfo[ctr];\n if (!letterInfo.valid) continue;\n let letterDef = shareLabelInfo.fontAtlas.getLetter(letterInfo.hash);\n\n _tmpRect.height = letterDef.h;\n _tmpRect.width = letterDef.w;\n _tmpRect.x = letterDef.u;\n _tmpRect.y = letterDef.v;\n\n let py = letterInfo.y + _letterOffsetY;\n\n if (_labelHeight > 0) {\n if (py > _tailoredTopY) {\n let clipTop = py - _tailoredTopY;\n _tmpRect.y += clipTop;\n _tmpRect.height -= clipTop;\n py = py - clipTop;\n }\n\n if ((py - letterDef.h * _bmfontScale < _tailoredBottomY) && _overflow === Overflow.CLAMP) {\n _tmpRect.height = (py < _tailoredBottomY) ? 0 : (py - _tailoredBottomY) / _bmfontScale;\n }\n }\n\n let lineIndex = letterInfo.line;\n let px = letterInfo.x + letterDef.w / 2 * _bmfontScale + _linesOffsetX[lineIndex];\n\n if (_labelWidth > 0) {\n if (this._isHorizontalClamped(px, lineIndex)) {\n if (_overflow === Overflow.CLAMP) {\n _tmpRect.width = 0;\n } else if (_overflow === Overflow.SHRINK) {\n if (_contentSize.width > letterDef.w) {\n ret = false;\n break;\n } else {\n _tmpRect.width = 0;\n }\n }\n }\n }\n\n if (_tmpRect.height > 0 && _tmpRect.width > 0) {\n let isRotated = this._determineRect(_tmpRect);\n let letterPositionX = letterInfo.x + _linesOffsetX[letterInfo.line];\n this.appendQuad(_comp, texture, _tmpRect, isRotated, letterPositionX - appx, py - appy, _bmfontScale, letterDef);\n }\n }\n this._quadsUpdated(_comp);\n\n return ret;\n }\n\n _determineRect (tempRect) {\n let isRotated = _spriteFrame.isRotated();\n\n let originalSize = _spriteFrame._originalSize;\n let rect = _spriteFrame._rect;\n let offset = _spriteFrame._offset;\n let trimmedLeft = offset.x + (originalSize.width - rect.width) / 2;\n let trimmedTop = offset.y - (originalSize.height - rect.height) / 2;\n\n if(!isRotated) {\n tempRect.x += (rect.x - trimmedLeft);\n tempRect.y += (rect.y + trimmedTop);\n } else {\n let originalX = tempRect.x;\n tempRect.x = rect.x + rect.height - tempRect.y - tempRect.height - trimmedTop;\n tempRect.y = originalX + rect.y - trimmedLeft;\n if (tempRect.y < 0) {\n tempRect.height = tempRect.height + trimmedTop;\n }\n }\n\n return isRotated;\n }\n\n _computeAlignmentOffset () {\n _linesOffsetX.length = 0;\n \n switch (_hAlign) {\n case macro.TextAlignment.LEFT:\n for (let i = 0; i < _numberOfLines; ++i) {\n _linesOffsetX.push(0);\n }\n break;\n case macro.TextAlignment.CENTER:\n for (let i = 0, l = _linesWidth.length; i < l; i++) {\n _linesOffsetX.push((_contentSize.width - _linesWidth[i]) / 2);\n }\n break;\n case macro.TextAlignment.RIGHT:\n for (let i = 0, l = _linesWidth.length; i < l; i++) {\n _linesOffsetX.push(_contentSize.width - _linesWidth[i]);\n }\n break;\n default:\n break;\n }\n\n // TOP\n _letterOffsetY = _contentSize.height;\n if (_vAlign !== macro.VerticalTextAlignment.TOP) {\n let blank = _contentSize.height - _textDesiredHeight + _lineHeight * this._getFontScale() - _originFontSize * _bmfontScale;\n if (_vAlign === macro.VerticalTextAlignment.BOTTOM) {\n // BOTTOM\n _letterOffsetY -= blank;\n } else {\n // CENTER:\n _letterOffsetY -= blank / 2;\n }\n }\n }\n\n _setupBMFontOverflowMetrics () {\n let newWidth = _contentSize.width,\n newHeight = _contentSize.height;\n\n if (_overflow === Overflow.RESIZE_HEIGHT) {\n newHeight = 0;\n }\n\n if (_overflow === Overflow.NONE) {\n newWidth = 0;\n newHeight = 0;\n }\n\n _labelWidth = newWidth;\n _labelHeight = newHeight;\n _maxLineWidth = newWidth;\n }\n\n updateWorldVerts() {}\n\n appendQuad(comp, texture, rect, rotated, x, y, scale, letter) {}\n _quadsUpdated (comp) {}\n\n _reserveQuads () {}\n _finishMultilineTextWrap() { }\n}\n","/****************************************************************************\n Copyright (c) 2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * !#en Class for Label Frame.\n * !#zh LabelFrame\n */\nfunction LabelFrame () {\n // the location of the label on rendering texture\n this._rect = null;\n // uv data of frame\n this.uv = [];\n // texture of frame\n this._texture = null;\n // store original info before packed to dynamic atlas\n this._original = null;\n}\n\nLabelFrame.prototype = {\n constructor: LabelFrame,\n\n /**\n * !#en Returns the rect of the label frame in the texture.\n * !#zh 获取 LabelFrame 的纹理矩形区域\n * @method getRect\n * @return {Rect}\n */\n getRect: function () {\n return cc.rect(this._rect);\n },\n \n /**\n * !#en Sets the rect of the label frame in the texture.\n * !#zh 设置 LabelFrame 的纹理矩形区域\n * @method setRect\n * @param {Rect} rect\n */\n setRect: function (rect) {\n this._rect = rect;\n if (this._texture)\n this._calculateUV();\n },\n\n _setDynamicAtlasFrame (frame) {\n if (!frame) return;\n\n this._original = {\n _texture : this._texture,\n _x : this._rect.x,\n _y : this._rect.y\n }\n \n this._texture = frame.texture;\n this._rect.x = frame.x;\n this._rect.y = frame.y;\n this._calculateUV();\n },\n _resetDynamicAtlasFrame () {\n if (!this._original) return;\n this._rect.x = this._original._x;\n this._rect.y = this._original._y;\n this._texture = this._original._texture;\n this._original = null;\n this._calculateUV();\n },\n\n _refreshTexture: function (texture) {\n this._texture = texture;\n this._rect = cc.rect(0, 0, texture.width, texture.height);\n this._calculateUV();\n },\n\n _calculateUV() {\n let rect = this._rect,\n texture = this._texture,\n uv = this.uv,\n texw = texture.width,\n texh = texture.height;\n\n let l = texw === 0 ? 0 : rect.x / texw;\n let r = texw === 0 ? 0 : (rect.x + rect.width) / texw;\n let b = texh === 0 ? 0 : (rect.y + rect.height) / texh;\n let t = texh === 0 ? 0 : rect.y / texh;\n\n uv[0] = l;\n uv[1] = b;\n uv[2] = r;\n uv[3] = b;\n uv[4] = l;\n uv[5] = t;\n uv[6] = r;\n uv[7] = t;\n }\n}\n\nmodule.exports = LabelFrame;\n","/****************************************************************************\n Copyright (c) 2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport WebglBmfontAssembler from '../../webgl/assemblers/label/2d/bmfont';\nimport { vfmtPosUvColorTexId } from '../../webgl/vertex-format';\n\nconst Label = require('../../../components/CCLabel');\nconst LabelOutline = require('../../../components/CCLabelOutline');\nconst textUtils = require('../../../utils/text-utils');\nconst Component = require('../../../components/CCComponent');\nconst RenderTexture = require('../../../assets/CCRenderTexture');\nconst OUTLINE_SUPPORTED = cc.js.isChildClassOf(LabelOutline, Component);\nconst getFontFamily = require('../utils').getFontFamily;\nconst shareLabelInfo = require('../utils').shareLabelInfo;\n\n\nconst FontLetterDefinition = cc.BitmapFont.FontLetterDefinition;\nconst FontAtlas = cc.BitmapFont.FontAtlas;\n\nconst WHITE = cc.Color.WHITE;\nconst space = 0;\nconst bleed = 2;\nconst _invisibleAlpha = (1 / 255).toFixed(3);\n\nfunction LetterTexture(char, labelInfo) {\n this._texture = null;\n this._labelInfo = labelInfo;\n this._char = char;\n this._hash = null;\n this._data = null;\n this._canvas = null;\n this._context = null;\n this._width = 0;\n this._height = 0;\n this._offsetY = 0;\n this._hash = char.charCodeAt(0) + labelInfo.hash;\n}\n\nLetterTexture.prototype = {\n constructor: LetterTexture,\n\n updateRenderData () {\n this._updateProperties();\n this._updateTexture();\n },\n _updateProperties () {\n this._texture = new cc.Texture2D();\n this._data = Label._canvasPool.get();\n this._canvas = this._data.canvas;\n this._context = this._data.context;\n this._context.font = this._labelInfo.fontDesc;\n let width = textUtils.safeMeasureText(this._context, this._char, this._labelInfo.fontDesc);\n let blank = this._labelInfo.margin * 2 + bleed;\n this._width = parseFloat(width.toFixed(2)) + blank;\n this._height = (1 + textUtils.BASELINE_RATIO) * this._labelInfo.fontSize + blank;\n this._offsetY = - (this._labelInfo.fontSize * textUtils.BASELINE_RATIO) / 2;\n\n if (this._canvas.width !== this._width) {\n this._canvas.width = this._width;\n }\n\n if (this._canvas.height !== this._height) {\n this._canvas.height = this._height;\n }\n\n this._texture.initWithElement(this._canvas);\n },\n _updateTexture () {\n let context = this._context;\n let labelInfo = this._labelInfo,\n width = this._canvas.width,\n height = this._canvas.height;\n\n const fontSize = this._labelInfo.fontSize;\n let startX = width / 2;\n let startY = height / 2 + fontSize * textUtils.MIDDLE_RATIO + fontSize * textUtils.BASELINE_OFFSET;\n let color = labelInfo.color;\n\n // use round for line join to avoid sharp intersect point\n context.lineJoin = 'round';\n context.textAlign = 'center';\n context.clearRect(0, 0, width, height);\n //Add a white background to avoid black edges.\n context.fillStyle = `rgba(${color.r}, ${color.g}, ${color.b}, ${_invisibleAlpha})`;\n context.fillRect(0, 0, width, height);\n context.font = labelInfo.fontDesc;\n\n context.fillStyle = `rgba(${color.r}, ${color.g}, ${color.b}, 1)`;\n if (labelInfo.isOutlined && labelInfo.margin > 0) {\n let strokeColor = labelInfo.out || WHITE;\n context.strokeStyle = `rgba(${strokeColor.r}, ${strokeColor.g}, ${strokeColor.b}, ${strokeColor.a / 255})`;\n context.lineWidth = labelInfo.margin * 2;\n context.strokeText(this._char, startX, startY);\n }\n context.fillText(this._char, startX, startY);\n\n this._texture.handleLoadedTexture();\n },\n\n destroy() {\n this._texture._packable = false;\n this._texture.destroy();\n this._texture = null;\n Label._canvasPool.put(this._data);\n },\n}\n\nfunction LetterAtlas(atlases, width, height) {\n let texture = new RenderTexture();\n texture.initWithSize(width, height);\n texture.update();\n\n this._atlases = atlases;\n this._texture = texture;\n this._id = 0;\n this._tmpId = -1;\n\n this._x = space;\n this._y = space;\n this._nexty = space;\n\n this.frees = [];\n this.waitCleans = [];\n\n this._width = width;\n this._height = height;\n}\n\ncc.js.mixin(LetterAtlas.prototype, {\n insertLetterTexture(letterTexture) {\n let texture = letterTexture._texture;\n let width = texture.width, height = texture.height;\n\n // 先寻找是否有可用的被回收的区域\n if (this.frees.length > 0) {\n let score = Number.MAX_VALUE;\n let areaFit = 0;\n let original = null;\n let originalIndex = 0;\n\n for (let i = 0; i < this.frees.length; i++) {\n const freeLetter = this.frees[i];\n if (freeLetter._width === width && freeLetter._height === height) {\n areaFit = freeLetter._width * freeLetter._height - width * height;\n if (areaFit < score) {\n original = freeLetter;\n originalIndex = i;\n score = areaFit;\n }\n }\n }\n\n if (original) {\n original._hash = letterTexture._hash;\n original.w = letterTexture._width - bleed;\n original.h = letterTexture._height - bleed;\n original.xAdvance = original.w;\n original.offsetY = letterTexture._offsetY;\n\n this._texture.drawTextureAt(texture, original.u - bleed / 2, original.v - bleed / 2);\n\n this._dirty = true;\n\n this.removeFreeLetter(originalIndex);\n\n this._atlases._fontDefDictionary.addLetterDefinitions(letterTexture._hash, original);\n return original;\n }\n }\n\n // 有 bleed 问题,暂时不能复用不同高宽的空间\n // 矫正宽度为三档: <0.75x height <1x height >1x height\n // if (width <= height * 0.75) {\n // width = height * 0.75;\n // } else if (width <= height) {\n // width = height;\n // }\n\n // 没有可用的被回收区域,尝试直接插入\n const oldx = this._x, oldy = this._y, oldnexty = this._nexty;\n\n if ((this._x + width + space) > this._width) {\n // TODO 跳到下一行之前将这行的剩余区域切成多个正方形并放入 frees避免浪费\n this._x = space;\n this._y = this._nexty;\n }\n\n if ((this._y + height) > this._nexty) {\n this._nexty = this._y + height + space;\n }\n\n if (this._nexty > this._height) {\n this._x = oldx;\n this._y = oldy;\n this._nexty = oldnexty;\n\n // 回收 waitCleans\n if (this.waitCleans.length > 0) {\n for (const letter of this.waitCleans) {\n letter._inCleans = false;\n if (letter.ref === 0) {\n delete this._atlases._fontDefDictionary._letterDefinitions[letter._hash];\n this.frees.push(letter);\n }\n }\n this.waitCleans.length = 0;\n return this.insertLetterTexture(letterTexture);\n } else {\n return null;\n }\n }\n\n this._texture.drawTextureAt(texture, this._x, this._y);\n\n this._dirty = true;\n \n let letter = new FontLetterDefinition();\n letter.u = this._x + bleed / 2;\n letter.v = this._y + bleed / 2;\n letter.texture = this._texture;\n letter.atlas = this;\n letter.ref = 0;\n letter.valid = true;\n letter.w = letterTexture._width - bleed;\n letter.h = letterTexture._height - bleed;\n letter._inCleans = false;\n letter._hash = letterTexture._hash;\n letter._width = width;\n letter._height = height;\n letter.xAdvance = letter.w;\n letter.offsetY = letterTexture._offsetY;\n\n this._x += width + space;\n\n this._atlases._fontDefDictionary.addLetterDefinitions(letterTexture._hash, letter);\n \n return letter\n },\n\n pushFreeLetter(letter) {\n const i = this.frees.push(letter) - 1;\n },\n\n removeFreeLetter(index) {\n const temp = this.frees[index];\n const temp2 = this.frees[this.frees.length - 1];\n // temp2.cacheIndex = index;\n // temp.cacheIndex = -1;\n this.frees[index] = temp2;\n this.frees.pop();\n },\n\n update () {\n if (!this._dirty) return;\n this._texture.update();\n this._dirty = false;\n },\n\n reset () {\n this._x = space;\n this._y = space;\n this._nexty = space;\n\n const defs = this._atlases._fontDefDictionary._letterDefinitions;\n for (const key in defs) {\n const def = defs[key];\n if (def.atlas === this) {\n delete defs[key];\n }\n }\n\n this.frees.length = 0;\n this.waitCleans.length = 0;\n },\n\n destroy () {\n this.reset();\n const handler = this._atlases.material.getMultiHandler();\n handler.removeTexture(this._texture);\n this._texture.destroy();\n this._texture = null;\n },\n\n});\n\nclass LetterAtlases {\n\n /**\n * 图集数组\n */\n atlases = [];\n\n /**\n * Char 多纹理材质\n */\n material = null;\n\n /**\n * Fake MaterialVariant\n */\n fakeMaterial = { material: null };\n\n /**\n * 抽象图集\n */\n _fontDefDictionary = new FontAtlas(null);\n\n\n constructor() {\n const handler = new cc.sp.MultiHandler();\n this.material = handler.material;\n this.fakeMaterial.material = this.material;\n\n cc.director.on(cc.Director.EVENT_BEFORE_SCENE_LAUNCH, this.beforeSceneLoad, this);\n }\n\n\n insertLetterTexture(letterTexture) {\n for (const atlas of this.atlases) {\n const letter = atlas.insertLetterTexture(letterTexture);\n if (letter) {\n return letter;\n }\n }\n\n if (this.atlases.length >= 8) {\n return null;\n } else {\n const atlas = new LetterAtlas(this, _atlasWidth, _atlasHeight);\n const len = this.atlases.push(atlas);\n atlas._id = len - 1;\n const handler = this.material.getMultiHandler();\n handler.setTexture(atlas._id, atlas._texture);\n if (!CC_EDITOR && cc.sp.charAtlasAutoBatchCount >= len) {\n cc.sp.multiBatcher.requsetMaterial(atlas._texture);\n }\n return atlas.insertLetterTexture(letterTexture);\n }\n }\n\n\n deleteLetter(letter) {\n letter.ref--;\n if (letter.ref === 0 && !letter._inCleans) {\n letter._inCleans = true;\n letter.atlas.waitCleans.push(letter);\n }\n }\n\n\n update() {\n for (const atlas of this.atlases) {\n atlas.update();\n }\n }\n\n\n reset() {\n this._fontDefDictionary.clear();\n\n for (const atlas of this.atlases) {\n atlas.reset();\n }\n }\n\n\n destroy() {\n this._fontDefDictionary.clear();\n\n for (const atlas of this.atlases) {\n atlas.destroy();\n }\n\n this.atlases.length = 0;\n }\n\n\n beforeSceneLoad() {\n if (cc.sp.charAtlasAutoResetBeforeSceneLoad) {\n this.clearAllCache();\n }\n }\n\n\n clearAllCache() {\n this.reset();\n }\n\n\n getTexture() {\n if (!_emptyTexture) {\n _emptyTexture = new RenderTexture();\n _emptyTexture.initWithSize(_atlasWidth, _atlasHeight);\n _emptyTexture.update();\n }\n return _emptyTexture;\n }\n\n\n getLetter(key) {\n return this._fontDefDictionary._letterDefinitions[key];\n }\n\n\n getLetterDefinitionForChar(char, labelInfo) {\n let hash = char.charCodeAt(0) + labelInfo.hash;\n let letter = this._fontDefDictionary._letterDefinitions[hash];\n if (!letter) {\n let temp = new LetterTexture(char, labelInfo);\n temp.updateRenderData();\n letter = this.insertLetterTexture(temp);\n temp.destroy();\n }\n\n if (letter && _firstTraverse) {\n letter.ref++;\n _assembler._letterRefs.push(letter);\n this.checkMaterialAndUpdateTexId(letter);\n }\n\n return letter;\n }\n\n\n checkMaterialAndUpdateTexId(letter) {\n const atlas = letter.atlas;\n const comp = _assembler._renderComp;\n\n if (!_usedMaterial) {\n return;\n }\n\n // 检查是否需要自动切换材质\n if (_needCheckMaterial) {\n _needCheckMaterial = false;\n if (_usedMaterial.material !== _shareAtlas.material) {\n _assembler.checkAndSwitchMaterial(comp, atlas._texture, _usedMaterial);\n _usedMaterial = comp._materials[0];\n }\n }\n\n // 检查是否需要更新 atlas tmpId使用内置材质则不检查\n if (_usedMaterial.material !== _shareAtlas.material && atlas._tmpId === -1) {\n const handler = _usedMaterial.material.getMultiHandler();\n if (handler) {\n const index = handler.getIndex(atlas._texture.getImpl());\n if (index !== -1) {\n atlas._tmpId = index;\n return;\n }\n }\n\n // 如果无法在材质中找到 texture则切换至内置材质\n comp.setMaterial(0, _shareAtlas.material);\n _usedMaterial = _shareAtlas.fakeMaterial;\n }\n }\n\n}\n\nfunction computeHash (labelInfo) {\n let hashData = '|';\n let color = labelInfo.color.toHEX();\n let out = '';\n if (labelInfo.isOutlined && labelInfo.margin > 0) {\n out = out + labelInfo.margin + labelInfo.out.toHEX();\n }\n \n return hashData + labelInfo.fontSize + labelInfo.fontFamily + color + out;\n}\n\nlet _shareAtlas = null;\n\nlet _atlasWidth = 2048;\nlet _atlasHeight = 2048;\nlet _isBold = false;\nlet _usedMaterial = null;\nlet _needCheckMaterial = false;\nlet _firstTraverse = false;\nlet _assembler = null;\nlet _emptyTexture = null;\n\nexport default class LetterFontAssembler extends WebglBmfontAssembler {\n _letterRefs = [];\n\n initData() {\n let data = this._renderData;\n data.createFlexData(0, this.verticesCount, this.indicesCount, this.getVfmt());\n }\n\n getVfmt() {\n return vfmtPosUvColorTexId;\n }\n\n getBuffer() {\n return cc.renderer._handle.getBuffer(\"mesh\", this.getVfmt());\n }\n\n _getAssemblerData () {\n if (!_shareAtlas) {\n _shareAtlas = new LetterAtlases();\n cc.Label._shareAtlas = _shareAtlas;\n }\n \n return _shareAtlas.getTexture();\n }\n\n _updateFontFamily (comp) {\n shareLabelInfo.fontAtlas = _shareAtlas;\n shareLabelInfo.fontFamily = getFontFamily(comp);\n\n // outline\n let outline = OUTLINE_SUPPORTED && comp.getComponent(LabelOutline);\n if (outline && outline.enabled) {\n shareLabelInfo.isOutlined = true;\n shareLabelInfo.margin = outline.width;\n shareLabelInfo.out = outline.color.clone();\n shareLabelInfo.out.a = outline.color.a * comp.node.color.a / 255.0;\n }\n else {\n shareLabelInfo.isOutlined = false;\n shareLabelInfo.margin = 0;\n }\n }\n\n _updateLabelInfo (comp) {\n shareLabelInfo.fontDesc = this._getFontDesc();\n shareLabelInfo.color = comp.node.color;\n shareLabelInfo.hash = computeHash(shareLabelInfo);\n }\n\n _getFontDesc () {\n let fontDesc = shareLabelInfo.fontSize.toString() + 'px ';\n fontDesc = fontDesc + shareLabelInfo.fontFamily;\n if (_isBold) {\n fontDesc = \"bold \" + fontDesc;\n }\n\n return fontDesc;\n }\n _computeHorizontalKerningForText () {}\n _determineRect (tempRect) {\n return false;\n }\n\n _aftUpdateRenderData(comp) {\n // 还原 tex id 与当前使用材质\n _assembler = this;\n _usedMaterial = _assembler._renderComp._materials[0];\n _needCheckMaterial = true;\n _firstTraverse = true;\n for (const atlas of _shareAtlas.atlases) {\n atlas._tmpId = -1;\n }\n\n // 还原 letterRef\n this._recycleLetterRef();\n\n super._aftUpdateRenderData(comp);\n\n _usedMaterial = null;\n _assembler = null;\n }\n\n _finishMultilineTextWrap() {\n _firstTraverse = false;\n }\n\n _recycleLetterRef() {\n for (const letter of this._letterRefs) {\n _shareAtlas.deleteLetter(letter);\n }\n this._letterRefs.length = 0;\n }\n\n _resetAssemblerData(assemblerData) {\n if (this._letterRefs.length !== 0) {\n this._recycleLetterRef();\n }\n }\n\n appendVerts(comp, offset, l, r, b, t, letter) {\n super.appendVerts(comp, offset, l, r, b, t, letter);\n\n // update texId\n const renderData = this._renderData;\n const verts = renderData.vDatas[0];\n const floatsPerVert = this.floatsPerVert;\n let texIdOffset = offset + this.texIdOffset;\n const id = !_usedMaterial ? 0 : (_usedMaterial.material !== _shareAtlas.material ? letter.atlas._tmpId : letter.atlas._id);\n\n verts[texIdOffset] = id;\n texIdOffset += floatsPerVert;\n verts[texIdOffset] = id;\n texIdOffset += floatsPerVert;\n verts[texIdOffset] = id;\n texIdOffset += floatsPerVert;\n verts[texIdOffset] = id;\n }\n\n}\n\nLetterFontAssembler.prototype.floatsPerVert = 6;\nLetterFontAssembler.prototype.texIdOffset = 5;\nLetterFontAssembler.prototype.isMulti = true;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport Assembler2D from '../../assembler-2d';\n\nlet textUtils = require('../../../utils/text-utils');\nconst macro = require('../../../platform/CCMacro');\nconst Label = require('../../../components/CCLabel');\nconst LabelOutline = require('../../../components/CCLabelOutline');\nconst LabelShadow = require('../../../components/CCLabelShadow');\nconst Overflow = Label.Overflow;\nconst deleteFromDynamicAtlas = require('../utils').deleteFromDynamicAtlas;\nconst getFontFamily = require('../utils').getFontFamily;\n\nconst _invisibleAlpha = (1 / 255).toFixed(3);\nconst MAX_SIZE = 2048;\n\nlet _context = null;\nlet _canvas = null;\nlet _texture = null;\n\nlet _fontDesc = '';\nlet _string = '';\nlet _fontSize = 0;\nlet _drawFontSize = 0;\nlet _splitedStrings = [];\nlet _canvasSize = cc.Size.ZERO;\nlet _lineHeight = 0;\nlet _hAlign = 0;\nlet _vAlign = 0;\nlet _color = null;\nlet _fontFamily = '';\nlet _overflow = Overflow.NONE;\nlet _isWrapText = false;\nlet _premultiply = false;\nlet _isRetina = false;\nlet _retinaScale = 1;\n\n// outline\nlet _outlineComp = null;\nlet _outlineColor = cc.Color.WHITE;\n\n// shadow\nlet _shadowComp = null;\nlet _shadowColor = cc.Color.BLACK;\n\nlet _canvasPadding = cc.rect();\nlet _contentSizeExtend = cc.Size.ZERO;\nlet _nodeContentSize = cc.Size.ZERO;\n\nlet _enableBold = false;\nlet _enableItalic = false;\nlet _enableUnderline = false;\nlet _underlineThickness = 0;\n\nlet _drawUnderlinePos = cc.Vec2.ZERO;\nlet _drawUnderlineWidth = 0;\n\nlet _sharedLabelData;\n\nconst Alignment = [\n 'left', // macro.TextAlignment.LEFT\n 'center', // macro.TextAlignment.CENTER\n 'right' // macro.TextAlignment.RIGHT\n];\n\nexport default class TTFAssembler extends Assembler2D {\n _getAssemblerData () {\n _sharedLabelData = Label._canvasPool.get();\n _sharedLabelData.canvas.width = _sharedLabelData.canvas.height = 1;\n return _sharedLabelData;\n }\n\n _resetAssemblerData (assemblerData) {\n if (assemblerData) {\n Label._canvasPool.put(assemblerData);\n }\n }\n\n updateRenderData (comp) {\n super.updateRenderData(comp);\n \n if (!comp._vertsDirty) return false;\n\n this._updateProperties(comp);\n this._calculateLabelFont();\n this._updateLabelDimensions();\n this._updateTexture(comp);\n const assemblerChanged = this._calDynamicAtlas(comp);\n\n // 打包到动态图集时可能会切换 Assembler\n if (!assemblerChanged) {\n this._aftUpdateRenderData(comp);\n }\n\n return assemblerChanged;\n }\n\n _aftUpdateRenderData(comp) {\n if (_isRetina) {\n _fontSize /= _retinaScale;\n _nodeContentSize.width /= _retinaScale;\n _nodeContentSize.height /= _retinaScale;\n }\n comp._actualFontSize = _fontSize;\n comp.node.setContentSize(_nodeContentSize);\n\n this.updateVerts(comp);\n\n comp._vertsDirty = false;\n\n _context = null;\n _canvas = null;\n _texture = null;\n }\n\n getTTFTextureSizeScale() {\n return _isRetina ? _retinaScale : 1;\n }\n\n updateVerts () {\n }\n\n _updatePaddingRect () {\n let top = 0, bottom = 0, left = 0, right = 0;\n let outlineWidth = 0;\n _contentSizeExtend.width = _contentSizeExtend.height = 0;\n if (_outlineComp) {\n outlineWidth = _outlineComp.width;\n if (_isRetina) {\n outlineWidth *= _retinaScale;\n }\n top = bottom = left = right = outlineWidth;\n _contentSizeExtend.width = _contentSizeExtend.height = outlineWidth * 2;\n }\n if (_shadowComp) {\n let shadowWidth = _shadowComp.blur + outlineWidth;\n left = Math.max(left, -_shadowComp._offset.x + shadowWidth);\n right = Math.max(right, _shadowComp._offset.x + shadowWidth);\n top = Math.max(top, _shadowComp._offset.y + shadowWidth);\n bottom = Math.max(bottom, -_shadowComp._offset.y + shadowWidth);\n }\n if (_enableItalic) {\n //0.0174532925 = 3.141592653 / 180\n let offset = _drawFontSize * Math.tan(12 * 0.0174532925);\n right += offset;\n _contentSizeExtend.width += offset;\n }\n _canvasPadding.x = left;\n _canvasPadding.y = top;\n _canvasPadding.width = left + right;\n _canvasPadding.height = top + bottom;\n }\n\n _updateProperties (comp) {\n let assemblerData = comp._assemblerData;\n _context = assemblerData.context;\n _canvas = assemblerData.canvas;\n _texture = comp._frame._original ? comp._frame._original._texture : comp._frame._texture;\n\n _isRetina = (cc.sp.enableLabelRetina && comp.enableRetina === 0) || comp.enableRetina === 1;\n _retinaScale = cc.sp.labelRetinaScale;\n _string = comp.string.toString();\n _fontSize = comp._fontSize;\n _nodeContentSize = comp.node.getContentSize();\n _lineHeight = comp._lineHeight;\n _drawFontSize = _fontSize;\n _underlineThickness = comp.underlineHeight || _drawFontSize / 8;\n\n if (_isRetina) {\n _fontSize *= _retinaScale;\n _nodeContentSize.width *= _retinaScale;\n _nodeContentSize.height *= _retinaScale;\n _lineHeight *= _retinaScale;\n if (comp.underlineHeight) _underlineThickness *= _retinaScale;\n _drawFontSize = _fontSize;\n }\n\n _overflow = comp.overflow;\n _canvasSize.width = _nodeContentSize.width;\n _canvasSize.height = _nodeContentSize.height;\n _hAlign = comp.horizontalAlign;\n _vAlign = comp.verticalAlign;\n _color = comp.node.color;\n _enableBold = comp.enableBold;\n _enableItalic = comp.enableItalic;\n _enableUnderline = comp.enableUnderline;\n _fontFamily = getFontFamily(comp);\n _premultiply = comp.srcBlendFactor === cc.macro.BlendFactor.ONE;\n\n if (CC_NATIVERENDERER) {\n _context._setPremultiply(_premultiply);\n }\n\n if (_overflow === Overflow.NONE) {\n _isWrapText = false;\n }\n else if (_overflow === Overflow.RESIZE_HEIGHT) {\n _isWrapText = true;\n }\n else {\n _isWrapText = comp.enableWrapText;\n }\n\n // outline\n _outlineComp = LabelOutline && comp.getComponent(LabelOutline);\n _outlineComp = (_outlineComp && _outlineComp.enabled && _outlineComp.width > 0) ? _outlineComp : null;\n if (_outlineComp) {\n _outlineColor.set(_outlineComp.color);\n }\n\n // shadow\n _shadowComp = LabelShadow && comp.getComponent(LabelShadow);\n _shadowComp = (_shadowComp && _shadowComp.enabled) ? _shadowComp : null;\n if (_shadowComp) {\n _shadowColor.set(_shadowComp.color);\n // TODO: temporary solution, cascade opacity for outline color\n _shadowColor.a = _shadowColor.a * comp.node.color.a / 255.0;\n }\n\n this._updatePaddingRect();\n }\n\n _calculateFillTextStartPosition () {\n let labelX = 0;\n if (_hAlign === macro.TextAlignment.RIGHT) {\n labelX = _canvasSize.width - _canvasPadding.width;\n } else if (_hAlign === macro.TextAlignment.CENTER) {\n labelX = (_canvasSize.width - _canvasPadding.width) / 2;\n }\n\n let lineHeight = this._getLineHeight();\n let drawStartY = lineHeight * (_splitedStrings.length - 1);\n // TOP\n let firstLinelabelY = _fontSize * (1 - textUtils.BASELINE_RATIO / 2);\n if (_vAlign !== macro.VerticalTextAlignment.TOP) {\n // free space in vertical direction\n let blank = drawStartY + _canvasPadding.height + _fontSize - _canvasSize.height;\n if (_vAlign === macro.VerticalTextAlignment.BOTTOM) {\n // Unlike BMFont, needs to reserve space below.\n blank += textUtils.BASELINE_RATIO / 2 * _fontSize;\n // BOTTOM\n firstLinelabelY -= blank;\n } else {\n // CENTER\n firstLinelabelY -= blank / 2;\n }\n }\n\n firstLinelabelY += textUtils.BASELINE_OFFSET * _fontSize;\n\n return cc.v2(labelX + _canvasPadding.x, firstLinelabelY + _canvasPadding.y);\n }\n\n _setupOutline () {\n _context.strokeStyle = `rgba(${_outlineColor.r}, ${_outlineColor.g}, ${_outlineColor.b}, ${_outlineColor.a / 255})`;\n _context.lineWidth = _outlineComp.width * 2 * (_isRetina ? _retinaScale : 1);\n }\n\n _setupShadow () {\n _context.shadowColor = `rgba(${_shadowColor.r}, ${_shadowColor.g}, ${_shadowColor.b}, ${_shadowColor.a / 255})`;\n _context.shadowBlur = _shadowComp.blur * (_isRetina ? _retinaScale : 1);\n _context.shadowOffsetX = _shadowComp.offset.x * (_isRetina ? _retinaScale : 1);\n _context.shadowOffsetY = -_shadowComp.offset.y * (_isRetina ? _retinaScale : 1);\n }\n\n _drawTextEffect (startPosition, lineHeight) {\n if (!_shadowComp && !_outlineComp && !_enableUnderline) return;\n\n let isMultiple = _splitedStrings.length > 1 && _shadowComp;\n let measureText = this._measureText(_context, _fontDesc);\n let drawTextPosX = 0, drawTextPosY = 0;\n\n // only one set shadow and outline\n if (_shadowComp) {\n this._setupShadow();\n }\n \n if (_outlineComp) {\n this._setupOutline();\n }\n\n // draw shadow and (outline or text)\n for (let i = 0; i < _splitedStrings.length; ++i) {\n drawTextPosX = startPosition.x;\n drawTextPosY = startPosition.y + i * lineHeight;\n // multiple lines need to be drawn outline and fill text\n if (isMultiple) {\n if (_outlineComp) {\n _context.strokeText(_splitedStrings[i], drawTextPosX, drawTextPosY);\n }\n _context.fillText(_splitedStrings[i], drawTextPosX, drawTextPosY);\n }\n\n // draw underline\n if (_enableUnderline) {\n _drawUnderlineWidth = measureText(_splitedStrings[i]);\n if (_hAlign === macro.TextAlignment.RIGHT) {\n _drawUnderlinePos.x = startPosition.x - _drawUnderlineWidth;\n } else if (_hAlign === macro.TextAlignment.CENTER) {\n _drawUnderlinePos.x = startPosition.x - (_drawUnderlineWidth / 2);\n } else {\n _drawUnderlinePos.x = startPosition.x;\n }\n _drawUnderlinePos.y = drawTextPosY + _drawFontSize / 8;\n _context.fillRect(_drawUnderlinePos.x, _drawUnderlinePos.y, _drawUnderlineWidth, _underlineThickness);\n }\n }\n\n if (isMultiple) {\n _context.shadowColor = 'transparent';\n }\n }\n\n _updateTexture () {\n _context.clearRect(0, 0, _canvas.width, _canvas.height);\n // use round for line join to avoid sharp intersect point\n _context.lineJoin = 'round';\n //Add a white background to avoid black edges.\n if (!_premultiply) {\n //TODO: it is best to add alphaTest to filter out the background color.\n let _fillColor = _outlineComp ? _outlineColor : _color;\n _context.fillStyle = `rgba(${_fillColor.r}, ${_fillColor.g}, ${_fillColor.b}, ${_invisibleAlpha})`;\n _context.fillRect(0, 0, _canvas.width, _canvas.height);\n _context.fillStyle = `rgba(${_color.r}, ${_color.g}, ${_color.b}, 1)`;\n } else {\n _context.fillStyle = `rgba(${_color.r}, ${_color.g}, ${_color.b}, ${_color.a / 255.0})`;\n }\n\n let startPosition = this._calculateFillTextStartPosition();\n let lineHeight = this._getLineHeight();\n let drawTextPosX = startPosition.x, drawTextPosY = 0;\n // draw shadow and underline\n this._drawTextEffect(startPosition, lineHeight);\n // draw text and outline\n for (let i = 0; i < _splitedStrings.length; ++i) {\n drawTextPosY = startPosition.y + i * lineHeight;\n if (_outlineComp) {\n _context.strokeText(_splitedStrings[i], drawTextPosX, drawTextPosY);\n }\n _context.fillText(_splitedStrings[i], drawTextPosX, drawTextPosY);\n }\n\n if (_shadowComp) {\n _context.shadowColor = 'transparent';\n }\n\n _texture.handleLoadedTexture();\n }\n\n _calDynamicAtlas (comp) {\n if(comp.cacheMode !== Label.CacheMode.BITMAP) return false;\n let frame = comp._frame;\n // Delete cache in atlas.\n deleteFromDynamicAtlas(comp, frame);\n if (!frame._original) {\n frame.setRect(cc.rect(0, 0, _canvas.width, _canvas.height));\n }\n return this.packDynamicAtlasAndCheckMaterial(comp, frame);\n }\n\n packDynamicAtlasAndCheckMaterial(comp, frame) {\n const allowDynamicAtlas = comp.allowDynamicAtlas;\n if ((cc.sp.allowDynamicAtlas && allowDynamicAtlas === 0) || allowDynamicAtlas === 1) {\n frame._texture._uuid = _fontDesc\n + _overflow\n + (_premultiply ? 'P' : 'NP')\n + (_enableUnderline ? 'UL' : 'NUL')\n + _string;\n\n if (_outlineComp) {\n frame._texture._uuid += _outlineComp.color.toHEX()\n + ','\n + _outlineComp.width\n + ',';\n }\n\n if (_shadowComp) {\n frame._texture._uuid += _shadowComp.color.toHEX()\n + _shadowComp.offset.x\n + ','\n + _shadowComp.offset.y\n + ','\n + _shadowComp.blur;\n }\n }\n return super.packDynamicAtlasAndCheckMaterial(comp, frame);\n }\n\n _updateLabelDimensions () {\n let maxTextureSize = cc.renderer.device.caps ? cc.renderer.device.caps.maxTextureSize : MAX_SIZE;\n if (_canvasSize.width > maxTextureSize || _canvasSize.height > maxTextureSize) {\n cc.warn(\"The maximum texture size supported by the device is \" + maxTextureSize);\n }\n _canvasSize.width = Math.min(_canvasSize.width, maxTextureSize);\n _canvasSize.height = Math.min(_canvasSize.height, maxTextureSize);\n\n let recreate = false;\n if (_canvas.width !== _canvasSize.width) {\n _canvas.width = _canvasSize.width;\n recreate = true\n }\n\n if (_canvas.height !== _canvasSize.height) {\n _canvas.height = _canvasSize.height;\n recreate = true\n }\n\n recreate && (_context.font = _fontDesc);\n // align\n _context.textAlign = Alignment[_hAlign];\n }\n\n _getFontDesc () {\n let fontDesc = _fontSize.toString() + 'px ';\n fontDesc = fontDesc + _fontFamily;\n if (_enableBold) {\n fontDesc = \"bold \" + fontDesc;\n }\n if (_enableItalic) {\n fontDesc = \"italic \" + fontDesc;\n }\n return fontDesc;\n }\n\n _getLineHeight () {\n let nodeSpacingY = _lineHeight;\n if (nodeSpacingY === 0) {\n nodeSpacingY = _fontSize;\n } else {\n nodeSpacingY = nodeSpacingY * _fontSize / _drawFontSize;\n }\n\n return nodeSpacingY | 0;\n }\n\n _calculateParagraphLength (paragraphedStrings, ctx) {\n let paragraphLength = [];\n\n for (let i = 0; i < paragraphedStrings.length; ++i) {\n let width = textUtils.safeMeasureText(ctx, paragraphedStrings[i], _fontDesc);\n paragraphLength.push(width);\n }\n\n return paragraphLength;\n }\n\n _measureText (ctx, fontDesc) {\n return function (string) {\n return textUtils.safeMeasureText(ctx, string, fontDesc);\n };\n }\n\n _calculateShrinkFont (paragraphedStrings) {\n let paragraphLength = this._calculateParagraphLength(paragraphedStrings, _context);\n \n let i = 0;\n let totalHeight = 0;\n let maxLength = 0;\n\n if (_isWrapText) {\n let canvasWidthNoMargin = _nodeContentSize.width;\n let canvasHeightNoMargin = _nodeContentSize.height;\n if (canvasWidthNoMargin < 0 || canvasHeightNoMargin < 0) {\n return;\n }\n totalHeight = canvasHeightNoMargin + 1;\n let actualFontSize = _fontSize + 1;\n let textFragment = \"\";\n //let startShrinkFontSize = actualFontSize | 0;\n let left = 0, right = actualFontSize | 0, mid = 0;\n\n while (left < right) {\n mid = (left + right + 1) >> 1;\n\n if (mid <= 0) {\n cc.logID(4003);\n break;\n }\n\n _fontSize = mid;\n _fontDesc = this._getFontDesc();\n _context.font = _fontDesc;\n let lineHeight = this._getLineHeight();\n\n totalHeight = 0;\n for (i = 0; i < paragraphedStrings.length; ++i) {\n let allWidth = textUtils.safeMeasureText(_context, paragraphedStrings[i], _fontDesc);\n textFragment = textUtils.fragmentText(paragraphedStrings[i],\n allWidth,\n canvasWidthNoMargin,\n this._measureText(_context, _fontDesc));\n totalHeight += textFragment.length * lineHeight;\n }\n\n if (totalHeight > canvasHeightNoMargin) {\n right = mid - 1;\n } else {\n left = mid;\n }\n }\n\n if (left === 0) {\n cc.logID(4003);\n } else {\n _fontSize = left;\n _fontDesc = this._getFontDesc();\n _context.font = _fontDesc;\n }\n } else {\n totalHeight = paragraphedStrings.length * this._getLineHeight();\n\n for (i = 0; i < paragraphedStrings.length; ++i) {\n if (maxLength < paragraphLength[i]) {\n maxLength = paragraphLength[i];\n }\n }\n let scaleX = (_canvasSize.width - _canvasPadding.width) / maxLength;\n let scaleY = _canvasSize.height / totalHeight;\n\n _fontSize = (_drawFontSize * Math.min(1, scaleX, scaleY)) | 0;\n _fontDesc = this._getFontDesc();\n _context.font = _fontDesc;\n }\n }\n\n _calculateWrapText (paragraphedStrings) {\n if (!_isWrapText) return;\n\n _splitedStrings = [];\n let canvasWidthNoMargin = _nodeContentSize.width;\n for (let i = 0; i < paragraphedStrings.length; ++i) {\n let allWidth = textUtils.safeMeasureText(_context, paragraphedStrings[i], _fontDesc);\n let textFragment = textUtils.fragmentText(paragraphedStrings[i],\n allWidth,\n canvasWidthNoMargin,\n this._measureText(_context, _fontDesc));\n _splitedStrings = _splitedStrings.concat(textFragment);\n }\n }\n\n _calculateLabelFont () {\n let paragraphedStrings = _string.split('\\n');\n\n _splitedStrings = paragraphedStrings;\n _fontDesc = this._getFontDesc();\n _context.font = _fontDesc;\n\n switch (_overflow) {\n case Overflow.NONE: {\n let canvasSizeX = 0;\n let canvasSizeY = 0;\n for (let i = 0; i < paragraphedStrings.length; ++i) {\n let paraLength = textUtils.safeMeasureText(_context, paragraphedStrings[i], _fontDesc);\n canvasSizeX = canvasSizeX > paraLength ? canvasSizeX : paraLength;\n }\n canvasSizeY = (_splitedStrings.length + textUtils.BASELINE_RATIO) * this._getLineHeight();\n let rawWidth = parseFloat(canvasSizeX.toFixed(2));\n let rawHeight = parseFloat(canvasSizeY.toFixed(2));\n _canvasSize.width = rawWidth + _canvasPadding.width;\n _canvasSize.height = rawHeight + _canvasPadding.height;\n _nodeContentSize.width = rawWidth + _contentSizeExtend.width;\n _nodeContentSize.height = rawHeight + _contentSizeExtend.height;\n break;\n }\n case Overflow.SHRINK: {\n this._calculateShrinkFont(paragraphedStrings);\n this._calculateWrapText(paragraphedStrings);\n break;\n }\n case Overflow.CLAMP: {\n this._calculateWrapText(paragraphedStrings);\n break;\n }\n case Overflow.RESIZE_HEIGHT: {\n this._calculateWrapText(paragraphedStrings);\n let rawHeight = (_splitedStrings.length + textUtils.BASELINE_RATIO) * this._getLineHeight();\n _canvasSize.height = rawHeight + _canvasPadding.height;\n // set node height\n _nodeContentSize.height = rawHeight + _contentSizeExtend.height;\n break;\n }\n }\n }\n}\n\n","const dynamicAtlasManager = require('./dynamic-atlas/manager');\nconst WHITE = cc.Color.WHITE;\n\n// share data of bmfont\nlet shareLabelInfo = {\n fontAtlas: null,\n \n fontSize:0,\n lineHeight:0,\n hAlign:0,\n vAlign:0,\n\n hash:\"\",\n fontFamily:\"\",\n fontDesc:\"Arial\",\n color:WHITE,\n isOutlined:false,\n out:WHITE,\n margin:0,\n}\n\nmodule.exports = {\n\n deleteFromDynamicAtlas (comp, frame) {\n if (frame && !CC_TEST) {\n if (frame._original && dynamicAtlasManager) {\n dynamicAtlasManager.deleteAtlasSpriteFrame(frame);\n frame._resetDynamicAtlasFrame();\n }\n }\n },\n\n getFontFamily (comp) {\n if (!comp.useSystemFont) {\n if (comp.font) {\n if (comp.font._nativeAsset) {\n return comp.font._nativeAsset;\n }\n cc.assetManager.postLoadNative(comp.font, function (err) {\n comp.isValid && comp.setVertsDirty();\n });\n return 'Arial';\n }\n \n return 'Arial';\n }\n else {\n return comp.fontFamily || 'Arial';\n }\n },\n\n shareLabelInfo: shareLabelInfo\n}\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n'use strict';\n\ncc.Graphics.earcut = module.exports = earcut;\n\nfunction earcut(data, holeIndices, dim) {\n\n dim = dim || 2;\n\n var hasHoles = holeIndices && holeIndices.length,\n outerLen = hasHoles ? holeIndices[0] * dim : data.length,\n outerNode = linkedList(data, 0, outerLen, dim, true),\n triangles = [];\n\n if (!outerNode) return triangles;\n\n var minX, minY, maxX, maxY, x, y, size;\n\n if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);\n\n // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n if (data.length > 80 * dim) {\n minX = maxX = data[0];\n minY = maxY = data[1];\n\n for (var i = dim; i < outerLen; i += dim) {\n x = data[i];\n y = data[i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n }\n\n // minX, minY and size are later used to transform coords into integers for z-order calculation\n size = Math.max(maxX - minX, maxY - minY);\n }\n\n earcutLinked(outerNode, triangles, dim, minX, minY, size);\n\n return triangles;\n}\n\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction linkedList(data, start, end, dim, clockwise) {\n var i, last;\n\n if (clockwise === (signedArea(data, start, end, dim) > 0)) {\n for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);\n } else {\n for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);\n }\n\n if (last && equals(last, last.next)) {\n removeNode(last);\n last = last.next;\n }\n\n return last;\n}\n\n// eliminate colinear or duplicate points\nfunction filterPoints(start, end) {\n if (!start) return start;\n if (!end) end = start;\n\n var p = start,\n again;\n do {\n again = false;\n\n if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\n removeNode(p);\n p = end = p.prev;\n if (p === p.next) return null;\n again = true;\n\n } else {\n p = p.next;\n }\n } while (again || p !== end);\n\n return end;\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction earcutLinked(ear, triangles, dim, minX, minY, size, pass) {\n if (!ear) return;\n\n // interlink polygon nodes in z-order\n if (!pass && size) indexCurve(ear, minX, minY, size);\n\n var stop = ear,\n prev, next;\n\n // iterate through ears, slicing them one by one\n while (ear.prev !== ear.next) {\n prev = ear.prev;\n next = ear.next;\n\n if (size ? isEarHashed(ear, minX, minY, size) : isEar(ear)) {\n // cut off the triangle\n triangles.push(prev.i / dim);\n triangles.push(ear.i / dim);\n triangles.push(next.i / dim);\n\n removeNode(ear);\n\n // skipping the next vertice leads to less sliver triangles\n ear = next.next;\n stop = next.next;\n\n continue;\n }\n\n ear = next;\n\n // if we looped through the whole remaining polygon and can't find any more ears\n if (ear === stop) {\n // try filtering points and slicing again\n if (!pass) {\n earcutLinked(filterPoints(ear), triangles, dim, minX, minY, size, 1);\n\n // if this didn't work, try curing all small self-intersections locally\n } else if (pass === 1) {\n ear = cureLocalIntersections(ear, triangles, dim);\n earcutLinked(ear, triangles, dim, minX, minY, size, 2);\n\n // as a last resort, try splitting the remaining polygon into two\n } else if (pass === 2) {\n splitEarcut(ear, triangles, dim, minX, minY, size);\n }\n\n break;\n }\n }\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction isEar(ear) {\n var a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // now make sure we don't have other points inside the potential ear\n var p = ear.next.next;\n\n while (p !== ear.prev) {\n if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.next;\n }\n\n return true;\n}\n\nfunction isEarHashed(ear, minX, minY, size) {\n var a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // triangle bbox; min & max are calculated like this for speed\n var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x),\n minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y),\n maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x),\n maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y);\n\n // z-order range for the current triangle bbox;\n var minZ = zOrder(minTX, minTY, minX, minY, size),\n maxZ = zOrder(maxTX, maxTY, minX, minY, size);\n\n // first look for points inside the triangle in increasing z-order\n var p = ear.nextZ;\n\n while (p && p.z <= maxZ) {\n if (p !== ear.prev && p !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.nextZ;\n }\n\n // then look for points in decreasing z-order\n p = ear.prevZ;\n\n while (p && p.z >= minZ) {\n if (p !== ear.prev && p !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n }\n\n return true;\n}\n\n// go through all polygon nodes and cure small local self-intersections\nfunction cureLocalIntersections(start, triangles, dim) {\n var p = start;\n do {\n var a = p.prev,\n b = p.next.next;\n\n if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\n\n triangles.push(a.i / dim);\n triangles.push(p.i / dim);\n triangles.push(b.i / dim);\n\n // remove two nodes involved\n removeNode(p);\n removeNode(p.next);\n\n p = start = b;\n }\n p = p.next;\n } while (p !== start);\n\n return p;\n}\n\n// try splitting polygon into two and triangulate them independently\nfunction splitEarcut(start, triangles, dim, minX, minY, size) {\n // look for a valid diagonal that divides the polygon into two\n var a = start;\n do {\n var b = a.next.next;\n while (b !== a.prev) {\n if (a.i !== b.i && isValidDiagonal(a, b)) {\n // split the polygon in two by the diagonal\n var c = splitPolygon(a, b);\n\n // filter colinear points around the cuts\n a = filterPoints(a, a.next);\n c = filterPoints(c, c.next);\n\n // run earcut on each half\n earcutLinked(a, triangles, dim, minX, minY, size);\n earcutLinked(c, triangles, dim, minX, minY, size);\n return;\n }\n b = b.next;\n }\n a = a.next;\n } while (a !== start);\n}\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction eliminateHoles(data, holeIndices, outerNode, dim) {\n var queue = [],\n i, len, start, end, list;\n\n for (i = 0, len = holeIndices.length; i < len; i++) {\n start = holeIndices[i] * dim;\n end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n list = linkedList(data, start, end, dim, false);\n if (list === list.next) list.steiner = true;\n queue.push(getLeftmost(list));\n }\n\n queue.sort(compareX);\n\n // process holes from left to right\n for (i = 0; i < queue.length; i++) {\n eliminateHole(queue[i], outerNode);\n outerNode = filterPoints(outerNode, outerNode.next);\n }\n\n return outerNode;\n}\n\nfunction compareX(a, b) {\n return a.x - b.x;\n}\n\n// find a bridge between vertices that connects hole with an outer ring and and link it\nfunction eliminateHole(hole, outerNode) {\n outerNode = findHoleBridge(hole, outerNode);\n if (outerNode) {\n var b = splitPolygon(outerNode, hole);\n filterPoints(b, b.next);\n }\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction findHoleBridge(hole, outerNode) {\n var p = outerNode,\n hx = hole.x,\n hy = hole.y,\n qx = -Infinity,\n m;\n\n // find a segment intersected by a ray from the hole's leftmost point to the left;\n // segment's endpoint with lesser x will be potential connection point\n do {\n if (hy <= p.y && hy >= p.next.y) {\n var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n if (x <= hx && x > qx) {\n qx = x;\n if (x === hx) {\n if (hy === p.y) return p;\n if (hy === p.next.y) return p.next;\n }\n m = p.x < p.next.x ? p : p.next;\n }\n }\n p = p.next;\n } while (p !== outerNode);\n\n if (!m) return null;\n\n if (hx === qx) return m.prev; // hole touches outer segment; pick lower endpoint\n\n // look for points inside the triangle of hole point, segment intersection and endpoint;\n // if there are no points found, we have a valid connection;\n // otherwise choose the point of the minimum angle with the ray as connection point\n\n var stop = m,\n mx = m.x,\n my = m.y,\n tanMin = Infinity,\n tan;\n\n p = m.next;\n\n while (p !== stop) {\n if (hx >= p.x && p.x >= mx &&\n pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n\n tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n\n if ((tan < tanMin || (tan === tanMin && p.x > m.x)) && locallyInside(p, hole)) {\n m = p;\n tanMin = tan;\n }\n }\n\n p = p.next;\n }\n\n return m;\n}\n\n// interlink polygon nodes in z-order\nfunction indexCurve(start, minX, minY, size) {\n var p = start;\n do {\n if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, size);\n p.prevZ = p.prev;\n p.nextZ = p.next;\n p = p.next;\n } while (p !== start);\n\n p.prevZ.nextZ = null;\n p.prevZ = null;\n\n sortLinked(p);\n}\n\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction sortLinked(list) {\n var i, p, q, e, tail, numMerges, pSize, qSize,\n inSize = 1;\n\n do {\n p = list;\n list = null;\n tail = null;\n numMerges = 0;\n\n while (p) {\n numMerges++;\n q = p;\n pSize = 0;\n for (i = 0; i < inSize; i++) {\n pSize++;\n q = q.nextZ;\n if (!q) break;\n }\n\n qSize = inSize;\n\n while (pSize > 0 || (qSize > 0 && q)) {\n\n if (pSize === 0) {\n e = q;\n q = q.nextZ;\n qSize--;\n } else if (qSize === 0 || !q) {\n e = p;\n p = p.nextZ;\n pSize--;\n } else if (p.z <= q.z) {\n e = p;\n p = p.nextZ;\n pSize--;\n } else {\n e = q;\n q = q.nextZ;\n qSize--;\n }\n\n if (tail) tail.nextZ = e;\n else list = e;\n\n e.prevZ = tail;\n tail = e;\n }\n\n p = q;\n }\n\n tail.nextZ = null;\n inSize *= 2;\n\n } while (numMerges > 1);\n\n return list;\n}\n\n// z-order of a point given coords and size of the data bounding box\nfunction zOrder(x, y, minX, minY, size) {\n // coords are transformed into non-negative 15-bit integer range\n x = 32767 * (x - minX) / size;\n y = 32767 * (y - minY) / size;\n\n x = (x | (x << 8)) & 0x00FF00FF;\n x = (x | (x << 4)) & 0x0F0F0F0F;\n x = (x | (x << 2)) & 0x33333333;\n x = (x | (x << 1)) & 0x55555555;\n\n y = (y | (y << 8)) & 0x00FF00FF;\n y = (y | (y << 4)) & 0x0F0F0F0F;\n y = (y | (y << 2)) & 0x33333333;\n y = (y | (y << 1)) & 0x55555555;\n\n return x | (y << 1);\n}\n\n// find the leftmost node of a polygon ring\nfunction getLeftmost(start) {\n var p = start,\n leftmost = start;\n do {\n if (p.x < leftmost.x) leftmost = p;\n p = p.next;\n } while (p !== start);\n\n return leftmost;\n}\n\n// check if a point lies within a convex triangle\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\n}\n\n// signed area of a triangle\nfunction area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}\n\n// check if two points are equal\nfunction equals(p1, p2) {\n return p1.x === p2.x && p1.y === p2.y;\n}\n\n// check if two segments intersect\nfunction intersects(p1, q1, p2, q2) {\n if ((equals(p1, q1) && equals(p2, q2)) ||\n (equals(p1, q2) && equals(p2, q1))) return true;\n return area(p1, q1, p2) > 0 !== area(p1, q1, q2) > 0 &&\n area(p2, q2, p1) > 0 !== area(p2, q2, q1) > 0;\n}\n\n// check if a polygon diagonal intersects any polygon segments\nfunction intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}\n\n// check if a polygon diagonal is locally inside the polygon\nfunction locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction middleInside(a, b) {\n var p = a,\n inside = false,\n px = (a.x + b.x) / 2,\n py = (a.y + b.y) / 2;\n do {\n if (((p.y > py) !== (p.next.y > py)) && (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))\n inside = !inside;\n p = p.next;\n } while (p !== a);\n\n return inside;\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction splitPolygon(a, b) {\n var a2 = new Node(a.i, a.x, a.y),\n b2 = new Node(b.i, b.x, b.y),\n an = a.next,\n bp = b.prev;\n\n a.next = b;\n b.prev = a;\n\n a2.next = an;\n an.prev = a2;\n\n b2.next = a2;\n a2.prev = b2;\n\n bp.next = b2;\n b2.prev = bp;\n\n return b2;\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction insertNode(i, x, y, last) {\n var p = new Node(i, x, y);\n\n if (!last) {\n p.prev = p;\n p.next = p;\n\n } else {\n p.next = last.next;\n p.prev = last;\n last.next.prev = p;\n last.next = p;\n }\n return p;\n}\n\nfunction removeNode(p) {\n p.next.prev = p.prev;\n p.prev.next = p.next;\n\n if (p.prevZ) p.prevZ.nextZ = p.nextZ;\n if (p.nextZ) p.nextZ.prevZ = p.prevZ;\n}\n\nfunction Node(i, x, y) {\n // vertice index in coordinates array\n this.i = i;\n\n // vertex coordinates\n this.x = x;\n this.y = y;\n\n // previous and next vertice nodes in a polygon ring\n this.prev = null;\n this.next = null;\n\n // z-order curve value\n this.z = null;\n\n // previous and next nodes in z-order\n this.prevZ = null;\n this.nextZ = null;\n\n // indicates whether this is a steiner point\n this.steiner = false;\n}\n\n// return a percentage difference between the polygon area and its triangulation area;\n// used to verify correctness of triangulation\nearcut.deviation = function (data, holeIndices, dim, triangles) {\n var hasHoles = holeIndices && holeIndices.length;\n var outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n\n var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));\n if (hasHoles) {\n for (var i = 0, len = holeIndices.length; i < len; i++) {\n var start = holeIndices[i] * dim;\n var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n polygonArea -= Math.abs(signedArea(data, start, end, dim));\n }\n }\n\n var trianglesArea = 0;\n for (i = 0; i < triangles.length; i += 3) {\n var a = triangles[i] * dim;\n var b = triangles[i + 1] * dim;\n var c = triangles[i + 2] * dim;\n trianglesArea += Math.abs(\n (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -\n (data[a] - data[b]) * (data[c + 1] - data[a + 1]));\n }\n\n return polygonArea === 0 && trianglesArea === 0 ? 0 :\n Math.abs((trianglesArea - polygonArea) / polygonArea);\n};\n\nfunction signedArea(data, start, end, dim) {\n var sum = 0;\n for (var i = start, j = end - dim; i < end; i += dim) {\n sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\n j = i;\n }\n return sum;\n}\n\n// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts\nearcut.flatten = function (data) {\n var dim = data[0][0].length,\n result = {vertices: [], holes: [], dimensions: dim},\n holeIndex = 0;\n\n for (var i = 0; i < data.length; i++) {\n for (var j = 0; j < data[i].length; j++) {\n for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);\n }\n if (i > 0) {\n holeIndex += data[i - 1].length;\n result.holes.push(holeIndex);\n }\n }\n return result;\n};","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst Helper = require('../../../../graphics/helper');\nconst PointFlags = require('../../../../graphics/types').PointFlags;\n\nlet Point = cc.Graphics.Point = cc.Class({\n name: 'cc.GraphicsPoint',\n extends: cc.Vec2,\n\n ctor (x, y) {\n this.reset();\n },\n \n reset () {\n this.dx = 0;\n this.dy = 0;\n this.dmx = 0;\n this.dmy = 0;\n this.flags = 0;\n this.len = 0;\n }\n});\n\nfunction Path () {\n this.reset();\n}\n\ncc.js.mixin(Path.prototype, {\n reset () {\n this.closed = false;\n this.nbevel = 0;\n this.complex = true;\n\n if (this.points) {\n this.points.length = 0;\n }\n else {\n this.points = [];\n }\n }\n});\n\nfunction Impl (graphics) {\n // inner properties\n this._tessTol = 0.25;\n this._distTol = 0.01;\n this._updatePathOffset = false;\n \n this._paths = null;\n this._pathLength = 0;\n this._pathOffset = 0;\n \n this._points = null;\n this._pointsOffset = 0;\n \n this._commandx = 0;\n this._commandy = 0;\n\n this._paths = [];\n this._points = [];\n}\n\ncc.js.mixin(Impl.prototype, {\n moveTo (x, y) {\n if (this._updatePathOffset) {\n this._pathOffset = this._pathLength;\n this._updatePathOffset = false;\n }\n \n this._addPath();\n this._addPoint(x, y, PointFlags.PT_CORNER);\n \n this._commandx = x;\n this._commandy = y;\n },\n\n lineTo (x, y) {\n this._addPoint(x, y, PointFlags.PT_CORNER);\n \n this._commandx = x;\n this._commandy = y;\n },\n\n bezierCurveTo (c1x, c1y, c2x, c2y, x, y) {\n var path = this._curPath;\n var last = path.points[path.points.length - 1];\n \n if (last.x === c1x && last.y === c1y && c2x === x && c2y === y) {\n this.lineTo(x, y);\n return;\n }\n \n Helper.tesselateBezier(this, last.x, last.y, c1x, c1y, c2x, c2y, x, y, 0, PointFlags.PT_CORNER);\n \n this._commandx = x;\n this._commandy = y;\n },\n\n quadraticCurveTo (cx, cy, x, y) {\n var x0 = this._commandx;\n var y0 = this._commandy;\n this.bezierCurveTo(x0 + 2.0 / 3.0 * (cx - x0), y0 + 2.0 / 3.0 * (cy - y0), x + 2.0 / 3.0 * (cx - x), y + 2.0 / 3.0 * (cy - y), x, y);\n },\n\n arc (cx, cy, r, startAngle, endAngle, counterclockwise) {\n Helper.arc(this, cx, cy, r, startAngle, endAngle, counterclockwise);\n },\n\n ellipse (cx, cy, rx, ry) {\n Helper.ellipse(this, cx, cy, rx, ry);\n this._curPath.complex = false;\n },\n\n circle (cx, cy, r) {\n Helper.ellipse(this, cx, cy, r, r);\n this._curPath.complex = false;\n },\n\n rect (x, y, w, h) {\n this.moveTo(x, y);\n this.lineTo(x, y + h);\n this.lineTo(x + w, y + h);\n this.lineTo(x + w, y);\n this.close();\n this._curPath.complex = false;\n },\n\n roundRect (x, y, w, h, r) {\n Helper.roundRect(this, x, y, w, h, r);\n this._curPath.complex = false;\n },\n\n clear (clean) {\n this._pathLength = 0;\n this._pathOffset = 0;\n this._pointsOffset = 0;\n \n this._curPath = null;\n\n if (clean) {\n this._paths.length = 0;\n this._points.length = 0;\n }\n },\n\n close () {\n this._curPath.closed = true;\n },\n\n _addPath () {\n var offset = this._pathLength;\n var path = this._paths[offset];\n \n if (!path) {\n path = new Path();\n \n this._paths.push(path);\n } else {\n path.reset();\n }\n \n this._pathLength++;\n this._curPath = path;\n \n return path;\n },\n \n _addPoint (x, y, flags) {\n var path = this._curPath;\n if (!path) return;\n \n var pt;\n var points = this._points;\n var pathPoints = path.points;\n \n var offset = this._pointsOffset++;\n pt = points[offset];\n \n if (!pt) {\n pt = new Point(x, y);\n points.push(pt);\n } else {\n pt.x = x;\n pt.y = y;\n }\n \n pt.flags = flags;\n pathPoints.push(pt);\n },\n\n});\n\ncc.Graphics._Impl = Impl;\nmodule.exports = Impl;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport Assembler from '../../../assembler';\n\nimport InputAssembler from '../../../../../renderer/core/input-assembler';\n\nconst MeshBuffer = require('../../mesh-buffer');\nconst renderer = require('../../../index');\n\nconst Graphics = require('../../../../graphics/graphics');\nconst PointFlags = require('../../../../graphics/types').PointFlags;\nconst LineJoin = Graphics.LineJoin;\nconst LineCap = Graphics.LineCap;\nconst Earcut = require('./earcut');\nrequire('./impl');\n\nconst MAX_VERTEX = 65535;\nconst MAX_INDICE = MAX_VERTEX * 2;\n\nconst PI = Math.PI;\nconst min = Math.min;\nconst max = Math.max;\nconst ceil = Math.ceil;\nconst acos = Math.acos;\nconst cos = Math.cos;\nconst sin = Math.sin;\nconst atan2 = Math.atan2;\n\nfunction curveDivs (r, arc, tol) {\n let da = acos(r / (r + tol)) * 2.0;\n return max(2, ceil(arc / da));\n}\n\nfunction clamp (v, min, max) {\n if (v < min) {\n return min;\n }\n else if (v > max) {\n return max;\n }\n return v;\n}\n\n\nlet gfx = cc.gfx;\nlet vfmtPosColorSdf = new gfx.VertexFormat([\n { name: gfx.ATTR_POSITION, type: gfx.ATTR_TYPE_FLOAT32, num: 2 },\n { name: gfx.ATTR_COLOR, type: gfx.ATTR_TYPE_UINT8, num: 4, normalize: true },\n { name: 'a_dist', type: gfx.ATTR_TYPE_FLOAT32, num: 1 },\n]);\nvfmtPosColorSdf.name = 'vfmtPosColorSdf';\n\nexport default class GraphicsAssembler extends Assembler {\n constructor (graphics) {\n super(graphics);\n \n this._buffer = null;\n this._buffers = [];\n this._bufferOffset = 0;\n }\n\n getVfmt () {\n return vfmtPosColorSdf;\n }\n\n getVfmtFloatCount () {\n return 4;\n }\n\n requestBuffer () {\n let buffer = {\n indiceStart: 0,\n vertexStart: 0\n };\n\n let meshbuffer = new MeshBuffer(renderer._handle, this.getVfmt());\n buffer.meshbuffer = meshbuffer;\n\n let ia = new InputAssembler(meshbuffer._vb, meshbuffer._ib);\n buffer.ia = ia;\n\n this._buffers.push(buffer);\n\n return buffer;\n }\n\n getBuffers () {\n if (this._buffers.length === 0) {\n this.requestBuffer();\n }\n\n return this._buffers;\n }\n\n clear (clean) {\n this._bufferOffset = 0;\n\n let datas = this._buffers;\n if (clean) {\n for (let i = 0, l = datas.length; i < l; i++) {\n let data = datas[i];\n data.meshbuffer.destroy();\n data.meshbuffer = null;\n }\n datas.length = 0;\n }\n else {\n for (let i = 0, l = datas.length; i < l; i++) {\n let data = datas[i];\n\n data.indiceStart = 0;\n data.vertexStart = 0;\n\n let meshbuffer = data.meshbuffer;\n meshbuffer.reset();\n }\n }\n }\n\n fillBuffers (graphics, renderer) {\n renderer._flush();\n\n renderer.node = graphics.node;\n renderer.material = graphics._materials[0];\n\n let buffers = this.getBuffers();\n for (let index = 0, length = buffers.length; index < length; index++) {\n let buffer = buffers[index];\n let meshbuffer = buffer.meshbuffer;\n buffer.ia._count = buffer.indiceStart;\n renderer._flushIA(buffer.ia);\n meshbuffer.uploadData();\n }\n }\n\n genBuffer (graphics, cverts) {\n let buffers = this.getBuffers(); \n let buffer = buffers[this._bufferOffset];\n let meshbuffer = buffer.meshbuffer;\n\n let maxVertsCount = buffer.vertexStart + cverts;\n if (maxVertsCount > MAX_VERTEX ||\n maxVertsCount * 3 > MAX_INDICE) {\n ++this._bufferOffset;\n maxVertsCount = cverts;\n \n if (this._bufferOffset < buffers.length) {\n buffer = buffers[this._bufferOffset];\n }\n else {\n buffer = this.requestBuffer(graphics);\n buffers[this._bufferOffset] = buffer;\n }\n\n meshbuffer = buffer.meshbuffer;\n }\n\n if (maxVertsCount > meshbuffer.vertexOffset) {\n meshbuffer.requestStatic(cverts, cverts*3);\n }\n\n this._buffer = buffer;\n return buffer;\n }\n\n stroke (graphics) {\n this._curColor = graphics._strokeColor._val;\n\n this._flattenPaths(graphics._impl);\n this._expandStroke(graphics);\n \n graphics._impl._updatePathOffset = true;\n }\n\n fill (graphics) {\n this._curColor = graphics._fillColor._val;\n\n this._expandFill(graphics);\n graphics._impl._updatePathOffset = true;\n }\n\n _expandStroke (graphics) {\n let w = graphics.lineWidth * 0.5,\n lineCap = graphics.lineCap,\n lineJoin = graphics.lineJoin,\n miterLimit = graphics.miterLimit;\n\n let impl = graphics._impl;\n \n let ncap = curveDivs(w, PI, impl._tessTol);\n \n this._calculateJoins(impl, w, lineJoin, miterLimit);\n \n let paths = impl._paths;\n \n // Calculate max vertex usage.\n let cverts = 0;\n for (let i = impl._pathOffset, l = impl._pathLength; i < l; i++) {\n let path = paths[i];\n let pointsLength = path.points.length;\n\n if (lineJoin === LineJoin.ROUND) cverts += (pointsLength + path.nbevel * (ncap + 2) + 1) * 2; // plus one for loop\n else cverts += (pointsLength + path.nbevel * 5 + 1) * 2; // plus one for loop\n\n if (!path.closed) {\n // space for caps\n if (lineCap === LineCap.ROUND) {\n cverts += (ncap * 2 + 2) * 2;\n } else {\n cverts += (3 + 3) * 2;\n }\n }\n }\n \n let buffer = this.genBuffer(graphics, cverts),\n meshbuffer = buffer.meshbuffer,\n vData = meshbuffer._vData,\n iData = meshbuffer._iData;\n \n for (let i = impl._pathOffset, l = impl._pathLength; i < l; i++) {\n let path = paths[i];\n let pts = path.points;\n let pointsLength = pts.length;\n let offset = buffer.vertexStart;\n\n let p0, p1;\n let start, end, loop;\n loop = path.closed;\n if (loop) {\n // Looping\n p0 = pts[pointsLength - 1];\n p1 = pts[0];\n start = 0;\n end = pointsLength;\n } else {\n // Add cap\n p0 = pts[0];\n p1 = pts[1];\n start = 1;\n end = pointsLength - 1;\n }\n\n p1 = p1 || p0;\n \n if (!loop) {\n // Add cap\n let dPos = p1.sub(p0);\n dPos.normalizeSelf();\n \n let dx = dPos.x;\n let dy = dPos.y;\n \n if (lineCap === LineCap.BUTT)\n this._buttCapStart(p0, dx, dy, w, 0);\n else if (lineCap === LineCap.SQUARE)\n this._buttCapStart(p0, dx, dy, w, w);\n else if (lineCap === LineCap.ROUND)\n this._roundCapStart(p0, dx, dy, w, ncap);\n }\n \n for (let j = start; j < end; ++j) {\n if (lineJoin === LineJoin.ROUND) {\n this._roundJoin(p0, p1, w, w, ncap);\n }\n else if ((p1.flags & (PointFlags.PT_BEVEL | PointFlags.PT_INNERBEVEL)) !== 0) {\n this._bevelJoin(p0, p1, w, w);\n }\n else {\n this._vset(p1.x + p1.dmx * w, p1.y + p1.dmy * w, 1);\n this._vset(p1.x - p1.dmx * w, p1.y - p1.dmy * w, -1);\n }\n \n p0 = p1;\n p1 = pts[j + 1];\n }\n \n if (loop) {\n // Loop it\n let floatCount = this.getVfmtFloatCount();\n let vDataoOfset = offset * floatCount;\n this._vset(vData[vDataoOfset], vData[vDataoOfset+1], 1);\n this._vset(vData[vDataoOfset+floatCount], vData[vDataoOfset+floatCount+1], -1);\n } else {\n // Add cap\n let dPos = p1.sub(p0);\n dPos.normalizeSelf();\n \n let dx = dPos.x;\n let dy = dPos.y;\n \n if (lineCap === LineCap.BUTT)\n this._buttCapEnd(p1, dx, dy, w, 0);\n else if (lineCap === LineCap.SQUARE)\n this._buttCapEnd(p1, dx, dy, w, w);\n else if (lineCap === LineCap.ROUND)\n this._roundCapEnd(p1, dx, dy, w, ncap);\n }\n\n // stroke indices\n let indicesOffset = buffer.indiceStart;\n for (let start = offset+2, end = buffer.vertexStart; start < end; start++) {\n iData[indicesOffset++] = start - 2;\n iData[indicesOffset++] = start - 1;\n iData[indicesOffset++] = start;\n }\n\n buffer.indiceStart = indicesOffset;\n }\n }\n \n _expandFill (graphics) {\n let impl = graphics._impl;\n\n let paths = impl._paths;\n\n // Calculate max vertex usage.\n let cverts = 0;\n for (let i = impl._pathOffset, l = impl._pathLength; i < l; i++) {\n let path = paths[i];\n let pointsLength = path.points.length;\n\n cverts += pointsLength;\n }\n\n let buffer = this.genBuffer(graphics, cverts),\n meshbuffer = buffer.meshbuffer,\n vData = meshbuffer._vData,\n iData = meshbuffer._iData;\n\n for (let i = impl._pathOffset, l = impl._pathLength; i < l; i++) {\n let path = paths[i];\n let pts = path.points;\n let pointsLength = pts.length;\n \n if (pointsLength === 0) {\n continue;\n }\n \n // Calculate shape vertices.\n let offset = buffer.vertexStart;\n \n for (let j = 0; j < pointsLength; ++j) {\n this._vset(pts[j].x, pts[j].y);\n }\n \n let indicesOffset = buffer.indiceStart;\n \n if (path.complex) {\n let earcutData = [];\n let floatCount = this.getVfmtFloatCount();\n for (let j = offset, end = buffer.vertexStart; j < end; j++) {\n let vDataOffset = j * floatCount;\n earcutData.push(vData[vDataOffset]);\n earcutData.push(vData[vDataOffset+1]);\n }\n \n let newIndices = Earcut(earcutData, null, 2);\n \n if (!newIndices || newIndices.length === 0) {\n continue;\n }\n \n for (let j = 0, nIndices = newIndices.length; j < nIndices; j++) {\n iData[indicesOffset++] = newIndices[j] + offset;\n }\n }\n else {\n let first = offset;\n for (let start = offset+2, end = buffer.vertexStart; start < end; start++) {\n iData[indicesOffset++] = first;\n iData[indicesOffset++] = start - 1;\n iData[indicesOffset++] = start;\n }\n }\n\n buffer.indiceStart = indicesOffset;\n }\n }\n\n _calculateJoins (impl, w, lineJoin, miterLimit) {\n let iw = 0.0;\n let w2 = w * w;\n \n if (w > 0.0) {\n iw = 1 / w;\n }\n \n // Calculate which joins needs extra vertices to append, and gather vertex count.\n let paths = impl._paths;\n for (let i = impl._pathOffset, l = impl._pathLength; i < l; i++) {\n let path = paths[i];\n \n let pts = path.points;\n let ptsLength = pts.length;\n let p0 = pts[ptsLength - 1];\n let p1 = pts[0];\n let nleft = 0;\n \n path.nbevel = 0;\n \n for (let j = 0; j < ptsLength; j++) {\n let dmr2, cross, limit;\n \n // perp normals\n let dlx0 = p0.dy;\n let dly0 = -p0.dx;\n let dlx1 = p1.dy;\n let dly1 = -p1.dx;\n \n // Calculate extrusions\n p1.dmx = (dlx0 + dlx1) * 0.5;\n p1.dmy = (dly0 + dly1) * 0.5;\n dmr2 = p1.dmx * p1.dmx + p1.dmy * p1.dmy;\n if (dmr2 > 0.000001) {\n let scale = 1 / dmr2;\n if (scale > 600) {\n scale = 600;\n }\n p1.dmx *= scale;\n p1.dmy *= scale;\n }\n \n // Keep track of left turns.\n cross = p1.dx * p0.dy - p0.dx * p1.dy;\n if (cross > 0) {\n nleft++;\n p1.flags |= PointFlags.PT_LEFT;\n }\n \n // Calculate if we should use bevel or miter for inner join.\n limit = max(11, min(p0.len, p1.len) * iw);\n if (dmr2 * limit * limit < 1) {\n p1.flags |= PointFlags.PT_INNERBEVEL;\n }\n\n // Check whether dm length is too long\n let dmwx = p1.dmx * w;\n let dmwy = p1.dmy * w;\n let dmlen2 = dmwx*dmwx + dmwy*dmwy;\n if (dmlen2 > (p1.len * p1.len) + w2 && dmlen2 > (p0.len * p0.len) + w2) {\n p1.flags |= PointFlags.PT_INNERBEVEL;\n }\n \n // Check to see if the corner needs to be beveled.\n if (p1.flags & PointFlags.PT_CORNER) {\n if (dmr2 * miterLimit * miterLimit < 1 || lineJoin === LineJoin.BEVEL || lineJoin === LineJoin.ROUND) {\n p1.flags |= PointFlags.PT_BEVEL;\n }\n }\n \n if ((p1.flags & (PointFlags.PT_BEVEL | PointFlags.PT_INNERBEVEL)) !== 0) {\n path.nbevel++;\n }\n \n p0 = p1;\n p1 = pts[j + 1];\n }\n }\n }\n \n _flattenPaths (impl) {\n let paths = impl._paths;\n for (let i = impl._pathOffset, l = impl._pathLength; i < l; i++) {\n let path = paths[i];\n let pts = path.points;\n \n let p0 = pts[pts.length - 1];\n let p1 = pts[0];\n \n if (pts.length > 2 && p0.equals(p1)) {\n path.closed = true;\n pts.pop();\n p0 = pts[pts.length - 1];\n }\n \n for (let j = 0, size = pts.length; j < size; j++) {\n // Calculate segment direction and length\n let dPos = p1.sub(p0);\n p0.len = dPos.mag();\n if (dPos.x || dPos.y)\n dPos.normalizeSelf();\n p0.dx = dPos.x;\n p0.dy = dPos.y;\n // Advance\n p0 = p1;\n p1 = pts[j + 1];\n }\n }\n }\n\n _chooseBevel (bevel, p0, p1, w) {\n let x = p1.x;\n let y = p1.y;\n let x0, y0, x1, y1;\n \n if (bevel !== 0) {\n x0 = x + p0.dy * w;\n y0 = y - p0.dx * w;\n x1 = x + p1.dy * w;\n y1 = y - p1.dx * w;\n } else {\n x0 = x1 = x + p1.dmx * w;\n y0 = y1 = y + p1.dmy * w;\n }\n \n return [x0, y0, x1, y1];\n }\n \n _buttCapStart (p, dx, dy, w, d) {\n let px = p.x - dx * d;\n let py = p.y - dy * d;\n let dlx = dy;\n let dly = -dx;\n \n this._vset(px + dlx * w, py + dly * w, 1);\n this._vset(px - dlx * w, py - dly * w, -1);\n }\n\n _buttCapEnd (p, dx, dy, w, d) {\n let px = p.x + dx * d;\n let py = p.y + dy * d;\n let dlx = dy;\n let dly = -dx;\n \n this._vset(px + dlx * w, py + dly * w, 1);\n this._vset(px - dlx * w, py - dly * w, -1);\n }\n \n _roundCapStart (p, dx, dy, w, ncap) {\n let px = p.x;\n let py = p.y;\n let dlx = dy;\n let dly = -dx;\n \n for (let i = 0; i < ncap; i++) {\n let a = i / (ncap - 1) * PI;\n let ax = cos(a) * w,\n ay = sin(a) * w;\n this._vset(px - dlx * ax - dx * ay, py - dly * ax - dy * ay, 1);\n this._vset(px, py, 0);\n }\n this._vset(px + dlx * w, py + dly * w, 1);\n this._vset(px - dlx * w, py - dly * w, -1);\n }\n \n _roundCapEnd (p, dx, dy, w, ncap) {\n let px = p.x;\n let py = p.y;\n let dlx = dy;\n let dly = -dx;\n \n this._vset(px + dlx * w, py + dly * w, 1);\n this._vset(px - dlx * w, py - dly * w, -1);\n for (let i = 0; i < ncap; i++) {\n let a = i / (ncap - 1) * PI;\n let ax = cos(a) * w,\n ay = sin(a) * w;\n this._vset(px, py, 0);\n this._vset(px - dlx * ax + dx * ay, py - dly * ax + dy * ay, 1);\n }\n }\n \n _roundJoin (p0, p1, lw, rw, ncap) {\n let dlx0 = p0.dy;\n let dly0 = -p0.dx;\n let dlx1 = p1.dy;\n let dly1 = -p1.dx;\n \n let p1x = p1.x;\n let p1y = p1.y;\n \n if ((p1.flags & PointFlags.PT_LEFT) !== 0) {\n let out = this._chooseBevel(p1.flags & PointFlags.PT_INNERBEVEL, p0, p1, lw);\n let lx0 = out[0];\n let ly0 = out[1];\n let lx1 = out[2];\n let ly1 = out[3];\n \n let a0 = atan2(-dly0, -dlx0);\n let a1 = atan2(-dly1, -dlx1);\n if (a1 > a0) a1 -= PI * 2;\n \n this._vset(lx0, ly0, 1);\n this._vset(p1x - dlx0 * rw, p1.y - dly0 * rw, -1);\n \n let n = clamp(ceil((a0 - a1) / PI) * ncap, 2, ncap);\n for (let i = 0; i < n; i++) {\n let u = i / (n - 1);\n let a = a0 + u * (a1 - a0);\n let rx = p1x + cos(a) * rw;\n let ry = p1y + sin(a) * rw;\n this._vset(p1x, p1y, 0);\n this._vset(rx, ry, -1);\n }\n \n this._vset(lx1, ly1, 1);\n this._vset(p1x - dlx1 * rw, p1y - dly1 * rw, -1);\n } else {\n let out = this._chooseBevel(p1.flags & PointFlags.PT_INNERBEVEL, p0, p1, -rw);\n let rx0 = out[0];\n let ry0 = out[1];\n let rx1 = out[2];\n let ry1 = out[3];\n \n let a0 = atan2(dly0, dlx0);\n let a1 = atan2(dly1, dlx1);\n if (a1 < a0) a1 += PI * 2;\n \n this._vset(p1x + dlx0 * rw, p1y + dly0 * rw, 1);\n this._vset(rx0, ry0, -1);\n \n let n = clamp(ceil((a1 - a0) / PI) * ncap, 2, ncap);\n for (let i = 0; i < n; i++) {\n let u = i / (n - 1);\n let a = a0 + u * (a1 - a0);\n let lx = p1x + cos(a) * lw;\n let ly = p1y + sin(a) * lw;\n this._vset(lx, ly, 1);\n this._vset(p1x, p1y, 0);\n }\n \n this._vset(p1x + dlx1 * rw, p1y + dly1 * rw, 1);\n this._vset(rx1, ry1, -1);\n }\n }\n \n _bevelJoin (p0, p1, lw, rw) {\n let rx0, ry0, rx1, ry1;\n let lx0, ly0, lx1, ly1;\n let dlx0 = p0.dy;\n let dly0 = -p0.dx;\n let dlx1 = p1.dy;\n let dly1 = -p1.dx;\n \n if (p1.flags & PointFlags.PT_LEFT) {\n let out = this._chooseBevel(p1.flags & PointFlags.PT_INNERBEVEL, p0, p1, lw);\n lx0 = out[0];\n ly0 = out[1];\n lx1 = out[2];\n ly1 = out[3];\n \n this._vset(lx0, ly0, 1);\n this._vset(p1.x - dlx0 * rw, p1.y - dly0 * rw, -1);\n \n this._vset(lx1, ly1, 1);\n this._vset(p1.x - dlx1 * rw, p1.y - dly1 * rw, -1);\n } else {\n let out = this._chooseBevel(p1.flags & PointFlags.PT_INNERBEVEL, p0, p1, -rw);\n rx0 = out[0];\n ry0 = out[1];\n rx1 = out[2];\n ry1 = out[3];\n \n this._vset(p1.x + dlx0 * lw, p1.y + dly0 * lw, 1);\n this._vset(rx0, ry0, -1);\n \n this._vset(p1.x + dlx1 * lw, p1.y + dly1 * lw, 1);\n this._vset(rx1, ry1, -1);\n }\n }\n \n _vset (x, y, distance = 0) {\n let buffer = this._buffer;\n let meshbuffer = buffer.meshbuffer;\n let dataOffset = buffer.vertexStart * this.getVfmtFloatCount();\n\n let vData = meshbuffer._vData;\n let uintVData = meshbuffer._uintVData;\n\n vData[dataOffset] = x;\n vData[dataOffset+1] = y;\n uintVData[dataOffset+2] = this._curColor;\n vData[dataOffset+3] = distance;\n\n buffer.vertexStart ++;\n meshbuffer._dirty = true;\n }\n}\n\nAssembler.register(cc.Graphics, GraphicsAssembler);\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\ncc.assemblers = {};\n\nrequire('./sprite');\nrequire('./mask-assembler');\nrequire('./graphics');\nrequire('./label');\nrequire('./motion-streak');\nrequire('./motion-streak-multi');\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport WebglBmfontAssembler from '../2d/bmfont';\nimport { vfmtPosUvColorTexId } from '../../../../webgl/vertex-format';\n\nexport default class MultiWebglBmfontAssembler extends WebglBmfontAssembler {\n initData () {\n let data = this._renderData;\n data.createFlexData(0, this.verticesCount, this.indicesCount, this.getVfmt());\n }\n\n getVfmt() {\n return vfmtPosUvColorTexId;\n }\n\n getBuffer() {\n return cc.renderer._handle.getBuffer(\"mesh\", this.getVfmt());\n }\n\n updateRenderData(comp) {\n super.updateRenderData(comp);\n\n if (comp._texIdDirty) {\n comp._updateMultiTexId(comp.getMaterial(0), comp._frame._texture);\n }\n\n // 不进行 Dirty 判断,文本可能会变化,但是纹理不会变\n this.updateTexId(comp);\n comp._texIdDirty = false;\n }\n\n updateRenderDataForSwitchMaterial(comp) {\n super._preUpdateRenderData(comp);\n super._aftUpdateRenderData(comp);\n\n if (comp._texIdDirty) {\n comp._updateMultiTexId(comp.getMaterial(0), comp._frame._texture);\n }\n\n // 不进行 Dirty 判断,文本可能会变化,但是纹理不会变\n this.updateTexId(comp);\n comp._texIdDirty = false;\n\n if (CC_JSB) this._aftUpdateRenderDataForNative();\n }\n}\n\nMultiWebglBmfontAssembler.prototype.floatsPerVert = 6;\nMultiWebglBmfontAssembler.prototype.texIdOffset = 5;\nMultiWebglBmfontAssembler.prototype.isMulti = true;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport WebglTTFAssembler from '../2d/ttf';\nimport { vfmtPosUvColorTexId } from '../../../../webgl/vertex-format';\n\nexport default class MultiWebglTTFAssembler extends WebglTTFAssembler {\n initData() {\n let data = this._renderData;\n data.createFlexData(0, this.verticesCount, this.indicesCount, this.getVfmt());\n const indices = data.iDatas[0];\n data.initQuadIndices(indices);\n }\n\n getVfmt() {\n return vfmtPosUvColorTexId;\n }\n\n getBuffer() {\n return cc.renderer._handle.getBuffer(\"mesh\", this.getVfmt());\n }\n\n updateRenderData(comp) {\n super.updateRenderData(comp);\n\n if (comp._texIdDirty) {\n comp._updateMultiTexId(comp.getMaterial(0), comp._frame._texture);\n }\n\n // 不进行 Dirty 判断,文本可能会变化,但是纹理不会变\n this.updateTexId(comp);\n comp._texIdDirty = false;\n }\n\n updateRenderDataForSwitchMaterial(comp) {\n super._aftUpdateRenderData(comp);\n\n if (comp._texIdDirty) {\n comp._updateMultiTexId(comp.getMaterial(0), comp._frame._texture);\n }\n\n // 不进行 Dirty 判断,文本可能会变化,但是纹理不会变\n this.updateTexId(comp);\n comp._texIdDirty = false;\n\n if (CC_JSB) this._aftUpdateRenderDataForNative();\n }\n}\n\nMultiWebglTTFAssembler.prototype.floatsPerVert = 6;\nMultiWebglTTFAssembler.prototype.texIdOffset = 5;\nMultiWebglTTFAssembler.prototype.isMulti = true;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport BmfontAssembler from '../../../../utils/label/bmfont';\n\nlet _dataOffset = 0;\n\nexport default class WebglBmfontAssembler extends BmfontAssembler {\n initData () {\n this._renderData.createFlexData(0, 4, 6, this.getVfmt());\n }\n\n _reserveQuads (comp, count) {\n let verticesCount = count * 4;\n let indicesCount = count * 6;\n \n let flexBuffer = this._renderData._flexBuffer;\n flexBuffer.reserve(verticesCount, indicesCount);\n flexBuffer.used(verticesCount, indicesCount);\n \n let iData = this._renderData.iDatas[0];\n\n for (let i = 0, vid = 0, l = indicesCount; i < l; i += 6, vid += 4) {\n iData[i] = vid;\n iData[i + 1] = vid + 1;\n iData[i + 2] = vid + 2;\n iData[i + 3] = vid + 1;\n iData[i + 4] = vid + 3;\n iData[i + 5] = vid + 2;\n }\n\n _dataOffset = 0;\n }\n\n _quadsUpdated (comp) {\n _dataOffset = 0;\n\n let flexBuffer = this._renderData._flexBuffer;\n flexBuffer.used(this.verticesCount, this.indicesCount);\n }\n\n _getColor (comp) {\n return comp.node._color._val;\n }\n\n appendQuad(comp, texture, rect, rotated, x, y, scale, letter) {\n let renderData = this._renderData;\n let verts = renderData.vDatas[0],\n uintVerts = renderData.uintVDatas[0];\n\n this.verticesCount += 4;\n this.indicesCount = this.verticesCount / 2 * 3;\n\n let texw = texture.width,\n texh = texture.height,\n rectWidth = rect.width,\n rectHeight = rect.height,\n color = this._getColor(comp);\n\n let l, b, r, t;\n let floatsPerVert = this.floatsPerVert;\n // uvs\n let uvDataOffset = _dataOffset + this.uvOffset;\n if (!rotated) {\n l = (rect.x) / texw;\n r = (rect.x + rectWidth) / texw;\n b = (rect.y + rectHeight) / texh;\n t = (rect.y) / texh;\n\n verts[uvDataOffset] = l;\n verts[uvDataOffset + 1] = b;\n uvDataOffset += floatsPerVert;\n verts[uvDataOffset] = r;\n verts[uvDataOffset + 1] = b;\n uvDataOffset += floatsPerVert;\n verts[uvDataOffset] = l;\n verts[uvDataOffset + 1] = t;\n uvDataOffset += floatsPerVert;\n verts[uvDataOffset] = r;\n verts[uvDataOffset + 1] = t;\n } else {\n l = (rect.x) / texw;\n r = (rect.x + rectHeight) / texw;\n b = (rect.y + rectWidth) / texh;\n t = (rect.y) / texh;\n\n verts[uvDataOffset] = l;\n verts[uvDataOffset + 1] = t;\n uvDataOffset += floatsPerVert;\n verts[uvDataOffset] = l;\n verts[uvDataOffset + 1] = b;\n uvDataOffset += floatsPerVert;\n verts[uvDataOffset] = r;\n verts[uvDataOffset + 1] = t;\n uvDataOffset += floatsPerVert;\n verts[uvDataOffset] = r;\n verts[uvDataOffset + 1] = b;\n }\n\n\n // positions\n const retinaScale = this.getTTFTextureSizeScale();\n x /= retinaScale;\n y /= retinaScale;\n rectWidth /= retinaScale;\n rectHeight /= retinaScale;\n l = x;\n r = x + rectWidth * scale;\n b = y - rectHeight * scale;\n t = y;\n\n this.appendVerts(comp, _dataOffset, l, r, b, t, letter);\n\n // colors\n let colorOffset = _dataOffset + this.colorOffset;\n for (let i = 0; i < 4; i++) {\n uintVerts[colorOffset] = color;\n colorOffset += floatsPerVert;\n }\n\n _dataOffset += this.floatsPerVert * 4;\n }\n\n appendVerts(comp, offset, l, r, b, t, letter) {\n let local = this._local;\n let floatsPerVert = this.floatsPerVert;\n\n local[offset] = l;\n local[offset + 1] = b;\n\n offset += floatsPerVert;\n local[offset] = r;\n local[offset + 1] = b;\n\n offset += floatsPerVert;\n local[offset] = l;\n local[offset + 1] = t;\n\n offset += floatsPerVert;\n local[offset] = r;\n local[offset + 1] = t;\n }\n\n updateWorldVerts (comp) {\n let node = comp.node;\n\n let matrix = node._worldMatrix;\n let matrixm = matrix.m,\n a = matrixm[0], b = matrixm[1], c = matrixm[4], d = matrixm[5],\n tx = matrixm[12], ty = matrixm[13];\n\n let local = this._local;\n let world = this._renderData.vDatas[0];\n let floatsPerVert = this.floatsPerVert;\n for (let offset = 0; offset < local.length; offset += floatsPerVert) {\n let x = local[offset];\n let y = local[offset + 1];\n world[offset] = x * a + y * c + tx;\n world[offset+1] = x * b + y * d + ty;\n }\n }\n}\n\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst js = require('../../../../../platform/js');\nconst WebglBmfontAssembler = require('./bmfont');\nconst LetterFontAssembler = require('../../../../utils/label/letter-font');\nconst WHITE = cc.color(255, 255, 255, 255);\n\nexport default class WebglLetterFontAssembler extends LetterFontAssembler {\n createData (comp) {\n return comp.requestRenderData();\n }\n\n _getColor (comp) {\n WHITE._fastSetA(comp.node._color.a);\n return WHITE._val;\n }\n\n updateColor (comp) {\n let color = this._getColor(comp);\n\n super.updateColor(comp, color);\n }\n}\n\n","\nimport MaterialVariant from '../../../../../assets/material/material-variant';\n\nconst Label = require('../../../../../components/CCLabel');\nconst LabelShadow = require('../../../../../components/CCLabelShadow');\nconst LabelOutline = require('../../../../../components/CCLabelOutline');\nconst Material = require('../../../../../assets/material/CCMaterial');\n\n\n\nconst UPDATE_CONTENT = 1 << 0;\nconst UPDATE_FONT = 1 << 1;\nconst UPDATE_EFFECT = 1 << 2;\n\nexport default class NativeTTF {\n\n\n init(comp) {\n this.labelMaterial = null;\n this._label = this._renderComp = comp;\n renderer.CustomAssembler.prototype.ctor.call(this);\n comp.node._proxy.setAssembler(this);\n this._layout = new jsb.LabelRenderer();\n this._layout.init(comp);\n this._cfg = new DataView(this._layout._cfg);\n this._layoutInfo = new DataView(this._layout._layout);\n\n this._cfgFields = jsb.LabelRenderer._cfgFields;\n this._layoutFields = jsb.LabelRenderer._layoutFields;\n this._layout.bindNodeProxy(comp.node._proxy);\n this._bindMaterial(comp);\n }\n\n\n _setBufferFlag(dv, offset, size, type, flag){\n if ( type == \"int8\" && size == 1) {\n let v = dv.getInt8(offset);\n dv.setInt8(offset, flag | v);\n } else if(type == \"int32\" && size == 4) {\n let v = dv.getInt32(offset, jsb.__isLittleEndian__);\n dv.setInt32(offset, flag|v , jsb.__isLittleEndian__);\n } else {\n cc.warn(\"flag storage type should be int8/int32 only, type/size -> \" + type+\"/\"+size + \".\");\n }\n }\n\n _updateCfgFlag(flag) {\n let field = this._cfgFields.updateFlags;\n this._setBufferFlag(this._cfg, field.offset, field.size, field.type, flag);\n }\n\n _setBufferValue(dv, offset, size, type, value) {\n if(type == \"float\" && size == 4) {\n dv.setFloat32(offset, value, jsb.__isLittleEndian__);\n } else if(type == \"int32\" && size == 4) {\n dv.setInt32(offset, value, jsb.__isLittleEndian__);\n } else if (type == \"bool\" && size == 1) {\n dv.setInt8(offset, !!value ? 1 : 0, jsb.__isLittleEndian__);\n } else if(type == \"Color4B\" && size == 4) {\n dv.setUint8(offset, value.r);\n dv.setUint8(offset + 1, value.g);\n dv.setUint8(offset + 2, value.b);\n dv.setUint8(offset + 3, value.a);\n } else if(type == \"int8\" && size == 1) {\n dv.setUint8(offset, value);\n } else {\n cc.warn(\"dont know how to set value to buffer, type/size -> \" + type+\"/\"+size + \".\");\n }\n }\n\n _setFieldValue(dv, desc, field_name, value) {\n let field = desc[field_name];\n this._setBufferValue(dv, field.offset, field.size, field.type, value);\n }\n\n _getBufferValue(dv, offset, size, type) {\n if(type == \"float\" && size == 4) {\n return dv.getFloat32(offset, jsb.__isLittleEndian__);\n } else if(type == \"int32\" && size == 4) {\n return dv.getInt32(offset, jsb.__isLittleEndian__);\n } else if (type == \"bool\" && size == 1) {\n return dv.getInt8(offset, jsb.__isLittleEndian__) != 0;\n } else if(type == \"Color4B\" && size == 4) {\n let r = dv.getUint8(offset);\n let g = dv.getUint8(offset + 1);\n let b = dv.getUint8(offset + 2);\n let a = dv.getUint8(offset + 3);\n return {r, g, b, a};\n } else if(type == \"int8\" && size == 1) {\n return dv.getUint8(offset);\n } else {\n cc.warn(\"dont know how to get value from buffer, type/size -> \" + type+\"/\"+size + \".\");\n return undefined;\n }\n }\n\n _getFieldValue(dv, desc, field_name) {\n let field = desc[field_name];\n return this._getBufferValue(dv, field.offset, field.size, field.type);\n }\n\n _getLayoutValue(field_name) {\n return this._getFieldValue(this._layoutInfo, this._layoutFields, field_name);\n }\n\n _setLayoutValue(field_name, value) {\n return this._setFieldValue(this._layoutInfo, this._layoutFields, field_name, value);\n }\n\n _updateCfgFlag_Content() {\n this._updateCfgFlag(UPDATE_CONTENT);\n }\n\n _updateCfgFlag_Font() {\n this._updateCfgFlag(UPDATE_FONT);\n }\n \n _colorEqual(a, b) {\n return a.r == b.r && a.g == b.g && a.b == b.b && a.a == b.a;\n } \n\n _colorToObj(r, g, b, a) {\n return {r, g, b, a};\n }\n\n setString(str)\n {\n if(str != this._layout.string) {\n this._layout.string = str;\n this._updateCfgFlag_Content();\n }\n }\n\n setFontPath(path) {\n if(path != this._layout.fontPath) {\n this._layout.fontPath = path;\n this._updateCfgFlag_Font();\n }\n }\n\n setFontSize(fontSize, fontSizeRetina)\n {\n let oldfontsize = this._getFieldValue(this._cfg, this._cfgFields, \"fontSize\");\n if(oldfontsize != fontSize) {\n this._setFieldValue(this._cfg, this._cfgFields, \"fontSize\", fontSize);\n this._setFieldValue(this._cfg, this._cfgFields, \"fontSizeRetina\", fontSizeRetina);\n this._updateCfgFlag_Font();\n }\n }\n\n setOutline(outline) {\n let oldOutline = this._getLayoutValue(\"outlineSize\");\n if((oldOutline > 0) != (outline > 0)) {\n this._updateCfgFlag_Font();\n }\n if(oldOutline != outline) {\n this._updateCfgFlag_Content();\n this._setLayoutValue(\"outlineSize\", outline);\n }\n }\n\n setOutlineColor(color) {\n let oldColor = this._getLayoutValue( \"outlineColor\");\n if(!this._colorEqual(oldColor, color)) {\n this._setLayoutValue(\"outlineColor\", color);\n this._updateCfgFlag_Content();\n }\n }\n\n setLineHeight(lineHeight) {\n let oldLineHeight = this._getLayoutValue(\"lineHeight\");\n if(oldLineHeight != lineHeight) {\n this._setLayoutValue(\"lineHeight\", lineHeight);\n this._updateCfgFlag_Content();\n }\n }\n\n setOverFlow(overflow) {\n let oldValue = this._getLayoutValue(\"overflow\");\n if(oldValue != overflow) {\n this._setLayoutValue(\"overflow\", overflow);\n this._updateCfgFlag_Content();\n }\n }\n\n setEnableWrap(value) {\n let oldValue = this._getLayoutValue(\"wrap\");\n if(oldValue != value) {\n this._setLayoutValue(\"wrap\", value);\n this._updateCfgFlag_Content();\n }\n }\n\n setVerticalAlign(value) {\n let oldValue = this._getLayoutValue(\"valign\");\n if(oldValue != value) {\n this._setLayoutValue(\"valign\", value);\n this._updateCfgFlag_Content();\n }\n }\n\n setHorizontalAlign(value) {\n let oldValue = this._getLayoutValue(\"halign\");\n if(oldValue != value) {\n this._setLayoutValue(\"halign\", value);\n this._updateCfgFlag_Content();\n }\n }\n\n setContentSize(width, height) {\n let oldWidth = this._getLayoutValue(\"width\");\n let oldHeight = this._getLayoutValue(\"height\");\n if(oldWidth != width || oldHeight != height) {\n this._setLayoutValue(\"height\", height);\n this._setLayoutValue(\"width\", width);\n this._updateCfgFlag_Content();\n }\n }\n\n setAnchorPoint(x, y) {\n let oldX = this._getLayoutValue(\"anchorX\");\n let oldY = this._getLayoutValue(\"anchorY\");\n if(oldX != x || oldY != y) {\n this._setLayoutValue(\"anchorX\", x);\n this._setLayoutValue(\"anchorY\", y);\n this._updateCfgFlag_Content();\n }\n }\n\n setColor(color) {\n let oldColor = this._getLayoutValue(\"color\");\n if(!this._colorEqual(oldColor, color)) {\n this._setLayoutValue(\"color\", color);\n this._updateCfgFlag_Content();\n }\n }\n\n setShadow( x, y, blur) {\n let oldBlur = this._getLayoutValue(\"shadowBlur\");\n let oldX = this._getLayoutValue(\"shadowX\");\n let oldY = this._getLayoutValue(\"shadowY\");\n if((oldBlur > 0) != (blur > 0)) {\n this._updateCfgFlag_Font();\n }\n let updateContent = false;\n if(oldBlur != blur) {\n this._setLayoutValue(\"shadowBlur\", blur);\n updateContent = true;\n }\n if(oldX != x) {\n this._setLayoutValue(\"shadowX\", x);\n updateContent = true;\n }\n if(oldY != y) {\n this._setLayoutValue(\"shadowY\", y);\n updateContent = true;\n }\n if(updateContent) {\n this._updateCfgFlag_Content();\n }\n }\n\n setShadowColor(color) {\n let oldColor = this._getLayoutValue(\"shadowColor\");\n if(!this._colorEqual(oldColor, color)) {\n this._setLayoutValue(\"shadowColor\", color);\n this._updateCfgFlag_Content();\n }\n }\n\n setItalic(enabled) {\n let oldItalic = this._getLayoutValue(\"italic\");\n if(oldItalic!=enabled) {\n this._setLayoutValue(\"italic\", enabled);\n this._updateCfgFlag_Content();\n }\n }\n\n setBold(bold) {\n let oldBold = this._getLayoutValue(\"bold\");\n if(oldBold!=bold) {\n this._setLayoutValue(\"bold\", bold);\n this._updateCfgFlag_Content();\n this._updateCfgFlag_Font(); //enable sdf\n }\n }\n\n setUnderline(underline)\n {\n let oldBold = this._getLayoutValue(\"underline\");\n if(oldBold != underline) {\n this._setLayoutValue(\"underline\", underline);\n this._updateCfgFlag_Content();\n }\n }\n\n setSpacingX(x) {\n let oldX = this._getLayoutValue(\"spaceX\");\n if(oldX != x && typeof x == \"number\" && ! isNaN(x)) {\n this._setLayoutValue(\"spaceX\", x);\n this._updateCfgFlag_Content();\n }\n }\n\n updateRenderData(comp) {\n\n if (!comp._vertsDirty) return;\n\n if (comp.font && comp.font.nativeUrl) {\n this.setFontPath(cc.assetManager.cacheManager.getCache(comp.font.nativeUrl) || comp.font.nativeUrl);\n }\n let layout = this._layout;\n let c = comp.node.color;\n let node = comp.node;\n let retinaSize = comp.fontSize;\n\n this.setString(comp.string);\n this.setFontSize(comp.fontSize, retinaSize / 72 * comp.fontSize);\n this.setLineHeight(comp.lineHeight);\n this.setEnableWrap(comp.enableWrapText);\n this.setItalic(comp.enableItalic);\n this.setUnderline(comp.enableUnderline);\n this.setBold(comp.enableBold);\n this.setOverFlow(comp.overflow);\n this.setVerticalAlign(comp.verticalAlign);\n this.setHorizontalAlign(comp.horizontalAlign);\n this.setSpacingX(comp.spacingX);\n this.setContentSize(node.getContentSize().width, node.getContentSize().height);\n this.setAnchorPoint(node.anchorX, node.anchorY);\n this.setColor(this._colorToObj(c.getR(), c.getG(), c.getB(), Math.ceil(c.getA() * node.opacity / 255)));\n\n\n let shadow = node.getComponent(cc.LabelShadow);\n if (shadow && shadow.enabled) {\n let shadowColor = shadow.color;\n this.setShadow(shadow.offset.x, shadow.offset.y, shadow.blur);\n this.setShadowColor(this._colorToObj(shadowColor.getR(), shadowColor.getG(), shadowColor.getB(), Math.ceil(shadowColor.getA() * node.opacity / 255)));\n } else {\n this.setShadow(0, 0, -1);\n }\n\n this._updateTTFMaterial(comp);\n \n layout.render();\n //comp._vertsDirty = false;\n }\n\n _bindMaterial(comp) {\n let material = this.labelMaterial;\n if(!material) {\n material = MaterialVariant.createWithBuiltin(\"2d-label\", comp);\n this.labelMaterial = material;\n }\n return material;\n }\n\n _updateTTFMaterial(comp) {\n let material = this._bindMaterial(comp)\n let node = this._label.node;\n let layout = this._layout;\n let outline = node.getComponent(cc.LabelOutline);\n let outlineSize = 0;\n if (outline && outline.enabled && outline.width > 0) {\n outlineSize = Math.max(Math.min(outline.width / 10, 0.4), 0.1);\n let c = outline.color;\n this.setOutlineColor(this._colorToObj(c.getR(), c.getG(), c.getB(), Math.ceil(c.getA() * node.opacity / 255)));\n }\n this.setOutline(outlineSize);\n material.define('CC_USE_MODEL', true);\n material.define('USE_TEXTURE_ALPHAONLY', true);\n material.define('USE_SDF', outlineSize > 0.0 || comp.enableBold );\n material.define('USE_SDF_EXTEND', comp.enableBold ? 1 : 0);\n if (material.getDefine('CC_SUPPORT_standard_derivatives') !== undefined && cc.sys.glExtension('OES_standard_derivatives')) {\n material.define('CC_SUPPORT_standard_derivatives', true);\n }\n layout.setEffect(material.effect._nativeObj);\n }\n\n fillBuffers (comp, renderer) {\n this._layout.render();\n }\n getVfmt() {\n }\n}","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport TTFAssembler from '../../../../utils/label/ttf';\n\nconst LabelShadow = require('../../../../../components/CCLabelShadow');\nconst WHITE = cc.color(255, 255, 255, 255);\n\nexport default class WebglTTFAssembler extends TTFAssembler {\n updateUVs (comp) {\n let verts = this._renderData.vDatas[0];\n let uv = comp._frame.uv;\n let uvOffset = this.uvOffset;\n let floatsPerVert = this.floatsPerVert;\n for (let i = 0; i < 4; i++) {\n let srcOffset = i * 2;\n let dstOffset = floatsPerVert * i + uvOffset;\n verts[dstOffset] = uv[srcOffset];\n verts[dstOffset + 1] = uv[srcOffset + 1];\n }\n }\n\n updateColor (comp) {\n WHITE._fastSetA(comp.node._color.a);\n let color = WHITE._val;\n\n super.updateColor(comp, color);\n }\n\n updateVerts(comp) {\n const scale = this.getTTFTextureSizeScale();\n let node = comp.node,\n canvasWidth = comp._ttfTexture.width / scale,\n canvasHeight = comp._ttfTexture.height / scale,\n appx = node.anchorX * node.width,\n appy = node.anchorY * node.height;\n\n let shadow = LabelShadow && comp.getComponent(LabelShadow);\n if (shadow && shadow._enabled) {\n // adapt size changed caused by shadow\n let offsetX = (canvasWidth - node.width) / 2;\n let offsetY = (canvasHeight - node.height) / 2;\n\n let shadowOffset = shadow.offset;\n if (-shadowOffset.x > offsetX) {\n // expand to left\n appx += (canvasWidth - node.width);\n }\n else if (offsetX > shadowOffset.x) {\n // expand to left and right\n appx += (offsetX - shadowOffset.x);\n }\n else {\n // expand to right, no need to change render position\n }\n\n if (-shadowOffset.y > offsetY) {\n // expand to top\n appy += (canvasHeight - node.height);\n }\n else if (offsetY > shadowOffset.y) {\n // expand to top and bottom\n appy += (offsetY - shadowOffset.y);\n }\n else {\n // expand to bottom, no need to change render position\n }\n }\n\n let local = this._local;\n local[0] = -appx;\n local[1] = -appy;\n local[2] = canvasWidth - appx;\n local[3] = canvasHeight - appy;\n\n this.updateUVs(comp);\n this.updateWorldVerts(comp);\n }\n}\n\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport Assembler from '../../../assembler';\nimport Label from '../../../../components/CCLabel';\n\nimport TTF from './2d/ttf';\nimport Bmfont from './2d/bmfont';\nimport Letter from './2d/letter';\n\nimport TTF3D from './3d/ttf';\nimport Bmfont3D from './3d/bmfont';\nimport Letter3D from './3d/letter';\n\nimport TTFMulti from './2d-multi/ttf';\nimport BmfontMulti from './2d-multi/bmfont';\n\nlet NativeTTF = undefined;\nif(CC_JSB) {\n NativeTTF = require(\"./2d/nativeTTF\");\n}\n\nLabel._canvasPool = {\n pool: [],\n get () {\n let data = this.pool.pop();\n\n if (!data) {\n let canvas = document.createElement(\"canvas\");\n let context = canvas.getContext(\"2d\");\n data = {\n canvas: canvas,\n context: context\n }\n\n // default text info\n context.textBaseline = 'alphabetic';\n }\n\n return data;\n },\n put (canvas) {\n if (this.pool.length >= 32) {\n return;\n }\n this.pool.push(canvas);\n }\n};\n\nAssembler.register(cc.Label, {\n getConstructor(label) {\n let is3DNode = label.node.is3DNode;\n const material = label.getMaterials()[0];\n let isMultiMaterial = material && material.material.isMultiSupport();\n\n let ctor = is3DNode ? TTF3D : (isMultiMaterial ? TTFMulti : TTF);\n \n if (label.font instanceof cc.BitmapFont) {\n ctor = is3DNode ? Bmfont3D : (isMultiMaterial ? BmfontMulti : Bmfont);\n } else if (label.cacheMode === Label.CacheMode.CHAR) {\n\n if(CC_JSB && !is3DNode && !!jsb.LabelRenderer && label.font instanceof cc.TTFFont && label._useNativeTTF()){\n ctor = NativeTTF;\n } else if (cc.sys.platform === cc.sys.WECHAT_GAME_SUB) {\n cc.warn('sorry, subdomain does not support CHAR mode currently!');\n } else {\n ctor = is3DNode ? Letter3D : Letter;\n } \n }\n\n return ctor;\n },\n\n TTF,\n Bmfont,\n Letter,\n\n TTF3D,\n Bmfont3D,\n Letter3D,\n NativeTTF,\n\n TTFMulti,\n BmfontMulti\n});\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport Assembler from '../../assembler';\n\nconst Mask = require('../../../components/CCMask');\nconst RenderFlow = require('../../render-flow');\nconst SimpleSpriteAssembler = require('./sprite/2d/simple');\nconst GraphicsAssembler = require('./graphics');\nconst gfx = require('../../../../renderer/gfx');\nconst vfmtPos = require('../vertex-format').vfmtPos;\n\n// todo: 8 is least Stencil depth supported by webGL device, it could be adjusted to vendor implementation value\nlet _maxLevel = 8;\n// Current mask\nlet _maskStack = [];\n\nfunction getWriteMask () {\n return 0x01 << (_maskStack.length - 1);\n}\n\nfunction getStencilRef () {\n let result = 0;\n for (let i = 0; i < _maskStack.length; ++i) {\n result += (0x01 << i);\n }\n return result;\n}\n\nfunction applyStencil (material, func, failOp, ref, stencilMask, writeMask) {\n let effect = material.effect;\n let zFailOp = gfx.STENCIL_OP_KEEP,\n zPassOp = gfx.STENCIL_OP_KEEP;\n effect.setStencil(gfx.STENCIL_ENABLE, func, ref, stencilMask, failOp, zFailOp, zPassOp, writeMask);\n}\n\n\nfunction pushMask (mask) {\n if (_maskStack.length + 1 > _maxLevel) {\n cc.errorID(9000, _maxLevel);\n }\n _maskStack.push(mask);\n}\n\nfunction exitMask (mask, renderer) {\n if (_maskStack.length === 0) {\n cc.errorID(9001);\n }\n _maskStack.pop();\n if (_maskStack.length === 0) {\n renderer._flushMaterial(mask._exitMaterial);\n }\n else {\n enableMask(renderer);\n }\n}\n\nfunction applyClearMask (mask, renderer) {\n let func = gfx.DS_FUNC_NEVER;\n let ref = getWriteMask();\n let stencilMask = ref;\n let writeMask = ref;\n let failOp = mask.inverted ? gfx.STENCIL_OP_REPLACE : gfx.STENCIL_OP_ZERO;\n\n applyStencil(mask._clearMaterial, func, failOp, ref, stencilMask, writeMask);\n\n let buffer = renderer.getBuffer('mesh', vfmtPos);\n let offsetInfo = buffer.request(4, 6);\n let indiceOffset = offsetInfo.indiceOffset,\n vertexOffset = offsetInfo.byteOffset >> 2,\n vertexId = offsetInfo.vertexOffset,\n vbuf = buffer._vData,\n ibuf = buffer._iData;\n \n vbuf[vertexOffset++] = -1;\n vbuf[vertexOffset++] = -1;\n vbuf[vertexOffset++] = -1;\n vbuf[vertexOffset++] = 1;\n vbuf[vertexOffset++] = 1;\n vbuf[vertexOffset++] = 1;\n vbuf[vertexOffset++] = 1;\n vbuf[vertexOffset++] = -1;\n\n ibuf[indiceOffset++] = vertexId;\n ibuf[indiceOffset++] = vertexId + 3;\n ibuf[indiceOffset++] = vertexId + 1;\n ibuf[indiceOffset++] = vertexId + 1;\n ibuf[indiceOffset++] = vertexId + 3;\n ibuf[indiceOffset++] = vertexId + 2;\n\n renderer.node = renderer._dummyNode;\n renderer.material = mask._clearMaterial;\n renderer._flush();\n}\n\nfunction applyAreaMask (mask, renderer) {\n let func = gfx.DS_FUNC_NEVER;\n let ref = getWriteMask();\n let stencilMask = ref;\n let writeMask = ref;\n let failOp = mask.inverted ? gfx.STENCIL_OP_ZERO : gfx.STENCIL_OP_REPLACE;\n\n applyStencil(mask._materials[0], func, failOp, ref, stencilMask, writeMask);\n\n // vertex buffer\n renderer.material = mask._materials[0];\n\n if (mask._type === Mask.Type.IMAGE_STENCIL) {\n renderer.node = renderer._dummyNode;\n SimpleSpriteAssembler.prototype.fillBuffers.call(mask._assembler, mask, renderer);\n renderer._flush();\n }\n else {\n renderer.node = mask.node;\n GraphicsAssembler.prototype.fillBuffers.call(mask._graphics._assembler, mask._graphics, renderer);\n }\n}\n\nfunction enableMask (renderer) {\n let func = gfx.DS_FUNC_EQUAL;\n let failOp = gfx.STENCIL_OP_KEEP;\n let ref = getStencilRef();\n let stencilMask = ref;\n let writeMask = getWriteMask();\n \n let mask = _maskStack[_maskStack.length - 1];\n applyStencil(mask._enableMaterial, func, failOp, ref, stencilMask, writeMask);\n renderer._flushMaterial(mask._enableMaterial);\n}\n\nexport class MaskAssembler extends SimpleSpriteAssembler {\n updateRenderData (mask) {\n if (mask._type === Mask.Type.IMAGE_STENCIL) {\n if (mask.spriteFrame) {\n SimpleSpriteAssembler.prototype.updateRenderData.call(this, mask);\n }\n else {\n mask.setMaterial(0, null);\n }\n }\n else {\n mask._graphics.setMaterial(0, mask._materials[0]);\n GraphicsAssembler.prototype.updateRenderData.call(mask._graphics._assembler, mask._graphics, mask._graphics);\n }\n }\n\n fillBuffers (mask, renderer) {\n // Invalid state\n if (mask._type !== Mask.Type.IMAGE_STENCIL || mask.spriteFrame) {\n // HACK: Must push mask after batch, so we can only put this logic in fillVertexBuffer or fillIndexBuffer\n pushMask(mask);\n\n applyClearMask(mask, renderer);\n applyAreaMask(mask, renderer);\n\n enableMask(renderer);\n }\n\n mask.node._renderFlag |= RenderFlow.FLAG_UPDATE_RENDER_DATA;\n }\n\n postFillBuffers (mask, renderer) {\n // Invalid state\n if (mask._type !== Mask.Type.IMAGE_STENCIL || mask.spriteFrame) {\n // HACK: Must pop mask after batch, so we can only put this logic in fillBuffers\n exitMask(mask, renderer);\n }\n\n mask.node._renderFlag |= RenderFlow.FLAG_UPDATE_RENDER_DATA;\n }\n};\n\nAssembler.register(Mask, MaskAssembler);\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport MotionStreakAssembler from \"./motion-streak\";\nimport { vfmtPosUvColorTexId } from '../../webgl/vertex-format';\nconst MotionStreak = require('../../../components/CCMotionStreak');\nconst RenderFlow = require('../../render-flow');\n\nfunction Point (point, dir) {\n this.point = point || cc.v2();\n this.dir = dir || cc.v2();\n this.distance = 0;\n this.time = 0;\n}\n\nPoint.prototype.setPoint = function (x, y) {\n this.point.x = x;\n this.point.y = y;\n};\n\nPoint.prototype.setDir = function (x, y) {\n this.dir.x = x;\n this.dir.y = y;\n};\n\nlet _normal = cc.v2();\nlet _vec2 = cc.v2();\n\nfunction normal (out, dir) {\n //get perpendicular\n out.x = -dir.y;\n out.y = dir.x;\n return out\n}\n\nexport default class MultiMotionStreakAssembler extends MotionStreakAssembler {\n initData() {\n this._renderData.createFlexData(0, 16, (16 - 2) * 3, this.getVfmt());\n }\n\n getVfmt() {\n return vfmtPosUvColorTexId;\n }\n\n getBuffer() {\n return cc.renderer._handle.getBuffer(\"mesh\", this.getVfmt());\n }\n\n update (comp, dt) {\n if (CC_EDITOR && !comp.preview) return;\n\n let stroke = comp._stroke / 2;\n\n let node = comp.node;\n let matrix = node._worldMatrix.m;\n let tx = matrix[12], ty = matrix[13];\n\n let points = comp._points;\n let lastPos = comp._lastWPos;\n let fadeTime = comp._fadeTime;\n\n let moved = lastPos.x !== tx || lastPos.y !== ty;\n if (moved) {\n let cur;\n let newHead = false;\n if (points.length === 0) {\n // new\n let prev = new Point();\n prev.setPoint(lastPos.x, lastPos.y);\n this._tailShortenTime = prev.time = fadeTime;\n points.push(prev);\n\n cur = new Point();\n points.unshift(cur);\n }\n else {\n // check moved distance\n cur = points[0];\n let prev = points[1];\n let difx = prev.point.x - tx;\n let dify = prev.point.y - ty;\n newHead = ((difx*difx + dify*dify) >= comp.minSeg*comp.minSeg);\n }\n // update head\n cur.setPoint(tx, ty);\n cur.time = fadeTime + dt;\n let prev = points[1];\n cur.distance = cur.point.sub(prev.point, _vec2).mag();\n _vec2.normalizeSelf();\n cur.setDir(_vec2.x, _vec2.y);\n\n let prevIsTail = points.length === 2;\n if (prevIsTail) {\n prev.setDir(_vec2.x, _vec2.y);\n }\n\n if (newHead) {\n let point = new Point(cur.point.clone(), cur.dir.clone());\n point.distance = cur.distance;\n point.time = cur.time;\n points.unshift(point);\n }\n }\n\n lastPos.x = tx;\n lastPos.y = ty;\n\n if (points.length < 2) {\n return;\n }\n\n // cc.log(points.map(x => x.time.toFixed(2)).reverse().join(' '), ',', this._tailShortenTime.toFixed(2));\n\n let color = comp._color, ca = color.a;\n let crgb = (color.b<<16) | (color.g<<8) | color.r;\n\n let verticesCount = 0;\n let indicesCount = 0;\n let flexBuffer = this._renderData._flexBuffer;\n flexBuffer.reserve(points.length*2, (points.length-1)*6);\n let vData = flexBuffer.vData;\n let uintVData = flexBuffer.uintVData;\n let vertsOffset = 6;\n\n for (let i = points.length - 1; i >=0 ; i--) {\n let p = points[i];\n let point = p.point;\n let dir = p.dir;\n p.time -= dt;\n\n let isLast = i === points.length - 1;\n\n if (p.time <= 0) {\n if (isLast && i - 1 >= 0) {\n this._tailShortenTime = points[i - 1].time - dt;\n }\n points.splice(i, 1);\n continue;\n }\n\n let progress = p.time / fadeTime;\n\n if (isLast) {\n let next = points[i - 1];\n if (!next) {\n points.splice(i, 1);\n continue;\n }\n let nextIsStatic = points.length >= 3;\n if (nextIsStatic) {\n let segmentProgress = p.time / this._tailShortenTime;\n if (segmentProgress <= 1) {\n point.x = next.point.x - next.distance * next.dir.x * segmentProgress;\n point.y = next.point.y - next.distance * next.dir.y * segmentProgress;\n }\n }\n else {\n this._tailShortenTime = p.time;\n }\n }\n\n normal(_normal, dir);\n\n \n let da = progress * ca;\n let c = ((da<<24) >>> 0) | crgb;\n\n let offset = verticesCount * vertsOffset;\n\n vData[offset] = point.x + _normal.x * stroke;\n vData[offset + 1] = point.y + _normal.y * stroke;\n vData[offset + 2] = 1;\n vData[offset + 3] = progress;\n uintVData[offset + 4] = c;\n vData[offset + 5] = comp._texId;\n \n offset += vertsOffset;\n\n vData[offset] = point.x - _normal.x * stroke;\n vData[offset + 1] = point.y - _normal.y * stroke;\n vData[offset + 2] = 0;\n vData[offset + 3] = progress;\n uintVData[offset + 4] = c;\n vData[offset + 5] = comp._texId;\n \n verticesCount += 2;\n }\n\n indicesCount = verticesCount <= 2 ? 0 : (verticesCount - 2) * 3;\n\n flexBuffer.used(verticesCount, indicesCount);\n }\n\n fillBuffers (comp, renderer) {\n let { vData, usedVertices, usedIndices, usedVerticesFloats } = this._renderData._flexBuffer;\n\n let buffer = this.getBuffer(renderer);\n let offsetInfo = buffer.request(usedVertices, usedIndices);\n\n // buffer data may be realloc, need get reference after request.\n\n // fill vertices\n let vertexOffset = offsetInfo.byteOffset >> 2,\n vbuf = buffer._vData;\n\n if (vData.length + vertexOffset > vbuf.length) {\n vbuf.set(vData.subarray(0, usedVerticesFloats), vertexOffset);\n }\n else {\n vbuf.set(vData, vertexOffset);\n }\n\n // fill indices\n let ibuf = buffer._iData,\n indiceOffset = offsetInfo.indiceOffset,\n vertexId = offsetInfo.vertexOffset;\n\n // index buffer\n for (let i = 0, l = usedVertices; i < l; i += 2) {\n let start = vertexId + i;\n ibuf[indiceOffset++] = start;\n ibuf[indiceOffset++] = start + 2;\n ibuf[indiceOffset++] = start + 1;\n ibuf[indiceOffset++] = start + 1;\n ibuf[indiceOffset++] = start + 2;\n ibuf[indiceOffset++] = start + 3;\n }\n\n comp.node._renderFlag |= RenderFlow.FLAG_UPDATE_RENDER_DATA;\n }\n\n}\n\nMotionStreakAssembler.register(MotionStreak, {\n getConstructor(comp) {\n const material = comp.getMaterials()[0];\n let isMultiMaterial = material && material.material.isMultiSupport();\n return isMultiMaterial ? MultiMotionStreakAssembler : MotionStreakAssembler;\n },\n\n MotionStreakAssembler,\n MultiMotionStreakAssembler\n});\n\nMultiMotionStreakAssembler.prototype.floatsPerVert = 6;\nMultiMotionStreakAssembler.prototype.texIdOffset = 5;\nMultiMotionStreakAssembler.prototype.isMulti = true;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport Assembler2D from '../../assembler-2d';\n\nconst RenderFlow = require('../../render-flow');\n\nfunction Point (point, dir) {\n this.point = point || cc.v2();\n this.dir = dir || cc.v2();\n this.distance = 0;\n this.time = 0;\n}\n\nPoint.prototype.setPoint = function (x, y) {\n this.point.x = x;\n this.point.y = y;\n};\n\nPoint.prototype.setDir = function (x, y) {\n this.dir.x = x;\n this.dir.y = y;\n};\n\nlet _tangent = cc.v2();\nlet _miter = cc.v2();\nlet _normal = cc.v2();\nlet _vec2 = cc.v2();\n\nfunction normal (out, dir) {\n //get perpendicular\n out.x = -dir.y;\n out.y = dir.x;\n return out\n}\n\nfunction computeMiter (miter, lineA, lineB, halfThick, maxMultiple) {\n //get tangent line\n lineA.add(lineB, _tangent);\n _tangent.normalizeSelf();\n\n //get miter as a unit vector\n miter.x = -_tangent.y;\n miter.y = _tangent.x;\n _vec2.x = -lineA.y; \n _vec2.y = lineA.x;\n\n //get the necessary length of our miter\n let multiple = 1 / miter.dot(_vec2);\n if (maxMultiple) {\n multiple = Math.min(multiple, maxMultiple);\n }\n return halfThick * multiple;\n}\n\nexport default class MotionStreakAssembler extends Assembler2D {\n constructor () {\n super();\n this._tailShortenTime = 0;\n }\n\n initData () {\n this._renderData.createFlexData(0, 16, (16 - 2) * 3);\n }\n\n update (comp, dt) {\n if (CC_EDITOR && !comp.preview) return;\n\n let stroke = comp._stroke / 2;\n\n let node = comp.node;\n let matrix = node._worldMatrix.m;\n let tx = matrix[12], ty = matrix[13];\n\n let points = comp._points;\n let lastPos = comp._lastWPos;\n let fadeTime = comp._fadeTime;\n\n let moved = lastPos.x !== tx || lastPos.y !== ty;\n if (moved) {\n let cur;\n let newHead = false;\n if (points.length === 0) {\n // new\n let prev = new Point();\n prev.setPoint(lastPos.x, lastPos.y);\n this._tailShortenTime = prev.time = fadeTime;\n points.push(prev);\n\n cur = new Point();\n points.unshift(cur);\n }\n else {\n // check moved distance\n cur = points[0];\n let prev = points[1];\n let difx = prev.point.x - tx;\n let dify = prev.point.y - ty;\n newHead = ((difx*difx + dify*dify) >= comp.minSeg*comp.minSeg);\n }\n // update head\n cur.setPoint(tx, ty);\n cur.time = fadeTime + dt;\n let prev = points[1];\n cur.distance = cur.point.sub(prev.point, _vec2).mag();\n _vec2.normalizeSelf();\n cur.setDir(_vec2.x, _vec2.y);\n\n let prevIsTail = points.length === 2;\n if (prevIsTail) {\n prev.setDir(_vec2.x, _vec2.y);\n }\n\n if (newHead) {\n let point = new Point(cur.point.clone(), cur.dir.clone());\n point.distance = cur.distance;\n point.time = cur.time;\n points.unshift(point);\n }\n }\n\n lastPos.x = tx;\n lastPos.y = ty;\n\n if (points.length < 2) {\n return;\n }\n\n // cc.log(points.map(x => x.time.toFixed(2)).reverse().join(' '), ',', this._tailShortenTime.toFixed(2));\n\n let color = comp._color, ca = color.a;\n let crgb = (color.b<<16) | (color.g<<8) | color.r;\n\n let verticesCount = 0;\n let indicesCount = 0;\n let flexBuffer = this._renderData._flexBuffer;\n flexBuffer.reserve(points.length*2, (points.length-1)*6);\n let vData = flexBuffer.vData;\n let uintVData = flexBuffer.uintVData;\n let vertsOffset = 5;\n\n for (let i = points.length - 1; i >=0 ; i--) {\n let p = points[i];\n let point = p.point;\n let dir = p.dir;\n p.time -= dt;\n\n let isLast = i === points.length - 1;\n\n if (p.time <= 0) {\n if (isLast && i - 1 >= 0) {\n this._tailShortenTime = points[i - 1].time - dt;\n }\n points.splice(i, 1);\n continue;\n }\n\n let progress = p.time / fadeTime;\n\n if (isLast) {\n let next = points[i - 1];\n if (!next) {\n points.splice(i, 1);\n continue;\n }\n let nextIsStatic = points.length >= 3;\n if (nextIsStatic) {\n let segmentProgress = p.time / this._tailShortenTime;\n if (segmentProgress <= 1) {\n point.x = next.point.x - next.distance * next.dir.x * segmentProgress;\n point.y = next.point.y - next.distance * next.dir.y * segmentProgress;\n }\n }\n else {\n this._tailShortenTime = p.time;\n }\n }\n\n normal(_normal, dir);\n\n \n let da = progress * ca;\n let c = ((da<<24) >>> 0) | crgb;\n\n let offset = verticesCount * vertsOffset;\n\n vData[offset] = point.x + _normal.x * stroke;\n vData[offset + 1] = point.y + _normal.y * stroke;\n vData[offset + 2] = 1;\n vData[offset + 3] = progress;\n uintVData[offset + 4] = c;\n \n offset += vertsOffset;\n\n vData[offset] = point.x - _normal.x * stroke;\n vData[offset + 1] = point.y - _normal.y * stroke;\n vData[offset + 2] = 0;\n vData[offset + 3] = progress;\n uintVData[offset + 4] = c;\n \n verticesCount += 2;\n }\n\n indicesCount = verticesCount <= 2 ? 0 : (verticesCount - 2) * 3;\n\n flexBuffer.used(verticesCount, indicesCount);\n }\n\n fillBuffers (comp, renderer) {\n let { vData, usedVertices, usedIndices, usedVerticesFloats } = this._renderData._flexBuffer;\n\n let buffer = renderer._meshBuffer;\n let offsetInfo = buffer.request(usedVertices, usedIndices);\n\n // buffer data may be realloc, need get reference after request.\n\n // fill vertices\n let vertexOffset = offsetInfo.byteOffset >> 2,\n vbuf = buffer._vData;\n\n if (vData.length + vertexOffset > vbuf.length) {\n vbuf.set(vData.subarray(0, usedVerticesFloats), vertexOffset);\n }\n else {\n vbuf.set(vData, vertexOffset);\n }\n\n // fill indices\n let ibuf = buffer._iData,\n indiceOffset = offsetInfo.indiceOffset,\n vertexId = offsetInfo.vertexOffset;\n\n // index buffer\n for (let i = 0, l = usedVertices; i < l; i += 2) {\n let start = vertexId + i;\n ibuf[indiceOffset++] = start;\n ibuf[indiceOffset++] = start + 2;\n ibuf[indiceOffset++] = start + 1;\n ibuf[indiceOffset++] = start + 1;\n ibuf[indiceOffset++] = start + 2;\n ibuf[indiceOffset++] = start + 3;\n }\n\n comp.node._renderFlag |= RenderFlow.FLAG_UPDATE_RENDER_DATA;\n }\n}\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport { vfmtPosUvColorTexId } from '../../../../webgl/vertex-format';\nimport BarFilledAssembler from '../2d/bar-filled';\n\nexport default class BarFilledAssemblerMulti extends BarFilledAssembler {\n initData() {\n let data = this._renderData;\n data.createFlexData(0, this.verticesCount, this.indicesCount, this.getVfmt());\n const indices = data.iDatas[0];\n data.initQuadIndices(indices);\n }\n\n getVfmt() {\n return vfmtPosUvColorTexId;\n }\n\n getBuffer() {\n return cc.renderer._handle.getBuffer(\"mesh\", this.getVfmt());\n }\n\n updateRenderData (sprite) {\n super.updateRenderData(sprite);\n\n if (sprite._texIdDirty) {\n sprite._updateMultiTexId(sprite.getMaterial(0), sprite._spriteFrame._texture);\n if (sprite._texIdDirty) {\n this.updateTexId(sprite);\n sprite._texIdDirty = false;\n }\n }\n }\n\n updateRenderDataForSwitchMaterial(sprite) {\n if (sprite._vertsDirty) {\n let fillStart = sprite._fillStart;\n let fillRange = sprite._fillRange;\n\n if (fillRange < 0) {\n fillStart += fillRange;\n fillRange = -fillRange;\n }\n\n fillRange = fillStart + fillRange;\n\n fillStart = fillStart > 1.0 ? 1.0 : fillStart;\n fillStart = fillStart < 0.0 ? 0.0 : fillStart;\n\n fillRange = fillRange > 1.0 ? 1.0 : fillRange;\n fillRange = fillRange < 0.0 ? 0.0 : fillRange;\n fillRange = fillRange - fillStart;\n fillRange = fillRange < 0 ? 0 : fillRange;\n\n let fillEnd = fillStart + fillRange;\n fillEnd = fillEnd > 1 ? 1 : fillEnd;\n\n this.updateUVs(sprite, fillStart, fillEnd);\n this.updateVerts(sprite, fillStart, fillEnd);\n\n sprite._vertsDirty = false;\n }\n\n if (sprite._texIdDirty) {\n sprite._updateMultiTexId(sprite.getMaterial(0), sprite._spriteFrame._texture);\n if (sprite._texIdDirty) {\n this.updateTexId(sprite);\n sprite._texIdDirty = false;\n }\n }\n\n if (CC_JSB) this._aftUpdateRenderDataForNative();\n }\n\n}\n\nBarFilledAssemblerMulti.prototype.floatsPerVert = 6;\nBarFilledAssemblerMulti.prototype.texIdOffset = 5;\nBarFilledAssemblerMulti.prototype.isMulti = true;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport { vfmtPosUvColorTexId } from '../../../../webgl/vertex-format';\nimport MeshSpriteAssembler from '../2d/mesh';\n\nexport default class MultiMeshSpriteAssembler extends MeshSpriteAssembler {\n getVfmt() {\n return vfmtPosUvColorTexId;\n }\n\n getBuffer() {\n return cc.renderer._handle.getBuffer(\"mesh\", this.getVfmt());\n }\n\n updateRenderData(sprite) {\n let frame = sprite.spriteFrame;\n\n super.updateRenderData(sprite);\n\n if (frame) {\n if (sprite._texIdDirty) {\n sprite._updateMultiTexId(sprite.getMaterial(0), frame._texture);\n }\n\n // 不进行 Dirty 判断Mesh 可能会变化,但是纹理不会变\n this.updateTexId(sprite);\n sprite._texIdDirty = false;\n }\n }\n\n updateRenderDataForSwitchMaterial(sprite) {\n let frame = sprite.spriteFrame;\n\n if (frame) {\n let vertices = frame.vertices;\n if (vertices) {\n this.verticesCount = vertices.x.length;\n this.indicesCount = vertices.triangles.length;\n\n let renderData = this._renderData;\n let flexBuffer = renderData._flexBuffer;\n if (flexBuffer.reserve(this.verticesCount, this.indicesCount)) {\n this.updateColor(sprite);\n sprite._vertsDirty = true;\n }\n flexBuffer.used(this.verticesCount, this.indicesCount);\n\n this.updateIndices(vertices.triangles);\n\n if (sprite._vertsDirty) {\n this.updateUVs(sprite);\n this.updateVerts(sprite);\n this.updateWorldVerts(sprite);\n sprite._vertsDirty = false;\n }\n }\n }\n\n if (sprite._texIdDirty) {\n sprite._updateMultiTexId(sprite.getMaterial(0), frame._texture);\n }\n\n // 不进行 Dirty 判断Mesh 可能会变化,但是纹理不会变\n this.updateTexId(sprite);\n sprite._texIdDirty = false;\n\n if (CC_JSB) this._aftUpdateRenderDataForNative();\n }\n}\n\nMultiMeshSpriteAssembler.prototype.floatsPerVert = 6;\nMultiMeshSpriteAssembler.prototype.texIdOffset = 5;\nMultiMeshSpriteAssembler.prototype.isMulti = true;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport { vfmtPosUvColorTexId } from '../../../../webgl/vertex-format';\nimport RadialFilledAssembler from '../2d/radial-filled';\n\nexport default class MultiRadialFilledAssembler extends RadialFilledAssembler {\n initData (sprite) {\n this._renderData.createFlexData(0, 4, 6, this.getVfmt());\n this.updateIndices();\n }\n\n getVfmt() {\n return vfmtPosUvColorTexId;\n }\n\n getBuffer() {\n return cc.renderer._handle.getBuffer(\"mesh\", this.getVfmt());\n }\n\n updateRenderData (sprite) {\n super.updateRenderData(sprite);\n\n if (sprite._texIdDirty) {\n sprite._updateMultiTexId(sprite.getMaterial(0), sprite.spriteFrame._texture);\n }\n\n // 不进行 Dirty 判断Mesh 可能会变化,但是纹理不会变\n this.updateTexId(sprite);\n sprite._texIdDirty = false;\n }\n\n updateRenderDataForSwitchMaterial(sprite) {\n this._aftUpdateRenderData(sprite);\n\n if (sprite._texIdDirty) {\n sprite._updateMultiTexId(sprite.getMaterial(0), sprite.spriteFrame._texture);\n }\n\n // 不进行 Dirty 判断Mesh 可能会变化,但是纹理不会变\n this.updateTexId(sprite);\n sprite._texIdDirty = false;\n\n if (CC_JSB) this._aftUpdateRenderDataForNative();\n }\n}\n\nMultiRadialFilledAssembler.prototype.floatsPerVert = 6;\nMultiRadialFilledAssembler.prototype.texIdOffset = 5;\nMultiRadialFilledAssembler.prototype.isMulti = true;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport { vfmtPosUvColorTexId } from '../../../../webgl/vertex-format';\nimport SimpleSpriteAssembler from '../2d/simple';\n\nexport default class MultiSimpleSpriteAssembler extends SimpleSpriteAssembler {\n initData() {\n let data = this._renderData;\n data.createFlexData(0, this.verticesCount, this.indicesCount, this.getVfmt());\n const indices = data.iDatas[0];\n data.initQuadIndices(indices);\n }\n\n getVfmt() {\n return vfmtPosUvColorTexId;\n }\n\n getBuffer() {\n return cc.renderer._handle.getBuffer(\"mesh\", this.getVfmt());\n }\n\n updateRenderData (sprite) {\n super.updateRenderData(sprite);\n\n if (sprite._texIdDirty) {\n sprite._updateMultiTexId(sprite.getMaterial(0), sprite._spriteFrame._texture);\n if (sprite._texIdDirty) {\n this.updateTexId(sprite);\n sprite._texIdDirty = false;\n }\n }\n }\n\n updateRenderDataForSwitchMaterial(sprite) {\n if (sprite._vertsDirty) {\n this.updateUVs(sprite);\n this.updateVerts(sprite);\n sprite._vertsDirty = false;\n }\n\n if (sprite._texIdDirty) {\n sprite._updateMultiTexId(sprite.getMaterial(0), sprite._spriteFrame._texture);\n if (sprite._texIdDirty) {\n this.updateTexId(sprite);\n sprite._texIdDirty = false;\n }\n }\n\n if (CC_JSB) this._aftUpdateRenderDataForNative();\n }\n}\n\nMultiSimpleSpriteAssembler.prototype.floatsPerVert = 6;\nMultiSimpleSpriteAssembler.prototype.texIdOffset = 5;\nMultiSimpleSpriteAssembler.prototype.isMulti = true;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos.com\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport { vfmtPosUvColorTexId } from '../../../../webgl/vertex-format';\nimport SlicedAssembler from '../2d/sliced';\n\nexport default class MultiSlicedAssembler extends SlicedAssembler {\n initData (sprite) {\n if (this._renderData.meshCount > 0) return;\n this._renderData.createFlexData(0, this.verticesCount, this.indicesCount, this.getVfmt());\n\n let indices = this._renderData.iDatas[0];\n let indexOffset = 0;\n for (let r = 0; r < 3; ++r) {\n for (let c = 0; c < 3; ++c) {\n let start = r * 4 + c;\n indices[indexOffset++] = start;\n indices[indexOffset++] = start + 1;\n indices[indexOffset++] = start + 4;\n indices[indexOffset++] = start + 1;\n indices[indexOffset++] = start + 5;\n indices[indexOffset++] = start + 4;\n }\n }\n }\n\n getVfmt() {\n return vfmtPosUvColorTexId;\n }\n\n getBuffer() {\n return cc.renderer._handle.getBuffer(\"mesh\", this.getVfmt());\n }\n\n updateRenderData (sprite) {\n super.updateRenderData(sprite);\n\n if (sprite._texIdDirty) {\n sprite._updateMultiTexId(sprite.getMaterial(0), sprite._spriteFrame._texture);\n if (sprite._texIdDirty) {\n this.updateTexId(sprite);\n sprite._texIdDirty = false;\n }\n }\n }\n\n updateRenderDataForSwitchMaterial(sprite) {\n if (sprite._vertsDirty) {\n this.updateUVs(sprite);\n this.updateVerts(sprite);\n sprite._vertsDirty = false;\n }\n\n if (sprite._texIdDirty) {\n sprite._updateMultiTexId(sprite.getMaterial(0), sprite._spriteFrame._texture);\n if (sprite._texIdDirty) {\n this.updateTexId(sprite);\n sprite._texIdDirty = false;\n }\n }\n\n if (CC_JSB) this._aftUpdateRenderDataForNative();\n }\n\n}\n\nMultiSlicedAssembler.prototype.floatsPerVert = 6;\nMultiSlicedAssembler.prototype.texIdOffset = 5;\nMultiSlicedAssembler.prototype.isMulti = true;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport { vfmtPosUvColorTexId } from '../../../../webgl/vertex-format';\nimport TiledAssembler from '../2d/tiled';\n\nexport default class MultiTiledAssembler extends TiledAssembler {\n getVfmt() {\n return vfmtPosUvColorTexId;\n }\n\n getBuffer() {\n return cc.renderer._handle.getBuffer(\"mesh\", this.getVfmt());\n }\n\n updateRenderData(sprite) {\n super.updateRenderData(sprite);\n\n if (sprite._texIdDirty) {\n sprite._updateMultiTexId(sprite.getMaterial(0), sprite.spriteFrame._texture);\n }\n\n // 不进行 Dirty 判断Mesh 可能会变化,但是纹理不会变\n this.updateTexId(sprite);\n sprite._texIdDirty = false;\n }\n\n updateRenderDataForSwitchMaterial(sprite) {\n let frame = sprite._spriteFrame;\n let node = sprite.node;\n\n let contentWidth = this.contentWidth = Math.abs(node.width);\n let contentHeight = this.contentHeight = Math.abs(node.height);\n let rect = frame._rect;\n let leftWidth = frame.insetLeft, rightWidth = frame.insetRight, centerWidth = rect.width - leftWidth - rightWidth,\n topHeight = frame.insetTop, bottomHeight = frame.insetBottom, centerHeight = rect.height - topHeight - bottomHeight;\n this.sizableWidth = contentWidth - leftWidth - rightWidth;\n this.sizableHeight = contentHeight - topHeight - bottomHeight;\n this.sizableWidth = this.sizableWidth > 0 ? this.sizableWidth : 0;\n this.sizableHeight = this.sizableHeight > 0 ? this.sizableHeight : 0;\n let hRepeat = this.hRepeat = centerWidth === 0 ? this.sizableWidth : this.sizableWidth / centerWidth;\n let vRepeat = this.vRepeat = centerHeight === 0 ? this.sizableHeight : this.sizableHeight / centerHeight;\n let row = this.row = Math.ceil(vRepeat + 2);\n let col = this.col = Math.ceil(hRepeat + 2);\n\n // update data property\n let count = row * col;\n this.verticesCount = count * 4;\n this.indicesCount = count * 6;\n\n let renderData = this._renderData;\n let flexBuffer = renderData._flexBuffer;\n if (flexBuffer.reserve(this.verticesCount, this.indicesCount)) {\n this._updateIndices();\n this.updateColor(sprite);\n }\n flexBuffer.used(this.verticesCount, this.indicesCount);\n\n if (sprite._vertsDirty) {\n this.updateUVs(sprite);\n this.updateVerts(sprite);\n sprite._vertsDirty = false;\n }\n\n if (sprite._texIdDirty) {\n sprite._updateMultiTexId(sprite.getMaterial(0), sprite.spriteFrame._texture);\n }\n\n // 不进行 Dirty 判断Mesh 可能会变化,但是纹理不会变\n this.updateTexId(sprite);\n sprite._texIdDirty = false;\n\n if (CC_JSB) this._aftUpdateRenderDataForNative();\n }\n}\n\nMultiTiledAssembler.prototype.floatsPerVert = 6;\nMultiTiledAssembler.prototype.texIdOffset = 5;\nMultiTiledAssembler.prototype.isMulti = true;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport Assembler2D from '../../../../assembler-2d';\n\nconst Sprite = require('../../../../../components/CCSprite');\nconst FillType = Sprite.FillType;\n\nexport default class BarFilledAssembler extends Assembler2D {\n updateRenderData (sprite) {\n let frame = sprite._spriteFrame;\n const assemblerChanged = this.packDynamicAtlasAndCheckMaterial(sprite, frame);\n\n // 打包到动态图集时可能会切换 Assembler\n if (!assemblerChanged) {\n if (sprite._vertsDirty) {\n let fillStart = sprite._fillStart;\n let fillRange = sprite._fillRange;\n\n if (fillRange < 0) {\n fillStart += fillRange;\n fillRange = -fillRange;\n }\n\n fillRange = fillStart + fillRange;\n\n fillStart = fillStart > 1.0 ? 1.0 : fillStart;\n fillStart = fillStart < 0.0 ? 0.0 : fillStart;\n\n fillRange = fillRange > 1.0 ? 1.0 : fillRange;\n fillRange = fillRange < 0.0 ? 0.0 : fillRange;\n fillRange = fillRange - fillStart;\n fillRange = fillRange < 0 ? 0 : fillRange;\n\n let fillEnd = fillStart + fillRange;\n fillEnd = fillEnd > 1 ? 1 : fillEnd;\n\n this.updateUVs(sprite, fillStart, fillEnd);\n this.updateVerts(sprite, fillStart, fillEnd);\n\n sprite._vertsDirty = false;\n }\n }\n\n return assemblerChanged;\n }\n\n updateUVs (sprite, fillStart, fillEnd) {\n let spriteFrame = sprite._spriteFrame;\n\n //build uvs\n let atlasWidth = spriteFrame._texture.width;\n let atlasHeight = spriteFrame._texture.height;\n let textureRect = spriteFrame._rect;\n //uv computation should take spritesheet into account.\n let ul, vb, ur, vt;\n let quadUV0, quadUV1, quadUV2, quadUV3, quadUV4, quadUV5, quadUV6, quadUV7;\n if (spriteFrame._rotated) {\n ul = (textureRect.x) / atlasWidth;\n vb = (textureRect.y + textureRect.width) / atlasHeight;\n ur = (textureRect.x + textureRect.height) / atlasWidth;\n vt = (textureRect.y) / atlasHeight;\n\n quadUV0 = quadUV2 = ul;\n quadUV4 = quadUV6 = ur;\n quadUV3 = quadUV7 = vb;\n quadUV1 = quadUV5 = vt;\n }\n else {\n ul = (textureRect.x) / atlasWidth;\n vb = (textureRect.y + textureRect.height) / atlasHeight;\n ur = (textureRect.x + textureRect.width) / atlasWidth;\n vt = (textureRect.y) / atlasHeight;\n\n quadUV0 = quadUV4 = ul;\n quadUV2 = quadUV6 = ur;\n quadUV1 = quadUV3 = vb;\n quadUV5 = quadUV7 = vt;\n }\n\n let verts = this._renderData.vDatas[0];\n let uvOffset = this.uvOffset;\n let floatsPerVert = this.floatsPerVert;\n switch (sprite._fillType) {\n case FillType.HORIZONTAL:\n verts[uvOffset] = quadUV0 + (quadUV2 - quadUV0) * fillStart;\n verts[uvOffset + 1] = quadUV1 + (quadUV3 - quadUV1) * fillStart;\n verts[uvOffset + floatsPerVert] = quadUV0 + (quadUV2 - quadUV0) * fillEnd;\n verts[uvOffset + floatsPerVert + 1] = quadUV1 + (quadUV3 - quadUV1) * fillEnd;\n verts[uvOffset + floatsPerVert * 2] = quadUV4 + (quadUV6 - quadUV4) * fillStart;\n verts[uvOffset + floatsPerVert * 2 + 1] = quadUV5 + (quadUV7 - quadUV5) * fillStart;\n verts[uvOffset + floatsPerVert * 3] = quadUV4 + (quadUV6 - quadUV4) * fillEnd;\n verts[uvOffset + floatsPerVert * 3 + 1] = quadUV5 + (quadUV7 - quadUV5) * fillEnd;\n break;\n case FillType.VERTICAL:\n verts[uvOffset] = quadUV0 + (quadUV4 - quadUV0) * fillStart;\n verts[uvOffset + 1] = quadUV1 + (quadUV5 - quadUV1) * fillStart;\n verts[uvOffset + floatsPerVert] = quadUV2 + (quadUV6 - quadUV2) * fillStart;\n verts[uvOffset + floatsPerVert + 1] = quadUV3 + (quadUV7 - quadUV3) * fillStart;\n verts[uvOffset + floatsPerVert * 2] = quadUV0 + (quadUV4 - quadUV0) * fillEnd;\n verts[uvOffset + floatsPerVert * 2 + 1] = quadUV1 + (quadUV5 - quadUV1) * fillEnd;\n verts[uvOffset + floatsPerVert * 3] = quadUV2 + (quadUV6 - quadUV2) * fillEnd;\n verts[uvOffset + floatsPerVert * 3 + 1] = quadUV3 + (quadUV7 - quadUV3) * fillEnd;\n break;\n default:\n cc.errorID(2626);\n break;\n }\n }\n\n updateVerts (sprite, fillStart, fillEnd) {\n let node = sprite.node,\n width = node.width, height = node.height,\n appx = node.anchorX * width, appy = node.anchorY * height;\n\n let l = -appx, b = -appy,\n r = width - appx, t = height - appy;\n\n let progressStart, progressEnd;\n switch (sprite._fillType) {\n case FillType.HORIZONTAL:\n progressStart = l + (r - l) * fillStart;\n progressEnd = l + (r - l) * fillEnd;\n\n l = progressStart;\n r = progressEnd;\n break;\n case FillType.VERTICAL:\n progressStart = b + (t - b) * fillStart;\n progressEnd = b + (t - b) * fillEnd;\n\n b = progressStart;\n t = progressEnd;\n break;\n default:\n cc.errorID(2626);\n break;\n }\n\n let local = this._local;\n local[0] = l;\n local[1] = b;\n local[2] = r;\n local[3] = t;\n\n this.updateWorldVerts(sprite);\n }\n}\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport Assembler2D from '../../../../assembler-2d';\n\nexport default class MeshSpriteAssembler extends Assembler2D {\n initData (sprite) {\n this._renderData.createFlexData(0, 4, 6, this.getVfmt());\n }\n \n updateRenderData (sprite) {\n let frame = sprite.spriteFrame;\n\n const assemblerChanged = this.packDynamicAtlasAndCheckMaterial(sprite, frame);\n\n // 打包到动态图集时可能会切换 Assembler\n if (!assemblerChanged) {\n if (frame) {\n let vertices = frame.vertices;\n if (vertices) {\n this.verticesCount = vertices.x.length;\n this.indicesCount = vertices.triangles.length;\n\n let renderData = this._renderData;\n let flexBuffer = renderData._flexBuffer;\n if (flexBuffer.reserve(this.verticesCount, this.indicesCount)) {\n this.updateColor(sprite);\n sprite._vertsDirty = true;\n }\n flexBuffer.used(this.verticesCount, this.indicesCount);\n\n this.updateIndices(vertices.triangles);\n\n if (sprite._vertsDirty) {\n this.updateUVs(sprite);\n this.updateVerts(sprite);\n this.updateWorldVerts(sprite);\n sprite._vertsDirty = false;\n }\n }\n }\n }\n\n return assemblerChanged;\n }\n\n updateIndices (triangles) {\n this._renderData.iDatas[0].set(triangles);\n }\n\n updateUVs (sprite) {\n let vertices = sprite.spriteFrame.vertices,\n u = vertices.nu,\n v = vertices.nv;\n\n let uvOffset = this.uvOffset;\n let floatsPerVert = this.floatsPerVert;\n let verts = this._renderData.vDatas[0];\n for (let i = 0; i < u.length; i++) {\n let dstOffset = floatsPerVert * i + uvOffset;\n verts[dstOffset] = u[i];\n verts[dstOffset + 1] = v[i];\n }\n }\n\n updateVerts (sprite) {\n let node = sprite.node,\n contentWidth = Math.abs(node.width),\n contentHeight = Math.abs(node.height),\n appx = node.anchorX * contentWidth,\n appy = node.anchorY * contentHeight;\n\n let frame = sprite.spriteFrame,\n vertices = frame.vertices,\n x = vertices.x,\n y = vertices.y,\n originalWidth = frame._originalSize.width,\n originalHeight = frame._originalSize.height,\n rectWidth = frame._rect.width,\n rectHeight = frame._rect.height,\n offsetX = frame._offset.x,\n offsetY = frame._offset.y,\n trimX = offsetX + (originalWidth - rectWidth) / 2,\n trimY = offsetY + (originalHeight - rectHeight) / 2;\n\n let scaleX = contentWidth / (sprite.trim ? rectWidth : originalWidth),\n scaleY = contentHeight / (sprite.trim ? rectHeight : originalHeight);\n\n let local = this._local;\n if (!sprite.trim) {\n for (let i = 0, l = x.length; i < l; i++) {\n let offset = i * 2;\n local[offset] = (x[i]) * scaleX - appx;\n local[offset + 1] = (originalHeight - y[i]) * scaleY - appy;\n }\n }\n else {\n for (let i = 0, l = x.length; i < l; i++) {\n let offset = i * 2;\n local[offset] = (x[i] - trimX) * scaleX - appx;\n local[offset + 1] = (originalHeight - y[i] - trimY) * scaleY - appy;\n }\n }\n if (frame._flipX) {\n for (let i = 0, l = this.verticesCount; i < l; i++) {\n local[i * 2] = contentWidth - local[i * 2] - 2 * appx;\n }\n }\n if (frame._flipY) {\n for (let i = 0, l = this.verticesCount; i < l; i++) {\n local[i * 2 + 1] = contentHeight - local[i * 2 + 1] - 2 * appy;\n }\n }\n }\n\n updateWorldVerts (sprite) {\n let node = sprite.node;\n let matrix = node._worldMatrix;\n let matrixm = matrix.m;\n let a = matrixm[0], b = matrixm[1], c = matrixm[4], d = matrixm[5],\n tx = matrixm[12], ty = matrixm[13];\n let local = this._local;\n let world = this._renderData.vDatas[0];\n let floatsPerVert = this.floatsPerVert;\n for (let i = 0, l = this.verticesCount; i < l; i++) {\n let lx = local[i*2];\n let ly = local[i*2 + 1];\n world[floatsPerVert * i] = lx * a + ly * c + tx;\n world[floatsPerVert * i + 1] = lx * b + ly * d + ty;\n }\n }\n}\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport Assembler2D from '../../../../assembler-2d';\n\nconst PI_2 = Math.PI * 2;\n\nlet _vertPos = [cc.v2(0, 0), cc.v2(0, 0), cc.v2(0, 0), cc.v2(0, 0)];\nlet _vertices = [0, 0, 0, 0];\nlet _uvs = [0, 0, 0, 0, 0, 0, 0, 0];\nlet _intersectPoint_1 = [cc.v2(0, 0), cc.v2(0, 0), cc.v2(0, 0), cc.v2(0, 0)];\nlet _intersectPoint_2 = [cc.v2(0, 0), cc.v2(0, 0), cc.v2(0, 0), cc.v2(0, 0)];\nlet _center = cc.v2(0, 0);\nlet _triangles = [];\n\nfunction _calcInsectedPoints (left, right, bottom, top, center, angle, intersectPoints) {\n //left bottom, right, top\n let sinAngle = Math.sin(angle);\n let cosAngle = Math.cos(angle);\n let tanAngle, cotAngle;\n if (Math.cos(angle) !== 0) {\n tanAngle = sinAngle / cosAngle;\n //calculate right and left\n if ((left - center.x) * cosAngle > 0) {\n let yleft = center.y + tanAngle * (left - center.x);\n intersectPoints[0].x = left;\n intersectPoints[0].y = yleft;\n }\n if ((right - center.x) * cosAngle > 0) {\n let yright = center.y + tanAngle * (right - center.x);\n\n intersectPoints[2].x = right;\n intersectPoints[2].y = yright;\n }\n\n }\n\n if (Math.sin(angle) !== 0) {\n cotAngle = cosAngle / sinAngle;\n //calculate top and bottom\n if ((top - center.y) * sinAngle > 0) {\n let xtop = center.x + cotAngle * (top - center.y);\n intersectPoints[3].x = xtop;\n intersectPoints[3].y = top;\n }\n if ((bottom - center.y) * sinAngle > 0) {\n let xbottom = center.x + cotAngle * (bottom - center.y);\n intersectPoints[1].x = xbottom;\n intersectPoints[1].y = bottom;\n }\n\n }\n}\n\nfunction _calculateVertices (sprite) {\n let node = sprite.node,\n width = node.width, height = node.height,\n appx = node.anchorX * width, appy = node.anchorY * height;\n\n let l = -appx, b = -appy,\n r = width - appx, t = height - appy;\n\n let vertices = _vertices;\n vertices[0] = l;\n vertices[1] = b;\n vertices[2] = r;\n vertices[3] = t;\n\n let fillCenter = sprite._fillCenter,\n cx = _center.x = Math.min(Math.max(0, fillCenter.x), 1) * (r - l) + l,\n cy = _center.y = Math.min(Math.max(0, fillCenter.y), 1) * (t - b) + b;\n\n _vertPos[0].x = _vertPos[3].x = l;\n _vertPos[1].x = _vertPos[2].x = r;\n _vertPos[0].y = _vertPos[1].y = b;\n _vertPos[2].y = _vertPos[3].y = t;\n\n _triangles.length = 0;\n if (cx !== vertices[0]) {\n _triangles[0] = [3, 0];\n }\n if (cx !== vertices[2]) {\n _triangles[2] = [1, 2];\n }\n if (cy !== vertices[1]) {\n _triangles[1] = [0, 1];\n }\n if (cy !== vertices[3]) {\n _triangles[3] = [2, 3];\n }\n}\n\nfunction _calculateUVs (spriteFrame) {\n let atlasWidth = spriteFrame._texture.width;\n let atlasHeight = spriteFrame._texture.height;\n let textureRect = spriteFrame._rect;\n\n let u0, u1, v0, v1;\n let uvs = _uvs;\n\n if (spriteFrame._rotated) {\n u0 = (textureRect.x) / atlasWidth;\n u1 = (textureRect.x + textureRect.height) / atlasWidth;\n\n v0 = (textureRect.y) / atlasHeight;\n v1 = (textureRect.y + textureRect.width) / atlasHeight;\n\n uvs[0] = uvs[2] = u0;\n uvs[4] = uvs[6] = u1;\n uvs[3] = uvs[7] = v1;\n uvs[1] = uvs[5] = v0;\n }\n else {\n u0 = (textureRect.x) / atlasWidth;\n u1 = (textureRect.x + textureRect.width) / atlasWidth;\n\n v0 = (textureRect.y) / atlasHeight;\n v1 = (textureRect.y + textureRect.height) / atlasHeight;\n\n uvs[0] = uvs[4] = u0;\n uvs[2] = uvs[6] = u1;\n uvs[1] = uvs[3] = v1;\n uvs[5] = uvs[7] = v0;\n }\n}\n\nfunction _getVertAngle (start, end) {\n let placementX, placementY;\n placementX = end.x - start.x;\n placementY = end.y - start.y;\n\n if (placementX === 0 && placementY === 0) {\n return undefined;\n } else if (placementX === 0) {\n if (placementY > 0) {\n return Math.PI * 0.5;\n } else {\n return Math.PI * 1.5;\n }\n } else {\n let angle = Math.atan(placementY / placementX);\n if (placementX < 0) {\n angle += Math.PI;\n }\n\n return angle;\n }\n}\n\nexport default class RadialFilledAssembler extends Assembler2D {\n initData (sprite) {\n this._renderData.createFlexData(0, 4, 6, this.getVfmt());\n this.updateIndices();\n }\n\n updateRenderData (sprite) {\n super.updateRenderData(sprite);\n\n let frame = sprite.spriteFrame;\n const assemblerChanged = this.packDynamicAtlasAndCheckMaterial(sprite, frame);\n\n // 打包到动态图集时可能会切换 Assembler\n if (!assemblerChanged) {\n this._aftUpdateRenderData(sprite);\n }\n\n return assemblerChanged;\n }\n\n _aftUpdateRenderData(sprite) {\n let frame = sprite.spriteFrame;\n\n if (sprite._vertsDirty) {\n let fillStart = sprite._fillStart;\n let fillRange = sprite._fillRange;\n if (fillRange < 0) {\n fillStart += fillRange;\n fillRange = -fillRange;\n }\n\n //do round fill start [0,1), include 0, exclude 1\n while (fillStart >= 1.0) fillStart -= 1.0;\n while (fillStart < 0.0) fillStart += 1.0;\n\n fillStart *= PI_2;\n fillRange *= PI_2;\n\n //build vertices\n _calculateVertices(sprite);\n //build uvs\n _calculateUVs(frame);\n\n _calcInsectedPoints(_vertices[0], _vertices[2], _vertices[1], _vertices[3], _center, fillStart, _intersectPoint_1);\n _calcInsectedPoints(_vertices[0], _vertices[2], _vertices[1], _vertices[3], _center, fillStart + fillRange, _intersectPoint_2);\n\n this.updateVerts(sprite, fillStart, fillRange);\n\n sprite._vertsDirty = false;\n }\n }\n\n updateVerts (sprite, fillStart, fillRange) {\n let fillEnd = fillStart + fillRange;\n \n let local = this._local;\n local.length = 0;\n\n let offset = 0;\n let floatsPerTriangle = 3 * this.floatsPerVert;\n for (let triangleIndex = 0; triangleIndex < 4; ++triangleIndex) {\n let triangle = _triangles[triangleIndex];\n if (!triangle) {\n continue;\n }\n //all in\n if (fillRange >= PI_2) {\n local.length = offset + floatsPerTriangle;\n this._generateTriangle(local, offset, _center, _vertPos[triangle[0]], _vertPos[triangle[1]]);\n offset += floatsPerTriangle;\n continue;\n }\n //test against\n let startAngle = _getVertAngle(_center, _vertPos[triangle[0]]);\n let endAngle = _getVertAngle(_center, _vertPos[triangle[1]]);\n if (endAngle < startAngle) endAngle += PI_2;\n startAngle -= PI_2;\n endAngle -= PI_2;\n //testing\n for (let testIndex = 0; testIndex < 3; ++testIndex) {\n if (startAngle >= fillEnd) {\n //all out\n } else if (startAngle >= fillStart) {\n local.length = offset + floatsPerTriangle;\n if (endAngle >= fillEnd) {\n //startAngle to fillEnd\n this._generateTriangle(local, offset, _center, _vertPos[triangle[0]], _intersectPoint_2[triangleIndex]);\n } else {\n //startAngle to endAngle\n this._generateTriangle(local, offset, _center, _vertPos[triangle[0]], _vertPos[triangle[1]]);\n }\n offset += floatsPerTriangle;\n } else {\n //startAngle < fillStart\n if (endAngle <= fillStart) {\n //all out\n } else if (endAngle <= fillEnd) {\n local.length = offset + floatsPerTriangle;\n //fillStart to endAngle\n this._generateTriangle(local, offset, _center, _intersectPoint_1[triangleIndex], _vertPos[triangle[1]]);\n offset += floatsPerTriangle;\n } else {\n local.length = offset + floatsPerTriangle;\n //fillStart to fillEnd\n this._generateTriangle(local, offset, _center, _intersectPoint_1[triangleIndex], _intersectPoint_2[triangleIndex]);\n offset += floatsPerTriangle;\n }\n }\n //add 2 * PI\n startAngle += PI_2;\n endAngle += PI_2;\n }\n }\n\n this.allocWorldVerts(sprite);\n this.updateWorldVerts(sprite);\n }\n\n allocWorldVerts(sprite) {\n let color = sprite.node._color._val;\n let renderData = this._renderData;\n let floatsPerVert = this.floatsPerVert;\n\n let local = this._local;\n let verticesCount = local.length / floatsPerVert;\n this.verticesCount = this.indicesCount = verticesCount;\n\n let flexBuffer = renderData._flexBuffer;\n if (flexBuffer.reserve(verticesCount, verticesCount)) {\n this.updateIndices();\n }\n flexBuffer.used(this.verticesCount, this.indicesCount);\n\n let verts = renderData.vDatas[0],\n uintVerts = renderData.uintVDatas[0];\n \n let uvOffset = this.uvOffset;\n for (let offset = 0; offset < local.length; offset += floatsPerVert) {\n let start = offset + uvOffset;\n verts[start] = local[start];\n verts[start + 1] = local[start + 1];\n uintVerts[start + 2] = color;\n }\n }\n\n updateIndices () {\n let iData = this._renderData.iDatas[0];\n for (let i = 0; i < iData.length; i ++) {\n iData[i] = i;\n }\n }\n\n updateWorldVerts (sprite) {\n let node = sprite.node;\n\n let matrix = node._worldMatrix;\n let matrixm = matrix.m,\n a = matrixm[0], b = matrixm[1], c = matrixm[4], d = matrixm[5],\n tx = matrixm[12], ty = matrixm[13];\n\n let local = this._local;\n let world = this._renderData.vDatas[0];\n let floatsPerVert = this.floatsPerVert;\n for (let offset = 0; offset < local.length; offset += floatsPerVert) {\n let x = local[offset];\n let y = local[offset + 1];\n world[offset] = x * a + y * c + tx;\n world[offset+1] = x * b + y * d + ty;\n }\n }\n\n _generateTriangle (verts, offset, vert0, vert1, vert2) {\n let vertices = _vertices;\n let v0x = vertices[0];\n let v0y = vertices[1];\n let v1x = vertices[2];\n let v1y = vertices[3];\n\n let floatsPerVert = this.floatsPerVert;\n verts[offset] = vert0.x;\n verts[offset + 1] = vert0.y;\n verts[offset + floatsPerVert] = vert1.x;\n verts[offset + floatsPerVert + 1] = vert1.y;\n verts[offset + floatsPerVert*2] = vert2.x;\n verts[offset + floatsPerVert*2 + 1] = vert2.y;\n\n let uvOffset = this.uvOffset;\n let progressX, progressY;\n progressX = (vert0.x - v0x) / (v1x - v0x);\n progressY = (vert0.y - v0y) / (v1y - v0y);\n this._generateUV(progressX, progressY, verts, offset + uvOffset);\n\n progressX = (vert1.x - v0x) / (v1x - v0x);\n progressY = (vert1.y - v0y) / (v1y - v0y);\n this._generateUV(progressX, progressY, verts, offset + floatsPerVert + uvOffset);\n\n progressX = (vert2.x - v0x) / (v1x - v0x);\n progressY = (vert2.y - v0y) / (v1y - v0y);\n this._generateUV(progressX, progressY, verts, offset + floatsPerVert*2 + uvOffset);\n }\n\n _generateUV (progressX, progressY, verts, offset) {\n let uvs = _uvs;\n let px1 = uvs[0] + (uvs[2] - uvs[0]) * progressX;\n let px2 = uvs[4] + (uvs[6] - uvs[4]) * progressX;\n let py1 = uvs[1] + (uvs[3] - uvs[1]) * progressX;\n let py2 = uvs[5] + (uvs[7] - uvs[5]) * progressX;\n verts[offset] = px1 + (px2 - px1) * progressY;\n verts[offset + 1] = py1 + (py2 - py1) * progressY;\n }\n}\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport Assembler2D from '../../../../assembler-2d';\n\nexport default class SimpleSpriteAssembler extends Assembler2D {\n updateRenderData (sprite) {\n const assemblerChanged = this.packDynamicAtlasAndCheckMaterial(sprite, sprite._spriteFrame);\n\n // 打包到动态图集时可能会切换 Assembler\n if (!assemblerChanged) {\n if (sprite._vertsDirty) {\n this.updateUVs(sprite);\n this.updateVerts(sprite);\n sprite._vertsDirty = false;\n }\n }\n\n return assemblerChanged;\n }\n\n updateUVs (sprite) {\n let uv = sprite._spriteFrame.uv;\n let uvOffset = this.uvOffset;\n let floatsPerVert = this.floatsPerVert;\n let verts = this._renderData.vDatas[0];\n for (let i = 0; i < 4; i++) {\n let srcOffset = i * 2;\n let dstOffset = floatsPerVert * i + uvOffset;\n verts[dstOffset] = uv[srcOffset];\n verts[dstOffset + 1] = uv[srcOffset + 1];\n }\n }\n\n updateVerts (sprite) {\n let node = sprite.node,\n cw = node.width, ch = node.height,\n appx = node.anchorX * cw, appy = node.anchorY * ch,\n l, b, r, t;\n if (sprite.trim) {\n l = -appx;\n b = -appy;\n r = cw - appx;\n t = ch - appy;\n }\n else {\n let frame = sprite.spriteFrame,\n ow = frame._originalSize.width, oh = frame._originalSize.height,\n rw = frame._rect.width, rh = frame._rect.height,\n offset = frame._offset,\n scaleX = cw / ow, scaleY = ch / oh;\n let trimLeft = offset.x + (ow - rw) / 2;\n let trimRight = offset.x - (ow - rw) / 2;\n let trimBottom = offset.y + (oh - rh) / 2;\n let trimTop = offset.y - (oh - rh) / 2;\n l = trimLeft * scaleX - appx;\n b = trimBottom * scaleY - appy;\n r = cw + trimRight * scaleX - appx;\n t = ch + trimTop * scaleY - appy;\n }\n\n let local = this._local;\n local[0] = l;\n local[1] = b;\n local[2] = r;\n local[3] = t;\n this.updateWorldVerts(sprite);\n }\n}\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos.com\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport Assembler2D from '../../../../assembler-2d';\n\nexport default class SlicedAssembler extends Assembler2D {\n initData (sprite) {\n if (this._renderData.meshCount > 0) return;\n this._renderData.createData(0, this.verticesFloats, this.indicesCount);\n\n let indices = this._renderData.iDatas[0];\n let indexOffset = 0;\n for (let r = 0; r < 3; ++r) {\n for (let c = 0; c < 3; ++c) {\n let start = r * 4 + c;\n indices[indexOffset++] = start;\n indices[indexOffset++] = start + 1;\n indices[indexOffset++] = start + 4;\n indices[indexOffset++] = start + 1;\n indices[indexOffset++] = start + 5;\n indices[indexOffset++] = start + 4;\n }\n }\n }\n\n initLocal () {\n this._local = [];\n this._local.length = 8;\n }\n\n updateRenderData (sprite) {\n let frame = sprite._spriteFrame;\n const assemblerChanged = this.packDynamicAtlasAndCheckMaterial(sprite, frame);\n\n // 打包到动态图集时可能会切换 Assembler\n if (!assemblerChanged) {\n if (sprite._vertsDirty) {\n this.updateUVs(sprite);\n this.updateVerts(sprite);\n sprite._vertsDirty = false;\n }\n }\n\n return assemblerChanged;\n }\n\n updateVerts (sprite) {\n let node = sprite.node,\n width = node.width, height = node.height,\n appx = node.anchorX * width, appy = node.anchorY * height;\n\n let frame = sprite.spriteFrame;\n let leftWidth = frame.insetLeft;\n let rightWidth = frame.insetRight;\n let topHeight = frame.insetTop;\n let bottomHeight = frame.insetBottom;\n\n let sizableWidth = width - leftWidth - rightWidth;\n let sizableHeight = height - topHeight - bottomHeight;\n let xScale = width / (leftWidth + rightWidth);\n let yScale = height / (topHeight + bottomHeight);\n xScale = (isNaN(xScale) || xScale > 1) ? 1 : xScale;\n yScale = (isNaN(yScale) || yScale > 1) ? 1 : yScale;\n sizableWidth = sizableWidth < 0 ? 0 : sizableWidth;\n sizableHeight = sizableHeight < 0 ? 0 : sizableHeight;\n\n // update local\n let local = this._local;\n local[0] = -appx;\n local[1] = -appy;\n local[2] = leftWidth * xScale - appx;\n local[3] = bottomHeight * yScale - appy;\n local[4] = local[2] + sizableWidth;\n local[5] = local[3] + sizableHeight;\n local[6] = width - appx;\n local[7] = height - appy;\n\n this.updateWorldVerts(sprite);\n }\n\n updateUVs (sprite) {\n let verts = this._renderData.vDatas[0];\n let uvSliced = sprite.spriteFrame.uvSliced;\n let uvOffset = this.uvOffset;\n let floatsPerVert = this.floatsPerVert;\n for (let row = 0; row < 4; ++row) {\n for (let col = 0; col < 4; ++col) {\n let vid = row * 4 + col;\n let uv = uvSliced[vid];\n let voffset = vid * floatsPerVert;\n verts[voffset + uvOffset] = uv.u;\n verts[voffset + uvOffset + 1] = uv.v;\n }\n }\n }\n\n updateWorldVerts (sprite) {\n let matrix = sprite.node._worldMatrix;\n let matrixm = matrix.m,\n a = matrixm[0], b = matrixm[1], c = matrixm[4], d = matrixm[5],\n tx = matrixm[12], ty = matrixm[13];\n\n let local = this._local;\n let world = this._renderData.vDatas[0];\n\n let floatsPerVert = this.floatsPerVert;\n for (let row = 0; row < 4; ++row) {\n let localRowY = local[row * 2 + 1];\n for (let col = 0; col < 4; ++col) {\n let localColX = local[col * 2];\n let worldIndex = (row * 4 + col) * floatsPerVert;\n world[worldIndex] = localColX * a + localRowY * c + tx;\n world[worldIndex + 1] = localColX * b + localRowY * d + ty;\n }\n }\n }\n}\n\nObject.assign(SlicedAssembler.prototype, {\n verticesCount: 16,\n indicesCount: 54\n});\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport Assembler2D from '../../../../assembler-2d';\n\nexport default class TiledAssembler extends Assembler2D {\n initData (sprite) {\n this.verticesCount = 0;\n this.contentWidth = 0;\n this.contentHeight = 0;\n this.rectWidth = 0;\n this.rectHeight = 0;\n this.hRepeat = 0;\n this.vRepeat = 0;\n this.row = 0;\n this.col = 0;\n\n this._renderData.createFlexData(0, 4, 6, this.getVfmt());\n this._updateIndices();\n }\n\n initLocal () {\n this._local = { x: [], y: []};\n }\n\n _updateIndices () {\n let iData = this._renderData.iDatas[0];\n for (let i = 0, vid = 0, l = iData.length; i < l; i += 6, vid += 4) {\n iData[i] = vid;\n iData[i + 1] = vid + 1;\n iData[i + 2] = vid + 2;\n iData[i + 3] = vid + 1;\n iData[i + 4] = vid + 3;\n iData[i + 5] = vid + 2;\n }\n }\n\n updateRenderData (sprite) {\n let frame = sprite._spriteFrame;\n const assemblerChanged = this.packDynamicAtlasAndCheckMaterial(sprite, frame);\n\n // 打包到动态图集时可能会切换 Assembler\n if (!assemblerChanged) {\n let node = sprite.node;\n\n let contentWidth = this.contentWidth = Math.abs(node.width);\n let contentHeight = this.contentHeight = Math.abs(node.height);\n let rect = frame._rect;\n let leftWidth = frame.insetLeft, rightWidth = frame.insetRight, centerWidth = rect.width - leftWidth - rightWidth,\n topHeight = frame.insetTop, bottomHeight = frame.insetBottom, centerHeight = rect.height - topHeight - bottomHeight;\n this.sizableWidth = contentWidth - leftWidth - rightWidth;\n this.sizableHeight = contentHeight - topHeight - bottomHeight;\n this.sizableWidth = this.sizableWidth > 0 ? this.sizableWidth : 0;\n this.sizableHeight = this.sizableHeight > 0 ? this.sizableHeight : 0;\n let hRepeat = this.hRepeat = centerWidth === 0 ? this.sizableWidth : this.sizableWidth / centerWidth;\n let vRepeat = this.vRepeat = centerHeight === 0 ? this.sizableHeight : this.sizableHeight / centerHeight;\n let row = this.row = Math.ceil(vRepeat + 2);\n let col = this.col = Math.ceil(hRepeat + 2);\n\n // update data property\n let count = row * col;\n this.verticesCount = count * 4;\n this.indicesCount = count * 6;\n\n let renderData = this._renderData;\n let flexBuffer = renderData._flexBuffer;\n if (flexBuffer.reserve(this.verticesCount, this.indicesCount)) {\n this._updateIndices();\n this.updateColor(sprite);\n }\n flexBuffer.used(this.verticesCount, this.indicesCount);\n\n if (sprite._vertsDirty) {\n this.updateUVs(sprite);\n this.updateVerts(sprite);\n sprite._vertsDirty = false;\n }\n }\n\n return assemblerChanged;\n }\n\n updateVerts (sprite) {\n let frame = sprite._spriteFrame;\n let rect = frame._rect;\n let node = sprite.node,\n appx = node.anchorX * node.width, appy = node.anchorY * node.height;\n\n let { row, col, contentWidth, contentHeight } = this;\n let { x, y } = this._local;\n x.length = y.length = 0;\n let leftWidth = frame.insetLeft, rightWidth = frame.insetRight, centerWidth = rect.width - leftWidth - rightWidth,\n topHeight = frame.insetTop, bottomHeight = frame.insetBottom, centerHeight = rect.height - topHeight - bottomHeight;\n let xScale = (node.width / (leftWidth + rightWidth)) > 1 ? 1 : (node.width / (leftWidth + rightWidth));\n let yScale = (node.height / (topHeight + bottomHeight)) > 1 ? 1 : (node.height / (topHeight + bottomHeight));\n let offsetWidth = 0, offsetHeight = 0;\n if (centerWidth > 0) {\n /*\n * Because the float numerical calculation in javascript is not accurate enough, \n * there is an expected result of 1.0, but the actual result is 1.000001.\n */\n offsetWidth = Math.floor(this.sizableWidth * 1000) / 1000 % centerWidth === 0 ? centerWidth : this.sizableWidth % centerWidth;\n }\n else {\n offsetWidth = this.sizableWidth;\n }\n if (centerHeight > 0) {\n offsetHeight = Math.floor(this.sizableHeight * 1000) / 1000 % centerHeight === 0 ? centerHeight : this.sizableHeight % centerHeight;\n }\n else {\n offsetHeight = this.sizableHeight;\n }\n\n for (let i = 0; i <= col; i++) {\n if (i === 0) {\n x[i] = - appx;\n }\n else if (i > 0 && i < col) {\n if (i === 1) {\n x[i] = leftWidth * xScale + Math.min(centerWidth, this.sizableWidth) - appx;\n }\n else {\n if (centerWidth > 0) {\n if (i === (col - 1)) {\n x[i] = leftWidth + offsetWidth + centerWidth * (i - 2) - appx;\n }\n else {\n x[i] = leftWidth + Math.min(centerWidth, this.sizableWidth) + centerWidth * (i - 2) - appx;\n }\n }\n else {\n x[i] = leftWidth + this.sizableWidth - appx;\n }\n }\n }\n else if (i === col) {\n x[i] = Math.min(leftWidth + this.sizableWidth + rightWidth, contentWidth) - appx;\n }\n }\n for (let i = 0; i <= row; i++) {\n if (i === 0) {\n y[i] = - appy;\n }\n else if (i > 0 && i < row) {\n if (i === 1) {\n y[i] = bottomHeight * yScale + Math.min(centerHeight, this.sizableHeight) - appy;\n }\n else {\n if (centerHeight > 0) {\n if (i === (row - 1)) {\n y[i] = bottomHeight + offsetHeight + (i - 2) * centerHeight - appy;\n }\n else {\n y[i] = bottomHeight + Math.min(centerHeight, this.sizableHeight) + (i - 2) * centerHeight - appy;\n }\n }\n else {\n y[i] = bottomHeight + this.sizableHeight - appy;\n }\n }\n }\n else if (i === row) {\n y[i] = Math.min(bottomHeight + this.sizableHeight + topHeight, contentHeight) - appy;\n }\n }\n\n this.updateWorldVerts(sprite);\n }\n \n updateWorldVerts (sprite) {\n let renderData = this._renderData;\n let local = this._local;\n let localX = local.x, localY = local.y;\n let world = renderData.vDatas[0];\n let { row, col } = this;\n let matrix = sprite.node._worldMatrix;\n let matrixm = matrix.m;\n let a = matrixm[0], b = matrixm[1], c = matrixm[4], d = matrixm[5],\n tx = matrixm[12], ty = matrixm[13];\n\n let x, x1, y, y1;\n let floatsPerVert = this.floatsPerVert;\n let vertexOffset = 0;\n for (let yindex = 0, ylength = row; yindex < ylength; ++yindex) {\n y = localY[yindex];\n y1 = localY[yindex + 1];\n for (let xindex = 0, xlength = col; xindex < xlength; ++xindex) {\n x = localX[xindex];\n x1 = localX[xindex + 1];\n\n // lb\n world[vertexOffset] = x * a + y * c + tx;\n world[vertexOffset + 1] = x * b + y * d + ty;\n vertexOffset += floatsPerVert;\n // rb\n world[vertexOffset] = x1 * a + y * c + tx;\n world[vertexOffset + 1] = x1 * b + y * d + ty;\n vertexOffset += floatsPerVert;\n // lt\n world[vertexOffset] = x * a + y1 * c + tx;\n world[vertexOffset + 1] = x * b + y1 * d + ty;\n vertexOffset += floatsPerVert;\n // rt\n world[vertexOffset] = x1 * a + y1 * c + tx;\n world[vertexOffset + 1] = x1 * b + y1 * d + ty;\n vertexOffset += floatsPerVert;\n }\n }\n }\n\n updateUVs (sprite) {\n let verts = this._renderData.vDatas[0];\n if (!verts) return;\n \n let frame = sprite._spriteFrame;\n let rect = frame._rect;\n let leftWidth = frame.insetLeft, rightWidth = frame.insetRight, centerWidth = rect.width - leftWidth - rightWidth,\n topHeight = frame.insetTop, bottomHeight = frame.insetBottom, centerHeight = rect.height - topHeight - bottomHeight;\n\n let { row, col, hRepeat, vRepeat } = this;\n let coefu = 0, coefv = 0;\n let uv = sprite.spriteFrame.uv;\n let uvSliced = sprite.spriteFrame.uvSliced;\n let rotated = sprite.spriteFrame._rotated;\n let floatsPerVert = this.floatsPerVert, uvOffset = this.uvOffset;\n let tempXVerts = [], tempYVerts = [];\n for (let yindex = 0, ylength = row; yindex < ylength; ++yindex) {\n if (this.sizableHeight > centerHeight) {\n if (this.sizableHeight >= yindex * centerHeight) {\n coefv = 1;\n }\n else {\n coefv = vRepeat % 1;\n }\n }\n else {\n coefv = vRepeat;\n }\n for (let xindex = 0, xlength = col; xindex < xlength; ++xindex) {\n if (this.sizableWidth > centerWidth) {\n if (this.sizableWidth >= xindex * centerWidth) {\n coefu = 1;\n }\n else {\n coefu = hRepeat % 1;\n }\n }\n else {\n coefu = hRepeat;\n }\n\n if (rotated) {\n if (yindex === 0) {\n tempXVerts[0] = uvSliced[0].u;\n tempXVerts[1] = uvSliced[0].u;\n tempXVerts[2] = uvSliced[4].u + (uvSliced[8].u - uvSliced[4].u) * coefv;\n } else if (yindex < (row - 1)) {\n tempXVerts[0] = uvSliced[4].u;\n tempXVerts[1] = uvSliced[4].u;\n tempXVerts[2] = uvSliced[4].u + (uvSliced[8].u - uvSliced[4].u) * coefv;\n } else if (yindex === (row - 1)) {\n tempXVerts[0] = uvSliced[8].u;\n tempXVerts[1] = uvSliced[8].u;\n tempXVerts[2] = uvSliced[12].u;\n }\n if (xindex === 0) {\n tempYVerts[0] = uvSliced[0].v;\n tempYVerts[1] = uvSliced[1].v + (uvSliced[2].v - uvSliced[1].v) * coefu;\n tempYVerts[2] = uvSliced[0].v;\n } else if (xindex < (col - 1)) {\n tempYVerts[0] = uvSliced[1].v;\n tempYVerts[1] = uvSliced[1].v + (uvSliced[2].v - uvSliced[1].v) * coefu;\n tempYVerts[2] = uvSliced[1].v;\n } else if (xindex === (col - 1)) {\n tempYVerts[0] = uvSliced[2].v;\n tempYVerts[1] = uvSliced[3].v;\n tempYVerts[2] = uvSliced[2].v;\n }\n tempXVerts[3] = tempXVerts[2];\n tempYVerts[3] = tempYVerts[1];\n }\n else {\n if (xindex === 0) {\n tempXVerts[0] = uvSliced[0].u;\n tempXVerts[1] = uvSliced[1].u + (uvSliced[2].u - uvSliced[1].u) * coefu;\n tempXVerts[2] = uv[0];\n } else if (xindex < (col - 1)) {\n tempXVerts[0] = uvSliced[1].u;\n tempXVerts[1] = uvSliced[1].u + (uvSliced[2].u - uvSliced[1].u) * coefu;\n tempXVerts[2] = uvSliced[1].u;\n } else if (xindex === (col - 1)) {\n tempXVerts[0] = uvSliced[2].u;\n tempXVerts[1] = uvSliced[3].u;\n tempXVerts[2] = uvSliced[2].u;\n }\n if (yindex === 0) {\n tempYVerts[0] = uvSliced[0].v;\n tempYVerts[1] = uvSliced[0].v;\n tempYVerts[2] = uvSliced[4].v + (uvSliced[8].v - uvSliced[4].v) * coefv;\n } else if (yindex < (row - 1)) {\n tempYVerts[0] = uvSliced[4].v;\n tempYVerts[1] = uvSliced[4].v;\n tempYVerts[2] = uvSliced[4].v + (uvSliced[8].v - uvSliced[4].v) * coefv;\n } else if (yindex === (row - 1)) {\n tempYVerts[0] = uvSliced[8].v;\n tempYVerts[1] = uvSliced[8].v;\n tempYVerts[2] = uvSliced[12].v;\n }\n tempXVerts[3] = tempXVerts[1];\n tempYVerts[3] = tempYVerts[2];\n }\n // lb\n verts[uvOffset] = tempXVerts[0];\n verts[uvOffset + 1] = tempYVerts[0];\n uvOffset += floatsPerVert;\n // rb\n verts[uvOffset] = tempXVerts[1];\n verts[uvOffset + 1] = tempYVerts[1];\n uvOffset += floatsPerVert;\n // lt\n verts[uvOffset] = tempXVerts[2];\n verts[uvOffset + 1] = tempYVerts[2];\n uvOffset += floatsPerVert;\n // rt\n verts[uvOffset] = tempXVerts[3];\n verts[uvOffset + 1] = tempYVerts[3];\n uvOffset += floatsPerVert;\n }\n }\n }\n}\n\n","import Assembler from '../../../assembler';\nimport { Type, FillType } from '../../../../components/CCSprite';\n\nimport Simple from \"./2d/simple\";\nimport Sliced from \"./2d/sliced\";\nimport Tiled from \"./2d/tiled\";\nimport RadialFilled from \"./2d/radial-filled\";\nimport BarFilled from \"./2d/bar-filled\";\nimport Mesh from './2d/mesh';\n\nimport Simple3D from \"./3d/simple\";\nimport Sliced3D from \"./3d/sliced\";\nimport Tiled3D from \"./3d/tiled\";\nimport RadialFilled3D from \"./3d/radial-filled\";\nimport BarFilled3D from \"./3d/bar-filled\";\nimport Mesh3D from './3d/mesh';\n\nimport SimpleMulti from \"./2d-multi/simple\";\nimport SlicedMulti from \"./2d-multi/sliced\";\nimport TiledMulti from \"./2d-multi/tiled\";\nimport RadialFilledMulti from \"./2d-multi/radial-filled\";\nimport BarFilledMulti from \"./2d-multi/bar-filled\";\nimport MeshMulti from \"./2d-multi/mesh\";\n\nlet ctor = {\n getConstructor(sprite) {\n let is3DNode = sprite.node.is3DNode;\n const material = sprite.getMaterials()[0];\n let isMultiMaterial = material && material.material.isMultiSupport();\n\n let ctor = is3DNode ? Simple3D : (isMultiMaterial ? SimpleMulti : Simple);\n switch (sprite.type) {\n case Type.SLICED:\n ctor = is3DNode ? Sliced3D : (isMultiMaterial ? SlicedMulti : Sliced);\n break;\n case Type.TILED:\n ctor = is3DNode ? Tiled3D : (isMultiMaterial ? TiledMulti : Tiled);\n break;\n case Type.FILLED:\n if (sprite._fillType === FillType.RADIAL) {\n ctor = is3DNode ? RadialFilled3D : (isMultiMaterial ? RadialFilledMulti : RadialFilled);\n } else {\n ctor = is3DNode ? BarFilled3D : (isMultiMaterial ? BarFilledMulti : BarFilled);\n }\n break;\n case Type.MESH:\n ctor = is3DNode ? Mesh3D : (isMultiMaterial ? MeshMulti : Mesh);\n break;\n }\n\n return ctor;\n },\n\n Simple,\n Sliced,\n Tiled,\n RadialFilled,\n BarFilled,\n Mesh,\n\n Simple3D,\n Sliced3D,\n Tiled3D,\n RadialFilled3D,\n BarFilled3D,\n Mesh3D,\n\n SimpleMulti,\n SlicedMulti,\n TiledMulti,\n RadialFilledMulti,\n BarFilledMulti,\n MeshMulti,\n};\n\nAssembler.register(cc.Sprite, ctor);\n","/****************************************************************************\n LICENSING AGREEMENT\n \n Xiamen Yaji Software Co., Ltd., (the “Licensor”) grants the user (the “Licensee”) non-exclusive and non-transferable rights to use the software according to the following conditions:\n a. The Licensee shall pay royalties to the Licensor, and the amount of those royalties and the payment method are subject to separate negotiations between the parties.\n b. The software is licensed for use rather than sold, and the Licensor reserves all rights over the software that are not expressly granted (whether by implication, reservation or prohibition).\n c. The open source codes contained in the software are subject to the MIT Open Source Licensing Agreement (see the attached for the details);\n d. The Licensee acknowledges and consents to the possibility that errors may occur during the operation of the software for one or more technical reasons, and the Licensee shall take precautions and prepare remedies for such events. In such circumstance, the Licensor shall provide software patches or updates according to the agreement between the two parties. The Licensor will not assume any liability beyond the explicit wording of this Licensing Agreement.\n e. Where the Licensor must assume liability for the software according to relevant laws, the Licensors entire liability is limited to the annual royalty payable by the Licensee.\n f. The Licensor owns the portions listed in the root directory and subdirectory (if any) in the software and enjoys the intellectual property rights over those portions. As for the portions owned by the Licensor, the Licensee shall not:\n - i. Bypass or avoid any relevant technical protection measures in the products or services;\n - ii. Release the source codes to any other parties;\n - iii. Disassemble, decompile, decipher, attack, emulate, exploit or reverse-engineer these portion of code;\n - iv. Apply it to any third-party products or services without Licensors permission;\n - v. Publish, copy, rent, lease, sell, export, import, distribute or lend any products containing these portions of code;\n - vi. Allow others to use any services relevant to the technology of these codes;\n - vii. Conduct any other act beyond the scope of this Licensing Agreement.\n g. This Licensing Agreement terminates immediately if the Licensee breaches this Agreement. The Licensor may claim compensation from the Licensee where the Licensees breach causes any damage to the Licensor.\n h. The laws of the People's Republic of China apply to this Licensing Agreement.\n i. This Agreement is made in both Chinese and English, and the Chinese version shall prevail the event of conflict.\n ****************************************************************************/\n\nexport default class FlexBuffer {\n constructor (handler, index, verticesCount, indicesCount, vfmt) {\n this._handler = handler;\n this._index = index;\n this._vfmt = vfmt;\n this._verticesBytes = vfmt._bytes;\n\n this._initVerticesCount = verticesCount;\n this._initIndicesCount = indicesCount;\n\n this.reset();\n }\n\n _reallocVData (floatsCount, oldData) {\n this.vData = new Float32Array(floatsCount);\n this.uintVData = new Uint32Array(this.vData.buffer);\n\n if (oldData) {\n this.vData.set(oldData);\n }\n\n this._handler.updateMesh(this._index, this.vData, this.iData);\n }\n\n _reallocIData (indicesCount, oldData) {\n this.iData = new Uint16Array(indicesCount);\n \n if (oldData) {\n this.iData.set(oldData);\n }\n\n this._handler.updateMesh(this._index, this.vData, this.iData);\n }\n\n reserve (verticesCount, indicesCount) {\n let floatsCount = verticesCount * this._verticesBytes >> 2;\n let newFloatsCount = this.vData.length;\n let realloced = false;\n\n if (floatsCount > newFloatsCount) {\n while (newFloatsCount < floatsCount) {\n newFloatsCount *= 2;\n }\n this._reallocVData(newFloatsCount, this.vData);\n realloced = true;\n }\n\n let newIndicesCount = this.iData.length;\n if (indicesCount > newIndicesCount) {\n while (newIndicesCount < indicesCount) {\n newIndicesCount *= 2;\n }\n this._reallocIData(indicesCount, this.iData);\n realloced = true;\n }\n\n return realloced;\n }\n\n used (verticesCount, indicesCount) {\n this.usedVertices = verticesCount;\n this.usedIndices = indicesCount;\n this.usedVerticesFloats = verticesCount * this._verticesBytes >> 2;\n\n this._handler.updateMeshRange(verticesCount, indicesCount);\n }\n\n reset () {\n let floatsCount = this._initVerticesCount * this._verticesBytes >> 2;\n this._reallocVData(floatsCount);\n this._reallocIData(this._initIndicesCount);\n\n this.usedVertices = 0;\n this.usedVerticesFloats = 0;\n this.usedIndices = 0;\n }\n} \n\ncc.FlexBuffer = FlexBuffer\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport gfx from '../../../renderer/gfx';\n\nlet FIX_IOS14_BUFFER;\nif (cc.sys.platform === cc.sys.WECHAT_GAME) {\n FIX_IOS14_BUFFER = (cc.sys.os === cc.sys.OS_IOS || cc.sys.os === cc.sys.OS_OSX) && GameGlobal?.isIOSHighPerformanceMode && /(OS 1[4-9])|(Version\\/1[4-9])/.test(window.navigator.userAgent);\n} else {\n FIX_IOS14_BUFFER = (cc.sys.os === cc.sys.OS_IOS || cc.sys.os === cc.sys.OS_OSX) && cc.sys.isBrowser && /(OS 1[4-9])|(Version\\/1[4-9])/.test(window.navigator.userAgent);\n}\nlet MeshBuffer = cc.Class({\n name: 'cc.MeshBuffer',\n ctor (batcher, vertexFormat) {\n this.init (batcher, vertexFormat);\n },\n\n init (batcher, vertexFormat) {\n this.byteOffset = 0;\n this.indiceOffset = 0;\n this.vertexOffset = 0;\n this.indiceStart = 0;\n\n this._dirty = false;\n\n this._vertexFormat = vertexFormat;\n this._vertexBytes = this._vertexFormat._bytes;\n\n this._arrOffset = 0;\n this._vbArr = [];\n this._vb = new gfx.VertexBuffer(\n batcher._device,\n vertexFormat,\n gfx.USAGE_DYNAMIC,\n new ArrayBuffer(),\n 0\n );\n this._vbArr[0] = this._vb;\n\n this._ibArr = [];\n this._ib = new gfx.IndexBuffer(\n batcher._device,\n gfx.INDEX_FMT_UINT16,\n gfx.USAGE_STATIC,\n new ArrayBuffer(),\n 0\n );\n this._ibArr[0] = this._ib;\n\n this._vData = null;\n this._uintVData = null;\n this._iData = null;\n\n this._batcher = batcher;\n\n this._initVDataCount = 256 * vertexFormat._bytes;// actually 256 * 4 * (vertexFormat._bytes / 4)\n this._initIDataCount = 256 * 6;\n \n this._offsetInfo = {\n byteOffset : 0,\n vertexOffset : 0,\n indiceOffset : 0\n }\n this._reallocBuffer();\n },\n\n uploadData () {\n if (this.byteOffset === 0 || !this._dirty) {\n return;\n }\n\n // update vertext data\n let vertexsData = new Float32Array(this._vData.buffer, 0, this.byteOffset >> 2);\n let indicesData = new Uint16Array(this._iData.buffer, 0, this.indiceOffset);\n\n let vb = this._vb;\n vb.update(0, vertexsData);\n\n let ib = this._ib;\n ib.update(0, indicesData);\n\n this._dirty = false;\n },\n\n switchBuffer () {\n let offset = ++this._arrOffset;\n\n this.byteOffset = 0;\n this.vertexOffset = 0;\n this.indiceOffset = 0;\n this.indiceStart = 0;\n\n if (offset < this._vbArr.length) {\n this._vb = this._vbArr[offset];\n this._ib = this._ibArr[offset];\n } else {\n\n this._vb = new gfx.VertexBuffer(\n this._batcher._device,\n this._vertexFormat,\n gfx.USAGE_DYNAMIC,\n new ArrayBuffer(),\n 0\n );\n this._vbArr[offset] = this._vb;\n\n this._ib = new gfx.IndexBuffer(\n this._batcher._device,\n gfx.INDEX_FMT_UINT16,\n gfx.USAGE_STATIC,\n new ArrayBuffer(),\n 0\n );\n this._ibArr[offset] = this._ib;\n }\n },\n\n checkAndSwitchBuffer (vertexCount) {\n if (this.vertexOffset + vertexCount > 65535) {\n this.uploadData();\n this._batcher._flush();\n this.switchBuffer();\n }\n },\n\n requestStatic (vertexCount, indiceCount) {\n\n this.checkAndSwitchBuffer(vertexCount);\n\n let byteOffset = this.byteOffset + vertexCount * this._vertexBytes;\n let indiceOffset = this.indiceOffset + indiceCount;\n\n let byteLength = this._vData.byteLength;\n let indiceLength = this._iData.length;\n if (byteOffset > byteLength || indiceOffset > indiceLength) {\n while (byteLength < byteOffset || indiceLength < indiceOffset) {\n this._initVDataCount *= 2;\n this._initIDataCount *= 2;\n\n byteLength = this._initVDataCount * 4;\n indiceLength = this._initIDataCount;\n }\n\n this._reallocBuffer();\n }\n this._updateOffset(vertexCount, indiceCount, byteOffset);\n },\n\n _updateOffset (vertexCount, indiceCount, byteOffset) {\n let offsetInfo = this._offsetInfo;\n offsetInfo.vertexOffset = this.vertexOffset;\n this.vertexOffset += vertexCount;\n\n offsetInfo.indiceOffset = this.indiceOffset;\n this.indiceOffset += indiceCount;\n\n offsetInfo.byteOffset = this.byteOffset;\n this.byteOffset = byteOffset;\n\n this._dirty = true;\n },\n\n request (vertexCount, indiceCount) {\n if (this._batcher._buffer !== this) {\n this._batcher._flush();\n this._batcher._buffer = this;\n }\n\n this.requestStatic(vertexCount, indiceCount);\n return this._offsetInfo;\n },\n\n requestForSpine(vertexCount, indiceCount) {\n if (this._batcher._buffer !== this) {\n this._batcher._flush();\n this._batcher._buffer = this;\n }\n\n this.requestStaticForSpine(vertexCount, indiceCount);\n return this._offsetInfo;\n },\n\n requestStaticForSpine(vertexCount, indiceCount) {\n\n this.checkAndSwitchBuffer(vertexCount);\n\n let byteOffset = this.byteOffset + vertexCount * this._vertexBytes;\n let indiceOffset = this.indiceOffset + indiceCount;\n\n let byteLength = this._vData.byteLength;\n let indiceLength = this._iData.length;\n if (byteOffset > byteLength || indiceOffset > indiceLength) {\n while (byteLength < byteOffset || indiceLength < indiceOffset) {\n this._initVDataCount *= 2;\n this._initIDataCount *= 2;\n\n byteLength = this._initVDataCount * 4;\n indiceLength = this._initIDataCount;\n }\n\n this._reallocBuffer();\n }\n\n let offsetInfo = this._offsetInfo;\n offsetInfo.vertexOffset = this.vertexOffset;\n offsetInfo.indiceOffset = this.indiceOffset;\n offsetInfo.byteOffset = this.byteOffset;\n },\n\n adjustForSpine(vertexCount, indiceCount) {\n this.vertexOffset += vertexCount;\n this.indiceOffset += indiceCount;\n\n this.byteOffset = this.byteOffset + vertexCount * this._vertexBytes;\n\n this._dirty = true;\n },\n \n _reallocBuffer () {\n this._reallocVData(true);\n this._reallocIData(true);\n },\n\n _reallocVData (copyOldData) {\n let oldVData;\n if (this._vData) {\n oldVData = new Uint8Array(this._vData.buffer);\n }\n\n this._vData = new Float32Array(this._initVDataCount);\n this._uintVData = new Uint32Array(this._vData.buffer);\n\n let newData = new Uint8Array(this._uintVData.buffer);\n\n if (oldVData && copyOldData) {\n for (let i = 0, l = oldVData.length; i < l; i++) {\n newData[i] = oldVData[i];\n }\n }\n },\n\n _reallocIData (copyOldData) {\n let oldIData = this._iData;\n\n this._iData = new Uint16Array(this._initIDataCount);\n\n if (oldIData && copyOldData) {\n let iData = this._iData;\n for (let i = 0, l = oldIData.length; i < l; i++) {\n iData[i] = oldIData[i];\n }\n }\n },\n\n reset () {\n this._arrOffset = 0;\n this._vb = this._vbArr[0];\n this._ib = this._ibArr[0];\n\n this.byteOffset = 0;\n this.indiceOffset = 0;\n this.vertexOffset = 0;\n this.indiceStart = 0;\n\n this._dirty = false;\n },\n\n destroy () {\n this.reset();\n for (let i = 0; i < this._vbArr.length; i++) {\n let vb = this._vbArr[i];\n vb.destroy();\n }\n this._vbArr = null;\n\n for (let i = 0; i < this._ibArr.length; i++) {\n let ib = this._ibArr[i];\n ib.destroy();\n }\n this._ibArr = null;\n\n this._ib = null;\n this._vb = null;\n },\n\n forwardIndiceStartToOffset () {\n this.indiceStart = this.indiceOffset;\n }\n});\n\n// Should not share vb and id between multiple drawcalls on iOS14, it will cost a lot of time.\n// TODO: maybe remove it after iOS14 fix it?\nif (FIX_IOS14_BUFFER) {\n MeshBuffer.prototype.checkAndSwitchBuffer = function (vertexCount) {\n if (this.vertexOffset + vertexCount > 65535) {\n this.uploadData();\n this._batcher._flush();\n }\n }; \n MeshBuffer.prototype.forwardIndiceStartToOffset = function () {\n this.uploadData();\n this.switchBuffer();\n } \n}\n\ncc.MeshBuffer = module.exports = MeshBuffer;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst { vfmtPosUvColor, vfmt3D } = require('./vertex-format');\nconst QuadBuffer = require('./quad-buffer');\nconst MeshBuffer = require('./mesh-buffer');\nconst SpineBuffer = require('./spine-buffer');\nconst Material = require('../../assets/material/CCMaterial');\n\nlet idGenerater = new (require('../../platform/id-generater'))('VertextFormat');\n\nimport InputAssembler from '../../../renderer/core/input-assembler';\nimport RecyclePool from '../../../renderer/memop/recycle-pool';\nimport Model from '../../../renderer/scene/model';\n\nlet _buffers = {};\n\nconst empty_material = new Material();\nconst empty_ia = new InputAssembler();\nempty_ia._count = 0;\n\nvar ModelBatcher = function (device, renderScene) {\n this._renderScene = renderScene;\n this._device = device;\n\n this.walking = false;\n this.material = empty_material;\n this.cullingMask = 1;\n\n this._iaPool = new RecyclePool(function () {\n return new InputAssembler();\n }, 16);\n\n this._modelPool = new RecyclePool(function () {\n return new Model();\n }, 16);\n\n // buffers\n this._quadBuffer = this.getBuffer('quad', vfmtPosUvColor);\n this._meshBuffer = this.getBuffer('mesh', vfmtPosUvColor);\n this._quadBuffer3D = this.getBuffer('quad', vfmt3D);\n this._meshBuffer3D = this.getBuffer('mesh', vfmt3D);\n this._buffer = this._meshBuffer;\n\n this._batchedModels = [];\n this._dummyNode = new cc.Node();\n this._sortKey = 0;\n\n this.node = this._dummyNode;\n \n this.parentOpacity = 1;\n this.parentOpacityDirty = 0;\n this.worldMatDirty = 0;\n};\n\nModelBatcher.prototype = {\n constructor: ModelBatcher,\n \n reset() {\n // Reset pools\n this._iaPool.reset();\n\n // Reset scene\n let scene = this._renderScene;\n let models = this._batchedModels;\n for (let i = 0; i < models.length; ++i) {\n // remove from scene\n // models[i].clearInputAssemblers();\n // models[i].clearEffects();\n models[i].setInputAssembler(null);\n models[i].setEffect(null);\n scene.removeModel(models[i]);\n }\n this._modelPool.reset();\n models.length = 0;\n this._sortKey = 0;\n\n for (let key in _buffers) {\n _buffers[key].reset();\n }\n this._buffer = this._meshBuffer;\n\n // reset caches for handle render components\n this.node = this._dummyNode;\n this.material = empty_material;\n this.cullingMask = 1;\n\n this.parentOpacity = 1;\n this.parentOpacityDirty = 0;\n this.worldMatDirty = 0;\n },\n\n _flushMaterial (material) {\n if (!material) {\n return;\n }\n this.material = material;\n let effect = material.effect;\n if (!effect) return;\n \n // Generate model\n let model = this._modelPool.add();\n this._batchedModels.push(model);\n model.sortKey = this._sortKey++;\n model._cullingMask = this.cullingMask;\n model.setNode(this.node);\n model.setEffect(effect, null);\n model.setInputAssembler(empty_ia);\n \n this._renderScene.addModel(model);\n },\n\n _flush () {\n let material = this.material,\n buffer = this._buffer,\n indiceCount = buffer.indiceOffset - buffer.indiceStart;\n if (!this.walking || !material || indiceCount <= 0) {\n return;\n }\n\n let effect = material.effect;\n if (!effect) return;\n \n // Generate ia\n let ia = this._iaPool.add();\n ia._vertexBuffer = buffer._vb;\n ia._indexBuffer = buffer._ib;\n ia._start = buffer.indiceStart;\n ia._count = indiceCount;\n \n // Generate model\n let model = this._modelPool.add();\n this._batchedModels.push(model);\n model.sortKey = this._sortKey++;\n model._cullingMask = this.cullingMask;\n model.setNode(this.node);\n model.setEffect(effect);\n model.setInputAssembler(ia);\n \n this._renderScene.addModel(model);\n buffer.forwardIndiceStartToOffset();\n },\n\n _flushIA (ia) {\n if (!ia) {\n return;\n }\n\n let material = this.material;\n let effect = material.effect;\n if (!effect) return;\n \n // Generate model\n let model = this._modelPool.add();\n this._batchedModels.push(model);\n model.sortKey = this._sortKey++;\n model._cullingMask = this.cullingMask;\n model.setNode(this.node);\n model.setEffect(effect);\n model.setInputAssembler(ia);\n \n this._renderScene.addModel(model);\n },\n\n terminate () {\n if (cc.dynamicAtlasManager && cc.dynamicAtlasManager.enabled) {\n cc.dynamicAtlasManager.update();\n }\n\n // flush current rest Model\n this._flush();\n\n for (let key in _buffers) {\n _buffers[key].uploadData();\n }\n \n this.walking = false;\n },\n\n getBuffer (type, vertextFormat) {\n let key = type + vertextFormat.getHash();\n let buffer = _buffers[key];\n if (!buffer) {\n if (type === 'mesh') {\n buffer = new MeshBuffer(this, vertextFormat);\n }\n else if (type === 'quad') {\n buffer = new QuadBuffer(this, vertextFormat);\n }\n else if (type === 'spine') {\n buffer = new SpineBuffer(this, vertextFormat);\n }\n else {\n cc.error(`Not support buffer type [${type}]`);\n return null;\n }\n\n _buffers[key] = buffer;\n }\n\n return buffer;\n }\n}\n\nmodule.exports = ModelBatcher;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst MeshBuffer = require('./mesh-buffer');\n\nlet QuadBuffer = cc.Class({\n name: 'cc.QuadBuffer',\n extends: MeshBuffer,\n \n _fillQuadBuffer () {\n let count = this._initIDataCount / 6;\n let buffer = this._iData;\n for (let i = 0, idx = 0; i < count; i++) {\n let vertextID = i * 4;\n buffer[idx++] = vertextID;\n buffer[idx++] = vertextID+1;\n buffer[idx++] = vertextID+2;\n buffer[idx++] = vertextID+1;\n buffer[idx++] = vertextID+3;\n buffer[idx++] = vertextID+2;\n }\n\n let indicesData = new Uint16Array(this._iData.buffer, 0, count * 6);\n this._ib.update(0, indicesData);\n },\n\n uploadData () {\n if (this.byteOffset === 0 || !this._dirty) {\n return;\n }\n\n // update vertext data\n let vertexsData = new Float32Array(this._vData.buffer, 0, this.byteOffset >> 2);\n this._vb.update(0, vertexsData);\n\n this._dirty = false;\n },\n\n switchBuffer () {\n this._super();\n // upload index buffer data\n let indicesData = new Uint16Array(this._iData.buffer, 0, this._initIDataCount);\n this._ib.update(0, indicesData);\n },\n\n _reallocBuffer () {\n this._reallocVData(true);\n this._reallocIData();\n this._fillQuadBuffer();\n }\n});\n\ncc.QuadBuffer = module.exports = QuadBuffer;\n","import FlexBuffer from \"./flex-buffer\";\nimport { vfmtPosUvColor } from './vertex-format';\n\nexport default function RenderData () {\n this.vDatas = [];\n this.uintVDatas = [];\n this.iDatas = [];\n this.meshCount = 0;\n\n this._infos = null;\n this._flexBuffer = null;\n}\n\ncc.js.mixin(RenderData.prototype, {\n init (assembler) {\n },\n clear () {\n this.vDatas.length = 0;\n this.iDatas.length = 0;\n this.uintVDatas.length = 0;\n this.meshCount = 0;\n\n this._infos = null;\n\n if (this._flexBuffer) {\n this._flexBuffer.reset();\n }\n },\n\n updateMesh (index, vertices, indices) {\n this.vDatas[index] = vertices;\n this.uintVDatas[index] = new Uint32Array(vertices.buffer, 0, vertices.length);\n this.iDatas[index] = indices;\n \n this.meshCount = this.vDatas.length;\n },\n\n updateMeshRange (verticesCount, indicesCount) {\n },\n \n createData (index, verticesFloats, indicesCount) {\n let vertices = new Float32Array(verticesFloats);\n let indices = new Uint16Array(indicesCount);\n this.updateMesh(index, vertices, indices);\n },\n \n createQuadData (index, verticesFloats, indicesCount) {\n this.createData(index, verticesFloats, indicesCount);\n this.initQuadIndices(this.iDatas[index]);\n },\n\n createFlexData (index, verticesFloats, indicesCount, vfmt) {\n vfmt = vfmt || vfmtPosUvColor;\n this._flexBuffer = new FlexBuffer(this, index, verticesFloats, indicesCount, vfmt);\n },\n\n initQuadIndices(indices) {\n let count = indices.length / 6;\n for (let i = 0, idx = 0; i < count; i++) {\n let vertextID = i * 4;\n indices[idx++] = vertextID;\n indices[idx++] = vertextID+1;\n indices[idx++] = vertextID+2;\n indices[idx++] = vertextID+1;\n indices[idx++] = vertextID+3;\n indices[idx++] = vertextID+2;\n }\n }\n})\n\ncc.RenderData = RenderData;\n\n","var SpineBuffer = cc.Class({\n name: 'cc.SpineBuffer',\n extends: require('./mesh-buffer'),\n\n requestStatic (vertexCount, indiceCount) {\n \n this.checkAndSwitchBuffer(vertexCount);\n\n let byteOffset = this.byteOffset + vertexCount * this._vertexBytes;\n let indiceOffset = this.indiceOffset + indiceCount;\n\n let byteLength = this._vData.byteLength;\n let indiceLength = this._iData.length;\n if (byteOffset > byteLength || indiceOffset > indiceLength) {\n while (byteLength < byteOffset || indiceLength < indiceOffset) {\n this._initVDataCount *= 2;\n this._initIDataCount *= 2;\n\n byteLength = this._initVDataCount * 4;\n indiceLength = this._initIDataCount;\n }\n\n this._reallocBuffer();\n }\n\n let offsetInfo = this._offsetInfo;\n offsetInfo.vertexOffset = this.vertexOffset;\n offsetInfo.indiceOffset = this.indiceOffset;\n offsetInfo.byteOffset = this.byteOffset;\n },\n\n adjust (vertexCount, indiceCount) {\n this.vertexOffset += vertexCount;\n this.indiceOffset += indiceCount;\n \n this.byteOffset = this.byteOffset + vertexCount * this._vertexBytes;\n\n this._dirty = true;\n }\n});\n\ncc.SpineBuffer = module.exports = SpineBuffer;","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport gfx from '../../../renderer/gfx';\n\nvar vfmt3D = new gfx.VertexFormat([\n { name: gfx.ATTR_POSITION, type: gfx.ATTR_TYPE_FLOAT32, num: 3 },\n { name: gfx.ATTR_UV0, type: gfx.ATTR_TYPE_FLOAT32, num: 2 },\n { name: gfx.ATTR_COLOR, type: gfx.ATTR_TYPE_UINT8, num: 4, normalize: true },\n]);\nvfmt3D.name = 'vfmt3D';\ngfx.VertexFormat.XYZ_UV_Color = vfmt3D;\n\nvar vfmtPosUvColor = new gfx.VertexFormat([\n { name: gfx.ATTR_POSITION, type: gfx.ATTR_TYPE_FLOAT32, num: 2 },\n { name: gfx.ATTR_UV0, type: gfx.ATTR_TYPE_FLOAT32, num: 2 },\n { name: gfx.ATTR_COLOR, type: gfx.ATTR_TYPE_UINT8, num: 4, normalize: true },\n]);\nvfmtPosUvColor.name = 'vfmtPosUvColor';\ngfx.VertexFormat.XY_UV_Color = vfmtPosUvColor;\n\nvar vfmtPosUvColorTexId = new gfx.VertexFormat([\n { name: gfx.ATTR_POSITION, type: gfx.ATTR_TYPE_FLOAT32, num: 2 },\n { name: gfx.ATTR_UV0, type: gfx.ATTR_TYPE_FLOAT32, num: 2 },\n { name: gfx.ATTR_COLOR, type: gfx.ATTR_TYPE_UINT8, num: 4, normalize: true },\n { name: gfx.ATTR_TEX_ID, type: gfx.ATTR_TYPE_FLOAT32, num: 1 },\n]);\nvfmtPosUvColorTexId.name = 'vfmtPosUvColorTexId';\ngfx.VertexFormat.XY_UV_Color_TexId = vfmtPosUvColorTexId;\n\nvar vfmtPosUvTwoColor = new gfx.VertexFormat([\n { name: gfx.ATTR_POSITION, type: gfx.ATTR_TYPE_FLOAT32, num: 2 },\n { name: gfx.ATTR_UV0, type: gfx.ATTR_TYPE_FLOAT32, num: 2 },\n { name: gfx.ATTR_COLOR, type: gfx.ATTR_TYPE_UINT8, num: 4, normalize: true },\n { name: gfx.ATTR_COLOR0, type: gfx.ATTR_TYPE_UINT8, num: 4, normalize: true },\n]);\nvfmtPosUvTwoColor.name = 'vfmtPosUvTwoColor';\ngfx.VertexFormat.XY_UV_Two_Color = vfmtPosUvTwoColor;\n\nvar vfmtPosUvTwoColorTexId = new gfx.VertexFormat([\n { name: gfx.ATTR_POSITION, type: gfx.ATTR_TYPE_FLOAT32, num: 2 },\n { name: gfx.ATTR_UV0, type: gfx.ATTR_TYPE_FLOAT32, num: 2 },\n { name: gfx.ATTR_COLOR, type: gfx.ATTR_TYPE_UINT8, num: 4, normalize: true },\n { name: gfx.ATTR_COLOR0, type: gfx.ATTR_TYPE_UINT8, num: 4, normalize: true },\n { name: gfx.ATTR_TEX_ID, type: gfx.ATTR_TYPE_FLOAT32, num: 1 },\n]);\nvfmtPosUvTwoColorTexId.name = 'vfmtPosUvTwoColorTexId';\ngfx.VertexFormat.XY_UV_Two_Color_TexId = vfmtPosUvTwoColorTexId;\n\nvar vfmtPosUv = new gfx.VertexFormat([\n { name: gfx.ATTR_POSITION, type: gfx.ATTR_TYPE_FLOAT32, num: 2 },\n { name: gfx.ATTR_UV0, type: gfx.ATTR_TYPE_FLOAT32, num: 2 }\n]);\nvfmtPosUv.name = 'vfmtPosUv';\ngfx.VertexFormat.XY_UV = vfmtPosUv;\n\nvar vfmtPosColor = new gfx.VertexFormat([\n { name: gfx.ATTR_POSITION, type: gfx.ATTR_TYPE_FLOAT32, num: 2 },\n { name: gfx.ATTR_COLOR, type: gfx.ATTR_TYPE_UINT8, num: 4, normalize: true },\n]);\nvfmtPosColor.name = 'vfmtPosColor';\ngfx.VertexFormat.XY_Color = vfmtPosColor;\n\nvar vfmtPos = new gfx.VertexFormat([\n { name: gfx.ATTR_POSITION, type: gfx.ATTR_TYPE_FLOAT32, num: 2 },\n]);\nvfmtPos.name = 'vfmtPos';\ngfx.VertexFormat.XY = vfmtPos;\n\nmodule.exports = {\n vfmt3D,\n vfmtPosUvColor,\n vfmtPosUvTwoColor,\n vfmtPosUv,\n vfmtPosColor,\n vfmtPos,\n vfmtPosUvColorTexId,\n vfmtPosUvTwoColorTexId,\n};\n","require('./sp');\nrequire('./multi-handler');\nrequire('./multi-batcher');\n","import { MultiHandler } from \"./multi-handler\";\n\n\n/**\n * 多纹理合批器\n */\nexport class MultiBatcher {\n\n /**\n * 多纹理材质管理器数组\n */\n handlers: MultiHandler[] = [];\n\n /**\n * 有空槽的材质\n */\n nextHandler!: MultiHandler;\n\n\n /**\n * 初始化\n */\n init() {\n const handler = new MultiHandler();\n this.handlers.push(handler);\n this.nextHandler = handler;\n }\n\n\n /**\n * 传入 cc.Texture2D会关联并返回一个多纹理材质如果已经有关联的材质则会返回已关联的材质\n */\n requsetMaterial(texture: any) {\n if (!texture._multiMaterial) {\n let handler = this.nextHandler;\n let index = handler.getEmptyIndex();\n if (index === -1) {\n // 没有空位,尝试在已有 handlers 里查找\n for (const _handler of this.handlers) {\n index = _handler.getEmptyIndex();\n if (index !== -1) {\n handler = _handler;\n this.nextHandler = handler;\n break;\n }\n }\n\n // 已有的没有空位,创建新材质\n if (index === -1) {\n handler = new MultiHandler();\n this.handlers.push(handler);\n this.nextHandler = handler;\n index = 0;\n }\n }\n\n texture.linkMaterial(handler.material, index);\n }\n return texture._multiMaterial;\n }\n\n\n /**\n * 重置多纹理材质数组,再次使用请先初始化\n */\n reset() {\n this.handlers.length = 0;\n }\n\n}\n\n\ncc.sp.multiBatcher = new MultiBatcher();\ncc.sp.MultiBatcher = MultiBatcher;\n","/**\n * 多纹理 Material 管理类\n */\nexport class MultiHandler {\n\n /**\n * 材质\n */\n material: any;\n\n /**\n * Texture 数组\n *\n * 注意:不是 cc.Texture2D\n */\n protected textures: any[] = [];\n\n /**\n * 有空槽(缓存值,并不是完全正确,只是为了降低当材质没有空槽时避免数组遍历的性能消耗)\n */\n protected hasEmptySlot: boolean = false;\n\n\n constructor(material?) {\n if (material) {\n this.material = material;\n } else {\n this.material = (cc.Material as any).create(cc.sp.multi2dSpriteEffectAsset);\n this.material.name = \"multi-2d-universal\";\n this.material.define('USE_TEXTURE', true);\n this.material.define('USE_MULTI_TEXTURE', true);\n }\n this.material._multiHandler = this;\n this.syncTextures();\n }\n\n\n /**\n * 同步 Material 的纹理插槽数据\n *\n * 当自行设置插槽可调用此函数同步数组\n */\n syncTextures() {\n const effect = this.material['effect'];\n const properties = effect.passes[0]._properties;\n\n this.textures[0] = properties.texture.value;\n this.textures[1] = properties.texture2.value;\n this.textures[2] = properties.texture3.value;\n this.textures[3] = properties.texture4.value;\n this.textures[4] = properties.texture5.value;\n this.textures[5] = properties.texture6.value;\n this.textures[6] = properties.texture7.value;\n this.textures[7] = properties.texture8.value;\n\n // refresh has empty slot state\n this.hasEmptySlot = true;\n this.getEmptyIndex();\n }\n\n\n /**\n * 设置纹理插槽(提供 cc.Texture2D\n */\n setTexture(index: number, texture: any) {\n this.textures[index] = texture ? texture.getImpl() : null;\n this.material.setProperty(cc.sp.propertyIndex2Name(index), texture);\n if (texture == null) this.hasEmptySlot = true;\n }\n\n\n /**\n * 移除指定纹理\n *\n * 注意:不是 cc.Texture2D\n */\n removeTexture(texture: any) {\n const index = this.getIndex(texture);\n if (index !== -1) {\n this.setTexture(index, null);\n }\n }\n\n\n /**\n * 纹理是否在插槽中\n *\n * 注意:不是 cc.Texture2D\n */\n hasTexture(texture: any) {\n return this.textures.indexOf(texture) !== -1;\n }\n\n\n /**\n * 获取纹理在插槽中的 Index没有返回 -1\n *\n * 注意:不是 cc.Texture2D\n */\n getIndex(texture: any) {\n return this.textures.indexOf(texture);\n }\n\n\n /**\n * 获取指定 index 中的纹理\n *\n * 注意:不是 cc.Texture2D\n */\n getTexture(index: number) {\n return this.textures[index];\n }\n\n\n /**\n * 获取空插槽 Index没有返回 -1\n */\n getEmptyIndex() {\n if (!this.hasEmptySlot) return -1;\n const index = this.textures.indexOf(null);\n if (index !== -1) {\n return index;\n } else {\n this.hasEmptySlot = false;\n return -1;\n }\n }\n\n\n /**\n * 自动设置纹理到空插槽,返回插槽下标,失败返回 -1提供 cc.Texture2D\n */\n autoSetTexture(texture: any) {\n const index = this.getEmptyIndex();\n if (index === -1) {\n return -1;\n }\n\n this.setTexture(index, texture);\n return index;\n }\n\n}\n\n\ncc.sp.MultiHandler = MultiHandler;\n","cc.sp = {\n\n /**\n * 是否初始化完成\n */\n inited: false,\n\n /**\n * 版本号\n */\n version: \"1.0.0\",\n\n /**\n * 最大纹理插槽数量\n *\n * 固定为 8\n */\n MAX_MULTITEXTURE_NUM: -1,\n\n /**\n * 渲染组件是否默认自动切换至贴图关联的材质\n */\n autoSwitchMaterial: true,\n\n /**\n * 渲染组件是否默认参与动态合图\n */\n allowDynamicAtlas: true,\n\n /**\n * Label 组件是否默认启用渲染时进行缩放以适配高 DPI 屏幕\n */\n enableLabelRetina: true,\n\n /**\n * Label 组件渲染时进行缩放的缩放比例\n */\n labelRetinaScale: 1,\n\n /**\n * Char 图集会进行自动多纹理合批的数量\n */\n charAtlasAutoBatchCount: 1,\n\n /**\n * Char 图集是否在场景切换时清空\n */\n charAtlasAutoResetBeforeSceneLoad: true,\n\n /**\n * 内置的多纹理合批 Effect Asset\n */\n multi2dSpriteEffectAsset: null,\n\n /**\n * property index to name map\n */\n i2nMap: ['texture'],\n\n /**\n * property name to index map\n */\n n2iMap: { texture: 0 },\n\n /**\n * property index to name\n */\n propertyIndex2Name(index) {\n return this.i2nMap[index];\n },\n\n /**\n * property name to index\n */\n propertyName2Index(name) {\n return this.n2iMap[name];\n },\n\n};\n\n// 初始化\nfor (let i = 1; i < 8; i++) {\n const name = \"texture\" + (i + 1);\n cc.sp.i2nMap[i] = name;\n cc.sp.n2iMap[name] = i;\n}\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nrequire('../platform/CCSys');\n\nvar EXTNAME_RE = /(\\.[^\\.\\/\\?\\\\]*)(\\?.*)?$/;\nvar DIRNAME_RE = /((.*)(\\/|\\\\|\\\\\\\\))?(.*?\\..*$)?/;\nvar NORMALIZE_RE = /[^\\.\\/]+\\/\\.\\.\\//;\n\n/**\n * !#en The module provides utilities for working with file and directory paths\n * !#zh 用于处理文件与目录的路径的模块\n * @class path\n * @static\n */\ncc.path = /** @lends cc.path# */{\n /**\n * !#en Join strings to be a path.\n * !#zh 拼接字符串为 Path\n * @method join\n * @example {@link cocos2d/core/utils/CCPath/join.js}\n * @returns {String}\n */\n join: function () {\n var l = arguments.length;\n var result = \"\";\n for (var i = 0; i < l; i++) {\n result = (result + (result === \"\" ? \"\" : \"/\") + arguments[i]).replace(/(\\/|\\\\\\\\)$/, \"\");\n }\n return result;\n },\n\n /**\n * !#en Get the ext name of a path including '.', like '.png'.\n * !#zh 返回 Path 的扩展名,包括 '.',例如 '.png'。\n * @method extname\n * @example {@link cocos2d/core/utils/CCPath/extname.js}\n * @param {String} pathStr\n * @returns {*}\n */\n extname: function (pathStr) {\n var temp = EXTNAME_RE.exec(pathStr);\n return temp ? temp[1] : '';\n },\n\n /**\n * !#en Get the main name of a file name\n * !#zh 获取文件名的主名称\n * @method mainFileName\n * @param {String} fileName\n * @returns {String}\n * @deprecated\n */\n mainFileName: function (fileName) {\n if (fileName) {\n var idx = fileName.lastIndexOf(\".\");\n if (idx !== -1)\n return fileName.substring(0, idx);\n }\n return fileName;\n },\n\n /**\n * !#en Get the file name of a file path.\n * !#zh 获取文件路径的文件名。\n * @method basename\n * @example {@link cocos2d/core/utils/CCPath/basename.js}\n * @param {String} pathStr\n * @param {String} [extname]\n * @returns {*}\n */\n basename: function (pathStr, extname) {\n var index = pathStr.indexOf(\"?\");\n if (index > 0) pathStr = pathStr.substring(0, index);\n var reg = /(\\/|\\\\)([^\\/\\\\]+)$/g;\n var result = reg.exec(pathStr.replace(/(\\/|\\\\)$/, \"\"));\n if (!result) return pathStr;\n var baseName = result[2];\n if (extname && pathStr.substring(pathStr.length - extname.length).toLowerCase() === extname.toLowerCase())\n return baseName.substring(0, baseName.length - extname.length);\n return baseName;\n },\n\n /**\n * !#en Get dirname of a file path.\n * !#zh 获取文件路径的目录名。\n * @method dirname\n * @example {@link cocos2d/core/utils/CCPath/dirname.js}\n * @param {String} pathStr\n * @returns {*}\n */\n dirname: function (pathStr) {\n var temp = DIRNAME_RE.exec(pathStr);\n return temp ? temp[2] : '';\n },\n\n /**\n * !#en Change extname of a file path.\n * !#zh 更改文件路径的扩展名。\n * @method changeExtname\n * @example {@link cocos2d/core/utils/CCPath/changeExtname.js}\n * @param {String} pathStr\n * @param {String} [extname]\n * @returns {String}\n */\n changeExtname: function (pathStr, extname) {\n extname = extname || \"\";\n var index = pathStr.indexOf(\"?\");\n var tempStr = \"\";\n if (index > 0) {\n tempStr = pathStr.substring(index);\n pathStr = pathStr.substring(0, index);\n }\n index = pathStr.lastIndexOf(\".\");\n if (index < 0) return pathStr + extname + tempStr;\n return pathStr.substring(0, index) + extname + tempStr;\n },\n /**\n * !#en Change file name of a file path.\n * !#zh 更改文件路径的文件名。\n * @example {@link cocos2d/core/utils/CCPath/changeBasename.js}\n * @param {String} pathStr\n * @param {String} basename\n * @param {Boolean} [isSameExt]\n * @returns {String}\n */\n changeBasename: function (pathStr, basename, isSameExt) {\n if (basename.indexOf(\".\") === 0) return this.changeExtname(pathStr, basename);\n var index = pathStr.indexOf(\"?\");\n var tempStr = \"\";\n var ext = isSameExt ? this.extname(pathStr) : \"\";\n if (index > 0) {\n tempStr = pathStr.substring(index);\n pathStr = pathStr.substring(0, index);\n }\n index = pathStr.lastIndexOf(\"/\");\n index = index <= 0 ? 0 : index + 1;\n return pathStr.substring(0, index) + basename + ext + tempStr;\n },\n //todo make public after verification\n _normalize: function (url) {\n var oldUrl = url = String(url);\n\n //removing all ../\n do {\n oldUrl = url;\n url = url.replace(NORMALIZE_RE, \"\");\n } while (oldUrl.length !== url.length);\n return url;\n },\n\n // The platform-specific file separator. '\\\\' or '/'.\n sep: (cc.sys.os === cc.sys.OS_WINDOWS ? '\\\\' : '/'),\n\n // @param {string} path\n stripSep (path) {\n return path.replace(/[\\/\\\\]$/, '');\n }\n};\n\nmodule.exports = cc.path;","/****************************************************************************\n Copyright (c) 2008-2010 Ricardo Quesada\n Copyright (c) 2011-2012 cocos2d-x.org\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos2d-x.org\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * !#en\n * AffineTransform class represent an affine transform matrix. It's composed basically by translation, rotation, scale transformations.<br/>\n * !#zh\n * AffineTransform 类代表一个仿射变换矩阵。它基本上是由平移旋转,缩放转变所组成。<br/>\n * @class AffineTransform\n * @constructor\n * @param {Number} a\n * @param {Number} b\n * @param {Number} c\n * @param {Number} d\n * @param {Number} tx\n * @param {Number} ty\n * @see AffineTransform.create\n */\nvar AffineTransform = function (a, b, c, d, tx, ty) {\n this.a = a;\n this.b = b;\n this.c = c;\n this.d = d;\n this.tx = tx;\n this.ty = ty;\n};\n\n/**\n * !#en Create a AffineTransform object with all contents in the matrix.\n * !#zh 用在矩阵中的所有内容创建一个 AffineTransform 对象。\n * @method create\n * @static\n * @param {Number} a\n * @param {Number} b\n * @param {Number} c\n * @param {Number} d\n * @param {Number} tx\n * @param {Number} ty\n * @return {AffineTransform}\n */\nAffineTransform.create = function (a, b, c, d, tx, ty) {\n return {a: a, b: b, c: c, d: d, tx: tx, ty: ty};\n};\n\n/**\n * !#en\n * Create a identity transformation matrix: <br/>\n * [ 1, 0, 0, <br/>\n * 0, 1, 0 ]\n * !#zh\n * 单位矩阵:<br/>\n * [ 1, 0, 0, <br/>\n * 0, 1, 0 ]\n *\n * @method identity\n * @static\n * @return {AffineTransform}\n */\nAffineTransform.identity = function () {\n return {a: 1.0, b: 0.0, c: 0.0, d: 1.0, tx: 0.0, ty: 0.0};\n};\n\n/**\n * !#en Clone a AffineTransform object from the specified transform.\n * !#zh 克隆指定的 AffineTransform 对象。\n * @method clone\n * @static\n * @param {AffineTransform} t\n * @return {AffineTransform}\n */\nAffineTransform.clone = function (t) {\n return {a: t.a, b: t.b, c: t.c, d: t.d, tx: t.tx, ty: t.ty};\n};\n\n/**\n * !#en\n * Concatenate a transform matrix to another\n * The results are reflected in the out affine transform\n * out = t1 * t2\n * This function is memory free, you should create the output affine transform by yourself and manage its memory.\n * !#zh\n * 拼接两个矩阵,将结果保存到 out 矩阵。这个函数不创建任何内存,你需要先创建 AffineTransform 对象用来存储结果,并作为第一个参数传入函数。\n * out = t1 * t2\n * @method concat\n * @static\n * @param {AffineTransform} out Out object to store the concat result\n * @param {AffineTransform} t1 The first transform object.\n * @param {AffineTransform} t2 The transform object to concatenate.\n * @return {AffineTransform} Out object with the result of concatenation.\n */\nAffineTransform.concat = function (out, t1, t2) {\n var a = t1.a, b = t1.b, c = t1.c, d = t1.d, tx = t1.tx, ty = t1.ty;\n out.a = a * t2.a + b * t2.c;\n out.b = a * t2.b + b * t2.d;\n out.c = c * t2.a + d * t2.c;\n out.d = c * t2.b + d * t2.d;\n out.tx = tx * t2.a + ty * t2.c + t2.tx;\n out.ty = tx * t2.b + ty * t2.d + t2.ty;\n return out;\n};\n\n/**\n * !#en Get the invert transform of an AffineTransform object.\n * This function is memory free, you should create the output affine transform by yourself and manage its memory.\n * !#zh 求逆矩阵。这个函数不创建任何内存,你需要先创建 AffineTransform 对象用来存储结果,并作为第一个参数传入函数。\n * @method invert\n * @static\n * @param {AffineTransform} out\n * @param {AffineTransform} t\n * @return {AffineTransform} Out object with inverted result.\n */\nAffineTransform.invert = function (out, t) {\n var a = t.a, b = t.b, c = t.c, d = t.d;\n var determinant = 1 / (a * d - b * c);\n var tx = t.tx, ty = t.ty;\n out.a = determinant * d;\n out.b = -determinant * b;\n out.c = -determinant * c;\n out.d = determinant * a;\n out.tx = determinant * (c * ty - d * tx);\n out.ty = determinant * (b * tx - a * ty);\n return out;\n};\n\n/**\n * !#en Get an AffineTransform object from a given matrix 4x4.\n * This function is memory free, you should create the output affine transform by yourself and manage its memory.\n * !#zh 从一个 4x4 Matrix 获取 AffineTransform 对象。这个函数不创建任何内存,你需要先创建 AffineTransform 对象用来存储结果,并作为第一个参数传入函数。\n * @method invert\n * @static\n * @param {AffineTransform} out\n * @param {Mat4} mat\n * @return {AffineTransform} Out object with inverted result.\n */\nAffineTransform.fromMat4 = function (out, mat) {\n let matm = mat.m;\n out.a = matm[0];\n out.b = matm[1];\n out.c = matm[4];\n out.d = matm[5];\n out.tx = matm[12];\n out.ty = matm[13];\n return out;\n};\n\n/**\n * !#en Apply the affine transformation on a point.\n * This function is memory free, you should create the output Vec2 by yourself and manage its memory.\n * !#zh 对一个点应用矩阵变换。这个函数不创建任何内存,你需要先创建一个 Vec2 对象用来存储结果,并作为第一个参数传入函数。\n * @method transformVec2\n * @static\n * @param {Vec2} out The output point to store the result\n * @param {Vec2|Number} point Point to apply transform or x.\n * @param {AffineTransform|Number} transOrY transform matrix or y.\n * @param {AffineTransform} [t] transform matrix.\n * @return {Vec2}\n */\nAffineTransform.transformVec2 = function (out, point, transOrY, t) {\n var x, y;\n if (t === undefined) {\n t = transOrY;\n x = point.x;\n y = point.y;\n } else {\n x = point;\n y = transOrY;\n }\n out.x = t.a * x + t.c * y + t.tx;\n out.y = t.b * x + t.d * y + t.ty;\n return out;\n};\n\n/**\n * !#en Apply the affine transformation on a size.\n * This function is memory free, you should create the output Size by yourself and manage its memory.\n * !#zh 应用仿射变换矩阵到 Size 上。这个函数不创建任何内存,你需要先创建一个 Size 对象用来存储结果,并作为第一个参数传入函数。\n * @method transformSize\n * @static\n * @param {Size} out The output point to store the result\n * @param {Size} size\n * @param {AffineTransform} t\n * @return {Size}\n */\nAffineTransform.transformSize = function (out, size, t) {\n out.width = t.a * size.width + t.c * size.height;\n out.height = t.b * size.width + t.d * size.height;\n return out;\n};\n\n/**\n * !#en Apply the affine transformation on a rect.\n * This function is memory free, you should create the output Rect by yourself and manage its memory.\n * !#zh 应用仿射变换矩阵到 Rect 上。这个函数不创建任何内存,你需要先创建一个 Rect 对象用来存储结果,并作为第一个参数传入函数。\n * @method transformRect\n * @static\n * @param {Rect} out\n * @param {Rect} rect\n * @param {AffineTransform} anAffineTransform\n * @return {Rect}\n */\nAffineTransform.transformRect = function(out, rect, t){\n var ol = rect.x;\n var ob = rect.y;\n var or = ol + rect.width;\n var ot = ob + rect.height;\n var lbx = t.a * ol + t.c * ob + t.tx;\n var lby = t.b * ol + t.d * ob + t.ty;\n var rbx = t.a * or + t.c * ob + t.tx;\n var rby = t.b * or + t.d * ob + t.ty;\n var ltx = t.a * ol + t.c * ot + t.tx;\n var lty = t.b * ol + t.d * ot + t.ty;\n var rtx = t.a * or + t.c * ot + t.tx;\n var rty = t.b * or + t.d * ot + t.ty;\n\n var minX = Math.min(lbx, rbx, ltx, rtx);\n var maxX = Math.max(lbx, rbx, ltx, rtx);\n var minY = Math.min(lby, rby, lty, rty);\n var maxY = Math.max(lby, rby, lty, rty);\n\n out.x = minX;\n out.y = minY;\n out.width = maxX - minX;\n out.height = maxY - minY;\n return out;\n};\n\n/**\n * !#en Apply the affine transformation on a rect, and truns to an Oriented Bounding Box.\n * This function is memory free, you should create the output vectors by yourself and manage their memory.\n * !#zh 应用仿射变换矩阵到 Rect 上, 并转换为有向包围盒。这个函数不创建任何内存,你需要先创建包围盒的四个 Vector 对象用来存储结果,并作为前四个参数传入函数。\n * @method transformObb\n * @static\n * @param {Vec2} out_bl\n * @param {Vec2} out_tl\n * @param {Vec2} out_tr\n * @param {Vec2} out_br\n * @param {Rect} rect\n * @param {AffineTransform} anAffineTransform\n */\nAffineTransform.transformObb = function (out_bl, out_tl, out_tr, out_br, rect, anAffineTransform) {\n var x = rect.x;\n var y = rect.y;\n var width = rect.width;\n var height = rect.height;\n\n var tx = anAffineTransform.a * x + anAffineTransform.c * y + anAffineTransform.tx;\n var ty = anAffineTransform.b * x + anAffineTransform.d * y + anAffineTransform.ty;\n var xa = anAffineTransform.a * width;\n var xb = anAffineTransform.b * width;\n var yc = anAffineTransform.c * height;\n var yd = anAffineTransform.d * height;\n\n out_tl.x = tx;\n out_tl.y = ty;\n out_tr.x = xa + tx;\n out_tr.y = xb + ty;\n out_bl.x = yc + tx;\n out_bl.y = yd + ty;\n out_br.x = xa + yc + tx;\n out_br.y = xb + yd + ty;\n};\n\ncc.AffineTransform = module.exports = AffineTransform;","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst Flags = require('../platform/CCObject').Flags;\nconst misc = require('./misc');\nconst js = require('../platform/js');\nconst IdGenerater = require('../platform/id-generater');\nconst eventManager = require('../event-manager');\nconst RenderFlow = require('../renderer/render-flow');\n\nconst Destroying = Flags.Destroying;\nconst DontDestroy = Flags.DontDestroy;\nconst Deactivating = Flags.Deactivating; \n\nconst CHILD_ADDED = 'child-added';\nconst CHILD_REMOVED = 'child-removed';\n\nvar idGenerater = new IdGenerater('Node');\n\nfunction getConstructor(typeOrClassName) {\n if (!typeOrClassName) {\n cc.errorID(3804);\n return null;\n }\n if (typeof typeOrClassName === 'string') {\n return js.getClassByName(typeOrClassName);\n }\n\n return typeOrClassName;\n}\n\nfunction findComponent(node, constructor) {\n if (constructor._sealed) {\n for (let i = 0; i < node._components.length; ++i) {\n let comp = node._components[i];\n if (comp.constructor === constructor) {\n return comp;\n }\n }\n }\n else {\n for (let i = 0; i < node._components.length; ++i) {\n let comp = node._components[i];\n if (comp instanceof constructor) {\n return comp;\n }\n }\n }\n return null;\n}\n\nfunction findComponents(node, constructor, components) {\n if (constructor._sealed) {\n for (let i = 0; i < node._components.length; ++i) {\n let comp = node._components[i];\n if (comp.constructor === constructor) {\n components.push(comp);\n }\n }\n }\n else {\n for (let i = 0; i < node._components.length; ++i) {\n let comp = node._components[i];\n if (comp instanceof constructor) {\n components.push(comp);\n }\n }\n }\n}\n\nfunction findChildComponent(children, constructor) {\n for (var i = 0; i < children.length; ++i) {\n var node = children[i];\n var comp = findComponent(node, constructor);\n if (comp) {\n return comp;\n }\n else if (node._children.length > 0) {\n comp = findChildComponent(node._children, constructor);\n if (comp) {\n return comp;\n }\n }\n }\n return null;\n}\n\nfunction findChildComponents(children, constructor, components) {\n for (var i = 0; i < children.length; ++i) {\n var node = children[i];\n findComponents(node, constructor, components);\n if (node._children.length > 0) {\n findChildComponents(node._children, constructor, components);\n }\n }\n}\n\n/**\n * A base node for CCNode, it will:\n * - maintain scene hierarchy and active logic\n * - notifications if some properties changed\n * - define some interfaces shares between CCNode\n * - define machanisms for Enity Component Systems\n * - define prefab and serialize functions\n *\n * @class _BaseNode\n * @extends Object\n * @uses EventTarget\n * @constructor\n * @param {String} [name]\n * @private\n */\nvar BaseNode = cc.Class({\n name: 'cc._BaseNode',\n extends: cc.Object,\n\n properties: {\n // SERIALIZABLE\n\n _parent: null,\n _children: [],\n\n _active: true,\n\n /**\n * @property _components\n * @type {Component[]}\n * @default []\n * @readOnly\n * @private\n */\n _components: [],\n\n /**\n * The PrefabInfo object\n * @property _prefab\n * @type {PrefabInfo}\n * @private\n */\n _prefab: null,\n\n /**\n * If true, the node is an persist node which won't be destroyed during scene transition.\n * If false, the node will be destroyed automatically when loading a new scene. Default is false.\n * @property _persistNode\n * @type {Boolean}\n * @default false\n * @private\n */\n _persistNode: {\n get () {\n return (this._objFlags & DontDestroy) > 0;\n },\n set (value) {\n if (value) {\n this._objFlags |= DontDestroy;\n }\n else {\n this._objFlags &= ~DontDestroy;\n }\n }\n },\n\n // API\n\n /**\n * !#en Name of node.\n * !#zh 该节点名称。\n * @property name\n * @type {String}\n * @example\n * node.name = \"New Node\";\n * cc.log(\"Node Name: \" + node.name);\n */\n name: {\n get () {\n return this._name;\n },\n set (value) {\n if (CC_DEV && value.indexOf('/') !== -1) {\n cc.errorID(1632);\n return;\n }\n this._name = value;\n if (CC_JSB && CC_NATIVERENDERER) {\n this._proxy.setName(this._name);\n }\n },\n },\n\n /**\n * !#en The uuid for editor, will be stripped before building project.\n * !#zh 主要用于编辑器的 uuid在编辑器下可用于持久化存储在项目构建之后将变成自增的 id。\n * @property uuid\n * @type {String}\n * @readOnly\n * @example\n * cc.log(\"Node Uuid: \" + node.uuid);\n */\n uuid: {\n get () {\n return this._id;\n }\n },\n\n /**\n * !#en All children nodes.\n * !#zh 节点的所有子节点。\n * @property children\n * @type {Node[]}\n * @readOnly\n * @example\n * var children = node.children;\n * for (var i = 0; i < children.length; ++i) {\n * cc.log(\"Node: \" + children[i]);\n * }\n */\n children: {\n get () {\n return this._children;\n }\n },\n\n /**\n * !#en All children nodes.\n * !#zh 节点的子节点数量。\n * @property childrenCount\n * @type {Number}\n * @readOnly\n * @example\n * var count = node.childrenCount;\n * cc.log(\"Node Children Count: \" + count);\n */\n childrenCount: {\n get () {\n return this._children.length;\n }\n },\n\n /**\n * !#en\n * The local active state of this node.<br/>\n * Note that a Node may be inactive because a parent is not active, even if this returns true.<br/>\n * Use {{#crossLink \"Node/activeInHierarchy:property\"}}{{/crossLink}} if you want to check if the Node is actually treated as active in the scene.\n * !#zh\n * 当前节点的自身激活状态。<br/>\n * 值得注意的是,一个节点的父节点如果不被激活,那么即使它自身设为激活,它仍然无法激活。<br/>\n * 如果你想检查节点在场景中实际的激活状态可以使用 {{#crossLink \"Node/activeInHierarchy:property\"}}{{/crossLink}}。\n * @property active\n * @type {Boolean}\n * @default true\n * @example\n * node.active = false;\n */\n active: {\n get () {\n return this._active;\n },\n set (value) {\n value = !!value;\n if (this._active !== value) {\n this._active = value;\n var parent = this._parent;\n if (parent) {\n var couldActiveInScene = parent._activeInHierarchy;\n if (couldActiveInScene) {\n cc.director._nodeActivator.activateNode(this, value);\n }\n }\n }\n }\n },\n\n /**\n * !#en Indicates whether this node is active in the scene.\n * !#zh 表示此节点是否在场景中激活。\n * @property activeInHierarchy\n * @type {Boolean}\n * @example\n * cc.log(\"activeInHierarchy: \" + node.activeInHierarchy);\n */\n activeInHierarchy: {\n get () {\n return this._activeInHierarchy;\n }\n },\n },\n\n /**\n * @method constructor\n * @param {String} [name]\n */\n ctor (name) {\n this._name = name !== undefined ? name : 'New Node';\n this._activeInHierarchy = false;\n this._id = CC_EDITOR ? Editor.Utils.UuidUtils.uuid() : idGenerater.getNewId();\n\n cc.director._scheduler && cc.director._scheduler.enableForTarget(this);\n\n /**\n * Register all related EventTargets,\n * all event callbacks will be removed in _onPreDestroy\n * @property __eventTargets\n * @type {EventTarget[]}\n * @private\n */\n this.__eventTargets = [];\n },\n /** \n * !#en The parent of the node.\n * !#zh 该节点的父节点。\n * @property {Node} parent\n * @example \n * cc.log(\"Node Parent: \" + node.parent);\n */\n\n /**\n * !#en Get parent of the node.\n * !#zh 获取该节点的父节点。\n * @method getParent\n * @return {Node}\n * @example\n * var parent = this.node.getParent();\n */\n getParent () {\n return this._parent;\n },\n\n /**\n * !#en Set parent of the node.\n * !#zh 设置该节点的父节点。\n * @method setParent\n * @param {Node} value\n * @example\n * node.setParent(newNode);\n */\n setParent (value) {\n if (this._parent === value) {\n return;\n }\n if (CC_EDITOR && cc.engine && !cc.engine.isPlaying) {\n if (_Scene.DetectConflict.beforeAddChild(this, value)) {\n return;\n }\n }\n var oldParent = this._parent;\n if (CC_DEBUG && oldParent && (oldParent._objFlags & Deactivating)) {\n cc.errorID(3821);\n }\n this._parent = value || null;\n\n this._onSetParent(value);\n\n if (value) {\n if (CC_DEBUG && (value._objFlags & Deactivating)) {\n cc.errorID(3821);\n }\n eventManager._setDirtyForNode(this);\n value._children.push(this);\n value.emit && value.emit(CHILD_ADDED, this);\n value._renderFlag |= RenderFlow.FLAG_CHILDREN;\n }\n if (oldParent) {\n if (!(oldParent._objFlags & Destroying)) {\n var removeAt = oldParent._children.indexOf(this);\n if (CC_DEV && removeAt < 0) {\n return cc.errorID(1633);\n }\n oldParent._children.splice(removeAt, 1);\n oldParent.emit && oldParent.emit(CHILD_REMOVED, this);\n this._onHierarchyChanged(oldParent);\n\n if (oldParent._children.length === 0) {\n oldParent._renderFlag &= ~RenderFlow.FLAG_CHILDREN;\n }\n }\n }\n else if (value) {\n this._onHierarchyChanged(null);\n }\n },\n\n // ABSTRACT INTERFACES\n\n /**\n * !#en\n * Properties configuration function <br/>\n * All properties in attrs will be set to the node, <br/>\n * when the setter of the node is available, <br/>\n * the property will be set via setter function.<br/>\n * !#zh 属性配置函数。在 attrs 的所有属性将被设置为节点属性。\n * @method attr\n * @param {Object} attrs - Properties to be set to node\n * @example\n * var attrs = { key: 0, num: 100 };\n * node.attr(attrs);\n */\n attr (attrs) {\n js.mixin(this, attrs);\n },\n\n // composition: GET\n\n /**\n * !#en Returns a child from the container given its uuid.\n * !#zh 通过 uuid 获取节点的子节点。\n * @method getChildByUuid\n * @param {String} uuid - The uuid to find the child node.\n * @return {Node} a Node whose uuid equals to the input parameter\n * @example\n * var child = node.getChildByUuid(uuid);\n */\n getChildByUuid (uuid) {\n if (!uuid) {\n cc.log(\"Invalid uuid\");\n return null;\n }\n\n var locChildren = this._children;\n for (var i = 0, len = locChildren.length; i < len; i++) {\n if (locChildren[i]._id === uuid)\n return locChildren[i];\n }\n return null;\n },\n\n /**\n * !#en Returns a child from the container given its name.\n * !#zh 通过名称获取节点的子节点。\n * @method getChildByName\n * @param {String} name - A name to find the child node.\n * @return {Node} a CCNode object whose name equals to the input parameter\n * @example\n * var child = node.getChildByName(\"Test Node\");\n */\n getChildByName (name) {\n if (!name) {\n cc.log(\"Invalid name\");\n return null;\n }\n\n var locChildren = this._children;\n for (var i = 0, len = locChildren.length; i < len; i++) {\n if (locChildren[i]._name === name)\n return locChildren[i];\n }\n return null;\n },\n\n // composition: ADD\n\n addChild (child) {\n\n if (CC_DEV && !(child instanceof cc._BaseNode)) {\n return cc.errorID(1634, cc.js.getClassName(child));\n }\n cc.assertID(child, 1606);\n cc.assertID(child._parent === null, 1605);\n\n // invokes the parent setter\n child.setParent(this);\n\n },\n\n /**\n * !#en\n * Inserts a child to the node at a specified index.\n * !#zh\n * 插入子节点到指定位置\n * @method insertChild\n * @param {Node} child - the child node to be inserted\n * @param {Number} siblingIndex - the sibling index to place the child in\n * @example\n * node.insertChild(child, 2);\n */\n insertChild (child, siblingIndex) {\n child.parent = this;\n child.setSiblingIndex(siblingIndex);\n },\n\n // HIERARCHY METHODS\n\n /**\n * !#en Get the sibling index.\n * !#zh 获取同级索引。\n * @method getSiblingIndex\n * @return {Number}\n * @example\n * var index = node.getSiblingIndex();\n */\n getSiblingIndex () {\n if (this._parent) {\n return this._parent._children.indexOf(this);\n }\n else {\n return 0;\n }\n },\n\n /**\n * !#en Set the sibling index of this node.\n * !#zh 设置节点同级索引。\n * @method setSiblingIndex\n * @param {Number} index\n * @example\n * node.setSiblingIndex(1);\n */\n setSiblingIndex (index) {\n if (!this._parent) {\n return;\n }\n if (this._parent._objFlags & Deactivating) {\n cc.errorID(3821);\n return;\n }\n var siblings = this._parent._children;\n index = index !== -1 ? index : siblings.length - 1;\n var oldIndex = siblings.indexOf(this);\n if (index !== oldIndex) {\n siblings.splice(oldIndex, 1);\n if (index < siblings.length) {\n siblings.splice(index, 0, this);\n }\n else {\n siblings.push(this);\n }\n this._onSiblingIndexChanged && this._onSiblingIndexChanged(index);\n }\n },\n\n /**\n * !#en Walk though the sub children tree of the current node.\n * Each node, including the current node, in the sub tree will be visited two times, before all children and after all children.\n * This function call is not recursive, it's based on stack.\n * Please don't walk any other node inside the walk process.\n * !#zh 遍历该节点的子树里的所有节点并按规则执行回调函数。\n * 对子树中的所有节点包含当前节点会执行两次回调prefunc 会在访问它的子节点之前调用postfunc 会在访问所有子节点之后调用。\n * 这个函数的实现不是基于递归的,而是基于栈展开递归的方式。\n * 请不要在 walk 过程中对任何其他的节点嵌套执行 walk。\n * @method walk\n * @param {Function} prefunc The callback to process node when reach the node for the first time\n * @param {_BaseNode} prefunc.target The current visiting node\n * @param {Function} postfunc The callback to process node when re-visit the node after walked all children in its sub tree\n * @param {_BaseNode} postfunc.target The current visiting node\n * @example\n * node.walk(function (target) {\n * console.log('Walked through node ' + target.name + ' for the first time');\n * }, function (target) {\n * console.log('Walked through node ' + target.name + ' after walked all children in its sub tree');\n * });\n */\n walk (prefunc, postfunc) {\n var BaseNode = cc._BaseNode;\n var index = 1;\n var children, child, curr, i, afterChildren;\n var stack = BaseNode._stacks[BaseNode._stackId];\n if (!stack) {\n stack = [];\n BaseNode._stacks.push(stack);\n }\n BaseNode._stackId++;\n\n stack.length = 0;\n stack[0] = this;\n var parent = null;\n afterChildren = false;\n while (index) {\n index--;\n curr = stack[index];\n if (!curr) {\n continue;\n }\n if (!afterChildren && prefunc) {\n // pre call\n prefunc(curr);\n }\n else if (afterChildren && postfunc) {\n // post call\n postfunc(curr);\n }\n \n // Avoid memory leak\n stack[index] = null;\n // Do not repeatly visit child tree, just do post call and continue walk\n if (afterChildren) {\n if (parent === this._parent) break;\n afterChildren = false;\n }\n else {\n // Children not proceeded and has children, proceed to child tree\n if (curr._children.length > 0) {\n parent = curr;\n children = curr._children;\n i = 0;\n stack[index] = children[i];\n index++;\n }\n // No children, then repush curr to be walked for post func\n else {\n stack[index] = curr;\n index++;\n afterChildren = true;\n }\n continue;\n }\n // curr has no sub tree, so look into the siblings in parent children\n if (children) {\n i++;\n // Proceed to next sibling in parent children\n if (children[i]) {\n stack[index] = children[i];\n index++;\n }\n // No children any more in this sub tree, go upward\n else if (parent) {\n stack[index] = parent;\n index++;\n // Setup parent walk env\n afterChildren = true;\n if (parent._parent) {\n children = parent._parent._children;\n i = children.indexOf(parent);\n parent = parent._parent;\n }\n else {\n // At root\n parent = null;\n children = null;\n }\n\n // ERROR\n if (i < 0) {\n break;\n }\n }\n }\n }\n stack.length = 0;\n BaseNode._stackId--;\n },\n\n cleanup () {\n\n },\n\n /**\n * !#en\n * Remove itself from its parent node. If cleanup is `true`, then also remove all events and actions. <br/>\n * If the cleanup parameter is not passed, it will force a cleanup, so it is recommended that you always pass in the `false` parameter when calling this API.<br/>\n * If the node orphan, then nothing happens.\n * !#zh\n * 从父节点中删除该节点。如果不传入 cleanup 参数或者传入 `true`那么这个节点上所有绑定的事件、action 都会被删除。<br/>\n * 因此建议调用这个 API 时总是传入 `false` 参数。<br/>\n * 如果这个节点是一个孤节点,那么什么都不会发生。\n * @method removeFromParent\n * @param {Boolean} [cleanup=true] - true if all actions and callbacks on this node should be removed, false otherwise.\n * @example\n * node.removeFromParent();\n * node.removeFromParent(false);\n */\n removeFromParent (cleanup) {\n if (this._parent) {\n if (cleanup === undefined)\n cleanup = true;\n this._parent.removeChild(this, cleanup);\n }\n },\n\n /**\n * !#en\n * Removes a child from the container. It will also cleanup all running actions depending on the cleanup parameter. </p>\n * If the cleanup parameter is not passed, it will force a cleanup. <br/>\n * \"remove\" logic MUST only be on this method <br/>\n * If a class wants to extend the 'removeChild' behavior it only needs <br/>\n * to override this method.\n * !#zh\n * 移除节点中指定的子节点,是否需要清理所有正在运行的行为取决于 cleanup 参数。<br/>\n * 如果 cleanup 参数不传入,默认为 true 表示清理。<br/>\n * @method removeChild\n * @param {Node} child - The child node which will be removed.\n * @param {Boolean} [cleanup=true] - true if all running actions and callbacks on the child node will be cleanup, false otherwise.\n * @example\n * node.removeChild(newNode);\n * node.removeChild(newNode, false);\n */\n removeChild (child, cleanup) {\n if (this._children.indexOf(child) > -1) {\n // If you don't do cleanup, the child's actions will not get removed and the\n if (cleanup || cleanup === undefined) {\n child.cleanup();\n }\n // invoke the parent setter\n child.parent = null;\n }\n },\n\n /**\n * !#en\n * Removes all children from the container and do a cleanup all running actions depending on the cleanup parameter. <br/>\n * If the cleanup parameter is not passed, it will force a cleanup.\n * !#zh\n * 移除节点所有的子节点,是否需要清理所有正在运行的行为取决于 cleanup 参数。<br/>\n * 如果 cleanup 参数不传入,默认为 true 表示清理。\n * @method removeAllChildren\n * @param {Boolean} [cleanup=true] - true if all running actions on all children nodes should be cleanup, false otherwise.\n * @example\n * node.removeAllChildren();\n * node.removeAllChildren(false);\n */\n removeAllChildren (cleanup) {\n // not using detachChild improves speed here\n var children = this._children;\n if (cleanup === undefined)\n cleanup = true;\n for (var i = children.length - 1; i >= 0; i--) {\n var node = children[i];\n if (node) {\n // If you don't do cleanup, the node's actions will not get removed and the\n if (cleanup)\n node.cleanup();\n\n node.parent = null;\n }\n }\n this._children.length = 0;\n },\n\n /**\n * !#en Is this node a child of the given node?\n * !#zh 是否是指定节点的子节点?\n * @method isChildOf\n * @param {Node} parent\n * @return {Boolean} - Returns true if this node is a child, deep child or identical to the given node.\n * @example\n * node.isChildOf(newNode);\n */\n isChildOf (parent) {\n var child = this;\n do {\n if (child === parent) {\n return true;\n }\n child = child._parent;\n }\n while (child);\n return false;\n },\n\n // COMPONENT\n\n /**\n * !#en\n * Returns the component of supplied type if the node has one attached, null if it doesn't.<br/>\n * You can also get component in the node by passing in the name of the script.\n * !#zh\n * 获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。<br/>\n * 传入参数也可以是脚本的名称。\n * @method getComponent\n * @param {Function|String} typeOrClassName\n * @return {Component}\n * @example\n * // get sprite component\n * var sprite = node.getComponent(cc.Sprite);\n * // get custom test class\n * var test = node.getComponent(\"Test\");\n * @typescript\n * getComponent<T extends Component>(type: {prototype: T}): T\n * getComponent(className: string): any\n */\n getComponent (typeOrClassName) {\n var constructor = getConstructor(typeOrClassName);\n if (constructor) {\n return findComponent(this, constructor);\n }\n return null;\n },\n\n /**\n * !#en Returns all components of supplied type in the node.\n * !#zh 返回节点上指定类型的所有组件。\n * @method getComponents\n * @param {Function|String} typeOrClassName\n * @return {Component[]}\n * @example\n * var sprites = node.getComponents(cc.Sprite);\n * var tests = node.getComponents(\"Test\");\n * @typescript\n * getComponents<T extends Component>(type: {prototype: T}): T[]\n * getComponents(className: string): any[]\n */\n getComponents (typeOrClassName) {\n var constructor = getConstructor(typeOrClassName), components = [];\n if (constructor) {\n findComponents(this, constructor, components);\n }\n return components;\n },\n\n /**\n * !#en Returns the component of supplied type in any of its children using depth first search.\n * !#zh 递归查找所有子节点中第一个匹配指定类型的组件。\n * @method getComponentInChildren\n * @param {Function|String} typeOrClassName\n * @return {Component}\n * @example\n * var sprite = node.getComponentInChildren(cc.Sprite);\n * var Test = node.getComponentInChildren(\"Test\");\n * @typescript\n * getComponentInChildren<T extends Component>(type: {prototype: T}): T\n * getComponentInChildren(className: string): any\n */\n getComponentInChildren (typeOrClassName) {\n var constructor = getConstructor(typeOrClassName);\n if (constructor) {\n return findChildComponent(this._children, constructor);\n }\n return null;\n },\n\n /**\n * !#en Returns all components of supplied type in self or any of its children.\n * !#zh 递归查找自身或所有子节点中指定类型的组件\n * @method getComponentsInChildren\n * @param {Function|String} typeOrClassName\n * @return {Component[]}\n * @example\n * var sprites = node.getComponentsInChildren(cc.Sprite);\n * var tests = node.getComponentsInChildren(\"Test\");\n * @typescript\n * getComponentsInChildren<T extends Component>(type: {prototype: T}): T[]\n * getComponentsInChildren(className: string): any[]\n */\n getComponentsInChildren (typeOrClassName) {\n var constructor = getConstructor(typeOrClassName), components = [];\n if (constructor) {\n findComponents(this, constructor, components);\n findChildComponents(this._children, constructor, components);\n }\n return components;\n },\n\n _checkMultipleComp: (CC_EDITOR || CC_PREVIEW) && function (ctor) {\n var existing = this.getComponent(ctor._disallowMultiple);\n if (existing) {\n if (existing.constructor === ctor) {\n cc.errorID(3805, js.getClassName(ctor), this._name);\n }\n else {\n cc.errorID(3806, js.getClassName(ctor), this._name, js.getClassName(existing));\n }\n return false;\n }\n return true;\n },\n\n /**\n * !#en Adds a component class to the node. You can also add component to node by passing in the name of the script.\n * !#zh 向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。\n * @method addComponent\n * @param {Function|String} typeOrClassName - The constructor or the class name of the component to add\n * @return {Component} - The newly added component\n * @example\n * var sprite = node.addComponent(cc.Sprite);\n * var test = node.addComponent(\"Test\");\n * @typescript\n * addComponent<T extends Component>(type: {new(): T}): T\n * addComponent(className: string): any\n */\n addComponent (typeOrClassName) {\n if (CC_EDITOR && (this._objFlags & Destroying)) {\n cc.error('isDestroying');\n return null;\n }\n\n // get component\n\n var constructor;\n if (typeof typeOrClassName === 'string') {\n constructor = js.getClassByName(typeOrClassName);\n if (!constructor) {\n cc.errorID(3807, typeOrClassName);\n if (cc._RFpeek()) {\n cc.errorID(3808, typeOrClassName);\n }\n return null;\n }\n }\n else {\n if (!typeOrClassName) {\n cc.errorID(3804);\n return null;\n }\n constructor = typeOrClassName;\n }\n\n // check component\n\n if (typeof constructor !== 'function') {\n cc.errorID(3809);\n return null;\n }\n if (!js.isChildClassOf(constructor, cc.Component)) {\n cc.errorID(3810);\n return null;\n }\n\n if ((CC_EDITOR || CC_PREVIEW) && constructor._disallowMultiple) {\n if (!this._checkMultipleComp(constructor)) {\n return null;\n }\n }\n\n // check requirement\n\n var ReqComp = constructor._requireComponent;\n if (ReqComp && !this.getComponent(ReqComp)) {\n var depended = this.addComponent(ReqComp);\n if (!depended) {\n // depend conflicts\n return null;\n }\n }\n\n //// check conflict\n //\n //if (CC_EDITOR && !_Scene.DetectConflict.beforeAddComponent(this, constructor)) {\n // return null;\n //}\n\n //\n\n var component = new constructor();\n component.node = this;\n this._components.push(component);\n if ((CC_EDITOR || CC_TEST) && cc.engine && (this._id in cc.engine.attachedObjsForEditor)) {\n cc.engine.attachedObjsForEditor[component._id] = component;\n }\n if (this._activeInHierarchy) {\n cc.director._nodeActivator.activateComp(component);\n }\n\n return component;\n },\n\n /**\n * This api should only used by undo system\n * @method _addComponentAt\n * @param {Component} comp\n * @param {Number} index\n * @private\n */\n _addComponentAt: CC_EDITOR && function (comp, index) {\n if (this._objFlags & Destroying) {\n return cc.error('isDestroying');\n }\n if (!(comp instanceof cc.Component)) {\n return cc.errorID(3811);\n }\n if (index > this._components.length) {\n return cc.errorID(3812);\n }\n\n // recheck attributes because script may changed\n var ctor = comp.constructor;\n if (ctor._disallowMultiple) {\n if (!this._checkMultipleComp(ctor)) {\n return;\n }\n }\n var ReqComp = ctor._requireComponent;\n if (ReqComp && !this.getComponent(ReqComp)) {\n if (index === this._components.length) {\n // If comp should be last component, increase the index because required component added\n ++index;\n }\n var depended = this.addComponent(ReqComp);\n if (!depended) {\n // depend conflicts\n return null;\n }\n }\n\n comp.node = this;\n this._components.splice(index, 0, comp);\n if ((CC_EDITOR || CC_TEST) && cc.engine && (this._id in cc.engine.attachedObjsForEditor)) {\n cc.engine.attachedObjsForEditor[comp._id] = comp;\n }\n if (this._activeInHierarchy) {\n cc.director._nodeActivator.activateComp(comp);\n }\n },\n\n /**\n * !#en\n * Removes a component identified by the given name or removes the component object given.\n * You can also use component.destroy() if you already have the reference.\n * !#zh\n * 删除节点上的指定组件,传入参数可以是一个组件构造函数或组件名,也可以是已经获得的组件引用。\n * 如果你已经获得组件引用,你也可以直接调用 component.destroy()\n * @method removeComponent\n * @param {String|Function|Component} component - The need remove component.\n * @deprecated please destroy the component to remove it.\n * @example\n * node.removeComponent(cc.Sprite);\n * var Test = require(\"Test\");\n * node.removeComponent(Test);\n */\n removeComponent (component) {\n if (!component) {\n cc.errorID(3813);\n return;\n }\n if (!(component instanceof cc.Component)) {\n component = this.getComponent(component);\n }\n if (component) {\n component.destroy();\n }\n },\n\n /**\n * @method _getDependComponent\n * @param {Component} depended\n * @return {Component}\n * @private\n */\n _getDependComponent: CC_EDITOR && function (depended) {\n for (var i = 0; i < this._components.length; i++) {\n var comp = this._components[i];\n if (comp !== depended && comp.isValid && !cc.Object._willDestroy(comp)) {\n var depend = comp.constructor._requireComponent;\n if (depend && depended instanceof depend) {\n return comp;\n }\n }\n }\n return null;\n },\n\n // do remove component, only used internally\n _removeComponent (component) {\n if (!component) {\n cc.errorID(3814);\n return;\n }\n\n if (!(this._objFlags & Destroying)) {\n var i = this._components.indexOf(component);\n if (i !== -1) {\n this._components.splice(i, 1);\n if ((CC_EDITOR || CC_TEST) && cc.engine) {\n delete cc.engine.attachedObjsForEditor[component._id];\n }\n }\n else if (component.node !== this) {\n cc.errorID(3815);\n }\n }\n },\n\n destroy () {\n if (cc.Object.prototype.destroy.call(this)) {\n this.active = false;\n }\n },\n\n /**\n * !#en\n * Destroy all children from the node, and release all their own references to other objects.<br/>\n * Actual destruct operation will delayed until before rendering.\n * !#zh\n * 销毁所有子节点,并释放所有它们对其它对象的引用。<br/>\n * 实际销毁操作会延迟到当前帧渲染前执行。\n * @method destroyAllChildren\n * @example\n * node.destroyAllChildren();\n */\n destroyAllChildren () {\n var children = this._children;\n for (var i = 0; i < children.length; ++i) {\n children[i].destroy();\n }\n },\n\n _onSetParent (value) {},\n _onPostActivated () {},\n _onBatchCreated (dontSyncChildPrefab) {},\n\n _onHierarchyChanged (oldParent) {\n var newParent = this._parent;\n if (this._persistNode && !(newParent instanceof cc.Scene)) {\n cc.game.removePersistRootNode(this);\n if (CC_EDITOR) {\n cc.warnID(1623);\n }\n }\n\n if (CC_EDITOR || CC_TEST) {\n var scene = cc.director.getScene();\n var inCurrentSceneBefore = oldParent && oldParent.isChildOf(scene);\n var inCurrentSceneNow = newParent && newParent.isChildOf(scene);\n if (!inCurrentSceneBefore && inCurrentSceneNow) {\n // attached\n this._registerIfAttached(true);\n }\n else if (inCurrentSceneBefore && !inCurrentSceneNow) {\n // detached\n this._registerIfAttached(false);\n }\n\n // update prefab\n var newPrefabRoot = newParent && newParent._prefab && newParent._prefab.root;\n var myPrefabInfo = this._prefab;\n var PrefabUtils = Editor.require('scene://utils/prefab');\n if (myPrefabInfo) {\n if (newPrefabRoot) {\n if (myPrefabInfo.root !== newPrefabRoot) {\n if (myPrefabInfo.root === this) {\n // nest prefab\n myPrefabInfo.fileId || (myPrefabInfo.fileId = Editor.Utils.UuidUtils.uuid());\n PrefabUtils.checkCircularReference(myPrefabInfo.root);\n }\n else {\n // change prefab\n PrefabUtils.linkPrefab(newPrefabRoot._prefab.asset, newPrefabRoot, this);\n PrefabUtils.checkCircularReference(newPrefabRoot);\n }\n }\n }\n else if (myPrefabInfo.root === this) {\n // nested prefab to root prefab\n myPrefabInfo.fileId = ''; // root prefab doesn't have fileId\n }\n else {\n // detach from prefab\n PrefabUtils.unlinkPrefab(this);\n }\n }\n else if (newPrefabRoot) {\n // attach to prefab\n PrefabUtils.linkPrefab(newPrefabRoot._prefab.asset, newPrefabRoot, this);\n PrefabUtils.checkCircularReference(newPrefabRoot);\n }\n\n // conflict detection\n _Scene.DetectConflict.afterAddChild(this);\n }\n\n var shouldActiveNow = this._active && !!(newParent && newParent._activeInHierarchy);\n if (this._activeInHierarchy !== shouldActiveNow) {\n cc.director._nodeActivator.activateNode(this, shouldActiveNow);\n }\n },\n\n _instantiate (cloned, isSyncedNode) {\n if (!cloned) {\n cloned = cc.instantiate._clone(this, this);\n }\n\n var newPrefabInfo = cloned._prefab;\n if (CC_EDITOR && newPrefabInfo) {\n if (cloned === newPrefabInfo.root) {\n newPrefabInfo.fileId = '';\n }\n else {\n var PrefabUtils = Editor.require('scene://utils/prefab');\n PrefabUtils.unlinkPrefab(cloned);\n }\n }\n if (CC_EDITOR && cc.engine._isPlaying) {\n let syncing = newPrefabInfo && cloned === newPrefabInfo.root && newPrefabInfo.sync;\n if (!syncing) {\n cloned._name += ' (Clone)';\n }\n }\n\n // reset and init\n cloned._parent = null;\n cloned._onBatchCreated(isSyncedNode);\n\n return cloned;\n },\n\n _registerIfAttached: (CC_EDITOR || CC_TEST) && function (register) {\n var attachedObjsForEditor = cc.engine.attachedObjsForEditor;\n if (register) {\n attachedObjsForEditor[this._id] = this;\n for (let i = 0; i < this._components.length; i++) {\n let comp = this._components[i];\n attachedObjsForEditor[comp._id] = comp;\n }\n cc.engine.emit('node-attach-to-scene', this);\n }\n else {\n cc.engine.emit('node-detach-from-scene', this);\n delete attachedObjsForEditor[this._id];\n for (let i = 0; i < this._components.length; i++) {\n let comp = this._components[i];\n delete attachedObjsForEditor[comp._id];\n }\n }\n var children = this._children;\n for (let i = 0, len = children.length; i < len; ++i) {\n var child = children[i];\n child._registerIfAttached(register);\n }\n },\n\n _onPreDestroy () {\n var i, len;\n\n // marked as destroying\n this._objFlags |= Destroying;\n\n // detach self and children from editor\n var parent = this._parent;\n var destroyByParent = parent && (parent._objFlags & Destroying);\n if (!destroyByParent && (CC_EDITOR || CC_TEST)) {\n this._registerIfAttached(false);\n }\n\n // destroy children\n var children = this._children;\n for (i = 0, len = children.length; i < len; ++i) {\n // destroy immediate so its _onPreDestroy can be called\n children[i]._destroyImmediate();\n }\n\n // destroy self components\n for (i = 0, len = this._components.length; i < len; ++i) {\n var component = this._components[i];\n // destroy immediate so its _onPreDestroy can be called\n component._destroyImmediate();\n }\n\n var eventTargets = this.__eventTargets;\n for (i = 0, len = eventTargets.length; i < len; ++i) {\n var target = eventTargets[i];\n target && target.targetOff(this);\n }\n eventTargets.length = 0;\n\n // remove from persist\n if (this._persistNode) {\n cc.game.removePersistRootNode(this);\n }\n\n if (!destroyByParent) {\n // remove from parent\n if (parent) {\n var childIndex = parent._children.indexOf(this);\n parent._children.splice(childIndex, 1);\n parent.emit && parent.emit('child-removed', this);\n }\n }\n\n return destroyByParent;\n },\n\n onRestore: CC_EDITOR && function () {\n // check activity state\n var shouldActiveNow = this._active && !!(this._parent && this._parent._activeInHierarchy);\n if (this._activeInHierarchy !== shouldActiveNow) {\n cc.director._nodeActivator.activateNode(this, shouldActiveNow);\n }\n },\n});\n\nBaseNode.idGenerater = idGenerater;\n\n// For walk\nBaseNode._stacks = [[]];\nBaseNode._stackId = 0;\n\nBaseNode.prototype._onPreDestroyBase = BaseNode.prototype._onPreDestroy;\nif (CC_EDITOR) {\n BaseNode.prototype._onPreDestroy = function () {\n var destroyByParent = this._onPreDestroyBase();\n if (!destroyByParent) {\n // ensure this node can reattach to scene by undo system\n // (simulate some destruct logic to make undo system work correctly)\n this._parent = null;\n }\n return destroyByParent;\n };\n}\n\nBaseNode.prototype._onHierarchyChangedBase = BaseNode.prototype._onHierarchyChanged;\n\nif(CC_EDITOR) {\n BaseNode.prototype._onRestoreBase = BaseNode.prototype.onRestore;\n}\n\n// Define public getter and setter methods to ensure api compatibility.\nvar SameNameGetSets = ['parent', 'name', 'children', 'childrenCount',];\nmisc.propertyDefine(BaseNode, SameNameGetSets, {});\n\nif (CC_DEV) {\n // promote debug info\n js.get(BaseNode.prototype, ' INFO ', function () {\n var path = '';\n var node = this;\n while (node && !(node instanceof cc.Scene)) {\n if (path) {\n path = node.name + '/' + path;\n }\n else {\n path = node.name;\n }\n node = node._parent;\n }\n return this.name + ', path: ' + path;\n });\n}\n\n/**\n * !#en\n * Note: This event is only emitted from the top most node whose active value did changed,\n * not including its child nodes.\n * !#zh\n * 注意:此节点激活时,此事件仅从最顶部的节点发出。\n * @event active-in-hierarchy-changed\n * @param {Event.EventCustom} event\n */\n\ncc._BaseNode = module.exports = BaseNode;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar EPSILON = 1e-6;\n\n/**\n * Searches the entire sorted Array for an element and returns the index of the element.\n *\n * @method binarySearch\n * @param {number[]} array\n * @param {number} value\n * @return {number} The index of item in the sorted Array, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than item or, if there is no larger element, the bitwise complement of array's length.\n */\n// function binarySearch (array, value) {\n// for (var l = 0, h = array.length - 1, m = h >>> 1;\n// l <= h;\n// m = (l + h) >>> 1\n// ) {\n// var test = array[m];\n// if (test > value) {\n// h = m - 1;\n// }\n// else if (test < value) {\n// l = m + 1;\n// }\n// else {\n// return m;\n// }\n// }\n// return ~l;\n// }\n\n/**\n * Searches the entire sorted Array for an element and returns the index of the element.\n * It accepts iteratee which is invoked for value and each element of array to compute their sort ranking.\n * The iteratee is invoked with one argument: (value).\n *\n * @method binarySearchBy\n * @param {number[]} array\n * @param {number} value\n * @param {function} iteratee - the iteratee invoked per element\n * @return {number} The index of item in the sorted Array, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than item or, if there is no larger element, the bitwise complement of array's length.\n */\n// function binarySearchBy (array, value, iteratee) {\n// for (var l = 0, h = array.length - 1, m = h >>> 1;\n// l <= h;\n// m = (l + h) >>> 1\n// ) {\n// var test = iteratee(array[m]);\n// if (test > value) {\n// h = m - 1;\n// }\n// else if (test < value) {\n// l = m + 1;\n// }\n// else {\n// return m;\n// }\n// }\n// return ~l;\n// }\n\nfunction binarySearchEpsilon (array, value) {\n for (var l = 0, h = array.length - 1, m = h >>> 1;\n l <= h;\n m = (l + h) >>> 1\n ) {\n var test = array[m];\n if (test > value + EPSILON) {\n h = m - 1;\n }\n else if (test < value - EPSILON) {\n l = m + 1;\n }\n else {\n return m;\n }\n }\n return ~l;\n}\n\n\nmodule.exports = {\n binarySearchEpsilon\n};\n","\nconst RenderComponent = require('../components/CCRenderComponent');\nconst BlendFactor = require('../platform/CCMacro').BlendFactor;\nconst gfx = require('../../renderer/gfx');\n\n/**\n * !#en\n * Helper class for setting material blend function.\n * !#zh\n * 设置材质混合模式的辅助类。\n * @class BlendFunc\n */\nlet BlendFunc = cc.Class({\n properties: {\n _srcBlendFactor: BlendFactor.SRC_ALPHA,\n _dstBlendFactor: BlendFactor.ONE_MINUS_SRC_ALPHA,\n\n /**\n * !#en specify the source Blend Factor, this will generate a custom material object, please pay attention to the memory cost.\n * !#zh 指定原图的混合模式,这会克隆一个新的材质对象,注意这带来的开销\n * @property srcBlendFactor\n * @type {macro.BlendFactor}\n * @example\n * sprite.srcBlendFactor = cc.macro.BlendFactor.ONE;\n */\n srcBlendFactor: {\n get () {\n return this._srcBlendFactor;\n },\n set (value) {\n if (this._srcBlendFactor === value) return;\n this._srcBlendFactor = value;\n this._updateBlendFunc(true);\n this._onBlendChanged && this._onBlendChanged();\n },\n animatable: false,\n type: BlendFactor,\n tooltip: CC_DEV && 'i18n:COMPONENT.sprite.src_blend_factor',\n visible: true\n },\n\n /**\n * !#en specify the destination Blend Factor.\n * !#zh 指定目标的混合模式\n * @property dstBlendFactor\n * @type {macro.BlendFactor}\n * @example\n * sprite.dstBlendFactor = cc.macro.BlendFactor.ONE;\n */\n dstBlendFactor: {\n get () {\n return this._dstBlendFactor;\n },\n set (value) {\n if (this._dstBlendFactor === value) return;\n this._dstBlendFactor = value;\n this._updateBlendFunc(true);\n },\n animatable: false,\n type: BlendFactor,\n tooltip: CC_DEV && 'i18n:COMPONENT.sprite.dst_blend_factor',\n visible: true\n },\n },\n\n setMaterial (index, material) {\n let materialVar = RenderComponent.prototype.setMaterial.call(this, index, material);\n\n if (this._srcBlendFactor !== BlendFactor.SRC_ALPHA || this._dstBlendFactor !== BlendFactor.ONE_MINUS_SRC_ALPHA) {\n this._updateMaterialBlendFunc(materialVar);\n }\n\n return materialVar;\n },\n\n _updateMaterial () {\n this._updateBlendFunc();\n },\n\n _updateBlendFunc (force) {\n if (!force) {\n if (this._srcBlendFactor === BlendFactor.SRC_ALPHA && this._dstBlendFactor === BlendFactor.ONE_MINUS_SRC_ALPHA) {\n return;\n }\n }\n \n let materials = this.getMaterials();\n for (let i = 0; i < materials.length; i++) {\n let material = materials[i];\n this._updateMaterialBlendFunc(material);\n }\n },\n\n _updateMaterialBlendFunc (material) {\n material.setBlend(\n true,\n gfx.BLEND_FUNC_ADD,\n this._srcBlendFactor, this._dstBlendFactor,\n gfx.BLEND_FUNC_ADD,\n this._srcBlendFactor, this._dstBlendFactor\n );\n \n if (CC_JSB) {\n RenderComponent.prototype.markForRender.call(this, true);\n } \n },\n});\n\nmodule.exports = cc.BlendFunc = BlendFunc;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar Base64Values = require('./misc').BASE64_VALUES;\n\nvar HexChars = '0123456789abcdef'.split('');\n\nvar _t = ['', '', '', ''];\nvar UuidTemplate = _t.concat(_t, '-', _t, '-', _t, '-', _t, '-', _t, _t, _t);\nvar Indices = UuidTemplate.map(function (x, i) { return x === '-' ? NaN : i; }).filter(isFinite);\n\n// fcmR3XADNLgJ1ByKhqcC5Z -> fc991dd7-0033-4b80-9d41-c8a86a702e59\nmodule.exports = function (base64) {\n if (base64.length !== 22) {\n return base64;\n }\n UuidTemplate[0] = base64[0];\n UuidTemplate[1] = base64[1];\n for (var i = 2, j = 2; i < 22; i += 2) {\n var lhs = Base64Values[base64.charCodeAt(i)];\n var rhs = Base64Values[base64.charCodeAt(i + 1)];\n UuidTemplate[Indices[j++]] = HexChars[lhs >> 2];\n UuidTemplate[Indices[j++]] = HexChars[((lhs & 3) << 2) | rhs >> 4];\n UuidTemplate[Indices[j++]] = HexChars[rhs & 0xF];\n }\n return UuidTemplate.join('');\n};\n\nif (CC_TEST) {\n cc._Test.decodeUuid = module.exports;\n}\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * Finds a node by hierarchy path, the path is case-sensitive.\n * It will traverse the hierarchy by splitting the path using '/' character.\n * This function will still returns the node even if it is inactive.\n * It is recommended to not use this function every frame instead cache the result at startup.\n *\n * @method find\n * @static\n * @param {String} path\n * @param {Node} [referenceNode]\n * @return {Node|null} the node or null if not found\n */\ncc.find = module.exports = function (path, referenceNode) {\n if (path == null) {\n cc.errorID(3814);\n return null;\n }\n if (!referenceNode) {\n var scene = cc.director.getScene();\n if (!scene) {\n if (CC_DEV) {\n cc.warnID(5601);\n }\n return null;\n }\n else if (CC_DEV && !scene.isValid) {\n cc.warnID(5602);\n return null;\n }\n referenceNode = scene;\n }\n else if (CC_DEV && !referenceNode.isValid) {\n cc.warnID(5603);\n return null;\n }\n\n var match = referenceNode;\n var startIndex = (path[0] !== '/') ? 0 : 1; // skip first '/'\n var nameList = path.split('/');\n\n // parse path\n for (var n = startIndex; n < nameList.length; n++) {\n var name = nameList[n];\n var children = match._children;\n match = null;\n for (var t = 0, len = children.length; t < len; ++t) {\n var subChild = children[t];\n if (subChild.name === name) {\n match = subChild;\n break;\n }\n }\n if (!match) {\n return null;\n }\n }\n\n return match;\n};\n","\nimport MaterialVariant from '../assets/material/material-variant';\nconst Material = require('../assets/material/CCMaterial');\n\n/**\n * An internal helper class for switching render component's material between normal sprite material and gray sprite material.\n * @class GraySpriteState\n */\nlet GraySpriteState = cc.Class({\n properties: {\n _normalMaterial: null,\n\n /**\n * !#en The normal material.\n * !#zh 正常状态的材质。\n * @property normalMaterial\n * @type {Material}\n * @default null\n */\n normalMaterial: {\n get () {\n return this._normalMaterial;\n },\n set (val) {\n this._normalMaterial = val;\n this._updateDisabledState && this._updateDisabledState();\n },\n type: Material,\n tooltip: CC_DEV && 'i18n:COMPONENT.button.normal_material',\n animatable: false\n },\n\n _grayMaterial: null,\n\n /**\n * !#en The gray material.\n * !#zh 置灰状态的材质。\n * @property grayMaterial\n * @type {Material}\n * @default null\n */\n grayMaterial: {\n get () {\n return this._grayMaterial;\n },\n set (val) {\n this._grayMaterial = val;\n this._updateDisabledState && this._updateDisabledState();\n },\n type: Material,\n tooltip: CC_DEV && 'i18n:COMPONENT.button.gray_material',\n animatable: false\n }\n },\n \n _switchGrayMaterial (useGrayMaterial, renderComp) {\n let material;\n if (useGrayMaterial) {\n material = this._grayMaterial;\n if (!material) {\n material = Material.getBuiltinMaterial('2d-gray-sprite');\n }\n material = this._grayMaterial = MaterialVariant.create(material, renderComp);\n }\n else {\n material = this._normalMaterial;\n if (!material) {\n material = Material.getBuiltinMaterial('2d-sprite', renderComp);\n }\n material = this._normalMaterial = MaterialVariant.create(material, renderComp);\n }\n \n renderComp.setMaterial(0, material);\n }\n});\n\nmodule.exports = GraySpriteState;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar eventRegx = /^(click)(\\s)*=|(param)(\\s)*=/;\nvar imageAttrReg = /(\\s)*src(\\s)*=|(\\s)*height(\\s)*=|(\\s)*width(\\s)*=|(\\s)*align(\\s)*=|(\\s)*offset(\\s)*=|(\\s)*click(\\s)*=|(\\s)*param(\\s)*=/;\n/**\n * A utils class for parsing HTML texts. The parsed results will be an object array.\n */\nvar HtmlTextParser = function() {\n this._parsedObject = {};\n this._specialSymbolArray = [];\n this._specialSymbolArray.push([/&lt;/g, '<']);\n this._specialSymbolArray.push([/&gt;/g, '>']);\n this._specialSymbolArray.push([/&amp;/g, '&']);\n this._specialSymbolArray.push([/&quot;/g, '\"']);\n this._specialSymbolArray.push([/&apos;/g, '\\'']);\n this._specialSymbolArray.push([/&nbsp;/g, ' ']);\n};\n\nHtmlTextParser.prototype = {\n constructor: HtmlTextParser,\n parse: function(htmlString) {\n this._resultObjectArray = [];\n if (!htmlString) {\n return this._resultObjectArray;\n }\n this._stack = [];\n\n var startIndex = 0;\n var length = htmlString.length;\n while (startIndex < length) {\n var tagEndIndex = htmlString.indexOf('>', startIndex);\n var tagBeginIndex = -1;\n if (tagEndIndex >= 0) {\n tagBeginIndex = htmlString.lastIndexOf('<', tagEndIndex);\n var noTagBegin = tagBeginIndex < (startIndex - 1);\n\n if (noTagBegin) {\n tagBeginIndex = htmlString.indexOf('<', tagEndIndex + 1);\n tagEndIndex = htmlString.indexOf('>', tagBeginIndex + 1);\n }\n }\n\n if (tagBeginIndex < 0) {\n this._stack.pop();\n this._processResult(htmlString.substring(startIndex));\n startIndex = length;\n } else {\n var newStr = htmlString.substring(startIndex, tagBeginIndex);\n var tagStr = htmlString.substring(tagBeginIndex + 1, tagEndIndex);\n if (tagStr === \"\") newStr = htmlString.substring(startIndex, tagEndIndex + 1);\n this._processResult(newStr);\n if (tagEndIndex === -1) {\n // cc.error('The HTML tag is invalid!');\n tagEndIndex = tagBeginIndex;\n } else if (htmlString.charAt(tagBeginIndex + 1) === '\\/'){\n this._stack.pop();\n } else {\n this._addToStack(tagStr);\n }\n startIndex = tagEndIndex + 1;\n }\n }\n\n\n return this._resultObjectArray;\n },\n\n _attributeToObject: function (attribute) {\n attribute = attribute.trim();\n\n var obj = {};\n var header = attribute.match(/^(color|size)(\\s)*=/);\n var tagName;\n var nextSpace;\n var eventObj;\n var eventHanlderString;\n if (header) {\n tagName = header[0];\n attribute = attribute.substring(tagName.length).trim();\n if(attribute === \"\") return obj;\n\n //parse color\n nextSpace = attribute.indexOf(' ');\n switch(tagName[0]){\n case 'c':\n if (nextSpace > -1) {\n obj.color = attribute.substring(0, nextSpace).trim();\n } else {\n obj.color = attribute;\n }\n break;\n case 's':\n obj.size = parseInt(attribute);\n break;\n }\n\n //tag has event arguments\n if(nextSpace > -1) {\n eventHanlderString = attribute.substring(nextSpace+1).trim();\n eventObj = this._processEventHandler(eventHanlderString);\n obj.event = eventObj;\n }\n return obj;\n }\n\n header = attribute.match(/^(br(\\s)*\\/)/);\n if(header && header[0].length > 0) {\n tagName = header[0].trim();\n if(tagName.startsWith(\"br\") && tagName[tagName.length-1] === \"/\") {\n obj.isNewLine = true;\n this._resultObjectArray.push({text: \"\", style: {newline: true}});\n return obj;\n }\n }\n\n header = attribute.match(/^(img(\\s)*src(\\s)*=[^>]+\\/)/);\n if(header && header[0].length > 0) {\n tagName = header[0].trim();\n if(tagName.startsWith(\"img\") && tagName[tagName.length-1] === \"/\") {\n header = attribute.match(imageAttrReg);\n var tagValue;\n var remainingArgument;\n var isValidImageTag = false;\n while (header) {\n //skip the invalid tags at first\n attribute = attribute.substring(attribute.indexOf(header[0]));\n tagName = attribute.substr(0, header[0].length);\n //remove space and = character\n remainingArgument = attribute.substring(tagName.length).trim();\n nextSpace = remainingArgument.indexOf(' ');\n\n tagValue = (nextSpace > -1) ? remainingArgument.substr(0, nextSpace) : remainingArgument;\n tagName = tagName.replace(/[^a-zA-Z]/g, \"\").trim();\n tagName = tagName.toLocaleLowerCase();\n\n attribute = remainingArgument.substring(nextSpace).trim();\n if ( tagValue.endsWith( '\\/' ) ) tagValue = tagValue.slice( 0, -1 );\n if (tagName === \"src\") {\n switch (tagValue.charCodeAt(0)) {\n case 34: // \"\n case 39: // '\n isValidImageTag = true;\n tagValue = tagValue.slice(1, -1);\n break;\n }\n obj.isImage = true;\n obj.src = tagValue;\n } else if (tagName === \"height\") {\n obj.imageHeight = parseInt(tagValue);\n } else if (tagName === \"width\") {\n obj.imageWidth = parseInt(tagValue);\n } else if (tagName === \"align\") {\n switch (tagValue.charCodeAt(0)) {\n case 34: // \"\n case 39: // '\n tagValue = tagValue.slice(1, -1);\n break;\n }\n obj.imageAlign = tagValue.toLocaleLowerCase();\n } else if (tagName === \"offset\") {\n obj.imageOffset = tagValue;\n } else if (tagName === \"click\") {\n obj.event = this._processEventHandler(tagName + \"=\" + tagValue);\n }\n\n if (obj.event && tagName === 'param') {\n obj.event.param = tagValue.replace(/^\\\"|\\\"$/g, '');\n }\n\n header = attribute.match(imageAttrReg);\n }\n\n if( isValidImageTag && obj.isImage ) {\n this._resultObjectArray.push({text: \"\", style: obj});\n }\n\n return {};\n }\n }\n\n header = attribute.match(/^(outline(\\s)*[^>]*)/);\n if (header) {\n attribute = header[0].substring(\"outline\".length).trim();\n var defaultOutlineObject = {color: \"#ffffff\", width: 1};\n if (attribute) {\n var outlineAttrReg = /(\\s)*color(\\s)*=|(\\s)*width(\\s)*=|(\\s)*click(\\s)*=|(\\s)*param(\\s)*=/;\n header = attribute.match(outlineAttrReg);\n var tagValue;\n while (header) {\n //skip the invalid tags at first\n attribute = attribute.substring(attribute.indexOf(header[0]));\n tagName = attribute.substr(0, header[0].length);\n //remove space and = character\n remainingArgument = attribute.substring(tagName.length).trim();\n nextSpace = remainingArgument.indexOf(' ');\n if (nextSpace > -1) {\n tagValue = remainingArgument.substr(0, nextSpace);\n } else {\n tagValue = remainingArgument;\n }\n tagName = tagName.replace(/[^a-zA-Z]/g, \"\").trim();\n tagName = tagName.toLocaleLowerCase();\n\n attribute = remainingArgument.substring(nextSpace).trim();\n if (tagName === \"click\") {\n obj.event = this._processEventHandler(tagName + \"=\" + tagValue);\n } else if (tagName === \"color\") {\n defaultOutlineObject.color = tagValue;\n } else if (tagName === \"width\") {\n defaultOutlineObject.width = parseInt(tagValue);\n }\n\n if (obj.event && tagName === 'param') {\n obj.event.param = tagValue.replace(/^\\\"|\\\"$/g, '');\n }\n\n header = attribute.match(outlineAttrReg);\n }\n }\n obj.outline = defaultOutlineObject;\n }\n\n header = attribute.match(/^(on|u|b|i)(\\s)*/);\n if(header && header[0].length > 0) {\n tagName = header[0];\n attribute = attribute.substring(tagName.length).trim();\n switch(tagName[0]){\n case 'u':\n obj.underline = true;\n break;\n case 'i':\n obj.italic = true;\n break;\n case 'b':\n obj.bold = true;\n break;\n }\n if(attribute === \"\") {\n return obj;\n }\n eventObj = this._processEventHandler(attribute);\n obj.event = eventObj;\n }\n\n return obj;\n },\n\n _processEventHandler: function (eventString) {\n var index = 0;\n var obj = {};\n var eventNames = eventString.match(eventRegx);\n var isValidTag = false;\n while(eventNames) {\n var eventName = eventNames[0];\n var eventValue = \"\";\n isValidTag = false;\n eventString = eventString.substring(eventName.length).trim();\n if(eventString.charAt(0) === \"\\\"\") {\n index = eventString.indexOf(\"\\\"\", 1);\n if (index > -1) {\n eventValue = eventString.substring(1, index).trim();\n isValidTag = true;\n }\n index++;\n } else if(eventString.charAt(0) === \"\\'\") {\n index = eventString.indexOf('\\'', 1);\n if(index > -1) {\n eventValue = eventString.substring(1, index).trim();\n isValidTag = true;\n }\n index++;\n } else {\n //skip the invalid attribute value\n var match = eventString.match(/(\\S)+/);\n if(match) {\n eventValue = match[0];\n } else {\n eventValue = \"\";\n }\n index = eventValue.length;\n }\n\n if(isValidTag) {\n eventName = eventName.substring(0, eventName.length-1).trim();\n obj[eventName] = eventValue;\n }\n\n eventString = eventString.substring(index).trim();\n eventNames = eventString.match(eventRegx);\n }\n\n return obj;\n },\n\n _addToStack: function(attribute) {\n var obj = this._attributeToObject(attribute);\n\n if (this._stack.length === 0){\n this._stack.push(obj);\n } else {\n if(obj.isNewLine || obj.isImage) {\n return;\n }\n //for nested tags\n var previousTagObj = this._stack[this._stack.length - 1];\n for (var key in previousTagObj) {\n if (!(obj[key])) {\n obj[key] = previousTagObj[key];\n }\n }\n this._stack.push(obj);\n }\n },\n\n _processResult: function(value) {\n if (value === \"\") {\n return;\n }\n\n value = this._escapeSpecialSymbol(value);\n if (this._stack.length > 0) {\n this._resultObjectArray.push({text: value, style: this._stack[this._stack.length - 1]});\n } else {\n this._resultObjectArray.push({text: value});\n }\n },\n\n _escapeSpecialSymbol: function(str) {\n for(var i = 0; i < this._specialSymbolArray.length; ++i) {\n var key = this._specialSymbolArray[i][0];\n var value = this._specialSymbolArray[i][1];\n\n str = str.replace(key, value);\n }\n return str;\n }\n};\n\nif (CC_TEST) {\n cc._Test.HtmlTextParser = HtmlTextParser;\n}\n\nmodule.exports = HtmlTextParser;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n \nrequire('./CCPath');\nif (!CC_EDITOR) {\n require('./profiler/CCProfiler');\n}\nrequire('./find');\nrequire('./mutable-forward-iterator');\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar js = require('../platform/js');\n\n/**\n * misc utilities\n * @class misc\n * @static\n */\nvar misc = {};\n\nmisc.propertyDefine = function (ctor, sameNameGetSets, diffNameGetSets) {\n function define (np, propName, getter, setter) {\n var pd = Object.getOwnPropertyDescriptor(np, propName);\n if (pd) {\n if (pd.get) np[getter] = pd.get;\n if (pd.set && setter) np[setter] = pd.set;\n }\n else {\n var getterFunc = np[getter];\n if (CC_DEV && !getterFunc) {\n var clsName = (cc.Class._isCCClass(ctor) && js.getClassName(ctor)) ||\n ctor.name ||\n '(anonymous class)';\n cc.warnID(5700, propName, getter, clsName);\n }\n else {\n js.getset(np, propName, getterFunc, np[setter]);\n }\n }\n }\n var propName, np = ctor.prototype;\n for (var i = 0; i < sameNameGetSets.length; i++) {\n propName = sameNameGetSets[i];\n var suffix = propName[0].toUpperCase() + propName.slice(1);\n define(np, propName, 'get' + suffix, 'set' + suffix);\n }\n for (propName in diffNameGetSets) {\n var getset = diffNameGetSets[propName];\n define(np, propName, getset[0], getset[1]);\n }\n};\n\n/**\n * @param {Number} x\n * @return {Number}\n * Constructor\n */\nmisc.NextPOT = function (x) {\n x = x - 1;\n x = x | (x >> 1);\n x = x | (x >> 2);\n x = x | (x >> 4);\n x = x | (x >> 8);\n x = x | (x >> 16);\n return x + 1;\n};\n\n//var DirtyFlags = m.DirtyFlags = {\n// TRANSFORM: 1 << 0,\n// SIZE: 1 << 1,\n// //Visible:\n// //Color:\n// //Opacity\n// //Cache\n// //Order\n// //Text\n// //Gradient\n// ALL: (1 << 2) - 1\n//};\n//\n//DirtyFlags.WIDGET = DirtyFlags.TRANSFORM | DirtyFlags.SIZE;\n\nif (CC_EDITOR) {\n // use anonymous function here to ensure it will not being hoisted without CC_EDITOR\n\n misc.tryCatchFunctor_EDITOR = function (funcName) {\n return Function('target',\n 'try {\\n' +\n ' target.' + funcName + '();\\n' +\n '}\\n' +\n 'catch (e) {\\n' +\n ' cc._throw(e);\\n' +\n '}');\n };\n}\n\nmisc.BUILTIN_CLASSID_RE = /^(?:cc|dragonBones|sp|ccsg)\\..+/;\n\n\nvar BASE64_KEYS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\nvar BASE64_VALUES = new Array(123); // max char code in base64Keys\nfor (let i = 0; i < 123; ++i) BASE64_VALUES[i] = 64; // fill with placeholder('=') index\nfor (let i = 0; i < 64; ++i) BASE64_VALUES[BASE64_KEYS.charCodeAt(i)] = i;\n\n// decoded value indexed by base64 char code\nmisc.BASE64_VALUES = BASE64_VALUES;\n\n// set value to map, if key exists, push to array\nmisc.pushToMap = function (map, key, value, pushFront) {\n var exists = map[key];\n if (exists) {\n if (Array.isArray(exists)) {\n if (pushFront) {\n exists.push(exists[0]);\n exists[0] = value;\n }\n else {\n exists.push(value);\n }\n }\n else {\n map[key] = (pushFront ? [value, exists] : [exists, value]);\n }\n }\n else {\n map[key] = value;\n }\n};\n\n/**\n * !#en Clamp a value between from and to.\n * !#zh\n * 限定浮点数的最大最小值。<br/>\n * 数值大于 max_inclusive 则返回 max_inclusive。<br/>\n * 数值小于 min_inclusive 则返回 min_inclusive。<br/>\n * 否则返回自身。\n * @method clampf\n * @param {Number} value\n * @param {Number} min_inclusive\n * @param {Number} max_inclusive\n * @return {Number}\n * @example\n * var v1 = cc.misc.clampf(20, 0, 20); // 20;\n * var v2 = cc.misc.clampf(-1, 0, 20); // 0;\n * var v3 = cc.misc.clampf(10, 0, 20); // 10;\n */\nmisc.clampf = function (value, min_inclusive, max_inclusive) {\n if (min_inclusive > max_inclusive) {\n var temp = min_inclusive;\n min_inclusive = max_inclusive;\n max_inclusive = temp;\n }\n return value < min_inclusive ? min_inclusive : value < max_inclusive ? value : max_inclusive;\n};\n\n/**\n * !#en Clamp a value between 0 and 1.\n * !#zh 限定浮点数的取值范围为 0 ~ 1 之间。\n * @method clamp01\n * @param {Number} value\n * @return {Number}\n * @example\n * var v1 = cc.misc.clamp01(20); // 1;\n * var v2 = cc.misc.clamp01(-1); // 0;\n * var v3 = cc.misc.clamp01(0.5); // 0.5;\n */\nmisc.clamp01 = function (value) {\n return value < 0 ? 0 : value < 1 ? value : 1;\n};\n\n/**\n * Linear interpolation between 2 numbers, the ratio sets how much it is biased to each end\n * @method lerp\n * @param {Number} a number A\n * @param {Number} b number B\n * @param {Number} r ratio between 0 and 1\n * @return {Number}\n * @example {@link cocos2d/core/platform/CCMacro/lerp.js}\n */\nmisc.lerp = function (a, b, r) {\n return a + (b - a) * r;\n};\n\n/**\n * converts degrees to radians\n * @param {Number} angle\n * @return {Number}\n * @method degreesToRadians\n */\nmisc.degreesToRadians = function (angle) {\n return angle * cc.macro.RAD;\n};\n\n/**\n * converts radians to degrees\n * @param {Number} angle\n * @return {Number}\n * @method radiansToDegrees\n */\nmisc.radiansToDegrees = function (angle) {\n return angle * cc.macro.DEG;\n};\n\ncc.misc = module.exports = misc;","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * @example\n * var array = [0, 1, 2, 3, 4];\n * var iterator = new cc.js.array.MutableForwardIterator(array);\n * for (iterator.i = 0; iterator.i < array.length; ++iterator.i) {\n * var item = array[iterator.i];\n * ...\n * }\n */\nfunction MutableForwardIterator (array) {\n this.i = 0;\n this.array = array;\n}\n\nvar proto = MutableForwardIterator.prototype;\n\nproto.remove = function (value) {\n var index = this.array.indexOf(value);\n if (index >= 0) {\n this.removeAt(index);\n }\n};\nproto.removeAt = function (i) {\n this.array.splice(i, 1);\n\n if (i <= this.i) {\n --this.i;\n }\n};\nproto.fastRemove = function (value) {\n var index = this.array.indexOf(value);\n if (index >= 0) {\n this.fastRemoveAt(index);\n }\n};\nproto.fastRemoveAt = function (i) {\n var array = this.array;\n array[i] = array[array.length - 1];\n --array.length;\n\n if (i <= this.i) {\n --this.i;\n }\n};\n\nproto.push = function (item) {\n this.array.push(item);\n};\n\n//js.getset(proto, 'length',\n// function () {\n// return this.array.length;\n// },\n// function (len) {\n// this.array.length = len;\n// if (this.i >= len) {\n// this.i = len - 1;\n// }\n// }\n//);\n\nmodule.exports = MutableForwardIterator;\n","\nexport default class Pool {\n enabled = false;\n count = 0;\n maxSize = 1024;\n\n get () {\n\n }\n put () {\n\n }\n clear () {\n\n }\n}\n\ncc.pool = {};\n\nPool.register = function (name, pool) {\n cc.pool[name] = pool;\n}\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\ncc._PrefabInfo = cc.Class({\n name: 'cc.PrefabInfo',\n // extends: require('../platform/CCObject'),\n properties: {\n // the most top node of this prefab\n root: null,\n\n // 所属的 prefab 资源对象 (cc.Prefab)\n // In Editor, only asset._uuid is usable because asset will be changed.\n asset: null,\n\n // To identify the node in the prefab asset, so only needs to be unique.\n // Not available in the root node.\n fileId: '',\n\n // Indicates whether this node should always synchronize with the prefab asset, only available in the root node\n sync: false,\n },\n});\n\n// prefab helper function\nmodule.exports = {\n // update node to make it sync with prefab\n syncWithPrefab: function (node) {\n var _prefab = node._prefab;\n\n if (!_prefab.asset) {\n if (CC_EDITOR) {\n var NodeUtils = Editor.require('scene://utils/node');\n var PrefabUtils = Editor.require('scene://utils/prefab');\n\n cc.warn(Editor.T('MESSAGE.prefab.missing_prefab', { node: NodeUtils.getNodePath(node) }));\n node.name += PrefabUtils.MISSING_PREFAB_SUFFIX;\n }\n else {\n cc.errorID(3701, node.name);\n }\n node._prefab = null;\n return;\n }\n\n // save root's preserved props to avoid overwritten by prefab\n var _objFlags = node._objFlags;\n var _parent = node._parent;\n var _id = node._id;\n var _name = node._name;\n var _active = node._active;\n var eulerAnglesX = node._eulerAngles.x;\n var eulerAnglesY = node._eulerAngles.y;\n var eulerAnglesZ = node._eulerAngles.z;\n var _localZOrder = node._localZOrder;\n var trs = node._trs;\n var x = trs[0];\n var y = trs[1];\n var z = trs[2];\n\n // instantiate prefab\n cc.game._isCloning = true;\n if (CC_SUPPORT_JIT) {\n _prefab.asset._doInstantiate(node);\n }\n else {\n // root in prefab asset is always synced\n var prefabRoot = _prefab.asset.data;\n\n // use node as the instantiated prefabRoot to make references to prefabRoot in prefab redirect to node\n prefabRoot._iN$t = node;\n\n // instantiate prefab and apply to node\n cc.instantiate._clone(prefabRoot, prefabRoot);\n }\n cc.game._isCloning = false;\n\n // restore preserved props\n node._objFlags = _objFlags;\n node._parent = _parent;\n node._id = _id;\n node._prefab = _prefab;\n node._name = _name;\n node._active = _active;\n node._localZOrder = _localZOrder;\n trs = node._trs;\n trs[0] = x;\n trs[1] = y;\n trs[2] = z;\n node._eulerAngles.x = eulerAnglesX;\n node._eulerAngles.y = eulerAnglesY;\n node._eulerAngles.z = eulerAnglesZ;\n }\n};\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nvar macro = require('../../platform/CCMacro');\n\nconst PerfCounter = require('./perf-counter');\n\nlet _showFPS = false;\nlet _fontSize = 15;\n\nlet _stats = null;\nlet _rootNode = null;\nlet _label = null;\n\nfunction generateStats () {\n if (_stats) return;\n \n _stats = {\n fps: { desc: 'Framerate (FPS)', below: 30, average: 500 },\n draws: { desc: 'Draw Call' },\n frame: { desc: 'Frame time (ms)', min: 0, max: 50, average: 500 },\n logic: { desc: 'Game Logic (ms)', min: 0, max: 50, average: 500, color: '#080' },\n render: { desc: 'Renderer (ms)', min: 0, max: 50, average: 500, color: '#f90' },\n mode: { desc: cc.game.renderType === cc.game.RENDER_TYPE_WEBGL ? 'WebGL' : 'Canvas', min: 1 }\n };\n\n let now = performance.now();\n for (let id in _stats) {\n _stats[id]._counter = new PerfCounter(id, _stats[id], now);\n }\n}\n\nfunction generateNode () {\n if (_rootNode && _rootNode.isValid) return;\n\n\n _rootNode = new cc.Node('PROFILER-NODE');\n _rootNode.x = _rootNode.y = 10;\n\n _rootNode.groupIndex = cc.Node.BuiltinGroupIndex.DEBUG;\n cc.Camera._setupDebugCamera();\n\n _rootNode.zIndex = macro.MAX_ZINDEX;\n cc.game.addPersistRootNode(_rootNode);\n\n let left = new cc.Node('LEFT-PANEL');\n left.anchorX = left.anchorY = 0;\n let leftLabel = left.addComponent(cc.Label);\n leftLabel.fontSize = _fontSize;\n leftLabel.lineHeight = _fontSize;\n left.parent = _rootNode;\n\n let right = new cc.Node('RIGHT-PANEL');\n right.anchorX = 1;\n right.anchorY = 0;\n right.x = 200;\n let rightLabel = right.addComponent(cc.Label);\n rightLabel.horizontalAlign = cc.Label.HorizontalAlign.RIGHT;\n rightLabel.fontSize = _fontSize;\n rightLabel.lineHeight = _fontSize;\n right.parent = _rootNode;\n if (cc.sys.platform !== cc.sys.BAIDU_GAME_SUB &&\n cc.sys.platform !== cc.sys.WECHAT_GAME_SUB) {\n leftLabel.cacheMode = cc.Label.CacheMode.CHAR;\n rightLabel.cacheMode = cc.Label.CacheMode.CHAR;\n }\n\n _label = {\n left: leftLabel,\n right: rightLabel\n };\n}\n\nfunction beforeUpdate () {\n generateNode();\n\n let now = cc.director._lastUpdate;\n _stats['frame']._counter.start(now);\n _stats['logic']._counter.start(now);\n}\n\nfunction afterUpdate () {\n let now = performance.now();\n if (cc.director.isPaused()) {\n _stats['frame']._counter.start(now);\n }\n else {\n _stats['logic']._counter.end(now);\n }\n _stats['render']._counter.start(now);\n}\n\nfunction updateLabel (stat) {\n let length = 20;\n let desc = stat.desc;\n let value = stat._counter.human() + '';\n stat.label.string = stat.desc + ' ' + stat._counter.human();\n}\n\nfunction afterDraw () {\n let now = performance.now();\n _stats['render']._counter.end(now);\n _stats['draws']._counter.value = cc.renderer.drawCalls;\n _stats['frame']._counter.end(now);\n _stats['fps']._counter.frame(now);\n \n let left = '';\n let right = '';\n for (let id in _stats) {\n let stat = _stats[id];\n stat._counter.sample(now);\n\n left += stat.desc + '\\n';\n right += stat._counter.human() + '\\n';\n }\n\n if (_label) {\n _label.left.string = left;\n _label.right.string = right;\n }\n}\n\ncc.profiler = module.exports = {\n isShowingStats () {\n return _showFPS;\n },\n\n hideStats () {\n if (_showFPS) {\n if (_rootNode) {\n _rootNode.active = false;\n }\n\n cc.director.off(cc.Director.EVENT_BEFORE_UPDATE, beforeUpdate);\n cc.director.off(cc.Director.EVENT_AFTER_UPDATE, afterUpdate);\n cc.director.off(cc.Director.EVENT_AFTER_DRAW, afterDraw);\n _showFPS = false;\n }\n },\n\n showStats () {\n if (!_showFPS) {\n generateStats();\n\n if (_rootNode) {\n _rootNode.active = true;\n }\n\n cc.director.on(cc.Director.EVENT_BEFORE_UPDATE, beforeUpdate);\n cc.director.on(cc.Director.EVENT_AFTER_UPDATE, afterUpdate);\n cc.director.on(cc.Director.EVENT_AFTER_DRAW, afterDraw);\n _showFPS = true;\n }\n }\n}\n","let Counter = cc.Class({\n name: 'cc.Counter',\n ctor (id, opts, now) {\n this._id = id;\n this._opts = opts || {};\n\n this._value = 0;\n this._total = 0;\n this._averageValue = 0;\n this._accumValue = 0;\n this._accumSamples = 0;\n this._accumStart = now;\n },\n\n properties: {\n value: {\n get () {\n return this._value;\n },\n set (v) {\n this._value = v;\n }\n }\n },\n\n _average (v, now) {\n if (this._opts.average) {\n this._accumValue += v;\n ++this._accumSamples;\n\n let t = now;\n if (t - this._accumStart >= this._opts.average) {\n this._averageValue = this._accumValue / this._accumSamples;\n this._accumValue = 0;\n this._accumStart = t;\n this._accumSamples = 0;\n }\n }\n },\n\n sample (now) {\n this._average(this._value, now);\n },\n\n human () {\n let v = this._opts.average ? this._averageValue : this._value;\n return Math.round(v * 100) / 100;\n },\n\n alarm () {\n return (\n (this._opts.below && this._value < this._opts.below) ||\n (this._opts.over && this._value > this._opts.over)\n );\n }\n})\n\nmodule.exports = Counter;\n","const Counter = require('./counter');\n\nlet PerfCounter = cc.Class({\n name: 'cc.PerfCounter',\n extends: Counter,\n \n ctor (id, opts, now) {\n // DISABLE\n // this._idstart = `${id}_start`;\n // this._idend = `${id}_end`;\n\n this._time = now;\n },\n\n start(now) {\n this._time = now;\n\n // DISABLE: long time running will cause performance drop down\n // window.performance.mark(this._idstart);\n },\n\n end(now) {\n this._value = now - this._time;\n\n // DISABLE: long time running will cause performance drop down\n // window.performance.mark(this._idend);\n // window.performance.measure(this._id, this._idstart, this._idend);\n\n this._average(this._value);\n },\n\n tick() {\n this.end();\n this.start();\n },\n\n frame(now) {\n let t = now;\n let e = t - this._time;\n this._total++;\n let avg = this._opts.average || 1000;\n\n if (e > avg) {\n this._value = this._total * 1000 / e;\n this._total = 0;\n this._time = t;\n this._average(this._value);\n }\n }\n});\n\nmodule.exports = PerfCounter;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport js from '../platform/js'\n\n// Draw text the textBaseline ratio (Can adjust the appropriate baseline ratio based on the platform)\nlet _BASELINE_RATIO = 0.26;\nlet _BASELINE_OFFSET = 0;\nif (CC_RUNTIME) {\n _BASELINE_OFFSET = _BASELINE_RATIO * 2 / 3;\n}\n\nconst MAX_CACHE_SIZE = 100;\n\nlet pool = new js.Pool(2);\npool.get = function () {\n var node = this._get() || {\n key: null,\n value: null,\n prev: null,\n next: null\n };\n\n return node;\n};\n\nfunction LRUCache(size) {\n this.count = 0;\n this.limit = size;\n this.datas = {};\n this.head = null;\n this.tail = null;\n}\n\nLRUCache.prototype.moveToHead = function (node) {\n node.next = this.head;\n node.prev = null;\n if (this.head !== null) \n this.head.prev = node;\n this.head = node;\n if (this.tail === null) \n this.tail = node;\n this.count++;\n this.datas[node.key] = node;\n}\n\nLRUCache.prototype.put = function (key, value) {\n const node = pool.get();\n node.key = key;\n node.value = value;\n \n if (this.count >= this.limit) {\n let discard = this.tail;\n delete this.datas[discard.key];\n this.count--;\n this.tail = discard.prev;\n this.tail.next = null;\n discard.prev = null;\n discard.next = null;\n pool.put(discard);\n }\n this.moveToHead(node);\n}\n\nLRUCache.prototype.remove = function (node) {\n if (node.prev !== null) {\n node.prev.next = node.next;\n } else {\n this.head = node.next;\n }\n if (node.next !== null) {\n node.next.prev = node.prev;\n } else {\n this.tail = node.prev;\n }\n delete this.datas[node.key];\n this.count--;\n}\n\nLRUCache.prototype.get = function (key) {\n const node = this.datas[key];\n if (node) {\n this.remove(node);\n this.moveToHead(node);\n return node.value;\n }\n return null;\n}\n\nLRUCache.prototype.clear = function () {\n this.count = 0;\n this.datas = {};\n this.head = null;\n this.tail = null;\n}\n\nLRUCache.prototype.has = function (key) {\n return !!this.datas[key];\n}\n\nLRUCache.prototype.delete = function (key) {\n const node = this.datas[key];\n this.remove(node);\n}\n\nlet measureCache = new LRUCache(MAX_CACHE_SIZE);\n\nvar textUtils = {\n\n BASELINE_RATIO: _BASELINE_RATIO,\n MIDDLE_RATIO: (_BASELINE_RATIO + 1) / 2 - _BASELINE_RATIO,\n BASELINE_OFFSET: _BASELINE_OFFSET,\n\n label_wordRex : /([a-zA-Z0-9ÄÖÜäöüßéèçàùêâîôûа-яА-ЯЁё]+|\\S)/,\n label_symbolRex : /^[!,.:;'}\\]%\\?>、‘“》?。,!]/,\n label_lastWordRex : /([a-zA-Z0-9ÄÖÜäöüßéèçàùêâîôûаíìÍÌïÁÀáàÉÈÒÓòóŐőÙÚŰúűñÑæÆœŒÃÂãÔõěščřžýáíéóúůťďňĚŠČŘŽÁÍÉÓÚŤżźśóńłę湯ŹŚÓŃŁĘĆĄ-яА-ЯЁё]+|\\S)$/,\n label_lastEnglish : /[a-zA-Z0-9ÄÖÜäöüßéèçàùêâîôûаíìÍÌïÁÀáàÉÈÒÓòóŐőÙÚŰúűñÑæÆœŒÃÂãÔõěščřžýáíéóúůťďňĚŠČŘŽÁÍÉÓÚŤżźśóńłę湯ŹŚÓŃŁĘĆĄ-яА-ЯЁё]+$/,\n label_firstEnglish : /^[a-zA-Z0-9ÄÖÜäöüßéèçàùêâîôûаíìÍÌïÁÀáàÉÈÒÓòóŐőÙÚŰúűñÑæÆœŒÃÂãÔõěščřžýáíéóúůťďňĚŠČŘŽÁÍÉÓÚŤżźśóńłę湯ŹŚÓŃŁĘĆĄ-яА-ЯЁё]/,\n // The unicode standard will never assign a character from code point 0xD800 to 0xDFFF\n // high surrogate (0xD800-0xDBFF) and low surrogate(0xDC00-0xDFFF) combines to a character on the Supplementary Multilingual Plane\n // reference: https://en.wikipedia.org/wiki/UTF-16\n highSurrogateRex: /[\\uD800-\\uDBFF]/,\n lowSurrogateRex: /[\\uDC00-\\uDFFF]/,\n label_wrapinspection : true,\n\n __CHINESE_REG: /^[\\u4E00-\\u9FFF\\u3400-\\u4DFF]+$/,\n __JAPANESE_REG: /[\\u3000-\\u303F]|[\\u3040-\\u309F]|[\\u30A0-\\u30FF]|[\\uFF00-\\uFFEF]|[\\u4E00-\\u9FAF]|[\\u2605-\\u2606]|[\\u2190-\\u2195]|\\u203B/g,\n __KOREAN_REG: /^[\\u1100-\\u11FF]|[\\u3130-\\u318F]|[\\uA960-\\uA97F]|[\\uAC00-\\uD7AF]|[\\uD7B0-\\uD7FF]+$/,\n\n isUnicodeCJK: function(ch) {\n return this.__CHINESE_REG.test(ch) || this.__JAPANESE_REG.test(ch) || this.__KOREAN_REG.test(ch);\n },\n\n //Checking whether the character is a whitespace\n isUnicodeSpace: function(ch) {\n ch = ch.charCodeAt(0);\n return ((ch >= 9 && ch <= 13) || ch === 32 || ch === 133 || ch === 160 || ch === 5760 || (ch >= 8192 && ch <= 8202) || ch === 8232 || ch === 8233 || ch === 8239 || ch === 8287 || ch === 12288);\n },\n\n safeMeasureText: function (ctx, string, desc) {\n let font = desc || ctx.font;\n let key = font + \"\\uD83C\\uDFAE\" + string;\n let cache = measureCache.get(key);\n if (cache !== null) {\n return cache;\n }\n\n let metric = ctx.measureText(string);\n let width = metric && metric.width || 0;\n measureCache.put(key, width);\n\n return width;\n },\n\n // in case truncate a character on the Supplementary Multilingual Plane\n // test case: a = '😉🚗'\n // _safeSubstring(a, 1) === '😉🚗'\n // _safeSubstring(a, 0, 1) === '😉'\n // _safeSubstring(a, 0, 2) === '😉'\n // _safeSubstring(a, 0, 3) === '😉'\n // _safeSubstring(a, 0, 4) === '😉🚗'\n // _safeSubstring(a, 1, 2) === _safeSubstring(a, 1, 3) === '😉'\n // _safeSubstring(a, 2, 3) === _safeSubstring(a, 2, 4) === '🚗'\n _safeSubstring (targetString, startIndex, endIndex) {\n let newStartIndex = startIndex, newEndIndex = endIndex;\n let startChar = targetString[startIndex];\n if (this.lowSurrogateRex.test(startChar)) {\n newStartIndex--;\n }\n if (endIndex !== undefined) {\n if (endIndex - 1 !== startIndex) {\n let endChar = targetString[endIndex - 1];\n if (this.highSurrogateRex.test(endChar)) {\n newEndIndex--;\n }\n }\n else if (this.highSurrogateRex.test(startChar)) {\n newEndIndex++;\n }\n }\n return targetString.substring(newStartIndex, newEndIndex);\n },\n\n fragmentText: function (stringToken, allWidth, maxWidth, measureText) {\n //check the first character\n var wrappedWords = [];\n //fast return if strArr is empty\n if(stringToken.length === 0 || maxWidth < 0) {\n wrappedWords.push('');\n return wrappedWords;\n }\n\n var text = stringToken;\n while (allWidth > maxWidth && text.length > 1) {\n\n var fuzzyLen = text.length * ( maxWidth / allWidth ) | 0;\n var tmpText = this._safeSubstring(text, fuzzyLen);\n var width = allWidth - measureText(tmpText);\n var sLine = tmpText;\n var pushNum = 0;\n\n var checkWhile = 0;\n var checkCount = 10;\n\n //Exceeded the size\n while (width > maxWidth && checkWhile++ < checkCount) {\n fuzzyLen *= maxWidth / width;\n fuzzyLen = fuzzyLen | 0;\n tmpText = this._safeSubstring(text, fuzzyLen);\n width = allWidth - measureText(tmpText);\n }\n\n checkWhile = 0;\n\n //Find the truncation point\n while (width <= maxWidth && checkWhile++ < checkCount) {\n if (tmpText) {\n var exec = this.label_wordRex.exec(tmpText);\n pushNum = exec ? exec[0].length : 1;\n sLine = tmpText;\n }\n\n fuzzyLen = fuzzyLen + pushNum;\n tmpText = this._safeSubstring(text, fuzzyLen);\n width = allWidth - measureText(tmpText);\n }\n\n fuzzyLen -= pushNum;\n // in case maxWidth cannot contain any characters, need at least one character per line\n if (fuzzyLen === 0) {\n fuzzyLen = 1;\n sLine = this._safeSubstring(text, 1);\n }\n else if (fuzzyLen === 1 && this.highSurrogateRex.test(text[0])) {\n fuzzyLen = 2;\n sLine = this._safeSubstring(text, 2);\n }\n\n var sText = this._safeSubstring(text, 0, fuzzyLen), result;\n\n //symbol in the first\n if (this.label_wrapinspection) {\n if (this.label_symbolRex.test(sLine || tmpText)) {\n result = this.label_lastWordRex.exec(sText);\n fuzzyLen -= result ? result[0].length : 0;\n if (fuzzyLen === 0) fuzzyLen = 1;\n\n sLine = this._safeSubstring(text, fuzzyLen);\n sText = this._safeSubstring(text, 0, fuzzyLen);\n }\n }\n\n //To judge whether a English words are truncated\n if (this.label_firstEnglish.test(sLine)) {\n result = this.label_lastEnglish.exec(sText);\n if (result && sText !== result[0]) {\n fuzzyLen -= result[0].length;\n sLine = this._safeSubstring(text, fuzzyLen);\n sText = this._safeSubstring(text, 0, fuzzyLen);\n }\n }\n\n // The first line And do not wrap should not remove the space\n if (wrappedWords.length === 0) {\n wrappedWords.push(sText);\n }\n else {\n sText = sText.trimLeft();\n if (sText.length > 0) {\n wrappedWords.push(sText);\n }\n }\n text = sLine || tmpText;\n allWidth = measureText(text);\n }\n\n if (wrappedWords.length === 0) {\n wrappedWords.push(text);\n }\n else {\n text = text.trimLeft();\n if (text.length > 0) {\n wrappedWords.push(text);\n }\n }\n return wrappedWords;\n },\n};\n\ncc.textUtils = module.exports = textUtils;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst Texture2D = require('../assets/CCTexture2D');\n\nlet textureUtil = {\n loadImage (url, cb, target) {\n cc.assertID(url, 3103);\n\n var tex = cc.assetManager.assets.get(url);\n if (tex) {\n if (tex.loaded) {\n cb && cb.call(target, null, tex);\n return tex;\n }\n else\n {\n tex.once(\"load\", function(){\n cb && cb.call(target, null, tex);\n }, target);\n return tex;\n }\n }\n else {\n cc.assetManager.loadRemote(url, function (err, texture) {\n cb && cb.call(target, err, texture);\n });\n }\n },\n\n cacheImage (url, image) {\n if (url && image) {\n var tex = new Texture2D();\n tex.initWithElement(image);\n cc.assetManager.assets.add(url, tex);\n return tex;\n }\n },\n\n postLoadTexture (texture, callback) {\n if (texture.loaded) {\n callback && callback();\n return;\n }\n if (!texture.nativeUrl) {\n callback && callback();\n return;\n }\n // load image\n cc.assetManager.postLoadNative(texture, callback);\n }\n};\n\nmodule.exports = textureUtil;","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nlet NodeUnit = require('./node-unit');\nlet NodeMemPool = require('./node-mem-pool');\n\nmodule.exports = {\n NodeMemPool: new NodeMemPool(NodeUnit)\n};","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nlet MemPool = function (unitClass) {\n this._unitClass = unitClass;\n this._pool = [];\n this._findOrder = [];\n\n if (CC_JSB && CC_NATIVERENDERER) {\n this._initNative();\n }\n};\n\nlet proto = MemPool.prototype;\nproto._initNative = function () {\n this._nativeMemPool = new renderer.MemPool();\n};\n\nproto._buildUnit = function (unitID) {\n let unit = new this._unitClass(unitID, this);\n if (CC_JSB && CC_NATIVERENDERER) {\n this._nativeMemPool.updateCommonData(unitID, unit._data, unit._signData);\n }\n return unit;\n};\n\nproto._destroyUnit = function (unitID) {\n this._pool[unitID] = null;\n for (let idx = 0, n = this._findOrder.length; idx < n; idx++) {\n let unit = this._findOrder[idx];\n if (unit && unit.unitID == unitID) {\n this._findOrder.splice(idx, 1);\n break;\n }\n }\n if (CC_JSB && CC_NATIVERENDERER) {\n this._nativeMemPool.removeCommonData(unitID);\n }\n};\n\nproto._findUnitID = function () {\n let unitID = 0;\n let pool = this._pool;\n while (pool[unitID]) unitID++;\n return unitID;\n};\n\nproto.pop = function () {\n let findUnit = null;\n let idx = 0;\n let findOrder = this._findOrder;\n let pool = this._pool;\n for (let n = findOrder.length; idx < n; idx++) {\n let unit = findOrder[idx];\n if (unit && unit.hasSpace()) {\n findUnit = unit;\n break;\n }\n }\n\n if (!findUnit) {\n let unitID = this._findUnitID();\n findUnit = this._buildUnit(unitID);\n pool[unitID] = findUnit;\n findOrder.push(findUnit);\n idx = findOrder.length - 1;\n }\n\n // swap has space unit to first position, so next find will fast\n let firstUnit = findOrder[0];\n if (firstUnit !== findUnit) {\n findOrder[0] = findUnit;\n findOrder[idx] = firstUnit;\n }\n\n return findUnit.pop();\n};\n\nproto.push = function (info) {\n let unit = this._pool[info.unitID];\n unit.push(info.index);\n if (this._findOrder.length > 1 && unit.isAllFree()) {\n this._destroyUnit(info.unitID);\n }\n return unit;\n};\nmodule.exports = MemPool;","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nlet MemPool = require('./mem-pool');\nlet NodeMemPool = function (unitClass) {\n MemPool.call(this, unitClass);\n};\n\n(function(){\n let Super = function(){};\n Super.prototype = MemPool.prototype;\n NodeMemPool.prototype = new Super();\n})();\n\nlet proto = NodeMemPool.prototype;\nproto._initNative = function () {\n this._nativeMemPool = new renderer.NodeMemPool();\n};\n\nproto._destroyUnit = function (unitID) {\n MemPool.prototype._destroyUnit.call(this, unitID);\n if (CC_JSB && CC_NATIVERENDERER) {\n this._nativeMemPool.removeNodeData(unitID);\n }\n};\n\nmodule.exports = NodeMemPool;","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport { FLOAT_ARRAY_TYPE, FLOAT_BYTES } from '../../value-types/utils'\n\nconst Uint32_Bytes = 4;\nconst Uint8_Bytes = 1;\n\n// Space : [Dirty] [Size:4 Uint32]\nconst Dirty_Type = Uint32Array;\nconst Dirty_Members = 1;\nconst Dirty_Stride = Dirty_Members * Uint32_Bytes;\n\n// Space : [TRS] [Size:4 * 10 Float32|Float64]\nconst TRS_Members = 10;\nconst TRS_Stride = TRS_Members * FLOAT_BYTES;\n\n// Space : [LocalMatrix] [Size:4 * 16 Float32|Float64]\nconst LocalMatrix_Members = 16;\nconst LocalMatrix_Stride = LocalMatrix_Members * FLOAT_BYTES;\n\n// Space : [WorldMatrix] [Size:4 * 16 Float32|Float64]\nconst WorldMatrix_Members = 16;\nconst WorldMatrix_Stride = WorldMatrix_Members * FLOAT_BYTES;\n\n// Space : [Parent Unit] [Size:4 Uint32]\n// Space : [Parent Index] [Size:4 Uint32]\nconst Parent_Type = Uint32Array;\nconst Parent_Members = 2;\nconst Parent_Stride = Parent_Members * Uint32_Bytes;\n\n// Space : [ZOrder] [Size:4 Uint32]\nconst ZOrder_Type = Uint32Array;\nconst ZOrder_Members = 1;\nconst ZOrder_Stride = ZOrder_Members * Uint32_Bytes;\n\n// Space : [CullingMask] [Size:4 Int32]\nconst CullingMask_Type = Int32Array;\nconst CullingMask_Members = 1;\nconst CullingMask_Stride = CullingMask_Members * Uint32_Bytes;\n\n// Space : [Opacity] [Size:1 Uint8]\nconst Opacity_Type = Uint8Array;\nconst Opacity_Members = 1;\nconst Opacity_Stride = Opacity_Members * Uint8_Bytes;\n\n// Space : [Is3D] [Size:1 Uint8]\nconst Is3D_Type = Uint8Array;\nconst Is3D_Members = 1;\nconst Is3D_Stride = Is3D_Members * Uint8_Bytes;\n\n// Space : [NodePtr] [Size:4 * 2 Uint32]\nconst Node_Type = Uint32Array;\nconst Node_Members = 2;\n\n// Space : [Skew] [Size:4 * 2 Float32]\nconst Skew_Members = 2;\nconst Skew_Stride = Skew_Members * FLOAT_BYTES;\n\nlet UnitBase = require('./unit-base');\nlet NodeUnit = function (unitID, memPool) {\n UnitBase.call(this, unitID, memPool);\n\n let contentNum = this._contentNum;\n this.trsList = new FLOAT_ARRAY_TYPE(contentNum * TRS_Members);\n this.localMatList = new FLOAT_ARRAY_TYPE(contentNum * LocalMatrix_Members);\n this.worldMatList = new FLOAT_ARRAY_TYPE(contentNum * WorldMatrix_Members);\n\n if (CC_JSB && CC_NATIVERENDERER) {\n this.dirtyList = new Dirty_Type(contentNum * Dirty_Members);\n this.parentList = new Parent_Type(contentNum * Parent_Members);\n this.zOrderList = new ZOrder_Type(contentNum * ZOrder_Members);\n this.cullingMaskList = new CullingMask_Type(contentNum * CullingMask_Members);\n this.opacityList = new Opacity_Type(contentNum * Opacity_Members);\n this.is3DList = new Is3D_Type(contentNum * Is3D_Members);\n this.nodeList = new Node_Type(contentNum * Node_Members);\n this.skewList = new FLOAT_ARRAY_TYPE(contentNum * Skew_Members);\n\n this._memPool._nativeMemPool.updateNodeData(\n unitID,\n this.dirtyList,\n this.trsList,\n this.localMatList,\n this.worldMatList,\n this.parentList,\n this.zOrderList,\n this.cullingMaskList,\n this.opacityList,\n this.is3DList,\n this.nodeList,\n this.skewList\n );\n }\n\n for (let i = 0; i < contentNum; i ++) {\n let space = this._spacesData[i];\n\n space.trs = new FLOAT_ARRAY_TYPE(this.trsList.buffer, i * TRS_Stride, TRS_Members);\n space.localMat = new FLOAT_ARRAY_TYPE(this.localMatList.buffer, i * LocalMatrix_Stride, LocalMatrix_Members);\n space.worldMat = new FLOAT_ARRAY_TYPE(this.worldMatList.buffer, i * WorldMatrix_Stride, WorldMatrix_Members);\n\n if (CC_JSB && CC_NATIVERENDERER) {\n space.dirty = new Dirty_Type(this.dirtyList.buffer, i * Dirty_Stride, Dirty_Members);\n space.parent = new Parent_Type(this.parentList.buffer, i * Parent_Stride, Parent_Members);\n space.zOrder = new ZOrder_Type(this.zOrderList.buffer, i * ZOrder_Stride, ZOrder_Members);\n space.cullingMask = new CullingMask_Type(this.cullingMaskList.buffer, i * CullingMask_Stride, CullingMask_Members);\n space.opacity = new Opacity_Type(this.opacityList.buffer, i * Opacity_Stride, Opacity_Members);\n space.is3D = new Is3D_Type(this.is3DList.buffer, i * Is3D_Stride, Is3D_Members);\n space.skew = new FLOAT_ARRAY_TYPE(this.skewList.buffer, i * Skew_Stride, Skew_Members);\n }\n }\n};\n\n(function(){\n let Super = function(){};\n Super.prototype = UnitBase.prototype;\n NodeUnit.prototype = new Super();\n})();\n\nmodule.exports = NodeUnit;","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n// Unit has many segment, layout such as :\n// Head Free Pointer + Using Segment Num + Segment 1 + Segment 2 + Segment 3 ...\n\n// sign data format\n// Space : [If Free Flag] [Size:1 Uint16]\n// Space : [Next Free Index] [Size:1 Uint16]\n\n// invalid pointer value\nlet POINTER_INVALID_FLAG = 0xffff;\nlet SPACE_FREE_FLAG = 0x0;\nlet SPACE_USE_FLAG = 0x1;\nlet POS_NEXT_FREE = 0;\nlet POS_FREE_FLAG = 1;\n\nlet UnitBase = function (unitID, memPool, contentNum) {\n contentNum = contentNum || 128;\n\n // set unit id\n this.unitID = unitID;\n this._memPool = memPool;\n\n this._data = new Uint16Array(2);\n // head of the free content index\n this._data[0] = 0;\n // using segment num\n this._data[1] = 0;\n\n this._contentNum = contentNum;\n this._signData = new Uint16Array(this._contentNum * 2);\n this._spacesData = [];\n\n for (let i = 0; i < contentNum; i++) {\n let signIndex = i * 2;\n // store content block index but not sign array index\n this._signData[signIndex + POS_NEXT_FREE] = i + 1;\n this._signData[signIndex + POS_FREE_FLAG] = SPACE_FREE_FLAG;\n\n this._spacesData[i] = {\n index: i,\n unitID: unitID,\n };\n }\n // last one has no next space;\n this._signData[(contentNum - 1) * 2] = POINTER_INVALID_FLAG;\n};\n\nlet UnitBaseProto = UnitBase.prototype;\nUnitBaseProto.hasSpace = function () {\n return this._data[0] !== POINTER_INVALID_FLAG;\n};\n\nUnitBaseProto.isAllFree = function () {\n return this._data[1] == 0;\n};\n\n// pop space from unit\nUnitBaseProto.pop = function () {\n let headFreeIndex = this._data[0];\n if (headFreeIndex === POINTER_INVALID_FLAG) return null;\n\n let index = headFreeIndex;\n let signIndex = index * 2;\n let space = this._spacesData[index];\n\n // set use flag\n this._signData[signIndex + POS_FREE_FLAG] = SPACE_USE_FLAG;\n\n // store new next free space index\n this._data[0] = this._signData[signIndex + POS_NEXT_FREE];\n // add using segment num\n this._data[1]++;\n return space;\n};\n\n// push back to unit\nUnitBaseProto.push = function (index) {\n let signIndex = index * 2;\n\n // set free flag\n this._signData[signIndex + POS_FREE_FLAG] = SPACE_FREE_FLAG;\n\n // store head free index to the space\n this._signData[signIndex + POS_NEXT_FREE] = this._data[0];\n // update head free index\n this._data[0] = index;\n // sub using segment num\n this._data[1]--;\n};\n\n// dump all space info\nUnitBaseProto.dump = function () {\n let spaceNum = 0;\n let index = this._data[0];\n let freeStr = \"\";\n \n while (index != POINTER_INVALID_FLAG) {\n spaceNum ++;\n freeStr += index + \"->\";\n index = this._signData[index * 2 + POS_NEXT_FREE];\n }\n\n let usingNum = 0;\n let usingStr = \"\";\n let contentNum = this._contentNum;\n for (let i = 0; i < contentNum; i++) {\n let freeFlag = this._signData[i * 2 + POS_FREE_FLAG];\n if (freeFlag == SPACE_USE_FLAG) {\n usingNum ++;\n usingStr += i + \"->\";\n }\n }\n \n let totalNum = spaceNum + usingNum;\n console.log(\n \"unitID:\", this.unitID, \n \"spaceNum:\", spaceNum, \n \"calc using num:\", usingNum, \n 'store using num:', this._data[1], \n 'calc total num:', totalNum, \n 'actually total num:', this._contentNum\n );\n console.log(\"free info:\", freeStr);\n console.log(\"using info:\", usingStr);\n\n if (usingNum != this._data[1]) {\n cc.error(\n 'using num error', \n \"calc using num:\", usingNum, \n 'store using num:', this._data[1]\n );\n }\n\n if (spaceNum + usingNum != this._contentNum) {\n cc.error(\n 'total num error', \n 'calc total num:', totalNum, \n 'actually total num:', this._contentNum\n );\n }\n};\n\nmodule.exports = UnitBase;","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport ValueType from './value-type';\nimport CCClass from '../platform/CCClass';\nimport misc from '../utils/misc';\n\n/**\n * !#en\n * Representation of RGBA colors.\n *\n * Each color component is a floating point value with a range from 0 to 255.\n *\n * You can also use the convenience method {{#crossLink \"cc/color:method\"}}cc.color{{/crossLink}} to create a new Color.\n *\n * !#zh\n * cc.Color 用于表示颜色。\n *\n * 它包含 RGBA 四个以浮点数保存的颜色分量,每个的值都在 0 到 255 之间。\n *\n * 您也可以通过使用 {{#crossLink \"cc/color:method\"}}cc.color{{/crossLink}} 的便捷方法来创建一个新的 Color。\n *\n * @class Color\n * @extends ValueType\n */\nexport default class Color extends ValueType {\n static div = Color.divide;\n static sub = Color.subtract;\n static mul = Color.multiply;\n\n /**\n * !#en Solid white, RGBA is [255, 255, 255, 255].\n * !#zh 纯白色RGBA 是 [255, 255, 255, 255]。\n * @property WHITE\n * @type {Color}\n * @static\n */\n static get WHITE () { return new Color(255, 255, 255, 255); }\n static readonly WHITE_R: Color = Color.WHITE;\n\n /**\n * !#en Solid black, RGBA is [0, 0, 0, 255].\n * !#zh 纯黑色RGBA 是 [0, 0, 0, 255]。\n * @property BLACK\n * @type {Color}\n * @static\n */\n static get BLACK () { return new Color(0, 0, 0, 255); }\n static readonly BLACK_R: Color = Color.BLACK;\n\n /**\n * !#en Transparent, RGBA is [0, 0, 0, 0].\n * !#zh 透明RGBA 是 [0, 0, 0, 0]。\n * @property TRANSPARENT\n * @type {Color}\n * @static\n */\n static get TRANSPARENT () { return new Color(0, 0, 0, 0); }\n static readonly TRANSPARENT_R: Color = Color.TRANSPARENT;\n\n /**\n * !#en Grey, RGBA is [127.5, 127.5, 127.5].\n * !#zh 灰色RGBA 是 [127.5, 127.5, 127.5]。\n * @property GRAY\n * @type {Color}\n * @static\n */\n static get GRAY () { return new Color(127.5, 127.5, 127.5); }\n static readonly GRAY_R: Color = Color.GRAY;\n\n /**\n * !#en Solid red, RGBA is [255, 0, 0].\n * !#zh 纯红色RGBA 是 [255, 0, 0]。\n * @property RED\n * @type {Color}\n * @static\n */\n static get RED () { return new Color(255, 0, 0); }\n static readonly RED_R: Color = Color.RED;\n /**\n * !#en Solid green, RGBA is [0, 255, 0].\n * !#zh 纯绿色RGBA 是 [0, 255, 0]。\n * @property GREEN\n * @type {Color}\n * @static\n */\n static get GREEN () { return new Color(0, 255, 0); }\n static readonly GREEN_R: Color = Color.GREEN;\n /**\n * !#en Solid blue, RGBA is [0, 0, 255].\n * !#zh 纯蓝色RGBA 是 [0, 0, 255]。\n * @property BLUE\n * @type {Color}\n * @static\n */\n static get BLUE () { return new Color(0, 0, 255); }\n static readonly BLUE_R: Color = Color.BLUE;\n /**\n * !#en Yellow, RGBA is [255, 235, 4].\n * !#zh 黄色RGBA 是 [255, 235, 4]。\n * @property YELLOW\n * @type {Color}\n * @static\n */\n static get YELLOW () { return new Color(255, 235, 4); }\n static readonly YELLOW_R: Color = Color.YELLOW;\n /**\n * !#en Orange, RGBA is [255, 127, 0].\n * !#zh 橙色RGBA 是 [255, 127, 0]。\n * @property ORANGE\n * @type {Color}\n * @static\n */\n static get ORANGE () { return new Color(255, 127, 0); }\n static readonly ORANGE_R: Color = Color.ORANGE;\n /**\n * !#en Cyan, RGBA is [0, 255, 255].\n * !#zh 青色RGBA 是 [0, 255, 255]。\n * @property CYAN\n * @type {Color}\n * @static\n */\n static get CYAN () { return new Color(0, 255, 255); }\n static readonly CYAN_R: Color = Color.CYAN;\n /**\n * !#en Magenta, RGBA is [255, 0, 255].\n * !#zh 洋红色品红色RGBA 是 [255, 0, 255]。\n * @property MAGENTA\n * @type {Color}\n * @static\n */\n static get MAGENTA () { return new Color(255, 0, 255); }\n static readonly MAGENTA_R: Color = Color.MAGENTA;\n\n /**\n * Copy content of a color into another.\n * @method copy\n * @typescript\n * copy (out: Color, a: Color): Color\n * @static\n */\n static copy (out: Color, a: Color): Color {\n out.r = a.r;\n out.g = a.g;\n out.b = a.b;\n out.a = a.a;\n return out;\n }\n\n /**\n * Clone a new color.\n * @method clone\n * @typescript\n * clone (a: Color): Color\n * @static\n */\n static clone (a: Color): Color {\n return new Color(a.r, a.g, a.b, a.a);\n }\n\n /**\n * Set the components of a color to the given values.\n * @method set\n * @typescript\n * set (out: Color, r?: number, g?: number, b?: number, a?: number): Color\n * @static\n */\n static set (out: Color, r = 255, g = 255, b = 255, a = 255): Color {\n out.r = r;\n out.g = g;\n out.b = b;\n out.a = a;\n return out;\n }\n\n /**\n * Converts the hexadecimal formal color into rgb formal.\n * @method fromHex\n * @typescript\n * fromHex (out: Color, hex: number): Color\n * @static\n * @deprecated\n */\n static fromHex (out: Color, hex: number): Color {\n let r = ((hex >> 24) & 0xff);\n let g = ((hex >> 16) & 0xff);\n let b = ((hex >> 8) & 0xff);\n let a = ((hex) & 0xff);\n\n out.r = r;\n out.g = g;\n out.b = b;\n out.a = a;\n return out;\n }\n\n /**\n * Converts the hexadecimal formal color into rgb formal.\n * @method fromHEX\n * @typescript\n * fromHEX (out: Color, hex: string): Color\n * @static\n */\n static fromHEX (out: Color, hexString: string): Color {\n hexString = (hexString.indexOf('#') === 0) ? hexString.substring(1) : hexString;\n out.r = parseInt(hexString.substr(0, 2), 16) || 0;\n out.g = parseInt(hexString.substr(2, 2), 16) || 0;\n out.b = parseInt(hexString.substr(4, 2), 16) || 0;\n out.a = parseInt(hexString.substr(6, 2), 16) || 255;\n out._val = ((out.a << 24) >>> 0) + (out.b << 16) + (out.g << 8) + out.r;\n return out;\n }\n\n /**\n * Add components of two colors, respectively.\n * @method add\n * @typescript\n * add (out: Color, a: Color, b: Color): Color\n * @static\n */\n static add (out: Color, a: Color, b: Color): Color {\n out.r = a.r + b.r;\n out.g = a.g + b.g;\n out.b = a.b + b.b;\n out.a = a.a + b.a;\n return out;\n }\n\n /**\n * Subtract components of color b from components of color a, respectively.\n * @method subtract\n * @typescript\n * subtract (out: Color, a: Color, b: Color): Color\n * @static\n */\n static subtract (out: Color, a: Color, b: Color): Color {\n out.r = a.r - b.r;\n out.g = a.g - b.g;\n out.b = a.b - b.b;\n out.a = a.a - b.a;\n return out;\n }\n\n /**\n * Multiply components of two colors, respectively.\n * @method multiply\n * @typescript\n * multiply (out: Color, a: Color, b: Color): Color\n * @static\n */\n static multiply (out: Color, a: Color, b: Color): Color {\n out.r = a.r * b.r;\n out.g = a.g * b.g;\n out.b = a.b * b.b;\n out.a = a.a * b.a;\n return out;\n }\n\n /**\n * Divide components of color a by components of color b, respectively.\n * @method divide\n * @typescript\n * divide (out: Color, a: Color, b: Color): Color\n * @static\n */\n static divide (out: Color, a: Color, b: Color): Color {\n out.r = a.r / b.r;\n out.g = a.g / b.g;\n out.b = a.b / b.b;\n out.a = a.a / b.a;\n return out;\n }\n\n /**\n * Scales a color by a number.\n * @method scale\n * @typescript\n * scale (out: Color, a: Color, b: number): Color\n * @static\n */\n static scale (out: Color, a: Color, b: number): Color {\n out.r = a.r * b;\n out.g = a.g * b;\n out.b = a.b * b;\n out.a = a.a * b;\n return out;\n }\n\n /**\n * Performs a linear interpolation between two colors.\n * @method lerp\n * @typescript\n * lerp (out: Color, a: Color, b: Color, t: number): Color\n * @static\n */\n static lerp (out: Color, a: Color, b: Color, t: number): Color {\n let ar = a.r,\n ag = a.g,\n ab = a.b,\n aa = a.a;\n out.r = ar + t * (b.r - ar);\n out.g = ag + t * (b.g - ag);\n out.b = ab + t * (b.b - ab);\n out.a = aa + t * (b.a - aa);\n return out;\n }\n\n /**\n * !#zh 颜色转数组\n * !#en Turn an array of colors\n * @method toArray\n * @typescript\n * toArray <Out extends IWritableArrayLike<number>> (out: Out, a: IColorLike, ofs?: number): Out\n * @param ofs 数组起始偏移量\n * @static\n */\n static toArray<Out extends IWritableArrayLike<number>> (out: Out, a: IColorLike, ofs = 0) {\n const scale = (a instanceof Color || a.a > 1) ? 1 / 255 : 1;\n out[ofs + 0] = a.r * scale;\n out[ofs + 1] = a.g * scale;\n out[ofs + 2] = a.b * scale;\n out[ofs + 3] = a.a * scale;\n return out;\n }\n\n /**\n * !#zh 数组转颜色\n * !#en An array of colors turn\n * @method fromArray\n * @typescript\n * fromArray <Out extends IColorLike> (arr: IWritableArrayLike<number>, out: Out, ofs?: number): Out\n * @param ofs 数组起始偏移量\n * @static\n */\n static fromArray<Out extends IColorLike> (arr: IWritableArrayLike<number>, out: Out, ofs = 0) {\n out.r = arr[ofs + 0] * 255;\n out.g = arr[ofs + 1] * 255;\n out.b = arr[ofs + 2] * 255;\n out.a = arr[ofs + 3] * 255;\n return out;\n }\n\n /**\n * !#zh 颜色 RGB 预乘 Alpha 通道\n * !#en RGB premultiply alpha channel\n * @method premultiplyAlpha\n * @typescript\n * premultiplyAlpha <Out extends IColorLike> (out: Out, a: IColorLike)\n * @param out 返回颜色\n * @param color 预乘处理的目标颜色\n * @static\n */\n static premultiplyAlpha (out, color) {\n let alpha = color.a / 255.0;\n out.r = color.r * alpha;\n out.g = color.g * alpha;\n out.b = color.b * alpha;\n\n out._fastSetA(color.a);\n\n return out;\n }\n\n _val: number = 0;\n\n /**\n * @method constructor\n * @param {Number} [r=0] - red component of the color, default value is 0.\n * @param {Number} [g=0] - green component of the color, defualt value is 0.\n * @param {Number} [b=0] - blue component of the color, default value is 0.\n * @param {Number} [a=255] - alpha component of the color, default value is 255.\n */\n constructor (r: Color | number = 0, g: number = 0, b: number = 0, a: number = 255) {\n super();\n if (typeof r === 'object') {\n g = r.g;\n b = r.b;\n a = r.a;\n r = r.r;\n }\n\n this._val = ((a << 24) >>> 0) + (b << 16) + (g << 8) + (r|0);\n }\n\n /**\n * !#en Clone a new color from the current color.\n * !#zh 克隆当前颜色。\n * @method clone\n * @return {Color} Newly created color.\n * @example\n * var color = new cc.Color();\n * var newColor = color.clone();// Color {r: 0, g: 0, b: 0, a: 255}\n */\n clone (): Color {\n var ret = new Color();\n ret._val = this._val;\n return ret;\n }\n\n /**\n * !#en TODO\n * !#zh 判断两个颜色是否相等。\n * @method equals\n * @param {Color} other\n * @return {Boolean}\n * @example\n * var color1 = cc.Color.WHITE;\n * var color2 = new cc.Color(255, 255, 255);\n * cc.log(color1.equals(color2)); // true;\n * color2 = cc.Color.RED;\n * cc.log(color2.equals(color1)); // false;\n */\n equals (other: Color): boolean {\n return other && this._val === other._val;\n }\n\n /**\n * !#en TODO\n * !#zh 线性插值\n * @method lerp\n * @param {Color} to\n * @param {number} ratio - the interpolation coefficient.\n * @param {Color} [out] - optional, the receiving vector.\n * @return {Color}\n * @example {@link cocos2d/core/value-types/CCColor/lerp.js}\n */\n lerp (to: Color, ratio: number, out?: Color): Color {\n out = out || new Color();\n var r = this.r;\n var g = this.g;\n var b = this.b;\n var a = this.a;\n out.r = r + (to.r - r) * ratio;\n out.g = g + (to.g - g) * ratio;\n out.b = b + (to.b - b) * ratio;\n out.a = a + (to.a - a) * ratio;\n return out;\n };\n\n /**\n * !#en TODO\n * !#zh 转换为方便阅读的字符串。\n * @method toString\n * @return {String}\n * @example\n * var color = cc.Color.WHITE;\n * color.toString(); // \"rgba(255, 255, 255, 255)\"\n */\n toString (): string {\n return \"rgba(\" +\n this.r.toFixed() + \", \" +\n this.g.toFixed() + \", \" +\n this.b.toFixed() + \", \" +\n this.a.toFixed() + \")\";\n };\n\n /**\n * !#en Get or set red channel value\n * !#zh 获取或者设置红色通道\n * @property {number} r\n */\n get r (): number {\n return this.getR();\n }\n set r (v: number) {\n this.setR(v);\n }\n\n /**\n * !#en Get or set green channel value\n * !#zh 获取或者设置绿色通道\n * @property {number} g\n */\n get g (): number {\n return this.getG();\n }\n set g (v: number) {\n this.setG(v);\n }\n\n /**\n * !#en Get or set blue channel value\n * !#zh 获取或者设置蓝色通道\n * @property {number} b\n */\n get b (): number {\n return this.getB();\n }\n set b (v: number) {\n this.setB(v);\n }\n\n /**\n * !#en Get or set alpha channel value\n * !#zh 获取或者设置透明通道\n * @property {number} a\n */\n get a (): number {\n return this.getA();\n }\n set a (v: number) {\n this.setA(v);\n }\n\n /**\n * !#en Gets red channel value\n * !#zh 获取当前颜色的红色值。\n * @method getR\n * @return {Number} red value.\n */\n getR (): number {\n return this._val & 0x000000ff;\n }\n /**\n * !#en Sets red value and return the current color object\n * !#zh 设置当前的红色值,并返回当前对象。\n * @method setR\n * @param {Number} red - the new Red component.\n * @return {Color} this color.\n * @example\n * var color = new cc.Color();\n * color.setR(255); // Color {r: 255, g: 0, b: 0, a: 255}\n */\n setR (red): this {\n red = ~~misc.clampf(red, 0, 255);\n this._val = ((this._val & 0xffffff00) | red) >>> 0;\n return this;\n }\n /**\n * !#en Gets green channel value\n * !#zh 获取当前颜色的绿色值。\n * @method getG\n * @return {Number} green value.\n */\n getG (): number {\n return (this._val & 0x0000ff00) >> 8;\n }\n /**\n * !#en Sets green value and return the current color object\n * !#zh 设置当前的绿色值,并返回当前对象。\n * @method setG\n * @param {Number} green - the new Green component.\n * @return {Color} this color.\n * @example\n * var color = new cc.Color();\n * color.setG(255); // Color {r: 0, g: 255, b: 0, a: 255}\n */\n setG (green): this {\n green = ~~misc.clampf(green, 0, 255);\n this._val = ((this._val & 0xffff00ff) | (green << 8)) >>> 0;\n return this;\n }\n /**\n * !#en Gets blue channel value\n * !#zh 获取当前颜色的蓝色值。\n * @method getB\n * @return {Number} blue value.\n */\n getB (): number {\n return (this._val & 0x00ff0000) >> 16;\n }\n /**\n * !#en Sets blue value and return the current color object\n * !#zh 设置当前的蓝色值,并返回当前对象。\n * @method setB\n * @param {Number} blue - the new Blue component.\n * @return {Color} this color.\n * @example\n * var color = new cc.Color();\n * color.setB(255); // Color {r: 0, g: 0, b: 255, a: 255}\n */\n setB (blue): this {\n blue = ~~misc.clampf(blue, 0, 255);\n this._val = ((this._val & 0xff00ffff) | (blue << 16)) >>> 0;\n return this;\n }\n /**\n * !#en Gets alpha channel value\n * !#zh 获取当前颜色的透明度值。\n * @method getA\n * @return {Number} alpha value.\n */\n getA (): number {\n return (this._val & 0xff000000) >>> 24;\n }\n /**\n * !#en Sets alpha value and return the current color object\n * !#zh 设置当前的透明度,并返回当前对象。\n * @method setA\n * @param {Number} alpha - the new Alpha component.\n * @return {Color} this color.\n * @example\n * var color = new cc.Color();\n * color.setA(0); // Color {r: 0, g: 0, b: 0, a: 0}\n */\n setA (alpha): this {\n alpha = ~~misc.clampf(alpha, 0, 255);\n this._val = ((this._val & 0x00ffffff) | (alpha << 24)) >>> 0;\n return this;\n }\n\n /**\n * !#en Convert color to css format.\n * !#zh 转换为 CSS 格式。\n * @method toCSS\n * @param {String} [opt=\"rgba\"] - \"rgba\", \"rgb\", \"#rgb\" or \"#rrggbb\".\n * @return {String}\n * @example\n * var color = cc.Color.BLACK;\n * color.toCSS(); // \"rgba(0,0,0,1.00)\";\n * color.toCSS(\"rgba\"); // \"rgba(0,0,0,1.00)\";\n * color.toCSS(\"rgb\"); // \"rgba(0,0,0)\";\n * color.toCSS(\"#rgb\"); // \"#000\";\n * color.toCSS(\"#rrggbb\"); // \"#000000\";\n */\n toCSS (opt: string): string {\n if (!opt || opt === 'rgba') {\n return \"rgba(\" +\n this.r + \",\" +\n this.g + \",\" +\n this.b + \",\" +\n (this.a / 255).toFixed(2) + \")\"\n ;\n }\n else if (opt === 'rgb') {\n return \"rgb(\" +\n this.r + \",\" +\n this.g + \",\" +\n this.b + \")\"\n ;\n }\n else {\n return '#' + this.toHEX(opt);\n }\n }\n\n /**\n * !#en Read hex string and store color data into the current color object, the hex string must be formated as rgba or rgb.\n * !#zh 读取 16 进制颜色。\n * @method fromHEX\n * @param {String} hexString\n * @return {Color}\n * @chainable\n * @example\n * var color = cc.Color.BLACK;\n * color.fromHEX(\"#FFFF33\"); // Color {r: 255, g: 255, b: 51, a: 255};\n */\n fromHEX (hexString: string): this {\n hexString = (hexString.indexOf('#') === 0) ? hexString.substring(1) : hexString;\n let r = parseInt(hexString.substr(0, 2), 16) || 0;\n let g = parseInt(hexString.substr(2, 2), 16) || 0;\n let b = parseInt(hexString.substr(4, 2), 16) || 0;\n let a = parseInt(hexString.substr(6, 2), 16) || 255;\n this._val = ((a << 24) >>> 0) + (b << 16) + (g << 8) + r;\n return this;\n }\n\n /**\n * !#en convert Color to HEX color string.\n * !#zh 转换为 16 进制。\n * @method toHEX\n * @param {String} [fmt=\"#rrggbb\"] - \"#rgb\", \"#rrggbb\" or \"#rrggbbaa\".\n * @return {String}\n * @example\n * var color = cc.Color.BLACK;\n * color.toHEX(\"#rgb\"); // \"000\";\n * color.toHEX(\"#rrggbb\"); // \"000000\";\n */\n toHEX (fmt): string {\n const prefix = '0';\n // #rrggbb\n let hex = [\n (this.r < 16 ? prefix : '') + (this.r).toString(16),\n (this.g < 16 ? prefix : '') + (this.g).toString(16),\n (this.b < 16 ? prefix : '') + (this.b).toString(16),\n ];\n if (fmt === '#rgb') {\n hex[0] = hex[0][0];\n hex[1] = hex[1][0];\n hex[2] = hex[2][0];\n }\n else if (fmt === '#rrggbbaa') {\n hex.push((this.a < 16 ? prefix : '') + (this.a).toString(16));\n }\n return hex.join('');\n };\n\n /**\n * !#en Convert to 24bit rgb value.\n * !#zh 转换为 24bit 的 RGB 值。\n * @method toRGBValue\n * @return {Number}\n * @example\n * var color = cc.Color.YELLOW;\n * color.toRGBValue(); // 16771844;\n */\n toRGBValue (): number {\n return this._val & 0x00ffffff;\n }\n\n /**\n * !#en Read HSV model color and convert to RGB color\n * !#zh 读取 HSV色彩模型格式。\n * @method fromHSV\n * @param {Number} h\n * @param {Number} s\n * @param {Number} v\n * @return {Color}\n * @chainable\n * @example\n * var color = cc.Color.YELLOW;\n * color.fromHSV(0, 0, 1); // Color {r: 255, g: 255, b: 255, a: 255};\n */\n fromHSV (h, s, v): this {\n var r, g, b;\n if (s === 0) {\n r = g = b = v;\n }\n else {\n if (v === 0) {\n r = g = b = 0;\n }\n else {\n if (h === 1) h = 0;\n h *= 6;\n var i = Math.floor(h);\n var f = h - i;\n var p = v * (1 - s);\n var q = v * (1 - (s * f));\n var t = v * (1 - (s * (1 - f)));\n switch (i) {\n case 0:\n r = v;\n g = t;\n b = p;\n break;\n\n case 1:\n r = q;\n g = v;\n b = p;\n break;\n\n case 2:\n r = p;\n g = v;\n b = t;\n break;\n\n case 3:\n r = p;\n g = q;\n b = v;\n break;\n\n case 4:\n r = t;\n g = p;\n b = v;\n break;\n\n case 5:\n r = v;\n g = p;\n b = q;\n break;\n }\n }\n }\n r *= 255;\n g *= 255;\n b *= 255;\n this._val = ((this.a << 24) >>> 0) + (b << 16) + (g << 8) + (r|0);\n return this;\n }\n\n /**\n * !#en Transform to HSV model color\n * !#zh 转换为 HSV色彩模型格式。\n * @method toHSV\n * @return {Object} - {h: number, s: number, v: number}.\n * @example\n * var color = cc.Color.YELLOW;\n * color.toHSV(); // Object {h: 0.1533864541832669, s: 0.9843137254901961, v: 1};\n */\n toHSV () {\n var r = this.r / 255;\n var g = this.g / 255;\n var b = this.b / 255;\n var hsv = { h: 0, s: 0, v: 0 };\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var delta = 0;\n hsv.v = max;\n hsv.s = max ? (max - min) / max : 0;\n if (!hsv.s) hsv.h = 0;\n else {\n delta = max - min;\n if (r === max) hsv.h = (g - b) / delta;\n else if (g === max) hsv.h = 2 + (b - r) / delta;\n else hsv.h = 4 + (r - g) / delta;\n hsv.h /= 6;\n if (hsv.h < 0) hsv.h += 1.0;\n }\n return hsv;\n }\n\n /**\n * !#en Set the color\n * !#zh 设置颜色\n * @method set\n * @typescript\n * set (color: Color): Color\n * @param {Color} color\n */\n set (color: Color): this {\n if (color._val) {\n this._val = color._val;\n }\n else {\n this.r = color.r;\n this.g = color.g;\n this.b = color.b;\n this.a = color.a;\n }\n return this;\n }\n\n _fastSetA (alpha) {\n this._val = ((this._val & 0x00ffffff) | (alpha << 24)) >>> 0;\n }\n\n /**\n * !#en Multiplies the current color by the specified color\n * !#zh 将当前颜色乘以与指定颜色\n * @method multiply\n * @return {Color}\n * @param {Color} other\n */\n multiply (other: Color) {\n let r = ((this._val & 0x000000ff) * other.r) >> 8;\n let g = ((this._val & 0x0000ff00) * other.g) >> 8;\n let b = ((this._val & 0x00ff0000) * other.b) >> 8;\n let a = ((this._val & 0xff000000) >>> 8) * other.a;\n this._val = (a & 0xff000000) | (b & 0x00ff0000) | (g & 0x0000ff00) | (r & 0x000000ff);\n return this;\n }\n}\n\nCCClass.fastDefine('cc.Color', Color, { r: 0, g: 0, b: 0, a: 255 });\n\n\ncc.Color = Color;\n\n/**\n * @module cc\n */\n\n/**\n * !#en\n * The convenience method to create a new {{#crossLink \"Color/Color:method\"}}cc.Color{{/crossLink}}\n * Alpha channel is optional. Default value is 255.\n *\n * !#zh\n * 通过该方法来创建一个新的 {{#crossLink \"Color/Color:method\"}}cc.Color{{/crossLink}} 对象。\n * Alpha 通道是可选的。默认值是 255。\n *\n * @method color\n * @param {Number} [r=0]\n * @param {Number} [g=0]\n * @param {Number} [b=0]\n * @param {Number} [a=255]\n * @return {Color}\n * @example {@link cocos2d/core/value-types/CCColor/color.js}\n */\ncc.color = function color (r, g, b, a) {\n if (typeof r === 'string') {\n var result = new Color();\n return result.fromHEX(r);\n }\n if (typeof r === 'object') {\n return new Color(r.r, r.g, r.b, r.a);\n }\n return new Color(r, g, b, a);\n};\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nexport { default as Vec2 } from './vec2';\nexport { default as Vec3} from './vec3';\nexport { default as Vec4} from './vec4';\nexport { default as Mat4} from './mat4';\nexport { default as Mat3} from './mat3';\nexport { default as Rect} from './rect';\nexport { default as Size} from './size';\nexport { default as Color} from './color';\nexport { default as Quat} from './quat';\nexport { default as Trs} from './trs';\nexport * from './utils';\n\ncc.math = module.exports;\n","import { EPSILON, FLOAT_ARRAY_TYPE } from '../value-types/utils';\nimport Vec3 from './vec3';\nimport Vec2 from './vec2';\nimport Mat4 from './mat4';\nimport Quat from './quat';\n\n/**\n * Mathematical 3x3 matrix.\n *\n * NOTE: we use column-major matrix for all matrix calculation.\n *\n * This may lead to some confusion when referencing OpenGL documentation,\n * however, which represents out all matricies in column-major format.\n * This means that while in code a matrix may be typed out as:\n *\n * [1, 0, 0, 0,\n * 0, 1, 0, 0,\n * 0, 0, 1, 0,\n * x, y, z, 0]\n *\n * The same matrix in the [OpenGL documentation](https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glTranslate.xml)\n * is written as:\n *\n * 1 0 0 x\n * 0 1 0 y\n * 0 0 1 z\n * 0 0 0 0\n *\n * Please rest assured, however, that they are the same thing!\n * This is not unique to glMatrix, either, as OpenGL developers have long been confused by the\n * apparent lack of consistency between the memory layout and the documentation.\n *\n * @class Mat3\n * @extends ValueType\n */\nexport default class Mat3 {\n static sub = Mat3.subtract;\n static mul = Mat3.multiply;\n\n /**\n * Identity of Mat3\n * @property {Mat3} IDENTITY\n * @static\n */\n static IDENTITY = Object.freeze(new Mat3());\n\n /**\n * Creates a matrix, with elements specified separately.\n *\n * @param {Number} m00 - Value assigned to element at column 0 row 0.\n * @param {Number} m01 - Value assigned to element at column 0 row 1.\n * @param {Number} m02 - Value assigned to element at column 0 row 2.\n * @param {Number} m03 - Value assigned to element at column 1 row 0.\n * @param {Number} m04 - Value assigned to element at column 1 row 1.\n * @param {Number} m05 - Value assigned to element at column 1 row 2.\n * @param {Number} m06 - Value assigned to element at column 2 row 0.\n * @param {Number} m07 - Value assigned to element at column 2 row 1.\n * @param {Number} m08 - Value assigned to element at column 2 row 2.\n * @returns {Mat3} The newly created matrix.\n * @static\n */\n static create (m00: number = 1, m01: number = 0, m02: number = 0, m03: number = 0, m04: number = 1, m05: number = 0, m06: number = 0, m07: number = 0, m08: number = 1): Mat3 {\n return new Mat3(m00, m01, m02, m03, m04, m05, m06, m07, m08);\n }\n\n /**\n * Clone a matrix.\n *\n * @param {Mat3} a - Matrix to clone.\n * @returns {Mat3} The newly created matrix.\n * @static\n */\n static clone (a: Mat3): Mat3 {\n let am = a.m;\n return new Mat3(\n am[0], am[1], am[2],\n am[3], am[4], am[5],\n am[6], am[7], am[8]\n );\n }\n\n /**\n * Copy content of a matrix into another.\n *\n * @param {Mat3} out - Matrix to modified.\n * @param {Mat3} a - The specified matrix.\n * @returns {Mat3} out.\n * @static\n */\n static copy (out: Mat3, a: Mat3): Mat3 {\n out.m.set(a.m);\n return out;\n }\n\n /**\n * Sets the elements of a matrix to the given values.\n *\n * @param {Mat3} out - The matrix to modified.\n * @param {Number} m00 - Value assigned to element at column 0 row 0.\n * @param {Number} m01 - Value assigned to element at column 0 row 1.\n * @param {Number} m02 - Value assigned to element at column 0 row 2.\n * @param {Number} m10 - Value assigned to element at column 1 row 0.\n * @param {Number} m11 - Value assigned to element at column 1 row 1.\n * @param {Number} m12 - Value assigned to element at column 1 row 2.\n * @param {Number} m20 - Value assigned to element at column 2 row 0.\n * @param {Number} m21 - Value assigned to element at column 2 row 1.\n * @param {Number} m22 - Value assigned to element at column 2 row 2.\n * @returns {Mat3} out.\n * @static\n */\n static set (out: Mat3, m00: number, m01: number, m02: number, m10: number, m11: number, m12: number, m20: number, m21: number, m22: number): Mat3 {\n let outm = out.m;\n outm[0] = m00;\n outm[1] = m01;\n outm[2] = m02;\n outm[3] = m10;\n outm[4] = m11;\n outm[5] = m12;\n outm[6] = m20;\n outm[7] = m21;\n outm[8] = m22;\n return out;\n }\n\n /**\n * return an identity matrix.\n *\n * @returns {Mat3} out.\n * @static\n */\n static identity (out: Mat3): Mat3 {\n let outm = out.m;\n outm[0] = 1;\n outm[1] = 0;\n outm[2] = 0;\n outm[3] = 0;\n outm[4] = 1;\n outm[5] = 0;\n outm[6] = 0;\n outm[7] = 0;\n outm[8] = 1;\n return out;\n }\n\n /**\n * Transposes a matrix.\n *\n * @param {Mat3} out - Matrix to store result.\n * @param {Mat3} a - Matrix to transpose.\n * @returns {Mat3} out.\n * @static\n */\n static transpose (out: Mat3, a: Mat3): Mat3 {\n let am = a.m, outm = out.m;\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n let a01 = am[1], a02 = am[2], a12 = am[5];\n outm[1] = am[3];\n outm[2] = am[6];\n outm[3] = a01;\n outm[5] = am[7];\n outm[6] = a02;\n outm[7] = a12;\n } else {\n outm[0] = am[0];\n outm[1] = am[3];\n outm[2] = am[6];\n outm[3] = am[1];\n outm[4] = am[4];\n outm[5] = am[7];\n outm[6] = am[2];\n outm[7] = am[5];\n outm[8] = am[8];\n }\n\n return out;\n }\n\n /**\n * Inverts a matrix.\n *\n * @param {Mat3} out - Matrix to store result.\n * @param {Mat3} a - Matrix to invert.\n * @returns {Mat3} out.\n * @static\n */\n static invert (out: Mat3, a: Mat3): Mat3 {\n let am = a.m, outm = out.m;\n let a00 = am[0], a01 = am[1], a02 = am[2],\n a10 = am[3], a11 = am[4], a12 = am[5],\n a20 = am[6], a21 = am[7], a22 = am[8];\n\n let b01 = a22 * a11 - a12 * a21;\n let b11 = -a22 * a10 + a12 * a20;\n let b21 = a21 * a10 - a11 * a20;\n\n // Calculate the determinant\n let det = a00 * b01 + a01 * b11 + a02 * b21;\n\n if (!det) {\n return out;\n }\n det = 1.0 / det;\n\n outm[0] = b01 * det;\n outm[1] = (-a22 * a01 + a02 * a21) * det;\n outm[2] = (a12 * a01 - a02 * a11) * det;\n outm[3] = b11 * det;\n outm[4] = (a22 * a00 - a02 * a20) * det;\n outm[5] = (-a12 * a00 + a02 * a10) * det;\n outm[6] = b21 * det;\n outm[7] = (-a21 * a00 + a01 * a20) * det;\n outm[8] = (a11 * a00 - a01 * a10) * det;\n return out;\n }\n\n /**\n * Calculates the adjugate of a matrix.\n *\n * @param {Mat3} out - Matrix to store result.\n * @param {Mat3} a - Matrix to calculate.\n * @returns {Mat3} out.\n * @static\n */\n static adjoint (out: Mat3, a: Mat3): Mat3 {\n let am = a.m, outm = out.m;\n let a00 = am[0], a01 = am[1], a02 = am[2],\n a10 = am[3], a11 = am[4], a12 = am[5],\n a20 = am[6], a21 = am[7], a22 = am[8];\n\n outm[0] = (a11 * a22 - a12 * a21);\n outm[1] = (a02 * a21 - a01 * a22);\n outm[2] = (a01 * a12 - a02 * a11);\n outm[3] = (a12 * a20 - a10 * a22);\n outm[4] = (a00 * a22 - a02 * a20);\n outm[5] = (a02 * a10 - a00 * a12);\n outm[6] = (a10 * a21 - a11 * a20);\n outm[7] = (a01 * a20 - a00 * a21);\n outm[8] = (a00 * a11 - a01 * a10);\n return out;\n }\n\n /**\n * Calculates the determinant of a matrix.\n *\n * @param {Mat3} a - Matrix to calculate.\n * @returns {Number} Determinant of a.\n * @static\n */\n static determinant (a: Mat3): number {\n let am = a.m;\n let a00 = am[0], a01 = am[1], a02 = am[2],\n a10 = am[3], a11 = am[4], a12 = am[5],\n a20 = am[6], a21 = am[7], a22 = am[8];\n\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n }\n\n /**\n * Multiply two matrices explicitly.\n *\n * @param {Mat3} out - Matrix to store result.\n * @param {Mat3} a - The first operand.\n * @param {Mat3} b - The second operand.\n * @returns {Mat3} out.\n * @static\n */\n static multiply (out: Mat3, a: Mat3, b: Mat3): Mat3 {\n let am = a.m, bm = b.m, outm = out.m;\n let a00 = am[0], a01 = am[1], a02 = am[2],\n a10 = am[3], a11 = am[4], a12 = am[5],\n a20 = am[6], a21 = am[7], a22 = am[8];\n\n let b00 = bm[0], b01 = bm[1], b02 = bm[2];\n let b10 = bm[3], b11 = bm[4], b12 = bm[5];\n let b20 = bm[6], b21 = bm[7], b22 = bm[8];\n\n outm[0] = b00 * a00 + b01 * a10 + b02 * a20;\n outm[1] = b00 * a01 + b01 * a11 + b02 * a21;\n outm[2] = b00 * a02 + b01 * a12 + b02 * a22;\n\n outm[3] = b10 * a00 + b11 * a10 + b12 * a20;\n outm[4] = b10 * a01 + b11 * a11 + b12 * a21;\n outm[5] = b10 * a02 + b11 * a12 + b12 * a22;\n\n outm[6] = b20 * a00 + b21 * a10 + b22 * a20;\n outm[7] = b20 * a01 + b21 * a11 + b22 * a21;\n outm[8] = b20 * a02 + b21 * a12 + b22 * a22;\n return out;\n }\n\n /**\n * !#en Take the first third order of the fourth order matrix and multiply by the third order matrix\n * !#zh 取四阶矩阵的前三阶,与三阶矩阵相乘\n * @param {Mat3} out - Matrix to store result.\n * @param {Mat3} a - The first operand.\n * @param {Mat3} b - The second operand.\n * @returns {Mat3} out.\n * @static\n */\n static multiplyMat4 <Out extends IMat3Like> (out: Out, a: Out, b: IMat4Like) {\n let am = a.m, bm = b.m, outm = out.m;\n let a00 = am[0], a01 = am[1], a02 = am[2],\n a10 = am[3], a11 = am[4], a12 = am[5],\n a20 = am[6], a21 = am[7], a22 = am[8];\n\n const b00 = bm[0], b01 = bm[1], b02 = bm[2];\n const b10 = bm[4], b11 = bm[5], b12 = bm[6];\n const b20 = bm[8], b21 = bm[9], b22 = bm[10];\n\n outm[0] = b00 * a00 + b01 * a10 + b02 * a20;\n outm[1] = b00 * a01 + b01 * a11 + b02 * a21;\n outm[2] = b00 * a02 + b01 * a12 + b02 * a22;\n outm[3] = b10 * a00 + b11 * a10 + b12 * a20;\n outm[4] = b10 * a01 + b11 * a11 + b12 * a21;\n outm[5] = b10 * a02 + b11 * a12 + b12 * a22;\n outm[6] = b20 * a00 + b21 * a10 + b22 * a20;\n outm[7] = b20 * a01 + b21 * a11 + b22 * a21;\n outm[8] = b20 * a02 + b21 * a12 + b22 * a22;\n return out;\n }\n\n /**\n * Multiply a matrix with a translation matrix given by a translation offset.\n *\n * @param {Mat3} out - Matrix to store result.\n * @param {Mat3} a - Matrix to multiply.\n * @param {vec2} v - The translation offset.\n * @returns {Mat3} out.\n * @static\n */\n static translate (out: Mat3, a: Mat3, v: Vec2): Mat3 {\n let am = a.m, outm = out.m;\n let a00 = am[0], a01 = am[1], a02 = am[2],\n a10 = am[3], a11 = am[4], a12 = am[5],\n a20 = am[6], a21 = am[7], a22 = am[8];\n let x = v.x, y = v.y;\n\n outm[0] = a00;\n outm[1] = a01;\n outm[2] = a02;\n\n outm[3] = a10;\n outm[4] = a11;\n outm[5] = a12;\n\n outm[6] = x * a00 + y * a10 + a20;\n outm[7] = x * a01 + y * a11 + a21;\n outm[8] = x * a02 + y * a12 + a22;\n return out;\n }\n\n /**\n * Rotates a matrix by the given angle.\n *\n * @param {Mat3} out - Matrix to store result.\n * @param {Mat3} a - Matrix to rotate.\n * @param {Number} rad - The rotation angle.\n * @returns {Mat3} out\n * @static\n */\n static rotate (out: Mat3, a: Mat3, rad: number): Mat3 {\n let am = a.m, outm = out.m;\n let a00 = am[0], a01 = am[1], a02 = am[2],\n a10 = am[3], a11 = am[4], a12 = am[5],\n a20 = am[6], a21 = am[7], a22 = am[8];\n\n let s = Math.sin(rad);\n let c = Math.cos(rad);\n\n outm[0] = c * a00 + s * a10;\n outm[1] = c * a01 + s * a11;\n outm[2] = c * a02 + s * a12;\n\n outm[3] = c * a10 - s * a00;\n outm[4] = c * a11 - s * a01;\n outm[5] = c * a12 - s * a02;\n\n outm[6] = a20;\n outm[7] = a21;\n outm[8] = a22;\n return out;\n }\n\n /**\n * Multiply a matrix with a scale matrix given by a scale vector.\n *\n * @param {Mat3} out - Matrix to store result.\n * @param {Mat3} a - Matrix to multiply.\n * @param {vec2} v - The scale vector.\n * @returns {Mat3} out\n **/\n static scale (out: Mat3, a: Mat3, v: Vec2): Mat3 {\n let x = v.x, y = v.y;\n let am = a.m, outm = out.m;\n\n outm[0] = x * am[0];\n outm[1] = x * am[1];\n outm[2] = x * am[2];\n\n outm[3] = y * am[3];\n outm[4] = y * am[4];\n outm[5] = y * am[5];\n\n outm[6] = am[6];\n outm[7] = am[7];\n outm[8] = am[8];\n return out;\n }\n\n /**\n * Copies the upper-left 3x3 values of a 4x4 matrix into a 3x3 matrix.\n *\n * @param {Mat3} out - Matrix to store result.\n * @param {mat4} a - The 4x4 matrix.\n * @returns {Mat3} out.\n * @static\n */\n static fromMat4 (out: Mat3, a: Mat4): Mat3 {\n let am = a.m, outm = out.m;\n outm[0] = am[0];\n outm[1] = am[1];\n outm[2] = am[2];\n outm[3] = am[4];\n outm[4] = am[5];\n outm[5] = am[6];\n outm[6] = am[8];\n outm[7] = am[9];\n outm[8] = am[10];\n return out;\n }\n\n /**\n * Creates a matrix from a translation offset.\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.translate(dest, dest, vec);\n *\n * @param {Mat3} out - Matrix to store result.\n * @param {vec2} v - The translation offset.\n * @returns {Mat3} out.\n * @static\n */\n static fromTranslation (out: Mat3, v: Vec2): Mat3 {\n let outm = out.m;\n outm[0] = 1;\n outm[1] = 0;\n outm[2] = 0;\n outm[3] = 0;\n outm[4] = 1;\n outm[5] = 0;\n outm[6] = v.x;\n outm[7] = v.y;\n outm[8] = 1;\n return out;\n }\n\n /**\n * Creates a matrix from a given angle.\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.rotate(dest, dest, rad);\n *\n * @param {Mat3} out - Matrix to store result.\n * @param {Number} rad - The rotation angle.\n * @returns {Mat3} out.\n * @static\n */\n static fromRotation (out: Mat3, rad: number): Mat3 {\n let s = Math.sin(rad), c = Math.cos(rad);\n let outm = out.m;\n\n outm[0] = c;\n outm[1] = s;\n outm[2] = 0;\n\n outm[3] = -s;\n outm[4] = c;\n outm[5] = 0;\n\n outm[6] = 0;\n outm[7] = 0;\n outm[8] = 1;\n return out;\n }\n\n /**\n * Creates a matrix from a scale vector.\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.scale(dest, dest, vec);\n *\n * @param {Mat3} out - Matrix to store result.\n * @param {vec2} v - Scale vector.\n * @returns {Mat3} out.\n * @static\n */\n static fromScaling (out: Mat3, v: Vec2): Mat3 {\n let outm = out.m;\n outm[0] = v.x;\n outm[1] = 0;\n outm[2] = 0;\n\n outm[3] = 0;\n outm[4] = v.y;\n outm[5] = 0;\n\n outm[6] = 0;\n outm[7] = 0;\n outm[8] = 1;\n return out;\n }\n\n /**\n * Calculates a 3x3 matrix from the given quaternion.\n *\n * @param {Mat3} out - Matrix to store result.\n * @param {quat} q - The quaternion.\n *\n * @returns {Mat3} out.\n * @static\n */\n static fromQuat (out: Mat3, q: Quat): Mat3 {\n let outm = out.m;\n let x = q.x, y = q.y, z = q.z, w = q.w;\n let x2 = x + x;\n let y2 = y + y;\n let z2 = z + z;\n\n let xx = x * x2;\n let yx = y * x2;\n let yy = y * y2;\n let zx = z * x2;\n let zy = z * y2;\n let zz = z * z2;\n let wx = w * x2;\n let wy = w * y2;\n let wz = w * z2;\n\n outm[0] = 1 - yy - zz;\n outm[3] = yx - wz;\n outm[6] = zx + wy;\n\n outm[1] = yx + wz;\n outm[4] = 1 - xx - zz;\n outm[7] = zy - wx;\n\n outm[2] = zx - wy;\n outm[5] = zy + wx;\n outm[8] = 1 - xx - yy;\n\n return out;\n }\n\n /**\n * Calculates a 3x3 matrix from view direction and up direction.\n *\n * @param {Mat3} out - Matrix to store result.\n * @param {vec3} view - View direction (must be normalized).\n * @param {vec3} [up] - Up direction, default is (0,1,0) (must be normalized).\n *\n * @returns {Mat3} out\n * @static\n */\n static fromViewUp (out: Mat3, view: Vec3, up?: Vec3): Mat3 {\n let _fromViewUpIIFE = (function () {\n let default_up = new Vec3(0, 1, 0);\n let x = new Vec3();\n let y = new Vec3();\n\n return function (out, view, up) {\n if (Vec3.lengthSqr(view) < EPSILON * EPSILON) {\n Mat3.identity(out);\n return out;\n }\n\n up = up || default_up;\n Vec3.normalize(x, Vec3.cross(x, up, view));\n\n if (Vec3.lengthSqr(x) < EPSILON * EPSILON) {\n Mat3.identity(out);\n return out;\n }\n\n Vec3.cross(y, view, x);\n Mat3.set(\n out,\n x.x, x.y, x.z,\n y.x, y.y, y.z,\n view.x, view.y, view.z\n );\n\n return out;\n };\n })();\n return _fromViewUpIIFE(out, view, up);\n }\n\n /**\n * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix.\n *\n * @param {Mat3} out - Matrix to store result.\n * @param {mat4} a - A 4x4 matrix to derive the normal matrix from.\n *\n * @returns {Mat3} out.\n * @static\n */\n static normalFromMat4 (out: Mat3, a: Mat4): Mat3 {\n let am = a.m, outm = out.m;\n let a00 = am[0], a01 = am[1], a02 = am[2], a03 = am[3],\n a10 = am[4], a11 = am[5], a12 = am[6], a13 = am[7],\n a20 = am[8], a21 = am[9], a22 = am[10], a23 = am[11],\n a30 = am[12], a31 = am[13], a32 = am[14], a33 = am[15];\n\n let b00 = a00 * a11 - a01 * a10;\n let b01 = a00 * a12 - a02 * a10;\n let b02 = a00 * a13 - a03 * a10;\n let b03 = a01 * a12 - a02 * a11;\n let b04 = a01 * a13 - a03 * a11;\n let b05 = a02 * a13 - a03 * a12;\n let b06 = a20 * a31 - a21 * a30;\n let b07 = a20 * a32 - a22 * a30;\n let b08 = a20 * a33 - a23 * a30;\n let b09 = a21 * a32 - a22 * a31;\n let b10 = a21 * a33 - a23 * a31;\n let b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n let det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return out;\n }\n det = 1.0 / det;\n\n outm[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n outm[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n outm[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n\n outm[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n outm[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n outm[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n\n outm[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n outm[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n outm[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n\n return out;\n }\n\n /**\n * Returns Frobenius norm of a matrix.\n *\n * @param {Mat3} a - Matrix to calculate Frobenius norm of.\n * @returns {Number} - The frobenius norm.\n * @static\n */\n static frob (a: Mat3): number {\n let am = a.m;\n return (Math.sqrt(Math.pow(am[0], 2) + Math.pow(am[1], 2) + Math.pow(am[2], 2) + Math.pow(am[3], 2) + Math.pow(am[4], 2) + Math.pow(am[5], 2) + Math.pow(am[6], 2) + Math.pow(am[7], 2) + Math.pow(am[8], 2)));\n }\n\n /**\n * Adds two matrices.\n *\n * @param {Mat3} out - Matrix to store result.\n * @param {Mat3} a - The first operand.\n * @param {Mat3} b - The second operand.\n * @returns {Mat3} out.\n * @static\n */\n static add (out: Mat3, a: Mat3, b: Mat3): Mat3 {\n let am = a.m, bm = b.m, outm = out.m;\n outm[0] = am[0] + bm[0];\n outm[1] = am[1] + bm[1];\n outm[2] = am[2] + bm[2];\n outm[3] = am[3] + bm[3];\n outm[4] = am[4] + bm[4];\n outm[5] = am[5] + bm[5];\n outm[6] = am[6] + bm[6];\n outm[7] = am[7] + bm[7];\n outm[8] = am[8] + bm[8];\n return out;\n }\n\n /**\n * Subtracts matrix b from matrix a.\n *\n * @param {Mat3} out - Matrix to store result.\n * @param {Mat3} a - The first operand.\n * @param {Mat3} b - The second operand.\n * @returns {Mat3} out.\n * @static\n */\n static subtract (out: Mat3, a: Mat3, b: Mat3): Mat3 {\n let am = a.m, bm = b.m, outm = out.m;\n outm[0] = am[0] - bm[0];\n outm[1] = am[1] - bm[1];\n outm[2] = am[2] - bm[2];\n outm[3] = am[3] - bm[3];\n outm[4] = am[4] - bm[4];\n outm[5] = am[5] - bm[5];\n outm[6] = am[6] - bm[6];\n outm[7] = am[7] - bm[7];\n outm[8] = am[8] - bm[8];\n return out;\n }\n\n /**\n * Multiply each element of a matrix by a scalar number.\n *\n * @param {Mat3} out - Matrix to store result.\n * @param {Mat3} a - Matrix to scale\n * @param {Number} b - The scale number.\n * @returns {Mat3} out.\n * @static\n */\n static multiplyScalar (out: Mat3, a: Mat3, b: number): Mat3 {\n let am = a.m, outm = out.m;\n outm[0] = am[0] * b;\n outm[1] = am[1] * b;\n outm[2] = am[2] * b;\n outm[3] = am[3] * b;\n outm[4] = am[4] * b;\n outm[5] = am[5] * b;\n outm[6] = am[6] * b;\n outm[7] = am[7] * b;\n outm[8] = am[8] * b;\n return out;\n }\n\n /**\n * Adds two matrices after multiplying each element of the second operand by a scalar number.\n *\n * @param {Mat3} out - Matrix to store result.\n * @param {Mat3} a - The first operand.\n * @param {Mat3} b - The second operand.\n * @param {Number} scale - The scale number.\n * @returns {Mat3} out.\n * @static\n */\n static multiplyScalarAndAdd (out: Mat3, a: Mat3, b: Mat3, scale: number): Mat3 {\n let am = a.m, bm = b.m, outm = out.m;\n outm[0] = am[0] + (bm[0] * scale);\n outm[1] = am[1] + (bm[1] * scale);\n outm[2] = am[2] + (bm[2] * scale);\n outm[3] = am[3] + (bm[3] * scale);\n outm[4] = am[4] + (bm[4] * scale);\n outm[5] = am[5] + (bm[5] * scale);\n outm[6] = am[6] + (bm[6] * scale);\n outm[7] = am[7] + (bm[7] * scale);\n outm[8] = am[8] + (bm[8] * scale);\n return out;\n }\n\n /**\n * Returns whether the specified matrices are equal. (Compared using ===)\n *\n * @param {Mat3} a - The first matrix.\n * @param {Mat3} b - The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n * @static\n */\n static exactEquals (a: Mat3, b: Mat3): boolean {\n let am = a.m, bm = b.m;\n return am[0] === bm[0] && am[1] === bm[1] && am[2] === bm[2] &&\n am[3] === bm[3] && am[4] === bm[4] && am[5] === bm[5] &&\n am[6] === bm[6] && am[7] === bm[7] && am[8] === bm[8];\n }\n\n /**\n * Returns whether the specified matrices are approximately equal.\n *\n * @param {Mat3} a - The first matrix.\n * @param {Mat3} b - The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n * @static\n */\n static equals (a: Mat3, b: Mat3): boolean {\n let am = a.m, bm = b.m;\n let a0 = am[0], a1 = am[1], a2 = am[2], a3 = am[3], a4 = am[4], a5 = am[5], a6 = am[6], a7 = am[7], a8 = am[8];\n let b0 = bm[0], b1 = bm[1], b2 = bm[2], b3 = bm[3], b4 = bm[4], b5 = bm[5], b6 = bm[6], b7 = bm[7], b8 = bm[8];\n return (\n Math.abs(a0 - b0) <= EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) &&\n Math.abs(a1 - b1) <= EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) &&\n Math.abs(a2 - b2) <= EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) &&\n Math.abs(a3 - b3) <= EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) &&\n Math.abs(a4 - b4) <= EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) &&\n Math.abs(a5 - b5) <= EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) &&\n Math.abs(a6 - b6) <= EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) &&\n Math.abs(a7 - b7) <= EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) &&\n Math.abs(a8 - b8) <= EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8))\n );\n }\n\n /**\n * !#zh 矩阵转数组\n * !#en Matrix transpose array\n * @method toArray\n * @typescript\n * toArray <Out extends IWritableArrayLike<number>> (out: Out, mat: IMat3Like, ofs?: number): Out\n * @param ofs 数组内的起始偏移量\n * @static\n */\n static toArray <Out extends IWritableArrayLike<number>> (out: Out, mat: IMat3Like, ofs = 0) {\n let m = mat.m;\n for (let i = 0; i < 9; i++) {\n out[ofs + i] = m[i];\n }\n return out;\n }\n\n /**\n * !#zh 数组转矩阵\n * !#en Transfer matrix array\n * @method fromArray\n * @typescript\n * fromArray <Out extends IMat3Like> (out: Out, arr: IWritableArrayLike<number>, ofs?: number): Out\n * @param ofs 数组起始偏移量\n * @static\n */\n static fromArray <Out extends IMat3Like> (out: Out, arr: IWritableArrayLike<number>, ofs = 0) {\n let m = out.m;\n for (let i = 0; i < 9; i++) {\n m[i] = arr[ofs + i];\n }\n return out;\n }\n\n /**\n * !#en Matrix Data\n * !#zh 矩阵数据\n * @property {Float64Array | Float32Array} m\n */\n m: FloatArray;\n\n\n /**\n * @method constructor\n * @typescript\n * constructor (m00?: number | Float32Array, m01?: number, m02?: number, m03?: number, m04?: number, m05?: number, m06?: number, m07?: number, m08?: number)\n */\n constructor (\n m00: number | FloatArray = 1, m01 = 0, m02 = 0,\n m03 = 0, m04 = 1, m05 = 0,\n m06 = 0, m07 = 0, m08 = 1\n ) {\n if (m00 instanceof FLOAT_ARRAY_TYPE) {\n this.m = m00;\n } else {\n this.m = new FLOAT_ARRAY_TYPE(9);\n let m = this.m;\n /**\n * The element at column 0 row 0.\n * @type {number}\n * */\n m[0] = m00 as number;\n\n /**\n * The element at column 0 row 1.\n * @type {number}\n * */\n m[1] = m01;\n\n /**\n * The element at column 0 row 2.\n * @type {number}\n * */\n m[2] = m02;\n\n /**\n * The element at column 1 row 0.\n * @type {number}\n * */\n m[3] = m03;\n\n /**\n * The element at column 1 row 1.\n * @type {number}\n * */\n m[4] = m04;\n\n /**\n * The element at column 1 row 2.\n * @type {number}\n * */\n m[5] = m05;\n\n /**\n * The element at column 2 row 0.\n * @type {number}\n * */\n m[6] = m06;\n\n /**\n * The element at column 2 row 1.\n * @type {number}\n * */\n m[7] = m07;\n\n /**\n * The element at column 2 row 2.\n * @type {number}\n * */\n m[8] = m08;\n }\n }\n\n\n /**\n * Returns a string representation of a matrix.\n *\n * @param {Mat3} a - The matrix.\n * @returns {String} String representation of this matrix.\n */\n toString () {\n let am = this.m;\n return `mat3(${am[0]}, ${am[1]}, ${am[2]}, ${am[3]}, ${am[4]}, ${am[5]}, ${am[6]}, ${am[7]}, ${am[8]})`;\n }\n}\n\ncc.Mat3 = Mat3;\n","/****************************************************************************\n Copyright (c) 2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport ValueType from './value-type';\nimport CCClass from '../platform/CCClass';\nimport Vec3 from './vec3';\nimport Quat from './quat';\nimport { EPSILON, FLOAT_ARRAY_TYPE } from './utils';\nimport Mat3 from './mat3';\n\nlet _a00: number = 0; let _a01: number = 0; let _a02: number = 0; let _a03: number = 0;\nlet _a10: number = 0; let _a11: number = 0; let _a12: number = 0; let _a13: number = 0;\nlet _a20: number = 0; let _a21: number = 0; let _a22: number = 0; let _a23: number = 0;\nlet _a30: number = 0; let _a31: number = 0; let _a32: number = 0; let _a33: number = 0;\n\n/**\n * !#en Representation of 4*4 matrix.\n * !#zh 表示 4*4 矩阵\n *\n * @class Mat4\n * @extends ValueType\n */\nexport default class Mat4 extends ValueType {\n static mul = Mat4.multiply;\n static sub = Mat4.subtract;\n\n /**\n * !#en Multiply the current matrix with another one\n * !#zh 将当前矩阵与指定矩阵相乘\n * @method mul\n * @param {Mat4} other the second operand\n * @param {Mat4} [out] the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created\n * @returns {Mat4} out\n */\n mul (m: Mat4, out: Mat4): Mat4 {\n return Mat4.multiply(out || new Mat4(), this, m);\n }\n /**\n * !#en Multiply each element of the matrix by a scalar.\n * !#zh 将矩阵的每一个元素都乘以指定的缩放值。\n * @method mulScalar\n * @param {Number} number amount to scale the matrix's elements by\n * @param {Mat4} [out] the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created\n * @returns {Mat4} out\n */\n mulScalar (num: number, out: Mat4) {\n Mat4.multiplyScalar(out || new Mat4(), this, num);\n }\n /**\n * !#en Subtracts the current matrix with another one\n * !#zh 将当前矩阵与指定的矩阵相减\n * @method sub\n * @param {Mat4} other the second operand\n * @param {Mat4} [out] the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created\n * @returns {Mat4} out\n */\n sub (m: Mat4, out: Mat4) {\n Mat4.subtract(out || new Mat4(), this, m);\n }\n\n /**\n * Identity of Mat4\n * @property {Mat4} IDENTITY\n * @static\n */\n static IDENTITY = Object.freeze(new Mat4());\n\n /**\n * !#zh 获得指定矩阵的拷贝\n * !#en Copy of the specified matrix to obtain\n * @method clone\n * @typescript\n * clone<Out extends IMat4Like> (a: Out): Mat4\n * @static\n */\n static clone<Out extends IMat4Like> (a: Out) {\n let m = a.m;\n return new Mat4(\n m[0], m[1], m[2], m[3],\n m[4], m[5], m[6], m[7],\n m[8], m[9], m[10], m[11],\n m[12], m[13], m[14], m[15],\n );\n }\n\n /**\n * !#zh 复制目标矩阵\n * !#en Copy the target matrix\n * @method copy\n * @typescript\n * copy<Out extends IMat4Like> (out: Out, a: Out): Out\n * @static\n */\n static copy<Out extends IMat4Like> (out: Out, a: Out) {\n let m = out.m, am = a.m;\n m[0] = am[0];\n m[1] = am[1];\n m[2] = am[2];\n m[3] = am[3];\n m[4] = am[4];\n m[5] = am[5];\n m[6] = am[6];\n m[7] = am[7];\n m[8] = am[8];\n m[9] = am[9];\n m[10] = am[10];\n m[11] = am[11];\n m[12] = am[12];\n m[13] = am[13];\n m[14] = am[14];\n m[15] = am[15];\n return out;\n }\n\n /**\n * !#zh 设置矩阵值\n * !#en Setting matrix values\n * @static\n */\n static set<Out extends IMat4Like> (\n out: Out,\n m00: number, m01: number, m02: number, m03: number,\n m10: number, m11: number, m12: number, m13: number,\n m20: number, m21: number, m22: number, m23: number,\n m30: number, m31: number, m32: number, m33: number,\n ) {\n let m = out.m;\n m[0] = m00; m[1] = m01; m[2] = m02; m[3] = m03;\n m[4] = m10; m[5] = m11; m[6] = m12; m[7] = m13;\n m[8] = m20; m[9] = m21; m[10] = m22; m[11] = m23;\n m[12] = m30; m[13] = m31; m[14] = m32; m[15] = m33;\n return out;\n }\n\n /**\n * !#zh 将目标赋值为单位矩阵\n * !#en The target of an assignment is the identity matrix\n * @method identity\n * @typescript\n * identity<Out extends IMat4Like> (out: Out): Out\n * @static\n */\n static identity<Out extends IMat4Like> (out: Out) {\n let m = out.m;\n m[0] = 1;\n m[1] = 0;\n m[2] = 0;\n m[3] = 0;\n m[4] = 0;\n m[5] = 1;\n m[6] = 0;\n m[7] = 0;\n m[8] = 0;\n m[9] = 0;\n m[10] = 1;\n m[11] = 0;\n m[12] = 0;\n m[13] = 0;\n m[14] = 0;\n m[15] = 1;\n return out;\n }\n\n /**\n * !#zh 转置矩阵\n * !#en Transposed matrix\n * @method transpose\n * @typescript\n * transpose<Out extends IMat4Like> (out: Out, a: Out): Out\n * @static\n */\n static transpose<Out extends IMat4Like> (out: Out, a: Out) {\n let m = out.m, am = a.m;\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n const a01 = am[1], a02 = am[2], a03 = am[3], a12 = am[6], a13 = am[7], a23 = am[11];\n m[1] = am[4];\n m[2] = am[8];\n m[3] = am[12];\n m[4] = a01;\n m[6] = am[9];\n m[7] = am[13];\n m[8] = a02;\n m[9] = a12;\n m[11] = am[14];\n m[12] = a03;\n m[13] = a13;\n m[14] = a23;\n } else {\n m[0] = am[0];\n m[1] = am[4];\n m[2] = am[8];\n m[3] = am[12];\n m[4] = am[1];\n m[5] = am[5];\n m[6] = am[9];\n m[7] = am[13];\n m[8] = am[2];\n m[9] = am[6];\n m[10] = am[10];\n m[11] = am[14];\n m[12] = am[3];\n m[13] = am[7];\n m[14] = am[11];\n m[15] = am[15];\n }\n return out;\n }\n\n /**\n * !#zh 矩阵求逆\n * !#en Matrix inversion\n * @method invert\n * @typescript\n * invert<Out extends IMat4Like> (out: Out, a: Out): Out\n * @static\n */\n static invert<Out extends IMat4Like> (out: Out, a: Out) {\n let am = a.m;\n _a00 = am[0]; _a01 = am[1]; _a02 = am[2]; _a03 = am[3];\n _a10 = am[4]; _a11 = am[5]; _a12 = am[6]; _a13 = am[7];\n _a20 = am[8]; _a21 = am[9]; _a22 = am[10]; _a23 = am[11];\n _a30 = am[12]; _a31 = am[13]; _a32 = am[14]; _a33 = am[15];\n\n const b00 = _a00 * _a11 - _a01 * _a10;\n const b01 = _a00 * _a12 - _a02 * _a10;\n const b02 = _a00 * _a13 - _a03 * _a10;\n const b03 = _a01 * _a12 - _a02 * _a11;\n const b04 = _a01 * _a13 - _a03 * _a11;\n const b05 = _a02 * _a13 - _a03 * _a12;\n const b06 = _a20 * _a31 - _a21 * _a30;\n const b07 = _a20 * _a32 - _a22 * _a30;\n const b08 = _a20 * _a33 - _a23 * _a30;\n const b09 = _a21 * _a32 - _a22 * _a31;\n const b10 = _a21 * _a33 - _a23 * _a31;\n const b11 = _a22 * _a33 - _a23 * _a32;\n\n // Calculate the determinant\n let det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (det === 0) { return null; }\n det = 1.0 / det;\n\n let m = out.m;\n m[0] = (_a11 * b11 - _a12 * b10 + _a13 * b09) * det;\n m[1] = (_a02 * b10 - _a01 * b11 - _a03 * b09) * det;\n m[2] = (_a31 * b05 - _a32 * b04 + _a33 * b03) * det;\n m[3] = (_a22 * b04 - _a21 * b05 - _a23 * b03) * det;\n m[4] = (_a12 * b08 - _a10 * b11 - _a13 * b07) * det;\n m[5] = (_a00 * b11 - _a02 * b08 + _a03 * b07) * det;\n m[6] = (_a32 * b02 - _a30 * b05 - _a33 * b01) * det;\n m[7] = (_a20 * b05 - _a22 * b02 + _a23 * b01) * det;\n m[8] = (_a10 * b10 - _a11 * b08 + _a13 * b06) * det;\n m[9] = (_a01 * b08 - _a00 * b10 - _a03 * b06) * det;\n m[10] = (_a30 * b04 - _a31 * b02 + _a33 * b00) * det;\n m[11] = (_a21 * b02 - _a20 * b04 - _a23 * b00) * det;\n m[12] = (_a11 * b07 - _a10 * b09 - _a12 * b06) * det;\n m[13] = (_a00 * b09 - _a01 * b07 + _a02 * b06) * det;\n m[14] = (_a31 * b01 - _a30 * b03 - _a32 * b00) * det;\n m[15] = (_a20 * b03 - _a21 * b01 + _a22 * b00) * det;\n\n return out;\n }\n\n /**\n * !#zh 矩阵行列式\n * !#en Matrix determinant\n * @method determinant\n * @typescript\n * determinant<Out extends IMat4Like> (a: Out): number\n * @static\n */\n static determinant<Out extends IMat4Like> (a: Out): number {\n let m = a.m;\n _a00 = m[0]; _a01 = m[1]; _a02 = m[2]; _a03 = m[3];\n _a10 = m[4]; _a11 = m[5]; _a12 = m[6]; _a13 = m[7];\n _a20 = m[8]; _a21 = m[9]; _a22 = m[10]; _a23 = m[11];\n _a30 = m[12]; _a31 = m[13]; _a32 = m[14]; _a33 = m[15];\n\n const b00 = _a00 * _a11 - _a01 * _a10;\n const b01 = _a00 * _a12 - _a02 * _a10;\n const b02 = _a00 * _a13 - _a03 * _a10;\n const b03 = _a01 * _a12 - _a02 * _a11;\n const b04 = _a01 * _a13 - _a03 * _a11;\n const b05 = _a02 * _a13 - _a03 * _a12;\n const b06 = _a20 * _a31 - _a21 * _a30;\n const b07 = _a20 * _a32 - _a22 * _a30;\n const b08 = _a20 * _a33 - _a23 * _a30;\n const b09 = _a21 * _a32 - _a22 * _a31;\n const b10 = _a21 * _a33 - _a23 * _a31;\n const b11 = _a22 * _a33 - _a23 * _a32;\n\n // Calculate the determinant\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n }\n\n /**\n * !#zh 矩阵乘法\n * !#en Matrix Multiplication\n * @method multiply\n * @typescript\n * multiply<Out extends IMat4Like> (out: Out, a: Out, b: Out): Out\n * @static\n */\n static multiply<Out extends IMat4Like> (out: Out, a: Out, b: Out) {\n let m = out.m, am = a.m, bm = b.m;\n _a00 = am[0]; _a01 = am[1]; _a02 = am[2]; _a03 = am[3];\n _a10 = am[4]; _a11 = am[5]; _a12 = am[6]; _a13 = am[7];\n _a20 = am[8]; _a21 = am[9]; _a22 = am[10]; _a23 = am[11];\n _a30 = am[12]; _a31 = am[13]; _a32 = am[14]; _a33 = am[15];\n\n // Cache only the current line of the second matrix\n let b0 = bm[0], b1 = bm[1], b2 = bm[2], b3 = bm[3];\n m[0] = b0 * _a00 + b1 * _a10 + b2 * _a20 + b3 * _a30;\n m[1] = b0 * _a01 + b1 * _a11 + b2 * _a21 + b3 * _a31;\n m[2] = b0 * _a02 + b1 * _a12 + b2 * _a22 + b3 * _a32;\n m[3] = b0 * _a03 + b1 * _a13 + b2 * _a23 + b3 * _a33;\n\n b0 = bm[4]; b1 = bm[5]; b2 = bm[6]; b3 = bm[7];\n m[4] = b0 * _a00 + b1 * _a10 + b2 * _a20 + b3 * _a30;\n m[5] = b0 * _a01 + b1 * _a11 + b2 * _a21 + b3 * _a31;\n m[6] = b0 * _a02 + b1 * _a12 + b2 * _a22 + b3 * _a32;\n m[7] = b0 * _a03 + b1 * _a13 + b2 * _a23 + b3 * _a33;\n\n b0 = bm[8]; b1 = bm[9]; b2 = bm[10]; b3 = bm[11];\n m[8] = b0 * _a00 + b1 * _a10 + b2 * _a20 + b3 * _a30;\n m[9] = b0 * _a01 + b1 * _a11 + b2 * _a21 + b3 * _a31;\n m[10] = b0 * _a02 + b1 * _a12 + b2 * _a22 + b3 * _a32;\n m[11] = b0 * _a03 + b1 * _a13 + b2 * _a23 + b3 * _a33;\n\n b0 = bm[12]; b1 = bm[13]; b2 = bm[14]; b3 = bm[15];\n m[12] = b0 * _a00 + b1 * _a10 + b2 * _a20 + b3 * _a30;\n m[13] = b0 * _a01 + b1 * _a11 + b2 * _a21 + b3 * _a31;\n m[14] = b0 * _a02 + b1 * _a12 + b2 * _a22 + b3 * _a32;\n m[15] = b0 * _a03 + b1 * _a13 + b2 * _a23 + b3 * _a33;\n return out;\n }\n\n /**\n * !#zh 在给定矩阵变换基础上加入变换\n * !#en Was added in a given transformation matrix transformation on the basis of\n * @method transform\n * @typescript\n * transform<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, a: Out, v: VecLike): Out\n * @static\n */\n static transform<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, a: Out, v: VecLike) {\n const x = v.x, y = v.y, z = v.z;\n let m = out.m, am = a.m;\n if (a === out) {\n m[12] = am[0] * x + am[4] * y + am[8] * z + am[12];\n m[13] = am[1] * x + am[5] * y + am[9] * z + am[13];\n m[14] = am[2] * x + am[6] * y + am[10] * z + am[14];\n m[15] = am[3] * x + am[7] * y + am[11] * z + am[15];\n } else {\n _a00 = am[0]; _a01 = am[1]; _a02 = am[2]; _a03 = am[3];\n _a10 = am[4]; _a11 = am[5]; _a12 = am[6]; _a13 = am[7];\n _a20 = am[8]; _a21 = am[9]; _a22 = am[10]; _a23 = am[11];\n _a30 = am[12]; _a31 = am[13]; _a32 = am[14]; _a33 = am[15];\n\n m[0] = _a00; m[1] = _a01; m[2] = _a02; m[3] = _a03;\n m[4] = _a10; m[5] = _a11; m[6] = _a12; m[7] = _a13;\n m[8] = _a20; m[9] = _a21; m[10] = _a22; m[11] = _a23;\n\n m[12] = _a00 * x + _a10 * y + _a20 * z + am[12];\n m[13] = _a01 * x + _a11 * y + _a21 * z + am[13];\n m[14] = _a02 * x + _a12 * y + _a22 * z + am[14];\n m[15] = _a03 * x + _a13 * y + _a23 * z + am[15];\n }\n return out;\n }\n\n /**\n * !#zh 在给定矩阵变换基础上加入新位移变换\n * !#en Add new displacement transducer in a matrix transformation on the basis of a given\n * @method translate\n * @typescript\n * translate<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, a: Out, v: VecLike): Out\n * @static\n */\n static translate<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, a: Out, v: VecLike) {\n let m = out.m, am = a.m;\n if (a === out) {\n m[12] += v.x;\n m[13] += v.y;\n m[14] += v.z;\n } else {\n m[0] = am[0]; m[1] = am[1]; m[2] = am[2]; m[3] = am[3];\n m[4] = am[4]; m[5] = am[5]; m[6] = am[6]; m[7] = am[7];\n m[8] = am[8]; m[9] = am[9]; m[10] = am[10]; m[11] = am[11];\n m[12] += v.x;\n m[13] += v.y;\n m[14] += v.z;\n m[15] = am[15];\n }\n return out;\n }\n\n /**\n * !#zh 在给定矩阵变换基础上加入新缩放变换\n * !#en Add new scaling transformation in a given matrix transformation on the basis of\n * @method scale\n * @typescript\n * scale<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, a: Out, v: VecLike): Out\n * @static\n */\n static scale<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, a: Out, v: VecLike) {\n const x = v.x, y = v.y, z = v.z;\n let m = out.m, am = a.m;\n m[0] = am[0] * x;\n m[1] = am[1] * x;\n m[2] = am[2] * x;\n m[3] = am[3] * x;\n m[4] = am[4] * y;\n m[5] = am[5] * y;\n m[6] = am[6] * y;\n m[7] = am[7] * y;\n m[8] = am[8] * z;\n m[9] = am[9] * z;\n m[10] = am[10] * z;\n m[11] = am[11] * z;\n m[12] = am[12];\n m[13] = am[13];\n m[14] = am[14];\n m[15] = am[15];\n return out;\n }\n\n /**\n * !#zh 在给定矩阵变换基础上加入新旋转变换\n * !#en Add a new rotational transform matrix transformation on the basis of a given\n * @method rotate\n * @typescript\n * rotate<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, a: Out, rad: number, axis: VecLike): Out\n * @param rad 旋转角度\n * @param axis 旋转轴\n * @static\n */\n static rotate<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, a: Out, rad: number, axis: VecLike) {\n let x = axis.x, y = axis.y, z = axis.z;\n\n let len = Math.sqrt(x * x + y * y + z * z);\n\n if (Math.abs(len) < EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n\n const s = Math.sin(rad);\n const c = Math.cos(rad);\n const t = 1 - c;\n\n let am = a.m;\n _a00 = am[0]; _a01 = am[1]; _a02 = am[2]; _a03 = am[3];\n _a10 = am[4]; _a11 = am[5]; _a12 = am[6]; _a13 = am[7];\n _a20 = am[8]; _a21 = am[9]; _a22 = am[10]; _a23 = am[11];\n\n // Construct the elements of the rotation matrix\n const b00 = x * x * t + c, b01 = y * x * t + z * s, b02 = z * x * t - y * s;\n const b10 = x * y * t - z * s, b11 = y * y * t + c, b12 = z * y * t + x * s;\n const b20 = x * z * t + y * s, b21 = y * z * t - x * s, b22 = z * z * t + c;\n\n let m = out.m;\n // Perform rotation-specific matrix multiplication\n m[0] = _a00 * b00 + _a10 * b01 + _a20 * b02;\n m[1] = _a01 * b00 + _a11 * b01 + _a21 * b02;\n m[2] = _a02 * b00 + _a12 * b01 + _a22 * b02;\n m[3] = _a03 * b00 + _a13 * b01 + _a23 * b02;\n m[4] = _a00 * b10 + _a10 * b11 + _a20 * b12;\n m[5] = _a01 * b10 + _a11 * b11 + _a21 * b12;\n m[6] = _a02 * b10 + _a12 * b11 + _a22 * b12;\n m[7] = _a03 * b10 + _a13 * b11 + _a23 * b12;\n m[8] = _a00 * b20 + _a10 * b21 + _a20 * b22;\n m[9] = _a01 * b20 + _a11 * b21 + _a21 * b22;\n m[10] = _a02 * b20 + _a12 * b21 + _a22 * b22;\n m[11] = _a03 * b20 + _a13 * b21 + _a23 * b22;\n\n // If the source and destination differ, copy the unchanged last row\n if (a !== out) {\n m[12] = am[12];\n m[13] = am[13];\n m[14] = am[14];\n m[15] = am[15];\n }\n\n return out;\n }\n\n /**\n * !#zh 在给定矩阵变换基础上加入绕 X 轴的旋转变换\n * !#en Add rotational transformation around the X axis at a given matrix transformation on the basis of\n * @method rotateX\n * @typescript\n * rotateX<Out extends IMat4Like> (out: Out, a: Out, rad: number): Out\n * @param rad 旋转角度\n * @static\n */\n static rotateX<Out extends IMat4Like> (out: Out, a: Out, rad: number) {\n let m = out.m, am = a.m;\n const s = Math.sin(rad),\n c = Math.cos(rad),\n a10 = am[4],\n a11 = am[5],\n a12 = am[6],\n a13 = am[7],\n a20 = am[8],\n a21 = am[9],\n a22 = am[10],\n a23 = am[11];\n\n if (a !== out) { // If the source and destination differ, copy the unchanged rows\n m[0] = am[0];\n m[1] = am[1];\n m[2] = am[2];\n m[3] = am[3];\n m[12] = am[12];\n m[13] = am[13];\n m[14] = am[14];\n m[15] = am[15];\n }\n\n // Perform axis-specific matrix multiplication\n m[4] = a10 * c + a20 * s;\n m[5] = a11 * c + a21 * s;\n m[6] = a12 * c + a22 * s;\n m[7] = a13 * c + a23 * s;\n m[8] = a20 * c - a10 * s;\n m[9] = a21 * c - a11 * s;\n m[10] = a22 * c - a12 * s;\n m[11] = a23 * c - a13 * s;\n\n return out;\n }\n\n /**\n * !#zh 在给定矩阵变换基础上加入绕 Y 轴的旋转变换\n * !#en Add about the Y axis rotation transformation in a given matrix transformation on the basis of\n * @method rotateY\n * @typescript\n * rotateY<Out extends IMat4Like> (out: Out, a: Out, rad: number): Out\n * @param rad 旋转角度\n * @static\n */\n static rotateY<Out extends IMat4Like> (out: Out, a: Out, rad: number) {\n let m = out.m, am = a.m;\n const s = Math.sin(rad),\n c = Math.cos(rad),\n a00 = am[0],\n a01 = am[1],\n a02 = am[2],\n a03 = am[3],\n a20 = am[8],\n a21 = am[9],\n a22 = am[10],\n a23 = am[11];\n\n if (a !== out) { // If the source and destination differ, copy the unchanged rows\n m[4] = am[4];\n m[5] = am[5];\n m[6] = am[6];\n m[7] = am[7];\n m[12] = am[12];\n m[13] = am[13];\n m[14] = am[14];\n m[15] = am[15];\n }\n\n // Perform axis-specific matrix multiplication\n m[0] = a00 * c - a20 * s;\n m[1] = a01 * c - a21 * s;\n m[2] = a02 * c - a22 * s;\n m[3] = a03 * c - a23 * s;\n m[8] = a00 * s + a20 * c;\n m[9] = a01 * s + a21 * c;\n m[10] = a02 * s + a22 * c;\n m[11] = a03 * s + a23 * c;\n\n return out;\n }\n\n /**\n * !#zh 在给定矩阵变换基础上加入绕 Z 轴的旋转变换\n * !#en Added about the Z axis at a given rotational transformation matrix transformation on the basis of\n * @method rotateZ\n * @typescript\n * rotateZ<Out extends IMat4Like> (out: Out, a: Out, rad: number): Out\n * @param rad 旋转角度\n * @static\n */\n static rotateZ<Out extends IMat4Like> (out: Out, a: Out, rad: number) {\n const am = a.m;\n let m = out.m;\n const s = Math.sin(rad),\n c = Math.cos(rad),\n a00 = a.m[0],\n a01 = a.m[1],\n a02 = a.m[2],\n a03 = a.m[3],\n a10 = a.m[4],\n a11 = a.m[5],\n a12 = a.m[6],\n a13 = a.m[7];\n\n // If the source and destination differ, copy the unchanged last row\n if (a !== out) {\n m[8] = am[8];\n m[9] = am[9];\n m[10] = am[10];\n m[11] = am[11];\n m[12] = am[12];\n m[13] = am[13];\n m[14] = am[14];\n m[15] = am[15];\n }\n\n // Perform axis-specific matrix multiplication\n m[0] = a00 * c + a10 * s;\n m[1] = a01 * c + a11 * s;\n m[2] = a02 * c + a12 * s;\n m[3] = a03 * c + a13 * s;\n m[4] = a10 * c - a00 * s;\n m[5] = a11 * c - a01 * s;\n m[6] = a12 * c - a02 * s;\n m[7] = a13 * c - a03 * s;\n\n return out;\n }\n\n /**\n * !#zh 计算位移矩阵\n * !#en Displacement matrix calculation\n * @method fromTranslation\n * @typescript\n * fromTranslation<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, v: VecLike): Out\n * @static\n */\n static fromTranslation<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, v: VecLike) {\n let m = out.m;\n m[0] = 1;\n m[1] = 0;\n m[2] = 0;\n m[3] = 0;\n m[4] = 0;\n m[5] = 1;\n m[6] = 0;\n m[7] = 0;\n m[8] = 0;\n m[9] = 0;\n m[10] = 1;\n m[11] = 0;\n m[12] = v.x;\n m[13] = v.y;\n m[14] = v.z;\n m[15] = 1;\n return out;\n }\n\n /**\n * !#zh 计算缩放矩阵\n * !#en Scaling matrix calculation\n * @method fromScaling\n * @typescript\n * fromScaling<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, v: VecLike): Out\n * @static\n */\n static fromScaling<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, v: VecLike) {\n let m = out.m;\n m[0] = v.x;\n m[1] = 0;\n m[2] = 0;\n m[3] = 0;\n m[4] = 0;\n m[5] = v.y;\n m[6] = 0;\n m[7] = 0;\n m[8] = 0;\n m[9] = 0;\n m[10] = v.z;\n m[11] = 0;\n m[12] = 0;\n m[13] = 0;\n m[14] = 0;\n m[15] = 1;\n return out;\n }\n\n /**\n * !#zh 计算旋转矩阵\n * !#en Calculates the rotation matrix\n * @method fromRotation\n * @typescript\n * fromRotation<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, rad: number, axis: VecLike): Out\n * @static\n */\n static fromRotation<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, rad: number, axis: VecLike) {\n let x = axis.x, y = axis.y, z = axis.z;\n let len = Math.sqrt(x * x + y * y + z * z);\n\n if (Math.abs(len) < EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n\n const s = Math.sin(rad);\n const c = Math.cos(rad);\n const t = 1 - c;\n\n // Perform rotation-specific matrix multiplication\n let m = out.m;\n m[0] = x * x * t + c;\n m[1] = y * x * t + z * s;\n m[2] = z * x * t - y * s;\n m[3] = 0;\n m[4] = x * y * t - z * s;\n m[5] = y * y * t + c;\n m[6] = z * y * t + x * s;\n m[7] = 0;\n m[8] = x * z * t + y * s;\n m[9] = y * z * t - x * s;\n m[10] = z * z * t + c;\n m[11] = 0;\n m[12] = 0;\n m[13] = 0;\n m[14] = 0;\n m[15] = 1;\n return out;\n }\n\n /**\n * !#zh 计算绕 X 轴的旋转矩阵\n * !#en Calculating rotation matrix about the X axis\n * @method fromXRotation\n * @typescript\n * fromXRotation<Out extends IMat4Like> (out: Out, rad: number): Out\n * @static\n */\n static fromXRotation<Out extends IMat4Like> (out: Out, rad: number) {\n const s = Math.sin(rad), c = Math.cos(rad);\n\n // Perform axis-specific matrix multiplication\n let m = out.m;\n m[0] = 1;\n m[1] = 0;\n m[2] = 0;\n m[3] = 0;\n m[4] = 0;\n m[5] = c;\n m[6] = s;\n m[7] = 0;\n m[8] = 0;\n m[9] = -s;\n m[10] = c;\n m[11] = 0;\n m[12] = 0;\n m[13] = 0;\n m[14] = 0;\n m[15] = 1;\n return out;\n }\n\n /**\n * !#zh 计算绕 Y 轴的旋转矩阵\n * !#en Calculating rotation matrix about the Y axis\n * @method fromYRotation\n * @typescript\n * fromYRotation<Out extends IMat4Like> (out: Out, rad: number): Out\n * @static\n */\n static fromYRotation<Out extends IMat4Like> (out: Out, rad: number) {\n const s = Math.sin(rad), c = Math.cos(rad);\n\n // Perform axis-specific matrix multiplication\n let m = out.m;\n m[0] = c;\n m[1] = 0;\n m[2] = -s;\n m[3] = 0;\n m[4] = 0;\n m[5] = 1;\n m[6] = 0;\n m[7] = 0;\n m[8] = s;\n m[9] = 0;\n m[10] = c;\n m[11] = 0;\n m[12] = 0;\n m[13] = 0;\n m[14] = 0;\n m[15] = 1;\n return out;\n }\n\n /**\n * !#zh 计算绕 Z 轴的旋转矩阵\n * !#en Calculating rotation matrix about the Z axis\n * @method fromZRotation\n * @typescript\n * fromZRotation<Out extends IMat4Like> (out: Out, rad: number): Out\n * @static\n */\n static fromZRotation<Out extends IMat4Like> (out: Out, rad: number) {\n const s = Math.sin(rad), c = Math.cos(rad);\n\n // Perform axis-specific matrix multiplication\n let m = out.m;\n m[0] = c;\n m[1] = s;\n m[2] = 0;\n m[3] = 0;\n m[4] = -s;\n m[5] = c;\n m[6] = 0;\n m[7] = 0;\n m[8] = 0;\n m[9] = 0;\n m[10] = 1;\n m[11] = 0;\n m[12] = 0;\n m[13] = 0;\n m[14] = 0;\n m[15] = 1;\n return out;\n }\n\n /**\n * !#zh 根据旋转和位移信息计算矩阵\n * !#en The rotation and displacement information calculating matrix\n * @method fromRT\n * @typescript\n * fromRT<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, q: Quat, v: VecLike): Out\n * @static\n */\n static fromRT<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, q: Quat, v: VecLike) {\n const x = q.x, y = q.y, z = q.z, w = q.w;\n const x2 = x + x;\n const y2 = y + y;\n const z2 = z + z;\n\n const xx = x * x2;\n const xy = x * y2;\n const xz = x * z2;\n const yy = y * y2;\n const yz = y * z2;\n const zz = z * z2;\n const wx = w * x2;\n const wy = w * y2;\n const wz = w * z2;\n\n let m = out.m;\n m[0] = 1 - (yy + zz);\n m[1] = xy + wz;\n m[2] = xz - wy;\n m[3] = 0;\n m[4] = xy - wz;\n m[5] = 1 - (xx + zz);\n m[6] = yz + wx;\n m[7] = 0;\n m[8] = xz + wy;\n m[9] = yz - wx;\n m[10] = 1 - (xx + yy);\n m[11] = 0;\n m[12] = v.x;\n m[13] = v.y;\n m[14] = v.z;\n m[15] = 1;\n\n return out;\n }\n\n /**\n * !#zh 提取矩阵的位移信息, 默认矩阵中的变换以 S->R->T 的顺序应用\n * !#en Extracting displacement information of the matrix, the matrix transform to the default sequential application S-> R-> T is\n * @method getTranslation\n * @typescript\n * getTranslation<Out extends IMat4Like, VecLike extends IVec3Like> (out: VecLike, mat: Out): VecLike\n * @static\n */\n static getTranslation<Out extends IMat4Like, VecLike extends IVec3Like> (out: VecLike, mat: Out) {\n let m = mat.m;\n out.x = m[12];\n out.y = m[13];\n out.z = m[14];\n\n return out;\n }\n\n /**\n * !#zh 提取矩阵的缩放信息, 默认矩阵中的变换以 S->R->T 的顺序应用\n * !#en Scaling information extraction matrix, the matrix transform to the default sequential application S-> R-> T is\n * @method getScaling\n * @typescript\n * getScaling<Out extends IMat4Like, VecLike extends IVec3Like> (out: VecLike, mat: Out): VecLike\n * @static\n */\n static getScaling<Out extends IMat4Like, VecLike extends IVec3Like> (out: VecLike, mat: Out) {\n let m = mat.m;\n let m3 = m3_1.m;\n const m00 = m3[0] = m[0];\n const m01 = m3[1] = m[1];\n const m02 = m3[2] = m[2];\n const m04 = m3[3] = m[4];\n const m05 = m3[4] = m[5];\n const m06 = m3[5] = m[6];\n const m08 = m3[6] = m[8];\n const m09 = m3[7] = m[9];\n const m10 = m3[8] = m[10];\n out.x = Math.sqrt(m00 * m00 + m01 * m01 + m02 * m02);\n out.y = Math.sqrt(m04 * m04 + m05 * m05 + m06 * m06);\n out.z = Math.sqrt(m08 * m08 + m09 * m09 + m10 * m10);\n // account for refections\n if (Mat3.determinant(m3_1) < 0) { out.x *= -1; }\n return out;\n }\n\n /**\n * !#zh 提取矩阵的旋转信息, 默认输入矩阵不含有缩放信息,如考虑缩放应使用 `toRTS` 函数。\n * !#en Rotation information extraction matrix, the matrix containing no default input scaling information, such as the use of `toRTS` should consider the scaling function.\n * @method getRotation\n * @typescript\n * getRotation<Out extends IMat4Like> (out: Quat, mat: Out): Quat\n * @static\n */\n static getRotation<Out extends IMat4Like> (out: Quat, mat: Out) {\n let m = mat.m;\n const trace = m[0] + m[5] + m[10];\n let S = 0;\n\n if (trace > 0) {\n S = Math.sqrt(trace + 1.0) * 2;\n out.w = 0.25 * S;\n out.x = (m[6] - m[9]) / S;\n out.y = (m[8] - m[2]) / S;\n out.z = (m[1] - m[4]) / S;\n } else if ((m[0] > m[5]) && (m[0] > m[10])) {\n S = Math.sqrt(1.0 + m[0] - m[5] - m[10]) * 2;\n out.w = (m[6] - m[9]) / S;\n out.x = 0.25 * S;\n out.y = (m[1] + m[4]) / S;\n out.z = (m[8] + m[2]) / S;\n } else if (m[5] > m[10]) {\n S = Math.sqrt(1.0 + m[5] - m[0] - m[10]) * 2;\n out.w = (m[8] - m[2]) / S;\n out.x = (m[1] + m[4]) / S;\n out.y = 0.25 * S;\n out.z = (m[6] + m[9]) / S;\n } else {\n S = Math.sqrt(1.0 + m[10] - m[0] - m[5]) * 2;\n out.w = (m[1] - m[4]) / S;\n out.x = (m[8] + m[2]) / S;\n out.y = (m[6] + m[9]) / S;\n out.z = 0.25 * S;\n }\n\n return out;\n }\n\n /**\n * !#zh 提取旋转、位移、缩放信息, 默认矩阵中的变换以 S->R->T 的顺序应用\n * !#en Extracting rotational displacement, zoom information, the default matrix transformation in order S-> R-> T applications\n * @method toRTS\n * @typescript\n * toRTS<Out extends IMat4Like, VecLike extends IVec3Like> (mat: Out, q: Quat, v: VecLike, s: VecLike): void\n * @static\n */\n static toRTS<Out extends IMat4Like, VecLike extends IVec3Like> (mat: Out, q: Quat, v: VecLike, s: VecLike) {\n let m = mat.m;\n let m3 = m3_1.m;\n s.x = Vec3.set(v3_1, m[0], m[1], m[2]).mag();\n m3[0] = m[0] / s.x;\n m3[1] = m[1] / s.x;\n m3[2] = m[2] / s.x;\n s.y = Vec3.set(v3_1, m[4], m[5], m[6]).mag();\n m3[3] = m[4] / s.y;\n m3[4] = m[5] / s.y;\n m3[5] = m[6] / s.y;\n s.z = Vec3.set(v3_1, m[8], m[9], m[10]).mag();\n m3[6] = m[8] / s.z;\n m3[7] = m[9] / s.z;\n m3[8] = m[10] / s.z;\n const det = Mat3.determinant(m3_1);\n if (det < 0) { s.x *= -1; m3[0] *= -1; m3[1] *= -1; m3[2] *= -1; }\n Quat.fromMat3(q, m3_1); // already normalized\n Vec3.set(v, m[12], m[13], m[14]);\n }\n\n /**\n * !#zh 根据旋转、位移、缩放信息计算矩阵,以 S->R->T 的顺序应用\n * !#en The rotary displacement, the scaling matrix calculation information, the order S-> R-> T applications\n * @method fromRTS\n * @typescript\n * fromRTS<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, q: Quat, v: VecLike, s: VecLike): Out\n * @static\n */\n static fromRTS<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, q: Quat, v: VecLike, s: VecLike) {\n const x = q.x, y = q.y, z = q.z, w = q.w;\n const x2 = x + x;\n const y2 = y + y;\n const z2 = z + z;\n\n const xx = x * x2;\n const xy = x * y2;\n const xz = x * z2;\n const yy = y * y2;\n const yz = y * z2;\n const zz = z * z2;\n const wx = w * x2;\n const wy = w * y2;\n const wz = w * z2;\n const sx = s.x;\n const sy = s.y;\n const sz = s.z;\n\n let m = out.m;\n m[0] = (1 - (yy + zz)) * sx;\n m[1] = (xy + wz) * sx;\n m[2] = (xz - wy) * sx;\n m[3] = 0;\n m[4] = (xy - wz) * sy;\n m[5] = (1 - (xx + zz)) * sy;\n m[6] = (yz + wx) * sy;\n m[7] = 0;\n m[8] = (xz + wy) * sz;\n m[9] = (yz - wx) * sz;\n m[10] = (1 - (xx + yy)) * sz;\n m[11] = 0;\n m[12] = v.x;\n m[13] = v.y;\n m[14] = v.z;\n m[15] = 1;\n\n return out;\n }\n\n /**\n * !#zh 根据指定的旋转、位移、缩放及变换中心信息计算矩阵,以 S->R->T 的顺序应用\n * !#en According to the specified rotation, displacement, and scale conversion matrix calculation information center, order S-> R-> T applications\n * @method fromRTSOrigin\n * @typescript\n * fromRTSOrigin<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, q: Quat, v: VecLike, s: VecLike, o: VecLike): Out\n * @param q 旋转值\n * @param v 位移值\n * @param s 缩放值\n * @param o 指定变换中心\n * @static\n */\n static fromRTSOrigin<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, q: Quat, v: VecLike, s: VecLike, o: VecLike) {\n const x = q.x, y = q.y, z = q.z, w = q.w;\n const x2 = x + x;\n const y2 = y + y;\n const z2 = z + z;\n\n const xx = x * x2;\n const xy = x * y2;\n const xz = x * z2;\n const yy = y * y2;\n const yz = y * z2;\n const zz = z * z2;\n const wx = w * x2;\n const wy = w * y2;\n const wz = w * z2;\n\n const sx = s.x;\n const sy = s.y;\n const sz = s.z;\n\n const ox = o.x;\n const oy = o.y;\n const oz = o.z;\n\n let m = out.m;\n m[0] = (1 - (yy + zz)) * sx;\n m[1] = (xy + wz) * sx;\n m[2] = (xz - wy) * sx;\n m[3] = 0;\n m[4] = (xy - wz) * sy;\n m[5] = (1 - (xx + zz)) * sy;\n m[6] = (yz + wx) * sy;\n m[7] = 0;\n m[8] = (xz + wy) * sz;\n m[9] = (yz - wx) * sz;\n m[10] = (1 - (xx + yy)) * sz;\n m[11] = 0;\n m[12] = v.x + ox - (m[0] * ox + m[4] * oy + m[8] * oz);\n m[13] = v.y + oy - (m[1] * ox + m[5] * oy + m[9] * oz);\n m[14] = v.z + oz - (m[2] * ox + m[6] * oy + m[10] * oz);\n m[15] = 1;\n\n return out;\n }\n\n /**\n * !#zh 根据指定的旋转信息计算矩阵\n * !#en The rotation matrix calculation information specified\n * @method fromQuat\n * @typescript\n * fromQuat<Out extends IMat4Like> (out: Out, q: Quat): Out\n * @static\n */\n static fromQuat<Out extends IMat4Like> (out: Out, q: Quat) {\n const x = q.x, y = q.y, z = q.z, w = q.w;\n const x2 = x + x;\n const y2 = y + y;\n const z2 = z + z;\n\n const xx = x * x2;\n const yx = y * x2;\n const yy = y * y2;\n const zx = z * x2;\n const zy = z * y2;\n const zz = z * z2;\n const wx = w * x2;\n const wy = w * y2;\n const wz = w * z2;\n\n let m = out.m;\n m[0] = 1 - yy - zz;\n m[1] = yx + wz;\n m[2] = zx - wy;\n m[3] = 0;\n\n m[4] = yx - wz;\n m[5] = 1 - xx - zz;\n m[6] = zy + wx;\n m[7] = 0;\n\n m[8] = zx + wy;\n m[9] = zy - wx;\n m[10] = 1 - xx - yy;\n m[11] = 0;\n\n m[12] = 0;\n m[13] = 0;\n m[14] = 0;\n m[15] = 1;\n\n return out;\n }\n\n /**\n * !#zh 根据指定的视锥体信息计算矩阵\n * !#en The matrix calculation information specified frustum\n * @method frustum\n * @typescript\n * frustum<Out extends IMat4Like> (out: Out, left: number, right: number, bottom: number, top: number, near: number, far: number): Out\n * @param left 左平面距离\n * @param right 右平面距离\n * @param bottom 下平面距离\n * @param top 上平面距离\n * @param near 近平面距离\n * @param far 远平面距离\n * @static\n */\n static frustum<Out extends IMat4Like> (out: Out, left: number, right: number, bottom: number, top: number, near: number, far: number) {\n const rl = 1 / (right - left);\n const tb = 1 / (top - bottom);\n const nf = 1 / (near - far);\n\n let m = out.m;\n m[0] = (near * 2) * rl;\n m[1] = 0;\n m[2] = 0;\n m[3] = 0;\n m[4] = 0;\n m[5] = (near * 2) * tb;\n m[6] = 0;\n m[7] = 0;\n m[8] = (right + left) * rl;\n m[9] = (top + bottom) * tb;\n m[10] = (far + near) * nf;\n m[11] = -1;\n m[12] = 0;\n m[13] = 0;\n m[14] = (far * near * 2) * nf;\n m[15] = 0;\n return out;\n }\n\n /**\n * !#zh 计算透视投影矩阵\n * !#en Perspective projection matrix calculation\n * @method perspective\n * @typescript\n * perspective<Out extends IMat4Like> (out: Out, fovy: number, aspect: number, near: number, far: number): Out\n * @param fovy 纵向视角高度\n * @param aspect 长宽比\n * @param near 近平面距离\n * @param far 远平面距离\n * @static\n */\n static perspective<Out extends IMat4Like> (out: Out, fovy: number, aspect: number, near: number, far: number) {\n const f = 1.0 / Math.tan(fovy / 2);\n const nf = 1 / (near - far);\n\n let m = out.m;\n m[0] = f / aspect;\n m[1] = 0;\n m[2] = 0;\n m[3] = 0;\n m[4] = 0;\n m[5] = f;\n m[6] = 0;\n m[7] = 0;\n m[8] = 0;\n m[9] = 0;\n m[10] = (far + near) * nf;\n m[11] = -1;\n m[12] = 0;\n m[13] = 0;\n m[14] = (2 * far * near) * nf;\n m[15] = 0;\n return out;\n }\n\n /**\n * !#zh 计算正交投影矩阵\n * !#en Computing orthogonal projection matrix\n * @method ortho\n * @typescript\n * ortho<Out extends IMat4Like> (out: Out, left: number, right: number, bottom: number, top: number, near: number, far: number): Out\n * @param left 左平面距离\n * @param right 右平面距离\n * @param bottom 下平面距离\n * @param top 上平面距离\n * @param near 近平面距离\n * @param far 远平面距离\n * @static\n */\n static ortho<Out extends IMat4Like> (out: Out, left: number, right: number, bottom: number, top: number, near: number, far: number) {\n const lr = 1 / (left - right);\n const bt = 1 / (bottom - top);\n const nf = 1 / (near - far);\n let m = out.m;\n m[0] = -2 * lr;\n m[1] = 0;\n m[2] = 0;\n m[3] = 0;\n m[4] = 0;\n m[5] = -2 * bt;\n m[6] = 0;\n m[7] = 0;\n m[8] = 0;\n m[9] = 0;\n m[10] = 2 * nf;\n m[11] = 0;\n m[12] = (left + right) * lr;\n m[13] = (top + bottom) * bt;\n m[14] = (far + near) * nf;\n m[15] = 1;\n return out;\n }\n\n /**\n * !#zh 根据视点计算矩阵,注意 `eye - center` 不能为零向量或与 `up` 向量平行\n * !#en `Up` parallel vector or vector center` not be zero - the matrix calculation according to the viewpoint, note` eye\n * @method lookAt\n * @typescript\n * lookAt<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, eye: VecLike, center: VecLike, up: VecLike): Out\n * @param eye 当前位置\n * @param center 目标视点\n * @param up 视口上方向\n * @static\n */\n static lookAt<Out extends IMat4Like, VecLike extends IVec3Like> (out: Out, eye: VecLike, center: VecLike, up: VecLike) {\n const eyex = eye.x;\n const eyey = eye.y;\n const eyez = eye.z;\n const upx = up.x;\n const upy = up.y;\n const upz = up.z;\n const centerx = center.x;\n const centery = center.y;\n const centerz = center.z;\n\n let z0 = eyex - centerx;\n let z1 = eyey - centery;\n let z2 = eyez - centerz;\n\n let len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n\n let x0 = upy * z2 - upz * z1;\n let x1 = upz * z0 - upx * z2;\n let x2 = upx * z1 - upy * z0;\n len = 1 / Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\n x0 *= len;\n x1 *= len;\n x2 *= len;\n\n const y0 = z1 * x2 - z2 * x1;\n const y1 = z2 * x0 - z0 * x2;\n const y2 = z0 * x1 - z1 * x0;\n\n let m = out.m;\n m[0] = x0;\n m[1] = y0;\n m[2] = z0;\n m[3] = 0;\n m[4] = x1;\n m[5] = y1;\n m[6] = z1;\n m[7] = 0;\n m[8] = x2;\n m[9] = y2;\n m[10] = z2;\n m[11] = 0;\n m[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n m[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n m[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n m[15] = 1;\n\n return out;\n }\n\n /**\n * !#zh 计算逆转置矩阵\n * !#en Reversal matrix calculation\n * @method inverseTranspose\n * @typescript\n * inverseTranspose<Out extends IMat4Like> (out: Out, a: Out): Out\n * @static\n */\n static inverseTranspose<Out extends IMat4Like> (out: Out, a: Out) {\n\n let m = a.m;\n _a00 = m[0]; _a01 = m[1]; _a02 = m[2]; _a03 = m[3];\n _a10 = m[4]; _a11 = m[5]; _a12 = m[6]; _a13 = m[7];\n _a20 = m[8]; _a21 = m[9]; _a22 = m[10]; _a23 = m[11];\n _a30 = m[12]; _a31 = m[13]; _a32 = m[14]; _a33 = m[15];\n\n const b00 = _a00 * _a11 - _a01 * _a10;\n const b01 = _a00 * _a12 - _a02 * _a10;\n const b02 = _a00 * _a13 - _a03 * _a10;\n const b03 = _a01 * _a12 - _a02 * _a11;\n const b04 = _a01 * _a13 - _a03 * _a11;\n const b05 = _a02 * _a13 - _a03 * _a12;\n const b06 = _a20 * _a31 - _a21 * _a30;\n const b07 = _a20 * _a32 - _a22 * _a30;\n const b08 = _a20 * _a33 - _a23 * _a30;\n const b09 = _a21 * _a32 - _a22 * _a31;\n const b10 = _a21 * _a33 - _a23 * _a31;\n const b11 = _a22 * _a33 - _a23 * _a32;\n\n // Calculate the determinant\n let det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n\n m = out.m;\n m[0] = (_a11 * b11 - _a12 * b10 + _a13 * b09) * det;\n m[1] = (_a12 * b08 - _a10 * b11 - _a13 * b07) * det;\n m[2] = (_a10 * b10 - _a11 * b08 + _a13 * b06) * det;\n m[3] = 0;\n\n m[4] = (_a02 * b10 - _a01 * b11 - _a03 * b09) * det;\n m[5] = (_a00 * b11 - _a02 * b08 + _a03 * b07) * det;\n m[6] = (_a01 * b08 - _a00 * b10 - _a03 * b06) * det;\n m[7] = 0;\n\n m[8] = (_a31 * b05 - _a32 * b04 + _a33 * b03) * det;\n m[9] = (_a32 * b02 - _a30 * b05 - _a33 * b01) * det;\n m[10] = (_a30 * b04 - _a31 * b02 + _a33 * b00) * det;\n m[11] = 0;\n\n m[12] = 0;\n m[13] = 0;\n m[14] = 0;\n m[15] = 1;\n\n return out;\n }\n\n /**\n * !#zh 逐元素矩阵加法\n * !#en Element by element matrix addition\n * @method add\n * @typescript\n * add<Out extends IMat4Like> (out: Out, a: Out, b: Out): Out\n * @static\n */\n static add<Out extends IMat4Like> (out: Out, a: Out, b: Out) {\n let m = out.m, am = a.m, bm = b.m;\n m[0] = am[0] + bm[0];\n m[1] = am[1] + bm[1];\n m[2] = am[2] + bm[2];\n m[3] = am[3] + bm[3];\n m[4] = am[4] + bm[4];\n m[5] = am[5] + bm[5];\n m[6] = am[6] + bm[6];\n m[7] = am[7] + bm[7];\n m[8] = am[8] + bm[8];\n m[9] = am[9] + bm[9];\n m[10] = am[10] + bm[10];\n m[11] = am[11] + bm[11];\n m[12] = am[12] + bm[12];\n m[13] = am[13] + bm[13];\n m[14] = am[14] + bm[14];\n m[15] = am[15] + bm[15];\n return out;\n }\n\n /**\n * !#zh 逐元素矩阵减法\n * !#en Matrix element by element subtraction\n * @method subtract\n * @typescript\n * subtract<Out extends IMat4Like> (out: Out, a: Out, b: Out): Out\n * @static\n */\n static subtract<Out extends IMat4Like> (out: Out, a: Out, b: Out) {\n let m = out.m, am = a.m, bm = b.m;\n m[0] = am[0] - bm[0];\n m[1] = am[1] - bm[1];\n m[2] = am[2] - bm[2];\n m[3] = am[3] - bm[3];\n m[4] = am[4] - bm[4];\n m[5] = am[5] - bm[5];\n m[6] = am[6] - bm[6];\n m[7] = am[7] - bm[7];\n m[8] = am[8] - bm[8];\n m[9] = am[9] - bm[9];\n m[10] = am[10] - bm[10];\n m[11] = am[11] - bm[11];\n m[12] = am[12] - bm[12];\n m[13] = am[13] - bm[13];\n m[14] = am[14] - bm[14];\n m[15] = am[15] - bm[15];\n return out;\n }\n\n /**\n * !#zh 矩阵标量乘法\n * !#en Matrix scalar multiplication\n * @method multiplyScalar\n * @typescript\n * multiplyScalar<Out extends IMat4Like> (out: Out, a: Out, b: number): Out\n * @static\n */\n static multiplyScalar<Out extends IMat4Like> (out: Out, a: Out, b: number) {\n let m = out.m, am = a.m;\n m[0] = am[0] * b;\n m[1] = am[1] * b;\n m[2] = am[2] * b;\n m[3] = am[3] * b;\n m[4] = am[4] * b;\n m[5] = am[5] * b;\n m[6] = am[6] * b;\n m[7] = am[7] * b;\n m[8] = am[8] * b;\n m[9] = am[9] * b;\n m[10] = am[10] * b;\n m[11] = am[11] * b;\n m[12] = am[12] * b;\n m[13] = am[13] * b;\n m[14] = am[14] * b;\n m[15] = am[15] * b;\n return out;\n }\n\n /**\n * !#zh 逐元素矩阵标量乘加: A + B * scale\n * !#en Elements of the matrix by the scalar multiplication and addition: A + B * scale\n * @method multiplyScalarAndAdd\n * @typescript\n * multiplyScalarAndAdd<Out extends IMat4Like> (out: Out, a: Out, b: Out, scale: number): Out\n * @static\n */\n static multiplyScalarAndAdd<Out extends IMat4Like> (out: Out, a: Out, b: Out, scale: number) {\n let m = out.m, am = a.m, bm = b.m;\n m[0] = am[0] + (bm[0] * scale);\n m[1] = am[1] + (bm[1] * scale);\n m[2] = am[2] + (bm[2] * scale);\n m[3] = am[3] + (bm[3] * scale);\n m[4] = am[4] + (bm[4] * scale);\n m[5] = am[5] + (bm[5] * scale);\n m[6] = am[6] + (bm[6] * scale);\n m[7] = am[7] + (bm[7] * scale);\n m[8] = am[8] + (bm[8] * scale);\n m[9] = am[9] + (bm[9] * scale);\n m[10] = am[10] + (bm[10] * scale);\n m[11] = am[11] + (bm[11] * scale);\n m[12] = am[12] + (bm[12] * scale);\n m[13] = am[13] + (bm[13] * scale);\n m[14] = am[14] + (bm[14] * scale);\n m[15] = am[15] + (bm[15] * scale);\n return out;\n }\n\n /**\n * !#zh 矩阵等价判断\n * !#en Analyzing the equivalent matrix\n * @method strictEquals\n * @return {bool}\n * @typescript\n * strictEquals<Out extends IMat4Like> (a: Out, b: Out): boolean\n * @static\n */\n static strictEquals<Out extends IMat4Like> (a: Out, b: Out) {\n let am = a.m, bm = b.m;\n return am[0] === bm[0] && am[1] === bm[1] && am[2] === bm[2] && am[3] === bm[3] &&\n am[4] === bm[4] && am[5] === bm[5] && am[6] === bm[6] && am[7] === bm[7] &&\n am[8] === bm[8] && am[9] === bm[9] && am[10] === bm[10] && am[11] === bm[11] &&\n am[12] === bm[12] && am[13] === bm[13] && am[14] === bm[14] && am[15] === bm[15];\n }\n\n /**\n * !#zh 排除浮点数误差的矩阵近似等价判断\n * !#en Negative floating point error is approximately equivalent to determining a matrix\n * @method equals\n * @typescript\n * equals<Out extends IMat4Like> (a: Out, b: Out, epsilon?: number): boolean\n * @static\n */\n static equals<Out extends IMat4Like> (a: Out, b: Out, epsilon = EPSILON) {\n\n let am = a.m, bm = b.m;\n return (\n Math.abs(am[0] - bm[0]) <= epsilon * Math.max(1.0, Math.abs(am[0]), Math.abs(bm[0])) &&\n Math.abs(am[1] - bm[1]) <= epsilon * Math.max(1.0, Math.abs(am[1]), Math.abs(bm[1])) &&\n Math.abs(am[2] - bm[2]) <= epsilon * Math.max(1.0, Math.abs(am[2]), Math.abs(bm[2])) &&\n Math.abs(am[3] - bm[3]) <= epsilon * Math.max(1.0, Math.abs(am[3]), Math.abs(bm[3])) &&\n Math.abs(am[4] - bm[4]) <= epsilon * Math.max(1.0, Math.abs(am[4]), Math.abs(bm[4])) &&\n Math.abs(am[5] - bm[5]) <= epsilon * Math.max(1.0, Math.abs(am[5]), Math.abs(bm[5])) &&\n Math.abs(am[6] - bm[6]) <= epsilon * Math.max(1.0, Math.abs(am[6]), Math.abs(bm[6])) &&\n Math.abs(am[7] - bm[7]) <= epsilon * Math.max(1.0, Math.abs(am[7]), Math.abs(bm[7])) &&\n Math.abs(am[8] - bm[8]) <= epsilon * Math.max(1.0, Math.abs(am[8]), Math.abs(bm[8])) &&\n Math.abs(am[9] - bm[9]) <= epsilon * Math.max(1.0, Math.abs(am[9]), Math.abs(bm[9])) &&\n Math.abs(am[10] - bm[10]) <= epsilon * Math.max(1.0, Math.abs(am[10]), Math.abs(bm[10])) &&\n Math.abs(am[11] - bm[11]) <= epsilon * Math.max(1.0, Math.abs(am[11]), Math.abs(bm[11])) &&\n Math.abs(am[12] - bm[12]) <= epsilon * Math.max(1.0, Math.abs(am[12]), Math.abs(bm[12])) &&\n Math.abs(am[13] - bm[13]) <= epsilon * Math.max(1.0, Math.abs(am[13]), Math.abs(bm[13])) &&\n Math.abs(am[14] - bm[14]) <= epsilon * Math.max(1.0, Math.abs(am[14]), Math.abs(bm[14])) &&\n Math.abs(am[15] - bm[15]) <= epsilon * Math.max(1.0, Math.abs(am[15]), Math.abs(bm[15]))\n );\n }\n\n /**\n * Calculates the adjugate of a matrix.\n *\n * @param {Mat4} out - Matrix to store result.\n * @param {Mat4} a - Matrix to calculate.\n * @returns {Mat4} out.\n */\n static adjoint (out, a) {\n let am = a.m, outm = out.m;\n let a00 = am[0], a01 = am[1], a02 = am[2], a03 = am[3],\n a10 = am[4], a11 = am[5], a12 = am[6], a13 = am[7],\n a20 = am[8], a21 = am[9], a22 = am[10], a23 = am[11],\n a30 = am[12], a31 = am[13], a32 = am[14], a33 = am[15];\n\n outm[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));\n outm[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n outm[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));\n outm[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n outm[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n outm[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));\n outm[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n outm[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));\n outm[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));\n outm[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n outm[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));\n outm[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n outm[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n outm[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));\n outm[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n outm[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));\n return out;\n }\n\n /**\n * !#zh 矩阵转数组\n * !#en Matrix transpose array\n * @method toArray\n * @typescript\n * toArray <Out extends IWritableArrayLike<number>> (out: Out, mat: IMat4Like, ofs?: number): Out\n * @param ofs 数组内的起始偏移量\n * @static\n */\n static toArray<Out extends IWritableArrayLike<number>> (out: Out, mat: IMat4Like, ofs = 0) {\n let m = mat.m;\n for (let i = 0; i < 16; i++) {\n out[ofs + i] = m[i];\n }\n return out;\n }\n\n /**\n * !#zh 数组转矩阵\n * !#en Transfer matrix array\n * @method fromArray\n * @typescript\n * fromArray <Out extends IMat4Like> (out: Out, arr: IWritableArrayLike<number>, ofs?: number): Out\n * @param ofs 数组起始偏移量\n * @static\n */\n static fromArray<Out extends IMat4Like> (out: Out, arr: IWritableArrayLike<number>, ofs = 0) {\n let m = out.m;\n for (let i = 0; i < 16; i++) {\n m[i] = arr[ofs + i];\n }\n return out;\n }\n\n /**\n * !#en Matrix Data\n * !#zh 矩阵数据\n * @property {Float64Array | Float32Array} m\n */\n m: FloatArray;\n\n\n /**\n * !#en\n * Constructor\n * see {{#crossLink \"cc/mat4:method\"}}cc.mat4{{/crossLink}}\n * !#zh\n * 构造函数,可查看 {{#crossLink \"cc/mat4:method\"}}cc.mat4{{/crossLink}}\n * @method constructor\n * @typescript\n * constructor ( m00?: number, m01?: number, m02?: number, m03?: number, m10?: number, m11?: number, m12?: number, m13?: number, m20?: number, m21?: number, m22?: number, m23?: number, m30?: number, m31?: number, m32?: number, m33?: number)\n */\n constructor (\n m00: number | FloatArray = 1, m01: number = 0, m02: number = 0, m03: number = 0,\n m10: number = 0, m11: number = 1, m12: number = 0, m13: number = 0,\n m20: number = 0, m21: number = 0, m22: number = 1, m23: number = 0,\n m30: number = 0, m31: number = 0, m32: number = 0, m33: number = 1) {\n super();\n if (m00 instanceof FLOAT_ARRAY_TYPE) {\n this.m = m00;\n } else {\n this.m = new FLOAT_ARRAY_TYPE(16);\n let tm = this.m;\n tm[0] = m00 as number;\n tm[1] = m01;\n tm[2] = m02;\n tm[3] = m03;\n tm[4] = m10;\n tm[5] = m11;\n tm[6] = m12;\n tm[7] = m13;\n tm[8] = m20;\n tm[9] = m21;\n tm[10] = m22;\n tm[11] = m23;\n tm[12] = m30;\n tm[13] = m31;\n tm[14] = m32;\n tm[15] = m33;\n }\n }\n\n /**\n * !#en clone a Mat4 object\n * !#zh 克隆一个 Mat4 对象\n * @method clone\n * @return {Mat4}\n */\n clone () {\n let t = this;\n let tm = t.m;\n return new Mat4(\n tm[0], tm[1], tm[2], tm[3],\n tm[4], tm[5], tm[6], tm[7],\n tm[8], tm[9], tm[10], tm[11],\n tm[12], tm[13], tm[14], tm[15]);\n }\n\n /**\n * !#en Sets the matrix with another one's value\n * !#zh 用另一个矩阵设置这个矩阵的值。\n * @method set\n * @param {Mat4} srcObj\n * @return {Mat4} returns this\n * @chainable\n */\n set (s) {\n let t = this;\n let tm = t.m, sm = s.m;\n tm[0] = sm[0];\n tm[1] = sm[1];\n tm[2] = sm[2];\n tm[3] = sm[3];\n tm[4] = sm[4];\n tm[5] = sm[5];\n tm[6] = sm[6];\n tm[7] = sm[7];\n tm[8] = sm[8];\n tm[9] = sm[9];\n tm[10] = sm[10];\n tm[11] = sm[11];\n tm[12] = sm[12];\n tm[13] = sm[13];\n tm[14] = sm[14];\n tm[15] = sm[15];\n return this;\n }\n\n /**\n * !#en Check whether two matrix equal\n * !#zh 当前的矩阵是否与指定的矩阵相等。\n * @method equals\n * @param {Mat4} other\n * @return {Boolean}\n */\n equals (other) {\n return Mat4.strictEquals(this, other);\n }\n\n /**\n * !#en Check whether two matrix equal with default degree of variance.\n * !#zh\n * 近似判断两个矩阵是否相等。<br/>\n * 判断 2 个矩阵是否在默认误差范围之内,如果在则返回 true反之则返回 false。\n * @method fuzzyEquals\n * @param {Mat4} other\n * @return {Boolean}\n */\n fuzzyEquals (other) {\n return Mat4.equals(this, other);\n }\n\n /**\n * !#en Transform to string with matrix informations\n * !#zh 转换为方便阅读的字符串。\n * @method toString\n * @return {string}\n */\n toString () {\n let tm = this.m;\n if (tm) {\n return \"[\\n\" +\n tm[0] + \", \" + tm[1] + \", \" + tm[2] + \", \" + tm[3] + \",\\n\" +\n tm[4] + \", \" + tm[5] + \", \" + tm[6] + \", \" + tm[7] + \",\\n\" +\n tm[8] + \", \" + tm[9] + \", \" + tm[10] + \", \" + tm[11] + \",\\n\" +\n tm[12] + \", \" + tm[13] + \", \" + tm[14] + \", \" + tm[15] + \"\\n\" +\n \"]\";\n } else {\n return \"[\\n\" +\n \"1, 0, 0, 0\\n\" +\n \"0, 1, 0, 0\\n\" +\n \"0, 0, 1, 0\\n\" +\n \"0, 0, 0, 1\\n\" +\n \"]\";\n }\n }\n\n /**\n * Set the matrix to the identity matrix\n * @method identity\n * @returns {Mat4} self\n * @chainable\n */\n identity (): this {\n return Mat4.identity(this);\n }\n\n /**\n * Transpose the values of a mat4\n * @method transpose\n * @param {Mat4} [out] the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created.\n * @returns {Mat4} out\n */\n transpose (out) {\n out = out || new Mat4();\n return Mat4.transpose(out, this);\n }\n\n /**\n * Inverts a mat4\n * @method invert\n * @param {Mat4} [out] the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created.\n * @returns {Mat4} out\n */\n invert (out) {\n out = out || new Mat4();\n return Mat4.invert(out, this);\n }\n\n /**\n * Calculates the adjugate of a mat4\n * @method adjoint\n * @param {Mat4} [out] the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created.\n * @returns {Mat4} out\n */\n adjoint (out) {\n out = out || new Mat4();\n return Mat4.adjoint(out, this);\n }\n\n /**\n * Calculates the determinant of a mat4\n * @method determinant\n * @returns {Number} determinant of a\n */\n determinant () {\n return Mat4.determinant(this);\n }\n\n /**\n * Adds two Mat4\n * @method add\n * @param {Mat4} other the second operand\n * @param {Mat4} [out] the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created.\n * @returns {Mat4} out\n */\n add (other, out) {\n out = out || new Mat4();\n return Mat4.add(out, this, other);\n }\n\n /**\n * Subtracts the current matrix with another one\n * @method subtract\n * @param {Mat4} other the second operand\n * @returns {Mat4} this\n */\n subtract (other): this {\n return Mat4.subtract(this, this, other);\n }\n\n /**\n * Subtracts the current matrix with another one\n * @method multiply\n * @param {Mat4} other the second operand\n * @returns {Mat4} this\n */\n multiply (other): this {\n return Mat4.multiply(this, this, other);\n }\n\n /**\n * Multiply each element of the matrix by a scalar.\n * @method multiplyScalar\n * @param {Number} number amount to scale the matrix's elements by\n * @returns {Mat4} this\n */\n multiplyScalar (number): this {\n return Mat4.multiplyScalar(this, this, number);\n }\n\n /**\n * Translate a mat4 by the given vector\n * @method translate\n * @param {Vec3} v vector to translate by\n * @param {Mat4} [out] the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created\n * @returns {Mat4} out\n */\n translate (v, out) {\n out = out || new Mat4();\n return Mat4.translate(out, this, v);\n }\n\n /**\n * Scales the mat4 by the dimensions in the given vec3\n * @method scale\n * @param {Vec3} v vector to scale by\n * @param {Mat4} [out] the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created\n * @returns {Mat4} out\n */\n scale (v, out) {\n out = out || new Mat4();\n return Mat4.scale(out, this, v);\n }\n\n /**\n * Rotates a mat4 by the given angle around the given axis\n * @method rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @param {Vec3} axis the axis to rotate around\n * @param {Mat4} [out] the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created\n * @returns {Mat4} out\n */\n rotate (rad, axis, out) {\n out = out || new Mat4();\n return Mat4.rotate(out, this, rad, axis);\n }\n\n /**\n * Returns the translation vector component of a transformation matrix.\n * @method getTranslation\n * @param {Vec3} out Vector to receive translation component, if not provided, a new vec3 will be created\n * @return {Vec3} out\n */\n getTranslation (out) {\n out = out || new Vec3();\n return Mat4.getTranslation(out, this);\n }\n\n /**\n * Returns the scale factor component of a transformation matrix\n * @method getScale\n * @param {Vec3} out Vector to receive scale component, if not provided, a new vec3 will be created\n * @return {Vec3} out\n */\n getScale (out) {\n out = out || new Vec3();\n return Mat4.getScaling(out, this);\n }\n\n /**\n * Returns the rotation factor component of a transformation matrix\n * @method getRotation\n * @param {Quat} out Vector to receive rotation component, if not provided, a new quaternion object will be created\n * @return {Quat} out\n */\n getRotation (out) {\n out = out || new Quat();\n return Mat4.getRotation(out, this);\n }\n\n /**\n * Restore the matrix values from a quaternion rotation, vector translation and vector scale\n * @method fromRTS\n * @param {Quat} q Rotation quaternion\n * @param {Vec3} v Translation vector\n * @param {Vec3} s Scaling vector\n * @returns {Mat4} the current mat4 object\n * @chainable\n */\n fromRTS (q, v, s): this {\n return Mat4.fromRTS(this, q, v, s);\n }\n\n /**\n * Restore the matrix values from a quaternion rotation\n * @method fromQuat\n * @param {Quat} q Rotation quaternion\n * @returns {Mat4} the current mat4 object\n * @chainable\n */\n fromQuat (quat): this {\n return Mat4.fromQuat(this, quat);\n }\n}\n\nconst v3_1: Vec3 = new Vec3();\nconst m3_1: Mat3 = new Mat3();\n\nCCClass.fastDefine('cc.Mat4', Mat4, {\n m00: 1, m01: 0, m02: 0, m03: 0,\n m04: 0, m05: 1, m06: 0, m07: 0,\n m08: 0, m09: 0, m10: 1, m11: 0,\n m12: 0, m13: 0, m14: 0, m15: 1\n});\n\nfor (let i = 0; i < 16; i++) {\n Object.defineProperty(Mat4.prototype, 'm' + i, {\n get () {\n return this.m[i];\n },\n set (value) {\n this.m[i] = value;\n },\n });\n}\n\n/**\n * @module cc\n */\n\n/**\n * !#en The convenience method to create a new {{#crossLink \"Mat4\"}}cc.Mat4{{/crossLink}}.\n * !#zh 通过该简便的函数进行创建 {{#crossLink \"Mat4\"}}cc.Mat4{{/crossLink}} 对象。\n * @method mat4\n * @param {Number} [m00] Component in column 0, row 0 position (index 0)\n * @param {Number} [m01] Component in column 0, row 1 position (index 1)\n * @param {Number} [m02] Component in column 0, row 2 position (index 2)\n * @param {Number} [m03] Component in column 0, row 3 position (index 3)\n * @param {Number} [m10] Component in column 1, row 0 position (index 4)\n * @param {Number} [m11] Component in column 1, row 1 position (index 5)\n * @param {Number} [m12] Component in column 1, row 2 position (index 6)\n * @param {Number} [m13] Component in column 1, row 3 position (index 7)\n * @param {Number} [m20] Component in column 2, row 0 position (index 8)\n * @param {Number} [m21] Component in column 2, row 1 position (index 9)\n * @param {Number} [m22] Component in column 2, row 2 position (index 10)\n * @param {Number} [m23] Component in column 2, row 3 position (index 11)\n * @param {Number} [m30] Component in column 3, row 0 position (index 12)\n * @param {Number} [m31] Component in column 3, row 1 position (index 13)\n * @param {Number} [m32] Component in column 3, row 2 position (index 14)\n * @param {Number} [m33] Component in column 3, row 3 position (index 15)\n * @return {Mat4}\n */\ncc.mat4 = function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n let mat = new Mat4(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33);\n if (m00 === undefined) {\n Mat4.identity(mat);\n }\n return mat;\n};\n\ncc.Mat4 = Mat4;\n","/****************************************************************************\n Copyright (c) 2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport ValueType from './value-type';\nimport CCClass from '../platform/CCClass';\nimport Vec3 from './vec3';\nimport Mat3 from './mat3';\nimport { EPSILON, toDegree } from './utils';\n\nlet _x: number = 0.0;\nlet _y: number = 0.0;\nlet _z: number = 0.0;\nlet _w: number = 0.0;\n\n/**\n * !#en Representation of 2D vectors and points.\n * !#zh 表示 2D 向量和坐标\n *\n * @class Quat\n * @extends ValueType\n */\n\n/**\n * !#en\n * Constructor\n * see {{#crossLink \"cc/quat:method\"}}cc.quat{{/crossLink}}\n * !#zh\n * 构造函数,可查看 {{#crossLink \"cc/quat:method\"}}cc.quat{{/crossLink}}\n * @method constructor\n * @param {number} [x=0]\n * @param {number} [y=0]\n * @param {number} [z=0]\n * @param {number} [w=1]\n */\nexport default class Quat extends ValueType {\n static mul = Quat.multiply;\n static scale = Quat.multiplyScalar;\n static mag = Quat.len;\n\n /**\n * !#en Calculate the multiply result between this quaternion and another one\n * !#zh 计算四元数乘积的结果\n * @method mul\n * @param {Quat} other\n * @param {Quat} [out]\n * @returns {Quat} out\n */\n mul (other: Quat, out?: Quat): Quat {\n return Quat.multiply(out || new Quat(), this, other);\n }\n\n static IDENTITY = Object.freeze(new Quat());\n\n /**\n * !#zh 获得指定四元数的拷贝\n * !#en Obtaining copy specified quaternion\n * @method clone\n * @typescript\n * clone<Out extends IQuatLike> (a: Out): Quat\n * @static\n */\n static clone<Out extends IQuatLike> (a: Out) {\n return new Quat(a.x, a.y, a.z, a.w);\n }\n\n /**\n * !#zh 复制目标四元数\n * !#en Copy quaternion target\n * @method copy\n * @typescript\n * copy<Out extends IQuatLike, QuatLike extends IQuatLike> (out: Out, a: QuatLike): Out\n * @static\n */\n static copy<Out extends IQuatLike, QuatLike extends IQuatLike> (out: Out, a: QuatLike) {\n out.x = a.x;\n out.y = a.y;\n out.z = a.z;\n out.w = a.w;\n return out;\n }\n\n /**\n * !#zh 设置四元数值\n * !#en Provided Quaternion Value\n * @method set\n * @typescript\n * set<Out extends IQuatLike> (out: Out, x: number, y: number, z: number, w: number): Out\n * @static\n */\n static set<Out extends IQuatLike> (out: Out, x: number, y: number, z: number, w: number) {\n out.x = x;\n out.y = y;\n out.z = z;\n out.w = w;\n return out;\n }\n\n /**\n * !#zh 将目标赋值为单位四元数\n * !#en The target of an assignment as a unit quaternion\n * @method identity\n * @typescript\n * identity<Out extends IQuatLike> (out: Out): Out\n * @static\n */\n static identity<Out extends IQuatLike> (out: Out) {\n out.x = 0;\n out.y = 0;\n out.z = 0;\n out.w = 1;\n return out;\n }\n\n /**\n * !#zh 设置四元数为两向量间的最短路径旋转,默认两向量都已归一化\n * !#en Set quaternion rotation is the shortest path between two vectors, the default two vectors are normalized\n * @method rotationTo\n * @typescript\n * rotationTo<Out extends IQuatLike, VecLike extends IVec3Like> (out: Out, a: VecLike, b: VecLike): Out\n * @static\n */\n static rotationTo<Out extends IQuatLike, VecLike extends IVec3Like> (out: Out, a: VecLike, b: VecLike) {\n const dot = Vec3.dot(a, b);\n if (dot < -0.999999) {\n Vec3.cross(v3_1, Vec3.RIGHT, a);\n if (v3_1.mag() < 0.000001) {\n Vec3.cross(v3_1, Vec3.UP, a);\n }\n Vec3.normalize(v3_1, v3_1);\n Quat.fromAxisAngle(out, v3_1, Math.PI);\n return out;\n } else if (dot > 0.999999) {\n out.x = 0;\n out.y = 0;\n out.z = 0;\n out.w = 1;\n return out;\n } else {\n Vec3.cross(v3_1, a, b);\n out.x = v3_1.x;\n out.y = v3_1.y;\n out.z = v3_1.z;\n out.w = 1 + dot;\n return Quat.normalize(out, out);\n }\n }\n\n /**\n * !#zh 获取四元数的旋转轴和旋转弧度\n * !#en Get the rotary shaft and the arc of rotation quaternion\n * @method getAxisAngle\n * @param {Vec3} outAxis - 旋转轴输出\n * @param {Quat} q - 源四元数\n * @return {Number} - 旋转弧度\n * @typescript\n * getAxisAngle<Out extends IQuatLike, VecLike extends IVec3Like> (outAxis: VecLike, q: Out): number\n * @static\n */\n static getAxisAngle<Out extends IQuatLike, VecLike extends IVec3Like> (outAxis: VecLike, q: Out) {\n const rad = Math.acos(q.w) * 2.0;\n const s = Math.sin(rad / 2.0);\n if (s !== 0.0) {\n outAxis.x = q.x / s;\n outAxis.y = q.y / s;\n outAxis.z = q.z / s;\n } else {\n // If s is zero, return any axis (no rotation - axis does not matter)\n outAxis.x = 1;\n outAxis.y = 0;\n outAxis.z = 0;\n }\n return rad;\n }\n\n /**\n * !#zh 四元数乘法\n * !#en Quaternion multiplication\n * @method multiply\n * @typescript\n * multiply<Out extends IQuatLike, QuatLike_1 extends IQuatLike, QuatLike_2 extends IQuatLike> (out: Out, a: QuatLike_1, b: QuatLike_2): Out\n * @static\n */\n static multiply<Out extends IQuatLike, QuatLike_1 extends IQuatLike, QuatLike_2 extends IQuatLike> (out: Out, a: QuatLike_1, b: QuatLike_2) {\n _x = a.x * b.w + a.w * b.x + a.y * b.z - a.z * b.y;\n _y = a.y * b.w + a.w * b.y + a.z * b.x - a.x * b.z;\n _z = a.z * b.w + a.w * b.z + a.x * b.y - a.y * b.x;\n _w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z;\n out.x = _x;\n out.y = _y;\n out.z = _z;\n out.w = _w;\n return out;\n }\n\n /**\n * !#zh 四元数标量乘法\n * !#en Quaternion scalar multiplication\n * @method multiplyScalar\n * @typescript\n * multiplyScalar<Out extends IQuatLike> (out: Out, a: Out, b: number): Out\n * @static\n */\n static multiplyScalar<Out extends IQuatLike> (out: Out, a: Out, b: number) {\n out.x = a.x * b;\n out.y = a.y * b;\n out.z = a.z * b;\n out.w = a.w * b;\n return out;\n }\n\n /**\n * !#zh 四元数乘加A + B * scale\n * !#en Quaternion multiplication and addition: A + B * scale\n * @method scaleAndAdd\n * @typescript\n * scaleAndAdd<Out extends IQuatLike> (out: Out, a: Out, b: Out, scale: number): Out\n * @static\n */\n static scaleAndAdd<Out extends IQuatLike> (out: Out, a: Out, b: Out, scale: number) {\n out.x = a.x + b.x * scale;\n out.y = a.y + b.y * scale;\n out.z = a.z + b.z * scale;\n out.w = a.w + b.w * scale;\n return out;\n }\n\n /**\n * !#zh 绕 X 轴旋转指定四元数\n * !#en About the X axis specified quaternion\n * @method rotateX\n * @typescript\n * rotateX<Out extends IQuatLike> (out: Out, a: Out, rad: number): Out\n * @param rad 旋转弧度\n * @static\n */\n static rotateX<Out extends IQuatLike> (out: Out, a: Out, rad: number) {\n rad *= 0.5;\n\n const bx = Math.sin(rad);\n const bw = Math.cos(rad);\n\n _x = a.x * bw + a.w * bx;\n _y = a.y * bw + a.z * bx;\n _z = a.z * bw - a.y * bx;\n _w = a.w * bw - a.x * bx;\n\n out.x = _x;\n out.y = _y;\n out.z = _z;\n out.w = _w;\n\n return out;\n }\n\n /**\n * !#zh 绕 Y 轴旋转指定四元数\n * !#en Rotation about the Y axis designated quaternion\n * @method rotateY\n * @typescript\n * rotateY<Out extends IQuatLike> (out: Out, a: Out, rad: number): Out\n * @param rad 旋转弧度\n * @static\n */\n static rotateY<Out extends IQuatLike> (out: Out, a: Out, rad: number) {\n rad *= 0.5;\n\n const by = Math.sin(rad);\n const bw = Math.cos(rad);\n\n _x = a.x * bw - a.z * by;\n _y = a.y * bw + a.w * by;\n _z = a.z * bw + a.x * by;\n _w = a.w * bw - a.y * by;\n\n out.x = _x;\n out.y = _y;\n out.z = _z;\n out.w = _w;\n\n return out;\n }\n\n /**\n * !#zh 绕 Z 轴旋转指定四元数\n * !#en Around the Z axis specified quaternion\n * @method rotateZ\n * @typescript\n * rotateZ<Out extends IQuatLike> (out: Out, a: Out, rad: number): Out\n * @param rad 旋转弧度\n * @static\n */\n static rotateZ<Out extends IQuatLike> (out: Out, a: Out, rad: number) {\n rad *= 0.5;\n\n const bz = Math.sin(rad);\n const bw = Math.cos(rad);\n\n _x = a.x * bw + a.y * bz;\n _y = a.y * bw - a.x * bz;\n _z = a.z * bw + a.w * bz;\n _w = a.w * bw - a.z * bz;\n\n out.x = _x;\n out.y = _y;\n out.z = _z;\n out.w = _w;\n\n return out;\n }\n\n /**\n * !#zh 绕世界空间下指定轴旋转四元数\n * !#en Space around the world at a given axis of rotation quaternion\n * @method rotateAround\n * @typescript\n * rotateAround<Out extends IQuatLike, VecLike extends IVec3Like> (out: Out, rot: Out, axis: VecLike, rad: number): Out\n * @param axis 旋转轴,默认已归一化\n * @param rad 旋转弧度\n * @static\n */\n static rotateAround<Out extends IQuatLike, VecLike extends IVec3Like> (out: Out, rot: Out, axis: VecLike, rad: number) {\n // get inv-axis (local to rot)\n Quat.invert(qt_1, rot);\n Vec3.transformQuat(v3_1, axis, qt_1);\n // rotate by inv-axis\n Quat.fromAxisAngle(qt_1, v3_1, rad);\n Quat.multiply(out, rot, qt_1);\n return out;\n }\n\n /**\n * !#zh 绕本地空间下指定轴旋转四元数\n * !#en Local space around the specified axis rotation quaternion\n * @method rotateAroundLocal\n * @typescript\n * rotateAroundLocal<Out extends IQuatLike, VecLike extends IVec3Like> (out: Out, rot: Out, axis: VecLike, rad: number): Out\n * @param axis 旋转轴\n * @param rad 旋转弧度\n * @static\n */\n static rotateAroundLocal<Out extends IQuatLike, VecLike extends IVec3Like> (out: Out, rot: Out, axis: VecLike, rad: number) {\n Quat.fromAxisAngle(qt_1, axis, rad);\n Quat.multiply(out, rot, qt_1);\n return out;\n }\n\n /**\n * !#zh 根据 xyz 分量计算 w 分量,默认已归一化\n * !#en The component w xyz components calculated, normalized by default\n * @method calculateW\n * @typescript\n * calculateW<Out extends IQuatLike> (out: Out, a: Out): Out\n * @static\n */\n static calculateW<Out extends IQuatLike> (out: Out, a: Out) {\n\n out.x = a.x;\n out.y = a.y;\n out.z = a.z;\n out.w = Math.sqrt(Math.abs(1.0 - a.x * a.x - a.y * a.y - a.z * a.z));\n return out;\n }\n\n /**\n * !#zh 四元数点积(数量积)\n * !#en Quaternion dot product (scalar product)\n * @method dot\n * @typescript\n * dot<Out extends IQuatLike> (a: Out, b: Out): number\n * @static\n */\n static dot<Out extends IQuatLike> (a: Out, b: Out) {\n return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;\n }\n\n /**\n * !#zh 逐元素线性插值: A + t * (B - A)\n * !#en Element by element linear interpolation: A + t * (B - A)\n * @method lerp\n * @typescript\n * lerp<Out extends IQuatLike> (out: Out, a: Out, b: Out, t: number): Out\n * @static\n */\n static lerp<Out extends IQuatLike> (out: Out, a: Out, b: Out, t: number) {\n out.x = a.x + t * (b.x - a.x);\n out.y = a.y + t * (b.y - a.y);\n out.z = a.z + t * (b.z - a.z);\n out.w = a.w + t * (b.w - a.w);\n return out;\n }\n\n /**\n * !#zh 四元数球面插值\n * !#en Spherical quaternion interpolation\n * @method slerp\n * @typescript\n * slerp<Out extends IQuatLike, QuatLike_1 extends IQuatLike, QuatLike_2 extends IQuatLike>(out: Out, a: QuatLike_1, b: QuatLike_2, t: number): Out\n * @static\n */\n static slerp<Out extends IQuatLike, QuatLike_1 extends IQuatLike, QuatLike_2 extends IQuatLike>\n (out: Out, a: QuatLike_1, b: QuatLike_2, t: number) {\n // benchmarks:\n // http://jsperf.com/quaternion-slerp-implementations\n\n let scale0 = 0;\n let scale1 = 0;\n\n // calc cosine\n let cosom = a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;\n // adjust signs (if necessary)\n if (cosom < 0.0) {\n cosom = -cosom;\n b.x = -b.x;\n b.y = -b.y;\n b.z = -b.z;\n b.w = -b.w;\n }\n // calculate coefficients\n if ((1.0 - cosom) > 0.000001) {\n // standard case (slerp)\n const omega = Math.acos(cosom);\n const sinom = Math.sin(omega);\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n } else {\n // \"from\" and \"to\" quaternions are very close\n // ... so we can do a linear interpolation\n scale0 = 1.0 - t;\n scale1 = t;\n }\n // calculate final values\n out.x = scale0 * a.x + scale1 * b.x;\n out.y = scale0 * a.y + scale1 * b.y;\n out.z = scale0 * a.z + scale1 * b.z;\n out.w = scale0 * a.w + scale1 * b.w;\n\n return out;\n }\n\n /**\n * !#zh 带两个控制点的四元数球面插值\n * !#en Quaternion with two spherical interpolation control points\n * @method sqlerp\n * @typescript\n * sqlerp<Out extends IQuatLike> (out: Out, a: Out, b: Out, c: Out, d: Out, t: number): Out\n * @static\n */\n static sqlerp<Out extends IQuatLike> (out: Out, a: Out, b: Out, c: Out, d: Out, t: number) {\n Quat.slerp(qt_1, a, d, t);\n Quat.slerp(qt_2, b, c, t);\n Quat.slerp(out, qt_1, qt_2, 2 * t * (1 - t));\n return out;\n }\n\n /**\n * !#zh 四元数求逆\n * !#en Quaternion inverse\n * @method invert\n * @typescript\n * invert<Out extends IQuatLike, QuatLike extends IQuatLike> (out: Out, a: QuatLike): Out\n * @static\n */\n static invert<Out extends IQuatLike, QuatLike extends IQuatLike> (out: Out, a: QuatLike) {\n const dot = a.x * a.x + a.y * a.y + a.z * a.z + a.w * a.w;\n const invDot = dot ? 1.0 / dot : 0;\n\n // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n\n out.x = -a.x * invDot;\n out.y = -a.y * invDot;\n out.z = -a.z * invDot;\n out.w = a.w * invDot;\n return out;\n }\n\n /**\n * !#zh 求共轭四元数,对单位四元数与求逆等价,但更高效\n * !#en Conjugating a quaternion, and the unit quaternion equivalent to inversion, but more efficient\n * @method conjugate\n * @typescript\n * conjugate<Out extends IQuatLike> (out: Out, a: Out): Out\n * @static\n */\n static conjugate<Out extends IQuatLike> (out: Out, a: Out) {\n out.x = -a.x;\n out.y = -a.y;\n out.z = -a.z;\n out.w = a.w;\n return out;\n }\n\n /**\n * !#zh 求四元数长度\n * !#en Seek length quaternion\n * @method len\n * @typescript\n * len<Out extends IQuatLike> (a: Out): number\n * @static\n */\n static len<Out extends IQuatLike> (a: Out) {\n return Math.sqrt(a.x * a.x + a.y * a.y + a.z * a.z + a.w * a.w);\n }\n\n /**\n * !#zh 求四元数长度平方\n * !#en Seeking quaternion square of the length\n * @method lengthSqr\n * @typescript\n * lengthSqr<Out extends IQuatLike> (a: Out): number\n * @static\n */\n static lengthSqr<Out extends IQuatLike> (a: Out) {\n return a.x * a.x + a.y * a.y + a.z * a.z + a.w * a.w;\n }\n\n /**\n * !#zh 归一化四元数\n * !#en Normalized quaternions\n * @method normalize\n * @typescript\n * normalize<Out extends IQuatLike> (out: Out, a: Out): Out\n * @static\n */\n static normalize<Out extends IQuatLike> (out: Out, a: Out) {\n let len = a.x * a.x + a.y * a.y + a.z * a.z + a.w * a.w;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n out.x = a.x * len;\n out.y = a.y * len;\n out.z = a.z * len;\n out.w = a.w * len;\n }\n return out;\n }\n\n /**\n * !#zh 根据本地坐标轴朝向计算四元数,默认三向量都已归一化且相互垂直\n * !#en Calculated according to the local orientation quaternion coordinate axis, the default three vectors are normalized and mutually perpendicular\n * @method fromAxes\n * @typescript\n * fromAxes<Out extends IQuatLike, VecLike extends IVec3Like> (out: Out, xAxis: VecLike, yAxis: VecLike, zAxis: VecLike): Out\n * @static\n */\n static fromAxes<Out extends IQuatLike, VecLike extends IVec3Like> (out: Out, xAxis: VecLike, yAxis: VecLike, zAxis: VecLike) {\n Mat3.set(m3_1,\n xAxis.x, xAxis.y, xAxis.z,\n yAxis.x, yAxis.y, yAxis.z,\n zAxis.x, zAxis.y, zAxis.z,\n );\n return Quat.normalize(out, Quat.fromMat3(out, m3_1));\n }\n\n /**\n * !#zh 根据视口的前方向和上方向计算四元数\n * !#en The forward direction and the direction of the viewport computing quaternion\n * @method fromViewUp\n * @typescript\n * fromViewUp<Out extends IQuatLike> (out: Out, view: Vec3, up?: Vec3): Out\n * @param view 视口面向的前方向,必须归一化\n * @param up 视口的上方向,必须归一化,默认为 (0, 1, 0)\n * @static\n */\n static fromViewUp<Out extends IQuatLike> (out: Out, view: Vec3, up?: Vec3) {\n Mat3.fromViewUp(m3_1, view, up);\n return Quat.normalize(out, Quat.fromMat3(out, m3_1));\n }\n\n /**\n * !#zh 根据旋转轴和旋转弧度计算四元数\n * !#en The quaternion calculated and the arc of rotation of the rotary shaft\n * @method fromAxisAngle\n * @typescript\n * fromAxisAngle<Out extends IQuatLike, VecLike extends IVec3Like> (out: Out, axis: VecLike, rad: number): Out\n * @static\n */\n static fromAxisAngle<Out extends IQuatLike, VecLike extends IVec3Like> (out: Out, axis: VecLike, rad: number) {\n rad = rad * 0.5;\n const s = Math.sin(rad);\n out.x = s * axis.x;\n out.y = s * axis.y;\n out.z = s * axis.z;\n out.w = Math.cos(rad);\n return out;\n }\n\n /**\n * Set a quaternion from the given euler angle 0, 0, z.\n *\n * @param {Quat} out - Quaternion to store result.\n * @param {number} z - Angle to rotate around Z axis in degrees.\n * @returns {Quat}\n * @function\n */\n static fromAngleZ (out: Quat, z: number): Quat {\n z *= halfToRad;\n out.x = out.y = 0;\n out.z = Math.sin(z);\n out.w = Math.cos(z);\n return out;\n }\n\n /**\n * !#zh 根据三维矩阵信息计算四元数,默认输入矩阵不含有缩放信息\n * !#en Calculating the three-dimensional quaternion matrix information, default zoom information input matrix does not contain\n * @method fromMat3\n * @typescript\n * fromMat3<Out extends IQuatLike> (out: Out, mat: Mat3): Out\n * @static\n */\n static fromMat3<Out extends IQuatLike> (out: Out, mat: Mat3) {\n let m = mat.m;\n let m00 = m[0], m10 = m[1], m20 = m[2],\n m01 = m[3], m11 = m[4], m21 = m[5],\n m02 = m[6], m12 = m[7], m22 = m[8];\n\n const trace = m00 + m11 + m22;\n\n if (trace > 0) {\n const s = 0.5 / Math.sqrt(trace + 1.0);\n\n out.w = 0.25 / s;\n out.x = (m21 - m12) * s;\n out.y = (m02 - m20) * s;\n out.z = (m10 - m01) * s;\n\n } else if ((m00 > m11) && (m00 > m22)) {\n const s = 2.0 * Math.sqrt(1.0 + m00 - m11 - m22);\n\n out.w = (m21 - m12) / s;\n out.x = 0.25 * s;\n out.y = (m01 + m10) / s;\n out.z = (m02 + m20) / s;\n\n } else if (m11 > m22) {\n const s = 2.0 * Math.sqrt(1.0 + m11 - m00 - m22);\n\n out.w = (m02 - m20) / s;\n out.x = (m01 + m10) / s;\n out.y = 0.25 * s;\n out.z = (m12 + m21) / s;\n\n } else {\n const s = 2.0 * Math.sqrt(1.0 + m22 - m00 - m11);\n\n out.w = (m10 - m01) / s;\n out.x = (m02 + m20) / s;\n out.y = (m12 + m21) / s;\n out.z = 0.25 * s;\n }\n\n return out;\n }\n\n /**\n * !#zh 根据欧拉角信息计算四元数,旋转顺序为 YZX\n * !#en The quaternion calculated Euler angle information, rotation order YZX\n * @method fromEuler\n * @typescript\n * fromEuler<Out extends IQuatLike> (out: Out, x: number, y: number, z: number): Out\n * @static\n */\n static fromEuler<Out extends IQuatLike> (out: Out, x: number, y: number, z: number) {\n x *= halfToRad;\n y *= halfToRad;\n z *= halfToRad;\n\n const sx = Math.sin(x);\n const cx = Math.cos(x);\n const sy = Math.sin(y);\n const cy = Math.cos(y);\n const sz = Math.sin(z);\n const cz = Math.cos(z);\n\n out.x = sx * cy * cz + cx * sy * sz;\n out.y = cx * sy * cz + sx * cy * sz;\n out.z = cx * cy * sz - sx * sy * cz;\n out.w = cx * cy * cz - sx * sy * sz;\n\n return out;\n }\n\n /**\n * !#zh 返回定义此四元数的坐标系 X 轴向量\n * !#en This returns the result of the quaternion coordinate system X-axis vector\n * @method toAxisX\n * @typescript\n * toAxisX<Out extends IQuatLike, VecLike extends IVec3Like> (out: VecLike, q: Out): VecLike\n * @static\n */\n static toAxisX<Out extends IQuatLike, VecLike extends IVec3Like> (out: VecLike, q: Out) {\n const fy = 2.0 * q.y;\n const fz = 2.0 * q.z;\n out.x = 1.0 - fy * q.y - fz * q.z;\n out.y = fy * q.x + fz * q.w;\n out.z = fz * q.x + fy * q.w;\n\n return out;\n }\n\n /**\n * !#zh 返回定义此四元数的坐标系 Y 轴向量\n * !#en This returns the result of the quaternion coordinate system Y axis vector\n * @method toAxisY\n * @typescript\n * toAxisY<Out extends IQuatLike, VecLike extends IVec3Like> (out: VecLike, q: Out): VecLike\n * @static\n */\n static toAxisY<Out extends IQuatLike, VecLike extends IVec3Like> (out: VecLike, q: Out) {\n const fx = 2.0 * q.x;\n const fy = 2.0 * q.y;\n const fz = 2.0 * q.z;\n out.x = fy * q.x - fz * q.w;\n out.y = 1.0 - fx * q.x - fz * q.z;\n out.z = fz * q.y + fx * q.w;\n\n return out;\n }\n\n /**\n * !#zh 返回定义此四元数的坐标系 Z 轴向量\n * !#en This returns the result of the quaternion coordinate system the Z-axis vector\n * @method toAxisZ\n * @typescript\n * toAxisZ<Out extends IQuatLike, VecLike extends IVec3Like> (out: VecLike, q: Out): VecLike\n * @static\n */\n static toAxisZ<Out extends IQuatLike, VecLike extends IVec3Like> (out: VecLike, q: Out) {\n const fx = 2.0 * q.x;\n const fy = 2.0 * q.y;\n const fz = 2.0 * q.z;\n out.x = fz * q.x - fy * q.w;\n out.y = fz * q.y - fx * q.w;\n out.z = 1.0 - fx * q.x - fy * q.y;\n\n return out;\n }\n\n /**\n * !#zh 根据四元数计算欧拉角,返回角度 x, y 在 [-180, 180] 区间内, z 默认在 [-90, 90] 区间内,旋转顺序为 YZX\n * !#en The quaternion calculated Euler angles, return angle x, y in the [-180, 180] interval, z default the range [-90, 90] interval, the rotation order YZX\n * @method toEuler\n * @typescript\n * toEuler<Out extends IVec3Like> (out: Out, q: IQuatLike, outerZ?: boolean): Out\n * @param outerZ z 取值范围区间改为 [-180, -90] U [90, 180]\n * @static\n */\n static toEuler<Out extends IVec3Like> (out: Out, q: IQuatLike, outerZ?: boolean) {\n const { x, y, z, w } = q;\n let bank = 0;\n let heading = 0;\n let attitude = 0;\n const test = x * y + z * w;\n if (test > 0.499999) {\n bank = 0; // default to zero\n heading = toDegree(2 * Math.atan2(x, w));\n attitude = 90;\n } else if (test < -0.499999) {\n bank = 0; // default to zero\n heading = -toDegree(2 * Math.atan2(x, w));\n attitude = -90;\n } else {\n const sqx = x * x;\n const sqy = y * y;\n const sqz = z * z;\n bank = toDegree(Math.atan2(2 * x * w - 2 * y * z, 1 - 2 * sqx - 2 * sqz));\n heading = toDegree(Math.atan2(2 * y * w - 2 * x * z, 1 - 2 * sqy - 2 * sqz));\n attitude = toDegree(Math.asin(2 * test));\n if (outerZ) {\n bank = -180 * Math.sign(bank + 1e-6) + bank;\n heading = -180 * Math.sign(heading + 1e-6) + heading;\n attitude = 180 * Math.sign(attitude + 1e-6) - attitude;\n }\n }\n out.x = bank; out.y = heading; out.z = attitude;\n return out;\n }\n\n /**\n * !#zh 四元数等价判断\n * !#en Analyzing quaternion equivalent\n * @method strictEquals\n * @typescript\n * strictEquals<Out extends IQuatLike> (a: Out, b: Out): boolean\n * @static\n */\n static strictEquals<Out extends IQuatLike> (a: Out, b: Out) {\n return a.x === b.x && a.y === b.y && a.z === b.z && a.w === b.w;\n }\n\n /**\n * !#zh 排除浮点数误差的四元数近似等价判断\n * !#en Negative floating point error quaternion approximately equivalent Analyzing\n * @method equals\n * @typescript\n * equals<Out extends IQuatLike> (a: Out, b: Out, epsilon?: number): boolean\n * @static\n */\n static equals<Out extends IQuatLike> (a: Out, b: Out, epsilon = EPSILON) {\n return (Math.abs(a.x - b.x) <= epsilon * Math.max(1.0, Math.abs(a.x), Math.abs(b.x)) &&\n Math.abs(a.y - b.y) <= epsilon * Math.max(1.0, Math.abs(a.y), Math.abs(b.y)) &&\n Math.abs(a.z - b.z) <= epsilon * Math.max(1.0, Math.abs(a.z), Math.abs(b.z)) &&\n Math.abs(a.w - b.w) <= epsilon * Math.max(1.0, Math.abs(a.w), Math.abs(b.w)));\n }\n\n\n /**\n * !#zh 四元数转数组\n * !#en Quaternion rotation array\n * @method toArray\n * @typescript\n * toArray <Out extends IWritableArrayLike<number>> (out: Out, q: IQuatLike, ofs?: number): Out\n * @param ofs 数组内的起始偏移量\n * @static\n */\n static toArray <Out extends IWritableArrayLike<number>> (out: Out, q: IQuatLike, ofs = 0) {\n out[ofs + 0] = q.x;\n out[ofs + 1] = q.y;\n out[ofs + 2] = q.z;\n out[ofs + 3] = q.w;\n return out;\n }\n\n /**\n * !#zh 数组转四元数\n * !#en Array to a quaternion\n * @method fromArray\n * @typescript\n * fromArray <Out extends IQuatLike> (out: Out, arr: IWritableArrayLike<number>, ofs?: number): Out\n * @param ofs 数组起始偏移量\n * @static\n */\n static fromArray <Out extends IQuatLike> (out: Out, arr: IWritableArrayLike<number>, ofs = 0) {\n out.x = arr[ofs + 0];\n out.y = arr[ofs + 1];\n out.z = arr[ofs + 2];\n out.w = arr[ofs + 3];\n return out;\n }\n\n\n /**\n * @property {Number} x\n */\n x: number;\n /**\n * @property {Number} y\n */\n y: number;\n /**\n * @property {Number} z\n */\n z: number;\n /**\n * @property {Number} w\n */\n w: number;\n\n constructor (x: Quat | number = 0, y: number = 0, z: number = 0, w: number = 1) {\n super();\n\n if (x && typeof x === 'object') {\n this.x = x.x;\n this.y = x.y;\n this.z = x.z;\n this.w = x.w;\n }\n else {\n this.x = x as number;\n this.y = y;\n this.z = z;\n this.w = w;\n }\n }\n\n /**\n * !#en clone a Quat object and return the new object\n * !#zh 克隆一个四元数并返回\n * @method clone\n * @return {Quat}\n */\n clone (): Quat {\n return new Quat(this.x, this.y, this.z, this.w);\n }\n\n /**\n * !#en Set values with another quaternion\n * !#zh 用另一个四元数的值设置到当前对象上。\n * @method set\n * @param {Quat} newValue - !#en new value to set. !#zh 要设置的新值\n * @return {Quat} returns this\n * @chainable\n */\n set (newValue: Quat): this {\n this.x = newValue.x;\n this.y = newValue.y;\n this.z = newValue.z;\n this.w = newValue.w;\n return this;\n }\n\n /**\n * !#en Check whether current quaternion equals another\n * !#zh 当前的四元数是否与指定的四元数相等。\n * @method equals\n * @param {Quat} other\n * @return {Boolean}\n */\n equals (other: Quat): boolean {\n return other && this.x === other.x && this.y === other.y && this.z === other.z && this.w === other.w;\n }\n\n /**\n * !#en Convert quaternion to euler\n * !#zh 转换四元数到欧拉角\n * @method toEuler\n * @param {Vec3} out\n * @return {Vec3}\n */\n toEuler (out: Vec3): Vec3 {\n return Quat.toEuler(out, this);\n }\n\n /**\n * !#en Convert euler to quaternion\n * !#zh 转换欧拉角到四元数\n * @method fromEuler\n * @param {Vec3} euler\n * @return {Quat}\n */\n fromEuler (euler: Vec3): this {\n return Quat.fromEuler(this, euler.x, euler.y, euler.z);\n }\n\n /**\n * !#en Calculate the interpolation result between this quaternion and another one with given ratio\n * !#zh 计算四元数的插值结果\n * @member lerp\n * @param {Quat} to\n * @param {Number} ratio\n * @param {Quat} [out]\n * @returns {Quat} out\n */\n lerp (to: Quat, ratio: number, out?: Quat): Quat {\n out = out || new Quat();\n Quat.slerp(out, this, to, ratio);\n return out;\n }\n\n /**\n * !#en Calculate the multiply result between this quaternion and another one\n * !#zh 计算四元数乘积的结果\n * @member multiply\n * @param {Quat} other\n * @returns {Quat} this\n */\n multiply (other: Quat): this {\n return Quat.multiply(this, this, other);\n }\n\n /**\n * !#en Rotates a quaternion by the given angle (in radians) about a world space axis.\n * !#zh 围绕世界空间轴按给定弧度旋转四元数\n * @member rotateAround\n * @param {Quat} rot - Quaternion to rotate\n * @param {Vec3} axis - The axis around which to rotate in world space\n * @param {Number} rad - Angle (in radians) to rotate\n * @param {Quat} [out] - Quaternion to store result\n * @returns {Quat} out\n */\n rotateAround (rot: Quat, axis: Vec3, rad: number, out?: Quat): Quat {\n out = out || new Quat();\n return Quat.rotateAround(out, rot, axis, rad);\n }\n}\n\nconst qt_1 = new Quat();\nconst qt_2 = new Quat();\nconst v3_1 = new Vec3();\nconst m3_1 = new Mat3();\nconst halfToRad = 0.5 * Math.PI / 180.0;\n\nCCClass.fastDefine('cc.Quat', Quat, { x: 0, y: 0, z: 0, w: 1 });\n\n\n/**\n * @module cc\n */\n\n/**\n * !#en The convenience method to create a new {{#crossLink \"Quat\"}}cc.Quat{{/crossLink}}.\n * !#zh 通过该简便的函数进行创建 {{#crossLink \"Quat\"}}cc.Quat{{/crossLink}} 对象。\n * @method quat\n * @param {Number|Object} [x=0]\n * @param {Number} [y=0]\n * @param {Number} [z=0]\n * @param {Number} [w=1]\n * @return {Quat}\n */\ncc.quat = function quat (x, y, z, w) {\n return new Quat(x, y, z, w);\n};\n\ncc.Quat = Quat;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport ValueType from './value-type';\nimport CCClass from '../platform/CCClass';\nimport Vec2 from './vec2';\nimport Mat4 from './mat4';\nimport Size from './size';\n\n/**\n * !#en A 2D rectangle defined by x, y position and width, height.\n * !#zh 通过位置和宽高定义的 2D 矩形。\n * @class Rect\n * @extends ValueType\n */\n/**\n * !#en\n * Constructor of Rect class.\n * see {{#crossLink \"cc/rect:method\"}} cc.rect {{/crossLink}} for convenience method.\n * !#zh\n * Rect类的构造函数。可以通过 {{#crossLink \"cc/rect:method\"}} cc.rect {{/crossLink}} 简便方法进行创建。\n *\n * @method constructor\n * @param {Number} [x=0]\n * @param {Number} [y=0]\n * @param {Number} [w=0]\n * @param {Number} [h=0]\n */\nexport default class Rect extends ValueType {\n\n /**\n * !#en Creates a rectangle from two coordinate values.\n * !#zh 根据指定 2 个坐标创建出一个矩形区域。\n * @static\n * @method fromMinMax\n * @param {Vec2} v1\n * @param {Vec2} v2\n * @return {Rect}\n * @example\n * cc.Rect.fromMinMax(cc.v2(10, 10), cc.v2(20, 20)); // Rect {x: 10, y: 10, width: 10, height: 10};\n */\n static fromMinMax (v1: Vec2, v2: Vec2) {\n var min_x = Math.min(v1.x, v2.x);\n var min_y = Math.min(v1.y, v2.y);\n var max_x = Math.max(v1.x, v2.x);\n var max_y = Math.max(v1.y, v2.y);\n\n return new Rect(min_x, min_y, max_x - min_x, max_y - min_y);\n }\n\n /**\n * @property {Number} x\n */\n x: number;\n /**\n * @property {Number} y\n */\n y: number;\n /**\n * @property {Number} width\n */\n width: number;\n /**\n * @property {Number} height\n */\n height: number;\n constructor (x: Rect | number = 0, y: number = 0, w: number = 0, h: number = 0) {\n super();\n if (x && typeof x === 'object') {\n y = x.y;\n w = x.width;\n h = x.height;\n x = x.x;\n }\n this.x = x as number || 0;\n this.y = y || 0;\n this.width = w || 0;\n this.height = h || 0;\n }\n\n\n /**\n * !#en TODO\n * !#zh 克隆一个新的 Rect。\n * @method clone\n * @return {Rect}\n * @example\n * var a = new cc.Rect(0, 0, 10, 10);\n * a.clone();// Rect {x: 0, y: 0, width: 10, height: 10}\n */\n clone (): Rect {\n return new Rect(this.x, this.y, this.width, this.height);\n }\n\n /**\n * !#en TODO\n * !#zh 是否等于指定的矩形。\n * @method equals\n * @param {Rect} other\n * @return {Boolean}\n * @example\n * var a = new cc.Rect(0, 0, 10, 10);\n * var b = new cc.Rect(0, 0, 10, 10);\n * a.equals(b);// true;\n */\n equals (other: Rect): boolean {\n return other &&\n this.x === other.x &&\n this.y === other.y &&\n this.width === other.width &&\n this.height === other.height;\n };\n\n /**\n * !#en TODO\n * !#zh 线性插值\n * @method lerp\n * @param {Rect} to\n * @param {Number} ratio - the interpolation coefficient.\n * @param {Rect} [out] - optional, the receiving vector.\n * @return {Rect}\n * @example\n * var a = new cc.Rect(0, 0, 10, 10);\n * var b = new cc.Rect(50, 50, 100, 100);\n * update (dt) {\n * // method 1;\n * var c = a.lerp(b, dt * 0.1);\n * // method 2;\n * a.lerp(b, dt * 0.1, c);\n * }\n */\n lerp (to: Rect, ratio: number, out?: Rect): Rect {\n out = out || new Rect();\n var x = this.x;\n var y = this.y;\n var width = this.width;\n var height = this.height;\n out.x = x + (to.x - x) * ratio;\n out.y = y + (to.y - y) * ratio;\n out.width = width + (to.width - width) * ratio;\n out.height = height + (to.height - height) * ratio;\n return out;\n };\n\n set (source: Rect): Rect {\n this.x = source.x;\n this.y = source.y;\n this.width = source.width;\n this.height = source.height;\n return this;\n }\n\n /**\n * !#en Check whether the current rectangle intersects with the given one\n * !#zh 当前矩形与指定矩形是否相交。\n * @method intersects\n * @param {Rect} rect\n * @return {Boolean}\n * @example\n * var a = new cc.Rect(0, 0, 10, 10);\n * var b = new cc.Rect(0, 0, 20, 20);\n * a.intersects(b);// true\n */\n intersects (rect: Rect): boolean {\n var maxax = this.x + this.width,\n maxay = this.y + this.height,\n maxbx = rect.x + rect.width,\n maxby = rect.y + rect.height;\n return !(maxax < rect.x || maxbx < this.x || maxay < rect.y || maxby < this.y);\n }\n\n /**\n * !#en Returns the overlapping portion of 2 rectangles.\n * !#zh 返回 2 个矩形重叠的部分。\n * @method intersection\n * @param {Rect} out Stores the result\n * @param {Rect} rectB\n * @return {Rect} Returns the out parameter\n * @example\n * var a = new cc.Rect(0, 10, 20, 20);\n * var b = new cc.Rect(0, 10, 10, 10);\n * var intersection = new cc.Rect();\n * a.intersection(intersection, b); // intersection {x: 0, y: 10, width: 10, height: 10};\n */\n intersection (out: Rect, rectB: Rect): Rect {\n var axMin = this.x, ayMin = this.y, axMax = this.x + this.width, ayMax = this.y + this.height;\n var bxMin = rectB.x, byMin = rectB.y, bxMax = rectB.x + rectB.width, byMax = rectB.y + rectB.height;\n out.x = Math.max(axMin, bxMin);\n out.y = Math.max(ayMin, byMin);\n out.width = Math.min(axMax, bxMax) - out.x;\n out.height = Math.min(ayMax, byMax) - out.y;\n return out;\n }\n\n /**\n * !#en Check whether the current rect contains the given point\n * !#zh 当前矩形是否包含指定坐标点。\n * Returns true if the point inside this rectangle.\n * @method contains\n * @param {Vec2} point\n * @return {Boolean}\n * @example\n * var a = new cc.Rect(0, 0, 10, 10);\n * var b = new cc.Vec2(0, 5);\n * a.contains(b);// true\n */\n contains (point: Vec2): boolean {\n return (this.x <= point.x &&\n this.x + this.width >= point.x &&\n this.y <= point.y &&\n this.y + this.height >= point.y);\n }\n\n /**\n * !#en Returns true if the other rect totally inside this rectangle.\n * !#zh 当前矩形是否包含指定矩形。\n * @method containsRect\n * @param {Rect} rect\n * @return {Boolean}\n * @example\n * var a = new cc.Rect(0, 0, 20, 20);\n * var b = new cc.Rect(0, 0, 10, 10);\n * a.containsRect(b);// true\n */\n containsRect (rect: Rect): boolean {\n return (this.x <= rect.x &&\n this.x + this.width >= rect.x + rect.width &&\n this.y <= rect.y &&\n this.y + this.height >= rect.y + rect.height);\n }\n\n /**\n * !#en Returns the smallest rectangle that contains the current rect and the given rect.\n * !#zh 返回一个包含当前矩形和指定矩形的最小矩形。\n * @method union\n * @param {Rect} out Stores the result\n * @param {Rect} rectB\n * @return {Rect} Returns the out parameter\n * @example\n * var a = new cc.Rect(0, 10, 20, 20);\n * var b = new cc.Rect(0, 10, 10, 10);\n * var union = new cc.Rect();\n * a.union(union, b); // union {x: 0, y: 10, width: 20, height: 20};\n */\n union (out: Rect, rectB: Rect): Rect {\n var ax = this.x, ay = this.y, aw = this.width, ah = this.height;\n var bx = rectB.x, by = rectB.y, bw = rectB.width, bh = rectB.height;\n out.x = Math.min(ax, bx);\n out.y = Math.min(ay, by);\n out.width = Math.max(ax + aw, bx + bw) - out.x;\n out.height = Math.max(ay + ah, by + bh) - out.y;\n return out;\n }\n\n /**\n * !#en Apply matrix4 to the rect.\n * !#zh 使用 mat4 对矩形进行矩阵转换。\n * @method transformMat4\n * @param out {Rect} The output rect\n * @param mat {Mat4} The matrix4\n */\n transformMat4 (out: Rect, mat: Mat4): Rect {\n let ol = this.x;\n let ob = this.y;\n let or = ol + this.width;\n let ot = ob + this.height;\n let matm = mat.m;\n let lbx = matm[0] * ol + matm[4] * ob + matm[12];\n let lby = matm[1] * ol + matm[5] * ob + matm[13];\n let rbx = matm[0] * or + matm[4] * ob + matm[12];\n let rby = matm[1] * or + matm[5] * ob + matm[13];\n let ltx = matm[0] * ol + matm[4] * ot + matm[12];\n let lty = matm[1] * ol + matm[5] * ot + matm[13];\n let rtx = matm[0] * or + matm[4] * ot + matm[12];\n let rty = matm[1] * or + matm[5] * ot + matm[13];\n\n let minX = Math.min(lbx, rbx, ltx, rtx);\n let maxX = Math.max(lbx, rbx, ltx, rtx);\n let minY = Math.min(lby, rby, lty, rty);\n let maxY = Math.max(lby, rby, lty, rty);\n\n out.x = minX;\n out.y = minY;\n out.width = maxX - minX;\n out.height = maxY - minY;\n return out;\n }\n\n /**\n * !#en Output rect informations to string\n * !#zh 转换为方便阅读的字符串\n * @method toString\n * @return {String}\n * @example\n * var a = new cc.Rect(0, 0, 10, 10);\n * a.toString();// \"(0.00, 0.00, 10.00, 10.00)\";\n */\n toString (): string {\n return '(' + this.x.toFixed(2) + ', ' + this.y.toFixed(2) + ', ' + this.width.toFixed(2) +\n ', ' + this.height.toFixed(2) + ')';\n }\n\n /**\n * !#en The minimum x value, equals to rect.x\n * !#zh 矩形 x 轴上的最小值,等价于 rect.x。\n * @property xMin\n * @type {Number}\n */\n get xMin () {\n return this.x;\n }\n set xMin (v) {\n this.width += this.x - v;\n this.x = v;\n }\n\n /**\n * !#en The minimum y value, equals to rect.y\n * !#zh 矩形 y 轴上的最小值。\n * @property yMin\n * @type {Number}\n */\n get yMin () {\n return this.y;\n }\n set yMin (v) {\n this.height += this.y - v;\n this.y = v;\n }\n\n\n /**\n * !#en The maximum x value.\n * !#zh 矩形 x 轴上的最大值。\n * @property xMax\n * @type {Number}\n */\n get xMax () {\n return this.x + this.width;\n }\n set xMax (value) {\n this.width = value - this.x;\n }\n\n /**\n * !#en The maximum y value.\n * !#zh 矩形 y 轴上的最大值。\n * @property yMax\n * @type {Number}\n */\n get yMax () {\n return this.y + this.height;\n }\n set yMax (value) {\n this.height = value - this.y;\n }\n\n /**\n * !#en The position of the center of the rectangle.\n * !#zh 矩形的中心点。\n * @property {Vec2} center\n */\n get center () {\n return new Vec2(this.x + this.width * 0.5,\n this.y + this.height * 0.5);\n }\n set center (value) {\n this.x = value.x - this.width * 0.5;\n this.y = value.y - this.height * 0.5;\n }\n\n /**\n * !#en The X and Y position of the rectangle.\n * !#zh 矩形的 x 和 y 坐标。\n * @property {Vec2} origin\n */\n get origin () {\n return new Vec2(this.x, this.y);\n }\n set origin (value) {\n this.x = value.x;\n this.y = value.y;\n }\n\n /**\n * !#en Width and height of the rectangle.\n * !#zh 矩形的大小。\n * @property {Size} size\n */\n get size () {\n return new Size(this.width, this.height);\n }\n set size (value) {\n this.width = value.width;\n this.height = value.height;\n }\n}\n\nCCClass.fastDefine('cc.Rect', Rect, { x: 0, y: 0, width: 0, height: 0 });\ncc.Rect = Rect;\n\n\n/**\n * @module cc\n */\n\n/**\n * !#en\n * The convenience method to create a new Rect.\n * see {{#crossLink \"Rect/Rect:method\"}}cc.Rect{{/crossLink}}\n * !#zh\n * 该方法用来快速创建一个新的矩形。{{#crossLink \"Rect/Rect:method\"}}cc.Rect{{/crossLink}}\n * @method rect\n * @param {Number} [x=0]\n * @param {Number} [y=0]\n * @param {Number} [w=0]\n * @param {Number} [h=0]\n * @return {Rect}\n * @example\n * var a = new cc.Rect(0 , 0, 10, 0);\n */\ncc.rect = function rect (x, y, w, h) {\n return new Rect(x, y, w, h);\n};\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport ValueType from './value-type';\nimport CCClass from '../platform/CCClass';\n\n/**\n * !#en\n * cc.Size is the class for size object,<br/>\n * please do not use its constructor to create sizes,<br/>\n * use {{#crossLink \"cc/size:method\"}}{{/crossLink}} alias function instead.<br/>\n * It will be deprecated soon, please use cc.Vec2 instead.\n *\n * !#zh\n * cc.Size 是 size 对象的类。<br/>\n * 请不要使用它的构造函数创建的 size<br/>\n * 使用 {{#crossLink \"cc/size:method\"}}{{/crossLink}} 别名函数。<br/>\n * 它不久将被取消请使用cc.Vec2代替。\n *\n * @class Size\n */\n/**\n * @method constructor\n * @param {Number|Size} width\n * @param {Number} [height]\n */\nexport default class Size extends ValueType {\n\n /**\n * !#en return a Size object with width = 0 and height = 0.\n * !#zh 返回一个宽度为 0 和高度为 0 的 Size 对象。\n * @property ZERO\n * @type {Size}\n * @default new Size(0, 0)\n * @static\n */\n static get ZERO () { return new Size(); }\n static readonly ZERO_R = Size.ZERO;\n\n /**\n * @property {Number} width\n */\n width: number;\n /**\n * @property {Number} height\n */\n height: number;\n\n constructor (width: Size | number = 0, height: number = 0) {\n super();\n if (width && typeof width === 'object') {\n this.width = width.width;\n this.height = width.height;\n }\n else {\n this.width = width as number || 0;\n this.height = height || 0;\n }\n }\n\n /**\n * !#en TODO\n * !#zh 克隆 size 对象。\n * @method clone\n * @return {Size}\n * @example\n * var a = new cc.size(10, 10);\n * a.clone();// return Size {width: 0, height: 0};\n */\n clone (): Size {\n return new Size(this.width, this.height);\n }\n\n /**\n * !#en TODO\n * !#zh 当前 Size 对象是否等于指定 Size 对象。\n * @method equals\n * @param {Size} other\n * @return {Boolean}\n * @example\n * var a = new cc.size(10, 10);\n * a.equals(new cc.size(10, 10));// return true;\n */\n equals (other: Size): boolean {\n return other &&\n this.width === other.width &&\n this.height === other.height;\n }\n\n /**\n * !#en TODO\n * !#zh 线性插值。\n * @method lerp\n * @param {Rect} to\n * @param {Number} ratio - the interpolation coefficient.\n * @param {Size} [out] - optional, the receiving vector.\n * @return {Size}\n * @example\n * var a = new cc.size(10, 10);\n * var b = new cc.rect(50, 50, 100, 100);\n * update (dt) {\n * // method 1;\n * var c = a.lerp(b, dt * 0.1);\n * // method 2;\n * a.lerp(b, dt * 0.1, c);\n * }\n */\n lerp (to: Size, ratio: number, out?: Size): Size {\n out = out || new Size();\n var width = this.width;\n var height = this.height;\n out.width = width + (to.width - width) * ratio;\n out.height = height + (to.height - height) * ratio;\n return out;\n }\n\n set (source): Size {\n this.width = source.width;\n this.height = source.height;\n return this;\n }\n\n /**\n * !#en TODO\n * !#zh 转换为方便阅读的字符串。\n * @method toString\n * @return {String}\n * @example\n * var a = new cc.size(10, 10);\n * a.toString();// return \"(10.00, 10.00)\";\n */\n toString (): string {\n return '(' + this.width.toFixed(2) + ', ' + this.height.toFixed(2) + ')';\n }\n}\n\nCCClass.fastDefine('cc.Size', Size, { width: 0, height: 0 });\n\n\n/**\n * @module cc\n */\n\n/**\n * !#en\n * Helper function that creates a cc.Size.<br/>\n * Please use cc.p or cc.v2 instead, it will soon replace cc.Size.\n * !#zh\n * 创建一个 cc.Size 对象的帮助函数。<br/>\n * 注意:可以使用 cc.p 或者是 cc.v2 代替,它们将很快取代 cc.Size。\n * @method size\n * @param {Number|Size} w - width or a size object\n * @param {Number} [h] - height\n * @return {Size}\n * @example {@link cocos2d/core/value-types/CCSize/size.js}\n */\ncc.size = function (w, h) {\n return new Size(w, h);\n};\n\ncc.Size = Size;\n","\nimport Quat from './quat';\nimport Vec3 from './vec3';\nimport Mat4 from './Mat4';\n\nlet tmp_quat = new Quat();\n\nexport default class Trs {\n static toRotation (out: Quat, a: FloatArray): Quat {\n out.x = a[3];\n out.y = a[4];\n out.z = a[5];\n out.w = a[6];\n return out;\n }\n\n static fromRotation (out: FloatArray, a: Quat): FloatArray {\n out[3] = a.x;\n out[4] = a.y;\n out[5] = a.z;\n out[6] = a.w;\n return out;\n }\n\n static toEuler (out: Vec3, a: FloatArray): Vec3 {\n Trs.toRotation(tmp_quat, a);\n Quat.toEuler(out, tmp_quat);\n return out;\n }\n\n static fromEuler (out: FloatArray, a: Vec3): FloatArray {\n Quat.fromEuler(tmp_quat, a.x, a.y, a.z);\n Trs.fromRotation(out, tmp_quat);\n return out;\n }\n\n static fromEulerNumber (out: FloatArray, x: number, y: number, z: number): FloatArray {\n Quat.fromEuler(tmp_quat, x, y, z);\n Trs.fromRotation(out, tmp_quat);\n return out;\n }\n\n static toScale (out: Vec3, a: FloatArray): Vec3 {\n out.x = a[7];\n out.y = a[8];\n out.z = a[9];\n return out;\n }\n\n static fromScale (out: FloatArray, a: Vec3): FloatArray {\n out[7] = a.x;\n out[8] = a.y;\n out[9] = a.z;\n return out;\n }\n\n static toPosition (out: Vec3, a: FloatArray): Vec3 {\n out.x = a[0];\n out.y = a[1];\n out.z = a[2];\n return out;\n }\n\n static fromPosition (out: FloatArray, a: Vec3): FloatArray {\n out[0] = a.x;\n out[1] = a.y;\n out[2] = a.z;\n return out;\n }\n\n static fromAngleZ (out: FloatArray, a: number): FloatArray {\n Quat.fromAngleZ(tmp_quat, a);\n Trs.fromRotation(out, tmp_quat);\n return out;\n }\n\n static toMat4 (out: Mat4, trs: FloatArray): Mat4 {\n let x = trs[3], y = trs[4], z = trs[5], w = trs[6];\n let x2 = x + x;\n let y2 = y + y;\n let z2 = z + z;\n\n let xx = x * x2;\n let xy = x * y2;\n let xz = x * z2;\n let yy = y * y2;\n let yz = y * z2;\n let zz = z * z2;\n let wx = w * x2;\n let wy = w * y2;\n let wz = w * z2;\n let sx = trs[7];\n let sy = trs[8];\n let sz = trs[9];\n\n let m = out.m;\n m[0] = (1 - (yy + zz)) * sx;\n m[1] = (xy + wz) * sx;\n m[2] = (xz - wy) * sx;\n m[3] = 0;\n m[4] = (xy - wz) * sy;\n m[5] = (1 - (xx + zz)) * sy;\n m[6] = (yz + wx) * sy;\n m[7] = 0;\n m[8] = (xz + wy) * sz;\n m[9] = (yz - wx) * sz;\n m[10] = (1 - (xx + yy)) * sz;\n m[11] = 0;\n m[12] = trs[0];\n m[13] = trs[1];\n m[14] = trs[2];\n m[15] = 1;\n\n return out;\n }\n}\n\ncc.Trs = Trs;","/**\n * @ignore\n */\nconst _d2r = Math.PI / 180.0;\n/**\n * @ignore\n */\nconst _r2d = 180.0 / Math.PI;\n\n/**\n * @property {number} EPSILON\n */\nexport const EPSILON = 0.000001;\n\n// Number of bits in an integer\nexport const INT_BITS = 32;\nexport const INT_MAX = 0x7fffffff;\nexport const INT_MIN = -1 << (INT_BITS - 1);\n\n/**\n * Use single-precision floating point on native platforms to be compatible with native math libraries.\n * Double precision floating point is used on Web platforms and editors to reduce the overhead of type conversion.\n */\nexport const FLOAT_ARRAY_TYPE = (CC_JSB && CC_NATIVERENDERER) ? Float32Array : Float64Array;\nexport const FLOAT_BYTES = (CC_JSB && CC_NATIVERENDERER) ? 4 : 8;\n\n/**\n * Tests whether or not the arguments have approximately the same value, within an absolute\n * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less\n * than or equal to 1.0, and a relative tolerance is used for larger values)\n *\n * @param {Number} a The first number to test.\n * @param {Number} b The second number to test.\n * @returns {Boolean} True if the numbers are approximately equal, false otherwise.\n */\nexport function equals(a, b) {\n return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));\n}\n\n/**\n * Tests whether or not the arguments have approximately the same value by given maxDiff\n *\n * @param {Number} a The first number to test.\n * @param {Number} b The second number to test.\n * @param {Number} maxDiff Maximum difference.\n * @returns {Boolean} True if the numbers are approximately equal, false otherwise.\n */\nexport function approx(a, b, maxDiff) {\n maxDiff = maxDiff || EPSILON;\n return Math.abs(a - b) <= maxDiff;\n}\n\n/**\n * Clamps a value between a minimum float and maximum float value.\n *\n * @method clamp\n * @param {number} val\n * @param {number} min\n * @param {number} max\n * @return {number}\n */\nexport function clamp(val, min, max) {\n return val < min ? min : val > max ? max : val;\n}\n\n/**\n * Clamps a value between 0 and 1.\n *\n * @method clamp01\n * @param {number} val\n * @return {number}\n */\nexport function clamp01(val) {\n return val < 0 ? 0 : val > 1 ? 1 : val;\n}\n\n/**\n * @method lerp\n * @param {number} from\n * @param {number} to\n * @param {number} ratio - the interpolation coefficient\n * @return {number}\n */\nexport function lerp(from, to, ratio) {\n return from + (to - from) * ratio;\n}\n\n/**\n* Convert Degree To Radian\n*\n* @param {Number} a Angle in Degrees\n*/\nexport function toRadian(a) {\n return a * _d2r;\n}\n\n/**\n* Convert Radian To Degree\n*\n* @param {Number} a Angle in Radian\n*/\nexport function toDegree(a) {\n return a * _r2d;\n}\n\n/**\n* @method random\n*/\nexport const random = Math.random;\n\n/**\n * Returns a floating-point random number between min (inclusive) and max (exclusive).\n *\n * @method randomRange\n * @param {number} min\n * @param {number} max\n * @return {number} the random number\n */\nexport function randomRange(min, max) {\n return Math.random() * (max - min) + min;\n}\n\n/**\n * Returns a random integer between min (inclusive) and max (exclusive).\n *\n * @method randomRangeInt\n * @param {number} min\n * @param {number} max\n * @return {number} the random integer\n */\nexport function randomRangeInt(min, max) {\n return Math.floor(randomRange(min, max));\n}\n\n/**\n * Linear congruential generator using Hull-Dobell Theorem.\n *\n * @method pseudoRandom\n * @param {number} seed the random seed\n * @return {number} the pseudo random\n */\nexport function pseudoRandom(seed) {\n seed = (seed * 9301 + 49297) % 233280;\n return seed / 233280.0;\n}\n\n/**\n * Returns a floating-point pseudo-random number between min (inclusive) and max (exclusive).\n *\n * @method pseudoRandomRange\n * @param {number} seed\n * @param {number} min\n * @param {number} max\n * @return {number} the random number\n */\nexport function pseudoRandomRange(seed, min, max) {\n return pseudoRandom(seed) * (max - min) + min;\n}\n\n/**\n * Returns a pseudo-random integer between min (inclusive) and max (exclusive).\n *\n * @method pseudoRandomRangeInt\n * @param {number} seed\n * @param {number} min\n * @param {number} max\n * @return {number} the random integer\n */\nexport function pseudoRandomRangeInt(seed, min, max) {\n return Math.floor(pseudoRandomRange(seed, min, max));\n}\n\n/**\n * Returns the next power of two for the value\n *\n * @method nextPow2\n * @param {number} val\n * @return {number} the the next power of two\n */\nexport function nextPow2(val) {\n --val;\n val = (val >> 1) | val;\n val = (val >> 2) | val;\n val = (val >> 4) | val;\n val = (val >> 8) | val;\n val = (val >> 16) | val;\n ++val;\n\n return val;\n}\n\n/**\n * Returns float remainder for t / length\n *\n * @method repeat\n * @param {number} t time start at 0\n * @param {number} length time of one cycle\n * @return {number} the time wrapped in the first cycle\n */\nexport function repeat(t, length) {\n return t - Math.floor(t / length) * length;\n}\n\n/**\n * Returns time wrapped in ping-pong mode\n *\n * @method repeat\n * @param {number} t time start at 0\n * @param {number} length time of one cycle\n * @return {number} the time wrapped in the first cycle\n */\nexport function pingPong(t, length) {\n t = repeat(t, length * 2);\n t = length - Math.abs(t - length);\n return t;\n}\n\n/**\n * Returns ratio of a value within a given range\n *\n * @method repeat\n * @param {number} from start value\n * @param {number} to end value\n * @param {number} value given value\n * @return {number} the ratio between [from,to]\n */\nexport function inverseLerp(from, to, value) {\n return (value - from) / (to - from);\n}\n\n/**\n * Returns -1, 0, +1 depending on sign of x.\n * \n * @method sign\n * @param {number} v\n */\nexport function sign (v) {\n return (v > 0) - (v < 0);\n}","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport js from '../platform/js';\n\n/**\n * !#en The base class of all value types.\n * !#zh 所有值类型的基类。\n * @class ValueType\n *\n */\nexport default class ValueType {\n /**\n * !#en This method returns an exact copy of current value.\n * !#zh 克隆当前值,该方法返回一个新对象,新对象的值和原对象相等。\n * @method clone\n * @return {ValueType}\n */\n clone () : ValueType {\n cc.errorID('0100', js.getClassName(this) + '.clone');\n // @ts-ignore\n return null;\n }\n\n /**\n * !#en Compares this object with the other one.\n * !#zh 当前对象是否等于指定对象。\n * @method equals\n * @param {ValueType} other\n * @return {Boolean}\n */\n equals (other) {\n cc.errorID('0100', js.getClassName(this) + '.equals');\n return false;\n }\n\n /**\n * !#en\n * Linearly interpolates between this value to to value by ratio which is in the range [0, 1].\n * When ratio = 0 returns this. When ratio = 1 return to. When ratio = 0.5 returns the average of this and to.\n * !#zh\n * 线性插值。<br/>\n * 当 ratio = 0 时返回自身ratio = 1 时返回目标ratio = 0.5 返回自身和目标的平均值。。\n * @method lerp\n * @param {ValueType} to - the to value\n * @param {number} ratio - the interpolation coefficient\n * @return {ValueType}\n */\n lerp (to, ratio) {\n cc.errorID('0100', js.getClassName(this) + '.lerp');\n return this.clone();\n }\n\n /**\n * !#en\n * Copys all the properties from another given object to this value.\n * !#zh\n * 从其它对象把所有属性复制到当前对象。\n * @method set\n * @param {ValueType} source - the source to copy\n */\n set (source) {\n cc.errorID('0100', js.getClassName(this) + '.set');\n }\n\n /**\n * !#en Convert to a readable string.\n * !#zh 转换为方便阅读的字符串。\n * @method toString\n * @return {string}\n */\n toString () {\n return '' + {};\n }\n}\n\njs.setClassName('cc.ValueType', ValueType);\ncc.ValueType = ValueType;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport ValueType from './value-type';\nimport Mat4 from './mat4';\nimport CCClass from '../platform/CCClass';\nimport misc from '../utils/misc';\nimport { EPSILON, random } from './utils';\n\nlet _x: number = 0.0;\nlet _y: number = 0.0;\n\n/**\n * !#en Representation of 2D vectors and points.\n * !#zh 表示 2D 向量和坐标\n *\n * @class Vec2\n * @extends ValueType\n */\n\nexport default class Vec2 extends ValueType {\n // deprecated\n static sub = Vec2.subtract;\n static mul = Vec2.multiply;\n static scale = Vec2.multiplyScalar;\n static mag = Vec2.len;\n static squaredMagnitude = Vec2.lengthSqr;\n static div = Vec2.divide;\n /**\n * !#en Returns the length of this vector.\n * !#zh 返回该向量的长度。\n * @method mag\n * @return {number} the result\n * @example\n * var v = cc.v2(10, 10);\n * v.mag(); // return 14.142135623730951;\n */\n mag = Vec2.prototype.len;\n /**\n * !#en Returns the squared length of this vector.\n * !#zh 返回该向量的长度平方。\n * @method magSqr\n * @return {number} the result\n * @example\n * var v = cc.v2(10, 10);\n * v.magSqr(); // return 200;\n */\n magSqr = Vec2.prototype.lengthSqr;\n /**\n * !#en Subtracts one vector from this. If you want to save result to another vector, use sub() instead.\n * !#zh 向量减法。如果你想保存结果到另一个向量,可使用 sub() 代替。\n * @method subSelf\n * @param {Vec2} vector\n * @return {Vec2} returns this\n * @chainable\n * @example\n * var v = cc.v2(10, 10);\n * v.subSelf(cc.v2(5, 5));// return Vec2 {x: 5, y: 5};\n */\n subSelf = Vec2.prototype.subtract;\n /**\n * !#en Subtracts one vector from this, and returns the new result.\n * !#zh 向量减法,并返回新结果。\n * @method sub\n * @param {Vec2} vector\n * @param {Vec2} [out] - optional, the receiving vector, you can pass the same vec2 to save result to itself, if not provided, a new vec2 will be created\n * @return {Vec2} the result\n * @example\n * var v = cc.v2(10, 10);\n * v.sub(cc.v2(5, 5)); // return Vec2 {x: 5, y: 5};\n * var v1 = new Vec2;\n * v.sub(cc.v2(5, 5), v1); // return Vec2 {x: 5, y: 5};\n */\n sub (vector: Vec2, out?: Vec2): Vec2 {\n return Vec2.subtract(out || new Vec2(), this, vector);\n }\n /**\n * !#en Multiplies this by a number. If you want to save result to another vector, use mul() instead.\n * !#zh 缩放当前向量。如果你想结果保存到另一个向量,可使用 mul() 代替。\n * @method mulSelf\n * @param {number} num\n * @return {Vec2} returns this\n * @chainable\n * @example\n * var v = cc.v2(10, 10);\n * v.mulSelf(5);// return Vec2 {x: 50, y: 50};\n */\n mulSelf = Vec2.prototype.multiplyScalar;\n /**\n * !#en Multiplies by a number, and returns the new result.\n * !#zh 缩放向量,并返回新结果。\n * @method mul\n * @param {number} num\n * @param {Vec2} [out] - optional, the receiving vector, you can pass the same vec2 to save result to itself, if not provided, a new vec2 will be created\n * @return {Vec2} the result\n * @example\n * var v = cc.v2(10, 10);\n * v.mul(5); // return Vec2 {x: 50, y: 50};\n * var v1 = new Vec2;\n * v.mul(5, v1); // return Vec2 {x: 50, y: 50};\n */\n mul (num: number, out?: Vec2): Vec2 {\n return Vec2.multiplyScalar(out || new Vec2(), this, num);\n }\n /**\n * !#en Divides by a number. If you want to save result to another vector, use div() instead.\n * !#zh 向量除法。如果你想结果保存到另一个向量,可使用 div() 代替。\n * @method divSelf\n * @param {number} num\n * @return {Vec2} returns this\n * @chainable\n * @example\n * var v = cc.v2(10, 10);\n * v.divSelf(5); // return Vec2 {x: 2, y: 2};\n */\n divSelf = Vec2.prototype.divide;\n /**\n * !#en Divides by a number, and returns the new result.\n * !#zh 向量除法,并返回新的结果。\n * @method div\n * @param {number} num\n * @param {Vec2} [out] - optional, the receiving vector, you can pass the same vec2 to save result to itself, if not provided, a new vec2 will be created\n * @return {Vec2} the result\n * @example\n * var v = cc.v2(10, 10);\n * v.div(5); // return Vec2 {x: 2, y: 2};\n * var v1 = new Vec2;\n * v.div(5, v1); // return Vec2 {x: 2, y: 2};\n */\n div (num: number, out?: Vec2): Vec2 {\n return Vec2.multiplyScalar(out || new Vec2(), this, 1/num);\n }\n /**\n * !#en Multiplies two vectors.\n * !#zh 分量相乘。\n * @method scaleSelf\n * @param {Vec2} vector\n * @return {Vec2} returns this\n * @chainable\n * @example\n * var v = cc.v2(10, 10);\n * v.scaleSelf(cc.v2(5, 5));// return Vec2 {x: 50, y: 50};\n */\n scaleSelf = Vec2.prototype.multiply;\n /**\n * !#en Multiplies two vectors, and returns the new result.\n * !#zh 分量相乘,并返回新的结果。\n * @method scale\n * @param {Vec2} vector\n * @param {Vec2} [out] - optional, the receiving vector, you can pass the same vec2 to save result to itself, if not provided, a new vec2 will be created\n * @return {Vec2} the result\n * @example\n * var v = cc.v2(10, 10);\n * v.scale(cc.v2(5, 5)); // return Vec2 {x: 50, y: 50};\n * var v1 = new Vec2;\n * v.scale(cc.v2(5, 5), v1); // return Vec2 {x: 50, y: 50};\n */\n scale (vector: Vec2, out?: Vec2): Vec2 {\n return Vec2.multiply(out || new Vec2(), this, vector);\n }\n /**\n * !#en Negates the components. If you want to save result to another vector, use neg() instead.\n * !#zh 向量取反。如果你想结果保存到另一个向量,可使用 neg() 代替。\n * @method negSelf\n * @return {Vec2} returns this\n * @chainable\n * @example\n * var v = cc.v2(10, 10);\n * v.negSelf(); // return Vec2 {x: -10, y: -10};\n */\n negSelf = Vec2.prototype.negate;\n /**\n * !#en Negates the components, and returns the new result.\n * !#zh 返回取反后的新向量。\n * @method neg\n * @param {Vec2} [out] - optional, the receiving vector, you can pass the same vec2 to save result to itself, if not provided, a new vec2 will be created\n * @return {Vec2} the result\n * @example\n * var v = cc.v2(10, 10);\n * var v1 = new Vec2;\n * v.neg(v1); // return Vec2 {x: -10, y: -10};\n */\n neg (out?: Vec2): Vec2 {\n return Vec2.negate(out || new Vec2(), this);\n }\n\n /**\n * !#en return a Vec2 object with x = 1 and y = 1.\n * !#zh 新 Vec2 对象。\n * @property ONE\n * @type Vec2\n * @static\n */\n static get ONE () { return new Vec2(1, 1) };\n static readonly ONE_R = Vec2.ONE;\n\n /**\n * !#en return a Vec2 object with x = 0 and y = 0.\n * !#zh 返回 x = 0 和 y = 0 的 Vec2 对象。\n * @property {Vec2} ZERO\n * @static\n */\n static get ZERO () { return new Vec2(0, 0) };\n /**\n * !#en return a readonly Vec2 object with x = 0 and y = 0.\n * !#zh 返回一个 x = 0 和 y = 0 的 Vec2 只读对象。\n * @property {Vec2} ZERO_R\n * @readonly\n * @static\n */\n static readonly ZERO_R = Vec2.ZERO;\n\n /**\n * !#en return a Vec2 object with x = 0 and y = 1.\n * !#zh 返回 x = 0 和 y = 1 的 Vec2 对象。\n * @property {Vec2} UP\n * @static\n */\n static get UP () { return new Vec2(0, 1) };\n /**\n * !#en return a readonly Vec2 object with x = 0 and y = 1.\n * !#zh 返回 x = 0 和 y = 1 的 Vec2 只读对象。\n * @property {Vec2} UP_R\n * @static\n * @readonly\n */\n static readonly UP_R = Vec2.UP;\n\n /**\n * !#en return a readonly Vec2 object with x = 1 and y = 0.\n * !#zh 返回 x = 1 和 y = 0 的 Vec2 只读对象。\n * @property {Vec2} RIGHT\n * @static\n */\n static get RIGHT () { return new Vec2(1, 0) };\n /**\n * !#en return a Vec2 object with x = 1 and y = 0.\n * !#zh 返回 x = 1 和 y = 0 的 Vec2 对象。\n * @property {Vec2} RIGHT_R\n * @static\n * @readonly\n */\n static readonly RIGHT_R = Vec2.RIGHT;\n\n /**\n * !#zh 获得指定向量的拷贝\n * @method clone\n * @typescript\n * clone <Out extends IVec2Like> (a: Out): Vec2\n * @static\n */\n static clone <Out extends IVec2Like> (a: Out) {\n return new Vec2(a.x, a.y);\n }\n\n /**\n * !#zh 复制指定向量的值\n * @method copy\n * @typescript\n * copy <Out extends IVec2Like> (out: Out, a: Out): Out\n * @static\n */\n static copy <Out extends IVec2Like> (out: Out, a: Out) {\n out.x = a.x;\n out.y = a.y;\n return out;\n }\n\n /**\n * !#zh 设置向量值\n * @method set\n * @typescript\n * set <Out extends IVec2Like> (out: Out, x: number, y: number): Out\n * @static\n */\n static set <Out extends IVec2Like> (out: Out, x: number, y: number) {\n out.x = x;\n out.y = y;\n return out;\n }\n\n /**\n * !#zh 逐元素向量加法\n * @method add\n * @typescript\n * add <Out extends IVec2Like> (out: Out, a: Out, b: Out): Out\n * @static\n */\n static add <Out extends IVec2Like> (out: Out, a: Out, b: Out) {\n out.x = a.x + b.x;\n out.y = a.y + b.y;\n return out;\n }\n\n /**\n * !#zh 逐元素向量减法\n * @method subtract\n * @typescript\n * subtract <Out extends IVec2Like> (out: Out, a: Out, b: Out): Out\n * @static\n */\n static subtract <Out extends IVec2Like> (out: Out, a: Out, b: Out) {\n out.x = a.x - b.x;\n out.y = a.y - b.y;\n return out;\n }\n\n /**\n * !#zh 逐元素向量乘法\n * @method multiply\n * @typescript\n * multiply <Out extends IVec2Like> (out: Out, a: Out, b: Out): Out\n * @static\n */\n static multiply <Out extends IVec2Like> (out: Out, a: Out, b: Out) {\n out.x = a.x * b.x;\n out.y = a.y * b.y;\n return out;\n }\n\n /**\n * !#zh 逐元素向量除法\n * @method divide\n * @typescript\n * divide <Out extends IVec2Like> (out: Out, a: Out, b: Out): Out\n * @static\n */\n static divide <Out extends IVec2Like> (out: Out, a: Out, b: Out) {\n out.x = a.x / b.x;\n out.y = a.y / b.y;\n return out;\n }\n\n /**\n * !#zh 逐元素向量向上取整\n * @method ceil\n * @typescript\n * ceil <Out extends IVec2Like> (out: Out, a: Out): Out\n * @static\n */\n static ceil <Out extends IVec2Like> (out: Out, a: Out) {\n out.x = Math.ceil(a.x);\n out.y = Math.ceil(a.y);\n return out;\n }\n\n /**\n * !#zh 逐元素向量向下取整\n * @method floor\n * @typescript\n * floor <Out extends IVec2Like> (out: Out, a: Out): Out\n * @static\n */\n static floor <Out extends IVec2Like> (out: Out, a: Out) {\n out.x = Math.floor(a.x);\n out.y = Math.floor(a.y);\n return out;\n }\n\n /**\n * !#zh 逐元素向量最小值\n * @method min\n * @typescript\n * min <Out extends IVec2Like> (out: Out, a: Out, b: Out): Out\n * @static\n */\n static min <Out extends IVec2Like> (out: Out, a: Out, b: Out) {\n out.x = Math.min(a.x, b.x);\n out.y = Math.min(a.y, b.y);\n return out;\n }\n\n\n /**\n * !#zh 逐元素向量最大值\n * @method max\n * @typescript\n * max <Out extends IVec2Like> (out: Out, a: Out, b: Out): Out\n * @static\n */\n static max <Out extends IVec2Like> (out: Out, a: Out, b: Out) {\n out.x = Math.max(a.x, b.x);\n out.y = Math.max(a.y, b.y);\n return out;\n }\n\n /**\n * !#zh 逐元素向量四舍五入取整\n * @method round\n * @typescript\n * round <Out extends IVec2Like> (out: Out, a: Out): Out\n * @static\n */\n static round <Out extends IVec2Like> (out: Out, a: Out) {\n out.x = Math.round(a.x);\n out.y = Math.round(a.y);\n return out;\n }\n\n /**\n * !#zh 向量标量乘法\n * @method multiplyScalar\n * @typescript\n * multiplyScalar <Out extends IVec2Like> (out: Out, a: Out, b: number): Out\n * @static\n */\n static multiplyScalar <Out extends IVec2Like> (out: Out, a: Out, b: number) {\n out.x = a.x * b;\n out.y = a.y * b;\n return out;\n }\n\n /**\n * !#zh 逐元素向量乘加: A + B * scale\n * @method scaleAndAdd\n * @typescript\n * scaleAndAdd <Out extends IVec2Like> (out: Out, a: Out, b: Out, scale: number): Out\n * @static\n */\n static scaleAndAdd <Out extends IVec2Like> (out: Out, a: Out, b: Out, scale: number) {\n out.x = a.x + (b.x * scale);\n out.y = a.y + (b.y * scale);\n return out;\n }\n\n /**\n * !#zh 求两向量的欧氏距离\n * @method distance\n * @typescript\n * distance <Out extends IVec2Like> (a: Out, b: Out): number\n * @static\n */\n static distance <Out extends IVec2Like> (a: Out, b: Out) {\n _x = b.x - a.x;\n _y = b.y - a.y;\n return Math.sqrt(_x * _x + _y * _y);\n }\n\n /**\n * !#zh 求两向量的欧氏距离平方\n * @method squaredDistance\n * @typescript\n * squaredDistance <Out extends IVec2Like> (a: Out, b: Out): number\n * @static\n */\n static squaredDistance <Out extends IVec2Like> (a: Out, b: Out) {\n _x = b.x - a.x;\n _y = b.y - a.y;\n return _x * _x + _y * _y;\n }\n\n /**\n * !#zh 求向量长度\n * @method len\n * @typescript\n * len <Out extends IVec2Like> (a: Out): number\n * @static\n */\n static len <Out extends IVec2Like> (a: Out) {\n _x = a.x;\n _y = a.y;\n return Math.sqrt(_x * _x + _y * _y);\n }\n\n /**\n * !#zh 求向量长度平方\n * @method lengthSqr\n * @typescript\n * lengthSqr <Out extends IVec2Like> (a: Out): number\n * @static\n */\n static lengthSqr <Out extends IVec2Like> (a: Out) {\n _x = a.x;\n _y = a.y;\n return _x * _x + _y * _y;\n }\n\n /**\n * !#zh 逐元素向量取负\n * @method negate\n * @typescript\n * negate <Out extends IVec2Like> (out: Out, a: Out): Out\n * @static\n */\n static negate <Out extends IVec2Like> (out: Out, a: Out) {\n out.x = -a.x;\n out.y = -a.y;\n return out;\n }\n\n /**\n * !#zh 逐元素向量取倒数,接近 0 时返回 Infinity\n * @method inverse\n * @typescript\n * inverse <Out extends IVec2Like> (out: Out, a: Out): Out\n * @static\n */\n static inverse <Out extends IVec2Like> (out: Out, a: Out) {\n out.x = 1.0 / a.x;\n out.y = 1.0 / a.y;\n return out;\n }\n\n /**\n * !#zh 逐元素向量取倒数,接近 0 时返回 0\n * @method inverseSafe\n * @typescript\n * inverseSafe <Out extends IVec2Like> (out: Out, a: Out): Out\n * @static\n */\n static inverseSafe <Out extends IVec2Like> (out: Out, a: Out) {\n _x = a.x;\n _y = a.y;\n\n if (Math.abs(_x) < EPSILON) {\n out.x = 0;\n } else {\n out.x = 1.0 / _x;\n }\n\n if (Math.abs(_y) < EPSILON) {\n out.y = 0;\n } else {\n out.y = 1.0 / _y;\n }\n\n return out;\n }\n\n /**\n * !#zh 归一化向量\n * @method normalize\n * @typescript\n * normalize <Out extends IVec2Like, Vec2Like extends IVec2Like> (out: Out, a: Vec2Like): Out\n * @static\n */\n static normalize <Out extends IVec2Like, Vec2Like extends IVec2Like> (out: Out, a: Vec2Like) {\n _x = a.x;\n _y = a.y;\n let len = _x * _x + _y * _y;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n out.x = _x * len;\n out.y = _y * len;\n }\n return out;\n }\n\n /**\n * !#zh 向量点积(数量积)\n * @method dot\n * @typescript\n * dot <Out extends IVec2Like> (a: Out, b: Out): number\n * @static\n */\n static dot <Out extends IVec2Like> (a: Out, b: Out) {\n return a.x * b.x + a.y * b.y;\n }\n\n /**\n * !#zh 向量叉积(向量积),注意二维向量的叉积为与 Z 轴平行的三维向量\n * @method cross\n * @typescript\n * cross <Out extends IVec2Like> (out: Vec2, a: Out, b: Out): Vec2\n * @static\n */\n static cross <Out extends IVec2Like> (out: Vec2, a: Out, b: Out) {\n out.x = out.y = 0;\n out.z = a.x * b.y - a.y * b.x;\n return out;\n }\n\n /**\n * !#zh 逐元素向量线性插值: A + t * (B - A)\n * @method lerp\n * @typescript\n * lerp <Out extends IVec2Like> (out: Out, a: Out, b: Out, t: number): Out\n * @static\n */\n static lerp <Out extends IVec2Like> (out: Out, a: Out, b: Out, t: number) {\n _x = a.x;\n _y = a.y;\n out.x = _x + t * (b.x - _x);\n out.y = _y + t * (b.y - _y);\n return out;\n }\n\n /**\n * !#zh 生成一个在单位圆上均匀分布的随机向量\n * @method random\n * @typescript\n * random <Out extends IVec2Like> (out: Out, scale?: number): Out\n * @static\n */\n static random <Out extends IVec2Like> (out: Out, scale?: number) {\n scale = scale || 1.0;\n const r = random() * 2.0 * Math.PI;\n out.x = Math.cos(r) * scale;\n out.y = Math.sin(r) * scale;\n return out;\n }\n\n /**\n * !#zh 向量与三维矩阵乘法,默认向量第三位为 1。\n * @method transformMat3\n * @typescript\n * transformMat3 <Out extends IVec2Like, MatLike extends IMat3Like> (out: Out, a: Out, mat: IMat3Like): Out\n * @static\n */\n static transformMat3 <Out extends IVec2Like, MatLike extends IMat3Like> (out: Out, a: Out, mat: MatLike) {\n _x = a.x;\n _y = a.y;\n let m = mat.m;\n out.x = m[0] * _x + m[3] * _y + m[6];\n out.y = m[1] * _x + m[4] * _y + m[7];\n return out;\n }\n\n /**\n * !#zh 向量与四维矩阵乘法,默认向量第三位为 0第四位为 1。\n * @method transformMat4\n * @typescript\n * transformMat4 <Out extends IVec2Like, MatLike extends IMat4Like> (out: Out, a: Out, mat: MatLike): Out\n * @static\n */\n static transformMat4 <Out extends IVec2Like, MatLike extends IMat4Like> (out: Out, a: Out, mat: MatLike) {\n _x = a.x;\n _y = a.y;\n let m = mat.m;\n out.x = m[0] * _x + m[4] * _y + m[12];\n out.y = m[1] * _x + m[5] * _y + m[13];\n return out;\n }\n\n /**\n * !#zh 向量等价判断\n * @method strictEquals\n * @typescript\n * strictEquals <Out extends IVec2Like> (a: Out, b: Out): boolean\n * @static\n */\n static strictEquals <Out extends IVec2Like> (a: Out, b: Out) {\n return a.x === b.x && a.y === b.y;\n }\n\n /**\n * !#zh 排除浮点数误差的向量近似等价判断\n * @method equals\n * @typescript\n * equals <Out extends IVec2Like> (a: Out, b: Out, epsilon?: number): boolean\n * @static\n */\n static equals <Out extends IVec2Like> (a: Out, b: Out, epsilon = EPSILON) {\n return (\n Math.abs(a.x - b.x) <=\n epsilon * Math.max(1.0, Math.abs(a.x), Math.abs(b.x)) &&\n Math.abs(a.y - b.y) <=\n epsilon * Math.max(1.0, Math.abs(a.y), Math.abs(b.y))\n );\n }\n\n /**\n * !#zh 排除浮点数误差的向量近似等价判断\n * @method angle\n * @typescript\n * angle <Out extends IVec2Like> (a: Out, b: Out): number\n * @static\n */\n static angle <Out extends IVec2Like> (a: Out, b: Out) {\n Vec2.normalize(v2_1, a);\n Vec2.normalize(v2_2, b);\n const cosine = Vec2.dot(v2_1, v2_2);\n if (cosine > 1.0) {\n return 0;\n }\n if (cosine < -1.0) {\n return Math.PI;\n }\n return Math.acos(cosine);\n }\n\n /**\n * !#zh 向量转数组\n * @method toArray\n * @typescript\n * toArray <Out extends IWritableArrayLike<number>> (out: Out, v: IVec2Like, ofs?: number): Out\n * @static\n */\n static toArray <Out extends IWritableArrayLike<number>> (out: Out, v: IVec2Like, ofs = 0) {\n out[ofs + 0] = v.x;\n out[ofs + 1] = v.y;\n return out;\n }\n\n /**\n * !#zh 数组转向量\n * @method fromArray\n * @typescript\n * fromArray <Out extends IVec2Like> (out: Out, arr: IWritableArrayLike<number>, ofs?: number): Out\n * @static\n */\n static fromArray <Out extends IVec2Like> (out: Out, arr: IWritableArrayLike<number>, ofs = 0) {\n out.x = arr[ofs + 0];\n out.y = arr[ofs + 1];\n return out;\n }\n\n /**\n * @property {Number} x\n */\n x: number;\n\n /**\n * @property {Number} y\n */\n y: number;\n\n // compatible with vec3\n z: number = 0;\n\n /**\n * !#en\n * Constructor\n * see {{#crossLink \"cc/vec2:method\"}}cc.v2{{/crossLink}} or {{#crossLink \"cc/p:method\"}}cc.p{{/crossLink}}\n * !#zh\n * 构造函数,可查看 {{#crossLink \"cc/vec2:method\"}}cc.v2{{/crossLink}} 或者 {{#crossLink \"cc/p:method\"}}cc.p{{/crossLink}}\n * @method constructor\n * @param {Number} [x=0]\n * @param {Number} [y=0]\n */\n constructor (x: number | Vec2 = 0, y: number = 0) {\n super();\n\n if (x && typeof x === 'object') {\n this.x = x.x || 0;\n this.y = x.y || 0;\n } else {\n this.x = x as number || 0;\n this.y = y || 0;\n }\n }\n\n /**\n * !#en clone a Vec2 object\n * !#zh 克隆一个 Vec2 对象\n * @method clone\n * @return {Vec2}\n */\n clone (): Vec2 {\n return new Vec2(this.x, this.y);\n }\n\n /**\n * !#en Sets vector with another's value\n * !#zh 设置向量值。\n * @method set\n * @param {Vec2} newValue - !#en new value to set. !#zh 要设置的新值\n * @return {Vec2} returns this\n * @chainable\n */\n set (newValue: Vec2): this {\n this.x = newValue.x;\n this.y = newValue.y;\n return this;\n }\n\n /**\n * !#en Check whether two vector equal\n * !#zh 当前的向量是否与指定的向量相等。\n * @method equals\n * @param {Vec2} other\n * @return {Boolean}\n */\n equals (other: Vec2): boolean {\n return other && this.x === other.x && this.y === other.y;\n }\n\n /**\n * !#en Check whether two vector equal with some degree of variance.\n * !#zh\n * 近似判断两个点是否相等。<br/>\n * 判断 2 个向量是否在指定数值的范围之内,如果在则返回 true反之则返回 false。\n * @method fuzzyEquals\n * @param {Vec2} other\n * @param {Number} variance\n * @return {Boolean}\n */\n fuzzyEquals (other: Vec2, variance): boolean {\n if (this.x - variance <= other.x && other.x <= this.x + variance) {\n if (this.y - variance <= other.y && other.y <= this.y + variance)\n return true;\n }\n return false;\n }\n\n /**\n * !#en Transform to string with vector informations\n * !#zh 转换为方便阅读的字符串。\n * @method toString\n * @return {string}\n */\n toString (): string {\n return \"(\" +\n this.x.toFixed(2) + \", \" +\n this.y.toFixed(2) + \")\"\n ;\n }\n\n /**\n * !#en Calculate linear interpolation result between this vector and another one with given ratio\n * !#zh 线性插值。\n * @method lerp\n * @param {Vec2} to\n * @param {Number} ratio - the interpolation coefficient\n * @param {Vec2} [out] - optional, the receiving vector, you can pass the same vec2 to save result to itself, if not provided, a new vec2 will be created\n * @return {Vec2}\n */\n lerp (to: Vec2, ratio: number, out?: Vec2): Vec2 {\n out = out || new Vec2();\n var x = this.x;\n var y = this.y;\n out.x = x + (to.x - x) * ratio;\n out.y = y + (to.y - y) * ratio;\n return out;\n }\n\n /**\n * !#en Clamp the vector between from float and to float.\n * !#zh\n * 返回指定限制区域后的向量。<br/>\n * 向量大于 max_inclusive 则返回 max_inclusive。<br/>\n * 向量小于 min_inclusive 则返回 min_inclusive。<br/>\n * 否则返回自身。\n * @method clampf\n * @param {Vec2} min_inclusive\n * @param {Vec2} max_inclusive\n * @return {Vec2}\n * @example\n * var min_inclusive = cc.v2(0, 0);\n * var max_inclusive = cc.v2(20, 20);\n * var v1 = cc.v2(20, 20).clampf(min_inclusive, max_inclusive); // Vec2 {x: 20, y: 20};\n * var v2 = cc.v2(0, 0).clampf(min_inclusive, max_inclusive); // Vec2 {x: 0, y: 0};\n * var v3 = cc.v2(10, 10).clampf(min_inclusive, max_inclusive); // Vec2 {x: 10, y: 10};\n */\n clampf (min_inclusive: Vec2, max_inclusive: Vec2): this {\n this.x = misc.clampf(this.x, min_inclusive.x, max_inclusive.x);\n this.y = misc.clampf(this.y, min_inclusive.y, max_inclusive.y);\n return this;\n }\n\n /**\n * !#en Adds this vector.\n * !#zh 向量加法。\n * @method add\n * @param {Vec2} vector\n * @param {Vec2} [out]\n * @return {Vec2} returns this\n * @chainable\n * @example\n * var v = cc.v2(10, 10);\n * v.add(cc.v2(5, 5));// return Vec2 {x: 15, y: 15};\n */\n add (vector: Vec2, out?: Vec2): Vec2 {\n out = out || new Vec2();\n out.x = this.x + vector.x;\n out.y = this.y + vector.y;\n return out;\n }\n\n /**\n * !#en Adds this vector. If you want to save result to another vector, use add() instead.\n * !#zh 向量加法。如果你想保存结果到另一个向量,使用 add() 代替。\n * @method addSelf\n * @param {Vec2} vector\n * @return {Vec2} returns this\n * @chainable\n */\n addSelf (vector: Vec2): this {\n this.x += vector.x;\n this.y += vector.y;\n return this;\n }\n\n /**\n * !#en Subtracts one vector from this.\n * !#zh 向量减法。\n * @method subtract\n * @param {Vec2} vector\n * @return {Vec2} returns this\n * @chainable\n * @example\n * var v = cc.v2(10, 10);\n * v.subSelf(cc.v2(5, 5));// return Vec2 {x: 5, y: 5};\n */\n subtract (vector: Vec2): this {\n this.x -= vector.x;\n this.y -= vector.y;\n return this;\n }\n\n /**\n * !#en Multiplies this by a number.\n * !#zh 缩放当前向量。\n * @method multiplyScalar\n * @param {number} num\n * @return {Vec2} returns this\n * @chainable\n * @example\n * var v = cc.v2(10, 10);\n * v.multiply(5);// return Vec2 {x: 50, y: 50};\n */\n multiplyScalar (num: number): this {\n this.x *= num;\n this.y *= num;\n return this;\n }\n\n /**\n * !#en Multiplies two vectors.\n * !#zh 分量相乘。\n * @method multiply\n * @param {Vec2} vector\n * @return {Vec2} returns this\n * @chainable\n * @example\n * var v = cc.v2(10, 10);\n * v.multiply(cc.v2(5, 5));// return Vec2 {x: 50, y: 50};\n */\n multiply (vector: Vec2): this {\n this.x *= vector.x;\n this.y *= vector.y;\n return this;\n }\n\n /**\n * !#en Divides by a number.\n * !#zh 向量除法。\n * @method divide\n * @param {number} num\n * @return {Vec2} returns this\n * @chainable\n * @example\n * var v = cc.v2(10, 10);\n * v.divide(5); // return Vec2 {x: 2, y: 2};\n */\n divide (num: number): this {\n this.x /= num;\n this.y /= num;\n return this;\n }\n\n /**\n * !#en Negates the components.\n * !#zh 向量取反。\n * @method negate\n * @return {Vec2} returns this\n * @chainable\n * @example\n * var v = cc.v2(10, 10);\n * v.negate(); // return Vec2 {x: -10, y: -10};\n */\n negate (): this {\n this.x = -this.x;\n this.y = -this.y;\n return this;\n }\n\n /**\n * !#en Dot product\n * !#zh 当前向量与指定向量进行点乘。\n * @method dot\n * @param {Vec2} [vector]\n * @return {number} the result\n * @example\n * var v = cc.v2(10, 10);\n * v.dot(cc.v2(5, 5)); // return 100;\n */\n dot (vector: Vec2): number {\n return this.x * vector.x + this.y * vector.y;\n }\n\n /**\n * !#en Cross product\n * !#zh 当前向量与指定向量进行叉乘。\n * @method cross\n * @param {Vec2} [vector]\n * @return {number} the result\n * @example\n * var v = cc.v2(10, 10);\n * v.cross(cc.v2(5, 5)); // return 0;\n */\n cross (vector: Vec2): number {\n return this.x * vector.y - this.y * vector.x;\n }\n\n /**\n * !#en Returns the length of this vector.\n * !#zh 返回该向量的长度。\n * @method len\n * @return {number} the result\n * @example\n * var v = cc.v2(10, 10);\n * v.len(); // return 14.142135623730951;\n */\n len (): number {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n }\n\n /**\n * !#en Returns the squared length of this vector.\n * !#zh 返回该向量的长度平方。\n * @method lengthSqr\n * @return {number} the result\n * @example\n * var v = cc.v2(10, 10);\n * v.lengthSqr(); // return 200;\n */\n lengthSqr (): number {\n return this.x * this.x + this.y * this.y;\n }\n\n /**\n * !#en Make the length of this vector to 1.\n * !#zh 向量归一化,让这个向量的长度为 1。\n * @method normalizeSelf\n * @return {Vec2} returns this\n * @chainable\n * @example\n * var v = cc.v2(10, 10);\n * v.normalizeSelf(); // return Vec2 {x: 0.7071067811865475, y: 0.7071067811865475};\n */\n normalizeSelf (): Vec2 {\n var magSqr = this.x * this.x + this.y * this.y;\n if (magSqr === 1.0)\n return this;\n\n if (magSqr === 0.0) {\n return this;\n }\n\n var invsqrt = 1.0 / Math.sqrt(magSqr);\n this.x *= invsqrt;\n this.y *= invsqrt;\n\n return this;\n }\n\n /**\n * !#en\n * Returns this vector with a magnitude of 1.<br/>\n * <br/>\n * Note that the current vector is unchanged and a new normalized vector is returned. If you want to normalize the current vector, use normalizeSelf function.\n * !#zh\n * 返回归一化后的向量。<br/>\n * <br/>\n * 注意,当前向量不变,并返回一个新的归一化向量。如果你想来归一化当前向量,可使用 normalizeSelf 函数。\n * @method normalize\n * @param {Vec2} [out] - optional, the receiving vector, you can pass the same vec2 to save result to itself, if not provided, a new vec2 will be created\n * @return {Vec2} result\n * var v = cc.v2(10, 10);\n * v.normalize(); // return Vec2 {x: 0.7071067811865475, y: 0.7071067811865475};\n */\n normalize (out?: Vec2): Vec2 {\n out = out || new Vec2();\n out.x = this.x;\n out.y = this.y;\n out.normalizeSelf();\n return out;\n }\n\n /**\n * !#en Get angle in radian between this and vector.\n * !#zh 夹角的弧度。\n * @method angle\n * @param {Vec2} vector\n * @return {number} from 0 to Math.PI\n */\n angle (vector: Vec2): number {\n var magSqr1 = this.magSqr();\n var magSqr2 = vector.magSqr();\n\n if (magSqr1 === 0 || magSqr2 === 0) {\n console.warn(\"Can't get angle between zero vector\");\n return 0.0;\n }\n\n var dot = this.dot(vector);\n var theta = dot / (Math.sqrt(magSqr1 * magSqr2));\n theta = misc.clampf(theta, -1.0, 1.0);\n return Math.acos(theta);\n }\n\n /**\n * !#en Get angle in radian between this and vector with direction.\n * !#zh 带方向的夹角的弧度。\n * @method signAngle\n * @param {Vec2} vector\n * @return {number} from -MathPI to Math.PI\n */\n signAngle (vector: Vec2): number {\n let angle = this.angle(vector);\n return this.cross(vector) < 0 ? -angle : angle;\n }\n\n /**\n * !#en rotate\n * !#zh 返回旋转给定弧度后的新向量。\n * @method rotate\n * @param {number} radians\n * @param {Vec2} [out] - optional, the receiving vector, you can pass the same vec2 to save result to itself, if not provided, a new vec2 will be created\n * @return {Vec2} the result\n */\n rotate (radians: number, out?: Vec2): Vec2 {\n out = out || new Vec2();\n out.x = this.x;\n out.y = this.y;\n return out.rotateSelf(radians);\n }\n\n /**\n * !#en rotate self\n * !#zh 按指定弧度旋转向量。\n * @method rotateSelf\n * @param {number} radians\n * @return {Vec2} returns this\n * @chainable\n */\n rotateSelf (radians: number): Vec2 {\n var sin = Math.sin(radians);\n var cos = Math.cos(radians);\n var x = this.x;\n this.x = cos * x - sin * this.y;\n this.y = sin * x + cos * this.y;\n return this;\n }\n\n /**\n * !#en Calculates the projection of the current vector over the given vector.\n * !#zh 返回当前向量在指定 vector 向量上的投影向量。\n * @method project\n * @param {Vec2} vector\n * @return {Vec2}\n * @example\n * var v1 = cc.v2(20, 20);\n * var v2 = cc.v2(5, 5);\n * v1.project(v2); // Vec2 {x: 20, y: 20};\n */\n project (vector: Vec2): Vec2 {\n return vector.multiplyScalar(this.dot(vector) / vector.dot(vector));\n }\n\n /**\n * Transforms the vec2 with a mat4. 3rd vector component is implicitly '0', 4th vector component is implicitly '1'\n * @method transformMat4\n * @param {Mat4} m matrix to transform with\n * @param {Vec2} [out] the receiving vector, you can pass the same vec2 to save result to itself, if not provided, a new vec2 will be created\n * @returns {Vec2} out\n */\n transformMat4 (m: Mat4, out?: Vec2): Vec2 {\n out = out || new Vec2();\n Vec2.transformMat4(out, this, m);\n return out;\n }\n\n /**\n * Returns the maximum value in x, y.\n * @method maxAxis\n * @returns {number}\n */\n maxAxis (): number {\n return Math.max(this.x, this.y);\n }\n}\n\nconst v2_1 = new Vec2();\nconst v2_2 = new Vec2();\n\nCCClass.fastDefine('cc.Vec2', Vec2, { x: 0, y: 0 });\n\n\n\n/**\n * @module cc\n */\n\n\n/**\n * !#en The convenience method to create a new {{#crossLink \"Vec2\"}}cc.Vec2{{/crossLink}}.\n * !#zh 通过该简便的函数进行创建 {{#crossLink \"Vec2\"}}cc.Vec2{{/crossLink}} 对象。\n * @method v2\n * @param {Number|Object} [x=0]\n * @param {Number} [y=0]\n * @return {Vec2}\n * @example\n * var v1 = cc.v2();\n * var v2 = cc.v2(0, 0);\n * var v3 = cc.v2(v2);\n * var v4 = cc.v2({x: 100, y: 100});\n */\ncc.v2 = function v2 (x, y) {\n return new Vec2(x, y);\n};\n\ncc.Vec2 = Vec2;\n","/****************************************************************************\n Copyright (c) 2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport ValueType from './value-type';\nimport CCClass from '../platform/CCClass';\nimport misc from '../utils/misc';\nimport Vec2 from './vec2';\nimport Mat4 from './mat4';\nimport { EPSILON, random } from './utils';\n\nlet _x: number = 0.0;\nlet _y: number = 0.0;\nlet _z: number = 0.0;\n\n/**\n * !#en Representation of 3D vectors and points.\n * !#zh 表示 3D 向量和坐标\n *\n * @class Vec3\n * @extends ValueType\n */\n\nexport default class Vec3 extends ValueType {\n // deprecated\n static sub = Vec3.subtract;\n static mul = Vec3.multiply;\n static scale = Vec3.multiplyScalar;\n static mag = Vec3.len;\n static squaredMagnitude = Vec3.lengthSqr;\n static div = Vec3.divide;\n\n /**\n * !#en Returns the length of this vector.\n * !#zh 返回该向量的长度。\n * @method mag\n * @return {number} the result\n * @example\n * var v = cc.v3(10, 10, 10);\n * v.mag(); // return 17.320508075688775;\n */\n mag = Vec3.prototype.len;\n /**\n * !#en Returns the squared length of this vector.\n * !#zh 返回该向量的长度平方。\n * @method magSqr\n * @return {number} the result\n */\n magSqr = Vec3.prototype.lengthSqr;\n /**\n * !#en Subtracts one vector from this. If you want to save result to another vector, use sub() instead.\n * !#zh 向量减法。如果你想保存结果到另一个向量,可使用 sub() 代替。\n * @method subSelf\n * @param {Vec3} vector\n * @return {Vec3} returns this\n * @chainable\n */\n subSelf = Vec3.prototype.subtract;\n /**\n * !#en Subtracts one vector from this, and returns the new result.\n * !#zh 向量减法,并返回新结果。\n * @method sub\n * @param {Vec3} vector\n * @param {Vec3} [out] - optional, the receiving vector, you can pass the same vec3 to save result to itself, if not provided, a new vec3 will be created\n * @return {Vec3} the result\n */\n sub (vector: Vec3, out?: Vec3) {\n return Vec3.subtract(out || new Vec3(), this, vector);\n }\n /**\n * !#en Multiplies this by a number. If you want to save result to another vector, use mul() instead.\n * !#zh 缩放当前向量。如果你想结果保存到另一个向量,可使用 mul() 代替。\n * @method mulSelf\n * @param {number} num\n * @return {Vec3} returns this\n * @chainable\n */\n mulSelf = Vec3.prototype.multiplyScalar;\n /**\n * !#en Multiplies by a number, and returns the new result.\n * !#zh 缩放向量,并返回新结果。\n * @method mul\n * @param {number} num\n * @param {Vec3} [out] - optional, the receiving vector, you can pass the same vec3 to save result to itself, if not provided, a new vec3 will be created\n * @return {Vec3} the result\n */\n mul (num: number, out?: Vec3) {\n return Vec3.multiplyScalar(out || new Vec3(), this, num);\n }\n /**\n * !#en Divides by a number. If you want to save result to another vector, use div() instead.\n * !#zh 向量除法。如果你想结果保存到另一个向量,可使用 div() 代替。\n * @method divSelf\n * @param {number} num\n * @return {Vec3} returns this\n * @chainable\n */\n divSelf = Vec3.prototype.divide;\n /**\n * !#en Divides by a number, and returns the new result.\n * !#zh 向量除法,并返回新的结果。\n * @method div\n * @param {number} num\n * @param {Vec3} [out] - optional, the receiving vector, you can pass the same vec3 to save result to itself, if not provided, a new vec3 will be created\n * @return {Vec3} the result\n */\n div (num: number, out?: Vec3): Vec3 {\n return Vec3.multiplyScalar(out || new Vec3(), this, 1/num);\n }\n /**\n * !#en Multiplies two vectors.\n * !#zh 分量相乘。\n * @method scaleSelf\n * @param {Vec3} vector\n * @return {Vec3} returns this\n * @chainable\n */\n scaleSelf = Vec3.prototype.multiply;\n /**\n * !#en Multiplies two vectors, and returns the new result.\n * !#zh 分量相乘,并返回新的结果。\n * @method scale\n * @param {Vec3} vector\n * @param {Vec3} [out] - optional, the receiving vector, you can pass the same vec3 to save result to itself, if not provided, a new vec3 will be created\n * @return {Vec3} the result\n */\n scale (vector: Vec3, out?: Vec3) {\n return Vec3.multiply(out || new Vec3(), this, vector);\n }\n /**\n * !#en Negates the components. If you want to save result to another vector, use neg() instead.\n * !#zh 向量取反。如果你想结果保存到另一个向量,可使用 neg() 代替。\n * @method negSelf\n * @return {Vec3} returns this\n * @chainable\n */\n negSelf = Vec3.prototype.negate;\n /**\n * !#en Negates the components, and returns the new result.\n * !#zh 返回取反后的新向量。\n * @method neg\n * @param {Vec3} [out] - optional, the receiving vector, you can pass the same vec3 to save result to itself, if not provided, a new vec3 will be created\n * @return {Vec3} the result\n */\n neg (out?: Vec3) {\n return Vec3.negate(out || new Vec3(), this);\n }\n\n /**\n * !#en return a Vec3 object with x = 1, y = 1, z = 1.\n * !#zh 新 Vec3 对象。\n * @property ONE\n * @type Vec3\n * @static\n */\n static get ONE () { return new Vec3(1, 1, 1); }\n static readonly ONE_R = Vec3.ONE;\n\n /**\n * !#en return a Vec3 object with x = 0, y = 0, z = 0.\n * !#zh 返回 x = 0y = 0z = 0 的 Vec3 对象。\n * @property ZERO\n * @type Vec3\n * @static\n */\n static get ZERO () { return new Vec3(); }\n static readonly ZERO_R = Vec3.ZERO;\n\n /**\n * !#en return a Vec3 object with x = 0, y = 1, z = 0.\n * !#zh 返回 x = 0, y = 1, z = 0 的 Vec3 对象。\n * @property UP\n * @type Vec3\n * @static\n */\n static get UP () { return new Vec3(0, 1, 0); }\n static readonly UP_R = Vec3.UP;\n\n /**\n * !#en return a Vec3 object with x = 1, y = 0, z = 0.\n * !#zh 返回 x = 1y = 0z = 0 的 Vec3 对象。\n * @property RIGHT\n * @type Vec3\n * @static\n */\n static get RIGHT () { return new Vec3(1, 0, 0); }\n static readonly RIGHT_R = Vec3.RIGHT;\n\n /**\n * !#en return a Vec3 object with x = 0, y = 0, z = 1.\n * !#zh 返回 x = 0y = 0z = 1 的 Vec3 对象。\n * @property FORWARD\n * @type Vec3\n * @static\n */\n static get FORWARD () { return new Vec3(0, 0, 1); }\n static readonly FRONT_R = Vec3.FORWARD;\n\n\n /**\n * !#zh 将目标赋值为零向量\n * !#en The target of an assignment zero vector\n * @method zero\n * @typescript\n * zero<Out extends IVec3Like> (out: Out): Out\n * @static\n */\n static zero<Out extends IVec3Like> (out: Out) {\n out.x = 0;\n out.y = 0;\n out.z = 0;\n return out;\n }\n\n /**\n * !#zh 获得指定向量的拷贝\n * !#en Obtaining copy vectors designated\n * @method clone\n * @typescript\n * clone<Out extends IVec3Like> (a: Out): Vec3\n * @static\n */\n static clone<Out extends IVec3Like> (a: Out) {\n return new Vec3(a.x, a.y, a.z);\n }\n\n /**\n * !#zh 复制目标向量\n * !#en Copy the target vector\n * @method copy\n * @typescript\n * copy<Out extends IVec3Like, Vec3Like extends IVec3Like> (out: Out, a: Vec3Like): Out\n * @static\n */\n static copy<Out extends IVec3Like, Vec3Like extends IVec3Like> (out: Out, a: Vec3Like) {\n out.x = a.x;\n out.y = a.y;\n out.z = a.z;\n return out;\n }\n\n /**\n * !#zh 设置向量值\n * !#en Set to value\n * @method set\n * @typescript\n * set<Out extends IVec3Like> (out: Out, x: number, y: number, z: number): Out\n * @static\n */\n static set<Out extends IVec3Like> (out: Out, x: number, y: number, z: number) {\n out.x = x;\n out.y = y;\n out.z = z;\n return out;\n }\n\n /**\n * !#zh 逐元素向量加法\n * !#en Element-wise vector addition\n * @method add\n * @typescript\n * add<Out extends IVec3Like> (out: Out, a: Out, b: Out): Out\n * @static\n */\n static add<Out extends IVec3Like> (out: Out, a: Out, b: Out) {\n out.x = a.x + b.x;\n out.y = a.y + b.y;\n out.z = a.z + b.z;\n return out;\n }\n\n /**\n * !#zh 逐元素向量减法\n * !#en Element-wise vector subtraction\n * @method subtract\n * @typescript\n * subtract<Out extends IVec3Like> (out: Out, a: Out, b: Out): Out\n * @static\n */\n static subtract<Out extends IVec3Like> (out: Out, a: Out, b: Out) {\n out.x = a.x - b.x;\n out.y = a.y - b.y;\n out.z = a.z - b.z;\n return out;\n }\n\n /**\n * !#zh 逐元素向量乘法 (分量积)\n * !#en Element-wise vector multiplication (product component)\n * @method multiply\n * @typescript\n * multiply<Out extends IVec3Like, Vec3Like_1 extends IVec3Like, Vec3Like_2 extends IVec3Like> (out: Out, a: Vec3Like_1, b: Vec3Like_2): Out\n * @static\n */\n static multiply<Out extends IVec3Like, Vec3Like_1 extends IVec3Like, Vec3Like_2 extends IVec3Like> (out: Out, a: Vec3Like_1, b: Vec3Like_2) {\n out.x = a.x * b.x;\n out.y = a.y * b.y;\n out.z = a.z * b.z;\n return out;\n }\n\n /**\n * !#zh 逐元素向量除法\n * !#en Element-wise vector division\n * @method divide\n * @typescript\n * divide<Out extends IVec3Like> (out: Out, a: Out, b: Out): Out\n * @static\n */\n static divide<Out extends IVec3Like> (out: Out, a: Out, b: Out) {\n out.x = a.x / b.x;\n out.y = a.y / b.y;\n out.z = a.z / b.z;\n return out;\n }\n\n /**\n * !#zh 逐元素向量向上取整\n * !#en Rounding up by elements of the vector\n * @method ceil\n * @typescript\n * ceil<Out extends IVec3Like> (out: Out, a: Out): Out\n * @static\n */\n static ceil<Out extends IVec3Like> (out: Out, a: Out) {\n out.x = Math.ceil(a.x);\n out.y = Math.ceil(a.y);\n out.z = Math.ceil(a.z);\n return out;\n }\n\n /**\n * !#zh 逐元素向量向下取整\n * !#en Element vector by rounding down\n * @method floor\n * @typescript\n * floor<Out extends IVec3Like> (out: Out, a: Out): Out\n * @static\n */\n static floor<Out extends IVec3Like> (out: Out, a: Out) {\n out.x = Math.floor(a.x);\n out.y = Math.floor(a.y);\n out.z = Math.floor(a.z);\n return out;\n }\n\n /**\n * !#zh 逐元素向量最小值\n * !#en The minimum by-element vector\n * @method min\n * @typescript\n * min<Out extends IVec3Like> (out: Out, a: Out, b: Out): Out\n * @static\n */\n static min<Out extends IVec3Like> (out: Out, a: Out, b: Out) {\n out.x = Math.min(a.x, b.x);\n out.y = Math.min(a.y, b.y);\n out.z = Math.min(a.z, b.z);\n return out;\n }\n\n /**\n * !#zh 逐元素向量最大值\n * !#en The maximum value of the element-wise vector\n * @method max\n * @typescript\n * max<Out extends IVec3Like> (out: Out, a: Out, b: Out): Out\n * @static\n */\n static max<Out extends IVec3Like> (out: Out, a: Out, b: Out) {\n out.x = Math.max(a.x, b.x);\n out.y = Math.max(a.y, b.y);\n out.z = Math.max(a.z, b.z);\n return out;\n }\n\n /**\n * !#zh 逐元素向量四舍五入取整\n * !#en Element-wise vector of rounding to whole\n * @method round\n * @typescript\n * round<Out extends IVec3Like> (out: Out, a: Out): Out\n * @static\n */\n static round<Out extends IVec3Like> (out: Out, a: Out) {\n out.x = Math.round(a.x);\n out.y = Math.round(a.y);\n out.z = Math.round(a.z);\n return out;\n }\n\n /**\n * !#zh 向量标量乘法\n * !#en Vector scalar multiplication\n * @method multiplyScalar\n * @typescript\n * multiplyScalar<Out extends IVec3Like, Vec3Like extends IVec3Like> (out: Out, a: Vec3Like, b: number): Out\n * @static\n */\n static multiplyScalar<Out extends IVec3Like, Vec3Like extends IVec3Like> (out: Out, a: Vec3Like, b: number) {\n out.x = a.x * b;\n out.y = a.y * b;\n out.z = a.z * b;\n return out;\n }\n\n /**\n * !#zh 逐元素向量乘加: A + B * scale\n * !#en Element-wise vector multiply add: A + B * scale\n * @method scaleAndAdd\n * @typescript\n * scaleAndAdd<Out extends IVec3Like> (out: Out, a: Out, b: Out, scale: number): Out\n * @static\n */\n static scaleAndAdd<Out extends IVec3Like> (out: Out, a: Out, b: Out, scale: number) {\n out.x = a.x + b.x * scale;\n out.y = a.y + b.y * scale;\n out.z = a.z + b.z * scale;\n return out;\n }\n\n /**\n * !#zh 求两向量的欧氏距离\n * !#en Seeking two vectors Euclidean distance\n * @method distance\n * @typescript\n * distance<Out extends IVec3Like> (a: Out, b: Out): number\n * @static\n */\n static distance<Out extends IVec3Like> (a: Out, b: Out) {\n _x = b.x - a.x;\n _y = b.y - a.y;\n _z = b.z - a.z;\n return Math.sqrt(_x * _x + _y * _y + _z * _z);\n }\n\n /**\n * !#zh 求两向量的欧氏距离平方\n * !#en Euclidean distance squared seeking two vectors\n * @method squaredDistance\n * @typescript\n * squaredDistance<Out extends IVec3Like> (a: Out, b: Out): number\n * @static\n */\n static squaredDistance<Out extends IVec3Like> (a: Out, b: Out) {\n _x = b.x - a.x;\n _y = b.y - a.y;\n _z = b.z - a.z;\n return _x * _x + _y * _y + _z * _z;\n }\n\n /**\n * !#zh 求向量长度\n * !#en Seeking vector length\n * @method len\n * @typescript\n * len<Out extends IVec3Like> (a: Out): number\n * @static\n */\n static len<Out extends IVec3Like> (a: Out) {\n _x = a.x;\n _y = a.y;\n _z = a.z;\n return Math.sqrt(_x * _x + _y * _y + _z * _z);\n }\n\n /**\n * !#zh 求向量长度平方\n * !#en Seeking squared vector length\n * @method lengthSqr\n * @typescript\n * lengthSqr<Out extends IVec3Like> (a: Out): number\n * @static\n */\n static lengthSqr<Out extends IVec3Like> (a: Out) {\n _x = a.x;\n _y = a.y;\n _z = a.z;\n return _x * _x + _y * _y + _z * _z;\n }\n\n /**\n * !#zh 逐元素向量取负\n * !#en By taking the negative elements of the vector\n * @method negate\n * @typescript\n * negate<Out extends IVec3Like> (out: Out, a: Out): Out\n * @static\n */\n static negate<Out extends IVec3Like> (out: Out, a: Out) {\n out.x = -a.x;\n out.y = -a.y;\n out.z = -a.z;\n return out;\n }\n\n /**\n * !#zh 逐元素向量取倒数,接近 0 时返回 Infinity\n * !#en Element vector by taking the inverse, return near 0 Infinity\n * @method inverse\n * @typescript\n * inverse<Out extends IVec3Like> (out: Out, a: Out): Out\n * @static\n */\n static inverse<Out extends IVec3Like> (out: Out, a: Out) {\n out.x = 1.0 / a.x;\n out.y = 1.0 / a.y;\n out.z = 1.0 / a.z;\n return out;\n }\n\n /**\n * !#zh 逐元素向量取倒数,接近 0 时返回 0\n * !#en Element vector by taking the inverse, return near 0 0\n * @method inverseSafe\n * @typescript\n * inverseSafe<Out extends IVec3Like> (out: Out, a: Out): Out\n * @static\n */\n static inverseSafe<Out extends IVec3Like> (out: Out, a: Out) {\n _x = a.x;\n _y = a.y;\n _z = a.z;\n\n if (Math.abs(_x) < EPSILON) {\n out.x = 0;\n } else {\n out.x = 1.0 / _x;\n }\n\n if (Math.abs(_y) < EPSILON) {\n out.y = 0;\n } else {\n out.y = 1.0 / _y;\n }\n\n if (Math.abs(_z) < EPSILON) {\n out.z = 0;\n } else {\n out.z = 1.0 / _z;\n }\n\n return out;\n }\n\n /**\n * !#zh 归一化向量\n * !#en Normalized vector\n * @method normalize\n * @typescript\n * normalize<Out extends IVec3Like, Vec3Like extends IVec3Like> (out: Out, a: Vec3Like): Out\n * @static\n */\n static normalize<Out extends IVec3Like, Vec3Like extends IVec3Like> (out: Out, a: Vec3Like) {\n _x = a.x;\n _y = a.y;\n _z = a.z;\n\n let len = _x * _x + _y * _y + _z * _z;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n out.x = _x * len;\n out.y = _y * len;\n out.z = _z * len;\n }\n return out;\n }\n\n /**\n * !#zh 向量点积(数量积)\n * !#en Vector dot product (scalar product)\n * @method dot\n * @typescript\n * dot<Out extends IVec3Like> (a: Out, b: Out): number\n * @static\n */\n static dot<Out extends IVec3Like> (a: Out, b: Out) {\n return a.x * b.x + a.y * b.y + a.z * b.z;\n }\n\n /**\n * !#zh 向量叉积(向量积)\n * !#en Vector cross product (vector product)\n * @method cross\n * @typescript\n * cross<Out extends IVec3Like, Vec3Like_1 extends IVec3Like, Vec3Like_2 extends IVec3Like> (out: Out, a: Vec3Like_1, b: Vec3Like_2): Out\n * @static\n */\n static cross<Out extends IVec3Like, Vec3Like_1 extends IVec3Like, Vec3Like_2 extends IVec3Like> (out: Out, a: Vec3Like_1, b: Vec3Like_2) {\n const { x: ax, y: ay, z: az } = a;\n const { x: bx, y: by, z: bz } = b;\n out.x = ay * bz - az * by;\n out.y = az * bx - ax * bz;\n out.z = ax * by - ay * bx;\n return out;\n }\n\n /**\n * !#zh 逐元素向量线性插值: A + t * (B - A)\n * !#en Vector element by element linear interpolation: A + t * (B - A)\n * @method lerp\n * @typescript\n * lerp<Out extends IVec3Like> (out: Out, a: Out, b: Out, t: number): Out\n * @static\n */\n static lerp<Out extends IVec3Like> (out: Out, a: Out, b: Out, t: number) {\n out.x = a.x + t * (b.x - a.x);\n out.y = a.y + t * (b.y - a.y);\n out.z = a.z + t * (b.z - a.z);\n return out;\n }\n\n /**\n * !#zh 生成一个在单位球体上均匀分布的随机向量\n * !#en Generates a uniformly distributed random vectors on the unit sphere\n * @method random\n * @typescript\n * random<Out extends IVec3Like> (out: Out, scale?: number): Out\n * @param scale 生成的向量长度\n * @static\n */\n static random<Out extends IVec3Like> (out: Out, scale?: number) {\n scale = scale || 1.0;\n\n const phi = random() * 2.0 * Math.PI;\n const cosTheta = random() * 2 - 1;\n const sinTheta = Math.sqrt(1 - cosTheta * cosTheta);\n\n out.x = sinTheta * Math.cos(phi) * scale;\n out.y = sinTheta * Math.sin(phi) * scale;\n out.z = cosTheta * scale;\n return out;\n }\n\n /**\n * !#zh 向量与四维矩阵乘法,默认向量第四位为 1。\n * !#en Four-dimensional vector and matrix multiplication, the default vectors fourth one.\n * @method transformMat4\n * @typescript\n * transformMat4<Out extends IVec3Like, Vec3Like extends IVec3Like, MatLike extends IMat4Like> (out: Out, a: Vec3Like, mat: MatLike): Out\n * @static\n */\n static transformMat4<Out extends IVec3Like, Vec3Like extends IVec3Like, MatLike extends IMat4Like> (out: Out, a: Vec3Like, mat: MatLike) {\n _x = a.x;\n _y = a.y;\n _z = a.z;\n let m = mat.m;\n let rhw = m[3] * _x + m[7] * _y + m[11] * _z + m[15];\n rhw = rhw ? 1 / rhw : 1;\n out.x = (m[0] * _x + m[4] * _y + m[8] * _z + m[12]) * rhw;\n out.y = (m[1] * _x + m[5] * _y + m[9] * _z + m[13]) * rhw;\n out.z = (m[2] * _x + m[6] * _y + m[10] * _z + m[14]) * rhw;\n return out;\n }\n\n /**\n * !#zh 向量与四维矩阵乘法,默认向量第四位为 0。\n * !#en Four-dimensional vector and matrix multiplication, vector fourth default is 0.\n * @method transformMat4Normal\n * @typescript\n * transformMat4Normal<Out extends IVec3Like, MatLike extends IMat4Like> (out: Out, a: Out, mat: MatLike): Out\n * @static\n */\n static transformMat4Normal<Out extends IVec3Like, MatLike extends IMat4Like> (out: Out, a: Out, mat: MatLike) {\n _x = a.x;\n _y = a.y;\n _z = a.z;\n let m = mat.m;\n let rhw = m[3] * _x + m[7] * _y + m[11] * _z;\n rhw = rhw ? 1 / rhw : 1;\n out.x = (m[0] * _x + m[4] * _y + m[8] * _z) * rhw;\n out.y = (m[1] * _x + m[5] * _y + m[9] * _z) * rhw;\n out.z = (m[2] * _x + m[6] * _y + m[10] * _z) * rhw;\n return out;\n }\n\n /**\n * !#zh 向量与三维矩阵乘法\n * !#en Dimensional vector matrix multiplication\n * @method transformMat3\n * @typescript\n * transformMat3<Out extends IVec3Like, MatLike extends IMat3Like> (out: Out, a: Out, mat: MatLike): Out\n * @static\n */\n static transformMat3<Out extends IVec3Like, MatLike extends IMat3Like> (out: Out, a: Out, mat: MatLike) {\n _x = a.x;\n _y = a.y;\n _z = a.z;\n let m = mat.m;\n out.x = _x * m[0] + _y * m[3] + _z * m[6];\n out.y = _x * m[1] + _y * m[4] + _z * m[7];\n out.z = _x * m[2] + _y * m[5] + _z * m[8];\n return out;\n }\n\n /**\n * !#zh 向量仿射变换\n * !#en Affine transformation vector\n * @method transformAffine\n * @typescript\n * transformAffine<Out extends IVec3Like, VecLike extends IVec3Like, MatLike extends IMat4Like>(out: Out, v: VecLike, mat: MatLike): Out\n * @static\n */\n static transformAffine<Out extends IVec3Like, VecLike extends IVec3Like, MatLike extends IMat4Like>\n (out: Out, v: VecLike, mat: MatLike) {\n _x = v.x;\n _y = v.y;\n _z = v.z;\n let m = mat.m;\n out.x = m[0] * _x + m[1] * _y + m[2] * _z + m[3];\n out.y = m[4] * _x + m[5] * _y + m[6] * _z + m[7];\n out.x = m[8] * _x + m[9] * _y + m[10] * _z + m[11];\n return out;\n }\n\n /**\n * !#zh 向量四元数乘法\n * !#en Vector quaternion multiplication\n * @method transformQuat\n * @typescript\n * transformQuat<Out extends IVec3Like, VecLike extends IVec3Like, QuatLike extends IQuatLike> (out: Out, a: VecLike, q: QuatLike): Out\n * @static\n */\n static transformQuat<Out extends IVec3Like, VecLike extends IVec3Like, QuatLike extends IQuatLike> (out: Out, a: VecLike, q: QuatLike) {\n // benchmarks: http://jsperf.com/quaternion-transform-Vec3-implementations\n\n // calculate quat * vec\n const ix = q.w * a.x + q.y * a.z - q.z * a.y;\n const iy = q.w * a.y + q.z * a.x - q.x * a.z;\n const iz = q.w * a.z + q.x * a.y - q.y * a.x;\n const iw = -q.x * a.x - q.y * a.y - q.z * a.z;\n\n // calculate result * inverse quat\n out.x = ix * q.w + iw * -q.x + iy * -q.z - iz * -q.y;\n out.y = iy * q.w + iw * -q.y + iz * -q.x - ix * -q.z;\n out.z = iz * q.w + iw * -q.z + ix * -q.y - iy * -q.x;\n return out;\n }\n\n /**\n * !#zh 以缩放 -> 旋转 -> 平移顺序变换向量\n * !#en To scale -> rotation -> transformation vector sequence translation\n * @method transformQuat\n * @typescript\n * transformRTS<Out extends IVec3Like, VecLike extends IVec3Like, QuatLike extends IQuatLike>(out: Out, a: VecLike, r: QuatLike, t: VecLike, s: VecLike): Out\n * @static\n */\n static transformRTS<Out extends IVec3Like, VecLike extends IVec3Like, QuatLike extends IQuatLike> (\n out: Out, a: VecLike, r: QuatLike, t: VecLike, s: VecLike) {\n const x = a.x * s.x;\n const y = a.y * s.y;\n const z = a.z * s.z;\n const ix = r.w * x + r.y * z - r.z * y;\n const iy = r.w * y + r.z * x - r.x * z;\n const iz = r.w * z + r.x * y - r.y * x;\n const iw = -r.x * x - r.y * y - r.z * z;\n out.x = ix * r.w + iw * -r.x + iy * -r.z - iz * -r.y + t.x;\n out.y = iy * r.w + iw * -r.y + iz * -r.x - ix * -r.z + t.y;\n out.z = iz * r.w + iw * -r.z + ix * -r.y - iy * -r.x + t.z;\n return out;\n }\n\n /**\n * !#zh 以平移 -> 旋转 -> 缩放顺序逆变换向量\n * !#en Translational -> rotation -> Zoom inverse transformation vector sequence\n * @method transformInverseRTS\n * @typescript\n * transformInverseRTS<Out extends IVec3Like, VecLike extends IVec3Like, QuatLike extends IQuatLike>(out: Out, a: VecLike, r: QuatLike, t: VecLike, s: VecLike): Out\n * @static\n */\n static transformInverseRTS<Out extends IVec3Like, VecLike extends IVec3Like, QuatLike extends IQuatLike> (\n out: Out, a: VecLike, r: QuatLike, t: VecLike, s: VecLike) {\n const x = a.x - t.x;\n const y = a.y - t.y;\n const z = a.z - t.z;\n const ix = r.w * x - r.y * z + r.z * y;\n const iy = r.w * y - r.z * x + r.x * z;\n const iz = r.w * z - r.x * y + r.y * x;\n const iw = r.x * x + r.y * y + r.z * z;\n out.x = (ix * r.w + iw * r.x + iy * r.z - iz * r.y) / s.x;\n out.y = (iy * r.w + iw * r.y + iz * r.x - ix * r.z) / s.y;\n out.z = (iz * r.w + iw * r.z + ix * r.y - iy * r.x) / s.z;\n return out;\n }\n\n /**\n * !#zh 绕 X 轴旋转向量指定弧度\n * !#en Rotation vector specified angle about the X axis\n * @method rotateX\n * @typescript\n * rotateX<Out extends IVec3Like> (out: Out, v: Out, o: Out, a: number): Out\n * @param v 待旋转向量\n * @param o 旋转中心\n * @param a 旋转弧度\n * @static\n */\n static rotateX<Out extends IVec3Like> (out: Out, v: Out, o: Out, a: number) {\n // Translate point to the origin\n _x = v.x - o.x;\n _y = v.y - o.y;\n _z = v.z - o.z;\n\n // perform rotation\n const cos = Math.cos(a);\n const sin = Math.sin(a);\n const rx = _x;\n const ry = _y * cos - _z * sin;\n const rz = _y * sin + _z * cos;\n\n // translate to correct position\n out.x = rx + o.x;\n out.y = ry + o.y;\n out.z = rz + o.z;\n\n return out;\n }\n\n /**\n * !#zh 绕 Y 轴旋转向量指定弧度\n * !#en Rotation vector specified angle around the Y axis\n * @method rotateY\n * @typescript\n * rotateY<Out extends IVec3Like> (out: Out, v: Out, o: Out, a: number): Out\n * @param v 待旋转向量\n * @param o 旋转中心\n * @param a 旋转弧度\n * @static\n */\n static rotateY<Out extends IVec3Like> (out: Out, v: Out, o: Out, a: number) {\n // Translate point to the origin\n _x = v.x - o.x;\n _y = v.y - o.y;\n _z = v.z - o.z;\n\n // perform rotation\n const cos = Math.cos(a);\n const sin = Math.sin(a);\n const rx = _z * sin + _x * cos;\n const ry = _y;\n const rz = _z * cos - _x * sin;\n\n // translate to correct position\n out.x = rx + o.x;\n out.y = ry + o.y;\n out.z = rz + o.z;\n\n return out;\n }\n\n /**\n * !#zh 绕 Z 轴旋转向量指定弧度\n * !#en Around the Z axis specified angle vector\n * @method rotateZ\n * @typescript\n * rotateZ<Out extends IVec3Like> (out: Out, v: Out, o: Out, a: number): Out\n * @param v 待旋转向量\n * @param o 旋转中心\n * @param a 旋转弧度\n * @static\n */\n static rotateZ<Out extends IVec3Like> (out: Out, v: Out, o: Out, a: number) {\n // Translate point to the origin\n _x = v.x - o.x;\n _y = v.y - o.y;\n _z = v.z - o.z;\n\n // perform rotation\n const cos = Math.cos(a);\n const sin = Math.sin(a);\n const rx = _x * cos - _y * sin;\n const ry = _x * sin + _y * cos;\n const rz = _z;\n\n // translate to correct position\n out.x = rx + o.x;\n out.y = ry + o.y;\n out.z = rz + o.z;\n\n return out;\n }\n\n /**\n * !#zh 向量等价判断\n * !#en Equivalent vectors Analyzing\n * @method strictEquals\n * @typescript\n * strictEquals<Out extends IVec3Like> (a: Out, b: Out): boolean\n * @static\n */\n static strictEquals<Out extends IVec3Like> (a: Out, b: Out) {\n return a.x === b.x && a.y === b.y && a.z === b.z;\n }\n\n /**\n * !#zh 排除浮点数误差的向量近似等价判断\n * !#en Negative error vector floating point approximately equivalent Analyzing\n * @method equals\n * @typescript\n * equals<Out extends IVec3Like> (a: Out, b: Out, epsilon?: number): boolean\n * @static\n */\n static equals<Out extends IVec3Like> (a: Out, b: Out, epsilon = EPSILON) {\n const { x: a0, y: a1, z: a2 } = a;\n const { x: b0, y: b1, z: b2 } = b;\n return (\n Math.abs(a0 - b0) <=\n epsilon * Math.max(1.0, Math.abs(a0), Math.abs(b0)) &&\n Math.abs(a1 - b1) <=\n epsilon * Math.max(1.0, Math.abs(a1), Math.abs(b1)) &&\n Math.abs(a2 - b2) <=\n epsilon * Math.max(1.0, Math.abs(a2), Math.abs(b2))\n );\n }\n\n /**\n * !#zh 求两向量夹角弧度\n * !#en Radian angle between two vectors seek\n * @method angle\n * @typescript\n * angle<Out extends IVec3Like> (a: Out, b: Out): number\n * @static\n */\n static angle<Out extends IVec3Like> (a: Out, b: Out) {\n Vec3.normalize(v3_1, a);\n Vec3.normalize(v3_2, b);\n const cosine = Vec3.dot(v3_1, v3_2);\n if (cosine > 1.0) {\n return 0;\n }\n if (cosine < -1.0) {\n return Math.PI;\n }\n return Math.acos(cosine);\n }\n\n /**\n * !#zh 计算向量在指定平面上的投影\n * !#en Calculating a projection vector in the specified plane\n * @method projectOnPlane\n * @typescript\n * projectOnPlane<Out extends IVec3Like> (out: Out, a: Out, n: Out): Out\n * @param a 待投影向量\n * @param n 指定平面的法线\n * @static\n */\n static projectOnPlane<Out extends IVec3Like> (out: Out, a: Out, n: Out) {\n return Vec3.subtract(out, a, Vec3.project(out, a, n));\n }\n\n /**\n * !#zh 计算向量在指定向量上的投影\n * !#en Projection vector calculated in the vector designated\n * @method project\n * @typescript\n * project<Out extends IVec3Like> (out: Out, a: Out, b: Out): Out\n * @param a 待投影向量\n * @param n 目标向量\n * @static\n */\n static project<Out extends IVec3Like> (out: Out, a: Out, b: Out) {\n const sqrLen = Vec3.lengthSqr(b);\n if (sqrLen < 0.000001) {\n return Vec3.set(out, 0, 0, 0);\n } else {\n return Vec3.multiplyScalar(out, b, Vec3.dot(a, b) / sqrLen);\n }\n }\n\n /**\n * !#zh 向量转数组\n * !#en Vector transfer array\n * @method toArray\n * @typescript\n * toArray <Out extends IWritableArrayLike<number>> (out: Out, v: IVec3Like, ofs?: number): Out\n * @param ofs 数组起始偏移量\n * @static\n */\n static toArray <Out extends IWritableArrayLike<number>> (out: Out, v: IVec3Like, ofs = 0) {\n out[ofs + 0] = v.x;\n out[ofs + 1] = v.y;\n out[ofs + 2] = v.z;\n\n return out;\n }\n\n /**\n * !#zh 数组转向量\n * !#en Array steering amount\n * @method fromArray\n * @typescript\n * fromArray <Out extends IVec3Like> (out: Out, arr: IWritableArrayLike<number>, ofs?: number): Out\n * @param ofs 数组起始偏移量\n * @static\n */\n static fromArray <Out extends IVec3Like> (out: Out, arr: IWritableArrayLike<number>, ofs = 0) {\n out.x = arr[ofs + 0];\n out.y = arr[ofs + 1];\n out.z = arr[ofs + 2];\n return out;\n }\n\n\n /**\n * @property {Number} x\n */\n x: number;\n /**\n * @property {Number} y\n */\n y: number;\n /**\n * @property {Number} z\n */\n z: number;\n\n\n /**\n * !#en\n * Constructor\n * see {{#crossLink \"cc/vec3:method\"}}cc.v3{{/crossLink}}\n * !#zh\n * 构造函数,可查看 {{#crossLink \"cc/vec3:method\"}}cc.v3{{/crossLink}}\n * @method constructor\n * @param {Vec3|number} [x=0]\n * @param {number} [y=0]\n * @param {number} [z=0]\n */\n constructor (x: Vec3 | number = 0, y: number = 0, z: number = 0) {\n super();\n if (x && typeof x === 'object') {\n this.x = x.x;\n this.y = x.y;\n this.z = x.z;\n }\n else {\n this.x = x as number;\n this.y = y;\n this.z = z;\n }\n }\n\n /**\n * !#en clone a Vec3 value\n * !#zh 克隆一个 Vec3 值\n * @method clone\n * @return {Vec3}\n */\n clone (): Vec3 {\n return new Vec3(this.x, this.y, this.z);\n }\n\n /**\n * !#en Set the current vector value with the given vector.\n * !#zh 用另一个向量设置当前的向量对象值。\n * @method set\n * @param {Vec3} newValue - !#en new value to set. !#zh 要设置的新值\n * @return {Vec3} returns this\n * @chainable\n */\n set (newValue: Vec3): Vec3 {\n this.x = newValue.x;\n this.y = newValue.y;\n this.z = newValue.z;\n return this;\n }\n\n /**\n * !#en Check whether the vector equals another one\n * !#zh 当前的向量是否与指定的向量相等。\n * @method equals\n * @param {Vec3} other\n * @return {Boolean}\n */\n equals (other: Vec3): boolean {\n return other && this.x === other.x && this.y === other.y && this.z === other.z;\n }\n\n\n /**\n * !#en Check whether two vector equal with some degree of variance.\n * !#zh\n * 近似判断两个点是否相等。<br/>\n * 判断 2 个向量是否在指定数值的范围之内,如果在则返回 true反之则返回 false。\n * @method fuzzyEquals\n * @param {Vec3} other\n * @param {Number} variance\n * @return {Boolean}\n */\n fuzzyEquals (other: Vec3, variance: number): boolean {\n if (this.x - variance <= other.x && other.x <= this.x + variance) {\n if (this.y - variance <= other.y && other.y <= this.y + variance) {\n if (this.z - variance <= other.z && other.z <= this.z + variance)\n return true;\n }\n }\n return false;\n }\n\n /**\n * !#en Transform to string with vector informations\n * !#zh 转换为方便阅读的字符串。\n * @method toString\n * @return {string}\n */\n toString (): string {\n return \"(\" +\n this.x.toFixed(2) + \", \" +\n this.y.toFixed(2) + \", \" +\n this.z.toFixed(2) + \")\"\n ;\n }\n\n /**\n * !#en Calculate linear interpolation result between this vector and another one with given ratio\n * !#zh 线性插值。\n * @method lerp\n * @param {Vec3} to\n * @param {number} ratio - the interpolation coefficient\n * @param {Vec3} [out] - optional, the receiving vector, you can pass the same vec3 to save result to itself, if not provided, a new vec3 will be created\n * @return {Vec3}\n */\n lerp (to: Vec3, ratio: number, out?: Vec3): Vec3 {\n out = out || new Vec3();\n Vec3.lerp(out, this, to, ratio);\n return out;\n }\n\n /**\n * !#en Clamp the vector between from float and to float.\n * !#zh\n * 返回指定限制区域后的向量。<br/>\n * 向量大于 max_inclusive 则返回 max_inclusive。<br/>\n * 向量小于 min_inclusive 则返回 min_inclusive。<br/>\n * 否则返回自身。\n * @method clampf\n * @param {Vec3} min_inclusive\n * @param {Vec3} max_inclusive\n * @return {Vec3}\n */\n clampf (min_inclusive: Vec3, max_inclusive: Vec3): Vec3 {\n this.x = misc.clampf(this.x, min_inclusive.x, max_inclusive.x);\n this.y = misc.clampf(this.y, min_inclusive.y, max_inclusive.y);\n this.z = misc.clampf(this.z, min_inclusive.z, max_inclusive.z);\n return this;\n }\n\n /**\n * !#en Adds this vector. If you want to save result to another vector, use add() instead.\n * !#zh 向量加法。如果你想保存结果到另一个向量,使用 add() 代替。\n * @method addSelf\n * @param {Vec3} vector\n * @return {Vec3} returns this\n * @chainable\n */\n addSelf (vector: Vec3): this {\n this.x += vector.x;\n this.y += vector.y;\n this.z += vector.z;\n return this;\n }\n\n /**\n * !#en Adds two vectors, and returns the new result.\n * !#zh 向量加法,并返回新结果。\n * @method add\n * @param {Vec3} vector\n * @param {Vec3} [out] - optional, the receiving vector, you can pass the same vec3 to save result to itself, if not provided, a new vec3 will be created\n * @return {Vec3} the result\n */\n add (vector: Vec3, out?: Vec3): Vec3 {\n out = out || new Vec3();\n out.x = this.x + vector.x;\n out.y = this.y + vector.y;\n out.z = this.z + vector.z;\n return out;\n }\n\n /**\n * !#en Subtracts one vector from this.\n * !#zh 向量减法。\n * @method subtract\n * @param {Vec3} vector\n * @return {Vec3} returns this\n * @chainable\n */\n subtract (vector: Vec3): Vec3 {\n this.x -= vector.x;\n this.y -= vector.y;\n this.z -= vector.z;\n return this;\n }\n\n /**\n * !#en Multiplies this by a number.\n * !#zh 缩放当前向量。\n * @method multiplyScalar\n * @param {number} num\n * @return {Vec3} returns this\n * @chainable\n */\n multiplyScalar (num: number): Vec3 {\n this.x *= num;\n this.y *= num;\n this.z *= num;\n return this;\n }\n\n /**\n * !#en Multiplies two vectors.\n * !#zh 分量相乘。\n * @method multiply\n * @param {Vec3} vector\n * @return {Vec3} returns this\n * @chainable\n */\n multiply (vector: Vec3): Vec3 {\n this.x *= vector.x;\n this.y *= vector.y;\n this.z *= vector.z;\n return this;\n }\n\n /**\n * !#en Divides by a number.\n * !#zh 向量除法。\n * @method divide\n * @param {number} num\n * @return {Vec3} returns this\n * @chainable\n */\n divide (num: number): Vec3 {\n this.x /= num;\n this.y /= num;\n this.z /= num;\n return this;\n }\n\n /**\n * !#en Negates the components.\n * !#zh 向量取反。\n * @method negate\n * @return {Vec3} returns this\n * @chainable\n */\n negate (): this {\n this.x = -this.x;\n this.y = -this.y;\n this.z = -this.z;\n return this;\n }\n\n /**\n * !#en Dot product\n * !#zh 当前向量与指定向量进行点乘。\n * @method dot\n * @param {Vec3} [vector]\n * @return {number} the result\n */\n dot (vector: Vec3): number {\n return this.x * vector.x + this.y * vector.y + this.z * vector.z;\n }\n\n /**\n * !#en Cross product\n * !#zh 当前向量与指定向量进行叉乘。\n * @method cross\n * @param {Vec3} vector\n * @param {Vec3} [out]\n * @return {Vec3} the result\n */\n cross (vector: Vec3, out?: Vec3): Vec3 {\n out = out || new Vec3();\n Vec3.cross(out, this, vector)\n return out;\n }\n\n /**\n * !#en Returns the length of this vector.\n * !#zh 返回该向量的长度。\n * @method len\n * @return {number} the result\n * @example\n * var v = cc.v3(10, 10, 10);\n * v.len(); // return 17.320508075688775;\n */\n len (): number {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n }\n\n /**\n * !#en Returns the squared length of this vector.\n * !#zh 返回该向量的长度平方。\n * @method lengthSqr\n * @return {number} the result\n */\n lengthSqr (): number {\n return this.x * this.x + this.y * this.y + this.z * this.z;\n }\n\n /**\n * !#en Make the length of this vector to 1.\n * !#zh 向量归一化,让这个向量的长度为 1。\n * @method normalizeSelf\n * @return {Vec3} returns this\n * @chainable\n */\n normalizeSelf (): Vec3 {\n Vec3.normalize(this, this);\n return this;\n };\n\n /**\n * !#en\n * Returns this vector with a magnitude of 1.<br/>\n * <br/>\n * Note that the current vector is unchanged and a new normalized vector is returned. If you want to normalize the current vector, use normalizeSelf function.\n * !#zh\n * 返回归一化后的向量。<br/>\n * <br/>\n * 注意,当前向量不变,并返回一个新的归一化向量。如果你想来归一化当前向量,可使用 normalizeSelf 函数。\n * @method normalize\n * @param {Vec3} [out] - optional, the receiving vector, you can pass the same vec3 to save result to itself, if not provided, a new vec3 will be created\n * @return {Vec3} result\n */\n normalize (out?: Vec3): Vec3 {\n out = out || new Vec3();\n Vec3.normalize(out, this);\n return out;\n }\n\n /**\n * Transforms the vec3 with a mat4. 4th vector component is implicitly '1'\n * @method transformMat4\n * @param {Mat4} m matrix to transform with\n * @param {Vec3} [out] the receiving vector, you can pass the same vec3 to save result to itself, if not provided, a new vec3 will be created\n * @returns {Vec3} out\n */\n transformMat4 (m: Mat4, out?: Vec3): Vec3 {\n out = out || new Vec3();\n Vec3.transformMat4(out, this, m);\n return out;\n }\n\n /**\n * Returns the maximum value in x, y, and z\n * @method maxAxis\n * @returns {number}\n */\n maxAxis (): number {\n return Math.max(this.x, this.y, this.z);\n }\n\n /**\n * !#en Get angle in radian between this and vector.\n * !#zh 夹角的弧度。\n * @method angle\n * @param {Vec3} vector\n * @return {number} from 0 to Math.PI\n */\n angle = Vec2.prototype.angle\n /**\n * !#en Calculates the projection of the current vector over the given vector.\n * !#zh 返回当前向量在指定 vector 向量上的投影向量。\n * @method project\n * @param {Vec3} vector\n * @return {Vec3}\n * @example\n * var v1 = cc.v3(20, 20, 20);\n * var v2 = cc.v3(5, 5, 5);\n * v1.project(v2); // Vec3 {x: 20, y: 20, z: 20};\n */\n project = Vec2.prototype.project\n // Compatible with the vec2 API\n\n /**\n * !#en Get angle in radian between this and vector with direction. <br/>\n * In order to compatible with the vec2 API.\n * !#zh 带方向的夹角的弧度。该方法仅用做兼容 2D 计算。\n * @method signAngle\n * @param {Vec3 | Vec2} vector\n * @return {number} from -MathPI to Math.PI\n * @deprecated\n */\n signAngle (vector) {\n cc.warnID(1408, 'vec3.signAngle', 'v2.1', 'cc.v2(selfVector).signAngle(vector)');\n let vec1 = new Vec2(this.x, this.y);\n let vec2 = new Vec2(vector.x, vector.y);\n return vec1.signAngle(vec2);\n }\n\n /**\n * !#en rotate. In order to compatible with the vec2 API.\n * !#zh 返回旋转给定弧度后的新向量。该方法仅用做兼容 2D 计算。\n * @method rotate\n * @param {number} radians\n * @param {Vec3} [out] - optional, the receiving vector, you can pass the same vec2 to save result to itself, if not provided, a new vec2 will be created\n * @return {Vec2 | Vec3} if the 'out' value is a vec3 you will get a Vec3 return.\n * @deprecated\n */\n rotate (radians, out) {\n cc.warnID(1408, 'vec3.rotate', 'v2.1', 'cc.v2(selfVector).rotate(radians, out)');\n return Vec2.prototype.rotate.call(this, radians, out);\n }\n\n /**\n * !#en rotate self. In order to compatible with the vec2 API.\n * !#zh 按指定弧度旋转向量。该方法仅用做兼容 2D 计算。\n * @method rotateSelf\n * @param {number} radians\n * @return {Vec3} returns this\n * @chainable\n * @deprecated\n */\n rotateSelf (radians) {\n cc.warnID(1408, 'vec3.rotateSelf', 'v2.1', 'cc.v2(selfVector).rotateSelf(radians)');\n return Vec2.prototype.rotateSelf.call(this, radians);\n }\n}\n\nconst v3_1 = new Vec3();\nconst v3_2 = new Vec3();\n\nCCClass.fastDefine('cc.Vec3', Vec3, { x: 0, y: 0, z: 0 });\n\n/**\n * @module cc\n */\n\n/**\n * !#en The convenience method to create a new {{#crossLink \"Vec3\"}}cc.Vec3{{/crossLink}}.\n * !#zh 通过该简便的函数进行创建 {{#crossLink \"Vec3\"}}cc.Vec3{{/crossLink}} 对象。\n * @method v3\n * @param {Number|Object} [x=0]\n * @param {Number} [y=0]\n * @param {Number} [z=0]\n * @return {Vec3}\n * @example\n * var v1 = cc.v3();\n * var v2 = cc.v3(0, 0, 0);\n * var v3 = cc.v3(v2);\n * var v4 = cc.v3({x: 100, y: 100, z: 0});\n */\ncc.v3 = function v3 (x, y, z) {\n return new Vec3(x, y, z);\n};\n\ncc.Vec3 = Vec3;\n","/*\n Copyright (c) 2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos.com\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n*/\n\nimport CCClass from '../platform/CCClass';\nimport ValueType from './value-type';\nimport Mat4 from './mat4';\nimport { clamp, EPSILON, random } from './utils';\n\nlet _x: number = 0.0;\nlet _y: number = 0.0;\nlet _z: number = 0.0;\nlet _w: number = 0.0;\n\n/**\n * !#en Representation of 3D vectors and points.\n * !#zh 表示 3D 向量和坐标\n *\n * @class Vec4\n * @extends ValueType\n */\nexport default class Vec4 extends ValueType {\n // deprecated\n public static sub = Vec4.subtract;\n public static mul = Vec4.multiply;\n public static div = Vec4.divide;\n public static scale = Vec4.multiplyScalar;\n public static mag = Vec4.len;\n public static squaredMagnitude = Vec4.lengthSqr;\n mag = Vec4.prototype.len;\n magSqr = Vec4.prototype.lengthSqr;\n /**\n * !#en Subtracts one vector from this. If you want to save result to another vector, use sub() instead.\n * !#zh 向量减法。如果你想保存结果到另一个向量,可使用 sub() 代替。\n * @method subSelf\n * @param {Vec4} vector\n * @return {Vec4} returns this\n * @chainable\n */\n subSelf = Vec4.prototype.subtract;\n /**\n * !#en Subtracts one vector from this, and returns the new result.\n * !#zh 向量减法,并返回新结果。\n * @method sub\n * @param {Vec4} vector\n * @param {Vec4} [out] - optional, the receiving vector, you can pass the same vec4 to save result to itself, if not provided, a new vec4 will be created\n * @return {Vec4} the result\n */\n sub (vector: Vec4, out?: Vec4) {\n return Vec4.subtract(out || new Vec4(), this, vector);\n }\n /**\n * !#en Multiplies this by a number. If you want to save result to another vector, use mul() instead.\n * !#zh 缩放当前向量。如果你想结果保存到另一个向量,可使用 mul() 代替。\n * @method mulSelf\n * @param {number} num\n * @return {Vec4} returns this\n * @chainable\n */\n mulSelf = Vec4.prototype.multiplyScalar;\n /**\n * !#en Multiplies by a number, and returns the new result.\n * !#zh 缩放向量,并返回新结果。\n * @method mul\n * @param {number} num\n * @param {Vec4} [out] - optional, the receiving vector, you can pass the same vec4 to save result to itself, if not provided, a new vec4 will be created\n * @return {Vec4} the result\n */\n mul (num: number, out?: Vec4) {\n return Vec4.multiplyScalar(out || new Vec4(), this, num);\n }\n /**\n * !#en Divides by a number. If you want to save result to another vector, use div() instead.\n * !#zh 向量除法。如果你想结果保存到另一个向量,可使用 div() 代替。\n * @method divSelf\n * @param {number} num\n * @return {Vec4} returns this\n * @chainable\n */\n divSelf = Vec4.prototype.divide;\n /**\n * !#en Divides by a number, and returns the new result.\n * !#zh 向量除法,并返回新的结果。\n * @method div\n * @param {number} num\n * @param {Vec4} [out] - optional, the receiving vector, you can pass the same vec4 to save result to itself, if not provided, a new vec4 will be created\n * @return {Vec4} the result\n */\n div (num: number, out?: Vec4): Vec4 {\n return Vec4.multiplyScalar(out || new Vec4(), this, 1/num);\n }\n /**\n * !#en Multiplies two vectors.\n * !#zh 分量相乘。\n * @method scaleSelf\n * @param {Vec4} vector\n * @return {Vec4} returns this\n * @chainable\n */\n scaleSelf = Vec4.prototype.multiply;\n /**\n * !#en Multiplies two vectors, and returns the new result.\n * !#zh 分量相乘,并返回新的结果。\n * @method scale\n * @param {Vec4} vector\n * @param {Vec4} [out] - optional, the receiving vector, you can pass the same vec4 to save result to itself, if not provided, a new vec4 will be created\n * @return {Vec4} the result\n */\n scale (vector: Vec4, out?: Vec4) {\n return Vec4.multiply(out || new Vec4(), this, vector);\n }\n /**\n * !#en Negates the components. If you want to save result to another vector, use neg() instead.\n * !#zh 向量取反。如果你想结果保存到另一个向量,可使用 neg() 代替。\n * @method negSelf\n * @return {Vec4} returns this\n * @chainable\n */\n negSelf = Vec4.prototype.negate;\n /**\n * !#en Negates the components, and returns the new result.\n * !#zh 返回取反后的新向量。\n * @method neg\n * @param {Vec4} [out] - optional, the receiving vector, you can pass the same vec4 to save result to itself, if not provided, a new vec4 will be created\n * @return {Vec4} the result\n */\n neg (out?: Vec4) {\n return Vec4.negate(out || new Vec4(), this);\n }\n\n public static get ZERO () { return new Vec4(0, 0, 0, 0); }\n public static readonly ZERO_R = Vec4.ZERO;\n\n public static get ONE () { return new Vec4(1, 1, 1, 1); }\n public static readonly ONE_R = Vec4.ONE;\n\n public static get NEG_ONE () { return new Vec4(-1, -1, -1, -1); }\n public static readonly NEG_ONE_R = Vec4.NEG_ONE;\n\n /**\n * !#zh 获得指定向量的拷贝\n * !#en Obtaining copy vectors designated\n * @method clone\n * @typescript\n * clone <Out extends IVec4Like> (a: Out): Vec4\n * @static\n */\n public static clone <Out extends IVec4Like> (a: Out) {\n return new Vec4(a.x, a.y, a.z, a.w);\n }\n\n /**\n * !#zh 复制目标向量\n * !#en Copy the target vector\n * @method copy\n * @typescript\n * copy <Out extends IVec4Like> (out: Out, a: Out): Out\n * @static\n */\n public static copy <Out extends IVec4Like> (out: Out, a: Out) {\n out.x = a.x;\n out.y = a.y;\n out.z = a.z;\n out.w = a.w;\n return out;\n }\n\n /**\n * !#zh 设置向量值\n * !#en Set to value\n * @method set\n * @typescript\n * set <Out extends IVec4Like> (out: Out, x: number, y: number, z: number, w: number): Out\n * @static\n */\n public static set <Out extends IVec4Like> (out: Out, x: number, y: number, z: number, w: number) {\n out.x = x;\n out.y = y;\n out.z = z;\n out.w = w;\n return out;\n }\n\n /**\n * !#zh 逐元素向量加法\n * !#en Element-wise vector addition\n * @method add\n * @typescript\n * add <Out extends IVec4Like> (out: Out, a: Out, b: Out): Out\n * @static\n */\n public static add <Out extends IVec4Like> (out: Out, a: Out, b: Out) {\n out.x = a.x + b.x;\n out.y = a.y + b.y;\n out.z = a.z + b.z;\n out.w = a.w + b.w;\n return out;\n }\n\n /**\n * !#zh 逐元素向量减法\n * !#en Element-wise vector subtraction\n * @method subtract\n * @typescript\n * subtract <Out extends IVec4Like> (out: Out, a: Out, b: Out): Out\n * @static\n */\n public static subtract <Out extends IVec4Like> (out: Out, a: Out, b: Out) {\n out.x = a.x - b.x;\n out.y = a.y - b.y;\n out.z = a.z - b.z;\n out.w = a.w - b.w;\n return out;\n }\n\n /**\n * !#zh 逐元素向量乘法\n * !#en Element-wise vector multiplication\n * @method multiply\n * @typescript\n * multiply <Out extends IVec4Like> (out: Out, a: Out, b: Out): Out\n * @static\n */\n public static multiply <Out extends IVec4Like> (out: Out, a: Out, b: Out) {\n out.x = a.x * b.x;\n out.y = a.y * b.y;\n out.z = a.z * b.z;\n out.w = a.w * b.w;\n return out;\n }\n\n /**\n * !#zh 逐元素向量除法\n * !#en Element-wise vector division\n * @method divide\n * @typescript\n * divide <Out extends IVec4Like> (out: Out, a: Out, b: Out): Out\n * @static\n */\n public static divide <Out extends IVec4Like> (out: Out, a: Out, b: Out) {\n out.x = a.x / b.x;\n out.y = a.y / b.y;\n out.z = a.z / b.z;\n out.w = a.w / b.w;\n return out;\n }\n\n /**\n * !#zh 逐元素向量向上取整\n * !#en Rounding up by elements of the vector\n * @method ceil\n * @typescript\n * ceil <Out extends IVec4Like> (out: Out, a: Out): Out\n * @static\n */\n public static ceil <Out extends IVec4Like> (out: Out, a: Out) {\n out.x = Math.ceil(a.x);\n out.y = Math.ceil(a.y);\n out.z = Math.ceil(a.z);\n out.w = Math.ceil(a.w);\n return out;\n }\n\n /**\n * !#zh 逐元素向量向下取整\n * !#en Element vector by rounding down\n * @method floor\n * @typescript\n * floor <Out extends IVec4Like> (out: Out, a: Out): Out\n * @static\n */\n public static floor <Out extends IVec4Like> (out: Out, a: Out) {\n out.x = Math.floor(a.x);\n out.y = Math.floor(a.y);\n out.z = Math.floor(a.z);\n out.w = Math.floor(a.w);\n return out;\n }\n\n /**\n * !#zh 逐元素向量最小值\n * !#en The minimum by-element vector\n * @method min\n * @typescript\n * min <Out extends IVec4Like> (out: Out, a: Out, b: Out): Out\n * @static\n */\n public static min <Out extends IVec4Like> (out: Out, a: Out, b: Out) {\n out.x = Math.min(a.x, b.x);\n out.y = Math.min(a.y, b.y);\n out.z = Math.min(a.z, b.z);\n out.w = Math.min(a.w, b.w);\n return out;\n }\n\n /**\n * !#zh 逐元素向量最大值\n * !#en The maximum value of the element-wise vector\n * @method max\n * @typescript\n * max <Out extends IVec4Like> (out: Out, a: Out, b: Out): Out\n * @static\n */\n public static max <Out extends IVec4Like> (out: Out, a: Out, b: Out) {\n out.x = Math.max(a.x, b.x);\n out.y = Math.max(a.y, b.y);\n out.z = Math.max(a.z, b.z);\n out.w = Math.max(a.w, b.w);\n return out;\n }\n\n /**\n * !#zh 逐元素向量四舍五入取整\n * !#en Element-wise vector of rounding to whole\n * @method round\n * @typescript\n * round <Out extends IVec4Like> (out: Out, a: Out): Out\n * @static\n */\n public static round <Out extends IVec4Like> (out: Out, a: Out) {\n out.x = Math.round(a.x);\n out.y = Math.round(a.y);\n out.z = Math.round(a.z);\n out.w = Math.round(a.w);\n return out;\n }\n\n /**\n * !#zh 向量标量乘法\n * !#en Vector scalar multiplication\n * @method multiplyScalar\n * @typescript\n * multiplyScalar <Out extends IVec4Like> (out: Out, a: Out, b: number): Out\n * @static\n */\n public static multiplyScalar <Out extends IVec4Like> (out: Out, a: Out, b: number) {\n out.x = a.x * b;\n out.y = a.y * b;\n out.z = a.z * b;\n out.w = a.w * b;\n return out;\n }\n\n /**\n * !#zh 逐元素向量乘加: A + B * scale\n * !#en Element-wise vector multiply add: A + B * scale\n * @method scaleAndAdd\n * @typescript\n * scaleAndAdd <Out extends IVec4Like> (out: Out, a: Out, b: Out, scale: number): Out\n * @static\n */\n public static scaleAndAdd <Out extends IVec4Like> (out: Out, a: Out, b: Out, scale: number) {\n out.x = a.x + (b.x * scale);\n out.y = a.y + (b.y * scale);\n out.z = a.z + (b.z * scale);\n out.w = a.w + (b.w * scale);\n return out;\n }\n\n /**\n * !#zh 求两向量的欧氏距离\n * !#en Seeking two vectors Euclidean distance\n * @method distance\n * @typescript\n * distance <Out extends IVec4Like> (a: Out, b: Out): number\n * @static\n */\n public static distance <Out extends IVec4Like> (a: Out, b: Out) {\n const x = b.x - a.x;\n const y = b.y - a.y;\n const z = b.z - a.z;\n const w = b.w - a.w;\n return Math.sqrt(x * x + y * y + z * z + w * w);\n }\n\n /**\n * !#zh 求两向量的欧氏距离平方\n * !#en Euclidean distance squared seeking two vectors\n * @method squaredDistance\n * @typescript\n * squaredDistance <Out extends IVec4Like> (a: Out, b: Out): number\n * @static\n */\n public static squaredDistance <Out extends IVec4Like> (a: Out, b: Out) {\n const x = b.x - a.x;\n const y = b.y - a.y;\n const z = b.z - a.z;\n const w = b.w - a.w;\n return x * x + y * y + z * z + w * w;\n }\n\n /**\n * !#zh 求向量长度\n * !#en Seeking vector length\n * @method len\n * @typescript\n * len <Out extends IVec4Like> (a: Out): number\n * @static\n */\n public static len <Out extends IVec4Like> (a: Out) {\n _x = a.x;\n _y = a.y;\n _z = a.z;\n _w = a.w;\n return Math.sqrt(_x * _x + _y * _y + _z * _z + _w * _w);\n }\n\n /**\n * !#zh 求向量长度平方\n * !#en Seeking squared vector length\n * @method lengthSqr\n * @typescript\n * lengthSqr <Out extends IVec4Like> (a: Out): number\n * @static\n */\n public static lengthSqr <Out extends IVec4Like> (a: Out) {\n _x = a.x;\n _y = a.y;\n _z = a.z;\n _w = a.w;\n return _x * _x + _y * _y + _z * _z + _w * _w;\n }\n\n /**\n * !#zh 逐元素向量取负\n * !#en By taking the negative elements of the vector\n * @method negate\n * @typescript\n * negate <Out extends IVec4Like> (out: Out, a: Out): Out\n * @static\n */\n public static negate <Out extends IVec4Like> (out: Out, a: Out) {\n out.x = -a.x;\n out.y = -a.y;\n out.z = -a.z;\n out.w = -a.w;\n return out;\n }\n\n /**\n * !#zh 逐元素向量取倒数,接近 0 时返回 Infinity\n * !#en Element vector by taking the inverse, return near 0 Infinity\n * @method inverse\n * @typescript\n * inverse <Out extends IVec4Like> (out: Out, a: Out): Out\n * @static\n */\n public static inverse <Out extends IVec4Like> (out: Out, a: Out) {\n out.x = 1.0 / a.x;\n out.y = 1.0 / a.y;\n out.z = 1.0 / a.z;\n out.w = 1.0 / a.w;\n return out;\n }\n\n /**\n * !#zh 逐元素向量取倒数,接近 0 时返回 0\n * !#en Element vector by taking the inverse, return near 0 0\n * @method inverseSafe\n * @typescript\n * inverseSafe <Out extends IVec4Like> (out: Out, a: Out): Out\n * @static\n */\n public static inverseSafe <Out extends IVec4Like> (out: Out, a: Out) {\n _x = a.x;\n _y = a.y;\n _z = a.z;\n _w = a.w;\n\n if (Math.abs(_x) < EPSILON) {\n out.x = 0;\n } else {\n out.x = 1.0 / _x;\n }\n\n if (Math.abs(_y) < EPSILON) {\n out.y = 0;\n } else {\n out.y = 1.0 / _y;\n }\n\n if (Math.abs(_z) < EPSILON) {\n out.z = 0;\n } else {\n out.z = 1.0 / _z;\n }\n\n if (Math.abs(_w) < EPSILON) {\n out.w = 0;\n } else {\n out.w = 1.0 / _w;\n }\n\n return out;\n }\n\n /**\n * !#zh 归一化向量\n * !#en Normalized vector\n * @method normalize\n * @typescript\n * normalize <Out extends IVec4Like> (out: Out, a: Out): Out\n * @static\n */\n public static normalize <Out extends IVec4Like> (out: Out, a: Out) {\n _x = a.x;\n _y = a.y;\n _z = a.z;\n _w = a.w;\n let len = _x * _x + _y * _y + _z * _z + _w * _w;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n out.x = _x * len;\n out.y = _y * len;\n out.z = _z * len;\n out.w = _w * len;\n }\n return out;\n }\n\n /**\n * !#zh 向量点积(数量积)\n * !#en Vector dot product (scalar product)\n * @method dot\n * @typescript\n * dot <Out extends IVec4Like> (a: Out, b: Out): number\n * @static\n */\n public static dot <Out extends IVec4Like> (a: Out, b: Out) {\n return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;\n }\n\n /**\n * !#zh 逐元素向量线性插值: A + t * (B - A)\n * !#en Vector element by element linear interpolation: A + t * (B - A)\n * @method lerp\n * @typescript\n * lerp <Out extends IVec4Like> (out: Out, a: Out, b: Out, t: number): Out\n * @static\n */\n public static lerp <Out extends IVec4Like> (out: Out, a: Out, b: Out, t: number) {\n out.x = a.x + t * (b.x - a.x);\n out.y = a.y + t * (b.y - a.y);\n out.z = a.z + t * (b.z - a.z);\n out.w = a.w + t * (b.w - a.w);\n return out;\n }\n\n /**\n * !#zh 生成一个在单位球体上均匀分布的随机向量\n * !#en Generates a uniformly distributed random vectors on the unit sphere\n * @method random\n * @typescript\n * random <Out extends IVec4Like> (out: Out, scale?: number): Out\n * @param scale 生成的向量长度\n * @static\n */\n public static random <Out extends IVec4Like> (out: Out, scale?: number) {\n scale = scale || 1.0;\n\n const phi = random() * 2.0 * Math.PI;\n const cosTheta = random() * 2 - 1;\n const sinTheta = Math.sqrt(1 - cosTheta * cosTheta);\n\n out.x = sinTheta * Math.cos(phi) * scale;\n out.y = sinTheta * Math.sin(phi) * scale;\n out.z = cosTheta * scale;\n out.w = 0;\n return out;\n }\n\n /**\n * !#zh 向量矩阵乘法\n * !#en Vector matrix multiplication\n * @method transformMat4\n * @typescript\n * transformMat4 <Out extends IVec4Like, MatLike extends IMat4Like> (out: Out, a: Out, mat: MatLike): Out\n * @static\n */\n public static transformMat4 <Out extends IVec4Like, MatLike extends IMat4Like> (out: Out, a: Out, mat: MatLike) {\n _x = a.x;\n _y = a.y;\n _z = a.z;\n _w = a.w;\n let m = mat.m;\n out.x = m[0] * _x + m[4] * _y + m[8] * _z + m[12] * _w;\n out.y = m[1] * _x + m[5] * _y + m[9] * _z + m[13] * _w;\n out.z = m[2] * _x + m[6] * _y + m[10] * _z + m[14] * _w;\n out.w = m[3] * _x + m[7] * _y + m[11] * _z + m[15] * _w;\n return out;\n }\n\n /**\n * !#zh 向量仿射变换\n * !#en Affine transformation vector\n * @method transformAffine\n * @typescript\n * transformAffine<Out extends IVec4Like, VecLike extends IVec4Like, MatLike extends IMat4Like>(out: Out, v: VecLike, mat: MatLike): Out\n * @static\n */\n public static transformAffine<Out extends IVec4Like, VecLike extends IVec4Like, MatLike extends IMat4Like>\n (out: Out, v: VecLike, mat: MatLike) {\n _x = v.x;\n _y = v.y;\n _z = v.z;\n _w = v.w;\n let m = mat.m;\n out.x = m[0] * _x + m[1] * _y + m[2] * _z + m[3] * _w;\n out.y = m[4] * _x + m[5] * _y + m[6] * _z + m[7] * _w;\n out.x = m[8] * _x + m[9] * _y + m[10] * _z + m[11] * _w;\n out.w = v.w;\n return out;\n }\n\n /**\n * !#zh 向量四元数乘法\n * !#en Vector quaternion multiplication\n * @method transformQuat\n * @typescript\n * transformQuat <Out extends IVec4Like, QuatLike extends IQuatLike> (out: Out, a: Out, q: QuatLike): Out\n * @static\n */\n public static transformQuat <Out extends IVec4Like, QuatLike extends IQuatLike> (out: Out, a: Out, q: QuatLike) {\n const { x, y, z } = a;\n\n _x = q.x;\n _y = q.y;\n _z = q.z;\n _w = q.w;\n\n // calculate quat * vec\n const ix = _w * x + _y * z - _z * y;\n const iy = _w * y + _z * x - _x * z;\n const iz = _w * z + _x * y - _y * x;\n const iw = -_x * x - _y * y - _z * z;\n\n // calculate result * inverse quat\n out.x = ix * _w + iw * -_x + iy * -_z - iz * -_y;\n out.y = iy * _w + iw * -_y + iz * -_x - ix * -_z;\n out.z = iz * _w + iw * -_z + ix * -_y - iy * -_x;\n out.w = a.w;\n return out;\n }\n\n /**\n * !#zh 向量等价判断\n * !#en Equivalent vectors Analyzing\n * @method strictEquals\n * @typescript\n * strictEquals <Out extends IVec4Like> (a: Out, b: Out): boolean\n * @static\n */\n public static strictEquals <Out extends IVec4Like> (a: Out, b: Out) {\n return a.x === b.x && a.y === b.y && a.z === b.z && a.w === b.w;\n }\n\n /**\n * !#zh 排除浮点数误差的向量近似等价判断\n * !#en Negative error vector floating point approximately equivalent Analyzing\n * @method equals\n * @typescript\n * equals <Out extends IVec4Like> (a: Out, b: Out, epsilon?: number): boolean\n * @static\n */\n public static equals <Out extends IVec4Like> (a: Out, b: Out, epsilon = EPSILON) {\n return (Math.abs(a.x - b.x) <= epsilon * Math.max(1.0, Math.abs(a.x), Math.abs(b.x)) &&\n Math.abs(a.y - b.y) <= epsilon * Math.max(1.0, Math.abs(a.y), Math.abs(b.y)) &&\n Math.abs(a.z - b.z) <= epsilon * Math.max(1.0, Math.abs(a.z), Math.abs(b.z)) &&\n Math.abs(a.w - b.w) <= epsilon * Math.max(1.0, Math.abs(a.w), Math.abs(b.w)));\n }\n\n /**\n * !#zh 向量转数组\n * !#en Vector transfer array\n * @method toArray\n * @typescript\n * toArray <Out extends IWritableArrayLike<number>> (out: Out, v: IVec4Like, ofs?: number): Out\n * @param ofs 数组起始偏移量\n * @static\n */\n public static toArray <Out extends IWritableArrayLike<number>> (out: Out, v: IVec4Like, ofs = 0) {\n out[ofs + 0] = v.x;\n out[ofs + 1] = v.y;\n out[ofs + 2] = v.z;\n out[ofs + 3] = v.w;\n return out;\n }\n\n /**\n * !#zh 数组转向量\n * !#en Array steering amount\n * @method fromArray\n * @typescript\n * fromArray <Out extends IVec4Like> (out: Out, arr: IWritableArrayLike<number>, ofs?: number): Out\n * @param ofs 数组起始偏移量\n * @static\n */\n public static fromArray <Out extends IVec4Like> (out: Out, arr: IWritableArrayLike<number>, ofs = 0) {\n out.x = arr[ofs + 0];\n out.y = arr[ofs + 1];\n out.z = arr[ofs + 2];\n out.w = arr[ofs + 3];\n return out;\n }\n\n /**\n * @property {Number} x\n */\n public x: number;\n\n /**\n * @property {Number} y\n */\n public y: number;\n\n /**\n * @property {Number} z\n */\n public z: number;\n\n /**\n * @property {Number} w\n */\n public w: number;\n\n /**\n * !#en\n * Constructor\n * see {{#crossLink \"cc/vec4:method\"}}cc.v4{{/crossLink}}\n * !#zh\n * 构造函数,可查看 {{#crossLink \"cc/vec4:method\"}}cc.v4{{/crossLink}}\n * @method constructor\n * @param {number} [x=0]\n * @param {number} [y=0]\n * @param {number} [z=0]\n * @param {number} [w=0]\n */\n constructor (x: number | Vec4 = 0, y: number = 0, z: number = 0, w: number = 0) {\n super();\n if (x && typeof x === 'object') {\n this.x = x.x;\n this.y = x.y;\n this.z = x.z;\n this.w = x.w;\n } else {\n this.x = x as number;\n this.y = y;\n this.z = z;\n this.w = w;\n }\n }\n\n /**\n * !#en clone a Vec4 value\n * !#zh 克隆一个 Vec4 值\n * @method clone\n * @return {Vec4}\n */\n public clone () {\n return new Vec4(this.x, this.y, this.z, this.w);\n }\n\n /**\n * !#en Set the current vector value with the given vector.\n * !#zh 用另一个向量设置当前的向量对象值。\n * @method set\n * @param {Vec4} newValue - !#en new value to set. !#zh 要设置的新值\n * @return {Vec4} returns this\n */\n public set (other: Vec4);\n\n public set (x?: number, y?: number, z?: number, w?: number);\n\n public set (x?: number | Vec4, y?: number, z?: number, w?: number) {\n if (x && typeof x === 'object') {\n this.x = x.x;\n this.y = x.y;\n this.z = x.z;\n this.w = x.w;\n } else {\n this.x = x as number || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w || 0;\n }\n return this;\n }\n\n /**\n * !#en Check whether the vector equals another one\n * !#zh 当前的向量是否与指定的向量相等。\n * @method equals\n * @param {Vec4} other\n * @param {number} [epsilon]\n * @return {Boolean}\n */\n public equals (other: Vec4, epsilon = EPSILON) {\n return (Math.abs(this.x - other.x) <= epsilon * Math.max(1.0, Math.abs(this.x), Math.abs(other.x)) &&\n Math.abs(this.y - other.y) <= epsilon * Math.max(1.0, Math.abs(this.y), Math.abs(other.y)) &&\n Math.abs(this.z - other.z) <= epsilon * Math.max(1.0, Math.abs(this.z), Math.abs(other.z)) &&\n Math.abs(this.w - other.w) <= epsilon * Math.max(1.0, Math.abs(this.w), Math.abs(other.w)));\n }\n\n /**\n * !#en Check whether the vector equals another one\n * !#zh 判断当前向量是否在误差范围内与指定分量的向量相等。\n * @method equals4f\n * @param {number} x - 相比较的向量的 x 分量。\n * @param {number} y - 相比较的向量的 y 分量。\n * @param {number} z - 相比较的向量的 z 分量。\n * @param {number} w - 相比较的向量的 w 分量。\n * @param {number} [epsilon] - 允许的误差,应为非负数。\n * @returns {Boolean} - 当两向量的各分量都在指定的误差范围内分别相等时,返回 `true`;否则返回 `false`。\n */\n public equals4f (x: number, y: number, z: number, w: number, epsilon = EPSILON) {\n return (Math.abs(this.x - x) <= epsilon * Math.max(1.0, Math.abs(this.x), Math.abs(x)) &&\n Math.abs(this.y - y) <= epsilon * Math.max(1.0, Math.abs(this.y), Math.abs(y)) &&\n Math.abs(this.z - z) <= epsilon * Math.max(1.0, Math.abs(this.z), Math.abs(z)) &&\n Math.abs(this.w - w) <= epsilon * Math.max(1.0, Math.abs(this.w), Math.abs(w)));\n }\n\n /**\n * !#en Check whether strict equals other Vec4\n * !#zh 判断当前向量是否与指定向量相等。两向量的各分量都分别相等时返回 `true`;否则返回 `false`。\n * @method strictEquals\n * @param {Vec4} other - 相比较的向量。\n * @returns {boolean}\n */\n public strictEquals (other: Vec4) {\n return this.x === other.x && this.y === other.y && this.z === other.z && this.w === other.w;\n }\n\n /**\n * !#en Check whether strict equals other Vec4\n * !#zh 判断当前向量是否与指定分量的向量相等。两向量的各分量都分别相等时返回 `true`;否则返回 `false`。\n * @method strictEquals4f\n * @param {number} x - 指定向量的 x 分量。\n * @param {number} y - 指定向量的 y 分量。\n * @param {number} z - 指定向量的 z 分量。\n * @param {number} w - 指定向量的 w 分量。\n * @returns {boolean}\n */\n public strictEquals4f (x: number, y: number, z: number, w: number) {\n return this.x === x && this.y === y && this.z === z && this.w === w;\n }\n\n /**\n * !#en Calculate linear interpolation result between this vector and another one with given ratio\n * !#zh 根据指定的插值比率,从当前向量到目标向量之间做插值。\n * @method lerp\n * @param {Vec4} to 目标向量。\n * @param {number} ratio 插值比率,范围为 [0,1]。\n * @returns {Vec4}\n */\n public lerp (to: Vec4, ratio: number) {\n _x = this.x;\n _y = this.y;\n _z = this.z;\n _w = this.w;\n this.x = _x + ratio * (to.x - _x);\n this.y = _y + ratio * (to.y - _y);\n this.z = _z + ratio * (to.z - _z);\n this.w = _w + ratio * (to.w - _w);\n return this;\n }\n\n /**\n * !#en Transform to string with vector informations\n * !#zh 返回当前向量的字符串表示。\n * @method toString\n * @returns {string} 当前向量的字符串表示。\n */\n public toString (): string {\n return `(${this.x.toFixed(2)}, ${this.y.toFixed(2)}, ${this.z.toFixed(2)}, ${this.w.toFixed(2)})`;\n }\n\n /**\n * !#en Clamp the vector between minInclusive and maxInclusive.\n * !#zh 设置当前向量的值,使其各个分量都处于指定的范围内。\n * @method clampf\n * @param {Vec4} minInclusive 每个分量都代表了对应分量允许的最小值。\n * @param {Vec4} maxInclusive 每个分量都代表了对应分量允许的最大值。\n * @returns {Vec4}\n */\n public clampf (minInclusive: Vec4, maxInclusive: Vec4) {\n this.x = clamp(this.x, minInclusive.x, maxInclusive.x);\n this.y = clamp(this.y, minInclusive.y, maxInclusive.y);\n this.z = clamp(this.z, minInclusive.z, maxInclusive.z);\n this.w = clamp(this.w, minInclusive.w, maxInclusive.w);\n return this;\n }\n\n /**\n * !#en Adds this vector. If you want to save result to another vector, use add() instead.\n * !#zh 向量加法。如果你想保存结果到另一个向量,使用 add() 代替。\n * @method addSelf\n * @param {Vec4} vector\n * @return {Vec4} returns this\n * @chainable\n */\n addSelf (vector: Vec4): this {\n this.x += vector.x;\n this.y += vector.y;\n this.z += vector.z;\n this.w += vector.w;\n return this;\n }\n\n /**\n * !#en Adds two vectors, and returns the new result.\n * !#zh 向量加法,并返回新结果。\n * @method add\n * @param {Vec4} vector\n * @param {Vec4} [out] - optional, the receiving vector, you can pass the same vec4 to save result to itself, if not provided, a new vec4 will be created\n * @return {Vec4} the result\n */\n add (vector: Vec4, out?: Vec4): Vec4 {\n out = out || new Vec4();\n out.x = this.x + vector.x;\n out.y = this.y + vector.y;\n out.z = this.z + vector.z;\n out.w = this.w + vector.w;\n return out;\n }\n\n /**\n * !#en Subtracts one vector from this, and returns the new result.\n * !#zh 向量减法,并返回新结果。\n * @method subtract\n * @param {Vec4} vector\n * @param {Vec4} [out] - optional, the receiving vector, you can pass the same vec4 to save result to itself, if not provided, a new vec4 will be created\n * @return {Vec4} the result\n */\n subtract (vector: Vec4, out?: Vec4): Vec4 {\n out = out || new Vec4();\n out.x = this.x - vector.x;\n out.y = this.y - vector.y;\n out.z = this.z - vector.z;\n out.w = this.w - vector.w;\n return out;\n }\n\n /**\n * !#en Multiplies this by a number.\n * !#zh 缩放当前向量。\n * @method multiplyScalar\n * @param {number} num\n * @return {Vec4} returns this\n * @chainable\n */\n multiplyScalar (num: number): this {\n this.x *= num;\n this.y *= num;\n this.z *= num;\n this.w *= num;\n return this;\n }\n\n /**\n * !#en Multiplies two vectors.\n * !#zh 分量相乘。\n * @method multiply\n * @param {Vec4} vector\n * @return {Vec4} returns this\n * @chainable\n */\n multiply (vector: Vec4): this {\n this.x *= vector.x;\n this.y *= vector.y;\n this.z *= vector.z;\n this.w *= vector.w;\n return this;\n }\n\n /**\n * !#en Divides by a number.\n * !#zh 向量除法。\n * @method divide\n * @param {number} num\n * @return {Vec4} returns this\n * @chainable\n */\n divide (num: number): this {\n this.x /= num;\n this.y /= num;\n this.z /= num;\n this.w /= num;\n return this;\n }\n\n /**\n * !#en Negates the components.\n * !#zh 向量取反\n * @method negate\n * @return {Vec4} returns this\n * @chainable\n */\n negate (): this {\n this.x = -this.x;\n this.y = -this.y;\n this.z = -this.z;\n this.w = -this.w;\n return this;\n }\n\n /**\n * !#en Dot product\n * !#zh 当前向量与指定向量进行点乘。\n * @method dot\n * @param {Vec4} [vector]\n * @return {number} the result\n */\n dot (vector: Vec4): number {\n return this.x * vector.x + this.y * vector.y + this.z * vector.z + this.w * vector.w;\n }\n\n /**\n * !#en Cross product\n * !#zh 当前向量与指定向量进行叉乘。\n * @method cross\n * @param {Vec4} vector\n * @param {Vec4} [out]\n * @return {Vec4} the result\n */\n cross (vector: Vec4, out?: Vec4): Vec4 {\n out = out || new Vec4();\n const { x: ax, y: ay, z: az } = this;\n const { x: bx, y: by, z: bz } = vector;\n\n out.x = ay * bz - az * by;\n out.y = az * bx - ax * bz;\n out.z = ax * by - ay * bx;\n return out;\n }\n\n /**\n * !#en Returns the length of this vector.\n * !#zh 返回该向量的长度。\n * @method len\n * @return {number} the result\n * @example\n * var v = cc.v4(10, 10);\n * v.len(); // return 14.142135623730951;\n */\n len (): number {\n let x = this.x,\n y = this.y,\n z = this.z,\n w = this.w;\n return Math.sqrt(x * x + y * y + z * z + w * w);\n }\n\n /**\n * !#en Returns the squared length of this vector.\n * !#zh 返回该向量的长度平方。\n * @method lengthSqr\n * @return {number} the result\n */\n lengthSqr (): number {\n let x = this.x,\n y = this.y,\n z = this.z,\n w = this.w;\n return x * x + y * y + z * z + w * w;\n }\n\n /**\n * !#en Make the length of this vector to 1.\n * !#zh 向量归一化,让这个向量的长度为 1。\n * @method normalizeSelf\n * @return {Vec4} returns this\n * @chainable\n */\n normalizeSelf () {\n this.normalize(this);\n return this;\n }\n\n /**\n * !#en\n * Returns this vector with a magnitude of 1.<br/>\n * <br/>\n * Note that the current vector is unchanged and a new normalized vector is returned. If you want to normalize the current vector, use normalizeSelf function.\n * !#zh\n * 返回归一化后的向量。<br/>\n * <br/>\n * 注意,当前向量不变,并返回一个新的归一化向量。如果你想来归一化当前向量,可使用 normalizeSelf 函数。\n * @method normalize\n * @param {Vec4} [out] - optional, the receiving vector, you can pass the same vec4 to save result to itself, if not provided, a new vec4 will be created\n * @return {Vec4} result\n */\n normalize (out?: Vec4): Vec4 {\n out = out || new Vec4();\n _x = this.x;\n _y = this.y;\n _z = this.z;\n _w = this.w;\n let len = _x * _x + _y * _y + _z * _z + _w * _w;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n out.x = _x * len;\n out.y = _y * len;\n out.z = _z * len;\n out.w = _w * len;\n }\n return out;\n }\n\n /**\n * Transforms the vec4 with a mat4. 4th vector component is implicitly '1'\n * @method transformMat4\n * @param {Mat4} m matrix to transform with\n * @param {Vec4} [out] the receiving vector, you can pass the same vec4 to save result to itself, if not provided, a new vec4 will be created\n * @returns {Vec4} out\n */\n transformMat4 (matrix: Mat4, out: Vec4): Vec4 {\n out = out || new Vec4();\n _x = this.x;\n _y = this.y;\n _z = this.z;\n _w = this.w;\n let m = matrix.m;\n out.x = m[0] * _x + m[4] * _y + m[8] * _z + m[12] * _w;\n out.y = m[1] * _x + m[5] * _y + m[9] * _z + m[13] * _w;\n out.z = m[2] * _x + m[6] * _y + m[10] * _z + m[14] * _w;\n out.w = m[3] * _x + m[7] * _y + m[11] * _z + m[15] * _w;\n return out;\n }\n\n /**\n * Returns the maximum value in x, y, z, w.\n * @method maxAxis\n * @returns {number}\n */\n maxAxis (): number {\n return Math.max(this.x, this.y, this.z, this.w);\n }\n}\n\nCCClass.fastDefine('cc.Vec4', Vec4, { x: 0, y: 0, z: 0, w: 0 });\n\nexport function v4 (other: Vec4): Vec4;\nexport function v4 (x?: number, y?: number, z?: number, w?: number): Vec4;\n\nexport function v4 (x?: number | Vec4, y?: number, z?: number, w?: number) {\n return new Vec4(x as any, y, z, w);\n}\n\ncc.v4 = v4;\ncc.Vec4 = Vec4;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n\nvar js = cc.js;\n\nif (CC_DEBUG) {\n\n function deprecateEnum (obj, oldPath, newPath, hasTypePrefixBefore) {\n if (!CC_SUPPORT_JIT) {\n return;\n }\n hasTypePrefixBefore = hasTypePrefixBefore !== false;\n var enumDef = Function('return ' + newPath)();\n var entries = cc.Enum.getList(enumDef);\n var delimiter = hasTypePrefixBefore ? '_' : '.';\n for (var i = 0; i < entries.length; i++) {\n var entry = entries[i].name;\n var oldPropName;\n if (hasTypePrefixBefore) {\n var oldTypeName = oldPath.split('.').slice(-1)[0];\n oldPropName = oldTypeName + '_' + entry;\n }\n else {\n oldPropName = entry;\n }\n js.get(obj, oldPropName, function (entry) {\n cc.errorID(1400, oldPath + delimiter + entry, newPath + '.' + entry);\n return enumDef[entry];\n }.bind(null, entry));\n }\n }\n\n function markAsRemoved (ownerCtor, removedProps, ownerName) {\n if (!ownerCtor) {\n // 可能被裁剪了\n return;\n }\n ownerName = ownerName || js.getClassName(ownerCtor);\n removedProps.forEach(function (prop) {\n function error () {\n cc.errorID(1406, ownerName, prop);\n }\n js.getset(ownerCtor.prototype, prop, error, error);\n });\n }\n\n function markAsDeprecated (ownerCtor, deprecatedProps, ownerName) {\n if (!ownerCtor) {\n return;\n }\n ownerName = ownerName || js.getClassName(ownerCtor);\n let descriptors = Object.getOwnPropertyDescriptors(ownerCtor.prototype);\n deprecatedProps.forEach(function (prop) {\n let deprecatedProp = prop[0];\n let newProp = prop[1];\n let descriptor = descriptors[deprecatedProp];\n js.getset(ownerCtor.prototype, deprecatedProp, function () {\n cc.warnID(1400, `${ownerName}.${deprecatedProp}`, `${ownerName}.${newProp}`);\n return descriptor.get.call(this);\n }, function (v) {\n cc.warnID(1400, `${ownerName}.${deprecatedProp}`, `${ownerName}.${newProp}`);\n descriptor.set.call(this, v);\n });\n })\n }\n\n function markAsRemovedInObject (ownerObj, removedProps, ownerName) {\n if (!ownerObj) {\n // 可能被裁剪了\n return;\n }\n removedProps.forEach(function (prop) {\n function error () {\n cc.errorID(1406, ownerName, prop);\n }\n js.getset(ownerObj, prop, error);\n });\n }\n\n function provideClearError (owner, obj, ownerName) {\n if (!owner) {\n // 可能被裁剪了\n return;\n }\n var className = ownerName || cc.js.getClassName(owner);\n var Info = 'Sorry, ' + className + '.%s is removed, please use %s instead.';\n for (var prop in obj) {\n function define (prop, getset) {\n function accessor (newProp) {\n cc.error(Info, prop, newProp);\n }\n if (!Array.isArray(getset)) {\n getset = getset.split(',')\n .map(function (x) {\n return x.trim();\n });\n }\n try {\n js.getset(owner, prop, accessor.bind(null, getset[0]), getset[1] && accessor.bind(null, getset[1]));\n }\n catch (e) {}\n }\n var getset = obj[prop];\n if (prop[0] === '*') {\n // get set\n var etProp = prop.slice(1);\n define('g' + etProp, getset);\n define('s' + etProp, getset);\n }\n else {\n prop.split(',')\n .map(function (x) {\n return x.trim();\n })\n .forEach(function (x) {\n define(x, getset);\n });\n }\n }\n }\n\n function markFunctionWarning (ownerCtor, obj, ownerName) {\n if (!ownerCtor) {\n // 可能被裁剪了\n return;\n }\n ownerName = ownerName || js.getClassName(ownerCtor);\n for (var prop in obj) {\n (function(){\n var propName = prop;\n var originFunc = ownerCtor[propName];\n if (!originFunc) return;\n\n function warn () {\n cc.warn('Sorry, %s.%s is deprecated. Please use %s instead', ownerName, propName, obj[propName]);\n return originFunc.apply(this, arguments);\n }\n\n ownerCtor[propName] = warn;\n })();\n }\n }\n // remove cc.info\n js.get(cc, 'info', function () {\n cc.errorID(1400, 'cc.info', 'cc.log');\n return cc.log;\n });\n // cc.spriteFrameCache\n js.get(cc, \"spriteFrameCache\", function () {\n cc.errorID(1404);\n });\n\n // cc.vmath\n js.get(cc, 'vmath', function () {\n cc.warnID(1400, 'cc.vmath', 'cc.math');\n return cc.math;\n });\n js.get(cc.math, 'vec2', function () {\n cc.warnID(1400, 'cc.vmath.vec2', 'cc.Vec2');\n return cc.Vec2;\n })\n js.get(cc.math, 'vec3', function () {\n cc.warnID(1400, 'cc.vmath.vec3', 'cc.Vec3');\n return cc.Vec3;\n })\n js.get(cc.math, 'vec4', function () {\n cc.warnID(1400, 'cc.vmath.vec4', 'cc.Vec4');\n return cc.Vec4;\n })\n js.get(cc.math, 'mat4', function () {\n cc.warnID(1400, 'cc.vmath.mat4', 'cc.Mat4');\n return cc.Mat4;\n })\n js.get(cc.math, 'mat3', function () {\n cc.warnID(1400, 'cc.vmath.mat3', 'cc.Mat3');\n return cc.Mat3;\n })\n js.get(cc.math, 'quat', function () {\n cc.warnID(1400, 'cc.vmath.quat', 'cc.Quat');\n return cc.Quat;\n })\n\n // SpriteFrame\n js.get(cc.SpriteFrame.prototype, '_textureLoaded', function () {\n cc.errorID(1400, 'spriteFrame._textureLoaded', 'spriteFrame.textureLoaded()');\n return this.textureLoaded();\n });\n markAsRemoved(cc.SpriteFrame, [\n 'addLoadedEventListener'\n ]);\n markFunctionWarning(cc.Sprite.prototype, {\n setState: 'cc.Sprite.setMaterial',\n getState: 'cc.Sprite.getMaterial'\n }, 'cc.Sprite');\n\n js.get(cc.SpriteFrame.prototype, 'clearTexture', function () {\n cc.errorID(1406, 'cc.SpriteFrame', 'clearTexture');\n return function () {};\n });\n\n // cc.textureCache\n js.get(cc, 'textureCache', function () {\n cc.errorID(1406, 'cc', 'textureCache');\n });\n\n // Texture\n let Texture2D = cc.Texture2D;\n js.get(Texture2D.prototype, 'releaseTexture', function () {\n cc.errorID(1400, 'texture.releaseTexture()', 'texture.destroy()');\n return this.destroy;\n });\n\n js.get(Texture2D.prototype, 'getName', function () {\n cc.errorID(1400, 'texture.getName()', 'texture._glID');\n return function () {\n return this._glID || null;\n };\n });\n\n js.get(Texture2D.prototype, 'isLoaded', function () {\n cc.errorID(1400, 'texture.isLoaded function', 'texture.loaded property');\n return (function () {\n return this.loaded;\n });\n });\n\n js.get(Texture2D.prototype, 'setAntiAliasTexParameters', function () {\n cc.errorID(1400, 'texture.setAntiAliasTexParameters()', 'texture.setFilters(cc.Texture2D.Filter.LINEAR, cc.Texture2D.Filter.LINEAR)');\n return function () {\n this.setFilters(Texture2D.Filter.LINEAR, Texture2D.Filter.LINEAR);\n };\n });\n\n js.get(Texture2D.prototype, 'setAliasTexParameters', function () {\n cc.errorID(1400, 'texture.setAntiAliasTexParameters()', 'texture.setFilters(cc.Texture2D.Filter.NEAREST, cc.Texture2D.Filter.NEAREST)');\n return function () {\n this.setFilters(Texture2D.Filter.NEAREST, Texture2D.Filter.NEAREST);\n };\n });\n\n // cc.macro\n markAsRemovedInObject(cc.macro, [\n 'ENABLE_GL_STATE_CACHE',\n 'FIX_ARTIFACTS_BY_STRECHING_TEXEL',\n ], 'cc.macro');\n\n provideClearError(cc.macro, {\n PI: 'Math.PI',\n PI2: 'Math.PI * 2',\n FLT_MAX: 'Number.MAX_VALUE',\n FLT_MIN: 'Number.MIN_VALUE',\n UINT_MAX: 'Number.MAX_SAFE_INTEGER'\n }, 'cc.macro');\n\n // cc.game\n markAsRemovedInObject(cc.game, [\n 'CONFIG_KEY',\n ], 'cc.game');\n\n // cc.sys\n markAsRemovedInObject(cc.sys, [\n 'dumpRoot',\n 'cleanScript',\n 'BROWSER_TYPE_WECHAT_GAME',\n 'BROWSER_TYPE_WECHAT_GAME_SUB',\n 'BROWSER_TYPE_BAIDU_GAME',\n 'BROWSER_TYPE_BAIDU_GAME_SUB',\n 'BROWSER_TYPE_XIAOMI_GAME',\n 'BROWSER_TYPE_ALIPAY_GAME',\n ], 'cc.sys');\n\n // cc.Director\n provideClearError(cc.Director, {\n EVENT_PROJECTION_CHANGED: '',\n EVENT_BEFORE_VISIT: 'EVENT_AFTER_UPDATE',\n EVENT_AFTER_VISIT: 'EVENT_BEFORE_DRAW',\n }, 'cc.Director');\n markFunctionWarning(cc.Director.prototype, {\n convertToGL: 'cc.view.convertToLocationInView',\n convertToUI: '',\n getWinSize: 'cc.winSize',\n getWinSizeInPixels: 'cc.winSize',\n getVisibleSize: 'cc.view.getVisibleSize',\n getVisibleOrigin: 'cc.view.getVisibleOrigin',\n purgeCachedData: 'cc.assetManager.releaseAll',\n setDepthTest: 'cc.Camera.main.depth',\n setClearColor: 'cc.Camera.main.backgroundColor',\n getRunningScene: 'cc.director.getScene',\n getAnimationInterval: 'cc.game.getFrameRate',\n setAnimationInterval: 'cc.game.setFrameRate',\n isDisplayStats: 'cc.debug.isDisplayStats',\n setDisplayStats: 'cc.debug.setDisplayStats',\n stopAnimation: 'cc.game.pause',\n startAnimation: 'cc.game.resume',\n }, 'cc.Director');\n markAsRemoved(cc.Director, [\n 'pushScene',\n 'popScene',\n 'popToRootScene',\n 'popToSceneStackLevel',\n 'setProjection',\n 'getProjection',\n ], 'cc.Director');\n\n // Scheduler\n provideClearError(cc.Scheduler, {\n scheduleCallbackForTarget: 'schedule',\n scheduleUpdateForTarget: 'scheduleUpdate',\n unscheduleCallbackForTarget: 'unschedule',\n unscheduleUpdateForTarget: 'unscheduleUpdate',\n unscheduleAllCallbacksForTarget: 'unscheduleAllForTarget',\n unscheduleAllCallbacks: 'unscheduleAll',\n unscheduleAllCallbacksWithMinPriority: 'unscheduleAllWithMinPriority'\n }, 'cc.Scheduler');\n\n // cc.view\n provideClearError(cc.view, {\n adjustViewPort: 'adjustViewportMeta',\n setViewPortInPoints: 'setViewportInPoints',\n getViewPortRect: 'getViewportRect'\n }, 'cc.view');\n markAsRemovedInObject(cc.view, [\n 'isViewReady',\n 'setTargetDensityDPI',\n 'getTargetDensityDPI',\n 'setFrameZoomFactor',\n 'canSetContentScaleFactor',\n 'setContentTranslateLeftTop',\n 'getContentTranslateLeftTop',\n 'setViewName',\n 'getViewName'\n ], 'cc.view');\n\n // cc.PhysicsManager\n markAsRemoved(cc.PhysicsManager, [\n 'attachDebugDrawToCamera',\n 'detachDebugDrawFromCamera',\n ]);\n\n // cc.CollisionManager\n markAsRemoved(cc.CollisionManager, [\n 'attachDebugDrawToCamera',\n 'detachDebugDrawFromCamera',\n ]);\n\n // cc.Node\n provideClearError(cc._BaseNode.prototype, {\n 'tag': 'name',\n 'getTag': 'name',\n 'setTag': 'name',\n 'getChildByTag': 'getChildByName',\n 'removeChildByTag': 'getChildByName(name).destroy()'\n });\n\n markAsRemoved(cc.Node, [\n '_cascadeColorEnabled',\n 'cascadeColor',\n 'isCascadeColorEnabled',\n 'setCascadeColorEnabled',\n '_cascadeOpacityEnabled',\n 'cascadeOpacity',\n 'isCascadeOpacityEnabled',\n 'setCascadeOpacityEnabled',\n 'opacityModifyRGB',\n 'isOpacityModifyRGB',\n 'setOpacityModifyRGB',\n 'ignoreAnchor',\n 'isIgnoreAnchorPointForPosition',\n 'ignoreAnchorPointForPosition',\n 'isRunning',\n '_sgNode',\n ]);\n\n markFunctionWarning(cc.Node.prototype, {\n getNodeToParentTransform: 'getLocalMatrix',\n getNodeToParentTransformAR: 'getLocalMatrix',\n getNodeToWorldTransform: 'getWorldMatrix',\n getNodeToWorldTransformAR: 'getWorldMatrix',\n getParentToNodeTransform: 'getLocalMatrix',\n getWorldToNodeTransform: 'getWorldMatrix',\n convertTouchToNodeSpace: 'convertToNodeSpaceAR',\n convertTouchToNodeSpaceAR: 'convertToNodeSpaceAR',\n convertToWorldSpace: 'convertToWorldSpaceAR',\n convertToNodeSpace: 'convertToNodeSpaceAR'\n });\n\n provideClearError(cc.Node.prototype, {\n getRotationX: 'rotationX',\n setRotationX: 'rotationX',\n getRotationY: 'rotationY',\n setRotationY: 'rotationY',\n getPositionX: 'x',\n setPositionX: 'x',\n getPositionY: 'y',\n setPositionY: 'y',\n getSkewX: 'skewX',\n setSkewX: 'skewX',\n getSkewY: 'skewY',\n setSkewY: 'skewY',\n getScaleX: 'scaleX',\n setScaleX: 'scaleX',\n getScaleY: 'scaleY',\n setScaleY: 'scaleY',\n getOpacity: 'opacity',\n setOpacity: 'opacity',\n getColor: 'color',\n setColor: 'color',\n getLocalZOrder: 'zIndex',\n setLocalZOrder: 'zIndex',\n });\n\n provideClearError(cc.Sprite.prototype, {\n setInsetLeft: 'cc.SpriteFrame insetLeft',\n setInsetRight: 'cc.SpriteFrame insetRight',\n setInsetTop: 'cc.SpriteFrame insetTop',\n setInsetBottom: 'cc.SpriteFrame insetBottom',\n });\n\n // cc.Material\n cc.Material.getInstantiatedBuiltinMaterial = cc.MaterialVariant.createWithBuiltin;\n cc.Material.getInstantiatedMaterial = cc.MaterialVariant.create;\n markFunctionWarning(cc.Material, {\n getInstantiatedBuiltinMaterial: 'cc.MaterialVariant.createWithBuiltin',\n getInstantiatedMaterial: 'cc.MaterialVariant.create'\n });\n\n // cc.RenderComponent\n cc.js.getset(cc.RenderComponent.prototype, 'sharedMaterials', function () {\n cc.warnID(1400, 'sharedMaterials', 'getMaterials');\n return this.materials;\n }, function (v) {\n cc.warnID(1400, 'sharedMaterials', 'setMaterial');\n this.materials = v;\n });\n\n // cc.Follow\n markFunctionWarning(cc.Follow.prototype, {\n setBoudarySet : 'cc.Follow.setBoundarySet'\n });\n\n // cc.Camera\n markFunctionWarning(cc.Camera.prototype, {\n getNodeToCameraTransform: 'getWorldToScreenMatrix2D',\n getCameraToWorldPoint: 'getScreenToWorldPoint',\n getWorldToCameraPoint: 'getWorldToScreenPoint',\n getCameraToWorldMatrix: 'getScreenToWorldMatrix2D',\n getWorldToCameraMatrix: 'getWorldToScreenMatrix2D'\n });\n\n markAsRemoved(cc.Camera, [\n 'addTarget',\n 'removeTarget',\n 'getTargets'\n ]);\n\n // SCENE\n var ERR = '\"%s\" is not defined in the Scene, it is only defined in normal nodes.';\n CC_EDITOR || Object.defineProperties(cc.Scene.prototype, {\n active: {\n get: function () {\n cc.error(ERR, 'active');\n return true;\n },\n set: function () {\n cc.error(ERR, 'active');\n }\n },\n activeInHierarchy: {\n get: function () {\n cc.error(ERR, 'activeInHierarchy');\n return true;\n },\n },\n getComponent: {\n get: function () {\n cc.error(ERR, 'getComponent');\n return function () {\n return null;\n };\n }\n },\n addComponent: {\n get: function () {\n cc.error(ERR, 'addComponent');\n return function () {\n return null;\n };\n }\n },\n });\n\n // cc.dynamicAtlasManager\n markAsRemovedInObject(cc.dynamicAtlasManager, [\n 'minFrameSize'\n ], 'cc.dynamicAtlasManager')\n\n // light component\n if (cc.Light) {\n markAsRemovedInObject(cc.Light.prototype, [\n 'shadowDepthScale',\n ], 'cc.Light.prototype');\n }\n\n // Value types\n provideClearError(cc, {\n // AffineTransform\n affineTransformMake: 'cc.AffineTransform.create',\n affineTransformMakeIdentity: 'cc.AffineTransform.identity',\n affineTransformClone: 'cc.AffineTransform.clone',\n affineTransformConcat: 'cc.AffineTransform.concat',\n affineTransformConcatIn: 'cc.AffineTransform.concat',\n affineTransformInvert: 'cc.AffineTransform.invert',\n affineTransformInvertIn: 'cc.AffineTransform.invert',\n affineTransformInvertOut: 'cc.AffineTransform.invert',\n affineTransformEqualToTransform: 'cc.AffineTransform.equal',\n pointApplyAffineTransform: 'cc.AffineTransform.transformVec2',\n sizeApplyAffineTransform: 'cc.AffineTransform.transformSize',\n rectApplyAffineTransform: 'cc.AffineTransform.transformRect',\n obbApplyAffineTransform: 'cc.AffineTransform.transformObb',\n\n // Vec2\n pointEqualToPoint: 'cc.Vec2 equals',\n\n // Size\n sizeEqualToSize: 'cc.Size equals',\n\n // Rect\n rectEqualToRect: 'rectA.equals(rectB)',\n rectContainsRect: 'rectA.containsRect(rectB)',\n rectContainsPoint: 'rect.contains(vec2)',\n rectOverlapsRect: 'rectA.intersects(rectB)',\n rectIntersectsRect: 'rectA.intersects(rectB)',\n rectIntersection: 'rectA.intersection(intersection, rectB)',\n rectUnion: 'rectA.union(union, rectB)',\n rectGetMaxX: 'rect.xMax',\n rectGetMidX: 'rect.center.x',\n rectGetMinX: 'rect.xMin',\n rectGetMaxY: 'rect.yMax',\n rectGetMidY: 'rect.center.y',\n rectGetMinY: 'rect.yMin',\n\n // Color\n colorEqual: 'colorA.equals(colorB)',\n hexToColor: 'color.fromHEX(hexColor)',\n colorToHex: 'color.toHEX()',\n\n // Enums\n TextAlignment: 'cc.macro.TextAlignment',\n VerticalTextAlignment: 'cc.macro.VerticalTextAlignment',\n\n // Point Extensions\n pNeg: 'p.neg()',\n pAdd: 'p1.add(p2)',\n pSub: 'p1.sub(p2)',\n pMult: 'p.mul(factor)',\n pMidpoint: 'p1.add(p2).mul(0.5)',\n pDot: 'p1.dot(p2)',\n pCross: 'p1.cross(p2)',\n pPerp: 'p.rotate(-90 * Math.PI / 180)',\n pRPerp: 'p.rotate(90 * Math.PI / 180)',\n pProject: 'p1.project(p2)',\n pLengthSQ: 'p.magSqr()',\n pDistanceSQ: 'p1.sub(p2).magSqr()',\n pLength: 'p.mag()',\n pDistance: 'p1.sub(p2).mag()',\n pNormalize: 'p.normalize()',\n pForAngle: 'cc.v2(Math.cos(a), Math.sin(a))',\n pToAngle: 'Math.atan2(v.y, v.x)',\n pZeroIn: 'p.x = p.y = 0',\n pIn: 'p1.set(p2)',\n pMultIn: 'p.mulSelf(factor)',\n pSubIn: 'p1.subSelf(p2)',\n pAddIn: 'p1.addSelf(p2)',\n pNormalizeIn: 'p.normalizeSelf()',\n pSameAs: 'p1.equals(p2)',\n pAngle: 'v1.angle(v2)',\n pAngleSigned: 'v1.signAngle(v2)',\n pRotateByAngle: 'p.rotate(radians)',\n pCompMult: 'v1.multiply(v2)',\n pFuzzyEqual: 'v1.fuzzyEquals(v2, tolerance)',\n pLerp: 'p.lerp(endPoint, ratio)',\n pClamp: 'p.clampf(min_inclusive, max_inclusive)',\n\n rand: 'Math.random() * 0xffffff',\n randomMinus1To1: '(Math.random() - 0.5) * 2',\n\n container: 'cc.game.container',\n _canvas: 'cc.game.canvas',\n _renderType: 'cc.game.renderType',\n\n _getError: 'cc.debug.getError',\n _initDebugSetting: 'cc.debug._resetDebugSetting',\n DebugMode: 'cc.debug.DebugMode',\n }, 'cc');\n markAsRemovedInObject(cc, [\n 'blendFuncDisable',\n\n 'pFromSize',\n 'pCompOp',\n 'pIntersectPoint',\n 'pSegmentIntersect',\n 'pLineIntersect',\n\n 'obbApplyMatrix',\n\n 'getImageFormatByData',\n\n 'initEngine',\n ], 'cc');\n markFunctionWarning(cc, {\n // cc.p\n p: 'cc.v2'\n }, 'cc');\n // cc.Rect\n provideClearError(cc.Rect, {\n contain: 'rectA.contains(rectB)',\n transformMat4: 'rect.transformMat4(out, mat4)'\n });\n // cc.Color\n provideClearError(cc.Color, {\n rgb2hsv: 'color.toHSV()',\n hsv2rgb: 'color.fromHSV(h, s, v)'\n });\n markFunctionWarning(cc.Color, {\n fromHex: 'cc.Color.fromHEX',\n })\n\n // macro functions\n js.get(cc, 'lerp', function () {\n cc.errorID(1400, 'cc.lerp', 'cc.misc.lerp');\n return cc.misc.lerp;\n });\n js.get(cc, 'random0To1', function () {\n cc.errorID(1400, 'cc.random0To1', 'Math.random');\n return Math.random;\n });\n js.get(cc, 'degreesToRadians', function () {\n cc.errorID(1400, 'cc.degreesToRadians', 'cc.misc.degreesToRadians');\n return cc.misc.degreesToRadians;\n });\n js.get(cc, 'radiansToDegrees', function () {\n cc.errorID(1400, 'cc.radiansToDegrees', 'cc.misc.radiansToDegrees');\n return cc.misc.radiansToDegrees;\n });\n js.get(cc, 'clampf', function () {\n cc.errorID(1400, 'cc.clampf', 'cc.misc.clampf');\n return cc.misc.clampf;\n });\n js.get(cc, 'clamp01', function () {\n cc.errorID(1400, 'cc.clamp01', 'cc.misc.clamp01');\n return cc.misc.clamp01;\n });\n js.get(cc, 'ImageFormat', function () {\n cc.errorID(1400, 'cc.ImageFormat', 'cc.macro.ImageFormat');\n return cc.macro.ImageFormat;\n });\n js.get(cc, 'KEY', function () {\n cc.errorID(1400, 'cc.KEY', 'cc.macro.KEY');\n return cc.macro.KEY;\n });\n js.get(cc, 'Easing', function () {\n cc.errorID(1400, 'cc.Easing', 'cc.easing');\n return cc.easing;\n });\n\n // cc.isChildClassOf\n js.get(cc, 'isChildClassOf', function () {\n cc.errorID(1400, 'cc.isChildClassOf', 'cc.js.isChildClassOf');\n return cc.js.isChildClassOf;\n });\n\n // dragon bones\n if (typeof dragonBones === 'object' && typeof dragonBones.CCFactory !== 'undefined') {\n js.get(dragonBones.CCFactory, 'getFactory', function () {\n cc.errorID(1400, 'dragonBones.CCFactory.getFactory', 'dragonBones.CCFactory.getInstance');\n return dragonBones.CCFactory.getInstance;\n });\n }\n\n // renderEngine\n cc.renderer.renderEngine = {\n get gfx () {\n cc.warnID(1400, 'cc.renderer.renderEngine.gfx', 'cc.gfx');\n return cc.gfx;\n },\n get math () {\n cc.warnID(1400, 'cc.renderer.renderEngine.math', 'cc.math');\n return cc.vmath;\n },\n get InputAssembler () {\n cc.warnID(1400, 'cc.renderer.renderEngine.InputAssembler', 'cc.renderer.InputAssembler');\n return cc.renderer.InputAssembler;\n }\n };\n \n // audio\n markAsRemovedInObject(cc.audioEngine, [\n 'getProfile',\n 'preload',\n 'setMaxWebAudioSize',\n ], 'cc.audioEngine');\n}\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nrequire('./core/CCGame');\n\n// ensure modular-cocos2d can determine whether action module is included\nrequire('./actions');","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst Asset = require('../core/assets/CCAsset');\nconst CCSpriteFrame = require('../core/assets/CCSpriteFrame');\n\n/**\n * Class for particle asset handling.\n * @class ParticleAsset\n * @extends Asset\n */\nvar ParticleAsset = cc.Class({\n name: 'cc.ParticleAsset',\n extends: Asset,\n\n properties: {\n spriteFrame: {\n default: null,\n type: CCSpriteFrame\n }\n }\n});\n\ncc.ParticleAsset = module.exports = ParticleAsset;\n","'use strict';\n\n/**\n * enums\n */\nconst enums = {\n // buffer usage\n USAGE_STATIC: 35044, // gl.STATIC_DRAW\n USAGE_DYNAMIC: 35048, // gl.DYNAMIC_DRAW\n USAGE_STREAM: 35040, // gl.STREAM_DRAW\n\n // index buffer format\n INDEX_FMT_UINT8: 5121, // gl.UNSIGNED_BYTE\n INDEX_FMT_UINT16: 5123, // gl.UNSIGNED_SHORT\n INDEX_FMT_UINT32: 5125, // gl.UNSIGNED_INT (OES_element_index_uint)\n\n // vertex attribute semantic\n ATTR_POSITION: 'a_position',\n ATTR_NORMAL: 'a_normal',\n ATTR_TANGENT: 'a_tangent',\n ATTR_BITANGENT: 'a_bitangent',\n ATTR_WEIGHTS: 'a_weights',\n ATTR_JOINTS: 'a_joints',\n ATTR_COLOR: 'a_color',\n ATTR_COLOR0: 'a_color0',\n ATTR_COLOR1: 'a_color1',\n ATTR_UV: 'a_uv',\n ATTR_UV0: 'a_uv0',\n ATTR_UV1: 'a_uv1',\n ATTR_UV2: 'a_uv2',\n ATTR_UV3: 'a_uv3',\n ATTR_UV4: 'a_uv4',\n ATTR_UV5: 'a_uv5',\n ATTR_UV6: 'a_uv6',\n ATTR_UV7: 'a_uv7',\n\n // vertex attribute type\n ATTR_TYPE_INT8: 5120, // gl.BYTE\n ATTR_TYPE_UINT8: 5121, // gl.UNSIGNED_BYTE\n ATTR_TYPE_INT16: 5122, // gl.SHORT\n ATTR_TYPE_UINT16: 5123, // gl.UNSIGNED_SHORT\n ATTR_TYPE_INT32: 5124, // gl.INT\n ATTR_TYPE_UINT32: 5125, // gl.UNSIGNED_INT\n ATTR_TYPE_FLOAT32: 5126, // gl.FLOAT\n\n // texture filter\n FILTER_NEAREST: 0,\n FILTER_LINEAR: 1,\n\n // texture wrap mode\n WRAP_REPEAT: 10497, // gl.REPEAT\n WRAP_CLAMP: 33071, // gl.CLAMP_TO_EDGE\n WRAP_MIRROR: 33648, // gl.MIRRORED_REPEAT\n\n // texture format\n // compress formats\n TEXTURE_FMT_RGB_DXT1: 0,\n TEXTURE_FMT_RGBA_DXT1: 1,\n TEXTURE_FMT_RGBA_DXT3: 2,\n TEXTURE_FMT_RGBA_DXT5: 3,\n TEXTURE_FMT_RGB_ETC1: 4,\n TEXTURE_FMT_RGB_PVRTC_2BPPV1: 5,\n TEXTURE_FMT_RGBA_PVRTC_2BPPV1: 6,\n TEXTURE_FMT_RGB_PVRTC_4BPPV1: 7,\n TEXTURE_FMT_RGBA_PVRTC_4BPPV1: 8,\n\n // normal formats\n TEXTURE_FMT_A8: 9,\n TEXTURE_FMT_L8: 10,\n TEXTURE_FMT_L8_A8: 11,\n TEXTURE_FMT_R5_G6_B5: 12,\n TEXTURE_FMT_R5_G5_B5_A1: 13,\n TEXTURE_FMT_R4_G4_B4_A4: 14,\n TEXTURE_FMT_RGB8: 15,\n TEXTURE_FMT_RGBA8: 16,\n TEXTURE_FMT_RGB16F: 17,\n TEXTURE_FMT_RGBA16F: 18,\n TEXTURE_FMT_RGB32F: 19,\n TEXTURE_FMT_RGBA32F: 20,\n TEXTURE_FMT_R32F: 21,\n TEXTURE_FMT_111110F: 22,\n TEXTURE_FMT_SRGB: 23,\n TEXTURE_FMT_SRGBA: 24,\n\n // depth formats\n TEXTURE_FMT_D16: 25,\n TEXTURE_FMT_D32: 26,\n TEXTURE_FMT_D24S8: 27,\n\n // etc2 format\n TEXTURE_FMT_RGB_ETC2: 28,\n TEXTURE_FMT_RGBA_ETC2: 29,\n\n // depth and stencil function\n DS_FUNC_NEVER: 512, // gl.NEVER\n DS_FUNC_LESS: 513, // gl.LESS\n DS_FUNC_EQUAL: 514, // gl.EQUAL\n DS_FUNC_LEQUAL: 515, // gl.LEQUAL\n DS_FUNC_GREATER: 516, // gl.GREATER\n DS_FUNC_NOTEQUAL: 517, // gl.NOTEQUAL\n DS_FUNC_GEQUAL: 518, // gl.GEQUAL\n DS_FUNC_ALWAYS: 519, // gl.ALWAYS\n\n // render-buffer format\n RB_FMT_RGBA4: 32854, // gl.RGBA4\n RB_FMT_RGB5_A1: 32855, // gl.RGB5_A1\n RB_FMT_RGB565: 36194, // gl.RGB565\n RB_FMT_D16: 33189, // gl.DEPTH_COMPONENT16\n RB_FMT_S8: 36168, // gl.STENCIL_INDEX8\n RB_FMT_D24S8: 34041, // gl.DEPTH_STENCIL\n\n // blend-equation\n BLEND_FUNC_ADD: 32774, // gl.FUNC_ADD\n BLEND_FUNC_SUBTRACT: 32778, // gl.FUNC_SUBTRACT\n BLEND_FUNC_REVERSE_SUBTRACT: 32779, // gl.FUNC_REVERSE_SUBTRACT\n\n // blend\n BLEND_ZERO: 0, // gl.ZERO\n BLEND_ONE: 1, // gl.ONE\n BLEND_SRC_COLOR: 768, // gl.SRC_COLOR\n BLEND_ONE_MINUS_SRC_COLOR: 769, // gl.ONE_MINUS_SRC_COLOR\n BLEND_DST_COLOR: 774, // gl.DST_COLOR\n BLEND_ONE_MINUS_DST_COLOR: 775, // gl.ONE_MINUS_DST_COLOR\n BLEND_SRC_ALPHA: 770, // gl.SRC_ALPHA\n BLEND_ONE_MINUS_SRC_ALPHA: 771, // gl.ONE_MINUS_SRC_ALPHA\n BLEND_DST_ALPHA: 772, // gl.DST_ALPHA\n BLEND_ONE_MINUS_DST_ALPHA: 773, // gl.ONE_MINUS_DST_ALPHA\n BLEND_CONSTANT_COLOR: 32769, // gl.CONSTANT_COLOR\n BLEND_ONE_MINUS_CONSTANT_COLOR: 32770, // gl.ONE_MINUS_CONSTANT_COLOR\n BLEND_CONSTANT_ALPHA: 32771, // gl.CONSTANT_ALPHA\n BLEND_ONE_MINUS_CONSTANT_ALPHA: 32772, // gl.ONE_MINUS_CONSTANT_ALPHA\n BLEND_SRC_ALPHA_SATURATE: 776, // gl.SRC_ALPHA_SATURATE\n\n // stencil operation\n STENCIL_DISABLE: 0, // disable stencil\n STENCIL_ENABLE: 1, // enable stencil\n STENCIL_INHERIT: 2, // inherit stencil states\n\n STENCIL_OP_KEEP: 7680, // gl.KEEP\n STENCIL_OP_ZERO: 0, // gl.ZERO\n STENCIL_OP_REPLACE: 7681, // gl.REPLACE\n STENCIL_OP_INCR: 7682, // gl.INCR\n STENCIL_OP_INCR_WRAP: 34055, // gl.INCR_WRAP\n STENCIL_OP_DECR: 7683, // gl.DECR\n STENCIL_OP_DECR_WRAP: 34056, // gl.DECR_WRAP\n STENCIL_OP_INVERT: 5386, // gl.INVERT\n\n // cull\n CULL_NONE: 0,\n CULL_FRONT: 1028,\n CULL_BACK: 1029,\n CULL_FRONT_AND_BACK: 1032,\n\n // primitive type\n PT_POINTS: 0, // gl.POINTS\n PT_LINES: 1, // gl.LINES\n PT_LINE_LOOP: 2, // gl.LINE_LOOP\n PT_LINE_STRIP: 3, // gl.LINE_STRIP\n PT_TRIANGLES: 4, // gl.TRIANGLES\n PT_TRIANGLE_STRIP: 5, // gl.TRIANGLE_STRIP\n PT_TRIANGLE_FAN: 6, // gl.TRIANGLE_FAN\n};\n\nlet RenderQueue = {\n OPAQUE: 0,\n TRANSPARENT: 1,\n OVERLAY: 2\n};\n\n/**\n * JS Implementation of MurmurHash2\n * \n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:aappleby@gmail.com\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n * \n * @param {string} str ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n\nfunction murmurhash2_32_gc(str, seed) {\n var\n l = str.length,\n h = seed ^ l,\n i = 0,\n k;\n \n while (l >= 4) {\n \tk = \n \t ((str.charCodeAt(i) & 0xff)) |\n \t ((str.charCodeAt(++i) & 0xff) << 8) |\n \t ((str.charCodeAt(++i) & 0xff) << 16) |\n \t ((str.charCodeAt(++i) & 0xff) << 24);\n \n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n k ^= k >>> 24;\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n\n\th = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)) ^ k;\n\n l -= 4;\n ++i;\n }\n \n switch (l) {\n case 3: h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n case 2: h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n case 1: h ^= (str.charCodeAt(i) & 0xff);\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n }\n\n h ^= h >>> 13;\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n h ^= h >>> 15;\n\n return h >>> 0;\n}\n\n// Extensions\nvar WebGLEXT;\n(function (WebGLEXT) {\n WebGLEXT[WebGLEXT[\"COMPRESSED_RGB_S3TC_DXT1_EXT\"] = 33776] = \"COMPRESSED_RGB_S3TC_DXT1_EXT\";\n WebGLEXT[WebGLEXT[\"COMPRESSED_RGBA_S3TC_DXT1_EXT\"] = 33777] = \"COMPRESSED_RGBA_S3TC_DXT1_EXT\";\n WebGLEXT[WebGLEXT[\"COMPRESSED_RGBA_S3TC_DXT3_EXT\"] = 33778] = \"COMPRESSED_RGBA_S3TC_DXT3_EXT\";\n WebGLEXT[WebGLEXT[\"COMPRESSED_RGBA_S3TC_DXT5_EXT\"] = 33779] = \"COMPRESSED_RGBA_S3TC_DXT5_EXT\";\n WebGLEXT[WebGLEXT[\"COMPRESSED_SRGB_S3TC_DXT1_EXT\"] = 35916] = \"COMPRESSED_SRGB_S3TC_DXT1_EXT\";\n WebGLEXT[WebGLEXT[\"COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT\"] = 35917] = \"COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT\";\n WebGLEXT[WebGLEXT[\"COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT\"] = 35918] = \"COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT\";\n WebGLEXT[WebGLEXT[\"COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT\"] = 35919] = \"COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT\";\n WebGLEXT[WebGLEXT[\"COMPRESSED_RGB_PVRTC_4BPPV1_IMG\"] = 35840] = \"COMPRESSED_RGB_PVRTC_4BPPV1_IMG\";\n WebGLEXT[WebGLEXT[\"COMPRESSED_RGB_PVRTC_2BPPV1_IMG\"] = 35841] = \"COMPRESSED_RGB_PVRTC_2BPPV1_IMG\";\n WebGLEXT[WebGLEXT[\"COMPRESSED_RGBA_PVRTC_4BPPV1_IMG\"] = 35842] = \"COMPRESSED_RGBA_PVRTC_4BPPV1_IMG\";\n WebGLEXT[WebGLEXT[\"COMPRESSED_RGBA_PVRTC_2BPPV1_IMG\"] = 35843] = \"COMPRESSED_RGBA_PVRTC_2BPPV1_IMG\";\n WebGLEXT[WebGLEXT[\"COMPRESSED_RGB_ETC1_WEBGL\"] = 36196] = \"COMPRESSED_RGB_ETC1_WEBGL\";\n})(WebGLEXT || (WebGLEXT = {}));\nvar GFXObjectType;\n(function (GFXObjectType) {\n GFXObjectType[GFXObjectType[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n GFXObjectType[GFXObjectType[\"BUFFER\"] = 1] = \"BUFFER\";\n GFXObjectType[GFXObjectType[\"TEXTURE\"] = 2] = \"TEXTURE\";\n GFXObjectType[GFXObjectType[\"TEXTURE_VIEW\"] = 3] = \"TEXTURE_VIEW\";\n GFXObjectType[GFXObjectType[\"RENDER_PASS\"] = 4] = \"RENDER_PASS\";\n GFXObjectType[GFXObjectType[\"FRAMEBUFFER\"] = 5] = \"FRAMEBUFFER\";\n GFXObjectType[GFXObjectType[\"SAMPLER\"] = 6] = \"SAMPLER\";\n GFXObjectType[GFXObjectType[\"SHADER\"] = 7] = \"SHADER\";\n GFXObjectType[GFXObjectType[\"PIPELINE_LAYOUT\"] = 8] = \"PIPELINE_LAYOUT\";\n GFXObjectType[GFXObjectType[\"PIPELINE_STATE\"] = 9] = \"PIPELINE_STATE\";\n GFXObjectType[GFXObjectType[\"BINDING_LAYOUT\"] = 10] = \"BINDING_LAYOUT\";\n GFXObjectType[GFXObjectType[\"INPUT_ASSEMBLER\"] = 11] = \"INPUT_ASSEMBLER\";\n GFXObjectType[GFXObjectType[\"COMMAND_ALLOCATOR\"] = 12] = \"COMMAND_ALLOCATOR\";\n GFXObjectType[GFXObjectType[\"COMMAND_BUFFER\"] = 13] = \"COMMAND_BUFFER\";\n GFXObjectType[GFXObjectType[\"QUEUE\"] = 14] = \"QUEUE\";\n GFXObjectType[GFXObjectType[\"WINDOW\"] = 15] = \"WINDOW\";\n})(GFXObjectType || (GFXObjectType = {}));\nvar GFXStatus;\n(function (GFXStatus) {\n GFXStatus[GFXStatus[\"UNREADY\"] = 0] = \"UNREADY\";\n GFXStatus[GFXStatus[\"FAILED\"] = 1] = \"FAILED\";\n GFXStatus[GFXStatus[\"SUCCESS\"] = 2] = \"SUCCESS\";\n})(GFXStatus || (GFXStatus = {}));\nvar GFXObject = /** @class */ (function () {\n function GFXObject(gfxType) {\n this._gfxType = GFXObjectType.UNKNOWN;\n this._status = GFXStatus.UNREADY;\n this._gfxType = gfxType;\n }\n Object.defineProperty(GFXObject.prototype, \"gfxType\", {\n get: function () {\n return this._gfxType;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(GFXObject.prototype, \"status\", {\n get: function () {\n return this._status;\n },\n enumerable: true,\n configurable: true\n });\n return GFXObject;\n}());\nvar GFXAttributeName;\n(function (GFXAttributeName) {\n GFXAttributeName[\"ATTR_POSITION\"] = \"a_position\";\n GFXAttributeName[\"ATTR_NORMAL\"] = \"a_normal\";\n GFXAttributeName[\"ATTR_TANGENT\"] = \"a_tangent\";\n GFXAttributeName[\"ATTR_BITANGENT\"] = \"a_bitangent\";\n GFXAttributeName[\"ATTR_WEIGHTS\"] = \"a_weights\";\n GFXAttributeName[\"ATTR_JOINTS\"] = \"a_joints\";\n GFXAttributeName[\"ATTR_COLOR\"] = \"a_color\";\n GFXAttributeName[\"ATTR_COLOR1\"] = \"a_color1\";\n GFXAttributeName[\"ATTR_COLOR2\"] = \"a_color2\";\n GFXAttributeName[\"ATTR_TEX_COORD\"] = \"a_texCoord\";\n GFXAttributeName[\"ATTR_TEX_COORD1\"] = \"a_texCoord1\";\n GFXAttributeName[\"ATTR_TEX_COORD2\"] = \"a_texCoord2\";\n GFXAttributeName[\"ATTR_TEX_COORD3\"] = \"a_texCoord3\";\n GFXAttributeName[\"ATTR_TEX_COORD4\"] = \"a_texCoord4\";\n GFXAttributeName[\"ATTR_TEX_COORD5\"] = \"a_texCoord5\";\n GFXAttributeName[\"ATTR_TEX_COORD6\"] = \"a_texCoord6\";\n GFXAttributeName[\"ATTR_TEX_COORD7\"] = \"a_texCoord7\";\n GFXAttributeName[\"ATTR_TEX_COORD8\"] = \"a_texCoord8\";\n})(GFXAttributeName || (GFXAttributeName = {}));\nvar GFXType;\n(function (GFXType) {\n GFXType[GFXType[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n GFXType[GFXType[\"BOOL\"] = 1] = \"BOOL\";\n GFXType[GFXType[\"BOOL2\"] = 2] = \"BOOL2\";\n GFXType[GFXType[\"BOOL3\"] = 3] = \"BOOL3\";\n GFXType[GFXType[\"BOOL4\"] = 4] = \"BOOL4\";\n GFXType[GFXType[\"INT\"] = 5] = \"INT\";\n GFXType[GFXType[\"INT2\"] = 6] = \"INT2\";\n GFXType[GFXType[\"INT3\"] = 7] = \"INT3\";\n GFXType[GFXType[\"INT4\"] = 8] = \"INT4\";\n GFXType[GFXType[\"UINT\"] = 9] = \"UINT\";\n GFXType[GFXType[\"UINT2\"] = 10] = \"UINT2\";\n GFXType[GFXType[\"UINT3\"] = 11] = \"UINT3\";\n GFXType[GFXType[\"UINT4\"] = 12] = \"UINT4\";\n GFXType[GFXType[\"FLOAT\"] = 13] = \"FLOAT\";\n GFXType[GFXType[\"FLOAT2\"] = 14] = \"FLOAT2\";\n GFXType[GFXType[\"FLOAT3\"] = 15] = \"FLOAT3\";\n GFXType[GFXType[\"FLOAT4\"] = 16] = \"FLOAT4\";\n GFXType[GFXType[\"COLOR4\"] = 17] = \"COLOR4\";\n GFXType[GFXType[\"MAT2\"] = 18] = \"MAT2\";\n GFXType[GFXType[\"MAT2X3\"] = 19] = \"MAT2X3\";\n GFXType[GFXType[\"MAT2X4\"] = 20] = \"MAT2X4\";\n GFXType[GFXType[\"MAT3X2\"] = 21] = \"MAT3X2\";\n GFXType[GFXType[\"MAT3\"] = 22] = \"MAT3\";\n GFXType[GFXType[\"MAT3X4\"] = 23] = \"MAT3X4\";\n GFXType[GFXType[\"MAT4X2\"] = 24] = \"MAT4X2\";\n GFXType[GFXType[\"MAT4X3\"] = 25] = \"MAT4X3\";\n GFXType[GFXType[\"MAT4\"] = 26] = \"MAT4\";\n GFXType[GFXType[\"SAMPLER1D\"] = 27] = \"SAMPLER1D\";\n GFXType[GFXType[\"SAMPLER1D_ARRAY\"] = 28] = \"SAMPLER1D_ARRAY\";\n GFXType[GFXType[\"SAMPLER2D\"] = 29] = \"SAMPLER2D\";\n GFXType[GFXType[\"SAMPLER2D_ARRAY\"] = 30] = \"SAMPLER2D_ARRAY\";\n GFXType[GFXType[\"SAMPLER3D\"] = 31] = \"SAMPLER3D\";\n GFXType[GFXType[\"SAMPLER_CUBE\"] = 32] = \"SAMPLER_CUBE\";\n GFXType[GFXType[\"COUNT\"] = 33] = \"COUNT\";\n})(GFXType || (GFXType = {}));\nvar GFXFormat;\n(function (GFXFormat) {\n GFXFormat[GFXFormat[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n GFXFormat[GFXFormat[\"A8\"] = 1] = \"A8\";\n GFXFormat[GFXFormat[\"L8\"] = 2] = \"L8\";\n GFXFormat[GFXFormat[\"LA8\"] = 3] = \"LA8\";\n GFXFormat[GFXFormat[\"R8\"] = 4] = \"R8\";\n GFXFormat[GFXFormat[\"R8SN\"] = 5] = \"R8SN\";\n GFXFormat[GFXFormat[\"R8UI\"] = 6] = \"R8UI\";\n GFXFormat[GFXFormat[\"R8I\"] = 7] = \"R8I\";\n GFXFormat[GFXFormat[\"R16F\"] = 8] = \"R16F\";\n GFXFormat[GFXFormat[\"R16UI\"] = 9] = \"R16UI\";\n GFXFormat[GFXFormat[\"R16I\"] = 10] = \"R16I\";\n GFXFormat[GFXFormat[\"R32F\"] = 11] = \"R32F\";\n GFXFormat[GFXFormat[\"R32UI\"] = 12] = \"R32UI\";\n GFXFormat[GFXFormat[\"R32I\"] = 13] = \"R32I\";\n GFXFormat[GFXFormat[\"RG8\"] = 14] = \"RG8\";\n GFXFormat[GFXFormat[\"RG8SN\"] = 15] = \"RG8SN\";\n GFXFormat[GFXFormat[\"RG8UI\"] = 16] = \"RG8UI\";\n GFXFormat[GFXFormat[\"RG8I\"] = 17] = \"RG8I\";\n GFXFormat[GFXFormat[\"RG16F\"] = 18] = \"RG16F\";\n GFXFormat[GFXFormat[\"RG16UI\"] = 19] = \"RG16UI\";\n GFXFormat[GFXFormat[\"RG16I\"] = 20] = \"RG16I\";\n GFXFormat[GFXFormat[\"RG32F\"] = 21] = \"RG32F\";\n GFXFormat[GFXFormat[\"RG32UI\"] = 22] = \"RG32UI\";\n GFXFormat[GFXFormat[\"RG32I\"] = 23] = \"RG32I\";\n GFXFormat[GFXFormat[\"RGB8\"] = 24] = \"RGB8\";\n GFXFormat[GFXFormat[\"SRGB8\"] = 25] = \"SRGB8\";\n GFXFormat[GFXFormat[\"RGB8SN\"] = 26] = \"RGB8SN\";\n GFXFormat[GFXFormat[\"RGB8UI\"] = 27] = \"RGB8UI\";\n GFXFormat[GFXFormat[\"RGB8I\"] = 28] = \"RGB8I\";\n GFXFormat[GFXFormat[\"RGB16F\"] = 29] = \"RGB16F\";\n GFXFormat[GFXFormat[\"RGB16UI\"] = 30] = \"RGB16UI\";\n GFXFormat[GFXFormat[\"RGB16I\"] = 31] = \"RGB16I\";\n GFXFormat[GFXFormat[\"RGB32F\"] = 32] = \"RGB32F\";\n GFXFormat[GFXFormat[\"RGB32UI\"] = 33] = \"RGB32UI\";\n GFXFormat[GFXFormat[\"RGB32I\"] = 34] = \"RGB32I\";\n GFXFormat[GFXFormat[\"RGBA8\"] = 35] = \"RGBA8\";\n GFXFormat[GFXFormat[\"SRGB8_A8\"] = 36] = \"SRGB8_A8\";\n GFXFormat[GFXFormat[\"RGBA8SN\"] = 37] = \"RGBA8SN\";\n GFXFormat[GFXFormat[\"RGBA8UI\"] = 38] = \"RGBA8UI\";\n GFXFormat[GFXFormat[\"RGBA8I\"] = 39] = \"RGBA8I\";\n GFXFormat[GFXFormat[\"RGBA16F\"] = 40] = \"RGBA16F\";\n GFXFormat[GFXFormat[\"RGBA16UI\"] = 41] = \"RGBA16UI\";\n GFXFormat[GFXFormat[\"RGBA16I\"] = 42] = \"RGBA16I\";\n GFXFormat[GFXFormat[\"RGBA32F\"] = 43] = \"RGBA32F\";\n GFXFormat[GFXFormat[\"RGBA32UI\"] = 44] = \"RGBA32UI\";\n GFXFormat[GFXFormat[\"RGBA32I\"] = 45] = \"RGBA32I\";\n // Special Format\n GFXFormat[GFXFormat[\"R5G6B5\"] = 46] = \"R5G6B5\";\n GFXFormat[GFXFormat[\"R11G11B10F\"] = 47] = \"R11G11B10F\";\n GFXFormat[GFXFormat[\"RGB5A1\"] = 48] = \"RGB5A1\";\n GFXFormat[GFXFormat[\"RGBA4\"] = 49] = \"RGBA4\";\n GFXFormat[GFXFormat[\"RGB10A2\"] = 50] = \"RGB10A2\";\n GFXFormat[GFXFormat[\"RGB10A2UI\"] = 51] = \"RGB10A2UI\";\n GFXFormat[GFXFormat[\"RGB9E5\"] = 52] = \"RGB9E5\";\n // Depth-Stencil Format\n GFXFormat[GFXFormat[\"D16\"] = 53] = \"D16\";\n GFXFormat[GFXFormat[\"D16S8\"] = 54] = \"D16S8\";\n GFXFormat[GFXFormat[\"D24\"] = 55] = \"D24\";\n GFXFormat[GFXFormat[\"D24S8\"] = 56] = \"D24S8\";\n GFXFormat[GFXFormat[\"D32F\"] = 57] = \"D32F\";\n GFXFormat[GFXFormat[\"D32F_S8\"] = 58] = \"D32F_S8\";\n // Compressed Format\n // Block Compression Format, DDS (DirectDraw Surface)\n // DXT1: 3 channels (5:6:5), 1/8 origianl size, with 0 or 1 bit of alpha\n GFXFormat[GFXFormat[\"BC1\"] = 59] = \"BC1\";\n GFXFormat[GFXFormat[\"BC1_ALPHA\"] = 60] = \"BC1_ALPHA\";\n GFXFormat[GFXFormat[\"BC1_SRGB\"] = 61] = \"BC1_SRGB\";\n GFXFormat[GFXFormat[\"BC1_SRGB_ALPHA\"] = 62] = \"BC1_SRGB_ALPHA\";\n // DXT3: 4 channels (5:6:5), 1/4 origianl size, with 4 bits of alpha\n GFXFormat[GFXFormat[\"BC2\"] = 63] = \"BC2\";\n GFXFormat[GFXFormat[\"BC2_SRGB\"] = 64] = \"BC2_SRGB\";\n // DXT5: 4 channels (5:6:5), 1/4 origianl size, with 8 bits of alpha\n GFXFormat[GFXFormat[\"BC3\"] = 65] = \"BC3\";\n GFXFormat[GFXFormat[\"BC3_SRGB\"] = 66] = \"BC3_SRGB\";\n // 1 channel (8), 1/4 origianl size\n GFXFormat[GFXFormat[\"BC4\"] = 67] = \"BC4\";\n GFXFormat[GFXFormat[\"BC4_SNORM\"] = 68] = \"BC4_SNORM\";\n // 2 channels (8:8), 1/2 origianl size\n GFXFormat[GFXFormat[\"BC5\"] = 69] = \"BC5\";\n GFXFormat[GFXFormat[\"BC5_SNORM\"] = 70] = \"BC5_SNORM\";\n // 3 channels (16:16:16), half-floating point, 1/6 origianl size\n // UF16: unsigned float, 5 exponent bits + 11 mantissa bits\n // SF16: signed float, 1 signed bit + 5 exponent bits + 10 mantissa bits\n GFXFormat[GFXFormat[\"BC6H_UF16\"] = 71] = \"BC6H_UF16\";\n GFXFormat[GFXFormat[\"BC6H_SF16\"] = 72] = \"BC6H_SF16\";\n // 4 channels (4~7 bits per channel) with 0 to 8 bits of alpha, 1/3 original size\n GFXFormat[GFXFormat[\"BC7\"] = 73] = \"BC7\";\n GFXFormat[GFXFormat[\"BC7_SRGB\"] = 74] = \"BC7_SRGB\";\n // Ericsson Texture Compression Format\n GFXFormat[GFXFormat[\"ETC_RGB8\"] = 75] = \"ETC_RGB8\";\n GFXFormat[GFXFormat[\"ETC2_RGB8\"] = 76] = \"ETC2_RGB8\";\n GFXFormat[GFXFormat[\"ETC2_SRGB8\"] = 77] = \"ETC2_SRGB8\";\n GFXFormat[GFXFormat[\"ETC2_RGB8_A1\"] = 78] = \"ETC2_RGB8_A1\";\n GFXFormat[GFXFormat[\"ETC2_SRGB8_A1\"] = 79] = \"ETC2_SRGB8_A1\";\n GFXFormat[GFXFormat[\"ETC2_RGBA8\"] = 80] = \"ETC2_RGBA8\";\n GFXFormat[GFXFormat[\"ETC2_SRGB8_A8\"] = 81] = \"ETC2_SRGB8_A8\";\n GFXFormat[GFXFormat[\"EAC_R11\"] = 82] = \"EAC_R11\";\n GFXFormat[GFXFormat[\"EAC_R11SN\"] = 83] = \"EAC_R11SN\";\n GFXFormat[GFXFormat[\"EAC_RG11\"] = 84] = \"EAC_RG11\";\n GFXFormat[GFXFormat[\"EAC_RG11SN\"] = 85] = \"EAC_RG11SN\";\n // PVRTC (PowerVR)\n GFXFormat[GFXFormat[\"PVRTC_RGB2\"] = 86] = \"PVRTC_RGB2\";\n GFXFormat[GFXFormat[\"PVRTC_RGBA2\"] = 87] = \"PVRTC_RGBA2\";\n GFXFormat[GFXFormat[\"PVRTC_RGB4\"] = 88] = \"PVRTC_RGB4\";\n GFXFormat[GFXFormat[\"PVRTC_RGBA4\"] = 89] = \"PVRTC_RGBA4\";\n GFXFormat[GFXFormat[\"PVRTC2_2BPP\"] = 90] = \"PVRTC2_2BPP\";\n GFXFormat[GFXFormat[\"PVRTC2_4BPP\"] = 91] = \"PVRTC2_4BPP\";\n})(GFXFormat || (GFXFormat = {}));\nvar GFXBufferUsageBit;\n(function (GFXBufferUsageBit) {\n GFXBufferUsageBit[GFXBufferUsageBit[\"NONE\"] = 0] = \"NONE\";\n GFXBufferUsageBit[GFXBufferUsageBit[\"TRANSFER_SRC\"] = 1] = \"TRANSFER_SRC\";\n GFXBufferUsageBit[GFXBufferUsageBit[\"TRANSFER_DST\"] = 2] = \"TRANSFER_DST\";\n GFXBufferUsageBit[GFXBufferUsageBit[\"INDEX\"] = 4] = \"INDEX\";\n GFXBufferUsageBit[GFXBufferUsageBit[\"VERTEX\"] = 8] = \"VERTEX\";\n GFXBufferUsageBit[GFXBufferUsageBit[\"UNIFORM\"] = 16] = \"UNIFORM\";\n GFXBufferUsageBit[GFXBufferUsageBit[\"STORAGE\"] = 32] = \"STORAGE\";\n GFXBufferUsageBit[GFXBufferUsageBit[\"INDIRECT\"] = 64] = \"INDIRECT\";\n})(GFXBufferUsageBit || (GFXBufferUsageBit = {}));\nvar GFXMemoryUsageBit;\n(function (GFXMemoryUsageBit) {\n GFXMemoryUsageBit[GFXMemoryUsageBit[\"NONE\"] = 0] = \"NONE\";\n GFXMemoryUsageBit[GFXMemoryUsageBit[\"DEVICE\"] = 1] = \"DEVICE\";\n GFXMemoryUsageBit[GFXMemoryUsageBit[\"HOST\"] = 2] = \"HOST\";\n})(GFXMemoryUsageBit || (GFXMemoryUsageBit = {}));\nvar GFXBufferAccessBit;\n(function (GFXBufferAccessBit) {\n GFXBufferAccessBit[GFXBufferAccessBit[\"NONE\"] = 0] = \"NONE\";\n GFXBufferAccessBit[GFXBufferAccessBit[\"READ\"] = 1] = \"READ\";\n GFXBufferAccessBit[GFXBufferAccessBit[\"WRITE\"] = 2] = \"WRITE\";\n})(GFXBufferAccessBit || (GFXBufferAccessBit = {}));\nvar GFXPrimitiveMode;\n(function (GFXPrimitiveMode) {\n GFXPrimitiveMode[GFXPrimitiveMode[\"POINT_LIST\"] = 0] = \"POINT_LIST\";\n GFXPrimitiveMode[GFXPrimitiveMode[\"LINE_LIST\"] = 1] = \"LINE_LIST\";\n GFXPrimitiveMode[GFXPrimitiveMode[\"LINE_STRIP\"] = 2] = \"LINE_STRIP\";\n GFXPrimitiveMode[GFXPrimitiveMode[\"LINE_LOOP\"] = 3] = \"LINE_LOOP\";\n GFXPrimitiveMode[GFXPrimitiveMode[\"LINE_LIST_ADJACENCY\"] = 4] = \"LINE_LIST_ADJACENCY\";\n GFXPrimitiveMode[GFXPrimitiveMode[\"LINE_STRIP_ADJACENCY\"] = 5] = \"LINE_STRIP_ADJACENCY\";\n GFXPrimitiveMode[GFXPrimitiveMode[\"ISO_LINE_LIST\"] = 6] = \"ISO_LINE_LIST\";\n // raycast detectable:\n GFXPrimitiveMode[GFXPrimitiveMode[\"TRIANGLE_LIST\"] = 7] = \"TRIANGLE_LIST\";\n GFXPrimitiveMode[GFXPrimitiveMode[\"TRIANGLE_STRIP\"] = 8] = \"TRIANGLE_STRIP\";\n GFXPrimitiveMode[GFXPrimitiveMode[\"TRIANGLE_FAN\"] = 9] = \"TRIANGLE_FAN\";\n GFXPrimitiveMode[GFXPrimitiveMode[\"TRIANGLE_LIST_ADJACENCY\"] = 10] = \"TRIANGLE_LIST_ADJACENCY\";\n GFXPrimitiveMode[GFXPrimitiveMode[\"TRIANGLE_STRIP_ADJACENCY\"] = 11] = \"TRIANGLE_STRIP_ADJACENCY\";\n GFXPrimitiveMode[GFXPrimitiveMode[\"TRIANGLE_PATCH_ADJACENCY\"] = 12] = \"TRIANGLE_PATCH_ADJACENCY\";\n GFXPrimitiveMode[GFXPrimitiveMode[\"QUAD_PATCH_LIST\"] = 13] = \"QUAD_PATCH_LIST\";\n})(GFXPrimitiveMode || (GFXPrimitiveMode = {}));\nvar GFXPolygonMode;\n(function (GFXPolygonMode) {\n GFXPolygonMode[GFXPolygonMode[\"FILL\"] = 0] = \"FILL\";\n GFXPolygonMode[GFXPolygonMode[\"POINT\"] = 1] = \"POINT\";\n GFXPolygonMode[GFXPolygonMode[\"LINE\"] = 2] = \"LINE\";\n})(GFXPolygonMode || (GFXPolygonMode = {}));\nvar GFXShadeModel;\n(function (GFXShadeModel) {\n GFXShadeModel[GFXShadeModel[\"GOURAND\"] = 0] = \"GOURAND\";\n GFXShadeModel[GFXShadeModel[\"FLAT\"] = 1] = \"FLAT\";\n})(GFXShadeModel || (GFXShadeModel = {}));\nvar GFXCullMode;\n(function (GFXCullMode) {\n GFXCullMode[GFXCullMode[\"NONE\"] = 0] = \"NONE\";\n GFXCullMode[GFXCullMode[\"FRONT\"] = 1] = \"FRONT\";\n GFXCullMode[GFXCullMode[\"BACK\"] = 2] = \"BACK\";\n})(GFXCullMode || (GFXCullMode = {}));\nvar GFXComparisonFunc;\n(function (GFXComparisonFunc) {\n GFXComparisonFunc[GFXComparisonFunc[\"NEVER\"] = 0] = \"NEVER\";\n GFXComparisonFunc[GFXComparisonFunc[\"LESS\"] = 1] = \"LESS\";\n GFXComparisonFunc[GFXComparisonFunc[\"EQUAL\"] = 2] = \"EQUAL\";\n GFXComparisonFunc[GFXComparisonFunc[\"LESS_EQUAL\"] = 3] = \"LESS_EQUAL\";\n GFXComparisonFunc[GFXComparisonFunc[\"GREATER\"] = 4] = \"GREATER\";\n GFXComparisonFunc[GFXComparisonFunc[\"NOT_EQUAL\"] = 5] = \"NOT_EQUAL\";\n GFXComparisonFunc[GFXComparisonFunc[\"GREATER_EQUAL\"] = 6] = \"GREATER_EQUAL\";\n GFXComparisonFunc[GFXComparisonFunc[\"ALWAYS\"] = 7] = \"ALWAYS\";\n})(GFXComparisonFunc || (GFXComparisonFunc = {}));\nvar GFXStencilOp;\n(function (GFXStencilOp) {\n GFXStencilOp[GFXStencilOp[\"ZERO\"] = 0] = \"ZERO\";\n GFXStencilOp[GFXStencilOp[\"KEEP\"] = 1] = \"KEEP\";\n GFXStencilOp[GFXStencilOp[\"REPLACE\"] = 2] = \"REPLACE\";\n GFXStencilOp[GFXStencilOp[\"INCR\"] = 3] = \"INCR\";\n GFXStencilOp[GFXStencilOp[\"DECR\"] = 4] = \"DECR\";\n GFXStencilOp[GFXStencilOp[\"INVERT\"] = 5] = \"INVERT\";\n GFXStencilOp[GFXStencilOp[\"INCR_WRAP\"] = 6] = \"INCR_WRAP\";\n GFXStencilOp[GFXStencilOp[\"DECR_WRAP\"] = 7] = \"DECR_WRAP\";\n})(GFXStencilOp || (GFXStencilOp = {}));\nvar GFXBlendOp;\n(function (GFXBlendOp) {\n GFXBlendOp[GFXBlendOp[\"ADD\"] = 0] = \"ADD\";\n GFXBlendOp[GFXBlendOp[\"SUB\"] = 1] = \"SUB\";\n GFXBlendOp[GFXBlendOp[\"REV_SUB\"] = 2] = \"REV_SUB\";\n GFXBlendOp[GFXBlendOp[\"MIN\"] = 3] = \"MIN\";\n GFXBlendOp[GFXBlendOp[\"MAX\"] = 4] = \"MAX\";\n})(GFXBlendOp || (GFXBlendOp = {}));\nvar GFXBlendFactor;\n(function (GFXBlendFactor) {\n GFXBlendFactor[GFXBlendFactor[\"ZERO\"] = 0] = \"ZERO\";\n GFXBlendFactor[GFXBlendFactor[\"ONE\"] = 1] = \"ONE\";\n GFXBlendFactor[GFXBlendFactor[\"SRC_ALPHA\"] = 2] = \"SRC_ALPHA\";\n GFXBlendFactor[GFXBlendFactor[\"DST_ALPHA\"] = 3] = \"DST_ALPHA\";\n GFXBlendFactor[GFXBlendFactor[\"ONE_MINUS_SRC_ALPHA\"] = 4] = \"ONE_MINUS_SRC_ALPHA\";\n GFXBlendFactor[GFXBlendFactor[\"ONE_MINUS_DST_ALPHA\"] = 5] = \"ONE_MINUS_DST_ALPHA\";\n GFXBlendFactor[GFXBlendFactor[\"SRC_COLOR\"] = 6] = \"SRC_COLOR\";\n GFXBlendFactor[GFXBlendFactor[\"DST_COLOR\"] = 7] = \"DST_COLOR\";\n GFXBlendFactor[GFXBlendFactor[\"ONE_MINUS_SRC_COLOR\"] = 8] = \"ONE_MINUS_SRC_COLOR\";\n GFXBlendFactor[GFXBlendFactor[\"ONE_MINUS_DST_COLOR\"] = 9] = \"ONE_MINUS_DST_COLOR\";\n GFXBlendFactor[GFXBlendFactor[\"SRC_ALPHA_SATURATE\"] = 10] = \"SRC_ALPHA_SATURATE\";\n GFXBlendFactor[GFXBlendFactor[\"CONSTANT_COLOR\"] = 11] = \"CONSTANT_COLOR\";\n GFXBlendFactor[GFXBlendFactor[\"ONE_MINUS_CONSTANT_COLOR\"] = 12] = \"ONE_MINUS_CONSTANT_COLOR\";\n GFXBlendFactor[GFXBlendFactor[\"CONSTANT_ALPHA\"] = 13] = \"CONSTANT_ALPHA\";\n GFXBlendFactor[GFXBlendFactor[\"ONE_MINUS_CONSTANT_ALPHA\"] = 14] = \"ONE_MINUS_CONSTANT_ALPHA\";\n})(GFXBlendFactor || (GFXBlendFactor = {}));\nvar GFXColorMask;\n(function (GFXColorMask) {\n GFXColorMask[GFXColorMask[\"NONE\"] = 0] = \"NONE\";\n GFXColorMask[GFXColorMask[\"R\"] = 1] = \"R\";\n GFXColorMask[GFXColorMask[\"G\"] = 2] = \"G\";\n GFXColorMask[GFXColorMask[\"B\"] = 4] = \"B\";\n GFXColorMask[GFXColorMask[\"A\"] = 8] = \"A\";\n GFXColorMask[GFXColorMask[\"ALL\"] = 15] = \"ALL\";\n})(GFXColorMask || (GFXColorMask = {}));\nvar GFXFilter;\n(function (GFXFilter) {\n GFXFilter[GFXFilter[\"NONE\"] = 0] = \"NONE\";\n GFXFilter[GFXFilter[\"POINT\"] = 1] = \"POINT\";\n GFXFilter[GFXFilter[\"LINEAR\"] = 2] = \"LINEAR\";\n GFXFilter[GFXFilter[\"ANISOTROPIC\"] = 3] = \"ANISOTROPIC\";\n})(GFXFilter || (GFXFilter = {}));\nvar GFXAddress;\n(function (GFXAddress) {\n GFXAddress[GFXAddress[\"WRAP\"] = 0] = \"WRAP\";\n GFXAddress[GFXAddress[\"MIRROR\"] = 1] = \"MIRROR\";\n GFXAddress[GFXAddress[\"CLAMP\"] = 2] = \"CLAMP\";\n GFXAddress[GFXAddress[\"BORDER\"] = 3] = \"BORDER\";\n})(GFXAddress || (GFXAddress = {}));\nvar GFXTextureType;\n(function (GFXTextureType) {\n GFXTextureType[GFXTextureType[\"TEX1D\"] = 0] = \"TEX1D\";\n GFXTextureType[GFXTextureType[\"TEX2D\"] = 1] = \"TEX2D\";\n GFXTextureType[GFXTextureType[\"TEX3D\"] = 2] = \"TEX3D\";\n})(GFXTextureType || (GFXTextureType = {}));\nvar GFXTextureUsageBit;\n(function (GFXTextureUsageBit) {\n GFXTextureUsageBit[GFXTextureUsageBit[\"NONE\"] = 0] = \"NONE\";\n GFXTextureUsageBit[GFXTextureUsageBit[\"TRANSFER_SRC\"] = 1] = \"TRANSFER_SRC\";\n GFXTextureUsageBit[GFXTextureUsageBit[\"TRANSFER_DST\"] = 2] = \"TRANSFER_DST\";\n GFXTextureUsageBit[GFXTextureUsageBit[\"SAMPLED\"] = 4] = \"SAMPLED\";\n GFXTextureUsageBit[GFXTextureUsageBit[\"STORAGE\"] = 8] = \"STORAGE\";\n GFXTextureUsageBit[GFXTextureUsageBit[\"COLOR_ATTACHMENT\"] = 16] = \"COLOR_ATTACHMENT\";\n GFXTextureUsageBit[GFXTextureUsageBit[\"DEPTH_STENCIL_ATTACHMENT\"] = 32] = \"DEPTH_STENCIL_ATTACHMENT\";\n GFXTextureUsageBit[GFXTextureUsageBit[\"TRANSIENT_ATTACHMENT\"] = 64] = \"TRANSIENT_ATTACHMENT\";\n GFXTextureUsageBit[GFXTextureUsageBit[\"INPUT_ATTACHMENT\"] = 128] = \"INPUT_ATTACHMENT\";\n})(GFXTextureUsageBit || (GFXTextureUsageBit = {}));\nvar GFXSampleCount;\n(function (GFXSampleCount) {\n GFXSampleCount[GFXSampleCount[\"X1\"] = 0] = \"X1\";\n GFXSampleCount[GFXSampleCount[\"X2\"] = 1] = \"X2\";\n GFXSampleCount[GFXSampleCount[\"X4\"] = 2] = \"X4\";\n GFXSampleCount[GFXSampleCount[\"X8\"] = 3] = \"X8\";\n GFXSampleCount[GFXSampleCount[\"X16\"] = 4] = \"X16\";\n GFXSampleCount[GFXSampleCount[\"X32\"] = 5] = \"X32\";\n GFXSampleCount[GFXSampleCount[\"X64\"] = 6] = \"X64\";\n})(GFXSampleCount || (GFXSampleCount = {}));\nvar GFXTextureFlagBit;\n(function (GFXTextureFlagBit) {\n GFXTextureFlagBit[GFXTextureFlagBit[\"NONE\"] = 0] = \"NONE\";\n GFXTextureFlagBit[GFXTextureFlagBit[\"GEN_MIPMAP\"] = 1] = \"GEN_MIPMAP\";\n GFXTextureFlagBit[GFXTextureFlagBit[\"CUBEMAP\"] = 2] = \"CUBEMAP\";\n GFXTextureFlagBit[GFXTextureFlagBit[\"BAKUP_BUFFER\"] = 4] = \"BAKUP_BUFFER\";\n})(GFXTextureFlagBit || (GFXTextureFlagBit = {}));\nvar GFXTextureViewType;\n(function (GFXTextureViewType) {\n GFXTextureViewType[GFXTextureViewType[\"TV1D\"] = 0] = \"TV1D\";\n GFXTextureViewType[GFXTextureViewType[\"TV2D\"] = 1] = \"TV2D\";\n GFXTextureViewType[GFXTextureViewType[\"TV3D\"] = 2] = \"TV3D\";\n GFXTextureViewType[GFXTextureViewType[\"CUBE\"] = 3] = \"CUBE\";\n GFXTextureViewType[GFXTextureViewType[\"TV1D_ARRAY\"] = 4] = \"TV1D_ARRAY\";\n GFXTextureViewType[GFXTextureViewType[\"TV2D_ARRAY\"] = 5] = \"TV2D_ARRAY\";\n})(GFXTextureViewType || (GFXTextureViewType = {}));\nvar GFXShaderType;\n(function (GFXShaderType) {\n GFXShaderType[GFXShaderType[\"VERTEX\"] = 0] = \"VERTEX\";\n GFXShaderType[GFXShaderType[\"HULL\"] = 1] = \"HULL\";\n GFXShaderType[GFXShaderType[\"DOMAIN\"] = 2] = \"DOMAIN\";\n GFXShaderType[GFXShaderType[\"GEOMETRY\"] = 3] = \"GEOMETRY\";\n GFXShaderType[GFXShaderType[\"FRAGMENT\"] = 4] = \"FRAGMENT\";\n GFXShaderType[GFXShaderType[\"COMPUTE\"] = 5] = \"COMPUTE\";\n GFXShaderType[GFXShaderType[\"COUNT\"] = 6] = \"COUNT\";\n})(GFXShaderType || (GFXShaderType = {}));\nvar GFXBindingType;\n(function (GFXBindingType) {\n GFXBindingType[GFXBindingType[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n GFXBindingType[GFXBindingType[\"UNIFORM_BUFFER\"] = 1] = \"UNIFORM_BUFFER\";\n GFXBindingType[GFXBindingType[\"SAMPLER\"] = 2] = \"SAMPLER\";\n GFXBindingType[GFXBindingType[\"STORAGE_BUFFER\"] = 3] = \"STORAGE_BUFFER\";\n})(GFXBindingType || (GFXBindingType = {}));\nvar GFXCommandBufferType;\n(function (GFXCommandBufferType) {\n GFXCommandBufferType[GFXCommandBufferType[\"PRIMARY\"] = 0] = \"PRIMARY\";\n GFXCommandBufferType[GFXCommandBufferType[\"SECONDARY\"] = 1] = \"SECONDARY\";\n})(GFXCommandBufferType || (GFXCommandBufferType = {}));\n// Enumeration all possible values of operations to be performed on initially Loading a Framebuffer Object.\nvar GFXLoadOp;\n(function (GFXLoadOp) {\n GFXLoadOp[GFXLoadOp[\"LOAD\"] = 0] = \"LOAD\";\n GFXLoadOp[GFXLoadOp[\"CLEAR\"] = 1] = \"CLEAR\";\n GFXLoadOp[GFXLoadOp[\"DISCARD\"] = 2] = \"DISCARD\";\n})(GFXLoadOp || (GFXLoadOp = {}));\n// Enumerates all possible values of operations to be performed when Storing to a Framebuffer Object.\nvar GFXStoreOp;\n(function (GFXStoreOp) {\n GFXStoreOp[GFXStoreOp[\"STORE\"] = 0] = \"STORE\";\n GFXStoreOp[GFXStoreOp[\"DISCARD\"] = 1] = \"DISCARD\";\n})(GFXStoreOp || (GFXStoreOp = {}));\nvar GFXTextureLayout;\n(function (GFXTextureLayout) {\n GFXTextureLayout[GFXTextureLayout[\"UNDEFINED\"] = 0] = \"UNDEFINED\";\n GFXTextureLayout[GFXTextureLayout[\"GENERAL\"] = 1] = \"GENERAL\";\n GFXTextureLayout[GFXTextureLayout[\"COLOR_ATTACHMENT_OPTIMAL\"] = 2] = \"COLOR_ATTACHMENT_OPTIMAL\";\n GFXTextureLayout[GFXTextureLayout[\"DEPTH_STENCIL_ATTACHMENT_OPTIMAL\"] = 3] = \"DEPTH_STENCIL_ATTACHMENT_OPTIMAL\";\n GFXTextureLayout[GFXTextureLayout[\"DEPTH_STENCIL_READONLY_OPTIMAL\"] = 4] = \"DEPTH_STENCIL_READONLY_OPTIMAL\";\n GFXTextureLayout[GFXTextureLayout[\"SHADER_READONLY_OPTIMAL\"] = 5] = \"SHADER_READONLY_OPTIMAL\";\n GFXTextureLayout[GFXTextureLayout[\"TRANSFER_SRC_OPTIMAL\"] = 6] = \"TRANSFER_SRC_OPTIMAL\";\n GFXTextureLayout[GFXTextureLayout[\"TRANSFER_DST_OPTIMAL\"] = 7] = \"TRANSFER_DST_OPTIMAL\";\n GFXTextureLayout[GFXTextureLayout[\"PREINITIALIZED\"] = 8] = \"PREINITIALIZED\";\n GFXTextureLayout[GFXTextureLayout[\"PRESENT_SRC\"] = 9] = \"PRESENT_SRC\";\n})(GFXTextureLayout || (GFXTextureLayout = {}));\nvar GFXPipelineBindPoint;\n(function (GFXPipelineBindPoint) {\n GFXPipelineBindPoint[GFXPipelineBindPoint[\"GRAPHICS\"] = 0] = \"GRAPHICS\";\n GFXPipelineBindPoint[GFXPipelineBindPoint[\"COMPUTE\"] = 1] = \"COMPUTE\";\n GFXPipelineBindPoint[GFXPipelineBindPoint[\"RAY_TRACING\"] = 2] = \"RAY_TRACING\";\n})(GFXPipelineBindPoint || (GFXPipelineBindPoint = {}));\nvar GFXDynamicState;\n(function (GFXDynamicState) {\n GFXDynamicState[GFXDynamicState[\"VIEWPORT\"] = 0] = \"VIEWPORT\";\n GFXDynamicState[GFXDynamicState[\"SCISSOR\"] = 1] = \"SCISSOR\";\n GFXDynamicState[GFXDynamicState[\"LINE_WIDTH\"] = 2] = \"LINE_WIDTH\";\n GFXDynamicState[GFXDynamicState[\"DEPTH_BIAS\"] = 3] = \"DEPTH_BIAS\";\n GFXDynamicState[GFXDynamicState[\"BLEND_CONSTANTS\"] = 4] = \"BLEND_CONSTANTS\";\n GFXDynamicState[GFXDynamicState[\"DEPTH_BOUNDS\"] = 5] = \"DEPTH_BOUNDS\";\n GFXDynamicState[GFXDynamicState[\"STENCIL_WRITE_MASK\"] = 6] = \"STENCIL_WRITE_MASK\";\n GFXDynamicState[GFXDynamicState[\"STENCIL_COMPARE_MASK\"] = 7] = \"STENCIL_COMPARE_MASK\";\n})(GFXDynamicState || (GFXDynamicState = {}));\nvar GFXStencilFace;\n(function (GFXStencilFace) {\n GFXStencilFace[GFXStencilFace[\"FRONT\"] = 0] = \"FRONT\";\n GFXStencilFace[GFXStencilFace[\"BACK\"] = 1] = \"BACK\";\n GFXStencilFace[GFXStencilFace[\"ALL\"] = 2] = \"ALL\";\n})(GFXStencilFace || (GFXStencilFace = {}));\nvar GFXQueueType;\n(function (GFXQueueType) {\n GFXQueueType[GFXQueueType[\"GRAPHICS\"] = 0] = \"GRAPHICS\";\n GFXQueueType[GFXQueueType[\"COMPUTE\"] = 1] = \"COMPUTE\";\n GFXQueueType[GFXQueueType[\"TRANSFER\"] = 2] = \"TRANSFER\";\n})(GFXQueueType || (GFXQueueType = {}));\nvar GFXClearFlag;\n(function (GFXClearFlag) {\n GFXClearFlag[GFXClearFlag[\"NONE\"] = 0] = \"NONE\";\n GFXClearFlag[GFXClearFlag[\"COLOR\"] = 1] = \"COLOR\";\n GFXClearFlag[GFXClearFlag[\"DEPTH\"] = 2] = \"DEPTH\";\n GFXClearFlag[GFXClearFlag[\"STENCIL\"] = 4] = \"STENCIL\";\n GFXClearFlag[GFXClearFlag[\"DEPTH_STENCIL\"] = 6] = \"DEPTH_STENCIL\";\n GFXClearFlag[GFXClearFlag[\"ALL\"] = 7] = \"ALL\";\n})(GFXClearFlag || (GFXClearFlag = {}));\nfunction GFXGetTypeSize(type) {\n switch (type) {\n case GFXType.BOOL:\n case GFXType.INT:\n case GFXType.UINT:\n case GFXType.FLOAT: return 4;\n case GFXType.BOOL2:\n case GFXType.INT2:\n case GFXType.UINT2:\n case GFXType.FLOAT2: return 8;\n case GFXType.BOOL3:\n case GFXType.INT3:\n case GFXType.UINT3:\n case GFXType.FLOAT3: return 12;\n case GFXType.BOOL4:\n case GFXType.INT4:\n case GFXType.UINT4:\n case GFXType.FLOAT4:\n case GFXType.MAT2: return 16;\n case GFXType.MAT2X3: return 24;\n case GFXType.MAT2X4: return 32;\n case GFXType.MAT3X2: return 24;\n case GFXType.MAT3: return 36;\n case GFXType.MAT3X4: return 48;\n case GFXType.MAT4X2: return 32;\n case GFXType.MAT4X2: return 32;\n case GFXType.MAT4: return 64;\n case GFXType.SAMPLER1D:\n case GFXType.SAMPLER1D_ARRAY:\n case GFXType.SAMPLER2D:\n case GFXType.SAMPLER2D_ARRAY:\n case GFXType.SAMPLER3D:\n case GFXType.SAMPLER_CUBE: return 4;\n default: {\n return 0;\n }\n }\n}\n\n// import { GFXBuffer } from '../gfx/buffer';\nvar RenderPassStage;\n(function (RenderPassStage) {\n RenderPassStage[RenderPassStage[\"DEFAULT\"] = 100] = \"DEFAULT\";\n})(RenderPassStage || (RenderPassStage = {}));\nvar RenderPriority;\n(function (RenderPriority) {\n RenderPriority[RenderPriority[\"MIN\"] = 0] = \"MIN\";\n RenderPriority[RenderPriority[\"MAX\"] = 255] = \"MAX\";\n RenderPriority[RenderPriority[\"DEFAULT\"] = 128] = \"DEFAULT\";\n})(RenderPriority || (RenderPriority = {}));\nvar MAX_BINDING_SUPPORTED = 24; // from WebGL 2 spec\nvar UniformBinding;\n(function (UniformBinding) {\n // UBOs\n UniformBinding[UniformBinding[\"UBO_GLOBAL\"] = MAX_BINDING_SUPPORTED - 1] = \"UBO_GLOBAL\";\n UniformBinding[UniformBinding[\"UBO_SHADOW\"] = MAX_BINDING_SUPPORTED - 2] = \"UBO_SHADOW\";\n UniformBinding[UniformBinding[\"UBO_LOCAL\"] = MAX_BINDING_SUPPORTED - 3] = \"UBO_LOCAL\";\n UniformBinding[UniformBinding[\"UBO_FORWARD_LIGHTS\"] = MAX_BINDING_SUPPORTED - 4] = \"UBO_FORWARD_LIGHTS\";\n UniformBinding[UniformBinding[\"UBO_SKINNING\"] = MAX_BINDING_SUPPORTED - 5] = \"UBO_SKINNING\";\n UniformBinding[UniformBinding[\"UBO_SKINNING_TEXTURE\"] = MAX_BINDING_SUPPORTED - 6] = \"UBO_SKINNING_TEXTURE\";\n UniformBinding[UniformBinding[\"UBO_UI\"] = MAX_BINDING_SUPPORTED - 7] = \"UBO_UI\";\n // samplers\n UniformBinding[UniformBinding[\"SAMPLER_JOINTS\"] = MAX_BINDING_SUPPORTED + 1] = \"SAMPLER_JOINTS\";\n UniformBinding[UniformBinding[\"SAMPLER_ENVIRONMENT\"] = MAX_BINDING_SUPPORTED + 2] = \"SAMPLER_ENVIRONMENT\";\n // rooms left for custom bindings\n // effect importer prepares bindings according to this\n UniformBinding[UniformBinding[\"CUSTUM_UBO_BINDING_END_POINT\"] = MAX_BINDING_SUPPORTED - 7] = \"CUSTUM_UBO_BINDING_END_POINT\";\n UniformBinding[UniformBinding[\"CUSTOM_SAMPLER_BINDING_START_POINT\"] = MAX_BINDING_SUPPORTED + 6] = \"CUSTOM_SAMPLER_BINDING_START_POINT\";\n})(UniformBinding || (UniformBinding = {}));\n// export class UBOGlobal {\n// public static TIME_OFFSET: number = 0;\n// public static SCREEN_SIZE_OFFSET: number = UBOGlobal.TIME_OFFSET + 4;\n// public static SCREEN_SCALE_OFFSET: number = UBOGlobal.SCREEN_SIZE_OFFSET + 4;\n// public static NATIVE_SIZE_OFFSET: number = UBOGlobal.SCREEN_SCALE_OFFSET + 4;\n// public static MAT_VIEW_OFFSET: number = UBOGlobal.NATIVE_SIZE_OFFSET + 4;\n// public static MAT_VIEW_INV_OFFSET: number = UBOGlobal.MAT_VIEW_OFFSET + 16;\n// public static MAT_PROJ_OFFSET: number = UBOGlobal.MAT_VIEW_INV_OFFSET + 16;\n// public static MAT_PROJ_INV_OFFSET: number = UBOGlobal.MAT_PROJ_OFFSET + 16;\n// public static MAT_VIEW_PROJ_OFFSET: number = UBOGlobal.MAT_PROJ_INV_OFFSET + 16;\n// public static MAT_VIEW_PROJ_INV_OFFSET: number = UBOGlobal.MAT_VIEW_PROJ_OFFSET + 16;\n// public static CAMERA_POS_OFFSET: number = UBOGlobal.MAT_VIEW_PROJ_INV_OFFSET + 16;\n// public static EXPOSURE_OFFSET: number = UBOGlobal.CAMERA_POS_OFFSET + 4;\n// public static MAIN_LIT_DIR_OFFSET: number = UBOGlobal.EXPOSURE_OFFSET + 4;\n// public static MAIN_LIT_COLOR_OFFSET: number = UBOGlobal.MAIN_LIT_DIR_OFFSET + 4;\n// public static AMBIENT_SKY_OFFSET: number = UBOGlobal.MAIN_LIT_COLOR_OFFSET + 4;\n// public static AMBIENT_GROUND_OFFSET: number = UBOGlobal.AMBIENT_SKY_OFFSET + 4;\n// public static COUNT: number = UBOGlobal.AMBIENT_GROUND_OFFSET + 4;\n// public static SIZE: number = UBOGlobal.COUNT * 4;\n// public static BLOCK: GFXUniformBlock = {\n// binding: UniformBinding.UBO_GLOBAL, name: 'CCGlobal', members: [\n// { name: 'cc_time', type: GFXType.FLOAT4, count: 1 },\n// { name: 'cc_screenSize', type: GFXType.FLOAT4, count: 1 },\n// { name: 'cc_screenScale', type: GFXType.FLOAT4, count: 1 },\n// { name: 'cc_nativeSize', type: GFXType.FLOAT4, count: 1 },\n// { name: 'cc_matView', type: GFXType.MAT4, count: 1 },\n// { name: 'cc_matViewInv', type: GFXType.MAT4, count: 1 },\n// { name: 'cc_matProj', type: GFXType.MAT4, count: 1 },\n// { name: 'cc_matProjInv', type: GFXType.MAT4, count: 1 },\n// { name: 'cc_matViewProj', type: GFXType.MAT4, count: 1 },\n// { name: 'cc_matViewProjInv', type: GFXType.MAT4, count: 1 },\n// { name: 'cc_cameraPos', type: GFXType.FLOAT4, count: 1 },\n// { name: 'cc_exposure', type: GFXType.FLOAT4, count: 1 },\n// { name: 'cc_mainLitDir', type: GFXType.FLOAT4, count: 1 },\n// { name: 'cc_mainLitColor', type: GFXType.FLOAT4, count: 1 },\n// { name: 'cc_ambientSky', type: GFXType.FLOAT4, count: 1 },\n// { name: 'cc_ambientGround', type: GFXType.FLOAT4, count: 1 },\n// ],\n// };\n// public view: Float32Array = new Float32Array(UBOGlobal.COUNT);\n// }\n// export class UBOShadow {\n// public static MAT_LIGHT_PLANE_PROJ_OFFSET: number = 0;\n// public static SHADOW_COLOR_OFFSET: number = UBOShadow.MAT_LIGHT_PLANE_PROJ_OFFSET + 16;\n// public static COUNT: number = UBOShadow.SHADOW_COLOR_OFFSET + 4;\n// public static SIZE: number = UBOShadow.COUNT * 4;\n// public static BLOCK: GFXUniformBlock = {\n// binding: UniformBinding.UBO_SHADOW, name: 'CCShadow', members: [\n// { name: 'cc_matLightPlaneProj', type: GFXType.MAT4, count: 1 },\n// { name: 'cc_shadowColor', type: GFXType.FLOAT4, count: 1 },\n// ],\n// };\n// public view: Float32Array = new Float32Array(UBOShadow.COUNT);\n// }\n// export const localBindingsDesc: Map<string, IInternalBindingDesc> = new Map<string, IInternalBindingDesc>();\n// export class UBOLocal {\n// public static MAT_WORLD_OFFSET: number = 0;\n// public static MAT_WORLD_IT_OFFSET: number = UBOLocal.MAT_WORLD_OFFSET + 16;\n// public static COUNT: number = UBOLocal.MAT_WORLD_IT_OFFSET + 16;\n// public static SIZE: number = UBOLocal.COUNT * 4;\n// public static BLOCK: GFXUniformBlock = {\n// binding: UniformBinding.UBO_LOCAL, name: 'CCLocal', members: [\n// { name: 'cc_matWorld', type: GFXType.MAT4, count: 1 },\n// { name: 'cc_matWorldIT', type: GFXType.MAT4, count: 1 },\n// ],\n// };\n// public view: Float32Array = new Float32Array(UBOLocal.COUNT);\n// }\n// localBindingsDesc.set(UBOLocal.BLOCK.name, {\n// type: GFXBindingType.UNIFORM_BUFFER,\n// blockInfo: UBOLocal.BLOCK,\n// });\n// export class UBOForwardLight {\n// public static MAX_SPHERE_LIGHTS = 2;\n// public static MAX_SPOT_LIGHTS = 2;\n// public static SPHERE_LIGHT_POS_OFFSET: number = 0;\n// public static SPHERE_LIGHT_SIZE_RANGE_OFFSET: number = UBOForwardLight.SPHERE_LIGHT_POS_OFFSET + UBOForwardLight.MAX_SPHERE_LIGHTS * 4;\n// public static SPHERE_LIGHT_COLOR_OFFSET: number = UBOForwardLight.SPHERE_LIGHT_SIZE_RANGE_OFFSET + UBOForwardLight.MAX_SPHERE_LIGHTS * 4;\n// public static SPOT_LIGHT_POS_OFFSET: number = UBOForwardLight.SPHERE_LIGHT_COLOR_OFFSET + UBOForwardLight.MAX_SPOT_LIGHTS * 4;\n// public static SPOT_LIGHT_SIZE_RANGE_ANGLE_OFFSET: number = UBOForwardLight.SPOT_LIGHT_POS_OFFSET + UBOForwardLight.MAX_SPOT_LIGHTS * 4;\n// public static SPOT_LIGHT_DIR_OFFSET: number = UBOForwardLight.SPOT_LIGHT_SIZE_RANGE_ANGLE_OFFSET + UBOForwardLight.MAX_SPOT_LIGHTS * 4;\n// public static SPOT_LIGHT_COLOR_OFFSET: number = UBOForwardLight.SPOT_LIGHT_DIR_OFFSET + UBOForwardLight.MAX_SPOT_LIGHTS * 4;\n// public static COUNT: number = UBOForwardLight.SPOT_LIGHT_COLOR_OFFSET + UBOForwardLight.MAX_SPOT_LIGHTS * 4;\n// public static SIZE: number = UBOForwardLight.COUNT * 4;\n// public static BLOCK: GFXUniformBlock = {\n// binding: UniformBinding.UBO_FORWARD_LIGHTS, name: 'CCForwardLight', members: [\n// { name: 'cc_sphereLitPos', type: GFXType.FLOAT4, count: UBOForwardLight.MAX_SPHERE_LIGHTS },\n// { name: 'cc_sphereLitSizeRange', type: GFXType.FLOAT4, count: UBOForwardLight.MAX_SPHERE_LIGHTS },\n// { name: 'cc_sphereLitColor', type: GFXType.FLOAT4, count: UBOForwardLight.MAX_SPHERE_LIGHTS },\n// { name: 'cc_spotLitPos', type: GFXType.FLOAT4, count: UBOForwardLight.MAX_SPOT_LIGHTS },\n// { name: 'cc_spotLitSizeRangeAngle', type: GFXType.FLOAT4, count: UBOForwardLight.MAX_SPOT_LIGHTS },\n// { name: 'cc_spotLitDir', type: GFXType.FLOAT4, count: UBOForwardLight.MAX_SPOT_LIGHTS },\n// { name: 'cc_spotLitColor', type: GFXType.FLOAT4, count: UBOForwardLight.MAX_SPOT_LIGHTS },\n// ],\n// };\n// public view: Float32Array = new Float32Array(UBOForwardLight.COUNT);\n// }\n// localBindingsDesc.set(UBOForwardLight.BLOCK.name, {\n// type: GFXBindingType.UNIFORM_BUFFER,\n// blockInfo: UBOForwardLight.BLOCK,\n// });\n// export class UBOSkinning {\n// public static MAT_JOINT_OFFSET: number = 0;\n// public static JOINTS_TEXTURE_SIZE_OFFSET: number = UBOSkinning.MAT_JOINT_OFFSET + 128 * 16;\n// public static COUNT: number = UBOSkinning.JOINTS_TEXTURE_SIZE_OFFSET + 4;\n// public static SIZE: number = UBOSkinning.COUNT * 4;\n// public static BLOCK: GFXUniformBlock = {\n// binding: UniformBinding.UBO_SKINNING, name: 'CCSkinning', members: [\n// { name: 'cc_matJoint', type: GFXType.MAT4, count: 128 },\n// { name: 'cc_jointsTextureSize', type: GFXType.FLOAT4, count: 1 },\n// ],\n// };\n// }\n// localBindingsDesc.set(UBOSkinning.BLOCK.name, {\n// type: GFXBindingType.UNIFORM_BUFFER,\n// blockInfo: UBOSkinning.BLOCK,\n// });\n// export const UNIFORM_JOINTS_TEXTURE: GFXUniformSampler = {\n// binding: UniformBinding.SAMPLER_JOINTS, name: 'cc_jointsTexture', type: GFXType.SAMPLER2D, count: 1,\n// };\n// localBindingsDesc.set(UNIFORM_JOINTS_TEXTURE.name, {\n// type: GFXBindingType.SAMPLER,\n// samplerInfo: UNIFORM_JOINTS_TEXTURE,\n// });\n// export interface IInternalBindingDesc {\n// type: GFXBindingType;\n// blockInfo?: GFXUniformBlock;\n// samplerInfo?: GFXUniformSampler;\n// }\n// export interface IInternalBindingInst extends IInternalBindingDesc {\n// buffer?: GFXBuffer;\n// sampler?: GFXSampler;\n// textureView?: GFXTextureView;\n// }\n\n// this file is used for offline effect building.\nvar _a, _b;\nvar SamplerInfoIndex;\n(function (SamplerInfoIndex) {\n SamplerInfoIndex[SamplerInfoIndex[\"minFilter\"] = 0] = \"minFilter\";\n SamplerInfoIndex[SamplerInfoIndex[\"magFilter\"] = 1] = \"magFilter\";\n SamplerInfoIndex[SamplerInfoIndex[\"mipFilter\"] = 2] = \"mipFilter\";\n SamplerInfoIndex[SamplerInfoIndex[\"addressU\"] = 3] = \"addressU\";\n SamplerInfoIndex[SamplerInfoIndex[\"addressV\"] = 4] = \"addressV\";\n SamplerInfoIndex[SamplerInfoIndex[\"addressW\"] = 5] = \"addressW\";\n SamplerInfoIndex[SamplerInfoIndex[\"maxAnisotropy\"] = 6] = \"maxAnisotropy\";\n SamplerInfoIndex[SamplerInfoIndex[\"cmpFunc\"] = 7] = \"cmpFunc\";\n SamplerInfoIndex[SamplerInfoIndex[\"minLOD\"] = 8] = \"minLOD\";\n SamplerInfoIndex[SamplerInfoIndex[\"maxLOD\"] = 9] = \"maxLOD\";\n SamplerInfoIndex[SamplerInfoIndex[\"mipLODBias\"] = 10] = \"mipLODBias\";\n SamplerInfoIndex[SamplerInfoIndex[\"borderColor\"] = 11] = \"borderColor\";\n SamplerInfoIndex[SamplerInfoIndex[\"total\"] = 15] = \"total\";\n})(SamplerInfoIndex || (SamplerInfoIndex = {}));\nvar typeMap = {};\ntypeMap[typeMap['bool'] = GFXType.BOOL] = 'bool';\ntypeMap[typeMap['int'] = GFXType.INT] = 'int';\ntypeMap[typeMap['ivec2'] = GFXType.INT2] = 'ivec2invTypeParams';\ntypeMap[typeMap['ivec3'] = GFXType.INT3] = 'ivec3';\ntypeMap[typeMap['ivec4'] = GFXType.INT4] = 'ivec4';\ntypeMap[typeMap['float'] = GFXType.FLOAT] = 'float';\ntypeMap[typeMap['vec2'] = GFXType.FLOAT2] = 'vec2';\ntypeMap[typeMap['vec3'] = GFXType.FLOAT3] = 'vec3';\ntypeMap[typeMap['vec4'] = GFXType.FLOAT4] = 'vec4';\ntypeMap[typeMap['mat2'] = GFXType.MAT2] = 'mat2';\ntypeMap[typeMap['mat3'] = GFXType.MAT3] = 'mat3';\ntypeMap[typeMap['mat4'] = GFXType.MAT4] = 'mat4';\ntypeMap[typeMap['sampler2D'] = GFXType.SAMPLER2D] = 'sampler2D';\ntypeMap[typeMap['samplerCube'] = GFXType.SAMPLER_CUBE] = 'samplerCube';\nvar sizeMap = (_a = {},\n _a[GFXType.BOOL] = 4,\n _a[GFXType.INT] = 4,\n _a[GFXType.INT2] = 8,\n _a[GFXType.INT3] = 12,\n _a[GFXType.INT4] = 16,\n _a[GFXType.FLOAT] = 4,\n _a[GFXType.FLOAT2] = 8,\n _a[GFXType.FLOAT3] = 12,\n _a[GFXType.FLOAT4] = 16,\n _a[GFXType.MAT2] = 16,\n _a[GFXType.MAT3] = 36,\n _a[GFXType.MAT4] = 64,\n _a[GFXType.SAMPLER2D] = 4,\n _a[GFXType.SAMPLER_CUBE] = 4,\n _a);\nvar formatMap = (_b = {},\n _b[GFXType.BOOL] = GFXFormat.R32I,\n _b[GFXType.INT] = GFXFormat.R32I,\n _b[GFXType.INT2] = GFXFormat.RG32I,\n _b[GFXType.INT3] = GFXFormat.RGB32I,\n _b[GFXType.INT4] = GFXFormat.RGBA32I,\n _b[GFXType.FLOAT] = GFXFormat.R32F,\n _b[GFXType.FLOAT2] = GFXFormat.RG32F,\n _b[GFXType.FLOAT3] = GFXFormat.RGB32F,\n _b[GFXType.FLOAT4] = GFXFormat.RGBA32F,\n _b);\n// const passParams = {\n// // color mask\n// NONE: gfx.GFXColorMask.NONE,\n// R: gfx.GFXColorMask.R,\n// G: gfx.GFXColorMask.G,\n// B: gfx.GFXColorMask.B,\n// A: gfx.GFXColorMask.A,\n// RG: gfx.GFXColorMask.R | gfx.GFXColorMask.G,\n// RB: gfx.GFXColorMask.R | gfx.GFXColorMask.B,\n// RA: gfx.GFXColorMask.R | gfx.GFXColorMask.A,\n// GB: gfx.GFXColorMask.G | gfx.GFXColorMask.B,\n// GA: gfx.GFXColorMask.G | gfx.GFXColorMask.A,\n// BA: gfx.GFXColorMask.B | gfx.GFXColorMask.A,\n// RGB: gfx.GFXColorMask.R | gfx.GFXColorMask.G | gfx.GFXColorMask.B,\n// RGA: gfx.GFXColorMask.R | gfx.GFXColorMask.G | gfx.GFXColorMask.A,\n// RBA: gfx.GFXColorMask.R | gfx.GFXColorMask.B | gfx.GFXColorMask.A,\n// GBA: gfx.GFXColorMask.G | gfx.GFXColorMask.B | gfx.GFXColorMask.A,\n// ALL: gfx.GFXColorMask.ALL,\n// // blend operation\n// ADD: gfx.GFXBlendOp.ADD,\n// SUB: gfx.GFXBlendOp.SUB,\n// REV_SUB: gfx.GFXBlendOp.REV_SUB,\n// MIN: gfx.GFXBlendOp.MIN,\n// MAX: gfx.GFXBlendOp.MAX,\n// // blend factor\n// ZERO: gfx.GFXBlendFactor.ZERO,\n// ONE: gfx.GFXBlendFactor.ONE,\n// SRC_ALPHA: gfx.GFXBlendFactor.SRC_ALPHA,\n// DST_ALPHA: gfx.GFXBlendFactor.DST_ALPHA,\n// ONE_MINUS_SRC_ALPHA: gfx.GFXBlendFactor.ONE_MINUS_SRC_ALPHA,\n// ONE_MINUS_DST_ALPHA: gfx.GFXBlendFactor.ONE_MINUS_DST_ALPHA,\n// SRC_COLOR: gfx.GFXBlendFactor.SRC_COLOR,\n// DST_COLOR: gfx.GFXBlendFactor.DST_COLOR,\n// ONE_MINUS_SRC_COLOR: gfx.GFXBlendFactor.ONE_MINUS_SRC_COLOR,\n// ONE_MINUS_DST_COLOR: gfx.GFXBlendFactor.ONE_MINUS_DST_COLOR,\n// SRC_ALPHA_SATURATE: gfx.GFXBlendFactor.SRC_ALPHA_SATURATE,\n// CONSTANT_COLOR: gfx.GFXBlendFactor.CONSTANT_COLOR,\n// ONE_MINUS_CONSTANT_COLOR: gfx.GFXBlendFactor.ONE_MINUS_CONSTANT_COLOR,\n// CONSTANT_ALPHA: gfx.GFXBlendFactor.CONSTANT_ALPHA,\n// ONE_MINUS_CONSTANT_ALPHA: gfx.GFXBlendFactor.ONE_MINUS_CONSTANT_ALPHA,\n// // stencil operation\n// // ZERO: GFXStencilOp.ZERO, // duplicate, safely removed because enum value is(and always will be) the same\n// KEEP: gfx.GFXStencilOp.KEEP,\n// REPLACE: gfx.GFXStencilOp.REPLACE,\n// INCR: gfx.GFXStencilOp.INCR,\n// DECR: gfx.GFXStencilOp.DECR,\n// INVERT: gfx.GFXStencilOp.INVERT,\n// INCR_WRAP: gfx.GFXStencilOp.INCR_WRAP,\n// DECR_WRAP: gfx.GFXStencilOp.DECR_WRAP,\n// // comparison function\n// NEVER: gfx.GFXComparisonFunc.NEVER,\n// LESS: gfx.GFXComparisonFunc.LESS,\n// EQUAL: gfx.GFXComparisonFunc.EQUAL,\n// LESS_EQUAL: gfx.GFXComparisonFunc.LESS_EQUAL,\n// GREATER: gfx.GFXComparisonFunc.GREATER,\n// NOT_EQUAL: gfx.GFXComparisonFunc.NOT_EQUAL,\n// GREATER_EQUAL: gfx.GFXComparisonFunc.GREATER_EQUAL,\n// ALWAYS: gfx.GFXComparisonFunc.ALWAYS,\n// // cull mode\n// // NONE: GFXCullMode.NONE, // duplicate, safely removed because enum value is(and always will be) the same\n// FRONT: gfx.GFXCullMode.FRONT,\n// BACK: gfx.GFXCullMode.BACK,\n// // shade mode\n// GOURAND: gfx.GFXShadeModel.GOURAND,\n// FLAT: gfx.GFXShadeModel.FLAT,\n// // polygon mode\n// FILL: gfx.GFXPolygonMode.FILL,\n// LINE: gfx.GFXPolygonMode.LINE,\n// POINT: gfx.GFXPolygonMode.POINT,\n// // primitive mode\n// POINT_LIST: gfx.GFXPrimitiveMode.POINT_LIST,\n// LINE_LIST: gfx.GFXPrimitiveMode.LINE_LIST,\n// LINE_STRIP: gfx.GFXPrimitiveMode.LINE_STRIP,\n// LINE_LOOP: gfx.GFXPrimitiveMode.LINE_LOOP,\n// TRIANGLE_LIST: gfx.GFXPrimitiveMode.TRIANGLE_LIST,\n// TRIANGLE_STRIP: gfx.GFXPrimitiveMode.TRIANGLE_STRIP,\n// TRIANGLE_FAN: gfx.GFXPrimitiveMode.TRIANGLE_FAN,\n// LINE_LIST_ADJACENCY: gfx.GFXPrimitiveMode.LINE_LIST_ADJACENCY,\n// LINE_STRIP_ADJACENCY: gfx.GFXPrimitiveMode.LINE_STRIP_ADJACENCY,\n// TRIANGLE_LIST_ADJACENCY: gfx.GFXPrimitiveMode.TRIANGLE_LIST_ADJACENCY,\n// TRIANGLE_STRIP_ADJACENCY: gfx.GFXPrimitiveMode.TRIANGLE_STRIP_ADJACENCY,\n// TRIANGLE_PATCH_ADJACENCY: gfx.GFXPrimitiveMode.TRIANGLE_PATCH_ADJACENCY,\n// QUAD_PATCH_LIST: gfx.GFXPrimitiveMode.QUAD_PATCH_LIST,\n// ISO_LINE_LIST: gfx.GFXPrimitiveMode.ISO_LINE_LIST,\n// // POINT: gfx.GFXFilter.POINT, // duplicate, safely removed because enum value is(and always will be) the same\n// LINEAR: gfx.GFXFilter.LINEAR,\n// ANISOTROPIC: gfx.GFXFilter.ANISOTROPIC,\n// WRAP: gfx.GFXAddress.WRAP,\n// MIRROR: gfx.GFXAddress.MIRROR,\n// CLAMP: gfx.GFXAddress.CLAMP,\n// BORDER: gfx.GFXAddress.BORDER,\n// VIEWPORT: gfx.GFXDynamicState.VIEWPORT,\n// SCISSOR: gfx.GFXDynamicState.SCISSOR,\n// LINE_WIDTH: gfx.GFXDynamicState.LINE_WIDTH,\n// DEPTH_BIAS: gfx.GFXDynamicState.DEPTH_BIAS,\n// BLEND_CONSTANTS: gfx.GFXDynamicState.BLEND_CONSTANTS,\n// DEPTH_BOUNDS: gfx.GFXDynamicState.DEPTH_BOUNDS,\n// STENCIL_WRITE_MASK: gfx.GFXDynamicState.STENCIL_WRITE_MASK,\n// STENCIL_COMPARE_MASK: gfx.GFXDynamicState.STENCIL_COMPARE_MASK,\n// TRUE: true,\n// FALSE: false\n// };\nvar passParams = {\n BACK: enums.CULL_BACK,\n FRONT: enums.CULL_FRONT,\n NONE: enums.CULL_NONE,\n ADD: enums.BLEND_FUNC_ADD,\n SUB: enums.BLEND_FUNC_SUBTRACT,\n REV_SUB: enums.BLEND_FUNC_REVERSE_SUBTRACT,\n ZERO: enums.BLEND_ZERO,\n ONE: enums.BLEND_ONE,\n SRC_COLOR: enums.BLEND_SRC_COLOR,\n ONE_MINUS_SRC_COLOR: enums.BLEND_ONE_MINUS_SRC_COLOR,\n DST_COLOR: enums.BLEND_DST_COLOR,\n ONE_MINUS_DST_COLOR: enums.BLEND_ONE_MINUS_DST_COLOR,\n SRC_ALPHA: enums.BLEND_SRC_ALPHA,\n ONE_MINUS_SRC_ALPHA: enums.BLEND_ONE_MINUS_SRC_ALPHA,\n DST_ALPHA: enums.BLEND_DST_ALPHA,\n ONE_MINUS_DST_ALPHA: enums.BLEND_ONE_MINUS_DST_ALPHA,\n CONSTANT_COLOR: enums.BLEND_CONSTANT_COLOR,\n ONE_MINUS_CONSTANT_COLOR: enums.BLEND_ONE_MINUS_CONSTANT_COLOR,\n CONSTANT_ALPHA: enums.BLEND_CONSTANT_ALPHA,\n ONE_MINUS_CONSTANT_ALPHA: enums.BLEND_ONE_MINUS_CONSTANT_ALPHA,\n SRC_ALPHA_SATURATE: enums.BLEND_SRC_ALPHA_SATURATE,\n NEVER: enums.DS_FUNC_NEVER,\n LESS: enums.DS_FUNC_LESS,\n EQUAL: enums.DS_FUNC_EQUAL,\n LEQUAL: enums.DS_FUNC_LEQUAL,\n GREATER: enums.DS_FUNC_GREATER,\n NOTEQUAL: enums.DS_FUNC_NOTEQUAL,\n GEQUAL: enums.DS_FUNC_GEQUAL,\n ALWAYS: enums.DS_FUNC_ALWAYS,\n KEEP: enums.STENCIL_OP_KEEP,\n REPLACE: enums.STENCIL_OP_REPLACE,\n INCR: enums.STENCIL_OP_INCR,\n INCR_WRAP: enums.STENCIL_OP_INCR_WRAP,\n DECR: enums.STENCIL_OP_DECR,\n DECR_WRAP: enums.STENCIL_OP_DECR_WRAP,\n INVERT: enums.STENCIL_OP_INVERT\n};\nObject.assign(passParams, RenderPassStage);\n// for structural type checking\n// an 'any' key will check against all elements defined in that object\n// a key start with '$' means its essential, and can't be undefined\nvar effectStructure = {\n $techniques: [\n {\n $passes: [\n {\n depthStencilState: {},\n rasterizerState: {},\n blendState: { targets: [{}] },\n properties: { any: { sampler: {}, inspector: {} } }\n }\n ]\n }\n ]\n};\nvar mappings = {\n murmurhash2_32_gc: murmurhash2_32_gc,\n SamplerInfoIndex: SamplerInfoIndex,\n effectStructure: effectStructure,\n typeMap: typeMap,\n sizeMap: sizeMap,\n formatMap: formatMap,\n passParams: passParams,\n RenderQueue: RenderQueue,\n RenderPriority: RenderPriority,\n GFXGetTypeSize: GFXGetTypeSize,\n UniformBinding: UniformBinding\n};\n\nmodule.exports = mappings;\n","// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\nimport { RecyclePool } from '../memop';\nimport enums from '../enums';\nimport { Vec2, Vec4, Mat3, Mat4, Color, Vec3 } from '../../core/value-types';\nimport ProgramLib from './program-lib';\nimport View from './view';\nimport gfx from '../gfx';\n\nlet _m4_tmp = new Mat4();\n\nlet _stageInfos = new RecyclePool(() => {\n return {\n stage: null,\n items: null,\n };\n}, 8);\n\nlet _float2_pool = new RecyclePool(() => {\n return new Float32Array(2);\n}, 8);\n\nlet _float3_pool = new RecyclePool(() => {\n return new Float32Array(3);\n}, 8);\n\nlet _float4_pool = new RecyclePool(() => {\n return new Float32Array(4);\n}, 8);\n\nlet _float9_pool = new RecyclePool(() => {\n return new Float32Array(9);\n}, 8);\n\nlet _float16_pool = new RecyclePool(() => {\n return new Float32Array(16);\n}, 8);\n\nlet _float64_pool = new RecyclePool(() => {\n return new Float32Array(64);\n}, 8);\n\nlet _int2_pool = new RecyclePool(() => {\n return new Int32Array(2);\n}, 8);\n\nlet _int3_pool = new RecyclePool(() => {\n return new Int32Array(3);\n}, 8);\n\nlet _int4_pool = new RecyclePool(() => {\n return new Int32Array(4);\n}, 8);\n\nlet _int64_pool = new RecyclePool(() => {\n return new Int32Array(64);\n}, 8);\n\nexport default class Base {\n /**\n * @param {gfx.Device} device\n * @param {Object} opts\n * @param {gfx.Texture2D} opts.defaultTexture\n * @param {gfx.TextureCube} opts.defaultTextureCube\n */\n constructor (device, opts) {\n this._device = device;\n this._programLib = new ProgramLib(device);\n this._opts = opts;\n this._type2defaultValue = {\n [enums.PARAM_INT]: 0,\n [enums.PARAM_INT2]: new Vec2(0, 0),\n [enums.PARAM_INT3]: new Vec3(0, 0, 0),\n [enums.PARAM_INT4]: new Vec4(0, 0, 0, 0),\n [enums.PARAM_FLOAT]: 0.0,\n [enums.PARAM_FLOAT2]: new Vec2(0, 0),\n [enums.PARAM_FLOAT3]: new Vec3(0, 0, 0),\n [enums.PARAM_FLOAT4]: new Vec4(0, 0, 0, 0),\n [enums.PARAM_COLOR4]: new Color(0, 0, 0, 1),\n [enums.PARAM_MAT3]: new Mat3(),\n [enums.PARAM_MAT4]: new Mat4(),\n [enums.PARAM_TEXTURE_2D]: opts.defaultTexture,\n [enums.PARAM_TEXTURE_CUBE]: opts.defaultTextureCube,\n };\n this._stage2fn = {};\n this._usedTextureUnits = 0;\n\n this._viewPools = new RecyclePool(() => {\n return new View();\n }, 8);\n\n this._drawItemsPools = new RecyclePool(() => {\n return {\n model: null,\n node: null,\n ia: null,\n effect: null,\n defines: null,\n uniforms: null\n };\n }, 100);\n\n this._stageItemsPools = new RecyclePool(() => {\n return new RecyclePool(() => {\n return {\n model: null,\n node: null,\n ia: null,\n effect: null,\n defines: null,\n passes: [],\n sortKey: -1,\n uniforms: null\n };\n }, 100);\n }, 16);\n\n this._definesChanged = false;\n }\n\n _resetTextuerUnit () {\n this._usedTextureUnits = 0;\n }\n\n _allocTextureUnit () {\n const device = this._device;\n\n let unit = this._usedTextureUnits;\n if (unit >= device._caps.maxTextureUnits) {\n console.warn(`Trying to use ${unit} texture units while this GPU supports only ${device._caps.maxTextureUnits}`);\n }\n\n this._usedTextureUnits += 1;\n return unit;\n }\n\n _registerStage (name, fn) {\n this._stage2fn[name] = fn;\n }\n\n clear () {\n this._programLib.clear();\n this.reset();\n }\n\n reset () {\n this._viewPools.reset();\n this._stageItemsPools.reset();\n\n this._definesChanged = false;\n }\n\n _requestView () {\n return this._viewPools.add();\n }\n\n _render (view, scene) {\n const device = this._device;\n\n // setup framebuffer\n device.setFrameBuffer(view._framebuffer);\n\n // setup viewport\n device.setViewport(\n view._rect.x,\n view._rect.y,\n view._rect.w,\n view._rect.h\n );\n\n // setup clear\n let clearOpts = {};\n if (view._clearFlags & enums.CLEAR_COLOR) {\n clearOpts.color = Vec4.toArray([], view._color);\n }\n if (view._clearFlags & enums.CLEAR_DEPTH) {\n clearOpts.depth = view._depth;\n }\n if (view._clearFlags & enums.CLEAR_STENCIL) {\n clearOpts.stencil = view._stencil;\n }\n device.clear(clearOpts);\n\n // get all draw items\n this._drawItemsPools.reset();\n\n for (let i = 0; i < scene._models.length; ++i) {\n let model = scene._models.data[i];\n\n // filter model by view\n if ((model._cullingMask & view._cullingMask) === 0) {\n continue;\n }\n\n let drawItem = this._drawItemsPools.add();\n model.extractDrawItem(drawItem);\n }\n\n // dispatch draw items to different stage\n _stageInfos.reset();\n\n for (let i = 0; i < view._stages.length; ++i) {\n let stage = view._stages[i];\n let stageItems = this._stageItemsPools.add();\n stageItems.reset();\n\n for (let j = 0; j < this._drawItemsPools.length; ++j) {\n let drawItem = this._drawItemsPools.data[j];\n let passes = drawItem.effect.stagePasses[stage];\n if (!passes || passes.length === 0) continue;\n\n let stageItem = stageItems.add();\n stageItem.passes = passes;\n stageItem.model = drawItem.model;\n stageItem.node = drawItem.node;\n stageItem.ia = drawItem.ia;\n stageItem.effect = drawItem.effect;\n stageItem.defines = drawItem.defines;\n stageItem.sortKey = -1;\n stageItem.uniforms = drawItem.uniforms;\n }\n\n let stageInfo = _stageInfos.add();\n stageInfo.stage = stage;\n stageInfo.items = stageItems;\n }\n\n // render stages\n for (let i = 0; i < _stageInfos.length; ++i) {\n let info = _stageInfos.data[i];\n let fn = this._stage2fn[info.stage];\n fn(view, info.items);\n }\n }\n\n _setProperty (prop) {\n const device = this._device;\n let param = prop.value;\n\n if (param === undefined) {\n param = prop.val;\n }\n\n if (param === undefined) {\n param = this._type2defaultValue[prop.type];\n }\n\n if (param === undefined) {\n console.warn(`Failed to set technique property ${prop.name}, value not found.`);\n return;\n }\n\n if (\n prop.type === enums.PARAM_TEXTURE_2D ||\n prop.type === enums.PARAM_TEXTURE_CUBE\n ) {\n if (Array.isArray(param)) {\n if (param.length > prop.count) {\n console.error(`Failed to set property [${prop.name}] : The length of texture array [${param.length}] is bigger than [${prop.count}].`);\n return;\n }\n let slots = _int64_pool.add();\n for (let index = 0; index < param.length; ++index) {\n slots[index] = this._allocTextureUnit();\n }\n device.setTextureArray(prop.name, param, slots);\n } else {\n device.setTexture(prop.name, param, this._allocTextureUnit());\n }\n } else {\n if (prop.directly) {\n device.setUniformDirectly(prop.name, param);\n }\n else {\n device.setUniform(prop.name, param);\n }\n }\n }\n\n _draw (item) {\n const device = this._device;\n const programLib = this._programLib;\n const { node, ia, passes, effect } = item;\n\n // reset the pool\n // NOTE: we can use drawCounter optimize this\n // TODO: should be configurable\n _float2_pool.reset();\n _float3_pool.reset();\n _float4_pool.reset();\n _float9_pool.reset();\n _float16_pool.reset();\n _float64_pool.reset();\n _int2_pool.reset();\n _int3_pool.reset();\n _int4_pool.reset();\n _int64_pool.reset();\n\n // set common uniforms\n // TODO: try commit this depends on effect\n // {\n node.getWorldMatrix(_m4_tmp);\n device.setUniform('cc_matWorld', Mat4.toArray(_float16_pool.add(), _m4_tmp));\n\n // let wq = node.getWorldRotation(cc.quat());\n Mat4.invert(_m4_tmp, _m4_tmp);\n Mat4.transpose(_m4_tmp, _m4_tmp);\n device.setUniform('cc_matWorldIT', Mat4.toArray(_float16_pool.add(), _m4_tmp));\n // }\n\n let defines = this._defines;\n\n // for each pass\n for (let i = 0; i < passes.length; ++i) {\n let pass = passes[i];\n\n if (this._definesChanged) {\n pass._programKey = null;\n }\n\n let count = ia.count;\n\n // set vertex buffer\n if (ia._vertexBuffer) {\n device.setVertexBuffer(0, ia._vertexBuffer);\n }\n\n // set index buffer\n if (ia._indexBuffer) {\n device.setIndexBuffer(ia._indexBuffer);\n }\n\n // set primitive type\n device.setPrimitiveType(ia._primitiveType);\n\n // set program\n Object.setPrototypeOf(defines, pass._defines);\n\n let program = programLib.getProgram(pass, defines, effect.name);\n device.setProgram(program);\n\n let uniforms = program._uniforms;\n let variants = pass._properties;\n for (let j = 0; j < uniforms.length; j++) {\n let prop = variants[uniforms[j].name];\n if (prop !== undefined)\n this._setProperty(prop);\n }\n\n\n // cull mode\n device.setCullMode(pass._cullMode);\n\n // blend\n if (pass._blend) {\n device.enableBlend();\n device.setBlendFuncSep(\n pass._blendSrc,\n pass._blendDst,\n pass._blendSrcAlpha,\n pass._blendDstAlpha\n );\n device.setBlendEqSep(\n pass._blendEq,\n pass._blendAlphaEq\n );\n device.setBlendColor32(pass._blendColor);\n }\n\n // depth test & write\n if (pass._depthTest) {\n device.enableDepthTest();\n device.setDepthFunc(pass._depthFunc);\n }\n if (pass._depthWrite) {\n device.enableDepthWrite();\n }\n\n // stencil\n device.setStencilTest(pass._stencilTest);\n if (pass._stencilTest === gfx.STENCIL_ENABLE) {\n // front\n device.setStencilFuncFront(\n pass._stencilFuncFront,\n pass._stencilRefFront,\n pass._stencilMaskFront\n );\n device.setStencilOpFront(\n pass._stencilFailOpFront,\n pass._stencilZFailOpFront,\n pass._stencilZPassOpFront,\n pass._stencilWriteMaskFront\n );\n\n // back\n device.setStencilFuncBack(\n pass._stencilFuncBack,\n pass._stencilRefBack,\n pass._stencilMaskBack\n );\n device.setStencilOpBack(\n pass._stencilFailOpBack,\n pass._stencilZFailOpBack,\n pass._stencilZPassOpBack,\n pass._stencilWriteMaskBack\n );\n }\n\n // draw pass\n device.draw(ia._start, count);\n\n this._resetTextuerUnit();\n }\n }\n}\n","// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\nimport gfx from '../gfx';\n\nexport default class InputAssembler {\n constructor(vb, ib, pt = gfx.PT_TRIANGLES) {\n this._vertexBuffer = vb;\n this._indexBuffer = ib;\n this._primitiveType = pt;\n this._start = 0;\n this._count = -1;\n\n // TODO: instancing data\n // this._stream = 0;\n }\n\n /**\n * @property {Number} count The number of indices or vertices to dispatch in the draw call.\n */\n get count() {\n if (this._count !== -1) {\n return this._count;\n }\n\n if (this._indexBuffer) {\n return this._indexBuffer.count;\n }\n\n if (this._vertexBuffer) {\n return this._vertexBuffer.count;\n }\n\n return 0;\n }\n}","// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\nimport gfx from '../gfx';\nimport enums from '../enums';\nimport ValueType from '../../core/value-types/value-type';\n\nexport default class Pass {\n constructor (name, detailName, programName, stage, properties = {}, defines = {}) {\n this._name = name;\n this._detailName = detailName;\n this._programName = programName;\n this._programKey = null;\n this._stage = stage;\n this._properties = properties;\n this._defines = defines;\n\n this._propertyNames = Object.keys(properties)\n this._defineNames = Object.keys(defines)\n\n // cullmode\n this._cullMode = gfx.CULL_BACK;\n\n // blending\n this._blend = false;\n this._blendEq = gfx.BLEND_FUNC_ADD;\n this._blendAlphaEq = gfx.BLEND_FUNC_ADD;\n this._blendSrc = gfx.BLEND_SRC_ALPHA;\n this._blendDst = gfx.BLEND_ONE_MINUS_SRC_ALPHA;\n this._blendSrcAlpha = gfx.BLEND_SRC_ALPHA;\n this._blendDstAlpha = gfx.BLEND_ONE_MINUS_SRC_ALPHA;\n this._blendColor = 0xffffffff;\n\n // depth\n this._depthTest = false;\n this._depthWrite = false;\n this._depthFunc = gfx.DS_FUNC_LESS,\n\n // stencil\n this._stencilTest = gfx.STENCIL_INHERIT;\n\n // front\n this._stencilFuncFront = gfx.DS_FUNC_ALWAYS;\n this._stencilRefFront = 0;\n this._stencilMaskFront = 0xff;\n this._stencilFailOpFront = gfx.STENCIL_OP_KEEP;\n this._stencilZFailOpFront = gfx.STENCIL_OP_KEEP;\n this._stencilZPassOpFront = gfx.STENCIL_OP_KEEP;\n this._stencilWriteMaskFront = 0xff;\n // back\n this._stencilFuncBack = gfx.DS_FUNC_ALWAYS;\n this._stencilRefBack = 0;\n this._stencilMaskBack = 0xff;\n this._stencilFailOpBack = gfx.STENCIL_OP_KEEP;\n this._stencilZFailOpBack = gfx.STENCIL_OP_KEEP;\n this._stencilZPassOpBack = gfx.STENCIL_OP_KEEP;\n this._stencilWriteMaskBack = 0xff;\n }\n\n setCullMode (cullMode = gfx.CULL_BACK) {\n this._cullMode = cullMode;\n }\n\n setBlend (\n enabled = false,\n blendEq = gfx.BLEND_FUNC_ADD,\n blendSrc = gfx.BLEND_SRC_ALPHA,\n blendDst = gfx.BLEND_ONE_MINUS_SRC_ALPHA,\n blendAlphaEq = gfx.BLEND_FUNC_ADD,\n blendSrcAlpha = gfx.BLEND_SRC_ALPHA,\n blendDstAlpha = gfx.BLEND_ONE_MINUS_SRC_ALPHA,\n blendColor = 0xffffffff\n ) {\n this._blend = enabled;\n this._blendEq = blendEq;\n this._blendSrc = blendSrc;\n this._blendDst = blendDst;\n this._blendAlphaEq = blendAlphaEq;\n this._blendSrcAlpha = blendSrcAlpha;\n this._blendDstAlpha = blendDstAlpha;\n this._blendColor = blendColor;\n }\n\n setDepth (\n depthTest = false,\n depthWrite = false,\n depthFunc = gfx.DS_FUNC_LESS\n ) {\n this._depthTest = depthTest;\n this._depthWrite = depthWrite;\n this._depthFunc = depthFunc;\n }\n\n setStencilFront (\n enabled = gfx.STENCIL_INHERIT,\n stencilFunc = gfx.DS_FUNC_ALWAYS,\n stencilRef = 0,\n stencilMask = 0xff,\n stencilFailOp = gfx.STENCIL_OP_KEEP,\n stencilZFailOp = gfx.STENCIL_OP_KEEP,\n stencilZPassOp = gfx.STENCIL_OP_KEEP,\n stencilWriteMask = 0xff\n ) {\n this._stencilTest = enabled;\n this._stencilFuncFront = stencilFunc;\n this._stencilRefFront = stencilRef;\n this._stencilMaskFront = stencilMask;\n this._stencilFailOpFront = stencilFailOp;\n this._stencilZFailOpFront = stencilZFailOp;\n this._stencilZPassOpFront = stencilZPassOp;\n this._stencilWriteMaskFront = stencilWriteMask;\n }\n\n setStencilEnabled (stencilTest = gfx.STENCIL_INHERIT) {\n this._stencilTest = stencilTest;\n }\n\n setStencilBack (\n stencilTest = gfx.STENCIL_INHERIT,\n stencilFunc = gfx.DS_FUNC_ALWAYS,\n stencilRef = 0,\n stencilMask = 0xff,\n stencilFailOp = gfx.STENCIL_OP_KEEP,\n stencilZFailOp = gfx.STENCIL_OP_KEEP,\n stencilZPassOp = gfx.STENCIL_OP_KEEP,\n stencilWriteMask = 0xff\n ) {\n this._stencilTest = stencilTest;\n this._stencilFuncBack = stencilFunc;\n this._stencilRefBack = stencilRef;\n this._stencilMaskBack = stencilMask;\n this._stencilFailOpBack = stencilFailOp;\n this._stencilZFailOpBack = stencilZFailOp;\n this._stencilZPassOpBack = stencilZPassOp;\n this._stencilWriteMaskBack = stencilWriteMask;\n }\n\n setStage (stage) {\n this._stage = stage;\n }\n\n setProperties (properties) {\n this._properties = properties;\n }\n\n getProperty (name) {\n if (!this._properties[name]) {\n return;\n }\n return this._properties[name].value;\n }\n\n setProperty (name, value, directly) {\n let prop = this._properties[name];\n if (!prop) {\n return false;\n }\n\n prop.directly = directly;\n\n if (Array.isArray(value)) {\n let array = prop.value;\n if (array.length !== value.length) {\n cc.warnID(9105, this._name, name);\n return;\n }\n for (let i = 0; i < value.length; i++) {\n array[i] = value[i];\n }\n }\n else {\n if (value && !ArrayBuffer.isView(value)) {\n if (prop.type === enums.PARAM_TEXTURE_2D) {\n prop.value = value.getImpl();\n }\n else if (value instanceof ValueType) {\n value.constructor.toArray(prop.value, value);\n }\n else {\n if (typeof value === 'object') {\n cc.warnID(9106, this._name, name);\n }\n prop.value = value;\n }\n }\n else {\n prop.value = value;\n }\n }\n\n return true;\n }\n\n getDefine (name) {\n return this._defines[name];\n }\n\n define (name, value, force) {\n let oldValue = this._defines[name];\n\n if (!force && oldValue === undefined) {\n return false;\n }\n\n if (oldValue !== value) {\n this._defines[name] = value;\n this._programKey = null;\n }\n\n return true;\n }\n\n clone () {\n let pass = new Pass(this._programName);\n Object.assign(pass, this);\n\n let newProperties = {};\n let properties = this._properties;\n for (let name in properties) {\n let prop = properties[name];\n let newProp = newProperties[name] = {};\n\n let value = prop.value;\n if (Array.isArray(value)) {\n newProp.value = value.concat();\n }\n else if (ArrayBuffer.isView(value)) {\n newProp.value = new value.__proto__.constructor(value);\n }\n else {\n newProp.value = value;\n }\n\n for (let name in prop) {\n if (name === 'value') continue;\n newProp[name] = prop[name];\n }\n }\n\n pass._properties = newProperties;\n pass._defines = Object.assign({}, this._defines);\n pass._propertyNames = this._propertyNames;\n pass._defineNames = this._defineNames;\n\n return pass;\n }\n}\n","// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\nimport gfx from '../gfx';\n\nlet _shdID = 0;\n\nfunction _generateDefines(tmpDefines, defines) {\n let results = [];\n for (let i = 0; i < tmpDefines.length; i++) {\n let name = tmpDefines[i].name;\n let value = defines[name];\n if (typeof value !== 'number') {\n value = value ? 1 : 0;\n }\n results.push(`#define ${name} ${value}`);\n }\n return results.join('\\n') + '\\n';\n}\n\nfunction _replaceMacroNums(string, tmpDefines, defines) {\n let tmp = string;\n\n for (let i = 0; i < tmpDefines.length; i++) {\n let name = tmpDefines[i].name;\n let value = defines[name];\n if (Number.isInteger(value)) {\n let reg = new RegExp(name, 'g');\n tmp = tmp.replace(reg, value);\n }\n }\n return tmp;\n}\n\nfunction _unrollLoops(string) {\n let pattern = /#pragma for (\\w+) in range\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)([\\s\\S]+?)#pragma endFor/g;\n function replace(match, index, begin, end, snippet) {\n let unroll = '';\n let parsedBegin = parseInt(begin);\n let parsedEnd = parseInt(end);\n if (parsedBegin.isNaN || parsedEnd.isNaN) {\n console.error('Unroll For Loops Error: begin and end of range must be an int num.');\n }\n for (let i = parsedBegin; i < parsedEnd; ++i) {\n unroll += snippet.replace(new RegExp(`{${index}}`, 'g'), i);\n }\n return unroll;\n }\n return string.replace(pattern, replace);\n}\n\nfunction _replaceHighp(string) {\n return string.replace(/\\bhighp\\b/g, 'mediump');\n}\n\nexport default class ProgramLib {\n /**\n * @param {gfx.Device} device\n */\n constructor(device) {\n this._device = device;\n\n // register templates\n this._templates = {};\n this._cache = {};\n\n this._checkPrecision();\n }\n\n clear () {\n this._templates = {};\n this._cache = {};\n }\n\n /**\n * @param {string} name\n * @param {string} vert\n * @param {string} frag\n * @param {Object[]} defines\n *\n * @example:\n * // this object is auto-generated from your actual shaders\n * let program = {\n * name: 'foobar',\n * vert: vertTmpl,\n * frag: fragTmpl,\n * defines: [\n * { name: 'shadow', type: 'boolean' },\n * { name: 'lightCount', type: 'number', min: 1, max: 4 }\n * ],\n * attributes: [{ name: 'a_position', type: 'vec3' }],\n * uniforms: [{ name: 'color', type: 'vec4' }],\n * extensions: ['GL_OES_standard_derivatives'],\n * };\n * programLib.define(program);\n */\n define(prog) {\n let { name, defines, glsl1 } = prog;\n let { vert, frag } = glsl1 || prog;\n if (this._templates[name]) {\n // console.warn(`Failed to define shader ${name}: already exists.`);\n return;\n }\n\n let id = ++_shdID;\n\n // calculate option mask offset\n let offset = 0;\n for (let i = 0; i < defines.length; ++i) {\n let def = defines[i];\n let cnt = 1;\n\n if (def.type === 'number') {\n let range = def.range || [];\n def.min = range[0] || 0;\n def.max = range[1] || 4;\n cnt = Math.ceil(Math.log2(def.max - def.min));\n\n def._map = function (value) {\n return (value - this.min) << this._offset;\n }.bind(def);\n } else { // boolean\n def._map = function (value) {\n if (value) {\n return 1 << this._offset;\n }\n return 0;\n }.bind(def);\n }\n\n def._offset = offset;\n offset += cnt;\n }\n\n let uniforms = prog.uniforms || [];\n\n if (prog.samplers) {\n for (let i = 0; i < prog.samplers.length; i++) {\n uniforms.push(prog.samplers[i])\n }\n }\n if (prog.blocks) {\n for (let i = 0; i < prog.blocks.length; i++) {\n let defines = prog.blocks[i].defines;\n let members = prog.blocks[i].members;\n for (let j = 0; j < members.length; j++) {\n uniforms.push({\n defines,\n name: members[j].name,\n type: members[j].type,\n })\n }\n }\n }\n\n // store it\n this._templates[name] = {\n id,\n name,\n vert,\n frag,\n defines,\n attributes: prog.attributes,\n uniforms,\n extensions: prog.extensions\n };\n }\n\n getTemplate(name) {\n return this._templates[name];\n }\n\n /**\n * Does this library has the specified program?\n * @param {string} name\n * @returns {boolean}\n */\n hasProgram(name) {\n return this._templates[name] !== undefined;\n }\n\n getKey(name, defines) {\n let tmpl = this._templates[name];\n let key = 0;\n for (let i = 0; i < tmpl.defines.length; ++i) {\n let tmplDefs = tmpl.defines[i];\n\n let value = defines[tmplDefs.name];\n if (value === undefined) {\n continue;\n }\n\n key |= tmplDefs._map(value);\n }\n\n // return key << 8 | tmpl.id;\n // key number maybe bigger than 32 bit, need use string to store value.\n return tmpl.id + ':' + key;\n }\n\n getProgram(pass, defines, errPrefix) {\n let key = pass._programKey = pass._programKey || this.getKey(pass._programName, defines);\n let program = this._cache[key];\n if (program) {\n return program;\n }\n\n // get template\n let tmpl = this._templates[pass._programName];\n let customDef = _generateDefines(tmpl.defines, defines);\n let vert = _replaceMacroNums(tmpl.vert, tmpl.defines, defines);\n vert = customDef + _unrollLoops(vert);\n if (!this._highpSupported) {\n vert = _replaceHighp(vert);\n }\n\n let frag = _replaceMacroNums(tmpl.frag, tmpl.defines, defines);\n frag = customDef + _unrollLoops(frag);\n if (!this._highpSupported) {\n frag = _replaceHighp(frag);\n }\n\n program = new gfx.Program(this._device, {\n vert,\n frag\n });\n let errors = program.link();\n if (errors) {\n let vertLines = vert.split('\\n');\n let fragLines = frag.split('\\n');\n let defineLength = tmpl.defines.length;\n errors.forEach(err => {\n let line = err.line - 1;\n let originLine = err.line - defineLength;\n\n let lines = err.type === 'vs' ? vertLines : fragLines;\n // let source = ` ${lines[line-1]}\\n>${lines[line]}\\n ${lines[line+1]}`;\n let source = lines[line];\n\n let info = err.info || `Failed to compile ${err.type} ${err.fileID} (ln ${originLine}): \\n ${err.message}: \\n ${source}`;\n cc.error(`${errPrefix} : ${info}`);\n })\n }\n this._cache[key] = program;\n\n return program;\n }\n\n _checkPrecision () {\n let gl = this._device._gl;\n let highpSupported = false;\n if (gl.getShaderPrecisionFormat) {\n let vertHighp = gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_FLOAT);\n let fragHighp = gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT);\n highpSupported = (vertHighp && vertHighp.precision > 0) &&\n (fragHighp && fragHighp.precision > 0);\n }\n if (!highpSupported) {\n cc.warnID(9102);\n }\n this._highpSupported = highpSupported;\n }\n}\n","// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\nexport default class Technique {\n constructor(name, passes) {\n this._name = name;\n this._passes = passes;\n }\n\n get name () {\n return this._name;\n }\n\n get passes() {\n return this._passes;\n }\n\n clone () {\n let passes = [];\n for (let i = 0; i < this._passes.length; i++) {\n passes.push(this._passes[i].clone());\n }\n return new Technique(this._name, passes);\n }\n}","// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\nimport { Vec3, Mat4, Vec4 } from '../../core/value-types';\nimport enums from '../enums';\n\nlet _m4_tmp = new Mat4();\nlet _genID = 0;\n\n/**\n * A representation of a single camera view\n */\nexport default class View {\n /**\n * Setup a default view\n */\n constructor() {\n this._id = _genID++;\n\n // priority. the smaller one will be rendered first\n this._priority = 0;\n\n // viewport\n this._rect = {\n x: 0, y: 0, w: 1, h: 1\n };\n\n // TODO:\n // this._scissor = {\n // x: 0, y: 0, w: 1, h: 1\n // };\n\n // clear options\n this._color = new Vec4(0.3, 0.3, 0.3, 1);\n this._depth = 1;\n this._stencil = 0;\n this._clearFlags = enums.CLEAR_COLOR | enums.CLEAR_DEPTH;\n this._clearModel = null;\n\n // matrix\n this._matView = cc.mat4();\n this._matViewInv = cc.mat4();\n this._matProj = cc.mat4();\n this._matViewProj = cc.mat4();\n this._matInvViewProj = cc.mat4();\n\n // stages & framebuffer\n this._stages = [];\n this._cullingByID = false;\n this._framebuffer = null;\n\n this._shadowLight = null; // TODO: should not refer light in view.\n\n this._cullingMask = 0xffffffff;\n }\n\n /**\n * Get the view's forward direction\n * @param {Vec3} out the receiving vector\n * @returns {Vec3} the receiving vector\n */\n getForward(out) {\n let m = this._matView.m;\n return Vec3.set(\n out,\n -m[2],\n -m[6],\n -m[10]\n );\n }\n\n /**\n * Get the view's observing location\n * @param {Vec3} out the receiving vector\n * @returns {Vec3} the receiving vector\n */\n getPosition(out) {\n Mat4.invert(_m4_tmp, this._matView);\n return Mat4.getTranslation(out, _m4_tmp);\n }\n}\n","// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\nimport { typeMap } from './build/mappings'\n\nexport default {\n // projection\n PROJ_PERSPECTIVE: 0,\n PROJ_ORTHO: 1,\n\n // lights\n LIGHT_DIRECTIONAL: 0,\n LIGHT_POINT: 1,\n LIGHT_SPOT: 2,\n LIGHT_AMBIENT: 3,\n\n // shadows\n SHADOW_NONE: 0,\n SHADOW_HARD: 1,\n SHADOW_SOFT: 2,\n\n // parameter type\n PARAM_INT: typeMap.int,\n PARAM_INT2: typeMap.ivec2,\n PARAM_INT3: typeMap.ivec3,\n PARAM_INT4: typeMap.ivec4,\n PARAM_FLOAT: typeMap.float,\n PARAM_FLOAT2: typeMap.vec2,\n PARAM_FLOAT3: typeMap.vec3,\n PARAM_FLOAT4: typeMap.vec4,\n PARAM_MAT2: typeMap.mat2,\n PARAM_MAT3: typeMap.mat3,\n PARAM_MAT4: typeMap.mat4,\n PARAM_TEXTURE_2D: typeMap.sampler2D,\n PARAM_TEXTURE_CUBE: typeMap.samplerCube,\n\n // clear flags\n CLEAR_COLOR: 1,\n CLEAR_DEPTH: 2,\n CLEAR_STENCIL: 4,\n CLEAR_SKYBOX: 8,\n\n //\n BUFFER_VIEW_INT8: 0,\n BUFFER_VIEW_UINT8: 1,\n BUFFER_VIEW_INT16: 2,\n BUFFER_VIEW_UINT16: 3,\n BUFFER_VIEW_INT32: 4,\n BUFFER_VIEW_UINT32: 5,\n BUFFER_VIEW_FLOAT32: 6,\n};\n","import State from './state';\nimport { enums } from './enums';\n\nimport Texture2D from './texture-2d';\nimport TextureCube from './texture-cube';\n\nconst GL_INT = 5124;\nconst GL_FLOAT = 5126;\nconst GL_FLOAT_VEC2 = 35664;\nconst GL_FLOAT_VEC3 = 35665;\nconst GL_FLOAT_VEC4 = 35666;\nconst GL_INT_VEC2 = 35667;\nconst GL_INT_VEC3 = 35668;\nconst GL_INT_VEC4 = 35669;\nconst GL_BOOL = 35670;\nconst GL_BOOL_VEC2 = 35671;\nconst GL_BOOL_VEC3 = 35672;\nconst GL_BOOL_VEC4 = 35673;\nconst GL_FLOAT_MAT2 = 35674;\nconst GL_FLOAT_MAT3 = 35675;\nconst GL_FLOAT_MAT4 = 35676;\nconst GL_SAMPLER_2D = 35678;\nconst GL_SAMPLER_CUBE = 35680;\n\n/**\n * _type2uniformCommit\n */\nlet _type2uniformCommit = {\n [GL_INT]: function (gl, id, value) {\n gl.uniform1i(id, value);\n },\n\n [GL_FLOAT]: function (gl, id, value) {\n gl.uniform1f(id, value);\n },\n\n [GL_FLOAT_VEC2]: function (gl, id, value) {\n gl.uniform2fv(id, value);\n },\n\n [GL_FLOAT_VEC3]: function (gl, id, value) {\n gl.uniform3fv(id, value);\n },\n\n [GL_FLOAT_VEC4]: function (gl, id, value) {\n gl.uniform4fv(id, value);\n },\n\n [GL_INT_VEC2]: function (gl, id, value) {\n gl.uniform2iv(id, value);\n },\n\n [GL_INT_VEC3]: function (gl, id, value) {\n gl.uniform3iv(id, value);\n },\n\n [GL_INT_VEC4]: function (gl, id, value) {\n gl.uniform4iv(id, value);\n },\n\n [GL_BOOL]: function (gl, id, value) {\n gl.uniform1i(id, value);\n },\n\n [GL_BOOL_VEC2]: function (gl, id, value) {\n gl.uniform2iv(id, value);\n },\n\n [GL_BOOL_VEC3]: function (gl, id, value) {\n gl.uniform3iv(id, value);\n },\n\n [GL_BOOL_VEC4]: function (gl, id, value) {\n gl.uniform4iv(id, value);\n },\n\n [GL_FLOAT_MAT2]: function (gl, id, value) {\n gl.uniformMatrix2fv(id, false, value);\n },\n\n [GL_FLOAT_MAT3]: function (gl, id, value) {\n gl.uniformMatrix3fv(id, false, value);\n },\n\n [GL_FLOAT_MAT4]: function (gl, id, value) {\n gl.uniformMatrix4fv(id, false, value);\n },\n\n [GL_SAMPLER_2D]: function (gl, id, value) {\n gl.uniform1i(id, value);\n },\n\n [GL_SAMPLER_CUBE]: function (gl, id, value) {\n gl.uniform1i(id, value);\n },\n};\n\n/**\n * _type2uniformArrayCommit\n */\nlet _type2uniformArrayCommit = {\n [GL_INT]: function (gl, id, value) {\n gl.uniform1iv(id, value);\n },\n\n [GL_FLOAT]: function (gl, id, value) {\n gl.uniform1fv(id, value);\n },\n\n [GL_FLOAT_VEC2]: function (gl, id, value) {\n gl.uniform2fv(id, value);\n },\n\n [GL_FLOAT_VEC3]: function (gl, id, value) {\n gl.uniform3fv(id, value);\n },\n\n [GL_FLOAT_VEC4]: function (gl, id, value) {\n gl.uniform4fv(id, value);\n },\n\n [GL_INT_VEC2]: function (gl, id, value) {\n gl.uniform2iv(id, value);\n },\n\n [GL_INT_VEC3]: function (gl, id, value) {\n gl.uniform3iv(id, value);\n },\n\n [GL_INT_VEC4]: function (gl, id, value) {\n gl.uniform4iv(id, value);\n },\n\n [GL_BOOL]: function (gl, id, value) {\n gl.uniform1iv(id, value);\n },\n\n [GL_BOOL_VEC2]: function (gl, id, value) {\n gl.uniform2iv(id, value);\n },\n\n [GL_BOOL_VEC3]: function (gl, id, value) {\n gl.uniform3iv(id, value);\n },\n\n [GL_BOOL_VEC4]: function (gl, id, value) {\n gl.uniform4iv(id, value);\n },\n\n [GL_FLOAT_MAT2]: function (gl, id, value) {\n gl.uniformMatrix2fv(id, false, value);\n },\n\n [GL_FLOAT_MAT3]: function (gl, id, value) {\n gl.uniformMatrix3fv(id, false, value);\n },\n\n [GL_FLOAT_MAT4]: function (gl, id, value) {\n gl.uniformMatrix4fv(id, false, value);\n },\n\n [GL_SAMPLER_2D]: function (gl, id, value) {\n gl.uniform1iv(id, value);\n },\n\n [GL_SAMPLER_CUBE]: function (gl, id, value) {\n gl.uniform1iv(id, value);\n },\n};\n\n/**\n * _commitBlendStates\n */\nfunction _commitBlendStates(gl, cur, next) {\n // enable/disable blend\n if (cur.blend !== next.blend) {\n if (!next.blend) {\n gl.disable(gl.BLEND);\n return;\n }\n\n gl.enable(gl.BLEND);\n\n if (\n next.blendSrc === enums.BLEND_CONSTANT_COLOR ||\n next.blendSrc === enums.BLEND_ONE_MINUS_CONSTANT_COLOR ||\n next.blendDst === enums.BLEND_CONSTANT_COLOR ||\n next.blendDst === enums.BLEND_ONE_MINUS_CONSTANT_COLOR\n ) {\n gl.blendColor(\n (next.blendColor >> 24) / 255,\n (next.blendColor >> 16 & 0xff) / 255,\n (next.blendColor >> 8 & 0xff) / 255,\n (next.blendColor & 0xff) / 255\n );\n }\n\n if (next.blendSep) {\n gl.blendFuncSeparate(next.blendSrc, next.blendDst, next.blendSrcAlpha, next.blendDstAlpha);\n gl.blendEquationSeparate(next.blendEq, next.blendAlphaEq);\n } else {\n gl.blendFunc(next.blendSrc, next.blendDst);\n gl.blendEquation(next.blendEq);\n }\n\n return;\n }\n\n // nothing to update\n if (next.blend === false) {\n return;\n }\n\n // blend-color\n if (cur.blendColor !== next.blendColor) {\n gl.blendColor(\n (next.blendColor >> 24) / 255,\n (next.blendColor >> 16 & 0xff) / 255,\n (next.blendColor >> 8 & 0xff) / 255,\n (next.blendColor & 0xff) / 255\n );\n }\n\n // separate diff, reset all\n if (cur.blendSep !== next.blendSep) {\n if (next.blendSep) {\n gl.blendFuncSeparate(next.blendSrc, next.blendDst, next.blendSrcAlpha, next.blendDstAlpha);\n gl.blendEquationSeparate(next.blendEq, next.blendAlphaEq);\n } else {\n gl.blendFunc(next.blendSrc, next.blendDst);\n gl.blendEquation(next.blendEq);\n }\n\n return;\n }\n\n if (next.blendSep) {\n // blend-func-separate\n if (\n cur.blendSrc !== next.blendSrc ||\n cur.blendDst !== next.blendDst ||\n cur.blendSrcAlpha !== next.blendSrcAlpha ||\n cur.blendDstAlpha !== next.blendDstAlpha\n ) {\n gl.blendFuncSeparate(next.blendSrc, next.blendDst, next.blendSrcAlpha, next.blendDstAlpha);\n }\n\n // blend-equation-separate\n if (\n cur.blendEq !== next.blendEq ||\n cur.blendAlphaEq !== next.blendAlphaEq\n ) {\n gl.blendEquationSeparate(next.blendEq, next.blendAlphaEq);\n }\n } else {\n // blend-func\n if (\n cur.blendSrc !== next.blendSrc ||\n cur.blendDst !== next.blendDst\n ) {\n gl.blendFunc(next.blendSrc, next.blendDst);\n }\n\n // blend-equation\n if (cur.blendEq !== next.blendEq) {\n gl.blendEquation(next.blendEq);\n }\n }\n}\n\n/**\n * _commitDepthStates\n */\nfunction _commitDepthStates(gl, cur, next) {\n // enable/disable depth-test\n if (cur.depthTest !== next.depthTest) {\n if (!next.depthTest) {\n gl.disable(gl.DEPTH_TEST);\n return;\n }\n\n gl.enable(gl.DEPTH_TEST);\n gl.depthFunc(next.depthFunc);\n gl.depthMask(next.depthWrite);\n\n return;\n }\n\n // commit depth-write\n if (cur.depthWrite !== next.depthWrite) {\n gl.depthMask(next.depthWrite);\n }\n\n // check if depth-write enabled\n if (next.depthTest === false) {\n if (next.depthWrite) {\n next.depthTest = true;\n next.depthFunc = enums.DS_FUNC_ALWAYS;\n\n gl.enable(gl.DEPTH_TEST);\n gl.depthFunc(next.depthFunc);\n }\n\n return;\n }\n\n // depth-func\n if (cur.depthFunc !== next.depthFunc) {\n gl.depthFunc(next.depthFunc);\n }\n}\n\n/**\n * _commitStencilStates\n */\nfunction _commitStencilStates(gl, cur, next) {\n // inherit stencil states\n if (next.stencilTest === enums.STENCIL_INHERIT) {\n return;\n }\n\n if (next.stencilTest !== cur.stencilTest) {\n if (next.stencilTest === enums.STENCIL_DISABLE) {\n gl.disable(gl.STENCIL_TEST);\n return;\n }\n\n gl.enable(gl.STENCIL_TEST);\n\n if (next.stencilSep) {\n gl.stencilFuncSeparate(gl.FRONT, next.stencilFuncFront, next.stencilRefFront, next.stencilMaskFront);\n gl.stencilMaskSeparate(gl.FRONT, next.stencilWriteMaskFront);\n gl.stencilOpSeparate(gl.FRONT, next.stencilFailOpFront, next.stencilZFailOpFront, next.stencilZPassOpFront);\n gl.stencilFuncSeparate(gl.BACK, next.stencilFuncBack, next.stencilRefBack, next.stencilMaskBack);\n gl.stencilMaskSeparate(gl.BACK, next.stencilWriteMaskBack);\n gl.stencilOpSeparate(gl.BACK, next.stencilFailOpBack, next.stencilZFailOpBack, next.stencilZPassOpBack);\n } else {\n gl.stencilFunc(next.stencilFuncFront, next.stencilRefFront, next.stencilMaskFront);\n gl.stencilMask(next.stencilWriteMaskFront);\n gl.stencilOp(next.stencilFailOpFront, next.stencilZFailOpFront, next.stencilZPassOpFront);\n }\n\n return;\n }\n\n // fast return\n if (next.stencilTest === enums.STENCIL_DISABLE) {\n return;\n }\n\n if (cur.stencilSep !== next.stencilSep) {\n if (next.stencilSep) {\n gl.stencilFuncSeparate(gl.FRONT, next.stencilFuncFront, next.stencilRefFront, next.stencilMaskFront);\n gl.stencilMaskSeparate(gl.FRONT, next.stencilWriteMaskFront);\n gl.stencilOpSeparate(gl.FRONT, next.stencilFailOpFront, next.stencilZFailOpFront, next.stencilZPassOpFront);\n gl.stencilFuncSeparate(gl.BACK, next.stencilFuncBack, next.stencilRefBack, next.stencilMaskBack);\n gl.stencilMaskSeparate(gl.BACK, next.stencilWriteMaskBack);\n gl.stencilOpSeparate(gl.BACK, next.stencilFailOpBack, next.stencilZFailOpBack, next.stencilZPassOpBack);\n } else {\n gl.stencilFunc(next.stencilFuncFront, next.stencilRefFront, next.stencilMaskFront);\n gl.stencilMask(next.stencilWriteMaskFront);\n gl.stencilOp(next.stencilFailOpFront, next.stencilZFailOpFront, next.stencilZPassOpFront);\n }\n return;\n }\n\n if (next.stencilSep) {\n // front\n if (\n cur.stencilFuncFront !== next.stencilFuncFront ||\n cur.stencilRefFront !== next.stencilRefFront ||\n cur.stencilMaskFront !== next.stencilMaskFront\n ) {\n gl.stencilFuncSeparate(gl.FRONT, next.stencilFuncFront, next.stencilRefFront, next.stencilMaskFront);\n }\n if (cur.stencilWriteMaskFront !== next.stencilWriteMaskFront) {\n gl.stencilMaskSeparate(gl.FRONT, next.stencilWriteMaskFront);\n }\n if (\n cur.stencilFailOpFront !== next.stencilFailOpFront ||\n cur.stencilZFailOpFront !== next.stencilZFailOpFront ||\n cur.stencilZPassOpFront !== next.stencilZPassOpFront\n ) {\n gl.stencilOpSeparate(gl.FRONT, next.stencilFailOpFront, next.stencilZFailOpFront, next.stencilZPassOpFront);\n }\n\n // back\n if (\n cur.stencilFuncBack !== next.stencilFuncBack ||\n cur.stencilRefBack !== next.stencilRefBack ||\n cur.stencilMaskBack !== next.stencilMaskBack\n ) {\n gl.stencilFuncSeparate(gl.BACK, next.stencilFuncBack, next.stencilRefBack, next.stencilMaskBack);\n }\n if (cur.stencilWriteMaskBack !== next.stencilWriteMaskBack) {\n gl.stencilMaskSeparate(gl.BACK, next.stencilWriteMaskBack);\n }\n if (\n cur.stencilFailOpBack !== next.stencilFailOpBack ||\n cur.stencilZFailOpBack !== next.stencilZFailOpBack ||\n cur.stencilZPassOpBack !== next.stencilZPassOpBack\n ) {\n gl.stencilOpSeparate(gl.BACK, next.stencilFailOpBack, next.stencilZFailOpBack, next.stencilZPassOpBack);\n }\n } else {\n if (\n cur.stencilFuncFront !== next.stencilFuncFront ||\n cur.stencilRefFront !== next.stencilRefFront ||\n cur.stencilMaskFront !== next.stencilMaskFront\n ) {\n gl.stencilFunc(next.stencilFuncFront, next.stencilRefFront, next.stencilMaskFront);\n }\n if (cur.stencilWriteMaskFront !== next.stencilWriteMaskFront) {\n gl.stencilMask(next.stencilWriteMaskFront);\n }\n if (\n cur.stencilFailOpFront !== next.stencilFailOpFront ||\n cur.stencilZFailOpFront !== next.stencilZFailOpFront ||\n cur.stencilZPassOpFront !== next.stencilZPassOpFront\n ) {\n gl.stencilOp(next.stencilFailOpFront, next.stencilZFailOpFront, next.stencilZPassOpFront);\n }\n }\n\n}\n\n/**\n * _commitCullMode\n */\nfunction _commitCullMode(gl, cur, next) {\n if (cur.cullMode === next.cullMode) {\n return;\n }\n\n if (next.cullMode === enums.CULL_NONE) {\n gl.disable(gl.CULL_FACE);\n return;\n }\n\n gl.enable(gl.CULL_FACE);\n gl.cullFace(next.cullMode);\n}\n\n/**\n * _commitVertexBuffers\n */\nfunction _commitVertexBuffers(device, gl, cur, next) {\n let attrsDirty = false;\n\n // nothing changed for vertex buffer\n if (next.maxStream === -1) {\n return;\n }\n\n if (cur.maxStream !== next.maxStream) {\n attrsDirty = true;\n } else if (cur.program !== next.program) {\n attrsDirty = true;\n } else {\n for (let i = 0; i < next.maxStream + 1; ++i) {\n if (\n cur.vertexBuffers[i] !== next.vertexBuffers[i] ||\n cur.vertexBufferOffsets[i] !== next.vertexBufferOffsets[i]\n ) {\n attrsDirty = true;\n break;\n }\n }\n }\n\n if (attrsDirty) {\n for (let i = 0; i < device._caps.maxVertexAttribs; ++i) {\n device._newAttributes[i] = 0;\n }\n\n for (let i = 0; i < next.maxStream + 1; ++i) {\n let vb = next.vertexBuffers[i];\n let vbOffset = next.vertexBufferOffsets[i];\n if (!vb || vb._glID === -1) {\n continue;\n }\n\n gl.bindBuffer(gl.ARRAY_BUFFER, vb._glID);\n\n for (let j = 0; j < next.program._attributes.length; ++j) {\n let attr = next.program._attributes[j];\n\n let el = vb._format.element(attr.name);\n if (!el) {\n console.warn(`Can not find vertex attribute: ${attr.name}`);\n continue;\n }\n\n if (device._enabledAttributes[attr.location] === 0) {\n gl.enableVertexAttribArray(attr.location);\n device._enabledAttributes[attr.location] = 1;\n }\n device._newAttributes[attr.location] = 1;\n\n gl.vertexAttribPointer(\n attr.location,\n el.num,\n el.type,\n el.normalize,\n el.stride,\n el.offset + vbOffset * el.stride\n );\n }\n }\n\n // disable unused attributes\n for (let i = 0; i < device._caps.maxVertexAttribs; ++i) {\n if (device._enabledAttributes[i] !== device._newAttributes[i]) {\n gl.disableVertexAttribArray(i);\n device._enabledAttributes[i] = 0;\n }\n }\n }\n}\n\n/**\n * _commitTextures\n */\nfunction _commitTextures(gl, cur, next) {\n for (let i = 0; i < next.maxTextureSlot + 1; ++i) {\n if (cur.textureUnits[i] !== next.textureUnits[i]) {\n let texture = next.textureUnits[i];\n if (texture && texture._glID !== -1) {\n gl.activeTexture(gl.TEXTURE0 + i);\n gl.bindTexture(texture._target, texture._glID);\n }\n }\n }\n}\n\n/**\n * _attach\n */\nfunction _attach(gl, location, attachment, face = 0) {\n if (attachment instanceof Texture2D) {\n gl.framebufferTexture2D(\n gl.FRAMEBUFFER,\n location,\n gl.TEXTURE_2D,\n attachment._glID,\n 0\n );\n } else if (attachment instanceof TextureCube) {\n gl.framebufferTexture2D(\n gl.FRAMEBUFFER,\n location,\n gl.TEXTURE_CUBE_MAP_POSITIVE_X + face,\n attachment._glID,\n 0\n );\n } else {\n gl.framebufferRenderbuffer(\n gl.FRAMEBUFFER,\n location,\n gl.RENDERBUFFER,\n attachment._glID\n );\n }\n}\n\nexport default class Device {\n /**\n * @property caps\n */\n get caps() {\n return this._caps;\n }\n\n /**\n * @param {HTMLElement} canvasEL\n * @param {object} opts\n */\n constructor(canvasEL, opts) {\n let gl;\n\n // default options\n opts = opts || {};\n if (opts.alpha === undefined) {\n opts.alpha = false;\n }\n if (opts.stencil === undefined) {\n opts.stencil = true;\n }\n if (opts.depth === undefined) {\n opts.depth = true;\n }\n if (opts.antialias === undefined) {\n opts.antialias = false;\n }\n // NOTE: it is said the performance improved in mobile device with this flag off.\n if (opts.preserveDrawingBuffer === undefined) {\n opts.preserveDrawingBuffer = false;\n }\n\n try {\n gl = canvasEL.getContext('webgl', opts)\n || canvasEL.getContext('experimental-webgl', opts)\n || canvasEL.getContext('webkit-3d', opts)\n || canvasEL.getContext('moz-webgl', opts);\n } catch (err) {\n console.error(err);\n return;\n }\n\n // No errors are thrown using try catch\n // Tested through ios baidu browser 4.14.1\n if (!gl) {\n console.error('This device does not support webgl');\n }\n\n // statics\n /**\n * @type {WebGLRenderingContext}\n */\n this._gl = gl;\n this._extensions = {};\n this._caps = {}; // capability\n this._stats = {\n texture: 0,\n vb: 0,\n ib: 0,\n drawcalls: 0,\n };\n\n // https://developer.mozilla.org/zh-CN/docs/Web/API/WebGL_API/Using_Extensions\n this._initExtensions([\n 'EXT_texture_filter_anisotropic',\n 'EXT_shader_texture_lod',\n 'OES_standard_derivatives',\n 'OES_texture_float',\n 'OES_texture_float_linear',\n 'OES_texture_half_float',\n 'OES_texture_half_float_linear',\n 'OES_vertex_array_object',\n 'WEBGL_compressed_texture_atc',\n 'WEBGL_compressed_texture_etc',\n 'WEBGL_compressed_texture_etc1',\n 'WEBGL_compressed_texture_pvrtc',\n 'WEBGL_compressed_texture_s3tc',\n 'WEBGL_depth_texture',\n 'WEBGL_draw_buffers',\n ]);\n this._initCaps();\n this._initStates();\n\n // runtime\n State.initDefault(this);\n this._current = new State(this);\n this._next = new State(this);\n this._uniforms = {}; // name: { value, num, dirty }\n this._vx = this._vy = this._vw = this._vh = 0;\n this._sx = this._sy = this._sw = this._sh = 0;\n this._framebuffer = null;\n\n //\n this._enabledAttributes = new Array(this._caps.maxVertexAttribs);\n this._newAttributes = new Array(this._caps.maxVertexAttribs);\n\n for (let i = 0; i < this._caps.maxVertexAttribs; ++i) {\n this._enabledAttributes[i] = 0;\n this._newAttributes[i] = 0;\n }\n }\n\n _initExtensions(extensions) {\n const gl = this._gl;\n\n for (let i = 0; i < extensions.length; ++i) {\n let name = extensions[i];\n let vendorPrefixes = [\"\", \"WEBKIT_\", \"MOZ_\"];\n\n for (var j = 0; j < vendorPrefixes.length; j++) {\n try {\n let ext = gl.getExtension(vendorPrefixes[j] + name);\n if (ext) {\n this._extensions[name] = ext;\n break;\n }\n } catch (e) {\n console.error(e);\n }\n }\n }\n }\n\n _initCaps() {\n const gl = this._gl;\n const extDrawBuffers = this.ext('WEBGL_draw_buffers');\n\n this._caps.maxVertexStreams = 4;\n this._caps.maxVertexTextures = gl.getParameter(gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS);\n this._caps.maxFragUniforms = gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS);\n this._caps.maxTextureUnits = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);\n this._caps.maxVertexAttribs = gl.getParameter(gl.MAX_VERTEX_ATTRIBS);\n this._caps.maxTextureSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);\n\n this._caps.maxDrawBuffers = extDrawBuffers ? gl.getParameter(extDrawBuffers.MAX_DRAW_BUFFERS_WEBGL) : 1;\n this._caps.maxColorAttachments = extDrawBuffers ? gl.getParameter(extDrawBuffers.MAX_COLOR_ATTACHMENTS_WEBGL) : 1;\n }\n\n _initStates() {\n const gl = this._gl;\n\n // gl.frontFace(gl.CCW);\n gl.disable(gl.BLEND);\n gl.blendFunc(gl.ONE, gl.ZERO);\n gl.blendEquation(gl.FUNC_ADD);\n gl.blendColor(1,1,1,1);\n\n gl.colorMask(true, true, true, true);\n\n gl.enable(gl.CULL_FACE);\n gl.cullFace(gl.BACK);\n\n gl.disable(gl.DEPTH_TEST);\n gl.depthFunc(gl.LESS);\n gl.depthMask(false);\n gl.disable(gl.POLYGON_OFFSET_FILL);\n gl.depthRange(0,1);\n\n gl.disable(gl.STENCIL_TEST);\n gl.stencilFunc(gl.ALWAYS, 0, 0xFF);\n gl.stencilMask(0xFF);\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\n\n // TODO:\n // this.setAlphaToCoverage(false);\n // this.setTransformFeedbackBuffer(null);\n // this.setRaster(true);\n // this.setDepthBias(false);\n\n gl.clearDepth(1);\n gl.clearColor(0, 0, 0, 0);\n gl.clearStencil(0);\n\n gl.disable(gl.SCISSOR_TEST);\n }\n\n _restoreTexture(unit) {\n const gl = this._gl;\n\n let texture = this._current.textureUnits[unit];\n if (texture && texture._glID !== -1) {\n gl.bindTexture(texture._target, texture._glID);\n } else {\n gl.bindTexture(gl.TEXTURE_2D, null);\n }\n }\n\n _restoreIndexBuffer () {\n const gl = this._gl;\n\n let ib = this._current.indexBuffer;\n if (ib && ib._glID !== -1) {\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, ib._glID);\n }\n else {\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\n }\n }\n\n /**\n * @method ext\n * @param {string} name\n */\n ext(name) {\n return this._extensions[name];\n }\n\n allowFloatTexture() {\n return this.ext(\"OES_texture_float\") != null;\n }\n\n // ===============================\n // Immediate Settings\n // ===============================\n\n /**\n * @method setFrameBuffer\n * @param {FrameBuffer} fb - null means use the backbuffer\n */\n setFrameBuffer(fb) {\n if (this._framebuffer === fb) {\n return;\n }\n\n this._framebuffer = fb;\n const gl = this._gl;\n\n if (!fb) {\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n return;\n }\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, fb._glID);\n\n let numColors = fb._colors.length;\n for (let i = 0; i < numColors; ++i) {\n let colorBuffer = fb._colors[i];\n _attach(gl, gl.COLOR_ATTACHMENT0 + i, colorBuffer);\n\n // TODO: what about cubemap face??? should be the target parameter for colorBuffer\n }\n for (let i = numColors; i < this._caps.maxColorAttachments; ++i) {\n gl.framebufferTexture2D(\n gl.FRAMEBUFFER,\n gl.COLOR_ATTACHMENT0 + i,\n gl.TEXTURE_2D,\n null,\n 0\n );\n }\n\n if (fb._depth) {\n _attach(gl, gl.DEPTH_ATTACHMENT, fb._depth);\n }\n\n if (fb._stencil) {\n _attach(gl, gl.STENCIL_ATTACHMENT, fb._stencil);\n }\n\n if (fb._depthStencil) {\n _attach(gl, gl.DEPTH_STENCIL_ATTACHMENT, fb._depthStencil);\n }\n }\n\n /**\n * @method setViewport\n * @param {Number} x\n * @param {Number} y\n * @param {Number} w\n * @param {Number} h\n */\n setViewport(x, y, w, h) {\n if (\n this._vx !== x ||\n this._vy !== y ||\n this._vw !== w ||\n this._vh !== h\n ) {\n this._gl.viewport(x, y, w, h);\n this._vx = x;\n this._vy = y;\n this._vw = w;\n this._vh = h;\n }\n }\n\n /**\n * @method setScissor\n * @param {Number} x\n * @param {Number} y\n * @param {Number} w\n * @param {Number} h\n */\n setScissor(x, y, w, h) {\n if (\n this._sx !== x ||\n this._sy !== y ||\n this._sw !== w ||\n this._sh !== h\n ) {\n this._gl.scissor(x, y, w, h);\n this._sx = x;\n this._sy = y;\n this._sw = w;\n this._sh = h;\n }\n }\n\n /**\n * @method clear\n * @param {Object} opts\n * @param {Array} opts.color\n * @param {Number} opts.depth\n * @param {Number} opts.stencil\n */\n clear(opts) {\n if (opts.color === undefined && opts.depth === undefined && opts.stencil === undefined) {\n return;\n }\n const gl = this._gl;\n let flags = 0;\n\n if (opts.color !== undefined) {\n flags |= gl.COLOR_BUFFER_BIT;\n gl.clearColor(opts.color[0], opts.color[1], opts.color[2], opts.color[3]);\n }\n\n if (opts.depth !== undefined) {\n flags |= gl.DEPTH_BUFFER_BIT;\n gl.clearDepth(opts.depth);\n\n gl.enable(gl.DEPTH_TEST);\n gl.depthMask(true);\n gl.depthFunc(gl.ALWAYS);\n }\n\n if (opts.stencil !== undefined) {\n flags |= gl.STENCIL_BUFFER_BIT;\n gl.clearStencil(opts.stencil);\n }\n\n gl.clear(flags);\n\n // restore depth-write\n if (opts.depth !== undefined) {\n if (this._current.depthTest === false) {\n gl.disable(gl.DEPTH_TEST);\n } else {\n if (this._current.depthWrite === false) {\n gl.depthMask(false);\n }\n if (this._current.depthFunc !== enums.DS_FUNC_ALWAYS) {\n gl.depthFunc(this._current.depthFunc);\n }\n }\n }\n }\n\n // ===============================\n // Deferred States\n // ===============================\n\n /**\n * @method enableBlend\n */\n enableBlend() {\n this._next.blend = true;\n }\n\n /**\n * @method enableDepthTest\n */\n enableDepthTest() {\n this._next.depthTest = true;\n }\n\n /**\n * @method enableDepthWrite\n */\n enableDepthWrite() {\n this._next.depthWrite = true;\n }\n\n /**\n * @method enableStencilTest\n * @param {Number} stencilTest\n */\n setStencilTest(stencilTest) {\n this._next.stencilTest = stencilTest;\n }\n\n /**\n * @method setStencilFunc\n * @param {DS_FUNC_*} func\n * @param {Number} ref\n * @param {Number} mask\n */\n setStencilFunc(func, ref, mask) {\n this._next.stencilSep = false;\n this._next.stencilFuncFront = this._next.stencilFuncBack = func;\n this._next.stencilRefFront = this._next.stencilRefBack = ref;\n this._next.stencilMaskFront = this._next.stencilMaskBack = mask;\n }\n\n /**\n * @method setStencilFuncFront\n * @param {DS_FUNC_*} func\n * @param {Number} ref\n * @param {Number} mask\n */\n setStencilFuncFront(func, ref, mask) {\n this._next.stencilSep = true;\n this._next.stencilFuncFront = func;\n this._next.stencilRefFront = ref;\n this._next.stencilMaskFront = mask;\n }\n\n /**\n * @method setStencilFuncBack\n * @param {DS_FUNC_*} func\n * @param {Number} ref\n * @param {Number} mask\n */\n setStencilFuncBack(func, ref, mask) {\n this._next.stencilSep = true;\n this._next.stencilFuncBack = func;\n this._next.stencilRefBack = ref;\n this._next.stencilMaskBack = mask;\n }\n\n /**\n * @method setStencilOp\n * @param {STENCIL_OP_*} failOp\n * @param {STENCIL_OP_*} zFailOp\n * @param {STENCIL_OP_*} zPassOp\n * @param {Number} writeMask\n */\n setStencilOp(failOp, zFailOp, zPassOp, writeMask) {\n this._next.stencilFailOpFront = this._next.stencilFailOpBack = failOp;\n this._next.stencilZFailOpFront = this._next.stencilZFailOpBack = zFailOp;\n this._next.stencilZPassOpFront = this._next.stencilZPassOpBack = zPassOp;\n this._next.stencilWriteMaskFront = this._next.stencilWriteMaskBack = writeMask;\n }\n\n /**\n * @method setStencilOpFront\n * @param {STENCIL_OP_*} failOp\n * @param {STENCIL_OP_*} zFailOp\n * @param {STENCIL_OP_*} zPassOp\n * @param {Number} writeMask\n */\n setStencilOpFront(failOp, zFailOp, zPassOp, writeMask) {\n this._next.stencilSep = true;\n this._next.stencilFailOpFront = failOp;\n this._next.stencilZFailOpFront = zFailOp;\n this._next.stencilZPassOpFront = zPassOp;\n this._next.stencilWriteMaskFront = writeMask;\n }\n\n /**\n * @method setStencilOpBack\n * @param {STENCIL_OP_*} failOp\n * @param {STENCIL_OP_*} zFailOp\n * @param {STENCIL_OP_*} zPassOp\n * @param {Number} writeMask\n */\n setStencilOpBack(failOp, zFailOp, zPassOp, writeMask) {\n this._next.stencilSep = true;\n this._next.stencilFailOpBack = failOp;\n this._next.stencilZFailOpBack = zFailOp;\n this._next.stencilZPassOpBack = zPassOp;\n this._next.stencilWriteMaskBack = writeMask;\n }\n\n /**\n * @method setDepthFunc\n * @param {DS_FUNC_*} depthFunc\n */\n setDepthFunc(depthFunc) {\n this._next.depthFunc = depthFunc;\n }\n\n /**\n * @method setBlendColor32\n * @param {Number} rgba\n */\n setBlendColor32(rgba) {\n this._next.blendColor = rgba;\n }\n\n /**\n * @method setBlendColor\n * @param {Number} r\n * @param {Number} g\n * @param {Number} b\n * @param {Number} a\n */\n setBlendColor(r, g, b, a) {\n this._next.blendColor = ((r * 255) << 24 | (g * 255) << 16 | (b * 255) << 8 | a * 255) >>> 0;\n }\n\n /**\n * @method setBlendFunc\n * @param {BELND_*} src\n * @param {BELND_*} dst\n */\n setBlendFunc(src, dst) {\n this._next.blendSep = false;\n this._next.blendSrc = src;\n this._next.blendDst = dst;\n }\n\n /**\n * @method setBlendFuncSep\n * @param {BELND_*} src\n * @param {BELND_*} dst\n * @param {BELND_*} srcAlpha\n * @param {BELND_*} dstAlpha\n */\n setBlendFuncSep(src, dst, srcAlpha, dstAlpha) {\n this._next.blendSep = true;\n this._next.blendSrc = src;\n this._next.blendDst = dst;\n this._next.blendSrcAlpha = srcAlpha;\n this._next.blendDstAlpha = dstAlpha;\n }\n\n /**\n * @method setBlendEq\n * @param {BELND_FUNC_*} eq\n */\n setBlendEq(eq) {\n this._next.blendSep = false;\n this._next.blendEq = eq;\n }\n\n /**\n * @method setBlendEqSep\n * @param {BELND_FUNC_*} eq\n * @param {BELND_FUNC_*} alphaEq\n */\n setBlendEqSep(eq, alphaEq) {\n this._next.blendSep = true;\n this._next.blendEq = eq;\n this._next.blendAlphaEq = alphaEq;\n }\n\n /**\n * @method setCullMode\n * @param {CULL_*} mode\n */\n setCullMode(mode) {\n this._next.cullMode = mode;\n }\n\n /**\n * @method setVertexBuffer\n * @param {Number} stream\n * @param {VertexBuffer} buffer\n * @param {Number} start - start vertex\n */\n setVertexBuffer(stream, buffer, start = 0) {\n this._next.vertexBuffers[stream] = buffer;\n this._next.vertexBufferOffsets[stream] = start;\n if (this._next.maxStream < stream) {\n this._next.maxStream = stream;\n }\n }\n\n /**\n * @method setIndexBuffer\n * @param {IndexBuffer} buffer\n */\n setIndexBuffer(buffer) {\n this._next.indexBuffer = buffer;\n }\n\n /**\n * @method setProgram\n * @param {Program} program\n */\n setProgram(program) {\n this._next.program = program;\n }\n\n /**\n * @method setTexture\n * @param {String} name\n * @param {Texture} texture\n * @param {Number} slot\n */\n setTexture(name, texture, slot) {\n if (slot >= this._caps.maxTextureUnits) {\n console.warn(`Can not set texture ${name} at stage ${slot}, max texture exceed: ${this._caps.maxTextureUnits}`);\n return;\n }\n\n this._next.textureUnits[slot] = texture;\n this.setUniform(name, slot);\n\n if (this._next.maxTextureSlot < slot) {\n this._next.maxTextureSlot = slot;\n }\n }\n\n /**\n * @method setTextureArray\n * @param {String} name\n * @param {Array} textures\n * @param {Int32Array} slots\n */\n setTextureArray(name, textures, slots) {\n let len = textures.length;\n if (len >= this._caps.maxTextureUnits) {\n console.warn(`Can not set ${len} textures for ${name}, max texture exceed: ${this._caps.maxTextureUnits}`);\n return;\n }\n for (let i = 0; i < len; ++i) {\n let slot = slots[i];\n this._next.textureUnits[slot] = textures[i];\n\n if (this._next.maxTextureSlot < slot) {\n this._next.maxTextureSlot = slot;\n }\n }\n this.setUniform(name, slots);\n }\n\n /**\n * @method setUniform\n * @param {String} name\n * @param {*} value\n */\n setUniform(name, value) {\n let uniform = this._uniforms[name];\n\n let sameType = false;\n let isArray = false, isFloat32Array = false, isInt32Array = false;\n do {\n if (!uniform) {\n break;\n }\n\n isFloat32Array = Array.isArray(value) || value instanceof Float32Array;\n isInt32Array = value instanceof Int32Array;\n isArray = isFloat32Array || isInt32Array;\n if (uniform.isArray !== isArray) {\n break;\n }\n\n if (uniform.isArray && uniform.value.length !== value.length) {\n break;\n }\n\n sameType = true;\n } while (false);\n\n if (!sameType) {\n let newValue = value;\n if (isFloat32Array) {\n newValue = new Float32Array(value);\n }\n else if (isInt32Array) {\n newValue = new Int32Array(value);\n }\n\n uniform = {\n dirty: true,\n value: newValue,\n isArray: isArray\n };\n } else {\n let oldValue = uniform.value;\n let dirty = false;\n if (uniform.isArray) {\n for (let i = 0, l = oldValue.length; i < l; i++) {\n if (oldValue[i] !== value[i]) {\n dirty = true;\n oldValue[i] = value[i];\n }\n }\n }\n else {\n if (oldValue !== value) {\n dirty = true;\n uniform.value = value;\n }\n }\n\n if (dirty) {\n uniform.dirty = true;\n }\n }\n this._uniforms[name] = uniform;\n }\n\n setUniformDirectly(name, value) {\n let uniform = this._uniforms[name];\n if (!uniform) {\n this._uniforms[name] = uniform = {};\n }\n uniform.dirty = true;\n uniform.value = value;\n }\n\n /**\n * @method setPrimitiveType\n * @param {PT_*} type\n */\n setPrimitiveType(type) {\n this._next.primitiveType = type;\n }\n\n /**\n * @method resetDrawCalls\n */\n resetDrawCalls () {\n this._stats.drawcalls = 0;\n }\n \n /**\n * @method getDrawCalls\n */\n getDrawCalls () {\n return this._stats.drawcalls;\n }\n\n /**\n * @method draw\n * @param {Number} base\n * @param {Number} count\n */\n draw(base, count) {\n const gl = this._gl;\n let cur = this._current;\n let next = this._next;\n\n // commit blend\n _commitBlendStates(gl, cur, next);\n\n // commit depth\n _commitDepthStates(gl, cur, next);\n\n // commit stencil\n _commitStencilStates(gl, cur, next);\n\n // commit cull\n _commitCullMode(gl, cur, next);\n\n // commit vertex-buffer\n _commitVertexBuffers(this, gl, cur, next);\n\n // commit index-buffer\n if (cur.indexBuffer !== next.indexBuffer) {\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, next.indexBuffer && next.indexBuffer._glID !== -1 ? next.indexBuffer._glID : null);\n }\n\n // commit program\n let programDirty = false;\n if (cur.program !== next.program) {\n if (next.program._linked) {\n gl.useProgram(next.program._glID);\n } else {\n console.warn('Failed to use program: has not linked yet.');\n }\n programDirty = true;\n }\n\n // commit texture/sampler\n _commitTextures(gl, cur, next);\n\n // commit uniforms\n for (let i = 0; i < next.program._uniforms.length; ++i) {\n let uniformInfo = next.program._uniforms[i];\n let uniform = this._uniforms[uniformInfo.name];\n if (!uniform) {\n // console.warn(`Can not find uniform ${uniformInfo.name}`);\n continue;\n }\n\n if (!programDirty && !uniform.dirty) {\n continue;\n }\n\n uniform.dirty = false;\n\n // TODO: please consider array uniform: uniformInfo.size > 0\n\n let commitFunc = (uniformInfo.size === undefined) ? _type2uniformCommit[uniformInfo.type] : _type2uniformArrayCommit[uniformInfo.type];\n if (!commitFunc) {\n console.warn(`Can not find commit function for uniform ${uniformInfo.name}`);\n continue;\n }\n\n commitFunc(gl, uniformInfo.location, uniform.value);\n }\n\n if (count) {\n // drawPrimitives\n if (next.indexBuffer) {\n gl.drawElements(\n this._next.primitiveType,\n count,\n next.indexBuffer._format,\n base * next.indexBuffer._bytesPerIndex\n );\n } else {\n gl.drawArrays(\n this._next.primitiveType,\n base,\n count\n );\n }\n\n // update stats\n this._stats.drawcalls++;\n }\n\n // TODO: autogen mipmap for color buffer\n // if (this._framebuffer && this._framebuffer.colors[0].mipmap) {\n // gl.bindTexture(this._framebuffer.colors[i]._target, colors[i]._glID);\n // gl.generateMipmap(this._framebuffer.colors[i]._target);\n // }\n\n // reset states\n cur.set(next);\n next.reset();\n }\n}","const GL_NEAREST = 9728; // gl.NEAREST\nconst GL_LINEAR = 9729; // gl.LINEAR\nconst GL_NEAREST_MIPMAP_NEAREST = 9984; // gl.NEAREST_MIPMAP_NEAREST\nconst GL_LINEAR_MIPMAP_NEAREST = 9985; // gl.LINEAR_MIPMAP_NEAREST\nconst GL_NEAREST_MIPMAP_LINEAR = 9986; // gl.NEAREST_MIPMAP_LINEAR\nconst GL_LINEAR_MIPMAP_LINEAR = 9987; // gl.LINEAR_MIPMAP_LINEAR\n\n// const GL_BYTE = 5120; // gl.BYTE\nconst GL_UNSIGNED_BYTE = 5121; // gl.UNSIGNED_BYTE\n// const GL_SHORT = 5122; // gl.SHORT\nconst GL_UNSIGNED_SHORT = 5123; // gl.UNSIGNED_SHORT\nconst GL_UNSIGNED_INT = 5125; // gl.UNSIGNED_INT\nconst GL_FLOAT = 5126; // gl.FLOAT\nconst GL_UNSIGNED_SHORT_5_6_5 = 33635; // gl.UNSIGNED_SHORT_5_6_5\nconst GL_UNSIGNED_SHORT_4_4_4_4 = 32819; // gl.UNSIGNED_SHORT_4_4_4_4\nconst GL_UNSIGNED_SHORT_5_5_5_1 = 32820; // gl.UNSIGNED_SHORT_5_5_5_1\nconst GL_HALF_FLOAT_OES = 36193; // gl.HALF_FLOAT_OES\n\nconst GL_DEPTH_COMPONENT = 6402; // gl.DEPTH_COMPONENT\n\nconst GL_ALPHA = 6406; // gl.ALPHA\nconst GL_RGB = 6407; // gl.RGB\nconst GL_RGBA = 6408; // gl.RGBA\nconst GL_LUMINANCE = 6409; // gl.LUMINANCE\nconst GL_LUMINANCE_ALPHA = 6410; // gl.LUMINANCE_ALPHA\n\nconst GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0; // ext.COMPRESSED_RGB_S3TC_DXT1_EXT\nconst GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1; // ext.COMPRESSED_RGBA_S3TC_DXT1_EXT\nconst GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2; // ext.COMPRESSED_RGBA_S3TC_DXT3_EXT\nconst GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3; // ext.COMPRESSED_RGBA_S3TC_DXT5_EXT\n\nconst GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8C00; // ext.COMPRESSED_RGB_PVRTC_4BPPV1_IMG\nconst GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 0x8C01; // ext.COMPRESSED_RGB_PVRTC_2BPPV1_IMG\nconst GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02; // ext.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG\nconst GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8C03; // ext.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG\n\nconst GL_COMPRESSED_RGB_ETC1_WEBGL = 0x8D64; // ext.COMPRESSED_RGB_ETC1_WEBGL\n\nconst GL_COMPRESSED_RGB8_ETC2 = 0x9274; // ext.COMPRESSED_RGB8_ETC2\nconst GL_COMPRESSED_RGBA8_ETC2_EAC = 0x9278; // ext.COMPRESSED_RGBA8_ETC2_EAC\n\nconst _filterGL = [\n [ GL_NEAREST, GL_NEAREST_MIPMAP_NEAREST, GL_NEAREST_MIPMAP_LINEAR ],\n [ GL_LINEAR, GL_LINEAR_MIPMAP_NEAREST, GL_LINEAR_MIPMAP_LINEAR ],\n];\n\nconst _textureFmtGL = [\n // TEXTURE_FMT_RGB_DXT1: 0\n { format: GL_RGB, internalFormat: GL_COMPRESSED_RGB_S3TC_DXT1_EXT, pixelType: null },\n\n // TEXTURE_FMT_RGBA_DXT1: 1\n { format: GL_RGBA, internalFormat: GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, pixelType: null },\n\n // TEXTURE_FMT_RGBA_DXT3: 2\n { format: GL_RGBA, internalFormat: GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, pixelType: null },\n\n // TEXTURE_FMT_RGBA_DXT5: 3\n { format: GL_RGBA, internalFormat: GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, pixelType: null },\n\n // TEXTURE_FMT_RGB_ETC1: 4\n { format: GL_RGB, internalFormat: GL_COMPRESSED_RGB_ETC1_WEBGL, pixelType: null },\n\n // TEXTURE_FMT_RGB_PVRTC_2BPPV1: 5\n { format: GL_RGB, internalFormat: GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG, pixelType: null },\n\n // TEXTURE_FMT_RGBA_PVRTC_2BPPV1: 6\n { format: GL_RGBA, internalFormat: GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG, pixelType: null },\n\n // TEXTURE_FMT_RGB_PVRTC_4BPPV1: 7\n { format: GL_RGB, internalFormat: GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG, pixelType: null },\n\n // TEXTURE_FMT_RGBA_PVRTC_4BPPV1: 8\n { format: GL_RGBA, internalFormat: GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG, pixelType: null },\n\n // TEXTURE_FMT_A8: 9\n { format: GL_ALPHA, internalFormat: GL_ALPHA, pixelType: GL_UNSIGNED_BYTE },\n\n // TEXTURE_FMT_L8: 10\n { format: GL_LUMINANCE, internalFormat: GL_LUMINANCE, pixelType: GL_UNSIGNED_BYTE },\n\n // TEXTURE_FMT_L8_A8: 11\n { format: GL_LUMINANCE_ALPHA, internalFormat: GL_LUMINANCE_ALPHA, pixelType: GL_UNSIGNED_BYTE },\n\n // TEXTURE_FMT_R5_G6_B5: 12\n { format: GL_RGB, internalFormat: GL_RGB, pixelType: GL_UNSIGNED_SHORT_5_6_5 },\n\n // TEXTURE_FMT_R5_G5_B5_A1: 13\n { format: GL_RGBA, internalFormat: GL_RGBA, pixelType: GL_UNSIGNED_SHORT_5_5_5_1 },\n\n // TEXTURE_FMT_R4_G4_B4_A4: 14\n { format: GL_RGBA, internalFormat: GL_RGBA, pixelType: GL_UNSIGNED_SHORT_4_4_4_4 },\n\n // TEXTURE_FMT_RGB8: 15\n { format: GL_RGB, internalFormat: GL_RGB, pixelType: GL_UNSIGNED_BYTE },\n\n // TEXTURE_FMT_RGBA8: 16\n { format: GL_RGBA, internalFormat: GL_RGBA, pixelType: GL_UNSIGNED_BYTE },\n\n // TEXTURE_FMT_RGB16F: 17\n { format: GL_RGB, internalFormat: GL_RGB, pixelType: GL_HALF_FLOAT_OES },\n\n // TEXTURE_FMT_RGBA16F: 18\n { format: GL_RGBA, internalFormat: GL_RGBA, pixelType: GL_HALF_FLOAT_OES },\n\n // TEXTURE_FMT_RGB32F: 19\n { format: GL_RGB, internalFormat: GL_RGB, pixelType: GL_FLOAT },\n\n // TEXTURE_FMT_RGBA32F: 20\n { format: GL_RGBA, internalFormat: GL_RGBA, pixelType: GL_FLOAT },\n\n // TEXTURE_FMT_R32F: 21\n { format: null, internalFormat: null, pixelType: null },\n\n // TEXTURE_FMT_111110F: 22\n { format: null, internalFormat: null, pixelType: null },\n\n // TEXTURE_FMT_SRGB: 23\n { format: null, internalFormat: null, pixelType: null },\n\n // TEXTURE_FMT_SRGBA: 24\n { format: null, internalFormat: null, pixelType: null },\n\n // TEXTURE_FMT_D16: 25\n { format: GL_DEPTH_COMPONENT, internalFormat: GL_DEPTH_COMPONENT, pixelType: GL_UNSIGNED_SHORT },\n\n // TEXTURE_FMT_D32: 26\n { format: GL_DEPTH_COMPONENT, internalFormat: GL_DEPTH_COMPONENT, pixelType: GL_UNSIGNED_INT },\n\n // TEXTURE_FMT_D24S8: 27\n { format: GL_DEPTH_COMPONENT, internalFormat: GL_DEPTH_COMPONENT, pixelType: GL_UNSIGNED_INT },\n\n // TEXTURE_FMT_RGB_ETC2: 28\n { format: GL_RGB, internalFormat: GL_COMPRESSED_RGB8_ETC2, pixelType: null },\n\n // TEXTURE_FMT_RGBA_ETC2: 29\n { format: GL_RGBA, internalFormat: GL_COMPRESSED_RGBA8_ETC2_EAC, pixelType: null },\n];\n\n/**\n * enums\n */\nexport const enums = {\n // buffer usage\n USAGE_STATIC: 35044, // gl.STATIC_DRAW\n USAGE_DYNAMIC: 35048, // gl.DYNAMIC_DRAW\n USAGE_STREAM: 35040, // gl.STREAM_DRAW\n\n // index buffer format\n INDEX_FMT_UINT8: 5121, // gl.UNSIGNED_BYTE\n INDEX_FMT_UINT16: 5123, // gl.UNSIGNED_SHORT\n INDEX_FMT_UINT32: 5125, // gl.UNSIGNED_INT (OES_element_index_uint)\n\n // vertex attribute semantic\n ATTR_POSITION: 'a_position',\n ATTR_NORMAL: 'a_normal',\n ATTR_TANGENT: 'a_tangent',\n ATTR_BITANGENT: 'a_bitangent',\n ATTR_WEIGHTS: 'a_weights',\n ATTR_JOINTS: 'a_joints',\n ATTR_COLOR: 'a_color',\n ATTR_COLOR0: 'a_color0',\n ATTR_COLOR1: 'a_color1',\n ATTR_UV: 'a_uv',\n ATTR_UV0: 'a_uv0',\n ATTR_UV1: 'a_uv1',\n ATTR_UV2: 'a_uv2',\n ATTR_UV3: 'a_uv3',\n ATTR_UV4: 'a_uv4',\n ATTR_UV5: 'a_uv5',\n ATTR_UV6: 'a_uv6',\n ATTR_UV7: 'a_uv7',\n ATTR_TEX_COORD: 'a_texCoord',\n ATTR_TEX_COORD1: 'a_texCoord1',\n ATTR_TEX_COORD2: 'a_texCoord2',\n ATTR_TEX_COORD3: 'a_texCoord3',\n ATTR_TEX_COORD4: 'a_texCoord4',\n ATTR_TEX_COORD5: 'a_texCoord5',\n ATTR_TEX_COORD6: 'a_texCoord6',\n ATTR_TEX_COORD7: 'a_texCoord7',\n ATTR_TEX_COORD8: 'a_texCoord8',\n ATTR_TEX_ID: 'a_texId',\n\n\n // vertex attribute type\n ATTR_TYPE_INT8: 5120, // gl.BYTE\n ATTR_TYPE_UINT8: 5121, // gl.UNSIGNED_BYTE\n ATTR_TYPE_INT16: 5122, // gl.SHORT\n ATTR_TYPE_UINT16: 5123, // gl.UNSIGNED_SHORT\n ATTR_TYPE_INT32: 5124, // gl.INT\n ATTR_TYPE_UINT32: 5125, // gl.UNSIGNED_INT\n ATTR_TYPE_FLOAT32: 5126, // gl.FLOAT\n\n // texture filter\n FILTER_NEAREST: 0,\n FILTER_LINEAR: 1,\n\n // texture wrap mode\n WRAP_REPEAT: 10497, // gl.REPEAT\n WRAP_CLAMP: 33071, // gl.CLAMP_TO_EDGE\n WRAP_MIRROR: 33648, // gl.MIRRORED_REPEAT\n\n // texture format\n // compress formats\n TEXTURE_FMT_RGB_DXT1: 0,\n TEXTURE_FMT_RGBA_DXT1: 1,\n TEXTURE_FMT_RGBA_DXT3: 2,\n TEXTURE_FMT_RGBA_DXT5: 3,\n TEXTURE_FMT_RGB_ETC1: 4,\n TEXTURE_FMT_RGB_PVRTC_2BPPV1: 5,\n TEXTURE_FMT_RGBA_PVRTC_2BPPV1: 6,\n TEXTURE_FMT_RGB_PVRTC_4BPPV1: 7,\n TEXTURE_FMT_RGBA_PVRTC_4BPPV1: 8,\n\n // normal formats\n TEXTURE_FMT_A8: 9,\n TEXTURE_FMT_L8: 10,\n TEXTURE_FMT_L8_A8: 11,\n TEXTURE_FMT_R5_G6_B5: 12,\n TEXTURE_FMT_R5_G5_B5_A1: 13,\n TEXTURE_FMT_R4_G4_B4_A4: 14,\n TEXTURE_FMT_RGB8: 15,\n TEXTURE_FMT_RGBA8: 16,\n TEXTURE_FMT_RGB16F: 17,\n TEXTURE_FMT_RGBA16F: 18,\n TEXTURE_FMT_RGB32F: 19,\n TEXTURE_FMT_RGBA32F: 20,\n TEXTURE_FMT_R32F: 21,\n TEXTURE_FMT_111110F: 22,\n TEXTURE_FMT_SRGB: 23,\n TEXTURE_FMT_SRGBA: 24,\n\n // depth formats\n TEXTURE_FMT_D16: 25,\n TEXTURE_FMT_D32: 26,\n TEXTURE_FMT_D24S8: 27,\n\n // etc2 format\n TEXTURE_FMT_RGB_ETC2: 28,\n TEXTURE_FMT_RGBA_ETC2: 29,\n\n // depth and stencil function\n DS_FUNC_NEVER: 512, // gl.NEVER\n DS_FUNC_LESS: 513, // gl.LESS\n DS_FUNC_EQUAL: 514, // gl.EQUAL\n DS_FUNC_LEQUAL: 515, // gl.LEQUAL\n DS_FUNC_GREATER: 516, // gl.GREATER\n DS_FUNC_NOTEQUAL: 517, // gl.NOTEQUAL\n DS_FUNC_GEQUAL: 518, // gl.GEQUAL\n DS_FUNC_ALWAYS: 519, // gl.ALWAYS\n\n // render-buffer format\n RB_FMT_RGBA4: 32854, // gl.RGBA4\n RB_FMT_RGB5_A1: 32855, // gl.RGB5_A1\n RB_FMT_RGB565: 36194, // gl.RGB565\n RB_FMT_D16: 33189, // gl.DEPTH_COMPONENT16\n RB_FMT_S8: 36168, // gl.STENCIL_INDEX8\n RB_FMT_D24S8: 34041, // gl.DEPTH_STENCIL\n\n // blend-equation\n BLEND_FUNC_ADD: 32774, // gl.FUNC_ADD\n BLEND_FUNC_SUBTRACT: 32778, // gl.FUNC_SUBTRACT\n BLEND_FUNC_REVERSE_SUBTRACT: 32779, // gl.FUNC_REVERSE_SUBTRACT\n\n // blend\n BLEND_ZERO: 0, // gl.ZERO\n BLEND_ONE: 1, // gl.ONE\n BLEND_SRC_COLOR: 768, // gl.SRC_COLOR\n BLEND_ONE_MINUS_SRC_COLOR: 769, // gl.ONE_MINUS_SRC_COLOR\n BLEND_DST_COLOR: 774, // gl.DST_COLOR\n BLEND_ONE_MINUS_DST_COLOR: 775, // gl.ONE_MINUS_DST_COLOR\n BLEND_SRC_ALPHA: 770, // gl.SRC_ALPHA\n BLEND_ONE_MINUS_SRC_ALPHA: 771, // gl.ONE_MINUS_SRC_ALPHA\n BLEND_DST_ALPHA: 772, // gl.DST_ALPHA\n BLEND_ONE_MINUS_DST_ALPHA: 773, // gl.ONE_MINUS_DST_ALPHA\n BLEND_CONSTANT_COLOR: 32769, // gl.CONSTANT_COLOR\n BLEND_ONE_MINUS_CONSTANT_COLOR: 32770, // gl.ONE_MINUS_CONSTANT_COLOR\n BLEND_CONSTANT_ALPHA: 32771, // gl.CONSTANT_ALPHA\n BLEND_ONE_MINUS_CONSTANT_ALPHA: 32772, // gl.ONE_MINUS_CONSTANT_ALPHA\n BLEND_SRC_ALPHA_SATURATE: 776, // gl.SRC_ALPHA_SATURATE\n\n // stencil operation\n STENCIL_DISABLE: 0, // disable stencil\n STENCIL_ENABLE: 1, // enable stencil\n STENCIL_INHERIT: 2, // inherit stencil states\n\n STENCIL_OP_KEEP: 7680, // gl.KEEP\n STENCIL_OP_ZERO: 0, // gl.ZERO\n STENCIL_OP_REPLACE: 7681, // gl.REPLACE\n STENCIL_OP_INCR: 7682, // gl.INCR\n STENCIL_OP_INCR_WRAP: 34055, // gl.INCR_WRAP\n STENCIL_OP_DECR: 7683, // gl.DECR\n STENCIL_OP_DECR_WRAP: 34056, // gl.DECR_WRAP\n STENCIL_OP_INVERT: 5386, // gl.INVERT\n\n // cull\n CULL_NONE: 0,\n CULL_FRONT: 1028,\n CULL_BACK: 1029,\n CULL_FRONT_AND_BACK: 1032,\n\n // primitive type\n PT_POINTS: 0, // gl.POINTS\n PT_LINES: 1, // gl.LINES\n PT_LINE_LOOP: 2, // gl.LINE_LOOP\n PT_LINE_STRIP: 3, // gl.LINE_STRIP\n PT_TRIANGLES: 4, // gl.TRIANGLES\n PT_TRIANGLE_STRIP: 5, // gl.TRIANGLE_STRIP\n PT_TRIANGLE_FAN: 6, // gl.TRIANGLE_FAN\n};\n\n/**\n * @method attrTypeBytes\n * @param {ATTR_TYPE_*} attrType\n */\nexport function attrTypeBytes(attrType) {\n if (attrType === enums.ATTR_TYPE_INT8) {\n return 1;\n } else if (attrType === enums.ATTR_TYPE_UINT8) {\n return 1;\n } else if (attrType === enums.ATTR_TYPE_INT16) {\n return 2;\n } else if (attrType === enums.ATTR_TYPE_UINT16) {\n return 2;\n } else if (attrType === enums.ATTR_TYPE_INT32) {\n return 4;\n } else if (attrType === enums.ATTR_TYPE_UINT32) {\n return 4;\n } else if (attrType === enums.ATTR_TYPE_FLOAT32) {\n return 4;\n }\n\n console.warn(`Unknown ATTR_TYPE: ${attrType}`);\n return 0;\n}\n\n/**\n * @method glFilter\n * @param {WebGLContext} gl\n * @param {FILTER_*} filter\n * @param {FILTER_*} mipFilter\n */\nexport function glFilter(gl, filter, mipFilter = -1) {\n let result = _filterGL[filter][mipFilter+1];\n if (result === undefined) {\n console.warn(`Unknown FILTER: ${filter}`);\n return mipFilter === -1 ? gl.LINEAR : gl.LINEAR_MIPMAP_LINEAR;\n }\n\n return result;\n}\n\n/**\n * @method glTextureFmt\n * @param {TEXTURE_FMT_*} fmt\n */\nexport function glTextureFmt(fmt) {\n let result = _textureFmtGL[fmt];\n if (result === undefined) {\n console.warn(`Unknown TEXTURE_FMT: ${fmt}`);\n return _textureFmtGL[enums.TEXTURE_FMT_RGBA8];\n }\n\n return result;\n}\n","export default class FrameBuffer {\n /**\n * @constructor\n * @param {Device} device\n * @param {Number} width\n * @param {Number} height\n * @param {Object} options\n * @param {Array} options.colors\n * @param {RenderBuffer|Texture2D|TextureCube} options.depth\n * @param {RenderBuffer|Texture2D|TextureCube} options.stencil\n * @param {RenderBuffer|Texture2D|TextureCube} options.depthStencil\n */\n constructor(device, width, height, options) {\n this._device = device;\n this._width = width;\n this._height = height;\n\n this._colors = options.colors || [];\n this._depth = options.depth || null;\n this._stencil = options.stencil || null;\n this._depthStencil = options.depthStencil || null;\n\n this._glID = device._gl.createFramebuffer();\n }\n\n /**\n * @method destroy\n */\n destroy() {\n if (this._glID === null) {\n console.error('The frame-buffer already destroyed');\n return;\n }\n\n const gl = this._device._gl;\n\n gl.deleteFramebuffer(this._glID);\n\n this._glID = null;\n }\n\n getHandle() {\n return this._glID;\n }\n}","import { enums } from './enums';\n\nconst BYTES_PER_INDEX = {\n [enums.INDEX_FMT_UINT8]: 1,\n [enums.INDEX_FMT_UINT16]: 2,\n [enums.INDEX_FMT_UINT32]: 4,\n}\n\nclass IndexBuffer {\n /**\n * @constructor\n * @param {Device} device\n * @param {INDEX_FMT_*} format\n * @param {USAGE_*} usage\n * @param {ArrayBuffer | Uint8Array} data\n */\n constructor(device, format, usage, data) {\n this._device = device;\n this._format = format;\n this._usage = usage;\n this._bytesPerIndex = BYTES_PER_INDEX[format];\n this._bytes = data.byteLength;\n this._numIndices = this._bytes / this._bytesPerIndex;\n\n this._needExpandDataStore = true;\n\n // update\n this._glID = device._gl.createBuffer();\n this.update(0, data);\n\n // stats\n device._stats.ib += this._bytes;\n }\n\n /**\n * @method destroy\n */\n destroy() {\n if (this._glID === -1) {\n console.error('The buffer already destroyed');\n return;\n }\n\n let gl = this._device._gl;\n gl.deleteBuffer(this._glID);\n this._device._stats.ib -= this.bytes;\n\n this._glID = -1;\n }\n\n /**\n * @method update\n * @param {Number} byteOffset\n * @param {ArrayBuffer} data\n */\n update(byteOffset, data) {\n if (this._glID === -1) {\n console.error('The buffer is destroyed');\n return;\n }\n\n if (data.byteLength === 0) return;\n\n // Need to create new buffer object when bytes exceed\n if (byteOffset + data.byteLength > this._bytes) {\n if (byteOffset) {\n // Lost data between [0, byteOffset] which is need for new buffer\n console.error('Failed to update data, bytes exceed.');\n return;\n }\n else {\n this._needExpandDataStore = true;\n this._bytes = byteOffset + data.byteLength;\n this._numIndices = this._bytes / this._bytesPerIndex;\n }\n }\n\n /** @type{WebGLRenderingContext} */\n let gl = this._device._gl;\n let glUsage = this._usage;\n\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._glID);\n if (this._needExpandDataStore) {\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, data, glUsage);\n this._needExpandDataStore = false;\n }\n else {\n gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, byteOffset, data);\n }\n this._device._restoreIndexBuffer();\n }\n\n get count () {\n return this._numIndices;\n }\n\n setUsage (usage) {\n this._usage = usage;\n }\n}\n\nIndexBuffer.BYTES_PER_INDEX = BYTES_PER_INDEX;\n\nexport default IndexBuffer;\n","import {\n enums,\n attrTypeBytes,\n glFilter,\n glTextureFmt,\n} from './enums';\n\nlet gfx = null;\n\nif (CC_JSB && CC_NATIVERENDERER) {\n gfx = window.gfx;\n} else {\n let VertexFormat = require('./vertex-format');\n let IndexBuffer = require('./index-buffer');\n let VertexBuffer = require('./vertex-buffer');\n let Program = require('./program');\n let Texture = require('./texture');\n let Texture2D = require('./texture-2d');\n let TextureCube = require('./texture-cube');\n let RenderBuffer = require('./render-buffer');\n let FrameBuffer = require('./frame-buffer');\n let Device = require('./device');\n\n gfx = {\n // classes\n VertexFormat,\n IndexBuffer,\n VertexBuffer,\n Program,\n Texture,\n Texture2D,\n TextureCube,\n RenderBuffer,\n FrameBuffer,\n Device,\n\n // functions\n attrTypeBytes,\n glFilter,\n glTextureFmt,\n };\n Object.assign(gfx, enums);\n}\n\nexport default gfx;\ncc.gfx = gfx;\n","export function isPow2(v) {\n return !(v & (v - 1)) && (!!v);\n}","let _genID = 0;\n\nfunction _parseError(out, type, errorLog) {\n if(!errorLog){\n return;\n }\n errorLog.split('\\n').forEach(msg => {\n if (msg.length < 5) {\n return;\n }\n\n let parts = /^ERROR:\\s+(\\d+):(\\d+):\\s*(.*)$/.exec(msg);\n if (parts) {\n out.push({\n type: type,\n fileID: parts[1] | 0,\n line: parts[2] | 0,\n message: parts[3].trim()\n })\n } else if (msg.length > 0) {\n out.push({\n type: type,\n fileID: -1,\n line: 0,\n message: msg\n });\n }\n });\n}\n\nexport default class Program {\n /**\n * @param {ef.GraphicsDevice} device - graphic device\n * @param {object} options - shader definition\n * @param {string} options.vert - vertex shader source code\n * @param {string} options.frag - fragment shader shader source code\n * @example\n * let prog = new Program(device, {\n * vert: `\n * attribute vec3 a_position;\n * void main() {\n * gl_Position = vec4( a_position, 1.0 );\n * }\n * `,\n * frag: `\n * precision mediump float;\n * void main() {\n * gl_FragColor = vec4( 1.0, 1.0, 1.0, 1.0 );\n * }\n * `\n * });\n */\n constructor(device, options) {\n this._device = device;\n\n // stores gl information: { location, type }\n this._attributes = [];\n this._uniforms = [];\n this._samplers = [];\n this._errors = [];\n this._linked = false;\n this._vertSource = options.vert;\n this._fragSource = options.frag;\n this._glID = null;\n this._id = _genID++;\n }\n\n get id() {\n return this._id;\n }\n\n link() {\n if (this._linked) {\n return;\n }\n\n let gl = this._device._gl;\n\n let vertShader = _createShader(gl, gl.VERTEX_SHADER, this._vertSource);\n let fragShader = _createShader(gl, gl.FRAGMENT_SHADER, this._fragSource);\n\n let program = gl.createProgram();\n gl.attachShader(program, vertShader);\n gl.attachShader(program, fragShader);\n gl.linkProgram(program);\n\n let failed = false;\n let errors = this._errors;\n\n if (!gl.getShaderParameter(vertShader, gl.COMPILE_STATUS)) {\n _parseError(errors, 'vs', gl.getShaderInfoLog(vertShader));\n failed = true;\n }\n\n if (!gl.getShaderParameter(fragShader, gl.COMPILE_STATUS)) {\n _parseError(errors, 'fs', gl.getShaderInfoLog(fragShader));\n failed = true;\n }\n\n gl.deleteShader(vertShader);\n gl.deleteShader(fragShader);\n\n if (failed) {\n return errors;\n }\n\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n errors.push({info: `Failed to link shader program: ${gl.getProgramInfoLog(program)}`});\n return errors;\n }\n\n this._glID = program;\n\n // parse attribute\n let numAttributes = gl.getProgramParameter(program, gl.ACTIVE_ATTRIBUTES);\n for (let i = 0; i < numAttributes; ++i) {\n let info = gl.getActiveAttrib(program, i);\n let location = gl.getAttribLocation(program, info.name);\n\n this._attributes.push({\n name: info.name,\n location: location,\n type: info.type,\n });\n }\n\n // parse uniform\n let numUniforms = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS);\n for (let i = 0; i < numUniforms; ++i) {\n let info = gl.getActiveUniform(program, i);\n let name = info.name;\n let location = gl.getUniformLocation(program, name);\n let isArray = name.substr(name.length - 3) === '[0]';\n if (isArray) {\n name = name.substr(0, name.length - 3);\n }\n\n let uniform = {\n name: name,\n location: location,\n type: info.type,\n size: isArray ? info.size : undefined, // used when uniform is an array\n };\n this._uniforms.push(uniform);\n }\n\n this._linked = true;\n }\n\n destroy() {\n let gl = this._device._gl;\n gl.deleteProgram(this._glID);\n\n this._linked = false;\n this._glID = null;\n this._attributes = [];\n this._uniforms = [];\n this._samplers = [];\n }\n}\n\n// ====================\n// internal\n// ====================\n\nfunction _createShader(gl, type, src) {\n let shader = gl.createShader(type);\n gl.shaderSource(shader, src);\n gl.compileShader(shader);\n\n return shader;\n}","export default class RenderBuffer {\n /**\n * @constructor\n * @param {Device} device\n * @param {RB_FMT_*} format\n * @param {Number} width\n * @param {Number} height\n */\n constructor(device, format, width, height) {\n this._device = device;\n this._format = format;\n \n this._glID = device._gl.createRenderbuffer();\n this.update(width, height);\n }\n\n update (width, height) {\n this._width = width;\n this._height = height;\n\n const gl = this._device._gl;\n gl.bindRenderbuffer(gl.RENDERBUFFER, this._glID);\n gl.renderbufferStorage(gl.RENDERBUFFER, this._format, width, height);\n gl.bindRenderbuffer(gl.RENDERBUFFER, null);\n }\n\n /**\n * @method destroy\n */\n destroy() {\n if (this._glID === null) {\n console.error('The render-buffer already destroyed');\n return;\n }\n\n const gl = this._device._gl;\n\n gl.bindRenderbuffer(gl.RENDERBUFFER, null);\n gl.deleteRenderbuffer(this._glID);\n\n this._glID = null;\n }\n}","import { enums } from './enums';\n\nconst _default = {\n // blend\n blend: false,\n blendSep: false,\n blendColor: 0xffffffff,\n blendEq: enums.BLEND_FUNC_ADD,\n blendAlphaEq: enums.BLEND_FUNC_ADD,\n blendSrc: enums.BLEND_ONE,\n blendDst: enums.BLEND_ZERO,\n blendSrcAlpha: enums.BLEND_ONE,\n blendDstAlpha: enums.BLEND_ZERO,\n\n // depth\n depthTest: false,\n depthWrite: false,\n depthFunc: enums.DS_FUNC_LESS,\n\n // stencil\n stencilTest: false,\n stencilSep: false,\n stencilFuncFront: enums.DS_FUNC_ALWAYS,\n stencilRefFront: 0,\n stencilMaskFront: 0xff,\n stencilFailOpFront: enums.STENCIL_OP_KEEP,\n stencilZFailOpFront: enums.STENCIL_OP_KEEP,\n stencilZPassOpFront: enums.STENCIL_OP_KEEP,\n stencilWriteMaskFront: 0xff,\n stencilFuncBack: enums.DS_FUNC_ALWAYS,\n stencilRefBack: 0,\n stencilMaskBack: 0xff,\n stencilFailOpBack: enums.STENCIL_OP_KEEP,\n stencilZFailOpBack: enums.STENCIL_OP_KEEP,\n stencilZPassOpBack: enums.STENCIL_OP_KEEP,\n stencilWriteMaskBack: 0xff,\n\n // cull-mode\n cullMode: enums.CULL_BACK,\n\n // primitive-type\n primitiveType: enums.PT_TRIANGLES,\n\n // bindings\n maxStream: -1,\n vertexBuffers: [],\n vertexBufferOffsets: [],\n indexBuffer: null,\n maxTextureSlot: -1,\n textureUnits: [],\n program: null,\n};\n\nexport default class State {\n constructor(device) {\n // bindings\n this.vertexBuffers = new Array(device._caps.maxVertexStreams);\n this.vertexBufferOffsets = new Array(device._caps.maxVertexStreams);\n this.textureUnits = new Array(device._caps.maxTextureUnits);\n\n this.set(_default);\n }\n\n static initDefault(device) {\n _default.vertexBuffers = new Array(device._caps.maxVertexStreams);\n _default.vertexBufferOffsets = new Array(device._caps.maxVertexStreams);\n _default.textureUnits = new Array(device._caps.maxTextureUnits);\n }\n\n reset () {\n this.set(_default);\n }\n\n set (cpy) {\n // blending\n this.blend = cpy.blend;\n this.blendSep = cpy.blendSep;\n this.blendColor = cpy.blendColor;\n this.blendEq = cpy.blendEq;\n this.blendAlphaEq = cpy.blendAlphaEq;\n this.blendSrc = cpy.blendSrc;\n this.blendDst = cpy.blendDst;\n this.blendSrcAlpha = cpy.blendSrcAlpha;\n this.blendDstAlpha = cpy.blendDstAlpha;\n\n // depth\n this.depthTest = cpy.depthTest;\n this.depthWrite = cpy.depthWrite;\n this.depthFunc = cpy.depthFunc;\n\n // stencil\n this.stencilTest = cpy.stencilTest;\n this.stencilSep = cpy.stencilSep;\n this.stencilFuncFront = cpy.stencilFuncFront;\n this.stencilRefFront = cpy.stencilRefFront;\n this.stencilMaskFront = cpy.stencilMaskFront;\n this.stencilFailOpFront = cpy.stencilFailOpFront;\n this.stencilZFailOpFront = cpy.stencilZFailOpFront;\n this.stencilZPassOpFront = cpy.stencilZPassOpFront;\n this.stencilWriteMaskFront = cpy.stencilWriteMaskFront;\n this.stencilFuncBack = cpy.stencilFuncBack;\n this.stencilRefBack = cpy.stencilRefBack;\n this.stencilMaskBack = cpy.stencilMaskBack;\n this.stencilFailOpBack = cpy.stencilFailOpBack;\n this.stencilZFailOpBack = cpy.stencilZFailOpBack;\n this.stencilZPassOpBack = cpy.stencilZPassOpBack;\n this.stencilWriteMaskBack = cpy.stencilWriteMaskBack;\n\n // cull-mode\n this.cullMode = cpy.cullMode;\n\n // primitive-type\n this.primitiveType = cpy.primitiveType;\n\n // buffer bindings\n this.maxStream = cpy.maxStream;\n for (let i = 0; i < cpy.vertexBuffers.length; ++i) {\n this.vertexBuffers[i] = cpy.vertexBuffers[i];\n }\n for (let i = 0; i < cpy.vertexBufferOffsets.length; ++i) {\n this.vertexBufferOffsets[i] = cpy.vertexBufferOffsets[i];\n }\n this.indexBuffer = cpy.indexBuffer;\n\n // texture bindings\n this.maxTextureSlot = cpy.maxTextureSlot;\n for (let i = 0; i < cpy.textureUnits.length; ++i) {\n this.textureUnits[i] = cpy.textureUnits[i];\n }\n\n this.program = cpy.program;\n }\n}","// @ts-check\nimport Texture from './texture';\nimport { enums, glFilter, glTextureFmt } from './enums';\nimport { isPow2 } from './misc';\n\n/**\n * @typedef {HTMLImageElement | HTMLCanvasElement} HTMLImageSource\n * @typedef {HTMLImageSource | ArrayBufferView} ImageSource\n * @typedef {{width?: number, height?: number, minFilter?: number, magFilter?: number, mipFilter?: number, wrapS?: number, wrapT?: number, format?: number, genMipmaps?: boolean, images?: ImageSource[], image?: ImageSource, flipY?: boolean, premultiplyAlpha?: boolean, anisotropy?: number}} TextureUpdateOpts\n * @typedef {import(\"../gfx/device\").default} Device\n */\n\nexport default class Texture2D extends Texture {\n /**\n * @constructor\n * @param {Device} device\n * @param {TextureUpdateOpts} options\n */\n constructor(device, options) {\n super(device);\n\n let gl = this._device._gl;\n this._target = gl.TEXTURE_2D;\n this._glID = gl.createTexture();\n\n // always alloc texture in GPU when we create it.\n options.images = options.images || [null];\n this.update(options);\n }\n\n /**\n * @method update\n * @param {TextureUpdateOpts} options\n */\n update(options) {\n let gl = this._device._gl;\n let genMipmaps = this._genMipmap;\n\n if (options) {\n if (options.width !== undefined) {\n this._width = options.width;\n }\n if (options.height !== undefined) {\n this._height = options.height;\n }\n if (options.anisotropy !== undefined) {\n this._anisotropy = options.anisotropy;\n }\n if (options.minFilter !== undefined) {\n this._minFilter = options.minFilter;\n }\n if (options.magFilter !== undefined) {\n this._magFilter = options.magFilter;\n }\n if (options.mipFilter !== undefined) {\n this._mipFilter = options.mipFilter;\n }\n if (options.wrapS !== undefined) {\n this._wrapS = options.wrapS;\n }\n if (options.wrapT !== undefined) {\n this._wrapT = options.wrapT;\n }\n if (options.format !== undefined) {\n this._format = options.format;\n this._compressed = \n (this._format >= enums.TEXTURE_FMT_RGB_DXT1 && this._format <= enums.TEXTURE_FMT_RGBA_PVRTC_4BPPV1) || \n (this._format >= enums.TEXTURE_FMT_RGB_ETC2 && this._format <= enums.TEXTURE_FMT_RGBA_ETC2)\n ;\n }\n\n // check if generate mipmap\n if (options.genMipmaps !== undefined) {\n this._genMipmap = options.genMipmaps;\n genMipmaps = options.genMipmaps;\n }\n\n let maxSize = this._device.caps.maxTextureSize || Number.MAX_VALUE;\n let textureMaxSize = Math.max(options.width || 0, options.height || 0);\n if (maxSize < textureMaxSize)\n console.warn(`The current texture size ${textureMaxSize} exceeds the maximum size [${maxSize}] supported on the device.`);\n\n if (options.images !== undefined) {\n if (options.images.length > 1) {\n genMipmaps = false;\n let maxLength = options.width > options.height ? options.width : options.height;\n if (maxLength >> (options.images.length - 1) !== 1) {\n console.error('texture-2d mipmap is invalid, should have a 1x1 mipmap.');\n }\n }\n }\n }\n\n // NOTE: get pot after this._width, this._height has been assigned.\n let pot = isPow2(this._width) && isPow2(this._height);\n if (!pot) {\n genMipmaps = false;\n }\n\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, this._glID);\n if (options.images !== undefined && options.images.length > 0) {\n this._setMipmap(options.images, options.flipY, options.premultiplyAlpha);\n if (options.images.length > 1) this._genMipmap = true;\n }\n if (genMipmaps) {\n gl.hint(gl.GENERATE_MIPMAP_HINT, gl.NICEST);\n gl.generateMipmap(gl.TEXTURE_2D);\n this._genMipmap = true;\n }\n\n this._setTexInfo();\n this._device._restoreTexture(0);\n }\n\n /**\n * @method updateSubImage\n * @param {Object} options\n * @param {Number} options.x\n * @param {Number} options.y\n * @param {Number} options.width\n * @param {Number} options.height\n * @param {Number} options.level\n * @param {HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | ArrayBufferView} options.image\n * @param {Boolean} options.flipY\n * @param {Boolean} options.premultiplyAlpha\n */\n updateSubImage(options) {\n let gl = this._device._gl;\n let glFmt = glTextureFmt(this._format);\n\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, this._glID);\n this._setSubImage(glFmt, options);\n this._device._restoreTexture(0);\n }\n\n /**\n * @method updateImage\n * @param {Object} options\n * @param {Number} options.width\n * @param {Number} options.height\n * @param {Number} options.level\n * @param {HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | ArrayBufferView} options.image\n * @param {Boolean} options.flipY\n * @param {Boolean} options.premultiplyAlpha\n */\n updateImage(options) {\n let gl = this._device._gl;\n let glFmt = glTextureFmt(this._format);\n\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, this._glID);\n this._setImage(glFmt, options);\n this._device._restoreTexture(0);\n }\n\n _setSubImage(glFmt, options) {\n let gl = this._device._gl;\n let flipY = options.flipY;\n let premultiplyAlpha = options.premultiplyAlpha;\n let img = options.image;\n\n if (img && !ArrayBuffer.isView(img) && !(img instanceof ArrayBuffer)) {\n if (flipY === undefined) {\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);\n } else {\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);\n }\n\n if (premultiplyAlpha === undefined) {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n } else {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, premultiplyAlpha);\n }\n\n gl.texSubImage2D(gl.TEXTURE_2D, options.level, options.x, options.y, glFmt.format, glFmt.pixelType, img);\n } else {\n if (flipY === undefined) {\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);\n } else {\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);\n }\n\n if (premultiplyAlpha === undefined) {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n } else {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, premultiplyAlpha);\n }\n\n if (this._compressed) {\n gl.compressedTexSubImage2D(gl.TEXTURE_2D,\n options.level,\n options.x,\n options.y,\n options.width,\n options.height,\n glFmt.format,\n img\n );\n } else {\n gl.texSubImage2D(\n gl.TEXTURE_2D,\n options.level,\n options.x,\n options.y,\n options.width,\n options.height,\n glFmt.format,\n glFmt.pixelType,\n img\n );\n }\n }\n }\n\n _setImage(glFmt, options) {\n let gl = this._device._gl;\n let flipY = options.flipY;\n let premultiplyAlpha = options.premultiplyAlpha;\n let img = options.image;\n\n if (img && !ArrayBuffer.isView(img) && !(img instanceof ArrayBuffer)) {\n if (flipY === undefined) {\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);\n } else {\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);\n }\n\n if (premultiplyAlpha === undefined) {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n } else {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, premultiplyAlpha);\n }\n\n gl.texImage2D(\n gl.TEXTURE_2D,\n options.level,\n glFmt.internalFormat,\n glFmt.format,\n glFmt.pixelType,\n img\n );\n } else {\n if (flipY === undefined) {\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);\n } else {\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);\n }\n\n if (premultiplyAlpha === undefined) {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n } else {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, premultiplyAlpha);\n }\n\n if (this._compressed) {\n gl.compressedTexImage2D(\n gl.TEXTURE_2D,\n options.level,\n glFmt.internalFormat,\n options.width,\n options.height,\n 0,\n img\n );\n } else {\n gl.texImage2D(\n gl.TEXTURE_2D,\n options.level,\n glFmt.internalFormat,\n options.width,\n options.height,\n 0,\n glFmt.format,\n glFmt.pixelType,\n img\n );\n }\n }\n }\n\n _setMipmap(images, flipY, premultiplyAlpha) {\n let glFmt = glTextureFmt(this._format);\n let options = {\n width: this._width,\n height: this._height,\n flipY: flipY,\n premultiplyAlpha: premultiplyAlpha,\n level: 0,\n image: null\n };\n\n for (let i = 0; i < images.length; ++i) {\n options.level = i;\n options.width = this._width >> i;\n options.height = this._height >> i;\n options.image = images[i];\n this._setImage(glFmt, options);\n }\n }\n\n _setTexInfo() {\n let gl = this._device._gl;\n let pot = isPow2(this._width) && isPow2(this._height);\n\n // WebGL1 doesn't support all wrap modes with NPOT textures\n if (!pot && (this._wrapS !== enums.WRAP_CLAMP || this._wrapT !== enums.WRAP_CLAMP)) {\n console.warn('WebGL1 doesn\\'t support all wrap modes with NPOT textures');\n this._wrapS = enums.WRAP_CLAMP;\n this._wrapT = enums.WRAP_CLAMP;\n }\n\n let mipFilter = this._genMipmap ? this._mipFilter : -1;\n if (!pot && mipFilter !== -1) {\n console.warn('NPOT textures do not support mipmap filter');\n mipFilter = -1;\n }\n\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, glFilter(gl, this._minFilter, mipFilter));\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, glFilter(gl, this._magFilter, -1));\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, this._wrapS);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, this._wrapT);\n\n let ext = this._device.ext('EXT_texture_filter_anisotropic');\n if (ext) {\n gl.texParameteri(gl.TEXTURE_2D, ext.TEXTURE_MAX_ANISOTROPY_EXT, this._anisotropy);\n }\n }\n}","import Texture from './texture';\nimport { enums, glFilter, glTextureFmt } from './enums';\nimport { isPow2 } from './misc';\n\nexport default class TextureCube extends Texture {\n /**\n * @constructor\n * @param {Device} device\n * @param {Object} options\n * @param {Array} options.images\n * @param {Boolean} options.genMipmaps\n * @param {Number} options.width\n * @param {Number} options.height\n * @param {TEXTURE_FMT_*} options.format\n * @param {Number} options.anisotropy\n * @param {FILTER_*} options.minFilter\n * @param {FILTER_*} options.magFilter\n * @param {FILTER_*} options.mipFilter\n * @param {WRAP_*} options.wrapS\n * @param {WRAP_*} options.wrapT\n * @param {WRAP_*} options.wrapR\n * @param {Boolean} options.flipY\n * @param {Boolean} options.premultiplyAlpha\n */\n constructor(device, options) {\n super(device);\n let gl = this._device._gl;\n this._target = gl.TEXTURE_CUBE_MAP;\n this._glID = gl.createTexture();\n this.update(options);\n }\n\n /**\n * @method update\n * @param {Object} options\n * @param {Array} options.images\n * @param {Boolean} options.genMipmaps\n * @param {Number} options.width\n * @param {Number} options.height\n * @param {TEXTURE_FMT_*} options.format\n * @param {Number} options.anisotropy\n * @param {FILTER_*} options.minFilter\n * @param {FILTER_*} options.magFilter\n * @param {FILTER_*} options.mipFilter\n * @param {WRAP_*} options.wrapS\n * @param {WRAP_*} options.wrapT\n * @param {WRAP_*} options.wrapR\n * @param {Boolean} options.flipY\n * @param {Boolean} options.premultiplyAlpha\n */\n update(options) {\n let gl = this._device._gl;\n let genMipmaps = this._genMipmaps;\n\n if (options) {\n if (options.width !== undefined) {\n this._width = options.width;\n }\n if (options.height !== undefined) {\n this._height = options.height;\n }\n if (options.anisotropy !== undefined) {\n this._anisotropy = options.anisotropy;\n }\n if (options.minFilter !== undefined) {\n this._minFilter = options.minFilter;\n }\n if (options.magFilter !== undefined) {\n this._magFilter = options.magFilter;\n }\n if (options.mipFilter !== undefined) {\n this._mipFilter = options.mipFilter;\n }\n if (options.wrapS !== undefined) {\n this._wrapS = options.wrapS;\n }\n if (options.wrapT !== undefined) {\n this._wrapT = options.wrapT;\n }\n // wrapR available in webgl2\n // if (options.wrapR !== undefined) {\n // this._wrapR = options.wrapR;\n // }\n if (options.format !== undefined) {\n this._format = options.format;\n this._compressed = \n (this._format >= enums.TEXTURE_FMT_RGB_DXT1 && this._format <= enums.TEXTURE_FMT_RGBA_PVRTC_4BPPV1) || \n (this._format >= enums.TEXTURE_FMT_RGB_ETC2 && this._format <= enums.TEXTURE_FMT_RGBA_ETC2)\n ;\n }\n\n // check if generate mipmap\n if (options.genMipmaps !== undefined) {\n this._genMipmaps = options.genMipmaps;\n genMipmaps = options.genMipmaps;\n }\n\n if (options.images !== undefined) {\n if (options.images.length > 1) {\n genMipmaps = false;\n if (options.width !== options.height) {\n console.warn('texture-cube width and height should be identical.');\n }\n if (options.width >> (options.images.length - 1) !== 1) {\n console.error('texture-cube mipmap is invalid. please set mipmap as 1x1, 2x2, 4x4 ... nxn');\n }\n }\n }\n }\n\n // NOTE: get pot after this._width, this._height has been assigned.\n let pot = isPow2(this._width) && isPow2(this._height);\n if (!pot) {\n genMipmaps = false;\n }\n\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_CUBE_MAP, this._glID);\n if (options.images !== undefined && options.images.length > 0) {\n this._setMipmap(options.images, options.flipY, options.premultiplyAlpha);\n if (options.images.length > 1) this._genMipmaps = true;\n }\n if (genMipmaps) {\n gl.hint(gl.GENERATE_MIPMAP_HINT, gl.NICEST);\n gl.generateMipmap(gl.TEXTURE_CUBE_MAP);\n this._genMipmaps = true;\n }\n\n this._setTexInfo();\n\n this._device._restoreTexture(0);\n }\n\n /**\n * @method updateSubImage\n * @param {Object} options\n * @param {Number} options.x\n * @param {Number} options.y\n * @param {Number} options.width\n * @param {Number} options.height\n * @param {Number} options.level\n * @param {Number} options.faceIndex\n * @param {HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | ArrayBufferView} options.image\n * @param {Boolean} options.flipY\n * @param {Boolean} options.premultiplyAlpha\n */\n updateSubImage(options) {\n let gl = this._device._gl;\n let glFmt = glTextureFmt(this._format);\n\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_CUBE_MAP, this._glID);\n this._setSubImage(glFmt, options);\n\n this._device._restoreTexture(0);\n }\n\n /**\n * @method updateImage\n * @param {Object} options\n * @param {Number} options.width\n * @param {Number} options.height\n * @param {Number} options.level\n * @param {Number} options.faceIndex\n * @param {HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | ArrayBufferView} options.image\n * @param {Boolean} options.flipY\n * @param {Boolean} options.premultiplyAlpha\n */\n updateImage(options) {\n let gl = this._device._gl;\n let glFmt = glTextureFmt(this._format);\n\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_CUBE_MAP, this._glID);\n this._setImage(glFmt, options);\n this._device._restoreTexture(0);\n }\n\n _setSubImage(glFmt, options) {\n let gl = this._device._gl;\n let flipY = options.flipY;\n let premultiplyAlpha = options.premultiplyAlpha;\n let faceIndex = options.faceIndex;\n let img = options.image;\n\n if (flipY === undefined) {\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);\n } else {\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);\n }\n\n if (premultiplyAlpha === undefined) {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n } else {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, premultiplyAlpha);\n }\n\n if (img && !ArrayBuffer.isView(img) && !(img instanceof ArrayBuffer)) {\n gl.texSubImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, options.level, options.x, options.y, glFmt.format, glFmt.pixelType, img);\n } else {\n if (this._compressed) {\n gl.compressedTexSubImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex,\n options.level,\n options.x,\n options.y,\n options.width,\n options.height,\n glFmt.format,\n img\n );\n } else {\n gl.texSubImage2D(\n gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex,\n options.level,\n options.x,\n options.y,\n options.width,\n options.height,\n glFmt.format,\n glFmt.pixelType,\n img\n );\n }\n }\n }\n\n _setImage(glFmt, options) {\n let gl = this._device._gl;\n let flipY = options.flipY;\n let premultiplyAlpha = options.premultiplyAlpha;\n let faceIndex = options.faceIndex;\n let img = options.image;\n\n if (flipY === undefined) {\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);\n } else {\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);\n }\n\n if (premultiplyAlpha === undefined) {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n } else {\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, premultiplyAlpha);\n }\n if (img && !ArrayBuffer.isView(img) && !(img instanceof ArrayBuffer)) {\n gl.texImage2D(\n gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex,\n options.level,\n glFmt.internalFormat,\n glFmt.format,\n glFmt.pixelType,\n img\n );\n } else {\n if (this._compressed) {\n gl.compressedTexImage2D(\n gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex,\n options.level,\n glFmt.internalFormat,\n options.width,\n options.height,\n 0,\n img\n );\n } else {\n gl.texImage2D(\n gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex,\n options.level,\n glFmt.internalFormat,\n options.width,\n options.height,\n 0,\n glFmt.format,\n glFmt.pixelType,\n img\n );\n }\n }\n }\n\n // levelImages = [imagePosX, imageNegX, imagePosY, imageNegY, imagePosZ, imageNegz]\n // images = [levelImages0, levelImages1, ...]\n _setMipmap(images, flipY, premultiplyAlpha) {\n let glFmt = glTextureFmt(this._format);\n let options = {\n width: this._width,\n height: this._height,\n faceIndex: 0,\n flipY: flipY,\n premultiplyAlpha: premultiplyAlpha,\n level: 0,\n image: null\n };\n\n for (let i = 0; i < images.length; ++i) {\n let levelImages = images[i];\n options.level = i;\n options.width = this._width >> i;\n options.height = this._height >> i;\n\n for (let face = 0; face < 6; ++face) {\n options.faceIndex = face;\n options.image = levelImages[face];\n this._setImage(glFmt, options);\n }\n }\n }\n\n _setTexInfo() {\n let gl = this._device._gl;\n let pot = isPow2(this._width) && isPow2(this._height);\n\n // WebGL1 doesn't support all wrap modes with NPOT textures\n if (!pot && (this._wrapS !== enums.WRAP_CLAMP || this._wrapT !== enums.WRAP_CLAMP)) {\n console.warn('WebGL1 doesn\\'t support all wrap modes with NPOT textures');\n this._wrapS = enums.WRAP_CLAMP;\n this._wrapT = enums.WRAP_CLAMP;\n }\n\n let mipFilter = this._genMipmaps ? this._mipFilter : -1;\n if (!pot && mipFilter !== -1) {\n console.warn('NPOT textures do not support mipmap filter');\n mipFilter = -1;\n }\n\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER, glFilter(gl, this._minFilter, mipFilter));\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, glFilter(gl, this._magFilter, -1));\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_S, this._wrapS);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_T, this._wrapT);\n // wrapR available in webgl2\n // gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_R, this._wrapR);\n\n let ext = this._device.ext('EXT_texture_filter_anisotropic');\n if (ext) {\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, ext.TEXTURE_MAX_ANISOTROPY_EXT, this._anisotropy);\n }\n }\n}\n","import { enums } from './enums';\n\n/**\n * @type {WebGLTexture}\n */\nconst _nullWebGLTexture = null;\n\nlet _textureID = 0;\n\n/**\n * @typedef {import(\"../gfx/device\").default} Device\n */\n\nexport default class Texture {\n /**\n * @param {Device} device\n */\n constructor(device) {\n this._device = device;\n\n this._width = 4;\n this._height = 4;\n this._genMipmaps = false;\n this._compressed = false;\n\n this._anisotropy = 1;\n this._minFilter = enums.FILTER_LINEAR;\n this._magFilter = enums.FILTER_LINEAR;\n this._mipFilter = enums.FILTER_LINEAR;\n this._wrapS = enums.WRAP_REPEAT;\n this._wrapT = enums.WRAP_REPEAT;\n // wrapR available in webgl2\n // this._wrapR = enums.WRAP_REPEAT;\n this._format = enums.TEXTURE_FMT_RGBA8;\n\n this._target = -1;\n \n this._id = _textureID++;\n }\n\n /**\n * @method destroy\n */\n destroy() {\n if (this._glID === _nullWebGLTexture) {\n console.error('The texture already destroyed');\n return;\n }\n\n let gl = this._device._gl;\n gl.deleteTexture(this._glID);\n\n this._device._stats.tex -= this.bytes;\n this._glID = _nullWebGLTexture;\n }\n}","import { enums } from './enums';\n\nclass VertexBuffer {\n /**\n * @constructor\n * @param {Device} device\n * @param {VertexFormat} format\n * @param {USAGE_*} usage\n * @param {ArrayBuffer | Uint8Array} data\n */\n constructor(device, format, usage, data) {\n this._device = device;\n this._format = format;\n this._usage = usage;\n this._bytesPerVertex = this._format._bytes;\n this._bytes = data.byteLength;\n this._numVertices = this._bytes / this._bytesPerVertex;\n\n this._needExpandDataStore = true;\n\n // update\n this._glID = device._gl.createBuffer();\n this.update(0, data);\n\n // stats\n device._stats.vb += this._bytes;\n }\n\n /**\n * @method destroy\n */\n destroy() {\n if (this._glID === -1) {\n console.error('The buffer already destroyed');\n return;\n }\n\n let gl = this._device._gl;\n gl.deleteBuffer(this._glID);\n this._device._stats.vb -= this.bytes;\n\n this._glID = -1;\n }\n\n /**\n * @method update\n * @param {Number} byteOffset\n * @param {ArrayBuffer} data\n */\n update(byteOffset, data) {\n if (this._glID === -1) {\n console.error('The buffer is destroyed');\n return;\n }\n\n if (data.byteLength === 0) return;\n\n // Need to create new buffer object when bytes exceed\n if (byteOffset + data.byteLength > this._bytes) {\n if (byteOffset) {\n // Lost data between [0, byteOffset] which is need for new buffer\n console.error('Failed to update data, bytes exceed.');\n return;\n }\n else {\n this._needExpandDataStore = true;\n this._bytes = byteOffset + data.byteLength;\n this._numVertices = this._bytes / this._bytesPerVertex;\n }\n }\n\n let gl = this._device._gl;\n let glUsage = this._usage;\n\n gl.bindBuffer(gl.ARRAY_BUFFER, this._glID);\n if (this._needExpandDataStore) {\n gl.bufferData(gl.ARRAY_BUFFER, data, glUsage);\n this._needExpandDataStore = false;\n }\n else {\n gl.bufferSubData(gl.ARRAY_BUFFER, byteOffset, data);\n }\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n }\n\n get count () {\n return this._numVertices;\n }\n\n getFormat (name) {\n return this._format.element(name);\n }\n\n setUsage (usage) {\n this._usage = usage;\n }\n}\n\nexport default VertexBuffer;\n","import { attrTypeBytes } from './enums';\nimport murmurhash2 from '../murmurhash2_gc';\n\n// ====================\n// exports\n// ====================\n\nexport default class VertexFormat {\n /**\n * @constructor\n * @param {Array} infos\n *\n * @example\n * let vertexFmt = new VertexFormat([\n * { name: gfx.ATTR_POSITION, type: gfx.ATTR_TYPE_FLOAT32, num: 3 },\n * { name: gfx.ATTR_UV0, type: gfx.ATTR_TYPE_FLOAT32, num: 2 },\n * { name: gfx.ATTR_COLOR, type: gfx.ATTR_TYPE_FLOAT32, num: 4, normalize: true },\n * ])\n */\n constructor(infos) {\n this._attr2el = {};\n this._elements = [];\n this._bytes = 0;\n\n let hash = \"\";\n\n for (let i = 0, len = infos.length; i < len; ++i) {\n let info = infos[i];\n let el = {\n name: info.name,\n offset: this._bytes,\n stride: 0,\n stream: -1,\n type: info.type,\n num: info.num,\n normalize: (info.normalize === undefined) ? false : info.normalize,\n bytes: info.num * attrTypeBytes(info.type),\n };\n\n this._attr2el[el.name] = el;\n this._elements.push(el);\n\n this._bytes += el.bytes;\n\n hash += `${el.name}:${el.num}:${el.type}:${el.normalize}`;\n }\n\n for (let i = 0, len = this._elements.length; i < len; ++i) {\n let el = this._elements[i];\n el.stride = this._bytes;\n }\n\n this._hash = murmurhash2(hash, 666);\n }\n\n /**\n * @method element\n * @param {string} attrName\n */\n element(attrName) {\n return this._attr2el[attrName];\n }\n\n /**\n * @method getHash\n */\n getHash () {\n return this._hash;\n }\n}","export default class CircularPool {\n constructor(fn, size) {\n this._cursor = 0;\n this._data = new Array(size);\n\n for (let i = 0; i < size; ++i) {\n this._data[i] = fn();\n }\n }\n\n request() {\n let item = this._data[this._cursor];\n this._cursor = (this._cursor + 1) % this._data.length;\n\n return item;\n }\n}","import sort from './timsort';\n\nexport default class FixedArray {\n constructor(size) {\n this._count = 0;\n this._data = new Array(size);\n }\n\n _resize(size) {\n if (size > this._data.length) {\n for (let i = this._data.length; i < size; ++i) {\n this._data[i] = undefined;\n }\n }\n }\n\n get length() {\n return this._count;\n }\n\n get data() {\n return this._data;\n }\n\n reset() {\n for (let i = 0; i < this._count; ++i) {\n this._data[i] = undefined;\n }\n\n this._count = 0;\n }\n\n push(val) {\n if (this._count >= this._data.length) {\n this._resize(this._data.length * 2);\n }\n\n this._data[this._count] = val;\n ++this._count;\n }\n\n pop() {\n --this._count;\n\n if (this._count < 0) {\n this._count = 0;\n }\n\n let ret = this._data[this._count];\n this._data[this._count] = undefined;\n\n return ret;\n }\n\n fastRemove(idx) {\n if (idx >= this._count || idx < 0) {\n return;\n }\n\n let last = this._count - 1;\n this._data[idx] = this._data[last];\n this._data[last] = undefined;\n this._count -= 1;\n }\n\n indexOf(val) {\n return this._data.indexOf(val);\n }\n\n sort(cmp) {\n return sort(this._data, 0, this._count, cmp);\n }\n}","export { default as CircularPool } from './circular-pool';\nexport { default as FixedArray } from './fixed-array';\nexport { default as LinkedArray } from './linked-array';\nexport { default as Pool } from './pool';\nexport { default as RecyclePool } from './recycle-pool';\nexport { default as TypedArrayPool } from './typed-array-pool';","import Pool from './pool';\n\n// NOTE: you must have `_prev` and `_next` field in the object returns by `fn`\n\nexport default class LinkedArray {\n constructor(fn, size) {\n this._fn = fn;\n this._count = 0;\n this._head = null;\n this._tail = null;\n\n this._pool = new Pool(fn, size);\n }\n\n get head() {\n return this._head;\n }\n\n get tail() {\n return this._tail;\n }\n\n get length() {\n return this._count;\n }\n\n add() {\n let node = this._pool.alloc();\n\n if (!this._tail) {\n this._head = node;\n } else {\n this._tail._next = node;\n node._prev = this._tail;\n }\n this._tail = node;\n this._count += 1;\n\n return node;\n }\n\n remove(node) {\n if (node._prev) {\n node._prev._next = node._next;\n } else {\n this._head = node._next;\n }\n\n if (node._next) {\n node._next._prev = node._prev;\n } else {\n this._tail = node._prev;\n }\n\n node._next = null;\n node._prev = null;\n this._pool.free(node);\n this._count -= 1;\n }\n\n forEach(fn, binder) {\n let cursor = this._head;\n if (!cursor) {\n return;\n }\n\n if (binder) {\n fn = fn.bind(binder);\n }\n\n let idx = 0;\n let next = cursor;\n\n while (cursor) {\n next = cursor._next;\n fn(cursor, idx, this);\n\n cursor = next;\n ++idx;\n }\n }\n}","export default class Pool {\n constructor(fn, size) {\n this._fn = fn;\n this._idx = size - 1;\n this._frees = new Array(size);\n\n for (let i = 0; i < size; ++i) {\n this._frees[i] = fn();\n }\n }\n\n _expand(size) {\n let old = this._frees;\n this._frees = new Array(size);\n\n let len = size - old.length;\n for (let i = 0; i < len; ++i) {\n this._frees[i] = this._fn();\n }\n\n for (let i = len, j = 0; i < size; ++i, ++j) {\n this._frees[i] = old[j];\n }\n\n this._idx += len;\n }\n\n alloc() {\n // create some more space (expand by 20%, minimum 1)\n if (this._idx < 0) {\n this._expand(Math.round(this._frees.length * 1.2) + 1);\n }\n\n let ret = this._frees[this._idx];\n this._frees[this._idx] = null;\n --this._idx;\n\n return ret;\n }\n\n free(obj) {\n ++this._idx;\n this._frees[this._idx] = obj;\n }\n\n /**\n * 清除对象池。\n * @param fn 清除回调,对每个释放的对象调用一次。\n */\n clear (fn) {\n for (let i = 0; i <= this._idx; i++) {\n if (fn) {\n fn(this._frees[i]);\n }\n }\n this._frees.length = 0;\n this._idx = -1;\n }\n}","import sort from './timsort';\n\n/**\n * Recycle Pool\n * @class RecyclePool\n */\nexport default class RecyclePool {\n constructor(fn, size) {\n this._fn = fn;\n this._count = 0;\n this._data = new Array(size);\n\n for (let i = 0; i < size; ++i) {\n this._data[i] = fn();\n }\n }\n\n get length() {\n return this._count;\n }\n\n get data() {\n return this._data;\n }\n\n reset() {\n this._count = 0;\n }\n\n resize(size) {\n if (size > this._data.length) {\n for (let i = this._data.length; i < size; ++i) {\n this._data[i] = this._fn();\n }\n }\n }\n\n add() {\n if (this._count >= this._data.length) {\n this.resize(this._data.length * 2);\n }\n\n return this._data[this._count++];\n }\n\n remove(idx) {\n if (idx >= this._count) {\n return;\n }\n\n let last = this._count - 1;\n let tmp = this._data[idx];\n this._data[idx] = this._data[last];\n this._data[last] = tmp;\n this._count -= 1;\n }\n\n sort(cmp) {\n return sort(this._data, 0, this._count, cmp);\n }\n}\n\ncc.RecyclePool = RecyclePool;","// reference: https://github.com/mziccard/node-timsort\n\n/**\n * Default minimum size of a run.\n */\nconst DEFAULT_MIN_MERGE = 32;\n\n/**\n * Minimum ordered subsequece required to do galloping.\n */\nconst DEFAULT_MIN_GALLOPING = 7;\n\n/**\n * Default tmp storage length. Can increase depending on the size of the\n * smallest run to merge.\n */\nconst DEFAULT_TMP_STORAGE_LENGTH = 256;\n\n/**\n * Pre-computed powers of 10 for efficient lexicographic comparison of\n * small integers.\n */\nconst POWERS_OF_TEN = [1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9]\n\n/**\n * Estimate the logarithm base 10 of a small integer.\n *\n * @param {number} x - The integer to estimate the logarithm of.\n * @return {number} - The estimated logarithm of the integer.\n */\nfunction log10(x) {\n if (x < 1e5) {\n if (x < 1e2) {\n return x < 1e1 ? 0 : 1;\n }\n\n if (x < 1e4) {\n return x < 1e3 ? 2 : 3;\n }\n\n return 4;\n }\n\n if (x < 1e7) {\n return x < 1e6 ? 5 : 6;\n }\n\n if (x < 1e9) {\n return x < 1e8 ? 7 : 8;\n }\n\n return 9;\n}\n\n/**\n * Default alphabetical comparison of items.\n *\n * @param {string|object|number} a - First element to compare.\n * @param {string|object|number} b - Second element to compare.\n * @return {number} - A positive number if a.toString() > b.toString(), a\n * negative number if .toString() < b.toString(), 0 otherwise.\n */\nfunction alphabeticalCompare(a, b) {\n if (a === b) {\n return 0;\n }\n\n if (~~a === a && ~~b === b) {\n if (a === 0 || b === 0) {\n return a < b ? -1 : 1;\n }\n\n if (a < 0 || b < 0) {\n if (b >= 0) {\n return -1;\n }\n\n if (a >= 0) {\n return 1;\n }\n\n a = -a;\n b = -b;\n }\n\n const al = log10(a);\n const bl = log10(b);\n\n let t = 0;\n\n if (al < bl) {\n a *= POWERS_OF_TEN[bl - al - 1];\n b /= 10;\n t = -1;\n } else if (al > bl) {\n b *= POWERS_OF_TEN[al - bl - 1];\n a /= 10;\n t = 1;\n }\n\n if (a === b) {\n return t;\n }\n\n return a < b ? -1 : 1;\n }\n\n let aStr = String(a);\n let bStr = String(b);\n\n if (aStr === bStr) {\n return 0;\n }\n\n return aStr < bStr ? -1 : 1;\n}\n\n/**\n * Compute minimum run length for TimSort\n *\n * @param {number} n - The size of the array to sort.\n */\nfunction minRunLength(n) {\n let r = 0;\n\n while (n >= DEFAULT_MIN_MERGE) {\n r |= (n & 1);\n n >>= 1;\n }\n\n return n + r;\n}\n\n/**\n * Counts the length of a monotonically ascending or strictly monotonically\n * descending sequence (run) starting at array[lo] in the range [lo, hi). If\n * the run is descending it is made ascending.\n *\n * @param {array} array - The array to reverse.\n * @param {number} lo - First element in the range (inclusive).\n * @param {number} hi - Last element in the range.\n * @param {function} compare - Item comparison function.\n * @return {number} - The length of the run.\n */\nfunction makeAscendingRun(array, lo, hi, compare) {\n let runHi = lo + 1;\n\n if (runHi === hi) {\n return 1;\n }\n\n // Descending\n if (compare(array[runHi++], array[lo]) < 0) {\n while (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) {\n runHi++;\n }\n\n reverseRun(array, lo, runHi);\n // Ascending\n } else {\n while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) {\n runHi++;\n }\n }\n\n return runHi - lo;\n}\n\n/**\n * Reverse an array in the range [lo, hi).\n *\n * @param {array} array - The array to reverse.\n * @param {number} lo - First element in the range (inclusive).\n * @param {number} hi - Last element in the range.\n */\nfunction reverseRun(array, lo, hi) {\n hi--;\n\n while (lo < hi) {\n let t = array[lo];\n array[lo++] = array[hi];\n array[hi--] = t;\n }\n}\n\n/**\n * Perform the binary sort of the array in the range [lo, hi) where start is\n * the first element possibly out of order.\n *\n * @param {array} array - The array to sort.\n * @param {number} lo - First element in the range (inclusive).\n * @param {number} hi - Last element in the range.\n * @param {number} start - First element possibly out of order.\n * @param {function} compare - Item comparison function.\n */\nfunction binaryInsertionSort(array, lo, hi, start, compare) {\n if (start === lo) {\n start++;\n }\n\n for (; start < hi; start++) {\n let pivot = array[start];\n\n // Ranges of the array where pivot belongs\n let left = lo;\n let right = start;\n\n /*\n * pivot >= array[i] for i in [lo, left)\n * pivot < array[i] for i in in [right, start)\n */\n while (left < right) {\n let mid = (left + right) >>> 1;\n\n if (compare(pivot, array[mid]) < 0) {\n right = mid;\n } else {\n left = mid + 1;\n }\n }\n\n /*\n * Move elements right to make room for the pivot. If there are elements\n * equal to pivot, left points to the first slot after them: this is also\n * a reason for which TimSort is stable\n */\n let n = start - left;\n // Switch is just an optimization for small arrays\n switch (n) {\n case 3:\n array[left + 3] = array[left + 2];\n /* falls through */\n case 2:\n array[left + 2] = array[left + 1];\n /* falls through */\n case 1:\n array[left + 1] = array[left];\n break;\n default:\n while (n > 0) {\n array[left + n] = array[left + n - 1];\n n--;\n }\n }\n\n array[left] = pivot;\n }\n}\n\n/**\n * Find the position at which to insert a value in a sorted range. If the range\n * contains elements equal to the value the leftmost element index is returned\n * (for stability).\n *\n * @param {number} value - Value to insert.\n * @param {array} array - The array in which to insert value.\n * @param {number} start - First element in the range.\n * @param {number} length - Length of the range.\n * @param {number} hint - The index at which to begin the search.\n * @param {function} compare - Item comparison function.\n * @return {number} - The index where to insert value.\n */\nfunction gallopLeft(value, array, start, length, hint, compare) {\n let lastOffset = 0;\n let maxOffset = 0;\n let offset = 1;\n\n if (compare(value, array[start + hint]) > 0) {\n maxOffset = length - hint;\n\n while (offset < maxOffset && compare(value, array[start + hint + offset]) > 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n // Make offsets relative to start\n lastOffset += hint;\n offset += hint;\n\n // value <= array[start + hint]\n } else {\n maxOffset = hint + 1;\n while (offset < maxOffset && compare(value, array[start + hint - offset]) <= 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n // Make offsets relative to start\n let tmp = lastOffset;\n lastOffset = hint - offset;\n offset = hint - tmp;\n }\n\n /*\n * Now array[start+lastOffset] < value <= array[start+offset], so value\n * belongs somewhere in the range (start + lastOffset, start + offset]. Do a\n * binary search, with invariant array[start + lastOffset - 1] < value <=\n * array[start + offset].\n */\n lastOffset++;\n while (lastOffset < offset) {\n let m = lastOffset + ((offset - lastOffset) >>> 1);\n\n if (compare(value, array[start + m]) > 0) {\n lastOffset = m + 1;\n\n } else {\n offset = m;\n }\n }\n return offset;\n}\n\n/**\n * Find the position at which to insert a value in a sorted range. If the range\n * contains elements equal to the value the rightmost element index is returned\n * (for stability).\n *\n * @param {number} value - Value to insert.\n * @param {array} array - The array in which to insert value.\n * @param {number} start - First element in the range.\n * @param {number} length - Length of the range.\n * @param {number} hint - The index at which to begin the search.\n * @param {function} compare - Item comparison function.\n * @return {number} - The index where to insert value.\n */\nfunction gallopRight(value, array, start, length, hint, compare) {\n let lastOffset = 0;\n let maxOffset = 0;\n let offset = 1;\n\n if (compare(value, array[start + hint]) < 0) {\n maxOffset = hint + 1;\n\n while (offset < maxOffset && compare(value, array[start + hint - offset]) < 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n // Make offsets relative to start\n let tmp = lastOffset;\n lastOffset = hint - offset;\n offset = hint - tmp;\n\n // value >= array[start + hint]\n } else {\n maxOffset = length - hint;\n\n while (offset < maxOffset && compare(value, array[start + hint + offset]) >= 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n // Make offsets relative to start\n lastOffset += hint;\n offset += hint;\n }\n\n /*\n * Now array[start+lastOffset] < value <= array[start+offset], so value\n * belongs somewhere in the range (start + lastOffset, start + offset]. Do a\n * binary search, with invariant array[start + lastOffset - 1] < value <=\n * array[start + offset].\n */\n lastOffset++;\n\n while (lastOffset < offset) {\n let m = lastOffset + ((offset - lastOffset) >>> 1);\n\n if (compare(value, array[start + m]) < 0) {\n offset = m;\n\n } else {\n lastOffset = m + 1;\n }\n }\n\n return offset;\n}\n\nclass TimSort {\n\n constructor(array, compare) {\n this.array = array;\n this.compare = compare;\n this.minGallop = DEFAULT_MIN_GALLOPING;\n this.length = array.length;\n\n this.tmpStorageLength = DEFAULT_TMP_STORAGE_LENGTH;\n if (this.length < 2 * DEFAULT_TMP_STORAGE_LENGTH) {\n this.tmpStorageLength = this.length >>> 1;\n }\n\n this.tmp = new Array(this.tmpStorageLength);\n\n this.stackLength =\n (this.length < 120 ? 5 :\n this.length < 1542 ? 10 :\n this.length < 119151 ? 19 : 40);\n\n this.runStart = new Array(this.stackLength);\n this.runLength = new Array(this.stackLength);\n this.stackSize = 0;\n }\n\n /**\n * Push a new run on TimSort's stack.\n *\n * @param {number} runStart - Start index of the run in the original array.\n * @param {number} runLength - Length of the run;\n */\n pushRun(runStart, runLength) {\n this.runStart[this.stackSize] = runStart;\n this.runLength[this.stackSize] = runLength;\n this.stackSize += 1;\n }\n\n /**\n * Merge runs on TimSort's stack so that the following holds for all i:\n * 1) runLength[i - 3] > runLength[i - 2] + runLength[i - 1]\n * 2) runLength[i - 2] > runLength[i - 1]\n */\n mergeRuns() {\n while (this.stackSize > 1) {\n let n = this.stackSize - 2;\n\n if ((n >= 1 &&\n this.runLength[n - 1] <= this.runLength[n] + this.runLength[n + 1]) ||\n (n >= 2 &&\n this.runLength[n - 2] <= this.runLength[n] + this.runLength[n - 1])) {\n\n if (this.runLength[n - 1] < this.runLength[n + 1]) {\n n--;\n }\n\n } else if (this.runLength[n] > this.runLength[n + 1]) {\n break;\n }\n this.mergeAt(n);\n }\n }\n\n /**\n * Merge all runs on TimSort's stack until only one remains.\n */\n forceMergeRuns() {\n while (this.stackSize > 1) {\n let n = this.stackSize - 2;\n\n if (n > 0 && this.runLength[n - 1] < this.runLength[n + 1]) {\n n--;\n }\n\n this.mergeAt(n);\n }\n }\n\n /**\n * Merge the runs on the stack at positions i and i+1. Must be always be called\n * with i=stackSize-2 or i=stackSize-3 (that is, we merge on top of the stack).\n *\n * @param {number} i - Index of the run to merge in TimSort's stack.\n */\n mergeAt(i) {\n let compare = this.compare;\n let array = this.array;\n\n let start1 = this.runStart[i];\n let length1 = this.runLength[i];\n let start2 = this.runStart[i + 1];\n let length2 = this.runLength[i + 1];\n\n this.runLength[i] = length1 + length2;\n\n if (i === this.stackSize - 3) {\n this.runStart[i + 1] = this.runStart[i + 2];\n this.runLength[i + 1] = this.runLength[i + 2];\n }\n\n this.stackSize--;\n\n /*\n * Find where the first element in the second run goes in run1. Previous\n * elements in run1 are already in place\n */\n let k = gallopRight(array[start2], array, start1, length1, 0, compare);\n start1 += k;\n length1 -= k;\n\n if (length1 === 0) {\n return;\n }\n\n /*\n * Find where the last element in the first run goes in run2. Next elements\n * in run2 are already in place\n */\n length2 = gallopLeft(array[start1 + length1 - 1], array, start2, length2, length2 - 1, compare);\n\n if (length2 === 0) {\n return;\n }\n\n /*\n * Merge remaining runs. A tmp array with length = min(length1, length2) is\n * used\n */\n if (length1 <= length2) {\n this.mergeLow(start1, length1, start2, length2);\n\n } else {\n this.mergeHigh(start1, length1, start2, length2);\n }\n }\n\n /**\n * Merge two adjacent runs in a stable way. The runs must be such that the\n * first element of run1 is bigger than the first element in run2 and the\n * last element of run1 is greater than all the elements in run2.\n * The method should be called when run1.length <= run2.length as it uses\n * TimSort temporary array to store run1. Use mergeHigh if run1.length >\n * run2.length.\n *\n * @param {number} start1 - First element in run1.\n * @param {number} length1 - Length of run1.\n * @param {number} start2 - First element in run2.\n * @param {number} length2 - Length of run2.\n */\n mergeLow(start1, length1, start2, length2) {\n\n let compare = this.compare;\n let array = this.array;\n let tmp = this.tmp;\n let i = 0;\n\n for (i = 0; i < length1; i++) {\n tmp[i] = array[start1 + i];\n }\n\n let cursor1 = 0;\n let cursor2 = start2;\n let dest = start1;\n\n array[dest++] = array[cursor2++];\n\n if (--length2 === 0) {\n for (i = 0; i < length1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n return;\n }\n\n if (length1 === 1) {\n for (i = 0; i < length2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n array[dest + length2] = tmp[cursor1];\n return;\n }\n\n let minGallop = this.minGallop;\n\n while (true) {\n let count1 = 0;\n let count2 = 0;\n let exit = false;\n\n do {\n if (compare(array[cursor2], tmp[cursor1]) < 0) {\n array[dest++] = array[cursor2++];\n count2++;\n count1 = 0;\n\n if (--length2 === 0) {\n exit = true;\n break;\n }\n\n } else {\n array[dest++] = tmp[cursor1++];\n count1++;\n count2 = 0;\n if (--length1 === 1) {\n exit = true;\n break;\n }\n }\n } while ((count1 | count2) < minGallop);\n\n if (exit) {\n break;\n }\n\n do {\n count1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare);\n\n if (count1 !== 0) {\n for (i = 0; i < count1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n\n dest += count1;\n cursor1 += count1;\n length1 -= count1;\n if (length1 <= 1) {\n exit = true;\n break;\n }\n }\n\n array[dest++] = array[cursor2++];\n\n if (--length2 === 0) {\n exit = true;\n break;\n }\n\n count2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare);\n\n if (count2 !== 0) {\n for (i = 0; i < count2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n\n dest += count2;\n cursor2 += count2;\n length2 -= count2;\n\n if (length2 === 0) {\n exit = true;\n break;\n }\n }\n array[dest++] = tmp[cursor1++];\n\n if (--length1 === 1) {\n exit = true;\n break;\n }\n\n minGallop--;\n\n } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\n if (exit) {\n break;\n }\n\n if (minGallop < 0) {\n minGallop = 0;\n }\n\n minGallop += 2;\n }\n\n this.minGallop = minGallop;\n\n if (minGallop < 1) {\n this.minGallop = 1;\n }\n\n if (length1 === 1) {\n for (i = 0; i < length2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n array[dest + length2] = tmp[cursor1];\n\n } else if (length1 === 0) {\n throw new Error('mergeLow preconditions were not respected');\n\n } else {\n for (i = 0; i < length1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n }\n }\n\n /**\n * Merge two adjacent runs in a stable way. The runs must be such that the\n * first element of run1 is bigger than the first element in run2 and the\n * last element of run1 is greater than all the elements in run2.\n * The method should be called when run1.length > run2.length as it uses\n * TimSort temporary array to store run2. Use mergeLow if run1.length <=\n * run2.length.\n *\n * @param {number} start1 - First element in run1.\n * @param {number} length1 - Length of run1.\n * @param {number} start2 - First element in run2.\n * @param {number} length2 - Length of run2.\n */\n mergeHigh(start1, length1, start2, length2) {\n let compare = this.compare;\n let array = this.array;\n let tmp = this.tmp;\n let i = 0;\n\n for (i = 0; i < length2; i++) {\n tmp[i] = array[start2 + i];\n }\n\n let cursor1 = start1 + length1 - 1;\n let cursor2 = length2 - 1;\n let dest = start2 + length2 - 1;\n let customCursor = 0;\n let customDest = 0;\n\n array[dest--] = array[cursor1--];\n\n if (--length1 === 0) {\n customCursor = dest - (length2 - 1);\n\n for (i = 0; i < length2; i++) {\n array[customCursor + i] = tmp[i];\n }\n\n return;\n }\n\n if (length2 === 1) {\n dest -= length1;\n cursor1 -= length1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = length1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n array[dest] = tmp[cursor2];\n return;\n }\n\n let minGallop = this.minGallop;\n\n while (true) {\n let count1 = 0;\n let count2 = 0;\n let exit = false;\n\n do {\n if (compare(tmp[cursor2], array[cursor1]) < 0) {\n array[dest--] = array[cursor1--];\n count1++;\n count2 = 0;\n if (--length1 === 0) {\n exit = true;\n break;\n }\n\n } else {\n array[dest--] = tmp[cursor2--];\n count2++;\n count1 = 0;\n if (--length2 === 1) {\n exit = true;\n break;\n }\n }\n\n } while ((count1 | count2) < minGallop);\n\n if (exit) {\n break;\n }\n\n do {\n count1 = length1 - gallopRight(tmp[cursor2], array, start1, length1, length1 - 1, compare);\n\n if (count1 !== 0) {\n dest -= count1;\n cursor1 -= count1;\n length1 -= count1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = count1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n if (length1 === 0) {\n exit = true;\n break;\n }\n }\n\n array[dest--] = tmp[cursor2--];\n\n if (--length2 === 1) {\n exit = true;\n break;\n }\n\n count2 = length2 - gallopLeft(array[cursor1], tmp, 0, length2, length2 - 1, compare);\n\n if (count2 !== 0) {\n dest -= count2;\n cursor2 -= count2;\n length2 -= count2;\n customDest = dest + 1;\n customCursor = cursor2 + 1;\n\n for (i = 0; i < count2; i++) {\n array[customDest + i] = tmp[customCursor + i];\n }\n\n if (length2 <= 1) {\n exit = true;\n break;\n }\n }\n\n array[dest--] = array[cursor1--];\n\n if (--length1 === 0) {\n exit = true;\n break;\n }\n\n minGallop--;\n\n } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\n if (exit) {\n break;\n }\n\n if (minGallop < 0) {\n minGallop = 0;\n }\n\n minGallop += 2;\n }\n\n this.minGallop = minGallop;\n\n if (minGallop < 1) {\n this.minGallop = 1;\n }\n\n if (length2 === 1) {\n dest -= length1;\n cursor1 -= length1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = length1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n array[dest] = tmp[cursor2];\n\n } else if (length2 === 0) {\n throw new Error('mergeHigh preconditions were not respected');\n\n } else {\n customCursor = dest - (length2 - 1);\n for (i = 0; i < length2; i++) {\n array[customCursor + i] = tmp[i];\n }\n }\n }\n}\n\n/**\n * Sort an array in the range [lo, hi) using TimSort.\n *\n * @param {array} array - The array to sort.\n * @param {number} lo - First element in the range (inclusive).\n * @param {number} hi - Last element in the range.\n * @param {function=} compare - Item comparison function. Default is alphabetical.\n */\nexport default function (array, lo, hi, compare) {\n if (!Array.isArray(array)) {\n throw new TypeError('Can only sort arrays');\n }\n\n /*\n * Handle the case where a comparison function is not provided. We do\n * lexicographic sorting\n */\n\n if (lo === undefined) {\n lo = 0;\n }\n\n if (hi === undefined) {\n hi = array.length;\n }\n\n if (compare === undefined) {\n compare = alphabeticalCompare;\n }\n\n let remaining = hi - lo;\n\n // The array is already sorted\n if (remaining < 2) {\n return;\n }\n\n let runLength = 0;\n // On small arrays binary sort can be used directly\n if (remaining < DEFAULT_MIN_MERGE) {\n runLength = makeAscendingRun(array, lo, hi, compare);\n binaryInsertionSort(array, lo, hi, lo + runLength, compare);\n return;\n }\n\n let ts = new TimSort(array, compare);\n\n let minRun = minRunLength(remaining);\n\n do {\n runLength = makeAscendingRun(array, lo, hi, compare);\n if (runLength < minRun) {\n let force = remaining;\n if (force > minRun) {\n force = minRun;\n }\n\n binaryInsertionSort(array, lo, lo + force, lo + runLength, compare);\n runLength = force;\n }\n // Push new run and merge if necessary\n ts.pushRun(lo, runLength);\n ts.mergeRuns();\n\n // Go find next run\n remaining -= runLength;\n lo += runLength;\n\n } while (remaining !== 0);\n\n // Force merging of remaining runs\n ts.forceMergeRuns();\n}","let _bufferPools = Array(8);\nfor (let i = 0; i < 8; ++i) {\n _bufferPools[i] = [];\n}\n\nfunction _nextPow16(v) {\n for (let i = 16; i <= (1 << 28); i *= 16) {\n if (v <= i) {\n return i;\n }\n }\n return 0;\n}\n\nfunction _log2(v) {\n let r, shift;\n r = (v > 0xFFFF) << 4; v >>>= r;\n shift = (v > 0xFF) << 3; v >>>= shift; r |= shift;\n shift = (v > 0xF) << 2; v >>>= shift; r |= shift;\n shift = (v > 0x3) << 1; v >>>= shift; r |= shift;\n return r | (v >> 1);\n}\n\nfunction _alloc(n) {\n let sz = _nextPow16(n);\n let bin = _bufferPools[_log2(sz) >> 2];\n if (bin.length > 0) {\n return bin.pop();\n }\n return new ArrayBuffer(sz);\n}\n\nfunction _free(buf) {\n _bufferPools[_log2(buf.byteLength) >> 2].push(buf);\n}\n\nexport default {\n alloc_int8(n) {\n let result = new Int8Array(_alloc(n), 0, n);\n if (result.length !== n) {\n return result.subarray(0, n);\n }\n\n return result;\n },\n\n alloc_uint8(n) {\n let result = new Uint8Array(_alloc(n), 0, n);\n if (result.length !== n) {\n return result.subarray(0, n);\n }\n\n return result;\n },\n\n alloc_int16(n) {\n let result = new Int16Array(_alloc(2 * n), 0, n);\n if (result.length !== n) {\n return result.subarray(0, n);\n }\n\n return result;\n },\n\n alloc_uint16(n) {\n let result = new Uint16Array(_alloc(2 * n), 0, n);\n if (result.length !== n) {\n return result.subarray(0, n);\n }\n\n return result;\n },\n\n alloc_int32(n) {\n let result = new Int32Array(_alloc(4 * n), 0, n);\n if (result.length !== n) {\n return result.subarray(0, n);\n }\n\n return result;\n },\n\n alloc_uint32(n) {\n let result = new Uint32Array(_alloc(4 * n), 0, n);\n if (result.length !== n) {\n return result.subarray(0, n);\n }\n\n return result;\n },\n\n alloc_float32(n) {\n let result = new Float32Array(_alloc(4 * n), 0, n);\n if (result.length !== n) {\n return result.subarray(0, n);\n }\n\n return result;\n },\n\n alloc_float64(n) {\n let result = new Float64Array(_alloc(8 * n), 0, n);\n if (result.length !== n) {\n return result.subarray(0, n);\n }\n\n return result;\n },\n\n alloc_dataview(n) {\n let result = new DataView(_alloc(n), 0, n);\n if (result.length !== n) {\n return result.subarray(0, n);\n }\n\n return result;\n },\n\n free(array) {\n _free(array.buffer);\n },\n\n reset() {\n let _bufferPools = Array(8);\n for (let i = 0; i < 8; ++i) {\n _bufferPools[i] = [];\n }\n },\n};","/**\n * JS Implementation of MurmurHash2\n * \n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:aappleby@gmail.com\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n * \n * @param {string} str ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n\nexport default function murmurhash2_32_gc(str, seed) {\n var\n l = str.length,\n h = seed ^ l,\n i = 0,\n k;\n \n while (l >= 4) {\n \tk = \n \t ((str.charCodeAt(i) & 0xff)) |\n \t ((str.charCodeAt(++i) & 0xff) << 8) |\n \t ((str.charCodeAt(++i) & 0xff) << 16) |\n \t ((str.charCodeAt(++i) & 0xff) << 24);\n \n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n k ^= k >>> 24;\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n\n\th = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)) ^ k;\n\n l -= 4;\n ++i;\n }\n \n switch (l) {\n case 3: h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n case 2: h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n case 1: h ^= (str.charCodeAt(i) & 0xff);\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n }\n\n h ^= h >>> 13;\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n h ^= h >>> 15;\n\n return h >>> 0;\n}","// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\nimport { Vec3, Vec4, Mat4 } from '../../core/value-types';\nimport BaseRenderer from '../core/base-renderer';\nimport enums from '../enums';\nimport { RecyclePool } from '../memop';\n\nlet _a16_view = new Float32Array(16);\nlet _a16_view_inv = new Float32Array(16);\nlet _a16_proj = new Float32Array(16);\nlet _a16_viewProj = new Float32Array(16);\nlet _a4_camPos = new Float32Array(4);\n\nlet _a64_shadow_lightViewProj = new Float32Array(64);\nlet _a16_shadow_lightViewProjs = [];\nlet _a4_shadow_info = new Float32Array(4);\n\nlet _camPos = new Vec4(0, 0, 0, 0);\nlet _camFwd = new Vec3(0, 0, 0);\nlet _v3_tmp1 = new Vec3(0, 0, 0);\n\nconst CC_MAX_LIGHTS = 4;\nconst CC_MAX_SHADOW_LIGHTS = 2;\n\nlet _float16_pool = new RecyclePool(() => {\n return new Float32Array(16);\n}, 8);\n\nfunction sortView (a, b) {\n return (a._priority - b._priority);\n}\n\nexport default class ForwardRenderer extends BaseRenderer {\n constructor(device, builtin) {\n super(device, builtin);\n\n this._time = new Float32Array(4);\n\n this._lights = [];\n this._shadowLights = [];\n\n this._numLights = 0;\n\n this._defines = {\n };\n\n this._registerStage('shadowcast', this._shadowStage.bind(this));\n this._registerStage('opaque', this._opaqueStage.bind(this));\n this._registerStage('transparent', this._transparentStage.bind(this));\n }\n\n reset () {\n _float16_pool.reset();\n super.reset();\n }\n\n render (scene, dt) {\n this.reset();\n\n if (!CC_EDITOR) {\n if (dt) {\n this._time[0] += dt;\n this._time[1] = dt;\n this._time[2] ++;\n }\n this._device.setUniform('cc_time', this._time);\n }\n\n this._updateLights(scene);\n\n const canvas = this._device._gl.canvas;\n for (let i = 0; i < scene._cameras.length; ++i) {\n let view = this._requestView();\n let width = canvas.width;\n let height = canvas.height;\n let camera = scene._cameras.data[i];\n camera.extractView(view, width, height);\n }\n\n // render by cameras\n this._viewPools.sort(sortView);\n\n for (let i = 0; i < this._viewPools.length; ++i) {\n let view = this._viewPools.data[i];\n this._render(view, scene);\n }\n }\n\n // direct render a single camera\n renderCamera (camera, scene) {\n this.reset();\n\n this._updateLights(scene);\n\n const canvas = this._device._gl.canvas;\n let width = canvas.width;\n let height = canvas.height;\n\n let view = this._requestView();\n camera.extractView(view, width, height);\n\n // render by cameras\n this._viewPools.sort(sortView);\n\n for (let i = 0; i < this._viewPools.length; ++i) {\n let view = this._viewPools.data[i];\n this._render(view, scene);\n }\n }\n\n _updateLights (scene) {\n this._lights.length = 0;\n this._shadowLights.length = 0;\n\n let lights = scene._lights;\n for (let i = 0; i < lights.length; ++i) {\n let light = lights.data[i];\n light.update(this._device);\n\n if (light.shadowType !== enums.SHADOW_NONE) {\n if (this._shadowLights.length < CC_MAX_SHADOW_LIGHTS) {\n this._shadowLights.unshift(light);\n }\n let view = this._requestView();\n light.extractView(view, ['shadowcast']);\n\n this._lights.splice(0, 0, light);\n }\n else {\n this._lights.push(light);\n }\n }\n\n this._updateLightDefines();\n this._numLights = lights._count;\n }\n\n _updateLightDefines () {\n let defines = this._defines;\n\n for (let i = 0; i < this._lights.length; ++i) {\n let light = this._lights[i];\n let lightKey = `CC_LIGHT_${i}_TYPE`;\n let shadowKey = `CC_SHADOW_${i}_TYPE`;\n if (defines[lightKey] !== light._type){\n defines[lightKey] = light._type;\n this._definesChanged = true;\n }\n if (defines[shadowKey] !== light._shadowType){\n defines[shadowKey] = light._shadowType;\n this._definesChanged = true;\n }\n }\n\n let newCount = Math.min(CC_MAX_LIGHTS, this._lights.length);\n if (defines.CC_NUM_LIGHTS !== newCount) {\n defines.CC_NUM_LIGHTS = newCount;\n this._definesChanged = true;\n }\n newCount = Math.min(CC_MAX_LIGHTS, this._shadowLights.length);\n if (defines.CC_NUM_SHADOW_LIGHTS !== newCount) {\n defines.CC_NUM_SHADOW_LIGHTS = newCount;\n this._definesChanged = true;\n }\n }\n\n _submitLightsUniforms () {\n let device = this._device;\n\n if (this._lights.length > 0) {\n let positionAndRanges = _float16_pool.add();\n let directions = _float16_pool.add();\n let colors = _float16_pool.add();\n let lightNum = Math.min(CC_MAX_LIGHTS, this._lights.length);\n for (let i = 0; i < lightNum; ++i) {\n let light = this._lights[i];\n let index = i * 4;\n\n colors.set(light._colorUniform, index);\n directions.set(light._directionUniform, index);\n positionAndRanges.set(light._positionUniform, index);\n positionAndRanges[index+3] = light._range;\n\n if (light._type === enums.LIGHT_SPOT) {\n directions[index+3] = light._spotUniform[0];\n colors[index+3] = light._spotUniform[1];\n }\n else {\n directions[index+3] = 0;\n colors[index+3] = 0;\n }\n }\n\n device.setUniform('cc_lightDirection', directions);\n device.setUniform('cc_lightColor', colors);\n device.setUniform('cc_lightPositionAndRange', positionAndRanges);\n }\n }\n\n _submitShadowStageUniforms(view) {\n\n let light = view._shadowLight;\n\n let shadowInfo = _a4_shadow_info;\n shadowInfo[0] = light.shadowMinDepth;\n shadowInfo[1] = light.shadowMaxDepth;\n shadowInfo[2] = light.shadowDepthScale;\n shadowInfo[3] = light.shadowDarkness;\n\n this._device.setUniform('cc_shadow_map_lightViewProjMatrix', Mat4.toArray(_a16_viewProj, view._matViewProj));\n this._device.setUniform('cc_shadow_map_info', shadowInfo);\n this._device.setUniform('cc_shadow_map_bias', light.shadowBias);\n\n this._defines.CC_SHADOW_TYPE = light._shadowType;\n }\n\n _submitOtherStagesUniforms() {\n let shadowInfo = _float16_pool.add();\n\n for (let i = 0; i < this._shadowLights.length; ++i) {\n let light = this._shadowLights[i];\n let view = _a16_shadow_lightViewProjs[i];\n if (!view) {\n view = _a16_shadow_lightViewProjs[i] = new Float32Array(_a64_shadow_lightViewProj.buffer, i * 64, 16);\n }\n Mat4.toArray(view, light.viewProjMatrix);\n\n let index = i*4;\n shadowInfo[index] = light.shadowMinDepth;\n shadowInfo[index+1] = light.shadowMaxDepth;\n shadowInfo[index+2] = light._shadowResolution;\n shadowInfo[index+3] = light.shadowDarkness;\n }\n\n this._device.setUniform(`cc_shadow_lightViewProjMatrix`, _a64_shadow_lightViewProj);\n this._device.setUniform(`cc_shadow_info`, shadowInfo);\n // this._device.setUniform(`cc_frustumEdgeFalloff_${index}`, light.frustumEdgeFalloff);\n }\n\n _sortItems (items) {\n // sort items\n items.sort((a, b) => {\n // if (a.layer !== b.layer) {\n // return a.layer - b.layer;\n // }\n\n if (a.passes.length !== b.passes.length) {\n return a.passes.length - b.passes.length;\n }\n\n return a.sortKey - b.sortKey;\n });\n }\n\n _shadowStage (view, items) {\n // update rendering\n this._submitShadowStageUniforms(view);\n\n // this._sortItems(items);\n\n // draw it\n for (let i = 0; i < items.length; ++i) {\n let item = items.data[i];\n if (item.effect.getDefine('CC_CASTING_SHADOW')) {\n this._draw(item);\n }\n }\n }\n\n _drawItems (view, items) {\n let shadowLights = this._shadowLights;\n if (shadowLights.length === 0 && this._numLights === 0) {\n for (let i = 0; i < items.length; ++i) {\n let item = items.data[i];\n this._draw(item);\n }\n }\n else {\n for (let i = 0; i < items.length; ++i) {\n let item = items.data[i];\n\n for (let shadowIdx = 0; shadowIdx < shadowLights.length; ++shadowIdx) {\n this._device.setTexture('cc_shadow_map_'+shadowIdx, shadowLights[shadowIdx].shadowMap, this._allocTextureUnit());\n }\n\n this._draw(item);\n }\n }\n }\n\n _opaqueStage (view, items) {\n view.getPosition(_camPos);\n\n // update uniforms\n this._device.setUniform('cc_matView', Mat4.toArray(_a16_view, view._matView));\n this._device.setUniform('cc_matViewInv', Mat4.toArray(_a16_view_inv, view._matViewInv));\n this._device.setUniform('cc_matProj', Mat4.toArray(_a16_proj, view._matProj));\n this._device.setUniform('cc_matViewProj', Mat4.toArray(_a16_viewProj, view._matViewProj));\n this._device.setUniform('cc_cameraPos', Vec4.toArray(_a4_camPos, _camPos));\n\n // update rendering\n this._submitLightsUniforms();\n this._submitOtherStagesUniforms();\n\n this._drawItems(view, items);\n }\n\n _transparentStage (view, items) {\n view.getPosition(_camPos);\n view.getForward(_camFwd);\n\n // update uniforms\n this._device.setUniform('cc_matView', Mat4.toArray(_a16_view, view._matView));\n this._device.setUniform('cc_matViewInv', Mat4.toArray(_a16_view_inv, view._matViewInv));\n this._device.setUniform('cc_matProj', Mat4.toArray(_a16_proj, view._matProj));\n this._device.setUniform('cc_matViewProj', Mat4.toArray(_a16_viewProj, view._matViewProj));\n this._device.setUniform('cc_cameraPos', Vec4.toArray(_a4_camPos, _camPos));\n\n this._submitLightsUniforms();\n this._submitOtherStagesUniforms();\n\n // calculate zdist\n for (let i = 0; i < items.length; ++i) {\n let item = items.data[i];\n\n // TODO: we should use mesh center instead!\n item.node.getWorldPosition(_v3_tmp1);\n\n Vec3.sub(_v3_tmp1, _v3_tmp1, _camPos);\n item.sortKey = -Vec3.dot(_v3_tmp1, _camFwd);\n }\n\n this._sortItems(items);\n this._drawItems(view, items);\n }\n}\n","// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\nimport { Vec3, Mat4, lerp, Vec4 } from '../../core/value-types';\nimport { Ray } from '../../core/geom-utils';\nimport enums from '../enums';\n\nlet _tmp_mat4 = new Mat4();\n\nlet _matView = new Mat4();\nlet _matViewInv = new Mat4();\nlet _matProj = new Mat4();\nlet _matViewProj = new Mat4();\nlet _matInvViewProj = new Mat4();\nlet _tmp_v3 = new Vec3();\nlet _tmp2_v3 = new Vec3();\n\n/**\n * A representation of a camera instance\n */\nexport default class Camera {\n _poolID = -1;\n _node = null;\n _projection = enums.PROJ_PERSPECTIVE;\n\n // priority. the smaller one will be rendered first\n _priority = 0;\n\n // clear options\n _color = new Vec4(0.2, 0.3, 0.47, 1);\n _depth = 1;\n _stencil = 0;\n _clearFlags = enums.CLEAR_COLOR | enums.CLEAR_DEPTH;\n _clearModel = null;\n\n // stages & framebuffer\n _stages = [];\n _framebuffer = null;\n\n // projection properties\n _near = 0.01;\n _far = 1000.0;\n _fov = Math.PI / 4.0; // vertical fov\n _rect = {\n x: 0, y: 0, w: 1, h: 1\n };\n\n // ortho properties\n _orthoHeight = 10;\n\n _cullingMask = 0xffffffff;\n\n\n // culling mask\n get cullingMask () {\n return this._cullingMask;\n }\n\n set cullingMask (mask) {\n this._cullingMask = mask;\n }\n\n setCullingMask (mask) {\n this._cullingMask = mask;\n }\n\n /**\n * Get the hosting node of this camera\n * @returns {Node} the hosting node\n */\n getNode () {\n return this._node;\n }\n\n /**\n * Set the hosting node of this camera\n * @param {Node} node the hosting node\n */\n setNode (node) {\n this._node = node;\n }\n\n /**\n * Get the projection type of the camera\n * @returns {number} camera projection type\n */\n getType () {\n return this._projection;\n }\n\n /**\n * Set the projection type of the camera\n * @param {number} type camera projection type\n */\n setType (type) {\n this._projection = type;\n }\n\n /**\n * Get the priority of the camera\n * @returns {number} camera priority\n */\n getPriority () {\n return this._priority;\n }\n\n /**\n * Set the priority of the camera\n * @param {number} priority camera priority\n */\n setPriority (priority) {\n this._priority = priority;\n }\n\n /**\n * Get the orthogonal height of the camera\n * @returns {number} camera height\n */\n getOrthoHeight () {\n return this._orthoHeight;\n }\n\n /**\n * Set the orthogonal height of the camera\n * @param {number} val camera height\n */\n setOrthoHeight (val) {\n this._orthoHeight = val;\n }\n\n /**\n * Get the field of view of the camera\n * @returns {number} camera field of view\n */\n getFov () {\n return this._fov;\n }\n\n /**\n * Set the field of view of the camera\n * @param {number} fov camera field of view\n */\n setFov (fov) {\n this._fov = fov;\n }\n\n /**\n * Get the near clipping distance of the camera\n * @returns {number} camera near clipping distance\n */\n getNear () {\n return this._near;\n }\n\n /**\n * Set the near clipping distance of the camera\n * @param {number} near camera near clipping distance\n */\n setNear (near) {\n this._near = near;\n }\n\n /**\n * Get the far clipping distance of the camera\n * @returns {number} camera far clipping distance\n */\n getFar () {\n return this._far;\n }\n\n /**\n * Set the far clipping distance of the camera\n * @param {number} far camera far clipping distance\n */\n setFar (far) {\n this._far = far;\n }\n\n /**\n * Get the clear color of the camera\n * @returns {Vec4} out the receiving color vector\n */\n getColor (out) {\n return Vec4.copy(out, this._color);\n }\n\n /**\n * Set the clear color of the camera\n * @param {number} r red channel of camera clear color\n * @param {number} g green channel of camera clear color\n * @param {number} b blue channel of camera clear color\n * @param {number} a alpha channel of camera clear color\n */\n setColor (r, g, b, a) {\n Vec4.set(this._color, r, g, b, a);\n }\n\n /**\n * Get the clear depth of the camera\n * @returns {number} camera clear depth\n */\n getDepth () {\n return this._depth;\n }\n\n /**\n * Set the clear depth of the camera\n * @param {number} depth camera clear depth\n */\n setDepth (depth) {\n this._depth = depth;\n }\n\n /**\n * Get the clearing stencil value of the camera\n * @returns {number} camera clearing stencil value\n */\n getStencil () {\n return this._stencil;\n }\n\n /**\n * Set the clearing stencil value of the camera\n * @param {number} stencil camera clearing stencil value\n */\n setStencil (stencil) {\n this._stencil = stencil;\n }\n\n /**\n * Get the clearing flags of the camera\n * @returns {number} camera clearing flags\n */\n getClearFlags () {\n return this._clearFlags;\n }\n\n /**\n * Set the clearing flags of the camera\n * @param {number} flags camera clearing flags\n */\n setClearFlags (flags) {\n this._clearFlags = flags;\n }\n\n /**\n * Get the rect of the camera\n * @param {Object} out the receiving object\n * @returns {Object} camera rect\n */\n getRect (out) {\n out.x = this._rect.x;\n out.y = this._rect.y;\n out.w = this._rect.w;\n out.h = this._rect.h;\n\n return out;\n }\n\n /**\n * Set the rect of the camera\n * @param {Number} x - [0,1]\n * @param {Number} y - [0,1]\n * @param {Number} w - [0,1]\n * @param {Number} h - [0,1]\n */\n setRect (x, y, w, h) {\n this._rect.x = x;\n this._rect.y = y;\n this._rect.w = w;\n this._rect.h = h;\n }\n\n /**\n * Get the stages of the camera\n * @returns {string[]} camera stages\n */\n getStages () {\n return this._stages;\n }\n\n /**\n * Set the stages of the camera\n * @param {string[]} stages camera stages\n */\n setStages (stages) {\n this._stages = stages;\n }\n\n /**\n * Get the framebuffer of the camera\n * @returns {FrameBuffer} camera framebuffer\n */\n getFramebuffer () {\n return this._framebuffer;\n }\n\n /**\n * Set the framebuffer of the camera\n * @param {FrameBuffer} framebuffer camera framebuffer\n */\n setFrameBuffer (framebuffer) {\n this._framebuffer = framebuffer;\n }\n\n _calcMatrices (width, height) {\n // view matrix\n this._node.getWorldRT(_matViewInv);\n Mat4.invert(_matView, _matViewInv);\n\n // projection matrix\n let aspect = width / height;\n if (this._projection === enums.PROJ_PERSPECTIVE) {\n Mat4.perspective(_matProj,\n this._fov,\n aspect,\n this._near,\n this._far\n );\n } else {\n let x = this._orthoHeight * aspect;\n let y = this._orthoHeight;\n Mat4.ortho(_matProj,\n -x, x, -y, y, this._near, this._far\n );\n }\n\n // view-projection\n Mat4.mul(_matViewProj, _matProj, _matView);\n // inv view-projection\n Mat4.invert(_matInvViewProj, _matViewProj);\n }\n\n /**\n * extract a view of this camera\n * @param {View} out the receiving view\n * @param {number} width framebuffer width\n * @param {number} height framebuffer height\n */\n extractView (out, width, height) {\n if (this._framebuffer) {\n width = this._framebuffer._width;\n height = this._framebuffer._height;\n }\n\n // priority\n out._priority = this._priority;\n\n // rect\n out._rect.x = this._rect.x * width;\n out._rect.y = this._rect.y * height;\n out._rect.w = this._rect.w * width;\n out._rect.h = this._rect.h * height;\n\n // clear opts\n this.getColor(out._color);\n out._depth = this._depth;\n out._stencil = this._stencil;\n out._clearFlags = this._clearFlags;\n out._clearModel = this._clearModel;\n\n // stages & framebuffer\n out._stages = this._stages;\n out._framebuffer = this._framebuffer;\n\n this._calcMatrices(width, height);\n Mat4.copy(out._matView, _matView);\n Mat4.copy(out._matViewInv, _matViewInv);\n Mat4.copy(out._matProj, _matProj);\n Mat4.copy(out._matViewProj, _matViewProj);\n Mat4.copy(out._matInvViewProj, _matInvViewProj);\n\n out._cullingMask = this._cullingMask;\n }\n\n /**\n * transform a screen position to a world space ray\n * @param {number} x the screen x position to be transformed\n * @param {number} y the screen y position to be transformed\n * @param {number} width framebuffer width\n * @param {number} height framebuffer height\n * @param {Ray} out the resulting ray\n * @returns {Ray} the resulting ray\n */\n screenPointToRay (x, y, width, height, out) {\n if (!cc.geomUtils) return out;\n\n out = out || new Ray();\n this._calcMatrices(width, height);\n\n let cx = this._rect.x * width;\n let cy = this._rect.y * height;\n let cw = this._rect.w * width;\n let ch = this._rect.h * height;\n\n // far plane intersection\n Vec3.set(_tmp2_v3, (x - cx) / cw * 2 - 1, (y - cy) / ch * 2 - 1, 1);\n Vec3.transformMat4(_tmp2_v3, _tmp2_v3, _matInvViewProj);\n\n if (this._projection === enums.PROJ_PERSPECTIVE) {\n // camera origin\n this._node.getWorldPosition(_tmp_v3);\n } else {\n // near plane intersection\n Vec3.set(_tmp_v3, (x - cx) / cw * 2 - 1, (y - cy) / ch * 2 - 1, -1);\n Vec3.transformMat4(_tmp_v3, _tmp_v3, _matInvViewProj);\n }\n\n return Ray.fromPoints(out, _tmp_v3, _tmp2_v3);\n }\n\n /**\n * transform a screen position to world space\n * @param {Vec3} out the resulting vector\n * @param {Vec3} screenPos the screen position to be transformed\n * @param {number} width framebuffer width\n * @param {number} height framebuffer height\n * @returns {Vec3} the resulting vector\n */\n screenToWorld (out, screenPos, width, height) {\n this._calcMatrices(width, height);\n\n let cx = this._rect.x * width;\n let cy = this._rect.y * height;\n let cw = this._rect.w * width;\n let ch = this._rect.h * height;\n\n if (this._projection === enums.PROJ_PERSPECTIVE) {\n // calculate screen pos in far clip plane\n Vec3.set(out,\n (screenPos.x - cx) / cw * 2 - 1,\n (screenPos.y - cy) / ch * 2 - 1,\n 0.9999\n );\n\n // transform to world\n Vec3.transformMat4(out, out, _matInvViewProj);\n\n // lerp to depth z\n this._node.getWorldPosition(_tmp_v3);\n\n Vec3.lerp(out, _tmp_v3, out, lerp(this._near / this._far, 1, screenPos.z));\n } else {\n Vec3.set(out,\n (screenPos.x - cx) / cw * 2 - 1,\n (screenPos.y - cy) / ch * 2 - 1,\n screenPos.z * 2 - 1\n );\n\n // transform to world\n Vec3.transformMat4(out, out, _matInvViewProj);\n }\n\n return out;\n }\n\n /**\n * transform a world space position to screen space\n * @param {Vec3} out the resulting vector\n * @param {Vec3} worldPos the world space position to be transformed\n * @param {number} width framebuffer width\n * @param {number} height framebuffer height\n * @returns {Vec3} the resulting vector\n */\n worldToScreen (out, worldPos, width, height) {\n this._calcMatrices(width, height);\n\n let cx = this._rect.x * width;\n let cy = this._rect.y * height;\n let cw = this._rect.w * width;\n let ch = this._rect.h * height;\n\n Vec3.transformMat4(out, worldPos, _matViewProj);\n out.x = cx + (out.x + 1) * 0.5 * cw;\n out.y = cy + (out.y + 1) * 0.5 * ch;\n out.z = out.z * 0.5 + 0.5;\n\n return out;\n }\n\n /**\n * transform a world space matrix to screen space\n * @param {Mat4} out the resulting vector\n * @param {Mat4} worldMatrix the world space matrix to be transformed\n * @param {number} width framebuffer width\n * @param {number} height framebuffer height\n * @returns {Mat4} the resulting vector\n */\n worldMatrixToScreen (out, worldMatrix, width, height) {\n this._calcMatrices(width, height);\n\n Mat4.mul(out, _matViewProj, worldMatrix);\n\n let halfWidth = width / 2;\n let halfHeight = height / 2;\n Mat4.identity(_tmp_mat4);\n Mat4.transform(_tmp_mat4, _tmp_mat4, Vec3.set(_tmp_v3, halfWidth, halfHeight, 0));\n Mat4.scale(_tmp_mat4, _tmp_mat4, Vec3.set(_tmp_v3, halfWidth, halfHeight, 1));\n\n Mat4.mul(out, _tmp_mat4, out);\n\n return out;\n }\n}\n","// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n/**\n * A representation of a model\n */\nexport default class Model {\n /**\n * Setup a default empty model\n */\n constructor() {\n this._type = 'default';\n this._poolID = -1;\n this._node = null;\n this._inputAssembler = null;\n this._effect = null;\n this._viewID = -1;\n this._cameraID = -1;\n this._userKey = -1;\n this._castShadow = false;\n this._boundingShape = null;\n }\n\n /**\n * Set the hosting node of this model\n * @param {Node} node the hosting node\n */\n setNode(node) {\n this._node = node;\n }\n\n /**\n * Set the input assembler\n * @param {InputAssembler} ia\n */\n setInputAssembler(ia) {\n this._inputAssembler = ia;\n }\n\n /**\n * Set the model effect\n * @param {?Effect} effect the effect to use\n */\n setEffect(effect) {\n this._effect = effect;\n }\n\n /**\n * Set the user key\n * @param {number} key\n */\n setUserKey(key) {\n this._userKey = key;\n }\n\n /**\n * Extract a drawing item\n * @param {Object} out the receiving item\n */\n extractDrawItem(out) {\n out.model = this;\n out.node = this._node;\n out.ia = this._inputAssembler;\n out.effect = this._effect;\n }\n}\n","// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\nimport { FixedArray } from '../memop';\n\n/**\n * A representation of the scene\n */\nclass Scene {\n /**\n * Setup a default empty scene\n */\n constructor(app) {\n this._lights = new FixedArray(16);\n this._models = new FixedArray(16);\n this._cameras = new FixedArray(16);\n this._debugCamera = null;\n this._app = app;\n\n // NOTE: we don't use pool for views (because it's less changed and it doesn't have poolID)\n this._views = [];\n }\n\n _add(pool, item) {\n if (item._poolID !== -1) {\n return;\n }\n\n pool.push(item);\n item._poolID = pool.length - 1;\n }\n\n _remove(pool, item) {\n if (item._poolID === -1) {\n return;\n }\n\n pool.data[pool.length-1]._poolID = item._poolID;\n pool.fastRemove(item._poolID);\n item._poolID = -1;\n }\n\n /**\n * reset the model viewIDs\n */\n reset() {\n for (let i = 0; i < this._models.length; ++i) {\n let model = this._models.data[i];\n model._viewID = -1;\n }\n }\n\n /**\n * Set the debug camera\n * @param {Camera} cam the debug camera\n */\n setDebugCamera(cam) {\n this._debugCamera = cam;\n }\n\n /**\n * Get the count of registered cameras\n * @returns {number} camera count\n */\n getCameraCount() {\n return this._cameras.length;\n }\n\n /**\n * Get the specified camera\n * @param {number} idx camera index\n * @returns {Camera} the specified camera\n */\n getCamera(idx) {\n return this._cameras.data[idx];\n }\n\n /**\n * register a camera\n * @param {Camera} camera the new camera\n */\n addCamera(camera) {\n this._add(this._cameras, camera);\n }\n\n /**\n * remove a camera\n * @param {Camera} camera the camera to be removed\n */\n removeCamera(camera) {\n this._remove(this._cameras, camera);\n }\n\n /**\n * Get the count of registered model\n * @returns {number} model count\n */\n getModelCount() {\n return this._models.length;\n }\n\n /**\n * Get the specified model\n * @param {number} idx model index\n * @returns {Model} the specified model\n */\n getModel(idx) {\n return this._models.data[idx];\n }\n\n /**\n * register a model\n * @param {Model} model the new model\n */\n addModel(model) {\n this._add(this._models, model);\n }\n\n /**\n * remove a model\n * @param {Model} model the model to be removed\n */\n removeModel(model) {\n this._remove(this._models, model);\n }\n\n /**\n * Get the count of registered light\n * @returns {number} light count\n */\n getLightCount() {\n return this._lights.length;\n }\n\n /**\n * Get the specified light\n * @param {number} idx light index\n * @returns {Light} the specified light\n */\n getLight(idx) {\n return this._lights.data[idx];\n }\n\n /**\n * register a light\n * @param {Light} light the new light\n */\n addLight(light) {\n this._add(this._lights, light);\n }\n\n /**\n * remove a light\n * @param {Light} light the light to be removed\n */\n removeLight(light) {\n this._remove(this._lights, light);\n }\n\n /**\n * register a view\n * @param {View} view the new view\n */\n addView(view) {\n if (this._views.indexOf(view) === -1) {\n this._views.push(view);\n }\n }\n\n /**\n * remove a view\n * @param {View} view the view to be removed\n */\n removeView(view) {\n let idx = this._views.indexOf(view);\n if (idx !== -1) {\n this._views.splice(idx, 1);\n }\n }\n}\n\nexport default Scene;\n","import enums from './enums';\nimport { Vec2, Vec3, Vec4, Color, Mat4 } from '../core/value-types';\nimport Texture2D from '../core/assets/CCTexture2D';\n\nlet gfxTexture2D = null, gfxTextureCube = null;\nif (CC_JSB && CC_NATIVERENDERER) {\n gfxTexture2D = gfx.Texture2D;\n} else {\n gfxTexture2D = require('./gfx/texture-2d');\n}\n\nconst CCObject = cc.Object;\n\nlet ctor2default = {\n [Boolean]: v => v || false,\n [Number]: v => v ? (ArrayBuffer.isView(v) ? v[0] : v) : 0,\n [Vec2]: v => v ? cc.v2(v[0], v[1]) : cc.v2(),\n [Vec3]: v => v ? cc.v3(v[0], v[1], v[2]) : cc.v3(),\n [Vec4]: v => v ? cc.v4(v[0], v[1], v[2], v[3]) : cc.v4(),\n [Color]: v => v ? cc.color(v[0] * 255, v[1] * 255, v[2] * 255,\n (v[3] || 1) * 255) : cc.color(),\n [Mat4]: v => v ? cc.mat4(\n v[0], v[1], v[2], v[3],\n v[4], v[5], v[6], v[7],\n v[8], v[9], v[10], v[11],\n v[12], v[13], v[14], v[15],\n ) : cc.mat4(),\n [Texture2D]: () => null,\n [CCObject]: () => null\n};\n\n\nlet enums2ctor = {\n [enums.PARAM_INT]: Number,\n [enums.PARAM_INT2]: Vec2,\n [enums.PARAM_INT3]: Vec3,\n [enums.PARAM_INT4]: Vec4,\n [enums.PARAM_FLOAT]: Number,\n [enums.PARAM_FLOAT2]: Vec2,\n [enums.PARAM_FLOAT3]: Vec3,\n [enums.PARAM_FLOAT4]: Vec4,\n [enums.PARAM_MAT4]: Mat4,\n [enums.PARAM_TEXTURE_2D]: Texture2D,\n \n color: Color,\n number: Number,\n boolean: Boolean,\n default: CCObject\n};\n\nexport let ctor2enums = {\n [Number]: enums.PARAM_FLOAT,\n [Vec2]: enums.PARAM_FLOAT2,\n [Vec3]: enums.PARAM_FLOAT3,\n [Vec4]: enums.PARAM_FLOAT4,\n [Color]: enums.PARAM_COLOR3,\n [Color]: enums.PARAM_COLOR4,\n [Mat4]: enums.PARAM_MAT4,\n [Texture2D]: enums.PARAM_TEXTURE_2D,\n [gfxTexture2D]: enums.PARAM_TEXTURE_2D,\n};\n\nexport let enums2default = {\n [enums.PARAM_INT]: new Uint32Array([0]),\n [enums.PARAM_INT2]: new Uint32Array([0, 0]),\n [enums.PARAM_INT3]: new Uint32Array([0, 0, 0]),\n [enums.PARAM_INT4]: new Uint32Array([0, 0, 0, 0]),\n [enums.PARAM_FLOAT]: new Float32Array([0]),\n [enums.PARAM_FLOAT2]: new Float32Array([0, 0]),\n [enums.PARAM_FLOAT3]: new Float32Array([0, 0, 0]),\n [enums.PARAM_FLOAT4]: new Float32Array([0, 0, 0, 0]),\n [enums.PARAM_MAT4]: new Float32Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),\n [enums.PARAM_TEXTURE_2D]: null,\n \n number: 0,\n boolean: false,\n}\n\nexport let getInstanceType = function (t) {\n return enums2ctor[t] || enums2ctor.default;\n};\nexport let getInstanceCtor = function (t) {\n return ctor2default[getInstanceType(t)];\n};\nexport let getClassName = function (t) {\n return cc.js.getClassName(getInstanceType(t));\n};\n\nlet className2InspectorName = {\n Number: 'number',\n Boolean: 'boolean'\n};\nexport function getInspectorProps (prop) {\n let editor = {\n type: prop.type\n };\n\n Object.assign(editor, prop.editor || prop.inspector);\n \n editor.defines = prop.defines;\n editor.value = getInstanceCtor(editor.type)(prop.value);\n if (prop.range) {\n editor.range = prop.range;\n }\n\n let className = getClassName(editor.type);\n editor.typeName = className2InspectorName[className] || className;\n \n editor.valueCtor = enums2ctor[editor.type];\n\n if (editor.typeName == 'cc.Texture2D') {\n editor.typeName = 'cc.Asset';\n editor.assetType = 'cc.Texture2D';\n }\n\n return editor;\n};","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * Class for tiled map asset handling.\n * @class TiledMapAsset\n * @extends Asset\n *\n */\nlet TiledMapAsset = cc.Class({\n name: 'cc.TiledMapAsset',\n extends: cc.Asset,\n\n properties: {\n tmxXmlStr: '',\n\n /**\n * @property {Texture2D[]} textures\n */\n textures: {\n default: [],\n type: [cc.Texture2D]\n },\n\n /**\n * @property {String[]} textureNames\n */\n textureNames: [cc.String],\n\n /**\n * @property {Size[]} textureSizes\n */\n textureSizes: {\n default: [],\n type: [cc.Size]\n },\n\n /**\n * @property {Texture2D[]} imageLayerTextures\n */\n imageLayerTextures: {\n default: [],\n type: [cc.Texture2D]\n },\n\n /**\n * @property {String[]} imageLayerTextureNames\n */\n imageLayerTextureNames: [cc.String],\n\n tsxFiles: [cc.TextAsset],\n tsxFileNames: [cc.String],\n },\n\n statics: {\n preventDeferredLoadDependents: true\n },\n\n createNode: CC_EDITOR && function (callback) {\n let node = new cc.Node(this.name);\n let tiledMap = node.addComponent(cc.TiledMap);\n tiledMap.tmxAsset = this;\n\n return callback(null, node);\n }\n});\n\ncc.TiledMapAsset = TiledMapAsset;\nmodule.exports = TiledMapAsset;\n","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nrequire('./cocos2d/core');\nrequire('./cocos2d/animation');\n\nif (CC_EDITOR && Editor.isMainProcess) {\n require('./cocos2d/particle/CCParticleAsset');\n require('./cocos2d/tilemap/CCTiledMapAsset');\n}\nelse {\n require('./cocos2d/particle');\n require('./cocos2d/tilemap');\n require('./cocos2d/videoplayer/CCVideoPlayer');\n require('./cocos2d/webview/CCWebView');\n require('./cocos2d/core/components/CCStudioComponent');\n require('./extensions/ccpool/CCNodePool');\n require('./cocos2d/actions');\n}\n\nrequire('./extensions/spine');\nrequire('./extensions/dragonbones');\n\nif (!CC_EDITOR || !Editor.isMainProcess) {\n require('./cocos2d/deprecated');\n}\n","/****************************************************************************\n Copyright (c) 2019 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport Mat4 from '../../cocos2d/core/value-types/mat4';\nconst RenderFlow = require('../../cocos2d/core/renderer/render-flow');\nconst FLAG_TRANSFORM = RenderFlow.FLAG_TRANSFORM;\nconst EmptyHandle = function () {}\nconst ATTACHED_ROOT_NAME = 'ATTACHED_NODE_TREE';\nconst ATTACHED_PRE_NAME = 'ATTACHED_NODE:';\nconst limitNode = function (node) {\n // attached node's world matrix update per frame\n Object.defineProperty(node, '_worldMatDirty', {\n get () { return true; },\n set (value) {/* do nothing */}\n });\n // shield world matrix calculate interface\n node._calculWorldMatrix = EmptyHandle;\n node._mulMat = EmptyHandle;\n};\nlet _tempMat4 = new Mat4();\n\n/**\n * @module sp\n */\n\n/**\n * !#en Attach node tool\n * !#zh 挂点工具类\n * @class sp.AttachUtil\n */\nlet AttachUtil = cc.Class({\n name: 'sp.AttachUtil',\n\n ctor () {\n this._inited = false;\n this._skeleton = null;\n this._skeletonNode = null;\n this._skeletonComp = null;\n\n this._attachedRootNode = null;\n this._attachedNodeArray = [];\n this._boneIndexToNode = {};\n },\n\n init (skeletonComp) {\n this._inited = true;\n this._skeleton = skeletonComp._skeleton;\n this._skeletonNode = skeletonComp.node;\n this._skeletonComp = skeletonComp;\n },\n\n reset () {\n this._inited = false;\n this._skeleton = null;\n this._skeletonNode = null;\n this._skeletonComp = null;\n },\n\n _prepareAttachNode () {\n let armature = this._skeleton;\n if (!armature) {\n return;\n }\n\n let rootNode = this._skeletonNode.getChildByName(ATTACHED_ROOT_NAME);\n if (!rootNode || !rootNode.isValid) {\n rootNode = new cc.Node(ATTACHED_ROOT_NAME);\n limitNode(rootNode);\n this._skeletonNode.addChild(rootNode);\n }\n\n let isCached = this._skeletonComp.isAnimationCached();\n if (isCached && this._skeletonComp._frameCache) {\n this._skeletonComp._frameCache.enableCacheAttachedInfo();\n }\n\n this._attachedRootNode = rootNode;\n return rootNode;\n },\n\n _buildBoneAttachedNode (bone, boneIndex) {\n let boneNodeName = ATTACHED_PRE_NAME + bone.data.name;\n let boneNode = new cc.Node(boneNodeName);\n this._buildBoneRelation(boneNode, bone, boneIndex);\n return boneNode;\n },\n\n _buildBoneRelation (boneNode, bone, boneIndex) {\n limitNode(boneNode);\n boneNode._bone = bone;\n boneNode._boneIndex = boneIndex;\n this._attachedNodeArray.push(boneNode);\n this._boneIndexToNode[boneIndex] = boneNode;\n },\n\n /**\n * !#en Gets attached root node.\n * !#zh 获取挂接节点树的根节点\n * @method getAttachedRootNode\n * @return {cc.Node}\n */\n getAttachedRootNode () {\n return this._attachedRootNode;\n },\n\n /**\n * !#en Gets attached node which you want.\n * !#zh 获得对应的挂点\n * @method getAttachedNodes\n * @param {String} boneName\n * @return {Node[]}\n */\n getAttachedNodes (boneName) {\n let nodeArray = this._attachedNodeArray;\n let res = [];\n if (!this._inited) return res;\n for (let i = 0, n = nodeArray.length; i < n; i++) {\n let boneNode = nodeArray[i];\n if (!boneNode || !boneNode.isValid) continue;\n if (boneNode.name === ATTACHED_PRE_NAME + boneName) {\n res.push(boneNode);\n }\n }\n return res;\n },\n\n _rebuildNodeArray () {\n let findMap = this._boneIndexToNode = {};\n let oldNodeArray = this._attachedNodeArray;\n let nodeArray = this._attachedNodeArray = [];\n for (let i = 0, n = oldNodeArray.length; i < n; i++) {\n let boneNode = oldNodeArray[i];\n if (!boneNode || !boneNode.isValid || boneNode._toRemove) continue;\n nodeArray.push(boneNode);\n findMap[boneNode._boneIndex] = boneNode;\n }\n },\n\n _sortNodeArray () {\n let nodeArray = this._attachedNodeArray;\n nodeArray.sort(function (a, b) {\n return a._boneIndex < b._boneIndex? -1 : 1;\n });\n },\n\n _getNodeByBoneIndex (boneIndex) {\n let findMap = this._boneIndexToNode;\n let boneNode = findMap[boneIndex];\n if (!boneNode || !boneNode.isValid) return null;\n return boneNode;\n },\n\n /**\n * !#en Destroy attached node which you want.\n * !#zh 销毁对应的挂点\n * @method destroyAttachedNodes\n * @param {String} boneName\n */\n destroyAttachedNodes (boneName) {\n if (!this._inited) return;\n\n let nodeArray = this._attachedNodeArray;\n let markTree = function (rootNode) {\n let children = rootNode.children;\n for (let i = 0, n = children.length; i < n; i++) {\n let c = children[i];\n if (c) markTree(c);\n }\n rootNode._toRemove = true;\n }\n\n for (let i = 0, n = nodeArray.length; i < n; i++) {\n let boneNode = nodeArray[i];\n if (!boneNode || !boneNode.isValid) continue;\n\n let delName = boneNode.name.split(ATTACHED_PRE_NAME)[1];\n if (delName === boneName) {\n markTree(boneNode);\n boneNode.removeFromParent(true);\n boneNode.destroy();\n nodeArray[i] = null;\n }\n }\n\n this._rebuildNodeArray();\n },\n\n /**\n * !#en Traverse all bones to generate the minimum node tree containing the given bone names, NOTE that make sure the skeleton has initialized before calling this interface.\n * !#zh 遍历所有插槽,生成包含所有给定插槽名称的最小节点树,注意,调用该接口前请确保骨骼动画已经初始化好。\n * @method generateAttachedNodes\n * @param {String} boneName\n * @return {Node[]} attached node array\n */\n generateAttachedNodes (boneName) {\n let targetNodes = [];\n if (!this._inited) return targetNodes;\n\n let rootNode = this._prepareAttachNode();\n if (!rootNode) return targetNodes;\n\n let res = [];\n let bones = this._skeleton.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let boneData = bone.data;\n if (boneData.name == boneName) {\n res.push(bone);\n }\n }\n\n let buildBoneTree = function (bone) {\n if (!bone) return;\n let boneData = bone.data;\n let boneNode = this._getNodeByBoneIndex(boneData.index);\n if (boneNode) return boneNode;\n\n boneNode = this._buildBoneAttachedNode(bone, boneData.index);\n\n let parentBoneNode = buildBoneTree(bone.parent) || rootNode;\n boneNode.parent = parentBoneNode;\n\n return boneNode;\n }.bind(this);\n\n for (let i = 0, n = res.length; i < n; i++) {\n let targetNode = buildBoneTree(res[i]);\n targetNodes.push(targetNode);\n }\n\n this._sortNodeArray();\n return targetNodes;\n },\n\n /**\n * !#en Destroy all attached node.\n * !#zh 销毁所有挂点\n * @method destroyAllAttachedNodes\n */\n destroyAllAttachedNodes () {\n this._attachedRootNode = null;\n this._attachedNodeArray.length = 0;\n this._boneIndexToNode = {};\n if (!this._inited) return;\n\n let rootNode = this._skeletonNode.getChildByName(ATTACHED_ROOT_NAME);\n if (rootNode) {\n rootNode.removeFromParent(true);\n rootNode.destroy();\n rootNode = null;\n }\n },\n\n /**\n * !#en Traverse all bones to generate a tree containing all bones nodes, NOTE that make sure the skeleton has initialized before calling this interface.\n * !#zh 遍历所有插槽,生成包含所有插槽的节点树,注意,调用该接口前请确保骨骼动画已经初始化好。\n * @method generateAllAttachedNodes\n * @return {cc.Node} root node\n */\n generateAllAttachedNodes () {\n if (!this._inited) return;\n\n // clear all records\n this._boneIndexToNode = {};\n this._attachedNodeArray.length = 0;\n \n let rootNode = this._prepareAttachNode();\n if (!rootNode) return;\n\n let bones = this._skeleton.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let boneData = bone.data;\n let parentNode = null;\n if (bone.parent) {\n let parentIndex = bone.parent.data.index;\n parentNode = this._boneIndexToNode[parentIndex];\n } else {\n parentNode = rootNode;\n }\n\n if (parentNode) {\n let boneNode = parentNode.getChildByName(ATTACHED_PRE_NAME + boneData.name);\n if (!boneNode || !boneNode.isValid) {\n boneNode = this._buildBoneAttachedNode(bone, boneData.index);\n parentNode.addChild(boneNode);\n } else {\n this._buildBoneRelation(boneNode, bone, boneData.index);\n }\n }\n }\n return rootNode;\n },\n\n _hasAttachedNode () {\n if (!this._inited) return false;\n\n let attachedRootNode = this._skeletonNode.getChildByName(ATTACHED_ROOT_NAME);\n return !!attachedRootNode;\n },\n\n _associateAttachedNode () {\n if (!this._inited) return;\n\n let rootNode = this._skeletonNode.getChildByName(ATTACHED_ROOT_NAME);\n if (!rootNode || !rootNode.isValid) return;\n this._attachedRootNode = rootNode;\n\n // clear all records\n this._boneIndexToNode = {};\n let nodeArray = this._attachedNodeArray;\n nodeArray.length = 0;\n limitNode(rootNode);\n\n if (!CC_NATIVERENDERER) {\n let isCached = this._skeletonComp.isAnimationCached();\n if (isCached && this._skeletonComp._frameCache) {\n this._skeletonComp._frameCache.enableCacheAttachedInfo();\n }\n }\n\n let bones = this._skeleton.bones;\n for (let i = 0, n = bones.length; i < n; i++) {\n let bone = bones[i];\n let boneData = bone.data;\n let parentNode = null;\n if (bone.parent) {\n let parentIndex = bone.parent.data.index;\n parentNode = this._boneIndexToNode[parentIndex];\n } else {\n parentNode = rootNode;\n }\n\n if (parentNode) {\n let boneNode = parentNode.getChildByName(ATTACHED_PRE_NAME + boneData.name);\n if (boneNode && boneNode.isValid) {\n this._buildBoneRelation(boneNode, bone, boneData.index);\n }\n }\n }\n },\n\n _syncAttachedNode () {\n if (!this._inited) return;\n\n let rootNode = this._attachedRootNode;\n let nodeArray = this._attachedNodeArray;\n if (!rootNode || !rootNode.isValid) {\n this._attachedRootNode = null;\n nodeArray.length = 0;\n return;\n }\n \n let rootMatrix = this._skeletonNode._worldMatrix;\n Mat4.copy(rootNode._worldMatrix, rootMatrix);\n rootNode._renderFlag &= ~FLAG_TRANSFORM;\n\n let boneInfos = null;\n let isCached = this._skeletonComp.isAnimationCached();\n if (isCached) {\n boneInfos = this._skeletonComp._curFrame && this._skeletonComp._curFrame.boneInfos;\n } else {\n boneInfos = this._skeleton.bones;\n }\n\n if (!boneInfos) return;\n\n let mulMat = this._skeletonNode._mulMat;\n let matrixHandle = function (nodeMat, parentMat, bone) {\n let tm = _tempMat4.m;\n tm[0] = bone.a;\n tm[1] = bone.c;\n tm[4] = bone.b;\n tm[5] = bone.d;\n tm[12] = bone.worldX;\n tm[13] = bone.worldY;\n mulMat(nodeMat, parentMat, _tempMat4);\n };\n\n let nodeArrayDirty = false;\n for (let i = 0, n = nodeArray.length; i < n; i++) {\n let boneNode = nodeArray[i];\n // Node has been destroy\n if (!boneNode || !boneNode.isValid) { \n nodeArray[i] = null;\n nodeArrayDirty = true;\n continue;\n }\n let bone = boneInfos[boneNode._boneIndex];\n // Bone has been destroy\n if (!bone) {\n boneNode.removeFromParent(true);\n boneNode.destroy();\n nodeArray[i] = null;\n nodeArrayDirty = true;\n continue;\n }\n matrixHandle(boneNode._worldMatrix, rootNode._worldMatrix, bone);\n boneNode._renderFlag &= ~FLAG_TRANSFORM;\n }\n if (nodeArrayDirty) {\n this._rebuildNodeArray();\n }\n },\n});\n\nmodule.exports = sp.AttachUtil = AttachUtil;","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nconst TrackEntryListeners = require('./track-entry-listeners');\nconst RenderComponent = require('../../cocos2d/core/components/CCRenderComponent');\nconst spine = require('./lib/spine');\nconst Graphics = require('../../cocos2d/core/graphics/graphics');\nconst RenderFlow = require('../../cocos2d/core/renderer/render-flow');\nconst FLAG_POST_RENDER = RenderFlow.FLAG_POST_RENDER;\n\nlet SkeletonCache = require('./skeleton-cache');\nlet AttachUtil = require('./AttachUtil');\n\n/**\n * @module sp\n */\nlet DefaultSkinsEnum = cc.Enum({ 'default': -1 });\nlet DefaultAnimsEnum = cc.Enum({ '<None>': 0 });\n\n/**\n * !#en Enum for animation cache mode type.\n * !#zh Spine动画缓存类型\n * @enum Skeleton.AnimationCacheMode\n */\nlet AnimationCacheMode = cc.Enum({\n /**\n * !#en The realtime mode.\n * !#zh 实时计算模式。\n * @property {Number} REALTIME\n */\n REALTIME: 0,\n /**\n * !#en The shared cache mode.\n * !#zh 共享缓存模式。\n * @property {Number} SHARED_CACHE\n */\n SHARED_CACHE: 1,\n /**\n * !#en The private cache mode.\n * !#zh 私有缓存模式。\n * @property {Number} PRIVATE_CACHE\n */\n PRIVATE_CACHE: 2\n});\n\nfunction setEnumAttr (obj, propName, enumDef) {\n cc.Class.Attr.setClassAttr(obj, propName, 'type', 'Enum');\n cc.Class.Attr.setClassAttr(obj, propName, 'enumList', cc.Enum.getList(enumDef));\n}\n\n/**\n * !#en\n * The skeleton of Spine <br/>\n * <br/>\n * (Skeleton has a reference to a SkeletonData and stores the state for skeleton instance,\n * which consists of the current pose's bone SRT, slot colors, and which slot attachments are visible. <br/>\n * Multiple skeletons can use the same SkeletonData which includes all animations, skins, and attachments.) <br/>\n * !#zh\n * Spine 骨骼动画 <br/>\n * <br/>\n * (Skeleton 具有对骨骼数据的引用并且存储了骨骼实例的状态,\n * 它由当前的骨骼动作slot 颜色,和可见的 slot attachments 组成。<br/>\n * 多个 Skeleton 可以使用相同的骨骼数据,其中包括所有的动画,皮肤和 attachments。\n *\n * @class Skeleton\n * @extends RenderComponent\n */\nsp.Skeleton = cc.Class({\n name: 'sp.Skeleton',\n extends: RenderComponent,\n editor: CC_EDITOR && {\n menu: 'i18n:MAIN_MENU.component.renderers/Spine Skeleton',\n help: 'app://docs/html/components/spine.html',\n inspector: 'packages://inspector/inspectors/comps/skeleton2d.js',\n },\n\n statics: {\n AnimationCacheMode: AnimationCacheMode,\n },\n\n properties: {\n /**\n * !#en The skeletal animation is paused?\n * !#zh 该骨骼动画是否暂停。\n * @property paused\n * @type {Boolean}\n * @readOnly\n * @default false\n */\n paused: {\n default: false,\n visible: false\n },\n\n /**\n * !#en\n * The skeleton data contains the skeleton information (bind pose bones, slots, draw order,\n * attachments, skins, etc) and animations but does not hold any state.<br/>\n * Multiple skeletons can share the same skeleton data.\n * !#zh\n * 骨骼数据包含了骨骼信息绑定骨骼动作slots渲染顺序\n * attachments皮肤等等和动画但不持有任何状态。<br/>\n * 多个 Skeleton 可以共用相同的骨骼数据。\n * @property {sp.SkeletonData} skeletonData\n */\n skeletonData: {\n default: null,\n type: sp.SkeletonData,\n notify () {\n if (CC_EDITOR) {\n this._resetDefaultAnim();\n this._resetDefaultSkin();\n this._refreshInspector();\n } else {\n this.defaultSkin = '';\n this.defaultAnimation = '';\n }\n this._updateSkeletonData();\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.skeleton.skeleton_data'\n },\n\n // 由于 spine 的 skin 是无法二次替换的,所以只能设置默认的 skin\n /**\n * !#en The name of default skin.\n * !#zh 默认的皮肤名称。\n * @property {String} defaultSkin\n */\n defaultSkin: {\n default: '',\n visible: false\n },\n\n /**\n * !#en The name of default animation.\n * !#zh 默认的动画名称。\n * @property {String} defaultAnimation\n */\n defaultAnimation: {\n default: '',\n visible: false\n },\n\n /**\n * !#en The name of current playing animation.\n * !#zh 当前播放的动画名称。\n * @property {String} animation\n */\n animation: {\n get () {\n if (this.isAnimationCached()) {\n return this._animationName;\n } else {\n var entry = this.getCurrent(0);\n return (entry && entry.animation.name) || \"\";\n }\n },\n set (value) {\n this.defaultAnimation = value;\n if (value) {\n this.setAnimation(0, value, this.loop);\n }\n else if (!this.isAnimationCached()) {\n this.clearTrack(0);\n this.setToSetupPose();\n }\n },\n visible: false\n },\n\n /**\n * @property {Number} _defaultSkinIndex\n */\n _defaultSkinIndex: {\n get () {\n if (this.skeletonData) {\n var skinsEnum = this.skeletonData.getSkinsEnum();\n if(skinsEnum) {\n if(this.defaultSkin === \"\") {\n if(skinsEnum.hasOwnProperty(0)) {\n this._defaultSkinIndex = 0;\n return 0;\n }\n } else {\n var skinIndex = skinsEnum[this.defaultSkin];\n if (skinIndex !== undefined) {\n return skinIndex;\n }\n }\n }\n }\n return 0;\n },\n set (value) {\n var skinsEnum;\n if (this.skeletonData) {\n skinsEnum = this.skeletonData.getSkinsEnum();\n }\n if ( !skinsEnum ) {\n return cc.errorID('',\n this.name);\n }\n var skinName = skinsEnum[value];\n if (skinName !== undefined) {\n this.defaultSkin = skinName;\n this.setSkin(this.defaultSkin);\n if (CC_EDITOR && !cc.engine.isPlaying) {\n this._refreshInspector();\n }\n }\n else {\n cc.errorID(7501, this.name);\n }\n },\n type: DefaultSkinsEnum,\n visible: true,\n animatable: false,\n displayName: \"Default Skin\",\n tooltip: CC_DEV && 'i18n:COMPONENT.skeleton.default_skin'\n },\n\n // value of 0 represents no animation\n _animationIndex: {\n get () {\n var animationName = (!CC_EDITOR || cc.engine.isPlaying) ? this.animation : this.defaultAnimation;\n if (this.skeletonData && animationName) {\n var animsEnum = this.skeletonData.getAnimsEnum();\n if (animsEnum) {\n var animIndex = animsEnum[animationName];\n if (animIndex !== undefined) {\n return animIndex;\n }\n }\n }\n return 0;\n },\n set (value) {\n if (value === 0) {\n this.animation = '';\n return;\n }\n var animsEnum;\n if (this.skeletonData) {\n animsEnum = this.skeletonData.getAnimsEnum();\n }\n if ( !animsEnum ) {\n return cc.errorID(7502, this.name);\n }\n var animName = animsEnum[value];\n if (animName !== undefined) {\n this.animation = animName;\n }\n else {\n cc.errorID(7503, this.name);\n }\n\n },\n type: DefaultAnimsEnum,\n visible: true,\n animatable: false,\n displayName: 'Animation',\n tooltip: CC_DEV && 'i18n:COMPONENT.skeleton.animation'\n },\n\n // Record pre cache mode.\n _preCacheMode: -1,\n _cacheMode: AnimationCacheMode.REALTIME,\n _defaultCacheMode: {\n default: 0,\n type: AnimationCacheMode,\n notify () {\n this.setAnimationCacheMode(this._defaultCacheMode);\n },\n editorOnly: true,\n visible: true,\n animatable: false,\n displayName: \"Animation Cache Mode\",\n tooltip: CC_DEV && 'i18n:COMPONENT.skeleton.animation_cache_mode'\n },\n\n /**\n * !#en TODO\n * !#zh 是否循环播放当前骨骼动画。\n * @property {Boolean} loop\n * @default true\n */\n loop: {\n default: true,\n tooltip: CC_DEV && 'i18n:COMPONENT.skeleton.loop'\n },\n\n /**\n * !#en Indicates whether to enable premultiplied alpha.\n * You should disable this option when image's transparent area appears to have opaque pixels,\n * or enable this option when image's half transparent area appears to be darken.\n * !#zh 是否启用贴图预乘。\n * 当图片的透明区域出现色块时需要关闭该选项,当图片的半透明区域颜色变黑时需要启用该选项。\n * @property {Boolean} premultipliedAlpha\n * @default true\n */\n premultipliedAlpha: {\n default: true,\n tooltip: CC_DEV && 'i18n:COMPONENT.skeleton.premultipliedAlpha'\n },\n\n /**\n * !#en The time scale of this skeleton.\n * !#zh 当前骨骼中所有动画的时间缩放率。\n * @property {Number} timeScale\n * @default 1\n */\n timeScale: {\n default: 1,\n tooltip: CC_DEV && 'i18n:COMPONENT.skeleton.time_scale'\n },\n\n /**\n * !#en Indicates whether open debug slots.\n * !#zh 是否显示 slot 的 debug 信息。\n * @property {Boolean} debugSlots\n * @default false\n */\n debugSlots: {\n default: false,\n editorOnly: true,\n tooltip: CC_DEV && 'i18n:COMPONENT.skeleton.debug_slots',\n notify () {\n this._updateDebugDraw();\n }\n },\n\n /**\n * !#en Indicates whether open debug bones.\n * !#zh 是否显示 bone 的 debug 信息。\n * @property {Boolean} debugBones\n * @default false\n */\n debugBones: {\n default: false,\n editorOnly: true,\n tooltip: CC_DEV && 'i18n:COMPONENT.skeleton.debug_bones',\n notify () {\n this._updateDebugDraw();\n }\n },\n\n /**\n * !#en Indicates whether open debug mesh.\n * !#zh 是否显示 mesh 的 debug 信息。\n * @property {Boolean} debugMesh\n * @default false\n */\n debugMesh: {\n default: false,\n editorOnly: true,\n tooltip: CC_DEV && 'i18n:COMPONENT.skeleton.debug_mesh',\n notify () {\n this._updateDebugDraw();\n }\n },\n\n /**\n * !#en Enabled two color tint.\n * !#zh 是否启用染色效果。\n * @property {Boolean} useTint\n * @default false\n */\n useTint: {\n default: false,\n tooltip: CC_DEV && 'i18n:COMPONENT.skeleton.use_tint',\n notify () {\n this._updateUseTint();\n }\n },\n\n /**\n * !#en Enabled batch model, if skeleton is complex, do not enable batch, or will lower performance.\n * !#zh 开启合批如果渲染大量相同纹理且结构简单的骨骼动画开启合批可以降低drawcall否则请不要开启cpu消耗会上升。\n * @property {Boolean} enableBatch\n * @default false\n */\n enableBatch: {\n default: false,\n notify () {\n this._updateBatch();\n },\n tooltip: CC_DEV && 'i18n:COMPONENT.skeleton.enabled_batch'\n },\n\n // Below properties will effect when cache mode is SHARED_CACHE or PRIVATE_CACHE.\n // accumulate time\n _accTime: 0,\n // Play times counter\n _playCount: 0,\n // Frame cache\n _frameCache: null,\n // Cur frame\n _curFrame: null,\n // Skeleton cache\n _skeletonCache : null,\n // Aimation name\n _animationName : \"\",\n // Animation queue\n _animationQueue : [],\n // Head animation info of\n _headAniInfo : null,\n // Play times\n _playTimes : 0,\n // Is animation complete.\n _isAniComplete: true,\n\n autoSwitchMaterial: {\n type: RenderComponent.EnableType,\n default: RenderComponent.EnableType.GLOBAL,\n notify(oldValue) {\n if (this.autoSwitchMaterial === oldValue) return;\n this.setVertsDirty();\n },\n },\n allowDynamicAtlas: {\n type: RenderComponent.EnableType,\n default: RenderComponent.EnableType.GLOBAL,\n notify(oldValue) {\n if (this.allowDynamicAtlas === oldValue) return;\n this.setVertsDirty();\n },\n },\n },\n\n // CONSTRUCTOR\n ctor () {\n this._effectDelegate = null;\n this._skeleton = null;\n this._rootBone = null;\n this._listener = null;\n this._materialCache = {};\n this._debugRenderer = null;\n this._startSlotIndex = -1;\n this._endSlotIndex = -1;\n this._startEntry = {animation : {name : \"\"}, trackIndex : 0};\n this._endEntry = {animation : {name : \"\"}, trackIndex : 0};\n this.attachUtil = new AttachUtil();\n this._dataDirty = true;\n },\n\n setVertsDirty() {\n this._dataDirty = true;\n this.invalidAnimationCache();\n this._materialCache = {};\n this._super();\n },\n\n // override base class _getDefaultMaterial to modify default material\n _getDefaultMaterial () {\n return cc.Material.getBuiltinMaterial('2d-spine');\n },\n\n // override base class _updateMaterial to set define value and clear material cache\n _updateMaterial () {\n let useTint = this.useTint;\n let baseMaterial = this.getMaterial(0);\n if (baseMaterial) {\n const isMultiSupport = baseMaterial.material.isMultiSupport();\n if (isMultiSupport) {\n this._defineMaterialTint(baseMaterial, useTint);\n } else {\n baseMaterial.define('USE_TINT', useTint);\n baseMaterial.define('CC_USE_MODEL', !this.enableBatch);\n }\n \n let srcBlendFactor = this.premultipliedAlpha ? cc.gfx.BLEND_ONE : cc.gfx.BLEND_SRC_ALPHA;\n let dstBlendFactor = cc.gfx.BLEND_ONE_MINUS_SRC_ALPHA;\n\n baseMaterial.setBlend(\n true,\n cc.gfx.BLEND_FUNC_ADD,\n srcBlendFactor, srcBlendFactor,\n cc.gfx.BLEND_FUNC_ADD,\n dstBlendFactor, dstBlendFactor\n );\n\n if (isMultiSupport) {\n if (!this.enableBatch) this.enableBatch = true;\n }\n\n if (CC_JSB) {\n if (this._nativeSkeleton) {\n this._nativeSkeleton.setUseMulti(isMultiSupport);\n }\n }\n }\n this._materialCache = {};\n },\n\n // override base class disableRender to clear post render flag\n disableRender () {\n this._super();\n this.node._renderFlag &= ~FLAG_POST_RENDER;\n },\n\n // override base class disableRender to add post render flag\n markForRender (enable) {\n this._super(enable);\n if (enable) {\n this.node._renderFlag |= FLAG_POST_RENDER;\n } else {\n this.node._renderFlag &= ~FLAG_POST_RENDER;\n }\n },\n\n // if change use tint mode, just clear material cache\n _updateUseTint () {\n let baseMaterial = this.getMaterial(0);\n if (baseMaterial) {\n let useTint = this.useTint;\n if (baseMaterial.material.isMultiSupport()) {\n this._defineMaterialTint(baseMaterial, useTint);\n } else {\n baseMaterial.define('USE_TINT', useTint);\n }\n }\n this._materialCache = {};\n },\n\n _defineMaterialTint(material, useTint) {\n const passes = material._effect._passes;\n if (passes && passes.length > 0) {\n if (passes[0]._defines['USE_TINT'] != useTint) {\n material.define('USE_TINT', useTint);\n }\n }\n },\n\n // if change use batch mode, just clear material cache\n _updateBatch () {\n let baseMaterial = this.getMaterial(0);\n if (baseMaterial) {\n if (!baseMaterial.material.isMultiSupport()) {\n baseMaterial.define('CC_USE_MODEL', !this.enableBatch);\n } else {\n if (!this.enableBatch) this.enableBatch = true;\n }\n }\n this._materialCache = {};\n },\n\n _validateRender () {\n let skeletonData = this.skeletonData;\n if (!skeletonData || !skeletonData.isTexturesLoaded()) {\n this.disableRender();\n return;\n }\n this._super();\n },\n\n /**\n * !#en\n * Sets runtime skeleton data to sp.Skeleton.<br>\n * This method is different from the `skeletonData` property. This method is passed in the raw data provided by the Spine runtime, and the skeletonData type is the asset type provided by Creator.\n * !#zh\n * 设置底层运行时用到的 SkeletonData。<br>\n * 这个接口有别于 `skeletonData` 属性,这个接口传入的是 Spine runtime 提供的原始数据,而 skeletonData 的类型是 Creator 提供的资源类型。\n * @method setSkeletonData\n * @param {sp.spine.SkeletonData} skeletonData\n */\n setSkeletonData (skeletonData) {\n if (skeletonData.width != null && skeletonData.height != null) {\n this.node.setContentSize(skeletonData.width, skeletonData.height);\n }\n\n if (!CC_EDITOR) {\n if (this._cacheMode === AnimationCacheMode.SHARED_CACHE) {\n this._skeletonCache = SkeletonCache.sharedCache;\n } else if (this._cacheMode === AnimationCacheMode.PRIVATE_CACHE) {\n this._skeletonCache = new SkeletonCache;\n this._skeletonCache.enablePrivateMode();\n }\n }\n\n if (this.isAnimationCached()) {\n if (this.debugBones || this.debugSlots) {\n cc.warn(\"Debug bones or slots is invalid in cached mode\");\n }\n let skeletonInfo = this._skeletonCache.getSkeletonCache(this.skeletonData._uuid, skeletonData);\n this._skeleton = skeletonInfo.skeleton;\n this._clipper = skeletonInfo.clipper;\n this._rootBone = this._skeleton.getRootBone();\n } else {\n this._skeleton = new spine.Skeleton(skeletonData);\n this._clipper = new spine.SkeletonClipping();\n this._rootBone = this._skeleton.getRootBone();\n }\n\n this.markForRender(true);\n },\n\n /**\n * !#en Sets slots visible range.\n * !#zh 设置骨骼插槽可视范围。\n * @method setSlotsRange\n * @param {Number} startSlotIndex\n * @param {Number} endSlotIndex\n */\n setSlotsRange (startSlotIndex, endSlotIndex) {\n if (this.isAnimationCached()) {\n cc.warn(\"Slots visible range can not be modified in cached mode.\");\n } else {\n this._startSlotIndex = startSlotIndex;\n this._endSlotIndex = endSlotIndex;\n }\n },\n\n /**\n * !#en Sets animation state data.<br>\n * The parameter type is {{#crossLinkModule \"sp.spine\"}}sp.spine{{/crossLinkModule}}.AnimationStateData.\n * !#zh 设置动画状态数据。<br>\n * 参数是 {{#crossLinkModule \"sp.spine\"}}sp.spine{{/crossLinkModule}}.AnimationStateData。\n * @method setAnimationStateData\n * @param {sp.spine.AnimationStateData} stateData\n */\n setAnimationStateData (stateData) {\n if (this.isAnimationCached()) {\n cc.warn(\"'setAnimationStateData' interface can not be invoked in cached mode.\");\n } else {\n var state = new spine.AnimationState(stateData);\n if (this._listener) {\n if (this._state) {\n this._state.removeListener(this._listener);\n }\n state.addListener(this._listener);\n }\n this._state = state;\n }\n\n },\n\n // IMPLEMENT\n __preload () {\n this._super();\n if (CC_EDITOR) {\n var Flags = cc.Object.Flags;\n this._objFlags |= (Flags.IsAnchorLocked | Flags.IsSizeLocked);\n\n this._refreshInspector();\n }\n\n var children = this.node.children;\n for (var i = 0, n = children.length; i < n; i++) {\n var child = children[i];\n if (child && child._name === \"DEBUG_DRAW_NODE\" ) {\n child.destroy();\n }\n }\n\n this._updateSkeletonData();\n this._updateDebugDraw();\n this._updateUseTint();\n this._updateBatch();\n },\n\n /**\n * !#en\n * It's best to set cache mode before set property 'dragonAsset', or will waste some cpu time.\n * If set the mode in editor, then no need to worry about order problem.\n * !#zh\n * 若想切换渲染模式,最好在设置'dragonAsset'之前,先设置好渲染模式,否则有运行时开销。\n * 若在编辑中设置渲染模式,则无需担心设置次序的问题。\n *\n * @method setAnimationCacheMode\n * @param {AnimationCacheMode} cacheMode\n * @example\n * skeleton.setAnimationCacheMode(sp.Skeleton.AnimationCacheMode.SHARED_CACHE);\n */\n setAnimationCacheMode (cacheMode) {\n if (this._preCacheMode !== cacheMode) {\n this._cacheMode = cacheMode;\n this._updateSkeletonData();\n this._updateUseTint();\n }\n },\n\n /**\n * !#en Whether in cached mode.\n * !#zh 当前是否处于缓存模式。\n * @method isAnimationCached\n * @return {Boolean}\n */\n isAnimationCached () {\n if (CC_EDITOR) return false;\n return this._cacheMode !== AnimationCacheMode.REALTIME;\n },\n\n update (dt) {\n if (CC_EDITOR) return;\n if (this.paused) return;\n\n dt *= this.timeScale * sp.timeScale;\n\n if (this.isAnimationCached()) {\n\n if (this._assembler) this._assembler.handleDynamicAtlasAndSwitchMaterial(this);\n\n // Cache mode and has animation queue.\n if (this._isAniComplete) {\n if (this._animationQueue.length === 0 && !this._headAniInfo) {\n let frameCache = this._frameCache;\n if (frameCache && frameCache.isInvalid()) {\n frameCache.updateToFrame();\n let frames = frameCache.frames;\n this._curFrame = frames[frames.length - 1];\n }\n return;\n }\n if (!this._headAniInfo) {\n this._headAniInfo = this._animationQueue.shift();\n }\n this._accTime += dt;\n if (this._accTime > this._headAniInfo.delay) {\n let aniInfo = this._headAniInfo;\n this._headAniInfo = null;\n this.setAnimation (0, aniInfo.animationName, aniInfo.loop);\n }\n return;\n }\n\n this._updateCache(dt);\n } else {\n this._updateRealtime(dt);\n }\n },\n\n _emitCacheCompleteEvent () {\n if (!this._listener) return;\n this._endEntry.animation.name = this._animationName;\n this._listener.complete && this._listener.complete(this._endEntry);\n this._listener.end && this._listener.end(this._endEntry);\n },\n\n _updateCache (dt) {\n let frameCache = this._frameCache;\n if (!frameCache.isInited()) {\n return;\n }\n let frames = frameCache.frames;\n let frameTime = SkeletonCache.FrameTime;\n\n // Animation Start, the event diffrent from dragonbones inner event,\n // It has no event object.\n if (this._accTime == 0 && this._playCount == 0) {\n this._startEntry.animation.name = this._animationName;\n this._listener && this._listener.start && this._listener.start(this._startEntry);\n }\n\n this._accTime += dt;\n let frameIdx = Math.floor(this._accTime / frameTime);\n if (!frameCache.isCompleted) {\n frameCache.updateToFrame(frameIdx);\n }\n\n if (frameCache.isCompleted && frameIdx >= frames.length) {\n this._playCount ++;\n if (this._playTimes > 0 && this._playCount >= this._playTimes) {\n // set frame to end frame.\n this._curFrame = frames[frames.length - 1];\n this._accTime = 0;\n this._playCount = 0;\n this._isAniComplete = true;\n this._emitCacheCompleteEvent();\n return;\n }\n this._accTime = 0;\n frameIdx = 0;\n this._emitCacheCompleteEvent();\n }\n this._curFrame = frames[frameIdx];\n },\n\n _updateRealtime (dt) {\n let skeleton = this._skeleton;\n let state = this._state;\n if (skeleton) {\n skeleton.update(dt);\n if (state) {\n state.update(dt);\n state.apply(skeleton);\n }\n }\n },\n\n /**\n * !#en Sets vertex effect delegate.\n * !#zh 设置顶点动画代理\n * @method setVertexEffectDelegate\n * @param {sp.VertexEffectDelegate} effectDelegate\n */\n setVertexEffectDelegate (effectDelegate) {\n this._effectDelegate = effectDelegate;\n },\n\n // RENDERER\n\n /**\n * !#en Computes the world SRT from the local SRT for each bone.\n * !#zh 重新更新所有骨骼的世界 Transform\n * 当获取 bone 的数值未更新时,即可使用该函数进行更新数值。\n * @method updateWorldTransform\n * @example\n * var bone = spine.findBone('head');\n * cc.log(bone.worldX); // return 0;\n * spine.updateWorldTransform();\n * bone = spine.findBone('head');\n * cc.log(bone.worldX); // return -23.12;\n */\n updateWorldTransform () {\n if (!this.isAnimationCached()) return;\n\n if (this._skeleton) {\n this._skeleton.updateWorldTransform();\n }\n },\n\n /**\n * !#en Sets the bones and slots to the setup pose.\n * !#zh 还原到起始动作\n * @method setToSetupPose\n */\n setToSetupPose () {\n if (this._skeleton) {\n this._skeleton.setToSetupPose();\n }\n },\n\n /**\n * !#en\n * Sets the bones to the setup pose,\n * using the values from the `BoneData` list in the `SkeletonData`.\n * !#zh\n * 设置 bone 到起始动作\n * 使用 SkeletonData 中的 BoneData 列表中的值。\n * @method setBonesToSetupPose\n */\n setBonesToSetupPose () {\n if (this._skeleton) {\n this._skeleton.setBonesToSetupPose();\n }\n },\n\n /**\n * !#en\n * Sets the slots to the setup pose,\n * using the values from the `SlotData` list in the `SkeletonData`.\n * !#zh\n * 设置 slot 到起始动作。\n * 使用 SkeletonData 中的 SlotData 列表中的值。\n * @method setSlotsToSetupPose\n */\n setSlotsToSetupPose () {\n if (this._skeleton) {\n this._skeleton.setSlotsToSetupPose();\n }\n },\n\n /**\n * !#en\n * Updating an animation cache to calculate all frame data in the animation is a cost in\n * performance due to calculating all data in a single frame.\n * To update the cache, use the invalidAnimationCache method with high performance.\n * !#zh\n * 更新某个动画缓存, 预计算动画中所有帧数据,由于在单帧计算所有数据,所以较消耗性能。\n * 若想更新缓存,可使用 invalidAnimationCache 方法,具有较高性能。\n * @method updateAnimationCache\n * @param {String} animName\n */\n updateAnimationCache (animName) {\n if (!this.isAnimationCached()) return;\n let uuid = this.skeletonData._uuid;\n if (this._skeletonCache) {\n this._skeletonCache.updateAnimationCache(uuid, animName);\n }\n },\n\n /**\n * !#en\n * Invalidates the animation cache, which is then recomputed on each frame..\n * !#zh\n * 使动画缓存失效,之后会在每帧重新计算。\n * @method invalidAnimationCache\n */\n invalidAnimationCache () {\n if (!this.isAnimationCached()) return;\n if (this._skeletonCache) {\n this._skeletonCache.invalidAnimationCache(this.skeletonData._uuid);\n }\n },\n\n /**\n * !#en\n * Finds a bone by name.\n * This does a string comparison for every bone.<br>\n * Returns a {{#crossLinkModule \"sp.spine\"}}sp.spine{{/crossLinkModule}}.Bone object.\n * !#zh\n * 通过名称查找 bone。\n * 这里对每个 bone 的名称进行了对比。<br>\n * 返回一个 {{#crossLinkModule \"sp.spine\"}}sp.spine{{/crossLinkModule}}.Bone 对象。\n *\n * @method findBone\n * @param {String} boneName\n * @return {sp.spine.Bone}\n */\n findBone (boneName) {\n if (this._skeleton) {\n return this._skeleton.findBone(boneName);\n }\n return null;\n },\n\n /**\n * !#en\n * Finds a slot by name. This does a string comparison for every slot.<br>\n * Returns a {{#crossLinkModule \"sp.spine\"}}sp.spine{{/crossLinkModule}}.Slot object.\n * !#zh\n * 通过名称查找 slot。这里对每个 slot 的名称进行了比较。<br>\n * 返回一个 {{#crossLinkModule \"sp.spine\"}}sp.spine{{/crossLinkModule}}.Slot 对象。\n *\n * @method findSlot\n * @param {String} slotName\n * @return {sp.spine.Slot}\n */\n findSlot (slotName) {\n if (this._skeleton) {\n return this._skeleton.findSlot(slotName);\n }\n return null;\n },\n\n /**\n * !#en\n * Finds a skin by name and makes it the active skin.\n * This does a string comparison for every skin.<br>\n * Note that setting the skin does not change which attachments are visible.<br>\n * Returns a {{#crossLinkModule \"sp.spine\"}}sp.spine{{/crossLinkModule}}.Skin object.\n * !#zh\n * 按名称查找皮肤,激活该皮肤。这里对每个皮肤的名称进行了比较。<br>\n * 注意:设置皮肤不会改变 attachment 的可见性。<br>\n * 返回一个 {{#crossLinkModule \"sp.spine\"}}sp.spine{{/crossLinkModule}}.Skin 对象。\n *\n * @method setSkin\n * @param {String} skinName\n */\n setSkin (skinName) {\n if (this._skeleton) {\n this._skeleton.setSkinByName(skinName);\n this._skeleton.setSlotsToSetupPose();\n }\n this.invalidAnimationCache();\n },\n\n /**\n * !#en\n * Returns the attachment for the slot and attachment name.\n * The skeleton looks first in its skin, then in the skeleton datas default skin.<br>\n * Returns a {{#crossLinkModule \"sp.spine\"}}sp.spine{{/crossLinkModule}}.Attachment object.\n * !#zh\n * 通过 slot 和 attachment 的名称获取 attachment。Skeleton 优先查找它的皮肤,然后才是 Skeleton Data 中默认的皮肤。<br>\n * 返回一个 {{#crossLinkModule \"sp.spine\"}}sp.spine{{/crossLinkModule}}.Attachment 对象。\n *\n * @method getAttachment\n * @param {String} slotName\n * @param {String} attachmentName\n * @return {sp.spine.Attachment}\n */\n getAttachment (slotName, attachmentName) {\n if (this._skeleton) {\n return this._skeleton.getAttachmentByName(slotName, attachmentName);\n }\n return null;\n },\n\n /**\n * !#en\n * Sets the attachment for the slot and attachment name.\n * The skeleton looks first in its skin, then in the skeleton datas default skin.\n * !#zh\n * 通过 slot 和 attachment 的名字来设置 attachment。\n * Skeleton 优先查找它的皮肤,然后才是 Skeleton Data 中默认的皮肤。\n * @method setAttachment\n * @param {String} slotName\n * @param {String} attachmentName\n */\n setAttachment (slotName, attachmentName) {\n if (this._skeleton) {\n this._skeleton.setAttachment(slotName, attachmentName);\n }\n this.invalidAnimationCache();\n },\n\n /**\n * 获取 attachment 的 region 数据\n */\n getRegionData(slotName, attachmentName) {\n const attachment = this.getAttachment(slotName, attachmentName);\n if (attachment) return new sp.RegionData(attachment);\n return null;\n },\n\n /**\n * 修改 attachment 的 region 数据\n */\n setRegionData(slotName, attachmentName, regionData) {\n const attachment = this.getAttachment(slotName, attachmentName);\n if (attachment) {\n regionData.assignToAttachment(attachment);\n this.setVertsDirty();\n return true;\n }\n return false;\n },\n\n /**\n * Return the renderer of attachment.\n * @method getTextureAtlas\n * @param {sp.spine.RegionAttachment|spine.BoundingBoxAttachment} regionAttachment\n * @return {sp.spine.TextureAtlasRegion}\n */\n getTextureAtlas (regionAttachment) {\n return regionAttachment.region;\n },\n\n // ANIMATION\n /**\n * !#en\n * Mix applies all keyframe values,\n * interpolated for the specified time and mixed with the current values.\n * !#zh 为所有关键帧设定混合及混合时间(从当前值开始差值)。\n * @method setMix\n * @param {String} fromAnimation\n * @param {String} toAnimation\n * @param {Number} duration\n */\n setMix (fromAnimation, toAnimation, duration) {\n if (this._state) {\n this._state.data.setMix(fromAnimation, toAnimation, duration);\n }\n },\n\n /**\n * !#en Set the current animation. Any queued animations are cleared.<br>\n * Returns a {{#crossLinkModule \"sp.spine\"}}sp.spine{{/crossLinkModule}}.TrackEntry object.\n * !#zh 设置当前动画。队列中的任何的动画将被清除。<br>\n * 返回一个 {{#crossLinkModule \"sp.spine\"}}sp.spine{{/crossLinkModule}}.TrackEntry 对象。\n * @method setAnimation\n * @param {Number} trackIndex\n * @param {String} name\n * @param {Boolean} loop\n * @return {sp.spine.TrackEntry}\n */\n setAnimation (trackIndex, name, loop) {\n\n this._playTimes = loop ? 0 : 1;\n this._animationName = name;\n\n if (this.isAnimationCached()) {\n if (trackIndex !== 0) {\n cc.warn(\"Track index can not greater than 0 in cached mode.\");\n }\n if (!this._skeletonCache) return null;\n let cache = this._skeletonCache.getAnimationCache(this.skeletonData._uuid, name);\n if (!cache) {\n cache = this._skeletonCache.initAnimationCache(this.skeletonData._uuid, name);\n }\n if (cache) {\n this._isAniComplete = false;\n this._accTime = 0;\n this._playCount = 0;\n this._frameCache = cache;\n if (this.attachUtil._hasAttachedNode()) {\n this._frameCache.enableCacheAttachedInfo();\n }\n if (this._assembler) this._assembler.handleDynamicAtlasAndSwitchMaterial(this);\n this._frameCache.updateToFrame(0);\n this._curFrame = this._frameCache.frames[0];\n }\n } else {\n if (this._skeleton) {\n var animation = this._skeleton.data.findAnimation(name);\n if (!animation) {\n cc.logID(7509, name);\n return null;\n }\n var res = this._state.setAnimationWith(trackIndex, animation, loop);\n this._state.apply(this._skeleton);\n return res;\n }\n }\n return null;\n },\n\n /**\n * !#en Adds an animation to be played delay seconds after the current or last queued animation.<br>\n * Returns a {{#crossLinkModule \"sp.spine\"}}sp.spine{{/crossLinkModule}}.TrackEntry object.\n * !#zh 添加一个动画到动画队列尾部,还可以延迟指定的秒数。<br>\n * 返回一个 {{#crossLinkModule \"sp.spine\"}}sp.spine{{/crossLinkModule}}.TrackEntry 对象。\n * @method addAnimation\n * @param {Number} trackIndex\n * @param {String} name\n * @param {Boolean} loop\n * @param {Number} [delay=0]\n * @return {sp.spine.TrackEntry}\n */\n addAnimation (trackIndex, name, loop, delay) {\n delay = delay || 0;\n if (this.isAnimationCached()) {\n if (trackIndex !== 0) {\n cc.warn(\"Track index can not greater than 0 in cached mode.\");\n }\n this._animationQueue.push({animationName : name, loop: loop, delay : delay});\n } else {\n if (this._skeleton) {\n var animation = this._skeleton.data.findAnimation(name);\n if (!animation) {\n cc.logID(7510, name);\n return null;\n }\n return this._state.addAnimationWith(trackIndex, animation, loop, delay);\n }\n }\n return null;\n },\n\n /**\n * !#en Find animation with specified name.\n * !#zh 查找指定名称的动画\n * @method findAnimation\n * @param {String} name\n * @returns {sp.spine.Animation}\n */\n findAnimation (name) {\n if (this._skeleton) {\n return this._skeleton.data.findAnimation(name);\n }\n return null;\n },\n\n /**\n * !#en Returns track entry by trackIndex.<br>\n * Returns a {{#crossLinkModule \"sp.spine\"}}sp.spine{{/crossLinkModule}}.TrackEntry object.\n * !#zh 通过 track 索引获取 TrackEntry。<br>\n * 返回一个 {{#crossLinkModule \"sp.spine\"}}sp.spine{{/crossLinkModule}}.TrackEntry 对象。\n * @method getCurrent\n * @param trackIndex\n * @return {sp.spine.TrackEntry}\n */\n getCurrent (trackIndex) {\n if (this.isAnimationCached()) {\n cc.warn(\"'getCurrent' interface can not be invoked in cached mode.\");\n } else {\n if (this._state) {\n return this._state.getCurrent(trackIndex);\n }\n }\n return null;\n },\n\n /**\n * !#en Clears all tracks of animation state.\n * !#zh 清除所有 track 的动画状态。\n * @method clearTracks\n */\n clearTracks () {\n if (this.isAnimationCached()) {\n cc.warn(\"'clearTracks' interface can not be invoked in cached mode.\");\n } else {\n if (this._state) {\n this._state.clearTracks();\n }\n }\n },\n\n /**\n * !#en Clears track of animation state by trackIndex.\n * !#zh 清除出指定 track 的动画状态。\n * @method clearTrack\n * @param {number} trackIndex\n */\n clearTrack (trackIndex) {\n if (this.isAnimationCached()) {\n cc.warn(\"'clearTrack' interface can not be invoked in cached mode.\");\n } else {\n if (this._state) {\n this._state.clearTrack(trackIndex);\n if (CC_EDITOR && !cc.engine.isPlaying) {\n this._state.update(0);\n this.setToSetupPose();\n }\n }\n }\n },\n\n /**\n * !#en Set the start event listener.\n * !#zh 用来设置开始播放动画的事件监听。\n * @method setStartListener\n * @param {function} listener\n */\n setStartListener (listener) {\n this._ensureListener();\n this._listener.start = listener;\n },\n\n /**\n * !#en Set the interrupt event listener.\n * !#zh 用来设置动画被打断的事件监听。\n * @method setInterruptListener\n * @param {function} listener\n */\n setInterruptListener (listener) {\n this._ensureListener();\n this._listener.interrupt = listener;\n },\n\n /**\n * !#en Set the end event listener.\n * !#zh 用来设置动画播放完后的事件监听。\n * @method setEndListener\n * @param {function} listener\n */\n setEndListener (listener) {\n this._ensureListener();\n this._listener.end = listener;\n },\n\n /**\n * !#en Set the dispose event listener.\n * !#zh 用来设置动画将被销毁的事件监听。\n * @method setDisposeListener\n * @param {function} listener\n */\n setDisposeListener (listener) {\n this._ensureListener();\n this._listener.dispose = listener;\n },\n\n /**\n * !#en Set the complete event listener.\n * !#zh 用来设置动画播放一次循环结束后的事件监听。\n * @method setCompleteListener\n * @param {function} listener\n */\n setCompleteListener (listener) {\n this._ensureListener();\n this._listener.complete = listener;\n },\n\n /**\n * !#en Set the animation event listener.\n * !#zh 用来设置动画播放过程中帧事件的监听。\n * @method setEventListener\n * @param {function} listener\n */\n setEventListener (listener) {\n this._ensureListener();\n this._listener.event = listener;\n },\n\n /**\n * !#en Set the start event listener for specified TrackEntry.\n * !#zh 用来为指定的 TrackEntry 设置动画开始播放的事件监听。\n * @method setTrackStartListener\n * @param {sp.spine.TrackEntry} entry\n * @param {function} listener\n */\n setTrackStartListener (entry, listener) {\n TrackEntryListeners.getListeners(entry).start = listener;\n },\n\n /**\n * !#en Set the interrupt event listener for specified TrackEntry.\n * !#zh 用来为指定的 TrackEntry 设置动画被打断的事件监听。\n * @method setTrackInterruptListener\n * @param {sp.spine.TrackEntry} entry\n * @param {function} listener\n */\n setTrackInterruptListener (entry, listener) {\n TrackEntryListeners.getListeners(entry).interrupt = listener;\n },\n\n /**\n * !#en Set the end event listener for specified TrackEntry.\n * !#zh 用来为指定的 TrackEntry 设置动画播放结束的事件监听。\n * @method setTrackEndListener\n * @param {sp.spine.TrackEntry} entry\n * @param {function} listener\n */\n setTrackEndListener (entry, listener) {\n TrackEntryListeners.getListeners(entry).end = listener;\n },\n\n /**\n * !#en Set the dispose event listener for specified TrackEntry.\n * !#zh 用来为指定的 TrackEntry 设置动画即将被销毁的事件监听。\n * @method setTrackDisposeListener\n * @param {sp.spine.TrackEntry} entry\n * @param {function} listener\n */\n setTrackDisposeListener(entry, listener){\n TrackEntryListeners.getListeners(entry).dispose = listener;\n },\n\n /**\n * !#en Set the complete event listener for specified TrackEntry.\n * !#zh 用来为指定的 TrackEntry 设置动画一次循环播放结束的事件监听。\n * @method setTrackCompleteListener\n * @param {sp.spine.TrackEntry} entry\n * @param {function} listener\n * @param {sp.spine.TrackEntry} listener.entry\n * @param {Number} listener.loopCount\n */\n setTrackCompleteListener (entry, listener) {\n TrackEntryListeners.getListeners(entry).complete = function (trackEntry) {\n var loopCount = Math.floor(trackEntry.trackTime / trackEntry.animationEnd);\n listener(trackEntry, loopCount);\n };\n },\n\n /**\n * !#en Set the event listener for specified TrackEntry.\n * !#zh 用来为指定的 TrackEntry 设置动画帧事件的监听。\n * @method setTrackEventListener\n * @param {sp.spine.TrackEntry} entry\n * @param {function} listener\n */\n setTrackEventListener (entry, listener) {\n TrackEntryListeners.getListeners(entry).event = listener;\n },\n\n /**\n * !#en Get the animation state object\n * !#zh 获取动画状态\n * @method getState\n * @return {sp.spine.AnimationState} state\n */\n getState () {\n return this._state;\n },\n\n _resetDefaultAnim: CC_EDITOR && function () {\n if (this.skeletonData) {\n let animEnum = this.skeletonData.getAnimsEnum();\n if (!animEnum.hasOwnProperty(this.defaultAnimation)) {\n this.defaultAnimation = '';\n }\n }\n },\n\n _resetDefaultSkin: CC_EDITOR && function () {\n if (this.skeletonData) {\n let skinEnum = this.skeletonData.getSkinsEnum();\n if(!skinEnum.hasOwnProperty(this.defaultSkin)) {\n this.defaultSkin = '';\n }\n }\n },\n\n // update animation list for editor\n _updateAnimEnum: CC_EDITOR && function () {\n var animEnum;\n if (this.skeletonData) {\n animEnum = this.skeletonData.getAnimsEnum();\n }\n // change enum\n setEnumAttr(this, '_animationIndex', animEnum || DefaultAnimsEnum);\n },\n // update skin list for editor\n _updateSkinEnum: CC_EDITOR && function () {\n var skinEnum;\n if (this.skeletonData) {\n skinEnum = this.skeletonData.getSkinsEnum();\n }\n // change enum\n setEnumAttr(this, '_defaultSkinIndex', skinEnum || DefaultSkinsEnum);\n },\n\n _ensureListener () {\n if (!this._listener) {\n this._listener = new TrackEntryListeners();\n if (this._state) {\n this._state.addListener(this._listener);\n }\n }\n },\n\n _updateSkeletonData() {\n this._dataDirty = true;\n \n if (!this.skeletonData) {\n this.disableRender();\n return;\n }\n\n let data = this.skeletonData.getRuntimeData();\n if (!data) {\n this.disableRender();\n return;\n }\n\n try {\n this.setSkeletonData(data);\n if (!this.isAnimationCached()) {\n this.setAnimationStateData(new spine.AnimationStateData(this._skeleton.data));\n }\n this.defaultSkin && this.setSkin(this.defaultSkin);\n }\n catch (e) {\n cc.warn(e);\n }\n\n this.attachUtil.init(this);\n this.attachUtil._associateAttachedNode();\n this._preCacheMode = this._cacheMode;\n this.animation = this.defaultAnimation;\n },\n\n _refreshInspector () {\n // update inspector\n this._updateAnimEnum();\n this._updateSkinEnum();\n Editor.Utils.refreshSelectedInspector('node', this.node.uuid);\n },\n\n _updateDebugDraw: function () {\n if (this.debugBones || this.debugSlots) {\n if (!this._debugRenderer) {\n let debugDrawNode = new cc.PrivateNode();\n debugDrawNode.name = 'DEBUG_DRAW_NODE';\n let debugDraw = debugDrawNode.addComponent(Graphics);\n debugDraw.lineWidth = 1;\n debugDraw.strokeColor = cc.color(255, 0, 0, 255);\n\n this._debugRenderer = debugDraw;\n }\n\n this._debugRenderer.node.parent = this.node;\n if (this.isAnimationCached()) {\n cc.warn(\"Debug bones or slots is invalid in cached mode\");\n }\n }\n else if (this._debugRenderer) {\n this._debugRenderer.node.parent = null;\n }\n },\n});\n\nmodule.exports = sp.Skeleton;\n","/****************************************************************************\n Copyright (c) 2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n http://www.cocos2d-x.org\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * !#en\n * The global main namespace of Spine, all classes, functions,\n * properties and constants of Spine are defined in this namespace\n * !#zh\n * Spine 的全局的命名空间,\n * 与 Spine 相关的所有的类,函数,属性,常量都在这个命名空间中定义。\n * @module sp\n * @main sp\n */\n\n/*\n * Reference:\n * http://esotericsoftware.com/spine-runtime-terminology\n * http://esotericsoftware.com/files/runtime-diagram.png\n * http://en.esotericsoftware.com/spine-using-runtimes\n */\n\nvar _global = typeof window === 'undefined' ? global : window;\nvar _isUseSpine = true;\n\nif (!CC_NATIVERENDERER) {\n _global.spine = require('./lib/spine');\n} else if (!_global.spine) {\n _isUseSpine = false;\n}\n\nif (_isUseSpine) {\n _global.sp = _global.sp || {};\n\n /**\n * !#en\n * The global time scale of Spine.\n * !#zh\n * Spine 全局时间缩放率。\n * @example\n * sp.timeScale = 0.8;\n */\n sp._timeScale = 1.0;\n Object.defineProperty(sp, 'timeScale', {\n get () {\n return this._timeScale;\n },\n set (value) {\n this._timeScale = value;\n },\n configurable: true,\n });\n\n // The attachment type of spine. It contains three type: REGION(0), BOUNDING_BOX(1), MESH(2) and SKINNED_MESH.\n sp.ATTACHMENT_TYPE = {\n REGION: 0,\n BOUNDING_BOX: 1,\n MESH: 2,\n SKINNED_MESH:3\n };\n\n /**\n * !#en The event type of spine skeleton animation.\n * !#zh 骨骼动画事件类型。\n * @enum AnimationEventType\n */\n sp.AnimationEventType = cc.Enum({\n /**\n * !#en The play spine skeleton animation start type.\n * !#zh 开始播放骨骼动画。\n * @property {Number} START\n */\n START: 0,\n /**\n * !#en Another entry has replaced this entry as the current entry. This entry may continue being applied for mixing.\n * !#zh 当前的 entry 被其他的 entry 替换。当使用 mixing 时,当前的 entry 会继续运行。\n */\n INTERRUPT: 1,\n /**\n * !#en The play spine skeleton animation finish type.\n * !#zh 播放骨骼动画结束。\n * @property {Number} END\n */\n END: 2,\n /**\n * !#en The entry will be disposed.\n * !#zh entry 将被销毁。\n */\n DISPOSE: 3,\n /**\n * !#en The play spine skeleton animation complete type.\n * !#zh 播放骨骼动画完成。\n * @property {Number} COMPLETE\n */\n COMPLETE: 4,\n /**\n * !#en The spine skeleton animation event type.\n * !#zh 骨骼动画事件。\n * @property {Number} EVENT\n */\n EVENT: 5\n });\n\n /**\n * @module sp\n */\n if (!CC_EDITOR || !Editor.isMainProcess) {\n \n sp.spine = _global.spine;\n if (!CC_NATIVERENDERER) {\n require('./skeleton-texture');\n }\n\n require('./skeleton-data');\n require('./vertex-effect-delegate');\n require('./Skeleton');\n require('./spine-assembler');\n }\n else {\n require('./skeleton-data');\n }\n}\n\n/**\n * !#en\n * `sp.spine` is the namespace for official Spine Runtime, which officially implemented and maintained by Spine.<br>\n * Please refer to the official documentation for its detailed usage: [http://en.esotericsoftware.com/spine-using-runtimes](http://en.esotericsoftware.com/spine-using-runtimes)\n * !#zh\n * sp.spine 模块是 Spine 官方运行库的 API 入口,由 Spine 官方统一实现和维护,具体用法请参考:[http://zh.esotericsoftware.com/spine-using-runtimes](http://zh.esotericsoftware.com/spine-using-runtimes)\n * @module sp.spine\n * @main sp.spine\n */\n","// Spine runtime version 3.8\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar spine;\n(function (spine) {\n var Animation = (function () {\n function Animation(name, timelines, duration) {\n if (name == null)\n throw new Error(\"name cannot be null.\");\n if (timelines == null)\n throw new Error(\"timelines cannot be null.\");\n this.name = name;\n this.timelines = timelines;\n this.timelineIds = [];\n for (var i = 0; i < timelines.length; i++)\n this.timelineIds[timelines[i].getPropertyId()] = true;\n this.duration = duration;\n }\n Animation.prototype.hasTimeline = function (id) {\n return this.timelineIds[id] == true;\n };\n Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) {\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n if (loop && this.duration != 0) {\n time %= this.duration;\n if (lastTime > 0)\n lastTime %= this.duration;\n }\n var timelines = this.timelines;\n for (var i = 0, n = timelines.length; i < n; i++)\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\n };\n Animation.binarySearch = function (values, target, step) {\n if (step === void 0) { step = 1; }\n var low = 0;\n var high = values.length / step - 2;\n if (high == 0)\n return step;\n var current = high >>> 1;\n while (true) {\n if (values[(current + 1) * step] <= target)\n low = current + 1;\n else\n high = current;\n if (low == high)\n return (low + 1) * step;\n current = (low + high) >>> 1;\n }\n };\n Animation.linearSearch = function (values, target, step) {\n for (var i = 0, last = values.length - step; i <= last; i += step)\n if (values[i] > target)\n return i;\n return -1;\n };\n return Animation;\n }());\n spine.Animation = Animation;\n var MixBlend;\n (function (MixBlend) {\n MixBlend[MixBlend[\"setup\"] = 0] = \"setup\";\n MixBlend[MixBlend[\"first\"] = 1] = \"first\";\n MixBlend[MixBlend[\"replace\"] = 2] = \"replace\";\n MixBlend[MixBlend[\"add\"] = 3] = \"add\";\n })(MixBlend = spine.MixBlend || (spine.MixBlend = {}));\n var MixDirection;\n (function (MixDirection) {\n MixDirection[MixDirection[\"mixIn\"] = 0] = \"mixIn\";\n MixDirection[MixDirection[\"mixOut\"] = 1] = \"mixOut\";\n })(MixDirection = spine.MixDirection || (spine.MixDirection = {}));\n var TimelineType;\n (function (TimelineType) {\n TimelineType[TimelineType[\"rotate\"] = 0] = \"rotate\";\n TimelineType[TimelineType[\"translate\"] = 1] = \"translate\";\n TimelineType[TimelineType[\"scale\"] = 2] = \"scale\";\n TimelineType[TimelineType[\"shear\"] = 3] = \"shear\";\n TimelineType[TimelineType[\"attachment\"] = 4] = \"attachment\";\n TimelineType[TimelineType[\"color\"] = 5] = \"color\";\n TimelineType[TimelineType[\"deform\"] = 6] = \"deform\";\n TimelineType[TimelineType[\"event\"] = 7] = \"event\";\n TimelineType[TimelineType[\"drawOrder\"] = 8] = \"drawOrder\";\n TimelineType[TimelineType[\"ikConstraint\"] = 9] = \"ikConstraint\";\n TimelineType[TimelineType[\"transformConstraint\"] = 10] = \"transformConstraint\";\n TimelineType[TimelineType[\"pathConstraintPosition\"] = 11] = \"pathConstraintPosition\";\n TimelineType[TimelineType[\"pathConstraintSpacing\"] = 12] = \"pathConstraintSpacing\";\n TimelineType[TimelineType[\"pathConstraintMix\"] = 13] = \"pathConstraintMix\";\n TimelineType[TimelineType[\"twoColor\"] = 14] = \"twoColor\";\n })(TimelineType = spine.TimelineType || (spine.TimelineType = {}));\n var CurveTimeline = (function () {\n function CurveTimeline(frameCount) {\n if (frameCount <= 0)\n throw new Error(\"frameCount must be > 0: \" + frameCount);\n this.curves = spine.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\n }\n CurveTimeline.prototype.getFrameCount = function () {\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\n };\n CurveTimeline.prototype.setLinear = function (frameIndex) {\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\n };\n CurveTimeline.prototype.setStepped = function (frameIndex) {\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\n };\n CurveTimeline.prototype.getCurveType = function (frameIndex) {\n var index = frameIndex * CurveTimeline.BEZIER_SIZE;\n if (index == this.curves.length)\n return CurveTimeline.LINEAR;\n var type = this.curves[index];\n if (type == CurveTimeline.LINEAR)\n return CurveTimeline.LINEAR;\n if (type == CurveTimeline.STEPPED)\n return CurveTimeline.STEPPED;\n return CurveTimeline.BEZIER;\n };\n CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) {\n var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\n var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\n var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\n var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\n var curves = this.curves;\n curves[i++] = CurveTimeline.BEZIER;\n var x = dfx, y = dfy;\n for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n x += dfx;\n y += dfy;\n }\n };\n CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) {\n percent = spine.MathUtils.clamp(percent, 0, 1);\n var curves = this.curves;\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\n var type = curves[i];\n if (type == CurveTimeline.LINEAR)\n return percent;\n if (type == CurveTimeline.STEPPED)\n return 0;\n i++;\n var x = 0;\n for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\n x = curves[i];\n if (x >= percent) {\n var prevX = void 0, prevY = void 0;\n if (i == start) {\n prevX = 0;\n prevY = 0;\n }\n else {\n prevX = curves[i - 2];\n prevY = curves[i - 1];\n }\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\n }\n }\n var y = curves[i - 1];\n return y + (1 - y) * (percent - x) / (1 - x);\n };\n CurveTimeline.LINEAR = 0;\n CurveTimeline.STEPPED = 1;\n CurveTimeline.BEZIER = 2;\n CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;\n return CurveTimeline;\n }());\n spine.CurveTimeline = CurveTimeline;\n var RotateTimeline = (function (_super) {\n __extends(RotateTimeline, _super);\n function RotateTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount << 1);\n return _this;\n }\n RotateTimeline.prototype.getPropertyId = function () {\n return (TimelineType.rotate << 24) + this.boneIndex;\n };\n RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) {\n frameIndex <<= 1;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\n };\n RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var frames = this.frames;\n var bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.rotation = bone.data.rotation;\n return;\n case MixBlend.first:\n var r_1 = bone.data.rotation - bone.rotation;\n bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha;\n }\n return;\n }\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) {\n var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION];\n switch (blend) {\n case MixBlend.setup:\n bone.rotation = bone.data.rotation + r_2 * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n r_2 += bone.data.rotation - bone.rotation;\n r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360;\n case MixBlend.add:\n bone.rotation += r_2 * alpha;\n }\n return;\n }\n var frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\n var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\n var r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\n switch (blend) {\n case MixBlend.setup:\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n r += bone.data.rotation - bone.rotation;\n case MixBlend.add:\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\n }\n };\n RotateTimeline.ENTRIES = 2;\n RotateTimeline.PREV_TIME = -2;\n RotateTimeline.PREV_ROTATION = -1;\n RotateTimeline.ROTATION = 1;\n return RotateTimeline;\n }(CurveTimeline));\n spine.RotateTimeline = RotateTimeline;\n var TranslateTimeline = (function (_super) {\n __extends(TranslateTimeline, _super);\n function TranslateTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\n return _this;\n }\n TranslateTimeline.prototype.getPropertyId = function () {\n return (TimelineType.translate << 24) + this.boneIndex;\n };\n TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) {\n frameIndex *= TranslateTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TranslateTimeline.X] = x;\n this.frames[frameIndex + TranslateTimeline.Y] = y;\n };\n TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var frames = this.frames;\n var bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.x = bone.data.x;\n bone.y = bone.data.y;\n return;\n case MixBlend.first:\n bone.x += (bone.data.x - bone.x) * alpha;\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n var x = 0, y = 0;\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) {\n x = frames[frames.length + TranslateTimeline.PREV_X];\n y = frames[frames.length + TranslateTimeline.PREV_Y];\n }\n else {\n var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\n x = frames[frame + TranslateTimeline.PREV_X];\n y = frames[frame + TranslateTimeline.PREV_Y];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\n }\n switch (blend) {\n case MixBlend.setup:\n bone.x = bone.data.x + x * alpha;\n bone.y = bone.data.y + y * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bone.x += (bone.data.x + x - bone.x) * alpha;\n bone.y += (bone.data.y + y - bone.y) * alpha;\n break;\n case MixBlend.add:\n bone.x += x * alpha;\n bone.y += y * alpha;\n }\n };\n TranslateTimeline.ENTRIES = 3;\n TranslateTimeline.PREV_TIME = -3;\n TranslateTimeline.PREV_X = -2;\n TranslateTimeline.PREV_Y = -1;\n TranslateTimeline.X = 1;\n TranslateTimeline.Y = 2;\n return TranslateTimeline;\n }(CurveTimeline));\n spine.TranslateTimeline = TranslateTimeline;\n var ScaleTimeline = (function (_super) {\n __extends(ScaleTimeline, _super);\n function ScaleTimeline(frameCount) {\n return _super.call(this, frameCount) || this;\n }\n ScaleTimeline.prototype.getPropertyId = function () {\n return (TimelineType.scale << 24) + this.boneIndex;\n };\n ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var frames = this.frames;\n var bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.scaleX = bone.data.scaleX;\n bone.scaleY = bone.data.scaleY;\n return;\n case MixBlend.first:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n var x = 0, y = 0;\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) {\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\n }\n else {\n var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\n x = frames[frame + ScaleTimeline.PREV_X];\n y = frames[frame + ScaleTimeline.PREV_Y];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\n }\n if (alpha == 1) {\n if (blend == MixBlend.add) {\n bone.scaleX += x - bone.data.scaleX;\n bone.scaleY += y - bone.data.scaleY;\n }\n else {\n bone.scaleX = x;\n bone.scaleY = y;\n }\n }\n else {\n var bx = 0, by = 0;\n if (direction == MixDirection.mixOut) {\n switch (blend) {\n case MixBlend.setup:\n bx = bone.data.scaleX;\n by = bone.data.scaleY;\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bx = bone.scaleX;\n by = bone.scaleY;\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\n break;\n case MixBlend.add:\n bx = bone.scaleX;\n by = bone.scaleY;\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bone.data.scaleX) * alpha;\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - bone.data.scaleY) * alpha;\n }\n }\n else {\n switch (blend) {\n case MixBlend.setup:\n bx = Math.abs(bone.data.scaleX) * spine.MathUtils.signum(x);\n by = Math.abs(bone.data.scaleY) * spine.MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bx = Math.abs(bone.scaleX) * spine.MathUtils.signum(x);\n by = Math.abs(bone.scaleY) * spine.MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case MixBlend.add:\n bx = spine.MathUtils.signum(x);\n by = spine.MathUtils.signum(y);\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\n }\n }\n }\n };\n return ScaleTimeline;\n }(TranslateTimeline));\n spine.ScaleTimeline = ScaleTimeline;\n var ShearTimeline = (function (_super) {\n __extends(ShearTimeline, _super);\n function ShearTimeline(frameCount) {\n return _super.call(this, frameCount) || this;\n }\n ShearTimeline.prototype.getPropertyId = function () {\n return (TimelineType.shear << 24) + this.boneIndex;\n };\n ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var frames = this.frames;\n var bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.shearX = bone.data.shearX;\n bone.shearY = bone.data.shearY;\n return;\n case MixBlend.first:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n var x = 0, y = 0;\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) {\n x = frames[frames.length + ShearTimeline.PREV_X];\n y = frames[frames.length + ShearTimeline.PREV_Y];\n }\n else {\n var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\n x = frames[frame + ShearTimeline.PREV_X];\n y = frames[frame + ShearTimeline.PREV_Y];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\n }\n switch (blend) {\n case MixBlend.setup:\n bone.shearX = bone.data.shearX + x * alpha;\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\n break;\n case MixBlend.add:\n bone.shearX += x * alpha;\n bone.shearY += y * alpha;\n }\n };\n return ShearTimeline;\n }(TranslateTimeline));\n spine.ShearTimeline = ShearTimeline;\n var ColorTimeline = (function (_super) {\n __extends(ColorTimeline, _super);\n function ColorTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\n return _this;\n }\n ColorTimeline.prototype.getPropertyId = function () {\n return (TimelineType.color << 24) + this.slotIndex;\n };\n ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) {\n frameIndex *= ColorTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + ColorTimeline.R] = r;\n this.frames[frameIndex + ColorTimeline.G] = g;\n this.frames[frameIndex + ColorTimeline.B] = b;\n this.frames[frameIndex + ColorTimeline.A] = a;\n };\n ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n var frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n slot.color.setFromColor(slot.data.color);\n return;\n case MixBlend.first:\n var color = slot.color, setup = slot.data.color;\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\n }\n return;\n }\n var r = 0, g = 0, b = 0, a = 0;\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) {\n var i = frames.length;\n r = frames[i + ColorTimeline.PREV_R];\n g = frames[i + ColorTimeline.PREV_G];\n b = frames[i + ColorTimeline.PREV_B];\n a = frames[i + ColorTimeline.PREV_A];\n }\n else {\n var frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\n r = frames[frame + ColorTimeline.PREV_R];\n g = frames[frame + ColorTimeline.PREV_G];\n b = frames[frame + ColorTimeline.PREV_B];\n a = frames[frame + ColorTimeline.PREV_A];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\n r += (frames[frame + ColorTimeline.R] - r) * percent;\n g += (frames[frame + ColorTimeline.G] - g) * percent;\n b += (frames[frame + ColorTimeline.B] - b) * percent;\n a += (frames[frame + ColorTimeline.A] - a) * percent;\n }\n if (alpha == 1)\n slot.color.set(r, g, b, a);\n else {\n var color = slot.color;\n if (blend == MixBlend.setup)\n color.setFromColor(slot.data.color);\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\n }\n };\n ColorTimeline.ENTRIES = 5;\n ColorTimeline.PREV_TIME = -5;\n ColorTimeline.PREV_R = -4;\n ColorTimeline.PREV_G = -3;\n ColorTimeline.PREV_B = -2;\n ColorTimeline.PREV_A = -1;\n ColorTimeline.R = 1;\n ColorTimeline.G = 2;\n ColorTimeline.B = 3;\n ColorTimeline.A = 4;\n return ColorTimeline;\n }(CurveTimeline));\n spine.ColorTimeline = ColorTimeline;\n var TwoColorTimeline = (function (_super) {\n __extends(TwoColorTimeline, _super);\n function TwoColorTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\n return _this;\n }\n TwoColorTimeline.prototype.getPropertyId = function () {\n return (TimelineType.twoColor << 24) + this.slotIndex;\n };\n TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) {\n frameIndex *= TwoColorTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TwoColorTimeline.R] = r;\n this.frames[frameIndex + TwoColorTimeline.G] = g;\n this.frames[frameIndex + TwoColorTimeline.B] = b;\n this.frames[frameIndex + TwoColorTimeline.A] = a;\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\n };\n TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n var frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n slot.color.setFromColor(slot.data.color);\n slot.darkColor.setFromColor(slot.data.darkColor);\n return;\n case MixBlend.first:\n var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\n }\n return;\n }\n var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) {\n var i = frames.length;\n r = frames[i + TwoColorTimeline.PREV_R];\n g = frames[i + TwoColorTimeline.PREV_G];\n b = frames[i + TwoColorTimeline.PREV_B];\n a = frames[i + TwoColorTimeline.PREV_A];\n r2 = frames[i + TwoColorTimeline.PREV_R2];\n g2 = frames[i + TwoColorTimeline.PREV_G2];\n b2 = frames[i + TwoColorTimeline.PREV_B2];\n }\n else {\n var frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\n r = frames[frame + TwoColorTimeline.PREV_R];\n g = frames[frame + TwoColorTimeline.PREV_G];\n b = frames[frame + TwoColorTimeline.PREV_B];\n a = frames[frame + TwoColorTimeline.PREV_A];\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\n }\n if (alpha == 1) {\n slot.color.set(r, g, b, a);\n slot.darkColor.set(r2, g2, b2, 1);\n }\n else {\n var light = slot.color, dark = slot.darkColor;\n if (blend == MixBlend.setup) {\n light.setFromColor(slot.data.color);\n dark.setFromColor(slot.data.darkColor);\n }\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\n }\n };\n TwoColorTimeline.ENTRIES = 8;\n TwoColorTimeline.PREV_TIME = -8;\n TwoColorTimeline.PREV_R = -7;\n TwoColorTimeline.PREV_G = -6;\n TwoColorTimeline.PREV_B = -5;\n TwoColorTimeline.PREV_A = -4;\n TwoColorTimeline.PREV_R2 = -3;\n TwoColorTimeline.PREV_G2 = -2;\n TwoColorTimeline.PREV_B2 = -1;\n TwoColorTimeline.R = 1;\n TwoColorTimeline.G = 2;\n TwoColorTimeline.B = 3;\n TwoColorTimeline.A = 4;\n TwoColorTimeline.R2 = 5;\n TwoColorTimeline.G2 = 6;\n TwoColorTimeline.B2 = 7;\n return TwoColorTimeline;\n }(CurveTimeline));\n spine.TwoColorTimeline = TwoColorTimeline;\n var AttachmentTimeline = (function () {\n function AttachmentTimeline(frameCount) {\n this.frames = spine.Utils.newFloatArray(frameCount);\n this.attachmentNames = new Array(frameCount);\n }\n AttachmentTimeline.prototype.getPropertyId = function () {\n return (TimelineType.attachment << 24) + this.slotIndex;\n };\n AttachmentTimeline.prototype.getFrameCount = function () {\n return this.frames.length;\n };\n AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) {\n this.frames[frameIndex] = time;\n this.attachmentNames[frameIndex] = attachmentName;\n };\n AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n if (direction == MixDirection.mixOut && blend == MixBlend.setup) {\n var attachmentName_1 = slot.data.attachmentName;\n slot.setAttachment(attachmentName_1 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_1));\n return;\n }\n var frames = this.frames;\n if (time < frames[0]) {\n if (blend == MixBlend.setup || blend == MixBlend.first) {\n var attachmentName_2 = slot.data.attachmentName;\n slot.setAttachment(attachmentName_2 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_2));\n }\n return;\n }\n var frameIndex = 0;\n if (time >= frames[frames.length - 1])\n frameIndex = frames.length - 1;\n else\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\n var attachmentName = this.attachmentNames[frameIndex];\n skeleton.slots[this.slotIndex]\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\n };\n return AttachmentTimeline;\n }());\n spine.AttachmentTimeline = AttachmentTimeline;\n var zeros = null;\n var DeformTimeline = (function (_super) {\n __extends(DeformTimeline, _super);\n function DeformTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount);\n _this.frameVertices = new Array(frameCount);\n if (zeros == null)\n zeros = spine.Utils.newFloatArray(64);\n return _this;\n }\n DeformTimeline.prototype.getPropertyId = function () {\n return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex;\n };\n DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) {\n this.frames[frameIndex] = time;\n this.frameVertices[frameIndex] = vertices;\n };\n DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n var slotAttachment = slot.getAttachment();\n if (!(slotAttachment instanceof spine.VertexAttachment) || !(slotAttachment.deformAttachment == this.attachment))\n return;\n var deformArray = slot.deform;\n if (deformArray.length == 0)\n blend = MixBlend.setup;\n var frameVertices = this.frameVertices;\n var vertexCount = frameVertices[0].length;\n var frames = this.frames;\n if (time < frames[0]) {\n var vertexAttachment = slotAttachment;\n switch (blend) {\n case MixBlend.setup:\n deformArray.length = 0;\n return;\n case MixBlend.first:\n if (alpha == 1) {\n deformArray.length = 0;\n break;\n }\n var deform_1 = spine.Utils.setArraySize(deformArray, vertexCount);\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i = 0; i < vertexCount; i++)\n deform_1[i] += (setupVertices[i] - deform_1[i]) * alpha;\n }\n else {\n alpha = 1 - alpha;\n for (var i = 0; i < vertexCount; i++)\n deform_1[i] *= alpha;\n }\n }\n return;\n }\n var deform = spine.Utils.setArraySize(deformArray, vertexCount);\n if (time >= frames[frames.length - 1]) {\n var lastVertices = frameVertices[frames.length - 1];\n if (alpha == 1) {\n if (blend == MixBlend.add) {\n var vertexAttachment = slotAttachment;\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i_1 = 0; i_1 < vertexCount; i_1++) {\n deform[i_1] += lastVertices[i_1] - setupVertices[i_1];\n }\n }\n else {\n for (var i_2 = 0; i_2 < vertexCount; i_2++)\n deform[i_2] += lastVertices[i_2];\n }\n }\n else {\n spine.Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\n }\n }\n else {\n switch (blend) {\n case MixBlend.setup: {\n var vertexAttachment_1 = slotAttachment;\n if (vertexAttachment_1.bones == null) {\n var setupVertices = vertexAttachment_1.vertices;\n for (var i_3 = 0; i_3 < vertexCount; i_3++) {\n var setup = setupVertices[i_3];\n deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha;\n }\n }\n else {\n for (var i_4 = 0; i_4 < vertexCount; i_4++)\n deform[i_4] = lastVertices[i_4] * alpha;\n }\n break;\n }\n case MixBlend.first:\n case MixBlend.replace:\n for (var i_5 = 0; i_5 < vertexCount; i_5++)\n deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha;\n case MixBlend.add:\n var vertexAttachment = slotAttachment;\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i_6 = 0; i_6 < vertexCount; i_6++) {\n deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha;\n }\n }\n else {\n for (var i_7 = 0; i_7 < vertexCount; i_7++)\n deform[i_7] += lastVertices[i_7] * alpha;\n }\n }\n }\n return;\n }\n var frame = Animation.binarySearch(frames, time);\n var prevVertices = frameVertices[frame - 1];\n var nextVertices = frameVertices[frame];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\n if (alpha == 1) {\n if (blend == MixBlend.add) {\n var vertexAttachment = slotAttachment;\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i_8 = 0; i_8 < vertexCount; i_8++) {\n var prev = prevVertices[i_8];\n deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8];\n }\n }\n else {\n for (var i_9 = 0; i_9 < vertexCount; i_9++) {\n var prev = prevVertices[i_9];\n deform[i_9] += prev + (nextVertices[i_9] - prev) * percent;\n }\n }\n }\n else {\n for (var i_10 = 0; i_10 < vertexCount; i_10++) {\n var prev = prevVertices[i_10];\n deform[i_10] = prev + (nextVertices[i_10] - prev) * percent;\n }\n }\n }\n else {\n switch (blend) {\n case MixBlend.setup: {\n var vertexAttachment_2 = slotAttachment;\n if (vertexAttachment_2.bones == null) {\n var setupVertices = vertexAttachment_2.vertices;\n for (var i_11 = 0; i_11 < vertexCount; i_11++) {\n var prev = prevVertices[i_11], setup = setupVertices[i_11];\n deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha;\n }\n }\n else {\n for (var i_12 = 0; i_12 < vertexCount; i_12++) {\n var prev = prevVertices[i_12];\n deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha;\n }\n }\n break;\n }\n case MixBlend.first:\n case MixBlend.replace:\n for (var i_13 = 0; i_13 < vertexCount; i_13++) {\n var prev = prevVertices[i_13];\n deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha;\n }\n break;\n case MixBlend.add:\n var vertexAttachment = slotAttachment;\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i_14 = 0; i_14 < vertexCount; i_14++) {\n var prev = prevVertices[i_14];\n deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha;\n }\n }\n else {\n for (var i_15 = 0; i_15 < vertexCount; i_15++) {\n var prev = prevVertices[i_15];\n deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha;\n }\n }\n }\n }\n };\n return DeformTimeline;\n }(CurveTimeline));\n spine.DeformTimeline = DeformTimeline;\n var EventTimeline = (function () {\n function EventTimeline(frameCount) {\n this.frames = spine.Utils.newFloatArray(frameCount);\n this.events = new Array(frameCount);\n }\n EventTimeline.prototype.getPropertyId = function () {\n return TimelineType.event << 24;\n };\n EventTimeline.prototype.getFrameCount = function () {\n return this.frames.length;\n };\n EventTimeline.prototype.setFrame = function (frameIndex, event) {\n this.frames[frameIndex] = event.time;\n this.events[frameIndex] = event;\n };\n EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (firedEvents == null)\n return;\n var frames = this.frames;\n var frameCount = this.frames.length;\n if (lastTime > time) {\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\n lastTime = -1;\n }\n else if (lastTime >= frames[frameCount - 1])\n return;\n if (time < frames[0])\n return;\n var frame = 0;\n if (lastTime < frames[0])\n frame = 0;\n else {\n frame = Animation.binarySearch(frames, lastTime);\n var frameTime = frames[frame];\n while (frame > 0) {\n if (frames[frame - 1] != frameTime)\n break;\n frame--;\n }\n }\n for (; frame < frameCount && time >= frames[frame]; frame++)\n firedEvents.push(this.events[frame]);\n };\n return EventTimeline;\n }());\n spine.EventTimeline = EventTimeline;\n var DrawOrderTimeline = (function () {\n function DrawOrderTimeline(frameCount) {\n this.frames = spine.Utils.newFloatArray(frameCount);\n this.drawOrders = new Array(frameCount);\n }\n DrawOrderTimeline.prototype.getPropertyId = function () {\n return TimelineType.drawOrder << 24;\n };\n DrawOrderTimeline.prototype.getFrameCount = function () {\n return this.frames.length;\n };\n DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) {\n this.frames[frameIndex] = time;\n this.drawOrders[frameIndex] = drawOrder;\n };\n DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var drawOrder = skeleton.drawOrder;\n var slots = skeleton.slots;\n if (direction == MixDirection.mixOut && blend == MixBlend.setup) {\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n var frames = this.frames;\n if (time < frames[0]) {\n if (blend == MixBlend.setup || blend == MixBlend.first)\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n var frame = 0;\n if (time >= frames[frames.length - 1])\n frame = frames.length - 1;\n else\n frame = Animation.binarySearch(frames, time) - 1;\n var drawOrderToSetupIndex = this.drawOrders[frame];\n if (drawOrderToSetupIndex == null)\n spine.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\n else {\n for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\n }\n };\n return DrawOrderTimeline;\n }());\n spine.DrawOrderTimeline = DrawOrderTimeline;\n var IkConstraintTimeline = (function (_super) {\n __extends(IkConstraintTimeline, _super);\n function IkConstraintTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\n return _this;\n }\n IkConstraintTimeline.prototype.getPropertyId = function () {\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\n };\n IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, softness, bendDirection, compress, stretch) {\n frameIndex *= IkConstraintTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\n };\n IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.ikConstraints[this.ikConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.mix = constraint.data.mix;\n constraint.softness = constraint.data.softness;\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n return;\n case MixBlend.first:\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n return;\n }\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) {\n if (blend == MixBlend.setup) {\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\n constraint.softness = constraint.data.softness\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\n if (direction == MixDirection.mixOut) {\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n else {\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n else {\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\n if (direction == MixDirection.mixIn) {\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n return;\n }\n var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\n var mix = frames[frame + IkConstraintTimeline.PREV_MIX];\n var softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\n if (blend == MixBlend.setup) {\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\n constraint.softness = constraint.data.softness\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\n if (direction == MixDirection.mixOut) {\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n else {\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n else {\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\n if (direction == MixDirection.mixIn) {\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n };\n IkConstraintTimeline.ENTRIES = 6;\n IkConstraintTimeline.PREV_TIME = -6;\n IkConstraintTimeline.PREV_MIX = -5;\n IkConstraintTimeline.PREV_SOFTNESS = -4;\n IkConstraintTimeline.PREV_BEND_DIRECTION = -3;\n IkConstraintTimeline.PREV_COMPRESS = -2;\n IkConstraintTimeline.PREV_STRETCH = -1;\n IkConstraintTimeline.MIX = 1;\n IkConstraintTimeline.SOFTNESS = 2;\n IkConstraintTimeline.BEND_DIRECTION = 3;\n IkConstraintTimeline.COMPRESS = 4;\n IkConstraintTimeline.STRETCH = 5;\n return IkConstraintTimeline;\n }(CurveTimeline));\n spine.IkConstraintTimeline = IkConstraintTimeline;\n var TransformConstraintTimeline = (function (_super) {\n __extends(TransformConstraintTimeline, _super);\n function TransformConstraintTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\n return _this;\n }\n TransformConstraintTimeline.prototype.getPropertyId = function () {\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\n };\n TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) {\n frameIndex *= TransformConstraintTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\n };\n TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.transformConstraints[this.transformConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n var data = constraint.data;\n switch (blend) {\n case MixBlend.setup:\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n constraint.scaleMix = data.scaleMix;\n constraint.shearMix = data.shearMix;\n return;\n case MixBlend.first:\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\n }\n return;\n }\n var rotate = 0, translate = 0, scale = 0, shear = 0;\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) {\n var i = frames.length;\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\n }\n else {\n var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\n }\n if (blend == MixBlend.setup) {\n var data = constraint.data;\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\n }\n else {\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\n }\n };\n TransformConstraintTimeline.ENTRIES = 5;\n TransformConstraintTimeline.PREV_TIME = -5;\n TransformConstraintTimeline.PREV_ROTATE = -4;\n TransformConstraintTimeline.PREV_TRANSLATE = -3;\n TransformConstraintTimeline.PREV_SCALE = -2;\n TransformConstraintTimeline.PREV_SHEAR = -1;\n TransformConstraintTimeline.ROTATE = 1;\n TransformConstraintTimeline.TRANSLATE = 2;\n TransformConstraintTimeline.SCALE = 3;\n TransformConstraintTimeline.SHEAR = 4;\n return TransformConstraintTimeline;\n }(CurveTimeline));\n spine.TransformConstraintTimeline = TransformConstraintTimeline;\n var PathConstraintPositionTimeline = (function (_super) {\n __extends(PathConstraintPositionTimeline, _super);\n function PathConstraintPositionTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\n return _this;\n }\n PathConstraintPositionTimeline.prototype.getPropertyId = function () {\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\n };\n PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) {\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\n };\n PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.position = constraint.data.position;\n return;\n case MixBlend.first:\n constraint.position += (constraint.data.position - constraint.position) * alpha;\n }\n return;\n }\n var position = 0;\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES])\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\n else {\n var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\n }\n if (blend == MixBlend.setup)\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\n else\n constraint.position += (position - constraint.position) * alpha;\n };\n PathConstraintPositionTimeline.ENTRIES = 2;\n PathConstraintPositionTimeline.PREV_TIME = -2;\n PathConstraintPositionTimeline.PREV_VALUE = -1;\n PathConstraintPositionTimeline.VALUE = 1;\n return PathConstraintPositionTimeline;\n }(CurveTimeline));\n spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;\n var PathConstraintSpacingTimeline = (function (_super) {\n __extends(PathConstraintSpacingTimeline, _super);\n function PathConstraintSpacingTimeline(frameCount) {\n return _super.call(this, frameCount) || this;\n }\n PathConstraintSpacingTimeline.prototype.getPropertyId = function () {\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\n };\n PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.spacing = constraint.data.spacing;\n return;\n case MixBlend.first:\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\n }\n return;\n }\n var spacing = 0;\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES])\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\n else {\n var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\n }\n if (blend == MixBlend.setup)\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\n else\n constraint.spacing += (spacing - constraint.spacing) * alpha;\n };\n return PathConstraintSpacingTimeline;\n }(PathConstraintPositionTimeline));\n spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline;\n var PathConstraintMixTimeline = (function (_super) {\n __extends(PathConstraintMixTimeline, _super);\n function PathConstraintMixTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\n return _this;\n }\n PathConstraintMixTimeline.prototype.getPropertyId = function () {\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\n };\n PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) {\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\n };\n PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.rotateMix = constraint.data.rotateMix;\n constraint.translateMix = constraint.data.translateMix;\n return;\n case MixBlend.first:\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\n }\n return;\n }\n var rotate = 0, translate = 0;\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) {\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\n }\n else {\n var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\n }\n if (blend == MixBlend.setup) {\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\n }\n else {\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\n }\n };\n PathConstraintMixTimeline.ENTRIES = 3;\n PathConstraintMixTimeline.PREV_TIME = -3;\n PathConstraintMixTimeline.PREV_ROTATE = -2;\n PathConstraintMixTimeline.PREV_TRANSLATE = -1;\n PathConstraintMixTimeline.ROTATE = 1;\n PathConstraintMixTimeline.TRANSLATE = 2;\n return PathConstraintMixTimeline;\n }(CurveTimeline));\n spine.PathConstraintMixTimeline = PathConstraintMixTimeline;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AnimationState = (function () {\n function AnimationState(data) {\n this.tracks = new Array();\n this.timeScale = 1;\n this.events = new Array();\n this.listeners = new Array();\n this.queue = new EventQueue(this);\n this.propertyIDs = new spine.IntSet();\n this.animationsChanged = false;\n this.trackEntryPool = new spine.Pool(function () { return new TrackEntry(); });\n this.data = data;\n }\n AnimationState.prototype.update = function (delta) {\n delta *= this.timeScale;\n var tracks = this.tracks;\n for (var i = 0, n = tracks.length; i < n; i++) {\n var current = tracks[i];\n if (current == null)\n continue;\n current.animationLast = current.nextAnimationLast;\n current.trackLast = current.nextTrackLast;\n var currentDelta = delta * current.timeScale;\n if (current.delay > 0) {\n current.delay -= currentDelta;\n if (current.delay > 0)\n continue;\n currentDelta = -current.delay;\n current.delay = 0;\n }\n var next = current.next;\n if (next != null) {\n var nextTime = current.trackLast - next.delay;\n if (nextTime >= 0) {\n next.delay = 0;\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\n current.trackTime += currentDelta;\n this.setCurrent(i, next, true);\n while (next.mixingFrom != null) {\n next.mixTime += delta;\n next = next.mixingFrom;\n }\n continue;\n }\n }\n else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\n tracks[i] = null;\n this.queue.end(current);\n this.disposeNext(current);\n continue;\n }\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\n var from = current.mixingFrom;\n current.mixingFrom = null;\n if (from != null)\n from.mixingTo = null;\n while (from != null) {\n this.queue.end(from);\n from = from.mixingFrom;\n }\n }\n current.trackTime += currentDelta;\n }\n this.queue.drain();\n };\n AnimationState.prototype.updateMixingFrom = function (to, delta) {\n var from = to.mixingFrom;\n if (from == null)\n return true;\n var finished = this.updateMixingFrom(from, delta);\n from.animationLast = from.nextAnimationLast;\n from.trackLast = from.nextTrackLast;\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\n to.mixingFrom = from.mixingFrom;\n if (from.mixingFrom != null)\n from.mixingFrom.mixingTo = to;\n to.interruptAlpha = from.interruptAlpha;\n this.queue.end(from);\n }\n return finished;\n }\n from.trackTime += delta * from.timeScale;\n to.mixTime += delta;\n return false;\n };\n AnimationState.prototype.apply = function (skeleton) {\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n if (this.animationsChanged)\n this._animationsChanged();\n var events = this.events;\n var tracks = this.tracks;\n var applied = false;\n for (var i = 0, n = tracks.length; i < n; i++) {\n var current = tracks[i];\n if (current == null || current.delay > 0)\n continue;\n applied = true;\n var blend = i == 0 ? spine.MixBlend.first : current.mixBlend;\n var mix = current.alpha;\n if (current.mixingFrom != null)\n mix *= this.applyMixingFrom(current, skeleton, blend);\n else if (current.trackTime >= current.trackEnd && current.next == null)\n mix = 0;\n var animationLast = current.animationLast, animationTime = current.getAnimationTime();\n var timelineCount = current.animation.timelines.length;\n var timelines = current.animation.timelines;\n if ((i == 0 && mix == 1) || blend == spine.MixBlend.add) {\n for (var ii = 0; ii < timelineCount; ii++) {\n spine.Utils.webkit602BugfixHelper(mix, blend);\n timelines[ii].apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn);\n }\n }\n else {\n var timelineMode = current.timelineMode;\n var firstFrame = current.timelinesRotation.length == 0;\n if (firstFrame)\n spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\n var timelinesRotation = current.timelinesRotation;\n for (var ii = 0; ii < timelineCount; ii++) {\n var timeline = timelines[ii];\n var timelineBlend = (timelineMode[ii] & (AnimationState.NOT_LAST - 1)) == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup;\n if (timeline instanceof spine.RotateTimeline) {\n this.applyRotateTimeline(timeline, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\n }\n else {\n spine.Utils.webkit602BugfixHelper(mix, blend);\n timeline.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn);\n }\n }\n }\n this.queueEvents(current, animationTime);\n events.length = 0;\n current.nextAnimationLast = animationTime;\n current.nextTrackLast = current.trackTime;\n }\n this.queue.drain();\n return applied;\n };\n AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) {\n var from = to.mixingFrom;\n if (from.mixingFrom != null)\n this.applyMixingFrom(from, skeleton, blend);\n var mix = 0;\n if (to.mixDuration == 0) {\n mix = 1;\n if (blend == spine.MixBlend.first)\n blend = spine.MixBlend.setup;\n }\n else {\n mix = to.mixTime / to.mixDuration;\n if (mix > 1)\n mix = 1;\n if (blend != spine.MixBlend.first)\n blend = from.mixBlend;\n }\n var events = mix < from.eventThreshold ? this.events : null;\n var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\n var animationLast = from.animationLast, animationTime = from.getAnimationTime();\n var timelineCount = from.animation.timelines.length;\n var timelines = from.animation.timelines;\n var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\n if (blend == spine.MixBlend.add) {\n for (var i = 0; i < timelineCount; i++)\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, spine.MixDirection.mixOut);\n }\n else {\n var timelineMode = from.timelineMode;\n var timelineHoldMix = from.timelineHoldMix;\n var firstFrame = from.timelinesRotation.length == 0;\n if (firstFrame)\n spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\n var timelinesRotation = from.timelinesRotation;\n from.totalAlpha = 0;\n for (var i = 0; i < timelineCount; i++) {\n var timeline = timelines[i];\n var direction = spine.MixDirection.mixOut;\n var timelineBlend = void 0;\n var alpha = 0;\n switch (timelineMode[i] & (AnimationState.NOT_LAST - 1)) {\n case AnimationState.SUBSEQUENT:\n timelineBlend = blend;\n if (!attachments && timeline instanceof spine.AttachmentTimeline) {\n if ((timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST)\n continue;\n timelineBlend = spine.MixBlend.setup;\n }\n if (!drawOrder && timeline instanceof spine.DrawOrderTimeline)\n continue;\n alpha = alphaMix;\n break;\n case AnimationState.FIRST:\n timelineBlend = spine.MixBlend.setup;\n alpha = alphaMix;\n break;\n case AnimationState.HOLD:\n timelineBlend = spine.MixBlend.setup;\n alpha = alphaHold;\n break;\n default:\n timelineBlend = spine.MixBlend.setup;\n var holdMix = timelineHoldMix[i];\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\n break;\n }\n from.totalAlpha += alpha;\n if (timeline instanceof spine.RotateTimeline)\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\n else {\n spine.Utils.webkit602BugfixHelper(alpha, blend);\n if (timelineBlend == spine.MixBlend.setup) {\n if (timeline instanceof spine.AttachmentTimeline) {\n if (attachments || (timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST)\n direction = spine.MixDirection.mixIn;\n }\n else if (timeline instanceof spine.DrawOrderTimeline) {\n if (drawOrder)\n direction = spine.MixDirection.mixIn;\n }\n }\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\n }\n }\n }\n if (to.mixDuration > 0)\n this.queueEvents(from, animationTime);\n this.events.length = 0;\n from.nextAnimationLast = animationTime;\n from.nextTrackLast = from.trackTime;\n return mix;\n };\n AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\n if (firstFrame)\n timelinesRotation[i] = 0;\n if (alpha == 1) {\n timeline.apply(skeleton, 0, time, null, 1, blend, spine.MixDirection.mixIn);\n return;\n }\n var rotateTimeline = timeline;\n var frames = rotateTimeline.frames;\n var bone = skeleton.bones[rotateTimeline.boneIndex];\n if (!bone.active)\n return;\n var r1 = 0, r2 = 0;\n if (time < frames[0]) {\n switch (blend) {\n case spine.MixBlend.setup:\n bone.rotation = bone.data.rotation;\n default:\n return;\n case spine.MixBlend.first:\n r1 = bone.rotation;\n r2 = bone.data.rotation;\n }\n }\n else {\n r1 = blend == spine.MixBlend.setup ? bone.data.rotation : bone.rotation;\n if (time >= frames[frames.length - spine.RotateTimeline.ENTRIES])\n r2 = bone.data.rotation + frames[frames.length + spine.RotateTimeline.PREV_ROTATION];\n else {\n var frame = spine.Animation.binarySearch(frames, time, spine.RotateTimeline.ENTRIES);\n var prevRotation = frames[frame + spine.RotateTimeline.PREV_ROTATION];\n var frameTime = frames[frame];\n var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + spine.RotateTimeline.PREV_TIME] - frameTime));\n r2 = frames[frame + spine.RotateTimeline.ROTATION] - prevRotation;\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\n r2 = prevRotation + r2 * percent + bone.data.rotation;\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\n }\n }\n var total = 0, diff = r2 - r1;\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\n if (diff == 0) {\n total = timelinesRotation[i];\n }\n else {\n var lastTotal = 0, lastDiff = 0;\n if (firstFrame) {\n lastTotal = 0;\n lastDiff = diff;\n }\n else {\n lastTotal = timelinesRotation[i];\n lastDiff = timelinesRotation[i + 1];\n }\n var current = diff > 0, dir = lastTotal >= 0;\n if (spine.MathUtils.signum(lastDiff) != spine.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\n if (Math.abs(lastTotal) > 180)\n lastTotal += 360 * spine.MathUtils.signum(lastTotal);\n dir = current;\n }\n total = diff + lastTotal - lastTotal % 360;\n if (dir != current)\n total += 360 * spine.MathUtils.signum(lastTotal);\n timelinesRotation[i] = total;\n }\n timelinesRotation[i + 1] = diff;\n r1 += total * alpha;\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\n };\n AnimationState.prototype.queueEvents = function (entry, animationTime) {\n var animationStart = entry.animationStart, animationEnd = entry.animationEnd;\n var duration = animationEnd - animationStart;\n var trackLastWrapped = entry.trackLast % duration;\n var events = this.events;\n var i = 0, n = events.length;\n for (; i < n; i++) {\n var event_1 = events[i];\n if (event_1.time < trackLastWrapped)\n break;\n if (event_1.time > animationEnd)\n continue;\n this.queue.event(entry, event_1);\n }\n var complete = false;\n if (entry.loop)\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\n else\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\n if (complete)\n this.queue.complete(entry);\n for (; i < n; i++) {\n var event_2 = events[i];\n if (event_2.time < animationStart)\n continue;\n this.queue.event(entry, events[i]);\n }\n };\n AnimationState.prototype.clearTracks = function () {\n var oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (var i = 0, n = this.tracks.length; i < n; i++)\n this.clearTrack(i);\n this.tracks.length = 0;\n this.queue.drainDisabled = oldDrainDisabled;\n this.queue.drain();\n };\n AnimationState.prototype.clearTrack = function (trackIndex) {\n if (trackIndex >= this.tracks.length)\n return;\n var current = this.tracks[trackIndex];\n if (current == null)\n return;\n this.queue.end(current);\n this.disposeNext(current);\n var entry = current;\n while (true) {\n var from = entry.mixingFrom;\n if (from == null)\n break;\n this.queue.end(from);\n entry.mixingFrom = null;\n entry.mixingTo = null;\n entry = from;\n }\n this.tracks[current.trackIndex] = null;\n this.queue.drain();\n };\n AnimationState.prototype.setCurrent = function (index, current, interrupt) {\n var from = this.expandToIndex(index);\n this.tracks[index] = current;\n if (from != null) {\n if (interrupt)\n this.queue.interrupt(from);\n current.mixingFrom = from;\n from.mixingTo = current;\n current.mixTime = 0;\n if (from.mixingFrom != null && from.mixDuration > 0)\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\n from.timelinesRotation.length = 0;\n }\n this.queue.start(current);\n };\n AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\n var animation = this.data.skeletonData.findAnimation(animationName);\n if (animation == null)\n throw new Error(\"Animation not found: \" + animationName);\n return this.setAnimationWith(trackIndex, animation, loop);\n };\n AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\n if (animation == null)\n throw new Error(\"animation cannot be null.\");\n var interrupt = true;\n var current = this.expandToIndex(trackIndex);\n if (current != null) {\n if (current.nextTrackLast == -1) {\n this.tracks[trackIndex] = current.mixingFrom;\n this.queue.interrupt(current);\n this.queue.end(current);\n this.disposeNext(current);\n current = current.mixingFrom;\n interrupt = false;\n }\n else\n this.disposeNext(current);\n }\n var entry = this.trackEntry(trackIndex, animation, loop, current);\n this.setCurrent(trackIndex, entry, interrupt);\n this.queue.drain();\n return entry;\n };\n AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\n var animation = this.data.skeletonData.findAnimation(animationName);\n if (animation == null)\n throw new Error(\"Animation not found: \" + animationName);\n return this.addAnimationWith(trackIndex, animation, loop, delay);\n };\n AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\n if (animation == null)\n throw new Error(\"animation cannot be null.\");\n var last = this.expandToIndex(trackIndex);\n if (last != null) {\n while (last.next != null)\n last = last.next;\n }\n var entry = this.trackEntry(trackIndex, animation, loop, last);\n if (last == null) {\n this.setCurrent(trackIndex, entry, true);\n this.queue.drain();\n }\n else {\n last.next = entry;\n if (delay <= 0) {\n var duration = last.animationEnd - last.animationStart;\n if (duration != 0) {\n if (last.loop)\n delay += duration * (1 + ((last.trackTime / duration) | 0));\n else\n delay += Math.max(duration, last.trackTime);\n delay -= this.data.getMix(last.animation, animation);\n }\n else\n delay = last.trackTime;\n }\n }\n entry.delay = delay;\n return entry;\n };\n AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\n var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n };\n AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\n if (delay <= 0)\n delay -= mixDuration;\n var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n };\n AnimationState.prototype.setEmptyAnimations = function (mixDuration) {\n var oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (var i = 0, n = this.tracks.length; i < n; i++) {\n var current = this.tracks[i];\n if (current != null)\n this.setEmptyAnimation(current.trackIndex, mixDuration);\n }\n this.queue.drainDisabled = oldDrainDisabled;\n this.queue.drain();\n };\n AnimationState.prototype.expandToIndex = function (index) {\n if (index < this.tracks.length)\n return this.tracks[index];\n spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);\n this.tracks.length = index + 1;\n return null;\n };\n AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\n var entry = this.trackEntryPool.obtain();\n entry.trackIndex = trackIndex;\n entry.animation = animation;\n entry.loop = loop;\n entry.holdPrevious = false;\n entry.eventThreshold = 0;\n entry.attachmentThreshold = 0;\n entry.drawOrderThreshold = 0;\n entry.animationStart = 0;\n entry.animationEnd = animation.duration;\n entry.animationLast = -1;\n entry.nextAnimationLast = -1;\n entry.delay = 0;\n entry.trackTime = 0;\n entry.trackLast = -1;\n entry.nextTrackLast = -1;\n entry.trackEnd = Number.MAX_VALUE;\n entry.timeScale = 1;\n entry.alpha = 1;\n entry.interruptAlpha = 1;\n entry.mixTime = 0;\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\n return entry;\n };\n AnimationState.prototype.disposeNext = function (entry) {\n var next = entry.next;\n while (next != null) {\n this.queue.dispose(next);\n next = next.next;\n }\n entry.next = null;\n };\n AnimationState.prototype._animationsChanged = function () {\n this.animationsChanged = false;\n this.propertyIDs.clear();\n for (var i = 0, n = this.tracks.length; i < n; i++) {\n var entry = this.tracks[i];\n if (entry == null)\n continue;\n while (entry.mixingFrom != null)\n entry = entry.mixingFrom;\n do {\n if (entry.mixingFrom == null || entry.mixBlend != spine.MixBlend.add)\n this.computeHold(entry);\n entry = entry.mixingTo;\n } while (entry != null);\n }\n this.propertyIDs.clear();\n for (var i = this.tracks.length - 1; i >= 0; i--) {\n var entry = this.tracks[i];\n while (entry != null) {\n this.computeNotLast(entry);\n entry = entry.mixingFrom;\n }\n }\n };\n AnimationState.prototype.computeHold = function (entry) {\n var to = entry.mixingTo;\n var timelines = entry.animation.timelines;\n var timelinesCount = entry.animation.timelines.length;\n var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);\n entry.timelineHoldMix.length = 0;\n var timelineDipMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\n var propertyIDs = this.propertyIDs;\n if (to != null && to.holdPrevious) {\n for (var i = 0; i < timelinesCount; i++) {\n propertyIDs.add(timelines[i].getPropertyId());\n timelineMode[i] = AnimationState.HOLD;\n }\n return;\n }\n outer: for (var i = 0; i < timelinesCount; i++) {\n var timeline = timelines[i];\n var id = timeline.getPropertyId();\n if (!propertyIDs.add(id))\n timelineMode[i] = AnimationState.SUBSEQUENT;\n else if (to == null || timeline instanceof spine.AttachmentTimeline || timeline instanceof spine.DrawOrderTimeline\n || timeline instanceof spine.EventTimeline || !to.animation.hasTimeline(id)) {\n timelineMode[i] = AnimationState.FIRST;\n }\n else {\n for (var next = to.mixingTo; next != null; next = next.mixingTo) {\n if (next.animation.hasTimeline(id))\n continue;\n if (entry.mixDuration > 0) {\n timelineMode[i] = AnimationState.HOLD_MIX;\n timelineDipMix[i] = next;\n continue outer;\n }\n break;\n }\n timelineMode[i] = AnimationState.HOLD;\n }\n }\n };\n AnimationState.prototype.computeNotLast = function (entry) {\n var timelines = entry.animation.timelines;\n var timelinesCount = entry.animation.timelines.length;\n var timelineMode = entry.timelineMode;\n var propertyIDs = this.propertyIDs;\n for (var i = 0; i < timelinesCount; i++) {\n if (timelines[i] instanceof spine.AttachmentTimeline) {\n var timeline = timelines[i];\n if (!propertyIDs.add(timeline.slotIndex))\n timelineMode[i] |= AnimationState.NOT_LAST;\n }\n }\n };\n AnimationState.prototype.getCurrent = function (trackIndex) {\n if (trackIndex >= this.tracks.length)\n return null;\n return this.tracks[trackIndex];\n };\n AnimationState.prototype.addListener = function (listener) {\n if (listener == null)\n throw new Error(\"listener cannot be null.\");\n this.listeners.push(listener);\n };\n AnimationState.prototype.removeListener = function (listener) {\n var index = this.listeners.indexOf(listener);\n if (index >= 0)\n this.listeners.splice(index, 1);\n };\n AnimationState.prototype.clearListeners = function () {\n this.listeners.length = 0;\n };\n AnimationState.prototype.clearListenerNotifications = function () {\n this.queue.clear();\n };\n AnimationState.emptyAnimation = new spine.Animation(\"<empty>\", [], 0);\n AnimationState.SUBSEQUENT = 0;\n AnimationState.FIRST = 1;\n AnimationState.HOLD = 2;\n AnimationState.HOLD_MIX = 3;\n AnimationState.NOT_LAST = 4;\n return AnimationState;\n }());\n spine.AnimationState = AnimationState;\n var TrackEntry = (function () {\n function TrackEntry() {\n this.mixBlend = spine.MixBlend.replace;\n this.timelineMode = new Array();\n this.timelineHoldMix = new Array();\n this.timelinesRotation = new Array();\n }\n TrackEntry.prototype.reset = function () {\n this.next = null;\n this.mixingFrom = null;\n this.mixingTo = null;\n this.animation = null;\n this.listener = null;\n this.timelineMode.length = 0;\n this.timelineHoldMix.length = 0;\n this.timelinesRotation.length = 0;\n };\n TrackEntry.prototype.getAnimationTime = function () {\n if (this.loop) {\n var duration = this.animationEnd - this.animationStart;\n if (duration == 0)\n return this.animationStart;\n return (this.trackTime % duration) + this.animationStart;\n }\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\n };\n TrackEntry.prototype.setAnimationLast = function (animationLast) {\n this.animationLast = animationLast;\n this.nextAnimationLast = animationLast;\n };\n TrackEntry.prototype.isComplete = function () {\n return this.trackTime >= this.animationEnd - this.animationStart;\n };\n TrackEntry.prototype.resetRotationDirections = function () {\n this.timelinesRotation.length = 0;\n };\n return TrackEntry;\n }());\n spine.TrackEntry = TrackEntry;\n var EventQueue = (function () {\n function EventQueue(animState) {\n this.objects = [];\n this.drainDisabled = false;\n this.animState = animState;\n }\n EventQueue.prototype.start = function (entry) {\n this.objects.push(EventType.start);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n };\n EventQueue.prototype.interrupt = function (entry) {\n this.objects.push(EventType.interrupt);\n this.objects.push(entry);\n };\n EventQueue.prototype.end = function (entry) {\n this.objects.push(EventType.end);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n };\n EventQueue.prototype.dispose = function (entry) {\n this.objects.push(EventType.dispose);\n this.objects.push(entry);\n };\n EventQueue.prototype.complete = function (entry) {\n this.objects.push(EventType.complete);\n this.objects.push(entry);\n };\n EventQueue.prototype.event = function (entry, event) {\n this.objects.push(EventType.event);\n this.objects.push(entry);\n this.objects.push(event);\n };\n EventQueue.prototype.drain = function () {\n if (this.drainDisabled)\n return;\n this.drainDisabled = true;\n var objects = this.objects;\n var listeners = this.animState.listeners;\n for (var i = 0; i < objects.length; i += 2) {\n var type = objects[i];\n var entry = objects[i + 1];\n switch (type) {\n case EventType.start:\n if (entry.listener != null && entry.listener.start)\n entry.listener.start(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].start)\n listeners[ii].start(entry);\n break;\n case EventType.interrupt:\n if (entry.listener != null && entry.listener.interrupt)\n entry.listener.interrupt(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].interrupt)\n listeners[ii].interrupt(entry);\n break;\n case EventType.end:\n if (entry.listener != null && entry.listener.end)\n entry.listener.end(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].end)\n listeners[ii].end(entry);\n case EventType.dispose:\n if (entry.listener != null && entry.listener.dispose)\n entry.listener.dispose(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].dispose)\n listeners[ii].dispose(entry);\n this.animState.trackEntryPool.free(entry);\n break;\n case EventType.complete:\n if (entry.listener != null && entry.listener.complete)\n entry.listener.complete(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].complete)\n listeners[ii].complete(entry);\n break;\n case EventType.event:\n var event_3 = objects[i++ + 2];\n if (entry.listener != null && entry.listener.event)\n entry.listener.event(entry, event_3);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].event)\n listeners[ii].event(entry, event_3);\n break;\n }\n }\n this.clear();\n this.drainDisabled = false;\n };\n EventQueue.prototype.clear = function () {\n this.objects.length = 0;\n };\n return EventQueue;\n }());\n spine.EventQueue = EventQueue;\n var EventType;\n (function (EventType) {\n EventType[EventType[\"start\"] = 0] = \"start\";\n EventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\n EventType[EventType[\"end\"] = 2] = \"end\";\n EventType[EventType[\"dispose\"] = 3] = \"dispose\";\n EventType[EventType[\"complete\"] = 4] = \"complete\";\n EventType[EventType[\"event\"] = 5] = \"event\";\n })(EventType = spine.EventType || (spine.EventType = {}));\n var AnimationStateAdapter = (function () {\n function AnimationStateAdapter() {\n }\n AnimationStateAdapter.prototype.start = function (entry) {\n };\n AnimationStateAdapter.prototype.interrupt = function (entry) {\n };\n AnimationStateAdapter.prototype.end = function (entry) {\n };\n AnimationStateAdapter.prototype.dispose = function (entry) {\n };\n AnimationStateAdapter.prototype.complete = function (entry) {\n };\n AnimationStateAdapter.prototype.event = function (entry, event) {\n };\n return AnimationStateAdapter;\n }());\n spine.AnimationStateAdapter = AnimationStateAdapter;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AnimationStateData = (function () {\n function AnimationStateData(skeletonData) {\n this.animationToMixTime = {};\n this.defaultMix = 0;\n if (skeletonData == null)\n throw new Error(\"skeletonData cannot be null.\");\n this.skeletonData = skeletonData;\n }\n AnimationStateData.prototype.setMix = function (fromName, toName, duration) {\n var from = this.skeletonData.findAnimation(fromName);\n if (from == null)\n throw new Error(\"Animation not found: \" + fromName);\n var to = this.skeletonData.findAnimation(toName);\n if (to == null)\n throw new Error(\"Animation not found: \" + toName);\n this.setMixWith(from, to, duration);\n };\n AnimationStateData.prototype.setMixWith = function (from, to, duration) {\n if (from == null)\n throw new Error(\"from cannot be null.\");\n if (to == null)\n throw new Error(\"to cannot be null.\");\n var key = from.name + \".\" + to.name;\n this.animationToMixTime[key] = duration;\n };\n AnimationStateData.prototype.getMix = function (from, to) {\n var key = from.name + \".\" + to.name;\n var value = this.animationToMixTime[key];\n return value === undefined ? this.defaultMix : value;\n };\n return AnimationStateData;\n }());\n spine.AnimationStateData = AnimationStateData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AssetManager = (function () {\n function AssetManager(textureLoader, pathPrefix) {\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\n this.assets = {};\n this.errors = {};\n this.toLoad = 0;\n this.loaded = 0;\n this.textureLoader = textureLoader;\n this.pathPrefix = pathPrefix;\n }\n AssetManager.downloadText = function (url, success, error) {\n var request = new XMLHttpRequest();\n request.open(\"GET\", url, true);\n request.onload = function () {\n if (request.status == 200) {\n success(request.responseText);\n }\n else {\n error(request.status, request.responseText);\n }\n };\n request.onerror = function () {\n error(request.status, request.responseText);\n };\n request.send();\n };\n AssetManager.downloadBinary = function (url, success, error) {\n var request = new XMLHttpRequest();\n request.open(\"GET\", url, true);\n request.responseType = \"arraybuffer\";\n request.onload = function () {\n if (request.status == 200) {\n success(new Uint8Array(request.response));\n }\n else {\n error(request.status, request.responseText);\n }\n };\n request.onerror = function () {\n error(request.status, request.responseText);\n };\n request.send();\n };\n AssetManager.prototype.loadBinary = function (path, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n path = this.pathPrefix + path;\n this.toLoad++;\n AssetManager.downloadBinary(path, function (data) {\n _this.assets[path] = data;\n if (success)\n success(path, data);\n _this.toLoad--;\n _this.loaded++;\n }, function (state, responseText) {\n _this.errors[path] = \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText;\n if (error)\n error(path, \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText);\n _this.toLoad--;\n _this.loaded++;\n });\n };\n AssetManager.prototype.loadText = function (path, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n path = this.pathPrefix + path;\n this.toLoad++;\n AssetManager.downloadText(path, function (data) {\n _this.assets[path] = data;\n if (success)\n success(path, data);\n _this.toLoad--;\n _this.loaded++;\n }, function (state, responseText) {\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText;\n if (error)\n error(path, \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText);\n _this.toLoad--;\n _this.loaded++;\n });\n };\n AssetManager.prototype.loadTexture = function (path, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n path = this.pathPrefix + path;\n this.toLoad++;\n var img = new Image();\n img.crossOrigin = \"anonymous\";\n img.onload = function (ev) {\n var texture = _this.textureLoader(img);\n _this.assets[path] = texture;\n _this.toLoad--;\n _this.loaded++;\n if (success)\n success(path, img);\n };\n img.onerror = function (ev) {\n _this.errors[path] = \"Couldn't load image \" + path;\n _this.toLoad--;\n _this.loaded++;\n if (error)\n error(path, \"Couldn't load image \" + path);\n };\n img.src = path;\n };\n AssetManager.prototype.loadTextureData = function (path, data, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n path = this.pathPrefix + path;\n this.toLoad++;\n var img = new Image();\n img.onload = function (ev) {\n var texture = _this.textureLoader(img);\n _this.assets[path] = texture;\n _this.toLoad--;\n _this.loaded++;\n if (success)\n success(path, img);\n };\n img.onerror = function (ev) {\n _this.errors[path] = \"Couldn't load image \" + path;\n _this.toLoad--;\n _this.loaded++;\n if (error)\n error(path, \"Couldn't load image \" + path);\n };\n img.src = data;\n };\n AssetManager.prototype.loadTextureAtlas = function (path, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n var parent = path.lastIndexOf(\"/\") >= 0 ? path.substring(0, path.lastIndexOf(\"/\")) : \"\";\n path = this.pathPrefix + path;\n this.toLoad++;\n AssetManager.downloadText(path, function (atlasData) {\n var pagesLoaded = { count: 0 };\n var atlasPages = new Array();\n try {\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\n atlasPages.push(parent + \"/\" + path);\n var image = document.createElement(\"img\");\n image.width = 16;\n image.height = 16;\n return new spine.FakeTexture(image);\n });\n }\n catch (e) {\n var ex = e;\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\n if (error)\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\n _this.toLoad--;\n _this.loaded++;\n return;\n }\n var _loop_1 = function (atlasPage) {\n var pageLoadError = false;\n _this.loadTexture(atlasPage, function (imagePath, image) {\n pagesLoaded.count++;\n if (pagesLoaded.count == atlasPages.length) {\n if (!pageLoadError) {\n try {\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\n return _this.get(parent + \"/\" + path);\n });\n _this.assets[path] = atlas;\n if (success)\n success(path, atlas);\n _this.toLoad--;\n _this.loaded++;\n }\n catch (e) {\n var ex = e;\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\n if (error)\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\n _this.toLoad--;\n _this.loaded++;\n }\n }\n else {\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\n if (error)\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\n _this.toLoad--;\n _this.loaded++;\n }\n }\n }, function (imagePath, errorMessage) {\n pageLoadError = true;\n pagesLoaded.count++;\n if (pagesLoaded.count == atlasPages.length) {\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\n if (error)\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\n _this.toLoad--;\n _this.loaded++;\n }\n });\n };\n for (var _i = 0, atlasPages_1 = atlasPages; _i < atlasPages_1.length; _i++) {\n var atlasPage = atlasPages_1[_i];\n _loop_1(atlasPage);\n }\n }, function (state, responseText) {\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText;\n if (error)\n error(path, \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText);\n _this.toLoad--;\n _this.loaded++;\n });\n };\n AssetManager.prototype.get = function (path) {\n path = this.pathPrefix + path;\n return this.assets[path];\n };\n AssetManager.prototype.remove = function (path) {\n path = this.pathPrefix + path;\n var asset = this.assets[path];\n if (asset.dispose)\n asset.dispose();\n this.assets[path] = null;\n };\n AssetManager.prototype.removeAll = function () {\n for (var key in this.assets) {\n var asset = this.assets[key];\n if (asset.dispose)\n asset.dispose();\n }\n this.assets = {};\n };\n AssetManager.prototype.isLoadingComplete = function () {\n return this.toLoad == 0;\n };\n AssetManager.prototype.getToLoad = function () {\n return this.toLoad;\n };\n AssetManager.prototype.getLoaded = function () {\n return this.loaded;\n };\n AssetManager.prototype.dispose = function () {\n this.removeAll();\n };\n AssetManager.prototype.hasErrors = function () {\n return Object.keys(this.errors).length > 0;\n };\n AssetManager.prototype.getErrors = function () {\n return this.errors;\n };\n return AssetManager;\n }());\n spine.AssetManager = AssetManager;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AtlasAttachmentLoader = (function () {\n function AtlasAttachmentLoader(atlas) {\n this.atlas = atlas;\n }\n AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\n var region = this.atlas.findRegion(path);\n if (region == null) {\n // throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\n return null;\n }\n region.renderObject = region;\n var attachment = new spine.RegionAttachment(name);\n attachment.setRegion(region);\n return attachment;\n };\n AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\n var region = this.atlas.findRegion(path);\n if (region == null) {\n // throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\n return null;\n }\n region.renderObject = region;\n var attachment = new spine.MeshAttachment(name);\n attachment.region = region;\n return attachment;\n };\n AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\n return new spine.BoundingBoxAttachment(name);\n };\n AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\n return new spine.PathAttachment(name);\n };\n AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\n return new spine.PointAttachment(name);\n };\n AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\n return new spine.ClippingAttachment(name);\n };\n return AtlasAttachmentLoader;\n }());\n spine.AtlasAttachmentLoader = AtlasAttachmentLoader;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var BlendMode;\n (function (BlendMode) {\n BlendMode[BlendMode[\"Normal\"] = 0] = \"Normal\";\n BlendMode[BlendMode[\"Additive\"] = 1] = \"Additive\";\n BlendMode[BlendMode[\"Multiply\"] = 2] = \"Multiply\";\n BlendMode[BlendMode[\"Screen\"] = 3] = \"Screen\";\n })(BlendMode = spine.BlendMode || (spine.BlendMode = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Bone = (function () {\n function Bone(data, skeleton, parent) {\n this.children = new Array();\n this.x = 0;\n this.y = 0;\n this.rotation = 0;\n this.scaleX = 0;\n this.scaleY = 0;\n this.shearX = 0;\n this.shearY = 0;\n this.ax = 0;\n this.ay = 0;\n this.arotation = 0;\n this.ascaleX = 0;\n this.ascaleY = 0;\n this.ashearX = 0;\n this.ashearY = 0;\n this.appliedValid = false;\n this.a = 0;\n this.b = 0;\n this.c = 0;\n this.d = 0;\n this.worldY = 0;\n this.worldX = 0;\n this.sorted = false;\n this.active = false;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.skeleton = skeleton;\n this.parent = parent;\n this.setToSetupPose();\n }\n Bone.prototype.isActive = function () {\n return this.active;\n };\n Bone.prototype.update = function () {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n };\n Bone.prototype.updateWorldTransform = function () {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n };\n Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\n this.ax = x;\n this.ay = y;\n this.arotation = rotation;\n this.ascaleX = scaleX;\n this.ascaleY = scaleY;\n this.ashearX = shearX;\n this.ashearY = shearY;\n this.appliedValid = true;\n var parent = this.parent;\n if (parent == null) {\n var skeleton = this.skeleton;\n var rotationY = rotation + 90 + shearY;\n var sx = skeleton.scaleX;\n var sy = skeleton.scaleY;\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sx;\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;\n this.worldX = x * sx + skeleton.x;\n this.worldY = y * sy + skeleton.y;\n return;\n }\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n this.worldX = pa * x + pb * y + parent.worldX;\n this.worldY = pc * x + pd * y + parent.worldY;\n switch (this.data.transformMode) {\n case spine.TransformMode.Normal: {\n var rotationY = rotation + 90 + shearY;\n var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\n var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;\n var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\n var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;\n this.a = pa * la + pb * lc;\n this.b = pa * lb + pb * ld;\n this.c = pc * la + pd * lc;\n this.d = pc * lb + pd * ld;\n return;\n }\n case spine.TransformMode.OnlyTranslation: {\n var rotationY = rotation + 90 + shearY;\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY;\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY;\n break;\n }\n case spine.TransformMode.NoRotationOrReflection: {\n var s = pa * pa + pc * pc;\n var prx = 0;\n if (s > 0.0001) {\n s = Math.abs(pa * pd - pb * pc) / s;\n pb = pc * s;\n pd = pa * s;\n prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg;\n }\n else {\n pa = 0;\n pc = 0;\n prx = 90 - Math.atan2(pd, pb) * spine.MathUtils.radDeg;\n }\n var rx = rotation + shearX - prx;\n var ry = rotation + shearY - prx + 90;\n var la = spine.MathUtils.cosDeg(rx) * scaleX;\n var lb = spine.MathUtils.cosDeg(ry) * scaleY;\n var lc = spine.MathUtils.sinDeg(rx) * scaleX;\n var ld = spine.MathUtils.sinDeg(ry) * scaleY;\n this.a = pa * la - pb * lc;\n this.b = pa * lb - pb * ld;\n this.c = pc * la + pd * lc;\n this.d = pc * lb + pd * ld;\n break;\n }\n case spine.TransformMode.NoScale:\n case spine.TransformMode.NoScaleOrReflection: {\n var cos = spine.MathUtils.cosDeg(rotation);\n var sin = spine.MathUtils.sinDeg(rotation);\n var za = (pa * cos + pb * sin) / this.skeleton.scaleX;\n var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\n var s = Math.sqrt(za * za + zc * zc);\n if (s > 0.00001)\n s = 1 / s;\n za *= s;\n zc *= s;\n s = Math.sqrt(za * za + zc * zc);\n if (this.data.transformMode == spine.TransformMode.NoScale\n && (pa * pd - pb * pc < 0) != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\n s = -s;\n var r = Math.PI / 2 + Math.atan2(zc, za);\n var zb = Math.cos(r) * s;\n var zd = Math.sin(r) * s;\n var la = spine.MathUtils.cosDeg(shearX) * scaleX;\n var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;\n var lc = spine.MathUtils.sinDeg(shearX) * scaleX;\n var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;\n this.a = za * la + zb * lc;\n this.b = za * lb + zb * ld;\n this.c = zc * la + zd * lc;\n this.d = zc * lb + zd * ld;\n break;\n }\n }\n this.a *= this.skeleton.scaleX;\n this.b *= this.skeleton.scaleX;\n this.c *= this.skeleton.scaleY;\n this.d *= this.skeleton.scaleY;\n };\n Bone.prototype.setToSetupPose = function () {\n var data = this.data;\n this.x = data.x;\n this.y = data.y;\n this.rotation = data.rotation;\n this.scaleX = data.scaleX;\n this.scaleY = data.scaleY;\n this.shearX = data.shearX;\n this.shearY = data.shearY;\n };\n Bone.prototype.getWorldRotationX = function () {\n return Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\n };\n Bone.prototype.getWorldRotationY = function () {\n return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg;\n };\n Bone.prototype.getWorldScaleX = function () {\n return Math.sqrt(this.a * this.a + this.c * this.c);\n };\n Bone.prototype.getWorldScaleY = function () {\n return Math.sqrt(this.b * this.b + this.d * this.d);\n };\n Bone.prototype.updateAppliedTransform = function () {\n this.appliedValid = true;\n var parent = this.parent;\n if (parent == null) {\n this.ax = this.worldX;\n this.ay = this.worldY;\n this.arotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\n this.ashearX = 0;\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * spine.MathUtils.radDeg;\n return;\n }\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n var pid = 1 / (pa * pd - pb * pc);\n var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\n this.ax = (dx * pd * pid - dy * pb * pid);\n this.ay = (dy * pa * pid - dx * pc * pid);\n var ia = pid * pd;\n var id = pid * pa;\n var ib = pid * pb;\n var ic = pid * pc;\n var ra = ia * this.a - ib * this.c;\n var rb = ia * this.b - ib * this.d;\n var rc = id * this.c - ic * this.a;\n var rd = id * this.d - ic * this.b;\n this.ashearX = 0;\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\n if (this.ascaleX > 0.0001) {\n var det = ra * rd - rb * rc;\n this.ascaleY = det / this.ascaleX;\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg;\n this.arotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg;\n }\n else {\n this.ascaleX = 0;\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\n this.ashearY = 0;\n this.arotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg;\n }\n };\n Bone.prototype.worldToLocal = function (world) {\n var a = this.a, b = this.b, c = this.c, d = this.d;\n var invDet = 1 / (a * d - b * c);\n var x = world.x - this.worldX, y = world.y - this.worldY;\n world.x = (x * d * invDet - y * b * invDet);\n world.y = (y * a * invDet - x * c * invDet);\n return world;\n };\n Bone.prototype.localToWorld = function (local) {\n var x = local.x, y = local.y;\n local.x = x * this.a + y * this.b + this.worldX;\n local.y = x * this.c + y * this.d + this.worldY;\n return local;\n };\n Bone.prototype.worldToLocalRotation = function (worldRotation) {\n var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;\n };\n Bone.prototype.localToWorldRotation = function (localRotation) {\n localRotation -= this.rotation - this.shearX;\n var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;\n };\n Bone.prototype.rotateWorld = function (degrees) {\n var a = this.a, b = this.b, c = this.c, d = this.d;\n var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees);\n this.a = cos * a - sin * c;\n this.b = cos * b - sin * d;\n this.c = sin * a + cos * c;\n this.d = sin * b + cos * d;\n this.appliedValid = false;\n };\n return Bone;\n }());\n spine.Bone = Bone;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var BoneData = (function () {\n function BoneData(index, name, parent) {\n this.x = 0;\n this.y = 0;\n this.rotation = 0;\n this.scaleX = 1;\n this.scaleY = 1;\n this.shearX = 0;\n this.shearY = 0;\n this.transformMode = TransformMode.Normal;\n this.skinRequired = false;\n this.color = new spine.Color();\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (name == null)\n throw new Error(\"name cannot be null.\");\n this.index = index;\n this.name = name;\n this.parent = parent;\n }\n return BoneData;\n }());\n spine.BoneData = BoneData;\n var TransformMode;\n (function (TransformMode) {\n TransformMode[TransformMode[\"Normal\"] = 0] = \"Normal\";\n TransformMode[TransformMode[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\n TransformMode[TransformMode[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\n TransformMode[TransformMode[\"NoScale\"] = 3] = \"NoScale\";\n TransformMode[TransformMode[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\n })(TransformMode = spine.TransformMode || (spine.TransformMode = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var ConstraintData = (function () {\n function ConstraintData(name, order, skinRequired) {\n this.name = name;\n this.order = order;\n this.skinRequired = skinRequired;\n }\n return ConstraintData;\n }());\n spine.ConstraintData = ConstraintData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Event = (function () {\n function Event(time, data) {\n if (data == null)\n throw new Error(\"data cannot be null.\");\n this.time = time;\n this.data = data;\n }\n return Event;\n }());\n spine.Event = Event;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var EventData = (function () {\n function EventData(name) {\n this.name = name;\n }\n return EventData;\n }());\n spine.EventData = EventData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var IkConstraint = (function () {\n function IkConstraint(data, skeleton) {\n this.bendDirection = 0;\n this.compress = false;\n this.stretch = false;\n this.mix = 1;\n this.softness = 0;\n this.active = false;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.mix = data.mix;\n this.softness = data.softness;\n this.bendDirection = data.bendDirection;\n this.compress = data.compress;\n this.stretch = data.stretch;\n this.bones = new Array();\n for (var i = 0; i < data.bones.length; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findBone(data.target.name);\n }\n IkConstraint.prototype.isActive = function () {\n return this.active;\n };\n IkConstraint.prototype.apply = function () {\n this.update();\n };\n IkConstraint.prototype.update = function () {\n var target = this.target;\n var bones = this.bones;\n switch (bones.length) {\n case 1:\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\n break;\n case 2:\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\n break;\n }\n };\n IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {\n if (!bone.appliedValid)\n bone.updateAppliedTransform();\n var p = bone.parent;\n var id = 1 / (p.a * p.d - p.b * p.c);\n var x = targetX - p.worldX, y = targetY - p.worldY;\n var tx = (x * p.d - y * p.b) * id - bone.ax, ty = (y * p.a - x * p.c) * id - bone.ay;\n var rotationIK = Math.atan2(ty, tx) * spine.MathUtils.radDeg - bone.ashearX - bone.arotation;\n if (bone.ascaleX < 0)\n rotationIK += 180;\n if (rotationIK > 180)\n rotationIK -= 360;\n else if (rotationIK < -180)\n rotationIK += 360;\n var sx = bone.ascaleX, sy = bone.ascaleY;\n if (compress || stretch) {\n var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\n var s = (dd / b - 1) * alpha + 1;\n sx *= s;\n if (uniform)\n sy *= s;\n }\n }\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);\n };\n IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {\n if (alpha == 0) {\n child.updateWorldTransform();\n return;\n }\n if (!parent.appliedValid)\n parent.updateAppliedTransform();\n if (!child.appliedValid)\n child.updateAppliedTransform();\n var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\n var os1 = 0, os2 = 0, s2 = 0;\n if (psx < 0) {\n psx = -psx;\n os1 = 180;\n s2 = -1;\n }\n else {\n os1 = 0;\n s2 = 1;\n }\n if (psy < 0) {\n psy = -psy;\n s2 = -s2;\n }\n if (csx < 0) {\n csx = -csx;\n os2 = 180;\n }\n else\n os2 = 0;\n var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\n var u = Math.abs(psx - psy) <= 0.0001;\n if (!u) {\n cy = 0;\n cwx = a * cx + parent.worldX;\n cwy = c * cx + parent.worldY;\n }\n else {\n cy = child.ay;\n cwx = a * cx + b * cy + parent.worldX;\n cwy = c * cx + d * cy + parent.worldY;\n }\n var pp = parent.parent;\n a = pp.a;\n b = pp.b;\n c = pp.c;\n d = pp.d;\n var id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\n var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\n var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\n if (l1 < 0.0001) {\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\n return;\n }\n x = targetX - pp.worldX;\n y = targetY - pp.worldY;\n var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\n var dd = tx * tx + ty * ty;\n if (softness != 0) {\n softness *= psx * (csx + 1) / 2;\n var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\n if (sd > 0) {\n var p = Math.min(1, sd / (softness * 2)) - 1;\n p = (sd - softness * (1 - p * p)) / td;\n tx -= p * tx;\n ty -= p * ty;\n dd = tx * tx + ty * ty;\n }\n }\n outer: if (u) {\n l2 *= psx;\n var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\n if (cos < -1)\n cos = -1;\n else if (cos > 1) {\n cos = 1;\n if (stretch)\n sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\n }\n a2 = Math.acos(cos) * bendDir;\n a = l1 + l2 * cos;\n b = l2 * Math.sin(a2);\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\n }\n else {\n a = psx * l2;\n b = psy * l2;\n var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\n c = bb * l1 * l1 + aa * dd - aa * bb;\n var c1 = -2 * bb * l1, c2 = bb - aa;\n d = c1 * c1 - 4 * c2 * c;\n if (d >= 0) {\n var q = Math.sqrt(d);\n if (c1 < 0)\n q = -q;\n q = -(c1 + q) / 2;\n var r0 = q / c2, r1 = c / q;\n var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\n if (r * r <= dd) {\n y = Math.sqrt(dd - r * r) * bendDir;\n a1 = ta - Math.atan2(y, r);\n a2 = Math.atan2(y / psy, (r - l1) / psx);\n break outer;\n }\n }\n var minAngle = spine.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\n var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\n c = -a * l1 / (aa - bb);\n if (c >= -1 && c <= 1) {\n c = Math.acos(c);\n x = a * Math.cos(c) + l1;\n y = b * Math.sin(c);\n d = x * x + y * y;\n if (d < minDist) {\n minAngle = c;\n minDist = d;\n minX = x;\n minY = y;\n }\n if (d > maxDist) {\n maxAngle = c;\n maxDist = d;\n maxX = x;\n maxY = y;\n }\n }\n if (dd <= (minDist + maxDist) / 2) {\n a1 = ta - Math.atan2(minY * bendDir, minX);\n a2 = minAngle * bendDir;\n }\n else {\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\n a2 = maxAngle * bendDir;\n }\n }\n var os = Math.atan2(cy, cx) * s2;\n var rotation = parent.arotation;\n a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation;\n if (a1 > 180)\n a1 -= 360;\n else if (a1 < -180)\n a1 += 360;\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\n rotation = child.arotation;\n a2 = ((a2 + os) * spine.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\n if (a2 > 180)\n a2 -= 360;\n else if (a2 < -180)\n a2 += 360;\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\n };\n return IkConstraint;\n }());\n spine.IkConstraint = IkConstraint;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var IkConstraintData = (function (_super) {\n __extends(IkConstraintData, _super);\n function IkConstraintData(name) {\n var _this = _super.call(this, name, 0, false) || this;\n _this.bones = new Array();\n _this.bendDirection = 1;\n _this.compress = false;\n _this.stretch = false;\n _this.uniform = false;\n _this.mix = 1;\n _this.softness = 0;\n return _this;\n }\n return IkConstraintData;\n }(spine.ConstraintData));\n spine.IkConstraintData = IkConstraintData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var PathConstraint = (function () {\n function PathConstraint(data, skeleton) {\n this.position = 0;\n this.spacing = 0;\n this.rotateMix = 0;\n this.translateMix = 0;\n this.spaces = new Array();\n this.positions = new Array();\n this.world = new Array();\n this.curves = new Array();\n this.lengths = new Array();\n this.segments = new Array();\n this.active = false;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (var i = 0, n = data.bones.length; i < n; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findSlot(data.target.name);\n this.position = data.position;\n this.spacing = data.spacing;\n this.rotateMix = data.rotateMix;\n this.translateMix = data.translateMix;\n }\n PathConstraint.prototype.isActive = function () {\n return this.active;\n };\n PathConstraint.prototype.apply = function () {\n this.update();\n };\n PathConstraint.prototype.update = function () {\n var attachment = this.target.getAttachment();\n if (!(attachment instanceof spine.PathAttachment))\n return;\n var rotateMix = this.rotateMix, translateMix = this.translateMix;\n var translate = translateMix > 0, rotate = rotateMix > 0;\n if (!translate && !rotate)\n return;\n var data = this.data;\n var percentSpacing = data.spacingMode == spine.SpacingMode.Percent;\n var rotateMode = data.rotateMode;\n var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale;\n var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\n var bones = this.bones;\n var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null;\n var spacing = this.spacing;\n if (scale || !percentSpacing) {\n if (scale)\n lengths = spine.Utils.setArraySize(this.lengths, boneCount);\n var lengthSpacing = data.spacingMode == spine.SpacingMode.Length;\n for (var i = 0, n = spacesCount - 1; i < n;) {\n var bone = bones[i];\n var setupLength = bone.data.length;\n if (setupLength < PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = 0;\n }\n else if (percentSpacing) {\n if (scale) {\n var x = setupLength * bone.a, y = setupLength * bone.c;\n var length_1 = Math.sqrt(x * x + y * y);\n lengths[i] = length_1;\n }\n spaces[++i] = spacing;\n }\n else {\n var x = setupLength * bone.a, y = setupLength * bone.c;\n var length_2 = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length_2;\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_2 / setupLength;\n }\n }\n }\n else {\n for (var i = 1; i < spacesCount; i++)\n spaces[i] = spacing;\n }\n var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, percentSpacing);\n var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\n var tip = false;\n if (offsetRotation == 0)\n tip = rotateMode == spine.RotateMode.Chain;\n else {\n tip = false;\n var p = this.target.bone;\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\n }\n for (var i = 0, p = 3; i < boneCount; i++, p += 3) {\n var bone = bones[i];\n bone.worldX += (boneX - bone.worldX) * translateMix;\n bone.worldY += (boneY - bone.worldY) * translateMix;\n var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\n if (scale) {\n var length_3 = lengths[i];\n if (length_3 != 0) {\n var s = (Math.sqrt(dx * dx + dy * dy) / length_3 - 1) * rotateMix + 1;\n bone.a *= s;\n bone.c *= s;\n }\n }\n boneX = x;\n boneY = y;\n if (rotate) {\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\n if (tangents)\n r = positions[p - 1];\n else if (spaces[i + 1] == 0)\n r = positions[p + 2];\n else\n r = Math.atan2(dy, dx);\n r -= Math.atan2(c, a);\n if (tip) {\n cos = Math.cos(r);\n sin = Math.sin(r);\n var length_4 = bone.data.length;\n boneX += (length_4 * (cos * a - sin * c) - dx) * rotateMix;\n boneY += (length_4 * (sin * a + cos * c) - dy) * rotateMix;\n }\n else {\n r += offsetRotation;\n }\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n r *= rotateMix;\n cos = Math.cos(r);\n sin = Math.sin(r);\n bone.a = cos * a - sin * c;\n bone.b = cos * b - sin * d;\n bone.c = sin * a + cos * c;\n bone.d = sin * b + cos * d;\n }\n bone.appliedValid = false;\n }\n };\n PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) {\n var target = this.target;\n var position = this.position;\n var spaces = this.spaces, out = spine.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\n var closed = path.closed;\n var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\n if (!path.constantSpeed) {\n var lengths = path.lengths;\n curveCount -= closed ? 1 : 2;\n var pathLength_1 = lengths[curveCount];\n if (percentPosition)\n position *= pathLength_1;\n if (percentSpacing) {\n for (var i = 1; i < spacesCount; i++)\n spaces[i] *= pathLength_1;\n }\n world = spine.Utils.setArraySize(this.world, 8);\n for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\n var space = spaces[i];\n position += space;\n var p = position;\n if (closed) {\n p %= pathLength_1;\n if (p < 0)\n p += pathLength_1;\n curve = 0;\n }\n else if (p < 0) {\n if (prevCurve != PathConstraint.BEFORE) {\n prevCurve = PathConstraint.BEFORE;\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\n }\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n }\n else if (p > pathLength_1) {\n if (prevCurve != PathConstraint.AFTER) {\n prevCurve = PathConstraint.AFTER;\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\n }\n this.addAfterPosition(p - pathLength_1, world, 0, out, o);\n continue;\n }\n for (;; curve++) {\n var length_5 = lengths[curve];\n if (p > length_5)\n continue;\n if (curve == 0)\n p /= length_5;\n else {\n var prev = lengths[curve - 1];\n p = (p - prev) / (length_5 - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n if (closed && curve == curveCount) {\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\n }\n else\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\n }\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\n }\n return out;\n }\n if (closed) {\n verticesLength += 2;\n world = spine.Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\n world[verticesLength - 2] = world[0];\n world[verticesLength - 1] = world[1];\n }\n else {\n curveCount--;\n verticesLength -= 4;\n world = spine.Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\n }\n var curves = spine.Utils.setArraySize(this.curves, curveCount);\n var pathLength = 0;\n var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\n var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\n for (var i = 0, w = 2; i < curveCount; i++, w += 6) {\n cx1 = world[w];\n cy1 = world[w + 1];\n cx2 = world[w + 2];\n cy2 = world[w + 3];\n x2 = world[w + 4];\n y2 = world[w + 5];\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\n ddfx = tmpx * 2 + dddfx;\n ddfy = tmpy * 2 + dddfy;\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx;\n dfy += ddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx + dddfx;\n dfy += ddfy + dddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n curves[i] = pathLength;\n x1 = x2;\n y1 = y2;\n }\n if (percentPosition)\n position *= pathLength;\n else\n position *= pathLength / path.lengths[curveCount - 1];\n if (percentSpacing) {\n for (var i = 1; i < spacesCount; i++)\n spaces[i] *= pathLength;\n }\n var segments = this.segments;\n var curveLength = 0;\n for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\n var space = spaces[i];\n position += space;\n var p = position;\n if (closed) {\n p %= pathLength;\n if (p < 0)\n p += pathLength;\n curve = 0;\n }\n else if (p < 0) {\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n }\n else if (p > pathLength) {\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\n continue;\n }\n for (;; curve++) {\n var length_6 = curves[curve];\n if (p > length_6)\n continue;\n if (curve == 0)\n p /= length_6;\n else {\n var prev = curves[curve - 1];\n p = (p - prev) / (length_6 - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n var ii = curve * 6;\n x1 = world[ii];\n y1 = world[ii + 1];\n cx1 = world[ii + 2];\n cy1 = world[ii + 3];\n cx2 = world[ii + 4];\n cy2 = world[ii + 5];\n x2 = world[ii + 6];\n y2 = world[ii + 7];\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\n ddfx = tmpx * 2 + dddfx;\n ddfy = tmpy * 2 + dddfy;\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\n segments[0] = curveLength;\n for (ii = 1; ii < 8; ii++) {\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[ii] = curveLength;\n }\n dfx += ddfx;\n dfy += ddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[8] = curveLength;\n dfx += ddfx + dddfx;\n dfy += ddfy + dddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[9] = curveLength;\n segment = 0;\n }\n p *= curveLength;\n for (;; segment++) {\n var length_7 = segments[segment];\n if (p > length_7)\n continue;\n if (segment == 0)\n p /= length_7;\n else {\n var prev = segments[segment - 1];\n p = segment + (p - prev) / (length_7 - prev);\n }\n break;\n }\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\n }\n return out;\n };\n PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\n var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\n out[o] = x1 + p * Math.cos(r);\n out[o + 1] = y1 + p * Math.sin(r);\n out[o + 2] = r;\n };\n PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\n var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\n out[o] = x1 + p * Math.cos(r);\n out[o + 1] = y1 + p * Math.sin(r);\n out[o + 2] = r;\n };\n PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\n if (p == 0 || isNaN(p)) {\n out[o] = x1;\n out[o + 1] = y1;\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\n return;\n }\n var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\n var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\n var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\n out[o] = x;\n out[o + 1] = y;\n if (tangents) {\n if (p < 0.001)\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\n else\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\n }\n };\n PathConstraint.NONE = -1;\n PathConstraint.BEFORE = -2;\n PathConstraint.AFTER = -3;\n PathConstraint.epsilon = 0.00001;\n return PathConstraint;\n }());\n spine.PathConstraint = PathConstraint;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var PathConstraintData = (function (_super) {\n __extends(PathConstraintData, _super);\n function PathConstraintData(name) {\n var _this = _super.call(this, name, 0, false) || this;\n _this.bones = new Array();\n return _this;\n }\n return PathConstraintData;\n }(spine.ConstraintData));\n spine.PathConstraintData = PathConstraintData;\n var PositionMode;\n (function (PositionMode) {\n PositionMode[PositionMode[\"Fixed\"] = 0] = \"Fixed\";\n PositionMode[PositionMode[\"Percent\"] = 1] = \"Percent\";\n })(PositionMode = spine.PositionMode || (spine.PositionMode = {}));\n var SpacingMode;\n (function (SpacingMode) {\n SpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\n SpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\n SpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\n })(SpacingMode = spine.SpacingMode || (spine.SpacingMode = {}));\n var RotateMode;\n (function (RotateMode) {\n RotateMode[RotateMode[\"Tangent\"] = 0] = \"Tangent\";\n RotateMode[RotateMode[\"Chain\"] = 1] = \"Chain\";\n RotateMode[RotateMode[\"ChainScale\"] = 2] = \"ChainScale\";\n })(RotateMode = spine.RotateMode || (spine.RotateMode = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Assets = (function () {\n function Assets(clientId) {\n this.toLoad = new Array();\n this.assets = {};\n this.clientId = clientId;\n }\n Assets.prototype.loaded = function () {\n var i = 0;\n for (var v in this.assets)\n i++;\n return i;\n };\n return Assets;\n }());\n var SharedAssetManager = (function () {\n function SharedAssetManager(pathPrefix) {\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\n this.clientAssets = {};\n this.queuedAssets = {};\n this.rawAssets = {};\n this.errors = {};\n this.pathPrefix = pathPrefix;\n }\n SharedAssetManager.prototype.queueAsset = function (clientId, textureLoader, path) {\n var clientAssets = this.clientAssets[clientId];\n if (clientAssets === null || clientAssets === undefined) {\n clientAssets = new Assets(clientId);\n this.clientAssets[clientId] = clientAssets;\n }\n if (textureLoader !== null)\n clientAssets.textureLoader = textureLoader;\n clientAssets.toLoad.push(path);\n if (this.queuedAssets[path] === path) {\n return false;\n }\n else {\n this.queuedAssets[path] = path;\n return true;\n }\n };\n SharedAssetManager.prototype.loadText = function (clientId, path) {\n var _this = this;\n path = this.pathPrefix + path;\n if (!this.queueAsset(clientId, null, path))\n return;\n var request = new XMLHttpRequest();\n request.onreadystatechange = function () {\n if (request.readyState == XMLHttpRequest.DONE) {\n if (request.status >= 200 && request.status < 300) {\n _this.rawAssets[path] = request.responseText;\n }\n else {\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\n }\n }\n };\n request.open(\"GET\", path, true);\n request.send();\n };\n SharedAssetManager.prototype.loadJson = function (clientId, path) {\n var _this = this;\n path = this.pathPrefix + path;\n if (!this.queueAsset(clientId, null, path))\n return;\n var request = new XMLHttpRequest();\n request.onreadystatechange = function () {\n if (request.readyState == XMLHttpRequest.DONE) {\n if (request.status >= 200 && request.status < 300) {\n _this.rawAssets[path] = JSON.parse(request.responseText);\n }\n else {\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\n }\n }\n };\n request.open(\"GET\", path, true);\n request.send();\n };\n SharedAssetManager.prototype.loadTexture = function (clientId, textureLoader, path) {\n var _this = this;\n path = this.pathPrefix + path;\n if (!this.queueAsset(clientId, textureLoader, path))\n return;\n var img = new Image();\n img.src = path;\n img.crossOrigin = \"anonymous\";\n img.onload = function (ev) {\n _this.rawAssets[path] = img;\n };\n img.onerror = function (ev) {\n _this.errors[path] = \"Couldn't load image \" + path;\n };\n };\n SharedAssetManager.prototype.get = function (clientId, path) {\n path = this.pathPrefix + path;\n var clientAssets = this.clientAssets[clientId];\n if (clientAssets === null || clientAssets === undefined)\n return true;\n return clientAssets.assets[path];\n };\n SharedAssetManager.prototype.updateClientAssets = function (clientAssets) {\n for (var i = 0; i < clientAssets.toLoad.length; i++) {\n var path = clientAssets.toLoad[i];\n var asset = clientAssets.assets[path];\n if (asset === null || asset === undefined) {\n var rawAsset = this.rawAssets[path];\n if (rawAsset === null || rawAsset === undefined)\n continue;\n if (rawAsset instanceof HTMLImageElement) {\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\n }\n else {\n clientAssets.assets[path] = rawAsset;\n }\n }\n }\n };\n SharedAssetManager.prototype.isLoadingComplete = function (clientId) {\n var clientAssets = this.clientAssets[clientId];\n if (clientAssets === null || clientAssets === undefined)\n return true;\n this.updateClientAssets(clientAssets);\n return clientAssets.toLoad.length == clientAssets.loaded();\n };\n SharedAssetManager.prototype.dispose = function () {\n };\n SharedAssetManager.prototype.hasErrors = function () {\n return Object.keys(this.errors).length > 0;\n };\n SharedAssetManager.prototype.getErrors = function () {\n return this.errors;\n };\n return SharedAssetManager;\n }());\n spine.SharedAssetManager = SharedAssetManager;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Skeleton = (function () {\n function Skeleton(data) {\n this._updateCache = new Array();\n this.updateCacheReset = new Array();\n this.time = 0;\n this.scaleX = 1;\n this.scaleY = 1;\n this.x = 0;\n this.y = 0;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (var i = 0; i < data.bones.length; i++) {\n var boneData = data.bones[i];\n var bone = void 0;\n if (boneData.parent == null)\n bone = new spine.Bone(boneData, this, null);\n else {\n var parent_1 = this.bones[boneData.parent.index];\n bone = new spine.Bone(boneData, this, parent_1);\n parent_1.children.push(bone);\n }\n this.bones.push(bone);\n }\n this.slots = new Array();\n this.drawOrder = new Array();\n for (var i = 0; i < data.slots.length; i++) {\n var slotData = data.slots[i];\n var bone = this.bones[slotData.boneData.index];\n var slot = new spine.Slot(slotData, bone);\n this.slots.push(slot);\n this.drawOrder.push(slot);\n }\n this.ikConstraints = new Array();\n for (var i = 0; i < data.ikConstraints.length; i++) {\n var ikConstraintData = data.ikConstraints[i];\n this.ikConstraints.push(new spine.IkConstraint(ikConstraintData, this));\n }\n this.transformConstraints = new Array();\n for (var i = 0; i < data.transformConstraints.length; i++) {\n var transformConstraintData = data.transformConstraints[i];\n this.transformConstraints.push(new spine.TransformConstraint(transformConstraintData, this));\n }\n this.pathConstraints = new Array();\n for (var i = 0; i < data.pathConstraints.length; i++) {\n var pathConstraintData = data.pathConstraints[i];\n this.pathConstraints.push(new spine.PathConstraint(pathConstraintData, this));\n }\n this.color = new spine.Color(1, 1, 1, 1);\n this.updateCache();\n }\n Skeleton.prototype.updateCache = function () {\n var updateCache = this._updateCache;\n updateCache.length = 0;\n this.updateCacheReset.length = 0;\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n bone.sorted = bone.data.skinRequired;\n bone.active = !bone.sorted;\n }\n if (this.skin != null) {\n var skinBones = this.skin.bones;\n for (var i = 0, n = this.skin.bones.length; i < n; i++) {\n var bone = this.bones[skinBones[i].index];\n do {\n bone.sorted = false;\n bone.active = true;\n bone = bone.parent;\n } while (bone != null);\n }\n }\n var ikConstraints = this.ikConstraints;\n var transformConstraints = this.transformConstraints;\n var pathConstraints = this.pathConstraints;\n var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\n var constraintCount = ikCount + transformCount + pathCount;\n outer: for (var i = 0; i < constraintCount; i++) {\n for (var ii = 0; ii < ikCount; ii++) {\n var constraint = ikConstraints[ii];\n if (constraint.data.order == i) {\n this.sortIkConstraint(constraint);\n continue outer;\n }\n }\n for (var ii = 0; ii < transformCount; ii++) {\n var constraint = transformConstraints[ii];\n if (constraint.data.order == i) {\n this.sortTransformConstraint(constraint);\n continue outer;\n }\n }\n for (var ii = 0; ii < pathCount; ii++) {\n var constraint = pathConstraints[ii];\n if (constraint.data.order == i) {\n this.sortPathConstraint(constraint);\n continue outer;\n }\n }\n }\n for (var i = 0, n = bones.length; i < n; i++)\n this.sortBone(bones[i]);\n };\n Skeleton.prototype.sortIkConstraint = function (constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\n if (!constraint.active)\n return;\n var target = constraint.target;\n this.sortBone(target);\n var constrained = constraint.bones;\n var parent = constrained[0];\n this.sortBone(parent);\n if (constrained.length > 1) {\n var child = constrained[constrained.length - 1];\n if (!(this._updateCache.indexOf(child) > -1))\n this.updateCacheReset.push(child);\n }\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n constrained[constrained.length - 1].sorted = true;\n };\n Skeleton.prototype.sortPathConstraint = function (constraint) {\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\n if (!constraint.active)\n return;\n var slot = constraint.target;\n var slotIndex = slot.data.index;\n var slotBone = slot.bone;\n if (this.skin != null)\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\n for (var i = 0, n = this.data.skins.length; i < n; i++)\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\n var attachment = slot.getAttachment();\n if (attachment instanceof spine.PathAttachment)\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\n var constrained = constraint.bones;\n var boneCount = constrained.length;\n for (var i = 0; i < boneCount; i++)\n this.sortBone(constrained[i]);\n this._updateCache.push(constraint);\n for (var i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (var i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n };\n Skeleton.prototype.sortTransformConstraint = function (constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\n if (!constraint.active)\n return;\n this.sortBone(constraint.target);\n var constrained = constraint.bones;\n var boneCount = constrained.length;\n if (constraint.data.local) {\n for (var i = 0; i < boneCount; i++) {\n var child = constrained[i];\n this.sortBone(child.parent);\n if (!(this._updateCache.indexOf(child) > -1))\n this.updateCacheReset.push(child);\n }\n }\n else {\n for (var i = 0; i < boneCount; i++) {\n this.sortBone(constrained[i]);\n }\n }\n this._updateCache.push(constraint);\n for (var ii = 0; ii < boneCount; ii++)\n this.sortReset(constrained[ii].children);\n for (var ii = 0; ii < boneCount; ii++)\n constrained[ii].sorted = true;\n };\n Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\n var attachments = skin.attachments[slotIndex];\n if (!attachments)\n return;\n for (var key in attachments) {\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\n }\n };\n Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\n if (!(attachment instanceof spine.PathAttachment))\n return;\n var pathBones = attachment.bones;\n if (pathBones == null)\n this.sortBone(slotBone);\n else {\n var bones = this.bones;\n var i = 0;\n while (i < pathBones.length) {\n var boneCount = pathBones[i++];\n for (var n = i + boneCount; i < n; i++) {\n var boneIndex = pathBones[i];\n this.sortBone(bones[boneIndex]);\n }\n }\n }\n };\n Skeleton.prototype.sortBone = function (bone) {\n if (bone.sorted)\n return;\n var parent = bone.parent;\n if (parent != null)\n this.sortBone(parent);\n bone.sorted = true;\n this._updateCache.push(bone);\n };\n Skeleton.prototype.sortReset = function (bones) {\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (!bone.active)\n continue;\n if (bone.sorted)\n this.sortReset(bone.children);\n bone.sorted = false;\n }\n };\n Skeleton.prototype.updateWorldTransform = function () {\n var updateCacheReset = this.updateCacheReset;\n for (var i = 0, n = updateCacheReset.length; i < n; i++) {\n var bone = updateCacheReset[i];\n bone.ax = bone.x;\n bone.ay = bone.y;\n bone.arotation = bone.rotation;\n bone.ascaleX = bone.scaleX;\n bone.ascaleY = bone.scaleY;\n bone.ashearX = bone.shearX;\n bone.ashearY = bone.shearY;\n bone.appliedValid = true;\n }\n var updateCache = this._updateCache;\n for (var i = 0, n = updateCache.length; i < n; i++)\n updateCache[i].update();\n };\n Skeleton.prototype.setToSetupPose = function () {\n this.setBonesToSetupPose();\n this.setSlotsToSetupPose();\n };\n Skeleton.prototype.setBonesToSetupPose = function () {\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++)\n bones[i].setToSetupPose();\n var ikConstraints = this.ikConstraints;\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\n var constraint = ikConstraints[i];\n constraint.mix = constraint.data.mix;\n constraint.softness = constraint.data.softness;\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n var transformConstraints = this.transformConstraints;\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\n var constraint = transformConstraints[i];\n var data = constraint.data;\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n constraint.scaleMix = data.scaleMix;\n constraint.shearMix = data.shearMix;\n }\n var pathConstraints = this.pathConstraints;\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\n var constraint = pathConstraints[i];\n var data = constraint.data;\n constraint.position = data.position;\n constraint.spacing = data.spacing;\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n }\n };\n Skeleton.prototype.setSlotsToSetupPose = function () {\n var slots = this.slots;\n spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\n for (var i = 0, n = slots.length; i < n; i++)\n slots[i].setToSetupPose();\n };\n Skeleton.prototype.getRootBone = function () {\n if (this.bones.length == 0)\n return null;\n return this.bones[0];\n };\n Skeleton.prototype.findBone = function (boneName) {\n if (boneName == null)\n throw new Error(\"boneName cannot be null.\");\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (bone.data.name == boneName)\n return bone;\n }\n return null;\n };\n Skeleton.prototype.findBoneIndex = function (boneName) {\n if (boneName == null)\n throw new Error(\"boneName cannot be null.\");\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++)\n if (bones[i].data.name == boneName)\n return i;\n return -1;\n };\n Skeleton.prototype.findSlot = function (slotName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (slot.data.name == slotName)\n return slot;\n }\n return null;\n };\n Skeleton.prototype.findSlotIndex = function (slotName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++)\n if (slots[i].data.name == slotName)\n return i;\n return -1;\n };\n Skeleton.prototype.setSkinByName = function (skinName) {\n var skin = this.data.findSkin(skinName);\n if (skin == null)\n throw new Error(\"Skin not found: \" + skinName);\n this.setSkin(skin);\n };\n Skeleton.prototype.setSkin = function (newSkin) {\n if (newSkin == this.skin)\n return;\n if (newSkin != null) {\n if (this.skin != null)\n newSkin.attachAll(this, this.skin);\n else {\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n var name_1 = slot.data.attachmentName;\n if (name_1 != null) {\n var attachment = newSkin.getAttachment(i, name_1);\n if (attachment != null)\n slot.setAttachment(attachment);\n }\n }\n }\n }\n this.skin = newSkin;\n this.updateCache();\n };\n Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\n };\n Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\n if (attachmentName == null)\n throw new Error(\"attachmentName cannot be null.\");\n if (this.skin != null) {\n var attachment = this.skin.getAttachment(slotIndex, attachmentName);\n if (attachment != null)\n return attachment;\n }\n if (this.data.defaultSkin != null)\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\n return null;\n };\n Skeleton.prototype.setAttachment = function (slotName, attachmentName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (slot.data.name == slotName) {\n var attachment = null;\n if (attachmentName != null) {\n attachment = this.getAttachment(i, attachmentName);\n if (attachment == null)\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\n }\n slot.setAttachment(attachment);\n return;\n }\n }\n throw new Error(\"Slot not found: \" + slotName);\n };\n Skeleton.prototype.findIkConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var ikConstraints = this.ikConstraints;\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\n var ikConstraint = ikConstraints[i];\n if (ikConstraint.data.name == constraintName)\n return ikConstraint;\n }\n return null;\n };\n Skeleton.prototype.findTransformConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var transformConstraints = this.transformConstraints;\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\n var constraint = transformConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n };\n Skeleton.prototype.findPathConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var pathConstraints = this.pathConstraints;\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\n var constraint = pathConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n };\n Skeleton.prototype.getBounds = function (offset, size, temp) {\n if (temp === void 0) { temp = new Array(2); }\n if (offset == null)\n throw new Error(\"offset cannot be null.\");\n if (size == null)\n throw new Error(\"size cannot be null.\");\n var drawOrder = this.drawOrder;\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n for (var i = 0, n = drawOrder.length; i < n; i++) {\n var slot = drawOrder[i];\n if (!slot.bone.active)\n continue;\n var verticesLength = 0;\n var vertices = null;\n var attachment = slot.getAttachment();\n if (attachment instanceof spine.RegionAttachment) {\n verticesLength = 8;\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\n attachment.computeWorldVertices(slot.bone, vertices, 0, 2);\n }\n else if (attachment instanceof spine.MeshAttachment) {\n var mesh = attachment;\n verticesLength = mesh.worldVerticesLength;\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\n }\n if (vertices != null) {\n for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\n var x = vertices[ii], y = vertices[ii + 1];\n minX = Math.min(minX, x);\n minY = Math.min(minY, y);\n maxX = Math.max(maxX, x);\n maxY = Math.max(maxY, y);\n }\n }\n }\n offset.set(minX, minY);\n size.set(maxX - minX, maxY - minY);\n };\n Skeleton.prototype.update = function (delta) {\n this.time += delta;\n };\n return Skeleton;\n }());\n spine.Skeleton = Skeleton;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonBinary = (function () {\n function SkeletonBinary(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n SkeletonBinary.prototype.readSkeletonData = function (binary) {\n var scale = this.scale;\n var skeletonData = new spine.SkeletonData();\n skeletonData.name = \"\";\n var input = new BinaryInput(binary);\n skeletonData.hash = input.readString();\n skeletonData.version = input.readString();\n skeletonData.x = input.readFloat();\n skeletonData.y = input.readFloat();\n skeletonData.width = input.readFloat();\n skeletonData.height = input.readFloat();\n var nonessential = input.readBoolean();\n if (nonessential) {\n skeletonData.fps = input.readFloat();\n skeletonData.imagesPath = input.readString();\n skeletonData.audioPath = input.readString();\n }\n var n = 0;\n n = input.readInt(true);\n for (var i = 0; i < n; i++)\n input.strings.push(input.readString());\n n = input.readInt(true);\n for (var i = 0; i < n; i++) {\n var name_2 = input.readString();\n var parent_2 = i == 0 ? null : skeletonData.bones[input.readInt(true)];\n var data = new spine.BoneData(i, name_2, parent_2);\n data.rotation = input.readFloat();\n data.x = input.readFloat() * scale;\n data.y = input.readFloat() * scale;\n data.scaleX = input.readFloat();\n data.scaleY = input.readFloat();\n data.shearX = input.readFloat();\n data.shearY = input.readFloat();\n data.length = input.readFloat() * scale;\n data.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\n data.skinRequired = input.readBoolean();\n if (nonessential)\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\n skeletonData.bones.push(data);\n }\n n = input.readInt(true);\n for (var i = 0; i < n; i++) {\n var slotName = input.readString();\n var boneData = skeletonData.bones[input.readInt(true)];\n var data = new spine.SlotData(i, slotName, boneData);\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\n var darkColor = input.readInt32();\n if (darkColor != -1)\n spine.Color.rgb888ToColor(data.darkColor = new spine.Color(), darkColor);\n data.attachmentName = input.readStringRef();\n data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\n skeletonData.slots.push(data);\n }\n n = input.readInt(true);\n for (var i = 0, nn = void 0; i < n; i++) {\n var data = new spine.IkConstraintData(input.readString());\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (var ii = 0; ii < nn; ii++)\n data.bones.push(skeletonData.bones[input.readInt(true)]);\n data.target = skeletonData.bones[input.readInt(true)];\n data.mix = input.readFloat();\n data.softness = input.readFloat() * scale;\n data.bendDirection = input.readByte();\n data.compress = input.readBoolean();\n data.stretch = input.readBoolean();\n data.uniform = input.readBoolean();\n skeletonData.ikConstraints.push(data);\n }\n n = input.readInt(true);\n for (var i = 0, nn = void 0; i < n; i++) {\n var data = new spine.TransformConstraintData(input.readString());\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (var ii = 0; ii < nn; ii++)\n data.bones.push(skeletonData.bones[input.readInt(true)]);\n data.target = skeletonData.bones[input.readInt(true)];\n data.local = input.readBoolean();\n data.relative = input.readBoolean();\n data.offsetRotation = input.readFloat();\n data.offsetX = input.readFloat() * scale;\n data.offsetY = input.readFloat() * scale;\n data.offsetScaleX = input.readFloat();\n data.offsetScaleY = input.readFloat();\n data.offsetShearY = input.readFloat();\n data.rotateMix = input.readFloat();\n data.translateMix = input.readFloat();\n data.scaleMix = input.readFloat();\n data.shearMix = input.readFloat();\n skeletonData.transformConstraints.push(data);\n }\n n = input.readInt(true);\n for (var i = 0, nn = void 0; i < n; i++) {\n var data = new spine.PathConstraintData(input.readString());\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (var ii = 0; ii < nn; ii++)\n data.bones.push(skeletonData.bones[input.readInt(true)]);\n data.target = skeletonData.slots[input.readInt(true)];\n data.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\n data.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\n data.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\n data.offsetRotation = input.readFloat();\n data.position = input.readFloat();\n if (data.positionMode == spine.PositionMode.Fixed)\n data.position *= scale;\n data.spacing = input.readFloat();\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\n data.spacing *= scale;\n data.rotateMix = input.readFloat();\n data.translateMix = input.readFloat();\n skeletonData.pathConstraints.push(data);\n }\n var defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\n if (defaultSkin != null) {\n skeletonData.defaultSkin = defaultSkin;\n skeletonData.skins.push(defaultSkin);\n }\n {\n var i = skeletonData.skins.length;\n spine.Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\n for (; i < n; i++)\n skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\n }\n n = this.linkedMeshes.length;\n for (var i = 0; i < n; i++) {\n var linkedMesh = this.linkedMeshes[i];\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (skin == null)\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\n var parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (parent_3 == null)\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_3 : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent_3);\n linkedMesh.mesh.updateUVs();\n }\n this.linkedMeshes.length = 0;\n n = input.readInt(true);\n for (var i = 0; i < n; i++) {\n var data = new spine.EventData(input.readStringRef());\n data.intValue = input.readInt(false);\n data.floatValue = input.readFloat();\n data.stringValue = input.readString();\n data.audioPath = input.readString();\n if (data.audioPath != null) {\n data.volume = input.readFloat();\n data.balance = input.readFloat();\n }\n skeletonData.events.push(data);\n }\n n = input.readInt(true);\n for (var i = 0; i < n; i++)\n skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\n return skeletonData;\n };\n SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) {\n var skin = null;\n var slotCount = 0;\n if (defaultSkin) {\n slotCount = input.readInt(true);\n if (slotCount == 0)\n return null;\n skin = new spine.Skin(\"default\");\n }\n else {\n skin = new spine.Skin(input.readStringRef());\n skin.bones.length = input.readInt(true);\n for (var i = 0, n = skin.bones.length; i < n; i++)\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\n for (var i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\n for (var i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\n for (var i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\n slotCount = input.readInt(true);\n }\n for (var i = 0; i < slotCount; i++) {\n var slotIndex = input.readInt(true);\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var name_3 = input.readStringRef();\n var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_3, nonessential);\n if (attachment != null)\n skin.setAttachment(slotIndex, name_3, attachment);\n }\n }\n return skin;\n };\n SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\n var scale = this.scale;\n var name = input.readStringRef();\n if (name == null)\n name = attachmentName;\n var typeIndex = input.readByte();\n var type = SkeletonBinary.AttachmentTypeValues[typeIndex];\n switch (type) {\n case spine.AttachmentType.Region: {\n var path = input.readStringRef();\n var rotation = input.readFloat();\n var x = input.readFloat();\n var y = input.readFloat();\n var scaleX = input.readFloat();\n var scaleY = input.readFloat();\n var width = input.readFloat();\n var height = input.readFloat();\n var color = input.readInt32();\n if (path == null)\n path = name;\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\n if (region == null)\n return null;\n region.path = path;\n region.x = x * scale;\n region.y = y * scale;\n region.scaleX = scaleX;\n region.scaleY = scaleY;\n region.rotation = rotation;\n region.width = width * scale;\n region.height = height * scale;\n spine.Color.rgba8888ToColor(region.color, color);\n region.updateOffset();\n return region;\n }\n case spine.AttachmentType.BoundingBox: {\n var vertexCount = input.readInt(true);\n var vertices = this.readVertices(input, vertexCount);\n var color = nonessential ? input.readInt32() : 0;\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (box == null)\n return null;\n box.worldVerticesLength = vertexCount << 1;\n box.vertices = vertices.vertices;\n box.bones = vertices.bones;\n if (nonessential)\n spine.Color.rgba8888ToColor(box.color, color);\n return box;\n }\n case spine.AttachmentType.Mesh: {\n var path = input.readStringRef();\n var color = input.readInt32();\n var vertexCount = input.readInt(true);\n var uvs = this.readFloatArray(input, vertexCount << 1, 1);\n var triangles = this.readShortArray(input);\n var vertices = this.readVertices(input, vertexCount);\n var hullLength = input.readInt(true);\n var edges = null;\n var width = 0, height = 0;\n if (nonessential) {\n edges = this.readShortArray(input);\n width = input.readFloat();\n height = input.readFloat();\n }\n if (path == null)\n path = name;\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n if (mesh == null)\n return null;\n mesh.path = path;\n spine.Color.rgba8888ToColor(mesh.color, color);\n mesh.bones = vertices.bones;\n mesh.vertices = vertices.vertices;\n mesh.worldVerticesLength = vertexCount << 1;\n mesh.triangles = triangles;\n mesh.regionUVs = uvs;\n mesh.updateUVs();\n mesh.hullLength = hullLength << 1;\n if (nonessential) {\n mesh.edges = edges;\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n return mesh;\n }\n case spine.AttachmentType.LinkedMesh: {\n var path = input.readStringRef();\n var color = input.readInt32();\n var skinName = input.readStringRef();\n var parent_4 = input.readStringRef();\n var inheritDeform = input.readBoolean();\n var width = 0, height = 0;\n if (nonessential) {\n width = input.readFloat();\n height = input.readFloat();\n }\n if (path == null)\n path = name;\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n if (mesh == null)\n return null;\n mesh.path = path;\n spine.Color.rgba8888ToColor(mesh.color, color);\n if (nonessential) {\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent_4, inheritDeform));\n return mesh;\n }\n case spine.AttachmentType.Path: {\n var closed_1 = input.readBoolean();\n var constantSpeed = input.readBoolean();\n var vertexCount = input.readInt(true);\n var vertices = this.readVertices(input, vertexCount);\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\n for (var i = 0, n = lengths.length; i < n; i++)\n lengths[i] = input.readFloat() * scale;\n var color = nonessential ? input.readInt32() : 0;\n var path = this.attachmentLoader.newPathAttachment(skin, name);\n if (path == null)\n return null;\n path.closed = closed_1;\n path.constantSpeed = constantSpeed;\n path.worldVerticesLength = vertexCount << 1;\n path.vertices = vertices.vertices;\n path.bones = vertices.bones;\n path.lengths = lengths;\n if (nonessential)\n spine.Color.rgba8888ToColor(path.color, color);\n return path;\n }\n case spine.AttachmentType.Point: {\n var rotation = input.readFloat();\n var x = input.readFloat();\n var y = input.readFloat();\n var color = nonessential ? input.readInt32() : 0;\n var point = this.attachmentLoader.newPointAttachment(skin, name);\n if (point == null)\n return null;\n point.x = x * scale;\n point.y = y * scale;\n point.rotation = rotation;\n if (nonessential)\n spine.Color.rgba8888ToColor(point.color, color);\n return point;\n }\n case spine.AttachmentType.Clipping: {\n var endSlotIndex = input.readInt(true);\n var vertexCount = input.readInt(true);\n var vertices = this.readVertices(input, vertexCount);\n var color = nonessential ? input.readInt32() : 0;\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (clip == null)\n return null;\n clip.endSlot = skeletonData.slots[endSlotIndex];\n clip.worldVerticesLength = vertexCount << 1;\n clip.vertices = vertices.vertices;\n clip.bones = vertices.bones;\n if (nonessential)\n spine.Color.rgba8888ToColor(clip.color, color);\n return clip;\n }\n }\n return null;\n };\n SkeletonBinary.prototype.readVertices = function (input, vertexCount) {\n var verticesLength = vertexCount << 1;\n var vertices = new Vertices();\n var scale = this.scale;\n if (!input.readBoolean()) {\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\n return vertices;\n }\n var weights = new Array();\n var bonesArray = new Array();\n for (var i = 0; i < vertexCount; i++) {\n var boneCount = input.readInt(true);\n bonesArray.push(boneCount);\n for (var ii = 0; ii < boneCount; ii++) {\n bonesArray.push(input.readInt(true));\n weights.push(input.readFloat() * scale);\n weights.push(input.readFloat() * scale);\n weights.push(input.readFloat());\n }\n }\n vertices.vertices = spine.Utils.toFloatArray(weights);\n vertices.bones = bonesArray;\n return vertices;\n };\n SkeletonBinary.prototype.readFloatArray = function (input, n, scale) {\n var array = new Array(n);\n if (scale == 1) {\n for (var i = 0; i < n; i++)\n array[i] = input.readFloat();\n }\n else {\n for (var i = 0; i < n; i++)\n array[i] = input.readFloat() * scale;\n }\n return array;\n };\n SkeletonBinary.prototype.readShortArray = function (input) {\n var n = input.readInt(true);\n var array = new Array(n);\n for (var i = 0; i < n; i++)\n array[i] = input.readShort();\n return array;\n };\n SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) {\n var timelines = new Array();\n var scale = this.scale;\n var duration = 0;\n var tempColor1 = new spine.Color();\n var tempColor2 = new spine.Color();\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var slotIndex = input.readInt(true);\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var timelineType = input.readByte();\n var frameCount = input.readInt(true);\n switch (timelineType) {\n case SkeletonBinary.SLOT_ATTACHMENT: {\n var timeline = new spine.AttachmentTimeline(frameCount);\n timeline.slotIndex = slotIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++)\n timeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\n break;\n }\n case SkeletonBinary.SLOT_COLOR: {\n var timeline = new spine.ColorTimeline(frameCount);\n timeline.slotIndex = slotIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n var time = input.readFloat();\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.ColorTimeline.ENTRIES]);\n break;\n }\n case SkeletonBinary.SLOT_TWO_COLOR: {\n var timeline = new spine.TwoColorTimeline(frameCount);\n timeline.slotIndex = slotIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n var time = input.readFloat();\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\n spine.Color.rgb888ToColor(tempColor2, input.readInt32());\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r, tempColor2.g, tempColor2.b);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TwoColorTimeline.ENTRIES]);\n break;\n }\n }\n }\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var boneIndex = input.readInt(true);\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var timelineType = input.readByte();\n var frameCount = input.readInt(true);\n switch (timelineType) {\n case SkeletonBinary.BONE_ROTATE: {\n var timeline = new spine.RotateTimeline(frameCount);\n timeline.boneIndex = boneIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.RotateTimeline.ENTRIES]);\n break;\n }\n case SkeletonBinary.BONE_TRANSLATE:\n case SkeletonBinary.BONE_SCALE:\n case SkeletonBinary.BONE_SHEAR: {\n var timeline = void 0;\n var timelineScale = 1;\n if (timelineType == SkeletonBinary.BONE_SCALE)\n timeline = new spine.ScaleTimeline(frameCount);\n else if (timelineType == SkeletonBinary.BONE_SHEAR)\n timeline = new spine.ShearTimeline(frameCount);\n else {\n timeline = new spine.TranslateTimeline(frameCount);\n timelineScale = scale;\n }\n timeline.boneIndex = boneIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale, input.readFloat() * timelineScale);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TranslateTimeline.ENTRIES]);\n break;\n }\n }\n }\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var index = input.readInt(true);\n var frameCount = input.readInt(true);\n var timeline = new spine.IkConstraintTimeline(frameCount);\n timeline.ikConstraintIndex = index;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.IkConstraintTimeline.ENTRIES]);\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var index = input.readInt(true);\n var frameCount = input.readInt(true);\n var timeline = new spine.TransformConstraintTimeline(frameCount);\n timeline.transformConstraintIndex = index;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TransformConstraintTimeline.ENTRIES]);\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var index = input.readInt(true);\n var data = skeletonData.pathConstraints[index];\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var timelineType = input.readByte();\n var frameCount = input.readInt(true);\n switch (timelineType) {\n case SkeletonBinary.PATH_POSITION:\n case SkeletonBinary.PATH_SPACING: {\n var timeline = void 0;\n var timelineScale = 1;\n if (timelineType == SkeletonBinary.PATH_SPACING) {\n timeline = new spine.PathConstraintSpacingTimeline(frameCount);\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\n timelineScale = scale;\n }\n else {\n timeline = new spine.PathConstraintPositionTimeline(frameCount);\n if (data.positionMode == spine.PositionMode.Fixed)\n timelineScale = scale;\n }\n timeline.pathConstraintIndex = index;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\n break;\n }\n case SkeletonBinary.PATH_MIX: {\n var timeline = new spine.PathConstraintMixTimeline(frameCount);\n timeline.pathConstraintIndex = index;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\n break;\n }\n }\n }\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var skin = skeletonData.skins[input.readInt(true)];\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var slotIndex = input.readInt(true);\n for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\n var attachment = skin.getAttachment(slotIndex, input.readStringRef());\n var weighted = attachment.bones != null;\n var vertices = attachment.vertices;\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n var frameCount = input.readInt(true);\n var timeline = new spine.DeformTimeline(frameCount);\n timeline.slotIndex = slotIndex;\n timeline.attachment = attachment;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n var time = input.readFloat();\n var deform = void 0;\n var end = input.readInt(true);\n if (end == 0)\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = spine.Utils.newFloatArray(deformLength);\n var start = input.readInt(true);\n end += start;\n if (scale == 1) {\n for (var v = start; v < end; v++)\n deform[v] = input.readFloat();\n }\n else {\n for (var v = start; v < end; v++)\n deform[v] = input.readFloat() * scale;\n }\n if (!weighted) {\n for (var v = 0, vn = deform.length; v < vn; v++)\n deform[v] += vertices[v];\n }\n }\n timeline.setFrame(frameIndex, time, deform);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\n }\n }\n }\n var drawOrderCount = input.readInt(true);\n if (drawOrderCount > 0) {\n var timeline = new spine.DrawOrderTimeline(drawOrderCount);\n var slotCount = skeletonData.slots.length;\n for (var i = 0; i < drawOrderCount; i++) {\n var time = input.readFloat();\n var offsetCount = input.readInt(true);\n var drawOrder = spine.Utils.newArray(slotCount, 0);\n for (var ii = slotCount - 1; ii >= 0; ii--)\n drawOrder[ii] = -1;\n var unchanged = spine.Utils.newArray(slotCount - offsetCount, 0);\n var originalIndex = 0, unchangedIndex = 0;\n for (var ii = 0; ii < offsetCount; ii++) {\n var slotIndex = input.readInt(true);\n while (originalIndex != slotIndex)\n unchanged[unchangedIndex++] = originalIndex++;\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\n }\n while (originalIndex < slotCount)\n unchanged[unchangedIndex++] = originalIndex++;\n for (var ii = slotCount - 1; ii >= 0; ii--)\n if (drawOrder[ii] == -1)\n drawOrder[ii] = unchanged[--unchangedIndex];\n timeline.setFrame(i, time, drawOrder);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\n }\n var eventCount = input.readInt(true);\n if (eventCount > 0) {\n var timeline = new spine.EventTimeline(eventCount);\n for (var i = 0; i < eventCount; i++) {\n var time = input.readFloat();\n var eventData = skeletonData.events[input.readInt(true)];\n var event_4 = new spine.Event(time, eventData);\n event_4.intValue = input.readInt(false);\n event_4.floatValue = input.readFloat();\n event_4.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\n if (event_4.data.audioPath != null) {\n event_4.volume = input.readFloat();\n event_4.balance = input.readFloat();\n }\n timeline.setFrame(i, event_4);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[eventCount - 1]);\n }\n return new spine.Animation(name, timelines, duration);\n };\n SkeletonBinary.prototype.readCurve = function (input, frameIndex, timeline) {\n switch (input.readByte()) {\n case SkeletonBinary.CURVE_STEPPED:\n timeline.setStepped(frameIndex);\n break;\n case SkeletonBinary.CURVE_BEZIER:\n this.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\n break;\n }\n };\n SkeletonBinary.prototype.setCurve = function (timeline, frameIndex, cx1, cy1, cx2, cy2) {\n timeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\n };\n SkeletonBinary.AttachmentTypeValues = [0, 1, 2, 3, 4, 5, 6];\n SkeletonBinary.TransformModeValues = [spine.TransformMode.Normal, spine.TransformMode.OnlyTranslation, spine.TransformMode.NoRotationOrReflection, spine.TransformMode.NoScale, spine.TransformMode.NoScaleOrReflection];\n SkeletonBinary.PositionModeValues = [spine.PositionMode.Fixed, spine.PositionMode.Percent];\n SkeletonBinary.SpacingModeValues = [spine.SpacingMode.Length, spine.SpacingMode.Fixed, spine.SpacingMode.Percent];\n SkeletonBinary.RotateModeValues = [spine.RotateMode.Tangent, spine.RotateMode.Chain, spine.RotateMode.ChainScale];\n SkeletonBinary.BlendModeValues = [spine.BlendMode.Normal, spine.BlendMode.Additive, spine.BlendMode.Multiply, spine.BlendMode.Screen];\n SkeletonBinary.BONE_ROTATE = 0;\n SkeletonBinary.BONE_TRANSLATE = 1;\n SkeletonBinary.BONE_SCALE = 2;\n SkeletonBinary.BONE_SHEAR = 3;\n SkeletonBinary.SLOT_ATTACHMENT = 0;\n SkeletonBinary.SLOT_COLOR = 1;\n SkeletonBinary.SLOT_TWO_COLOR = 2;\n SkeletonBinary.PATH_POSITION = 0;\n SkeletonBinary.PATH_SPACING = 1;\n SkeletonBinary.PATH_MIX = 2;\n SkeletonBinary.CURVE_LINEAR = 0;\n SkeletonBinary.CURVE_STEPPED = 1;\n SkeletonBinary.CURVE_BEZIER = 2;\n return SkeletonBinary;\n }());\n spine.SkeletonBinary = SkeletonBinary;\n var BinaryInput = (function () {\n function BinaryInput(data, strings, index, buffer) {\n if (strings === void 0) { strings = new Array(); }\n if (index === void 0) { index = 0; }\n if (buffer === void 0) { buffer = new DataView(data.buffer); }\n this.strings = strings;\n this.index = index;\n this.buffer = buffer;\n }\n BinaryInput.prototype.readByte = function () {\n return this.buffer.getInt8(this.index++);\n };\n BinaryInput.prototype.readShort = function () {\n var value = this.buffer.getInt16(this.index);\n this.index += 2;\n return value;\n };\n BinaryInput.prototype.readInt32 = function () {\n var value = this.buffer.getInt32(this.index);\n this.index += 4;\n return value;\n };\n BinaryInput.prototype.readInt = function (optimizePositive) {\n var b = this.readByte();\n var result = b & 0x7F;\n if ((b & 0x80) != 0) {\n b = this.readByte();\n result |= (b & 0x7F) << 7;\n if ((b & 0x80) != 0) {\n b = this.readByte();\n result |= (b & 0x7F) << 14;\n if ((b & 0x80) != 0) {\n b = this.readByte();\n result |= (b & 0x7F) << 21;\n if ((b & 0x80) != 0) {\n b = this.readByte();\n result |= (b & 0x7F) << 28;\n }\n }\n }\n }\n return optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\n };\n BinaryInput.prototype.readStringRef = function () {\n var index = this.readInt(true);\n return index == 0 ? null : this.strings[index - 1];\n };\n BinaryInput.prototype.readString = function () {\n var byteCount = this.readInt(true);\n switch (byteCount) {\n case 0:\n return null;\n case 1:\n return \"\";\n }\n byteCount--;\n var chars = \"\";\n var charCount = 0;\n for (var i = 0; i < byteCount;) {\n var b = this.readByte();\n switch (b >> 4) {\n case 12:\n case 13:\n chars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\n i += 2;\n break;\n case 14:\n chars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\n i += 3;\n break;\n default:\n chars += String.fromCharCode(b);\n i++;\n }\n }\n return chars;\n };\n BinaryInput.prototype.readFloat = function () {\n var value = this.buffer.getFloat32(this.index);\n this.index += 4;\n return value;\n };\n BinaryInput.prototype.readBoolean = function () {\n return this.readByte() != 0;\n };\n return BinaryInput;\n }());\n var LinkedMesh = (function () {\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritDeform = inheritDeform;\n }\n return LinkedMesh;\n }());\n var Vertices = (function () {\n function Vertices(bones, vertices) {\n if (bones === void 0) { bones = null; }\n if (vertices === void 0) { vertices = null; }\n this.bones = bones;\n this.vertices = vertices;\n }\n return Vertices;\n }());\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonBounds = (function () {\n function SkeletonBounds() {\n this.minX = 0;\n this.minY = 0;\n this.maxX = 0;\n this.maxY = 0;\n this.boundingBoxes = new Array();\n this.polygons = new Array();\n this.polygonPool = new spine.Pool(function () {\n return spine.Utils.newFloatArray(16);\n });\n }\n SkeletonBounds.prototype.update = function (skeleton, updateAabb) {\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n var boundingBoxes = this.boundingBoxes;\n var polygons = this.polygons;\n var polygonPool = this.polygonPool;\n var slots = skeleton.slots;\n var slotCount = slots.length;\n boundingBoxes.length = 0;\n polygonPool.freeAll(polygons);\n polygons.length = 0;\n for (var i = 0; i < slotCount; i++) {\n var slot = slots[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n if (attachment instanceof spine.BoundingBoxAttachment) {\n var boundingBox = attachment;\n boundingBoxes.push(boundingBox);\n var polygon = polygonPool.obtain();\n if (polygon.length != boundingBox.worldVerticesLength) {\n polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength);\n }\n polygons.push(polygon);\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\n }\n }\n if (updateAabb) {\n this.aabbCompute();\n }\n else {\n this.minX = Number.POSITIVE_INFINITY;\n this.minY = Number.POSITIVE_INFINITY;\n this.maxX = Number.NEGATIVE_INFINITY;\n this.maxY = Number.NEGATIVE_INFINITY;\n }\n };\n SkeletonBounds.prototype.aabbCompute = function () {\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n var polygons = this.polygons;\n for (var i = 0, n = polygons.length; i < n; i++) {\n var polygon = polygons[i];\n var vertices = polygon;\n for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\n var x = vertices[ii];\n var y = vertices[ii + 1];\n minX = Math.min(minX, x);\n minY = Math.min(minY, y);\n maxX = Math.max(maxX, x);\n maxY = Math.max(maxY, y);\n }\n }\n this.minX = minX;\n this.minY = minY;\n this.maxX = maxX;\n this.maxY = maxY;\n };\n SkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\n };\n SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\n var minX = this.minX;\n var minY = this.minY;\n var maxX = this.maxX;\n var maxY = this.maxY;\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\n return false;\n var m = (y2 - y1) / (x2 - x1);\n var y = m * (minX - x1) + y1;\n if (y > minY && y < maxY)\n return true;\n y = m * (maxX - x1) + y1;\n if (y > minY && y < maxY)\n return true;\n var x = (minY - y1) / m + x1;\n if (x > minX && x < maxX)\n return true;\n x = (maxY - y1) / m + x1;\n if (x > minX && x < maxX)\n return true;\n return false;\n };\n SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\n };\n SkeletonBounds.prototype.containsPoint = function (x, y) {\n var polygons = this.polygons;\n for (var i = 0, n = polygons.length; i < n; i++)\n if (this.containsPointPolygon(polygons[i], x, y))\n return this.boundingBoxes[i];\n return null;\n };\n SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\n var vertices = polygon;\n var nn = polygon.length;\n var prevIndex = nn - 2;\n var inside = false;\n for (var ii = 0; ii < nn; ii += 2) {\n var vertexY = vertices[ii + 1];\n var prevY = vertices[prevIndex + 1];\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\n var vertexX = vertices[ii];\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\n inside = !inside;\n }\n prevIndex = ii;\n }\n return inside;\n };\n SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\n var polygons = this.polygons;\n for (var i = 0, n = polygons.length; i < n; i++)\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\n return this.boundingBoxes[i];\n return null;\n };\n SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\n var vertices = polygon;\n var nn = polygon.length;\n var width12 = x1 - x2, height12 = y1 - y2;\n var det1 = x1 * y2 - y1 * x2;\n var x3 = vertices[nn - 2], y3 = vertices[nn - 1];\n for (var ii = 0; ii < nn; ii += 2) {\n var x4 = vertices[ii], y4 = vertices[ii + 1];\n var det2 = x3 * y4 - y3 * x4;\n var width34 = x3 - x4, height34 = y3 - y4;\n var det3 = width12 * height34 - height12 * width34;\n var x = (det1 * width34 - width12 * det2) / det3;\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\n var y = (det1 * height34 - height12 * det2) / det3;\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\n return true;\n }\n x3 = x4;\n y3 = y4;\n }\n return false;\n };\n SkeletonBounds.prototype.getPolygon = function (boundingBox) {\n if (boundingBox == null)\n throw new Error(\"boundingBox cannot be null.\");\n var index = this.boundingBoxes.indexOf(boundingBox);\n return index == -1 ? null : this.polygons[index];\n };\n SkeletonBounds.prototype.getWidth = function () {\n return this.maxX - this.minX;\n };\n SkeletonBounds.prototype.getHeight = function () {\n return this.maxY - this.minY;\n };\n return SkeletonBounds;\n }());\n spine.SkeletonBounds = SkeletonBounds;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonClipping = (function () {\n function SkeletonClipping() {\n this.triangulator = new spine.Triangulator();\n this.clippingPolygon = new Array();\n this.clipOutput = new Array();\n this.clippedVertices = new Array();\n this.clippedTriangles = new Array();\n this.scratch = new Array();\n }\n SkeletonClipping.prototype.clipStart = function (slot, clip) {\n if (this.clipAttachment != null)\n return 0;\n this.clipAttachment = clip;\n var n = clip.worldVerticesLength;\n var vertices = spine.Utils.setArraySize(this.clippingPolygon, n);\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\n var clippingPolygon = this.clippingPolygon;\n SkeletonClipping.makeClockwise(clippingPolygon);\n var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\n for (var i = 0, n_1 = clippingPolygons.length; i < n_1; i++) {\n var polygon = clippingPolygons[i];\n SkeletonClipping.makeClockwise(polygon);\n polygon.push(polygon[0]);\n polygon.push(polygon[1]);\n }\n return clippingPolygons.length;\n };\n SkeletonClipping.prototype.clipEndWithSlot = function (slot) {\n if (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data)\n this.clipEnd();\n };\n SkeletonClipping.prototype.clipEnd = function () {\n if (this.clipAttachment == null)\n return;\n this.clipAttachment = null;\n this.clippingPolygons = null;\n this.clippedVertices.length = 0;\n this.clippedTriangles.length = 0;\n this.clippingPolygon.length = 0;\n };\n SkeletonClipping.prototype.isClipping = function () {\n return this.clipAttachment != null;\n };\n SkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor, stride, originIndexOffset, originVertOffset, originUVSOffset) {\n var clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\n var clippedTriangles = this.clippedTriangles;\n var polygons = this.clippingPolygons;\n var polygonsCount = this.clippingPolygons.length;\n var vertexSize = twoColor ? 12 : 8;\n var index = 0;\n\n originIndexOffset = originIndexOffset || 0;\n originVertOffset = originVertOffset || 0;\n originUVSOffset = originUVSOffset || 0;\n\n clippedVertices.length = 0;\n clippedTriangles.length = 0;\n outer: for (var i = originIndexOffset, n = originIndexOffset + trianglesLength; i < n; i += 3) {\n var vertexOffset = triangles[i] * stride;\n var xyOffset = vertexOffset + originVertOffset;\n var uvOffset = vertexOffset + originUVSOffset;\n var x1 = vertices[xyOffset], y1 = vertices[xyOffset + 1];\n var u1 = uvs[uvOffset], v1 = uvs[uvOffset + 1];\n \n vertexOffset = triangles[i + 1] * stride;\n xyOffset = vertexOffset + originVertOffset;\n uvOffset = vertexOffset + originUVSOffset;\n var x2 = vertices[xyOffset], y2 = vertices[xyOffset + 1];\n var u2 = uvs[uvOffset], v2 = uvs[uvOffset + 1];\n \n vertexOffset = triangles[i + 2] * stride;\n xyOffset = vertexOffset + originVertOffset;\n uvOffset = vertexOffset + originUVSOffset;\n var x3 = vertices[xyOffset], y3 = vertices[xyOffset + 1];\n var u3 = uvs[uvOffset], v3 = uvs[uvOffset + 1];\n \n for (var p = 0; p < polygonsCount; p++) {\n var s = clippedVertices.length;\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\n var clipOutputLength = clipOutput.length;\n if (clipOutputLength == 0)\n continue;\n var d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\n var d = 1 / (d0 * d2 + d1 * (y1 - y3));\n var clipOutputCount = clipOutputLength >> 1;\n var clipOutputItems = this.clipOutput;\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\n for (var ii = 0; ii < clipOutputLength; ii += 2) {\n var x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\n clippedVerticesItems[s] = x;\n clippedVerticesItems[s + 1] = y;\n clippedVerticesItems[s + 2] = light.r;\n clippedVerticesItems[s + 3] = light.g;\n clippedVerticesItems[s + 4] = light.b;\n clippedVerticesItems[s + 5] = light.a;\n var c0 = x - x3, c1 = y - y3;\n var a = (d0 * c0 + d1 * c1) * d;\n var b = (d4 * c0 + d2 * c1) * d;\n var c = 1 - a - b;\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\n if (twoColor) {\n clippedVerticesItems[s + 8] = dark.r;\n clippedVerticesItems[s + 9] = dark.g;\n clippedVerticesItems[s + 10] = dark.b;\n clippedVerticesItems[s + 11] = dark.a;\n }\n s += vertexSize;\n }\n s = clippedTriangles.length;\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\n clipOutputCount--;\n for (var ii = 1; ii < clipOutputCount; ii++) {\n clippedTrianglesItems[s] = index;\n clippedTrianglesItems[s + 1] = (index + ii);\n clippedTrianglesItems[s + 2] = (index + ii + 1);\n s += 3;\n }\n index += clipOutputCount + 1;\n }\n else {\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\n clippedVerticesItems[s] = x1;\n clippedVerticesItems[s + 1] = y1;\n clippedVerticesItems[s + 2] = light.r;\n clippedVerticesItems[s + 3] = light.g;\n clippedVerticesItems[s + 4] = light.b;\n clippedVerticesItems[s + 5] = light.a;\n if (!twoColor) {\n clippedVerticesItems[s + 6] = u1;\n clippedVerticesItems[s + 7] = v1;\n clippedVerticesItems[s + 8] = x2;\n clippedVerticesItems[s + 9] = y2;\n clippedVerticesItems[s + 10] = light.r;\n clippedVerticesItems[s + 11] = light.g;\n clippedVerticesItems[s + 12] = light.b;\n clippedVerticesItems[s + 13] = light.a;\n clippedVerticesItems[s + 14] = u2;\n clippedVerticesItems[s + 15] = v2;\n clippedVerticesItems[s + 16] = x3;\n clippedVerticesItems[s + 17] = y3;\n clippedVerticesItems[s + 18] = light.r;\n clippedVerticesItems[s + 19] = light.g;\n clippedVerticesItems[s + 20] = light.b;\n clippedVerticesItems[s + 21] = light.a;\n clippedVerticesItems[s + 22] = u3;\n clippedVerticesItems[s + 23] = v3;\n }\n else {\n clippedVerticesItems[s + 6] = u1;\n clippedVerticesItems[s + 7] = v1;\n clippedVerticesItems[s + 8] = dark.r;\n clippedVerticesItems[s + 9] = dark.g;\n clippedVerticesItems[s + 10] = dark.b;\n clippedVerticesItems[s + 11] = dark.a;\n clippedVerticesItems[s + 12] = x2;\n clippedVerticesItems[s + 13] = y2;\n clippedVerticesItems[s + 14] = light.r;\n clippedVerticesItems[s + 15] = light.g;\n clippedVerticesItems[s + 16] = light.b;\n clippedVerticesItems[s + 17] = light.a;\n clippedVerticesItems[s + 18] = u2;\n clippedVerticesItems[s + 19] = v2;\n clippedVerticesItems[s + 20] = dark.r;\n clippedVerticesItems[s + 21] = dark.g;\n clippedVerticesItems[s + 22] = dark.b;\n clippedVerticesItems[s + 23] = dark.a;\n clippedVerticesItems[s + 24] = x3;\n clippedVerticesItems[s + 25] = y3;\n clippedVerticesItems[s + 26] = light.r;\n clippedVerticesItems[s + 27] = light.g;\n clippedVerticesItems[s + 28] = light.b;\n clippedVerticesItems[s + 29] = light.a;\n clippedVerticesItems[s + 30] = u3;\n clippedVerticesItems[s + 31] = v3;\n clippedVerticesItems[s + 32] = dark.r;\n clippedVerticesItems[s + 33] = dark.g;\n clippedVerticesItems[s + 34] = dark.b;\n clippedVerticesItems[s + 35] = dark.a;\n }\n s = clippedTriangles.length;\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3);\n clippedTrianglesItems[s] = index;\n clippedTrianglesItems[s + 1] = (index + 1);\n clippedTrianglesItems[s + 2] = (index + 2);\n index += 3;\n continue outer;\n }\n }\n }\n };\n SkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) {\n var originalOutput = output;\n var clipped = false;\n var input = null;\n if (clippingArea.length % 4 >= 2) {\n input = output;\n output = this.scratch;\n }\n else\n input = this.scratch;\n input.length = 0;\n input.push(x1);\n input.push(y1);\n input.push(x2);\n input.push(y2);\n input.push(x3);\n input.push(y3);\n input.push(x1);\n input.push(y1);\n output.length = 0;\n var clippingVertices = clippingArea;\n var clippingVerticesLast = clippingArea.length - 4;\n for (var i = 0;; i += 2) {\n var edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\n var edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\n var deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\n var inputVertices = input;\n var inputVerticesLength = input.length - 2, outputStart = output.length;\n for (var ii = 0; ii < inputVerticesLength; ii += 2) {\n var inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\n var inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\n var side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\n if (side2) {\n output.push(inputX2);\n output.push(inputY2);\n continue;\n }\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 0.000001) {\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\n }\n else {\n output.push(edgeX);\n output.push(edgeY);\n }\n }\n else if (side2) {\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 0.000001) {\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\n }\n else {\n output.push(edgeX);\n output.push(edgeY);\n }\n output.push(inputX2);\n output.push(inputY2);\n }\n clipped = true;\n }\n if (outputStart == output.length) {\n originalOutput.length = 0;\n return true;\n }\n output.push(output[0]);\n output.push(output[1]);\n if (i == clippingVerticesLast)\n break;\n var temp = output;\n output = input;\n output.length = 0;\n input = temp;\n }\n if (originalOutput != output) {\n originalOutput.length = 0;\n for (var i = 0, n = output.length - 2; i < n; i++)\n originalOutput[i] = output[i];\n }\n else\n originalOutput.length = originalOutput.length - 2;\n return clipped;\n };\n SkeletonClipping.makeClockwise = function (polygon) {\n var vertices = polygon;\n var verticeslength = polygon.length;\n var area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\n for (var i = 0, n = verticeslength - 3; i < n; i += 2) {\n p1x = vertices[i];\n p1y = vertices[i + 1];\n p2x = vertices[i + 2];\n p2y = vertices[i + 3];\n area += p1x * p2y - p2x * p1y;\n }\n if (area < 0)\n return;\n for (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\n var x = vertices[i], y = vertices[i + 1];\n var other = lastX - i;\n vertices[i] = vertices[other];\n vertices[i + 1] = vertices[other + 1];\n vertices[other] = x;\n vertices[other + 1] = y;\n }\n };\n return SkeletonClipping;\n }());\n spine.SkeletonClipping = SkeletonClipping;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonData = (function () {\n function SkeletonData() {\n this.bones = new Array();\n this.slots = new Array();\n this.skins = new Array();\n this.events = new Array();\n this.animations = new Array();\n this.ikConstraints = new Array();\n this.transformConstraints = new Array();\n this.pathConstraints = new Array();\n this.fps = 0;\n }\n SkeletonData.prototype.findBone = function (boneName) {\n if (boneName == null)\n throw new Error(\"boneName cannot be null.\");\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (bone.name == boneName)\n return bone;\n }\n return null;\n };\n SkeletonData.prototype.findBoneIndex = function (boneName) {\n if (boneName == null)\n throw new Error(\"boneName cannot be null.\");\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++)\n if (bones[i].name == boneName)\n return i;\n return -1;\n };\n SkeletonData.prototype.findSlot = function (slotName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (slot.name == slotName)\n return slot;\n }\n return null;\n };\n SkeletonData.prototype.findSlotIndex = function (slotName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++)\n if (slots[i].name == slotName)\n return i;\n return -1;\n };\n SkeletonData.prototype.findSkin = function (skinName) {\n if (skinName == null)\n throw new Error(\"skinName cannot be null.\");\n var skins = this.skins;\n for (var i = 0, n = skins.length; i < n; i++) {\n var skin = skins[i];\n if (skin.name == skinName)\n return skin;\n }\n return null;\n };\n SkeletonData.prototype.findEvent = function (eventDataName) {\n if (eventDataName == null)\n throw new Error(\"eventDataName cannot be null.\");\n var events = this.events;\n for (var i = 0, n = events.length; i < n; i++) {\n var event_5 = events[i];\n if (event_5.name == eventDataName)\n return event_5;\n }\n return null;\n };\n SkeletonData.prototype.findAnimation = function (animationName) {\n if (animationName == null)\n throw new Error(\"animationName cannot be null.\");\n var animations = this.animations;\n for (var i = 0, n = animations.length; i < n; i++) {\n var animation = animations[i];\n if (animation.name == animationName)\n return animation;\n }\n return null;\n };\n SkeletonData.prototype.findIkConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var ikConstraints = this.ikConstraints;\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\n var constraint = ikConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n };\n SkeletonData.prototype.findTransformConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var transformConstraints = this.transformConstraints;\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\n var constraint = transformConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n };\n SkeletonData.prototype.findPathConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var pathConstraints = this.pathConstraints;\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\n var constraint = pathConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n };\n SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\n if (pathConstraintName == null)\n throw new Error(\"pathConstraintName cannot be null.\");\n var pathConstraints = this.pathConstraints;\n for (var i = 0, n = pathConstraints.length; i < n; i++)\n if (pathConstraints[i].name == pathConstraintName)\n return i;\n return -1;\n };\n return SkeletonData;\n }());\n spine.SkeletonData = SkeletonData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonJson = (function () {\n function SkeletonJson(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n SkeletonJson.prototype.readSkeletonData = function (json) {\n var scale = this.scale;\n var skeletonData = new spine.SkeletonData();\n var root = typeof (json) === \"string\" ? JSON.parse(json) : json;\n var skeletonMap = root.skeleton;\n if (skeletonMap != null) {\n skeletonData.hash = skeletonMap.hash;\n skeletonData.version = skeletonMap.spine;\n skeletonData.x = skeletonMap.x;\n skeletonData.y = skeletonMap.y;\n skeletonData.width = skeletonMap.width;\n skeletonData.height = skeletonMap.height;\n skeletonData.fps = skeletonMap.fps;\n skeletonData.imagesPath = skeletonMap.images;\n }\n if (root.bones) {\n for (var i = 0; i < root.bones.length; i++) {\n var boneMap = root.bones[i];\n var parent_5 = null;\n var parentName = this.getValue(boneMap, \"parent\", null);\n if (parentName != null) {\n parent_5 = skeletonData.findBone(parentName);\n if (parent_5 == null)\n throw new Error(\"Parent bone not found: \" + parentName);\n }\n var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_5);\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\n skeletonData.bones.push(data);\n }\n }\n if (root.slots) {\n for (var i = 0; i < root.slots.length; i++) {\n var slotMap = root.slots[i];\n var slotName = slotMap.name;\n var boneName = slotMap.bone;\n var boneData = skeletonData.findBone(boneName);\n if (boneData == null)\n throw new Error(\"Slot bone not found: \" + boneName);\n var data = new spine.SlotData(skeletonData.slots.length, slotName, boneData);\n var color = this.getValue(slotMap, \"color\", null);\n if (color != null)\n data.color.setFromString(color);\n var dark = this.getValue(slotMap, \"dark\", null);\n if (dark != null) {\n data.darkColor = new spine.Color(1, 1, 1, 1);\n data.darkColor.setFromString(dark);\n }\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\n skeletonData.slots.push(data);\n }\n }\n if (root.ik) {\n for (var i = 0; i < root.ik.length; i++) {\n var constraintMap = root.ik[i];\n var data = new spine.IkConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n for (var j = 0; j < constraintMap.bones.length; j++) {\n var boneName = constraintMap.bones[j];\n var bone = skeletonData.findBone(boneName);\n if (bone == null)\n throw new Error(\"IK bone not found: \" + boneName);\n data.bones.push(bone);\n }\n var targetName = constraintMap.target;\n data.target = skeletonData.findBone(targetName);\n if (data.target == null)\n throw new Error(\"IK target bone not found: \" + targetName);\n data.mix = this.getValue(constraintMap, \"mix\", 1);\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\n data.compress = this.getValue(constraintMap, \"compress\", false);\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\n skeletonData.ikConstraints.push(data);\n }\n }\n if (root.transform) {\n for (var i = 0; i < root.transform.length; i++) {\n var constraintMap = root.transform[i];\n var data = new spine.TransformConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n for (var j = 0; j < constraintMap.bones.length; j++) {\n var boneName = constraintMap.bones[j];\n var bone = skeletonData.findBone(boneName);\n if (bone == null)\n throw new Error(\"Transform constraint bone not found: \" + boneName);\n data.bones.push(bone);\n }\n var targetName = constraintMap.target;\n data.target = skeletonData.findBone(targetName);\n if (data.target == null)\n throw new Error(\"Transform constraint target bone not found: \" + targetName);\n data.local = this.getValue(constraintMap, \"local\", false);\n data.relative = this.getValue(constraintMap, \"relative\", false);\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\n skeletonData.transformConstraints.push(data);\n }\n }\n if (root.path) {\n for (var i = 0; i < root.path.length; i++) {\n var constraintMap = root.path[i];\n var data = new spine.PathConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n for (var j = 0; j < constraintMap.bones.length; j++) {\n var boneName = constraintMap.bones[j];\n var bone = skeletonData.findBone(boneName);\n if (bone == null)\n throw new Error(\"Transform constraint bone not found: \" + boneName);\n data.bones.push(bone);\n }\n var targetName = constraintMap.target;\n data.target = skeletonData.findSlot(targetName);\n if (data.target == null)\n throw new Error(\"Path target slot not found: \" + targetName);\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\n data.position = this.getValue(constraintMap, \"position\", 0);\n if (data.positionMode == spine.PositionMode.Fixed)\n data.position *= scale;\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\n data.spacing *= scale;\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\n skeletonData.pathConstraints.push(data);\n }\n }\n if (root.skins) {\n var skins = root.skins;\n var isArray = skins instanceof Array;\n if (!isArray) {\n var skinArr = [];\n for (var skinName in skins) {\n skinArr.push({name: skinName, attachments: skins[skinName]});\n }\n skins = skinArr;\n }\n for (var i = 0; i < skins.length; i++) {\n var skinMap = skins[i];\n var skin = new spine.Skin(skinMap.name);\n if (skinMap.bones) {\n for (var ii = 0; ii < skinMap.bones.length; ii++) {\n var bone = skeletonData.findBone(skinMap.bones[ii]);\n if (bone == null)\n throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\n skin.bones.push(bone);\n }\n }\n if (skinMap.ik) {\n for (var ii = 0; ii < skinMap.ik.length; ii++) {\n var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\n if (constraint == null)\n throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.transform) {\n for (var ii = 0; ii < skinMap.transform.length; ii++) {\n var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\n if (constraint == null)\n throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.path) {\n for (var ii = 0; ii < skinMap.path.length; ii++) {\n var constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\n if (constraint == null)\n throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\n skin.constraints.push(constraint);\n }\n }\n for (var slotName in skinMap.attachments) {\n var slot = skeletonData.findSlot(slotName);\n if (slot == null)\n throw new Error(\"Slot not found: \" + slotName);\n var slotMap = skinMap.attachments[slotName];\n for (var entryName in slotMap) {\n var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\n if (attachment != null)\n skin.setAttachment(slot.index, entryName, attachment);\n }\n }\n skeletonData.skins.push(skin);\n if (skin.name == \"default\")\n skeletonData.defaultSkin = skin;\n }\n }\n for (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\n var linkedMesh = this.linkedMeshes[i];\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (skin == null)\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\n var parent_6 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (parent_6 == null)\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_6 : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent_6);\n linkedMesh.mesh.updateUVs();\n }\n this.linkedMeshes.length = 0;\n if (root.events) {\n for (var eventName in root.events) {\n var eventMap = root.events[eventName];\n var data = new spine.EventData(eventName);\n data.intValue = this.getValue(eventMap, \"int\", 0);\n data.floatValue = this.getValue(eventMap, \"float\", 0);\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\n data.audioPath = this.getValue(eventMap, \"audio\", null);\n if (data.audioPath != null) {\n data.volume = this.getValue(eventMap, \"volume\", 1);\n data.balance = this.getValue(eventMap, \"balance\", 0);\n }\n skeletonData.events.push(data);\n }\n }\n if (root.animations) {\n for (var animationName in root.animations) {\n var animationMap = root.animations[animationName];\n this.readAnimation(animationMap, animationName, skeletonData);\n }\n }\n return skeletonData;\n };\n SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\n var scale = this.scale;\n name = this.getValue(map, \"name\", name);\n var type = this.getValue(map, \"type\", \"region\");\n switch (type) {\n case \"region\": {\n var path = this.getValue(map, \"path\", name);\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\n if (region == null)\n return null;\n region.path = path;\n region.x = this.getValue(map, \"x\", 0) * scale;\n region.y = this.getValue(map, \"y\", 0) * scale;\n region.scaleX = this.getValue(map, \"scaleX\", 1);\n region.scaleY = this.getValue(map, \"scaleY\", 1);\n region.rotation = this.getValue(map, \"rotation\", 0);\n region.width = map.width * scale;\n region.height = map.height * scale;\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n region.color.setFromString(color);\n region.updateOffset();\n return region;\n }\n case \"boundingbox\": {\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (box == null)\n return null;\n this.readVertices(map, box, map.vertexCount << 1);\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n box.color.setFromString(color);\n return box;\n }\n case \"mesh\":\n case \"linkedmesh\": {\n var path = this.getValue(map, \"path\", name);\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n if (mesh == null)\n return null;\n mesh.path = path;\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n mesh.color.setFromString(color);\n mesh.width = this.getValue(map, \"width\", 0) * scale;\n mesh.height = this.getValue(map, \"height\", 0) * scale;\n var parent_7 = this.getValue(map, \"parent\", null);\n if (parent_7 != null) {\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent_7, this.getValue(map, \"deform\", true)));\n return mesh;\n }\n var uvs = map.uvs;\n this.readVertices(map, mesh, uvs.length);\n mesh.triangles = map.triangles;\n mesh.regionUVs = uvs;\n mesh.updateUVs();\n mesh.edges = this.getValue(map, \"edges\", null);\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\n return mesh;\n }\n case \"path\": {\n var path = this.attachmentLoader.newPathAttachment(skin, name);\n if (path == null)\n return null;\n path.closed = this.getValue(map, \"closed\", false);\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\n var vertexCount = map.vertexCount;\n this.readVertices(map, path, vertexCount << 1);\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\n for (var i = 0; i < map.lengths.length; i++)\n lengths[i] = map.lengths[i] * scale;\n path.lengths = lengths;\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n path.color.setFromString(color);\n return path;\n }\n case \"point\": {\n var point = this.attachmentLoader.newPointAttachment(skin, name);\n if (point == null)\n return null;\n point.x = this.getValue(map, \"x\", 0) * scale;\n point.y = this.getValue(map, \"y\", 0) * scale;\n point.rotation = this.getValue(map, \"rotation\", 0);\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n point.color.setFromString(color);\n return point;\n }\n case \"clipping\": {\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (clip == null)\n return null;\n var end = this.getValue(map, \"end\", null);\n if (end != null) {\n var slot = skeletonData.findSlot(end);\n if (slot == null)\n throw new Error(\"Clipping end slot not found: \" + end);\n clip.endSlot = slot;\n }\n var vertexCount = map.vertexCount;\n this.readVertices(map, clip, vertexCount << 1);\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n clip.color.setFromString(color);\n return clip;\n }\n }\n return null;\n };\n SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\n var scale = this.scale;\n attachment.worldVerticesLength = verticesLength;\n var vertices = map.vertices;\n if (verticesLength == vertices.length) {\n var scaledVertices = spine.Utils.toFloatArray(vertices);\n if (scale != 1) {\n for (var i = 0, n = vertices.length; i < n; i++)\n scaledVertices[i] *= scale;\n }\n attachment.vertices = scaledVertices;\n return;\n }\n var weights = new Array();\n var bones = new Array();\n for (var i = 0, n = vertices.length; i < n;) {\n var boneCount = vertices[i++];\n bones.push(boneCount);\n for (var nn = i + boneCount * 4; i < nn; i += 4) {\n bones.push(vertices[i]);\n weights.push(vertices[i + 1] * scale);\n weights.push(vertices[i + 2] * scale);\n weights.push(vertices[i + 3]);\n }\n }\n attachment.bones = bones;\n attachment.vertices = spine.Utils.toFloatArray(weights);\n };\n SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\n var scale = this.scale;\n var timelines = new Array();\n var duration = 0;\n if (map.slots) {\n for (var slotName in map.slots) {\n var slotMap = map.slots[slotName];\n var slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1)\n throw new Error(\"Slot not found: \" + slotName);\n for (var timelineName in slotMap) {\n var timelineMap = slotMap[timelineName];\n if (timelineName == \"attachment\") {\n var timeline = new spine.AttachmentTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n else if (timelineName == \"color\") {\n var timeline = new spine.ColorTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n var color = new spine.Color();\n color.setFromString(valueMap.color);\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.ColorTimeline.ENTRIES]);\n }\n else if (timelineName == \"twoColor\") {\n var timeline = new spine.TwoColorTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n var light = new spine.Color();\n var dark = new spine.Color();\n light.setFromString(valueMap.light);\n dark.setFromString(valueMap.dark);\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TwoColorTimeline.ENTRIES]);\n }\n else\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\n }\n }\n }\n if (map.bones) {\n for (var boneName in map.bones) {\n var boneMap = map.bones[boneName];\n var boneIndex = skeletonData.findBoneIndex(boneName);\n if (boneIndex == -1)\n throw new Error(\"Bone not found: \" + boneName);\n for (var timelineName in boneMap) {\n var timelineMap = boneMap[timelineName];\n if (timelineName === \"rotate\") {\n var timeline = new spine.RotateTimeline(timelineMap.length);\n timeline.boneIndex = boneIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]);\n }\n else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\n var timeline = null;\n var timelineScale = 1, defaultValue = 0;\n if (timelineName === \"scale\") {\n timeline = new spine.ScaleTimeline(timelineMap.length);\n defaultValue = 1;\n }\n else if (timelineName === \"shear\")\n timeline = new spine.ShearTimeline(timelineMap.length);\n else {\n timeline = new spine.TranslateTimeline(timelineMap.length);\n timelineScale = scale;\n }\n timeline.boneIndex = boneIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n var x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]);\n }\n else\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\n }\n }\n }\n if (map.ik) {\n for (var constraintName in map.ik) {\n var constraintMap = map.ik[constraintName];\n var constraint = skeletonData.findIkConstraint(constraintName);\n var timeline = new spine.IkConstraintTimeline(constraintMap.length);\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\n var frameIndex = 0;\n for (var i = 0; i < constraintMap.length; i++) {\n var valueMap = constraintMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale, this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]);\n }\n }\n if (map.transform) {\n for (var constraintName in map.transform) {\n var constraintMap = map.transform[constraintName];\n var constraint = skeletonData.findTransformConstraint(constraintName);\n var timeline = new spine.TransformConstraintTimeline(constraintMap.length);\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\n var frameIndex = 0;\n for (var i = 0; i < constraintMap.length; i++) {\n var valueMap = constraintMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TransformConstraintTimeline.ENTRIES]);\n }\n }\n let mapPath = map.path || map.paths;\n if (mapPath) {\n for (var constraintName in mapPath) {\n var constraintMap = mapPath[constraintName];\n var index = skeletonData.findPathConstraintIndex(constraintName);\n if (index == -1)\n throw new Error(\"Path constraint not found: \" + constraintName);\n var data = skeletonData.pathConstraints[index];\n for (var timelineName in constraintMap) {\n var timelineMap = constraintMap[timelineName];\n if (timelineName === \"position\" || timelineName === \"spacing\") {\n var timeline = null;\n var timelineScale = 1;\n if (timelineName === \"spacing\") {\n timeline = new spine.PathConstraintSpacingTimeline(timelineMap.length);\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\n timelineScale = scale;\n }\n else {\n timeline = new spine.PathConstraintPositionTimeline(timelineMap.length);\n if (data.positionMode == spine.PositionMode.Fixed)\n timelineScale = scale;\n }\n timeline.pathConstraintIndex = index;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\n }\n else if (timelineName === \"mix\") {\n var timeline = new spine.PathConstraintMixTimeline(timelineMap.length);\n timeline.pathConstraintIndex = index;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\n }\n }\n }\n }\n if (map.deform) {\n for (var deformName in map.deform) {\n var deformMap = map.deform[deformName];\n var skin = skeletonData.findSkin(deformName);\n if (skin == null)\n throw new Error(\"Skin not found: \" + deformName);\n for (var slotName in deformMap) {\n var slotMap = deformMap[slotName];\n var slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1)\n throw new Error(\"Slot not found: \" + slotMap.name);\n for (var timelineName in slotMap) {\n var timelineMap = slotMap[timelineName];\n var attachment = skin.getAttachment(slotIndex, timelineName);\n if (attachment == null) {\n // throw new Error(\"Deform attachment not found: \" + timelineMap.name);\n continue;\n }\n var weighted = attachment.bones != null;\n var vertices = attachment.vertices;\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n var timeline = new spine.DeformTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n timeline.attachment = attachment;\n var frameIndex = 0;\n for (var j = 0; j < timelineMap.length; j++) {\n var valueMap = timelineMap[j];\n var deform = void 0;\n var verticesValue = this.getValue(valueMap, \"vertices\", null);\n if (verticesValue == null)\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = spine.Utils.newFloatArray(deformLength);\n var start = this.getValue(valueMap, \"offset\", 0);\n spine.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\n if (scale != 1) {\n for (var i = start, n = i + verticesValue.length; i < n; i++)\n deform[i] *= scale;\n }\n if (!weighted) {\n for (var i = 0; i < deformLength; i++)\n deform[i] += vertices[i];\n }\n }\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n }\n }\n }\n var drawOrderNode = map.drawOrder;\n if (drawOrderNode == null)\n drawOrderNode = map.draworder;\n if (drawOrderNode != null) {\n var timeline = new spine.DrawOrderTimeline(drawOrderNode.length);\n var slotCount = skeletonData.slots.length;\n var frameIndex = 0;\n for (var j = 0; j < drawOrderNode.length; j++) {\n var drawOrderMap = drawOrderNode[j];\n var drawOrder = null;\n var offsets = this.getValue(drawOrderMap, \"offsets\", null);\n if (offsets != null) {\n drawOrder = spine.Utils.newArray(slotCount, -1);\n var unchanged = spine.Utils.newArray(slotCount - offsets.length, 0);\n var originalIndex = 0, unchangedIndex = 0;\n for (var i = 0; i < offsets.length; i++) {\n var offsetMap = offsets[i];\n var slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\n if (slotIndex == -1)\n throw new Error(\"Slot not found: \" + offsetMap.slot);\n while (originalIndex != slotIndex)\n unchanged[unchangedIndex++] = originalIndex++;\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\n }\n while (originalIndex < slotCount)\n unchanged[unchangedIndex++] = originalIndex++;\n for (var i = slotCount - 1; i >= 0; i--)\n if (drawOrder[i] == -1)\n drawOrder[i] = unchanged[--unchangedIndex];\n }\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n if (map.events) {\n var timeline = new spine.EventTimeline(map.events.length);\n var frameIndex = 0;\n for (var i = 0; i < map.events.length; i++) {\n var eventMap = map.events[i];\n var eventData = skeletonData.findEvent(eventMap.name);\n if (eventData == null)\n throw new Error(\"Event not found: \" + eventMap.name);\n var event_6 = new spine.Event(spine.Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\n event_6.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\n event_6.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\n event_6.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\n if (event_6.data.audioPath != null) {\n event_6.volume = this.getValue(eventMap, \"volume\", 1);\n event_6.balance = this.getValue(eventMap, \"balance\", 0);\n }\n timeline.setFrame(frameIndex++, event_6);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n if (isNaN(duration)) {\n throw new Error(\"Error while parsing animation, duration is NaN\");\n }\n skeletonData.animations.push(new spine.Animation(name, timelines, duration));\n };\n SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {\n var curve = map.curve;\n if (!curve)\n return;\n if (curve == \"stepped\") {\n timeline.setStepped(frameIndex);\n } else if (Object.prototype.toString.call(curve) === '[object Array]') {\n timeline.setCurve(frameIndex, curve[0], curve[1], curve[2], curve[3]);\n } else {\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\n }\n };\n SkeletonJson.prototype.getValue = function (map, prop, defaultValue) {\n return map[prop] !== undefined ? map[prop] : defaultValue;\n };\n SkeletonJson.blendModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"normal\")\n return spine.BlendMode.Normal;\n if (str == \"additive\")\n return spine.BlendMode.Additive;\n if (str == \"multiply\")\n return spine.BlendMode.Multiply;\n if (str == \"screen\")\n return spine.BlendMode.Screen;\n throw new Error(\"Unknown blend mode: \" + str);\n };\n SkeletonJson.positionModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"fixed\")\n return spine.PositionMode.Fixed;\n if (str == \"percent\")\n return spine.PositionMode.Percent;\n throw new Error(\"Unknown position mode: \" + str);\n };\n SkeletonJson.spacingModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"length\")\n return spine.SpacingMode.Length;\n if (str == \"fixed\")\n return spine.SpacingMode.Fixed;\n if (str == \"percent\")\n return spine.SpacingMode.Percent;\n throw new Error(\"Unknown position mode: \" + str);\n };\n SkeletonJson.rotateModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"tangent\")\n return spine.RotateMode.Tangent;\n if (str == \"chain\")\n return spine.RotateMode.Chain;\n if (str == \"chainscale\")\n return spine.RotateMode.ChainScale;\n throw new Error(\"Unknown rotate mode: \" + str);\n };\n SkeletonJson.transformModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"normal\")\n return spine.TransformMode.Normal;\n if (str == \"onlytranslation\")\n return spine.TransformMode.OnlyTranslation;\n if (str == \"norotationorreflection\")\n return spine.TransformMode.NoRotationOrReflection;\n if (str == \"noscale\")\n return spine.TransformMode.NoScale;\n if (str == \"noscaleorreflection\")\n return spine.TransformMode.NoScaleOrReflection;\n throw new Error(\"Unknown transform mode: \" + str);\n };\n return SkeletonJson;\n }());\n spine.SkeletonJson = SkeletonJson;\n var LinkedMesh = (function () {\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritDeform = inheritDeform;\n }\n return LinkedMesh;\n }());\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkinEntry = (function () {\n function SkinEntry(slotIndex, name, attachment) {\n this.slotIndex = slotIndex;\n this.name = name;\n this.attachment = attachment;\n }\n return SkinEntry;\n }());\n spine.SkinEntry = SkinEntry;\n var Skin = (function () {\n function Skin(name) {\n this.attachments = new Array();\n this.bones = Array();\n this.constraints = new Array();\n if (name == null)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n Skin.prototype.setAttachment = function (slotIndex, name, attachment) {\n if (attachment == null)\n throw new Error(\"attachment cannot be null.\");\n var attachments = this.attachments;\n if (slotIndex >= attachments.length)\n attachments.length = slotIndex + 1;\n if (!attachments[slotIndex])\n attachments[slotIndex] = {};\n attachments[slotIndex][name] = attachment;\n };\n Skin.prototype.addSkin = function (skin) {\n for (var i = 0; i < skin.bones.length; i++) {\n var bone = skin.bones[i];\n var contained = false;\n for (var j = 0; j < this.bones.length; j++) {\n if (this.bones[j] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (var i = 0; i < skin.constraints.length; i++) {\n var constraint = skin.constraints[i];\n var contained = false;\n for (var j = 0; j < this.constraints.length; j++) {\n if (this.constraints[j] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n var attachments = skin.getAttachments();\n for (var i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n };\n Skin.prototype.copySkin = function (skin) {\n for (var i = 0; i < skin.bones.length; i++) {\n var bone = skin.bones[i];\n var contained = false;\n for (var j = 0; j < this.bones.length; j++) {\n if (this.bones[j] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (var i = 0; i < skin.constraints.length; i++) {\n var constraint = skin.constraints[i];\n var contained = false;\n for (var j = 0; j < this.constraints.length; j++) {\n if (this.constraints[j] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n var attachments = skin.getAttachments();\n for (var i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n if (attachment.attachment == null)\n continue;\n if (attachment.attachment instanceof spine.MeshAttachment) {\n attachment.attachment = attachment.attachment.newLinkedMesh();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n else {\n attachment.attachment = attachment.attachment.copy();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n };\n Skin.prototype.getAttachment = function (slotIndex, name) {\n var dictionary = this.attachments[slotIndex];\n return dictionary ? dictionary[name] : null;\n };\n Skin.prototype.removeAttachment = function (slotIndex, name) {\n var dictionary = this.attachments[slotIndex];\n if (dictionary)\n dictionary[name] = null;\n };\n Skin.prototype.getAttachments = function () {\n var entries = new Array();\n for (var i = 0; i < this.attachments.length; i++) {\n var slotAttachments = this.attachments[i];\n if (slotAttachments) {\n for (var name_4 in slotAttachments) {\n var attachment = slotAttachments[name_4];\n if (attachment)\n entries.push(new SkinEntry(i, name_4, attachment));\n }\n }\n }\n return entries;\n };\n Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) {\n var slotAttachments = this.attachments[slotIndex];\n if (slotAttachments) {\n for (var name_5 in slotAttachments) {\n var attachment = slotAttachments[name_5];\n if (attachment)\n attachments.push(new SkinEntry(slotIndex, name_5, attachment));\n }\n }\n };\n Skin.prototype.clear = function () {\n this.attachments.length = 0;\n this.bones.length = 0;\n this.constraints.length = 0;\n };\n Skin.prototype.attachAll = function (skeleton, oldSkin) {\n var slotIndex = 0;\n for (var i = 0; i < skeleton.slots.length; i++) {\n var slot = skeleton.slots[i];\n var slotAttachment = slot.getAttachment();\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\n var dictionary = oldSkin.attachments[slotIndex];\n for (var key in dictionary) {\n var skinAttachment = dictionary[key];\n if (slotAttachment == skinAttachment) {\n var attachment = this.getAttachment(slotIndex, key);\n if (attachment != null)\n slot.setAttachment(attachment);\n break;\n }\n }\n }\n slotIndex++;\n }\n };\n return Skin;\n }());\n spine.Skin = Skin;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Slot = (function () {\n function Slot(data, bone) {\n this.deform = new Array();\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (bone == null)\n throw new Error(\"bone cannot be null.\");\n this.data = data;\n this.bone = bone;\n this.color = new spine.Color();\n this.darkColor = data.darkColor == null ? null : new spine.Color();\n this.setToSetupPose();\n }\n Slot.prototype.getSkeleton = function () {\n return this.bone.skeleton;\n };\n Slot.prototype.getAttachment = function () {\n return this.attachment;\n };\n Slot.prototype.setAttachment = function (attachment) {\n if (this.attachment == attachment)\n return;\n this.attachment = attachment;\n this.attachmentTime = this.bone.skeleton.time;\n this.deform.length = 0;\n };\n Slot.prototype.setAttachmentTime = function (time) {\n this.attachmentTime = this.bone.skeleton.time - time;\n };\n Slot.prototype.getAttachmentTime = function () {\n return this.bone.skeleton.time - this.attachmentTime;\n };\n Slot.prototype.setToSetupPose = function () {\n this.color.setFromColor(this.data.color);\n if (this.darkColor != null)\n this.darkColor.setFromColor(this.data.darkColor);\n if (this.data.attachmentName == null)\n this.attachment = null;\n else {\n this.attachment = null;\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\n }\n };\n return Slot;\n }());\n spine.Slot = Slot;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SlotData = (function () {\n function SlotData(index, name, boneData) {\n this.color = new spine.Color(1, 1, 1, 1);\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (name == null)\n throw new Error(\"name cannot be null.\");\n if (boneData == null)\n throw new Error(\"boneData cannot be null.\");\n this.index = index;\n this.name = name;\n this.boneData = boneData;\n }\n return SlotData;\n }());\n spine.SlotData = SlotData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Texture = (function () {\n function Texture(image) {\n this._image = image;\n }\n Texture.prototype.getImage = function () {\n return this._image;\n };\n Texture.filterFromString = function (text) {\n switch (text.toLowerCase()) {\n case \"nearest\": return TextureFilter.Nearest;\n case \"linear\": return TextureFilter.Linear;\n case \"mipmap\": return TextureFilter.MipMap;\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\n default: throw new Error(\"Unknown texture filter \" + text);\n }\n };\n Texture.wrapFromString = function (text) {\n switch (text.toLowerCase()) {\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\n case \"repeat\": return TextureWrap.Repeat;\n default: throw new Error(\"Unknown texture wrap \" + text);\n }\n };\n return Texture;\n }());\n spine.Texture = Texture;\n var TextureFilter;\n (function (TextureFilter) {\n TextureFilter[TextureFilter[\"Nearest\"] = 9728] = \"Nearest\";\n TextureFilter[TextureFilter[\"Linear\"] = 9729] = \"Linear\";\n TextureFilter[TextureFilter[\"MipMap\"] = 9987] = \"MipMap\";\n TextureFilter[TextureFilter[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\n TextureFilter[TextureFilter[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\n TextureFilter[TextureFilter[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\n TextureFilter[TextureFilter[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\n })(TextureFilter = spine.TextureFilter || (spine.TextureFilter = {}));\n var TextureWrap;\n (function (TextureWrap) {\n TextureWrap[TextureWrap[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\n TextureWrap[TextureWrap[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\n TextureWrap[TextureWrap[\"Repeat\"] = 10497] = \"Repeat\";\n })(TextureWrap = spine.TextureWrap || (spine.TextureWrap = {}));\n var TextureRegion = (function () {\n function TextureRegion() {\n this.u = 0;\n this.v = 0;\n this.u2 = 0;\n this.v2 = 0;\n this.width = 0;\n this.height = 0;\n this.rotate = false;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n }\n return TextureRegion;\n }());\n spine.TextureRegion = TextureRegion;\n var FakeTexture = (function (_super) {\n __extends(FakeTexture, _super);\n function FakeTexture() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FakeTexture.prototype.setFilters = function (minFilter, magFilter) { };\n FakeTexture.prototype.setWraps = function (uWrap, vWrap) { };\n FakeTexture.prototype.dispose = function () { };\n return FakeTexture;\n }(Texture));\n spine.FakeTexture = FakeTexture;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var TextureAtlas = (function () {\n function TextureAtlas(atlasText, textureLoader) {\n this.pages = new Array();\n this.regions = new Array();\n this.load(atlasText, textureLoader);\n }\n TextureAtlas.prototype.load = function (atlasText, textureLoader) {\n if (textureLoader == null)\n throw new Error(\"textureLoader cannot be null.\");\n var reader = new TextureAtlasReader(atlasText);\n var tuple = new Array(4);\n var page = null;\n while (true) {\n var line = reader.readLine();\n if (line == null)\n break;\n line = line.trim();\n if (line.length == 0)\n page = null;\n else if (!page) {\n page = new TextureAtlasPage();\n page.name = line;\n if (reader.readTuple(tuple) == 2) {\n page.width = parseInt(tuple[0]);\n page.height = parseInt(tuple[1]);\n reader.readTuple(tuple);\n }\n reader.readTuple(tuple);\n page.minFilter = spine.Texture.filterFromString(tuple[0]);\n page.magFilter = spine.Texture.filterFromString(tuple[1]);\n var direction = reader.readValue();\n page.uWrap = spine.TextureWrap.ClampToEdge;\n page.vWrap = spine.TextureWrap.ClampToEdge;\n if (direction == \"x\")\n page.uWrap = spine.TextureWrap.Repeat;\n else if (direction == \"y\")\n page.vWrap = spine.TextureWrap.Repeat;\n else if (direction == \"xy\")\n page.uWrap = page.vWrap = spine.TextureWrap.Repeat;\n page.texture = textureLoader(line);\n page.texture.setFilters(page.minFilter, page.magFilter);\n page.texture.setWraps(page.uWrap, page.vWrap);\n page.width = page.texture.getImage().width;\n page.height = page.texture.getImage().height;\n this.pages.push(page);\n }\n else {\n var region = new TextureAtlasRegion();\n region.name = line;\n region.page = page;\n var rotateValue = reader.readValue();\n if (rotateValue.toLocaleLowerCase() == \"true\") {\n region.degrees = 90;\n }\n else if (rotateValue.toLocaleLowerCase() == \"false\") {\n region.degrees = 0;\n }\n else {\n region.degrees = parseFloat(rotateValue);\n }\n region.rotate = region.degrees == 90;\n reader.readTuple(tuple);\n var x = parseInt(tuple[0]);\n var y = parseInt(tuple[1]);\n reader.readTuple(tuple);\n var width = parseInt(tuple[0]);\n var height = parseInt(tuple[1]);\n region.u = x / page.width;\n region.v = y / page.height;\n if (region.rotate) {\n region.u2 = (x + height) / page.width;\n region.v2 = (y + width) / page.height;\n }\n else {\n region.u2 = (x + width) / page.width;\n region.v2 = (y + height) / page.height;\n }\n region.x = x;\n region.y = y;\n region.width = Math.abs(width);\n region.height = Math.abs(height);\n if (reader.readTuple(tuple) == 4) {\n if (reader.readTuple(tuple) == 4) {\n reader.readTuple(tuple);\n }\n }\n region.originalWidth = parseInt(tuple[0]);\n region.originalHeight = parseInt(tuple[1]);\n reader.readTuple(tuple);\n region.offsetX = parseInt(tuple[0]);\n region.offsetY = parseInt(tuple[1]);\n region.index = parseInt(reader.readValue());\n region.texture = page.texture;\n this.regions.push(region);\n }\n }\n };\n TextureAtlas.prototype.findRegion = function (name) {\n for (var i = 0; i < this.regions.length; i++) {\n if (this.regions[i].name == name) {\n return this.regions[i];\n }\n }\n return null;\n };\n TextureAtlas.prototype.dispose = function () {\n for (var i = 0; i < this.pages.length; i++) {\n this.pages[i].texture.dispose();\n }\n };\n return TextureAtlas;\n }());\n spine.TextureAtlas = TextureAtlas;\n var TextureAtlasReader = (function () {\n function TextureAtlasReader(text) {\n this.index = 0;\n this.lines = text.split(/\\r\\n|\\r|\\n/);\n }\n TextureAtlasReader.prototype.readLine = function () {\n if (this.index >= this.lines.length)\n return null;\n return this.lines[this.index++];\n };\n TextureAtlasReader.prototype.readValue = function () {\n var line = this.readLine();\n var colon = line.indexOf(\":\");\n if (colon == -1)\n throw new Error(\"Invalid line: \" + line);\n return line.substring(colon + 1).trim();\n };\n TextureAtlasReader.prototype.readTuple = function (tuple) {\n var line = this.readLine();\n var colon = line.indexOf(\":\");\n if (colon == -1)\n throw new Error(\"Invalid line: \" + line);\n var i = 0, lastMatch = colon + 1;\n for (; i < 3; i++) {\n var comma = line.indexOf(\",\", lastMatch);\n if (comma == -1)\n break;\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\n lastMatch = comma + 1;\n }\n tuple[i] = line.substring(lastMatch).trim();\n return i + 1;\n };\n return TextureAtlasReader;\n }());\n var TextureAtlasPage = (function () {\n function TextureAtlasPage() {\n }\n return TextureAtlasPage;\n }());\n spine.TextureAtlasPage = TextureAtlasPage;\n var TextureAtlasRegion = (function (_super) {\n __extends(TextureAtlasRegion, _super);\n function TextureAtlasRegion() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return TextureAtlasRegion;\n }(spine.TextureRegion));\n spine.TextureAtlasRegion = TextureAtlasRegion;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var TransformConstraint = (function () {\n function TransformConstraint(data, skeleton) {\n this.rotateMix = 0;\n this.translateMix = 0;\n this.scaleMix = 0;\n this.shearMix = 0;\n this.temp = new spine.Vector2();\n this.active = false;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.rotateMix = data.rotateMix;\n this.translateMix = data.translateMix;\n this.scaleMix = data.scaleMix;\n this.shearMix = data.shearMix;\n this.bones = new Array();\n for (var i = 0; i < data.bones.length; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findBone(data.target.name);\n }\n TransformConstraint.prototype.isActive = function () {\n return this.active;\n };\n TransformConstraint.prototype.apply = function () {\n this.update();\n };\n TransformConstraint.prototype.update = function () {\n if (this.data.local) {\n if (this.data.relative)\n this.applyRelativeLocal();\n else\n this.applyAbsoluteLocal();\n }\n else {\n if (this.data.relative)\n this.applyRelativeWorld();\n else\n this.applyAbsoluteWorld();\n }\n };\n TransformConstraint.prototype.applyAbsoluteWorld = function () {\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n var target = this.target;\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\n var offsetRotation = this.data.offsetRotation * degRadReflect;\n var offsetShearY = this.data.offsetShearY * degRadReflect;\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n var modified = false;\n if (rotateMix != 0) {\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n r *= rotateMix;\n var cos = Math.cos(r), sin = Math.sin(r);\n bone.a = cos * a - sin * c;\n bone.b = cos * b - sin * d;\n bone.c = sin * a + cos * c;\n bone.d = sin * b + cos * d;\n modified = true;\n }\n if (translateMix != 0) {\n var temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += (temp.x - bone.worldX) * translateMix;\n bone.worldY += (temp.y - bone.worldY) * translateMix;\n modified = true;\n }\n if (scaleMix > 0) {\n var s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\n var ts = Math.sqrt(ta * ta + tc * tc);\n if (s > 0.00001)\n s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\n bone.a *= s;\n bone.c *= s;\n s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\n ts = Math.sqrt(tb * tb + td * td);\n if (s > 0.00001)\n s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\n bone.b *= s;\n bone.d *= s;\n modified = true;\n }\n if (shearMix > 0) {\n var b = bone.b, d = bone.d;\n var by = Math.atan2(d, b);\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n r = by + (r + offsetShearY) * shearMix;\n var s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n modified = true;\n }\n if (modified)\n bone.appliedValid = false;\n }\n };\n TransformConstraint.prototype.applyRelativeWorld = function () {\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n var target = this.target;\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\n var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n var modified = false;\n if (rotateMix != 0) {\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n var r = Math.atan2(tc, ta) + offsetRotation;\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n r *= rotateMix;\n var cos = Math.cos(r), sin = Math.sin(r);\n bone.a = cos * a - sin * c;\n bone.b = cos * b - sin * d;\n bone.c = sin * a + cos * c;\n bone.d = sin * b + cos * d;\n modified = true;\n }\n if (translateMix != 0) {\n var temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += temp.x * translateMix;\n bone.worldY += temp.y * translateMix;\n modified = true;\n }\n if (scaleMix > 0) {\n var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\n bone.a *= s;\n bone.c *= s;\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\n bone.b *= s;\n bone.d *= s;\n modified = true;\n }\n if (shearMix > 0) {\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta);\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n var b = bone.b, d = bone.d;\n r = Math.atan2(d, b) + (r - spine.MathUtils.PI / 2 + offsetShearY) * shearMix;\n var s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n modified = true;\n }\n if (modified)\n bone.appliedValid = false;\n }\n };\n TransformConstraint.prototype.applyAbsoluteLocal = function () {\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n var target = this.target;\n if (!target.appliedValid)\n target.updateAppliedTransform();\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (!bone.appliedValid)\n bone.updateAppliedTransform();\n var rotation = bone.arotation;\n if (rotateMix != 0) {\n var r = target.arotation - rotation + this.data.offsetRotation;\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\n rotation += r * rotateMix;\n }\n var x = bone.ax, y = bone.ay;\n if (translateMix != 0) {\n x += (target.ax - x + this.data.offsetX) * translateMix;\n y += (target.ay - y + this.data.offsetY) * translateMix;\n }\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\n if (scaleMix != 0) {\n if (scaleX > 0.00001)\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\n if (scaleY > 0.00001)\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\n }\n var shearY = bone.ashearY;\n if (shearMix != 0) {\n var r = target.ashearY - shearY + this.data.offsetShearY;\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\n bone.shearY += r * shearMix;\n }\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n };\n TransformConstraint.prototype.applyRelativeLocal = function () {\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n var target = this.target;\n if (!target.appliedValid)\n target.updateAppliedTransform();\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (!bone.appliedValid)\n bone.updateAppliedTransform();\n var rotation = bone.arotation;\n if (rotateMix != 0)\n rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\n var x = bone.ax, y = bone.ay;\n if (translateMix != 0) {\n x += (target.ax + this.data.offsetX) * translateMix;\n y += (target.ay + this.data.offsetY) * translateMix;\n }\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\n if (scaleMix != 0) {\n if (scaleX > 0.00001)\n scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\n if (scaleY > 0.00001)\n scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\n }\n var shearY = bone.ashearY;\n if (shearMix != 0)\n shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n };\n return TransformConstraint;\n }());\n spine.TransformConstraint = TransformConstraint;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var TransformConstraintData = (function (_super) {\n __extends(TransformConstraintData, _super);\n function TransformConstraintData(name) {\n var _this = _super.call(this, name, 0, false) || this;\n _this.bones = new Array();\n _this.rotateMix = 0;\n _this.translateMix = 0;\n _this.scaleMix = 0;\n _this.shearMix = 0;\n _this.offsetRotation = 0;\n _this.offsetX = 0;\n _this.offsetY = 0;\n _this.offsetScaleX = 0;\n _this.offsetScaleY = 0;\n _this.offsetShearY = 0;\n _this.relative = false;\n _this.local = false;\n return _this;\n }\n return TransformConstraintData;\n }(spine.ConstraintData));\n spine.TransformConstraintData = TransformConstraintData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Triangulator = (function () {\n function Triangulator() {\n this.convexPolygons = new Array();\n this.convexPolygonsIndices = new Array();\n this.indicesArray = new Array();\n this.isConcaveArray = new Array();\n this.triangles = new Array();\n this.polygonPool = new spine.Pool(function () {\n return new Array();\n });\n this.polygonIndicesPool = new spine.Pool(function () {\n return new Array();\n });\n }\n Triangulator.prototype.triangulate = function (verticesArray) {\n var vertices = verticesArray;\n var vertexCount = verticesArray.length >> 1;\n var indices = this.indicesArray;\n indices.length = 0;\n for (var i = 0; i < vertexCount; i++)\n indices[i] = i;\n var isConcave = this.isConcaveArray;\n isConcave.length = 0;\n for (var i = 0, n = vertexCount; i < n; ++i)\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\n var triangles = this.triangles;\n triangles.length = 0;\n while (vertexCount > 3) {\n var previous = vertexCount - 1, i = 0, next = 1;\n while (true) {\n outer: if (!isConcave[i]) {\n var p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\n var p1x = vertices[p1], p1y = vertices[p1 + 1];\n var p2x = vertices[p2], p2y = vertices[p2 + 1];\n var p3x = vertices[p3], p3y = vertices[p3 + 1];\n for (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\n if (!isConcave[ii])\n continue;\n var v = indices[ii] << 1;\n var vx = vertices[v], vy = vertices[v + 1];\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\n break outer;\n }\n }\n }\n break;\n }\n if (next == 0) {\n do {\n if (!isConcave[i])\n break;\n i--;\n } while (i > 0);\n break;\n }\n previous = i;\n i = next;\n next = (next + 1) % vertexCount;\n }\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\n triangles.push(indices[i]);\n triangles.push(indices[(i + 1) % vertexCount]);\n indices.splice(i, 1);\n isConcave.splice(i, 1);\n vertexCount--;\n var previousIndex = (vertexCount + i - 1) % vertexCount;\n var nextIndex = i == vertexCount ? 0 : i;\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\n }\n if (vertexCount == 3) {\n triangles.push(indices[2]);\n triangles.push(indices[0]);\n triangles.push(indices[1]);\n }\n return triangles;\n };\n Triangulator.prototype.decompose = function (verticesArray, triangles) {\n var vertices = verticesArray;\n var convexPolygons = this.convexPolygons;\n this.polygonPool.freeAll(convexPolygons);\n convexPolygons.length = 0;\n var convexPolygonsIndices = this.convexPolygonsIndices;\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\n convexPolygonsIndices.length = 0;\n var polygonIndices = this.polygonIndicesPool.obtain();\n polygonIndices.length = 0;\n var polygon = this.polygonPool.obtain();\n polygon.length = 0;\n var fanBaseIndex = -1, lastWinding = 0;\n for (var i = 0, n = triangles.length; i < n; i += 3) {\n var t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\n var x1 = vertices[t1], y1 = vertices[t1 + 1];\n var x2 = vertices[t2], y2 = vertices[t2 + 1];\n var x3 = vertices[t3], y3 = vertices[t3 + 1];\n var merged = false;\n if (fanBaseIndex == t1) {\n var o = polygon.length - 4;\n var winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\n var winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\n if (winding1 == lastWinding && winding2 == lastWinding) {\n polygon.push(x3);\n polygon.push(y3);\n polygonIndices.push(t3);\n merged = true;\n }\n }\n if (!merged) {\n if (polygon.length > 0) {\n convexPolygons.push(polygon);\n convexPolygonsIndices.push(polygonIndices);\n }\n else {\n this.polygonPool.free(polygon);\n this.polygonIndicesPool.free(polygonIndices);\n }\n polygon = this.polygonPool.obtain();\n polygon.length = 0;\n polygon.push(x1);\n polygon.push(y1);\n polygon.push(x2);\n polygon.push(y2);\n polygon.push(x3);\n polygon.push(y3);\n polygonIndices = this.polygonIndicesPool.obtain();\n polygonIndices.length = 0;\n polygonIndices.push(t1);\n polygonIndices.push(t2);\n polygonIndices.push(t3);\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\n fanBaseIndex = t1;\n }\n }\n if (polygon.length > 0) {\n convexPolygons.push(polygon);\n convexPolygonsIndices.push(polygonIndices);\n }\n for (var i = 0, n = convexPolygons.length; i < n; i++) {\n polygonIndices = convexPolygonsIndices[i];\n if (polygonIndices.length == 0)\n continue;\n var firstIndex = polygonIndices[0];\n var lastIndex = polygonIndices[polygonIndices.length - 1];\n polygon = convexPolygons[i];\n var o = polygon.length - 4;\n var prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\n var prevX = polygon[o + 2], prevY = polygon[o + 3];\n var firstX = polygon[0], firstY = polygon[1];\n var secondX = polygon[2], secondY = polygon[3];\n var winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\n for (var ii = 0; ii < n; ii++) {\n if (ii == i)\n continue;\n var otherIndices = convexPolygonsIndices[ii];\n if (otherIndices.length != 3)\n continue;\n var otherFirstIndex = otherIndices[0];\n var otherSecondIndex = otherIndices[1];\n var otherLastIndex = otherIndices[2];\n var otherPoly = convexPolygons[ii];\n var x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\n continue;\n var winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\n var winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\n if (winding1 == winding && winding2 == winding) {\n otherPoly.length = 0;\n otherIndices.length = 0;\n polygon.push(x3);\n polygon.push(y3);\n polygonIndices.push(otherLastIndex);\n prevPrevX = prevX;\n prevPrevY = prevY;\n prevX = x3;\n prevY = y3;\n ii = 0;\n }\n }\n }\n for (var i = convexPolygons.length - 1; i >= 0; i--) {\n polygon = convexPolygons[i];\n if (polygon.length == 0) {\n convexPolygons.splice(i, 1);\n this.polygonPool.free(polygon);\n polygonIndices = convexPolygonsIndices[i];\n convexPolygonsIndices.splice(i, 1);\n this.polygonIndicesPool.free(polygonIndices);\n }\n }\n return convexPolygons;\n };\n Triangulator.isConcave = function (index, vertexCount, vertices, indices) {\n var previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\n var current = indices[index] << 1;\n var next = indices[(index + 1) % vertexCount] << 1;\n return !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]);\n };\n Triangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) {\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\n };\n Triangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) {\n var px = p2x - p1x, py = p2y - p1y;\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\n };\n return Triangulator;\n }());\n spine.Triangulator = Triangulator;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var IntSet = (function () {\n function IntSet() {\n this.array = new Array();\n }\n IntSet.prototype.add = function (value) {\n var contains = this.contains(value);\n this.array[value | 0] = value | 0;\n return !contains;\n };\n IntSet.prototype.contains = function (value) {\n return this.array[value | 0] != undefined;\n };\n IntSet.prototype.remove = function (value) {\n this.array[value | 0] = undefined;\n };\n IntSet.prototype.clear = function () {\n this.array.length = 0;\n };\n return IntSet;\n }());\n spine.IntSet = IntSet;\n var Color = (function () {\n function Color(r, g, b, a) {\n if (r === void 0) { r = 0; }\n if (g === void 0) { g = 0; }\n if (b === void 0) { b = 0; }\n if (a === void 0) { a = 0; }\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n Color.prototype.set = function (r, g, b, a) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n this.clamp();\n return this;\n };\n Color.prototype.setFromColor = function (c) {\n this.r = c.r;\n this.g = c.g;\n this.b = c.b;\n this.a = c.a;\n return this;\n };\n Color.prototype.setFromString = function (hex) {\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\n return this;\n };\n Color.prototype.add = function (r, g, b, a) {\n this.r += r;\n this.g += g;\n this.b += b;\n this.a += a;\n this.clamp();\n return this;\n };\n Color.prototype.clamp = function () {\n if (this.r < 0)\n this.r = 0;\n else if (this.r > 1)\n this.r = 1;\n if (this.g < 0)\n this.g = 0;\n else if (this.g > 1)\n this.g = 1;\n if (this.b < 0)\n this.b = 0;\n else if (this.b > 1)\n this.b = 1;\n if (this.a < 0)\n this.a = 0;\n else if (this.a > 1)\n this.a = 1;\n return this;\n };\n Color.rgba8888ToColor = function (color, value) {\n color.r = ((value & 0xff000000) >>> 24) / 255;\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\n color.a = ((value & 0x000000ff)) / 255;\n };\n Color.rgb888ToColor = function (color, value) {\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\n color.b = ((value & 0x000000ff)) / 255;\n };\n Color.WHITE = new Color(1, 1, 1, 1);\n Color.RED = new Color(1, 0, 0, 1);\n Color.GREEN = new Color(0, 1, 0, 1);\n Color.BLUE = new Color(0, 0, 1, 1);\n Color.MAGENTA = new Color(1, 0, 1, 1);\n return Color;\n }());\n spine.Color = Color;\n var MathUtils = (function () {\n function MathUtils() {\n }\n MathUtils.clamp = function (value, min, max) {\n if (value < min)\n return min;\n if (value > max)\n return max;\n return value;\n };\n MathUtils.cosDeg = function (degrees) {\n return Math.cos(degrees * MathUtils.degRad);\n };\n MathUtils.sinDeg = function (degrees) {\n return Math.sin(degrees * MathUtils.degRad);\n };\n MathUtils.signum = function (value) {\n return value > 0 ? 1 : value < 0 ? -1 : 0;\n };\n MathUtils.toInt = function (x) {\n return x > 0 ? Math.floor(x) : Math.ceil(x);\n };\n MathUtils.cbrt = function (x) {\n var y = Math.pow(Math.abs(x), 1 / 3);\n return x < 0 ? -y : y;\n };\n MathUtils.randomTriangular = function (min, max) {\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\n };\n MathUtils.randomTriangularWith = function (min, max, mode) {\n var u = Math.random();\n var d = max - min;\n if (u <= (mode - min) / d)\n return min + Math.sqrt(u * d * (mode - min));\n return max - Math.sqrt((1 - u) * d * (max - mode));\n };\n MathUtils.PI = 3.1415927;\n MathUtils.PI2 = MathUtils.PI * 2;\n MathUtils.radiansToDegrees = 180 / MathUtils.PI;\n MathUtils.radDeg = MathUtils.radiansToDegrees;\n MathUtils.degreesToRadians = MathUtils.PI / 180;\n MathUtils.degRad = MathUtils.degreesToRadians;\n return MathUtils;\n }());\n spine.MathUtils = MathUtils;\n var Interpolation = (function () {\n function Interpolation() {\n }\n Interpolation.prototype.apply = function (start, end, a) {\n return start + (end - start) * this.applyInternal(a);\n };\n return Interpolation;\n }());\n spine.Interpolation = Interpolation;\n var Pow = (function (_super) {\n __extends(Pow, _super);\n function Pow(power) {\n var _this = _super.call(this) || this;\n _this.power = 2;\n _this.power = power;\n return _this;\n }\n Pow.prototype.applyInternal = function (a) {\n if (a <= 0.5)\n return Math.pow(a * 2, this.power) / 2;\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\n };\n return Pow;\n }(Interpolation));\n spine.Pow = Pow;\n var PowOut = (function (_super) {\n __extends(PowOut, _super);\n function PowOut(power) {\n return _super.call(this, power) || this;\n }\n PowOut.prototype.applyInternal = function (a) {\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\n };\n return PowOut;\n }(Pow));\n spine.PowOut = PowOut;\n var Utils = (function () {\n function Utils() {\n }\n Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) {\n for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\n dest[j] = source[i];\n }\n };\n Utils.setArraySize = function (array, size, value) {\n if (value === void 0) { value = 0; }\n var oldSize = array.length;\n if (oldSize == size)\n return array;\n array.length = size;\n if (oldSize < size) {\n for (var i = oldSize; i < size; i++)\n array[i] = value;\n }\n return array;\n };\n Utils.ensureArrayCapacity = function (array, size, value) {\n if (value === void 0) { value = 0; }\n if (array.length >= size)\n return array;\n return Utils.setArraySize(array, size, value);\n };\n Utils.newArray = function (size, defaultValue) {\n var array = new Array(size);\n for (var i = 0; i < size; i++)\n array[i] = defaultValue;\n return array;\n };\n Utils.newFloatArray = function (size) {\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\n return new Float32Array(size);\n }\n else {\n var array = new Array(size);\n for (var i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n };\n Utils.newShortArray = function (size) {\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\n return new Int16Array(size);\n }\n else {\n var array = new Array(size);\n for (var i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n };\n Utils.toFloatArray = function (array) {\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\n };\n Utils.toSinglePrecision = function (value) {\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\n };\n Utils.webkit602BugfixHelper = function (alpha, blend) {\n };\n Utils.contains = function (array, element, identity) {\n if (identity === void 0) { identity = true; }\n for (var i = 0; i < array.length; i++) {\n if (array[i] == element)\n return true;\n }\n return false;\n };\n Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== \"undefined\";\n return Utils;\n }());\n spine.Utils = Utils;\n var DebugUtils = (function () {\n function DebugUtils() {\n }\n DebugUtils.logBones = function (skeleton) {\n for (var i = 0; i < skeleton.bones.length; i++) {\n var bone = skeleton.bones[i];\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\n }\n };\n return DebugUtils;\n }());\n spine.DebugUtils = DebugUtils;\n var Pool = (function () {\n function Pool(instantiator) {\n this.items = new Array();\n this.instantiator = instantiator;\n }\n Pool.prototype.obtain = function () {\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\n };\n Pool.prototype.free = function (item) {\n if (item.reset)\n item.reset();\n this.items.push(item);\n };\n Pool.prototype.freeAll = function (items) {\n for (var i = 0; i < items.length; i++) {\n if (items[i].reset)\n items[i].reset();\n this.items[i] = items[i];\n }\n };\n Pool.prototype.clear = function () {\n this.items.length = 0;\n };\n return Pool;\n }());\n spine.Pool = Pool;\n var Vector2 = (function () {\n function Vector2(x, y) {\n if (x === void 0) { x = 0; }\n if (y === void 0) { y = 0; }\n this.x = x;\n this.y = y;\n }\n Vector2.prototype.set = function (x, y) {\n this.x = x;\n this.y = y;\n return this;\n };\n Vector2.prototype.length = function () {\n var x = this.x;\n var y = this.y;\n return Math.sqrt(x * x + y * y);\n };\n Vector2.prototype.normalize = function () {\n var len = this.length();\n if (len != 0) {\n this.x /= len;\n this.y /= len;\n }\n return this;\n };\n return Vector2;\n }());\n spine.Vector2 = Vector2;\n var TimeKeeper = (function () {\n function TimeKeeper() {\n this.maxDelta = 0.064;\n this.framesPerSecond = 0;\n this.delta = 0;\n this.totalTime = 0;\n this.lastTime = Date.now() / 1000;\n this.frameCount = 0;\n this.frameTime = 0;\n }\n TimeKeeper.prototype.update = function () {\n var now = Date.now() / 1000;\n this.delta = now - this.lastTime;\n this.frameTime += this.delta;\n this.totalTime += this.delta;\n if (this.delta > this.maxDelta)\n this.delta = this.maxDelta;\n this.lastTime = now;\n this.frameCount++;\n if (this.frameTime > 1) {\n this.framesPerSecond = this.frameCount / this.frameTime;\n this.frameTime = 0;\n this.frameCount = 0;\n }\n };\n return TimeKeeper;\n }());\n spine.TimeKeeper = TimeKeeper;\n var WindowedMean = (function () {\n function WindowedMean(windowSize) {\n if (windowSize === void 0) { windowSize = 32; }\n this.addedValues = 0;\n this.lastValue = 0;\n this.mean = 0;\n this.dirty = true;\n this.values = new Array(windowSize);\n }\n WindowedMean.prototype.hasEnoughData = function () {\n return this.addedValues >= this.values.length;\n };\n WindowedMean.prototype.addValue = function (value) {\n if (this.addedValues < this.values.length)\n this.addedValues++;\n this.values[this.lastValue++] = value;\n if (this.lastValue > this.values.length - 1)\n this.lastValue = 0;\n this.dirty = true;\n };\n WindowedMean.prototype.getMean = function () {\n if (this.hasEnoughData()) {\n if (this.dirty) {\n var mean = 0;\n for (var i = 0; i < this.values.length; i++) {\n mean += this.values[i];\n }\n this.mean = mean / this.values.length;\n this.dirty = false;\n }\n return this.mean;\n }\n else {\n return 0;\n }\n };\n return WindowedMean;\n }());\n spine.WindowedMean = WindowedMean;\n})(spine || (spine = {}));\n(function () {\n if (!Math.fround) {\n Math.fround = (function (array) {\n return function (x) {\n return array[0] = x, array[0];\n };\n })(new Float32Array(1));\n }\n})();\nvar spine;\n(function (spine) {\n var Attachment = (function () {\n function Attachment(name) {\n if (name == null)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n return Attachment;\n }());\n spine.Attachment = Attachment;\n var VertexAttachment = (function (_super) {\n __extends(VertexAttachment, _super);\n function VertexAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.id = (VertexAttachment.nextID++ & 65535) << 11;\n _this.worldVerticesLength = 0;\n _this.deformAttachment = _this;\n return _this;\n }\n VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\n count = offset + (count >> 1) * stride;\n var skeleton = slot.bone.skeleton;\n var deformArray = slot.deform;\n var vertices = this.vertices;\n var bones = this.bones;\n if (bones == null) {\n if (deformArray.length > 0)\n vertices = deformArray;\n var bone = slot.bone;\n var x = bone.worldX;\n var y = bone.worldY;\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\n var vx = vertices[v_1], vy = vertices[v_1 + 1];\n worldVertices[w] = vx * a + vy * b + x;\n worldVertices[w + 1] = vx * c + vy * d + y;\n }\n return;\n }\n var v = 0, skip = 0;\n for (var i = 0; i < start; i += 2) {\n var n = bones[v];\n v += n + 1;\n skip += n;\n }\n var skeletonBones = skeleton.bones;\n if (deformArray.length == 0) {\n for (var w = offset, b = skip * 3; w < count; w += stride) {\n var wx = 0, wy = 0;\n var n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3) {\n var bone = skeletonBones[bones[v]];\n var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\n }\n worldVertices[w] = wx;\n worldVertices[w + 1] = wy;\n }\n }\n else {\n var deform = deformArray;\n for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\n var wx = 0, wy = 0;\n var n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3, f += 2) {\n var bone = skeletonBones[bones[v]];\n var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\n }\n worldVertices[w] = wx;\n worldVertices[w + 1] = wy;\n }\n }\n };\n VertexAttachment.prototype.copyTo = function (attachment) {\n if (this.bones != null) {\n attachment.bones = new Array(this.bones.length);\n spine.Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\n }\n else\n attachment.bones = null;\n if (this.vertices != null) {\n attachment.vertices = spine.Utils.newFloatArray(this.vertices.length);\n spine.Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\n }\n else\n attachment.vertices = null;\n attachment.worldVerticesLength = this.worldVerticesLength;\n attachment.deformAttachment = this.deformAttachment;\n };\n VertexAttachment.nextID = 0;\n return VertexAttachment;\n }(Attachment));\n spine.VertexAttachment = VertexAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AttachmentType;\n (function (AttachmentType) {\n AttachmentType[AttachmentType[\"Region\"] = 0] = \"Region\";\n AttachmentType[AttachmentType[\"BoundingBox\"] = 1] = \"BoundingBox\";\n AttachmentType[AttachmentType[\"Mesh\"] = 2] = \"Mesh\";\n AttachmentType[AttachmentType[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\n AttachmentType[AttachmentType[\"Path\"] = 4] = \"Path\";\n AttachmentType[AttachmentType[\"Point\"] = 5] = \"Point\";\n AttachmentType[AttachmentType[\"Clipping\"] = 6] = \"Clipping\";\n })(AttachmentType = spine.AttachmentType || (spine.AttachmentType = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var BoundingBoxAttachment = (function (_super) {\n __extends(BoundingBoxAttachment, _super);\n function BoundingBoxAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.color = new spine.Color(1, 1, 1, 1);\n return _this;\n }\n BoundingBoxAttachment.prototype.copy = function () {\n var copy = new BoundingBoxAttachment(name);\n this.copyTo(copy);\n copy.color.setFromColor(this.color);\n return copy;\n };\n return BoundingBoxAttachment;\n }(spine.VertexAttachment));\n spine.BoundingBoxAttachment = BoundingBoxAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var ClippingAttachment = (function (_super) {\n __extends(ClippingAttachment, _super);\n function ClippingAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.color = new spine.Color(0.2275, 0.2275, 0.8078, 1);\n return _this;\n }\n ClippingAttachment.prototype.copy = function () {\n var copy = new ClippingAttachment(name);\n this.copyTo(copy);\n copy.endSlot = this.endSlot;\n copy.color.setFromColor(this.color);\n return copy;\n };\n return ClippingAttachment;\n }(spine.VertexAttachment));\n spine.ClippingAttachment = ClippingAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var MeshAttachment = (function (_super) {\n __extends(MeshAttachment, _super);\n function MeshAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.color = new spine.Color(1, 1, 1, 1);\n _this.tempColor = new spine.Color(0, 0, 0, 0);\n return _this;\n }\n MeshAttachment.prototype.updateUVs = function () {\n var regionUVs = this.regionUVs;\n if (this.uvs == null || this.uvs.length != regionUVs.length)\n this.uvs = spine.Utils.newFloatArray(regionUVs.length);\n var uvs = this.uvs;\n var n = this.uvs.length;\n var u = this.region.u, v = this.region.v, width = 0, height = 0;\n if (this.region instanceof spine.TextureAtlasRegion) {\n var region = this.region;\n var textureWidth = region.texture.getImage().width, textureHeight = region.texture.getImage().height;\n switch (region.degrees) {\n case 90:\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\n width = region.originalHeight / textureWidth;\n height = region.originalWidth / textureHeight;\n for (var i = 0; i < n; i += 2) {\n uvs[i] = u + regionUVs[i + 1] * width;\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\n }\n return;\n case 180:\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\n v -= region.offsetY / textureHeight;\n width = region.originalWidth / textureWidth;\n height = region.originalHeight / textureHeight;\n for (var i = 0; i < n; i += 2) {\n uvs[i] = u + (1 - regionUVs[i]) * width;\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\n }\n return;\n case 270:\n u -= region.offsetY / textureWidth;\n v -= region.offsetX / textureHeight;\n width = region.originalHeight / textureWidth;\n height = region.originalWidth / textureHeight;\n for (var i = 0; i < n; i += 2) {\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\n uvs[i + 1] = v + regionUVs[i] * height;\n }\n return;\n }\n u -= region.offsetX / textureWidth;\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\n width = region.originalWidth / textureWidth;\n height = region.originalHeight / textureHeight;\n }\n else if (this.region == null) {\n u = v = 0;\n width = height = 1;\n }\n else {\n width = this.region.u2 - u;\n height = this.region.v2 - v;\n }\n for (var i = 0; i < n; i += 2) {\n uvs[i] = u + regionUVs[i] * width;\n uvs[i + 1] = v + regionUVs[i + 1] * height;\n }\n };\n MeshAttachment.prototype.getParentMesh = function () {\n return this.parentMesh;\n };\n MeshAttachment.prototype.setParentMesh = function (parentMesh) {\n this.parentMesh = parentMesh;\n if (parentMesh != null) {\n this.bones = parentMesh.bones;\n this.vertices = parentMesh.vertices;\n this.worldVerticesLength = parentMesh.worldVerticesLength;\n this.regionUVs = parentMesh.regionUVs;\n this.triangles = parentMesh.triangles;\n this.hullLength = parentMesh.hullLength;\n this.worldVerticesLength = parentMesh.worldVerticesLength;\n }\n };\n MeshAttachment.prototype.copy = function () {\n if (this.parentMesh != null)\n return this.newLinkedMesh();\n var copy = new MeshAttachment(this.name);\n copy.region = this.region;\n copy.path = this.path;\n copy.color.setFromColor(this.color);\n this.copyTo(copy);\n copy.regionUVs = new Array(this.regionUVs.length);\n spine.Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\n copy.uvs = new Array(this.uvs.length);\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\n copy.triangles = new Array(this.triangles.length);\n spine.Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\n copy.hullLength = this.hullLength;\n if (this.edges != null) {\n copy.edges = new Array(this.edges.length);\n spine.Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\n }\n copy.width = this.width;\n copy.height = this.height;\n return copy;\n };\n MeshAttachment.prototype.newLinkedMesh = function () {\n var copy = new MeshAttachment(this.name);\n copy.region = this.region;\n copy.path = this.path;\n copy.color.setFromColor(this.color);\n copy.deformAttachment = this.deformAttachment;\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\n copy.updateUVs();\n return copy;\n };\n return MeshAttachment;\n }(spine.VertexAttachment));\n spine.MeshAttachment = MeshAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var PathAttachment = (function (_super) {\n __extends(PathAttachment, _super);\n function PathAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.closed = false;\n _this.constantSpeed = false;\n _this.color = new spine.Color(1, 1, 1, 1);\n return _this;\n }\n PathAttachment.prototype.copy = function () {\n var copy = new PathAttachment(name);\n this.copyTo(copy);\n copy.lengths = new Array(this.lengths.length);\n spine.Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\n copy.closed = closed;\n copy.constantSpeed = this.constantSpeed;\n copy.color.setFromColor(this.color);\n return copy;\n };\n return PathAttachment;\n }(spine.VertexAttachment));\n spine.PathAttachment = PathAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var PointAttachment = (function (_super) {\n __extends(PointAttachment, _super);\n function PointAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.color = new spine.Color(0.38, 0.94, 0, 1);\n return _this;\n }\n PointAttachment.prototype.computeWorldPosition = function (bone, point) {\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\n return point;\n };\n PointAttachment.prototype.computeWorldRotation = function (bone) {\n var cos = spine.MathUtils.cosDeg(this.rotation), sin = spine.MathUtils.sinDeg(this.rotation);\n var x = cos * bone.a + sin * bone.b;\n var y = cos * bone.c + sin * bone.d;\n return Math.atan2(y, x) * spine.MathUtils.radDeg;\n };\n PointAttachment.prototype.copy = function () {\n var copy = new PointAttachment(name);\n copy.x = this.x;\n copy.y = this.y;\n copy.rotation = this.rotation;\n copy.color.setFromColor(this.color);\n return copy;\n };\n return PointAttachment;\n }(spine.VertexAttachment));\n spine.PointAttachment = PointAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var RegionAttachment = (function (_super) {\n __extends(RegionAttachment, _super);\n function RegionAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.x = 0;\n _this.y = 0;\n _this.scaleX = 1;\n _this.scaleY = 1;\n _this.rotation = 0;\n _this.width = 0;\n _this.height = 0;\n _this.color = new spine.Color(1, 1, 1, 1);\n _this.offset = spine.Utils.newFloatArray(8);\n _this.uvs = spine.Utils.newFloatArray(8);\n _this.tempColor = new spine.Color(1, 1, 1, 1);\n return _this;\n }\n RegionAttachment.prototype.updateOffset = function () {\n var regionScaleX = this.width / this.region.originalWidth * this.scaleX;\n var regionScaleY = this.height / this.region.originalHeight * this.scaleY;\n var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\n var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\n var localX2 = localX + this.region.width * regionScaleX;\n var localY2 = localY + this.region.height * regionScaleY;\n var radians = this.rotation * Math.PI / 180;\n var cos = Math.cos(radians);\n var sin = Math.sin(radians);\n var localXCos = localX * cos + this.x;\n var localXSin = localX * sin;\n var localYCos = localY * cos + this.y;\n var localYSin = localY * sin;\n var localX2Cos = localX2 * cos + this.x;\n var localX2Sin = localX2 * sin;\n var localY2Cos = localY2 * cos + this.y;\n var localY2Sin = localY2 * sin;\n var offset = this.offset;\n offset[RegionAttachment.OX1] = localXCos - localYSin;\n offset[RegionAttachment.OY1] = localYCos + localXSin;\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\n };\n RegionAttachment.prototype.setRegion = function (region) {\n this.region = region;\n var uvs = this.uvs;\n if (region.degrees === 90) {\n uvs[2] = region.u;\n uvs[3] = region.v2;\n uvs[4] = region.u;\n uvs[5] = region.v;\n uvs[6] = region.u2;\n uvs[7] = region.v;\n uvs[0] = region.u2;\n uvs[1] = region.v2;\n } else if (region.degrees === 270) {\n uvs[6] = region.u;\n uvs[7] = region.v2;\n uvs[0] = region.u;\n uvs[1] = region.v;\n uvs[2] = region.u2;\n uvs[3] = region.v;\n uvs[4] = region.u2;\n uvs[5] = region.v2;\n } else {\n uvs[0] = region.u;\n uvs[1] = region.v2;\n uvs[2] = region.u;\n uvs[3] = region.v;\n uvs[4] = region.u2;\n uvs[5] = region.v;\n uvs[6] = region.u2;\n uvs[7] = region.v2;\n }\n };\n RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\n var vertexOffset = this.offset;\n var x = bone.worldX, y = bone.worldY;\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n var offsetX = 0, offsetY = 0;\n offsetX = vertexOffset[RegionAttachment.OX1];\n offsetY = vertexOffset[RegionAttachment.OY1];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[RegionAttachment.OX2];\n offsetY = vertexOffset[RegionAttachment.OY2];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[RegionAttachment.OX3];\n offsetY = vertexOffset[RegionAttachment.OY3];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[RegionAttachment.OX4];\n offsetY = vertexOffset[RegionAttachment.OY4];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n };\n RegionAttachment.prototype.copy = function () {\n var copy = new RegionAttachment(name);\n copy.region = this.region;\n copy.rendererObject = this.rendererObject;\n copy.path = this.path;\n copy.x = this.x;\n copy.y = this.y;\n copy.scaleX = this.scaleX;\n copy.scaleY = this.scaleY;\n copy.rotation = this.rotation;\n copy.width = this.width;\n copy.height = this.height;\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\n spine.Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\n copy.color.setFromColor(this.color);\n return copy;\n };\n RegionAttachment.OX1 = 0;\n RegionAttachment.OY1 = 1;\n RegionAttachment.OX2 = 2;\n RegionAttachment.OY2 = 3;\n RegionAttachment.OX3 = 4;\n RegionAttachment.OY3 = 5;\n RegionAttachment.OX4 = 6;\n RegionAttachment.OY4 = 7;\n RegionAttachment.X1 = 0;\n RegionAttachment.Y1 = 1;\n RegionAttachment.C1R = 2;\n RegionAttachment.C1G = 3;\n RegionAttachment.C1B = 4;\n RegionAttachment.C1A = 5;\n RegionAttachment.U1 = 6;\n RegionAttachment.V1 = 7;\n RegionAttachment.X2 = 8;\n RegionAttachment.Y2 = 9;\n RegionAttachment.C2R = 10;\n RegionAttachment.C2G = 11;\n RegionAttachment.C2B = 12;\n RegionAttachment.C2A = 13;\n RegionAttachment.U2 = 14;\n RegionAttachment.V2 = 15;\n RegionAttachment.X3 = 16;\n RegionAttachment.Y3 = 17;\n RegionAttachment.C3R = 18;\n RegionAttachment.C3G = 19;\n RegionAttachment.C3B = 20;\n RegionAttachment.C3A = 21;\n RegionAttachment.U3 = 22;\n RegionAttachment.V3 = 23;\n RegionAttachment.X4 = 24;\n RegionAttachment.Y4 = 25;\n RegionAttachment.C4R = 26;\n RegionAttachment.C4G = 27;\n RegionAttachment.C4B = 28;\n RegionAttachment.C4A = 29;\n RegionAttachment.U4 = 30;\n RegionAttachment.V4 = 31;\n return RegionAttachment;\n }(spine.Attachment));\n spine.RegionAttachment = RegionAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var JitterEffect = (function () {\n function JitterEffect(jitterX, jitterY) {\n this.jitterX = 0;\n this.jitterY = 0;\n this.jitterX = jitterX;\n this.jitterY = jitterY;\n }\n JitterEffect.prototype.begin = function (skeleton) {\n };\n JitterEffect.prototype.transform = function (position, uv, light, dark) {\n position.x += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\n position.y += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\n };\n JitterEffect.prototype.end = function () {\n };\n return JitterEffect;\n }());\n spine.JitterEffect = JitterEffect;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SwirlEffect = (function () {\n function SwirlEffect(radius, interpolation) {\n this.centerX = 0;\n this.centerY = 0;\n this.radius = 0;\n this.angle = 0;\n this.worldX = 0;\n this.worldY = 0;\n this.radius = radius;\n this.interpolation = interpolation;\n }\n SwirlEffect.prototype.begin = function (skeleton) {\n this.worldX = skeleton.x + this.centerX;\n this.worldY = skeleton.y + this.centerY;\n };\n SwirlEffect.prototype.transform = function (position, uv, light, dark) {\n var radAngle = this.angle * spine.MathUtils.degreesToRadians;\n var x = position.x - this.worldX;\n var y = position.y - this.worldY;\n var dist = Math.sqrt(x * x + y * y);\n if (dist < this.radius) {\n var theta = this.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\n var cos = Math.cos(theta);\n var sin = Math.sin(theta);\n position.x = cos * x - sin * y + this.worldX;\n position.y = sin * x + cos * y + this.worldY;\n }\n };\n SwirlEffect.prototype.end = function () {\n };\n SwirlEffect.interpolation = new spine.PowOut(2);\n return SwirlEffect;\n }());\n spine.SwirlEffect = SwirlEffect;\n})(spine || (spine = {}));\n//# sourceMappingURL=spine-core.js.map\n\nmodule.exports = spine;\n","/****************************************************************************\n Copyright (c) 2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nconst TrackEntryListeners = require('./track-entry-listeners');\nconst spine = require('./lib/spine');\n// Permit max cache time, unit is second.\nconst MaxCacheTime = 30;\nconst FrameTime = 1 / 60;\n\nlet _vertices = [];\nlet _indices = [];\nlet _boneInfoOffset = 0;\nlet _vertexOffset = 0;\nlet _indexOffset = 0;\nlet _vfOffset = 0;\nlet _preTexUrl = null;\nlet _preBlendMode = null;\nlet _segVCount = 0;\nlet _segICount = 0;\nlet _segOffset = 0;\nlet _colorOffset = 0;\nlet _preFinalColor = null;\nlet _preDarkColor = null;\n// x y u v c1 c2\nlet _perVertexSize = 6;\n// x y u v r1 g1 b1 a1 r2 g2 b2 a2\nlet _perClipVertexSize = 12;\nlet _vfCount = 0, _indexCount = 0;\nlet _tempr, _tempg, _tempb, _tempa;\nlet _finalColor32, _darkColor32;\nlet _finalColor = new spine.Color(1, 1, 1, 1);\nlet _darkColor = new spine.Color(1, 1, 1, 1);\nlet _quadTriangles = [0, 1, 2, 2, 3, 0];\n\n//Cache all frames in an animation\nlet AnimationCache = cc.Class({\n ctor () {\n this._privateMode = false;\n this._inited = false;\n this._invalid = true;\n this._enableCacheAttachedInfo = false;\n this.frames = [];\n this.totalTime = 0;\n this._frameIdx = -1;\n this.isCompleted = false;\n\n this._skeletonInfo = null;\n this._animationName = null;\n this._tempSegments = null;\n this._tempColors = null;\n this._tempBoneInfos = null;\n },\n\n init (skeletonInfo, animationName) {\n this._inited = true;\n this._animationName = animationName;\n this._skeletonInfo = skeletonInfo;\n },\n\n // Clear texture quote.\n clear () {\n this._inited = false;\n for (let i = 0, n = this.frames.length; i < n; i++) {\n let frame = this.frames[i];\n frame.segments.length = 0;\n }\n this.invalidAllFrame();\n },\n\n bind (listener) {\n let completeHandle = function (entry) {\n if (entry && entry.animation.name === this._animationName) {\n this.isCompleted = true;\n }\n }.bind(this);\n\n listener.complete = completeHandle;\n },\n\n unbind (listener) {\n listener.complete = null;\n },\n\n begin () {\n if (!this._invalid) return;\n\n let skeletonInfo = this._skeletonInfo;\n let preAnimationCache = skeletonInfo.curAnimationCache;\n \n if (preAnimationCache && preAnimationCache !== this) {\n if (this._privateMode) {\n // Private cache mode just invalid pre animation frame.\n preAnimationCache.invalidAllFrame();\n } else {\n // If pre animation not finished, play it to the end.\n preAnimationCache.updateToFrame();\n }\n }\n\n let skeleton = skeletonInfo.skeleton;\n let listener = skeletonInfo.listener;\n let state = skeletonInfo.state;\n\n let animation = skeleton.data.findAnimation(this._animationName);\n state.setAnimationWith(0, animation, false);\n this.bind(listener);\n\n // record cur animation cache\n skeletonInfo.curAnimationCache = this;\n this._frameIdx = -1;\n this.isCompleted = false;\n this.totalTime = 0;\n this._invalid = false;\n },\n\n end () {\n if (!this._needToUpdate()) {\n // clear cur animation cache\n this._skeletonInfo.curAnimationCache = null;\n this.frames.length = this._frameIdx + 1;\n this.isCompleted = true;\n this.unbind(this._skeletonInfo.listener);\n }\n },\n\n _needToUpdate (toFrameIdx) {\n return !this.isCompleted && \n this.totalTime < MaxCacheTime && \n (toFrameIdx == undefined || this._frameIdx < toFrameIdx);\n },\n\n updateToFrame (toFrameIdx) {\n if (!this._inited) return;\n\n this.begin();\n\n if (!this._needToUpdate(toFrameIdx)) return;\n\n let skeletonInfo = this._skeletonInfo;\n let skeleton = skeletonInfo.skeleton;\n let clipper = skeletonInfo.clipper;\n let state = skeletonInfo.state;\n\n do {\n // Solid update frame rate 1/60.\n skeleton.update(FrameTime);\n state.update(FrameTime);\n state.apply(skeleton);\n skeleton.updateWorldTransform();\n this._frameIdx++;\n this._updateFrame(skeleton, clipper, this._frameIdx);\n this.totalTime += FrameTime;\n } while (this._needToUpdate(toFrameIdx));\n\n this.end();\n },\n\n isInited () {\n return this._inited;\n },\n\n isInvalid () {\n return this._invalid;\n },\n\n invalidAllFrame () {\n this.isCompleted = false;\n this._invalid = true;\n },\n\n updateAllFrame () {\n this.invalidAllFrame();\n this.updateToFrame();\n },\n\n enableCacheAttachedInfo () {\n if (!this._enableCacheAttachedInfo) {\n this._enableCacheAttachedInfo = true;\n this.invalidAllFrame();\n }\n },\n\n _updateFrame (skeleton, clipper, index) {\n _vfOffset = 0;\n _boneInfoOffset = 0;\n _indexOffset = 0;\n _vertexOffset = 0;\n _preTexUrl = null;\n _preBlendMode = null;\n _segVCount = 0;\n _segICount = 0;\n _segOffset = 0;\n _colorOffset = 0;\n _preFinalColor = null;\n _preDarkColor = null;\n\n this.frames[index] = this.frames[index] || {\n segments : [],\n colors : [],\n boneInfos : [],\n vertices : null,\n verticesMulti : null,\n uintVert : null,\n indices : null,\n };\n let frame = this.frames[index];\n\n let segments = this._tempSegments = frame.segments;\n let colors = this._tempColors = frame.colors;\n let boneInfos = this._tempBoneInfos = frame.boneInfos;\n this._traverseSkeleton(skeleton, clipper);\n if (_colorOffset > 0) {\n colors[_colorOffset - 1].vfOffset = _vfOffset;\n }\n colors.length = _colorOffset;\n boneInfos.length = _boneInfoOffset;\n // Handle pre segment.\n let preSegOffset = _segOffset - 1;\n if (preSegOffset >= 0) {\n // Judge segment vertex count is not empty.\n if (_segICount > 0) {\n let preSegInfo = segments[preSegOffset];\n preSegInfo.indexCount = _segICount;\n preSegInfo.vfCount = _segVCount * _perVertexSize;\n preSegInfo.vertexCount = _segVCount;\n segments.length = _segOffset;\n } else {\n // Discard pre segment.\n segments.length = _segOffset - 1;\n }\n }\n\n // Segments is empty,discard all segments.\n if (segments.length == 0) return;\n\n // Fill vertices\n let vertices = frame.vertices;\n let uintVert = frame.uintVert;\n if (!vertices || vertices.length < _vfOffset) {\n vertices = frame.vertices = new Float32Array(_vfOffset);\n uintVert = frame.uintVert = new Uint32Array(vertices.buffer);\n }\n for (let i = 0, j = 0; i < _vfOffset;) {\n vertices[i++] = _vertices[j++]; // x\n vertices[i++] = _vertices[j++]; // y\n vertices[i++] = _vertices[j++]; // u\n vertices[i++] = _vertices[j++]; // v\n uintVert[i++] = _vertices[j++]; // color1\n uintVert[i++] = _vertices[j++]; // color2\n }\n\n // Fill indices\n let indices = frame.indices;\n if (!indices || indices.length < _indexOffset) {\n indices = frame.indices = new Uint16Array(_indexOffset);\n }\n\n for (let i = 0; i < _indexOffset; i++) {\n indices[i] = _indices[i];\n }\n\n frame.vertices = vertices;\n frame.uintVert = uintVert;\n frame.indices = indices;\n },\n\n fillVertices (skeletonColor, attachmentColor, slotColor, clipper, slot) {\n\n _tempa = slotColor.a * attachmentColor.a * skeletonColor.a * 255;\n _tempr = attachmentColor.r * skeletonColor.r * 255;\n _tempg = attachmentColor.g * skeletonColor.g * 255;\n _tempb = attachmentColor.b * skeletonColor.b * 255;\n \n _finalColor.r = _tempr * slotColor.r;\n _finalColor.g = _tempg * slotColor.g;\n _finalColor.b = _tempb * slotColor.b;\n _finalColor.a = _tempa;\n\n if (slot.darkColor == null) {\n _darkColor.set(0.0, 0, 0, 1.0);\n } else {\n _darkColor.r = slot.darkColor.r * _tempr;\n _darkColor.g = slot.darkColor.g * _tempg;\n _darkColor.b = slot.darkColor.b * _tempb;\n }\n _darkColor.a = 0;\n\n _finalColor32 = ((_finalColor.a<<24) >>> 0) + (_finalColor.b<<16) + (_finalColor.g<<8) + _finalColor.r;\n _darkColor32 = ((_darkColor.a<<24) >>> 0) + (_darkColor.b<<16) + (_darkColor.g<<8) + _darkColor.r;\n\n if (_preFinalColor !== _finalColor32 || _preDarkColor !== _darkColor32) {\n let colors = this._tempColors;\n _preFinalColor = _finalColor32;\n _preDarkColor = _darkColor32;\n if (_colorOffset > 0) {\n colors[_colorOffset - 1].vfOffset = _vfOffset;\n }\n colors[_colorOffset++] = {\n fr : _finalColor.r,\n fg : _finalColor.g,\n fb : _finalColor.b,\n fa : _finalColor.a,\n dr : _darkColor.r,\n dg : _darkColor.g,\n db : _darkColor.b,\n da : _darkColor.a,\n vfOffset : 0\n }\n }\n\n if (!clipper.isClipping()) {\n \n for (let v = _vfOffset, n = _vfOffset + _vfCount; v < n; v += _perVertexSize) {\n _vertices[v + 4] = _finalColor32; // light color\n _vertices[v + 5] = _darkColor32; // dark color\n }\n \n } else {\n clipper.clipTriangles(_vertices, _vfCount, _indices, _indexCount, _vertices, _finalColor, _darkColor, true, _perVertexSize, _indexOffset, _vfOffset, _vfOffset + 2);\n let clippedVertices = clipper.clippedVertices;\n let clippedTriangles = clipper.clippedTriangles;\n \n // insure capacity\n _indexCount = clippedTriangles.length;\n _vfCount = clippedVertices.length / _perClipVertexSize * _perVertexSize;\n\n // fill indices\n for (let ii = 0, jj = _indexOffset, nn = clippedTriangles.length; ii < nn;) {\n _indices[jj++] = clippedTriangles[ii++];\n }\n\n // fill vertices contain x y u v light color dark color\n for (let v = 0, n = clippedVertices.length, offset = _vfOffset; v < n; v += 12, offset += _perVertexSize) {\n _vertices[offset] = clippedVertices[v]; // x\n _vertices[offset + 1] = clippedVertices[v + 1]; // y\n _vertices[offset + 2] = clippedVertices[v + 6]; // u\n _vertices[offset + 3] = clippedVertices[v + 7]; // v\n\n _vertices[offset + 4] = _finalColor32;\n _vertices[offset + 5] = _darkColor32;\n }\n }\n },\n\n _traverseSkeleton (skeleton, clipper) {\n let segments = this._tempSegments;\n let boneInfos = this._tempBoneInfos;\n let skeletonColor = skeleton.color;\n let attachment, attachmentColor, slotColor, uvs, triangles;\n let isRegion, isMesh, isClip;\n let texture;\n let preSegOffset, preSegInfo;\n let blendMode;\n let slot;\n\n let bones = skeleton.bones;\n if (this._enableCacheAttachedInfo) {\n for (let i = 0, l = bones.length; i < l; i++, _boneInfoOffset++) {\n let bone = bones[i];\n let boneInfo = boneInfos[_boneInfoOffset];\n if (!boneInfo) {\n boneInfo = boneInfos[_boneInfoOffset] = {};\n }\n boneInfo.a = bone.a;\n boneInfo.b = bone.b;\n boneInfo.c = bone.c;\n boneInfo.d = bone.d;\n boneInfo.worldX = bone.worldX;\n boneInfo.worldY = bone.worldY;\n }\n }\n\n for (let slotIdx = 0, slotCount = skeleton.drawOrder.length; slotIdx < slotCount; slotIdx++) {\n slot = skeleton.drawOrder[slotIdx];\n \n if(!slot.bone.active) {\n continue;\n }\n\n _vfCount = 0;\n _indexCount = 0;\n\n attachment = slot.getAttachment();\n if (!attachment) {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n\n isRegion = attachment instanceof spine.RegionAttachment;\n isMesh = attachment instanceof spine.MeshAttachment;\n isClip = attachment instanceof spine.ClippingAttachment;\n\n if (isClip) {\n clipper.clipStart(slot, attachment);\n continue;\n }\n\n if (!isRegion && !isMesh) {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n\n texture = attachment.region.texture._texture;\n if (!texture) {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n \n blendMode = slot.data.blendMode;\n if (_preTexUrl !== texture._texture._id || _preBlendMode !== blendMode) {\n _preTexUrl = texture._texture._id;\n _preBlendMode = blendMode;\n // Handle pre segment.\n preSegOffset = _segOffset - 1;\n if (preSegOffset >= 0) {\n if (_segICount > 0) {\n preSegInfo = segments[preSegOffset];\n preSegInfo.indexCount = _segICount;\n preSegInfo.vertexCount = _segVCount;\n preSegInfo.vfCount = _segVCount * _perVertexSize;\n } else {\n // Discard pre segment.\n _segOffset--;\n }\n }\n // Handle now segment.\n segments[_segOffset] = {\n tex : texture,\n blendMode : blendMode,\n indexCount : 0,\n vertexCount : 0,\n vfCount : 0\n };\n _segOffset++;\n _segICount = 0;\n _segVCount = 0;\n }\n\n if (isRegion) {\n \n triangles = _quadTriangles;\n \n // insure capacity\n _vfCount = 4 * _perVertexSize;\n _indexCount = 6;\n \n // compute vertex and fill x y\n attachment.computeWorldVertices(slot.bone, _vertices, _vfOffset, _perVertexSize);\n }\n else if (isMesh) {\n \n triangles = attachment.triangles;\n \n // insure capacity\n _vfCount = (attachment.worldVerticesLength >> 1) * _perVertexSize;\n _indexCount = triangles.length;\n \n // compute vertex and fill x y\n attachment.computeWorldVertices(slot, 0, attachment.worldVerticesLength, _vertices, _vfOffset, _perVertexSize);\n }\n \n if (_vfCount == 0 || _indexCount == 0) {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n \n // fill indices\n for (let ii = 0, jj = _indexOffset, nn = triangles.length; ii < nn;) {\n _indices[jj++] = triangles[ii++];\n }\n\n // fill u v\n uvs = attachment.uvs;\n for (let v = _vfOffset, n = _vfOffset + _vfCount, u = 0; v < n; v += _perVertexSize, u += 2) {\n _vertices[v + 2] = uvs[u]; // u\n _vertices[v + 3] = uvs[u + 1]; // v\n }\n\n attachmentColor = attachment.color;\n slotColor = slot.color;\n\n this.fillVertices(skeletonColor, attachmentColor, slotColor, clipper, slot);\n \n if (_indexCount > 0) {\n for (let ii = _indexOffset, nn = _indexOffset + _indexCount; ii < nn; ii++) {\n _indices[ii] += _segVCount;\n }\n _indexOffset += _indexCount;\n _vfOffset += _vfCount;\n _vertexOffset = _vfOffset / _perVertexSize;\n _segICount += _indexCount;\n _segVCount += _vfCount / _perVertexSize;\n }\n \n clipper.clipEndWithSlot(slot);\n }\n \n clipper.clipEnd();\n }\n});\n\nlet SkeletonCache = cc.Class({\n ctor () {\n this._privateMode = false;\n this._animationPool = {};\n this._skeletonCache = {};\n },\n\n enablePrivateMode () {\n this._privateMode = true;\n },\n\n clear () {\n this._animationPool = {};\n this._skeletonCache = {};\n },\n\n removeSkeleton (uuid) {\n var skeletonInfo = this._skeletonCache[uuid];\n if (!skeletonInfo) return;\n let animationsCache = skeletonInfo.animationsCache;\n for (var aniKey in animationsCache) {\n // Clear cache texture, and put cache into pool.\n // No need to create TypedArray next time.\n let animationCache = animationsCache[aniKey];\n if (!animationCache) continue;\n this._animationPool[uuid + \"#\" + aniKey] = animationCache;\n animationCache.clear();\n }\n\n delete this._skeletonCache[uuid];\n },\n\n getSkeletonCache (uuid, skeletonData) {\n let skeletonInfo = this._skeletonCache[uuid];\n if (!skeletonInfo) {\n let skeleton = new spine.Skeleton(skeletonData);\n let clipper = new spine.SkeletonClipping();\n let stateData = new spine.AnimationStateData(skeleton.data);\n let state = new spine.AnimationState(stateData);\n let listener = new TrackEntryListeners();\n state.addListener(listener);\n\n this._skeletonCache[uuid] = skeletonInfo = {\n skeleton : skeleton,\n clipper : clipper,\n state : state,\n listener : listener,\n // Cache all kinds of animation frame.\n // When skeleton is dispose, clear all animation cache.\n animationsCache : {},\n curAnimationCache: null\n };\n }\n return skeletonInfo;\n },\n\n getAnimationCache (uuid, animationName) {\n let skeletonInfo = this._skeletonCache[uuid];\n if (!skeletonInfo) return null;\n\n let animationsCache = skeletonInfo.animationsCache;\n return animationsCache[animationName];\n },\n\n invalidAnimationCache (uuid) {\n let skeletonInfo = this._skeletonCache[uuid];\n let skeleton = skeletonInfo && skeletonInfo.skeleton;\n if (!skeleton) return;\n\n let animationsCache = skeletonInfo.animationsCache;\n for (var aniKey in animationsCache) {\n let animationCache = animationsCache[aniKey];\n animationCache.invalidAllFrame();\n }\n },\n\n initAnimationCache (uuid, animationName) {\n if (!animationName) return null;\n let skeletonInfo = this._skeletonCache[uuid];\n let skeleton = skeletonInfo && skeletonInfo.skeleton;\n if (!skeleton) return null;\n\n let animation = skeleton.data.findAnimation(animationName);\n if (!animation) {\n return null;\n }\n\n let animationsCache = skeletonInfo.animationsCache;\n let animationCache = animationsCache[animationName];\n if (!animationCache) {\n // If cache exist in pool, then just use it.\n let poolKey = uuid + \"#\" + animationName;\n animationCache = this._animationPool[poolKey];\n if (animationCache) {\n delete this._animationPool[poolKey];\n } else {\n animationCache = new AnimationCache();\n animationCache._privateMode = this._privateMode;\n }\n animationCache.init(skeletonInfo, animationName);\n animationsCache[animationName] = animationCache;\n }\n return animationCache;\n },\n\n updateAnimationCache (uuid, animationName) {\n if (animationName) {\n let animationCache = this.initAnimationCache(uuid, animationName);\n if (!animationCache) return null;\n animationCache.updateAllFrame();\n } else {\n let skeletonInfo = this._skeletonCache[uuid];\n let skeleton = skeletonInfo && skeletonInfo.skeleton;\n if (!skeleton) return;\n\n let animationsCache = skeletonInfo.animationsCache;\n for (var aniKey in animationsCache) {\n let animationCache = animationsCache[aniKey];\n animationCache.updateAllFrame();\n }\n }\n }\n});\n\nSkeletonCache.FrameTime = FrameTime;\nSkeletonCache.sharedCache = new SkeletonCache();\nmodule.exports = SkeletonCache;","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n/**\n * @module sp\n */\nlet SkeletonCache = !CC_JSB && require('./skeleton-cache').sharedCache;\n\n/**\n * Spine Attachment 的 Region 数据\n */\nclass RegionData {\n\n static middlewareTextureID = -1;\n\n static updateUV(region) {\n const texture = CC_JSB ? region.texture2D : region.texture._texture;\n if (region.rotate) {\n region.u = region.x / texture.width;\n region.v = region.y / texture.height;\n region.u2 = (region.x + region.height) / texture.width;\n region.v2 = (region.y + region.width) / texture.height;\n } else {\n region.u = region.x / texture.width;\n region.v = region.y / texture.height;\n region.u2 = (region.x + region.width) / texture.width;\n region.v2 = (region.y + region.height) / texture.height;\n }\n }\n\n x;\n y;\n degrees;\n texture;\n texture2D;\n u;\n v;\n u2;\n v2;\n width;\n height;\n rotate;\n offsetX;\n offsetY;\n originalWidth;\n originalHeight;\n\n\n constructor(attachmentOrSpriteFrame) {\n if (attachmentOrSpriteFrame instanceof cc.SpriteFrame) {\n this.initWithSpriteFrame(attachmentOrSpriteFrame);\n } else if (attachmentOrSpriteFrame != null) {\n this.initWithAttachment(attachmentOrSpriteFrame);\n }\n }\n\n\n initWithSpriteFrame(spriteFrame) {\n const texture = spriteFrame.getTexture();\n const rect = spriteFrame.getRect();\n const origSize = spriteFrame.getOriginalSize();\n const _offset = spriteFrame.getOffset();\n const rotate = spriteFrame.isRotated();\n const offset = cc.v2(\n (origSize.width - rect.width) * 0.5 + _offset.x,\n (origSize.height - rect.height) * 0.5 + _offset.y,\n );\n const degrees = rotate ? 270 : 0;\n\n this.x = rect.x;\n this.y = rect.y;\n this.width = rect.width;\n this.height = rect.height;\n this.originalWidth = origSize.width;\n this.originalHeight = origSize.height;\n this.offsetX = offset.x;\n this.offsetY = offset.y;\n this.rotate = degrees != 0;\n this.degrees = degrees;\n\n this.updateWithTexture2D(texture);\n }\n\n\n initWithAttachment(attachment) {\n if (CC_JSB) {\n this.x = attachment.regionX;\n this.y = attachment.regionY;\n this.width = attachment.regionWidth;\n this.height = attachment.regionHeight;\n this.originalWidth = attachment.regionOriginalWidth;\n this.originalHeight = attachment.regionOriginalHeight;\n this.offsetX = attachment.regionOffsetX;\n this.offsetY = attachment.regionOffsetY;\n this.degrees = attachment.regionDegrees;\n this.rotate = this.degrees !== 0;\n this.texture = attachment.textureForJSB;\n this.texture2D = attachment.getTexture2D();\n this.updateUV();\n } else {\n const region = attachment.region;\n this.x = region.x;\n this.y = region.y;\n this.width = region.width;\n this.height = region.height;\n this.originalWidth = region.originalWidth;\n this.originalHeight = region.originalHeight;\n this.offsetX = region.offsetX;\n this.offsetY = region.offsetY;\n this.rotate = region.rotate;\n this.degrees = region.degrees;\n this.texture = region.texture;\n this.texture2D = region.texture._texture;\n this.u = region.u;\n this.u2 = region.u2;\n this.v = region.v;\n this.v2 = region.v2;\n }\n }\n\n\n updateUV() {\n RegionData.updateUV(this);\n }\n\n\n updateWithPackedFrame(packedFrame) {\n this.x = packedFrame.x;\n this.y = packedFrame.y;\n this.updateWithTexture2D(packedFrame.texture);\n }\n\n\n updateWithTexture2D(texture2d) {\n if (CC_JSB) {\n const spTex = new middleware.Texture2D();\n spTex.setRealTextureIndex(RegionData.middlewareTextureID--);\n spTex.setPixelsWide(texture2d.width);\n spTex.setPixelsHigh(texture2d.height);\n spTex.setNativeTexture(texture2d.getImpl());\n this.texture = spTex;\n } else {\n this.texture = new sp.SkeletonTexture({\n width: texture2d.width,\n height: texture2d.height,\n });\n this.texture.setRealTexture(texture2d);\n }\n\n this.texture2D = texture2d;\n this.updateUV();\n }\n\n\n toSpriteFrame(strict) {\n if (strict && (this.degrees !== 270 || this.degrees !== 0)) {\n return null;\n }\n\n const frame = new cc.SpriteFrame(\n this.texture2D,\n cc.rect(this.x, this.y, this.width, this.height),\n this.rotate, // 如果 region 不是 0 或 270 则会出现问题\n cc.v2(this.offsetX - (this.originalWidth - this.width) * 0.5, this.offsetY - (this.originalHeight - this.height) * 0.5),\n cc.size(this.originalWidth, this.originalHeight),\n );\n\n return frame;\n }\n\n\n assignToAttachment(attachment, strict = true, resetDynamicAtlas = true) {\n if (CC_JSB) {\n if (resetDynamicAtlas) {\n // 如果有在使用动态合图则先还原\n if (attachment && attachment._spriteFrame) {\n const spriteFrame = attachment._spriteFrame;\n attachment._spriteFrame = null;\n spriteFrame.destroy();\n }\n }\n attachment._texture2D = this.texture2D;\n attachment.setRegionForJSB(this.texture, { x: this.x, y: this.y, w: this.width, h: this.height }, cc.size(this.originalWidth, this.originalHeight), cc.v2(this.offsetX, this.offsetY), this.degrees);\n } else {\n const region = attachment.region;\n\n if (resetDynamicAtlas) {\n // 如果有在使用动态合图则先还原\n if (region && region._spriteFrame) {\n const spriteFrame = region._spriteFrame;\n region._spriteFrame = null;\n spriteFrame.destroy();\n }\n }\n \n if (strict) {\n region.x = this.x;\n region.y = this.y;\n region.width = this.width;\n region.height = this.height;\n region.originalWidth = this.originalWidth;\n region.originalHeight = this.originalHeight;\n region.offsetX = this.offsetX;\n region.offsetY = this.offsetY;\n region.rotate = this.rotate;\n region.degrees = this.degrees;\n region.texture = this.texture;\n region.u = this.u;\n region.u2 = this.u2;\n region.v = this.v;\n region.v2 = this.v2;\n }\n\n if (attachment instanceof sp.spine.MeshAttachment) {\n attachment.updateUVs();\n } else if (attachment instanceof sp.spine.RegionAttachment) {\n attachment.setRegion(region);\n attachment.updateOffset();\n }\n }\n }\n\n\n reset() {\n this.texture = null;\n this.texture2D = null;\n }\n\n}\n\n/**\n * !#en The skeleton data of spine.\n * !#zh Spine 的 骨骼数据。\n * @class SkeletonData\n * @extends Asset\n */\nlet SkeletonData = cc.Class({\n name: 'sp.SkeletonData',\n extends: cc.Asset,\n\n ctor: function () {\n this.reset();\n },\n\n properties: {\n _skeletonJson: null,\n\n // use by jsb\n skeletonJsonStr: {\n get: function () {\n if (this._skeletonJson) {\n return JSON.stringify(this._skeletonJson);\n } else {\n return \"\";\n }\n }\n },\n\n /**\n * !#en See http://en.esotericsoftware.com/spine-json-format\n * !#zh 可查看 Spine 官方文档 http://zh.esotericsoftware.com/spine-json-format\n * @property {Object} skeletonJson\n */\n skeletonJson: {\n get: function () {\n return this._skeletonJson;\n },\n set: function (value) {\n this.reset();\n if (typeof(value) == \"string\") {\n this._skeletonJson = JSON.parse(value);\n } else {\n this._skeletonJson = value;\n }\n // If create by manual, uuid is empty.\n if (!this._uuid && value.skeleton) {\n this._uuid = value.skeleton.hash;\n }\n }\n },\n\n _atlasText: \"\",\n\n /**\n * @property {String} atlasText\n */\n atlasText: {\n get: function () {\n return this._atlasText;\n },\n set: function (value) {\n this._atlasText = value;\n this.reset();\n }\n },\n\n /**\n * @property {Texture2D[]} textures\n */\n textures: {\n default: [],\n type: [cc.Texture2D]\n },\n\n /**\n * @property {String[]} textureNames\n * @private\n */\n textureNames: {\n default: [],\n type: [cc.String]\n },\n\n /**\n * !#en\n * A scale can be specified on the JSON or binary loader which will scale the bone positions,\n * image sizes, and animation translations.\n * This can be useful when using different sized images than were used when designing the skeleton\n * in Spine. For example, if using images that are half the size than were used in Spine,\n * a scale of 0.5 can be used. This is commonly used for games that can run with either low or high\n * resolution texture atlases.\n * see http://en.esotericsoftware.com/spine-using-runtimes#Scaling\n * !#zh 可查看 Spine 官方文档: http://zh.esotericsoftware.com/spine-using-runtimes#Scaling\n * @property {Number} scale\n */\n scale: 1,\n\n _nativeAsset: {\n get () {\n return this._buffer;\n },\n set (bin) {\n this._buffer = bin.buffer || bin;\n this.reset();\n },\n override: true\n },\n },\n\n statics: {\n preventDeferredLoadDependents: true,\n cloneId: 0,\n },\n\n // PUBLIC\n\n createNode: CC_EDITOR && function (callback) {\n let node = new cc.Node(this.name);\n let skeleton = node.addComponent(sp.Skeleton);\n skeleton.skeletonData = this;\n\n return callback(null, node);\n },\n\n reset: function () {\n /**\n * @property {sp.spine.SkeletonData} _skeletonData\n * @private\n */\n this._skeletonCache = null;\n /**\n * @property {sp.spine.Atlas} _atlasCache\n * @private\n */\n this._atlasCache = null;\n if (CC_EDITOR) {\n this._skinsEnum = null;\n this._animsEnum = null;\n }\n },\n\n ensureTexturesLoaded (loaded, caller) {\n let textures = this.textures;\n let texsLen = textures.length;\n if (texsLen == 0) {\n loaded.call(caller, false);\n return;\n }\n let loadedCount = 0;\n let loadedItem = function () {\n loadedCount++;\n if (loadedCount >= texsLen) {\n loaded && loaded.call(caller, true);\n loaded = null;\n }\n }\n for (let i = 0; i < texsLen; i++) {\n let tex = textures[i];\n if (tex.loaded) {\n loadedItem();\n } else {\n tex.once('load', loadedItem);\n }\n }\n },\n\n isTexturesLoaded () {\n let textures = this.textures;\n let texsLen = textures.length;\n for (let i = 0; i < texsLen; i++) {\n let tex = textures[i];\n if (!tex.loaded) {\n return false;\n }\n }\n return true;\n },\n\n /**\n * !#en Get the included SkeletonData used in spine runtime.<br>\n * Returns a {{#crossLinkModule \"sp.spine\"}}sp.spine{{/crossLinkModule}}.SkeletonData object.\n * !#zh 获取 Spine Runtime 使用的 SkeletonData。<br>\n * 返回一个 {{#crossLinkModule \"sp.spine\"}}sp.spine{{/crossLinkModule}}.SkeletonData 对象。\n * @method getRuntimeData\n * @param {Boolean} [quiet=false]\n * @return {sp.spine.SkeletonData}\n */\n getRuntimeData: function (quiet) {\n if (this._skeletonCache) {\n return this._skeletonCache;\n }\n\n if ( !(this.textures && this.textures.length > 0) && this.textureNames && this.textureNames.length > 0 ) {\n if ( !quiet ) {\n cc.errorID(7507, this.name);\n }\n return null;\n }\n\n let atlas = this._getAtlas(quiet);\n if (! atlas) {\n return null;\n }\n let attachmentLoader = new sp.spine.AtlasAttachmentLoader(atlas);\n\n let resData = null;\n let reader = null;\n if (this.skeletonJson) {\n reader = new sp.spine.SkeletonJson(attachmentLoader);\n resData = this.skeletonJson;\n } else {\n reader = new sp.spine.SkeletonBinary(attachmentLoader);\n resData = new Uint8Array(this._nativeAsset);\n }\n\n reader.scale = this.scale;\n this._skeletonCache = reader.readSkeletonData(resData);\n atlas.dispose();\n\n return this._skeletonCache;\n },\n\n // EDITOR\n\n getSkinsEnum: CC_EDITOR && function () {\n if (this._skinsEnum) {\n return this._skinsEnum;\n }\n let sd = this.getRuntimeData(true);\n if (sd) {\n let skins = sd.skins;\n let enumDef = {};\n for (let i = 0; i < skins.length; i++) {\n let name = skins[i].name;\n enumDef[name] = i;\n }\n return this._skinsEnum = cc.Enum(enumDef);\n }\n return null;\n },\n\n getAnimsEnum: CC_EDITOR && function () {\n if (this._animsEnum) {\n return this._animsEnum;\n }\n let sd = this.getRuntimeData(true);\n if (sd) {\n let enumDef = { '<None>': 0 };\n let anims = sd.animations;\n for (let i = 0; i < anims.length; i++) {\n let name = anims[i].name;\n enumDef[name] = i + 1;\n }\n return this._animsEnum = cc.Enum(enumDef);\n }\n return null;\n },\n\n // PRIVATE\n\n _getTexture: function (line) {\n let names = this.textureNames;\n for (let i = 0; i < names.length; i++) {\n if (names[i] === line) {\n let texture = this.textures[i];\n let tex = new sp.SkeletonTexture({ width: texture.width, height: texture.height });\n tex.setRealTexture(texture);\n return tex;\n }\n }\n cc.errorID(7506, line);\n return null;\n },\n\n /**\n * @method _getAtlas\n * @param {boolean} [quiet=false]\n * @return {sp.spine.Atlas}\n * @private\n */\n _getAtlas: function (quiet) {\n if (this._atlasCache) {\n return this._atlasCache;\n }\n\n if ( !this.atlasText ) {\n if ( !quiet ) {\n cc.errorID(7508, this.name);\n }\n return null;\n }\n\n return this._atlasCache = new sp.spine.TextureAtlas(this.atlasText, this._getTexture.bind(this));\n },\n\n /**\n * 克隆 SkeletonData\n */\n clone: function () {\n const cloned = new SkeletonData();\n SkeletonData.cloneId++;\n const suffix = '(clone ' + String(SkeletonData.cloneId) + ')';\n cloned._uuid = this._uuid.split('(')[0] + suffix;\n cloned.name = this.name + suffix;\n cloned.scale = this.scale;\n\n cloned._atlasText = this._atlasText;\n cloned.textureNames = this.textureNames;\n cloned._skeletonJson = this._skeletonJson;\n cloned.textures = this.textures;\n if (CC_JSB) {\n const realUuid = cloned._uuid;\n cloned._uuid = this._uuid;\n cloned._nativeUrl = this._nativeUrl;\n cloned._native = this._native;\n cloned.nativeUrl; // 触发 nativeUrl getter\n cloned._uuid = realUuid;\n } else {\n cloned._buffer = this._buffer;\n }\n cloned.getRuntimeData();\n\n return cloned;\n },\n\n _destroyFromDynamicAtlas() {\n if (this._skeletonCache) {\n const skins = this._skeletonCache.skins;\n for (const skin of skins) {\n for (const attachments of skin.attachments) {\n for (const key in attachments) {\n const region = CC_JSB ? attachments[key] : attachments[key].region;\n if (region && region._spriteFrame) {\n const spriteFrame = region._spriteFrame;\n region._spriteFrame = null;\n spriteFrame.destroy();\n }\n }\n }\n }\n }\n },\n\n destroy() {\n this._destroyFromDynamicAtlas();\n SkeletonCache.removeSkeleton(this._uuid);\n this._super();\n },\n});\n\nsp.SkeletonData = module.exports = SkeletonData;\nsp.RegionData = RegionData;\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nsp.SkeletonTexture = cc.Class({\n name: 'sp.SkeletonTexture',\n extends: sp.spine.Texture,\n _texture: null,\n _material: null,\n\n setRealTexture: function(tex) {\n this._texture = tex;\n },\n\n getRealTexture: function() {\n return this._texture;\n },\n\n setFilters: function(minFilter, magFilter) {\n if (this._texture) {\n this._texture.setFilters(minFilter, magFilter);\n }\n },\n\n setWraps: function(uWrap, vWrap) {\n if (this._texture) {\n this._texture.setWrapMode(uWrap, vWrap);\n }\n },\n\n dispose: function() {}\n});\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nimport Assembler from '../../cocos2d/core/renderer/assembler';\n\nconst Skeleton = require('./Skeleton');\nconst spine = require('./lib/spine');\nconst RenderFlow = require('../../cocos2d/core/renderer/render-flow');\nconst VertexFormat = require('../../cocos2d/core/renderer/webgl/vertex-format')\nconst VFOneColor = VertexFormat.vfmtPosUvColor;\nconst VFOneColorTexId = VertexFormat.vfmtPosUvColorTexId;\nconst VFTwoColor = VertexFormat.vfmtPosUvTwoColor;\nconst VFTwoColorTexId = VertexFormat.vfmtPosUvTwoColorTexId;\nconst gfx = cc.gfx;\n\nconst FLAG_BATCH = 0x10;\nconst FLAG_TWO_COLOR = 0x01;\n\nlet _handleVal = 0x00;\nlet _quadTriangles = [0, 1, 2, 2, 3, 0];\nlet _slotColor = cc.color(0, 0, 255, 255);\nlet _boneColor = cc.color(255, 0, 0, 255);\nlet _originColor = cc.color(0, 255, 0, 255);\nlet _meshColor = cc.color(255, 255, 0, 255);\n\nlet _finalColor = null;\nlet _darkColor = null;\nlet _tempPos = null, _tempUv = null;\nif (!CC_NATIVERENDERER) {\n _finalColor = new spine.Color(1, 1, 1, 1);\n _darkColor = new spine.Color(1, 1, 1, 1);\n _tempPos = new spine.Vector2();\n _tempUv = new spine.Vector2();\n}\n\nlet _premultipliedAlpha;\nlet _multiplier;\nlet _slotRangeStart;\nlet _slotRangeEnd;\nlet _useTint;\nlet _useMulti;\nlet _texId;\nlet _debugSlots;\nlet _debugBones;\nlet _debugMesh;\nlet _nodeR,\n _nodeG,\n _nodeB,\n _nodeA;\nlet _finalColor32, _darkColor32;\nlet _vertexFormat;\nlet _perVertexSize;\nlet _perClipVertexSize;\n\nlet _vertexFloatCount = 0, _vertexCount = 0, _vertexFloatOffset = 0, _vertexOffset = 0,\n _indexCount = 0, _indexOffset = 0, _vfOffset = 0;\nlet _tempr, _tempg, _tempb;\nlet _inRange;\nlet _mustFlush;\nlet _x, _y, _m00, _m04, _m12, _m01, _m05, _m13;\nlet _r, _g, _b, _fr, _fg, _fb, _fa, _dr, _dg, _db, _da;\nlet _comp, _buffer, _renderer, _node, _needColor, _vertexEffect;\n\nlet _packedRegions = [];\nlet _tmpRegionData = new sp.RegionData();\n\nfunction _getSlotMaterial (tex, blendMode) {\n let src, dst;\n switch (blendMode) {\n case spine.BlendMode.Additive:\n src = _premultipliedAlpha ? cc.macro.ONE : cc.macro.SRC_ALPHA;\n dst = cc.macro.ONE;\n break;\n case spine.BlendMode.Multiply:\n src = cc.macro.DST_COLOR;\n dst = cc.macro.ONE_MINUS_SRC_ALPHA;\n break;\n case spine.BlendMode.Screen:\n src = cc.macro.ONE;\n dst = cc.macro.ONE_MINUS_SRC_COLOR;\n break;\n case spine.BlendMode.Normal:\n default:\n src = _premultipliedAlpha ? cc.macro.ONE : cc.macro.SRC_ALPHA;\n dst = cc.macro.ONE_MINUS_SRC_ALPHA;\n break;\n }\n\n let useModel = !_comp.enableBatch;\n let baseMaterial = _comp._materials[0];\n if (!baseMaterial) return null;\n\n if (_useMulti) {\n let key = tex.getId() + src + dst + _useTint;\n let materialCache = _comp._materialCache;\n let materialInfo = materialCache[key];\n if (!materialInfo) {\n let texId = baseMaterial.material.getMultiHandler().getIndex(tex.getImpl());\n if (!materialCache.baseMaterial) {\n materialInfo = { material: baseMaterial, texId: texId };\n materialCache.baseMaterial = materialInfo;\n } else {\n materialInfo = { material: cc.MaterialVariant.create(baseMaterial), texId: texId };\n }\n\n _comp._defineMaterialTint(baseMaterial, _useTint);\n\n if (texId === -1) {\n materialInfo.material.setProperty('texture', tex);\n materialInfo.texId = 0;\n }\n\n // update blend function\n materialInfo.material.setBlend(\n true,\n gfx.BLEND_FUNC_ADD,\n src, dst,\n gfx.BLEND_FUNC_ADD,\n src, dst\n );\n materialCache[key] = materialInfo;\n }\n _texId = materialInfo.texId;\n return materialInfo.material;\n } else {\n // The key use to find corresponding material\n let key = tex.getId() + src + dst + _useTint + useModel;\n let materialCache = _comp._materialCache;\n let material = materialCache[key];\n if (!material) {\n if (!materialCache.baseMaterial) {\n material = baseMaterial;\n materialCache.baseMaterial = baseMaterial;\n } else {\n material = cc.MaterialVariant.create(baseMaterial);\n }\n\n material.define('CC_USE_MODEL', useModel);\n material.define('USE_TINT', _useTint);\n // update texture\n material.setProperty('texture', tex);\n\n // update blend function\n material.setBlend(\n true,\n gfx.BLEND_FUNC_ADD,\n src, dst,\n gfx.BLEND_FUNC_ADD,\n src, dst\n );\n materialCache[key] = material;\n }\n\n return material;\n }\n}\n\nfunction _handleColor (color) {\n // temp rgb has multiply 255, so need divide 255;\n _fa = color.fa * _nodeA;\n _multiplier = _premultipliedAlpha ? _fa / 255 : 1;\n _r = _nodeR * _multiplier;\n _g = _nodeG * _multiplier;\n _b = _nodeB * _multiplier;\n\n _fr = color.fr * _r;\n _fg = color.fg * _g;\n _fb = color.fb * _b;\n _finalColor32 = ((_fa<<24) >>> 0) + (_fb<<16) + (_fg<<8) + _fr;\n\n _dr = color.dr * _r;\n _dg = color.dg * _g;\n _db = color.db * _b;\n _da = _premultipliedAlpha ? 255 : 0;\n _darkColor32 = ((_da<<24) >>> 0) + (_db<<16) + (_dg<<8) + _dr;\n}\n\nfunction _spineColorToInt32 (spineColor) {\n return ((spineColor.a<<24) >>> 0) + (spineColor.b<<16) + (spineColor.g<<8) + spineColor.r;\n}\n\nexport default class SpineAssembler extends Assembler {\n updateRenderData (comp) {\n if (comp.isAnimationCached()) return;\n\n this.handleDynamicAtlasAndSwitchMaterial(comp);\n\n let skeleton = comp._skeleton;\n if (skeleton) {\n skeleton.updateWorldTransform();\n }\n }\n\n handleDynamicAtlasAndSwitchMaterial(comp) {\n if (comp._dataDirty) {\n // 自动合图\n this.packDynamicAtlasForSpine(comp);\n\n // 自动切换材质\n const autoSwitchMaterial = comp.autoSwitchMaterial;\n if ((cc.sp.autoSwitchMaterial && autoSwitchMaterial === 0) || autoSwitchMaterial === 1) {\n const material = comp._materials[0];\n if (!material) return false;\n\n const skins = comp.skeletonData._skeletonCache.skins;\n root: for (const skin of skins) {\n for (const attachments of skin.attachments) {\n for (const key in attachments) {\n if (CC_JSB) {\n const attachment = attachments[key];\n if (attachment && attachment.getTexture2D) {\n const texture = attachment.getTexture2D(comp.skeletonData);\n if (texture) {\n this.checkAndSwitchMaterial(comp, texture, material);\n break root;\n }\n }\n } else {\n const region = attachments[key].region;\n if (region && region.texture) {\n this.checkAndSwitchMaterial(comp, region.texture._texture, material);\n break root;\n }\n }\n }\n }\n }\n }\n comp._dataDirty = false;\n }\n }\n\n updatePackedAttachment(attachment, strict) {\n _tmpRegionData.assignToAttachment(attachment, strict, false);\n\n const region = CC_JSB ? attachment : attachment.region;\n const frame = region._spriteFrame;\n region._original._ref++;\n\n frame.once(\"_resetDynamicAtlasFrame\", () => {\n _tmpRegionData.initWithAttachment(attachment);\n\n _tmpRegionData.x = region._original._x;\n _tmpRegionData.y = region._original._y;\n _tmpRegionData.texture = region._original._texture;\n if (CC_JSB) _tmpRegionData.texture2D = region._original._texture2D;\n region._original._ref--;\n if (region._original._ref <= 0) {\n region._original = null;\n }\n\n _tmpRegionData.assignToAttachment(attachment, true, false);\n _tmpRegionData.reset();\n });\n }\n\n packDynamicAtlasForSpine(comp) {\n if (CC_TEST) return false;\n\n _packedRegions.length = 0;\n\n const allowDynamicAtlas = comp.allowDynamicAtlas;\n if ((cc.sp.allowDynamicAtlas && allowDynamicAtlas === 0) || allowDynamicAtlas === 1) {\n if (cc.dynamicAtlasManager) {\n const skins = comp.skeletonData._skeletonCache.skins;\n for (const skin of skins) {\n for (const attachments of skin.attachments) {\n for (const key in attachments) {\n const attachment = attachments[key];\n if (attachment) {\n if (CC_JSB) {\n if (!attachment._original && attachment.getTexture2D) {\n const texture = attachment.getTexture2D(comp.skeletonData);\n if (texture && texture.packable) {\n if (attachment._spriteFrame) {\n const spriteFrame = attachment._spriteFrame;\n attachment._spriteFrame = null;\n spriteFrame.destroy();\n }\n _tmpRegionData.initWithAttachment(attachment);\n const frame = _tmpRegionData.toSpriteFrame();\n const packedFrame = cc.dynamicAtlasManager.insertSpriteFrame(frame);\n if (packedFrame) {\n frame._setDynamicAtlasFrame(packedFrame);\n\n attachment._original = {\n _texture2D: texture,\n _texture: _tmpRegionData.texture,\n _x: attachment.regionX,\n _y: attachment.regionY,\n _ref: 0,\n };\n\n attachment._spriteFrame = frame;\n\n _tmpRegionData.updateWithPackedFrame(packedFrame);\n\n this.updatePackedAttachment(attachment);\n } else {\n frame.destroy();\n }\n }\n }\n } else {\n const region = attachment.region;\n const alreadyInAtlas = !!region._original;\n\n if (alreadyInAtlas) {\n // 可能出现多个 attachment 共用同一个 region\n if (_packedRegions.includes(region)) {\n this.updatePackedAttachment(attachment, false);\n }\n } else if (region.texture && region.texture._texture.packable) {\n if (region._spriteFrame) {\n const spriteFrame = region._spriteFrame;\n region._spriteFrame = null;\n spriteFrame.destroy();\n }\n _tmpRegionData.initWithAttachment(attachment);\n const frame = _tmpRegionData.toSpriteFrame();\n const packedFrame = cc.dynamicAtlasManager.insertSpriteFrame(frame);\n if (packedFrame) {\n frame._setDynamicAtlasFrame(packedFrame);\n \n region._original = {\n _texture: region.texture,\n _x: region.x,\n _y: region.y,\n _ref: 0,\n };\n\n region._spriteFrame = frame;\n\n _tmpRegionData.updateWithPackedFrame(packedFrame);\n\n this.updatePackedAttachment(attachment);\n\n _packedRegions.push(region);\n } else {\n frame.destroy();\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n _tmpRegionData.reset();\n _packedRegions.length = 0;\n }\n\n fillVertices (skeletonColor, attachmentColor, slotColor, clipper, slot) {\n\n let vbuf = _buffer._vData,\n ibuf = _buffer._iData,\n uintVData = _buffer._uintVData;\n let offsetInfo;\n\n _finalColor.a = slotColor.a * attachmentColor.a * skeletonColor.a * _nodeA * 255;\n _multiplier = _premultipliedAlpha? _finalColor.a : 255;\n _tempr = _nodeR * attachmentColor.r * skeletonColor.r * _multiplier;\n _tempg = _nodeG * attachmentColor.g * skeletonColor.g * _multiplier;\n _tempb = _nodeB * attachmentColor.b * skeletonColor.b * _multiplier;\n \n _finalColor.r = _tempr * slotColor.r;\n _finalColor.g = _tempg * slotColor.g;\n _finalColor.b = _tempb * slotColor.b;\n\n if (slot.darkColor == null) {\n _darkColor.set(0.0, 0.0, 0.0, 1.0);\n } else {\n _darkColor.r = slot.darkColor.r * _tempr;\n _darkColor.g = slot.darkColor.g * _tempg;\n _darkColor.b = slot.darkColor.b * _tempb;\n }\n _darkColor.a = _premultipliedAlpha ? 255 : 0;\n\n if (!clipper.isClipping()) {\n if (_vertexEffect) {\n for (let v = _vertexFloatOffset, n = _vertexFloatOffset + _vertexFloatCount; v < n; v += _perVertexSize) {\n _tempPos.x = vbuf[v];\n _tempPos.y = vbuf[v + 1];\n _tempUv.x = vbuf[v + 2];\n _tempUv.y = vbuf[v + 3];\n _vertexEffect.transform(_tempPos, _tempUv, _finalColor, _darkColor);\n\n vbuf[v] = _tempPos.x; // x\n vbuf[v + 1] = _tempPos.y; // y\n vbuf[v + 2] = _tempUv.x; // u\n vbuf[v + 3] = _tempUv.y; // v\n uintVData[v + 4] = _spineColorToInt32(_finalColor); // light color\n\n if (_useTint) {\n uintVData[v + 5] = _spineColorToInt32(_darkColor);\n if (_useMulti) vbuf[v + 6] = _texId;\n } else {\n if (_useMulti) vbuf[v + 5] = _texId;\n }\n }\n } else {\n _finalColor32 = _spineColorToInt32(_finalColor);\n _darkColor32 = _spineColorToInt32(_darkColor);\n \n for (let v = _vertexFloatOffset, n = _vertexFloatOffset + _vertexFloatCount; v < n; v += _perVertexSize) {\n uintVData[v + 4] = _finalColor32; // light color\n\n if (_useTint) {\n uintVData[v + 5] = _darkColor32;\n if (_useMulti) vbuf[v + 6] = _texId;\n } else {\n if (_useMulti) vbuf[v + 5] = _texId;\n }\n }\n }\n } else {\n let uvs = vbuf.subarray(_vertexFloatOffset + 2);\n clipper.clipTriangles(vbuf.subarray(_vertexFloatOffset), _vertexFloatCount, ibuf.subarray(_indexOffset), _indexCount, uvs, _finalColor, _darkColor, _useTint, _perVertexSize);\n let clippedVertices = new Float32Array(clipper.clippedVertices);\n let clippedTriangles = clipper.clippedTriangles;\n \n // insure capacity\n _indexCount = clippedTriangles.length;\n _vertexFloatCount = clippedVertices.length / _perClipVertexSize * _perVertexSize;\n\n offsetInfo = _buffer.requestForSpine(_vertexFloatCount / _perVertexSize, _indexCount);\n _indexOffset = offsetInfo.indiceOffset,\n _vertexOffset = offsetInfo.vertexOffset,\n _vertexFloatOffset = offsetInfo.byteOffset >> 2;\n vbuf = _buffer._vData,\n ibuf = _buffer._iData;\n uintVData = _buffer._uintVData;\n\n // fill indices\n ibuf.set(clippedTriangles, _indexOffset);\n\n // fill vertices contain x y u v light color dark color\n if (_vertexEffect) {\n for (let v = 0, n = clippedVertices.length, offset = _vertexFloatOffset; v < n; v += _perClipVertexSize, offset += _perVertexSize) {\n _tempPos.x = clippedVertices[v];\n _tempPos.y = clippedVertices[v + 1];\n _finalColor.set(clippedVertices[v + 2], clippedVertices[v + 3], clippedVertices[v + 4], clippedVertices[v + 5]);\n _tempUv.x = clippedVertices[v + 6];\n _tempUv.y = clippedVertices[v + 7];\n if (_useTint) {\n _darkColor.set(clippedVertices[v + 8], clippedVertices[v + 9], clippedVertices[v + 10], clippedVertices[v + 11]);\n } else {\n _darkColor.set(0, 0, 0, 0);\n }\n _vertexEffect.transform(_tempPos, _tempUv, _finalColor, _darkColor);\n\n vbuf[offset] = _tempPos.x; // x\n vbuf[offset + 1] = _tempPos.y; // y\n vbuf[offset + 2] = _tempUv.x; // u\n vbuf[offset + 3] = _tempUv.y; // v\n uintVData[offset + 4] = _spineColorToInt32(_finalColor);\n\n if (_useTint) {\n uintVData[offset + 5] = _spineColorToInt32(_darkColor);\n if (_useMulti) vbuf[offset + 6] = _texId;\n } else {\n if (_useMulti) vbuf[offset + 5] = _texId;\n }\n }\n } else {\n for (let v = 0, n = clippedVertices.length, offset = _vertexFloatOffset; v < n; v += _perClipVertexSize, offset += _perVertexSize) {\n vbuf[offset] = clippedVertices[v]; // x\n vbuf[offset + 1] = clippedVertices[v + 1]; // y\n vbuf[offset + 2] = clippedVertices[v + 6]; // u\n vbuf[offset + 3] = clippedVertices[v + 7]; // v\n\n _finalColor32 = ((clippedVertices[v + 5]<<24) >>> 0) + (clippedVertices[v + 4]<<16) + (clippedVertices[v + 3]<<8) + clippedVertices[v + 2];\n uintVData[offset + 4] = _finalColor32;\n\n if (_useTint) {\n _darkColor32 = ((clippedVertices[v + 11] << 24) >>> 0) + (clippedVertices[v + 10] << 16) + (clippedVertices[v + 9] << 8) + clippedVertices[v + 8];\n uintVData[offset + 5] = _darkColor32;\n if (_useMulti) vbuf[offset + 6] = _texId;\n } else {\n if (_useMulti) vbuf[offset + 5] = _texId;\n }\n }\n }\n }\n }\n\n realTimeTraverse (worldMat) {\n let vbuf;\n let ibuf;\n\n let locSkeleton = _comp._skeleton;\n let skeletonColor = locSkeleton.color;\n let graphics = _comp._debugRenderer;\n let clipper = _comp._clipper;\n let material = null;\n let attachment, attachmentColor, slotColor, uvs, triangles;\n let isRegion, isMesh, isClip;\n let offsetInfo;\n let slot;\n let worldMatm;\n\n _slotRangeStart = _comp._startSlotIndex;\n _slotRangeEnd = _comp._endSlotIndex;\n _inRange = false;\n if (_slotRangeStart == -1) _inRange = true;\n\n _debugSlots = _comp.debugSlots;\n _debugBones = _comp.debugBones;\n _debugMesh = _comp.debugMesh;\n if (graphics && (_debugBones || _debugSlots || _debugMesh)) {\n graphics.clear();\n graphics.lineWidth = 2;\n }\n \n // x y u v r1 g1 b1 a1 r2 g2 b2 a2 or x y u v r g b a \n _perClipVertexSize = _useTint ? (_useMulti ? 16 : 12) : (_useMulti ? 12 : 8);\n \n _vertexFloatCount = 0;\n _vertexFloatOffset = 0;\n _vertexOffset = 0;\n _indexCount = 0;\n _indexOffset = 0;\n\n for (let slotIdx = 0, slotCount = locSkeleton.drawOrder.length; slotIdx < slotCount; slotIdx++) {\n slot = locSkeleton.drawOrder[slotIdx];\n\n if(slot == undefined || !slot.bone.active) {\n continue;\n }\n\n if (_slotRangeStart >= 0 && _slotRangeStart == slot.data.index) {\n _inRange = true;\n }\n \n if (!_inRange) {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n \n if (_slotRangeEnd >= 0 && _slotRangeEnd == slot.data.index) {\n _inRange = false;\n }\n \n _vertexFloatCount = 0;\n _indexCount = 0;\n\n attachment = slot.getAttachment();\n if (!attachment) {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n\n isRegion = attachment instanceof spine.RegionAttachment;\n isMesh = attachment instanceof spine.MeshAttachment;\n isClip = attachment instanceof spine.ClippingAttachment;\n\n if (isClip) {\n clipper.clipStart(slot, attachment);\n continue;\n }\n\n if (!isRegion && !isMesh) {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n\n material = _getSlotMaterial(attachment.region.texture._texture, slot.data.blendMode);\n if (!material) {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n\n if (_mustFlush || material.getHash() !== _renderer.material.getHash()) {\n _mustFlush = false;\n _renderer._flush();\n _renderer.node = _node;\n _renderer.material = material;\n }\n\n if (isRegion) {\n \n triangles = _quadTriangles;\n \n // insure capacity\n _vertexFloatCount = 4 * _perVertexSize;\n _indexCount = 6;\n\n offsetInfo = _buffer.requestForSpine(4, 6);\n _indexOffset = offsetInfo.indiceOffset,\n _vertexOffset = offsetInfo.vertexOffset,\n _vertexFloatOffset = offsetInfo.byteOffset >> 2;\n vbuf = _buffer._vData,\n ibuf = _buffer._iData;\n \n // compute vertex and fill x y\n attachment.computeWorldVertices(slot.bone, vbuf, _vertexFloatOffset, _perVertexSize);\n \n // draw debug slots if enabled graphics\n if (graphics && _debugSlots) {\n graphics.strokeColor = _slotColor;\n graphics.moveTo(vbuf[_vertexFloatOffset], vbuf[_vertexFloatOffset + 1]);\n for (let ii = _vertexFloatOffset + _perVertexSize, nn = _vertexFloatOffset + _vertexFloatCount; ii < nn; ii += _perVertexSize) {\n graphics.lineTo(vbuf[ii], vbuf[ii + 1]);\n }\n graphics.close();\n graphics.stroke();\n }\n }\n else if (isMesh) {\n \n triangles = attachment.triangles;\n \n // insure capacity\n _vertexFloatCount = (attachment.worldVerticesLength >> 1) * _perVertexSize;\n _indexCount = triangles.length;\n\n offsetInfo = _buffer.requestForSpine(_vertexFloatCount / _perVertexSize, _indexCount);\n _indexOffset = offsetInfo.indiceOffset,\n _vertexOffset = offsetInfo.vertexOffset,\n _vertexFloatOffset = offsetInfo.byteOffset >> 2;\n vbuf = _buffer._vData,\n ibuf = _buffer._iData;\n \n // compute vertex and fill x y\n attachment.computeWorldVertices(slot, 0, attachment.worldVerticesLength, vbuf, _vertexFloatOffset, _perVertexSize);\n\n // draw debug mesh if enabled graphics\n if (graphics && _debugMesh) {\n graphics.strokeColor = _meshColor;\n\n for (let ii = 0, nn = triangles.length; ii < nn; ii += 3) {\n let v1 = triangles[ii] * _perVertexSize + _vertexFloatOffset;\n let v2 = triangles[ii + 1] * _perVertexSize + _vertexFloatOffset;\n let v3 = triangles[ii + 2] * _perVertexSize + _vertexFloatOffset;\n \n graphics.moveTo(vbuf[v1], vbuf[v1 + 1]);\n graphics.lineTo(vbuf[v2], vbuf[v2 + 1]);\n graphics.lineTo(vbuf[v3], vbuf[v3 + 1]);\n graphics.close();\n graphics.stroke();\n }\n }\n }\n \n if (_vertexFloatCount == 0 || _indexCount == 0) {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n \n // fill indices\n ibuf.set(triangles, _indexOffset);\n\n // fill u v\n uvs = attachment.uvs;\n for (let v = _vertexFloatOffset, n = _vertexFloatOffset + _vertexFloatCount, u = 0; v < n; v += _perVertexSize, u += 2) {\n vbuf[v + 2] = uvs[u]; // u\n vbuf[v + 3] = uvs[u + 1]; // v\n }\n\n attachmentColor = attachment.color,\n slotColor = slot.color;\n\n this.fillVertices(skeletonColor, attachmentColor, slotColor, clipper, slot);\n \n // reset buffer pointer, because clipper maybe realloc a new buffer in file Vertices function.\n vbuf = _buffer._vData,\n ibuf = _buffer._iData;\n \n if (_indexCount > 0) {\n for (let ii = _indexOffset, nn = _indexOffset + _indexCount; ii < nn; ii++) {\n ibuf[ii] += _vertexOffset;\n }\n\n if (worldMat) {\n worldMatm = worldMat.m;\n _m00 = worldMatm[0];\n _m04 = worldMatm[4];\n _m12 = worldMatm[12];\n _m01 = worldMatm[1];\n _m05 = worldMatm[5];\n _m13 = worldMatm[13];\n for (let ii = _vertexFloatOffset, nn = _vertexFloatOffset + _vertexFloatCount; ii < nn; ii += _perVertexSize) {\n _x = vbuf[ii];\n _y = vbuf[ii + 1];\n vbuf[ii] = _x * _m00 + _y * _m04 + _m12;\n vbuf[ii + 1] = _x * _m01 + _y * _m05 + _m13;\n }\n }\n _buffer.adjustForSpine(_vertexFloatCount / _perVertexSize, _indexCount);\n }\n \n clipper.clipEndWithSlot(slot);\n }\n \n clipper.clipEnd();\n \n if (graphics && _debugBones) {\n let bone;\n graphics.strokeColor = _boneColor;\n graphics.fillColor = _slotColor; // Root bone color is same as slot color.\n \n for (let i = 0, n = locSkeleton.bones.length; i < n; i++) {\n bone = locSkeleton.bones[i];\n let x = bone.data.length * bone.a + bone.worldX;\n let y = bone.data.length * bone.c + bone.worldY;\n \n // Bone lengths.\n graphics.moveTo(bone.worldX, bone.worldY);\n graphics.lineTo(x, y);\n graphics.stroke();\n \n // Bone origins.\n graphics.circle(bone.worldX, bone.worldY, Math.PI * 1.5);\n graphics.fill();\n if (i === 0) {\n graphics.fillColor = _originColor;\n }\n }\n }\n }\n\n cacheVerticesConvertToMulti(vertices) {\n const verticesMulti = new Float32Array(vertices.length + (vertices.length / 6));\n\n for (let i = 0, j = 0; j < vertices.length;) {\n verticesMulti[i++] = vertices[j++]; // x\n verticesMulti[i++] = vertices[j++]; // y\n verticesMulti[i++] = vertices[j++]; // u\n verticesMulti[i++] = vertices[j++]; // v\n verticesMulti[i++] = vertices[j++]; // color1\n verticesMulti[i++] = vertices[j++]; // color2\n verticesMulti[i++] = 0; // texId\n }\n\n return verticesMulti;\n }\n\n cacheTraverse (worldMat) {\n \n let frame = _comp._curFrame;\n if (!frame) return;\n\n let segments = frame.segments;\n if (segments.length == 0) return;\n\n let vbuf, ibuf, uintbuf;\n let material;\n let offsetInfo;\n let vertices = frame.vertices;\n let indices = frame.indices;\n let worldMatm;\n let useMultiTint = _useMulti && _useTint;\n\n if (useMultiTint) {\n if (!frame.verticesMulti) {\n frame.verticesMulti = this.cacheVerticesConvertToMulti(frame.vertices);\n }\n vertices = frame.verticesMulti;\n }\n\n let frameVFOffset = 0, frameIndexOffset = 0, segVFCount = 0;\n if (worldMat) {\n worldMatm = worldMat.m;\n _m00 = worldMatm[0];\n _m01 = worldMatm[1];\n _m04 = worldMatm[4];\n _m05 = worldMatm[5];\n _m12 = worldMatm[12];\n _m13 = worldMatm[13];\n }\n\n let justTranslate = _m00 === 1 && _m01 === 0 && _m04 === 0 && _m05 === 1;\n let needBatch = (_handleVal & FLAG_BATCH);\n let calcTranslate = needBatch && justTranslate;\n\n let colorOffset = 0;\n let colors = frame.colors;\n let nowColor = colors[colorOffset++];\n let maxVFOffset = useMultiTint ? (nowColor.vfOffset + (nowColor.vfOffset / 6)) : nowColor.vfOffset;\n _handleColor(nowColor);\n\n for (let i = 0, n = segments.length; i < n; i++) {\n let segInfo = segments[i];\n material = _getSlotMaterial(segInfo.tex, segInfo.blendMode);\n if (!material) continue;\n\n if (_mustFlush || material.getHash() !== _renderer.material.getHash()) {\n _mustFlush = false;\n _renderer._flush();\n _renderer.node = _node;\n _renderer.material = material;\n }\n\n _vertexCount = segInfo.vertexCount;\n _indexCount = segInfo.indexCount;\n\n offsetInfo = _buffer.requestForSpine(_vertexCount, _indexCount);\n _indexOffset = offsetInfo.indiceOffset;\n _vertexOffset = offsetInfo.vertexOffset;\n _vfOffset = offsetInfo.byteOffset >> 2;\n vbuf = _buffer._vData;\n ibuf = _buffer._iData;\n uintbuf = _buffer._uintVData;\n\n for (let ii = _indexOffset, il = _indexOffset + _indexCount; ii < il; ii++) {\n ibuf[ii] = _vertexOffset + indices[frameIndexOffset++];\n }\n\n segVFCount = useMultiTint ? (segInfo.vfCount + (segInfo.vfCount / 6)) : segInfo.vfCount;\n vbuf.set(vertices.subarray(frameVFOffset, frameVFOffset + segVFCount), _vfOffset);\n frameVFOffset += segVFCount;\n\n if (calcTranslate) {\n for (let ii = _vfOffset, il = _vfOffset + segVFCount; ii < il; ii += _perVertexSize) {\n vbuf[ii] += _m12;\n vbuf[ii + 1] += _m13;\n }\n } else if (needBatch) {\n for (let ii = _vfOffset, il = _vfOffset + segVFCount; ii < il; ii += _perVertexSize) {\n _x = vbuf[ii];\n _y = vbuf[ii + 1];\n vbuf[ii] = _x * _m00 + _y * _m04 + _m12;\n vbuf[ii + 1] = _x * _m01 + _y * _m05 + _m13;\n }\n }\n\n _buffer.adjustForSpine(_vertexCount, _indexCount);\n\n // 使用多纹理材质,不使用 Tint 则用 TexId 在下标 5 覆盖 darkColor否则在 6 写入 TexId\n // 不使用多纹理材质,则保持引擎默认的强制 Tint 不用做额外操作\n\n if (_useMulti) {\n if (_useTint) {\n if (_needColor) {\n let frameColorOffset = frameVFOffset - segVFCount;\n for (let ii = _vfOffset + 4, il = _vfOffset + 4 + segVFCount; ii < il; ii += _perVertexSize, frameColorOffset += _perVertexSize) {\n if (frameColorOffset >= maxVFOffset) {\n nowColor = colors[colorOffset++];\n _handleColor(nowColor);\n maxVFOffset = useMultiTint ? (nowColor.vfOffset + (nowColor.vfOffset / 6)) : nowColor.vfOffset;\n }\n uintbuf[ii] = _finalColor32;\n uintbuf[ii + 1] = _darkColor32; \n vbuf[ii + 2] = _texId;\n }\n } else {\n for (let ii = _vfOffset + 4, il = _vfOffset + 4 + segVFCount; ii < il; ii += _perVertexSize) {\n vbuf[ii + 2] = _texId;\n }\n }\n } else {\n if (_needColor) {\n let frameColorOffset = frameVFOffset - segVFCount;\n for (let ii = _vfOffset + 4, il = _vfOffset + 4 + segVFCount; ii < il; ii += _perVertexSize, frameColorOffset += _perVertexSize) {\n if (frameColorOffset >= maxVFOffset) {\n nowColor = colors[colorOffset++];\n _handleColor(nowColor);\n maxVFOffset = useMultiTint ? (nowColor.vfOffset + (nowColor.vfOffset / 6)) : nowColor.vfOffset;\n }\n uintbuf[ii] = _finalColor32;\n vbuf[ii + 1] = _texId;\n }\n } else {\n for (let ii = _vfOffset + 4, il = _vfOffset + 4 + segVFCount; ii < il; ii += _perVertexSize) {\n vbuf[ii + 1] = _texId;\n }\n }\n }\n } else {\n if (_needColor) {\n let frameColorOffset = frameVFOffset - segVFCount;\n for (let ii = _vfOffset + 4, il = _vfOffset + 4 + segVFCount; ii < il; ii += _perVertexSize, frameColorOffset += _perVertexSize) {\n if (frameColorOffset >= maxVFOffset) {\n nowColor = colors[colorOffset++];\n _handleColor(nowColor);\n maxVFOffset = useMultiTint ? (nowColor.vfOffset + (nowColor.vfOffset / 6)) : nowColor.vfOffset;\n }\n uintbuf[ii] = _finalColor32;\n uintbuf[ii + 1] = _darkColor32;\n }\n }\n }\n }\n }\n\n fillBuffers (comp, renderer) {\n \n let node = comp.node;\n node._renderFlag |= RenderFlow.FLAG_UPDATE_RENDER_DATA;\n if (!comp._skeleton) return;\n\n let nodeColor = node._color;\n _nodeR = nodeColor.r / 255;\n _nodeG = nodeColor.g / 255;\n _nodeB = nodeColor.b / 255;\n _nodeA = nodeColor.a / 255;\n\n let baseMaterial = comp._materials[0];\n if (!baseMaterial) return;\n\n _useMulti = baseMaterial.material.isMultiSupport();\n _useTint = comp.useTint;\n _vertexFormat = _useTint ? (_useMulti ? VFTwoColorTexId : VFTwoColor) : (_useMulti ? VFOneColorTexId : (comp.isAnimationCached() ? VFTwoColor : VFOneColor));\n // x y u v color1 color2 or x y u v color\n _perVertexSize = _useTint ? (_useMulti ? 7 : 6) : (_useMulti ? 6 : (comp.isAnimationCached() ? 6 : 5));\n\n _node = comp.node;\n _buffer = renderer.getBuffer('mesh', _vertexFormat);\n _renderer = renderer;\n _comp = comp;\n\n _mustFlush = true;\n _premultipliedAlpha = comp.premultipliedAlpha;\n _multiplier = 1.0;\n _handleVal = 0x00;\n _needColor = false;\n _vertexEffect = comp._effectDelegate && comp._effectDelegate._vertexEffect;\n\n if (nodeColor._val !== 0xffffffff || _premultipliedAlpha) {\n _needColor = true;\n }\n\n if (_useTint) {\n _handleVal |= FLAG_TWO_COLOR;\n }\n\n let worldMat = undefined;\n if (_comp.enableBatch) {\n worldMat = _node._worldMatrix;\n _mustFlush = false;\n _handleVal |= FLAG_BATCH;\n }\n\n if (comp.isAnimationCached()) {\n // Traverse input assembler.\n this.cacheTraverse(worldMat);\n } else {\n if (_vertexEffect) _vertexEffect.begin(comp._skeleton);\n this.realTimeTraverse(worldMat);\n if (_vertexEffect) _vertexEffect.end();\n }\n\n // sync attached node matrix\n renderer.worldMatDirty++;\n comp.attachUtil._syncAttachedNode();\n\n // Clear temp var.\n _node = undefined;\n _buffer = undefined;\n _renderer = undefined;\n _comp = undefined;\n _vertexEffect = null;\n }\n\n postFillBuffers (comp, renderer) {\n renderer.worldMatDirty--;\n }\n}\n\nAssembler.register(Skeleton, SpineAssembler);\n","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\nlet TrackEntryListeners = function () {\n this.start = null;\n this.end = null;\n this.complete = null;\n this.event = null;\n this.interrupt = null;\n this.dispose = null;\n};\n\nTrackEntryListeners.getListeners = function(entry){\n if (!entry.listener) {\n entry.listener = new TrackEntryListeners();\n }\n return entry.listener;\n};\n\nmodule.exports = TrackEntryListeners;","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\nconst spine = require('./lib/spine');\n/**\n * @module sp\n */\n\n/**\n * !#en\n * The delegate of spine vertex effect\n * !#zh\n * Spine 顶点动画代理\n * @class VertexEffectDelegate\n */\nsp.VertexEffectDelegate = cc.Class({\n name: 'sp.VertexEffectDelegate',\n\n ctor () {\n this._vertexEffect = null;\n this._interpolation = null;\n this._effectType = 'none';\n },\n\n /**\n * !#en Clears vertex effect.\n * !#zh 清空顶点效果\n * @method clear\n */\n clear () {\n this._vertexEffect = null;\n this._interpolation = null;\n this._effectType = 'none';\n },\n\n /**\n * !#en Inits delegate with jitter effect\n * !#zh 设置顶点抖动效果\n * @method initJitter\n * @param {Number} jitterX\n * @param {Number} jitterY\n */\n initJitter (jitterX, jitterY) {\n this._effectType = 'jitter';\n this._vertexEffect = new spine.JitterEffect(jitterX, jitterY);\n return this._vertexEffect;\n },\n\n /**\n * !#en Inits delegate with swirl effect\n * !#zh 设置顶点漩涡效果\n * @method initSwirlWithPow\n * @param {Number} radius \n * @param {Number} power\n * @return {sp.spine.JitterEffect}\n */\n initSwirlWithPow(radius, power) {\n this._interpolation = new spine.Pow(power);\n this._vertexEffect = new spine.SwirlEffect(radius, this._interpolation);\n return this._vertexEffect;\n },\n\n /**\n * !#en Inits delegate with swirl effect\n * !#zh 设置顶点漩涡效果\n * @method initSwirlWithPowOut\n * @param {Number} radius \n * @param {Number} power\n * @return {sp.spine.SwirlEffect}\n */\n initSwirlWithPowOut(radius, power) {\n this._interpolation = new spine.PowOut(power);\n this._vertexEffect = new spine.SwirlEffect(radius, this._interpolation);\n return this._vertexEffect;\n },\n\n /**\n * !#en Gets jitter vertex effect\n * !#zh 获取顶点抖动效果\n * @method getJitterVertexEffect\n * @return {sp.spine.JitterEffect}\n */\n getJitterVertexEffect () {\n return this._vertexEffect;\n },\n\n /**\n * !#en Gets swirl vertex effect\n * !#zh 获取顶点漩涡效果\n * @method getSwirlVertexEffect\n * @return {sp.spine.SwirlEffect}\n */\n getSwirlVertexEffect () {\n return this._vertexEffect;\n },\n\n /**\n * !#en Gets vertex effect\n * !#zh 获取顶点效果\n * @method getVertexEffect\n * @return {sp.spine.JitterEffect|sp.spine.SwirlEffect}\n */\n getVertexEffect () {\n return this._vertexEffect;\n },\n\n /**\n * !#en Gets effect type\n * !#zh 获取效果类型\n * @method getEffectType\n * @return {String}\n */\n getEffectType () {\n return this._effectType;\n }\n});\nmodule.exports = sp.VertexEffectDelegate;","/****************************************************************************\n Copyright (c) 2013-2016 Chukong Technologies Inc.\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n// PREDEFINE\n\n// window may be undefined when first load engine from editor\nvar _global = typeof window === 'undefined' ? global : window;\n\n/**\n * !#en\n * The main namespace of Cocos2d-JS, all engine core classes, functions, properties and constants are defined in this namespace.\n * !#zh\n * Cocos 引擎的主要命名空间,引擎代码中所有的类,函数,属性和常量都在这个命名空间中定义。\n * @module cc\n * @main cc\n */\n_global.cc = _global.cc || {};\n\n// For internal usage\ncc.internal = cc.internal || {};\n\nrequire('./predefine');\n\n// polyfills\nrequire('./polyfill/string');\nrequire('./polyfill/misc');\nrequire('./polyfill/array');\nrequire('./polyfill/object');\nrequire('./polyfill/array-buffer');\nrequire('./polyfill/number');\nif (!(CC_EDITOR && Editor.isMainProcess)) {\n require('./polyfill/typescript');\n}\n\nrequire('./cocos2d/core/predefine');\n\n// LOAD COCOS2D ENGINE CODE\n\nif (!(CC_EDITOR && Editor.isMainProcess)) {\n require('./cocos2d');\n}\n\n// LOAD EXTENDS\n\nrequire('./extends');\n\nif (CC_EDITOR) {\n if (Editor.isMainProcess) {\n Editor.versions['cocos2d'] = require('./package').version;\n }\n}\n\nmodule.exports = _global.cc;","if (!ArrayBuffer.isView) {\n const TypedArray = Object.getPrototypeOf(Int8Array);\n ArrayBuffer.isView = (typeof TypedArray === 'function') ? function (obj) {\n return obj instanceof TypedArray;\n } : function (obj) {\n // old JSC, phantom, QtWebview\n if (typeof obj !== 'object') {\n return false;\n }\n let ctor = obj.constructor;\n return ctor === Float64Array || ctor === Float32Array || ctor === Uint8Array || ctor === Uint32Array || ctor === Int8Array;\n };\n}\n","if (!Array.isArray) {\n Array.isArray = function (arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n };\n}\n\nif (!Array.prototype.find) {\n Array.prototype.find = function (callback) {\n var length = this.length;\n for (var i = 0; i < length; i++) {\n var element = this[i];\n if (callback.call(this, element, i, this)) {\n return element;\n }\n }\n\n return undefined;\n };\n}\n\n// for ie 11\nif (!Array.prototype.includes) {\n Array.prototype.includes = function (value) {\n return this.indexOf(value) !== -1;\n };\n}\n","if (!Math.sign) {\n Math.sign = function (x) {\n x = +x; // convert to a number\n if (x === 0 || isNaN(x)) {\n return x;\n }\n return x > 0 ? 1 : -1;\n };\n}\n\nif (!Math.log2) {\n Math.log2 = function (x) {\n return Math.log(x) * Math.LOG2E;\n };\n}\n\nif (!Number.isInteger) {\n Number.isInteger = function (value) {\n return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n };\n}\n\nif (CC_JSB || CC_RUNTIME || !console.time) {\n var Timer = window.performance || Date;\n var _timerTable = Object.create(null);\n console.time = function (label) {\n _timerTable[label] = Timer.now();\n };\n console.timeEnd = function (label) {\n var startTime = _timerTable[label];\n var duration = Timer.now() - startTime;\n console.log(`${label}: ${duration}ms`);\n };\n}\n","\nNumber.parseFloat = Number.parseFloat || parseFloat;\nNumber.parseInt = Number.parseInt || parseInt;\n","\n// for IE11\nif (!Object.assign) {\n Object.assign = function (target, source) {\n return cc.js.mixin(target, source);\n }\n}\n\n// for Baidu browser\n// Implementation reference to: \n// http://2ality.com/2016/02/object-getownpropertydescriptors.html\n// http://docs.w3cub.com/javascript/global_objects/reflect/ownkeys/\nif (!Object.getOwnPropertyDescriptors) {\n Object.getOwnPropertyDescriptors = function (obj) {\n let descriptors = {};\n let ownKeys = Object.getOwnPropertyNames(obj);\n if (Object.getOwnPropertySymbols) { // for IE 11\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(obj));\n }\n for(let i = 0; i < ownKeys.length; ++i){\n let key = ownKeys[i];\n descriptors[key] = Object.getOwnPropertyDescriptor(obj, key);\n }\n return descriptors;\n }\n}","if (!String.prototype.startsWith) {\n String.prototype.startsWith = function (searchString, position) {\n position = position || 0;\n return this.lastIndexOf(searchString, position) === position;\n };\n}\n\nif (!String.prototype.endsWith) {\n String.prototype.endsWith = function (searchString, position) {\n if (typeof position === 'undefined' || position > this.length) {\n position = this.length;\n }\n position -= searchString.length;\n var lastIndex = this.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n };\n}\n\nif (!String.prototype.trimLeft) {\n String.prototype.trimLeft = function () {\n return this.replace(/^\\s+/, '');\n };\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global global, define, System, Reflect, Promise */\r\n\r\n// tslib 2.0.3\r\n\r\nvar extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n\r\nwindow.__extends = function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n};\r\n\r\nwindow.__assign = Object.assign || function (t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n};\r\n\r\nwindow.__rest = function (s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n};\r\n\r\nwindow.__decorate = function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\n\r\nwindow.__param = function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\n\r\nwindow.__metadata = function (metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n};\r\n\r\nwindow.__awaiter = function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\n\r\nwindow.__generator = function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\n\r\nwindow.__exportStar = function(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n};\r\n\r\nwindow.__createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nwindow.__values = function (o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n};\r\n\r\nwindow.__read = function (o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n};\r\n\r\nwindow.__spread = function () {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n};\r\n\r\nwindow.__spreadArrays = function () {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nwindow.__await = function (v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n};\r\n\r\nwindow.__asyncGenerator = function (thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n};\r\n\r\nwindow.__asyncDelegator = function (o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n};\r\n\r\nwindow.__asyncValues = function (o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n};\r\n\r\nwindow.__makeTemplateObject = function (cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nwindow.__importStar = function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\n\r\nwindow.__importDefault = function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\n\r\nwindow.__classPrivateFieldGet = function (receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n};\r\n\r\nwindow.__classPrivateFieldSet = function (receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n};","/****************************************************************************\n Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.\n\n https://www.cocos.com/\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated engine source code (the \"Software\"), a limited,\n worldwide, royalty-free, non-assignable, revocable and non-exclusive license\n to use Cocos Creator solely to develop games on your target platforms. You shall\n not use Cocos Creator software for developing other software or tools that's\n used for developing games. You are not granted to publish, distribute,\n sublicense, and/or sell copies of Cocos Creator.\n\n The software or tools in this License Agreement are licensed, not sold.\n Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n ****************************************************************************/\n\n// MACROS\n\n/**\n * !#zh\n * 这里是一些用来判断执行环境的宏,这些宏都是全局变量,直接访问即可。<br>\n * 在项目构建时,这些宏将会被预处理并根据构建的平台剔除不需要的代码,例如\n *\n * if (CC_DEBUG) {\n * cc.log('debug');\n * }\n * else {\n * cc.log('release');\n * }\n *\n * 在构建后会只剩下\n *\n * cc.log('release');\n *\n * <br>\n * 如需判断脚本是否运行于指定平台,可以用如下表达式:\n *\n * {\n * \"编辑器\": CC_EDITOR,\n * \"编辑器 或 预览\": CC_DEV,\n * \"编辑器 或 预览 或 构建调试\": CC_DEBUG,\n * \"网页预览\": CC_PREVIEW && !CC_JSB,\n * \"模拟器预览\": CC_PREVIEW && CC_JSB,\n * \"构建调试\": CC_BUILD && CC_DEBUG,\n * \"构建发行\": CC_BUILD && !CC_DEBUG,\n * }\n *\n * !#en\n * Here are some of the macro used to determine the execution environment, these macros are global variables, can be accessed directly.<br>\n * When the project is built, these macros will be preprocessed and discard unreachable code based on the built platform, for example:\n *\n * if (CC_DEBUG) {\n * cc.log('debug');\n * }\n * else {\n * cc.log('release');\n * }\n *\n * After build will become:\n *\n * cc.log('release');\n *\n * <br>\n * To determine whether the script is running on the specified platform, you can use the following expression:\n *\n * {\n * \"editor\": CC_EDITOR,\n * \"editor or preview\": CC_DEV,\n * \"editor or preview or build in debug mode\": CC_DEBUG,\n * \"web preview\": CC_PREVIEW && !CC_JSB,\n * \"simulator preview\": CC_PREVIEW && CC_JSB,\n * \"build in debug mode\": CC_BUILD && CC_DEBUG,\n * \"build in release mode\": CC_BUILD && !CC_DEBUG,\n * }\n *\n * @module GLOBAL-MACROS\n */\n/**\n * @property {Boolean} CC_EDITOR - Running in the editor.\n */\n/**\n * @property {Boolean} CC_PREVIEW - Preview in browser or simulator.\n */\n/**\n * @property {Boolean} CC_DEV - Running in the editor or preview.\n */\n/**\n * @property {Boolean} CC_DEBUG - Running in the editor or preview, or build in debug mode.\n */\n/**\n * @property {Boolean} CC_BUILD - Running in published project.\n */\n/**\n * @property {Boolean} CC_JSB - Running in native platform (mobile app, desktop app, or simulator).\n */\n/**\n * @property {Boolean} CC_TEST - Running in the engine's unit test.\n */\n/**\n * @property {Boolean} CC_RUNTIME - Running in runtime environments.\n */\n\n// window may be undefined when first load engine from editor\nvar _global = typeof window === 'undefined' ? global : window;\n\n/*\n * @param defaultValue - The default value is only used in the editor or preview.\n */\nfunction defineMacro (name, defaultValue) {\n // if \"global_defs\" not preprocessed by uglify, just declare them globally,\n // this may happened in release version's preview page.\n if (typeof _global[name] === 'undefined') {\n _global[name] = defaultValue;\n }\n}\n\nfunction defineDeprecatedMacroGetter (name, defaultValue) {\n if (typeof _global[name] === 'undefined') {\n Object.defineProperty(_global, name, {\n get: function () {\n let recommandedUsage;\n if (name === 'CC_WECHATGAMESUB') {\n recommandedUsage = 'cc.sys.platform === cc.sys.WECHAT_GAME_SUB';\n }\n else if (name === 'CC_WECHATGAME') {\n recommandedUsage = 'cc.sys.platform === cc.sys.WECHAT_GAME'; \n }\n else if (name === 'CC_QQPLAY') {\n recommandedUsage = 'cc.sys.platform === cc.sys.QQ_PLAY';\n }\n cc.warnID(1400, name, recommandedUsage);\n return defaultValue;\n }\n });\n }\n}\n\nfunction defined (name) {\n return typeof _global[name] === 'object';\n}\n\n// ensure CC_BUILD is defined\n// should not use window.CC_BUILD because we need get global_defs defined in uglify\ndefineMacro('CC_BUILD', false);\n\n// These default values can only be defined after building\n// If you need to modify them\n// please modify the `global_defs` in the option returned by `gulp/util/utils.js: getUglifyOptions`.\nif (CC_BUILD) {\n _global.CC_BUILD = CC_BUILD;\n _global.CC_DEV = CC_DEV;\n _global.CC_DEBUG = CC_DEBUG;\n _global.CC_JSB = CC_JSB;\n _global.CC_NATIVERENDERER = CC_NATIVERENDERER;\n _global.CC_SUPPORT_JIT = CC_SUPPORT_JIT;\n _global.CC_PHYSICS_BUILTIN = CC_PHYSICS_BUILTIN;\n _global.CC_PHYSICS_CANNON = CC_PHYSICS_CANNON;\n _global.CC_EDITOR = CC_EDITOR;\n _global.CC_PREVIEW = CC_PREVIEW;\n _global.CC_TEST = CC_TEST;\n _global.CC_RUNTIME = CC_RUNTIME;\n _global.CC_JSB = CC_JSB;\n}\nelse {\n defineMacro('CC_DEV', true); // (CC_EDITOR && !CC_BUILD) || CC_PREVIEW || CC_TEST\n defineMacro('CC_DEBUG', true); // CC_DEV || Debug Build\n defineMacro('CC_JSB', defined('jsb'));\n defineMacro('CC_NATIVERENDERER', defined('jsb'));\n defineMacro('CC_SUPPORT_JIT', true);\n defineMacro('CC_PHYSICS_BUILTIN', false);\n defineMacro('CC_PHYSICS_CANNON', true);\n defineMacro('CC_EDITOR', defined('Editor') && defined('process') && ('electron' in process.versions));\n defineMacro('CC_PREVIEW', !CC_EDITOR);\n defineMacro('CC_TEST', defined('tap') || defined('QUnit'));\n defineMacro('CC_RUNTIME', 'function' === typeof loadRuntime);\n defineMacro('CC_JSB', defined('jsb') && !CC_RUNTIME);\n}\n\n// deprecated \nconst WECHATGAMESUB = !!(defined('wx') && wx.getSharedCanvas);\nconst WECHATGAME = !!(defined('wx') && (wx.getSystemInfoSync || wx.getSharedCanvas));\nconst QQPLAY = defined('bk');\ndefineDeprecatedMacroGetter('CC_WECHATGAMESUB', WECHATGAMESUB);\ndefineDeprecatedMacroGetter('CC_WECHATGAME', WECHATGAME);\ndefineDeprecatedMacroGetter('CC_QQPLAY', QQPLAY);\n\nif (CC_DEV) {\n /**\n * contains internal apis for unit tests\n * @expose\n */\n cc._Test = {};\n}\n\n/**\n * @module cc\n */\n\n/**\n * The current version of Cocos2d being used.<br/>\n * Please DO NOT remove this String, it is an important flag for bug tracking.<br/>\n * If you post a bug to forum, please attach this flag.\n * @property {String} ENGINE_VERSION\n */\nconst engineVersion = '2.4.9';\n_global['CocosEngine'] = cc.ENGINE_VERSION = engineVersion;\n"],"sourceRoot":"./"}