config.ts 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. text: 'Events',
  36. link: '/api/events',
  37. },
  38. ],
  39. },
  40. {
  41. text: 'Examples',
  42. items: [
  43. { text: 'Orbit Controls', link: '/examples/orbit-controls' },
  44. { text: 'Basic Animations', link: '/examples/basic-animations' },
  45. { text: 'Groups', link: '/examples/groups' },
  46. { text: 'Load Textures', link: '/examples/load-textures' },
  47. { text: 'Load Models', link: '/examples/load-models' },
  48. { text: 'Load Text', link: '/examples/text-3d' },
  49. ],
  50. },
  51. {
  52. text: 'Advanced',
  53. items: [
  54. { text: 'Extending', link: '/advanced/extending' },
  55. {
  56. text: 'Caveats',
  57. link: '/advanced/caveats',
  58. },
  59. ],
  60. },
  61. {
  62. text: 'Cientos 💛',
  63. collapsible: true,
  64. items: [
  65. { text: 'Introduction', link: '/cientos/' },
  66. {
  67. text: 'Abstractions',
  68. items: [
  69. { text: 'Text3D', link: '/cientos/abstractions/text-3d' },
  70. { text: 'useAnimations', link: '/cientos/abstractions/use-animations' },
  71. { text: 'Environment', link: '/cientos/abstractions/environment' },
  72. { text: 'useEnvironment', link: '/cientos/abstractions/use-environment' },
  73. { text: 'usePamMouse', link: '/cientos/abstractions/pam-camera-mouse' },
  74. ],
  75. },
  76. {
  77. text: 'Controls',
  78. items: [
  79. { text: 'OrbitControls', link: '/cientos/controls/orbit-controls' },
  80. { text: 'TransformControls', link: '/cientos/controls/transform-controls' },
  81. ],
  82. },
  83. {
  84. text: 'Loaders',
  85. items: [
  86. { text: 'useGLTF', link: '/cientos/loaders/use-gltf' },
  87. { text: 'GLTFModel', link: '/cientos/loaders/gltf-model' },
  88. { text: 'useFBX', link: '/cientos/loaders/use-fbx' },
  89. { text: 'FBXModel', link: '/cientos/loaders/fbx-model' },
  90. ],
  91. },
  92. {
  93. text: 'Shapes',
  94. items: [
  95. { text: 'Box', link: '/cientos/shapes/box' },
  96. { text: 'Circle', link: '/cientos/shapes/circle' },
  97. { text: 'Cone', link: '/cientos/shapes/cone' },
  98. { text: 'Dodecahedron', link: '/cientos/shapes/dodecahedron' },
  99. { text: 'Icosahedron', link: '/cientos/shapes/icosahedron' },
  100. { text: 'Octahedron', link: '/cientos/shapes/octahedron' },
  101. { text: 'Plane', link: '/cientos/shapes/plane' },
  102. { text: 'Ring', link: '/cientos/shapes/ring' },
  103. { text: 'Sphere', link: '/cientos/shapes/sphere' },
  104. { text: 'Tetrahedron', link: '/cientos/shapes/tetrahedron' },
  105. { text: 'Torus', link: '/cientos/shapes/torus' },
  106. { text: 'TorusKnot', link: '/cientos/shapes/torus-knot' },
  107. { text: 'Tube', link: '/cientos/shapes/tube' },
  108. ],
  109. },
  110. {
  111. text: 'Misc',
  112. items: [{ text: 'useTweakpane', link: '/cientos/misc/use-tweakpane' }],
  113. },
  114. ],
  115. },
  116. ],
  117. nav: [
  118. { text: 'Guide', link: '/guide/' },
  119. { text: 'API', link: '/api/renderer' },
  120. /* { text: 'API', link: '/api/' },
  121. { text: 'Config', link: '/config/' }, */
  122. /* {
  123. text: 'Ecosystem',
  124. activeMatch: `^/ecosystem/`,
  125. items: [
  126. {
  127. text: `Core v${version}`,
  128. items: [
  129. {
  130. text: 'Release Notes ',
  131. link: `https://github.com/Tresjs/tres/releases/tag/%40tresjs%2Fcore%40${version}`,
  132. },
  133. ],
  134. },
  135. {
  136. text: `Cientos v${cientosVersion}`,
  137. items: [
  138. {
  139. text: 'Release Notes ',
  140. link: `https://github.com/Tresjs/tres/releases/tag/%40tresjs%2Fcientos%40${cientosVersion}`,
  141. },
  142. ],
  143. },
  144. ],
  145. }, */
  146. ],
  147. socialLinks: [
  148. /* { icon: 'github', link: 'https://github.com/tresjs/tres' }, */
  149. { icon: 'twitter', link: 'https://twitter.com/alvarosabu' },
  150. ],
  151. },
  152. vite: {
  153. plugins: [svgLoader(), Unocss()],
  154. },
  155. })