1
0

config.ts 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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: 'Groups', link: '/examples/groups' },
  42. { text: 'Load Textures', link: '/examples/load-textures' },
  43. { text: 'Load Models', link: '/examples/load-models' },
  44. { text: 'Load Text', link: '/examples/text-3d' },
  45. ],
  46. },
  47. {
  48. text: 'Advanced',
  49. items: [
  50. { text: 'Extending', link: '/advanced/extending' },
  51. {
  52. text: 'Caveats',
  53. link: '/advanced/caveats',
  54. },
  55. ],
  56. },
  57. {
  58. text: 'Cientos ⚡️',
  59. collapsible: true,
  60. items: [
  61. { text: 'Introduction', link: '/cientos/' },
  62. {
  63. text: 'Abstractions',
  64. items: [{ text: 'Text3D', link: '/cientos/abstractions/text-3d' }],
  65. },
  66. {
  67. text: 'Controls',
  68. items: [
  69. { text: 'OrbitControls', link: '/cientos/controls/orbit-controls' },
  70. { text: 'TransformControls', link: '/cientos/controls/transform-controls' },
  71. ],
  72. },
  73. {
  74. text: 'Loaders',
  75. items: [
  76. { text: 'useGLTF', link: '/cientos/loaders/use-gltf' },
  77. { text: 'GLTFModel', link: '/cientos/loaders/gltf-model' },
  78. { text: 'useFBX', link: '/cientos/loaders/use-fbx' },
  79. { text: 'FBXModel', link: '/cientos/loaders/fbx-model' },
  80. ],
  81. },
  82. {
  83. text: 'Shapes',
  84. items: [{ text: 'Plane', link: '/cientos/shapes/plane' }],
  85. },
  86. {
  87. text: 'Misc',
  88. items: [{ text: 'useTweakpane', link: '/cientos/misc/use-tweakpane' }],
  89. },
  90. ],
  91. },
  92. ],
  93. nav: [
  94. { text: 'Guide', link: '/guide/' },
  95. { text: 'API', link: '/api/renderer' },
  96. /* { text: 'API', link: '/api/' },
  97. { text: 'Config', link: '/config/' }, */
  98. /* {
  99. text: 'Ecosystem',
  100. activeMatch: `^/ecosystem/`,
  101. items: [
  102. {
  103. text: `Core v${version}`,
  104. items: [
  105. {
  106. text: 'Release Notes ',
  107. link: `https://github.com/Tresjs/tres/releases/tag/%40tresjs%2Fcore%40${version}`,
  108. },
  109. ],
  110. },
  111. {
  112. text: `Cientos v${cientosVersion}`,
  113. items: [
  114. {
  115. text: 'Release Notes ',
  116. link: `https://github.com/Tresjs/tres/releases/tag/%40tresjs%2Fcientos%40${cientosVersion}`,
  117. },
  118. ],
  119. },
  120. ],
  121. }, */
  122. ],
  123. socialLinks: [
  124. /* { icon: 'github', link: 'https://github.com/tresjs/tres' }, */
  125. { icon: 'twitter', link: 'https://twitter.com/alvarosabu' },
  126. ],
  127. },
  128. vite: {
  129. plugins: [svgLoader(), Unocss()],
  130. },
  131. })