mirror of
https://github.com/CNCKitchen/stlTexturizer.git
synced 2026-04-07 22:11:32 +00:00
refactor: simplify canvas filter support check
This commit is contained in:
+1
-7
@@ -60,13 +60,7 @@ const settings = {
|
||||
};
|
||||
|
||||
// ── Canvas filter support (Safari / iOS WebView don't support ctx.filter) ────
|
||||
const CANVAS_FILTER_SUPPORTED = (() => {
|
||||
try {
|
||||
const ctx = document.createElement('canvas').getContext('2d');
|
||||
ctx.filter = 'blur(1px)';
|
||||
return ctx.filter === 'blur(1px)';
|
||||
} catch (e) { return false; }
|
||||
})();
|
||||
const CANVAS_FILTER_SUPPORTED = 'filter' in CanvasRenderingContext2D.prototype;
|
||||
|
||||
/**
|
||||
* Box-blur one row of RGBA pixels (horizontal pass).
|
||||
|
||||
Reference in New Issue
Block a user