Comments (3)
Because there are no elements in your scene, you can't see anything
from ffcreator.
Because there are no elements in your scene, you can't see anything
`
const creatScene = ({index, transition, text}) => {
const scene = new FFScene();
scene.setBgColor('#3b3a98');
scene.setDuration(5);
scene.setTransition(transition, 1,{});
// bg img
const img = path.join(__dirname, ./assets/imgs/trans/0${index}.jpeg
);
const bg = new FFImage({path: img, resetXY: true});
scene.addChild(bg);
// title text
const ftext = new FFText({text, x: width / 2, y: height / 2 + 50, fontSize: 38});
ftext.setColor('#30336b');
ftext.alignCenter();
ftext.setBackgroundColor('#ffffff');
ftext.addEffect('fadeInRight', 1, 1.3);
ftext.setStyle({padding: [4, 12, 6, 12]});
scene.addChild(ftext);
// add logo2
const logo = index === 1 ? logo2 : logo1;
const flogo = new FFImage({path: logo, x: width / 2, y: height / 2 - 100});
flogo.setScale(0.6);
flogo.addEffect('fadeInLeft', 1, 1);
scene.addChild(flogo);
return scene;
};
`
https://github.com/tnfe/FFCreator/blob/master/examples/transition.js
https://tnfe.github.io/FFCreator/_media/imgs/ani.gif
When the scene【Colorful】 is switched, it shows black。
from ffcreator.
I have try your code in windows env, everything is ok.
from ffcreator.
Related Issues (20)
- 透明通道的视频设置失效 HOT 2
- FFchart生成的图表背景是黑色的, 代码如下,请问怎么弄成透明背景 HOT 1
- 不支持显示 webp 类型的图片
- Creating outputDir with the FFCreator instance HOT 3
- FFVideo实例的setLoop方法调用之后,永远不会触发FFCreator实例的complete事件 HOT 1
- 只要合成时有gif,当次合成能成功,之后任何合成都失败,重启后继续这样... HOT 4
- 求问addAnimate方法中rotate属性的单位 HOT 1
- FFImage的path不能加载中文路径的图片 HOT 1
- Windows字体加载出错 HOT 1
- 你好,能不能帮忙更新下lottie的版本,我看现在用的lottie-canvas是5.5.101版本的,而这个版本是4年前发布的 HOT 2
- 能否对FFNode的子类,比如FFImage,用glsl做效果? HOT 2
- 能加一些shader效果吗? HOT 1
- ffvideo如何导入一个透明视频 HOT 1
- 为什么我使用新增字体无效,你们有没有遇到呢 HOT 1
- FFSubtitle 的 srt 方式,字幕与配音不同步 HOT 2
- RTL Direction
- FFCreator实例调用destroy,出现ffmpeg was killed with signal SIGKILL导致服务被kill HOT 4
- 字体乱码是怎么回事? HOT 5
- lottie 文字动画 如果不嵌入graph, 就无法渲染, HOT 1
- 本地设置字体没问题,在服务器上运行一段时候后就找不到字体了,不知道是哪的问题? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ffcreator.