Home Reference Source
import {Isosurface} from 'rabbit-hole'
public class | source

Isosurface

An isosurface, the result of a contouring process.

Constructor Summary

Public Constructor
public

constructor(indices: Uint16Array, positions: Float32Array, normals: Float32Array, uvs: Float32Array, materials: Uint8Array)

Constructs a new isosurface.

Member Summary

Public Members
public

A set of vertex indices that describe triangles.

public

A set of material indices.

public

A set of normals.

public

A set of vertices.

public

A set of UV coordinates.

Method Summary

Public Methods
public

createTransferList(transferList: Array): Transferable[]

Creates a list of transferable items.

public

Adopts the given serialised isosurface.

public

serialize(deflate: Boolean): Object

Serialises this isosurface.

Public Constructors

public constructor(indices: Uint16Array, positions: Float32Array, normals: Float32Array, uvs: Float32Array, materials: Uint8Array) source

Constructs a new isosurface.

Params:

NameTypeAttributeDescription
indices Uint16Array

Triangle indices.

positions Float32Array

Generated vertices.

normals Float32Array

Generated normals.

uvs Float32Array

Generated uvs.

materials Uint8Array

Generated materials.

Public Members

public indices: Uint16Array source

A set of vertex indices that describe triangles.

public materials: Uint8Array source

A set of material indices.

public normals: Float32Array source

A set of normals.

public positions: Float32Array source

A set of vertices.

public uvs: Float32Array source

A set of UV coordinates.

Public Methods

public createTransferList(transferList: Array): Transferable[] source

Creates a list of transferable items.

Params:

NameTypeAttributeDescription
transferList Array
  • optional

An optional target list. The transferable items will be added to this list.

Return:

Transferable[]

The transfer list.

public deserialize(object: Object): Deserializable source

Adopts the given serialised isosurface.

Params:

NameTypeAttributeDescription
object Object

A serialised isosurface. Can be null.

Return:

Deserializable

This object or null if the given serialised isosurface was null.

public serialize(deflate: Boolean): Object source

Serialises this isosurface.

Params:

NameTypeAttributeDescription
deflate Boolean
  • optional
  • default: false

Whether the data should be compressed if possible.

Return:

Object

The serialised data.