Skip to main content

Class: Mesh

protocol.Mesh

Represents a Mesh.

Implements

Constructors

constructor

new Mesh(properties?): Mesh

Constructs a new Mesh.

Parameters

NameTypeDescription
properties?IMeshProperties to set

Returns

Mesh

Properties

geometries

geometries: IGeometry[]

Mesh geometries.

Implementation of

IMesh.geometries


level

level: number

Mesh level.

Implementation of

IMesh.level

Methods

create

create(properties?): Mesh

Creates a new Mesh instance using the specified properties.

Parameters

NameTypeDescription
properties?IMeshProperties to set

Returns

Mesh

Mesh instance


decode

decode(reader, length?): Mesh

Decodes a Mesh message from the specified reader or buffer.

Parameters

NameTypeDescription
readerReader | Uint8ArrayReader or buffer to decode from
length?numberMessage length if known beforehand

Returns

Mesh

Mesh

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): Mesh

Decodes a Mesh message from the specified reader or buffer, length delimited.

Parameters

NameTypeDescription
readerReader | Uint8ArrayReader or buffer to decode from

Returns

Mesh

Mesh

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


encode

encode(message, writer?): Writer

Encodes the specified Mesh message. Does not implicitly verify messages.

Parameters

NameTypeDescription
messageIMeshMesh message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

Encodes the specified Mesh message, length delimited. Does not implicitly verify messages.

Parameters

NameTypeDescription
messageIMeshMesh message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): Mesh

Creates a Mesh message from a plain object. Also converts values to their respective internal types.

Parameters

NameTypeDescription
objectObjectPlain object

Returns

Mesh

Mesh


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for Mesh

Parameters

NameTypeDescription
typeUrlPrefix?stringyour custom typeUrlPrefix(default "type.googleapis.com")

Returns

string

The default type url


toJSON

toJSON(): Object

Converts this Mesh to JSON.

Returns

Object

JSON object


toObject

toObject(message, options?): Object

Creates a plain object from a Mesh message. Also converts values to other types if specified.

Parameters

NameTypeDescription
messageMeshMesh
options?IConversionOptionsConversion options

Returns

Object

Plain object


verify

verify(message): string

Verifies a Mesh message.

Parameters

NameTypeDescription
messageObjectPlain object to verify

Returns

string

null if valid, otherwise the reason why it is not