[READ-ONLY] Mirror of https://github.com/flo-bit/jazz-endless-canvas. infinite multiplayer drawing canvas in the browser, jazz, svelte, paper.js flo-bit.dev/jazz-endless-canvas/
0

Configure Feed

Select the types of activity you want to include in your feed.

add +/- zoom

+7
+1
src/routes/+page.svelte
··· 70 70 Select the "paint" tool to draw on the canvas (you can also change the color and stroke 71 71 width) 72 72 </li> 73 + <li>Zoom with + and - or pinch on mobile</li> 73 74 <li>Send this website to your friends to draw together</li> 74 75 </ul> 75 76
+6
src/routes/Draw.svelte
··· 287 287 } else if (e.code === 'KeyD') { 288 288 scope?.view.translate(new paper.Point(-move, 0)); 289 289 } 290 + 291 + if (e.key === '-') { 292 + onZoom(0.2, [window.innerWidth / 2, window.innerHeight / 2]); 293 + } else if (e.key === '+') { 294 + onZoom(-0.2, [window.innerWidth / 2, window.innerHeight / 2]); 295 + } 290 296 }); 291 297 292 298 const gesture = new PinchGesture(canvas, (e) => {