Skip to main content

WallBuilder

A builder for the Wall item.

Extends GenericItemBuilder

Example

import OBR, { buildWall } from "@owlbear-rodeo/sdk";

const item = buildWall()
.points([
{ x: 0, y: 0 },
{ x: 150, y: 0 },
])
.build();
OBR.scene.local.addItems([item]);

Reference

Methods

points

points(points);

Set the walls points array.

Parameters

NAMETYPEDESCRIPTION
pointsVector2[]The walls points

Returns the current builder.


doubleSided

doubleSided(doubleSided);

Set the walls doubleSided.

Parameters

NAMETYPEDESCRIPTION
doubleSidedbooleanThe walls doubleSided value

Returns the current builder.


blocking

blocking(blocking);

Set the walls blocking.

Parameters

NAMETYPEDESCRIPTION
blockingbooleanThe walls blocking value

Returns the current builder.


build

build();

Returns the final Wall item.