npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rbxts/jecs-gizmo

v1.0.2

Published

Utility for debug gizmos for Jecs.

Downloads

246

Readme

Jecs Gizmo

Utility for debug gizmos for Jecs.

Setup

  • Set all your components that you want to debug. Components that are not provided will not be usable. These are available.

    • transform for CFrames
    • position for Vector3 positions
    • direction for Vector3 directions
  • Call jecs_gizmo.world(world) before using it to set it up with your world.

  • Add jecs_gizmo.system() to your systems. Set the order after all your components are set so your gizmos show the up to date values.

local c = require(components)
local jecs_gizmo = require(jecs_gizmo)

jecs_gizmo.cframe = c.transform
jecs_gizmo.position = c.position
jecs_gizmo.direction = c.direction

jecs_gizmo.world(world)

return {
    system = function()
        jecs_gizmo.system()
    end
}

Usage

Use the components inside jecs_gizmo.gizmo to draw gizmos.

  • jecs_gizmo.gizmo.cframe for to draw CFrames. This draws the position and all of the direction vectors.

  • jecs_gizmo.gizmo.position for to draw positions, This also works with cframes, Drawing only the position.

  • jecs_gizmo.gizmo.direction for to draw directions. This also requires the component to have a position or cframe to draw where the direction starts from.

  • jecs_gizmo.gizmo.distance for to draw distances. This is used as a pair and it calculates the distance between the entity and the target. This requires both entities to have a position or cframe. And they can be mixed up. Like the entity having a cframe and the target having a position.

  • jecs_gizmo.gizmo.lookvector for to draw the CFrame's LookVector as an arrow from the CFrame's position.

local gizmo = require(jecs_gizmo).gizmo


-- [[ cframes ]]
local cube = world:entity()
world:set(cube, c.transform, CFrame.new(1, 1, 1))

world:add(cube, gizmo.cframe)
-- also works
world:add(cube, gizmo.position)


-- [[ positions ]]
local cube = world:entity()

world:set(cube, c.position, Vector3.new(1, 1, 1))
world:add(cube, gizmo.position)


-- [[ directions ]]
local cube = world:entity()
world:set(cube, c.transform, CFrame.new(2, 2, 2))
world:set(cube, c.direction, Vector3.new(0, 1, 0))
-- also works
world:set(cube, c.position, Vector3.new(0, 1, 0))

world:add(cube, gizmo.direction)


-- [[ distances ]]
local cube1 = world:entity()
local cube2 = world:entity()

-- works with any combination of cframes and positions
world:set(cube1, c.position, Vector3.new(1, 1, 1))
world:set(cube2, c.cframe, Vector3.new(10, 10, 10))

world:add(cube1, pair(gizmo.distance, cube2))


-- [[ lookvectors ]]
local cube = world:entity()
world:set(cube, c.transform,
    CFrame.new(1, 1, 1) * CFrame.Angles(0, math.pi / 2, 0)
)

world:add(cube, gizmo.lookvector)

Configuring the gizmo.

  • All of the jecs_gizmo.gizmo components accept a Style as a value. You can set this to change the style of the gizmo. A nil value will use the default style as well as an empty table.
local gizmo = require(jecs_gizmo).gizmo

local cube = world:entity()
world:set(cube, c.transform, CFrame.new(1, 1, 1))

world:set(cube, gizmo.cframe, {
    scale = true,
})
world:set(cube, gizmo.lookvector, {
    alwaysOnTop = true,
})

-- this is the equivalent of setting it to nil or using world:add instead
world:set(cube, gizmo.position, {})

Disabling the gizmo.

  • You can change jecs_gizmo.enabled to enable or disable the gizmo. You can modify it at any time.
local RunService = game:GetService("RunService")
local jecs_gizmo = require(jecs_gizmo)

function enable_gizmo()
    jecs_gizmo.enabled = true
end

function disable_gizmo()
    jecs_gizmo.enabled = false
end

jecs_gizmo.enabled = RunService:IsStudio()