Merry Christmas! Remember the true meaning of Christmas: For God so loved the world, that he sent is one and only Son (Jesus), that whoever believes in him will not perish (die), but have eternal (forever) life. John 3:16 Jesus came to save everyone, including you! Merry Christmas!
Special thanks to @Eliguy12 for fixing an error in the find color of texture part of the filler, and to @maDU59_ for looking through my mess of code to fix the lighting! Music is from Farming Simulator 18 by Giants Software. The game is now free on Google Play! (I was in a hurry or I would have changed it) "Pine Tree - PS1 Low Poly" (https://skfb.ly/oFnRn ) by Wersaus33 is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/ ). Transform point, add 3D triangle, set pen color to RGB, and set p to xyz blocks are by @CodingBio. 3D projection blocks are by @finnagin5. I looked at @CodingBio's engine to find how to detect points behind camera. FPS counter inspired by the one in https://scratch.mit.edu/projects/422631818 by @Howtomakeausername. The rotation functions used are by @Steelix1000. The textured triangle filler that includes z buffer is by @KryptoScratcher, shared by @Bambozzle. @S_Tutorials for the Z-clipping case blocks from 's tutorials. Thanks to for letting me know that UVs are clipped in the same way as X and Y. helped fix lighting. for some helpful feedback on lighting gave me some list index to screen coordinate formulas, and wrote the code for finding surface normals. I followed 's tutorial for sorting here. Big thanks to . CodingBio's tutorials on 3D really helped me learn about 3D, as well as looking at the code in the last demo in part 5 of the series (This helped with putting some blocks in). Backface culling uses matrices as I found here: https://math.stackexchange.com/questions/1324179/how-to-tell-if-3-connected-points-are-connected-clockwise-or-counter-clockwise