G3DScript: Difference between revisions
Deniskincses (talk | contribs) No edit summary |
Deniskincses (talk | contribs) No edit summary |
||
| Line 9: | Line 9: | ||
This simple [[wikipedia:Syntax|syntax]] makes it easy to interpret for both developers and Glue3D itself. | This simple [[wikipedia:Syntax|syntax]] makes it easy to interpret for both developers and Glue3D itself. | ||
== | == How it works == | ||
Glue3D has two rendering modes for [[scripts]], block-based editor and text-based editor, and developers can switch between these editor by changing the script editor tab, though most people prefer the block-based editor since it's easier visually and faster to use. | Glue3D has two rendering modes for [[scripts]], block-based editor and text-based editor, and developers can switch between these editor by changing the script editor tab, though most people prefer the block-based editor since it's easier visually and faster to use. | ||
| Line 16: | Line 16: | ||
A block can also only have 4 inputs, and they are typically one of 3 inputs types; strings, values, and variables. Though this isn't the same for some mods. | A block can also only have 4 inputs, and they are typically one of 3 inputs types; strings, values, and variables. Though this isn't the same for some mods. | ||
== References == | |||
<references /> | <references /> | ||
[[Category:Stubs]] | [[Category:Stubs]] | ||
Latest revision as of 20:00, 31 May 2026
G3DScript, or Glue3DScript is a medium-high level programming language made for Glue3D. It's syntactically simple and interacts with an objects data directly. Unlike GDScript, G3DScript is almost entirely set up of codes similar to functions, every block being made up of:
- a class (or a "category")
- a name for identification
- block's arguments.
This simple syntax makes it easy to interpret for both developers and Glue3D itself.
How it works
[edit | edit source]Glue3D has two rendering modes for scripts, block-based editor and text-based editor, and developers can switch between these editor by changing the script editor tab, though most people prefer the block-based editor since it's easier visually and faster to use.
Even though these rendering modes are visually distinct, they still function the same, the only difference being you can edit and add "custom"[1] blocks easier on the Text-based editor. In the block and text-based editors, the engine uses it's internal autocomplete list, which holds every category; each category containing every block, it's display name, and icon. The block-based editor uses it to show categories and the blocks on the sidebar, and the text based editor using it as an autocomplete. When programming in new blocks side effects can occur, like blocks without color[2] or blocks without definition[3].
A block can also only have 4 inputs, and they are typically one of 3 inputs types; strings, values, and variables. Though this isn't the same for some mods.
References
[edit | edit source]- ↑ a custom block in G3DScript is an unidentified block, they're not actually called this but they don't have any name. A custom block appears when a block is written or placed that doesn't have an entry in the engine's autocomplete, they appear white and are different from blocks without a color or blocks without definition.
- ↑ a block without color is when a category, input, or general text doesn't have an entry in the engine's text coloration list, which holds the brightness and color of a bunch of text, it's used to color whole blocks, some parts of block inputs, and a bunch of other important words.
- ↑ An undefined block is a block that doesn't have any code regarding it, usually categories have a function that typically read decoded G3DScript elements to determine what block it is and what code to run, but a n undefined block doesn't have this code or hasn't been hooked up yet.