Skip to content
Advertisement

How to scale a three.js sprite?

I am trying to display a sprite in three on javascript and make it bigger. I tried the following:

JavaScript

and

JavaScript

but the sprite was very very tiny in the middle of the browser window. I saw no error on the console.

What am I doing wrong?

Advertisement

Answer

Sprite.size does not exist. Try to modify Sprite.scale instead. Check out the following live example:

JavaScript
JavaScript
JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement