Skip to content

Commit

Permalink
chore: changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
lajbel committed Jan 15, 2025
1 parent c11476f commit 8609c06
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 37 deletions.
19 changes: 17 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,27 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Changed default behaviour of `kaplay({ tagsAsComponents: false })` to `false`.
- Now if you pass a nullish value to `.use()` it throws an error

## [3001.0.7] - TBD
## [3001.0.7] - 2025-01-15

### Added

- Added `kaplay({ spriteAtlasPadding })` for setting the space between the
sprites in the sprite atlas - @marianyp

```js
kaplay({
spriteAtlasPadding: 10, // 10 pixels of space between each sprite
});
```

### Changed

- Now you cannot pass parameters that are not a component or string to `.use()`.
Otherwise it will throw an error
Otherwise it will throw an error - @lajbel

### Fixed

- Fixed a bug where font atlas were working strange - @mflerackers

## [3001.0.6] "Santa Events" - 2024-12-27

Expand Down
41 changes: 26 additions & 15 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,35 @@
Copyright (c) 2025, KAPLAY Team and contributers

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions.

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

In addition, the following restrictions apply:

1. The Software and any modifications made to it may not be used for the purpose of training or improving machine learning algorithms,
including but not limited to artificial intelligence, natural language processing, or data mining. This condition applies to any derivatives,
modifications, or updates based on the Software code. Any usage of the Software in an AI-training dataset is considered a breach of this License.
1. The Software and any modifications made to it may not be used for the purpose
of training or improving machine learning algorithms, including but not
limited to artificial intelligence, natural language processing, or data
mining. This condition applies to any derivatives, modifications, or updates
based on the Software code. Any usage of the Software in an AI-training
dataset is considered a breach of this License.

2. The Software may not be included in any dataset used for training or improving machine learning algorithms,
including but not limited to artificial intelligence, natural language processing, or data mining.
2. The Software may not be included in any dataset used for training or
improving machine learning algorithms, including but not limited to
artificial intelligence, natural language processing, or data mining.

3. Any person or organization found to be in violation of these restrictions will be subject to legal action and may be held liable
for any damages resulting from such use.
3. Any person or organization found to be in violation of these restrictions
will be subject to legal action and may be held liable for any damages
resulting from such use.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 changes: 11 additions & 11 deletions src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// some default charsets for loading bitmap fonts
export const ASCII_CHARS =
" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
export const DEF_ANCHOR = "topleft";
export const BG_GRID_SIZE = 64;
export const DEF_FONT = "monospace";
Expand All @@ -19,9 +19,9 @@ export const DEF_FONT_FILTER = "linear";
export const LOG_MAX = 8;
export const LOG_TIME = 4;
export const VERTEX_FORMAT = [
{ name: "a_pos", size: 2 },
{ name: "a_uv", size: 2 },
{ name: "a_color", size: 4 },
{ name: "a_pos", size: 2 },
{ name: "a_uv", size: 2 },
{ name: "a_color", size: 4 },
];
const STRIDE = VERTEX_FORMAT.reduce((sum, f) => sum + f.size, 0);
const MAX_BATCHED_QUAD = 2048;
Expand Down Expand Up @@ -89,13 +89,13 @@ vec4 frag(vec2 pos, vec2 uv, vec4 color, sampler2D tex) {
`;
export const COMP_DESC = new Set(["id", "require"]);
export const COMP_EVENTS = new Set([
"add",
"fixedUpdate",
"update",
"draw",
"destroy",
"inspect",
"drawInspect",
"add",
"fixedUpdate",
"update",
"draw",
"destroy",
"inspect",
"drawInspect",
]);
export const DEF_OFFSCREEN_DIS = 200;
// maximum y velocity with body()
Expand Down
18 changes: 9 additions & 9 deletions src/gfx/formatText.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export function compileStyledText(txt: string): {
if (x !== undefined) {
throw new Error(
"Styled text error: mismatched tags. "
+ `Expected [/${x}], got [/${gn}]`,
+ `Expected [/${x}], got [/${gn}]`,
);
}
else {
Expand Down Expand Up @@ -145,14 +145,14 @@ export function formatText(opt: DrawTextOpt): FormattedText {
outline: Outline | null;
filter: TexFilter;
} = font instanceof FontData
? {
outline: font.outline,
filter: font.filter,
}
: {
outline: null,
filter: DEF_FONT_FILTER,
};
? {
outline: font.outline,
filter: font.filter,
}
: {
outline: null,
filter: DEF_FONT_FILTER,
};

// TODO: customizable font tex filter
const atlas: FontAtlas = fontAtlases[fontName] ?? {
Expand Down

0 comments on commit 8609c06

Please sign in to comment.