I'm currently working on a guide to export a c3 game with Cordova and built an app via Cocoon (not Canvas+, but WebView+).
However I stuck at the scaling issue (there was a workarround for C2, but the code has changed with c3).
Result (atm)
I tried to find the same code snippet in the c3 runtime.js file and I did, however it is changed.
Then
if (this.canvas)
{
this.canvas.width = Math.round(w * dpr);
this.canvas.height = Math.round(h * dpr);
if (this.isEjecta || this.isCocoonJs) //maybe this is better (Ask Ashley): if (this.isDomFree)
{
this.canvas.style.left = Math.floor(offx) + "px";
this.canvas.style.top = Math.floor(offy) + "px";
this.canvas.style.width = Math.round(w) + "px";
this.canvas.style.height = Math.round(h) + "px";
}
else if (this.isRetina && !this.isDomFree)
{
this.canvas.style.width = Math.round(w) + "px";
this.canvas.style.height = Math.round(h) + "px";
}
}
[/code:3cqlydma]
[b]Now[/b]
[code:3cqlydma]
if (this.canvas)
{
this.canvas.width = Math.round(w * dpr);
this.canvas.height = Math.round(h * dpr);
if (this.isRetina)
{
this.canvas.style.width = Math.round(w) + "px";
this.canvas.style.height = Math.round(h) + "px";
}
this.canvas.style.marginLeft = Math.floor(offx) + "px";
this.canvas.style.marginTop = Math.floor(offy) + "px";
}
if (this.overlay_canvas)
{
this.overlay_canvas.width = Math.round(w * dpr);
this.overlay_canvas.height = Math.round(h * dpr);
this.overlay_canvas.style.width = this.cssWidth + "px";
this.overlay_canvas.style.height = this.cssHeight + "px";
this.overlay_canvas.style.left = Math.floor(offx) + "px";
this.overlay_canvas.style.top = Math.floor(offy) + "px";
}
[/code:3cqlydma]
@Ashley I know you are not a friend of cocoon, however this issue also comes up while using WebView+. Do you now where we need to adjust the runtime.js file to get a fullscreen display?