If I try to add a background image to an entity, the image is displayed on a completely wrong position. The Image has a size of 100x100px and I use imageStretchToFit for scaling.
My code looks like the following:
var canvas = document.getElementById("canvas"),
world = boxbox.createWorld(canvas);
var floor = world.createEntity({
width: 35,
height: 0.5,
color: "#000000"
}, {
x: 0,
y: 16,
type: "static"
});
var torso = world.createEntity({
width: 5,
height: 5,
// screenshot 1:
/*color: "#FF0000",
borderColor: "#FF0000",
borderWidth: 1,*/
// screenshot 2
image: "background.png",
imageStretchToFit: true
}, {
x: 3,
y: 7,
type: "dynamic"
});


What am I doing wrong?
If I try to add a background image to an entity, the image is displayed on a completely wrong position. The Image has a size of 100x100px and I use imageStretchToFit for scaling.
My code looks like the following:
What am I doing wrong?