Repository navigation
General methods of G3 objects
There has been a lot of prebaked methods to make using G3 easier.
Some are on gui only (g3Gui), some on parts only (g3Part), and some on both (g3Any)
Adds to the g3Any's g3.point this new point. Think of this as defining an instantaneous velocity for the next frame
Automatically handles partial points (such as only inputting Rotation or Position)
Creates a shallow clone of the g3Any
g3Guis do NOT clone their children g3Gui, only their Parts
Cloning my GUI 5 times and using Velocity at Position (6, 0) every time without children GUI cloning
Destroys the g3Any AND all of its children and parts, if any
g3Any:CustomProperty(key: string, value: ~nil, customCallback:
(g3Any: g3.any, oldValue: ~nil, newValue: any) -> ()?)
Used as a constructor to add custom properties to the specific g3Any
Mostly an internal function, although you may find some use in it
Optionally define a custom callback when that value changes. On callback, passes the object, the old value, and the new value
This callback happens before the actual value is changed
--Setup
local gui = g3.NewGui("test")
gui:CustomProperty("myProperty", 50, function(_, oldValue, newValue)
print(oldValue, newValue)
end)
gui.myProperty = 5
gui.myProperty = "five"
--This code snippet prints out:
--50 5
--5 five
Mostly an internal function, but is useful if you are dealing with adding new instances parented to your g3Any.
Adds the instance to the top level of the g3Any table, while also handling unique naming and inheriting the g3Any's name
Doesnt automatically parent it to the g3Any
--Setup
local gui = g3.NewGui("test")
local iWantToBindThisInstance = Instance.new("Weld", gui.Model)
gui:BindPartToTable(iWantToBindThisInstance, "Weld")
--[[
This prints out
{
["BindPartToTable"] = "function",
["Clone"] = "function",
["CustomProperty"] = "function",
["Destroy"] = "function",
["Model"] = test,
["Velocity"] = "function",
["VelocityIterative"] = "function",
["Weld"] = test's Weld, -- Our new binded part
["__internal"] = ▶ {...}
}
]]
Functions the same as Velocity, but ALSO passes the velocity on to all of its children GUI
Used as a shorthand for easily adding new Surface Guis to parts
Made specifically for creating G3 GUIs from scratch, as it automatically attaches the Surface Gui to the back face
Default 100px per stud
Getting Started / Making new 3D GUI
General properties of G3 objects
Prevent GUI being hidden behind the Player
Prevent GUI being obscured by the surroundings
Boost performance by merging parts
If you are interested in G3 expanding beyond a passion project, or if you want to boost G3 along with its development and see more advanced features, please donate!
Donations mean a lot of me, as they are direct proof that I'm going in the right direction. Donating even a dollar would mean so much to not only me but the rest of my family.
