From 38b2a0d6928a7e29d7ac7a2332c3cccb1708ad30 Mon Sep 17 00:00:00 2001 From: Richard Knight Date: Mon, 24 Aug 2020 14:47:08 +0100 Subject: initial --- web/main2.js | 194 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 194 insertions(+) create mode 100644 web/main2.js (limited to 'web/main2.js') diff --git a/web/main2.js b/web/main2.js new file mode 100644 index 0000000..6d3108a --- /dev/null +++ b/web/main2.js @@ -0,0 +1,194 @@ +var ReReReRe = function() { + $("#nojs").remove(); + var cnt = 0; + var inuse = []; + var res = [window.innerWidth, window.innerHeight]; + var canvas = $("").attr("width", res[0]).attr("height", res[1]).css("position", "absolute").css("width", "100%").css("height", "100%").appendTo($("body")); + var context = canvas[0].getContext("2d"); + var sources = []; + var supportedGCO = (function getGCOModes() { + var ctx = document.createElement('canvas').getContext('2d'); + //var gCO = ["source-over", "source-in", "source-out", "source-atop", "destination-over", "destination-in", "destination-out", "destination-atop", "lighter", "copy", "xor", "multiply", "screen", "overlay", "darken", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"]; + var gCO = ["destination-atop", "lighter", "copy", "xor", "multiply", "screen", "overlay", "darken", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"]; + return gCO.filter(function(g) { + ctx.globalCompositeOperation = g; + return ctx.globalCompositeOperation === g; + }); + })(); + + var enabledGCO = {}; + supportedGCO.forEach(function(val) { + var item = $("