Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6951991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:17:26+00:00 2026-05-27T14:17:26+00:00

I know HTML5 canvas fairly well, I know the basics and animation using loops

  • 0

I know HTML5 canvas fairly well, I know the basics and animation using loops etc.

Demo I’m working with: (click to make shapes) http://henry.brown.name/experiments/box2d/example-canvas.html

What I’m not very familiar with is Box2D. I’m using the Box2DWeb port, I heard it was newer than Box2D-js, I’m not sure which is best.

I know how to initialize the ‘world’ and I can place objects in the world. I then use Step to animate the world – however to display it on the screen so far I’ve only been able to get it working with debug draw as it basically does everything for you.

Instead of using debug draw I’d like to use canvas to draw, for example a car instead of just a square. How do I attach the physics of a square to the image of a car? I just can’t get my head around integrating canvas with Box2D.

Any tips will be massively appreciated!

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:17:27+00:00Added an answer on May 27, 2026 at 2:17 pm

    If you aren’t familiar with Box2D you should check out the documentation at http://www.kyucon.com/doc/box2d/. This should tell you all of the properties you need. To my knowledge the standard way of using Box2D is to attach an image with userData. See this example tutorial for image and Canvas image usage.

    http://www.jeremyhubble.com/box2d.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a html5 canvas game, but I don't know how to handle
Using the HTML5 <canvas> element, I would like to load an image file (PNG,
Most of us know that HTML5 Canvas element is having much better support with
Does anyone know how to do the following things sequentially on an HTML5 canvas
I'm trying to resize a HTML5 canvas element using jQuery. (NOTICE: Not the objects
I seem to be experiencing varying performance using an HTML5 canvas based on the
I'm trying replace HTML5 Canvas to simple <div> But I don't know how to
I have made a snake game using javascript and HTML5 Canvas element. It can
I wanted to know if Html5 supports shape translation in canvas..For instance I have
I wanted to know if it is possible to create an image using html5.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.