Enable the Canvas API in NativeScript so that existing data visualization frameworks written in JavaScript to be out of the box integrated inside NativeScript. For example - charts.js.
Here is an iOS implementation that we can use as a reference: https://github.com/phoboslab/Ejecta
it will be cool if it can support canvas in nativescript!!
Rendering is one part of the task. Other parts are dimensions and user input responding. Enabling the drawing APIs of the HTML5 Canvas will not be enough to reuse existing Web Libraries in {N}. For example here you can see the usages of the document and window objects. So, this is connected to enabling some Web shims within {N} and will require more work than the drawing ONLY.
If you're going to enable Canvas support, possibly it should be put into a WebGL 2D orthogonal context. That way, it'll be accelerated on both platforms. Additionally, it seems like Canvas API and WebGL should be polyfills to real GL/ES support. All of the browser capabilities should be polyfills on top of native implementations/plug-ins. That way, performance isn't lost to a bunch of translations in JavaScript.
Just my 2cents!
Gents, I mention a pre-existing Javascript-based WebGL function list (provided by Google's Closure compiler) @ issue 289, hopefully, it should be possible to implement this 3D-Canvas API, against equivalent OpenGL ES functions, cross-platform, within NativeScript.
Hey folks,
Please use this repository to test and submit issues about our Canvas implementation:
https://github.com/NativeScript/nativescript-canvas
Thanks
@enchev thank you for this
@enchev , mentioned plugin is not supported anymore. am I missing something, maybe there is other way to perform simple drawing in Nativescript?
I'm also currently look for a way to do some very special drawing in Nativescript. Normally I did this with canvas on Android. Should I use something like https://www.npmjs.com/package/nativescript-canvas-interface ?
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Hey folks,
Please use this repository to test and submit issues about our Canvas implementation:
https://github.com/NativeScript/nativescript-canvas
Thanks