ShapeOptions
Defined in: client/api.d.ts:7657
A world-space shape for Shapes.create. Positions and sizes are world centimetres. With attachTo, every position is an offset from the anchor instead. Which fields a type reads: ring and sphere, center and radius; box, center, size and yaw; cylinder, center (its base), radius and height; polygon, points, minZ and maxZ; line, from and to.
Properties
Section titled “Properties”attachTo?
Section titled “attachTo?”
optionalattachTo?:number|"localPlayer"|null
Defined in: client/api.d.ts:7746
Follow the local player, or the entity with this network id (player, NPC, beast, world object, character). Hidden while it has no body on this client. null detaches.
center?
Section titled “center?”
optionalcenter?:Vec3
Defined in: client/api.d.ts:7666
ring, sphere, box: the centre. cylinder: the centre of its base. Default {0, 0, 0}, which is the anchor itself while attached. A Vector3 works.
color?
Section titled “color?”
optionalcolor?:string|ShapeColor|null
Defined in: client/api.d.ts:7726
Color of the outline (a line’s whole length), or a “#RRGGBB” string. Default opaque white; null draws no outline.
optionalfill?:string|ShapeColor|null
Defined in: client/api.d.ts:7731
Color of the surfaces the outline encloses (a ring’s disc, a sphere, a box’s faces, a cylinder’s wall, a polygon’s floor and walls), or a “#RRGGBB” string. Default null, no fill.
optionalfrom?:Vec3
Defined in: client/api.d.ts:7706
line: where it starts.
ground?
Section titled “ground?”
optionalground?:boolean
Defined in: client/api.d.ts:7741
Drop the shape’s origin (centre, a cylinder’s base, a polygon’s floor, a line’s start) onto the ground below it, re-found as an attached shape moves. Default false.
height?
Section titled “height?”
optionalheight?:number
Defined in: client/api.d.ts:7686
cylinder: how far it reaches up from its base.
optionalmaxZ?:number
Defined in: client/api.d.ts:7701
polygon: its top; equal to minZ (the default) for a flat polygon.
optionalminZ?:number
Defined in: client/api.d.ts:7696
polygon: its floor.
points?
Section titled “points?”
optionalpoints?:object[]
Defined in: client/api.d.ts:7691
polygon: 3 to 64 corners in order, edges not crossing.
x:
number
y:
number
radius?
Section titled “radius?”
optionalradius?:number
Defined in: client/api.d.ts:7671
ring, sphere, cylinder.
segments?
Section titled “segments?”
optionalsegments?:number|null
Defined in: client/api.d.ts:7721
ring, sphere, cylinder: how many sides a circle has, 3 to 256; 6 draws a hexagon. A sphere has half as many rings. Default null, which picks about one side per 30 cm of circumference, 24 to 128.
optionalsize?:Vec3
Defined in: client/api.d.ts:7676
box: full lengths along its own axes before yaw.
thickness?
Section titled “thickness?”
optionalthickness?:number
Defined in: client/api.d.ts:7716
Width of every drawn line, 0 to 1000. Default 8.
optionalto?:Vec3
Defined in: client/api.d.ts:7711
line: where it ends.
type:
"ring"|"sphere"|"box"|"cylinder"|"polygon"|"line"
Defined in: client/api.d.ts:7661
Which shape. A ring is a flat circle; set fill for a disc.
visible?
Section titled “visible?”
optionalvisible?:boolean
Defined in: client/api.d.ts:7736
Whether it draws. Default true.
optionalyaw?:number
Defined in: client/api.d.ts:7681
box: degrees about Z, turning +X toward +Y like an Unreal rotator. Default 0.