config.ts 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. import Unocss from 'unocss/vite'
  2. import svgLoader from 'vite-svg-loader'
  3. import { defineConfig } from 'vitepress'
  4. import { resolve } from 'pathe'
  5. export default defineConfig({
  6. title: 'TresJS',
  7. description: 'Declarative ThreeJS using Vue Components',
  8. head: [
  9. ['link', { rel: 'icon', type: 'image/svg', href: '/favicon.svg' }],
  10. ['script', { defer: 'true', 'data-domain': 'tresjs.org', src: 'https://plausible.io/js/script.js' }],
  11. ],
  12. themeConfig: {
  13. logo: '/logo.svg',
  14. sidebar: [
  15. {
  16. text: 'Guide',
  17. items: [
  18. // This shows `/guide/index.md` page.
  19. { text: 'Introduction', link: '/guide/' },
  20. { text: 'Getting Started', link: '/guide/getting-started' },
  21. { text: 'Your first Scene', link: '/guide/your-first-scene' },
  22. { text: 'Migrate from v1', link: '/guide/migration-guide' },
  23. ],
  24. },
  25. {
  26. text: 'API',
  27. items: [
  28. { text: 'Renderer', link: '/api/renderer' },
  29. {
  30. text: 'Instances, arguments and props',
  31. link: '/api/instances-arguments-and-props',
  32. },
  33. {
  34. text: 'Composables',
  35. link: '/api/composables',
  36. },
  37. {
  38. text: 'Events',
  39. link: '/api/events',
  40. },
  41. ],
  42. },
  43. {
  44. text: 'Examples',
  45. items: [
  46. { text: 'Orbit Controls', link: '/examples/orbit-controls' },
  47. { text: 'Basic Animations', link: '/examples/basic-animations' },
  48. { text: 'Groups', link: '/examples/groups' },
  49. { text: 'Load Textures', link: '/examples/load-textures' },
  50. { text: 'Load Models', link: '/examples/load-models' },
  51. { text: 'Load Text', link: '/examples/text-3d' },
  52. ],
  53. },
  54. {
  55. text: 'Advanced',
  56. items: [
  57. { text: 'Extending', link: '/advanced/extending' },
  58. {
  59. text: 'Caveats',
  60. link: '/advanced/caveats',
  61. },
  62. ],
  63. },
  64. {
  65. text: 'Ecosystem',
  66. items: [
  67. {
  68. text: `Cientos 💛`,
  69. link: 'https://cientos.tresjs.org/',
  70. },
  71. ],
  72. },
  73. ],
  74. nav: [
  75. { text: 'Guide', link: '/guide/' },
  76. { text: 'API', link: '/api/renderer' },
  77. /* { text: 'API', link: '/api/' },
  78. { text: 'Config', link: '/config/' }, */
  79. {
  80. text: 'Ecosystem',
  81. items: [
  82. {
  83. text: `Cientos 💛`,
  84. link: 'https://cientos.tresjs.org/',
  85. },
  86. ],
  87. },
  88. ],
  89. socialLinks: [
  90. /* { icon: 'github', link: 'https://github.com/tresjs/tres' }, */
  91. { icon: 'twitter', link: 'https://twitter.com/alvarosabu' },
  92. { icon: 'discord', link: 'https://discord.gg/wXx63MwW' },
  93. ],
  94. },
  95. vite: {
  96. plugins: [svgLoader(), Unocss()],
  97. resolve: {
  98. alias: {
  99. '/@': resolve(__dirname, '../../src'),
  100. },
  101. },
  102. },
  103. })