@evqovs/danmaku 1.0.0 → 1.1.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/dist/danmaku.js +2 -2
- package/dist/danmaku_engine.d.ts +1 -1
- package/dist/danmaku_manager.d.ts +1 -1
- package/package.json +2 -2
package/dist/danmaku.js
CHANGED
|
@@ -212,7 +212,7 @@ class DanmakuItem {
|
|
|
212
212
|
}
|
|
213
213
|
this.recorder.start_time = now();
|
|
214
214
|
this.set_style('transition', `transform ${this.duration}ms linear`);
|
|
215
|
-
this.set_style('transform', `translateX(${this.destination}px)`);
|
|
215
|
+
next_frame(() => this.set_style('transform', `translateX(${this.destination}px)`));
|
|
216
216
|
this.status = 'running';
|
|
217
217
|
this.plugin_system.lifecycle.start.emit(this);
|
|
218
218
|
}
|
|
@@ -385,7 +385,7 @@ class DanmakuEngine {
|
|
|
385
385
|
this.format_tracks();
|
|
386
386
|
}
|
|
387
387
|
add(info) {
|
|
388
|
-
this.stash.push(...info);
|
|
388
|
+
this.stash.push(...(Array.isArray(info) ? info : [info]));
|
|
389
389
|
}
|
|
390
390
|
each(fn) {
|
|
391
391
|
for (const d of this.set) {
|
package/dist/danmaku_engine.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export default class DanmakuEngine {
|
|
|
18
18
|
private set;
|
|
19
19
|
constructor(options: EngineOptions);
|
|
20
20
|
format(): void;
|
|
21
|
-
add(info: DanmakuOptions[]): void;
|
|
21
|
+
add(info: DanmakuOptions | DanmakuOptions[]): void;
|
|
22
22
|
each(fn: (d: DanmakuItem) => void): void;
|
|
23
23
|
clear_stash(): void;
|
|
24
24
|
create_and_mount_danmaku(info: DanmakuOptions): DanmakuItem;
|
|
@@ -10,7 +10,7 @@ export default class DanmakuManager {
|
|
|
10
10
|
private engine;
|
|
11
11
|
private render_timer;
|
|
12
12
|
constructor(options: ManagerOptions);
|
|
13
|
-
push(info: DanmakuOptions[]): void;
|
|
13
|
+
push(info: DanmakuOptions | DanmakuOptions[]): void;
|
|
14
14
|
until_all_done(): Promise<void>;
|
|
15
15
|
start_render(): void;
|
|
16
16
|
stop_render(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evqovs/danmaku",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "A lightweight ESM-based danmaku library.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -32,4 +32,4 @@
|
|
|
32
32
|
"bugs": {
|
|
33
33
|
"url": "https://github.com/evqovv/danmaku/issues"
|
|
34
34
|
}
|
|
35
|
-
}
|
|
35
|
+
}
|