Package Exports
- @rbxts/better-gizmos
- @rbxts/better-gizmos/src/init.luau
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rbxts/better-gizmos) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
rbx-better-gizmos
The source code of constructing handles was taken from: https://www.npmjs.com/package/@rbxts/gizmo
Usage
The draw method call always returns a new Instance from the currently configured properties of the gizmo.
Global instance usage:
const output = Gizmo.point.draw(Vector3.zero)
// some time later
output.Destroy()Constructing new instances that inherit properties from the global one:
const gizmo = new Gizmo()
const output = gizmo.point.draw(Vector3.zero)
// some time later
output.Destroy()
gizmo.destroy()Note that you cannot destroy the global instance of the Gizmo.
Repeated usage
Usually you only want to render the latest version of the gizmo.
For this you have to do the following:
const arrow = Gizmo.arrow.default()
SomeEvent.Connect(() => {
Gizmo.arrow.assign(arrow, Vector3.zero, Vector3.zero.add(Vector3.one))
})
// when you no longer need to render arrow
arrow.Destroy()