03-02-2026, 08:42 PM
Hey @bplus, yes FillTriangle was added as part of the extended 2D library way back in version 0.7.0. Wow, it's been almost three years now.
Here's a link to the announcement post: https://qb64phoenix.com/forum/showthread.php?tid=1702
Here's an example where it was used in James Jarvis' poly fill program from this post: https://qb64phoenix.com/forum/showthread...8#pid19588
All that said, the 3D examples in this post don't use this, or any of the low level 2D drawing methods. There are two primary ways to interact with the HTML Canvas element:
1) the "2d" context
2) the "WebGL" context
QBJS was built using the 2d context drawing methods. The three.js library uses the WebGL rendering context and handles all of the complexity of creating the underlying triangles for us from these higher-level 3d shapes. Just to be clear, I did not write this library, I'm just creating a wrapper API for QBJS that makes it easy to call using QBasic syntax and integrate into a QBJS program.
Here's a link to the announcement post: https://qb64phoenix.com/forum/showthread.php?tid=1702
Here's an example where it was used in James Jarvis' poly fill program from this post: https://qb64phoenix.com/forum/showthread...8#pid19588
All that said, the 3D examples in this post don't use this, or any of the low level 2D drawing methods. There are two primary ways to interact with the HTML Canvas element:
1) the "2d" context
2) the "WebGL" context
QBJS was built using the 2d context drawing methods. The three.js library uses the WebGL rendering context and handles all of the complexity of creating the underlying triangles for us from these higher-level 3d shapes. Just to be clear, I did not write this library, I'm just creating a wrapper API for QBJS that makes it easy to call using QBasic syntax and integrate into a QBJS program.

