Skip to content

Commit 60079f1

Browse files
committed
Release 2.0.0
1 parent a4c434c commit 60079f1

File tree

16 files changed

+13
-43
lines changed

16 files changed

+13
-43
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# lazy-brush - smooth drawing with a mouse, finger or any pointing device
22

3+
![lazy-brush banner](public/og.png?raw=true "Lazy Brush in action")
4+
35
**[Demo drawing app](https://lazybrush.dulnan.net)**
46

57
__The demo app also uses

demo-src/components/Icons/Github.vue

Lines changed: 0 additions & 13 deletions
This file was deleted.

demo-src/components/Icons/Menu.vue

Lines changed: 0 additions & 12 deletions
This file was deleted.
File renamed without changes.
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import { ref, onMounted, onBeforeUnmount, watch } from 'vue'
2222
import LazyBrush from '../../src/LazyBrush'
2323
import { Point } from '../../src/LazyPoint'
24-
import { Catenary } from 'catenary-curve'
24+
import { getCatenaryCurve, drawResult } from 'catenary-curve'
2525
2626
const DRAW_MAX_DPI = 2
2727
@@ -82,8 +82,6 @@ const lazy = new LazyBrush({
8282
}
8383
})
8484
85-
const catenary = new Catenary()
86-
8785
function onMouseDown() {
8886
isPressing.value = true
8987
}
@@ -186,12 +184,12 @@ function drawInterface() {
186184
ctx.setLineDash([5 * stretchFactor, 5 * stretchFactor])
187185
ctx.strokeStyle =
188186
pullOffset > -0.1 ? styleVariables.colorCatenary : 'rgba(0,0,0,0.3)'
189-
catenary.drawToCanvas(
190-
ctx,
187+
const result = getCatenaryCurve(
191188
brush,
192189
{ x: x.value, y: y.value },
193190
props.lazyRadius
194191
)
192+
drawResult(result, ctx)
195193
ctx.stroke()
196194
}
197195
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,6 @@
2626
</template>
2727

2828
<script lang="ts" setup>
29-
defineEmits(['update:enabled', 'clear'])
30-
31-
defineProps({
32-
enabled: {
33-
type: Boolean,
34-
default: false
35-
}
36-
})
37-
3829
const links = [
3930
{
4031
href: 'https://github.com/dulnan/lazy-brush',
File renamed without changes.

0 commit comments

Comments
 (0)