Library

rendering

table

Rendering datatypes registered on the VM: Vector3, Vector2, CFrame, Color3, Color4 constructors and bridging helpers.

Functions

6

#rendering.world_to_screen(target: BasePart | Vector3) → Vector2, boolean

since 0.6.0a-alpha

Takes a BasePart or Vector3 and converts their 3D position to a 2D position on the screen. Returns the Vector2 and a boolean indicating if the 3D object is on the screen.

Aliasesworldtoscreen

Parameters

targetBasePart | Vector3

The object or position to project.

#rendering.is_on_screen(target: BasePart | Vector3) → boolean

since 0.6.0a-alpha

Takes a BasePart or Vector3, and returns a bool indicating if the 3D position is visible on the screen.

Aliasesisonscreen

Parameters

targetBasePart | Vector3

The object or position to check.

#rendering.mass_project(points: { Vector3 }) → { { Vector2, bool } }

since 1.6.12a-alpha

Projects an array of Vector3 in World space to Screen-space Vector2 objects. The projected points, with the boolean indicated if the point was within the bounds of the screen or not.

Parameters

points{ Vector3 }

The points to project.

#rendering.convex_hull_2d(points: { Vector2 }) → { Vector2 }

since 1.8.3-free

Computes the 2D convex hull of a point cloud using monotone chain (Andrew's algorithm) at O(n log n). The returned vertices are ordered counter-clockwise and contain no duplicates of the starting point at the end, so the result can be fed directly into immediate.convex_poly_filled. Input with fewer than three points is returned as-is.

Parameters

points{ Vector2 }

The point cloud to wrap.

#rendering.convex_hull_3d(points: { Vector3 }) → { vertices: { Vector3 }, faces: { { number, number, number } } }?

since 1.8.3-free

Computes the 3D convex hull of a point cloud (incremental Quickhull-style algorithm). Returns a table { vertices = { Vector3 }, faces = { { number, number, number } } } where each face is a triple of 1-based indices into vertices. Returns nil when the input has fewer than four points or is degenerate (all coplanar).

Parameters

points{ Vector3 }

The point cloud to wrap.

#rendering.get_window_size() → Vector2

since 1.9.10-beta

Returns the size of the Roblox (and thus Overlay) window, doesn't include any decorations (like top bar of the window)