-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
632e955
commit 2e61fc2
Showing
104 changed files
with
1,872 additions
and
132 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "tests-svelte5", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vite dev", | ||
"build": "vite build", | ||
"preview": "vite build && vite preview", | ||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", | ||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" | ||
}, | ||
"devDependencies": { | ||
"@sveltejs/adapter-auto": "^3.0.0", | ||
"@sveltejs/kit": "^2.0.0", | ||
"@sveltejs/vite-plugin-svelte": "^4.0.0", | ||
"svelte": "^5.0.0", | ||
"svelte-check": "^4.0.0", | ||
"typescript": "^5.0.0", | ||
"vite": "^5.0.11" | ||
}, | ||
"svelte": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"type": "module" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// See https://kit.svelte.dev/docs/types#app | ||
// for information about these interfaces | ||
declare global { | ||
namespace App { | ||
// interface Error {} | ||
// interface Locals {} | ||
// interface PageData {} | ||
// interface PageState {} | ||
// interface Platform {} | ||
} | ||
} | ||
|
||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link rel="icon" href="%sveltekit.assets%/favicon.png" /> | ||
%sveltekit.head% | ||
</head> | ||
<body data-sveltekit-preload-data="hover" style="margin: 0"> | ||
<div>%sveltekit.body%</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const trailingSlash = "always"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<ol> | ||
<li><a href="hello-world/">Hello world</a></li> | ||
<li><a href="remount/">Remounting canvas</a></li> | ||
<li><a href="oversized-canvas/">Oversized canvas</a></li> | ||
<li><a href="logo/">Logo</a></li> | ||
<li><a href="landing-page-bubbles/">Landing page with bubbles</a></li> | ||
<li><a href="landing-page-halo/">Landing page with a halo</a></li> | ||
<li><a href="slider/">Slider component</a></li> | ||
</ol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<ul> | ||
<li><a href="webgl/">WebGL</a></li> | ||
<li><a href="webgpu/">WebGPU</a></li> | ||
</ul> |
22 changes: 22 additions & 0 deletions
22
packages/tests-svelte5/src/routes/hello-world/webgl/+page.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script> | ||
import { WebGlShader } from "svader"; | ||
import shaderCode from "./shader.frag?raw"; | ||
</script> | ||
|
||
<WebGlShader | ||
width="500px" | ||
height="500px" | ||
code={shaderCode} | ||
parameters={[ | ||
{ | ||
name: "u_resolution", | ||
value: "resolution", | ||
}, | ||
{ | ||
name: "u_offset", | ||
value: "offset", | ||
}, | ||
]} | ||
> | ||
<div class="fallback">WebGL not supported in this environment.</div> | ||
</WebGlShader> |
13 changes: 13 additions & 0 deletions
13
packages/tests-svelte5/src/routes/hello-world/webgl/shader.frag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#version 300 es | ||
|
||
precision mediump float; | ||
out vec4 fragColor; | ||
|
||
uniform vec2 u_resolution; | ||
uniform vec2 u_offset; | ||
|
||
void main() { | ||
vec2 pos = gl_FragCoord.xy + u_offset; | ||
vec2 st = pos / u_resolution; | ||
fragColor = vec4(st, 0.0, 1.0); | ||
} |
24 changes: 24 additions & 0 deletions
24
packages/tests-svelte5/src/routes/hello-world/webgpu/+page.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<script> | ||
import { WebGpuShader } from "svader"; | ||
import shaderCode from "./shader.wgsl?raw"; | ||
</script> | ||
|
||
<WebGpuShader | ||
width="500px" | ||
height="500px" | ||
code={shaderCode} | ||
parameters={[ | ||
{ | ||
label: "Resolution", | ||
binding: 0, | ||
value: "resolution", | ||
}, | ||
{ | ||
label: "Offset", | ||
binding: 1, | ||
value: "offset", | ||
}, | ||
]} | ||
> | ||
<div class="fallback">WebGPU not supported in this environment.</div> | ||
</WebGpuShader> |
9 changes: 9 additions & 0 deletions
9
packages/tests-svelte5/src/routes/hello-world/webgpu/shader.wgsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@group(0) @binding(0) var<uniform> resolution: vec2f; | ||
@group(0) @binding(1) var<uniform> offset: vec2f; | ||
|
||
@fragment | ||
fn main(@builtin(position) raw_pos: vec4f) -> @location(0) vec4f { | ||
let pos = raw_pos.xy + offset; | ||
let st = pos / resolution; | ||
return vec4f(st, 0.0, 1.0); | ||
} |
4 changes: 4 additions & 0 deletions
4
packages/tests-svelte5/src/routes/landing-page-bubbles/+page.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<ul> | ||
<li><a href="webgl/">WebGL</a></li> | ||
<li><a href="webgpu/">WebGPU</a></li> | ||
</ul> |
Oops, something went wrong.