How to maintain aspect ratio of texture
See original GitHub issueWhen rendering a image as a texture to a surface, I’ve noticed that the aspect ratio is off. How do I preserve the aspect ratio?
I’ve defined my surface as follows:
<Surface ref={(img) => { this.img = img; }}
width={Dimensions.get('window').width}
height={310}>
{activeFilter}
</Surface>
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Keeping Aspect ratio when applying a download texture to a ...
Hello, I download different textures (like profile pictures) from server and apply it to a plane. However, the textures have different sizes ...
Read more >Maintain aspect on Three.js texture - Stack Overflow
I hope I got you correctly, here is an option of how you can center it: var scene = new THREE.Scene(); var camera...
Read more >Creating a UV mapping that maintains the input texture aspect ...
To give a possible answer to the question on how to maintain aspect ratio of the texture asked on the Rhino Discourse ...
Read more >Aspect Ratio Fitter - Unity - Manual
The Aspect Ratio Fitter functions as a layout controller that controls the size of its own layout element. It can adjust the height...
Read more >Texture aspect ratios - Second Life Wiki
To get the aspect ratio of a prim, right-click it and select Edit from the pie menu, click the Object tab, then observe...
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
another alternative syntax is:
but it’s up to you 😉
This worked perfectly for my use case, it’s awesome work thanks again.
I used this technique: