Nativescript: Feature Request - Canvas API Implementation

Created on 15 Jan 2018  路  9Comments  路  Source: NativeScript/NativeScript

Hello NativeScript,

Please let us use Canvas API on NativeScript..
Canvas API can do amazing things for UI.
https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API

Check this link to see what it can do.
https://codepen.io/search/pens?q=canvas+api&limit=all&type=type-pens

and what if we could use Canvas API for UI design on NativeScript?

We need Canvas API installed on NativeScript ASAP....

Thanks,


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

done feature

Most helpful comment

Hi @jamesharvey2,
This seems to be a perfect candidate for an external plugin. You could create your own plugin, which provides Canvas Support in NativeScript.
For further info, you could review the following articles:
https://docs.nativescript.org/plugins/building-plugins
https://docs.nativescript.org/plugins/ui-plugin-composite
as well as this POC plugin, which was implemented for some of the oldest version of NativeScript.

As starting point, you could use nativescript-plugin-seed

All 9 comments

Hi @jamesharvey2,
This seems to be a perfect candidate for an external plugin. You could create your own plugin, which provides Canvas Support in NativeScript.
For further info, you could review the following articles:
https://docs.nativescript.org/plugins/building-plugins
https://docs.nativescript.org/plugins/ui-plugin-composite
as well as this POC plugin, which was implemented for some of the oldest version of NativeScript.

As starting point, you could use nativescript-plugin-seed

Yes,

React Native for instance, comes with a Canvas plugin:

https://www.npmjs.com/package/react-native-canvas

We need something that can draw advanced UI on native script.
Please someone clone Canvas API into NativeScript. It would be great if NativeScript team do this professionally. If your UI looks better, of course more people will give attention. and I think this option should be included in NativeScript as a standard feature.

From what I see the react-native is using WebView for rendering the canvas. And it makes some kind of a bridge between the OS and the WebView,
I think this is more suitable for making games for example or drawing apps for example, not UI.

Yes,

Then how about sophisticated 3D style UI ?
https://www.youtube.com/watch?v=s9Qm99-aEkI&t=344s

Canvas can do something like this as well. and it only opens more opportunities to make better UIs!

So here's summary of my requests for NativeScript 4.0:

  • Missing CSS3 properties (psuedo classes: after, before, nth-child, text-shadow, box-shadow),
  • Canvas API
  • Proper support for SVG
  • More sliders with proper styling methods

@jamesharvey2 NativeScript is open-source and each community member can contribute and become part of the project by implementing functionality directly to the source code or creating own NPM plugins. More on how to contribute can be found in this article. Marking this issue as a feature request.

@Nicklliev I'm sorry. I don't have that capability. I'm only able to use what's been programmed in general.
I wish this task can be handled professionally by talented people at Telerik. Many of user-made plugins are not perfect.

Anyone still interested in this can follow the progress here

You can check it out here feel free to open any canvas related issues there

Was this page helpful?
0 / 5 - 0 ratings