Skip to content
Closed
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
27 changes: 27 additions & 0 deletions CHANGELOG.2.2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 2.2.0 Changelog - 2022-04-4

This update improves and adds flexibility to rendering.

This update overhauls the physics system by adding a complete new SAT collision system with different shaped hitboxes and multiple adjustable
hitboxes for PhysicsBody.

This update overhauls the sound system by adding support for WebAudio and fallback to HTMLAudio.

This update improves the animation system by adding Tweens and more.

------------------------------------------------------------------------------------------------------

## Added

## Changed

- Misc
- Changed startup message and version

## Removed

## Deprecated

## Fixed

## FaQ
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "duckengine",
"version": "2.1.0",
"version": "2.2.0",
"description": "A 2D Game Engine for the web.",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
23 changes: 23 additions & 0 deletions src/core/renderer/models/color.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import hexNumberToString from '../../../utils/hexNumberToString';

export default class Color {
public value: string | CanvasGradient;
public stroke?: number | string;
public strokeWidth?: number;

constructor(
value: number | string | CanvasGradient,
stroke?: number | string,
strokeWidth?: number
) {
// convert value so that the CanvasRenderer can skip this step
typeof value === 'number' ? (value = hexNumberToString(value)) : value;
typeof stroke === 'number'
? (stroke = hexNumberToString(stroke))
: stroke;

this.value = value;
this.stroke = stroke;
this.strokeWidth = strokeWidth;
}
}
2 changes: 1 addition & 1 deletion src/helper/startup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ https://github.com/ksplatdev/DuckEngine

MIT License

Copyright (c) 2021 Bleart Emini
Copyright (c) 2022 Bleart Emini
`;
2 changes: 1 addition & 1 deletion src/helper/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default '2.1.0';
export default '2.2.0';
3 changes: 3 additions & 0 deletions src/utils/hexNumberToString.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function hexNumberToString(hex: number) {
return hex.toString(16);
}