@spritebuddy/core 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/package.json +8 -4
- package/schema.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @spritebuddy/core
|
|
2
2
|
|
|
3
|
-
Reads [SpriteBuddy](https://github.com/
|
|
4
|
-
([format](https://github.com/
|
|
3
|
+
Reads [SpriteBuddy](https://github.com/colour-clash/spritebuddy) runtime files
|
|
4
|
+
([format](https://github.com/colour-clash/spritebuddy-runtimes/blob/main/docs/format.md)) and works out what to draw at any moment. No
|
|
5
5
|
dependencies and no engine: [`@spritebuddy/pixi`](https://www.npmjs.com/package/@spritebuddy/pixi)
|
|
6
6
|
builds on it, and you can use it with any renderer that can draw part of an image.
|
|
7
7
|
|
|
@@ -30,7 +30,7 @@ for (const part of player.parts) {
|
|
|
30
30
|
}
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
The [canvas example](https://github.com/
|
|
33
|
+
The [canvas example](https://github.com/colour-clash/spritebuddy-runtimes/tree/main/runtimes/core/examples/drawing.js) is a complete program that does exactly
|
|
34
34
|
this with a 2D canvas, rotation, trim and flips included, in about 60 lines.
|
|
35
35
|
|
|
36
36
|
## API
|
|
@@ -56,6 +56,6 @@ this with a 2D canvas, rotation, trim and flips included, in about 60 lines.
|
|
|
56
56
|
- The JSON Schema ships as `@spritebuddy/core/schema.json`.
|
|
57
57
|
|
|
58
58
|
Every function is tested against the shared
|
|
59
|
-
[golden tables](https://github.com/
|
|
59
|
+
[golden tables](https://github.com/colour-clash/spritebuddy-runtimes/tree/main/schema/fixtures), the same ones the PixiJS and Godot runtimes pass.
|
|
60
60
|
|
|
61
61
|
Licence: ISC.
|
package/package.json
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spritebuddy/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Reads SpriteBuddy animation files and works out what to draw at any moment. No dependencies, any engine.",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "Patrick Hammond",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/
|
|
10
|
-
"directory": "
|
|
9
|
+
"url": "git+https://github.com/colour-clash/spritebuddy-runtimes.git",
|
|
10
|
+
"directory": "runtimes/core/package"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/colour-clash/spritebuddy-runtimes/tree/main/runtimes/core/package#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/colour-clash/spritebuddy-runtimes/issues"
|
|
11
15
|
},
|
|
12
16
|
"keywords": [
|
|
13
17
|
"spritebuddy",
|
|
@@ -33,7 +37,7 @@
|
|
|
33
37
|
"schema.json"
|
|
34
38
|
],
|
|
35
39
|
"scripts": {
|
|
36
|
-
"build": "tsc -p tsconfig.build.json && node -e \"require('node:fs').copyFileSync('
|
|
40
|
+
"build": "tsc -p tsconfig.build.json && node -e \"require('node:fs').copyFileSync('../../../schema/spritebuddy-animations.v3.schema.json', 'schema.json')\"",
|
|
37
41
|
"prepack": "npm run build",
|
|
38
42
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
39
43
|
}
|
package/schema.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://github.com/
|
|
3
|
+
"$id": "https://github.com/colour-clash/spritebuddy-runtimes/blob/main/schema/spritebuddy-animations.v3.schema.json",
|
|
4
4
|
"title": "SpriteBuddy animations, version 3",
|
|
5
5
|
"description": "A spritesheet's frames and animations, with per-frame timing, offsets and layers. Coordinates are sheet pixels with y down; times are milliseconds. See docs/format.md.",
|
|
6
6
|
"type": "object",
|