Skip to content

🎥 Make videos programmatically with React

563 B
Raw Blame
import {ThreeCanvas} from '@remotion/three';
import React from 'react';
import {useVideoConfig} from 'remotion';
import {Mesh} from './Mesh';

const ThreeBasic: React.FC = () => {
	const {width, height} = useVideoConfig();
	return (
		<ThreeCanvas
			width={width}
			height={height}
			style={{backgroundColor: 'white'}}
			orthographic={false}
			camera={{fov: 75, position: [0, 0, 470]}}
		>
			<ambientLight intensity={0.15} />
			<pointLight args={[undefined, 0.4]} position={[200, 200, 0]} />
			<Mesh />
		</ThreeCanvas>
	);
};

export default ThreeBasic;