Currently GX.Games exporter allows to set interpolation between pixels like other exporters, but, since HTML5 <canvas> is also resized in most of cases, whole game is still distorted, until there's image-rendering: smooth; added in CSS for <canvas> element.
This is checkbox which does that, but only for published games:
There's no way to do such thing when testing locally (especially if game runs in default browser instead of Opera GX), and requires updating CSS every time, manually. This is very time consuming.
Examples:
<canvas> with default, settings:
gpu interpolation off (gpu_set_tex_filter(false)):
gpu interpolation ON (scaled images are blurred, but because of canvas resize they are distorted):
<canvas> with image-rendering: smooth;, settings:
gpu interpolation off:
gpu interpolation ON:
Describe the solution you'd like
a) Ability to enable canvas interpolation from IDE
b) Ability to use custom index.html file same as for HTML5
Describe alternatives you've considered
New function, which allows to change that in-game:
gx_set_canvas_rendering([bool]) - whether to turn image-rendering: smooth; or image-rendering: pixel, by constants:
Is your feature request related to a problem?
Currently GX.Games exporter allows to set interpolation between pixels like other exporters, but, since HTML5
<canvas>
is also resized in most of cases, whole game is still distorted, until there'simage-rendering: smooth;
added in CSS for<canvas>
element.This is checkbox which does that, but only for published games: There's no way to do such thing when testing locally (especially if game runs in default browser instead of Opera GX), and requires updating CSS every time, manually. This is very time consuming.
Examples:
<canvas>
with default, settings:gpu_set_tex_filter(false)
):<canvas>
withimage-rendering: smooth;
, settings:Describe the solution you'd like
a) Ability to enable canvas interpolation from IDE b) Ability to use custom index.html file same as for HTML5
Describe alternatives you've considered
New function, which allows to change that in-game:
gx_set_canvas_rendering([bool])
- whether to turnimage-rendering: smooth;
orimage-rendering: pixel
, by constants:gx_canvas_rendering_smooth
=true
gx_canvas_rendering_pixel
=false
.Additional context
No response