summaryrefslogtreecommitdiff
path: root/client/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/index.js')
-rw-r--r--client/index.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/index.js b/client/index.js
index 44984a7..56337cc 100644
--- a/client/index.js
+++ b/client/index.js
@@ -74,6 +74,7 @@ document.body.appendChild(canvas)
let count = 0
function down (e) {
drawing = true
+ intensity = Math.min(0.999, intensity + 0.08)
mouse.x = e.pageX / window.innerWidth
mouse.y = e.pageY / window.innerHeight
}
@@ -84,7 +85,7 @@ function move (e){
const dy = (mouse.y - y)
const v = Math.sqrt(dx*dx+dy*dy)
if (drawing) {
- intensity = Math.min(0.999, intensity + v*0.1)
+ intensity = Math.min(0.999, intensity + v*0.1 + 0.02)
inertialIntensity = Math.min(0.999, intensity)
if (intensity == 0.999) intensity -= (Math.random() * 0.4)
if (inertialIntensity == 0.999) inertialIntensity -= (Math.random() * 0.3)