Sign in to follow this  
Thomasdah

Create Textures from PIXI.Text

Recommended Posts

For my Pixi Project, i need to display 4 short numbers:  15, 30, 45 and 60  over 200 times on my stage.

Also, on window resize - the text will get resized not based on linear window dimensions.

Because of this, i think it is a good strategy to create textures for those 4 numbers and use them when i create the sprites.

var minute = new PIXI.Sprite(minute_30_texture);

 

My Problem: i am not able to create Sprites from PIXI.Text("30").texture;

var texture = new PIXI.Text("30").texture;

var sprite = new PIXI.Sprite(texture);

the rendered sprite will not show anything. (using pixi 4.0.3)

 

Anyone with the same problem?

Share this post


Link to post
Share on other sites
On 2/12/2020 at 10:14 AM, MariaK said:

how you can do it? i have the same problem..

@MariaK

Welcome to the forums!

There is a thing I call a telepathy - how fast someone can determine the other person problem without reproducible demo. Sometimes people guess right by only a few words, yes, but it takes experience.

Thomasdah has 2 posts.  His last post was in 2016. You have 0.1% probability that this kind of question will be answered by someone in a week.

I recommend you to reformulate your question, give more information and maybe explain what in my solution is difficult to understand. Reproducible demo is the best attachment to question, but we can try use my telepathy.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.