MiaoverseModule
Ploy3D / MiaoverseModule
Interface: MiaoverseModule
引擎模块。
Table of contents
Properties
- Matrix4x4
- Quaternion
- Vector3
- app
- assembly
- config
- context
- core
- ctf
- device
- env
- height
- importer
- internal
- kernel
- kernelCode
- pipelayer
- renderer
- resources
- scenes
- shaderlib
- startTS
- started
- width
- worker
Methods
Properties
Matrix4x4
• Matrix4x4: (values
: number
[]) => Matrix4x4
Type declaration
• new Matrix4x4(values
)
四阶矩阵类型。
Parameters
Name | Type |
---|---|
values | number [] |
Quaternion
• Quaternion: (values
: number
[]) => Quaternion
Type declaration
• new Quaternion(values
)
四元数类型。
Parameters
Name | Type |
---|---|
values | number [] |
Vector3
• Vector3: (values
: number
[]) => Vector3
Type declaration
• new Vector3(values
)
三维向量类型。
Parameters
Name | Type |
---|---|
values | number [] |
app
• app: Object
高级接口封装。
Type declaration
Name | Type |
---|---|
Shutdown | () => Promise <any > |
Startup | () => Promise <void > |
assembly
• assembly: IAssembly
渲染管线装配器。
config
• config: Config
引擎配置。
context
• context: Context
上下文接口。
core
• core: Object
核心子模块。
Type declaration
Name | Type |
---|---|
Shutdown | () => Promise <any > |
Startup | () => Promise <void > |
Status | (fps : number ) => any |
ctf
• ctf: number
压缩贴图支持:0-不支持,1-s3tc,2-astc,3-etc。
device
• device: Device
GPU模拟设备。
env
• env: SharedENV
共享数据环境。
height
• height: number
渲染目标高度。
importer
• importer: Importer
资源导入器。
internal
• internal: Internal
内核接口。
kernel
• kernel: Kernel
内核管理器。
kernelCode
• kernelCode: ArrayBuffer
内核代码。
pipelayer
• pipelayer: Pipelayer
着色管线装配器。
renderer
• renderer: Renderer
渲染器。
resources
• resources: Resources
资源管理器。
scenes
• scenes: Scenes
场景管理器。
shaderlib
• shaderlib: Object
着色器库子模块。
Type declaration
Name | Type | Description |
---|---|---|
postprocessBuiltin? | { bloom : string ; blur_ssao : string ; deferred : string ; draw_texture : string ; fxaa : string ; mipmap_depth : string ; properties : Record <string , [string , string , number []]> ; settings : any ; ssao : string ; tools : string ; vert : string } | 后期处理着色器常用工具代码。 |
postprocessBuiltin.bloom | string | - |
postprocessBuiltin.blur_ssao | string | - |
postprocessBuiltin.deferred | string | - |
postprocessBuiltin.draw_texture | string | - |
postprocessBuiltin.fxaa | string | - |
postprocessBuiltin.mipmap_depth | string | - |
postprocessBuiltin.properties | Record <string , [string , string , number []]> | - |
postprocessBuiltin.settings | any | - |
postprocessBuiltin.ssao | string | - |
postprocessBuiltin.tools | string | - |
postprocessBuiltin.vert | string | - |
shaderAssetLut | Record <string , ShaderAsset > | 着色器资源查找表(所有着色器,包括自定义的都需要注册到该查找表)。 |
shaderPartLut | any | 着色器片段查找表。 |
Assemble | (M : Shader_macro ) => { fscode : string [] ; vscode : string [] } | 着色器核心代码装配方法。 |
Shutdown | () => Promise <any > | 子模块关闭方法。 |
Startup | () => Promise <void > | 子模块启动方法。 |
startTS
• startTS: number
引擎启动时间戳。
started
• started: boolean
引擎已启动完成。
width
• width: number
渲染目标宽度。
worker
• worker: Miaoworker
线程子模块。
Methods
Fetch
▸ Fetch<T
>(input
, init
, type
): Promise
<T
>
网络请求方法。
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
input | RequestInfo | 请求路径。 |
init | RequestInit | 请求参数。 |
type | "formData" | "text" | "blob" | "json" | "arrayBuffer" | 请求数据类型。 |
Returns
Promise
<T
>
Prepare
▸ Prepare(promise
): void
引擎启动前执行预备任务。
Parameters
Name | Type |
---|---|
promise | Promise <any > |
Returns
void
Progress
▸ Progress(rate
, msg
, log?
): void
进度条设置,-1表示隐藏进度条。
Parameters
Name | Type |
---|---|
rate | number |
msg | string |
log? | boolean |
Returns
void
Request
▸ Request<T
>(method
, url
, type
, body
, content_type?
, onprogress?
): Promise
<T
>
网络请求方法。
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
method | "GET" | "POST" | 请求类型。 |
url | string | 请求路径。 |
type | "" | "text" | "arraybuffer" | "blob" | "document" | "json" | 请求数据类型。 |
body | Document | XMLHttpRequestBodyInit | 表单数据。 |
content_type? | string | 表单数据类型。 |
onprogress? | (rate : number ) => void | 进度接收回调。 |
Returns
Promise
<T
>
Shutdown
▸ Shutdown(): Promise
<any
>
引擎关闭方法。
Returns
Promise
<any
>
Startup
▸ Startup(progress
): Promise
<void
>
引擎启动方法。
Parameters
Name | Type |
---|---|
progress | (rate : number , msg : string ) => void |
Returns
Promise
<void
>
Track
▸ Track(msg
, ctrl?
): void
日志打印方法。
Parameters
Name | Type |
---|---|
msg | string |
ctrl? | number |
Returns
void