fix image path
This commit is contained in:
parent
d1e0cc0f0c
commit
5152ea259e
1
.github/workflows/main.yml
vendored
1
.github/workflows/main.yml
vendored
@ -19,6 +19,7 @@ jobs:
|
||||
mkdir dist
|
||||
mv *.js dist/
|
||||
mv *.html dist/
|
||||
mv rose.png dist/
|
||||
- name: Setup Pages
|
||||
id: pages
|
||||
uses: actions/configure-pages@v5
|
||||
|
2
image.ts
2
image.ts
@ -5,7 +5,7 @@ if (!ctx) throw new Error("unable to get canvas 2D context");
|
||||
|
||||
const img = new Image();
|
||||
img.crossOrigin = "anonymous";
|
||||
img.src = "/rose.png";
|
||||
img.src = "rose.png";
|
||||
img.onload = () => {
|
||||
/*canvas.offscreenCanvas = document.createElement("canvas");
|
||||
canvas.offscreenCanvas.height = img.height;
|
||||
|
Loading…
x
Reference in New Issue
Block a user