Skip to content

Commit

Permalink
Release 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dulnan committed Jan 8, 2023
1 parent a4c434c commit 60079f1
Show file tree
Hide file tree
Showing 16 changed files with 13 additions and 43 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# lazy-brush - smooth drawing with a mouse, finger or any pointing device

![lazy-brush banner](public/og.png?raw=true "Lazy Brush in action")

**[Demo drawing app](https://lazybrush.dulnan.net)**

__The demo app also uses
Expand Down
13 changes: 0 additions & 13 deletions demo-src/components/Icons/Github.vue

This file was deleted.

12 changes: 0 additions & 12 deletions demo-src/components/Icons/Menu.vue

This file was deleted.

File renamed without changes.
File renamed without changes.
8 changes: 3 additions & 5 deletions demo-src/components/Scene.vue → demo/components/Scene.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import { ref, onMounted, onBeforeUnmount, watch } from 'vue'
import LazyBrush from '../../src/LazyBrush'
import { Point } from '../../src/LazyPoint'
import { Catenary } from 'catenary-curve'
import { getCatenaryCurve, drawResult } from 'catenary-curve'
const DRAW_MAX_DPI = 2
Expand Down Expand Up @@ -82,8 +82,6 @@ const lazy = new LazyBrush({
}
})
const catenary = new Catenary()
function onMouseDown() {
isPressing.value = true
}
Expand Down Expand Up @@ -186,12 +184,12 @@ function drawInterface() {
ctx.setLineDash([5 * stretchFactor, 5 * stretchFactor])
ctx.strokeStyle =
pullOffset > -0.1 ? styleVariables.colorCatenary : 'rgba(0,0,0,0.3)'
catenary.drawToCanvas(
ctx,
const result = getCatenaryCurve(
brush,
{ x: x.value, y: y.value },
props.lazyRadius
)
drawResult(result, ctx)
ctx.stroke()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@
</template>

<script lang="ts" setup>
defineEmits(['update:enabled', 'clear'])
defineProps({
enabled: {
type: Boolean,
default: false
}
})
const links = [
{
href: 'https://github.com/dulnan/lazy-brush',
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
</head>
<body>
<div id="app"></div>
<script type="module" src="/demo-src/index.ts"></script>
<script type="module" src="/demo/index.ts"></script>
</body>
</html>
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "lazy-brush",
"version": "1.0.1",
"version": "2.0.0",
"description": "Lazy brush - smooth drawing using mouse or finger",
"type": "module",
"files": [
"lib"
],
"main": "./lib/lazy-brush.umd.cjs",
"module": "./lib/lazy-brush.js",
"types": "./lib/main.d.ts",
"exports": {
".": {
"import": "./lib/lazy-brush.js",
Expand Down Expand Up @@ -41,7 +42,7 @@
"@types/node": "^18.11.18",
"@vitejs/plugin-vue": "^4.0.0",
"autoprefixer": "^10.4.13",
"catenary-curve": "^1.0.1",
"catenary-curve": "^2.0.0",
"postcss": "^8.4.20",
"prettier": "^2.8.1",
"sass": "^1.57.1",
Expand Down
2 changes: 2 additions & 0 deletions public/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
https://lazy-brush.netlify.app https://lazybrush.dulnan.net
https://lazy-brush.netlify.app/ https://lazybrush.dulnan.net/
2 changes: 1 addition & 1 deletion tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
module.exports = {
content: [
"./index.html",
"./demo-src/**/*.{vue,js,ts,jsx,tsx}",
"./demo/**/*.{vue,js,ts,jsx,tsx}",
],
theme: {
extend: {
Expand Down
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default defineConfig({
insertTypesEntry: true
})
],
publicDir: false,
build: {
outDir: 'lib',
lib: {
Expand Down

0 comments on commit 60079f1

Please sign in to comment.