Skip to content

@fibbojs / 2d / FTransform

Class: FTransform

2D Transforms for a component.

Constructors

new FTransform()

new FTransform(options?): FTransform

Create a new FTransform.

Parameters

options?: FTransformOptions

The options for the collider.

Returns

FTransform

Example

ts
const collider = new FTransform({
  position: { x: 0, y: 0 },
  scale: { x: 1, y: 1 },
  rotation: 0,
})

Defined in

2d/src/core/FTransform.ts:42

Properties

position

position: object

Position of the component.

x

x: number

y

y: number

Defined in

2d/src/core/FTransform.ts:16


rotation

rotation: number

Rotation of the component.

Defined in

2d/src/core/FTransform.ts:24


scale

scale: object

Scale of the component.

x

x: number

y

y: number

Defined in

2d/src/core/FTransform.ts:20