import { useState, useEffect } from "react"

export default function TrianglesBG() {
    const [thePositionX, setPositionX] = useState(0);
    useEffect(() => {
        const interval = setInterval(() => {
            setPositionX(thePositionX + 0.5);
        }, 10);
        return function () { clearInterval(interval) };
    });
    return (
        <div style={{width: '100%', height: '100%', position: 'absolute', top: '0', left: '0', zIndex: '0', color: 'white'}} className="steve">
            <div className="whatIsItLikeInsideSteve" width='100%' height='99%' style={{objectFit: 'fill', imageRendering: 'pixelated', backgroundImage: 'url("/background.webp")', width: '100%', height: '100%', backgroundRepeat: 'repeat', backgroundSize: '100%', backgroundPositionX: thePositionX}}/>
        </div>
    )
}