Commit Graph

534 Commits

Author SHA1 Message Date
bofeng-song 77e5eb3e56 [feature] support lineCap and lineJoin (#1569)
* [feature] support lineCap and lineJoin

* [refine] move precondition to c++ layer
2018-10-29 20:50:54 +08:00
Arnold 01acfa4327 XMLHttpRequest fix readyState during onabort callback (#1567)
* fix http request readyState after abort()

* ignoreonreadystatechange when abort
2018-10-29 18:17:44 +08:00
Arnold 31946b642d XMLHttpRequest.abort readyStatue should be 0 (#1564) 2018-10-29 10:19:07 +08:00
wen xing liao 61bfcce6fa webgl function complete check parameters (#1553)
* Remove duplicate parameter check

contains drawArrays, drawElements, getBufferParameter, getRenderbufferParameter

* Remove duplicate parameter check

* complete check parameters

contains getUniformLocation, getShaderParameter, getProgramParameter, getProgramInfoLog, getShaderInfoLog, getShaderSource, getAttachedShaders, getFramebufferAttachmentParameter, getUniform

* complete check parameters

contains getUniformLocation, getShaderParameter, getProgramParameter, getProgramInfoLog, getShaderInfoLog, getShaderSource, getAttachedShaders, getFramebufferAttachmentParameter, getUniform

* getRenderbufferParameter complete check parameters

* getBufferParameter complete check parameters

* getFramebufferAttachmentParameter complete check parameters

* getVertexAttrib complete check parameters

* getUniform complete check parameters

* createShader complete check parameters

* Remove invalid code

* optimization getUniform
2018-10-25 11:13:56 +08:00
Arnold 951869f9b9 [jsb] XMLHttpRequest & WebSocket API standardize (#1557)
* xmlhttprequest statusText exclude numeric code

* websocket bufferedBytes

* websocket extensions attribute

* add websocket close arguments

* responseXML

* fix ios compile

* responseType document

* getExtensions

* rollback change for responseXML

* fix arg 1005

* use const_cast instead of create tmp value
2018-10-23 11:57:23 +08:00
leda 738da04065 fix js_saveImageData memory leak (#1555) 2018-10-19 19:25:28 +08:00
leda d1c1457d2a keep alpha channel when save PNG image (#1554) 2018-10-19 17:28:12 +08:00
leda dada2eb244 move "cocos2d::experimental::" to "cocos2d::" on Audio (#1549)
* remove “experimental” in audio dir

* update audio bindings

* fix "{" match error

* no need "experimental" for thread pool

* remove both out-of-date js api files
2018-10-18 13:34:12 +08:00
wen xing liao d432a9643e 调整WebGL函数功能 (#1544)
* [feature] add getRenderbufferParameter and getBufferParameter function

* [adjust] adjust getParameter  function

* [refine] refine getParameter function

* [adjust] adjust getParameter function

* [bug] drawElements complete check parameters

* Remove duplicate parameter check

contains drawArrays, drawElements, getBufferParameter, getRenderbufferParameter

* Remove duplicate parameter check
2018-10-18 10:30:57 +08:00
leda 71d8cf11ad refine native module separate (#1547)
* refine module separate -> gfx renderer

* refine module separate

* modify Application.mk, add macro

* “#if USE_GFX_RENDERER” means “#if USE_GFX_RENDERER > 0”

* improve macro define in binding code
2018-10-18 09:10:05 +08:00
leda 73f62c9da6 enable Proguard for release build on Android (#1545)
* enable Proguard for release build to reduce apk size

* add Proguard to default template

* consider anysdk at proguard

* remove un-used permissions

* disbale gfx & renderer binding register
2018-10-16 18:35:18 +08:00
wen xing liao a08759368b complete check parameters (#1542)
* [bug] framebuffer-test.js complete check parameters

* [bug] complete check parameters

* [bug] framebuffer-object-attachment.js complete check parameters

* [bug] tex-input-validation.js complete check parameters

* [bug] read-pixels-test.js complete check parameters

* [bug] drawArrays complete check parameters

* Remove macro definition

* Remove macro definition
2018-10-12 14:13:18 +08:00
leda 89af43e38f switch video player bind code from "manual" to "auto" (#1537)
* refine video bind, tested on iOS

* adapt Android.mk
2018-10-10 17:22:19 +08:00
leda c8e145dadb Re-added WebView on iOS & Android for Creator 2.1 (#1535)
* init add webview files form creator 1.10

* refine header & namespace to compile works

* add webview auto bindings, need check manually

* update webview auto bind

* add setFrame interface to support set View Rect

* uniform file name with other ui modules

* adapt to iOS
2018-10-10 16:03:23 +08:00
wen xing liao 011abf499e [bug] complete check parameters (#1533)
* [bug] set getFramebufferAttachmentParameter return value according to webgl1.0

* fix Differences Between WebGL and OpenGL ES 2.0

* rename

* fix texImage2D when count is 0

* remove excess code

* [bug]  complete check parameters

* [bug] complete check parameters

* [restructure] remove SE_PRECONDITION5
2018-10-09 11:10:15 +08:00
leda c17130862c Re-added VideoPlayer on iOS & Android for Creator 2.1 (#1531)
* add video player source for ios and android.

* revert un-clearly changes

* add iOS files into project config files

* remove useless declare property on 2d-x-lite
2018-10-08 15:28:19 +08:00
wen xing liao f27e8f6761 fix null pointer exception (#1530) 2018-09-30 22:25:37 +08:00
wen xing liao 4c1dffb77a Adaptation webgl 1.0 (#1526)
* Adaptation webgl 1.0

* redefine the variable name
2018-09-29 11:00:08 +08:00
leda 8d98e7fb15 fix wrong namespace on (#1523)
Device.getDeviceMotionValue
2018-09-27 19:42:17 +08:00
Jare Guo 41e6cb4ea6 Merge pull request #1519 from cocos-creator/develop
sync branch request: from develop to 2.1 release
2018-09-27 11:47:57 +08:00
leda beb45454ad support parse waitForConnect and debugPort from simulator/config.json (#1521)
* revert v8 debugger ip to 0.0.0.0 for simulator

* parse isWaitForConnect and debug port from config.json

* remove macro useless, since we parse the options from config.json
2018-09-26 18:57:56 -07:00
wdzhangchukong 4ecd996868 Declare JSB_WebSocketDelegate in hpp file (#1517) 2018-09-25 17:54:55 +08:00
leda 4ca166e109 dispatch show/hide event to js, included "cocos simulator" (#1500)
* add dispatchEnterBackgroundEvent for simulator

* more stable when set canvas size on win32

* add isNan check for float & double

* simplify event dispatch on AppDelegate
2018-09-06 16:39:45 +08:00
W-MTZing d27e5a798c remove log names about cocos (#1496) 2018-09-05 10:51:42 +08:00
wdzhangchukong 21377fdb74 Remove names about Cocos (#1494) 2018-09-04 13:41:02 +08:00
leda 0fb1c97e83 support to save render texture data by "saveImageData " (#1492)
* add jsb.savePixelsToFile to support screenshot

* add return value for
 savePixelsToFile

* rename: savePixelsToFile -> saveImageData
2018-09-03 09:38:52 +08:00
minggo b642e0fcc7 Merge branch 'v2.0-release-rename' of github.com:cocos-creator/cocos2d-x-lite into merge-rename 2018-08-28 14:39:40 +08:00
wdzhangchukong e00113cfd6 Get jsb by __jsbObj (#1481) 2018-08-27 11:48:22 +08:00
wdzhangchukong b44c2a68dc Change cocos2dx_auto to jsb (#1479) 2018-08-24 20:26:11 +08:00
Vincent Yang 3d2a9017bb [bug] loadImage don't call js callback when input path is invalid (#1478) 2018-08-24 17:42:15 +08:00
wdzhangchukong bf27fdd955 Rename cc in JSB (#1476)
* Rename __ccgl to __gl

* Rename __CCPrivateData to __PrivateData

* Change CanvasRenderingContext2D to global

* Change CanvasRenderingContext2D to global

* Change getDeviceMotionValue into Device

* Change FileUtils to global

* Change AudioEngine to global

* Change AudioEngine into Audio

* Remove cc in c++

* Remove __jsc__

* Change auto file template

* Name jsb_cocos2d_global to auto

* Reset jsb_cocos2dx_auto

* Register jsb_cocos2dx_global_auto
2018-08-24 17:03:50 +08:00
W-MTZing 935a759cf4 rename c++ call java function by macro (#1468) 2018-08-22 14:07:17 +08:00
W-MTZing e284a0efd1 rename jni function by macro (#1467)
* rename jni function by macro

* modify JNI macro name
2018-08-22 09:21:35 +08:00
leda 19ab61b252 refine TODO & FIXME flag (#1450)
* change TODO to REFINE

* change REFINE:cjh to REFINE

* change FIXME to IDEA

* improve format
2018-08-10 12:52:00 +08:00
minggo 1d326a0c1b fix two issues: (#1440)
if return type is string, and return null from java to js, then it will crash
if the parameter is string, and pass null from js to java, then java will get "null" instead of null
2018-08-07 17:19:49 +08:00
W-MTZing 93101a7a0e add loadImage error callback (#1406) (#1436)
* add loadImage error callback

* fix format
2018-08-02 17:28:49 +08:00
minggo b3122ea9e5 add a function to terminate application (#1434) 2018-08-02 10:46:35 +08:00
leda 9b775e711d fix catch font name error when ttf font name with space (#1423)
* support catch fontName with space when canvas set font

* do same above on android

* improve regex

* add empty loadFont impl for win32 platform

* correct win32 parse font info regex on win32

* add win32 support ttf when font name = font face name

* another space line for win32 platforms

* improve regex when parse font name

* fix regex error

* correct typo
2018-07-26 17:57:25 +08:00
leda b3b37cf457 Add AssetsManager to iOS & Mac & Android & win32 (#1405)
* Add incomplete AssetsManager to iOS & Mac

* remove Android.mk refer on Xcode project config

* re-add assetmanager for android

* re-add assetmanager for win32 project config

* remove unused macro define for win32

* remove unused marco define COCOS2D_JAVASCRIPT

* added header include for assetsManager

* Add CCAsyncTaskPool

* Fix AssetsManager event trigger issue

* update win32 project config, added CCAsyncTaskPool

* add CCAsyncTaskPool to extensions Android.mk
2018-07-23 17:50:04 +08:00
wdzhangchukong e41cb4dcc8 Fix crash when param type error (#1390) 2018-07-13 17:07:17 +08:00
minggo e299f74392 fix editbox issue (#1389)
app will crash if missing some properties
2018-07-13 16:22:12 +08:00
minggo 91719d5d94 convert data to RGBA888 when it is not (#1388) 2018-07-13 15:28:56 +08:00
wdzhangchukong 83d9a6fbff Provide loadImage api for runtime (#1374)
* Provide loadImage api for runtime

* Declare the jsb_global_load
2018-07-06 11:52:29 +08:00
W-MTZing 12d91c2f2d [feature] localStorage add api getKey and length (#1371) 2018-07-06 09:22:38 +08:00
Arnold c61d61682a Fix 7818 (#1370)
* fix: #7818

* fix: 7818

* add callback typecheck, should be function
2018-07-06 09:20:26 +08:00
minggo 5b8919ccdf merge develop branch 2018-06-27 17:27:04 +08:00
leda 723f52a472 win32 link/default template compile and link pass, but not works when run (#1321)
* modify file changes on project config

* correct libcocos2d compile

* add win32 props back

* Revert "fix windows link template (#1138)"

This reverts commit 332d95e5b8.

* correct compile error

* many link errors need to be solved

* added part lack methods

* add empty impl for canvas rendering context 2d

* update main.cpp

* correct audio/network compile and link error

* sync win32 application logic with mac

* remove wrong change on application-win32

* correct win32 default-template compile and link error

* win32 simulator part compile error fixed

* editbox define changes
2018-06-22 10:19:31 +08:00
minggo 467b0346ce editbox support mac (#1322) 2018-06-21 09:25:56 +08:00
wuzhiming bc31a3993a use gzip to decompress js content 2018-06-19 15:44:12 +08:00
Vincent Yang 8f6e9adbe1 [feature] CCDownloader add header and abort support. (#1291)
*  [feature] android implement recieve http header param, handle it in android http request (#2)

* [feature] Recieve http header param, handle it in android http request

* [feature] implement abort and header api

* /2.0 -> /2

* remove task when abort

*  [feature] Implement ios and mac downloader abort api (#3)

* [feature] Implement ios and mac downloader abort api

* use DLLOG to show log

* judge NSURLSessionTask state with NSURLErrorCancelled

* [adjust] Modify downloader from auto bind to manually (#4)

* [adjust] Modify Downloader createDownloadFileTask api from auto bind to manually

* Modify ini file

* [bug] fix Cocos2dxDownloader.java syntax error

* [bug] CCDownloader-android creatCoTask don't deleteLocalRef header str
2018-06-07 22:19:03 +08:00