Skip to content

Commit 8da9efd

Browse files
committed
refactor: Remove platform-specific padding logic from Dither component
1 parent 4ed3564 commit 8da9efd

File tree

4 files changed

+0
-22
lines changed

4 files changed

+0
-22
lines changed

src/content/Backgrounds/Dither/Dither.jsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,14 +270,9 @@ export default function Dither({
270270
enableMouseInteraction = true,
271271
mouseRadius = 1
272272
}) {
273-
const isMac = navigator.userAgentData
274-
? navigator.userAgentData.platform.toLowerCase() === "macos"
275-
: /macintosh|mac os x/i.test(navigator.userAgent);
276-
277273
return (
278274
<Canvas
279275
className="dither-container"
280-
style={{ padding: isMac ? "1px" : "2px" }}
281276
camera={{ position: [0, 0, 6] }}
282277
dpr={window.devicePixelRatio}
283278
gl={{ antialias: true, preserveDrawingBuffer: true }}

src/tailwind/Backgrounds/Dither/Dither.jsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,14 +268,9 @@ export default function Dither({
268268
enableMouseInteraction = true,
269269
mouseRadius = 1
270270
}) {
271-
const isMac = navigator.userAgentData
272-
? navigator.userAgentData.platform.toLowerCase() === "macos"
273-
: /macintosh|mac os x/i.test(navigator.userAgent);
274-
275271
return (
276272
<Canvas
277273
className="w-full h-full relative"
278-
style={{ padding: isMac ? "1px" : "2px" }}
279274
camera={{ position: [0, 0, 6] }}
280275
dpr={window.devicePixelRatio}
281276
gl={{ antialias: true, preserveDrawingBuffer: true }}

src/ts-default/Backgrounds/Dither/Dither.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -315,15 +315,9 @@ export default function Dither({
315315
enableMouseInteraction = true,
316316
mouseRadius = 1,
317317
}: DitherProps) {
318-
const isMac =
319-
(navigator as any).userAgentData
320-
? (navigator as any).userAgentData.platform.toLowerCase() === "macos"
321-
: /macintosh|mac os x/i.test(navigator.userAgent);
322-
323318
return (
324319
<Canvas
325320
className="dither-container"
326-
style={{ padding: isMac ? "1px" : "2px" }}
327321
camera={{ position: [0, 0, 6] }}
328322
dpr={window.devicePixelRatio}
329323
gl={{ antialias: true, preserveDrawingBuffer: true }}

src/ts-tailwind/Backgrounds/Dither/Dither.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -313,15 +313,9 @@ export default function Dither({
313313
enableMouseInteraction = true,
314314
mouseRadius = 1,
315315
}: DitherProps) {
316-
const isMac =
317-
(navigator as any).userAgentData
318-
? (navigator as any).userAgentData.platform.toLowerCase() === "macos"
319-
: /macintosh|mac os x/i.test(navigator.userAgent);
320-
321316
return (
322317
<Canvas
323318
className="w-full h-full relative"
324-
style={{ padding: isMac ? "1px" : "2px" }}
325319
camera={{ position: [0, 0, 6] }}
326320
dpr={window.devicePixelRatio}
327321
gl={{ antialias: true, preserveDrawingBuffer: true }}

0 commit comments

Comments
 (0)