question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setting BaseTexture.resolution requires BaseTexture.update() prior to any effect

See original GitHub issue

In this pen, a 100x100 and a 200x200 image is loaded via resource loaded, with the latter set to resolution=2 and the former defaulting to resolution=1. Displaying sprites from these textures displays two equally sized textures on a renderer that has resolution=2.

I then use a PIXI.Graphics to generate the same sized textures and set resolution=2 on the second’s baseTexture. Without calling baseTexture.update() after setting the resolution, the second texture is rendered at the wrong size.

I think that his means that either BaseTexture.resolution should be a property setter that calls this, or, the documentation on the field should be updated to advise the required call to .update(), or, the field should be readonly.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
ivanpopelyshevcommented, Sep 11, 2016

Yeah, its a weird state. So

  • add a note to resolution in jsdocs
  • fix the weird state
0reactions
lock[bot]commented, Feb 25, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setting BaseTexture.resolution requires BaseTexture.update ...
In this pen, a 100x100 and a 200x200 image is loaded via resource loaded, with the latter set to resolution=2 and the former...
Read more >
PIXI.BaseTexture - PixiJS API Documentation
A Texture stores the information that represents an image. All textures have a base texture, which contains information about the source.
Read more >
pixi.js-legacy - UNPKG
baseTexture =false] - Only used for child Sprites if stageOptions.children is set. 1029, * to true. Should it destroy the base texture of...
Read more >
Determine when a PIXI texture is loaded to clone it
I have no way of determining whether it's loaded or not! Error: Texture Error: frame does not fit inside the base Texture dimensions:...
Read more >
Environmental Effects in 3D Graphics with XNA Game Studio 4.0
In this article you will know about environmental effects in 3D graphics with XNA Game Studio 4.0. You can further learn the fundamentals...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found