Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ best friend, lajbel, can put the correct version name here
needs expansion) - @mflerackers
- Added vertical sweep and prune - @mflerackers
- Added configuration to choose broad phase algorithm - @mflerackers
- Vec2's can now operate on any object with x and y properties and don't need to
have the arguments deserialized - @dragoncoder047

### Fixed

Expand Down
5 changes: 2 additions & 3 deletions src/ecs/components/transform/anchor.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { anchorPt } from "../../../gfx/anchor";
import { vec2 } from "../../../math/math";
import { type SerializedVec2, Vec2 } from "../../../math/Vec2";
import { Vec2, type Vec2Like } from "../../../math/Vec2";
import type { Anchor, Comp } from "../../../types";

/**
Expand All @@ -10,7 +9,7 @@ import type { Anchor, Comp } from "../../../types";
* @subgroup Component Serialization
*/
export interface SerializedAnchorComp {
anchor: SerializedVec2;
anchor: Vec2Like;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/ecs/components/transform/move.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type SerializedVec2, Vec2 } from "../../../math/Vec2";
import type { Comp, EmptyComp, GameObj } from "../../../types";
import { Vec2, type Vec2Like } from "../../../math/Vec2";
import type { Comp, GameObj } from "../../../types";
import type { PosComp } from "./pos";

/**
Expand All @@ -9,7 +9,7 @@ import type { PosComp } from "./pos";
* @subgroup Component Serialization
*/
interface SerializedMoveComp {
dir: SerializedVec2 | number;
dir: Vec2Like | number;
speed: number;
}

Expand Down
4 changes: 2 additions & 2 deletions src/ecs/components/transform/scale.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { vec2, type Vec2Args } from "../../../math/math";
import { type SerializedVec2, Vec2 } from "../../../math/Vec2";
import { Vec2, type Vec2Like } from "../../../math/Vec2";
import type { Comp } from "../../../types";
import {
type InternalGameObjRaw,
Expand All @@ -13,7 +13,7 @@ import {
* @subgroup Component Serialization
*/
export interface SerializedScaleComp {
scale: SerializedVec2;
scale: Vec2Like;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/ecs/components/transform/skew.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { vec2, type Vec2Args } from "../../../math/math";
import { type SerializedVec2, Vec2 } from "../../../math/Vec2";
import { Vec2, type Vec2Like } from "../../../math/Vec2";
import type { Comp } from "../../../types";
import {
type InternalGameObjRaw,
Expand All @@ -13,7 +13,7 @@ import {
* @subgroup Component Serialization
*/
export interface SerializedSkewComp {
skew: SerializedVec2;
skew: Vec2Like;
}

/**
Expand Down
Loading