Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
572f3f5
chore: refactor project structure and update configurations WIP
alvarosabu Mar 30, 2025
3a91ca0
feat: update configurations and enhance component structure
alvarosabu Apr 16, 2025
2fc58bc
refactor: cult-of-the-lamb ritual component
alvarosabu Jun 19, 2025
72aa4a0
feat: update dependencies and enhance Brownian distribution component
alvarosabu Jun 20, 2025
2dcc683
fix: enhance card styling in app.config.ts
alvarosabu Jun 20, 2025
1cc127c
feat: enhance app layout and update dependencies
alvarosabu Jun 20, 2025
aa1e454
feat: refactor synthwave landscape components and improve rendering l…
alvarosabu Jun 20, 2025
5d1c0d4
feat: update low poly planet components and enhance rendering logic
alvarosabu Jun 20, 2025
4ab317a
fix: update dependencies for @tresjs packages
alvarosabu Jun 24, 2025
98e6fea
feat: enhance David component with loading readiness and rendering logic
alvarosabu Jun 24, 2025
2246175
feat: update author handling and enhance component structure
alvarosabu Jun 25, 2025
037e561
chore: update glass material
alvarosabu Jun 26, 2025
87a8c1c
chore: threejs journey portal
alvarosabu Jun 26, 2025
6ba83a8
fix: update SEO metadata and enhance TheCard component interaction
alvarosabu Jun 26, 2025
b72f26c
fix: update date in portal journey markdown
alvarosabu Jun 26, 2025
84b5ded
feat: phone html with tresjs next website
alvarosabu Jun 30, 2025
4c1088c
feat: refactor Nuxt Stones component and enhance rendering logic
alvarosabu Jun 30, 2025
7a618c8
feat: refactor potions classroom components for improved reactivity a…
alvarosabu Jun 30, 2025
e83a33c
feat: update repulsion effect component and enhance documentation
alvarosabu Jul 1, 2025
c7f25dd
refactor: streamline imports and enhance component structure in Shade…
alvarosabu Jul 1, 2025
2f9b416
feat: enhance particle pumpkin component structure and improve code r…
alvarosabu Jul 1, 2025
eeca252
chore: update and rework magical marbles (#259)
damienmontastier Jul 5, 2025
5d5ee9f
feat: add BlobPermissionModal and enhance dancing blob component
alvarosabu Jul 19, 2025
824f895
feat: update space game components and enhance performance
alvarosabu Jul 19, 2025
341d952
refactor: streamline imports in 3D components for improved clarity
alvarosabu Jul 19, 2025
45cec97
refactor: clean up Marble.vue and index.vue for improved readability …
alvarosabu Jul 19, 2025
10f4b50
feat: add Galaxy component and enhance galaxy generation logic
alvarosabu Jul 20, 2025
8850856
chore: update package dependencies and improve markdown tags
alvarosabu Jul 28, 2025
43848cb
chore: update Netlify configuration and npm settings
alvarosabu Jul 28, 2025
e6eb695
feat!: nuxt 4
alvarosabu Jul 28, 2025
19664e3
chore: add Netlify configuration for build settings
alvarosabu Jul 29, 2025
cca075f
chore: add better-sqlite3 dependency to package.json
alvarosabu Jul 29, 2025
faef63f
chore: update pnpm-lock.yaml to include better-sqlite3 and other depe…
alvarosabu Jul 29, 2025
86015a2
fix: correct markdown tags in spooky-saur.md
alvarosabu Jul 29, 2025
c33b158
refactor: enhance Halloween decorations and improve component structure
alvarosabu Aug 1, 2025
b665360
chore: update .gitignore to include AI Assistant configurations
alvarosabu Aug 4, 2025
661ec8a
feat: refactor-page-structure (#260)
alvarosabu Aug 5, 2025
8fa5984
feat: add image format support in Nuxt configuration
alvarosabu Aug 5, 2025
ddf13ed
feat: add toggle functionality to TheCodeButton component
alvarosabu Aug 5, 2025
d346eb9
feat: enhance content configuration and introduce TheActions component
alvarosabu Aug 9, 2025
2c4b3de
fix: update title templates for improved SEO handling
alvarosabu Aug 9, 2025
ebebae9
feat: enhance TheActions component and update experiment markdown files
alvarosabu Aug 9, 2025
a2ee8d1
feat: implement haunted house scene with building, floor, and ghost c…
alvarosabu Aug 9, 2025
c25f0f3
feat: webgpu (#262)
alvarosabu Sep 3, 2025
da2484b
feat: add thumbnails to experiment markdown files and update webgpu e…
alvarosabu Sep 3, 2025
d2e9cd4
feat: add TheScreenshot component to various experiments and include …
alvarosabu Sep 3, 2025
ee87689
feat: add featured property to experiments and update related components
alvarosabu Sep 3, 2025
558016f
feat: add lucide icon set to dependencies in package.json and pnpm-lo…
alvarosabu Sep 3, 2025
f9c8393
feat: dancing cube boy (#263)
alvarosabu Sep 11, 2025
c215bcb
feat: grainy liquid blob (#261)
alvarosabu Sep 11, 2025
7f87dca
feat: WIP porsche 911 showcase (#258)
alvarosabu Sep 20, 2025
737245d
chore: update dependencies in package.json and pnpm-lock.yaml
alvarosabu Sep 21, 2025
5789f05
Merge branch 'main' into next
alvarosabu Sep 21, 2025
74c7b6c
refactor: clean up components and improve type safety
alvarosabu Sep 21, 2025
f8a0456
feat: enhance HologramCube component with improved type safety and pe…
alvarosabu Sep 21, 2025
f62ce8b
fix: adjust position of HologramCube component for improved rendering
alvarosabu Sep 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 0 additions & 7 deletions .eslintrc.json

This file was deleted.

8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@ pnpm-debug.log*
# macOS-specific files
.DS_Store
.nuxt/

.data

# AI Assistant configurations
.cursor/
.claude/
CLAUDE.md

8 changes: 7 additions & 1 deletion .netlify.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[build.environment]
NODE_VERSION = "22"
[build]
publish = "dist"
command = "pnpm run generate"
publish = "dist"
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
15 changes: 15 additions & 0 deletions app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export default defineAppConfig({
ui: {
colors: {
primary: 'teal',
accent: 'yellow',
neutral: 'zinc'
},
card: {
slots: {
root: 'rounded-xs hover:bg-linear-[115deg,#272727 .06%,#171717]',
body: 'p-2 sm:p-3'
}
}
}
})
5 changes: 0 additions & 5 deletions app.vue

This file was deleted.

39 changes: 39 additions & 0 deletions app/app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<script setup lang="ts">
const { data: navigation } = await useAsyncData('navigation', () => queryCollectionNavigation('experiments'))
const { data: files } = useLazyAsyncData('search', () => queryCollectionSearchSections('experiments'), {
server: false
})

useHead({
meta: [
{ name: 'viewport', content: 'width=device-width, initial-scale=1' }
],
link: [
{ rel: 'icon', href: '/favicon.ico' }
],
htmlAttrs: {
lang: 'en'
}
})

useSeoMeta({
titleTemplate: title => title ? `${title} · TresJS Lab` : 'TresJS Lab',
ogSiteName: 'TresJS Lab',
twitterCard: 'summary_large_image'
})

provide('navigation', navigation)
</script>

<template>
<UApp>
<UMain>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</UMain>
<ClientOnly>
<LazyUContentSearch :files="files" :navigation="navigation" />
</ClientOnly>
</UApp>
</template>
File renamed without changes
45 changes: 45 additions & 0 deletions app/assets/styles/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
@import "tailwindcss";
@import "@nuxt/ui-pro";

@theme static {
--font-display: 'Manrope', sans-serif;
--font-sans: 'Inter', sans-serif;

--breakpoint-3xl: 1920px;
--ui-pattern-fg: color-mix(in oklab,var(--ui-text)5%,transparent);
--ui-pattern-bg: repeating-linear-gradient(315deg,var(--ui-pattern-fg)0,var(--ui-pattern-fg)1px,transparent 0,transparent 50%);
--ui-header-height: 3rem;


/* Teal Palette */
--color-teal-50: #f2fbf8;
--color-teal-100: #d3f4ea;
--color-teal-200: #a6e9d6;
--color-teal-300: #82dbc5;
--color-teal-400: #44bda2;
--color-teal-500: #2ba189;
--color-teal-600: #20816f;
--color-teal-700: #1d685b;
--color-teal-800: #1c534b;
--color-teal-900: #1b463f;
--color-teal-950: #0a2925;

/* Yellow/Brown Palette */
--color-yellow-50: #fff8eb;
--color-yellow-100: #feeac7;
--color-yellow-200: #fdd48a;
--color-yellow-300: #fbb03b;
--color-yellow-400: #fa9e25;
--color-yellow-500: #f47a0c;
--color-yellow-600: #b85607;
--color-yellow-700: #b3390a;
--color-yellow-800: #922b0e;
--color-yellow-900: #78250f;
--color-yellow-950: #451003;
}

.pattern-bg {
background-image: var(--ui-pattern-bg);
background-size: 10px 10px;
background-attachment: fixed;
}
18 changes: 18 additions & 0 deletions app/components/BlenderCube.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<script setup lang="ts">
const { nodes, materials } = await useGLTF('https://raw.githubusercontent.com/Tresjs/assets/main/models/gltf/blender-cube.glb', { draco: true })
const model = nodes.Cube

Object.assign(materials.coat, {
envMapIntensity: 4,
roughness: 0.5,
metalness: 1,
})

Object.assign(materials.paint, {
envMapIntensity: 2, roughness: 0.45, metalness: 0.8, color: '#555'
})
</script>

<template>
<primitive :object="model" />
</template>
47 changes: 47 additions & 0 deletions app/components/TheActions.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<script setup lang="ts">
import { useDark, useToggle } from '@vueuse/core'
import type { Page } from '~/app/types'

defineProps<{
page: Page
}>()

const isDark = useDark()
const visible = ref(true)
const openInfo = ref(false)
const toggleDark = useToggle(isDark)

defineShortcuts({
i: () => {
openInfo.value = !openInfo.value
},
h: () => {
visible.value = !visible.value
}
})
</script>
<template>
<UButtonGroup v-if="visible" size="sm">
<TheCodeButton />
<USlideover v-model:open="openInfo" size="lg" :title="page.title" :ui="{
content: 'max-w-2xl'
}">
<UButton :icon="'i-carbon-document'" color="neutral" variant="subtle" />
<template #title>
<div class="flex items-center gap-8">
<h2 class="text-2xl font-bold">{{ page.title }}</h2>
<UAvatarGroup size="xs">
<UTooltip v-for="author in page.authors" :key="author.slug" :text="author.name">
<UAvatar :src="author.avatar" :alt="author.name" />
</UTooltip>
</UAvatarGroup>
</div>
</template>
<template #body>
<ContentRenderer :value="page" />
</template>
</USlideover>
<UButton variant="subtle" color="neutral" :icon="isDark ? 'i-carbon-sun' : 'i-carbon-moon'" class="rounded-full"
@click="toggleDark()" />
</UButtonGroup>
</template>
88 changes: 88 additions & 0 deletions app/components/TheCard.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<script setup lang="ts">
import type { ExperimentItem } from '~/app/types'

interface Author {
name: string
avatar: string
}

interface Props {
experiment: ExperimentItem & {
stem: string
slug: string
title: string
thumbnail: string
author?: Author[] | null
repoPath: string
repoTitle: string
}
}

const props = defineProps<Props>()

const formattedDate = computed(() =>
new Date(props.experiment.date).toLocaleDateString('en-US', {
year: 'numeric',
month: 'short',
day: 'numeric'
})
)
</script>

<template>
<NuxtLink :to="`${experiment.stem}`">
<UCard class="relative transition-all duration-300 hover:shadow-lg hover:scale-102 hover:-translate-y-1">
<div class="relative aspect-video overflow-hidden bg-gray-100 dark:bg-gray-800 rounded-md">
<img :src="`/${experiment.stem}.png`" :alt="experiment.title"
class="object-cover w-full h-full transition-transform duration-300 group-hover:scale-105">

</div>


<!-- Tags -->
<div class="py-4 flex gap-2 flex-wrap">
<UBadge v-for="tag in experiment.tags" :key="tag" :label="tag" color="primary" variant="soft" size="sm" />
</div>

<h3 class="font-display font-bold text-lg">{{ experiment.title }}</h3>
<p class="font-mono text-xs text-gray-500 dark:text-gray-400 mt-1">
{{ formattedDate }}
</p>

<div class="mt-4 flex justify-between items-center flex-wrap gap-2">

<div v-if="experiment.authors?.length === 1">
<UBadge v-for="author in experiment.authors" :key="author" color="neutral" variant="soft" :avatar="{
src: author.avatar,
alt: author.name,
}">
{{ author.name }}
</UBadge>
</div>
<div v-else>
<UAvatarGroup>
<template v-for="author in experiment.authors" :key="author">
<UTooltip :text="author.name">
<UAvatar :src="author.avatar" :alt="author.name" size="xs" />
</UTooltip>
</template>
</UAvatarGroup>
</div>
<div class="flex gap-2">
<UBadge
v-if="experiment.featured"
color="warning"
variant="soft"
label="Editor's Choice"
icon="i-lucide-star"
size="sm"
/>
<UTooltip :text="experiment.repoTitle">
<UButton color="primary" variant="ghost" icon="i-heroicons-code-bracket" size="xs" :to="experiment.repoPath"
target="_blank" @click.stop />
</UTooltip>
</div>
</div>
</UCard>
</NuxtLink>
</template>
23 changes: 23 additions & 0 deletions app/components/TheCodeButton.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script setup lang="ts">
const route = useRoute()

function getSlugFromPath(path: string) {
return path.split('/').pop()
}

function getRepoPathFromPath(path: string) {
return `https://github.com/Tresjs/lab/tree/main/components/content/${getSlugFromPath(path)}`
}

function getRepoTitleFromPath(path: string) {
return `${getSlugFromPath(path)} – code on Github`
}

const to = getRepoPathFromPath(route.path)
const title = getRepoTitleFromPath(route.path)

</script>

<template>
<UButton :to="to" :title="title" icon="i-carbon-logo-github" class="rounded-full" color="neutral" variant="subtle" />
</template>
25 changes: 25 additions & 0 deletions app/components/TheHeader.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<script lang="ts" setup>

</script>

<template>
<UHeader>
<template #title>
<div class="flex items-center">
<img src="/logo.svg" alt="Tres.js" class="h-3 mr-4">
<a class="font-bold text-dark font-sans text-sm" href="/" title="Home">Tres<span
class="text-primary-300">JS</span></a>
</div>
</template>
<UContentSearchButton variant="subtle" :collapsed="false" />

<template #right>
<UColorModeButton />

<UTooltip text="Open on GitHub" :kbds="['meta', 'G']">
<UButton color="neutral" variant="ghost" to="https://github.com/nuxt/ui" target="_blank"
icon="i-simple-icons-github" aria-label="GitHub" />
</UTooltip>
</template>
</UHeader>
</template>
Loading
Loading