Skip to main content

Class: Update

protocol.protocol.Update

Represents an Update.

Implements

Constructors

constructor

new Update(properties?): Update

Constructs a new Update.

Parameters

NameTypeDescription
properties?IUpdateProperties to set

Returns

Update

Properties

light

light: number

Update light.

Implementation of

IUpdate.light


voxel

voxel: number

Update voxel.

Implementation of

IUpdate.voxel


vx

vx: number

Update vx.

Implementation of

IUpdate.vx


vy

vy: number

Update vy.

Implementation of

IUpdate.vy


vz

vz: number

Update vz.

Implementation of

IUpdate.vz

Methods

create

create(properties?): Update

Creates a new Update instance using the specified properties.

Parameters

NameTypeDescription
properties?IUpdateProperties to set

Returns

Update

Update instance


decode

decode(reader, length?): Update

Decodes an Update message from the specified reader or buffer.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns

Update

Update

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): Update

Decodes an Update message from the specified reader or buffer, length delimited.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

Update

Update

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

Parameters

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

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

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

Parameters

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

Returns

Writer

Writer


fromObject

fromObject(object): Update

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

Update

Update


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for Update

Parameters

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

Returns

string

The default type url


toJSON

toJSON(): Object

Converts this Update to JSON.

Returns

Object

JSON object


toObject

toObject(message, options?): Object

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

Parameters

NameTypeDescription
messageUpdateUpdate
options?IConversionOptionsConversion options

Returns

Object

Plain object


verify

verify(message): string

Verifies an Update message.

Parameters

NameTypeDescription
messageObjectPlain object to verify

Returns

string

null if valid, otherwise the reason why it is not