0.0.4 • Published 9 months ago

@rbxts/better-gizmos v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

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()
0.0.4

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago