Simple3D is an extension for TurboWarp that provides a graphics API for making visually simple GPU accelerated 3D and 2D projects. By limiting the scope of the extension, the goal is to make it a perfect extension for the projects that need this type of 3D, instead of trying to do a bit of everything poorly. A big part of that is providing features to let (or force) projects to be made in optimized ways, even if they come at an expense of making extension more confusing and difficult to use.
Design goals:
-
Simple3D is only meant for rendering.
This means no collison, physics, pathfinding, etc. is supported or will ever be added. In most cases those things are implemented independently from rendering, using much simpler shapes and different representation in memory, so there is no reason to tie them to rendering. Simple3D doesn't even store mesh geometry in RAM, only in VRAM, which CPU doesn't have fast access to. Collision is done on CPU and requires storing data in RAM. This means that you have a freedom of choice to do collision in any way you like, either by using scratch code or any other extension. And regardless of what you choose, you will not be wasting RAM by storing duplicate data. -
Simple3D is only meant for simple looking 3D graphics.
This means no shaders, lighting, PBR maps, volumetrics, bloom, etc. are planned for this extension. This is in fact the main reason why it is called Simple3D, not because it is simple to learn or use. This also leaves room for possible future extensions like Advanced3D with shaders (do everything yourself) or Realistic3D with many of those effects built-in. There are currently no plans to make those extensions. -
Simple3D is a graphics API, not a 3D Engine.
Simple3D does not keep track of objects, cameras, etc. The project that uses extension is responsible for keeping track of all of that. The extension has no clue of where everything is, as the only thing it receives from the project is the constant stream of drawing commands, that it just sequentially executes. Projects don't have to use 3 trasformations in the intended predicatable ways, so Simple3D cannot even determine what type of projection with which settings the project is using. That is why occlusion culling and frustum culling are not done by the extension. It's responsibility of the project and only the project knows neccessary information to perform it. -
Simple3D is also meant for 2D projects and image processing.
Despite it's name, it can also just as easily be used to make fully 2D projects with some more advanced rendering effects than what is possible with normal scratch, or processing images by resizing, rotating, cropping, recoloring, combining, cutting out, adding text, etc. For processing images, extension provides ways to import images from URLs, data URIs, lists of pixel colors, costumes as well as ways to export resulting images as data URIs or lists of pixel colors, making results usable with both other extensions (like Skins) and scratch code.
To prevent confusion, referring to this extension as "Simple3D" is preferred over "Simple 3D".
Licensing
Most of the extension is licensed under Mozilla Public License Version 2.0 with the exception of m4 library from webglfundamentals.org, which is licensed under BSD 3 Clause license. TL;DR your modified versions of this extension must also be open-source (Gross simplification, go read the full license)
Not strictly required, but if you wish to port this extension to other scratch mod, it is preferable that you either maintain it up to date with and functionally close to the original version, retaining original versioning system alongside your own or rename it to something distinct if you wish to take development in a different direction, independant from original.