Class: Capsule

PD. Capsule

Defines a capsule shape which is useful for navigating planar geometry.

A capsule is a basic three-dimensional geometric shape consisting of a cylinder with hemispherical ends. Another name for it is spherocylinder.

It is useful as a poxy avatar in that the hemispherical bottom makes it relatively simple to detect and move around both horizontal surfaces and inclines such as stairs and ramps.

This class is derived from the THREE.Capsule addon.


new Capsule( [start] [, end] [, radius])

Creates a new capsule.

Parameters:
Name Type Argument Default Description
start THREE.Vector3 <optional>

An optional position for the center of the start hemisphere, defaults to {0,0,300}.

end THREE.Vector3 <optional>

An optional position for the center of the ending hemisphere, defaults to {0,0,1400}.

radius number <optional>
250

An optional radius, defaults to 250.

Author:
  • drajmarsh

Members


:THREE.Vector3

end

The center of the second hemispherical end.

Type
  • THREE.Vector3

:number

radius

The radius of the capsule.

Type
  • number

:THREE.Vector3

start

The center of the first hemispherical end.

Type
  • THREE.Vector3