Skip to content

Commit

Permalink
Improve circle fade and welcome message
Browse files Browse the repository at this point in the history
  • Loading branch information
deluksic committed Jan 12, 2025
1 parent 356f170 commit f86e127
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 23 deletions.
1 change: 0 additions & 1 deletion docs/assets/index-CNCUtGkD.css

This file was deleted.

1 change: 1 addition & 0 deletions docs/assets/index-DimjPUGy.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 22 additions & 18 deletions docs/assets/index-CVtpojne.js → docs/assets/index-ZI7z1YVS.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<meta name="theme-color" content="#000000" />
<link rel="shortcut icon" type="image/ico" href="./assets/favicon-mtvwWgEY.ico" />
<title>Solid App</title>
<script type="module" crossorigin src="./assets/index-CVtpojne.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-CNCUtGkD.css">
<script type="module" crossorigin src="./assets/index-ZI7z1YVS.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-DimjPUGy.css">
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
6 changes: 6 additions & 0 deletions src/demo/App.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,16 @@
pointer-events: none;

& h1 {
font-weight: 300;
font-size: 3rem;
margin-top: 0;
}
}

.welcomeMessageSubtitle {
font-weight: 200;
}

.canvas {
image-rendering: pixelated;
}
4 changes: 3 additions & 1 deletion src/demo/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ export function App() {
<Show when={circles.length === 0}>
<div class={ui.welcomeMessage}>
<h1>Apollonian Circles</h1>
<span>Click to create, scroll to zoom.</span>
<p class={ui.welcomeMessageSubtitle}>
Click to create, scroll to zoom.
</p>
</div>
</Show>
<Root>
Expand Down
6 changes: 5 additions & 1 deletion src/demo/Circles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ const fadeFragmentShader = tgpu
// adding half a distWidth in order for circles to touch fully
let disk = clamp((0.5*distWidth + OUTER_RADIUS - dist) / distWidth, 0, 1);
let fade = linearstep(in.innerRatio, OUTER_RADIUS, dist);
return mix(style.fadeColor, style.rimColor, fade * fade) * vec4f(1, 1, 1, disk * fade);
let fadeEaseIn = fade * fade;
return (
mix(style.fadeColor, style.rimColor, fadeEaseIn) *
vec4f(1, 1, 1, disk * fadeEaseIn)
);
}
`,
)
Expand Down

0 comments on commit f86e127

Please sign in to comment.