1
0

zh.ts 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress'
  2. export const zhConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
  3. themeConfig: {
  4. editLink: {
  5. pattern: 'https://github.com/tresjs/tres/edit/main/docs/:path',
  6. text: '对本页内容给出建议',
  7. },
  8. sidebar: [
  9. {
  10. text: '使用指南',
  11. items: [
  12. { text: '简介', link: '/zh/guide/' },
  13. { text: '入门指南', link: '/zh/guide/getting-started' },
  14. { text: '你的第一个场景', link: '/zh/guide/your-first-scene' },
  15. { text: 'Nuxt', link: '/zh/guide/nuxt' },
  16. { text: '故障排除', link: '/zh/guide/troubleshooting' },
  17. { text: '从 v1 迁移', link: '/zh/guide/migration-guide' },
  18. ],
  19. },
  20. {
  21. text: 'API',
  22. items: [
  23. { text: 'TresCanvas', link: '/zh/api/tres-canvas' },
  24. {
  25. text: '实例, 参数和 props',
  26. link: '/zh/api/instances-arguments-and-props',
  27. },
  28. {
  29. text: '组合式函数',
  30. link: '/zh/api/composables',
  31. },
  32. {
  33. text: '事件',
  34. link: '/zh/api/events',
  35. },
  36. ],
  37. },
  38. {
  39. text: '进阶',
  40. items: [
  41. { text: '扩展', link: '/zh/advanced/extending' },
  42. { text: '原语', link: '/zh/advanced/primitive' },
  43. {
  44. text: '注意事项',
  45. link: '/zh/advanced/caveats',
  46. },
  47. ],
  48. },
  49. {
  50. text: 'Debug',
  51. items: [
  52. { text: 'Devtools', link: '/zh/debug/devtools' },
  53. ],
  54. },
  55. {
  56. text: '专题手册 🍳🧑‍🍳',
  57. link: '/zh/cookbook/',
  58. items: [
  59. { text: '轨道控制器', link: '/zh/cookbook/orbit-controls' },
  60. { text: '基础动画', link: '/zh/cookbook/basic-animations' },
  61. { text: '组', link: '/zh/cookbook/groups' },
  62. { text: '加载纹理', link: '/zh/cookbook/load-textures' },
  63. { text: '加载模型', link: '/zh/cookbook/load-models' },
  64. { text: '加载文本', link: '/zh/cookbook/text-3d' },
  65. { text: '光照和阴影', link: '/zh/cookbook/lights-shadows' },
  66. { text: '着色器', link: '/zh/cookbook/shaders' },
  67. ],
  68. },
  69. {
  70. text: '指令',
  71. collapsed: true,
  72. items: [
  73. { text: 'v-log', link: '/zh/directives/v-log' },
  74. { text: 'v-light-helper', link: '/zh/directives/v-light-helper' },
  75. { text: 'v-always-look-at', link: '/zh/directives/v-always-look-at' },
  76. { text: 'v-distance-to', link: '/zh/directives/v-distance-to' },
  77. { text: 'v-rotate', link: '/directives/v-rotate' },
  78. ],
  79. },
  80. {
  81. text: '生态系统',
  82. items: [
  83. {
  84. text: 'Cientos 💛',
  85. link: 'https://cientos.tresjs.org/',
  86. },
  87. {
  88. text: 'Nuxt module',
  89. link: 'https://github.com/Tresjs/nuxt',
  90. },
  91. {
  92. text: 'TresLeches 🍰',
  93. link: 'https://tresleches.tresjs.org/',
  94. },
  95. {
  96. text: 'Post-processing (Soon)',
  97. },
  98. ],
  99. },
  100. ],
  101. nav: [
  102. { text: '使用指南', link: '/zh/guide/' },
  103. { text: 'API', link: '/zh/api/tres-canvas' },
  104. /* { text: 'API', link: '/api/' },
  105. { text: 'Config', link: '/config/' }, */
  106. {
  107. text: '资源',
  108. items: [
  109. { text: '团队', link: '/zh/team' },
  110. { text: '版本发布', link: 'https://github.com/Tresjs/tres/releases' },
  111. {
  112. text: '演练场',
  113. link: 'https://play.tresjs.org/',
  114. },
  115. {
  116. text: 'Github',
  117. link: 'https://github.com/Tresjs/tres/',
  118. },
  119. {
  120. text: '议题',
  121. link: 'https://github.com/Tresjs/tres/issues',
  122. },
  123. {
  124. text: '生态系统',
  125. items: [
  126. {
  127. text: 'Cientos 💛',
  128. link: 'https://cientos.tresjs.org/',
  129. },
  130. {
  131. text: 'Nuxt 模块',
  132. link: 'https://github.com/Tresjs/nuxt',
  133. },
  134. {
  135. text: 'TresLeches 🍰',
  136. link: 'https://tresleches.tresjs.org/',
  137. },
  138. ],
  139. },
  140. ],
  141. },
  142. ],
  143. search: {
  144. provider: 'local',
  145. options: {
  146. locales: {
  147. zh: {
  148. translations: {
  149. button: {
  150. buttonText: '搜索',
  151. buttonAriaLabel: '搜索',
  152. },
  153. modal: {
  154. displayDetails: '显示详细列表',
  155. resetButtonTitle: '重制搜索',
  156. backButtonTitle: '关闭搜索',
  157. noResultsText: '没有找到相关结果',
  158. footer: {
  159. selectText: '选择',
  160. selectKeyAriaLabel: 'enter',
  161. navigateText: '切换',
  162. navigateUpKeyAriaLabel: '上方向键',
  163. navigateDownKeyAriaLabel: '下方向键',
  164. closeText: '关闭',
  165. closeKeyAriaLabel: 'esc',
  166. },
  167. },
  168. },
  169. },
  170. },
  171. },
  172. },
  173. darkModeSwitchLabel: '外观',
  174. sidebarMenuLabel: '菜单',
  175. returnToTopLabel: '返回顶部',
  176. langMenuLabel: '更改语言',
  177. lastUpdatedText: '最近更新',
  178. outlineTitle: '此页面上',
  179. docFooter: {
  180. next: '下一页',
  181. prev: '上一页',
  182. },
  183. },
  184. }