Skip to content

Latest commit

 

History

History
143 lines (80 loc) · 2.53 KB

selection.md

File metadata and controls

143 lines (80 loc) · 2.53 KB

Class: selection

Represents a rectangular selection in the world and provides iterators for heightmap vertices, texture units, chunks and models within it.

Table of contents

Constructors

Methods

Constructors

constructor

+ new selection(): selection

Returns: selection

Methods

apply

apply(): void

Applies all changes made inside this selection. You almost always want to call this function when you're done with a selection.

Returns: void


center

center(): vector_3d

Returns the center point of this selection

Returns: vector_3d


chunks

chunks(): chunk[]

Creates and returns an iterator for all chunks inside this selection

Returns: chunk[]


make_noise

make_noise(frequency: number, algorithm: string, seed: string): noisemap

Creates a noisemap matching the location of this selection

Parameters:

Name Type
frequency number
algorithm string
seed string

Returns: noisemap


max

max(): vector_3d

Returns the highest point of this selection

Returns: vector_3d


min

min(): vector_3d

Returns the smallest point of this selection

Returns: vector_3d


models

models(): model[]

Creates and returns an iterator for all models inside this selection

Returns: model[]


size

size(): vector_3d

Returns a vector representing the size of this selection on each axis.

note for iterators, only x and z values are respected. y (height) is ignored.

Returns: vector_3d


tex

tex(): tex[]

Creates and returns an iterator for all texture units inside this selection

Returns: tex[]


verts

verts(): vert[]

Creates and returns an iterator for all vertices inside this selection

Returns: vert[]