diff --git a/CHANGELOG b/CHANGELOG index fee44d0878..7fb3782b9c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,35 @@ cocos2d-x-3.8 ?? [FIX] renderer: UI component can't click correctly by moving UI and camera far away of origin. [FIX] JS: Fixed issue of iOS/JS reflection `callStaticMethod` with bool arg +cocos2d-x-3.7rc1 July.14 2015 + [REFINE] framework: Used msbuild to generating engine prebuilt libs on win32. + [REFINE] 3d: Used shader with normal while creating mesh with normals + [REFINE] 3d: Set default 3d animation quality to low + [REFINE] web: Improved localStorage warning when disabled + + [FIX] studio: Fixed percentage setting won't take effect when UISlider's background resource set to null + [FIX] studio: Fixed a bug that SingleNode's color isn't set + [FIX] studio: Fixed child nodes can't be rendered when particle and TiledMap as parent and their resource have been removed from disk + [FIX] studio: Fixed a bug of JSON parser that texture address is wrong + [FIX] studio: Fixed a bug that drawLine & drawPoints don't apply blend function in parser + [FIX] studio: Fixed a bug that check box front cross texture will expand to normal size when change status between normal and disable frequently + [FIX] studio: Fixed a bug that normal texture won't show when slider set to disable mode then clean slider ball disable texture + [FIX] 3d: Fixed obj loading failed on windows + [FIX] 3d: Fixed clipping node does not work for Sprite3D + [FIX] platform: Fixed js template run error on linux + [FIX] Tilemap: Fixed CCTMXXMLParser code negligence + [FIX] JS: Fixed constant value error for ccui.Layout.BACKGROUND_IMAGE_ZORDER + [FIX] JS: Fixed XMLHttpRequest can't be retain in JSB + [FIX] JS: Added cc.path.mainFileName + [FIX] JS: Fixed issue that override cleanup function in JS can't get invoked during node detaching + [FIX] JS: Fixed cc.loader notification issue with image asynchonous loading + [FIX] web: Fixed MenuItems' color/opacity setter issue with child nodes + [FIX] web: Fixed page view's layout issue for JSON parser + [FIX] web: Add ttc loader and prevent the pure digital fonts is invalid + [FIX] web: Fixed Float32Array initialization + [FIX] web: Fixed a bug that layout background is missing + [FIX] web: Fixed a bug that ObjectExtensionData miss setCustomProperty and getCustomProperty function + cocos2d-x-3.7rc0 July.1 2015 [HIGHLIGHT] core: Added Material system (JS/Lua ready) [HIGHLIGHT] 3d: Added Physics3d support (JS/Lua ready) diff --git a/cocos/cocos2d.cpp b/cocos/cocos2d.cpp index 70620fcb79..6025f37084 100644 --- a/cocos/cocos2d.cpp +++ b/cocos/cocos2d.cpp @@ -31,7 +31,7 @@ NS_CC_BEGIN CC_DLL const char* cocos2dVersion() { - return "cocos2d-x-3.7rc0"; + return "cocos2d-x-3.7rc1"; } NS_CC_END diff --git a/cocos/scripting/js-bindings/manual/ScriptingCore.cpp b/cocos/scripting/js-bindings/manual/ScriptingCore.cpp index 6125f8551d..5b9c7a4ac7 100644 --- a/cocos/scripting/js-bindings/manual/ScriptingCore.cpp +++ b/cocos/scripting/js-bindings/manual/ScriptingCore.cpp @@ -1034,6 +1034,11 @@ int ScriptingCore::handleNodeEvent(void* data) } else if (action == kNodeOnCleanup) { cleanupSchedulesAndActions(p); + + if (isFunctionOverridedInJS(JS::RootedObject(_cx, p->obj.get()), "cleanup", js_cocos2dx_Node_cleanup)) + { + ret = executeFunctionWithOwner(OBJECT_TO_JSVAL(p->obj), "cleanup", 1, &dataVal, &retval); + } } return ret; diff --git a/cocos/scripting/js-bindings/manual/ScriptingCore.h b/cocos/scripting/js-bindings/manual/ScriptingCore.h index 5a3ddacdd9..bbd324032e 100644 --- a/cocos/scripting/js-bindings/manual/ScriptingCore.h +++ b/cocos/scripting/js-bindings/manual/ScriptingCore.h @@ -39,7 +39,7 @@ #include #include -#define ENGINE_VERSION "Cocos2d-JS v3.7 RC0" +#define ENGINE_VERSION "Cocos2d-JS v3.7 RC1" void js_log(const char *format, ...); diff --git a/cocos/scripting/js-bindings/script/jsb_boot.js b/cocos/scripting/js-bindings/script/jsb_boot.js index 09b4123a9c..86a202c114 100644 --- a/cocos/scripting/js-bindings/script/jsb_boot.js +++ b/cocos/scripting/js-bindings/script/jsb_boot.js @@ -367,6 +367,20 @@ cc.path = { if(index < 0) return null; return pathStr.substring(index, pathStr.length); }, + + /** + * Get the main name of a file name + * @param {string} fileName + * @returns {string} + */ + mainFileName: function(fileName){ + if(fileName){ + var idx = fileName.lastIndexOf("."); + if(idx !== -1) + return fileName.substring(0,idx); + } + return fileName; + }, /** * Get the file name of a file path. @@ -625,15 +639,18 @@ cc.loader = { } var basePath = loader.getBasePath ? loader.getBasePath() : self.resPath; var realUrl = self.getUrl(basePath, url); - var data = loader.load(realUrl, url); - if (data) { - self.cache[url] = data; - cb(null, data); - } else { - self.cache[url] = null; - delete self.cache[url]; - cb(); - } + + loader.load(realUrl, url, item, function (err, data) { + if (err) { + cc.log(err); + self.cache[url] = null; + delete self.cache[url]; + cb(); + } else { + self.cache[url] = data; + cb(null, data); + } + }); }, /** @@ -776,13 +793,18 @@ cc.loader = { * Release the cache of resource by url. * @param url */ - release : function(url){//do nothing in jsb + release : function(url){ + var cache = this.cache; + delete cache[url]; }, /** * Resource cache of all resources. */ - releaseAll : function(){//do nothing in jsb + releaseAll : function(){ + var locCache = this.cache; + for (var key in locCache) + delete locCache[key]; } }; diff --git a/cocos/scripting/js-bindings/script/jsb_cocos2d.js b/cocos/scripting/js-bindings/script/jsb_cocos2d.js index 9d4e2aa266..3cd454e0fb 100644 --- a/cocos/scripting/js-bindings/script/jsb_cocos2d.js +++ b/cocos/scripting/js-bindings/script/jsb_cocos2d.js @@ -26,7 +26,7 @@ // CCConfig.js // -cc.ENGINE_VERSION = "Cocos2d-JS v3.7 RC0"; +cc.ENGINE_VERSION = "Cocos2d-JS v3.7 RC1"; cc.FIX_ARTIFACTS_BY_STRECHING_TEXEL = 0; cc.DIRECTOR_STATS_POSITION = {x: 0, y: 0}; diff --git a/cocos/scripting/js-bindings/script/jsb_loaders.js b/cocos/scripting/js-bindings/script/jsb_loaders.js index 9ef7ec5900..1259e1a6c6 100644 --- a/cocos/scripting/js-bindings/script/jsb_loaders.js +++ b/cocos/scripting/js-bindings/script/jsb_loaders.js @@ -27,7 +27,8 @@ // cc._emptyLoader = { - load : function(realUrl, url){ + load : function(realUrl, url, res, cb){ + cb && cb(null, null); return null; } }; @@ -39,21 +40,25 @@ cc.loader.register([ cc._emptyLoader); cc._txtLoader = { - load : function(realUrl, url){ - return jsb.fileUtils.getStringFromFile(realUrl); + load : function(realUrl, url, res, cb){ + var result = jsb.fileUtils.getStringFromFile(realUrl); + cb && cb(null, result); + return result; } }; cc.loader.register(["txt", "xml", "vsh", "fsh", "tmx", "tsx"], cc._txtLoader); cc._jsonLoader = { - load : function(realUrl, url){ - var data = jsb.fileUtils.getStringFromFile(realUrl); + load : function(realUrl, url, res, cb){ + var data = jsb.fileUtils.getStringFromFile(realUrl), result; try{ - return JSON.parse(data); + result = JSON.parse(data); }catch(e){ cc.error(e); - return null; + result = null; } + cb && cb(null, result); + return result; } }; cc.loader.register(["json", "ExportJson"], cc._jsonLoader); @@ -73,16 +78,20 @@ cc._imgLoader = { cc.loader.register(["png", "jpg", "bmp","jpeg","gif"], cc._imgLoader); cc._plistLoader = { - load : function(realUrl, url){ + load : function(realUrl, url, res, cb){ var content = jsb.fileUtils.getStringFromFile(realUrl); - return cc.plistParser.parse(content); + var result = cc.plistParser.parse(content); + cb && cb(null, result); + return result; } }; cc.loader.register(["plist"], cc._plistLoader); cc._binaryLoader = { - load : function(realUrl, url){ - return cc.loader.loadBinarySync(realUrl); + load : function(realUrl, url, res, cb){ + var result = cc.loader.loadBinarySync(realUrl); + cb && cb(null, result); + return result; } }; cc.loader.register(["ccbi"], cc._binaryLoader); @@ -166,9 +175,12 @@ cc._fntLoader = { return fnt; }, - load : function(realUrl, url){ - var data = jsb.fileUtils.getStringFromFile(realUrl); - return this.parseFnt(data, url); + load : function(realUrl, url, res, cb){ + var data = jsb.fileUtils.getStringFromFile(realUrl), result = null; + if (data) + result = this.parseFnt(data, url); + cb && cb(null, result); + return result; } }; cc.loader.register(["fnt"], cc._fntLoader); diff --git a/cocos/scripting/js-bindings/script/studio/parsers/timelineParser-2.x.js b/cocos/scripting/js-bindings/script/studio/parsers/timelineParser-2.x.js index eb3f478280..c0e4f7ecfa 100644 --- a/cocos/scripting/js-bindings/script/studio/parsers/timelineParser-2.x.js +++ b/cocos/scripting/js-bindings/script/studio/parsers/timelineParser-2.x.js @@ -220,8 +220,6 @@ var node, self = this; loadTexture(json["FileData"], resourcePath, function(path, type){ - if(!cc.loader.getRes(path)) - cc.log("%s need to be preloaded", path); node = new cc.ParticleSystem(path); self.generalAttributes(node, json); node.setPositionType(cc.ParticleSystem.TYPE_GROUPED); @@ -859,8 +857,6 @@ ]; textureList.forEach(function(item){ loadTexture(json[item.name], resourcePath, function(path, type){ - if(type === 0 && !loader.getRes(path)) - cc.log("%s need to be preloaded", path); item.handle.call(widget, path, type); }); }); @@ -1025,8 +1021,6 @@ var startCharMap = json["StartChar"]; loadTexture(json["LabelAtlasFileImage_CNB"], resourcePath, function(path, type){ - if(!cc.loader.getRes(path)) - cc.log("%s need to be preloaded", path); if(type === 0){ widget.setProperty(stringValue, path, itemWidth, itemHeight, startCharMap); } @@ -1051,8 +1045,6 @@ widget.setString(text); loadTexture(json["LabelBMFontFile_CNB"], resourcePath, function(path, type){ - if(!cc.loader.getRes(path)) - cc.log("%s need to be pre loaded", path); widget.setFntFile(path); }); widget.ignoreContentAdaptWithSize(true); diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index cedb71ff1a..13c40af93e 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -6453,367 +6453,7 @@ "tools/tojs/cocos2dx_spine.ini", "tools/tojs/cocos2dx_studio.ini", "tools/tojs/cocos2dx_ui.ini", - "tools/tojs/genbindings.py", - "web/AUTHORS.txt", - "web/Base64Images.js", - "web/CCBoot.js", - "web/CCDebugger.js", - "web/CHANGELOG.txt", - "web/README.mdown", - "web/bower.json", - "web/cocos2d/actions/CCAction.js", - "web/cocos2d/actions/CCActionCamera.js", - "web/cocos2d/actions/CCActionCatmullRom.js", - "web/cocos2d/actions/CCActionEase.js", - "web/cocos2d/actions/CCActionInstant.js", - "web/cocos2d/actions/CCActionInterval.js", - "web/cocos2d/actions/CCActionTween.js", - "web/cocos2d/actions3d/CCActionGrid.js", - "web/cocos2d/actions3d/CCActionGrid3D.js", - "web/cocos2d/actions3d/CCActionPageTurn3D.js", - "web/cocos2d/actions3d/CCActionTiledGrid.js", - "web/cocos2d/audio/CCAudio.js", - "web/cocos2d/clipping-nodes/CCClippingNode.js", - "web/cocos2d/clipping-nodes/CCClippingNodeCanvasRenderCmd.js", - "web/cocos2d/clipping-nodes/CCClippingNodeWebGLRenderCmd.js", - "web/cocos2d/compression/ZipUtils.js", - "web/cocos2d/compression/base64.js", - "web/cocos2d/compression/gzip.js", - "web/cocos2d/compression/zlib.min.js", - "web/cocos2d/core/CCActionManager.js", - "web/cocos2d/core/CCCamera.js", - "web/cocos2d/core/CCConfiguration.js", - "web/cocos2d/core/CCDirector.js", - "web/cocos2d/core/CCDirectorWebGL.js", - "web/cocos2d/core/CCDrawingPrimitivesCanvas.js", - "web/cocos2d/core/CCDrawingPrimitivesWebGL.js", - "web/cocos2d/core/CCScheduler.js", - "web/cocos2d/core/base-nodes/BaseNodesPropertyDefine.js", - "web/cocos2d/core/base-nodes/CCAtlasNode.js", - "web/cocos2d/core/base-nodes/CCAtlasNodeCanvasRenderCmd.js", - "web/cocos2d/core/base-nodes/CCAtlasNodeWebGLRenderCmd.js", - "web/cocos2d/core/base-nodes/CCNode.js", - "web/cocos2d/core/base-nodes/CCNodeCanvasRenderCmd.js", - "web/cocos2d/core/base-nodes/CCNodeWebGLRenderCmd.js", - "web/cocos2d/core/cocoa/CCAffineTransform.js", - "web/cocos2d/core/cocoa/CCGeometry.js", - "web/cocos2d/core/cocos2d_externs.js", - "web/cocos2d/core/event-manager/CCEvent.js", - "web/cocos2d/core/event-manager/CCEventExtension.js", - "web/cocos2d/core/event-manager/CCEventListener.js", - "web/cocos2d/core/event-manager/CCEventManager.js", - "web/cocos2d/core/event-manager/CCTouch.js", - "web/cocos2d/core/labelttf/CCLabelTTF.js", - "web/cocos2d/core/labelttf/CCLabelTTFCanvasRenderCmd.js", - "web/cocos2d/core/labelttf/CCLabelTTFWebGLRenderCmd.js", - "web/cocos2d/core/labelttf/LabelTTFPropertyDefine.js", - "web/cocos2d/core/layers/CCLayer.js", - "web/cocos2d/core/layers/CCLayerCanvasRenderCmd.js", - "web/cocos2d/core/layers/CCLayerWebGLRenderCmd.js", - "web/cocos2d/core/platform/CCClass.js", - "web/cocos2d/core/platform/CCCommon.js", - "web/cocos2d/core/platform/CCConfig.js", - "web/cocos2d/core/platform/CCEGLView.js", - "web/cocos2d/core/platform/CCInputExtension.js", - "web/cocos2d/core/platform/CCInputManager.js", - "web/cocos2d/core/platform/CCLoaders.js", - "web/cocos2d/core/platform/CCMacro.js", - "web/cocos2d/core/platform/CCSAXParser.js", - "web/cocos2d/core/platform/CCScreen.js", - "web/cocos2d/core/platform/CCTypes.js", - "web/cocos2d/core/platform/CCTypesPropertyDefine.js", - "web/cocos2d/core/platform/CCTypesWebGL.js", - "web/cocos2d/core/platform/CCVisibleRect.js", - "web/cocos2d/core/platform/miniFramework.js", - "web/cocos2d/core/renderer/RendererCanvas.js", - "web/cocos2d/core/renderer/RendererWebGL.js", - "web/cocos2d/core/scenes/CCLoaderScene.js", - "web/cocos2d/core/scenes/CCScene.js", - "web/cocos2d/core/sprites/CCAnimation.js", - "web/cocos2d/core/sprites/CCAnimationCache.js", - "web/cocos2d/core/sprites/CCBakeSprite.js", - "web/cocos2d/core/sprites/CCSprite.js", - "web/cocos2d/core/sprites/CCSpriteBatchNode.js", - "web/cocos2d/core/sprites/CCSpriteBatchNodeCanvasRenderCmd.js", - "web/cocos2d/core/sprites/CCSpriteBatchNodeWebGLRenderCmd.js", - "web/cocos2d/core/sprites/CCSpriteCanvasRenderCmd.js", - "web/cocos2d/core/sprites/CCSpriteFrame.js", - "web/cocos2d/core/sprites/CCSpriteFrameCache.js", - "web/cocos2d/core/sprites/CCSpriteWebGLRenderCmd.js", - "web/cocos2d/core/sprites/SpritesPropertyDefine.js", - "web/cocos2d/core/support/CCPointExtension.js", - "web/cocos2d/core/support/CCVertex.js", - "web/cocos2d/core/support/TransformUtils.js", - "web/cocos2d/core/textures/CCTexture2D.js", - "web/cocos2d/core/textures/CCTextureAtlas.js", - "web/cocos2d/core/textures/CCTextureCache.js", - "web/cocos2d/core/textures/TexturesPropertyDefine.js", - "web/cocos2d/core/textures/TexturesWebGL.js", - "web/cocos2d/core/utils/BinaryLoader.js", - "web/cocos2d/effects/CCGrabber.js", - "web/cocos2d/effects/CCGrid.js", - "web/cocos2d/kazmath/SIMDPolyfill.js", - "web/cocos2d/kazmath/aabb.js", - "web/cocos2d/kazmath/gl/mat4stack.js", - "web/cocos2d/kazmath/gl/matrix.js", - "web/cocos2d/kazmath/mat3.js", - "web/cocos2d/kazmath/mat4.js", - "web/cocos2d/kazmath/mat4SIMD.js", - "web/cocos2d/kazmath/plane.js", - "web/cocos2d/kazmath/quaternion.js", - "web/cocos2d/kazmath/ray2.js", - "web/cocos2d/kazmath/simd_benchmark/base.js", - "web/cocos2d/kazmath/simd_benchmark/index.html", - "web/cocos2d/kazmath/simd_benchmark/kernel-template.js", - "web/cocos2d/kazmath/simd_benchmark/kmMat4AreEqual.js", - "web/cocos2d/kazmath/simd_benchmark/kmMat4Assign.js", - "web/cocos2d/kazmath/simd_benchmark/kmMat4Inverse.js", - "web/cocos2d/kazmath/simd_benchmark/kmMat4IsIdentity.js", - "web/cocos2d/kazmath/simd_benchmark/kmMat4LookAt.js", - "web/cocos2d/kazmath/simd_benchmark/kmMat4Multiply.js", - "web/cocos2d/kazmath/simd_benchmark/kmMat4Transpose.js", - "web/cocos2d/kazmath/simd_benchmark/kmVec3TransformCoord.js", - "web/cocos2d/kazmath/simd_benchmark/run.js", - "web/cocos2d/kazmath/simd_benchmark/run_browser.js", - "web/cocos2d/kazmath/utility.js", - "web/cocos2d/kazmath/vec2.js", - "web/cocos2d/kazmath/vec3.js", - "web/cocos2d/kazmath/vec3SIMD.js", - "web/cocos2d/kazmath/vec4.js", - "web/cocos2d/labels/CCLabelAtlas.js", - "web/cocos2d/labels/CCLabelAtlasCanvasRenderCmd.js", - "web/cocos2d/labels/CCLabelAtlasWebGLRenderCmd.js", - "web/cocos2d/labels/CCLabelBMFont.js", - "web/cocos2d/labels/CCLabelBMFontCanvasRenderCmd.js", - "web/cocos2d/labels/CCLabelBMFontWebGLRenderCmd.js", - "web/cocos2d/menus/CCMenu.js", - "web/cocos2d/menus/CCMenuItem.js", - "web/cocos2d/motion-streak/CCMotionStreak.js", - "web/cocos2d/motion-streak/CCMotionStreakWebGLRenderCmd.js", - "web/cocos2d/node-grid/CCNodeGrid.js", - "web/cocos2d/node-grid/CCNodeGridWebGLRenderCmd.js", - "web/cocos2d/parallax/CCParallaxNode.js", - "web/cocos2d/parallax/CCParallaxNodeRenderCmd.js", - "web/cocos2d/particle/CCPNGReader.js", - "web/cocos2d/particle/CCParticleBatchNode.js", - "web/cocos2d/particle/CCParticleBatchNodeCanvasRenderCmd.js", - "web/cocos2d/particle/CCParticleBatchNodeWebGLRenderCmd.js", - "web/cocos2d/particle/CCParticleExamples.js", - "web/cocos2d/particle/CCParticleSystem.js", - "web/cocos2d/particle/CCParticleSystemCanvasRenderCmd.js", - "web/cocos2d/particle/CCParticleSystemWebGLRenderCmd.js", - "web/cocos2d/particle/CCTIFFReader.js", - "web/cocos2d/physics/CCPhysicsDebugNode.js", - "web/cocos2d/physics/CCPhysicsDebugNodeCanvasRenderCmd.js", - "web/cocos2d/physics/CCPhysicsDebugNodeWebGLRenderCmd.js", - "web/cocos2d/physics/CCPhysicsSprite.js", - "web/cocos2d/physics/CCPhysicsSpriteCanvasRenderCmd.js", - "web/cocos2d/physics/CCPhysicsSpriteWebGLRenderCmd.js", - "web/cocos2d/progress-timer/CCActionProgressTimer.js", - "web/cocos2d/progress-timer/CCProgressTimer.js", - "web/cocos2d/progress-timer/CCProgressTimerCanvasRenderCmd.js", - "web/cocos2d/progress-timer/CCProgressTimerWebGLRenderCmd.js", - "web/cocos2d/render-texture/CCRenderTexture.js", - "web/cocos2d/render-texture/CCRenderTextureCanvasRenderCmd.js", - "web/cocos2d/render-texture/CCRenderTextureWebGLRenderCmd.js", - "web/cocos2d/shaders/CCGLProgram.js", - "web/cocos2d/shaders/CCGLStateCache.js", - "web/cocos2d/shaders/CCShaderCache.js", - "web/cocos2d/shaders/CCShaders.js", - "web/cocos2d/shape-nodes/CCDrawNode.js", - "web/cocos2d/shape-nodes/CCDrawNodeCanvasRenderCmd.js", - "web/cocos2d/shape-nodes/CCDrawNodeWebGLRenderCmd.js", - "web/cocos2d/text-input/CCIMEDispatcher.js", - "web/cocos2d/text-input/CCTextFieldTTF.js", - "web/cocos2d/tilemap/CCTGAlib.js", - "web/cocos2d/tilemap/CCTMXLayer.js", - "web/cocos2d/tilemap/CCTMXLayerCanvasRenderCmd.js", - "web/cocos2d/tilemap/CCTMXLayerWebGLRenderCmd.js", - "web/cocos2d/tilemap/CCTMXObjectGroup.js", - "web/cocos2d/tilemap/CCTMXTiledMap.js", - "web/cocos2d/tilemap/CCTMXXMLParser.js", - "web/cocos2d/transitions/CCTransition.js", - "web/cocos2d/transitions/CCTransitionPageTurn.js", - "web/cocos2d/transitions/CCTransitionProgress.js", - "web/extensions/ccb-reader/CCBAnimationManager.js", - "web/extensions/ccb-reader/CCBKeyframe.js", - "web/extensions/ccb-reader/CCBReader.js", - "web/extensions/ccb-reader/CCBReaderUtil.js", - "web/extensions/ccb-reader/CCBRelativePositioning.js", - "web/extensions/ccb-reader/CCBSequence.js", - "web/extensions/ccb-reader/CCBValue.js", - "web/extensions/ccb-reader/CCControlLoader.js", - "web/extensions/ccb-reader/CCNodeLoader.js", - "web/extensions/ccb-reader/CCNodeLoaderLibrary.js", - "web/extensions/ccb-reader/CCSpriteLoader.js", - "web/extensions/ccpool/CCPool.js", - "web/extensions/ccui/base-classes/CCProtectedNode.js", - "web/extensions/ccui/base-classes/CCProtectedNodeCanvasRenderCmd.js", - "web/extensions/ccui/base-classes/CCProtectedNodeWebGLRenderCmd.js", - "web/extensions/ccui/base-classes/UIScale9Sprite.js", - "web/extensions/ccui/base-classes/UIScale9SpriteCanvasRenderCmd.js", - "web/extensions/ccui/base-classes/UIScale9SpriteWebGLRenderCmd.js", - "web/extensions/ccui/base-classes/UIWidget.js", - "web/extensions/ccui/base-classes/UIWidgetRenderCmd.js", - "web/extensions/ccui/layouts/UIHBox.js", - "web/extensions/ccui/layouts/UILayout.js", - "web/extensions/ccui/layouts/UILayoutCanvasRenderCmd.js", - "web/extensions/ccui/layouts/UILayoutComponent.js", - "web/extensions/ccui/layouts/UILayoutManager.js", - "web/extensions/ccui/layouts/UILayoutParameter.js", - "web/extensions/ccui/layouts/UILayoutWebGLRenderCmd.js", - "web/extensions/ccui/layouts/UIRelativeBox.js", - "web/extensions/ccui/layouts/UIVBox.js", - "web/extensions/ccui/system/CocosGUI.js", - "web/extensions/ccui/system/UIHelper.js", - "web/extensions/ccui/uiwidgets/UIButton.js", - "web/extensions/ccui/uiwidgets/UICheckBox.js", - "web/extensions/ccui/uiwidgets/UIImageView.js", - "web/extensions/ccui/uiwidgets/UILoadingBar.js", - "web/extensions/ccui/uiwidgets/UIRichText.js", - "web/extensions/ccui/uiwidgets/UISlider.js", - "web/extensions/ccui/uiwidgets/UIText.js", - "web/extensions/ccui/uiwidgets/UITextAtlas.js", - "web/extensions/ccui/uiwidgets/UITextBMFont.js", - "web/extensions/ccui/uiwidgets/UITextField.js", - "web/extensions/ccui/uiwidgets/UIVideoPlayer.js", - "web/extensions/ccui/uiwidgets/UIWebView.js", - "web/extensions/ccui/uiwidgets/scroll-widget/UIListView.js", - "web/extensions/ccui/uiwidgets/scroll-widget/UIPageView.js", - "web/extensions/ccui/uiwidgets/scroll-widget/UIScrollView.js", - "web/extensions/cocostudio/CocoStudio.js", - "web/extensions/cocostudio/action/CCActionFrame.js", - "web/extensions/cocostudio/action/CCActionManager.js", - "web/extensions/cocostudio/action/CCActionNode.js", - "web/extensions/cocostudio/action/CCActionObject.js", - "web/extensions/cocostudio/armature/CCArmature.js", - "web/extensions/cocostudio/armature/CCArmatureCanvasRenderCmd.js", - "web/extensions/cocostudio/armature/CCArmatureWebGLRenderCmd.js", - "web/extensions/cocostudio/armature/CCBone.js", - "web/extensions/cocostudio/armature/animation/CCArmatureAnimation.js", - "web/extensions/cocostudio/armature/animation/CCProcessBase.js", - "web/extensions/cocostudio/armature/animation/CCTween.js", - "web/extensions/cocostudio/armature/datas/CCDatas.js", - "web/extensions/cocostudio/armature/display/CCBatchNode.js", - "web/extensions/cocostudio/armature/display/CCDecorativeDisplay.js", - "web/extensions/cocostudio/armature/display/CCDisplayFactory.js", - "web/extensions/cocostudio/armature/display/CCDisplayManager.js", - "web/extensions/cocostudio/armature/display/CCSkin.js", - "web/extensions/cocostudio/armature/display/CCSkinCanvasRenderCmd.js", - "web/extensions/cocostudio/armature/display/CCSkinWebGLRenderCmd.js", - "web/extensions/cocostudio/armature/physics/CCColliderDetector.js", - "web/extensions/cocostudio/armature/utils/CCArmatureDataManager.js", - "web/extensions/cocostudio/armature/utils/CCArmatureDefine.js", - "web/extensions/cocostudio/armature/utils/CCDataReaderHelper.js", - "web/extensions/cocostudio/armature/utils/CCSpriteFrameCacheHelper.js", - "web/extensions/cocostudio/armature/utils/CCTransformHelp.js", - "web/extensions/cocostudio/armature/utils/CCTweenFunction.js", - "web/extensions/cocostudio/armature/utils/CCUtilMath.js", - "web/extensions/cocostudio/components/CCComAttribute.js", - "web/extensions/cocostudio/components/CCComAudio.js", - "web/extensions/cocostudio/components/CCComController.js", - "web/extensions/cocostudio/components/CCComRender.js", - "web/extensions/cocostudio/components/CCComponent.js", - "web/extensions/cocostudio/components/CCComponentContainer.js", - "web/extensions/cocostudio/loader/load.js", - "web/extensions/cocostudio/loader/parsers/action-1.x.js", - "web/extensions/cocostudio/loader/parsers/action-2.x.js", - "web/extensions/cocostudio/loader/parsers/compatible.js", - "web/extensions/cocostudio/loader/parsers/scene-1.x.js", - "web/extensions/cocostudio/loader/parsers/timelineParser-1.x.js", - "web/extensions/cocostudio/loader/parsers/timelineParser-2.x.js", - "web/extensions/cocostudio/loader/parsers/uiParser-1.x.js", - "web/extensions/cocostudio/timeline/ActionTimeline.js", - "web/extensions/cocostudio/timeline/Frame.js", - "web/extensions/cocostudio/timeline/Timeline.js", - "web/extensions/cocostudio/trigger/ObjectFactory.js", - "web/extensions/cocostudio/trigger/TriggerBase.js", - "web/extensions/cocostudio/trigger/TriggerMng.js", - "web/extensions/cocostudio/trigger/TriggerObj.js", - "web/extensions/editbox/CCEditBox.js", - "web/extensions/editbox/CCdomNode.js", - "web/extensions/gui/control-extension/CCControl.js", - "web/extensions/gui/control-extension/CCControlButton.js", - "web/extensions/gui/control-extension/CCControlColourPicker.js", - "web/extensions/gui/control-extension/CCControlHuePicker.js", - "web/extensions/gui/control-extension/CCControlPotentiometer.js", - "web/extensions/gui/control-extension/CCControlSaturationBrightnessPicker.js", - "web/extensions/gui/control-extension/CCControlSlider.js", - "web/extensions/gui/control-extension/CCControlStepper.js", - "web/extensions/gui/control-extension/CCControlSwitch.js", - "web/extensions/gui/control-extension/CCControlUtils.js", - "web/extensions/gui/control-extension/CCInvocation.js", - "web/extensions/gui/control-extension/CCMenuPassive.js", - "web/extensions/gui/control-extension/CCScale9Sprite.js", - "web/extensions/gui/control-extension/CCScale9SpriteCanvasRenderCmd.js", - "web/extensions/gui/control-extension/CCScale9SpriteWebGLRenderCmd.js", - "web/extensions/gui/scrollview/CCScrollView.js", - "web/extensions/gui/scrollview/CCScrollViewCanvasRenderCmd.js", - "web/extensions/gui/scrollview/CCScrollViewWebGLRenderCmd.js", - "web/extensions/gui/scrollview/CCSorting.js", - "web/extensions/gui/scrollview/CCTableView.js", - "web/extensions/spine/CCSkeleton.js", - "web/extensions/spine/CCSkeletonAnimation.js", - "web/extensions/spine/CCSkeletonCanvasRenderCmd.js", - "web/extensions/spine/CCSkeletonWebGLRenderCmd.js", - "web/extensions/spine/Spine.js", - "web/external/box2d/box2d.js", - "web/external/chipmunk/chipmunk.js", - "web/external/gaf/GAFBoot.js", - "web/external/gaf/GAFMacros.js", - "web/external/gaf/Library/GAFAsset.js", - "web/external/gaf/Library/GAFAssetPreload.js", - "web/external/gaf/Library/GAFAtlasLoader.js", - "web/external/gaf/Library/GAFDataReader.js", - "web/external/gaf/Library/GAFLoader.js", - "web/external/gaf/Library/GAFMask.js", - "web/external/gaf/Library/GAFMaskProto.js", - "web/external/gaf/Library/GAFObject.js", - "web/external/gaf/Library/GAFShaderManager.js", - "web/external/gaf/Library/GAFShaders.js", - "web/external/gaf/Library/GAFSprite.js", - "web/external/gaf/Library/GAFSpriteCanvasRenderCmd.js", - "web/external/gaf/Library/GAFSpriteProto.js", - "web/external/gaf/Library/GAFSpriteWebGLRenderCmd.js", - "web/external/gaf/Library/GAFTags.js", - "web/external/gaf/Library/GAFTextField.js", - "web/external/gaf/Library/GAFTimeLine.js", - "web/external/gaf/Library/GAFTimeLineProto.js", - "web/external/gaf/gaf_viewer.css", - "web/external/gaf/gaf_viewer.html", - "web/external/gaf/gaf_viewer.js", - "web/external/pluginx/Plugin.js", - "web/external/pluginx/platform/facebook.js", - "web/external/pluginx/platform/facebook_sdk.js", - "web/external/socketio/socket.io.js", - "web/external/socketio/socket.io.min.js", - "web/jsb_apis.js", - "web/licenses/LICENSE_cocos2d-html5.txt", - "web/licenses/LICENSE_cocos2d-x.txt", - "web/licenses/LICENSE_zlib.js.txt", - "web/moduleConfig.json", - "web/template/index.html", - "web/template/main.js", - "web/template/project.json", - "web/template/res/HD/CloseNormal.png", - "web/template/res/HD/CloseSelected.png", - "web/template/res/HD/HelloWorld.jpg", - "web/template/res/Normal/CloseNormal.png", - "web/template/res/Normal/CloseSelected.png", - "web/template/res/Normal/HelloWorld.jpg", - "web/template/res/favicon.ico", - "web/template/res/loading.js", - "web/template/src/myApp.js", - "web/template/src/resource.js", - "web/tools/XmlCheck.js", - "web/tools/build.xml", - "web/tools/compiler/compiler.jar", - "web/tools/core4cc.js", - "web/tools/genBuildXml.js", - "web/tools/jsdoc_toolkit/build.xml", - "web/tools/publish.js", - "web/tools/readme for tools.txt", - "web/tools/template/build.xml" + "tools/tojs/genbindings.py" ], "lua": [ "cocos/scripting/lua-bindings/CMakeLists.txt", diff --git a/templates/js-template-default/cocos-project-template.json b/templates/js-template-default/cocos-project-template.json index a19eb38efc..11f9116ab0 100644 --- a/templates/js-template-default/cocos-project-template.json +++ b/templates/js-template-default/cocos-project-template.json @@ -2,6 +2,12 @@ "do_default":{ "exclude_from_template":[ "frameworks/runtime-src" + ], + "append_dir": [ + { + "from": "web", + "to": "frameworks/cocos2d-html5" + } ] }, "do_add_native_support":{ diff --git a/templates/js-template-default/project.json b/templates/js-template-default/project.json index 6a7f37a61e..e54f870660 100644 --- a/templates/js-template-default/project.json +++ b/templates/js-template-default/project.json @@ -6,7 +6,7 @@ "frameRate" : 60, "id" : "gameCanvas", "renderMode" : 0, - "engineDir":"frameworks/cocos2d-x/web", + "engineDir":"frameworks/cocos2d-html5", "modules" : ["cocos2d"], diff --git a/templates/js-template-runtime/cocos-project-template.json b/templates/js-template-runtime/cocos-project-template.json index bd0493afb6..133594b49c 100644 --- a/templates/js-template-runtime/cocos-project-template.json +++ b/templates/js-template-runtime/cocos-project-template.json @@ -12,132 +12,8 @@ }, "append_dir":[ { - "from":"plugin/plugins/facebook/proj.android/DependProject/src", - "to":"frameworks/cocos2d-x/plugin/plugins/facebook/proj.android/DependProject/src" - }, - { - "from":"cocos/scripting/js-bindings/script", - "to":"runtime/mac/PrebuiltRuntimeJs.app/Contents/Resources/script", - "exclude":[] - }, - { - "from":"cocos/scripting/js-bindings/script", - "to":"runtime/ios/PrebuiltRuntimeJs.app/script", - "exclude":[] - }, - { - "from":"cocos/scripting/js-bindings/script", - "to":"runtime/win32/script", - "exclude":[] - }, - { - "from":"templates/js-template-runtime/src", - "to":"runtime/win32/src", - "exclude":[] - }, - { - "from":"templates/js-template-runtime/res", - "to":"runtime/win32/res", - "exclude":[] - }, - { - "from":"external/win32-specific/gles/prebuilt", - "to":"runtime/win32", - "include": [ - "*.dll" - ] - }, - { - "from":"external/win32-specific/icon/prebuilt", - "to":"runtime/win32", - "include": [ - "*.dll" - ] - }, - { - "from":"external/win32-specific/MP3Decoder/prebuilt", - "to":"runtime/win32", - "include": [ - "*.dll" - ] - }, - { - "from":"external/win32-specific/OggDecoder/prebuilt", - "to":"runtime/win32", - "include": [ - "*.dll" - ] - }, - { - "from":"external/win32-specific/OpenalSoft/prebuilt", - "to":"runtime/win32", - "include": [ - "*.dll" - ] - }, - { - "from":"external/win32-specific/zlib/prebuilt", - "to":"runtime/win32", - "include": [ - "*.dll" - ] - }, - { - "from":"external/curl/prebuilt/win32", - "to":"runtime/win32", - "include": [ - "*.dll" - ] - }, - { - "from":"external/sqlite3/libraries/win32", - "to":"runtime/win32", - "include": [ - "*.dll" - ] - }, - { - "from":"external/websockets/prebuilt/win32", - "to":"runtime/win32", - "include": [ - "*.dll" - ] - }, - { - "from":"external/tiff/prebuilt/win32", - "to":"runtime/win32", - "include": [ - "*.dll" - ] - }, - { - "from":"external/spidermonkey/prebuilt/win32", - "to":"runtime/win32", - "include": [ - "*.dll" - ] - } - ], - "append_file":[ - { - "from":"tools/simulator/frameworks/runtime-src/Classes/ide-support/lang", - "to":"runtime/win32/lang" - }, - { - "from":"templates/js-template-runtime/project.json", - "to":"runtime/ios/PrebuiltRuntimeJs.app/project.json" - }, - { - "from":"templates/js-template-runtime/project.json", - "to":"runtime/win32/project.json" - }, - { - "from":"templates/js-template-runtime/config.json", - "to":"runtime/win32/config.json" - }, - { - "from":"templates/js-template-runtime/main.js", - "to":"runtime/win32/main.js" + "from": "web", + "to": "frameworks/cocos2d-html5" } ] }, diff --git a/templates/js-template-runtime/index.html b/templates/js-template-runtime/index.html new file mode 100644 index 0000000000..42074ad179 --- /dev/null +++ b/templates/js-template-runtime/index.html @@ -0,0 +1,28 @@ + + + + + Cocos2d-html5 Hello World test + + + + + + + + + + + + + + + diff --git a/templates/js-template-runtime/runtime/config.json b/templates/js-template-runtime/runtime/config.json deleted file mode 100644 index 1449e545c1..0000000000 --- a/templates/js-template-runtime/runtime/config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version":"v4-js-runtime-1.0", - "zip_file_size":"43441816", - "repo_name":"cocos-runtime-bin", - "repo_parent":"https://github.com/natural-law/" -} diff --git a/tests/js-tests/src/tests-main.js b/tests/js-tests/src/tests-main.js index 61b1c35c02..0b97d38298 100644 --- a/tests/js-tests/src/tests-main.js +++ b/tests/js-tests/src/tests-main.js @@ -176,7 +176,7 @@ var TestController = cc.LayerGradient.extend({ return true; } }, this); - } + } }, onEnter:function(){ this._super(); diff --git a/tools/bindings-generator b/tools/bindings-generator index c3528c216b..c3b5130e3b 160000 --- a/tools/bindings-generator +++ b/tools/bindings-generator @@ -1 +1 @@ -Subproject commit c3528c216ba106d0c596740e98f7829ac2b5026f +Subproject commit c3b5130e3b35723d5fb8844373c277e2a3e5115e diff --git a/tools/travis-scripts/config.gitingore b/tools/travis-scripts/config.gitingore index 353a34f319..0bdd37991a 100644 --- a/tools/travis-scripts/config.gitingore +++ b/tools/travis-scripts/config.gitingore @@ -109,6 +109,9 @@ Device-Release/ # CTags tags +# Ignore web dir +/web + #include !/tools/cocos2d-console/console/bin/ !/plugin-x/plugin-x_ios.xcworkspace/ diff --git a/tools/travis-scripts/generate-template-files.py b/tools/travis-scripts/generate-template-files.py index 43df0dfc87..29aea90a17 100755 --- a/tools/travis-scripts/generate-template-files.py +++ b/tools/travis-scripts/generate-template-files.py @@ -45,7 +45,7 @@ class CocosFileList: self.fileList_js=[] self.luaPath = ["cocos/scripting/lua-bindings", "external/lua", "tools/bindings-generator", "tools/tolua"] - self.jsPath = ["cocos/scripting/js-bindings", "external/spidermonkey", "tools/bindings-generator", "tools/tojs", "web"] + self.jsPath = ["cocos/scripting/js-bindings", "external/spidermonkey", "tools/bindings-generator", "tools/tojs" ] def readIngoreFile(self, fileName): """ diff --git a/web b/web index 048bf1f409..dd8735056c 160000 --- a/web +++ b/web @@ -1 +1 @@ -Subproject commit 048bf1f409b51fd3e8247ecaa61b987a4610fbd0 +Subproject commit dd8735056c87ffb22502e7178c01d92d9b8cdc65