All notable changes of this project will be documented in.
- React Native GCanvas Component
- fix: when (offscreen canvas multiply) call canvas.getContext('2d'), should reset contextAttributes(, because our offscreen canvas will not unmount)
- React Native GCanvas Component
- fix: on Android 15 can not display emoji
- React Native GCanvas Component
- fix: since v6.0.17 sometimes "TypeError: null is not an object (evaluating 'this.canvas.id')"
- React Native GCanvas Component
- fix: global array bug on iOS release that cause
document.createElement('canvas')
(as offscreen canvas) not work
- fix: global array bug on iOS release that cause
- React Native GCanvas Component
- feat: on iOS ctx.fillText() can display most color emoji
- fix: ctx.font can not support fontFamily with space e.g.
times new roman
- React Native GCanvas Component
- fix: build fails that missing "pnglibconf.h" in npm package #84
- React Native GCanvas Component
- feat: on Android ctx.fillText() can display most color emoji
- fix: on Android compile error
Expected output file at .../libpng16d.so for target png but there was none
- React Native GCanvas Component
- fix: support x86 and x86_64 ABI used in e.g. Android emulator #6 #19
- feat: ctx.fillText() now support ucs4 instead of ucs2
- feat: ctx.fillText() can display some emoji e.g. U+2328 , but can not display more
- React Native GCanvas Component
- fix: on Android sometimes APP stuck (only FlatList can be move) by multi-thread lock while unmount
- React Native GCanvas Component
- fix: Cant build on react native 0.72.0 #65
- React Native GCanvas Component
- fix: flick of ctx.drawImage() with imageIsCanvas of https://github.com/flyskywhy/GCanvasRNExamples/blob/master/app/components/AudioWaveSurfer.js
- React Native GCanvas Component
- fix: bug from 6.0.7 that on iOS can't draw some on 1st stack canvas page again when unmount from 2nd stack canvas page of react-navigation
- React Native GCanvas Component
- fix: toDataURL() crash On iOS 17 #66
- React Native GCanvas Component
- fix: 15MB iOS memory leak when recreate canvas #42
- React Native GCanvas Component
- fix: gradle-plugin 4.x comes from RN 0.64 will run crash
gcanvas is not found.dlopen failed: library "libfreetype.so" not found
and thenjava.lang.UnsatisfiedLinkError: No implementation found for void com.taobao.gcanvas.GCanvasJNI.setContextType
- fix: gradle-plugin 4.x comes from RN 0.64 will run crash
- React Native GCanvas Component
- add props isResetGlViewportAfterSetWidthOrHeight={false} to let webgl 3d can continue gl call loop without restart it by drawSome() after rotate screenOrientation
- React Native GCanvas Component
- fix: (again 06a7064) a bug that will no display while quit from a drawer item page to current webgl page which is still maintain mounted by react-navigation on Android caused by 0c51446 in v2.3.10
- webgl_demo/cube.js: fix maybe will stuck APP if use it as children
- React Native GCanvas Component
- fix: on iOS sometimes
this.ctx.getImageData()
can't get the text just afterthis.ctx.fillText()
- fix: on iOS sometimes
- React Native GCanvas Component
- fix: iOS if
isGestureResponsible={true}
and touch willTypeError: undefined is not an object (evaluating 'touch.startTimeStamp'
#61
- fix: iOS if
- React Native GCanvas Component
- feat: support fallback fonts to work with every language on Android by default, thus fix #38 can not fillText with thai font family on Android
- React Native GCanvas Component
- Small break! Multisample anti-aliasing (MSAA) is disabled by default on Android, need set prop
isEnableFboMsaa={true}
if you want present same behavior on Android and Web. - feat: add prop isEnableFboMsaa for canvas 2d on Android, and now Multisample anti-aliasing (MSAA) by default is disabled #48
- Small break! Multisample anti-aliasing (MSAA) is disabled by default on Android, need set prop
- React Native GCanvas Component
- feat: add registerFont() for Android and getFontNames() to work with custom fonts, and workaround #38 can not fillText with thai font family on Android
- fix: ctx.fillText(str) crash on some Android device if not run
ctx.font =
before and str is not char of CJK
- React Native GCanvas Component
- fix: since v5.0.2 cause
Unable to compile iOS due to missing return value
#58
- fix: since v5.0.2 cause
- React Native GCanvas Component
- fix: since @flyskywhy/[email protected], image not display on screen of https://github.com/flyskywhy/GCanvasRNExamples/blob/master/app/components/Canvas2dDemo.js
- React Native GCanvas Component
- fix: touch issue caused by sometimes multiple touches have same startTimeStamp
- React Native GCanvas Component
- fix: 2nd image flick with 'forceCanvas = true' of https://github.com/flyskywhy/GCanvasRNExamples/blob/master/app/components/Pixi.js
- React Native GCanvas Component
- README.md: install expo-modules instead of react-native-unimodules to install latest expo-asset
- feat: support gl.getContextAttributes
- fix: let putImageData {255, 255, 255, 0} can result transparence not white just like Web
- React Native GCanvas Component
- fix: let ctx.globalCompositeOperation behavior match https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation
- fix: let putImageData {255, 255, 255, 0} can result transparence not white just like Web
- React Native GCanvas Component
- feat: convert gesture event to PointerEvent to support multiple touches with babylonjs demo
Drag and drop
in https://github.com/flyskywhy/GCanvasRNExamples, and this can workaround facebook/react-native#8094 - fix: can not work with document.createElement('canvas') if just exit from another page which also has document.createElement('canvas')
- feat: Use more general
offscreenCanvas={true}
instead ofglobal.createCanvasElements.push(canvas)
to work with document.createElement('canvas') (as offscreen canvas)
- feat: convert gesture event to PointerEvent to support multiple touches with babylonjs demo
- React Native GCanvas Component
- fix: setDevicePixelRatio should be sync otherwise font size sometimes will be too big in https://github.com/flyskywhy/GCanvasRNExamples/blob/master/app/components/WebglCubeMaps.js
- React Native GCanvas Component
- fix: can not drag on babylonjs mesh in https://github.com/flyskywhy/GCanvasRNExamples/blob/master/src/dragNdrop.js
- React Native GCanvas Component
- Small break! Gesture event always be convert to mouse event.
- Support 3d game engine babylonjs! Ref to https://github.com/flyskywhy/GCanvasRNExamples
- React Native GCanvas Component
- Small break! Multisample anti-aliasing (MSAA) is enabled by default on Android, thus present same behavior on Android and Web. Gcanvas on iOS is not supported yet.
- feat: support Multisample anti-aliasing (MSAA) by default on Android #48
- React Native GCanvas Component
- Small break! Font display size is more bigger than before as it depends on DevicePixelRatio now, even though default font size decrease from 12px to standard 10px, thus font size present same behavior on native and Web.
- fix: ctx.font size should depend on DevicePixelRatio #14
- fix: default font size is 10px as described GLsizei in https://developer.mozilla.org/zh-CN/docs/Web/API/Canvas_API/Tutorial/Drawing_text
- React Native GCanvas Component
- fix: mouseEvent.type should be 'mousemove' not 'mousedown' in onPanResponderMove()
- feat: support canvas.focus in 44230ed
- React Native GCanvas Component
- fix: drawingBufferWidth and drawingBufferHeight of WebGLRenderingContext is fixed not float as described GLsizei in https://registry.khronos.org/webgl/specs/latest/1.0/#DOM-WebGLRenderingContext-drawingBufferWidth
- feat: support ctx.measureText
- fix: avoid canvas render (no return result) sometimes stuck the APP (only FlatList can be move), and still avoid getImageData() on Android sometimes get '' since 9e190a6
- React Native GCanvas Component
- fix: let btoa use window.btoa comes from @flyskywhy/react-native-browser-polyfill to fix
Unable to resolve "abab"
#53 - fix: Compatible with https://github.com/flyskywhy/snakeRN/tree/v3.1.1
- fix: let btoa use window.btoa comes from @flyskywhy/react-native-browser-polyfill to fix
- React Native GCanvas Component
- fix: let mCmdQueue be thread safe to fix random app crash by
Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
#54
- fix: let mCmdQueue be thread safe to fix random app crash by
- React Native GCanvas Component
- feat: support HTMLCanvasElement to texImage2D and texSubImage2D
- React Native GCanvas Component
- fix: crash in context webgl when resetGlViewport
- React Native GCanvas Component
- fix: avoid unnecessary string copy in GCanvasWeex::QueueProc() to avoid sometime std::bad_alloc crash on some Android phone
- React Native GCanvas Component
- fix: should also stop JS render loop in componentWillUnmount
-
React Native GCanvas Component
-
fix:
A/libc(27847): Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 28018 (JNISurfaceTextu)
by~/tools/android-sdk/ndk/21.4.7075529/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-addr2line -e react-native-gcanvas/android/gcanvas_library/build/intermediates/cmake/release/obj/arm64-v8a/libgcanvas.so 0000000000094a48
ref to the related log:
A/DEBUG(28069): #03 pc 0000000000094a48 /data/app/com.lessing.damitis-1takdafFSBJoT3BNSgkpSw==/lib/arm64/libgcanvas.so
-
- React Native GCanvas Component
- fix: getImageData() on Android get [0, 0, 0, 0, ...] if just after drawImage()
- feat: let drawImage() also eat canvas, so that most usecase of drawImage(canvas) with document.createElement('canvas') (as offscreen canvas) can work
- feat: support ctx.ImageSmoothingEnabled
- fix: crash if set canvas.width before invoke canvas.getContext
- fix: let resetGlViewport() and setContextType() be sync on iOS to avoid crash render some cmd just after resetGlViewport()
- refactor: let setContextType() be sync on Android to remove some sleepMs() in JS
- fix: on iOS sometimes devicePixelRatio will be 1 after resetGlViewport()
- fix: iOS one canvas crash or not work if unmount another canvas, since 2.3.22
- fix: typo that maybe cause onLayout->ResetGlViewport->onLayout infinite loop
- fix: avoid pixel offset flaw when GetImageData if devicePixelRatio in GCanvasView is not int but float
- React Native GCanvas Component
- fix: width and height of canvas is fixed not float just like Web, now resizeCanvasToDisplaySize() in
node_modules/webgl-utils.js/
works well
- fix: width and height of canvas is fixed not float just like Web, now resizeCanvasToDisplaySize() in
- React Native GCanvas Component
- fix:
EventEmitter.removeListener ... Method has been deprecated
#44
- fix:
[2.3.25] - 2022-09-18 Chinese do not forget the September 18 Incident that marked the start of Japan's 14-year invasion of China
- React Native GCanvas Component
- README.md: install react-native-unimodules without install expo
- refactor: Zdog rendering different from the web #46
- fix: support https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute to avoid crash with Zdog Mario
- React Native GCanvas Component
- feat: call drawImage() in loop with only one GImage instance #41, just like what Web can do
- React Native GCanvas Component
- fix: iOS memory leak when recreate canvas #42
- React Native GCanvas Component
- feat: support ImageData to texImage2D and texSubImage2D; fix display blank image when second call of texImage2D() on Android
- React Native GCanvas Component
- feat: add prop devicePixelRatio, so that game designer/engine can code with physical pixels not just css pixels
- React Native GCanvas Component
- feat: add prop isAutoClearRectBeforePutImageData
- React Native GCanvas Component
- fix: #31 blinking after changing globalCompositeOperation
- React Native GCanvas Component
- refactor: let color picker in APP more accurate in PixelsSampler() after GetImageData() when devicePixelRatio > 1
- fix: flip y boundary value bug in PixelsSampler() which is used by GetImageData()
- React Native GCanvas Component
- feat: add
canvas
into onCanvasResize({}) to easilycanvas.width = width;
- fix: sometimes gl.viewport() has no effect on iOS
- feat: add
[2.3.12] - 2022-02-04 Wish the Beijing 2022 Winter Olympics and Winter Paralympics a complete success
- React Native GCanvas Component
- fix: improve
WebGL performance
#26 , increase JS FPS from 1 to 60 test with https://github.com/flyskywhy/snakeRN on iPhone 7 in Xcode debug build configuration
- fix: improve
- React Native GCanvas Component
- feat: let iOS also has the ability to get the log comes from cpp
- feat: support getImageData() on iOS
- React Native GCanvas Component
- fix: context was scaled when
Canvas resize
#32 fixed bythis.canvas.width = width; this.canvas.height = height;
to match the same solution on Web<canvas/>
,onCanvasResize
usage can ref to README.md diff of commit 8225a74
- fix: context was scaled when
- React Native GCanvas Component
- feat: support onMouseDown onMouseMove onMouseUp
- feat: support getImageData() on Android, support createImageData() putImageData()
- fix: waitUtilTimeout() sometimes be interrupted by signal thus cause return immediately
- fix: getImageData() on Android sometimes get '', test by adjusting color use
Lightener
icon tool in https://github.com/flyskywhy/PixelShapeRN
- React Native GCanvas Component
- feat: support 9 args in texImage2D() on Android
- React Native GCanvas Component
- fix: on iOS #25 "Poor performance on drawing multiple lines" caused by invoking render2d() implicitly per 16ms with empty commands when not drawing
- React Native GCanvas Component
- fix: a bug that Android
ctx.clearRect()
withwhite
, it should betransparent
like iOS
- fix: a bug that Android
- React Native GCanvas Component
- fix:
java.lang.ClassCastException: com.facebook.react.views.view.ReactViewGroup cannot be cast to com.taobao.gcanvas.bridges.rn.GReactTextureView
- fix:
- React Native GCanvas Component
- fix: let PanResponder outside GCanvasView can be useable
[2.3.0] - 2021-06-17 Congratulations to China on the successful launch of crew to our Tiangong space station
- React Native GCanvas Component
- feat: use @flyskywhy/react-native-browser-polyfill to support window.Element to directly render
zdog
and support mousemove inzdog
- fix: a bug can't drawImage when the image.src.startsWith('data:')
- feat: use @flyskywhy/react-native-browser-polyfill to support window.Element to directly render
- React Native GCanvas Component
- feat: add toDataURL() on Android and iOS
- React Native GCanvas Component
- fix: a bug will more and more outer-sync between drawing on JS and displaying on iOS
-
React Native GCanvas Component
-
feat: can render 3d webgl on Android and iOS now
-
fix: resolve the bug in refreshPlugin(), then iOS has the same x y scale with Android and Web against same JS code
-
fix:
A/libc(6413): Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 6684 (JNISurfaceTextu)
by/c/programs/android-sdk/ndk/20.0.5594570/toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64/bin/aarch64-linux-android-addr2line.exe -e react-native-gcanvas/android/gcanvas_library/build/intermediates/cmake/debug/obj/arm64-v8a/libgcanvas.so 0000000000087abc
ref to the related log:
A/DEBUG(10049): #03 pc 0000000000087abc /data/app/com.sunlay.light-pqSaddcROPi9EDeUpEbxWw==/lib/arm64/libgcanvas.so (BuildId: 916bb745ddfe7df39f27c57400b0196947e866dc)
-
- React Native GCanvas Component
- fix: #12
Blank screen Android
- fix: #13
why "0" shown?
- fix: #12
- React Native GCanvas Component
- Small break! No need this.scale as described in example of previous README.md, more elegant now:D and thus react-native-particles-bg present same behavior on Andrid, iOS and Web.
- fix: resolve the bug in mImpl.setDevicePixelRatio, then Android has the same x y scale with iOS and Web, so can simplify the example too
- refactor: add onCanvasCreate prop and hide enable() into GCanvasView, let initCanvas() simple in example
- React Native GCanvas Component
- feat: support drawImage() from require('some.png') on Android, iOS and Web
- React Native GCanvas Component
- iOS worked again
- fix: a bug that will no display while quit from a drawer item page to current canvas page which is still maintain mounted by react-navigation on Android
- fix: a bug that will still no display after close a pop-up activity like permission request dialog
- feat: can render2d canvas on iOS now
- React Native GCanvas Component
- Android worked again
- fix:
A/libc(13515): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x7af4c00ed8 in tid 13656 (mqt_native_modu)
- fix: can render2d canvas on Android now
- fix: avoid sometimes
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.taobao.gcanvas.bridges.rn.GReactTextureView.isReady()' on a null object reference
-
Core Engine
- Refacotor
GCanvas
andGCanvasContext
class, make it more lower coupling.GCanvas
response for initialize, createGCanvasContext
and drawFrame, all 2dproperty
andAPI
move toGCanvasContext
- Add
GCanvasWeex
only forWeex
UI framework - Add
GCanvasHooks
andGCanvasLog
, support for custom exception log. GCanvasContext
Support set canvas dimension- New
2d
propertylineDash
andlineDashOffset
- New
2d
property supportshadowColor
,shadowBlur
,shadowOffsetX
,shadowOffstY
- Font support
measureText
andItalic
style Fill()
、Clip()
, support winding-rule and promote performance- Out of Android platform- implementation :
GCanvas2DContextAndroid
,GCanvasAndroid
,GFontManagerAndroid
, - Refactor Android-Weex
GcanvasWeexAndroid
- Fix some compatibility issue
- Refacotor
-
Weex GCanvas Component
- Update New
WeexSDK
(>=0.26.0) - [iOS]
iOS
deployment_target update to iOS 9.0 - [Android]
Android
:moudle bridge_spec source code depend on the module gcanvas_library
- Update New