Skip to content

@emile/engine


@emile/engine / rendering/particles/emitter / ParticleEmitterColorStop

Class: ParticleEmitterColorStop

Defined in: src/rendering/particles/emitter.ts:10

Extends

  • Schema

Constructors

new ParticleEmitterColorStop()

new ParticleEmitterColorStop(time, color, alpha): ParticleEmitterColorStop

Defined in: src/rendering/particles/emitter.ts:37

Creates a new particle emitter color stop.

Parameters

time

number

The percentage of the lifetime of the particle at which this color and alpha should be reached. This should be a value between 0 (start of life) and 1 (end of life) (inclusive).

color

number

The color of the particle at this time.

alpha

number

The alpha of the particle at this time. This should be a value between 0 and 1 (inclusive).

Returns

ParticleEmitterColorStop

Overrides

Schema.constructor

Properties

$callbacks

protected $callbacks: object

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:35

Index Signature

[op: number]: Function[]

Inherited from

Schema.$callbacks


$changes

protected $changes: ChangeTree

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:34

Inherited from

Schema.$changes


alpha

alpha: number = 1

Defined in: src/rendering/particles/emitter.ts:28

The alpha of the particle at this time.

This should be a value between 0 and 1 (inclusive).


color

color: number = 0xffffff

Defined in: src/rendering/particles/emitter.ts:21

The color of the particle at this time.


time

time: number = 0

Defined in: src/rendering/particles/emitter.ts:16

The percentage of the lifetime of the particle at which this color and alpha should be reached.

This should be a value between 0 and 1 (inclusive).


_context

static _context: Context

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:30

Inherited from

Schema._context


_definition

static _definition: SchemaDefinition

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:31

Inherited from

Schema._definition


_typeid

static _typeid: number

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:29

Inherited from

Schema._typeid

Accessors

_definition

Get Signature

get protected _definition(): SchemaDefinition

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:44

Returns

SchemaDefinition

Inherited from

Schema._definition

Methods

applyFilters()

applyFilters(client, encodeAll?): number[]

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:62

Parameters

client

any

encodeAll?

boolean

Returns

number[]

Inherited from

Schema.applyFilters


assign()

assign(props): this

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:41

Parameters

props

{ alpha: number; color: number; time: number; } | ToJSON<ParticleEmitterColorStop>

Returns

this

Inherited from

Schema.assign


clone()

clone(): this

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:63

Returns

this

Inherited from

Schema.clone


decode()

decode(bytes, it?, ref?): DataChange<any, string>[]

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:59

Parameters

bytes

number[]

it?

Iterator

ref?

Ref

Returns

DataChange<any, string>[]

Inherited from

Schema.decode


deleteByIndex()

protected deleteByIndex(index): void

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:67

Parameters

index

number

Returns

void

Inherited from

Schema.deleteByIndex


discardAllChanges()

discardAllChanges(): void

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:65

Returns

void

Inherited from

Schema.discardAllChanges


encode()

encode(encodeAll?, bytes?, useFilters?): number[]

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:60

Parameters

encodeAll?

boolean

bytes?

number[]

useFilters?

boolean

Returns

number[]

Inherited from

Schema.encode


encodeAll()

encodeAll(useFilters?): number[]

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:61

Parameters

useFilters?

boolean

Returns

number[]

Inherited from

Schema.encodeAll


getByIndex()

protected getByIndex(index): any

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:66

Parameters

index

number

Returns

any

Inherited from

Schema.getByIndex


listen()

listen<K>(prop, callback, immediate?): () => boolean

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:58

Client-side: listen for changes on property.

Type Parameters

K

K extends NonFunctionPropNames<ParticleEmitterColorStop>

Parameters

prop

K

the property name

callback

(value, previousValue) => void

callback to be triggered on property change

immediate?

boolean

trigger immediatelly if property has been already set.

Returns

Function

Returns

boolean

Inherited from

Schema.listen


onChange()

onChange(callback): () => void

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:38

Parameters

callback

() => void

Returns

Function

Returns

void

Inherited from

Schema.onChange


onRemove()

onRemove(callback): () => void

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:39

Parameters

callback

() => void

Returns

Function

Returns

void

Inherited from

Schema.onRemove


setDirty()

setDirty<K>(property, operation?): void

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:51

(Server-side): Flag a property to be encoded for the next patch.

Type Parameters

K

K extends NonFunctionPropNames<ParticleEmitterColorStop>

Parameters

property

string representing the property name, or number representing the index of the property.

number | K

operation?

OPERATION

OPERATION to perform (detected automatically)

Returns

void

Inherited from

Schema.setDirty


toJSON()

toJSON(): ToJSON<ParticleEmitterColorStop>

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:64

Returns

ToJSON<ParticleEmitterColorStop>

Inherited from

Schema.toJSON


is()

static is(type): boolean

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:33

Parameters

type

DefinitionType

Returns

boolean

Inherited from

Schema.is


onError()

static onError(e): void

Defined in: node_modules/.pnpm/@colyseus+schema@2.0.35/node_modules/@colyseus/schema/lib/Schema.d.ts:32

Parameters

e

any

Returns

void

Inherited from

Schema.onError