Skip to content

Commit

Permalink
📝 测试文档部署
Browse files Browse the repository at this point in the history
  • Loading branch information
snowykami committed Aug 28, 2024
1 parent de42d34 commit 0d3511e
Show file tree
Hide file tree
Showing 60 changed files with 9,799 additions and 25 deletions.
6 changes: 5 additions & 1 deletion docs/.vitepress/config/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ export const en = defineConfig({

lang: "en-US",
description: "A library made for Minecraft particle generation",

themeConfig: {
nav: [
{text: 'Get Start', link: '/guide'},
{text: 'API Document', link: '/api/'},
{text: 'Demo', link: '/demo/'},
],
},
})
4 changes: 3 additions & 1 deletion docs/.vitepress/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import {defineConfig} from "vitepress";
import {common} from './common'
import {en} from './en'
import {zh} from './zh'
import {ja} from './ja'



export default defineConfig({
...common,
locales:{
root: { label: "简体中文", ...zh },
en: { label: "English", ...en }
en: { label: "English", ...en },
ja: { label: "日本語", ...ja },
}
})
14 changes: 14 additions & 0 deletions docs/.vitepress/config/ja.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import {defineConfig} from 'vitepress'

export const ja = defineConfig({

lang: "ja-JP",
description: "Minecraftのパーティクル生成用のライブラリ",
themeConfig: {
nav: [
{text: 'スタート', link: '/guide'},
{text: 'APIドキュメント', link: '/api/'},
{text: 'インスタンス', link: '/demo/'},
],
},
})
11 changes: 2 additions & 9 deletions docs/.vitepress/config/zh.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
import {defineConfig} from 'vitepress'

export const zh = defineConfig({

lang: "zh-Hans",
description: "一个用于Minecraft粒子计算和生成的库",

themeConfig: {
nav: [
{text: '快速开始', link: '/guide'},
{text: '快速开始', link: '/guide/'},
{text: 'API文档', link: '/api/'},
{text: '实例', link: '/demo/'},
],
// sidebar: {
// '/api/': {
// base: '/api/',
// items: [
// ]
// }
// }
},
})
8 changes: 8 additions & 0 deletions docs/api/mp_math/equation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ title: mbcp.mp_math.equation

- epsilon: 偏移量

返回:

- 偏导函数

引发:

- ValueError 无效变量类型



<details>
Expand Down
66 changes: 66 additions & 0 deletions docs/api/mp_math/line.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ def __init__(self, point: 'Point3', direction: 'Vector3'):

- epsilon: 误差

返回:

- 是否近似相等



<details>
Expand Down Expand Up @@ -71,6 +75,14 @@ def approx(self, other: 'Line3', epsilon: float=APPROX) -> bool:

- other: 另一条直线

返回:

- 夹角弧度

引发:

- TypeError 不支持的类型



<details>
Expand Down Expand Up @@ -100,6 +112,14 @@ def cal_angle(self, other: 'Line3') -> 'AnyAngle':

- other: 平行直线或点

返回:

- 距离

引发:

- TypeError 不支持的类型



<details>
Expand Down Expand Up @@ -142,6 +162,16 @@ def cal_distance(self, other: 'Line3 | Point3') -> float:

- other: 另一条直线

返回:

- 交点

引发:

- ValueError 直线平行

- ValueError 直线不共面



<details>
Expand Down Expand Up @@ -176,6 +206,10 @@ def cal_intersection(self, other: 'Line3') -> 'Point3':

- point: 指定点

返回:

- 垂线



<details>
Expand Down Expand Up @@ -203,6 +237,10 @@ def cal_perpendicular(self, point: 'Point3') -> 'Line3':

- t: 参数t

返回:

-



<details>
Expand Down Expand Up @@ -257,6 +295,10 @@ def get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc,

- epsilon: 误差

返回:

- 是否近似平行



<details>
Expand Down Expand Up @@ -285,6 +327,10 @@ def is_approx_parallel(self, other: 'Line3', epsilon: float=1e-06) -> bool:

