Skip to content

@vaguevoid/fiasco / ecs/resources / Aspect

Class: Aspect

Defined in: src/ecs/resources.ts:718

The Aspect Resource provides information about the screen size.

ts
import type { Aspect } from '@vaguevoid/fiasco'

function system(aspect: Aspect) {
  console.log("screen height is", aspect.height)
}

Extends

Accessors

bottom

Get Signature

get bottom(): number

Defined in: src/ecs/resources.ts:778

The y value of the bottom side of the screen.

Returns

number


height

Get Signature

get height(): number

Defined in: src/ecs/resources.ts:757

The height of the screen.

Returns

number


left

Get Signature

get left(): number

Defined in: src/ecs/resources.ts:764

The x value of the left side of the screen.

Returns

number


Get Signature

get right(): number

Defined in: src/ecs/resources.ts:771

The x value of the right side of the screen.

Returns

number


top

Get Signature

get top(): number

Defined in: src/ecs/resources.ts:785

The y value of the top side of the screen.

Returns

number


width

Get Signature

get width(): number

Defined in: src/ecs/resources.ts:750

The width of the screen.

Returns

number


xy

Get Signature

get xy(): Vec2

Defined in: src/ecs/resources.ts:740

The height and width of the screen as a Vec2 object.

Returns

Vec2

Methods

deserialize()

deserialize(bytes): boolean

Defined in: src/ecs/resources.ts:70

Parameters

bytes

Uint8Array

Returns

boolean

Inherited from

Resource.deserialize


serialize()

serialize(): Uint8Array

Defined in: src/ecs/resources.ts:65

Returns

Uint8Array

Inherited from

Resource.serialize