zz85 / threejs-term

Terminal Renderer for Three.js
71 stars 6 forks source link

Upgrade ThreeJS and Using WebGL Rendering #3

Open imgurbot12 opened 7 months ago

imgurbot12 commented 7 months ago

Hello, I love the creativity of this project and I plan on using this as inspiration for a personal project of mine using a more recent version of ThreeJS.

As a first test for my own implementation I was trying to see if I could upgrade this project to a more modern version of threejs and use the webgl rendering since the current canvas-renderer is no longer supported.

I've tried my best to follow along with how you've designed things and based my changes from your comments and notes but I'm having trouble getting the code to actually run. At the moment the objects fail to render and I'm not sure what I'm doing wrong.

I'm hoping for your help in finding the issue to hopefully get everything up and running so I might make a pull-request and update the repo to use something more applicable to the updated libraries. You can find the updated code in my fork over at: https://github.com/imgurbot12/threejs-term/tree/feat/webgl

Hope to hear from you soon. Thanks!

zz85 commented 6 months ago

hi! thanks for giving this a shot for upgrading to the webgl renderer. currently node-canvas or gl isn't building on my environment, so unless I test this on a different os, I can't run your code.

but looking at your code - perhaps the first thing is to check whether the rendering is failing at gl or canvas. I would remove the animation and attempt to render 1 or 2 frames and see if there's something in the image data and even just render it to the file first.

imgurbot12 commented 5 months ago

Hey, apologies for the slow response but thank you for the information. That's a good idea on where to start. I've been a bit distracted with other projects at the moment making it difficult to get back to this but I appreciate your help. Thanks again!