Skip to content

Commit

Permalink
vanilla example
Browse files Browse the repository at this point in the history
  • Loading branch information
jerzakm committed Nov 16, 2023
1 parent 990d63b commit 8736dd9
Show file tree
Hide file tree
Showing 10 changed files with 980 additions and 27 deletions.
5 changes: 4 additions & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@
"@astrojs/starlight-tailwind": "^2.0.1",
"@astrojs/svelte": "^4.0.3",
"@astrojs/tailwind": "^5.0.2",
"@threejs-kit/materials": "workspace:^",
"@threejs-kit/instanced-sprite-mesh": "workspace:^",
"astro": "^3.5.4",
"sharp": "^0.32.6",
"svelte": "^4.2.3",
"tailwindcss": "^3.3.5"
"tailwindcss": "^3.3.5",
"three": "^0.158.0"
}
}
4 changes: 1 addition & 3 deletions apps/docs/src/content/docs/sprites/instanced-sprite-mesh.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
---
title: InstancedSpriteMesh
description: Parallax Occlusion material for three.js
description: InstancedSpriteMesh
---

import { Image } from "astro:assets";


### InstancedSpriteMesh
23 changes: 3 additions & 20 deletions apps/playground/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,22 +1,5 @@
<script lang="ts">
import App from '$lib/components/App.svelte';
<script>
export const ssr = false;
</script>

<div>
<App>
<slot />
</App>
</div>

<style>
:global(body) {
margin: 0;
}
div {
width: 100vw;
height: 100vh;
background: rgb(13, 19, 32);
background: linear-gradient(180deg, rgba(13, 19, 32, 1) 0%, rgba(8, 12, 21, 1) 100%);
}
</style>
<slot />
22 changes: 20 additions & 2 deletions apps/playground/src/routes/glint/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
<script lang="ts">
<script>
import GlintScene from '$lib/glint/GlintScene.svelte';
import App from '$lib/components/App.svelte';
</script>

<GlintScene />
<div>
<App>
<GlintScene />
</App>
</div>

<style>
:global(body) {
margin: 0;
}
div {
width: 100vw;
height: 100vh;
background: rgb(13, 19, 32);
background: linear-gradient(180deg, rgba(13, 19, 32, 1) 0%, rgba(8, 12, 21, 1) 100%);
}
</style>
20 changes: 19 additions & 1 deletion apps/playground/src/routes/instanced-sprite/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
<script>
import Scene from './Scene.svelte';
import App from '$lib/components/App.svelte';
</script>

<Scene />
<div>
<App>
<Scene />
</App>
</div>

<style>
:global(body) {
margin: 0;
}
div {
width: 100vw;
height: 100vh;
background: rgb(13, 19, 32);
background: linear-gradient(180deg, rgba(13, 19, 32, 1) 0%, rgba(8, 12, 21, 1) 100%);
}
</style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<script>
import { onMount } from 'svelte';
import { start } from './instancedSprite';
onMount(() => {
start();
});
</script>
Loading

1 comment on commit 8736dd9

@vercel
Copy link

@vercel vercel bot commented on 8736dd9 Nov 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

threejs-kit-playground – ./apps/playground

threejs-kit-playground-git-main-jerzakm.vercel.app
threejs-kit-playground-jerzakm.vercel.app
threejs-kit-playground.vercel.app

Please sign in to comment.