config.ts 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. import Unocss from 'unocss/vite'
  2. import svgLoader from 'vite-svg-loader'
  3. import { defineConfig } from 'vitepress'
  4. import { version } from '../../packages/tres/package.json'
  5. import { version as cientosVersion } from '../../packages/cientos/package.json'
  6. export default defineConfig({
  7. title: 'TresJS',
  8. description: 'Declarative ThreeJS using Vue Components',
  9. head: [['link', { rel: 'icon', type: 'image/svg', href: '/favicon.svg' }]],
  10. themeConfig: {
  11. logo: '/logo.svg',
  12. sidebar: [
  13. {
  14. text: 'Guide',
  15. items: [
  16. // This shows `/guide/index.md` page.
  17. { text: 'Introduction', link: '/guide/' },
  18. { text: 'Getting Started', link: '/guide/getting-started' },
  19. { text: 'Your first Scene', link: '/guide/your-first-scene' },
  20. ],
  21. },
  22. {
  23. text: 'API',
  24. items: [
  25. { text: 'Renderer', link: '/api/renderer' },
  26. {
  27. text: 'Instances, arguments and props',
  28. link: '/api/instances-arguments-and-props',
  29. },
  30. {
  31. text: 'Composables',
  32. link: '/api/composables',
  33. },
  34. ],
  35. },
  36. {
  37. text: 'Examples',
  38. items: [
  39. { text: 'Orbit Controls', link: '/examples/orbit-controls' },
  40. { text: 'Basic Animations', link: '/examples/basic-animations' },
  41. { text: 'Load Textures', link: '/examples/load-textures' },
  42. { text: 'Load Models', link: '/examples/load-models' },
  43. { text: 'Load Text', link: '/examples/text-3d' },
  44. ],
  45. },
  46. {
  47. text: 'Advanced',
  48. items: [
  49. { text: 'Extending', link: '/advanced/extending' },
  50. {
  51. text: 'Caveats',
  52. link: '/advanced/caveats',
  53. },
  54. ],
  55. },
  56. {
  57. text: 'Cientos ⚡️',
  58. collapsible: true,
  59. items: [
  60. { text: 'Introduction', link: '/cientos/' },
  61. {
  62. text: 'Abstractions',
  63. items: [{ text: 'Text3D', link: '/cientos/abstractions/text-3d' }],
  64. },
  65. {
  66. text: 'Controls',
  67. items: [
  68. { text: 'OrbitControls', link: '/cientos/controls/orbit-controls' },
  69. { text: 'TransformControls', link: '/cientos/controls/transform-controls' },
  70. ],
  71. },
  72. {
  73. text: 'Loaders',
  74. items: [
  75. { text: 'useGLTF', link: '/cientos/loaders/use-gltf' },
  76. { text: 'GLTFModel', link: '/cientos/loaders/gltf-model' },
  77. ],
  78. },
  79. {
  80. text: 'Misc',
  81. items: [{ text: 'useTweakpane', link: '/cientos/misc/use-tweakpane' }],
  82. },
  83. ],
  84. },
  85. ],
  86. nav: [
  87. { text: 'Guide', link: '/guide/' },
  88. { text: 'API', link: '/api/' },
  89. { text: 'Config', link: '/config/' },
  90. {
  91. text: 'Ecosystem',
  92. activeMatch: `^/ecosystem/`,
  93. items: [
  94. {
  95. text: `Core v${version}`,
  96. items: [
  97. {
  98. text: 'Release Notes ',
  99. link: `https://github.com/Tresjs/tres/releases/tag/%40tresjs%2Fcore%40${version}`,
  100. },
  101. ],
  102. },
  103. {
  104. text: `Cientos v${cientosVersion}`,
  105. items: [
  106. {
  107. text: 'Release Notes ',
  108. link: `https://github.com/Tresjs/tres/releases/tag/%40tresjs%2Fcientos%40${cientosVersion}`,
  109. },
  110. ],
  111. },
  112. ],
  113. },
  114. ],
  115. socialLinks: [
  116. { icon: 'github', link: 'https://github.com/tresjs/tres' },
  117. { icon: 'twitter', link: 'https://twitter.com/alvarosabu' },
  118. ],
  119. },
  120. vite: {
  121. plugins: [svgLoader(), Unocss()],
  122. },
  123. })