@doki-land/live2d 0.0.15 โ†’ 0.0.16

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.
Files changed (2) hide show
  1. package/README.md +27 -18
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  The public runtime facade for browser-native Live2D rendering.
4
4
 
5
- Use this package in browser games, game-engine integrations, interactive content, model tools, and custom webpage experiences. It composes the default loader, MOC runtimes, and rendering backends behind one small API.
5
+ Use this package in browser games, game-engine integrations, interactive content, model tools, and custom webpage
6
+ experiences. It composes the default loader, MOC runtimes, and rendering backends behind one small API.
6
7
 
7
8
  ## โœจ Features
8
9
 
@@ -63,7 +64,8 @@ engine.onUpdate((deltaTime) => {
63
64
  });
64
65
  ```
65
66
 
66
- The delta is expressed in seconds. Keep the value bounded after tab suspension or long pauses to avoid unstable animation and physics once those systems are enabled.
67
+ The delta is expressed in seconds. Keep the value bounded after tab suspension or long pauses to avoid unstable
68
+ animation and physics once those systems are enabled.
67
69
 
68
70
  ## ๐Ÿ“ฅ Loading Models
69
71
 
@@ -82,8 +84,8 @@ await runtime.loadModel(
82
84
  Listen for progress when presenting a loading interface:
83
85
 
84
86
  ```ts
85
- runtime.events.on("progress", ({ stage, progress, detail }) => {
86
- console.log(stage, Math.round(progress * 100), detail);
87
+ runtime.events.on("progress", ({stage, progress, detail}) => {
88
+ console.log(stage, Math.round(progress * 100), detail);
87
89
  });
88
90
  ```
89
91
 
@@ -115,23 +117,25 @@ if (area) {
115
117
  }
116
118
  ```
117
119
 
118
- Current fallback hit testing can identify visible drawables. Semantic names such as `Head` or `Body` require corresponding model metadata and runtime support.
120
+ Current fallback hit testing can identify visible drawables. Semantic names such as `Head` or `Body` require
121
+ corresponding model metadata and runtime support.
119
122
 
120
123
  ## ๐Ÿ“Š Frame Profiling
121
124
 
122
125
  ```ts
123
126
  runtime.events.on("profile", (profile) => {
124
- console.log({
125
- fps: profile.fpsSmooth,
126
- frameMs: profile.frameMs,
127
- evaluateMs: profile.evaluateMs,
128
- drawMs: profile.drawMs,
129
- drawables: profile.drawableCount,
130
- });
127
+ console.log({
128
+ fps: profile.fpsSmooth,
129
+ frameMs: profile.frameMs,
130
+ evaluateMs: profile.evaluateMs,
131
+ drawMs: profile.drawMs,
132
+ drawables: profile.drawableCount,
133
+ });
131
134
  });
132
135
  ```
133
136
 
134
- These timings are runtime-side measurements. Use browser GPU profiling when diagnosing shader, mask, upload, or device scheduling costs.
137
+ These timings are runtime-side measurements. Use browser GPU profiling when diagnosing shader, mask, upload, or device
138
+ scheduling costs.
135
139
 
136
140
  ## ๐Ÿงฉ Custom Pipeline
137
141
 
@@ -144,7 +148,8 @@ const runtime = createLive2D({
144
148
  });
145
149
  ```
146
150
 
147
- Custom implementations must preserve the contracts exported by the renderer package. Avoid moving format or renderer logic into application adapters.
151
+ Custom implementations must preserve the contracts exported by the renderer package. Avoid moving format or renderer
152
+ logic into application adapters.
148
153
 
149
154
  ## ๐Ÿงน Lifecycle
150
155
 
@@ -152,7 +157,8 @@ Custom implementations must preserve the contracts exported by the renderer pack
152
157
  runtime.destroy();
153
158
  ```
154
159
 
155
- Destroy the runtime when its canvas or host scene is permanently removed. This releases model state, textures, draw passes, event listeners owned by the runtime, and graphics resources owned by the selected renderer.
160
+ Destroy the runtime when its canvas or host scene is permanently removed. This releases model state, textures, draw
161
+ passes, event listeners owned by the runtime, and graphics resources owned by the selected renderer.
156
162
 
157
163
  ## โšก Performance Notes
158
164
 
@@ -160,7 +166,8 @@ Destroy the runtime when its canvas or host scene is permanently removed. This r
160
166
  - Keep canvas backing dimensions intentional; CSS size alone does not limit GPU pixel work.
161
167
  - Prefer an engine-owned loop when integrating with a game.
162
168
  - Avoid repeatedly enumerating parameters in a hot loop.
163
- - Measure the complete frame path before attributing a bottleneck to TypeScript, WebAssembly, or a specific graphics API.
169
+ - Measure the complete frame path before attributing a bottleneck to TypeScript, WebAssembly, or a specific graphics
170
+ API.
164
171
 
165
172
  ## ๐Ÿงช Development
166
173
 
@@ -171,11 +178,13 @@ pnpm typecheck
171
178
  pnpm --filter @doki-land/live2d build
172
179
  ```
173
180
 
174
- Changes to the facade should include tests for state transitions, cancellation, events, and resource cleanup where applicable.
181
+ Changes to the facade should include tests for state transitions, cancellation, events, and resource cleanup where
182
+ applicable.
175
183
 
176
184
  ## ๐Ÿค Contributing
177
185
 
178
- Keep the facade small. Model-format behavior belongs in `@doki-land/live2d-renderer`, source resolution belongs in `@doki-land/live2d-loader`, and webpage chrome belongs in `@doki-land/live2d-widget`.
186
+ Keep the facade small. Model-format behavior belongs in `@doki-land/live2d-renderer`, source resolution belongs in
187
+ `@doki-land/live2d-loader`, and webpage chrome belongs in `@doki-land/live2d-widget`.
179
188
 
180
189
  ## ๐Ÿ“„ License
181
190
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doki-land/live2d",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "description": "Live2D in the browser โ€” load moc2/moc3 models, Stage + multi-actor, motion; WebGPU/WebGL2/Canvas2D. Main entry for live2d.ts.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -59,9 +59,9 @@
59
59
  "test": "vitest run --passWithNoTests"
60
60
  },
61
61
  "dependencies": {
62
- "@doki-land/live2d-core": "0.0.15",
63
- "@doki-land/live2d-loader": "0.0.15",
64
- "@doki-land/live2d-renderer": "0.0.15"
62
+ "@doki-land/live2d-core": "0.0.16",
63
+ "@doki-land/live2d-loader": "0.0.16",
64
+ "@doki-land/live2d-renderer": "0.0.16"
65
65
  },
66
66
  "sideEffects": false
67
67
  }