question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add texture to body

See original GitHub issue

I wanted to add a different texture to my recantagle like this:

var block = Bodies.rectangle(npos, ypos, 80, 80, {
                isStatic: true,
                render: {
                    sprite: {
                        texture: 'images/stone.png',
                        xScale: 2,
                        yScale: 2
                    }
                }
            }
        );

But the texture isn’t added?

If found this: https://github.com/liabru/matter-js/issues/120 But the link to the docs doesn’t work anymore.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
benjamingwynncommented, Dec 1, 2017

(disable wireframes with <render>.options.wireframes = false)

3reactions
liabrucommented, Oct 13, 2017

Make sure you disable wireframes on the renderer. Also check your console, there might be an error saying the image was not found?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding texture to a body - Autodesk Community - Fusion 360
Go to the internet to find textures/references/materials to create bitmap that You desire to use as texture (to create the material You could ......
Read more >
How to add body and texture to fine hair - LOOKFANTASTIC
How to add body and texture to fine hair · Cleanse and condition · Don't shy away from styling products · Spray away...
Read more >
Box2D Body with Texture? - java - Stack Overflow
Yes This is very much possible in libgdx. You just need to create a polygon region for that PolygonRegion region = new PolygonRegion(textureRegion, ......
Read more >
How to Select Fabric, Texture, Print & Patterns to Complement ...
Add Weight. Shiny texture reflects light. This is a great texture for emphasizing body curves, or adding weight and size.
Read more >
How Do I add a body Texture please? - Daz 3D Forums
I've managed to add 3rd part wardrobe items and such, but when I download the above skin, it is just a folder with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found