PixelPerfect Sprite (feature request)
See original GitHub issueI love three.js but it amaze me that we are not able to render images in a scene without changing it’s properties.
On the left side the best result I could get with this config:
SpriteMaterial.sizeAttenuation = false
texture.minFilter = THREE.NearestFilter
sprite.scale = 0.008
On the right side the actual PNG pasted in Photoshop. I can achieve the result I want by overlapping a div and using CSS/HTML but I see this as a dirty solution.
Issue Analytics
- State:
- Created 3 years ago
- Comments:14
Top Results From Across the Web
2D Pixel Perfect | 5.0.3 - Unity - Manual
Enable this feature to snap Sprite Renderers to a grid in world space at render-time. The grid size is based on the Assets...
Read more >Pixel-perfect collisions - Feature requests - GDevelop Forum
You can use pixel-perfect between sprites objects by using the condition in “Sprite > Collision”. Darkhog ...
Read more >Pixel perfect line setting for pixel art brushes - Krita Artists
Pixel perfect line setting for pixel art brushes ... I use Krita as my main tool for creating illustration, textures, sprites, animation, etc;...
Read more >[Feature Suggestion] Pixel perfect mode. - Spine
So I'm thinking, would it be possible to implement a pixel perfect feature not only to pick bones positions but also (and way...
Read more >E01 Universal Render Pipeline & Pixel Perfect Camera
Project Repo: https://github.com/ecssiah/unity-player-controller-2dTo support the channel:Monthly Pledge: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Imagine that Three.js is ported in the future to a smart-tv device that support WebGL but does not have CSS+HTML. I don’t think Unity or any other 3D engine use CSS+HTML to solve this issue.
I’m sorry but this is not a real feature request since you can implement annotations or status bars with existing library features like sprites or the CSS renderers. I suggest you search in the forum for more information about this topic. Especially the following post explains how to implement health bars like in your screenshot in a web-based game:
https://discourse.threejs.org/t/sphere-health-bar/11890/5?u=mugen87
Classes like CSS2DRenderer might be helpful in this context.
BTW: Using HTML/CSS is not a dirty solution like you mentioned in your initial post. Many games used Flash in the past for implementing UIs. Using HTML/CSS with JS is definitely the better choice.