G3DScript: Difference between revisions

From Glue3D Wiki, the free encygluepedia
Jump to navigationJump to search
g3dscript page
 
No edit summary
Line 1: Line 1:
Glue3DScript or G3DScript is a custom '''medium-high level''' [[wikipedia:Programming_language|programming language]] made for Glue3D. It's syntactically simple and interact with an [[Objects|object's]] data directly. Unlike a language like [[wikipedia:Godot_(game_engine)#GDScript|GDScript]], G3DScript is almost entirely setup of coded similar to [[wikipedia:Function_(computer_programming)|functions]], every block being made up of: a [[wikipedia:Class_(programming)|class]] (or a "category"), a name for [[wikipedia:Identification_(information)|identification]], and the block's [[wikipedia:Argument_of_a_function|arguments]]. This simple [[wikipedia:Syntax|syntax]] makes it easy to interpret for both developers and Glue3D itself.
<div style="color:green">''TODO: Add images so it's not text-heavy''</div>
 
'''G3DScript''', or '''Glue3DScript''' is a [[wikipedia:Programming_language|medium-high level programming language]] made for [[Glue3D]]. It's syntactically simple and interacts with an [[objects]] data directly. Unlike [[wikipedia:Godot_(game_engine)#GDScript|GDScript]], G3DScript is almost entirely set up of codes similar to [[wikipedia:Function_(computer_programming)|functions]], every block being made up of:  
 
* a [[wikipedia:Class_(programming)|class]] (or a "category")
* a name for [[wikipedia:Identification_(information)|identification]]
* block's [[wikipedia:Argument_of_a_function|arguments]].  
 
This simple [[wikipedia:Syntax|syntax]] makes it easy to interpret for both developers and Glue3D itself.


== '''How it works''' ==
== '''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. Even though these rendering modes are visually distinct, they still function the same, the only difference being you can edit and add "custom"<ref>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'''.</ref> 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 using it to show categories and their 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'''<ref>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.</ref> or '''blocks without definition'''<ref>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.</ref>.  
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"<ref>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'''.</ref> 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'''<ref>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.</ref> or '''blocks without definition'''<ref>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.</ref>.  
   
   
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.  

Revision as of 14:06, 31 May 2026

TODO: Add images so it's not text-heavy

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:

This simple 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.

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.

  1. 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.
  2. 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.
  3. 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.


[[Category:Stubs]]