Home Reference Source
import ArraySpan from 'three-nebula/src/math/ArraySpan.js'
public class | source

ArraySpan

Extends:

Span → ArraySpan

Class for storing items of mixed type and fetching a randomised value from these items.

Constructor Summary

Public Constructor
public

constructor(items: mixed | array<mixed>): *

Constructs an ArraySpan instance.

Member Summary

Public Members
public

items: array

An array of colors

public

The class type.

Method Summary

Public Methods
public

getValue(): mixed

Gets a random item.

Inherited Summary

From class Span
public

a: *

public

b: *

public

The class type.

private

_center: *

private
public

Span.getValue function

Public Constructors

public constructor(items: mixed | array<mixed>): * source

Constructs an ArraySpan instance.

Override:

Span#constructor

Params:

NameTypeAttributeDescription
items mixed | array<mixed>

Items

Return:

*

void

Public Members

public items: array source

An array of colors

public type: string source

The class type.

Override:

Span#type

Public Methods

public getValue(): mixed source

Gets a random item.

Override:

Span#getValue

Return:

mixed