Introducing THREE.Image
See original GitHub issueMoved the discussion from #5728 to a separate issue.
The idea is to add THREE.Image
as an additional class which is used by THREE.Texture
. An instance of THREE.Image
is directly mapped to an instance of WebGLTexture
(the raw WebGL texture object). That means multiple textures can refer to the same instance of THREE.Image
and not causing redundant texture uploads anymore (related issues #5728, #5821, #7223)
Ideally, THREE.Image
will make the handling of image objects transparent (e.g. the difference in HTMLImageElement
, ImageBitmap
or the image stub in DataTexture
is encapsulated in this new class).
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Three Image Photo Frame Template In Photoshop
In this tutorial, learn how to create a simple three-image photo frame in Photoshop, then how to easily convert the final result into...
Read more >Introduction Through 3-image Collage - eLearningDom
Introduction Through 3-image Collage. An introduction template with a collage of three images to present objectives, summary or key learning points.
Read more >Set the Scene with a Three-Picture Story | The Daily Post
Introducing : the three-picture story. ... The third image completes the scene by zeroing in on a detail, something you might not notice...
Read more >Quick Images | TEDD - Teacher Education by Design
In Quick Images, children are shown pictures displaying groups of objects or symbols, viewing each for only a few seconds.
Read more >Introduction to three-dimensional image processing
Introduction to three-dimensional image processing¶. Images are represented as numpy arrays. A single-channel, or grayscale, image is a 2D matrix of pixel ...
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
What would be the goals of this change? From the issues attached I see two:
repeat
andoffset
on the same texture, without duplicate GPU upload. Using multipleTHREE.Texture
instances would not duplicate data as long as the underlyingTHREE.Image
was reused.UniformsUtils.clone()
from causing duplicate GPU upload. CloningTHREE.Texture
instances would not duplicate data as long as the underlyingTHREE.Image
was not cloned.For (1), adding
THREE.Image
sounds like a good solution under the current API. Depending on how/if/when we are introducing NodeMaterial, there may be others:For (2), I’m not sure whether UniformsUtils really needs to clone textures, or could just copy by reference.
I don’t have an opinion for or against this change yet, just trying to understand the goal and whether the additional abstraction is the right solution.
THREE.Image
ended up being namedTHREE.Source
#22846