- other: 另一条直线

返回:

- 是否平行



<details>
Expand Down Expand Up @@ -312,6 +358,10 @@ def is_parallel(self, other: 'Line3') -> bool:

- other: 另一条直线

返回:

- 是否共线



<details>
Expand Down Expand Up @@ -339,6 +389,10 @@ def is_collinear(self, other: 'Line3') -> bool:

- point: 点

返回:

- 是否在直线上



<details>
Expand Down Expand Up @@ -367,6 +421,10 @@ def is_point_on(self, point: 'Point3') -> bool:

- other: 另一条直线

返回:

- 是否共面



<details>
Expand Down Expand Up @@ -429,6 +487,10 @@ def simplify(self):

- p2: 点2

返回:

- 直线



<details>
Expand Down Expand Up @@ -459,6 +521,10 @@ def from_two_points(cls, p1: 'Point3', p2: 'Point3') -> 'Line3':

- other: 另一条直线

返回:

- 交点



<details>
Expand Down
60 changes: 60 additions & 0 deletions docs/api/mp_math/plane.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ def __init__(self, a: float, b: float, c: float, d: float):

- other:

返回:

- 是否近似相等



<details>
Expand Down Expand Up @@ -88,6 +92,14 @@ def approx(self, other: 'Plane3') -> bool:

- other: 另一个平面

返回:

- 夹角弧度

引发:

- TypeError 不支持的类型



<details>
Expand Down Expand Up @@ -122,6 +134,14 @@ def cal_angle(self, other: 'Line3 | Plane3') -> 'AnyAngle':

- other: 另一个平面或点

返回:

- 距离

引发:

- TypeError 不支持的类型



<details>
Expand Down Expand Up @@ -156,6 +176,10 @@ def cal_distance(self, other: 'Plane3 | Point3') -> float:

- other: 另一个平面

返回:

- 交线



<details>
Expand Down Expand Up @@ -200,6 +224,14 @@ def cal_intersection_line3(self, other: 'Plane3') -> 'Line3':

- other: 不与平面平行或在平面上的直线

返回:

- 交点

引发:

- ValueError 平面与直线平行或重合



<details>
Expand Down Expand Up @@ -233,6 +265,10 @@ def cal_intersection_point3(self, other: 'Line3') -> 'Point3':

- point: 指定点

返回:

- 平面



<details>
Expand Down Expand Up @@ -260,6 +296,10 @@ def cal_parallel_plane3(self, point: 'Point3') -> 'Plane3':

- other: 另一个平面

返回:

- 是否平行



<details>
Expand Down Expand Up @@ -317,6 +357,10 @@ def normal(self) -> 'Vector3':

- normal: 法向量

返回:

- 平面



<details>
Expand Down Expand Up @@ -353,6 +397,10 @@ def from_point_and_normal(cls, point: 'Point3', normal: 'Vector3') -> 'Plane3':

- p3: 点3

返回:

- 平面



<details>
Expand Down Expand Up @@ -389,6 +437,10 @@ def from_three_points(cls, p1: 'Point3', p2: 'Point3', p3: 'Point3') -> 'Plane3'

- l2: 直线2

返回:

- 平面



<details>
Expand Down Expand Up @@ -425,6 +477,10 @@ def from_two_lines(cls, l1: 'Line3', l2: 'Line3') -> 'Plane3':

- line: 面上直线,不包含点

返回:

- 平面



<details>
Expand Down Expand Up @@ -515,6 +571,10 @@ def __and__(self, other: 'Plane3') -> 'Line3 | None':

- other:

返回:

- 不平行平面的交线,平面平行返回None



<details>
Expand Down
4 changes: 4 additions & 0 deletions docs/api/mp_math/point.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ def __init__(self, x: float, y: float, z: float):

- epsilon:

返回:

- 是否近似相等



<details>
Expand Down
Loading

0 comments on commit 0d3511e

Please sign in to comment.