dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Hi I'm new to javascript and I have two questions

  1. #1
    Join Date
    Jan 2013
    Posts
    1

    Hi I'm new to javascript and I have two questions

    1) Does all javascript focus on displaying things on a canvas?

    2) Can I have help with collision detection involving rectangles and circles? I know how to find if a certain point has collided with a circle ["if(dist(x1, y1, cirlceX, circleY) < circleSize / 2) {...}"] but I don't know how to tell if an entire rectangle has collided with a circle, unless I write an incredibly large amount of code.

  2. #2
    Join Date
    Mar 2009
    Posts
    521
    (1) No--javascript is a thing apart that has access to things in the DOM, like a canvas element. It really doesn't care if such things as a canvas element even exists.
    (2) Yes- you might have to write an incredibly large amount of code.

  3. #3
    Join Date
    Oct 2010
    Location
    Versailles, France
    Posts
    1,272
    For collision, this page seems useful...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles