From e420215dd7590b6401bbce9ade304cecc7eb1bd7 Mon Sep 17 00:00:00 2001 From: satopian Date: Thu, 4 May 2023 02:48:06 +0900 Subject: [PATCH] =?UTF-8?q?klecks=E8=B5=B7=E5=8B=95=E6=99=82=E3=81=AE?= =?UTF-8?q?=E3=83=AC=E3=82=A4=E3=83=A4=E3=83=BC=E3=82=922=E6=9E=9A?= =?UTF-8?q?=E3=81=AB=E3=80=82=E7=99=BD=E3=81=84=E8=83=8C=E6=99=AF=E3=83=AC?= =?UTF-8?q?=E3=82=A4=E3=83=A4=E3=83=BC+=E9=80=8F=E6=98=8E=E3=81=AA?= =?UTF-8?q?=E3=83=AC=E3=82=A4=E3=83=A4=E3=83=BC1=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- petitnote/template/basic/paint_klecks.html | 33 +++++++++++++--------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/petitnote/template/basic/paint_klecks.html b/petitnote/template/basic/paint_klecks.html index 10079fcd..112a43b0 100644 --- a/petitnote/template/basic/paint_klecks.html +++ b/petitnote/template/basic/paint_klecks.html @@ -129,33 +129,40 @@ klecks.openProject({ width: , height: , - - layers: [{ - name: 'Background', + layers: [{ + name: 'Background''背景', opacity: 1, mixModeStr: 'source-over', - image: (() => { const canvas = document.createElement('canvas'); canvas.width = ; canvas.height = ; const ctx = canvas.getContext('2d'); - //PSDがなく画像だけの時はcanvasに読み込む - var img = new Image(); - img.src = ""; - img.onload = function(){ - ctx.drawImage(img, 0, 0); - } + var img = new Image(); + img.src = ""; + img.onload = function(){ + ctx.drawImage(img, 0, 0); + } ctx.save(); ctx.fillStyle = '#fff'; ctx.fillRect(0, 0, canvas.width, canvas.height); ctx.restore(); return canvas; - })(), - }] - }); + })() + },{ + name: 'Layer 1''レイヤー 1', + opacity: 1, + mixModeStr: 'source-over', + image: (() => { + const canvas = document.createElement('canvas'); + canvas.width = ; + canvas.height = ; + return canvas; + })() + } + ]}); }