Closed atroy closed 8 years ago
Thanks for opening an issue!
I'm pretty swamped with work right now, but I'll do my best to come back to you with an answer as soon as possible, thanks for your patience!
Seems that I got a working solution. I used https://github.com/scijs/get-pixels to read the local image files and pushed this to a DataTexture.
@atroy Hey, I am stuck in the exact same place. Is there any way you could share your code on how you got it working?
Here's an example on how to use PNG as a texture: https://github.com/AVGP/three-software-renderer/blob/master/example/texture.js
The trick is to use a library (here PNG.js) to parse the pixel data from the image file and then transform that into a UInt8Array
to create a THREE.DataTexture
.
First I want to say thanks, for this lib. I tried with a few samples and it worked well, but at the moment I stuck at adding/loading textures with images.
I know use DataTexture -> I did, but without succuess. To load the images I used the a custom loader with fs.readFileSync.
So at the moment the mesh loads fine, but without texture.