Questions tagged [sketch.js]

Sketch.js is an easy-to-use jQuery plugin that allows you to create canvases upon which visitors can draw.

Description

Sketch.js is an easy-to-use jQuery plugin that allows you to create canvases upon which visitors can draw. The code is partially inspired by William Malone's drawing app tutorial as well as CanvasPaint.

Links

Sketch.js

GitHub

10 questions
2
votes
1 answer

my dist() function in p5.js can't go less than a certain number

My dist() function in my game project is not working for less than 130 or above and the distance between the character and the collectible didn't go less than 130 even when it,s on top. for example in my game project. distance = dist( …
Oluwaseun
  • 43
  • 6
2
votes
0 answers

element.parent() isn't working - doesn't format anything on the webpage?

Edit: Also should mention that I didn't write the js file...I just added the canvas.parent()line so I could integrate it with the rest of our website. This is a group project. This might be a silly question but for some reason I can't get my…
parchinkos
  • 21
  • 3
2
votes
1 answer

Load an sketch.js dynamically in p5.js

I'm trying to launch sketch.js when I click on the "start game" button. This is my code: //THIS IS THE CODE FOR SKETCH.JS WITH THE PACMAN GAME.... var rocaImage; var foodImage; var grapeImage; var pacManImage; var roca; var myMaze; var…
1
vote
2 answers

coffeeScript Implementation in html

Actually i am new to Coffeescript and sketch.js. So i wanted to know the way i can implement coffeescript in html. To be precise i want to implement http://codepen.io/anon/pen/YVxzyJ the sketch.js bubble example in html5 canvas where it includes…
1
vote
2 answers

Sketch.js : Change default brush size

I am using sketch.js library to draw something on canvas. Basically what I need is that the default brush size seems big to me. I want to change the default brush size. Please help in this. I have looked in this link…
Ashish
  • 468
  • 2
  • 8
  • 24
0
votes
1 answer

I am having sketch.js with particles but the particles are over my navbar so the links are not clickable

I am using particles.js by sketch.js It is a nice effect and I want to use it but when I am doing so it is placed over my website's navbar and thus the links are not clickable I tried Z-INDEX : 99999;, but it still "overlaps my nabvar"
Dev Shah
  • 60
  • 5
0
votes
0 answers

p5.js - sketch.js tries to download tar-files

I have a webpage where I integrated p5 and sketch.js for a canvas animation. The page tries to download arbitrary tar-files every now and then and I can't figure out why. I disabled CCapture and all the keystrokes that seem to trigger a…
Swissdude
  • 3,486
  • 3
  • 35
  • 68
0
votes
1 answer

Assign animated gif to player function

I'm creating an infinite sidescroller running game. I've hit a snag when trying to apply an image to my player icon – (function Player which is currently a red square) – which causes the game to deliver the error: Uncaught TypeError: This is.css is…
Huginn
  • 480
  • 2
  • 6
  • 21
0
votes
1 answer

Resizing Image Without Affecting Look of Original Canvas?

I have a canvas where a user draws. After tapping a button, I do a few things in a second canvas such as trimming away the white space and re-centering the drawing (so as to not affect the original canvas). I also create a third canvas so I can…
KingPolygon
  • 4,753
  • 7
  • 43
  • 72
-1
votes
1 answer

How do I make my health bar decrease based on damage received?

So basically I'm trying to create a shooter game. But a problem arose while trying to implement a health bar function for the player. Although I did manage to create a health bar that reduces or decreases based on its value, I can't change its value…