Wizcorp / phonegap-plugin-wizCanvas

WizCanvas allows a developer to create a ultra-performant native canvas component. The view is based on the Ejecta framework and has WebGL support.
MIT License
43 stars 13 forks source link

Any way to have the plugin output to a canvas within the Cordova UIWebview? #18

Open rgillan opened 10 years ago

rgillan commented 10 years ago

Hi, We've been looking at ejecta for our Cordova app as a means of accelerating a reasonably complex canvas. Our main challenge is that we need to be able to have the canvas as part of a view containing other DOM with other application functionality. On the ejecta site itself they discuss the possibility of integrating with other applications (https://github.com/phoboslab/Ejecta/issues/251) and was hoping there was some suggestions if it's possible to have this plugin output to a canvas element integrated elsewhere in Cordova's DOM. Understand there will be some performance hit in doing this but would appreciate anyone who's got an idea whether this can be done or not. Thanks in advance Rob

rgillan commented 10 years ago

We have noticed in running up the iOS example that the wizCanvas runs above the underlying Cordova UIWebview. Whilst the setLayout will allow us to position it where we desire within the viewport, is there any way to have the UIWebview in front, or somehow overlay another div or canvas element over the wizCanvas? We have some HTML controls that we overlay on the canvas in our design and need the wizCanvas to be the rear of the "layers". Any help very much appreciated.

aogilvie commented 10 years ago

@rgillan Yes, you can add this plugin to your project for more UIWebViews - https://github.com/Wizcorp/phonegap-plugin-wizViewManager z-order is sorted by creation order. One cannot change the z-index after creation, unless you remove and re-create.