canvas+

Canvas+ Quickstart guide

The Cocoon accelerated canvas (Canvas+ from now on) for 2D and WebGL is a highly optimized JavaScript Virtual Machine for iOS and Android that implements a subset of the HTML5 standard. Actually, this...

Store XMLHTTPRequest

Cocoon tries to be as HTML5 compliant as possible but sometimes, as we have full control over the JS environment, we see opportunities to add cool features that are not directly available in the stand...

Canvas+ Native Screenshot Share Extension

Disclaimer: This guide was originally written by Geograman. It has been published here with his consent. If yo want to access the original article you can do it clicking here. I would like to introd...

Canvas+ API

Canvas+ has some special API that are exclusive of this webview engine and that are not available in the other engines. Some of this features can also be accomplished with Cordova or a Cordova plugin...

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 a...

Memory management tips

Memory is a critical resource in HTML5/JavaScript game development, especially on mobile devices. In a desktop environment you can load tons of textures but on some low-end mobile devices you can reac...

NPOT textures

Canvas+ uses POT (Power Of Two) textures by default in 2d contexts. This is very useful for performance improvements, especially on mobiles with old GPUs. But it can waste memory on games that don’t...

Lazy loading

Another Canvas+ exclusive feature available on version 2.1 and higher we have added the “cocoonLazyLoad” boolean property to Image objects (we have also added a duplicate called “idtkLoadDispose...

Max memory thresold

This new Canvas+ exclusive feature exposes the “setMaxMemory” utility method. When the max memory threshold is set, Cocoon checks the total amount of texture sizes (images and canvases). When the ...

Texture reducer

Texture reducer is a Canvas+ exclusive feature. When your game targets all resolutions you need huge textures for iPad retina like devices and small textures for small mobile devices. A game developer...