I'm using HTML5 Canvas to draw a GUI.
Image pattern fill works fine in browsers (including mobile), but when I use the Cocoon JS launcher on Android or iPad, the texture pattern is just shown as black.
var pattern = context.createPattern(imageResource,"repeat");
context.fillStyle = pattern;
context.fillRect(0,0,300,300);
Looking at the CocoonJS console, the texture is loading correctly, and context.drawImage() works fine with the same image.
The docs indicate that Canvas patterns are supported. Any ideas why pattern fill doesn't work in CocoonJS launcher?
Thanks
Canvas patterns are supported on CocoonJS. This example works fine on CocoonJS Launcher with POT and NPOT textures:
Please, share more code to reproduce the problem.