cute-cube 0.1.0
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 +99 -0
- package/assets/sheets/neutral_celebrating_512.png +0 -0
- package/assets/sheets/neutral_click_512.png +0 -0
- package/assets/sheets/neutral_idle_512.png +0 -0
- package/assets/sheets/neutral_talk_512.png +0 -0
- package/assets/sheets/neutral_thinking_512.png +0 -0
- package/assets/sheets/neutral_to_sad.png +0 -0
- package/assets/sheets/sad_celebrating_512.png +0 -0
- package/assets/sheets/sad_click_512.png +0 -0
- package/assets/sheets/sad_idle_512.png +0 -0
- package/assets/sheets/sad_talk_512.png +0 -0
- package/assets/sheets/sad_thinking_512.png +0 -0
- package/assets/sheets/sad_to_neutral.png +0 -0
- package/dist/index.cjs +1001 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +264 -0
- package/dist/index.d.ts +264 -0
- package/dist/index.js +983 -0
- package/dist/index.js.map +1 -0
- package/dist/react.cjs +865 -0
- package/dist/react.cjs.map +1 -0
- package/dist/react.d.cts +21 -0
- package/dist/react.d.ts +21 -0
- package/dist/react.js +860 -0
- package/dist/react.js.map +1 -0
- package/dist/types-D7Q7Ycer.d.cts +105 -0
- package/dist/types-D7Q7Ycer.d.ts +105 -0
- package/dist/vue.cjs +855 -0
- package/dist/vue.cjs.map +1 -0
- package/dist/vue.d.cts +43 -0
- package/dist/vue.d.ts +43 -0
- package/dist/vue.js +850 -0
- package/dist/vue.js.map +1 -0
- package/package.json +85 -0
package/README.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# cute-cube
|
|
2
|
+
|
|
3
|
+
Framework-agnostic sprite character with named animation states, built on [PixiJS](https://pixijs.com/). Optional Vue 3 and React bindings are published as subpath exports.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
Install `cute-cube` and its required peer dependency `pixi.js`. Add Vue or React only if you use those bindings.
|
|
8
|
+
|
|
9
|
+
### npm
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install cute-cube pixi.js
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Optional peers:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install cute-cube pixi.js vue
|
|
19
|
+
# or
|
|
20
|
+
npm install cute-cube pixi.js react react-dom
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Yarn (Classic / Berry)
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
yarn add cute-cube pixi.js
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Optional peers:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
yarn add cute-cube pixi.js vue
|
|
33
|
+
# or
|
|
34
|
+
yarn add cute-cube pixi.js react react-dom
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### pnpm
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pnpm add cute-cube pixi.js
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Optional peers:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pnpm add cute-cube pixi.js vue
|
|
47
|
+
# or
|
|
48
|
+
pnpm add cute-cube pixi.js react react-dom
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Bun
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
bun add cute-cube pixi.js
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Optional peers:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
bun add cute-cube pixi.js vue
|
|
61
|
+
# or
|
|
62
|
+
bun add cute-cube pixi.js react react-dom
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Usage
|
|
66
|
+
|
|
67
|
+
Core API:
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
import { CharacterPlayer, createDefaultManifest } from "cute-cube";
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Vue (`CharacterView` component):
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
import { CharacterView } from "cute-cube/vue";
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
React (`CharacterView` component):
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
import { CharacterView } from "cute-cube/react";
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
See `src/index.ts` and the `demo/` app for concrete examples.
|
|
86
|
+
|
|
87
|
+
## Publishing (maintainers)
|
|
88
|
+
|
|
89
|
+
Public JavaScript packages are published to the **npm registry** (`https://registry.npmjs.org/`). Yarn, pnpm, and Bun all consume that same registry for public packages—there is no separate “Yarn package” registry for open-source libraries.
|
|
90
|
+
|
|
91
|
+
1. **Account** — Create an account on [npmjs.com](https://www.npmjs.com/) and verify your email.
|
|
92
|
+
2. **Login** — Run `npm login` (or `yarn npm login` in Yarn Berry) and follow the prompts.
|
|
93
|
+
3. **Build** — `npm run build` (or rely on `prepublishOnly`, which runs the build before publish).
|
|
94
|
+
4. **Name & version** — Ensure `package.json` `name` is available on npm and bump `version` per [semver](https://semver.org/).
|
|
95
|
+
5. **Publish** — From the package root:
|
|
96
|
+
- **npm:** `npm publish` (use `npm publish --access public` for scoped packages like `@org/pkg`).
|
|
97
|
+
- **Yarn (Berry):** `yarn npm publish` (same registry as npm).
|
|
98
|
+
|
|
99
|
+
After publish, users install with any client (`npm`, `yarn`, `pnpm`, `bun`) using the instructions above.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|