matter-js
matter-js copied to clipboard
How to scale the world?
How to scale the world to get the effect of raising the camera above the world?
I do this:
Composite.scale(engine.world, 0.01, 0.01, {x:0,y:0}, true)
but it doesn't work
lookcenter={x:0,y:0}; Render.lookAt(render, { min: { x: lookcenter.x-render.options.width/2, y: lookcenter.y-render.options.height/2 }, max: { x: lookcenter.x+render.options.width/2, y: lookcenter.y+render.options.height/2 } });
For reference only.
lookcenter={x:0,y:0}; Render.lookAt(render, { min: { x: lookcenter.x-render.options.width/2, y: lookcenter.y-render.options.height/2 }, max: { x: lookcenter.x+render.options.width/2, y: lookcenter.y+render.options.height/2 } });
For reference only.
does not work