Skip to main content

Class: Geometry

protocol.Geometry

Represents a Geometry.

Implements

Constructors

constructor

new Geometry(properties?): Geometry

Constructs a new Geometry.

Parameters

NameTypeDescription
properties?IGeometryProperties to set

Returns

Geometry

Properties

_faceName

Optional _faceName: "faceName"

Geometry _faceName.


at

at: number[]

Geometry at.

Implementation of

IGeometry.at


faceName

Optional faceName: string

Geometry faceName.

Implementation of

IGeometry.faceName


indices

indices: number[]

Geometry indices.

Implementation of

IGeometry.indices


lights

lights: number[]

Geometry lights.

Implementation of

IGeometry.lights


positions

positions: number[]

Geometry positions.

Implementation of

IGeometry.positions


uvs

uvs: number[]

Geometry uvs.

Implementation of

IGeometry.uvs


voxel

voxel: number

Geometry voxel.

Implementation of

IGeometry.voxel

Methods

create

create(properties?): Geometry

Creates a new Geometry instance using the specified properties.

Parameters

NameTypeDescription
properties?IGeometryProperties to set

Returns

Geometry

Geometry instance


decode

decode(reader, length?): Geometry

Decodes a Geometry message from the specified reader or buffer.

Parameters

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

Returns

Geometry

Geometry

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): Geometry

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

Parameters

NameTypeDescription
readerReader | Uint8ArrayReader or buffer to decode from

Returns

Geometry

Geometry

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 Geometry message. Does not implicitly verify messages.

Parameters

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

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

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

Parameters

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

Returns

Writer

Writer


fromObject

fromObject(object): Geometry

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

Geometry

Geometry


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for Geometry

Parameters

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

Returns

string

The default type url


toJSON

toJSON(): Object

Converts this Geometry to JSON.

Returns

Object

JSON object


toObject

toObject(message, options?): Object

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

Parameters

NameTypeDescription
messageGeometryGeometry
options?IConversionOptionsConversion options

Returns

Object

Plain object


verify

verify(message): string

Verifies a Geometry message.

Parameters

NameTypeDescription
messageObjectPlain object to verify

Returns

string

null if valid, otherwise the reason why it is not