Skip to content

Commit facaf20

Browse files
committed
feat: updateBaseTexture add useCache
1 parent 9708b83 commit facaf20

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

examples/vtuber.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const createFFTask = () => {
8989

9090
const fvtuber2 = new FFVtuber({
9191
path: human,
92-
x: 500,
92+
x: 450,
9393
y: height,
9494
mode: 'frame',
9595
width: 480,

lib/node/video.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class FFVideo extends FFImage {
4646
this.endTime = DEFAULT_TIME; //"00:00:15"
4747
this.codec = null;
4848
this.preload = false;
49+
this.useCache = false;
4950
this.clarity = conf.qscale || conf.clarity || 2;
5051
this.audio = conf.audio === undefined ? true : conf.audio;
5152
this.loop = conf.loop === undefined ? false : conf.loop;
@@ -214,7 +215,7 @@ class FFVideo extends FFImage {
214215
*/
215216
drawing() {
216217
const texture = this.materials.getFrame(this.frameIndex);
217-
this.display.updateBaseTexture(texture);
218+
this.display.updateBaseTexture(texture, this.useCache);
218219
this.nextFrame();
219220
}
220221

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ffcreator",
3-
"version": "5.5.6",
3+
"version": "5.5.7",
44
"description": "FFCreator is a lightweight and flexible short video production library",
55
"main": "lib/index.js",
66
"types": "types/index.d.ts",

0 commit comments

Comments
 (0)