From b3224767cf4d2dd4d723c489d9802dd1306e63f7 Mon Sep 17 00:00:00 2001 From: AZhan Date: Mon, 5 Aug 2024 15:47:23 +0800 Subject: [PATCH] fix: check url (#2302) --- docs/zh/basics/overview.md | 8 ++--- docs/zh/core/canvas.md | 4 +-- docs/zh/core/engine.md | 6 ++-- .../particle/renderer-animation-module.md | 12 ++++---- .../particle/renderer-color-module.md | 6 ++-- .../particle/renderer-emission-module.md | 26 ++++++++-------- .../graphics/particle/renderer-main-module.md | 30 +++++++++---------- .../particle/renderer-rotation-module.md | 10 +++---- .../graphics/particle/renderer-size-module.md | 14 ++++----- .../particle/renderer-velocity-module.md | 10 +++---- docs/zh/graphics/particle/renderer.md | 20 ++++++------- .../shader/builtins/digitalHuman/eye.mdx | 2 +- docs/zh/physics/collider.md | 12 ++++---- docs/zh/physics/manager.md | 2 +- docs/zh/script/class.md | 2 +- 15 files changed, 82 insertions(+), 82 deletions(-) diff --git a/docs/zh/basics/overview.md b/docs/zh/basics/overview.md index 3cf992221..0225340a8 100644 --- a/docs/zh/basics/overview.md +++ b/docs/zh/basics/overview.md @@ -24,7 +24,7 @@ flowchart LR ## 运行时 -核心功能由 [Galacean Runtime](https://www.npmjs.com/package/@galacean/runtime) 提供,非核心和偏业务逻辑定制的高级功能由 [Galacean Toolkit](https://github.com/galacean/runtime-toolkit) 提供。你可以通过浏览器在线浏览引擎的各种[示例](/examples/latest/background)。 +核心功能由 [Galacean Runtime](https://www.npmjs.com/package/@galacean/engine) 提供,非核心和偏业务逻辑定制的高级功能由 [Galacean Toolkit](https://github.com/galacean/runtime-toolkit) 提供。你可以通过浏览器在线浏览引擎的各种[示例](/examples/latest/background)。 ### 核心包 @@ -35,7 +35,7 @@ flowchart LR | [@galacean/engine](https://www.npmjs.com/package/@galacean/engine) | 核心架构逻辑和核心功能 | [API](/apis/galacean) | | [@galacean/engine-physics-lite](https://www.npmjs.com/package/@galacean/engine-physics-lite) | 轻量级物理引擎 | [Doc](/docs/physics/overall) | | [@galacean/engine-physics-physx](https://www.npmjs.com/package/@galacean/engine-physics-physx) | 全功能物理引擎 | [Doc](/docs/physics/overall) | -| [@galacean/engine-shader-lab](https://www.npmjs.com/package/@galacean/engine-shader-lab) | Galacean Shader 编译器 | [Doc](/docs/graphics/shader/lab) | +| [@galacean/engine-shader-lab](https://www.npmjs.com/package/@galacean/engine-shader-lab) | Galacean Shader 编译器 | [Doc](/docs/graphics/shader/shaderLab/intro/) | | [@galacean/engine-xr](https://www.npmjs.com/package/@galacean/engine-xr) | XR 逻辑包 | [Doc](/docs/xr/overall) | | [@galacean/engine-xr-webxr](https://www.npmjs.com/package/@galacean/engine-xr-webxr) | WebXR 后端 | [Doc](/docs/xr/overall) | @@ -81,11 +81,11 @@ import { WebGLEngine, Camera } from "@galacean/engine"; Galacean Runtime 在支持 WebGL 的环境下运行,到目前为止,所有主流的移动端浏览器与桌面浏览器都支持这一标准。可以在 [CanIUse](https://caniuse.com/?search=webgl) 上检测运行环境的兼容性。 -此外,**Galacean Runtime** 还支持在[支付宝/淘宝小程序](/docs/assets/build)中运行,同时也有开发者在社区贡献了[微信小程序/游戏的适配方案](https://github.com/deepkolos/platformize)。对于一些需要额外考虑兼容性的功能模块,当前的适配方案如下: +此外,**Galacean Runtime** 还支持在[支付宝/淘宝小程序](/docs/miniProgram/miniProgame/)中运行,同时也有开发者在社区贡献了[微信小程序/游戏的适配方案](https://github.com/deepkolos/platformize)。对于一些需要额外考虑兼容性的功能模块,当前的适配方案如下: | 模块 | 兼容考虑 | 具体文档 | | :-- | :-- | :-- | -| [鼠标与触控](/docs/input) | [PointerEvent](https://caniuse.com/?search=PointerEvent) | 兼容请参照 [polyfill-pointer-event](https://github.com/galacean/polyfill-pointer-event) | +| [鼠标与触控](/docs/input/input/) | [PointerEvent](https://caniuse.com/?search=PointerEvent) | 兼容请参照 [polyfill-pointer-event](https://github.com/galacean/polyfill-pointer-event) | | [PhysX](/docs/physics/overall) | [WebAssembly](https://caniuse.com/?search=wasm) | 在不支持 WebAssembly 的情况下,会降级为 JS 版本,略低于 WebAssembly 版本的性能与表现 | ## 开源共建 diff --git a/docs/zh/core/canvas.md b/docs/zh/core/canvas.md index 70089a5bb..f56ae7249 100644 --- a/docs/zh/core/canvas.md +++ b/docs/zh/core/canvas.md @@ -5,7 +5,7 @@ group: 基础 label: Core --- -Galacean Engine 封装了不同平台的画布,如 [WebCanvas](/apis/rhi-webgl/WebCanvas)  支持用 [Engine](/apis/core/#Engine) 控制 [HTMLCanvasElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement) 或者 [OffscreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas) 。 +Galacean Engine 封装了不同平台的画布,如 [WebCanvas](/apis/rhi-webgl/#WebCanvas)  支持用 [Engine](/apis/core/#Engine) 控制 [HTMLCanvasElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement) 或者 [OffscreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas) 。 image.png @@ -33,7 +33,7 @@ console.log(engine.canvas); // => WebCanvas 实例 ### 基础适配 -画布尺寸一般通过**设备像素比**控制,以 [WebCanvas](/apis/rhi-webgl/WebCanvas) 为例: +画布尺寸一般通过**设备像素比**控制,以 [WebCanvas](/apis/rhi-webgl/#WebCanvas) 为例: ```mermaid flowchart TD diff --git a/docs/zh/core/engine.md b/docs/zh/core/engine.md index 372744202..88ed942c5 100644 --- a/docs/zh/core/engine.md +++ b/docs/zh/core/engine.md @@ -13,13 +13,13 @@ label: Core - [场景管理](/docs/core/scene) - [资源管理](/docs/assets/overall) - [物理系统](/docs/physics/overall) - - [交互系统](/docs/input) + - [交互系统](/docs/input/input/) - [XR 系统](/docs/xr/overall) - **执行环境的上下文管理**:控制 WebGL 等执行环境的上下文管理。 ## 初始化 -为了方便用户直接创建 web 端 engine,Galacean 提供了 [WebGLEngine](/apis/rhi-webgl/WebGLEngine) : +为了方便用户直接创建 web 端 engine,Galacean 提供了 [WebGLEngine](/apis/rhi-webgl/#WebGLEngine) : ```typescript const engine = await WebGLEngine.create({ canvas: "canvas" }); @@ -68,7 +68,7 @@ const engine = await WebGLEngine.create({ 类似的,可以用 `webGLMode` 控制 WebGL1/2,除 `webGLMode` 外的属性将透传给上下文,详情可参考 [getContext 参数释义](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext#parameters)。 -更多相关配置信息,可参考[物理系统](/docs/physics/overall)、[交互系统](/docs/input)、[XR 系统](/docs/xr/overall)。 +更多相关配置信息,可参考[物理系统](/docs/physics/overall)、[交互系统](/docs/input/input/)、[XR 系统](/docs/xr/overall)。 ## 属性 diff --git a/docs/zh/graphics/particle/renderer-animation-module.md b/docs/zh/graphics/particle/renderer-animation-module.md index 1ad88e17f..17bcbdb52 100644 --- a/docs/zh/graphics/particle/renderer-animation-module.md +++ b/docs/zh/graphics/particle/renderer-animation-module.md @@ -6,7 +6,7 @@ group: 粒子 label: Graphics/Particle --- -[`TextureSheetAnimationModule`](/apis/core/TextureSheetAnimationModule) 继承自 `ParticleGeneratorModule`,用于控制粒子系统的纹理表动画。 +[`TextureSheetAnimationModule`](/apis/core/#TextureSheetAnimationModule) 继承自 `ParticleGeneratorModule`,用于控制粒子系统的纹理表动画。 avatar @@ -14,8 +14,8 @@ label: Graphics/Particle | 属性 | 释义 | | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | -| [startFrame](/apis/core/TextureSheetAnimationModule#startFrame) | [ParticleCompositeCurve](/apis/core/ParticleCompositeCurve) 对象,表示纹理表的起始帧 | -| [frameOverTime](/apis/core/TextureSheetAnimationModule#frameOverTime) | [ParticleCompositeCurve](/apis/core/ParticleCompositeCurve) 对象,表示纹理表的帧随时间变化的曲线 | -| [type](/apis/core/TextureSheetAnimationModule#type) | `TextureSheetAnimationType` 枚举,表示纹理表动画的类型 | -| [cycleCount](/apis/core/TextureSheetAnimationModule#cycleCount) | `number` 类型,表示纹理表动画的周期计数 | -| [tiling](/apis/core/TextureSheetAnimationModule#tiling) | `Vector2` 对象,表示纹理表的平铺。可以通过 `get` 和 `set` 方法访问和修改 | +| [startFrame](/apis/core/#TextureSheetAnimationModule-startFrame) | [ParticleCompositeCurve](/apis/core/#ParticleCompositeCurve) 对象,表示纹理表的起始帧 | +| [frameOverTime](/apis/core/#TextureSheetAnimationModule-frameOverTime) | [ParticleCompositeCurve](/apis/core/#ParticleCompositeCurve) 对象,表示纹理表的帧随时间变化的曲线 | +| [type](/apis/core/#TextureSheetAnimationModule-type) | `TextureSheetAnimationType` 枚举,表示纹理表动画的类型 | +| [cycleCount](/apis/core/#TextureSheetAnimationModule-cycleCount) | `number` 类型,表示纹理表动画的周期计数 | +| [tiling](/apis/core/#TextureSheetAnimationModule-tiling) | `Vector2` 对象,表示纹理表的平铺。可以通过 `get` 和 `set` 方法访问和修改 | diff --git a/docs/zh/graphics/particle/renderer-color-module.md b/docs/zh/graphics/particle/renderer-color-module.md index 3c65dcbc7..0c7d93cb4 100644 --- a/docs/zh/graphics/particle/renderer-color-module.md +++ b/docs/zh/graphics/particle/renderer-color-module.md @@ -6,7 +6,7 @@ group: 粒子 label: Graphics/Particle --- -[`ColorOverLifetimeModule`](/apis/core/ColorOverLifetimeModule) 继承自 `ParticleGeneratorModule`,用于处理粒子系统的生命周期内的颜色变化。 +[`ColorOverLifetimeModule`](/apis/core/#ColorOverLifetimeModule) 继承自 `ParticleGeneratorModule`,用于处理粒子系统的生命周期内的颜色变化。 avatar @@ -14,10 +14,10 @@ label: Graphics/Particle | 属性 | 释义 | | ------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| [color](/apis/core/ColorOverLifetimeModule#color) | [ParticleCompositeGradient](/apis/core/ParticleCompositeGradient) 对象,表示粒子在其生命周期内的颜色渐变 | +| [color](/apis/core/#ColorOverLifetimeModule-color) | [ParticleCompositeGradient](/apis/core/#ParticleCompositeGradient) 对象,表示粒子在其生命周期内的颜色渐变 | ## 渐变编辑 -对于 [ParticleCompositeGradient](/apis/core/ParticleCompositeGradient) 对象,编辑器内置了渐变编辑器。渐变条上方代表颜色 key,下方代表 alpha 值 key。每个 key 在渐变条的位置代表其时间。双击现有 key 可以新建 key,长按 key 并向下拖动可以删除 key。 +对于 [ParticleCompositeGradient](/apis/core/#ParticleCompositeGradient) 对象,编辑器内置了渐变编辑器。渐变条上方代表颜色 key,下方代表 alpha 值 key。每个 key 在渐变条的位置代表其时间。双击现有 key 可以新建 key,长按 key 并向下拖动可以删除 key。 avatar avatar diff --git a/docs/zh/graphics/particle/renderer-emission-module.md b/docs/zh/graphics/particle/renderer-emission-module.md index 992fae0df..d8717ba3d 100644 --- a/docs/zh/graphics/particle/renderer-emission-module.md +++ b/docs/zh/graphics/particle/renderer-emission-module.md @@ -6,7 +6,7 @@ group: 粒子 label: Graphics/Particle --- -[EmissionModule](/apis/core/EmissionModule) 是 `ParticleGeneratorModule` 的发射模块。该模块用于处理粒子系统的发射行为,包括粒子发射速率、发射形状以及爆破(burst)行为等。 +[EmissionModule](/apis/core/#EmissionModule) 是 `ParticleGeneratorModule` 的发射模块。该模块用于处理粒子系统的发射行为,包括粒子发射速率、发射形状以及爆破(burst)行为等。 avatar @@ -14,18 +14,18 @@ label: Graphics/Particle | 属性 | 释义 | | -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| [rateOverTime](/apis/core/EmissionModule#rateOverTime) | 这是一个 [ParticleCompositeCurve](/apis/core/ParticleCompositeCurve) 对象,表示粒子的发射速率。默认值为 `10` | -| [rateOverDistance](/apis/core/EmissionModule#rateOverDistance) | 这是一个 [ParticleCompositeCurve](/apis/core/ParticleCompositeCurve) 对象,表示粒子的距离发射速率。默认值为 `0` | -| [shape](/apis/core/EmissionModule#shape) | 这是一个 `BaseShape` 对象,表示发射器的形状 | +| [rateOverTime](/apis/core/#EmissionModule-rateOverTime) | 这是一个 [ParticleCompositeCurve](/apis/core/#ParticleCompositeCurve) 对象,表示粒子的发射速率。默认值为 `10` | +| [rateOverDistance](/apis/core/#EmissionModule-rateOverDistance) | 这是一个 [ParticleCompositeCurve](/apis/core/#ParticleCompositeCurve) 对象,表示粒子的距离发射速率。默认值为 `0` | +| [shape](/apis/core/#EmissionModule-shape) | 这是一个 `BaseShape` 对象,表示发射器的形状 | ## 方法 | 方法 | 释义 | | --------------------------------------------------------------------------------- | ------------------------ | -| [addBurst(burst: Burst)](/apis/core/EmissionModule#addBurst) | 添加一个爆破行为 | -| [removeBurst(burst: Burst)](/apis/core/EmissionModule#removeBurst) | 移除一个爆破行为 | -| [removeBurstByIndex(index: number)](/apis/core/EmissionModule#removeBurstByIndex) | 通过索引移除一个爆破行为 | -| [clearBurst()](/apis/core/EmissionModule#clearBurst) | 清除所有的爆破行为 | +| [addBurst(burst: Burst)](/apis/core/#EmissionModule-addBurst) | 添加一个爆破行为 | +| [removeBurst(burst: Burst)](/apis/core/#EmissionModule-removeBurst) | 移除一个爆破行为 | +| [removeBurstByIndex(index: number)](/apis/core/#EmissionModule-removeBurstByIndex) | 通过索引移除一个爆破行为 | +| [clearBurst()](/apis/core/#EmissionModule-clearBurst) | 清除所有的爆破行为 | ## 形状 @@ -33,8 +33,8 @@ label: Graphics/Particle | 发射器形状类型 | 释义 | | ------------------------------------------------------------ | ------------------------------------ | -| [BoxShape](/apis/core/EmissionModule#BoxShape) | `BaseShape` 对象,发射器形状为立方体 | -| [CircleShape](/apis/core/EmissionModule#CircleShape) | `BaseShape` 对象,发射器形状为圆圈 | -| [ConeShape](/apis/core/EmissionModule#ConeShape) | `BaseShape` 对象,发射器形状为类圆锥 | -| [HemisphereShape](/apis/core/EmissionModule#HemisphereShape) | `BaseShape` 对象,发射器形状为半球 | -| [SphereShape](/apis/core/EmissionModule#SphereShape) | `BaseShape` 对象,发射器形状为球体 | +| [BoxShape](/apis/core/#EmissionModule-BoxShape) | `BaseShape` 对象,发射器形状为立方体 | +| [CircleShape](/apis/core/#EmissionModule-CircleShape) | `BaseShape` 对象,发射器形状为圆圈 | +| [ConeShape](/apis/core/#EmissionModule-ConeShape) | `BaseShape` 对象,发射器形状为类圆锥 | +| [HemisphereShape](/apis/core/#EmissionModule-HemisphereShape) | `BaseShape` 对象,发射器形状为半球 | +| [SphereShape](/apis/core/#EmissionModule-SphereShape) | `BaseShape` 对象,发射器形状为球体 | diff --git a/docs/zh/graphics/particle/renderer-main-module.md b/docs/zh/graphics/particle/renderer-main-module.md index eee4eea27..7a5053a6a 100644 --- a/docs/zh/graphics/particle/renderer-main-module.md +++ b/docs/zh/graphics/particle/renderer-main-module.md @@ -6,7 +6,7 @@ group: 粒子 label: Graphics/Particle --- -[MainModule](/apis/core/MainModule) 是 `ParticleGeneratorModule` 的主模块,包含了最基本的粒子生成参数。这些属性大多用于控制新创建的粒子的初始状态。 +[MainModule](/apis/core/#MainModule) 是 `ParticleGeneratorModule` 的主模块,包含了最基本的粒子生成参数。这些属性大多用于控制新创建的粒子的初始状态。 avatar @@ -16,29 +16,29 @@ label: Graphics/Particle 你可以在提供的示例中逐个调试各项属性,帮助你更好地理解和掌控粒子住模块,从而实现各种复杂和精美的视觉效果。 -持续时间 [duration](/apis/core/MainModule#duration) 决定了粒子生成器运行多长时间,单位为秒。更长的持续时间意味着粒子系统会生成更多的粒子,创造出持续的效果。 +持续时间 [duration](/apis/core/#MainModule-duration) 决定了粒子生成器运行多长时间,单位为秒。更长的持续时间意味着粒子系统会生成更多的粒子,创造出持续的效果。 -是否循环 [isLoop](/apis/core/MainModule#isLoop) 如果设置为 true,粒子生成器会在持续时间结束后自动重新开始,从而形成一个连续的效果,比如烟雾或流水。 +是否循环 [isLoop](/apis/core/#MainModule-isLoop) 如果设置为 true,粒子生成器会在持续时间结束后自动重新开始,从而形成一个连续的效果,比如烟雾或流水。 -开始延迟时间 [startDelay](/apis/core/MainModule#startDelay) 决定了粒子生成器在启动后延迟一定时间才开始发射,这对于实现如烟花等需要时间差的效果非常有用。 +开始延迟时间 [startDelay](/apis/core/#MainModule-startDelay) 决定了粒子生成器在启动后延迟一定时间才开始发射,这对于实现如烟花等需要时间差的效果非常有用。 -初始生命周期 [startLifetime](/apis/core/MainModule#startLifetime) 决定了每个粒子在消失前能存活多久。更长的生命周期意味着粒子会在屏幕上停留更长时间。 +初始生命周期 [startLifetime](/apis/core/#MainModule-startLifetime) 决定了每个粒子在消失前能存活多久。更长的生命周期意味着粒子会在屏幕上停留更长时间。 -首次生成粒子时的初始速度 [startSpeed](/apis/core/MainModule#startSpeed) 决定了粒子发射时的速度,较高的初始速度会使粒子迅速扩散,如爆炸效果;较低的速度则会使粒子缓慢飘动,如烟雾效果。 +首次生成粒子时的初始速度 [startSpeed](/apis/core/#MainModule-startSpeed) 决定了粒子发射时的速度,较高的初始速度会使粒子迅速扩散,如爆炸效果;较低的速度则会使粒子缓慢飘动,如烟雾效果。 -是否以每个轴的粒子大小分别指定 [startSize3D](/apis/core/MainModule#startSize3D) 允许为粒子的 x、y、z 轴设置不同的大小,以实现各向异性的粒子效果,比如长条形火焰。粒子生成器首次生成粒子时的初始大小 [startSize](/apis/core/MainModule#startSize) 控制每个粒子的大小,较大的初始大小适合模拟大块的烟云或火焰,较小的则适合细腻的尘土或水花。针对具体轴的初始大小,粒子生成器首次生成粒子时沿 x 轴的初始大小 [startSizeX](/apis/core/MainModule#startSizeX) 、沿 y 轴的初始大小 [startSizeY](/apis/core/MainModule#startSizeY) 和沿 z 轴的初始大小 [startSizeZ](/apis/core/MainModule#startSizeZ) 分别控制粒子在 x、y、z 轴上的大小,使粒子形状更加多样化和细腻。 +是否以每个轴的粒子大小分别指定 [startSize3D](/apis/core/#MainModule-startSize3D) 允许为粒子的 x、y、z 轴设置不同的大小,以实现各向异性的粒子效果,比如长条形火焰。粒子生成器首次生成粒子时的初始大小 [startSize](/apis/core/#MainModule-startSize) 控制每个粒子的大小,较大的初始大小适合模拟大块的烟云或火焰,较小的则适合细腻的尘土或水花。针对具体轴的初始大小,粒子生成器首次生成粒子时沿 x 轴的初始大小 [startSizeX](/apis/core/#MainModule-startSizeX) 、沿 y 轴的初始大小 [startSizeY](/apis/core/#MainModule-startSizeY) 和沿 z 轴的初始大小 [startSizeZ](/apis/core/#MainModule-startSizeZ) 分别控制粒子在 x、y、z 轴上的大小,使粒子形状更加多样化和细腻。 -是否启用 3D 粒子旋转 [startRotation3D](/apis/core/MainModule#startRotation3D) 允许粒子在 3D 空间中旋转,增加粒子的立体感和复杂性,如在三维空间内☑️下坠的树叶。粒子生成器首次生成粒子时的初始旋转 (startRotation) 设置粒子发射时的旋转角度,适用于需要粒子朝特定方向运动的效果,如方向性的火焰。而粒子发射时沿 x 轴的初始旋转 [startRotationX](/apis/core/MainModule#startRotationX)、沿 y 轴的初始旋转 [startRotationY](/apis/core/MainModule#startRotationY) 和沿 z 轴的初始旋转 [startRotationZ](/apis/core/MainModule#startRotationZ) 分别控制粒子在 x、y、z 轴上的旋转,增加粒子运动的自由度。翻转旋转 [flipRotation](/apis/core/MainModule#flipRotation) 范围在 0 到 1 之间,使部分粒子以相反方向旋转,增加粒子系统的随机性和自然感,适用于模拟复杂的运动轨迹。 +是否启用 3D 粒子旋转 [startRotation3D](/apis/core/#MainModule-startRotation3D) 允许粒子在 3D 空间中旋转,增加粒子的立体感和复杂性,如在三维空间内☑️下坠的树叶。粒子生成器首次生成粒子时的初始旋转 (startRotation) 设置粒子发射时的旋转角度,适用于需要粒子朝特定方向运动的效果,如方向性的火焰。而粒子发射时沿 x 轴的初始旋转 [startRotationX](/apis/core/#MainModule-startRotationX)、沿 y 轴的初始旋转 [startRotationY](/apis/core/#MainModule-startRotationY) 和沿 z 轴的初始旋转 [startRotationZ](/apis/core/#MainModule-startRotationZ) 分别控制粒子在 x、y、z 轴上的旋转,增加粒子运动的自由度。翻转旋转 [flipRotation](/apis/core/#MainModule-flipRotation) 范围在 0 到 1 之间,使部分粒子以相反方向旋转,增加粒子系统的随机性和自然感,适用于模拟复杂的运动轨迹。 -初始颜色 [startColor](/apis/core/MainModule#startColor) 决定了粒子的颜色,可用于模拟不同材质的效果,如火焰的红橙色或烟雾的灰白色。 +初始颜色 [startColor](/apis/core/#MainModule-startColor) 决定了粒子的颜色,可用于模拟不同材质的效果,如火焰的红橙色或烟雾的灰白色。 -重力修正 [gravityModifier](/apis/core/MainModule#gravityModifier) 调整粒子受重力影响的程度,使粒子看起来更真实,如下降的雨滴或上升的烟雾。 +重力修正 [gravityModifier](/apis/core/#MainModule-gravityModifier) 调整粒子受重力影响的程度,使粒子看起来更真实,如下降的雨滴或上升的烟雾。 -选择模拟粒子的空间 [simulationSpace](/apis/core/MainModule#simulationSpace) 决定了粒子是相对于世界还是相对于生成器自身运动。世界空间适合固定位置的效果,如烟雾;本地空间适合随对象移动的效果,如火焰尾迹。 +选择模拟粒子的空间 [simulationSpace](/apis/core/#MainModule-simulationSpace) 决定了粒子是相对于世界还是相对于生成器自身运动。世界空间适合固定位置的效果,如烟雾;本地空间适合随对象移动的效果,如火焰尾迹。 -模拟速度 [simulationSpeed](/apis/core/MainModule#simulationSpeed) 可整体加快或减慢粒子的运动速度,适用于时间慢动作或加速效果。 +模拟速度 [simulationSpeed](/apis/core/#MainModule-simulationSpeed) 可整体加快或减慢粒子的运动速度,适用于时间慢动作或加速效果。 -缩放模式 [scalingMode](/apis/core/MainModule#scalingMode) 决定了粒子生成器在发射粒子时,如何处理位置、旋转和缩放等变换操作。使用 scalingMode 能确保粒子生成器和粒子之间的变换关系符合预期。scalingMode 有以下几种模式: +缩放模式 [scalingMode](/apis/core/#MainModule-scalingMode) 决定了粒子生成器在发射粒子时,如何处理位置、旋转和缩放等变换操作。使用 scalingMode 能确保粒子生成器和粒子之间的变换关系符合预期。scalingMode 有以下几种模式: - Local:粒子会继承粒子生成器的局部变换,即粒子的变换是在生成器的本地坐标系中进行的。 @@ -46,6 +46,6 @@ label: Graphics/Particle - Hierarchy:粒子会继承整个变换层级中的变换,即粒子会考虑到生成器的父级及更上级的变换。 -如果设置为 true,粒子生成器将在启动时自动开始播放 [playOnEnabled](/apis/core/MainModule#playOnEnabled) 。开启这个选项会确保粒子系统一启动就开始发射粒子,适用于需要立即显示效果的场景。 +如果设置为 true,粒子生成器将在启动时自动开始播放 [playOnEnabled](/apis/core/#MainModule-playOnEnabled) 。开启这个选项会确保粒子系统一启动就开始发射粒子,适用于需要立即显示效果的场景。 -最大粒子数 [maxParticles](/apis/core/MainModule#maxParticles) 限制了粒子系统的最大粒子数,以防止性能问题。较大的值适用于需要大量粒子的效果,如浓烟。 +最大粒子数 [maxParticles](/apis/core/#MainModule-maxParticles) 限制了粒子系统的最大粒子数,以防止性能问题。较大的值适用于需要大量粒子的效果,如浓烟。 diff --git a/docs/zh/graphics/particle/renderer-rotation-module.md b/docs/zh/graphics/particle/renderer-rotation-module.md index b35bddecb..2721b936b 100644 --- a/docs/zh/graphics/particle/renderer-rotation-module.md +++ b/docs/zh/graphics/particle/renderer-rotation-module.md @@ -6,7 +6,7 @@ group: 粒子 label: Graphics/Particle --- -[`RotationOverLifetimeModule`](/apis/core/RotationOverLifetimeModule) 继承自 `ParticleGeneratorModule`,用于控制粒子系统的生命周期内的旋转变化。 +[`RotationOverLifetimeModule`](/apis/core/#RotationOverLifetimeModule) 继承自 `ParticleGeneratorModule`,用于控制粒子系统的生命周期内的旋转变化。 avatar @@ -14,7 +14,7 @@ label: Graphics/Particle | 属性 | 释义 | | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------- | -| [separateAxes](/apis/core/RotationOverLifetimeModule#separateAxes) | `boolean` 类型,表示是否在每个轴上分别进行旋转。如果禁用,将只使用 z 轴 | -| [rotationX](/apis/core/RotationOverLifetimeModule#rotationX) | [ParticleCompositeCurve](/apis/core/ParticleCompositeCurve) 对象,表示粒子在其生命周期内的 x 轴旋转 | -| [rotationY](/apis/core/RotationOverLifetimeModule#rotationY) | [ParticleCompositeCurve](/apis/core/ParticleCompositeCurve) 对象,表示粒子在其生命周期内的 y 轴旋转 | -| [rotationZ](/apis/core/RotationOverLifetimeModule#rotationZ) | [ParticleCompositeCurve](/apis/core/ParticleCompositeCurve) 对象,表示粒子在其生命周期内的 z 轴旋转 | +| [separateAxes](/apis/core/#RotationOverLifetimeModule-separateAxes) | `boolean` 类型,表示是否在每个轴上分别进行旋转。如果禁用,将只使用 z 轴 | +| [rotationX](/apis/core/#RotationOverLifetimeModule-rotationX) | [ParticleCompositeCurve](/apis/core/#ParticleCompositeCurve) 对象,表示粒子在其生命周期内的 x 轴旋转 | +| [rotationY](/apis/core/#RotationOverLifetimeModule-rotationY) | [ParticleCompositeCurve](/apis/core/#ParticleCompositeCurve) 对象,表示粒子在其生命周期内的 y 轴旋转 | +| [rotationZ](/apis/core/#RotationOverLifetimeModule-rotationZ) | [ParticleCompositeCurve](/apis/core/#ParticleCompositeCurve) 对象,表示粒子在其生命周期内的 z 轴旋转 | diff --git a/docs/zh/graphics/particle/renderer-size-module.md b/docs/zh/graphics/particle/renderer-size-module.md index 87487a7d1..586f55a87 100644 --- a/docs/zh/graphics/particle/renderer-size-module.md +++ b/docs/zh/graphics/particle/renderer-size-module.md @@ -6,7 +6,7 @@ group: 粒子 label: Graphics/Particle --- -[`SizeOverLifetimeModule`](/apis/core/SizeOverLifetimeModule) 是 `ParticleGeneratorModule` 的子类,用于处理粒子系统的生命周期内的大小变化。 +[`SizeOverLifetimeModule`](/apis/core/#SizeOverLifetimeModule) 是 `ParticleGeneratorModule` 的子类,用于处理粒子系统的生命周期内的大小变化。 avatar @@ -14,15 +14,15 @@ label: Graphics/Particle | 属性 | 释义 | | -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| [separateAxes](/apis/core/SizeOverLifetimeModule#separateAxes) | 布尔值,指定每个轴的大小是否独立变化 | -| [sizeX](/apis/core/SizeOverLifetimeModule#sizeX) | [ParticleCompositeCurve](/apis/core/ParticleCompositeCurve) 对象,表示 x 轴方向上粒子的大小变化曲线 | -| [sizeY](/apis/core/SizeOverLifetimeModule#sizeY) | [ParticleCompositeCurve](/apis/core/ParticleCompositeCurve) 对象,表示 y 轴方向上粒子的大小变化曲线 | -| [sizeZ](/apis/core/SizeOverLifetimeModule#sizeZ) | [ParticleCompositeCurve](/apis/core/ParticleCompositeCurve) 对象,表示 z 轴方向上粒子的大小变化曲线 | -| [size](/apis/core/SizeOverLifetimeModule#size) | [ParticleCompositeCurve](/apis/core/ParticleCompositeCurve) 对象,获取或设置粒子的大小变化曲线 | +| [separateAxes](/apis/core/#SizeOverLifetimeModule-separateAxes) | 布尔值,指定每个轴的大小是否独立变化 | +| [sizeX](/apis/core/#SizeOverLifetimeModule-sizeX) | [ParticleCompositeCurve](/apis/core/#ParticleCompositeCurve) 对象,表示 x 轴方向上粒子的大小变化曲线 | +| [sizeY](/apis/core/#SizeOverLifetimeModule-sizeY) | [ParticleCompositeCurve](/apis/core/#ParticleCompositeCurve) 对象,表示 y 轴方向上粒子的大小变化曲线 | +| [sizeZ](/apis/core/#SizeOverLifetimeModule-sizeZ) | [ParticleCompositeCurve](/apis/core/#ParticleCompositeCurve) 对象,表示 z 轴方向上粒子的大小变化曲线 | +| [size](/apis/core/#SizeOverLifetimeModule-size) | [ParticleCompositeCurve](/apis/core/#ParticleCompositeCurve) 对象,获取或设置粒子的大小变化曲线 | ## 折线编辑 -针对[ ParticleCompositeCurve](/apis/core/ParticleCompositeCurve) 对象,在编辑器内置了折线编辑器,可视化调整曲线。 +针对[ ParticleCompositeCurve](/apis/core/#ParticleCompositeCurve) 对象,在编辑器内置了折线编辑器,可视化调整曲线。 avatar diff --git a/docs/zh/graphics/particle/renderer-velocity-module.md b/docs/zh/graphics/particle/renderer-velocity-module.md index 32bfb5bab..6ce5f6dce 100644 --- a/docs/zh/graphics/particle/renderer-velocity-module.md +++ b/docs/zh/graphics/particle/renderer-velocity-module.md @@ -8,7 +8,7 @@ label: Graphics/Particle ### 生命周期速度模块 -[`VelocityOverLifetimeModule`](/apis/core/VelocityOverLifetimeModule) 继承自 `ParticleGeneratorModule`,用于控制粒子系统的生命周期内的速度变化。 +[`VelocityOverLifetimeModule`](/apis/core/#VelocityOverLifetimeModule) 继承自 `ParticleGeneratorModule`,用于控制粒子系统的生命周期内的速度变化。 avatar @@ -16,7 +16,7 @@ label: Graphics/Particle | 属性 | 释义 | | ------------------------------------------------------------ | --------------------------------------------------------------------------------------------------- | -| [space](/apis/core/VelocityOverLifetimeModule#velocityZ) | 选择速度变化的空间,可以是世界空间或本地空间 | -| [velocityX](/apis/core/VelocityOverLifetimeModule#velocityX) | [ParticleCompositeCurve](/apis/core/ParticleCompositeCurve) 对象,表示粒子在其生命周期内的 x 轴旋转 | -| [velocityY](/apis/core/VelocityOverLifetimeModule#velocityY) | [ParticleCompositeCurve](/apis/core/ParticleCompositeCurve) 对象,表示粒子在其生命周期内的 y 轴旋转 | -| [velocityZ](/apis/core/VelocityOverLifetimeModule#velocityZ) | [ParticleCompositeCurve](/apis/core/ParticleCompositeCurve) 对象,表示粒子在其生命周期内的 z 轴旋转 | +| [space](/apis/core/#VelocityOverLifetimeModule-velocityZ) | 选择速度变化的空间,可以是世界空间或本地空间 | +| [velocityX](/apis/core/#VelocityOverLifetimeModule-velocityX) | [ParticleCompositeCurve](/apis/core/#ParticleCompositeCurve) 对象,表示粒子在其生命周期内的 x 轴旋转 | +| [velocityY](/apis/core/#VelocityOverLifetimeModule-velocityY) | [ParticleCompositeCurve](/apis/core/#ParticleCompositeCurve) 对象,表示粒子在其生命周期内的 y 轴旋转 | +| [velocityZ](/apis/core/#VelocityOverLifetimeModule-velocityZ) | [ParticleCompositeCurve](/apis/core/#ParticleCompositeCurve) 对象,表示粒子在其生命周期内的 z 轴旋转 | diff --git a/docs/zh/graphics/particle/renderer.md b/docs/zh/graphics/particle/renderer.md index 910e8dc24..7b97bcc90 100644 --- a/docs/zh/graphics/particle/renderer.md +++ b/docs/zh/graphics/particle/renderer.md @@ -6,7 +6,7 @@ group: 粒子 label: Graphics/Particle --- -Galacean Engine 的粒子(粒子渲染器) [ParticleRenderer](/apis/core/ParticleRenderer) 是常用的渲染组件,具备丰富的属性,通过调节各个属性值达到绚丽多彩的粒子效果。 +Galacean Engine 的粒子(粒子渲染器) [ParticleRenderer](/apis/core/#ParticleRenderer) 是常用的渲染组件,具备丰富的属性,通过调节各个属性值达到绚丽多彩的粒子效果。 ![avatar](https://mdn.alipayobjects.com/huamei_qbugvr/afts/img/A*oPEmTqfD_asAAAAAAAAAAAAADtKFAQ/original) @@ -31,7 +31,7 @@ let particleRenderer = particleEntity.addComponent(ParticleRenderer); ## 渲染材质 -[ParticleMaterial](/apis/core/ParticleMaterial) 是粒子的默认材质。 +[ParticleMaterial](/apis/core/#ParticleMaterial) 是粒子的默认材质。 编辑器中通过 添加材质 - 选择粒子材质 创建。编辑完成后回到粒子观察器面板中选择该材质进行使用。 @@ -47,8 +47,8 @@ particleRenderer.setMaterial(material); | 属性 | 释义 | | ---------------------------------------------------- | -------- | -| [baseColor](/apis/core/ParticleMaterial#baseColor) | 基础颜色 | -| [baseTexture](/apis/core/ParticleMaterial#baseColor) | 基础纹理 | +| [baseColor](/apis/core/#ParticleMaterial-baseColor) | 基础颜色 | +| [baseTexture](/apis/core/#ParticleMaterial-baseColor) | 基础纹理 | ## 播放控制 @@ -79,7 +79,7 @@ particleRenderer.generator.main.simulationSpeed = 2; ## 粒子生成器 -`ParticleRenderer` 的 [generator](/apis/core/ParticleGenerator) 属性主要负责粒子的生成和播放功能,生成粒子相关的功能由多个模块组成,分别是主模块、发射器模块、生命周期尺寸模块、生命周期颜色模块、生命周期速度模块、生命周期旋转模块、纹理表格动画模块。在编辑器粒子观察器面板可以直观看到各个模块及分选项。 +`ParticleRenderer` 的 [generator](/apis/core/#ParticleGenerator) 属性主要负责粒子的生成和播放功能,生成粒子相关的功能由多个模块组成,分别是主模块、发射器模块、生命周期尺寸模块、生命周期颜色模块、生命周期速度模块、生命周期旋转模块、纹理表格动画模块。在编辑器粒子观察器面板可以直观看到各个模块及分选项。 ## 其他参数 @@ -87,8 +87,8 @@ particleRenderer.generator.main.simulationSpeed = 2; | 属性 | 释义 | | --- | --- | -| [velocityScale](/apis/core/ParticleRenderer#velocityScale) | 指定粒子根据其速度伸展的程度 | -| [lengthScale](/apis/core/ParticleRenderer#lengthScale) | 定义粒子在其运动方向上伸展的程度,定义为粒子的长度与其宽度的比例 | -| [pivot](/apis/core/ParticleRenderer#pivot) | 粒子的枢轴 | -| [renderMode](/apis/core/ParticleRenderer#renderMode) | 粒子的渲染模式 | -| [mesh](/apis/core/ParticleRenderer#mesh) | 粒子的网格,当 `renderMode` 为 `Mesh` 时有效 | +| [velocityScale](/apis/core/#ParticleRenderer-velocityScale) | 指定粒子根据其速度伸展的程度 | +| [lengthScale](/apis/core/#ParticleRenderer-lengthScale) | 定义粒子在其运动方向上伸展的程度,定义为粒子的长度与其宽度的比例 | +| [pivot](/apis/core/#ParticleRenderer-pivot) | 粒子的枢轴 | +| [renderMode](/apis/core/#ParticleRenderer-renderMode) | 粒子的渲染模式 | +| [mesh](/apis/core/#ParticleRenderer-mesh) | 粒子的网格,当 `renderMode` 为 `Mesh` 时有效 | diff --git a/docs/zh/graphics/shader/builtins/digitalHuman/eye.mdx b/docs/zh/graphics/shader/builtins/digitalHuman/eye.mdx index 3f149fadf..57077cced 100644 --- a/docs/zh/graphics/shader/builtins/digitalHuman/eye.mdx +++ b/docs/zh/graphics/shader/builtins/digitalHuman/eye.mdx @@ -7,7 +7,7 @@ title: 眼睛 -该着色器与模型 uv 强关联,如果需要从头开始构建眼睛,不建议使用此着色器,对于无着色器代码开发经验的人,建议使用官方示例中的眼球几何模型,只需替换必要的纹理满足你的需求,如需创建自己的eye shader变体,请参阅 [shader lab 开发教程](/docs/graphics-shader-lab)文档。 +该着色器与模型 uv 强关联,如果需要从头开始构建眼睛,不建议使用此着色器,对于无着色器代码开发经验的人,建议使用官方示例中的眼球几何模型,只需替换必要的纹理满足你的需求,如需创建自己的eye shader变体,请参阅 [shader lab 开发教程](/docs/graphics/shader/shaderLab/intro/)文档。 ## 导入眼睛示例 diff --git a/docs/zh/physics/collider.md b/docs/zh/physics/collider.md index ca9e998fd..2c366eb3b 100644 --- a/docs/zh/physics/collider.md +++ b/docs/zh/physics/collider.md @@ -93,9 +93,9 @@ label: Physics 对于触发器模式,首先需要给场景中的 `Entity` 添加 `Collider`;该当这些组件相互接触时,会自动触发脚本组件当中的三个函数: -1. [onTriggerEnter](/docs/script#$1-ontriggerenter):相互接触时调用 -2. [onTriggerStay](/docs/script#$1-ontriggerstay):接触过程中*循环*调用 -3. [onTriggerExit](/docs/script#$1-ontriggerexit):接触结束时调用 +1. [onTriggerEnter](/docs/script/class/#ontriggerenter):相互接触时调用 +2. [onTriggerStay](/docs/script/class/#ontriggerstay):接触过程中*循环*调用 +3. [onTriggerExit](/docs/script/class/#ontriggerexit):接触结束时调用 可以通过 `ColliderShape` 上的 `isTrigger` 开启触发器模式,但需要特别强调的是,**两个 StaticCollider 之间不会调用触发器事件**,除非其中一个是 `DynamicCollider`。 @@ -104,8 +104,8 @@ label: Physics ### 碰撞器脚本函数 对于碰撞器模式,`DynamicCollider` 相互作用时会触发三个碰撞相关的脚本函数: -1. [onCollisionEnter](/docs/script#$1-oncollisionenter):碰撞触发时调用 -2. [onCollisionStay](/docs/script#$1-oncollisionstay):碰撞过程中*循环*调用 -3. [onCollisionExit](/docs/script#$1-oncollisionexit):碰撞结束时调用 +1. [onCollisionEnter](/docs/script/class/#oncollisionenter):碰撞触发时调用 +2. [onCollisionStay](/docs/script/class/#oncollisionstay):碰撞过程中*循环*调用 +3. [onCollisionExit](/docs/script/class/#oncollisionexit):碰撞结束时调用 diff --git a/docs/zh/physics/manager.md b/docs/zh/physics/manager.md index aed57175d..4d1a02b65 100644 --- a/docs/zh/physics/manager.md +++ b/docs/zh/physics/manager.md @@ -82,4 +82,4 @@ document.getElementById('canvas').addEventListener('click', (e) => { 需要特别指出,如果想要对 Entity 启用射线投射,该 Entity 就必须拥有 **Collider** ,否则无法触发。若射线命中的Collider的Shape距离相同,则返回先被添加的Shape(举个例子:有两个Collider相同的Entity完全重合,则会返回先添加Collider,更准确的说是先添加Shape的Entity)。 -同时,在 Galacean 当中,还提供了 InputManager,该管理器将输入源做了封装,提供了更加易用的逻辑,使用方式可以[参考](/docs/input) . +同时,在 Galacean 当中,还提供了 InputManager,该管理器将输入源做了封装,提供了更加易用的逻辑,使用方式可以[参考](/docs/input/input/) . diff --git a/docs/zh/script/class.md b/docs/zh/script/class.md index dabaa334c..5983ad679 100644 --- a/docs/zh/script/class.md +++ b/docs/zh/script/class.md @@ -144,7 +144,7 @@ onLateUpdate(deltaTime: number) { ### onPointerXXX -输入系统接口详见[输入交互](/docs/input)。 +输入系统接口详见[输入交互](/docs/input/input/)。 ## 实体操作