Skip to content

@vaguevoid/fiasco / math/coordinates / localToWorld

Function: localToWorld()

localToWorld(localPosition, localToWorld): Vec2

Defined in: src/math/coordinates.ts:163

Convert the given localPosition in the coordinate system of localToWorld into world-space.

ts
import { Coords, LocalToWorld, Query } from '@vaguevoid/fiasco'

function system(locals: Query<[LocalToWorld]>) {
  for (const [local] of locals) {
    const result = Coords.localToWorld({ x: 0, y: 0 }, local.matrix)
  }
}

Parameters

localPosition

Vec2

localToWorld

Mat4

Returns

Vec2