Giter VIP home page Giter VIP logo

Comments (3)

drawcall avatar drawcall commented on May 22, 2024

Because there are no elements in your scene, you can't see anything

from ffcreator.

zhuqiaolun avatar zhuqiaolun commented on May 22, 2024

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.

fantasticsoul avatar fantasticsoul commented on May 22, 2024

I have try your code in windows env, everything is ok.

from ffcreator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.