From ae955c0229e46057ad1102896b545f6ded70c770 Mon Sep 17 00:00:00 2001 From: Dev 1 Date: Thu, 14 Sep 2023 20:28:59 +0530 Subject: [PATCH] some changes in tracing game --- public/assets/svg/pen.svg | 1 + src/pages/tracing/index.astro | 188 +++++++++++++++++++++------------- src/pages/tracing/temp.astro | 77 ++++++++++++++ 3 files changed, 192 insertions(+), 74 deletions(-) create mode 100644 public/assets/svg/pen.svg diff --git a/public/assets/svg/pen.svg b/public/assets/svg/pen.svg new file mode 100644 index 0000000..f5a336b --- /dev/null +++ b/public/assets/svg/pen.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/pages/tracing/index.astro b/src/pages/tracing/index.astro index 0ec3ccd..90b1d78 100644 --- a/src/pages/tracing/index.astro +++ b/src/pages/tracing/index.astro @@ -1,89 +1,129 @@ --- -import Layout from '../../layouts/Layout.astro'; +import Layout from "../../layouts/Layout.astro"; --- - +
+
- -
+
- + this.input.on('pointermove', function (pointer) { + if (isDragging) { + graphics.lineTo(pointer.x, pointer.y); + graphics.strokePath(); + } + }, this); + this.input.on('pointerup', function () { + isDragging = false; + graphics.closePath(); + }, this); + } + + function update() {} + + \ No newline at end of file diff --git a/src/pages/tracing/temp.astro b/src/pages/tracing/temp.astro index e69de29..7f60552 100644 --- a/src/pages/tracing/temp.astro +++ b/src/pages/tracing/temp.astro @@ -0,0 +1,77 @@ +--- +import Layout from "../../layouts/Layout.astro"; +--- + +
+
+ +
+ +
+
+ + \ No newline at end of file