cocoon-canvasplus

1.0.1 • Public • Published

Cocoon Canvas+

Cocoon Canvas+ are multiplatform Javascript utilities that work in Canvas+. They are included in Canvas+ core, so it is not required to install anything else at the cloud. The required files, if so, will be injected automatically in your project. Only available in Cocoon.io projects.

deviceready event

The deviceready event fires when Cordova is fully loaded.

Unlike old CocoonJS plugins, Cocoon Canvas+ plugins need to wait for this event to start working.

Example

	document.addEventListener("deviceready", onDeviceReady, false);

	function onDeviceReady() {
	    // Cocoon Canvas+ code here
	}

You can learn more about Cordova events here

Canvas+ internal Webview

Canvas+ allows accessing a full DOM environment via Webview. Thus, there are two environments that live together: Canvas+ and WebView. Although both are two different JavaScript environments, Cocoon allows to render a transparent Webview on top of the Canvas+ OpenGL ES rendering context and it also provides a bidirectional communication channel between them. In this way, the final visual result seems to integrate both environments seamlessly.

However, as Cordova only injects automatically the required clobbers in the main webview engine, it is neccesary to add manually the following files to the content that will be sent and displayed in Canvas+ internal Webview:

Documentation

License

Mozilla Public License, version 2.0

Copyright (c) 2015 Ludei

See MPL 2.0 License

Readme

Keywords

none

Package Sidebar

Install

npm i cocoon-canvasplus

Weekly Downloads

1

Version

1.0.1

License

MPL 2.0

Last publish

Collaborators

  • ludei