mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
@@ -44,8 +44,6 @@ var components = [
|
||||
require('./CCSlider'),
|
||||
require('./CCLayout'),
|
||||
require('./editbox/CCEditBox'),
|
||||
require('./CCVideoPlayer'),
|
||||
require('./CCWebView'),
|
||||
require('./CCLabelOutline'),
|
||||
require('./CCRichText'),
|
||||
require('./CCToggleContainer'),
|
||||
|
||||
@@ -25,8 +25,5 @@
|
||||
|
||||
require('./sprite/sprite-assembler');
|
||||
require('./mask-assembler');
|
||||
require('./particle-system-assembler');
|
||||
require('./motion-streak-assembler');
|
||||
require('./graphics/graphics-assembler');
|
||||
require('./label/label-assembler');
|
||||
require('./tmx-layer-assembler');
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2018 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated engine source code (the "Software"), a limited,
|
||||
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
|
||||
to use Cocos Creator solely to develop games on your target platforms. You shall
|
||||
not use Cocos Creator software for developing other software or tools that's
|
||||
used for developing games. You are not granted to publish, distribute,
|
||||
sublicense, and/or sell copies of Cocos Creator.
|
||||
|
||||
The software or tools in this License Agreement are licensed, not sold.
|
||||
Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
require('./CCMotionStreak');
|
||||
require('./motion-streak-assembler');
|
||||
+4
-4
@@ -23,10 +23,10 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
const js = require('../../platform/js');
|
||||
const assembler = require('./assembler');
|
||||
const MotionStreak = require('../../../motion-streak/CCMotionStreak');
|
||||
const renderEngine = require('../render-engine');
|
||||
const js = require('../core/platform/js');
|
||||
const assembler = require('../core/renderer/assemblers/assembler');
|
||||
const MotionStreak = require('./CCMotionStreak');
|
||||
const renderEngine = require('../core/renderer/render-engine');
|
||||
|
||||
function Point (point, dir) {
|
||||
this.point = point || cc.v2();
|
||||
@@ -0,0 +1,27 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2018 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated engine source code (the "Software"), a limited,
|
||||
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
|
||||
to use Cocos Creator solely to develop games on your target platforms. You shall
|
||||
not use Cocos Creator software for developing other software or tools that's
|
||||
used for developing games. You are not granted to publish, distribute,
|
||||
sublicense, and/or sell copies of Cocos Creator.
|
||||
|
||||
The software or tools in this License Agreement are licensed, not sold.
|
||||
Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
require('./CCParticleSystem');
|
||||
require('./particle-system-assembler');
|
||||
+4
-4
@@ -23,10 +23,10 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
const js = require('../../platform/js');
|
||||
const assembler = require('./assembler');
|
||||
const ParticleSystem = require('../../../particle/CCParticleSystem');
|
||||
const renderEngine = require('../render-engine');
|
||||
const js = require('../core/platform/js');
|
||||
const assembler = require('../core/renderer/assemblers/assembler');
|
||||
const ParticleSystem = require('./CCParticleSystem');
|
||||
const renderEngine = require('../core/renderer/render-engine');
|
||||
|
||||
var particleSystemAssembler = js.addon({
|
||||
useModel: true,
|
||||
@@ -0,0 +1,27 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2018 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos.com
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated engine source code (the "Software"), a limited,
|
||||
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
|
||||
to use Cocos Creator solely to develop games on your target platforms. You shall
|
||||
not use Cocos Creator software for developing other software or tools that's
|
||||
used for developing games. You are not granted to publish, distribute,
|
||||
sublicense, and/or sell copies of Cocos Creator.
|
||||
|
||||
The software or tools in this License Agreement are licensed, not sold.
|
||||
Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
require('./CCTiledMap');
|
||||
require('./tmx-layer-assembler');
|
||||
+5
-5
@@ -23,12 +23,12 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
const TiledLayer = require('../../../tilemap/CCTiledLayer');
|
||||
const TiledMap = require('../../../tilemap/CCTiledMap');
|
||||
const TiledLayer = require('./CCTiledLayer');
|
||||
const TiledMap = require('./CCTiledMap');
|
||||
|
||||
const js = require('../../platform/js');
|
||||
const assembler = require('./assembler');
|
||||
const renderEngine = require('../render-engine');
|
||||
const js = require('../core/platform/js');
|
||||
const assembler = require('../core/renderer/assemblers/assembler');
|
||||
const renderEngine = require('../core/renderer/render-engine');
|
||||
|
||||
const Orientation = TiledMap.Orientation;
|
||||
const TileFlag = TiledMap.TileFlag;
|
||||
@@ -19,7 +19,7 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
let VideoPlayerImpl = require('../videoplayer/video-player-impl');
|
||||
let VideoPlayerImpl = require('./video-player-impl');
|
||||
|
||||
/**
|
||||
* !#en Video event type
|
||||
+2
-2
@@ -19,8 +19,8 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
const Utils = require('../platform/utils');
|
||||
const sys = require('../platform/CCSys');
|
||||
var Utils = require('../core/platform/utils');
|
||||
var sys = require('../core/platform/CCSys');
|
||||
|
||||
let VideoPlayerImpl = cc.Class({
|
||||
name: 'VideoPlayerImpl',
|
||||
@@ -0,0 +1,263 @@
|
||||
/*global _ccsg */
|
||||
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
http://www.cocos.com
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated engine source code (the "Software"), a limited,
|
||||
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
|
||||
to use Cocos Creator solely to develop games on your target platforms. You shall
|
||||
not use Cocos Creator software for developing other software or tools that's
|
||||
used for developing games. You are not granted to publish, distribute,
|
||||
sublicense, and/or sell copies of Cocos Creator.
|
||||
The software or tools in this License Agreement are licensed, not sold.
|
||||
Chukong Aipu reserves all rights not expressly granted to you.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
var WebViewImpl = require('./webview-impl');
|
||||
|
||||
/**
|
||||
* !#en WebView event type
|
||||
* !#zh 网页视图事件类型
|
||||
* @enum WebView.EventType
|
||||
*/
|
||||
var EventType = WebViewImpl.EventType;
|
||||
|
||||
|
||||
/**
|
||||
* !#en Web page Load completed.
|
||||
* !#zh 网页加载完成
|
||||
* @property {String} LOADED
|
||||
*/
|
||||
|
||||
/**
|
||||
* !#en Web page is loading.
|
||||
* !#zh 网页加载中
|
||||
* @property {String} LOADING
|
||||
*/
|
||||
|
||||
/**
|
||||
* !#en Web page error occurs when loading.
|
||||
* !#zh 网页加载出错
|
||||
* @property {String} ERROR
|
||||
*/
|
||||
|
||||
//
|
||||
function emptyCallback () { }
|
||||
|
||||
/**
|
||||
* !#en cc.WebView is a component for display web pages in the game
|
||||
* !#zh WebView 组件,用于在游戏中显示网页
|
||||
* @class WebView
|
||||
* @extends Component
|
||||
*/
|
||||
var WebView = cc.Class({
|
||||
name: 'cc.WebView',
|
||||
extends: cc.Component,
|
||||
|
||||
editor: CC_EDITOR && {
|
||||
menu: 'i18n:MAIN_MENU.component.ui/WebView'
|
||||
},
|
||||
|
||||
properties: {
|
||||
_useOriginalSize: true,
|
||||
|
||||
_url: '',
|
||||
/**
|
||||
* !#en A given URL to be loaded by the WebView, it should have a http or https prefix.
|
||||
* !#zh 指定 WebView 加载的网址,它应该是一个 http 或者 https 开头的字符串
|
||||
* @property {String} url
|
||||
*/
|
||||
url: {
|
||||
type: String,
|
||||
tooltip: CC_DEV && 'i18n:COMPONENT.webview.url',
|
||||
get: function () {
|
||||
return this._url;
|
||||
},
|
||||
set: function (url) {
|
||||
this._url = url;
|
||||
var impl = this._impl;
|
||||
if (impl) {
|
||||
impl.loadURL(url);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* !#en The webview's event callback , it will be triggered when certain webview event occurs.
|
||||
* !#zh WebView 的回调事件,当网页加载过程中,加载完成后或者加载出错时都会回调此函数
|
||||
* @property {Component.EventHandler[]} webviewLoadedEvents
|
||||
*/
|
||||
webviewEvents: {
|
||||
default: [],
|
||||
type: cc.Component.EventHandler,
|
||||
},
|
||||
},
|
||||
|
||||
statics: {
|
||||
EventType: EventType,
|
||||
},
|
||||
|
||||
ctor () {
|
||||
this._impl = new WebViewImpl();
|
||||
},
|
||||
|
||||
onEnable () {
|
||||
if (!CC_EDITOR) {
|
||||
var impl = this._impl;
|
||||
this._impl.createDomElementIfNeeded(this.node.width, this.node.height);
|
||||
this._impl.loadURL(this._url);
|
||||
this._impl.setVisible(true);
|
||||
impl.setEventListener(EventType.LOADED, this._onWebViewLoaded.bind(this));
|
||||
impl.setEventListener(EventType.LOADING, this._onWebViewLoading.bind(this));
|
||||
impl.setEventListener(EventType.ERROR, this._onWebViewLoadError.bind(this));
|
||||
}
|
||||
},
|
||||
|
||||
onDisable () {
|
||||
if (!CC_EDITOR) {
|
||||
var impl = this._impl;
|
||||
this._impl.setVisible(false);
|
||||
impl.setEventListener(EventType.LOADED, emptyCallback);
|
||||
impl.setEventListener(EventType.LOADING, emptyCallback);
|
||||
impl.setEventListener(EventType.ERROR, emptyCallback);
|
||||
}
|
||||
},
|
||||
|
||||
onDestroy () {
|
||||
if (this._impl) {
|
||||
this._impl.destroy();
|
||||
this._impl = null;
|
||||
}
|
||||
},
|
||||
|
||||
update (dt) {
|
||||
if (this._impl) {
|
||||
this._impl.updateMatrix(this.node);
|
||||
}
|
||||
},
|
||||
|
||||
_onWebViewLoaded () {
|
||||
cc.Component.EventHandler.emitEvents(this.webviewEvents, this, EventType.LOADED);
|
||||
this.node.emit('loaded', this);
|
||||
},
|
||||
|
||||
_onWebViewLoading () {
|
||||
cc.Component.EventHandler.emitEvents(this.webviewEvents, this, EventType.LOADING);
|
||||
this.node.emit('loading', this);
|
||||
return true;
|
||||
},
|
||||
|
||||
_onWebViewLoadError () {
|
||||
cc.Component.EventHandler.emitEvents(this.webviewEvents, this, EventType.ERROR);
|
||||
this.node.emit('error', this);
|
||||
},
|
||||
|
||||
/**
|
||||
* !#en
|
||||
* Set javascript interface scheme (see also setOnJSCallback). <br/>
|
||||
* Note: Supports only on the Android and iOS. For HTML5, please refer to the official documentation.<br/>
|
||||
* Please refer to the official documentation for more details.
|
||||
* !#zh
|
||||
* 设置 JavaScript 接口方案(与 'setOnJSCallback' 配套使用)。<br/>
|
||||
* 注意:只支持 Android 和 iOS ,Web 端用法请前往官方文档查看。<br/>
|
||||
* 详情请参阅官方文档
|
||||
* @method setJavascriptInterfaceScheme
|
||||
* @param {String} scheme
|
||||
*/
|
||||
setJavascriptInterfaceScheme (scheme) {
|
||||
if (this._impl) {
|
||||
this._impl.setJavascriptInterfaceScheme(scheme);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* !#en
|
||||
* This callback called when load URL that start with javascript
|
||||
* interface scheme (see also setJavascriptInterfaceScheme). <br/>
|
||||
* Note: Supports only on the Android and iOS. For HTML5, please refer to the official documentation.<br/>
|
||||
* Please refer to the official documentation for more details.
|
||||
* !#zh
|
||||
* 当加载 URL 以 JavaScript 接口方案开始时调用这个回调函数。<br/>
|
||||
* 注意:只支持 Android 和 iOS,Web 端用法请前往官方文档查看。
|
||||
* 详情请参阅官方文档
|
||||
* @method setOnJSCallback
|
||||
* @param {Function} callback
|
||||
*/
|
||||
setOnJSCallback (callback) {
|
||||
if (this._impl) {
|
||||
this._impl.setOnJSCallback(callback);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* !#en
|
||||
* Evaluates JavaScript in the context of the currently displayed page. <br/>
|
||||
* Please refer to the official document for more details <br/>
|
||||
* Note: Cross domain issues need to be resolved by yourself <br/>
|
||||
* !#zh
|
||||
* 执行 WebView 内部页面脚本(详情请参阅官方文档) <br/>
|
||||
* 注意:需要自行解决跨域问题
|
||||
* @method evaluateJS
|
||||
* @param {String} str
|
||||
*/
|
||||
evaluateJS (str) {
|
||||
if (this._impl) {
|
||||
this._impl.evaluateJS(str);
|
||||
}
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
cc.WebView = module.exports = WebView;
|
||||
/**
|
||||
* !#en
|
||||
* Note: This event is emitted from the node to which the component belongs.
|
||||
* !#zh
|
||||
* 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。
|
||||
* @event loaded
|
||||
* @param {Event.EventCustom} event
|
||||
* @param {WebView} event.detail - The WebView component.
|
||||
*/
|
||||
|
||||
/**
|
||||
* !#en
|
||||
* Note: This event is emitted from the node to which the component belongs.
|
||||
* !#zh
|
||||
* 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。
|
||||
* @event loading
|
||||
* @param {Event.EventCustom} event
|
||||
* @param {WebView} event.detail - The WebView component.
|
||||
*/
|
||||
|
||||
/**
|
||||
* !#en
|
||||
* Note: This event is emitted from the node to which the component belongs.
|
||||
* !#zh
|
||||
* 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。
|
||||
* @event error
|
||||
* @param {Event.EventCustom} event
|
||||
* @param {WebView} event.detail - The WebView component.
|
||||
*/
|
||||
|
||||
/**
|
||||
* !#en if you don't need the WebView and it isn't in any running Scene, you should
|
||||
* call the destroy method on this component or the associated node explicitly.
|
||||
* Otherwise, the created DOM element won't be removed from web page.
|
||||
* !#zh
|
||||
* 如果你不再使用 WebView,并且组件未添加到场景中,那么你必须手动对组件或所在节点调用 destroy。
|
||||
* 这样才能移除网页上的 DOM 节点,避免 Web 平台内存泄露。
|
||||
* @example
|
||||
* webview.node.parent = null; // or webview.node.removeFromParent(false);
|
||||
* // when you don't need webview anymore
|
||||
* webview.node.destroy();
|
||||
* @method destroy
|
||||
* @return {Boolean} whether it is the first time the destroy being called
|
||||
*/
|
||||
@@ -18,9 +18,10 @@
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
var Utils = require('../platform/utils');
|
||||
var eventManager = require('../event-manager');
|
||||
var sys = require('../platform/CCSys');
|
||||
|
||||
var Utils = require('../core/platform/');
|
||||
var eventManager = require('../core/event-manager');
|
||||
var sys = require('../core/platform/CCSys');
|
||||
|
||||
var WebViewImpl = cc.Class({
|
||||
name: "WebViewImpl",
|
||||
+5
-4
@@ -31,14 +31,15 @@ if (CC_EDITOR && Editor.isMainProcess) {
|
||||
require('./cocos2d/tilemap/CCTiledMapAsset');
|
||||
}
|
||||
else {
|
||||
require('./cocos2d/particle/CCParticleSystem');
|
||||
require('./cocos2d/tilemap/CCTiledMap');
|
||||
require('./cocos2d/motion-streak/CCMotionStreak');
|
||||
require('./cocos2d/particle');
|
||||
require('./cocos2d/tilemap');
|
||||
require('./cocos2d/videoplayer/CCVideoPlayer');
|
||||
require('./cocos2d/webview/CCWebView');
|
||||
require('./cocos2d/motion-streak');
|
||||
require('./cocos2d/core/components/CCStudioComponent');
|
||||
require('./extensions/ccpool/CCNodePool');
|
||||
if (!CC_JSB) {
|
||||
require('./cocos2d/actions');
|
||||
require('./external/chipmunk/chipmunk');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -134,9 +134,7 @@ if (!CC_EDITOR || !Editor.isMainProcess) {
|
||||
require('./DragonBonesAtlasAsset');
|
||||
require('./ArmatureDisplay')
|
||||
|
||||
if (!CC_JSB) {
|
||||
require('./dragonblones-assembler');
|
||||
}
|
||||
require('./dragonbones-assembler');
|
||||
} else {
|
||||
require('./DragonBonesAsset');
|
||||
require('./DragonBonesAtlasAsset');
|
||||
|
||||
@@ -105,7 +105,7 @@ if (!CC_EDITOR || !Editor.isMainProcess) {
|
||||
require('./skeleton-texture');
|
||||
require('./skeleton-data');
|
||||
require('./skeleton');
|
||||
require('../../cocos2d/core/renderer/assemblers/spine-assembler');
|
||||
require('./spine-assembler');
|
||||
}
|
||||
else {
|
||||
require('./skeleton-data');
|
||||
|
||||
+6
-6
@@ -23,12 +23,12 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
const js = require('../../platform/js');
|
||||
const assembler = require('./assembler');
|
||||
const Skeleton = require('../../../../extensions/spine/skeleton');
|
||||
const spine = require('../../../../extensions/spine/lib/spine');
|
||||
const renderer = require('../');
|
||||
const renderEngine = require('../render-engine');
|
||||
const js = require('../../cocos2d/core/platform/js');
|
||||
const assembler = require('../../cocos2d/core/renderer/assemblers/assembler');
|
||||
const Skeleton = require('./skeleton');
|
||||
const spine = require('./lib/spine');
|
||||
const renderer = require('../../cocos2d/core/renderer');
|
||||
const renderEngine = renderer.renderEngine;
|
||||
const gfx = renderEngine.gfx;
|
||||
const SpriteMaterial = renderEngine.SpriteMaterial;
|
||||
|
||||
Vendored
-6182
File diff suppressed because it is too large
Load Diff
@@ -43,20 +43,11 @@ var jsbSkipModules = [
|
||||
// '../../cocos2d/core/textures/CCTexture2D',
|
||||
// '../../cocos2d/core/sprites/CCSpriteFrame',
|
||||
'../../cocos2d/core/load-pipeline/audio-downloader',
|
||||
'../../cocos2d/core/physics/platform/CCPhysicsDebugDraw.js',
|
||||
'../../cocos2d/core/physics/platform/CCPhysicsUtils.js',
|
||||
'../../cocos2d/core/physics/platform/CCPhysicsContactListner.js',
|
||||
'../../cocos2d/core/physics/platform/CCPhysicsAABBQueryCallback.js',
|
||||
'../../cocos2d/core/physics/platform/CCPhysicsRayCastCallback.js',
|
||||
'../../cocos2d/core/platform/CCInputManager.js',
|
||||
'../../cocos2d/core/platform/CCVisibleRect.js',
|
||||
'../../cocos2d/core/graphics/helper.js',
|
||||
'../../cocos2d/actions/index.js',
|
||||
'../../cocos2d/audio/CCAudio',
|
||||
'../../extensions/spine/lib/spine',
|
||||
'../../extensions/dragonbones/lib/dragonBones',
|
||||
'../../external/box2d/box2d.js',
|
||||
'../../external/chipmunk/chipmunk.js',
|
||||
];
|
||||
|
||||
exports.buildCocosJs = function (sourceFile, outputFile, excludes, opt_macroFlags, callback) {
|
||||
|
||||
@@ -146,9 +146,6 @@ defineMacro('CC_SUPPORT_JIT', !CC_WECHATGAME);
|
||||
*/
|
||||
_global.cc = {};
|
||||
|
||||
// The namespace for original nodes rendering in scene graph.
|
||||
_global._ccsg = {};
|
||||
|
||||
if (CC_DEV) {
|
||||
/**
|
||||
* contains internal apis for unit tests
|
||||
@@ -170,9 +167,6 @@ if (!(CC_EDITOR && Editor.isMainProcess)) {
|
||||
|
||||
require('./cocos2d/core/predefine');
|
||||
|
||||
_global.ccs = {};
|
||||
_global.cp = {};
|
||||
|
||||
// LOAD COCOS2D ENGINE CODE
|
||||
|
||||
if (!(CC_EDITOR && Editor.isMainProcess)) {
|
||||
@@ -190,4 +184,4 @@ if (CC_EDITOR) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = cc;
|
||||
module.exports = cc;
|
||||
+12
-23
@@ -15,7 +15,8 @@
|
||||
"name": "Sprite",
|
||||
"locked": true,
|
||||
"entries": [
|
||||
"./cocos2d/core/components/CCSprite.js"
|
||||
"./cocos2d/core/components/CCSprite.js",
|
||||
"./cocos2d/core/renderer/assemblers/sprite/sprite-assembler.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -27,13 +28,15 @@
|
||||
{
|
||||
"name": "Label",
|
||||
"entries": [
|
||||
"./cocos2d/core/components/CCLabel.js"
|
||||
"./cocos2d/core/components/CCLabel.js",
|
||||
"./cocos2d/core/renderer/assemblers/label/label-assembler.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mask",
|
||||
"entries": [
|
||||
"./cocos2d/core/components/CCMask.js"
|
||||
"./cocos2d/core/components/CCMask.js",
|
||||
"./cocos2d/core/renderer/assemblers/mask-assembler.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -45,14 +48,14 @@
|
||||
{
|
||||
"name": "ParticleSystem",
|
||||
"entries": [
|
||||
"./cocos2d/particle/CCParticleSystem.js",
|
||||
"./cocos2d/particle/index.js",
|
||||
"./cocos2d/particle/CCParticleAsset.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "TiledMap",
|
||||
"entries": [
|
||||
"./cocos2d/tilemap/CCTiledMap.js",
|
||||
"./cocos2d/tilemap/index.js",
|
||||
"./cocos2d/tilemap/CCTiledMapAsset.js"
|
||||
]
|
||||
},
|
||||
@@ -126,7 +129,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "EditorBox",
|
||||
"name": "EditBox",
|
||||
"entries": [
|
||||
"./cocos2d/core/components/CCEditBox.js",
|
||||
"./jsb/jsb-editbox.js"
|
||||
@@ -135,14 +138,14 @@
|
||||
{
|
||||
"name": "VideoPlayer",
|
||||
"entries": [
|
||||
"./cocos2d/core/components/CCVideoPlayer.js",
|
||||
"./cocos2d/videoplayer/CCVideoPlayer.js",
|
||||
"./jsb/jsb-videoplayer.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "WebView",
|
||||
"entries": [
|
||||
"./cocos2d/core/components/CCWebView.js",
|
||||
"./cocos2d/webview/CCWebView.js",
|
||||
"./jsb/jsb-webview.js"
|
||||
]
|
||||
},
|
||||
@@ -169,7 +172,7 @@
|
||||
{
|
||||
"name": "MotionStreak",
|
||||
"entries": [
|
||||
"./cocos2d/motion-streak/CCMotionStreak.js"
|
||||
"./cocos2d/motion-streak/index.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -217,20 +220,6 @@
|
||||
"./cocos2d/core/components/CCStudioComponent.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "RenderTexture",
|
||||
"entries": [
|
||||
"./cocos2d/render-texture/CCRenderTexture.js",
|
||||
"./cocos2d/render-texture/CCRenderTextureCanvasRenderCmd.js",
|
||||
"./cocos2d/render-texture/CCRenderTextureWebGLRenderCmd.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Chipmunk",
|
||||
"entries": [
|
||||
"./external/chipmunk/chipmunk.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Camera",
|
||||
"entries": [
|
||||
|
||||
Reference in New Issue
Block a user