scenejs-render icon indicating copy to clipboard operation
scenejs-render copied to clipboard

How I can render using react js/next js?

Open brandonSeattle opened this issue 3 years ago • 3 comments

I have next js project I want to render mp4 from my dynamic scene creator using scenejs. This is really an awesome library to use, is there any way to do so please.

brandonSeattle avatar Jul 08 '22 09:07 brandonSeattle

It is possible, but it is possible only by declaring the scene as a global variable.

daybrush avatar Jul 21 '22 07:07 daybrush

It is possible, but it is possible only by declaring the scene as a global variable.

Is there any example I can expect please? Also is it possible to get the capture only a div instead of the url?

brandonSeattle avatar Nov 09 '22 11:11 brandonSeattle

@brandonSeattle I think I need to make sure that only that area is captured. Still preparing.

And in react, you can use it as follows.

useEffect(() => {
    const scene = new Scene(...);
    window.scene = scene;
}, []);

daybrush avatar Dec 14 '22 19:12 daybrush