This commit is contained in:
@ -153,7 +153,16 @@ const BackgroundCanvas = ({ theme = 'light' }) => {
|
|||||||
1
|
1
|
||||||
);
|
);
|
||||||
|
|
||||||
jointsRef.current = generateJoints(300, worldRef.current.width, worldRef.current.height);
|
const isMobile = window.innerWidth < 768;
|
||||||
|
const numberOfJoints = isMobile ? 80 : 300;
|
||||||
|
jointsRef.current = generateJoints(numberOfJoints, worldRef.current.width, worldRef.current.height);
|
||||||
|
|
||||||
|
if (isMobile) {
|
||||||
|
jointsRef.current.forEach(joint => {
|
||||||
|
joint.bone_length = 120;
|
||||||
|
joint.speed = 0.4;
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const animate = () => {
|
const animate = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user