How to make a video attached to a matter.js body/composite?
var body = Bodies.circle(
Common.random(10, render.options.width),
Common.random(10, render.options.height),
radius,
{
render: {
sprite: {
texture: 'jaime.mp4'
}
},
mass: Common.random(150, 160),
frictionAir: 0,
plugin: {
attractors: [
MatterAttractors.Attractors.gravity
],
wrap: {
min: { x: 0, y: 0 },
max: { x: render.options.width, y: render.options.height }
}
}
}
)
World.add(world, body);
};
when I see render it, I don't see anything but a blank black body.