Matter-js: Problems adding texture

Created on 9 May 2016  路  1Comment  路  Source: liabru/matter-js

Hi! I'm trying to add a texture to my experiment but my rectangle keeps the original stroke.

Is the code correct?

var letter = Bodies.rectangle(150, 150, 98, 90, {
            render: {               
                sprite: {
                    texture: 'blue.png'
                }
            }
        });

World.add(game_world, letter);

I looked into the slingshot and the beachballs examples and copied the code from there. Do I need to add any option to the Engine? Thanks in advance.

question

Most helpful comment

Did you set render.wireframes = false?

>All comments

Did you set render.wireframes = false?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ShadewEnder picture ShadewEnder  路  3Comments

253153 picture 253153  路  3Comments

moe091 picture moe091  路  3Comments

Titozzz picture Titozzz  路  4Comments

kunchenguid picture kunchenguid  路  3Comments