How to scale Phaser.Image down?

I see Phaser.Image.scale property is of type Pixi.Point which is logical. But this means I would need to include separately Pixi.js for this to work.

I need something like:

earth.scale = new Pixi.Point(0.2, 0.2);

but this doesn’t work as I haven’t included Pixi.js.
Do i need to include it, or there is a better way to scale down a Phaser.Image on both X and Y axis?

Hmm, tried to includ pixi.min.js but i get “not constructor” error in console when i run

new PIXI.Point(0.2, 0.2);
earth.scale.set(0.2, 0.2);

http://phaser.io/examples/v2/sprites/scale-a-sprite

1 Like