Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ts-default/Backgrounds/AcidSquares/AcidSquares.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,13 @@ const AcidSquares: React.FC<AcidSquaresProps> = ({
if (blurRef.current > 0) {
ensureTargets();
mu.uGrain.value = 0.0;
renderer.render({ scene: mesh, target: rtA });
renderer.render({ scene: mesh, target: rtA! });
pu.uRadius.value = blurRef.current * 14.0;
pu.tMap.value = rtA!.texture;
pu.uDirection.value[0] = 1;
pu.uDirection.value[1] = 0;
pu.uGrain.value = 0.0;
renderer.render({ scene: postMesh, target: rtB });
renderer.render({ scene: postMesh, target: rtB! });
pu.tMap.value = rtB!.texture;
pu.uDirection.value[0] = 0;
pu.uDirection.value[1] = 1;
Expand Down
4 changes: 2 additions & 2 deletions src/ts-default/Components/SpecularButton/SpecularButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ const SpecularButton = ({
const p = propsRef.current;

idleAngle += p.speed * dt;
const steer = p.followMouse && pointerAngle != null && (!p.autoAnimate || proximityT > 0);
const target = steer ? pointerAngle : idleAngle;
const target =
p.followMouse && pointerAngle != null && (!p.autoAnimate || proximityT > 0) ? pointerAngle : idleAngle;
const diff = ((target - angle + Math.PI * 3) % (Math.PI * 2)) - Math.PI;
angle += diff * (1 - Math.exp(-dt * 7));

Expand Down
2 changes: 1 addition & 1 deletion src/ts-default/TextAnimations/SplitText/SplitText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ const SplitText: React.FC<SplitTextProps> = ({
willChange: 'transform, opacity'
};
const classes = `split-parent ${className}`;
const Tag = (tag || 'p') as React.ElementType;
const Tag = tag || 'p';

return (
<Tag ref={ref} style={style} className={classes}>
Expand Down
4 changes: 2 additions & 2 deletions src/ts-tailwind/Backgrounds/AcidSquares/AcidSquares.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,13 @@ const AcidSquares: React.FC<AcidSquaresProps> = ({
if (blurRef.current > 0) {
ensureTargets();
mu.uGrain.value = 0.0;
renderer.render({ scene: mesh, target: rtA });
renderer.render({ scene: mesh, target: rtA! });
pu.uRadius.value = blurRef.current * 14.0;
pu.tMap.value = rtA!.texture;
pu.uDirection.value[0] = 1;
pu.uDirection.value[1] = 0;
pu.uGrain.value = 0.0;
renderer.render({ scene: postMesh, target: rtB });
renderer.render({ scene: postMesh, target: rtB! });
pu.tMap.value = rtB!.texture;
pu.uDirection.value[0] = 0;
pu.uDirection.value[1] = 1;
Expand Down
4 changes: 2 additions & 2 deletions src/ts-tailwind/Components/SpecularButton/SpecularButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ const SpecularButton = ({
const p = propsRef.current;

idleAngle += p.speed * dt;
const steer = p.followMouse && pointerAngle != null && (!p.autoAnimate || proximityT > 0);
const target = steer ? pointerAngle : idleAngle;
const target =
p.followMouse && pointerAngle != null && (!p.autoAnimate || proximityT > 0) ? pointerAngle : idleAngle;
const diff = ((target - angle + Math.PI * 3) % (Math.PI * 2)) - Math.PI;
angle += diff * (1 - Math.exp(-dt * 7));

Expand Down
2 changes: 1 addition & 1 deletion src/ts-tailwind/TextAnimations/SplitText/SplitText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ const SplitText: React.FC<SplitTextProps> = ({
willChange: 'transform, opacity'
};
const classes = `split-parent overflow-hidden inline-block whitespace-normal ${className}`;
const Tag = (tag || 'p') as React.ElementType;
const Tag = tag || 'p';

return (
<Tag ref={ref} style={style} className={classes}>
Expand Down