Răsfoiți Sursa

fix: docs build

Alvaro 2 ani în urmă
părinte
comite
2e4397d193

+ 1 - 1
.gitignore

@@ -5,4 +5,4 @@ packages/.DS_Store
 .pnpm-store/
 # Local Netlify folder
 .netlify
-apps/lunchbox-demo
+docs/.vitepress/dist

+ 4 - 4
README.md

@@ -1,6 +1,6 @@
 ![repository-banner.png](/public/github-banner.png)
 
-# Tres ▲ ■ ●
+# Tres
 
 > Declarative ThreeJS using Vue Components
 
@@ -13,9 +13,9 @@ Tres (Spanish word for "three", pronounced `/tres/` ) is a way of creating Three
 
 ## Packages
 
-| Package               | Version (click for changelogs)                                                                         |
-| --------------------- | :----------------------------------------------------------------------------------------------------- |
-| [Tres](packages/tres) | [![tres version](https://img.shields.io/npm/v/@tresjs/core.svg?label=%20)](packages/tres/CHANGELOG.md) |
+| Package                     | Version (click for changelogs)                                                                               |
+| --------------------------- | :----------------------------------------------------------------------------------------------------------- |
+| [Tres](packages/tres)       | [![tres version](https://img.shields.io/npm/v/@tresjs/core.svg?label=%20)](packages/tres/CHANGELOG.md)       |
 | [Cientos](packages/cientos) | [![tres version](https://img.shields.io/npm/v/@tresjs/cientos.svg?label=%20)](packages/cientos/CHANGELOG.md) |
 
 ## Docs

+ 2 - 2
docs/.vitepress/config.ts

@@ -2,7 +2,7 @@ import { defineConfig } from 'vitepress'
 
 export default defineConfig({
   title: 'TresJS',
-  description: 'Autogenerated wrappers based on THREE instances',
+  description: 'Declarative ThreeJS using Vue Components',
   head: [['link', { rel: 'icon', type: 'image/svg', href: '/favicon.svg' }]],
   themeConfig: {
     logo: '/logo.svg',
@@ -29,7 +29,7 @@ export default defineConfig({
       },
     ],
     socialLinks: [
-      { icon: 'github', link: 'https://github.com/alvarosabu/tres' },
+      { icon: 'github', link: 'https://github.com/tresjs/tres' },
       { icon: 'twitter', link: 'https://twitter.com/alvarosabu' },
     ],
   },

+ 3 - 10
docs/.vitepress/theme/index.ts

@@ -1,21 +1,14 @@
 import Tres from '@tresjs/core'
-import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
 // .vitepress/theme/index.ts
 import DefaultTheme from 'vitepress/theme'
 import './config.css'
 import FirstScene from './components/FirstScene.vue'
-import FirstSceneLightToon from './components/FirstSceneLightToon.vue'
-import ExtendExample from './components/ExtendExample.vue'
+
 export default {
   ...DefaultTheme,
   enhanceApp(ctx) {
     ctx.app.component('FirstScene', FirstScene)
-    ctx.app.component('FirstSceneLightToon', FirstSceneLightToon)
-    ctx.app.component('ExtendExample', ExtendExample)
-    ctx.app.use(Tres, {
-      extends: {
-        OrbitControls,
-      },
-    })
+
+    ctx.app.use(Tres)
   },
 }

+ 3 - 1
docs/guide/index.md

@@ -24,7 +24,9 @@ React ecosystem has an impresive **custom render** solution called [React-three-
 
 In my search for something similar in the VueJS ecosystem, I found this amazing library called [Lunchbox](https://github.com/breakfast-studio/lunchboxjs) which works with the same concept that R3F, it provides a [custom Vue3 Renderer](https://vuejs.org/api/custom-renderer.html). I'm also contrubuiting to improve this library so it gets as mature and feature-rich as R3F.
 
-The only problem is, Mixing renderers in Vue 3 is something the Vue community is still working on - see [here](https://github.com/vuejs/vue-loader/pull/1645) for more information. Until there is a solution similar to [React Reconciliation](https://reactjs.org/docs/reconciliation.html) you will need to create 2 separate `Apps` which might be not ideal.
+The only problem is, mixing different renderers in Vue 3 is something the Vue community is still working on - see [here](https://github.com/vuejs/vue-loader/pull/1645) for more information.
+
+Until there is a solution similar to [React Reconciliation](https://reactjs.org/docs/reconciliation.html) you will need to create 2 separate `Apps` which might be not ideal.
 
 ```ts
 // Example Vite setup

+ 1 - 1
docs/guide/your-first-scene.md

@@ -21,7 +21,7 @@ It's important that all components related to the scene live between the `<TresC
 The `TresCanvas` component is going to do some setup work behind the scene:
 
 - It creates a [**WebGLRenderer**](https://threejs.org/docs/index.html?q=webglrend#api/en/renderers/WebGLRenderer) that automatically updates every frame.
-- It sets the rende rloop to be called on every frame based on the browser refresh rate.
+- It sets the render loop to be called on every frame based on the browser refresh rate.
 
 ## Creating a scene
 

+ 4 - 4
docs/index.md

@@ -16,16 +16,16 @@ hero:
       text: Get Started
       link: /guide/
     - theme: alt
-      text: Why Vite?
-      link: /guide/why
+      text: Why Tres?
+      link: /guide/#motivation
     - theme: alt
       text: View on GitHub
-      link: https://github.com/alvarosabu/res
+      link: https://github.com/tresjs/tres
 
 features:
   - icon: 💡
     title: Declarative
-    details: Build 3D scene as they were Vue components
+    details: Build 3D scene as they were Vue components.
   - icon: ⚡️
     title: Powered by Vite
     details: Hot Module Replacement (HMR) that stays fast regardless of app size.