forked from ppfun/pixelplanet
alpha: false back and no image smoothing on overlay
This commit is contained in:
parent
350878fe44
commit
ede3389d5a
|
@ -58,10 +58,10 @@ class Renderer2D extends Renderer {
|
|||
//--
|
||||
const viewport = document.createElement('canvas');
|
||||
viewport.className = 'viewport';
|
||||
const viewportCtx = viewport.getContext('2d');
|
||||
const viewportCtx = viewport.getContext('2d', { alpha: false });
|
||||
this.viewport = viewport;
|
||||
const canvas = document.createElement('canvas');
|
||||
const context = canvas.getContext('2d');
|
||||
const context = canvas.getContext('2d', { alpha: false });
|
||||
this.canvas = canvas;
|
||||
this.onWindowResize();
|
||||
//--
|
||||
|
|
|
@ -135,6 +135,7 @@ export function renderOverlay(
|
|||
const context = $canvas.getContext('2d');
|
||||
if (!context) return;
|
||||
|
||||
context.imageSmoothingEnabled = true;
|
||||
context.save();
|
||||
context.scale(offscreenScale, offscreenScale);
|
||||
context.globalAlpha = state.templates.oOpacity / 100;
|
||||
|
@ -176,6 +177,7 @@ export function renderSmallPOverlay(
|
|||
if (!context) return;
|
||||
|
||||
const relScale = scale / 3;
|
||||
context.imageSmoothingEnabled = true;
|
||||
context.save();
|
||||
context.scale(relScale, relScale);
|
||||
for (const template of templates) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user