Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rbxts/gizmo

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rbxts/gizmo

gizmo is a visual debug library designed for the Roblox game engine.

  • 3.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

About

gizmo is a visual debug library designed for the Roblox game engine.

Usage

API Reference

Types

The following types are supported:

  • point: Position
  • box: Orientation, Size
  • wirebox: Orientation, Size
  • sphere: Position, Radius
  • wiresphere: Position, Radius
  • line: Position, Position
  • arrow: Position, Position
  • ray: Position, Direction

gizmo.<type>.draw(...) -> void

Renders the gizmo for a single frame

gizmo.<type>.create(...) -> object

Creates a new object which can be rendered over multiple frames

gizmo.<type>.createWithStyle(optional_style, ...) -> object

Creates a new object and applies the style

const arrow = Gizmo.arrow.createWithStyle({
  color: new Color3(1, 0, 0),
  scale: 2
}, Vector3.zero, Vector3.one.mul(15));
object.enable() => void

Starts rendering the gizmo

object.disable() => void

Stops rendering the gizmo

object.update(...) => void

Updates the gizmos appearance

object.style

Controls the 'style' of the gizmo

object.setStyle(optional_style) => void

Controls the 'style' of the gizmo

arrow.setStyle({
  alwaysOnTop: true
})

gizmo.style

The global style used by default when creating or drawing a gizmo

Examples

Drawing an arrow frame-by-frame

RunService.PostSimulation.Connect(() => {
  Gizmo.arrow.draw(start, finish);
})

Drawing a ray frame-by-frame with style

RunService.PostSimulation.Connect(() => {
  //allows to apply the style to the temporary object
  Gizmo.arrow.drawWithStyle({
    alwaysOnTop: true,
    color: new Color3(1, 0, 0),
    scale: 2,
  }, start, finish);
})

Drawing an arrow with an object

const arrow = Gizmo.arrow.create(start, finish);
arrow.enable();

RunService.PostSimulation.Connect(() => {
  arrow.update(start, finish);
})

FAQs

Package last updated on 24 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc