Skip to content

Commit b2800d6

Browse files
committed
re-arrange, add alpha blending
1 parent d5f9a19 commit b2800d6

7 files changed

Lines changed: 58 additions & 188 deletions

File tree

public/shader.vs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#version 300 es
22
in vec3 position;
33
in vec3 instanceCenter;
4-
in vec4 instanceColor;
4+
in vec3 instanceColor;
55
in float instanceSize;
66

77
uniform mat4 u_view;
@@ -11,5 +11,5 @@ out vec4 v_color;
1111

1212
void main() {
1313
gl_Position = u_proj * u_view * vec4(instanceSize * position + instanceCenter, 1.0);
14-
v_color = instanceColor;
14+
v_color = vec4(instanceColor, smoothstep(0.0, 0.05, instanceSize));
1515
}

src/bg-anim/bg-sandbox.ts

Lines changed: 0 additions & 99 deletions
This file was deleted.

src/components/sidebar.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
const { what } = Astro.props;
2+
const { example } = Astro.props;
33
---
44

55
<ul>
66
<li>About me</li>
77
<li>Projects</li>
8-
<li>{what}</li>
8+
<li>{example}</li>
99
</ul>

src/layouts/Layout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
---
2-
import "../styles/global.css"
2+
// import "../styles/global.css"
33
---

src/pages/index.astro

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ import { Image } from "astro:assets";
1717
>
1818
<canvas
1919
id="bg-canvas"
20-
class="fixed top-0 left-0 w-screen h-screen block -z-10"
21-
>Browser doesn't support canvas :/</canvas
22-
>
20+
class="fixed top-0 left-0 w-screen h-screen block -z-10"></canvas>
2321
<div class="flex">
2422
<a class="self-center" href="https://github.com/lith-x">
2523
<Image
@@ -89,8 +87,9 @@ import { Image } from "astro:assets";
8987
and/or debugging across multiple platforms.
9088
</li>
9189
</ul>
90+
<div class="fixed bottom-1 left-1 text-[1em] text-violet-300 italic">made by me! <a href="https://github.com/lith-x/lith-x.github.io/">source</a></div>
9291
<script>
93-
import {main} from "../bg-anim/bg-main";
92+
import { main } from "../ts/bg-webgl";
9493
main();
9594
</script>
9695
</body>

src/pages/personal_info.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)