diff --git a/404.html b/404.html
index 8b89d15..3bdbb86 100644
--- a/404.html
+++ b/404.html
@@ -12,7 +12,7 @@
Skip to content 404
PAGE NOT FOUND
But if you don't change your direction, and if you keep looking, you may end up where you are heading.
-
diff --git a/assets/dist_classes_Animation.md.953b3766.js b/assets/dist_classes_Animation.md.b963ae1b.js
similarity index 93%
rename from assets/dist_classes_Animation.md.953b3766.js
rename to assets/dist_classes_Animation.md.b963ae1b.js
index a64ae90..9954025 100644
--- a/assets/dist_classes_Animation.md.953b3766.js
+++ b/assets/dist_classes_Animation.md.b963ae1b.js
@@ -1,3 +1,3 @@
import{_ as e,c as t,o as a,N as o}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Animation","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Animation.md"}'),n={name:"dist/classes/Animation.md"},r=o(`Class: Animation 动画组件 插值,可插值属性才能进行插值[todo]
Hierarchy Table of contents Constructors Properties Accessors Methods Constructors constructor • new Animation ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties animation • animation : string
= 'default'
Defined in src/core/component/Animation.ts:107
animations • animations : Record
<string
, Timeline
<{}>[]> = {}
动画配置
Defined in src/core/component/Animation.ts:46
emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
loop • loop : number
= 0
循环次数,0:不循环,-1:一直循环
Defined in src/core/component/Animation.ts:112
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
paused • paused : boolean
= true
指示是否被暂停
Defined in src/core/component/Animation.ts:125
playCount • playCount : number
= 0
已经播放次数
Defined in src/core/component/Animation.ts:116
speed • speed : number
= 1
播放速度100%
Defined in src/core/component/Animation.ts:120
time • time : number
= 0
当前时间线
Defined in src/core/component/Animation.ts:32
timeMax • timeMax : number
= 0
动画总长
Defined in src/core/component/Animation.ts:24
timeline • timeline : EventEmitter
<string
| symbol
, any
>
用于记录回调的时间线,在target时间线后执行
Defined in src/core/component/Animation.ts:19
total • total : number
= 0
最大帧数
Defined in src/core/component/Animation.ts:28
Event ▪ Static
Event : Object
Type declaration Name Type Description ENDED
"ended"
动画播放完成
Defined in src/core/component/Animation.ts:10
Accessors targets • get
targets (): Timeline
<{}>[]
时间线 每一个对象一个时间线 还有一个总时间线,可以用于记录一些信息
Returns Timeline
<{}>[]
Defined in src/core/component/Animation.ts:39
Methods addFrameAction ▸ addFrameAction (time
, callback
, target
): void
添加事件
Parameters Name Type time
number
callback
() => void
target
any
Returns void
Defined in src/core/component/Animation.ts:198
addTimeline ▸ addTimeline (timeline
): void
添加一个熟悉变更时间线
Parameters Name Type timeline
Timeline
<{}>
Returns void
Defined in src/core/component/Animation.ts:84
destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
next ▸ next (): void
播放下一帧
Returns void
Defined in src/core/component/Animation.ts:53
nextAction ▸ Protected
nextAction (val
): void
当有新的属性需要更新时调用
Parameters Returns void
Defined in src/core/component/Animation.ts:73
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
play ▸ play (): void
播放
Returns void
Defined in src/core/component/Animation.ts:127
▸ play (name
): void
播放
Parameters Name Type Description name
string
要播放的动画
Returns void
Defined in src/core/component/Animation.ts:128
▸ play (loop
): void
播放
Parameters Name Type Description loop
number
要循环的次数
Returns void
Defined in src/core/component/Animation.ts:129
▸ play (name
, loop
): void
播放
Parameters Name Type Description name
string
要播放的动画 loop
number
要循环的次数
Returns void
Defined in src/core/component/Animation.ts:130
prev ▸ prev (): void
播放上一帧
Returns void
Defined in src/core/component/Animation.ts:103
puase ▸ puase (): void
暂停
Returns void
Defined in src/core/component/Animation.ts:168
removeFrameAction ▸ removeFrameAction (time
, callback
, target
): void
移除事件
Parameters Name Type time
number
callback
() => void
target
any
Returns void
Defined in src/core/component/Animation.ts:205
setTimeline ▸ setTimeline (timelines
, name?
): void
设置一个属性变更时间线
Parameters Name Type timelines
Timeline
<{}>[]name?
string
Returns void
Defined in src/core/component/Animation.ts:93
start ▸ Optional
start (): void
组件被挂载到节点时触发
Returns void
Inherited from Component .start
Defined in src/core/component/Component.ts:44
stop ▸ stop (): void
停止
Returns void
Defined in src/core/component/Animation.ts:160
update ▸ update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Overrides Component .update
Defined in src/core/component/Animation.ts:172
`,284),i=[r];function d(l,h,s,c,m,p){return a(),t("div",null,i)}const u=e(n,[["render",d]]);export{b as __pageData,u as default};
+Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties animation • animation : string
= 'default'
Defined in src/core/component/Animation.ts:107
animations • animations : Record
<string
, Timeline
<{}>[]> = {}
动画配置
Defined in src/core/component/Animation.ts:46
emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
loop • loop : number
= 0
循环次数,0:不循环,-1:一直循环
Defined in src/core/component/Animation.ts:112
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
paused • paused : boolean
= true
指示是否被暂停
Defined in src/core/component/Animation.ts:125
playCount • playCount : number
= 0
已经播放次数
Defined in src/core/component/Animation.ts:116
speed • speed : number
= 1
播放速度100%
Defined in src/core/component/Animation.ts:120
time • time : number
= 0
当前时间线
Defined in src/core/component/Animation.ts:32
timeMax • timeMax : number
= 0
动画总长
Defined in src/core/component/Animation.ts:24
timeline • timeline : EventEmitter
<string
| symbol
, any
>
用于记录回调的时间线,在target时间线后执行
Defined in src/core/component/Animation.ts:19
total • total : number
= 0
最大帧数
Defined in src/core/component/Animation.ts:28
Event ▪ Static
Event : Object
Type declaration Name Type Description ENDED
"ended"
动画播放完成
Defined in src/core/component/Animation.ts:10
Accessors targets • get
targets (): Timeline
<{}>[]
时间线 每一个对象一个时间线 还有一个总时间线,可以用于记录一些信息
Returns Timeline
<{}>[]
Defined in src/core/component/Animation.ts:39
Methods addFrameAction ▸ addFrameAction (time
, callback
, target
): void
添加事件
Parameters Name Type time
number
callback
() => void
target
any
Returns void
Defined in src/core/component/Animation.ts:198
addTimeline ▸ addTimeline (timeline
): void
添加一个熟悉变更时间线
Parameters Name Type timeline
Timeline
<{}>
Returns void
Defined in src/core/component/Animation.ts:84
destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
next ▸ next (): void
播放下一帧
Returns void
Defined in src/core/component/Animation.ts:53
nextAction ▸ Protected
nextAction (val
): void
当有新的属性需要更新时调用
Parameters Returns void
Defined in src/core/component/Animation.ts:73
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
play ▸ play (): void
播放
Returns void
Defined in src/core/component/Animation.ts:127
▸ play (name
): void
播放
Parameters Name Type Description name
string
要播放的动画
Returns void
Defined in src/core/component/Animation.ts:128
▸ play (loop
): void
播放
Parameters Name Type Description loop
number
要循环的次数
Returns void
Defined in src/core/component/Animation.ts:129
▸ play (name
, loop
): void
播放
Parameters Name Type Description name
string
要播放的动画 loop
number
要循环的次数
Returns void
Defined in src/core/component/Animation.ts:130
prev ▸ prev (): void
播放上一帧
Returns void
Defined in src/core/component/Animation.ts:103
puase ▸ puase (): void
暂停
Returns void
Defined in src/core/component/Animation.ts:168
removeFrameAction ▸ removeFrameAction (time
, callback
, target
): void
移除事件
Parameters Name Type time
number
callback
() => void
target
any
Returns void
Defined in src/core/component/Animation.ts:205
setTimeline ▸ setTimeline (timelines
, name?
): void
设置一个属性变更时间线
Parameters Name Type timelines
Timeline
<{}>[]name?
string
Returns void
Defined in src/core/component/Animation.ts:93
start ▸ Optional
start (): void
组件被挂载到节点时触发
Returns void
Inherited from Component .start
Defined in src/core/component/Component.ts:44
stop ▸ stop (): void
停止
Returns void
Defined in src/core/component/Animation.ts:160
update ▸ update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Overrides Component .update
Defined in src/core/component/Animation.ts:172
`,284),i=[r];function d(l,h,s,c,m,p){return a(),t("div",null,i)}const u=e(n,[["render",d]]);export{b as __pageData,u as default};
diff --git a/assets/dist_classes_Animation.md.953b3766.lean.js b/assets/dist_classes_Animation.md.b963ae1b.lean.js
similarity index 100%
rename from assets/dist_classes_Animation.md.953b3766.lean.js
rename to assets/dist_classes_Animation.md.b963ae1b.lean.js
diff --git a/assets/dist_classes_Application.md.cd67a76e.js b/assets/dist_classes_Application.md.9839e0ef.js
similarity index 94%
rename from assets/dist_classes_Application.md.cd67a76e.js
rename to assets/dist_classes_Application.md.9839e0ef.js
index 5381038..de9b977 100644
--- a/assets/dist_classes_Application.md.cd67a76e.js
+++ b/assets/dist_classes_Application.md.9839e0ef.js
@@ -8,4 +8,4 @@ import{_ as e,c as a,o as t,N as s}from"./chunks/framework.2075e729.js";const b=
width : 500 ,
height : 500
} ) ;
-Table of contents Constructors Properties Methods Constructors constructor • new Application (config?
)
Parameters Name Type config
Partial
<{ height
: number
; width
: number
}>
Defined in src/core/Application.ts:43
Properties config • config : Partial
<{ height
: number
; width
: number
}>
Defined in src/core/Application.ts:28
eventSystem • eventSystem : EventSystem
全局事件处理器
Defined in src/core/Application.ts:41
stage • stage : Transform
<Container
>
舞台,根节点
Defined in src/core/Application.ts:36
Methods use ▸ use (install
): Application
插件拓展 可注入到app
Parameters Name Type Description install
(app
: Application
) => void
插件入口函数
Returns Application
Defined in src/core/Application.ts:70
run ▸ Static
run (config?
): Application
Parameters Name Type config
Partial
<Partial
<{ height
: number
; width
: number
}>>
Returns Application
Defined in src/core/Application.ts:75
`,54),r=[n];function l(i,c,p,d,h,u){return t(),a("div",null,r)}const m=e(o,[["render",l]]);export{b as __pageData,m as default};
+Table of contents Constructors Properties Methods Constructors constructor • new Application (config?
)
Parameters Name Type config
Partial
<{ height
: number
; width
: number
}>
Defined in src/core/Application.ts:43
Properties config • config : Partial
<{ height
: number
; width
: number
}>
Defined in src/core/Application.ts:28
eventSystem • eventSystem : EventSystem
全局事件处理器
Defined in src/core/Application.ts:41
stage • stage : Transform
<Container
>
舞台,根节点
Defined in src/core/Application.ts:36
Methods use ▸ use (install
): Application
插件拓展 可注入到app
Parameters Name Type Description install
(app
: Application
) => void
插件入口函数
Returns Application
Defined in src/core/Application.ts:70
run ▸ Static
run (config?
): Application
Parameters Name Type config
Partial
<Partial
<{ height
: number
; width
: number
}>>
Returns Application
Defined in src/core/Application.ts:75
`,54),r=[n];function l(i,c,p,d,h,f){return t(),a("div",null,r)}const m=e(o,[["render",l]]);export{b as __pageData,m as default};
diff --git a/assets/dist_classes_Application.md.cd67a76e.lean.js b/assets/dist_classes_Application.md.9839e0ef.lean.js
similarity index 83%
rename from assets/dist_classes_Application.md.cd67a76e.lean.js
rename to assets/dist_classes_Application.md.9839e0ef.lean.js
index 79dde9d..ad816ed 100644
--- a/assets/dist_classes_Application.md.cd67a76e.lean.js
+++ b/assets/dist_classes_Application.md.9839e0ef.lean.js
@@ -1 +1 @@
-import{_ as e,c as a,o as t,N as s}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Application","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Application.md"}'),o={name:"dist/classes/Application.md"},n=s("",54),r=[n];function l(i,c,p,d,h,u){return t(),a("div",null,r)}const m=e(o,[["render",l]]);export{b as __pageData,m as default};
+import{_ as e,c as a,o as t,N as s}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Application","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Application.md"}'),o={name:"dist/classes/Application.md"},n=s("",54),r=[n];function l(i,c,p,d,h,f){return t(),a("div",null,r)}const m=e(o,[["render",l]]);export{b as __pageData,m as default};
diff --git a/assets/dist_classes_Audio.md.f0af9d3b.js b/assets/dist_classes_Audio.md.4639b049.js
similarity index 95%
rename from assets/dist_classes_Audio.md.f0af9d3b.js
rename to assets/dist_classes_Audio.md.4639b049.js
index de9c6cb..8347754 100644
--- a/assets/dist_classes_Audio.md.f0af9d3b.js
+++ b/assets/dist_classes_Audio.md.4639b049.js
@@ -15,7 +15,7 @@ import{_ as e,c as a,o,N as n}from"./chunks/framework.2075e729.js";const f=JSON.
} ) ;
Hierarchy Table of contents Constructors Properties Accessors Methods Constructors constructor • new Audio ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
loop • loop : number
= 0
循环次数,0:不循环,-1:一直循环
Defined in src/core/component/Audio.ts:118
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
paused • paused : boolean
= true
指示媒体元素是否被暂停
Defined in src/core/component/Audio.ts:151
playCount • playCount : number
= 0
已经播放了的次数 如果要播放指定次数,需要将此参数重置
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
loop • loop : number
= 0
循环次数,0:不循环,-1:一直循环
Defined in src/core/component/Audio.ts:118
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
paused • paused : boolean
= true
指示媒体元素是否被暂停
Defined in src/core/component/Audio.ts:151
playCount • playCount : number
= 0
已经播放了的次数 如果要播放指定次数,需要将此参数重置
ts
// 创建节点
const node = new Transform () ;
// 添加音频组件
@@ -36,4 +36,4 @@ import{_ as e,c as a,o,N as n}from"./chunks/framework.2075e729.js";const f=JSON.
// 播放音频
audio . play () ;
} ) ;
-
Defined in src/core/component/Audio.ts:146
Event ▪ Static
Event : Object
事件
Type declaration Name Type Description ENDED
"ended"
音频播放完成
Defined in src/core/component/Audio.ts:32
Accessors currentTime • get
currentTime (): number
音频当前播放的时间
Returns number
Defined in src/core/component/Audio.ts:65
• set
currentTime (val
): void
Parameters Returns void
Defined in src/core/component/Audio.ts:68
duration • get
duration (): number
获取获取音频总时长
Returns number
Defined in src/core/component/Audio.ts:57
playbackRate • get
playbackRate (): number
音频播放速度0.25-5.0,不在此范围将被静音,默认值 1.0
Returns number
Defined in src/core/component/Audio.ts:79
• set
playbackRate (val
): void
Parameters Returns void
Defined in src/core/component/Audio.ts:82
source • get
source (): HTMLAudioElement
Returns HTMLAudioElement
Defined in src/core/component/Audio.ts:111
• set
source (val
): void
音频资源
Parameters Name Type val
HTMLAudioElement
Returns void
Defined in src/core/component/Audio.ts:95
volume • get
volume (): number
表示音频的音量。值从 0.0(静音)到 1.0(最大音量)。
Returns number
Defined in src/core/component/Audio.ts:44
• set
volume (val
): void
Parameters Returns void
Defined in src/core/component/Audio.ts:47
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
pause ▸ pause (): void
暂停音频
Returns void
Defined in src/core/component/Audio.ts:164
play ▸ play (): void
播放音频
Returns void
Defined in src/core/component/Audio.ts:156
start ▸ Optional
start (): void
组件被挂载到节点时触发
Returns void
Inherited from Component .start
Defined in src/core/component/Component.ts:44
stop ▸ stop (): void
停止播放 会将播放时间重置到0
Returns void
Defined in src/core/component/Audio.ts:173
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Component .update
Defined in src/core/component/Component.ts:50
`,216),r=[s];function l(i,p,c,d,h,u){return o(),a("div",null,r)}const b=e(t,[["render",l]]);export{f as __pageData,b as default};
+Defined in src/core/component/Audio.ts:146
Event ▪ Static
Event : Object
事件
Type declaration Name Type Description ENDED
"ended"
音频播放完成
Defined in src/core/component/Audio.ts:32
Accessors currentTime • get
currentTime (): number
音频当前播放的时间
Returns number
Defined in src/core/component/Audio.ts:65
• set
currentTime (val
): void
Parameters Returns void
Defined in src/core/component/Audio.ts:68
duration • get
duration (): number
获取获取音频总时长
Returns number
Defined in src/core/component/Audio.ts:57
playbackRate • get
playbackRate (): number
音频播放速度0.25-5.0,不在此范围将被静音,默认值 1.0
Returns number
Defined in src/core/component/Audio.ts:79
• set
playbackRate (val
): void
Parameters Returns void
Defined in src/core/component/Audio.ts:82
source • get
source (): HTMLAudioElement
Returns HTMLAudioElement
Defined in src/core/component/Audio.ts:111
• set
source (val
): void
音频资源
Parameters Name Type val
HTMLAudioElement
Returns void
Defined in src/core/component/Audio.ts:95
volume • get
volume (): number
表示音频的音量。值从 0.0(静音)到 1.0(最大音量)。
Returns number
Defined in src/core/component/Audio.ts:44
• set
volume (val
): void
Parameters Returns void
Defined in src/core/component/Audio.ts:47
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
pause ▸ pause (): void
暂停音频
Returns void
Defined in src/core/component/Audio.ts:164
play ▸ play (): void
播放音频
Returns void
Defined in src/core/component/Audio.ts:156
start ▸ Optional
start (): void
组件被挂载到节点时触发
Returns void
Inherited from Component .start
Defined in src/core/component/Component.ts:44
stop ▸ stop (): void
停止播放 会将播放时间重置到0
Returns void
Defined in src/core/component/Audio.ts:173
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Component .update
Defined in src/core/component/Component.ts:50
`,216),r=[s];function l(i,p,c,d,h,u){return o(),a("div",null,r)}const b=e(t,[["render",l]]);export{f as __pageData,b as default};
diff --git a/assets/dist_classes_Audio.md.f0af9d3b.lean.js b/assets/dist_classes_Audio.md.4639b049.lean.js
similarity index 100%
rename from assets/dist_classes_Audio.md.f0af9d3b.lean.js
rename to assets/dist_classes_Audio.md.4639b049.lean.js
diff --git a/assets/dist_classes_AudioLoader.md.495df318.js b/assets/dist_classes_AudioLoader.md.91448830.js
similarity index 98%
rename from assets/dist_classes_AudioLoader.md.495df318.js
rename to assets/dist_classes_AudioLoader.md.91448830.js
index 88f8e89..a79635e 100644
--- a/assets/dist_classes_AudioLoader.md.495df318.js
+++ b/assets/dist_classes_AudioLoader.md.91448830.js
@@ -1 +1 @@
-import{_ as e,c as a,o as t,N as o}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: AudioLoader","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/AudioLoader.md"}'),r={name:"dist/classes/AudioLoader.md"},d=o('Class: AudioLoader 音频资源加载
Implements Table of contents Constructors Methods Constructors constructor • new AudioLoader ()
Methods load ▸ load (source
): Promise
<HTMLAudioElement
>
Parameters Returns Promise
<HTMLAudioElement
>
Implementation of ILoader .load
Defined in src/core/resource/loader/AudioLoader.ts:7
',23),s=[d];function l(n,i,c,h,u,m){return t(),a("div",null,s)}const p=e(r,[["render",l]]);export{b as __pageData,p as default};
+import{_ as e,c as a,o as t,N as o}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: AudioLoader","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/AudioLoader.md"}'),r={name:"dist/classes/AudioLoader.md"},d=o('Class: AudioLoader 音频资源加载
Implements Table of contents Constructors Methods Constructors constructor • new AudioLoader ()
Methods load ▸ load (source
): Promise
<HTMLAudioElement
>
Parameters Returns Promise
<HTMLAudioElement
>
Implementation of ILoader .load
Defined in src/core/resource/loader/AudioLoader.ts:7
',23),s=[d];function l(n,i,c,h,u,m){return t(),a("div",null,s)}const p=e(r,[["render",l]]);export{b as __pageData,p as default};
diff --git a/assets/dist_classes_AudioLoader.md.495df318.lean.js b/assets/dist_classes_AudioLoader.md.91448830.lean.js
similarity index 100%
rename from assets/dist_classes_AudioLoader.md.495df318.lean.js
rename to assets/dist_classes_AudioLoader.md.91448830.lean.js
diff --git a/assets/dist_classes_BaseTexture.md.d6cb6e25.js b/assets/dist_classes_BaseTexture.md.41eeb69d.js
similarity index 88%
rename from assets/dist_classes_BaseTexture.md.d6cb6e25.js
rename to assets/dist_classes_BaseTexture.md.41eeb69d.js
index 26541fc..1402b7b 100644
--- a/assets/dist_classes_BaseTexture.md.d6cb6e25.js
+++ b/assets/dist_classes_BaseTexture.md.41eeb69d.js
@@ -1 +1 @@
-import{_ as e,c as r,o as a,N as t}from"./chunks/framework.2075e729.js";const p=JSON.parse('{"title":"Class: BaseTexture","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/BaseTexture.md"}'),o={name:"dist/classes/BaseTexture.md"},s=t('Class: BaseTexture 纹理
Hierarchy Table of contents Constructors Properties Constructors constructor • new BaseTexture ()
Properties height • height : number
= 0
截取高度
Defined in src/core/texture/BaseTexture.ts:20
width • width : number
= 0
截取宽度
Defined in src/core/texture/BaseTexture.ts:16
x • x : number
= 0
记录x偏移
Defined in src/core/texture/BaseTexture.ts:8
y • y : number
= 0
记录y偏移
Defined in src/core/texture/BaseTexture.ts:12
',36),i=[s];function h(n,c,d,l,u,x){return a(),r("div",null,i)}const f=e(o,[["render",h]]);export{p as __pageData,f as default};
+import{_ as e,c as r,o as a,N as t}from"./chunks/framework.2075e729.js";const p=JSON.parse('{"title":"Class: BaseTexture","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/BaseTexture.md"}'),o={name:"dist/classes/BaseTexture.md"},s=t('Class: BaseTexture 纹理
Hierarchy Table of contents Constructors Properties Constructors constructor • new BaseTexture ()
Properties height • height : number
= 0
截取高度
Defined in src/core/texture/BaseTexture.ts:20
width • width : number
= 0
截取宽度
Defined in src/core/texture/BaseTexture.ts:16
x • x : number
= 0
记录x偏移
Defined in src/core/texture/BaseTexture.ts:8
y • y : number
= 0
记录y偏移
Defined in src/core/texture/BaseTexture.ts:12
',36),i=[s];function h(n,c,l,d,u,x){return a(),r("div",null,i)}const b=e(o,[["render",h]]);export{p as __pageData,b as default};
diff --git a/assets/dist_classes_BaseTexture.md.d6cb6e25.lean.js b/assets/dist_classes_BaseTexture.md.41eeb69d.lean.js
similarity index 67%
rename from assets/dist_classes_BaseTexture.md.d6cb6e25.lean.js
rename to assets/dist_classes_BaseTexture.md.41eeb69d.lean.js
index 8f4e778..b7fb04e 100644
--- a/assets/dist_classes_BaseTexture.md.d6cb6e25.lean.js
+++ b/assets/dist_classes_BaseTexture.md.41eeb69d.lean.js
@@ -1 +1 @@
-import{_ as e,c as r,o as a,N as t}from"./chunks/framework.2075e729.js";const p=JSON.parse('{"title":"Class: BaseTexture","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/BaseTexture.md"}'),o={name:"dist/classes/BaseTexture.md"},s=t("",36),i=[s];function h(n,c,d,l,u,x){return a(),r("div",null,i)}const f=e(o,[["render",h]]);export{p as __pageData,f as default};
+import{_ as e,c as r,o as a,N as t}from"./chunks/framework.2075e729.js";const p=JSON.parse('{"title":"Class: BaseTexture","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/BaseTexture.md"}'),o={name:"dist/classes/BaseTexture.md"},s=t("",36),i=[s];function h(n,c,l,d,u,x){return a(),r("div",null,i)}const b=e(o,[["render",h]]);export{p as __pageData,b as default};
diff --git a/assets/dist_classes_Button.md.0a7edf3c.js b/assets/dist_classes_Button.md.de4729bc.js
similarity index 95%
rename from assets/dist_classes_Button.md.0a7edf3c.js
rename to assets/dist_classes_Button.md.de4729bc.js
index ca108ae..7501b27 100644
--- a/assets/dist_classes_Button.md.0a7edf3c.js
+++ b/assets/dist_classes_Button.md.de4729bc.js
@@ -13,4 +13,4 @@ import{_ as e,c as a,o as t,N as o}from"./chunks/framework.2075e729.js";const u=
parent . addChild (node) ;
Hierarchy Table of contents Constructors Properties Methods Constructors constructor • new Button ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties callback • callback : Map
<any
, Function
[]>
Defined in src/core/component/Button.ts:62
difftime • difftime : number
= 200
起落时间间隔
Defined in src/core/component/Button.ts:60
emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
Methods add ▸ add (callback
, target
): void
Parameters Name Type callback
Function
target
any
Returns void
Defined in src/core/component/Button.ts:64
destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
remove ▸ remove (callback
, target
): void
Parameters Name Type callback
Function
target
any
Returns void
Defined in src/core/component/Button.ts:73
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Component .start
Defined in src/core/component/Button.ts:24
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Component .update
Defined in src/core/component/Component.ts:50
`,124),s=[r];function l(i,d,c,h,p,m){return t(),a("div",null,s)}const b=e(n,[["render",l]]);export{u as __pageData,b as default};
+Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties callback • callback : Map
<any
, Function
[]>
Defined in src/core/component/Button.ts:62
difftime • difftime : number
= 200
起落时间间隔
Defined in src/core/component/Button.ts:60
emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
Methods add ▸ add (callback
, target
): void
Parameters Name Type callback
Function
target
any
Returns void
Defined in src/core/component/Button.ts:64
destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
remove ▸ remove (callback
, target
): void
Parameters Name Type callback
Function
target
any
Returns void
Defined in src/core/component/Button.ts:73
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Component .start
Defined in src/core/component/Button.ts:24
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Component .update
Defined in src/core/component/Component.ts:50
`,124),s=[r];function l(i,d,c,h,p,m){return t(),a("div",null,s)}const b=e(n,[["render",l]]);export{u as __pageData,b as default};
diff --git a/assets/dist_classes_Button.md.0a7edf3c.lean.js b/assets/dist_classes_Button.md.de4729bc.lean.js
similarity index 100%
rename from assets/dist_classes_Button.md.0a7edf3c.lean.js
rename to assets/dist_classes_Button.md.de4729bc.lean.js
diff --git a/assets/dist_classes_Component.md.35b9fe0d.js b/assets/dist_classes_Component.md.7cf0c7fa.js
similarity index 95%
rename from assets/dist_classes_Component.md.35b9fe0d.js
rename to assets/dist_classes_Component.md.7cf0c7fa.js
index b54385d..26f38b1 100644
--- a/assets/dist_classes_Component.md.35b9fe0d.js
+++ b/assets/dist_classes_Component.md.7cf0c7fa.js
@@ -1,3 +1,3 @@
import{_ as e,c as t,o as a,N as o}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Class: Component","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Component.md"}'),n={name:"dist/classes/Component.md"},r=o(`Class: Component Hierarchy Implements Table of contents Constructors Properties Methods Constructors constructor • new Component ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Defined in src/core/component/Component.ts:22
Methods destroy ▸ destroy (): void
消毁
Returns void
Implementation of IComponent .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Implementation of IComponent .onDestroy
Defined in src/core/component/Component.ts:62
start ▸ Optional
start (): void
组件被挂载到节点时触发
Returns void
Implementation of IComponent .start
Defined in src/core/component/Component.ts:44
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Implementation of IComponent .update
Defined in src/core/component/Component.ts:50
`,85),s=[r];function i(l,d,h,c,p,m){return a(),t("div",null,s)}const b=e(n,[["render",i]]);export{u as __pageData,b as default};
+Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Defined in src/core/component/Component.ts:22
Methods destroy ▸ destroy (): void
消毁
Returns void
Implementation of IComponent .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Implementation of IComponent .onDestroy
Defined in src/core/component/Component.ts:62
start ▸ Optional
start (): void
组件被挂载到节点时触发
Returns void
Implementation of IComponent .start
Defined in src/core/component/Component.ts:44
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Implementation of IComponent .update
Defined in src/core/component/Component.ts:50
`,85),s=[r];function i(l,d,h,c,p,m){return a(),t("div",null,s)}const b=e(n,[["render",i]]);export{u as __pageData,b as default};
diff --git a/assets/dist_classes_Component.md.35b9fe0d.lean.js b/assets/dist_classes_Component.md.7cf0c7fa.lean.js
similarity index 100%
rename from assets/dist_classes_Component.md.35b9fe0d.lean.js
rename to assets/dist_classes_Component.md.7cf0c7fa.lean.js
diff --git a/assets/dist_classes_Container.md.b3b933cc.js b/assets/dist_classes_Container.md.02be0931.js
similarity index 93%
rename from assets/dist_classes_Container.md.b3b933cc.js
rename to assets/dist_classes_Container.md.02be0931.js
index 7428e46..e8684ed 100644
--- a/assets/dist_classes_Container.md.b3b933cc.js
+++ b/assets/dist_classes_Container.md.02be0931.js
@@ -1,3 +1,3 @@
import{_ as e,c as a,o as t,N as r}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Container","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Container.md"}'),o={name:"dist/classes/Container.md"},n=r(`Class: Container 显示对象组件
Hierarchy Table of contents Constructors Properties Methods Constructors constructor • new Container ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from DisplayObjects .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from DisplayObjects .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from DisplayObjects .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from DisplayObjects .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from DisplayObjects .node
Defined in src/core/component/Component.ts:22
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from DisplayObjects .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from DisplayObjects .onDestroy
Defined in src/core/component/Component.ts:62
start ▸ Optional
start (): void
组件被挂载到节点时触发
Returns void
Inherited from DisplayObjects .start
Defined in src/core/component/Component.ts:44
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from DisplayObjects .update
Defined in src/core/component/Component.ts:50
`,94),i=[n];function s(h,d,l,c,p,m){return t(),a("div",null,i)}const u=e(o,[["render",s]]);export{b as __pageData,u as default};
+Inherited from DisplayObjects .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from DisplayObjects .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from DisplayObjects .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from DisplayObjects .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from DisplayObjects .node
Defined in src/core/component/Component.ts:22
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from DisplayObjects .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from DisplayObjects .onDestroy
Defined in src/core/component/Component.ts:62
start ▸ Optional
start (): void
组件被挂载到节点时触发
Returns void
Inherited from DisplayObjects .start
Defined in src/core/component/Component.ts:44
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from DisplayObjects .update
Defined in src/core/component/Component.ts:50
`,94),i=[n];function s(h,l,d,c,p,m){return t(),a("div",null,i)}const u=e(o,[["render",s]]);export{b as __pageData,u as default};
diff --git a/assets/dist_classes_Container.md.b3b933cc.lean.js b/assets/dist_classes_Container.md.02be0931.lean.js
similarity index 83%
rename from assets/dist_classes_Container.md.b3b933cc.lean.js
rename to assets/dist_classes_Container.md.02be0931.lean.js
index 28ca316..01428a5 100644
--- a/assets/dist_classes_Container.md.b3b933cc.lean.js
+++ b/assets/dist_classes_Container.md.02be0931.lean.js
@@ -1 +1 @@
-import{_ as e,c as a,o as t,N as r}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Container","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Container.md"}'),o={name:"dist/classes/Container.md"},n=r("",94),i=[n];function s(h,d,l,c,p,m){return t(),a("div",null,i)}const u=e(o,[["render",s]]);export{b as __pageData,u as default};
+import{_ as e,c as a,o as t,N as r}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Container","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Container.md"}'),o={name:"dist/classes/Container.md"},n=r("",94),i=[n];function s(h,l,d,c,p,m){return t(),a("div",null,i)}const u=e(o,[["render",s]]);export{b as __pageData,u as default};
diff --git a/assets/dist_classes_DisplayObjects.md.8240a310.js b/assets/dist_classes_DisplayObjects.md.8a71a06b.js
similarity index 93%
rename from assets/dist_classes_DisplayObjects.md.8240a310.js
rename to assets/dist_classes_DisplayObjects.md.8a71a06b.js
index 646cf21..197abac 100644
--- a/assets/dist_classes_DisplayObjects.md.8240a310.js
+++ b/assets/dist_classes_DisplayObjects.md.8a71a06b.js
@@ -1,3 +1,3 @@
import{_ as e,c as a,o as t,N as o}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: DisplayObjects","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/DisplayObjects.md"}'),r={name:"dist/classes/DisplayObjects.md"},n=o(`Class: DisplayObjects 显示对象组件
Hierarchy Table of contents Constructors Properties Methods Constructors constructor • new DisplayObjects ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
start ▸ Optional
start (): void
组件被挂载到节点时触发
Returns void
Inherited from Component .start
Defined in src/core/component/Component.ts:44
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Component .update
Defined in src/core/component/Component.ts:50
`,94),i=[n];function s(h,d,l,c,p,m){return t(),a("div",null,i)}const u=e(r,[["render",s]]);export{b as __pageData,u as default};
+Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
start ▸ Optional
start (): void
组件被挂载到节点时触发
Returns void
Inherited from Component .start
Defined in src/core/component/Component.ts:44
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Component .update
Defined in src/core/component/Component.ts:50
`,94),i=[n];function s(h,d,l,c,p,m){return t(),a("div",null,i)}const u=e(r,[["render",s]]);export{b as __pageData,u as default};
diff --git a/assets/dist_classes_DisplayObjects.md.8240a310.lean.js b/assets/dist_classes_DisplayObjects.md.8a71a06b.lean.js
similarity index 100%
rename from assets/dist_classes_DisplayObjects.md.8240a310.lean.js
rename to assets/dist_classes_DisplayObjects.md.8a71a06b.lean.js
diff --git a/assets/dist_classes_EventSystem.md.150c3d8a.js b/assets/dist_classes_EventSystem.md.7637e0c0.js
similarity index 97%
rename from assets/dist_classes_EventSystem.md.150c3d8a.js
rename to assets/dist_classes_EventSystem.md.7637e0c0.js
index 2dfdbb2..1981054 100644
--- a/assets/dist_classes_EventSystem.md.150c3d8a.js
+++ b/assets/dist_classes_EventSystem.md.7637e0c0.js
@@ -1 +1 @@
-import{_ as e,c as t,o as a,N as r}from"./chunks/framework.2075e729.js";const y=JSON.parse('{"title":"Class: EventSystem","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/EventSystem.md"}'),o={name:"dist/classes/EventSystem.md"},d=r('Class: EventSystem 用于事件监听 该组件应该是一个全局组件 应该要挂载到跟节点 用于获取和派发全局事件
点击穿透 点击冒泡
Hierarchy EventEmitter
↳ EventSystem
Table of contents Constructors Properties Methods Constructors constructor • new EventSystem (transform
)
Parameters Overrides EE.constructor
Defined in src/core/system/EventSystem.ts:17
Properties point • point : Vector2
Defined in src/core/system/EventSystem.ts:29
• transform : Transform
<Container
>
Defined in src/core/system/EventSystem.ts:17
prefixed ▪ Static
prefixed : string
| boolean
Inherited from EE.prefixed
Defined in node_modules/eventemitter3/index.d.ts:9
Methods addEvents ▸ addEvents (): void
Returns void
Defined in src/core/system/EventSystem.ts:22
addListener ▸ addListener <T
>(event
, fn
, context?
): EventSystem
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
fn
(...args
: any
[]) => void
context?
any
Returns EventSystem
Inherited from EE.addListener
Defined in node_modules/eventemitter3/index.d.ts:45
emit ▸ emit <T
>(event
, ...args
): boolean
Calls each of the listeners registered for a given event.
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
...args
any
[]
Returns boolean
Inherited from EE.emit
Defined in node_modules/eventemitter3/index.d.ts:32
eventNames ▸ eventNames (): (string
| symbol
)[]
Return an array listing the events for which the emitter has registered listeners.
Returns (string
| symbol
)[]
Inherited from EE.eventNames
Defined in node_modules/eventemitter3/index.d.ts:15
listenerCount ▸ listenerCount (event
): number
Return the number of listeners listening to a given event.
Parameters Name Type event
string
| symbol
Returns number
Inherited from EE.listenerCount
Defined in node_modules/eventemitter3/index.d.ts:27
listeners ▸ listeners <T
>(event
): (...args
: any
[]) => void
[]
Return the listeners registered for a given event.
Type parameters Name Type T
extends string
| symbol
Parameters Returns (...args
: any
[]) => void
[]
Inherited from EE.listeners
Defined in node_modules/eventemitter3/index.d.ts:20
off ▸ off <T
>(event
, fn?
, context?
, once?
): EventSystem
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
fn?
(...args
: any
[]) => void
context?
any
once?
boolean
Returns EventSystem
Inherited from EE.off
Defined in node_modules/eventemitter3/index.d.ts:69
on ▸ on <T
>(event
, fn
, context?
): EventSystem
Add a listener for a given event.
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
fn
(...args
: any
[]) => void
context?
any
Returns EventSystem
Inherited from EE.on
Defined in node_modules/eventemitter3/index.d.ts:40
onBeagin ▸ onBeagin (event
): void
Parameters Returns void
Defined in src/core/system/EventSystem.ts:31
onEnd ▸ onEnd (event
): void
Parameters Returns void
Defined in src/core/system/EventSystem.ts:35
onMove ▸ onMove (event
): void
Parameters Returns void
Defined in src/core/system/EventSystem.ts:39
once ▸ once <T
>(event
, fn
, context?
): EventSystem
Add a one-time listener for a given event.
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
fn
(...args
: any
[]) => void
context?
any
Returns EventSystem
Inherited from EE.once
Defined in node_modules/eventemitter3/index.d.ts:54
removeAllListeners ▸ removeAllListeners (event?
): EventSystem
Remove all listeners, or those of the specified event.
Parameters Name Type event?
string
| symbol
Returns EventSystem
Inherited from EE.removeAllListeners
Defined in node_modules/eventemitter3/index.d.ts:79
removeListener ▸ removeListener <T
>(event
, fn?
, context?
, once?
): EventSystem
Remove the listeners of a given event.
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
fn?
(...args
: any
[]) => void
context?
any
once?
boolean
Returns EventSystem
Inherited from EE.removeListener
Defined in node_modules/eventemitter3/index.d.ts:63
tapEmit ▸ tapEmit (transform
, eventName
): boolean
发送点击事件到正确的节点
Parameters Returns boolean
Defined in src/core/system/EventSystem.ts:59
',212),n=[d];function l(i,s,h,c,m,f){return a(),t("div",null,n)}const p=e(o,[["render",l]]);export{y as __pageData,p as default};
+import{_ as e,c as t,o as a,N as r}from"./chunks/framework.2075e729.js";const y=JSON.parse('{"title":"Class: EventSystem","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/EventSystem.md"}'),o={name:"dist/classes/EventSystem.md"},d=r('Class: EventSystem 用于事件监听 该组件应该是一个全局组件 应该要挂载到跟节点 用于获取和派发全局事件
点击穿透 点击冒泡
Hierarchy EventEmitter
↳ EventSystem
Table of contents Constructors Properties Methods Constructors constructor • new EventSystem (transform
)
Parameters Overrides EE.constructor
Defined in src/core/system/EventSystem.ts:17
Properties point • point : Vector2
Defined in src/core/system/EventSystem.ts:29
• transform : Transform
<Container
>
Defined in src/core/system/EventSystem.ts:17
prefixed ▪ Static
prefixed : string
| boolean
Inherited from EE.prefixed
Defined in node_modules/eventemitter3/index.d.ts:9
Methods addEvents ▸ addEvents (): void
Returns void
Defined in src/core/system/EventSystem.ts:22
addListener ▸ addListener <T
>(event
, fn
, context?
): EventSystem
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
fn
(...args
: any
[]) => void
context?
any
Returns EventSystem
Inherited from EE.addListener
Defined in node_modules/eventemitter3/index.d.ts:45
emit ▸ emit <T
>(event
, ...args
): boolean
Calls each of the listeners registered for a given event.
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
...args
any
[]
Returns boolean
Inherited from EE.emit
Defined in node_modules/eventemitter3/index.d.ts:32
eventNames ▸ eventNames (): (string
| symbol
)[]
Return an array listing the events for which the emitter has registered listeners.
Returns (string
| symbol
)[]
Inherited from EE.eventNames
Defined in node_modules/eventemitter3/index.d.ts:15
listenerCount ▸ listenerCount (event
): number
Return the number of listeners listening to a given event.
Parameters Name Type event
string
| symbol
Returns number
Inherited from EE.listenerCount
Defined in node_modules/eventemitter3/index.d.ts:27
listeners ▸ listeners <T
>(event
): (...args
: any
[]) => void
[]
Return the listeners registered for a given event.
Type parameters Name Type T
extends string
| symbol
Parameters Returns (...args
: any
[]) => void
[]
Inherited from EE.listeners
Defined in node_modules/eventemitter3/index.d.ts:20
off ▸ off <T
>(event
, fn?
, context?
, once?
): EventSystem
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
fn?
(...args
: any
[]) => void
context?
any
once?
boolean
Returns EventSystem
Inherited from EE.off
Defined in node_modules/eventemitter3/index.d.ts:69
on ▸ on <T
>(event
, fn
, context?
): EventSystem
Add a listener for a given event.
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
fn
(...args
: any
[]) => void
context?
any
Returns EventSystem
Inherited from EE.on
Defined in node_modules/eventemitter3/index.d.ts:40
onBeagin ▸ onBeagin (event
): void
Parameters Returns void
Defined in src/core/system/EventSystem.ts:31
onEnd ▸ onEnd (event
): void
Parameters Returns void
Defined in src/core/system/EventSystem.ts:35
onMove ▸ onMove (event
): void
Parameters Returns void
Defined in src/core/system/EventSystem.ts:39
once ▸ once <T
>(event
, fn
, context?
): EventSystem
Add a one-time listener for a given event.
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
fn
(...args
: any
[]) => void
context?
any
Returns EventSystem
Inherited from EE.once
Defined in node_modules/eventemitter3/index.d.ts:54
removeAllListeners ▸ removeAllListeners (event?
): EventSystem
Remove all listeners, or those of the specified event.
Parameters Name Type event?
string
| symbol
Returns EventSystem
Inherited from EE.removeAllListeners
Defined in node_modules/eventemitter3/index.d.ts:79
removeListener ▸ removeListener <T
>(event
, fn?
, context?
, once?
): EventSystem
Remove the listeners of a given event.
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
fn?
(...args
: any
[]) => void
context?
any
once?
boolean
Returns EventSystem
Inherited from EE.removeListener
Defined in node_modules/eventemitter3/index.d.ts:63
tapEmit ▸ tapEmit (transform
, eventName
): boolean
发送点击事件到正确的节点
Parameters Returns boolean
Defined in src/core/system/EventSystem.ts:59
',212),n=[d];function l(i,s,h,c,m,f){return a(),t("div",null,n)}const p=e(o,[["render",l]]);export{y as __pageData,p as default};
diff --git a/assets/dist_classes_EventSystem.md.150c3d8a.lean.js b/assets/dist_classes_EventSystem.md.7637e0c0.lean.js
similarity index 100%
rename from assets/dist_classes_EventSystem.md.150c3d8a.lean.js
rename to assets/dist_classes_EventSystem.md.7637e0c0.lean.js
diff --git a/assets/dist_classes_Graphics.md.b2adac68.js b/assets/dist_classes_Graphics.md.7a8aab04.js
similarity index 96%
rename from assets/dist_classes_Graphics.md.b2adac68.js
rename to assets/dist_classes_Graphics.md.7a8aab04.js
index 80f7720..79eb3b0 100644
--- a/assets/dist_classes_Graphics.md.b2adac68.js
+++ b/assets/dist_classes_Graphics.md.7a8aab04.js
@@ -55,4 +55,4 @@ import{_ as e,c as a,o as t,N as s}from"./chunks/framework.2075e729.js";const f=
g . fill ( ' #000000 ' ) ;
Hierarchy Table of contents Constructors Properties Methods Constructors constructor • new Graphics ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from DisplayObjects .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from DisplayObjects .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from DisplayObjects .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from DisplayObjects .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from DisplayObjects .node
Defined in src/core/component/Component.ts:22
redraw • redraw : boolean
= true
是否需要重绘
Defined in src/core/component/Graphics.ts:78
tasks • tasks : any
[] = []
记录要执行的操作记录
Defined in src/core/component/Graphics.ts:73
texture • Optional
texture : Texture
<TextureResource
>
图片纹理,储存图片的相关信息
Defined in src/core/component/Graphics.ts:69
Methods arc ▸ arc (x
, y
, radians
, startAngle
, endAngle
): void
绘制圆弧
Parameters Name Type Description x
number
圆心位置x坐标 y
number
圆心位置y坐标 radians
number
半径 startAngle
number
圆弧起始位置 endAngle
number
圆弧结束位置
Returns void
Defined in src/core/component/Graphics.ts:193
begin ▸ begin (): void
开启新的绘制
Returns void
Defined in src/core/component/Graphics.ts:111
clear ▸ clear (): void
清空画布(清空操作指令历史)
Returns void
Defined in src/core/component/Graphics.ts:105
closePath ▸ closePath (): void
闭合路径,会将起始点与结束点用直线连接
Returns void
Defined in src/core/component/Graphics.ts:118
destroy ▸ destroy (): void
消毁
Returns void
Inherited from DisplayObjects .destroy
Defined in src/core/component/Component.ts:55
drawCircle ▸ drawCircle (x
, y
, radians
): void
绘制一个圆
Parameters Name Type Description x
number
圆心位置x坐标 y
number
圆心位置y坐标 radians
number
半径
Returns void
Defined in src/core/component/Graphics.ts:203
drawEllipse ▸ drawEllipse (x
, y
, radiusX
, radiusY
): void
绘制一个椭圆
Parameters Name Type Description x
number
椭圆圆心的 x 轴坐标。 y
number
- radiusX
number
椭圆长轴的半径。 radiusY
number
椭圆短轴的半径。
Returns void
Defined in src/core/component/Graphics.ts:229
drawPolygon ▸ drawPolygon (points
): void
绘制一个多边形
Parameters Name Type Description points
number
[]多边形每个点的坐标([x1, y2, x2, y2, x3, y3, ...])
Returns void
Defined in src/core/component/Graphics.ts:237
drawRect ▸ drawRect (x
, y
, width
, height
, radius?
): void
绘制一个矩形,可带圆角
Parameters Name Type Default value Description x
number
undefined
起始位置x坐标 y
number
undefined
起始位置y坐标 width
number
undefined
宽 height
number
undefined
高 radius
number
0
圆角大小
Returns void
Defined in src/core/component/Graphics.ts:162
ellipse ▸ ellipse (x
, y
, radiusX
, radiusY
, rotation
, startAngle
, endAngle
, anticlockwise?
): void
绘制一个椭圆
Parameters Name Type Default value Description x
number
undefined
椭圆圆心的 x 轴坐标。 y
number
undefined
- radiusX
number
undefined
椭圆长轴的半径。 radiusY
number
undefined
椭圆短轴的半径。 rotation
number
undefined
椭圆的旋转角度,以弧度表示 (非角度度数)。 startAngle
number
undefined
将要绘制的起始点角度,从 x 轴测量,以弧度表示 (非角度度数)。 endAngle
number
undefined
椭圆将要绘制的结束点角度,以弧度表示 (非角度度数)。 anticlockwise
boolean
false
Boolean 选项,如果为 true,逆时针方向绘制椭圆(逆时针),反之顺时针方向绘制。
Returns void
Defined in src/core/component/Graphics.ts:218
fill ▸ fill (color
): void
填充颜色
Parameters Name Type Description color
string
颜色
Returns void
Defined in src/core/component/Graphics.ts:126
lineTo ▸ lineTo (x
, y
): void
绘制一条直线到某点
Parameters Name Type Description x
number
x坐标 y
number
y坐标
Returns void
Defined in src/core/component/Graphics.ts:150
moveTo ▸ moveTo (x
, y
): void
移动起始点
Parameters Returns void
Defined in src/core/component/Graphics.ts:141
onDestroy ▸ onDestroy (): void
组件被销毁时触发
Returns void
Overrides DisplayObjects .onDestroy
Defined in src/core/component/Graphics.ts:260
pushTask ▸ pushTask (name
, ...args
): void
新增一条绘制指令
Parameters Name Type Description name
string
指令名 ...args
(string
| number
)[] 指令参数
Returns void
Defined in src/core/component/Graphics.ts:94
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides DisplayObjects .start
Defined in src/core/component/Graphics.ts:80
stroke ▸ stroke (color
, width?
): void
设置边框或线条
Parameters Name Type Default value Description color
string
undefined
颜色 width
number
1
-
Returns void
Defined in src/core/component/Graphics.ts:133
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from DisplayObjects .update
Defined in src/core/component/Component.ts:50
`,247),l=[o];function r(p,c,d,i,h,y){return t(),a("div",null,l)}const C=e(n,[["render",r]]);export{f as __pageData,C as default};
+Inherited from DisplayObjects .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from DisplayObjects .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from DisplayObjects .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from DisplayObjects .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from DisplayObjects .node
Defined in src/core/component/Component.ts:22
redraw • redraw : boolean
= true
是否需要重绘
Defined in src/core/component/Graphics.ts:78
tasks • tasks : any
[] = []
记录要执行的操作记录
Defined in src/core/component/Graphics.ts:73
texture • Optional
texture : Texture
<TextureResource
>
图片纹理,储存图片的相关信息
Defined in src/core/component/Graphics.ts:69
Methods arc ▸ arc (x
, y
, radians
, startAngle
, endAngle
): void
绘制圆弧
Parameters Name Type Description x
number
圆心位置x坐标 y
number
圆心位置y坐标 radians
number
半径 startAngle
number
圆弧起始位置 endAngle
number
圆弧结束位置
Returns void
Defined in src/core/component/Graphics.ts:193
begin ▸ begin (): void
开启新的绘制
Returns void
Defined in src/core/component/Graphics.ts:111
clear ▸ clear (): void
清空画布(清空操作指令历史)
Returns void
Defined in src/core/component/Graphics.ts:105
closePath ▸ closePath (): void
闭合路径,会将起始点与结束点用直线连接
Returns void
Defined in src/core/component/Graphics.ts:118
destroy ▸ destroy (): void
消毁
Returns void
Inherited from DisplayObjects .destroy
Defined in src/core/component/Component.ts:55
drawCircle ▸ drawCircle (x
, y
, radians
): void
绘制一个圆
Parameters Name Type Description x
number
圆心位置x坐标 y
number
圆心位置y坐标 radians
number
半径
Returns void
Defined in src/core/component/Graphics.ts:203
drawEllipse ▸ drawEllipse (x
, y
, radiusX
, radiusY
): void
绘制一个椭圆
Parameters Name Type Description x
number
椭圆圆心的 x 轴坐标。 y
number
- radiusX
number
椭圆长轴的半径。 radiusY
number
椭圆短轴的半径。
Returns void
Defined in src/core/component/Graphics.ts:229
drawPolygon ▸ drawPolygon (points
): void
绘制一个多边形
Parameters Name Type Description points
number
[]多边形每个点的坐标([x1, y2, x2, y2, x3, y3, ...])
Returns void
Defined in src/core/component/Graphics.ts:237
drawRect ▸ drawRect (x
, y
, width
, height
, radius?
): void
绘制一个矩形,可带圆角
Parameters Name Type Default value Description x
number
undefined
起始位置x坐标 y
number
undefined
起始位置y坐标 width
number
undefined
宽 height
number
undefined
高 radius
number
0
圆角大小
Returns void
Defined in src/core/component/Graphics.ts:162
ellipse ▸ ellipse (x
, y
, radiusX
, radiusY
, rotation
, startAngle
, endAngle
, anticlockwise?
): void
绘制一个椭圆
Parameters Name Type Default value Description x
number
undefined
椭圆圆心的 x 轴坐标。 y
number
undefined
- radiusX
number
undefined
椭圆长轴的半径。 radiusY
number
undefined
椭圆短轴的半径。 rotation
number
undefined
椭圆的旋转角度,以弧度表示 (非角度度数)。 startAngle
number
undefined
将要绘制的起始点角度,从 x 轴测量,以弧度表示 (非角度度数)。 endAngle
number
undefined
椭圆将要绘制的结束点角度,以弧度表示 (非角度度数)。 anticlockwise
boolean
false
Boolean 选项,如果为 true,逆时针方向绘制椭圆(逆时针),反之顺时针方向绘制。
Returns void
Defined in src/core/component/Graphics.ts:218
fill ▸ fill (color
): void
填充颜色
Parameters Name Type Description color
string
颜色
Returns void
Defined in src/core/component/Graphics.ts:126
lineTo ▸ lineTo (x
, y
): void
绘制一条直线到某点
Parameters Name Type Description x
number
x坐标 y
number
y坐标
Returns void
Defined in src/core/component/Graphics.ts:150
moveTo ▸ moveTo (x
, y
): void
移动起始点
Parameters Returns void
Defined in src/core/component/Graphics.ts:141
onDestroy ▸ onDestroy (): void
组件被销毁时触发
Returns void
Overrides DisplayObjects .onDestroy
Defined in src/core/component/Graphics.ts:260
pushTask ▸ pushTask (name
, ...args
): void
新增一条绘制指令
Parameters Name Type Description name
string
指令名 ...args
(string
| number
)[] 指令参数
Returns void
Defined in src/core/component/Graphics.ts:94
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides DisplayObjects .start
Defined in src/core/component/Graphics.ts:80
stroke ▸ stroke (color
, width?
): void
设置边框或线条
Parameters Name Type Default value Description color
string
undefined
颜色 width
number
1
-
Returns void
Defined in src/core/component/Graphics.ts:133
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from DisplayObjects .update
Defined in src/core/component/Component.ts:50
`,247),l=[o];function r(p,c,d,i,h,y){return t(),a("div",null,l)}const C=e(n,[["render",r]]);export{f as __pageData,C as default};
diff --git a/assets/dist_classes_Graphics.md.b2adac68.lean.js b/assets/dist_classes_Graphics.md.7a8aab04.lean.js
similarity index 100%
rename from assets/dist_classes_Graphics.md.b2adac68.lean.js
rename to assets/dist_classes_Graphics.md.7a8aab04.lean.js
diff --git a/assets/dist_classes_GroupLoader.md.a7487e7a.js b/assets/dist_classes_GroupLoader.md.46ee5e1a.js
similarity index 95%
rename from assets/dist_classes_GroupLoader.md.a7487e7a.js
rename to assets/dist_classes_GroupLoader.md.46ee5e1a.js
index 6008ed9..db3be27 100644
--- a/assets/dist_classes_GroupLoader.md.a7487e7a.js
+++ b/assets/dist_classes_GroupLoader.md.46ee5e1a.js
@@ -21,10 +21,10 @@ import{_ as a,c as e,o as s,N as o}from"./chunks/framework.2075e729.js";const y=
loader . add (list) ;
// 开始加载资源
loader . start () ;
-Table of contents Constructors Properties Methods Constructors constructor • new GroupLoader ()
Defined in src/core/resource/GroupLoader.ts:40
Properties count • count : number
= 0
资源总数
Defined in src/core/resource/GroupLoader.ts:59
emitter • emitter : EventEmitter
<ValueOf
<{ COMPLATE
: "complate"
= 'complate'; LOADED
: "loaded"
= 'loaded' }>, any
>
Defined in src/core/resource/GroupLoader.ts:50
index • index : number
= 0
当前处理的位置
Defined in src/core/resource/GroupLoader.ts:67
list • list : LoadResListConfig
= []
Defined in src/core/resource/GroupLoader.ts:39
loaded • loaded : number
= 0
已经加载数量
Defined in src/core/resource/GroupLoader.ts:63
workerCount • workerCount : number
= 1
同时加载最大数量
Defined in src/core/resource/GroupLoader.ts:55
Event ▪ Static
Event : Object
Type declaration Name Type COMPLATE
"complate"
LOADED
"loaded"
Defined in src/core/resource/GroupLoader.ts:43
Methods add ▸ add (list
): void
添加需要加载的资源
ts const list : LoadResListConfig = [
+
Table of contents Constructors Properties Methods Constructors constructor • new GroupLoader ()
Defined in src/core/resource/GroupLoader.ts:40
Properties count • count : number
= 0
资源总数
Defined in src/core/resource/GroupLoader.ts:59
emitter • emitter : EventEmitter
<ValueOf
<{ COMPLATE
: "complate"
= 'complate'; LOADED
: "loaded"
= 'loaded' }>, any
>
Defined in src/core/resource/GroupLoader.ts:50
index • index : number
= 0
当前处理的位置
Defined in src/core/resource/GroupLoader.ts:67
list • list : LoadResListConfig
= []
Defined in src/core/resource/GroupLoader.ts:39
loaded • loaded : number
= 0
已经加载数量
Defined in src/core/resource/GroupLoader.ts:63
workerCount • workerCount : number
= 1
同时加载最大数量
Defined in src/core/resource/GroupLoader.ts:55
Event ▪ Static
Event : Object
Type declaration Name Type COMPLATE
"complate"
LOADED
"loaded"
Defined in src/core/resource/GroupLoader.ts:43
Methods add ▸ add (list
): void
添加需要加载的资源
ts const list : LoadResListConfig = [
// 只设置路径
' ./assets/photo.png ' ,
// 设置路径加别名
[ ' ./assets/bmg.mp3 ' , ' bgm_mp3 ' ]
] ;
-
Parameters Returns void
Defined in src/core/resource/GroupLoader.ts:119
load ▸ load (): void
顺序加载资源
Returns void
Defined in src/core/resource/GroupLoader.ts:73
start ▸ start (): void
启动加载
Returns void
Defined in src/core/resource/GroupLoader.ts:101
`,83),t=[r];function l(p,c,d,i,h,D){return s(),e("div",null,t)}const F=a(n,[["render",l]]);export{y as __pageData,F as default};
+Parameters Returns void
Defined in src/core/resource/GroupLoader.ts:119
load ▸ load (): void
顺序加载资源
Returns void
Defined in src/core/resource/GroupLoader.ts:73
start ▸ start (): void
启动加载
Returns void
Defined in src/core/resource/GroupLoader.ts:101
`,83),t=[r];function l(p,c,d,i,h,D){return s(),e("div",null,t)}const F=a(n,[["render",l]]);export{y as __pageData,F as default};
diff --git a/assets/dist_classes_GroupLoader.md.a7487e7a.lean.js b/assets/dist_classes_GroupLoader.md.46ee5e1a.lean.js
similarity index 100%
rename from assets/dist_classes_GroupLoader.md.a7487e7a.lean.js
rename to assets/dist_classes_GroupLoader.md.46ee5e1a.lean.js
diff --git a/assets/dist_classes_ImageLoader.md.16c5074d.js b/assets/dist_classes_ImageLoader.md.e490f75c.js
similarity index 98%
rename from assets/dist_classes_ImageLoader.md.16c5074d.js
rename to assets/dist_classes_ImageLoader.md.e490f75c.js
index 332db8d..8bbe2ae 100644
--- a/assets/dist_classes_ImageLoader.md.16c5074d.js
+++ b/assets/dist_classes_ImageLoader.md.e490f75c.js
@@ -1 +1 @@
-import{_ as e,c as a,o as t,N as o}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: ImageLoader","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/ImageLoader.md"}'),r={name:"dist/classes/ImageLoader.md"},s=o('Class: ImageLoader 图片资源加载
Implements Table of contents Constructors Methods Constructors constructor • new ImageLoader ()
Methods load ▸ load (source
): Promise
<HTMLImageElement
>
Parameters Returns Promise
<HTMLImageElement
>
Implementation of ILoader .load
Defined in src/core/resource/loader/ImageLoader.ts:7
',23),l=[s];function d(n,c,i,h,m,u){return t(),a("div",null,l)}const p=e(r,[["render",d]]);export{b as __pageData,p as default};
+import{_ as e,c as a,o as t,N as o}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: ImageLoader","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/ImageLoader.md"}'),r={name:"dist/classes/ImageLoader.md"},s=o('Class: ImageLoader 图片资源加载
Implements Table of contents Constructors Methods Constructors constructor • new ImageLoader ()
Methods load ▸ load (source
): Promise
<HTMLImageElement
>
Parameters Returns Promise
<HTMLImageElement
>
Implementation of ILoader .load
Defined in src/core/resource/loader/ImageLoader.ts:7
',23),l=[s];function d(n,c,i,h,m,u){return t(),a("div",null,l)}const p=e(r,[["render",d]]);export{b as __pageData,p as default};
diff --git a/assets/dist_classes_ImageLoader.md.16c5074d.lean.js b/assets/dist_classes_ImageLoader.md.e490f75c.lean.js
similarity index 100%
rename from assets/dist_classes_ImageLoader.md.16c5074d.lean.js
rename to assets/dist_classes_ImageLoader.md.e490f75c.lean.js
diff --git a/assets/dist_classes_JsonLoader.md.8981eea2.js b/assets/dist_classes_JsonLoader.md.6c41e51f.js
similarity index 98%
rename from assets/dist_classes_JsonLoader.md.8981eea2.js
rename to assets/dist_classes_JsonLoader.md.6c41e51f.js
index a174215..4b36996 100644
--- a/assets/dist_classes_JsonLoader.md.8981eea2.js
+++ b/assets/dist_classes_JsonLoader.md.6c41e51f.js
@@ -1 +1 @@
-import{_ as e,c as a,o as t,N as o}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: JsonLoader","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/JsonLoader.md"}'),r={name:"dist/classes/JsonLoader.md"},s=o('Class: JsonLoader 音频资源加载
Implements Table of contents Constructors Methods Constructors constructor • new JsonLoader ()
Methods load ▸ load (source
): Promise
<XMLHttpRequest
>
Parameters Returns Promise
<XMLHttpRequest
>
Implementation of ILoader .load
Defined in src/core/resource/loader/JsonLoader.ts:8
',23),n=[s];function l(d,c,h,i,u,m){return t(),a("div",null,n)}const p=e(r,[["render",l]]);export{b as __pageData,p as default};
+import{_ as e,c as a,o as t,N as o}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: JsonLoader","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/JsonLoader.md"}'),r={name:"dist/classes/JsonLoader.md"},s=o('Class: JsonLoader 音频资源加载
Implements Table of contents Constructors Methods Constructors constructor • new JsonLoader ()
Methods load ▸ load (source
): Promise
<XMLHttpRequest
>
Parameters Returns Promise
<XMLHttpRequest
>
Implementation of ILoader .load
Defined in src/core/resource/loader/JsonLoader.ts:8
',23),n=[s];function l(d,c,h,i,u,m){return t(),a("div",null,n)}const p=e(r,[["render",l]]);export{b as __pageData,p as default};
diff --git a/assets/dist_classes_JsonLoader.md.8981eea2.lean.js b/assets/dist_classes_JsonLoader.md.6c41e51f.lean.js
similarity index 100%
rename from assets/dist_classes_JsonLoader.md.8981eea2.lean.js
rename to assets/dist_classes_JsonLoader.md.6c41e51f.lean.js
diff --git a/assets/dist_classes_Layout.md.4eb31c1b.js b/assets/dist_classes_Layout.md.e2a24af6.js
similarity index 94%
rename from assets/dist_classes_Layout.md.4eb31c1b.js
rename to assets/dist_classes_Layout.md.e2a24af6.js
index a6dba8b..4cd881b 100644
--- a/assets/dist_classes_Layout.md.4eb31c1b.js
+++ b/assets/dist_classes_Layout.md.e2a24af6.js
@@ -1,4 +1,4 @@
-import{_ as e,c as a,o as t,N as o}from"./chunks/framework.2075e729.js";const f=JSON.parse('{"title":"Class: Layout","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Layout.md"}'),n={name:"dist/classes/Layout.md"},r=o(`Class: Layout 控制布局 当添加了控制布局组件后,原本的position、size和scale可能会被自动管控手动设置将不会生效
ts // 创建节点
+import{_ as e,c as a,o as t,N as o}from"./chunks/framework.2075e729.js";const m=JSON.parse('{"title":"Class: Layout","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Layout.md"}'),n={name:"dist/classes/Layout.md"},r=o(`Class: Layout 控制布局 当添加了控制布局组件后,原本的position、size和scale可能会被自动管控手动设置将不会生效
ts // 创建节点
const node = new Transform () ;
// 添加布局组件
const layout = node . addComponent (Layout) ;
@@ -11,14 +11,14 @@ import{_ as e,c as a,o as t,N as o}from"./chunks/framework.2075e729.js";const f=
parent . addChild (node) ;
Hierarchy Table of contents Constructors Properties Accessors Methods Constructors constructor • new Layout ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties _markResize • _markResize : boolean
= false
Defined in src/core/component/Layout.ts:157
emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
Accessors bottom • get
bottom (): number
相对底部的距离
Returns number
Defined in src/core/component/Layout.ts:67
• set
bottom (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:70
horizontal • get
horizontal (): number
垂直居中 top 和 bottom 将失效 注意:如果要让节点真正实现垂直居中需要设置节点的anchor
ts const node = new Transform () ;
+
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties _markResize • _markResize : boolean
= false
Defined in src/core/component/Layout.ts:157
emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
Accessors bottom • get
bottom (): number
相对底部的距离
Returns number
Defined in src/core/component/Layout.ts:67
• set
bottom (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:70
horizontal • get
horizontal (): number
垂直居中 top 和 bottom 将失效 注意:如果要让节点真正实现垂直居中需要设置节点的anchor
ts const node = new Transform () ;
node . anchor . y = 0.5 ;
node . addComponent (Layout) ;
-
Returns number
Defined in src/core/component/Layout.ts:109
• set
horizontal (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:112
left • get
left (): number
相对左边的距离
Returns number
Defined in src/core/component/Layout.ts:31
• set
left (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:34
right • get
right (): number
相对右边的距离
Returns number
Defined in src/core/component/Layout.ts:55
• set
right (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:58
top • get
top (): number
相对顶部的距离
Returns number
Defined in src/core/component/Layout.ts:43
• set
top (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:46
vertical • get
vertical (): number
水平剧中 left 和 right 将失效 注意:如果要让节点真正实现水平居中需要设置节点的anchor
ts const node = new Transform () ;
+
Returns number
Defined in src/core/component/Layout.ts:109
• set
horizontal (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:112
left • get
left (): number
相对左边的距离
Returns number
Defined in src/core/component/Layout.ts:31
• set
left (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:34
right • get
right (): number
相对右边的距离
Returns number
Defined in src/core/component/Layout.ts:55
• set
right (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:58
top • get
top (): number
相对顶部的距离
Returns number
Defined in src/core/component/Layout.ts:43
• set
top (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:46
vertical • get
vertical (): number
水平剧中 left 和 right 将失效 注意:如果要让节点真正实现水平居中需要设置节点的anchor
ts const node = new Transform () ;
node . anchor . x = 0.5 ;
node . addComponent (Layout) ;
-
Returns number
Defined in src/core/component/Layout.ts:87
• set
vertical (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:90
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
getOffsetLocation ▸ getOffsetLocation (): Vector2
获取本地偏移
Returns Vector2
Defined in src/core/component/Layout.ts:149
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
resize ▸ resize (): void
重新计算布局/矫正布局
ts const node = new Transform () ;
+
Returns number
Defined in src/core/component/Layout.ts:87
• set
vertical (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:90
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
getOffsetLocation ▸ getOffsetLocation (): Vector2
获取本地偏移
Returns Vector2
Defined in src/core/component/Layout.ts:149
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
resize ▸ resize (): void
重新计算布局/矫正布局
ts const node = new Transform () ;
const layout = node . addComponent (Layout) ;
node . anchor . set ( 0.5 , 0.5 ) ;
layout . resize () ;
-
Returns void
Defined in src/core/component/Layout.ts:168
saveNewSize ▸ saveNewSize (): void
当挂载节点尺寸发生变化,且需要重新动态计算时调用 将保存当前组件的位置和大小状态
Returns void
Defined in src/core/component/Layout.ts:138
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Component .start
Defined in src/core/component/Layout.ts:121
update ▸ update (): void
每帧调用
Returns void
Overrides Component .update
Defined in src/core/component/Layout.ts:153
`,217),s=[r];function l(i,c,d,h,p,u){return t(),a("div",null,s)}const b=e(n,[["render",l]]);export{f as __pageData,b as default};
+
Returns void
Defined in src/core/component/Layout.ts:168
saveNewSize ▸ saveNewSize (): void
当挂载节点尺寸发生变化,且需要重新动态计算时调用 将保存当前组件的位置和大小状态
Returns void
Defined in src/core/component/Layout.ts:138
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Component .start
Defined in src/core/component/Layout.ts:121
update ▸ update (): void
每帧调用
Returns void
Overrides Component .update
Defined in src/core/component/Layout.ts:153
`,217),s=[r];function l(i,c,d,h,p,u){return t(),a("div",null,s)}const b=e(n,[["render",l]]);export{m as __pageData,b as default};
diff --git a/assets/dist_classes_Layout.md.4eb31c1b.lean.js b/assets/dist_classes_Layout.md.e2a24af6.lean.js
similarity index 68%
rename from assets/dist_classes_Layout.md.4eb31c1b.lean.js
rename to assets/dist_classes_Layout.md.e2a24af6.lean.js
index 412413a..7c36cea 100644
--- a/assets/dist_classes_Layout.md.4eb31c1b.lean.js
+++ b/assets/dist_classes_Layout.md.e2a24af6.lean.js
@@ -1 +1 @@
-import{_ as e,c as a,o as t,N as o}from"./chunks/framework.2075e729.js";const f=JSON.parse('{"title":"Class: Layout","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Layout.md"}'),n={name:"dist/classes/Layout.md"},r=o("",217),s=[r];function l(i,c,d,h,p,u){return t(),a("div",null,s)}const b=e(n,[["render",l]]);export{f as __pageData,b as default};
+import{_ as e,c as a,o as t,N as o}from"./chunks/framework.2075e729.js";const m=JSON.parse('{"title":"Class: Layout","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Layout.md"}'),n={name:"dist/classes/Layout.md"},r=o("",217),s=[r];function l(i,c,d,h,p,u){return t(),a("div",null,s)}const b=e(n,[["render",l]]);export{m as __pageData,b as default};
diff --git a/assets/dist_classes_Mask.md.11e928b3.js b/assets/dist_classes_Mask.md.77929db2.js
similarity index 94%
rename from assets/dist_classes_Mask.md.11e928b3.js
rename to assets/dist_classes_Mask.md.77929db2.js
index 4fc5ded..c381071 100644
--- a/assets/dist_classes_Mask.md.11e928b3.js
+++ b/assets/dist_classes_Mask.md.77929db2.js
@@ -7,4 +7,4 @@ import{_ as e,c as a,o,N as t}from"./chunks/framework.2075e729.js";const u=JSON.
parent . addChild (node) ;
Hierarchy Table of contents Constructors Properties Methods Constructors constructor • new Mask ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
renew • renew : boolean
= true
是否需要重绘
Defined in src/core/component/Mask.ts:24
texture • Optional
texture : Texture
<TextureResource
>
最终效果的纹理,这样设计不影响原节点和蒙版节点
Defined in src/core/component/Mask.ts:32
value • Optional
value : Transform
<Container
>
遮罩蒙版
Defined in src/core/component/Mask.ts:28
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Component .start
Defined in src/core/component/Mask.ts:34
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Component .update
Defined in src/core/component/Component.ts:50
`,113),s=[r];function l(i,d,h,c,p,m){return o(),a("div",null,s)}const b=e(n,[["render",l]]);export{u as __pageData,b as default};
+Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
renew • renew : boolean
= true
是否需要重绘
Defined in src/core/component/Mask.ts:24
texture • Optional
texture : Texture
<TextureResource
>
最终效果的纹理,这样设计不影响原节点和蒙版节点
Defined in src/core/component/Mask.ts:32
value • Optional
value : Transform
<Container
>
遮罩蒙版
Defined in src/core/component/Mask.ts:28
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Component .start
Defined in src/core/component/Mask.ts:34
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Component .update
Defined in src/core/component/Component.ts:50
`,113),s=[r];function l(i,h,d,c,p,m){return o(),a("div",null,s)}const b=e(n,[["render",l]]);export{u as __pageData,b as default};
diff --git a/assets/dist_classes_Mask.md.11e928b3.lean.js b/assets/dist_classes_Mask.md.77929db2.lean.js
similarity index 82%
rename from assets/dist_classes_Mask.md.11e928b3.lean.js
rename to assets/dist_classes_Mask.md.77929db2.lean.js
index 9627078..5eb491f 100644
--- a/assets/dist_classes_Mask.md.11e928b3.lean.js
+++ b/assets/dist_classes_Mask.md.77929db2.lean.js
@@ -1 +1 @@
-import{_ as e,c as a,o,N as t}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Class: Mask","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Mask.md"}'),n={name:"dist/classes/Mask.md"},r=t("",113),s=[r];function l(i,d,h,c,p,m){return o(),a("div",null,s)}const b=e(n,[["render",l]]);export{u as __pageData,b as default};
+import{_ as e,c as a,o,N as t}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Class: Mask","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Mask.md"}'),n={name:"dist/classes/Mask.md"},r=t("",113),s=[r];function l(i,h,d,c,p,m){return o(),a("div",null,s)}const b=e(n,[["render",l]]);export{u as __pageData,b as default};
diff --git a/assets/dist_classes_Matrix.md.21adf016.js b/assets/dist_classes_Matrix.md.e56098d0.js
similarity index 91%
rename from assets/dist_classes_Matrix.md.21adf016.js
rename to assets/dist_classes_Matrix.md.e56098d0.js
index ad92b79..d9dbfc5 100644
--- a/assets/dist_classes_Matrix.md.21adf016.js
+++ b/assets/dist_classes_Matrix.md.e56098d0.js
@@ -1 +1 @@
-import{_ as e,c as a,o as t,N as r}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Class: Matrix","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Matrix.md"}'),o={name:"dist/classes/Matrix.md"},n=r('Class: Matrix transform矩阵计算
Table of contents Constructors Properties Methods Constructors constructor • new Matrix ()
Properties angle • angle : number
= 0
旋转角度
Defined in src/core/math/Matrix.ts:61
offset • offset : Vector2
锚点
Defined in src/core/math/Matrix.ts:36
scale • scale : Vector2
缩放
Defined in src/core/math/Matrix.ts:41
size • size : Vector2
大小,可用于计算锚点
Defined in src/core/math/Matrix.ts:31
skewX • skewX : number
= 0
倾斜,未实现
Defined in src/core/math/Matrix.ts:50
skewY • skewY : number
= 0
Defined in src/core/math/Matrix.ts:51
translate • translate : Vector2
位置,移动
Defined in src/core/math/Matrix.ts:56
value • value : [number
, number
, number
, number
, number
, number
, number
, number
, number
]
Defined in src/core/math/Matrix.ts:22
Methods append ▸ append (matrix
): Matrix
Parameters Returns Matrix
Defined in src/core/math/Matrix.ts:113
clone ▸ clone (): Matrix
克隆当前矩阵
Returns Matrix
Defined in src/core/math/Matrix.ts:172
get ▸ get (): [number
, number
, number
, number
, number
, number
, number
, number
, number
]
获取矩阵数据
Returns [number
, number
, number
, number
, number
, number
, number
, number
, number
]
Defined in src/core/math/Matrix.ts:182
prepend ▸ prepend (matrix
): Matrix
Parameters Returns Matrix
Defined in src/core/math/Matrix.ts:130
rotate ▸ rotate (angle
): Matrix
旋转
Parameters Returns Matrix
Defined in src/core/math/Matrix.ts:188
set ▸ set (...args
): void
设置矩阵数据
Parameters Name Type ...args
[number
, number
, number
, number
, number
, number
, number
, number
, number
]
Returns void
Defined in src/core/math/Matrix.ts:109
▸ setTransform (transform
): Matrix
设置节点信息
Parameters Returns Matrix
Defined in src/core/math/Matrix.ts:67
',122),i=[n];function d(h,l,s,c,b,f){return t(),a("div",null,i)}const x=e(o,[["render",d]]);export{u as __pageData,x as default};
+import{_ as e,c as a,o as t,N as r}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Class: Matrix","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Matrix.md"}'),o={name:"dist/classes/Matrix.md"},n=r('Class: Matrix transform矩阵计算
Table of contents Constructors Properties Methods Constructors constructor • new Matrix ()
Properties angle • angle : number
= 0
旋转角度
Defined in src/core/math/Matrix.ts:61
offset • offset : Vector2
锚点
Defined in src/core/math/Matrix.ts:36
scale • scale : Vector2
缩放
Defined in src/core/math/Matrix.ts:41
size • size : Vector2
大小,可用于计算锚点
Defined in src/core/math/Matrix.ts:31
skewX • skewX : number
= 0
倾斜,未实现
Defined in src/core/math/Matrix.ts:50
skewY • skewY : number
= 0
Defined in src/core/math/Matrix.ts:51
translate • translate : Vector2
位置,移动
Defined in src/core/math/Matrix.ts:56
value • value : [number
, number
, number
, number
, number
, number
, number
, number
, number
]
Defined in src/core/math/Matrix.ts:22
Methods append ▸ append (matrix
): Matrix
Parameters Returns Matrix
Defined in src/core/math/Matrix.ts:113
clone ▸ clone (): Matrix
克隆当前矩阵
Returns Matrix
Defined in src/core/math/Matrix.ts:172
get ▸ get (): [number
, number
, number
, number
, number
, number
, number
, number
, number
]
获取矩阵数据
Returns [number
, number
, number
, number
, number
, number
, number
, number
, number
]
Defined in src/core/math/Matrix.ts:182
prepend ▸ prepend (matrix
): Matrix
Parameters Returns Matrix
Defined in src/core/math/Matrix.ts:130
rotate ▸ rotate (angle
): Matrix
旋转
Parameters Returns Matrix
Defined in src/core/math/Matrix.ts:188
set ▸ set (...args
): void
设置矩阵数据
Parameters Name Type ...args
[number
, number
, number
, number
, number
, number
, number
, number
, number
]
Returns void
Defined in src/core/math/Matrix.ts:109
▸ setTransform (transform
): Matrix
设置节点信息
Parameters Returns Matrix
Defined in src/core/math/Matrix.ts:67
',122),i=[n];function h(d,l,s,c,f,b){return t(),a("div",null,i)}const x=e(o,[["render",h]]);export{u as __pageData,x as default};
diff --git a/assets/dist_classes_Matrix.md.21adf016.lean.js b/assets/dist_classes_Matrix.md.e56098d0.lean.js
similarity index 68%
rename from assets/dist_classes_Matrix.md.21adf016.lean.js
rename to assets/dist_classes_Matrix.md.e56098d0.lean.js
index 642d9e5..3985e26 100644
--- a/assets/dist_classes_Matrix.md.21adf016.lean.js
+++ b/assets/dist_classes_Matrix.md.e56098d0.lean.js
@@ -1 +1 @@
-import{_ as e,c as a,o as t,N as r}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Class: Matrix","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Matrix.md"}'),o={name:"dist/classes/Matrix.md"},n=r("",122),i=[n];function d(h,l,s,c,b,f){return t(),a("div",null,i)}const x=e(o,[["render",d]]);export{u as __pageData,x as default};
+import{_ as e,c as a,o as t,N as r}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Class: Matrix","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Matrix.md"}'),o={name:"dist/classes/Matrix.md"},n=r("",122),i=[n];function h(d,l,s,c,f,b){return t(),a("div",null,i)}const x=e(o,[["render",h]]);export{u as __pageData,x as default};
diff --git a/assets/dist_classes_NinePanel.md.46e4e441.js b/assets/dist_classes_NinePanel.md.fa2dc8ee.js
similarity index 93%
rename from assets/dist_classes_NinePanel.md.46e4e441.js
rename to assets/dist_classes_NinePanel.md.fa2dc8ee.js
index 96ccb6b..3fa683d 100644
--- a/assets/dist_classes_NinePanel.md.46e4e441.js
+++ b/assets/dist_classes_NinePanel.md.fa2dc8ee.js
@@ -1,4 +1,4 @@
-import{_ as e,c as a,o as n,N as t}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: NinePanel","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/NinePanel.md"}'),o={name:"dist/classes/NinePanel.md"},r=t(`Class: NinePanel 九宫格绘制 将原图拆分9部分
ts // 创建一个图片节点
+import{_ as e,c as a,o as n,N as t}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Class: NinePanel","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/NinePanel.md"}'),o={name:"dist/classes/NinePanel.md"},r=t(`Class: NinePanel 九宫格绘制 将原图拆分9部分
ts // 创建一个图片节点
const node = new Transform (Sprite) ;
// 获取图片组件
const sprite = node . getComponent (Sprite) ;
@@ -19,4 +19,4 @@ import{_ as e,c as a,o as n,N as t}from"./chunks/framework.2075e729.js";const b=
} ) ;
Hierarchy Table of contents Constructors Properties Accessors Methods Constructors constructor • new NinePanel ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
redraw • redraw : boolean
= false
Defined in src/core/component/NinePanel.ts:84
texture • Optional
texture : Texture
<TextureResource
>
Defined in src/core/component/NinePanel.ts:68
Accessors bottom • get
bottom (): number
Returns number
Defined in src/core/component/NinePanel.ts:60
• set
bottom (val
): void
Parameters Returns void
Defined in src/core/component/NinePanel.ts:63
left • get
left (): number
Returns number
Defined in src/core/component/NinePanel.ts:33
• set
left (val
): void
Parameters Returns void
Defined in src/core/component/NinePanel.ts:36
right • get
right (): number
Returns number
Defined in src/core/component/NinePanel.ts:51
• set
right (val
): void
Parameters Returns void
Defined in src/core/component/NinePanel.ts:54
top • get
top (): number
Returns number
Defined in src/core/component/NinePanel.ts:42
• set
top (val
): void
Parameters Returns void
Defined in src/core/component/NinePanel.ts:45
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Component .start
Defined in src/core/component/NinePanel.ts:70
toRedraw ▸ toRedraw (): void
重新生成
Returns void
Defined in src/core/component/NinePanel.ts:81
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Component .update
Defined in src/core/component/Component.ts:50
`,171),s=[r];function l(i,c,d,p,h,m){return n(),a("div",null,s)}const u=e(o,[["render",l]]);export{b as __pageData,u as default};
+
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
redraw • redraw : boolean
= false
Defined in src/core/component/NinePanel.ts:84
texture • Optional
texture : Texture
<TextureResource
>
Defined in src/core/component/NinePanel.ts:68
Accessors bottom • get
bottom (): number
Returns number
Defined in src/core/component/NinePanel.ts:60
• set
bottom (val
): void
Parameters Returns void
Defined in src/core/component/NinePanel.ts:63
left • get
left (): number
Returns number
Defined in src/core/component/NinePanel.ts:33
• set
left (val
): void
Parameters Returns void
Defined in src/core/component/NinePanel.ts:36
right • get
right (): number
Returns number
Defined in src/core/component/NinePanel.ts:51
• set
right (val
): void
Parameters Returns void
Defined in src/core/component/NinePanel.ts:54
top • get
top (): number
Returns number
Defined in src/core/component/NinePanel.ts:42
• set
top (val
): void
Parameters Returns void
Defined in src/core/component/NinePanel.ts:45
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Component .start
Defined in src/core/component/NinePanel.ts:70
toRedraw ▸ toRedraw (): void
重新生成
Returns void
Defined in src/core/component/NinePanel.ts:81
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Component .update
Defined in src/core/component/Component.ts:50
`,171),s=[r];function l(i,c,p,d,h,m){return n(),a("div",null,s)}const b=e(o,[["render",l]]);export{u as __pageData,b as default};
diff --git a/assets/dist_classes_NinePanel.md.46e4e441.lean.js b/assets/dist_classes_NinePanel.md.fa2dc8ee.lean.js
similarity index 50%
rename from assets/dist_classes_NinePanel.md.46e4e441.lean.js
rename to assets/dist_classes_NinePanel.md.fa2dc8ee.lean.js
index 3175b64..ed80412 100644
--- a/assets/dist_classes_NinePanel.md.46e4e441.lean.js
+++ b/assets/dist_classes_NinePanel.md.fa2dc8ee.lean.js
@@ -1 +1 @@
-import{_ as e,c as a,o as n,N as t}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: NinePanel","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/NinePanel.md"}'),o={name:"dist/classes/NinePanel.md"},r=t("",171),s=[r];function l(i,c,d,p,h,m){return n(),a("div",null,s)}const u=e(o,[["render",l]]);export{b as __pageData,u as default};
+import{_ as e,c as a,o as n,N as t}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Class: NinePanel","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/NinePanel.md"}'),o={name:"dist/classes/NinePanel.md"},r=t("",171),s=[r];function l(i,c,p,d,h,m){return n(),a("div",null,s)}const b=e(o,[["render",l]]);export{u as __pageData,b as default};
diff --git a/assets/dist_classes_Node.md.75f3c3a3.js b/assets/dist_classes_Node.md.1f25b01e.js
similarity index 53%
rename from assets/dist_classes_Node.md.75f3c3a3.js
rename to assets/dist_classes_Node.md.1f25b01e.js
index 2346e9f..1f8c0ed 100644
--- a/assets/dist_classes_Node.md.75f3c3a3.js
+++ b/assets/dist_classes_Node.md.1f25b01e.js
@@ -1,5 +1,5 @@
import{_ as e,c as a,o as r,N as t}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Node","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Node.md"}'),o={name:"dist/classes/Node.md"},n=t(`Class: Node<T> 节点,用于构建整个项目的节点树,也是所有组件挂载的节点
ts const node = new Transform () ;
-
Type parameters Hierarchy Table of contents Constructors Properties Accessors Methods Constructors constructor • new Node <T
>(classConstructor?
)
Type parameters Parameters Overrides Transform .constructor
Defined in src/core/transform/Node.ts:9
Properties _anchor • _anchor : Vector2
Inherited from Transform ._anchor
Defined in src/core/transform/Transform.ts:165
_rotation • _rotation : number
= 0
Inherited from Transform ._rotation
Defined in src/core/transform/Transform.ts:154
active • active : boolean
= true
Inherited from Transform .active
Defined in src/core/transform/Transform.ts:27
alone • alone : boolean
= false
Inherited from Transform .alone
Defined in src/core/transform/Transform.ts:24
alpha • alpha : number
= 1
透明度
Inherited from Transform .alpha
Defined in src/core/transform/Transform.ts:227
children • children : Transform
<Container
>[] = []
子节点
Inherited from Transform .children
Defined in src/core/transform/Transform.ts:303
components • components : Component
[] = []
所有组件 默认包含一个容器组件,当添加了其他容器组件后自动替换,只能包含一个视觉组件
Inherited from Transform .components
Defined in src/core/transform/Transform.ts:196
container • container : T
Inherited from Transform .container
Defined in src/core/transform/Transform.ts:191
deliver • deliver : boolean
= true
是否继续向父元素传递事件(冒泡)
Inherited from Transform .deliver
Defined in src/core/transform/Transform.ts:218
display • Optional
display : T
Defined in src/core/transform/Node.ts:7
emitter • emitter : EventEmitter
<TransformEvent
, any
>
Inherited from Transform .emitter
Defined in src/core/transform/Transform.ts:30
id • id : number
= 0
Inherited from Transform .id
Defined in src/core/transform/Transform.ts:22
name • name : string
= 'node'
Inherited from Transform .name
Defined in src/core/transform/Transform.ts:29
parent • Optional
parent : Transform
<Container
>
父节点
Inherited from Transform .parent
Defined in src/core/transform/Transform.ts:201
pierce • pierce : boolean
= false
是否穿透,可触发非父元素外的其它元素事件
Inherited from Transform .pierce
Defined in src/core/transform/Transform.ts:222
redraw • redraw : boolean
= false
Inherited from Transform .redraw
Defined in src/core/transform/Transform.ts:32
Event ▪ Static
Event : Object
事件
Type declaration Name Type Description ADDED
"ADDED"
当添加到显示舞台时 CHILD_ADDED
"CHILD_ADDED"
当添加新的字节点时 REPOSITION
"REPOSITION"
位置发生变化 RESIZE
"RESIZE"
尺寸发生变化时 TICKER_AFTER
"TICKER_AFTER"
帧刷新后 TICKER_BEFORE
"TICKER_BEFORE"
帧刷新前
Inherited from Transform .Event
Defined in src/core/transform/Transform.ts:36
Accessors anchor • get
anchor (): Vector2
锚点
Returns Vector2
Inherited from Transform.anchor
Defined in src/core/transform/Transform.ts:169
• set
anchor (value
): void
Parameters Returns void
Inherited from Transform.anchor
Defined in src/core/transform/Transform.ts:172
anchorX • get
anchorX (): number
Returns number
Inherited from Transform.anchorX
Defined in src/core/transform/Transform.ts:176
• set
anchorX (val
): void
Parameters Returns void
Inherited from Transform.anchorX
Defined in src/core/transform/Transform.ts:179
anchorY • get
anchorY (): number
Returns number
Inherited from Transform.anchorY
Defined in src/core/transform/Transform.ts:183
• set
anchorY (val
): void
Parameters Returns void
Inherited from Transform.anchorY
Defined in src/core/transform/Transform.ts:186
height • get
height (): number
Returns number
Inherited from Transform.height
Defined in src/core/transform/Transform.ts:120
• set
height (val
): void
Parameters Returns void
Inherited from Transform.height
Defined in src/core/transform/Transform.ts:123
position • get
position (): Vector2
位置
Returns Vector2
Inherited from Transform.position
Defined in src/core/transform/Transform.ts:80
• set
position (value
): void
Parameters Returns void
Inherited from Transform.position
Defined in src/core/transform/Transform.ts:83
rotation • get
rotation (): number
旋转
Returns number
Inherited from Transform.rotation
Defined in src/core/transform/Transform.ts:158
• set
rotation (value
): void
Parameters Returns void
Inherited from Transform.rotation
Defined in src/core/transform/Transform.ts:161
scale • get
scale (): Vector2
缩放
Returns Vector2
Inherited from Transform.scale
Defined in src/core/transform/Transform.ts:133
• set
scale (value
): void
Parameters Returns void
Inherited from Transform.scale
Defined in src/core/transform/Transform.ts:136
scaleX • get
scaleX (): number
Returns number
Inherited from Transform.scaleX
Defined in src/core/transform/Transform.ts:140
• set
scaleX (val
): void
Parameters Returns void
Inherited from Transform.scaleX
Defined in src/core/transform/Transform.ts:143
scaleY • get
scaleY (): number
Returns number
Inherited from Transform.scaleY
Defined in src/core/transform/Transform.ts:147
• set
scaleY (val
): void
Parameters Returns void
Inherited from Transform.scaleY
Defined in src/core/transform/Transform.ts:150
size • get
size (): Vector2
大小
Returns Vector2
Inherited from Transform.size
Defined in src/core/transform/Transform.ts:106
• set
size (value
): void
Parameters Returns void
Inherited from Transform.size
Defined in src/core/transform/Transform.ts:109
touch • get
touch (): boolean
Returns boolean
Inherited from Transform.touch
Defined in src/core/transform/Transform.ts:211
• set
touch (val
): void
触摸事件,默认关闭
Parameters Returns void
Inherited from Transform.touch
Defined in src/core/transform/Transform.ts:207
width • get
width (): number
Returns number
Inherited from Transform.width
Defined in src/core/transform/Transform.ts:114
• set
width (val
): void
Parameters Returns void
Inherited from Transform.width
Defined in src/core/transform/Transform.ts:117
x • get
x (): number
Returns number
Inherited from Transform.x
Defined in src/core/transform/Transform.ts:87
• set
x (val
): void
Parameters Returns void
Inherited from Transform.x
Defined in src/core/transform/Transform.ts:90
y • get
y (): number
Returns number
Inherited from Transform.y
Defined in src/core/transform/Transform.ts:95
• set
y (val
): void
Parameters Returns void
Inherited from Transform.y
Defined in src/core/transform/Transform.ts:98
Methods addChild ▸ addChild <U
>(transform
, props?
): U
插入一个子节点
Type parameters Parameters Name Type Description transform
U
待插入的节点 props?
Props
<U
>-
Returns U
Inherited from Transform .addChild
Defined in src/core/transform/Transform.ts:309
addChildAt ▸ addChildAt (child
, index
): void
在指定位置插入节点
Parameters Returns void
Inherited from Transform .addChildAt
Defined in src/core/transform/Transform.ts:324
addComponent ▸ addComponent <T
>(classConstructor
, props?
): T
添加一个组件
Type parameters Parameters Returns T
Inherited from Transform .addComponent
Defined in src/core/transform/Transform.ts:233
destroy ▸ destroy (): void
消毁
Returns void
Inherited from Transform .destroy
Defined in src/core/transform/Transform.ts:373
find ▸ find (path
): Transform
<Container
>
路径查找节点
Type parameters Hierarchy Table of contents Constructors Properties Accessors Methods Constructors constructor • new Node <T
>(classConstructor?
)
Type parameters Parameters Overrides Transform .constructor
Defined in src/core/transform/Node.ts:9
Properties _anchor • _anchor : Vector2
Inherited from Transform ._anchor
Defined in src/core/transform/Transform.ts:175
_rotation • _rotation : number
= 0
Inherited from Transform ._rotation
Defined in src/core/transform/Transform.ts:164
active • active : boolean
= true
Inherited from Transform .active
Defined in src/core/transform/Transform.ts:27
alone • alone : boolean
= false
Inherited from Transform .alone
Defined in src/core/transform/Transform.ts:24
alpha • alpha : number
= 1
透明度
Inherited from Transform .alpha
Defined in src/core/transform/Transform.ts:237
children • children : Transform
<Container
>[] = []
子节点
Inherited from Transform .children
Defined in src/core/transform/Transform.ts:313
components • components : Component
[] = []
所有组件 默认包含一个容器组件,当添加了其他容器组件后自动替换,只能包含一个视觉组件
Inherited from Transform .components
Defined in src/core/transform/Transform.ts:206
container • container : T
Inherited from Transform .container
Defined in src/core/transform/Transform.ts:201
deliver • deliver : boolean
= true
是否继续向父元素传递事件(冒泡)
Inherited from Transform .deliver
Defined in src/core/transform/Transform.ts:228
display • Optional
display : T
Defined in src/core/transform/Node.ts:7
emitter • emitter : EventEmitter
<TransformEvent
, any
>
Inherited from Transform .emitter
Defined in src/core/transform/Transform.ts:30
id • id : number
= 0
Inherited from Transform .id
Defined in src/core/transform/Transform.ts:22
name • name : string
= 'node'
Inherited from Transform .name
Defined in src/core/transform/Transform.ts:29
parent • Optional
parent : Transform
<Container
>
父节点
Inherited from Transform .parent
Defined in src/core/transform/Transform.ts:211
pierce • pierce : boolean
= false
是否穿透,可触发非父元素外的其它元素事件
Inherited from Transform .pierce
Defined in src/core/transform/Transform.ts:232
redraw • redraw : boolean
= false
Inherited from Transform .redraw
Defined in src/core/transform/Transform.ts:32
Event ▪ Static
Event : Object
事件
Type declaration Name Type Description ADDED
"ADDED"
当添加到显示舞台时 CHANGE_DISPLY
"CHANGE_DISPLY"
可见元素发生变化时(需要渲染的元素) CHILD_ADDED
"CHILD_ADDED"
当添加新的字节点时 REMOVED
"REMOVED"
当被移除于舞台时 REPOSITION
"REPOSITION"
位置发生变化 RESIZE
"RESIZE"
尺寸发生变化时 TICKER_AFTER
"TICKER_AFTER"
帧刷新后 TICKER_BEFORE
"TICKER_BEFORE"
帧刷新前
Inherited from Transform .Event
Defined in src/core/transform/Transform.ts:36
Accessors anchor • get
anchor (): Vector2
锚点
Returns Vector2
Inherited from Transform.anchor
Defined in src/core/transform/Transform.ts:179
• set
anchor (value
): void
Parameters Returns void
Inherited from Transform.anchor
Defined in src/core/transform/Transform.ts:182
anchorX • get
anchorX (): number
Returns number
Inherited from Transform.anchorX
Defined in src/core/transform/Transform.ts:186
• set
anchorX (val
): void
Parameters Returns void
Inherited from Transform.anchorX
Defined in src/core/transform/Transform.ts:189
anchorY • get
anchorY (): number
Returns number
Inherited from Transform.anchorY
Defined in src/core/transform/Transform.ts:193
• set
anchorY (val
): void
Parameters Returns void
Inherited from Transform.anchorY
Defined in src/core/transform/Transform.ts:196
height • get
height (): number
Returns number
Inherited from Transform.height
Defined in src/core/transform/Transform.ts:130
• set
height (val
): void
Parameters Returns void
Inherited from Transform.height
Defined in src/core/transform/Transform.ts:133
position • get
position (): Vector2
位置
Returns Vector2
Inherited from Transform.position
Defined in src/core/transform/Transform.ts:90
• set
position (value
): void
Parameters Returns void
Inherited from Transform.position
Defined in src/core/transform/Transform.ts:93
rotation • get
rotation (): number
旋转
Returns number
Inherited from Transform.rotation
Defined in src/core/transform/Transform.ts:168
• set
rotation (value
): void
Parameters Returns void
Inherited from Transform.rotation
Defined in src/core/transform/Transform.ts:171
scale • get
scale (): Vector2
缩放
Returns Vector2
Inherited from Transform.scale
Defined in src/core/transform/Transform.ts:143
• set
scale (value
): void
Parameters Returns void
Inherited from Transform.scale
Defined in src/core/transform/Transform.ts:146
scaleX • get
scaleX (): number
Returns number
Inherited from Transform.scaleX
Defined in src/core/transform/Transform.ts:150
• set
scaleX (val
): void
Parameters Returns void
Inherited from Transform.scaleX
Defined in src/core/transform/Transform.ts:153
scaleY • get
scaleY (): number
Returns number
Inherited from Transform.scaleY
Defined in src/core/transform/Transform.ts:157
• set
scaleY (val
): void
Parameters Returns void
Inherited from Transform.scaleY
Defined in src/core/transform/Transform.ts:160
size • get
size (): Vector2
大小
Returns Vector2
Inherited from Transform.size
Defined in src/core/transform/Transform.ts:116
• set
size (value
): void
Parameters Returns void
Inherited from Transform.size
Defined in src/core/transform/Transform.ts:119
touch • get
touch (): boolean
Returns boolean
Inherited from Transform.touch
Defined in src/core/transform/Transform.ts:221
• set
touch (val
): void
触摸事件,默认关闭
Parameters Returns void
Inherited from Transform.touch
Defined in src/core/transform/Transform.ts:217
width • get
width (): number
Returns number
Inherited from Transform.width
Defined in src/core/transform/Transform.ts:124
• set
width (val
): void
Parameters Returns void
Inherited from Transform.width
Defined in src/core/transform/Transform.ts:127
x • get
x (): number
Returns number
Inherited from Transform.x
Defined in src/core/transform/Transform.ts:97
• set
x (val
): void
Parameters Returns void
Inherited from Transform.x
Defined in src/core/transform/Transform.ts:100
y • get
y (): number
Returns number
Inherited from Transform.y
Defined in src/core/transform/Transform.ts:105
• set
y (val
): void
Parameters Returns void
Inherited from Transform.y
Defined in src/core/transform/Transform.ts:108
Methods addChild ▸ addChild <U
>(transform
, props?
): U
插入一个子节点
Type parameters Parameters Name Type Description transform
U
待插入的节点 props?
Props
<U
>-
Returns U
Inherited from Transform .addChild
Defined in src/core/transform/Transform.ts:319
addChildAt ▸ addChildAt (child
, index
): void
在指定位置插入节点
Parameters Returns void
Inherited from Transform .addChildAt
Defined in src/core/transform/Transform.ts:334
addComponent ▸ addComponent <T
>(classConstructor
, props?
): T
添加一个组件
Type parameters Parameters Returns T
Inherited from Transform .addComponent
Defined in src/core/transform/Transform.ts:243
destroy ▸ destroy (): void
消毁
Returns void
Inherited from Transform .destroy
Defined in src/core/transform/Transform.ts:383
find ▸ find (path
): Transform
<Container
>
路径查找节点
ts // 创建身体节点
const body = new Transform () ;
// 设置名称
body . name = ' body ' ;
@@ -25,4 +25,4 @@ import{_ as e,c as a,o as r,N as t}from"./chunks/framework.2075e729.js";const b=
body . find ( ' head/lEye ' ) ;
// 从身体获取右眼
body . find ( ' head/rEye ' ) ;
-
Path
Parameters Name Type path
string
| string
[]
Returns Transform
<Container
>
Inherited from Transform .find
Defined in src/core/transform/Transform.ts:412
getComponent ▸ getComponent <T
>(classConstructor
): T
获取单个组件,获取首个匹配到的组件
Type parameters Parameters Returns T
Inherited from Transform .getComponent
Defined in src/core/transform/Transform.ts:258
getComponents ▸ getComponents <T
>(classConstructor
): T
[]
获取所有组件
Type parameters Parameters Returns T
[]
Inherited from Transform .getComponents
Defined in src/core/transform/Transform.ts:266
getComponentsInChildren ▸ getComponentsInChildren <T
>(classConstructor
): T
[]
从子节点获取所有组件,不会包含当前节点 递归查询所有子节点的
Type parameters Parameters Returns T
[]
Inherited from Transform .getComponentsInChildren
Defined in src/core/transform/Transform.ts:282
getOffset ▸ getOffset (): Vector2
获取右上角偏真实移量
Returns Vector2
Inherited from Transform .getOffset
Defined in src/core/transform/Transform.ts:450
getWordPoisition ▸ getWordPoisition (): Vector2
获取相对世界坐标
Returns Vector2
Inherited from Transform .getWordPoisition
Defined in src/core/transform/Transform.ts:457
getWordScale ▸ getWordScale (): Vector2
获取相对于世界的缩放
Returns Vector2
Inherited from Transform .getWordScale
Defined in src/core/transform/Transform.ts:469
onDestroy ▸ Optional
onDestroy (): void
Returns void
Inherited from Transform .onDestroy
Defined in src/core/transform/Transform.ts:379
removeAllComponent ▸ removeAllComponent (): void
移除所有组件
Returns void
Inherited from Transform .removeAllComponent
Defined in src/core/transform/Transform.ts:248
removeChild ▸ removeChild (transform
): void
移除一个节点
Parameters Returns void
Inherited from Transform .removeChild
Defined in src/core/transform/Transform.ts:336
removeChildAt ▸ removeChildAt (index
): Transform
<Container
>
移除一个指定位置的元素
Parameters Name Type Description index
number
要移除节点的位置
Returns Transform
<Container
>
Inherited from Transform .removeChildAt
Defined in src/core/transform/Transform.ts:349
removeChildren ▸ removeChildren (): void
移除所有子元素
Returns void
Inherited from Transform .removeChildren
Defined in src/core/transform/Transform.ts:358
removeComponent ▸ removeComponent (component
): void
移除一个组件
Parameters Returns void
Inherited from Transform .removeComponent
Defined in src/core/transform/Transform.ts:241
select ▸ select (queryString
): any
[]
根据name查找节点
Parameters Name Type queryString
string
| string
[]
Returns any
[]
Inherited from Transform .select
Defined in src/core/transform/Transform.ts:431
start ▸ Optional
start (): any
Returns any
Defined in src/core/transform/Node.ts:15
update ▸ update (time
): void
Parameters Returns void
Inherited from Transform .update
Defined in src/core/transform/Transform.ts:366
`,645),d=[n];function l(s,i,h,c,f,m){return r(),a("div",null,d)}const u=e(o,[["render",l]]);export{b as __pageData,u as default};
+Path
Parameters Name Type path
string
| string
[]
Returns Transform
<Container
>
Inherited from Transform .find
Defined in src/core/transform/Transform.ts:422
getComponent ▸ getComponent <T
>(classConstructor
): T
获取单个组件,获取首个匹配到的组件
Type parameters Parameters Returns T
Inherited from Transform .getComponent
Defined in src/core/transform/Transform.ts:268
getComponents ▸ getComponents <T
>(classConstructor
): T
[]
获取所有组件
Type parameters Parameters Returns T
[]
Inherited from Transform .getComponents
Defined in src/core/transform/Transform.ts:276
getComponentsInChildren ▸ getComponentsInChildren <T
>(classConstructor
): T
[]
从子节点获取所有组件,不会包含当前节点 递归查询所有子节点的
Type parameters Parameters Returns T
[]
Inherited from Transform .getComponentsInChildren
Defined in src/core/transform/Transform.ts:292
getOffset ▸ getOffset (): Vector2
获取右上角偏真实移量
Returns Vector2
Inherited from Transform .getOffset
Defined in src/core/transform/Transform.ts:460
getWordPoisition ▸ getWordPoisition (): Vector2
获取相对世界坐标
Returns Vector2
Inherited from Transform .getWordPoisition
Defined in src/core/transform/Transform.ts:467
getWordScale ▸ getWordScale (): Vector2
获取相对于世界的缩放
Returns Vector2
Inherited from Transform .getWordScale
Defined in src/core/transform/Transform.ts:479
onDestroy ▸ Optional
onDestroy (): void
Returns void
Inherited from Transform .onDestroy
Defined in src/core/transform/Transform.ts:389
removeAllComponent ▸ removeAllComponent (): void
移除所有组件
Returns void
Inherited from Transform .removeAllComponent
Defined in src/core/transform/Transform.ts:258
removeChild ▸ removeChild (transform
): void
移除一个节点
Parameters Returns void
Inherited from Transform .removeChild
Defined in src/core/transform/Transform.ts:346
removeChildAt ▸ removeChildAt (index
): Transform
<Container
>
移除一个指定位置的元素
Parameters Name Type Description index
number
要移除节点的位置
Returns Transform
<Container
>
Inherited from Transform .removeChildAt
Defined in src/core/transform/Transform.ts:359
removeChildren ▸ removeChildren (): void
移除所有子元素
Returns void
Inherited from Transform .removeChildren
Defined in src/core/transform/Transform.ts:368
removeComponent ▸ removeComponent (component
): void
移除一个组件
Parameters Returns void
Inherited from Transform .removeComponent
Defined in src/core/transform/Transform.ts:251
select ▸ select (queryString
): any
[]
根据name查找节点
Parameters Name Type queryString
string
| string
[]
Returns any
[]
Inherited from Transform .select
Defined in src/core/transform/Transform.ts:441
start ▸ Optional
start (): any
Returns any
Defined in src/core/transform/Node.ts:15
update ▸ update (time
): void
Parameters Returns void
Inherited from Transform .update
Defined in src/core/transform/Transform.ts:376
`,645),d=[n];function l(s,i,h,c,f,m){return r(),a("div",null,d)}const u=e(o,[["render",l]]);export{b as __pageData,u as default};
diff --git a/assets/dist_classes_Node.md.75f3c3a3.lean.js b/assets/dist_classes_Node.md.1f25b01e.lean.js
similarity index 100%
rename from assets/dist_classes_Node.md.75f3c3a3.lean.js
rename to assets/dist_classes_Node.md.1f25b01e.lean.js
diff --git a/assets/dist_classes_Rect.md.f616eafd.js b/assets/dist_classes_Rect.md.0f99e03e.js
similarity index 94%
rename from assets/dist_classes_Rect.md.f616eafd.js
rename to assets/dist_classes_Rect.md.0f99e03e.js
index d520ce2..0388e6c 100644
--- a/assets/dist_classes_Rect.md.f616eafd.js
+++ b/assets/dist_classes_Rect.md.0f99e03e.js
@@ -8,4 +8,4 @@ import{_ as e,c as a,o,N as t}from"./chunks/framework.2075e729.js";const u=JSON.
rect . storkeWidth = 3 ;
Hierarchy Table of contents Constructors Properties Methods Constructors constructor • new Rect ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
fill • Optional
fill : string
= '#000000'
填充颜色
Defined in src/core/component/Rect.ts:25
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
radius • radius : number
= 0
圆角大小
Defined in src/core/component/Rect.ts:21
storke • storke : string
= '#FFFFFF'
边框颜色
Defined in src/core/component/Rect.ts:29
storkeWidth • storkeWidth : number
= 0
边框大小
Defined in src/core/component/Rect.ts:33
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ onDestroy (): void
组件被销毁时触发
Returns void
Overrides Component .onDestroy
Defined in src/core/component/Rect.ts:65
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Component .start
Defined in src/core/component/Rect.ts:36
update ▸ update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Overrides Component .update
Defined in src/core/component/Rect.ts:60
`,119),s=[r];function l(i,c,d,p,h,m){return o(),a("div",null,s)}const b=e(n,[["render",l]]);export{u as __pageData,b as default};
+Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
fill • Optional
fill : string
= '#000000'
填充颜色
Defined in src/core/component/Rect.ts:25
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
radius • radius : number
= 0
圆角大小
Defined in src/core/component/Rect.ts:21
storke • storke : string
= '#FFFFFF'
边框颜色
Defined in src/core/component/Rect.ts:29
storkeWidth • storkeWidth : number
= 0
边框大小
Defined in src/core/component/Rect.ts:33
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ onDestroy (): void
组件被销毁时触发
Returns void
Overrides Component .onDestroy
Defined in src/core/component/Rect.ts:65
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Component .start
Defined in src/core/component/Rect.ts:36
update ▸ update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Overrides Component .update
Defined in src/core/component/Rect.ts:60
`,119),s=[r];function l(i,c,p,d,h,m){return o(),a("div",null,s)}const b=e(n,[["render",l]]);export{u as __pageData,b as default};
diff --git a/assets/dist_classes_Rect.md.f616eafd.lean.js b/assets/dist_classes_Rect.md.0f99e03e.lean.js
similarity index 82%
rename from assets/dist_classes_Rect.md.f616eafd.lean.js
rename to assets/dist_classes_Rect.md.0f99e03e.lean.js
index 3b3127d..cbbc731 100644
--- a/assets/dist_classes_Rect.md.f616eafd.lean.js
+++ b/assets/dist_classes_Rect.md.0f99e03e.lean.js
@@ -1 +1 @@
-import{_ as e,c as a,o,N as t}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Class: Rect","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Rect.md"}'),n={name:"dist/classes/Rect.md"},r=t("",119),s=[r];function l(i,c,d,p,h,m){return o(),a("div",null,s)}const b=e(n,[["render",l]]);export{u as __pageData,b as default};
+import{_ as e,c as a,o,N as t}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Class: Rect","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Rect.md"}'),n={name:"dist/classes/Rect.md"},r=t("",119),s=[r];function l(i,c,p,d,h,m){return o(),a("div",null,s)}const b=e(n,[["render",l]]);export{u as __pageData,b as default};
diff --git a/assets/dist_classes_Renderer.md.fac30208.js b/assets/dist_classes_Renderer.md.693910d1.js
similarity index 91%
rename from assets/dist_classes_Renderer.md.fac30208.js
rename to assets/dist_classes_Renderer.md.693910d1.js
index 7b8f20e..0f3a6f3 100644
--- a/assets/dist_classes_Renderer.md.fac30208.js
+++ b/assets/dist_classes_Renderer.md.693910d1.js
@@ -1 +1 @@
-import{_ as e,c as r,o as a,N as t}from"./chunks/framework.2075e729.js";const p=JSON.parse('{"title":"Class: Renderer","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Renderer.md"}'),n={name:"dist/classes/Renderer.md"},o=t('Class: Renderer 渲染器
Table of contents Constructors Properties Methods Constructors constructor • new Renderer (context
, app
)
Parameters Defined in src/core/canvas2d/render/Renderer.ts:32
Properties app • app : Transform
<Container
>
Defined in src/core/canvas2d/render/Renderer.ts:32
context • context : CanvasRenderingContext2D
Defined in src/core/canvas2d/render/Renderer.ts:32
renderActions • renderActions : RenderAction
<any
>[]
Defined in src/core/canvas2d/render/Renderer.ts:26
Methods render ▸ render (): CanvasRenderingContext2D
Returns CanvasRenderingContext2D
Defined in src/core/canvas2d/render/Renderer.ts:35
',38),d=[o];function s(i,c,h,l,f,u){return a(),r("div",null,d)}const m=e(n,[["render",s]]);export{p as __pageData,m as default};
+import{_ as e,c as r,o as a,N as t}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Renderer","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Renderer.md"}'),n={name:"dist/classes/Renderer.md"},o=t('Class: Renderer 渲染器
Table of contents Constructors Properties Methods Constructors constructor • new Renderer (context
, app
)
Parameters Defined in src/core/canvas2d/render/Renderer.ts:32
Properties app • app : Transform
<Container
>
Defined in src/core/canvas2d/render/Renderer.ts:32
context • context : CanvasRenderingContext2D
Defined in src/core/canvas2d/render/Renderer.ts:32
renderActions • renderActions : RenderAction
<any
>[]
Defined in src/core/canvas2d/render/Renderer.ts:26
Methods render ▸ render (): CanvasRenderingContext2D
Returns CanvasRenderingContext2D
Defined in src/core/canvas2d/render/Renderer.ts:35
',38),d=[o];function s(i,c,h,l,f,u){return a(),r("div",null,d)}const m=e(n,[["render",s]]);export{b as __pageData,m as default};
diff --git a/assets/dist_classes_Renderer.md.fac30208.lean.js b/assets/dist_classes_Renderer.md.693910d1.lean.js
similarity index 67%
rename from assets/dist_classes_Renderer.md.fac30208.lean.js
rename to assets/dist_classes_Renderer.md.693910d1.lean.js
index d74b219..cb1ae64 100644
--- a/assets/dist_classes_Renderer.md.fac30208.lean.js
+++ b/assets/dist_classes_Renderer.md.693910d1.lean.js
@@ -1 +1 @@
-import{_ as e,c as r,o as a,N as t}from"./chunks/framework.2075e729.js";const p=JSON.parse('{"title":"Class: Renderer","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Renderer.md"}'),n={name:"dist/classes/Renderer.md"},o=t("",38),d=[o];function s(i,c,h,l,f,u){return a(),r("div",null,d)}const m=e(n,[["render",s]]);export{p as __pageData,m as default};
+import{_ as e,c as r,o as a,N as t}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Renderer","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Renderer.md"}'),n={name:"dist/classes/Renderer.md"},o=t("",38),d=[o];function s(i,c,h,l,f,u){return a(),r("div",null,d)}const m=e(n,[["render",s]]);export{b as __pageData,m as default};
diff --git a/assets/dist_classes_Resource.md.59067eab.js b/assets/dist_classes_Resource.md.4453174f.js
similarity index 94%
rename from assets/dist_classes_Resource.md.59067eab.js
rename to assets/dist_classes_Resource.md.4453174f.js
index 80a15d9..28f4d27 100644
--- a/assets/dist_classes_Resource.md.59067eab.js
+++ b/assets/dist_classes_Resource.md.4453174f.js
@@ -1,2 +1,2 @@
-import{_ as e,c as t,o as a,N as r}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Resource","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Resource.md"}'),o={name:"dist/classes/Resource.md"},d=r(`Class: Resource 资源管理和加载 默认提供了几个常用的加载器
ts Resource . load ( ' photo.png ' ) ;
-
Table of contents Constructors Properties Methods Constructors constructor • new Resource ()
Properties listGroup • listGroup : string
[] | [string
, string
] = []
Defined in src/core/resource/Resource.ts:124
cache ▪ Static
cache : Object
= {}
所有缓存资源
Index signature ▪ [props: string
]: IRes
Defined in src/core/resource/Resource.ts:47
loader ▪ Static
loader : LoaderType
= {}
所有加载器
Defined in src/core/resource/Resource.ts:42
nameCache ▪ Static
nameCache : Object
= {}
资源别名缓存
Index signature ▪ [props: string
]: string
Defined in src/core/resource/Resource.ts:52
Methods get ▸ Static
get (name
): IRes
根据配置的名称获取资源
Parameters Returns IRes
Defined in src/core/resource/Resource.ts:102
getLoader ▸ Static
getLoader (type
): ILoader
获取加载器
Parameters Name Type Description type
string
根据类型获取加载器
Returns ILoader
Defined in src/core/resource/Resource.ts:143
load ▸ Static
load (source
, options?
): Promise
<IRes
>
加载资源
Parameters Name Type Description source
string
资源路径 options?
LoadOptions
配置
Returns Promise
<IRes
>
Defined in src/core/resource/Resource.ts:69
loadGroup ▸ Static
loadGroup (list
, worker?
): EventEmitter
<ValueOf
<{ COMPLATE
: "complate"
= 'complate'; LOADED
: "loaded"
= 'loaded' }>, any
>
加载一组资源
Parameters Name Type Default value Description list
LoadResListConfig
undefined
要加载的资源列表 worker
number
1
最大同时加载数量,最小为1
Returns EventEmitter
<ValueOf
<{ COMPLATE
: "complate"
= 'complate'; LOADED
: "loaded"
= 'loaded' }>, any
>
Defined in src/core/resource/Resource.ts:131
set ▸ Static
set (name
, url
): boolean
配置资源别名
Parameters Name Type Description name
string
别名 url
string
资源url
Returns boolean
Defined in src/core/resource/Resource.ts:115
setLoader ▸ Static
setLoader (type
, loader
): void
添加/修改一个loader加载器
Parameters Name Type Description type
string
类型 loader
ILoader
加载器
Returns void
Defined in src/core/resource/Resource.ts:59
`,100),l=[d];function s(c,n,i,h,u,f){return a(),t("div",null,l)}const g=e(o,[["render",s]]);export{b as __pageData,g as default};
+import{_ as e,c as t,o as a,N as r}from"./chunks/framework.2075e729.js";const g=JSON.parse('{"title":"Class: Resource","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Resource.md"}'),o={name:"dist/classes/Resource.md"},d=r(`Class: Resource 资源管理和加载 默认提供了几个常用的加载器
ts Resource . load ( ' photo.png ' ) ;
+
Table of contents Constructors Properties Methods Constructors constructor • new Resource ()
Properties listGroup • listGroup : string
[] | [string
, string
] = []
Defined in src/core/resource/Resource.ts:124
cache ▪ Static
cache : Object
= {}
所有缓存资源
Index signature ▪ [props: string
]: IRes
Defined in src/core/resource/Resource.ts:47
loader ▪ Static
loader : LoaderType
= {}
所有加载器
Defined in src/core/resource/Resource.ts:42
nameCache ▪ Static
nameCache : Object
= {}
资源别名缓存
Index signature ▪ [props: string
]: string
Defined in src/core/resource/Resource.ts:52
Methods get ▸ Static
get (name
): IRes
根据配置的名称获取资源
Parameters Returns IRes
Defined in src/core/resource/Resource.ts:102
getLoader ▸ Static
getLoader (type
): ILoader
获取加载器
Parameters Name Type Description type
string
根据类型获取加载器
Returns ILoader
Defined in src/core/resource/Resource.ts:143
load ▸ Static
load (source
, options?
): Promise
<IRes
>
加载资源
Parameters Name Type Description source
string
资源路径 options?
LoadOptions
配置
Returns Promise
<IRes
>
Defined in src/core/resource/Resource.ts:69
loadGroup ▸ Static
loadGroup (list
, worker?
): EventEmitter
<ValueOf
<{ COMPLATE
: "complate"
= 'complate'; LOADED
: "loaded"
= 'loaded' }>, any
>
加载一组资源
Parameters Name Type Default value Description list
LoadResListConfig
undefined
要加载的资源列表 worker
number
1
最大同时加载数量,最小为1
Returns EventEmitter
<ValueOf
<{ COMPLATE
: "complate"
= 'complate'; LOADED
: "loaded"
= 'loaded' }>, any
>
Defined in src/core/resource/Resource.ts:131
set ▸ Static
set (name
, url
): boolean
配置资源别名
Parameters Name Type Description name
string
别名 url
string
资源url
Returns boolean
Defined in src/core/resource/Resource.ts:115
setLoader ▸ Static
setLoader (type
, loader
): void
添加/修改一个loader加载器
Parameters Name Type Description type
string
类型 loader
ILoader
加载器
Returns void
Defined in src/core/resource/Resource.ts:59
`,100),l=[d];function s(c,n,i,h,u,f){return a(),t("div",null,l)}const b=e(o,[["render",s]]);export{g as __pageData,b as default};
diff --git a/assets/dist_classes_Resource.md.59067eab.lean.js b/assets/dist_classes_Resource.md.4453174f.lean.js
similarity index 67%
rename from assets/dist_classes_Resource.md.59067eab.lean.js
rename to assets/dist_classes_Resource.md.4453174f.lean.js
index 917aba4..845385b 100644
--- a/assets/dist_classes_Resource.md.59067eab.lean.js
+++ b/assets/dist_classes_Resource.md.4453174f.lean.js
@@ -1 +1 @@
-import{_ as e,c as t,o as a,N as r}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Resource","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Resource.md"}'),o={name:"dist/classes/Resource.md"},d=r("",100),l=[d];function s(c,n,i,h,u,f){return a(),t("div",null,l)}const g=e(o,[["render",s]]);export{b as __pageData,g as default};
+import{_ as e,c as t,o as a,N as r}from"./chunks/framework.2075e729.js";const g=JSON.parse('{"title":"Class: Resource","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Resource.md"}'),o={name:"dist/classes/Resource.md"},d=r("",100),l=[d];function s(c,n,i,h,u,f){return a(),t("div",null,l)}const b=e(o,[["render",s]]);export{g as __pageData,b as default};
diff --git a/assets/dist_classes_Sprite.md.09d26cc0.js b/assets/dist_classes_Sprite.md.79b3e341.js
similarity index 93%
rename from assets/dist_classes_Sprite.md.09d26cc0.js
rename to assets/dist_classes_Sprite.md.79b3e341.js
index b59b5e9..923ef76 100644
--- a/assets/dist_classes_Sprite.md.09d26cc0.js
+++ b/assets/dist_classes_Sprite.md.79b3e341.js
@@ -1,4 +1,4 @@
-import{_ as e,c as a,o as t,N as s}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Sprite","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Sprite.md"}'),o={name:"dist/classes/Sprite.md"},n=s(`Class: Sprite 图片显示组件
ts // 创建一个图片节点
+import{_ as e,c as a,o as t,N as s}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Class: Sprite","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Sprite.md"}'),o={name:"dist/classes/Sprite.md"},n=s(`Class: Sprite 图片显示组件
ts // 创建一个图片节点
const node = new Transform (Sprite) ;
// 获取图片组件
const sprite = node . getComponent (Sprite) ;
@@ -11,7 +11,7 @@ import{_ as e,c as a,o as t,N as s}from"./chunks/framework.2075e729.js";const b=
} ) ;
Hierarchy Table of contents Constructors Properties Methods Constructors constructor • new Sprite ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from DisplayObjects .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from DisplayObjects .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from DisplayObjects .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from DisplayObjects .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from DisplayObjects .node
Defined in src/core/component/Component.ts:22
texture • Optional
texture : Texture
<TextureResource
>
图片纹理,储存图片的相关信息
Defined in src/core/component/Sprite.ts:23
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from DisplayObjects .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from DisplayObjects .onDestroy
Defined in src/core/component/Component.ts:62
resize ▸ resize (): void
根据当前图片纹理,重置节点尺寸信息
ts const node = new Transform (Sprite) ;
+
Inherited from DisplayObjects .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from DisplayObjects .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from DisplayObjects .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from DisplayObjects .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from DisplayObjects .node
Defined in src/core/component/Component.ts:22
texture • Optional
texture : Texture
<TextureResource
>
图片纹理,储存图片的相关信息
Defined in src/core/component/Sprite.ts:23
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from DisplayObjects .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from DisplayObjects .onDestroy
Defined in src/core/component/Component.ts:62
resize ▸ resize (): void
根据当前图片纹理,重置节点尺寸信息
ts const node = new Transform (Sprite) ;
const sprite = node . getComponent (Sprite) !;
sprite . resize () ;
-
Returns void
Defined in src/core/component/Sprite.ts:37
start ▸ Optional
start (): void
组件被挂载到节点时触发
Returns void
Inherited from DisplayObjects .start
Defined in src/core/component/Component.ts:44
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from DisplayObjects .update
Defined in src/core/component/Component.ts:50
`,110),r=[n];function l(i,p,c,h,d,m){return t(),a("div",null,r)}const u=e(o,[["render",l]]);export{b as __pageData,u as default};
+
Returns void
Defined in src/core/component/Sprite.ts:37
start ▸ Optional
start (): void
组件被挂载到节点时触发
Returns void
Inherited from DisplayObjects .start
Defined in src/core/component/Component.ts:44
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from DisplayObjects .update
Defined in src/core/component/Component.ts:50
`,110),r=[n];function l(i,p,c,h,d,m){return t(),a("div",null,r)}const y=e(o,[["render",l]]);export{u as __pageData,y as default};
diff --git a/assets/dist_classes_Sprite.md.09d26cc0.lean.js b/assets/dist_classes_Sprite.md.79b3e341.lean.js
similarity index 51%
rename from assets/dist_classes_Sprite.md.09d26cc0.lean.js
rename to assets/dist_classes_Sprite.md.79b3e341.lean.js
index ef72a19..c9ad946 100644
--- a/assets/dist_classes_Sprite.md.09d26cc0.lean.js
+++ b/assets/dist_classes_Sprite.md.79b3e341.lean.js
@@ -1 +1 @@
-import{_ as e,c as a,o as t,N as s}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Sprite","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Sprite.md"}'),o={name:"dist/classes/Sprite.md"},n=s("",110),r=[n];function l(i,p,c,h,d,m){return t(),a("div",null,r)}const u=e(o,[["render",l]]);export{b as __pageData,u as default};
+import{_ as e,c as a,o as t,N as s}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Class: Sprite","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Sprite.md"}'),o={name:"dist/classes/Sprite.md"},n=s("",110),r=[n];function l(i,p,c,h,d,m){return t(),a("div",null,r)}const y=e(o,[["render",l]]);export{u as __pageData,y as default};
diff --git a/assets/dist_classes_SpriteSheet.md.539fe559.js b/assets/dist_classes_SpriteSheet.md.83cbffed.js
similarity index 95%
rename from assets/dist_classes_SpriteSheet.md.539fe559.js
rename to assets/dist_classes_SpriteSheet.md.83cbffed.js
index df07ea6..b01daa2 100644
--- a/assets/dist_classes_SpriteSheet.md.539fe559.js
+++ b/assets/dist_classes_SpriteSheet.md.83cbffed.js
@@ -14,4 +14,4 @@ import{_ as e,c as t,o as a,N as o}from"./chunks/framework.2075e729.js";const u=
}, this ) ;
Hierarchy Table of contents Constructors Properties Methods Constructors constructor • new SpriteSheet ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties animations • animations : Record
<string
, string
[]> = {}
动画配置
Defined in src/core/component/SpriteSheet.ts:90
emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
frames • frames : Record
<string
, Texture
<TextureResource
>> = {}
纹理集
Defined in src/core/component/SpriteSheet.ts:86
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
sprite • sprite : Sprite
展示的节点
Defined in src/core/component/SpriteSheet.ts:94
Methods add ▸ add (res
, data
, name
): void
添加一个素材
Parameters Returns void
Defined in src/core/component/SpriteSheet.ts:122
destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
get ▸ get (name
): Texture
<TextureResource
>
获取素材
Parameters Returns Texture
<TextureResource
>
Defined in src/core/component/SpriteSheet.ts:104
load ▸ load (config
, res?
): void
加载图集 如果没有传入资源,则使用配置里面的资源路径进行加载,但是还是要提前保证路径资源已经被提前加载
Parameters Returns void
Defined in src/core/component/SpriteSheet.ts:152
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
set ▸ set (name
, texture
): void
设置要显示的素材
Parameters Returns void
Defined in src/core/component/SpriteSheet.ts:112
show ▸ show (name
): void
设置要现实的素材
Parameters Name Type Description name
string
内部别名
Returns void
Defined in src/core/component/SpriteSheet.ts:142
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Component .start
Defined in src/core/component/SpriteSheet.ts:96
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Component .update
Defined in src/core/component/Component.ts:50
`,163),s=[n];function l(i,d,p,h,c,m){return a(),t("div",null,s)}const b=e(r,[["render",l]]);export{u as __pageData,b as default};
+Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties animations • animations : Record
<string
, string
[]> = {}
动画配置
Defined in src/core/component/SpriteSheet.ts:90
emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
frames • frames : Record
<string
, Texture
<TextureResource
>> = {}
纹理集
Defined in src/core/component/SpriteSheet.ts:86
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
sprite • sprite : Sprite
展示的节点
Defined in src/core/component/SpriteSheet.ts:94
Methods add ▸ add (res
, data
, name
): void
添加一个素材
Parameters Returns void
Defined in src/core/component/SpriteSheet.ts:122
destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
get ▸ get (name
): Texture
<TextureResource
>
获取素材
Parameters Returns Texture
<TextureResource
>
Defined in src/core/component/SpriteSheet.ts:104
load ▸ load (config
, res?
): void
加载图集 如果没有传入资源,则使用配置里面的资源路径进行加载,但是还是要提前保证路径资源已经被提前加载
Parameters Returns void
Defined in src/core/component/SpriteSheet.ts:152
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
set ▸ set (name
, texture
): void
设置要显示的素材
Parameters Returns void
Defined in src/core/component/SpriteSheet.ts:112
show ▸ show (name
): void
设置要现实的素材
Parameters Name Type Description name
string
内部别名
Returns void
Defined in src/core/component/SpriteSheet.ts:142
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Component .start
Defined in src/core/component/SpriteSheet.ts:96
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Component .update
Defined in src/core/component/Component.ts:50
`,163),s=[n];function l(i,d,p,h,c,m){return a(),t("div",null,s)}const b=e(r,[["render",l]]);export{u as __pageData,b as default};
diff --git a/assets/dist_classes_SpriteSheet.md.539fe559.lean.js b/assets/dist_classes_SpriteSheet.md.83cbffed.lean.js
similarity index 100%
rename from assets/dist_classes_SpriteSheet.md.539fe559.lean.js
rename to assets/dist_classes_SpriteSheet.md.83cbffed.lean.js
diff --git a/assets/dist_classes_SpriteSheetAnimation.md.55a31041.js b/assets/dist_classes_SpriteSheetAnimation.md.704a54f1.js
similarity index 95%
rename from assets/dist_classes_SpriteSheetAnimation.md.55a31041.js
rename to assets/dist_classes_SpriteSheetAnimation.md.704a54f1.js
index 4111027..09f1b30 100644
--- a/assets/dist_classes_SpriteSheetAnimation.md.55a31041.js
+++ b/assets/dist_classes_SpriteSheetAnimation.md.704a54f1.js
@@ -26,4 +26,4 @@ import{_ as e,c as a,o as t,N as n}from"./chunks/framework.2075e729.js";const b=
}, this ) ;
Hierarchy Table of contents Constructors Properties Accessors Methods Constructors constructor • new SpriteSheetAnimation ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from Animation .constructor
Defined in src/core/component/Component.ts:37
Properties animation • animation : string
= 'default'
Inherited from Animation .animation
Defined in src/core/component/Animation.ts:107
animations • animations : Record
<string
, Timeline
<{}>[]> = {}
动画配置
Inherited from Animation .animations
Defined in src/core/component/Animation.ts:46
emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Animation .emitter
Defined in src/core/component/Component.ts:27
fps • fps : number
= 60
播放的帧速率,按照每秒计算,每秒播放的帧数
Defined in src/core/component/SpriteSheetAnimation.ts:43
id • id : number
用于表示组件的唯一标识
Inherited from Animation .id
Defined in src/core/component/Component.ts:12
loop • loop : number
= 0
循环次数,0:不循环,-1:一直循环
Inherited from Animation .loop
Defined in src/core/component/Animation.ts:112
name • name : string
= ''
组件名
Inherited from Animation .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Animation .node
Defined in src/core/component/Component.ts:22
paused • paused : boolean
= true
指示是否被暂停
Inherited from Animation .paused
Defined in src/core/component/Animation.ts:125
playCount • playCount : number
= 0
已经播放次数
Inherited from Animation .playCount
Defined in src/core/component/Animation.ts:116
speed • speed : number
= 1
播放速度100%
Inherited from Animation .speed
Defined in src/core/component/Animation.ts:120
spriteSheet • spriteSheet : SpriteSheet
Defined in src/core/component/SpriteSheetAnimation.ts:45
time • time : number
= 0
当前时间线
Inherited from Animation .time
Defined in src/core/component/Animation.ts:32
timeMax • timeMax : number
= 0
动画总长
Inherited from Animation .timeMax
Defined in src/core/component/Animation.ts:24
timeline • timeline : EventEmitter
<string
| symbol
, any
>
用于记录回调的时间线,在target时间线后执行
Inherited from Animation .timeline
Defined in src/core/component/Animation.ts:19
total • total : number
= 0
最大帧数
Inherited from Animation .total
Defined in src/core/component/Animation.ts:28
Event ▪ Static
Event : Object
Type declaration Name Type Description ENDED
"ended"
动画播放完成
Inherited from Animation .Event
Defined in src/core/component/Animation.ts:10
Accessors targets • get
targets (): Timeline
<{}>[]
时间线 每一个对象一个时间线 还有一个总时间线,可以用于记录一些信息
Returns Timeline
<{}>[]
Inherited from Animation.targets
Defined in src/core/component/Animation.ts:39
Methods addFrameAction ▸ addFrameAction (time
, callback
, target
): void
添加事件
Parameters Name Type time
number
callback
() => void
target
any
Returns void
Inherited from Animation .addFrameAction
Defined in src/core/component/Animation.ts:198
addTimeline ▸ addTimeline (timeline
): void
添加一个熟悉变更时间线
Parameters Name Type timeline
Timeline
<{}>
Returns void
Inherited from Animation .addTimeline
Defined in src/core/component/Animation.ts:84
destroy ▸ destroy (): void
消毁
Returns void
Inherited from Animation .destroy
Defined in src/core/component/Component.ts:55
next ▸ next (): void
播放下一帧
Returns void
Inherited from Animation .next
Defined in src/core/component/Animation.ts:53
nextAction ▸ Protected
nextAction (val
): void
每次当需要更新帧动画时调用
Parameters Name Type Description val
Timeline
<{}>即将更新的帧动画配置
Returns void
Overrides Animation .nextAction
Defined in src/core/component/SpriteSheetAnimation.ts:70
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Animation .onDestroy
Defined in src/core/component/Component.ts:62
play ▸ play (): void
播放
Returns void
Inherited from Animation .play
Defined in src/core/component/Animation.ts:127
▸ play (name
): void
播放
Parameters Name Type Description name
string
要播放的动画
Returns void
Inherited from Animation .play
Defined in src/core/component/Animation.ts:128
▸ play (loop
): void
播放
Parameters Name Type Description loop
number
要循环的次数
Returns void
Inherited from Animation .play
Defined in src/core/component/Animation.ts:129
▸ play (name
, loop
): void
播放
Parameters Name Type Description name
string
要播放的动画 loop
number
要循环的次数
Returns void
Inherited from Animation .play
Defined in src/core/component/Animation.ts:130
prev ▸ prev (): void
播放上一帧
Returns void
Inherited from Animation .prev
Defined in src/core/component/Animation.ts:103
puase ▸ puase (): void
暂停
Returns void
Inherited from Animation .puase
Defined in src/core/component/Animation.ts:168
removeFrameAction ▸ removeFrameAction (time
, callback
, target
): void
移除事件
Parameters Name Type time
number
callback
() => void
target
any
Returns void
Inherited from Animation .removeFrameAction
Defined in src/core/component/Animation.ts:205
setTimeline ▸ setTimeline (timelines
, name?
): void
设置一个属性变更时间线
Parameters Name Type timelines
Timeline
<{}>[]name?
string
Returns void
Inherited from Animation .setTimeline
Defined in src/core/component/Animation.ts:93
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Animation .start
Defined in src/core/component/SpriteSheetAnimation.ts:47
stop ▸ stop (): void
停止
Returns void
Inherited from Animation .stop
Defined in src/core/component/Animation.ts:160
update ▸ update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Animation .update
Defined in src/core/component/Animation.ts:172
`,346),i=[r];function s(l,h,d,c,p,m){return t(),a("div",null,i)}const u=e(o,[["render",s]]);export{b as __pageData,u as default};
+Inherited from Animation .constructor
Defined in src/core/component/Component.ts:37
Properties animation • animation : string
= 'default'
Inherited from Animation .animation
Defined in src/core/component/Animation.ts:107
animations • animations : Record
<string
, Timeline
<{}>[]> = {}
动画配置
Inherited from Animation .animations
Defined in src/core/component/Animation.ts:46
emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Animation .emitter
Defined in src/core/component/Component.ts:27
fps • fps : number
= 60
播放的帧速率,按照每秒计算,每秒播放的帧数
Defined in src/core/component/SpriteSheetAnimation.ts:43
id • id : number
用于表示组件的唯一标识
Inherited from Animation .id
Defined in src/core/component/Component.ts:12
loop • loop : number
= 0
循环次数,0:不循环,-1:一直循环
Inherited from Animation .loop
Defined in src/core/component/Animation.ts:112
name • name : string
= ''
组件名
Inherited from Animation .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Animation .node
Defined in src/core/component/Component.ts:22
paused • paused : boolean
= true
指示是否被暂停
Inherited from Animation .paused
Defined in src/core/component/Animation.ts:125
playCount • playCount : number
= 0
已经播放次数
Inherited from Animation .playCount
Defined in src/core/component/Animation.ts:116
speed • speed : number
= 1
播放速度100%
Inherited from Animation .speed
Defined in src/core/component/Animation.ts:120
spriteSheet • spriteSheet : SpriteSheet
Defined in src/core/component/SpriteSheetAnimation.ts:45
time • time : number
= 0
当前时间线
Inherited from Animation .time
Defined in src/core/component/Animation.ts:32
timeMax • timeMax : number
= 0
动画总长
Inherited from Animation .timeMax
Defined in src/core/component/Animation.ts:24
timeline • timeline : EventEmitter
<string
| symbol
, any
>
用于记录回调的时间线,在target时间线后执行
Inherited from Animation .timeline
Defined in src/core/component/Animation.ts:19
total • total : number
= 0
最大帧数
Inherited from Animation .total
Defined in src/core/component/Animation.ts:28
Event ▪ Static
Event : Object
Type declaration Name Type Description ENDED
"ended"
动画播放完成
Inherited from Animation .Event
Defined in src/core/component/Animation.ts:10
Accessors targets • get
targets (): Timeline
<{}>[]
时间线 每一个对象一个时间线 还有一个总时间线,可以用于记录一些信息
Returns Timeline
<{}>[]
Inherited from Animation.targets
Defined in src/core/component/Animation.ts:39
Methods addFrameAction ▸ addFrameAction (time
, callback
, target
): void
添加事件
Parameters Name Type time
number
callback
() => void
target
any
Returns void
Inherited from Animation .addFrameAction
Defined in src/core/component/Animation.ts:198
addTimeline ▸ addTimeline (timeline
): void
添加一个熟悉变更时间线
Parameters Name Type timeline
Timeline
<{}>
Returns void
Inherited from Animation .addTimeline
Defined in src/core/component/Animation.ts:84
destroy ▸ destroy (): void
消毁
Returns void
Inherited from Animation .destroy
Defined in src/core/component/Component.ts:55
next ▸ next (): void
播放下一帧
Returns void
Inherited from Animation .next
Defined in src/core/component/Animation.ts:53
nextAction ▸ Protected
nextAction (val
): void
每次当需要更新帧动画时调用
Parameters Name Type Description val
Timeline
<{}>即将更新的帧动画配置
Returns void
Overrides Animation .nextAction
Defined in src/core/component/SpriteSheetAnimation.ts:70
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Animation .onDestroy
Defined in src/core/component/Component.ts:62
play ▸ play (): void
播放
Returns void
Inherited from Animation .play
Defined in src/core/component/Animation.ts:127
▸ play (name
): void
播放
Parameters Name Type Description name
string
要播放的动画
Returns void
Inherited from Animation .play
Defined in src/core/component/Animation.ts:128
▸ play (loop
): void
播放
Parameters Name Type Description loop
number
要循环的次数
Returns void
Inherited from Animation .play
Defined in src/core/component/Animation.ts:129
▸ play (name
, loop
): void
播放
Parameters Name Type Description name
string
要播放的动画 loop
number
要循环的次数
Returns void
Inherited from Animation .play
Defined in src/core/component/Animation.ts:130
prev ▸ prev (): void
播放上一帧
Returns void
Inherited from Animation .prev
Defined in src/core/component/Animation.ts:103
puase ▸ puase (): void
暂停
Returns void
Inherited from Animation .puase
Defined in src/core/component/Animation.ts:168
removeFrameAction ▸ removeFrameAction (time
, callback
, target
): void
移除事件
Parameters Name Type time
number
callback
() => void
target
any
Returns void
Inherited from Animation .removeFrameAction
Defined in src/core/component/Animation.ts:205
setTimeline ▸ setTimeline (timelines
, name?
): void
设置一个属性变更时间线
Parameters Name Type timelines
Timeline
<{}>[]name?
string
Returns void
Inherited from Animation .setTimeline
Defined in src/core/component/Animation.ts:93
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Animation .start
Defined in src/core/component/SpriteSheetAnimation.ts:47
stop ▸ stop (): void
停止
Returns void
Inherited from Animation .stop
Defined in src/core/component/Animation.ts:160
update ▸ update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Animation .update
Defined in src/core/component/Animation.ts:172
`,346),i=[r];function s(l,h,d,p,c,m){return t(),a("div",null,i)}const u=e(o,[["render",s]]);export{b as __pageData,u as default};
diff --git a/assets/dist_classes_SpriteSheetAnimation.md.55a31041.lean.js b/assets/dist_classes_SpriteSheetAnimation.md.704a54f1.lean.js
similarity index 69%
rename from assets/dist_classes_SpriteSheetAnimation.md.55a31041.lean.js
rename to assets/dist_classes_SpriteSheetAnimation.md.704a54f1.lean.js
index bd19632..6f03ad2 100644
--- a/assets/dist_classes_SpriteSheetAnimation.md.55a31041.lean.js
+++ b/assets/dist_classes_SpriteSheetAnimation.md.704a54f1.lean.js
@@ -1 +1 @@
-import{_ as e,c as a,o as t,N as n}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: SpriteSheetAnimation","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/SpriteSheetAnimation.md"}'),o={name:"dist/classes/SpriteSheetAnimation.md"},r=n("",346),i=[r];function s(l,h,d,c,p,m){return t(),a("div",null,i)}const u=e(o,[["render",s]]);export{b as __pageData,u as default};
+import{_ as e,c as a,o as t,N as n}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: SpriteSheetAnimation","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/SpriteSheetAnimation.md"}'),o={name:"dist/classes/SpriteSheetAnimation.md"},r=n("",346),i=[r];function s(l,h,d,p,c,m){return t(),a("div",null,i)}const u=e(o,[["render",s]]);export{b as __pageData,u as default};
diff --git a/assets/dist_classes_Text.md.0bdf1270.js b/assets/dist_classes_Text.md.2c8017c1.js
similarity index 93%
rename from assets/dist_classes_Text.md.0bdf1270.js
rename to assets/dist_classes_Text.md.2c8017c1.js
index df399d7..53b60ec 100644
--- a/assets/dist_classes_Text.md.0bdf1270.js
+++ b/assets/dist_classes_Text.md.2c8017c1.js
@@ -1,4 +1,4 @@
-import{_ as e,c as a,o as t,N as r}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Class: Text","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Text.md"}'),n={name:"dist/classes/Text.md"},o=r(`Class: Text 文字显示组件
ts // 创建一个文字节点
+import{_ as e,c as a,o as t,N as r}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Text","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Text.md"}'),n={name:"dist/classes/Text.md"},o=r(`Class: Text 文字显示组件
ts // 创建一个文字节点
const node = new Transform (Text) ;
// 设置组件宽度
node . size . x = 200 ;
@@ -26,4 +26,4 @@ import{_ as e,c as a,o as t,N as r}from"./chunks/framework.2075e729.js";const u=
text . color = ' #FF0000 ' ;
Hierarchy Table of contents Constructors Properties Accessors Methods Constructors constructor • new Text ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from Container .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Container .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Container .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Container .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Container .node
Defined in src/core/component/Component.ts:22
redraw • redraw : boolean
= false
Defined in src/core/component/Text.ts:218
texture • Optional
texture : Texture
<HTMLCanvasElement
>
记录文本实际宽度,需要动态计算
Defined in src/core/component/Text.ts:216
Accessors algin • get
algin (): TextAlgin
水平对齐方式
Returns TextAlgin
Defined in src/core/component/Text.ts:90
• set
algin (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:93
autoWarp • get
autoWarp (): boolean
是否自动换行 前提条件,设置了宽度,如果没设置宽度自动换行将不生效
Returns boolean
Defined in src/core/component/Text.ts:181
• set
autoWarp (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:184
bold • get
bold (): boolean
文字加粗
Returns boolean
Defined in src/core/component/Text.ts:165
• set
bold (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:168
color • get
color (): string
文字颜色
Returns string
Defined in src/core/component/Text.ts:196
• set
color (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:199
fontFamily • get
fontFamily (): string
字体
Returns string
Defined in src/core/component/Text.ts:120
• set
fontFamily (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:123
fontSize • get
fontSize (): number
字体大小
Returns number
Defined in src/core/component/Text.ts:135
• set
fontSize (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:138
italic • get
italic (): boolean
斜体
Returns boolean
Defined in src/core/component/Text.ts:150
• set
italic (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:153
letterPacing • get
letterPacing (): number
字间距
Returns number
Defined in src/core/component/Text.ts:60
• set
letterPacing (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:63
lineSpace • get
lineSpace (): number
行间距
Returns number
Defined in src/core/component/Text.ts:75
• set
lineSpace (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:78
value • get
value (): string
Returns string
Defined in src/core/component/Text.ts:105
• set
value (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:108
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Container .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ onDestroy (): void
组件被销毁时触发
Returns void
Overrides Container .onDestroy
Defined in src/core/component/Text.ts:48
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Container .start
Defined in src/core/component/Text.ts:44
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Container .update
Defined in src/core/component/Component.ts:50
`,257),s=[o];function l(i,d,c,h,p,f){return t(),a("div",null,s)}const m=e(n,[["render",l]]);export{u as __pageData,m as default};
+
Inherited from Container .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Container .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Container .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Container .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Container .node
Defined in src/core/component/Component.ts:22
redraw • redraw : boolean
= false
Defined in src/core/component/Text.ts:218
texture • Optional
texture : Texture
<HTMLCanvasElement
>
记录文本实际宽度,需要动态计算
Defined in src/core/component/Text.ts:216
Accessors algin • get
algin (): TextAlgin
水平对齐方式
Returns TextAlgin
Defined in src/core/component/Text.ts:90
• set
algin (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:93
autoWarp • get
autoWarp (): boolean
是否自动换行 前提条件,设置了宽度,如果没设置宽度自动换行将不生效
Returns boolean
Defined in src/core/component/Text.ts:181
• set
autoWarp (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:184
bold • get
bold (): boolean
文字加粗
Returns boolean
Defined in src/core/component/Text.ts:165
• set
bold (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:168
color • get
color (): string
文字颜色
Returns string
Defined in src/core/component/Text.ts:196
• set
color (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:199
fontFamily • get
fontFamily (): string
字体
Returns string
Defined in src/core/component/Text.ts:120
• set
fontFamily (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:123
fontSize • get
fontSize (): number
字体大小
Returns number
Defined in src/core/component/Text.ts:135
• set
fontSize (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:138
italic • get
italic (): boolean
斜体
Returns boolean
Defined in src/core/component/Text.ts:150
• set
italic (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:153
letterPacing • get
letterPacing (): number
字间距
Returns number
Defined in src/core/component/Text.ts:60
• set
letterPacing (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:63
lineSpace • get
lineSpace (): number
行间距
Returns number
Defined in src/core/component/Text.ts:75
• set
lineSpace (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:78
value • get
value (): string
Returns string
Defined in src/core/component/Text.ts:105
• set
value (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:108
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Container .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ onDestroy (): void
组件被销毁时触发
Returns void
Overrides Container .onDestroy
Defined in src/core/component/Text.ts:48
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Container .start
Defined in src/core/component/Text.ts:44
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Container .update
Defined in src/core/component/Component.ts:50
`,257),s=[o];function l(i,d,c,h,p,f){return t(),a("div",null,s)}const m=e(n,[["render",l]]);export{b as __pageData,m as default};
diff --git a/assets/dist_classes_Text.md.0bdf1270.lean.js b/assets/dist_classes_Text.md.2c8017c1.lean.js
similarity index 69%
rename from assets/dist_classes_Text.md.0bdf1270.lean.js
rename to assets/dist_classes_Text.md.2c8017c1.lean.js
index e61cddc..2292fec 100644
--- a/assets/dist_classes_Text.md.0bdf1270.lean.js
+++ b/assets/dist_classes_Text.md.2c8017c1.lean.js
@@ -1 +1 @@
-import{_ as e,c as a,o as t,N as r}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Class: Text","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Text.md"}'),n={name:"dist/classes/Text.md"},o=r("",257),s=[o];function l(i,d,c,h,p,f){return t(),a("div",null,s)}const m=e(n,[["render",l]]);export{u as __pageData,m as default};
+import{_ as e,c as a,o as t,N as r}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Text","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Text.md"}'),n={name:"dist/classes/Text.md"},o=r("",257),s=[o];function l(i,d,c,h,p,f){return t(),a("div",null,s)}const m=e(n,[["render",l]]);export{b as __pageData,m as default};
diff --git a/assets/dist_classes_Texture.md.0eed5d91.js b/assets/dist_classes_Texture.md.a813b694.js
similarity index 92%
rename from assets/dist_classes_Texture.md.0eed5d91.js
rename to assets/dist_classes_Texture.md.a813b694.js
index 0fc6b38..a7a7d1b 100644
--- a/assets/dist_classes_Texture.md.0eed5d91.js
+++ b/assets/dist_classes_Texture.md.a813b694.js
@@ -1 +1 @@
-import{_ as e,c as t,o as r,N as a}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Texture","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Texture.md"}'),o={name:"dist/classes/Texture.md"},i=a('Class: Texture<T> 纹理 能力,能够完整的描述一张素材 统一传入处理 canvas 异步转 ImageBitmap
Type parameters Hierarchy Table of contents Constructors Properties Accessors Constructors constructor • new Texture <T
>(source?
)
Type parameters Parameters Overrides BaseTexture .constructor
Defined in src/core/texture/Texture.ts:40
Properties _source • Optional
_source : T
Defined in src/core/texture/Texture.ts:28
anchor • anchor : Vector2
Defined in src/core/texture/Texture.ts:19
height • height : number
= 0
截取高度
Inherited from BaseTexture .height
Defined in src/core/texture/BaseTexture.ts:20
init • init : boolean
= false
是否进行了初始化/是否需要初始化
Defined in src/core/texture/Texture.ts:26
left • left : number
= 0
Defined in src/core/texture/Texture.ts:17
rotation • rotation : number
= 0
旋转
Defined in src/core/texture/Texture.ts:16
sourceSize • Optional
sourceSize : Vector2
Defined in src/core/texture/Texture.ts:21
top • top : number
= 0
Defined in src/core/texture/Texture.ts:18
width • width : number
= 0
截取宽度
Inherited from BaseTexture .width
Defined in src/core/texture/BaseTexture.ts:16
x • x : number
= 0
记录x偏移
Inherited from BaseTexture .x
Defined in src/core/texture/BaseTexture.ts:8
y • y : number
= 0
记录y偏移
Inherited from BaseTexture .y
Defined in src/core/texture/BaseTexture.ts:12
Accessors source • get
source (): T
Returns T
Defined in src/core/texture/Texture.ts:29
• set
source (val
): void
Parameters Returns void
Defined in src/core/texture/Texture.ts:33
',107),h=[i];function n(d,s,l,c,u,f){return r(),t("div",null,h)}const p=e(o,[["render",n]]);export{b as __pageData,p as default};
+import{_ as e,c as t,o as r,N as a}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Texture","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Texture.md"}'),o={name:"dist/classes/Texture.md"},i=a('Class: Texture<T> 纹理 能力,能够完整的描述一张素材 统一传入处理 canvas 异步转 ImageBitmap
Type parameters Hierarchy Table of contents Constructors Properties Accessors Constructors constructor • new Texture <T
>(source?
)
Type parameters Parameters Overrides BaseTexture .constructor
Defined in src/core/texture/Texture.ts:40
Properties _source • Optional
_source : T
Defined in src/core/texture/Texture.ts:28
anchor • anchor : Vector2
Defined in src/core/texture/Texture.ts:19
height • height : number
= 0
截取高度
Inherited from BaseTexture .height
Defined in src/core/texture/BaseTexture.ts:20
init • init : boolean
= false
是否进行了初始化/是否需要初始化
Defined in src/core/texture/Texture.ts:26
left • left : number
= 0
Defined in src/core/texture/Texture.ts:17
rotation • rotation : number
= 0
旋转
Defined in src/core/texture/Texture.ts:16
sourceSize • Optional
sourceSize : Vector2
Defined in src/core/texture/Texture.ts:21
top • top : number
= 0
Defined in src/core/texture/Texture.ts:18
width • width : number
= 0
截取宽度
Inherited from BaseTexture .width
Defined in src/core/texture/BaseTexture.ts:16
x • x : number
= 0
记录x偏移
Inherited from BaseTexture .x
Defined in src/core/texture/BaseTexture.ts:8
y • y : number
= 0
记录y偏移
Inherited from BaseTexture .y
Defined in src/core/texture/BaseTexture.ts:12
Accessors source • get
source (): T
Returns T
Defined in src/core/texture/Texture.ts:29
• set
source (val
): void
Parameters Returns void
Defined in src/core/texture/Texture.ts:33
',107),h=[i];function n(d,s,l,c,u,f){return r(),t("div",null,h)}const p=e(o,[["render",n]]);export{b as __pageData,p as default};
diff --git a/assets/dist_classes_Texture.md.0eed5d91.lean.js b/assets/dist_classes_Texture.md.a813b694.lean.js
similarity index 100%
rename from assets/dist_classes_Texture.md.0eed5d91.lean.js
rename to assets/dist_classes_Texture.md.a813b694.lean.js
diff --git a/assets/dist_classes_Thing.md.c48f44f5.js b/assets/dist_classes_Thing.md.d39528a9.js
similarity index 53%
rename from assets/dist_classes_Thing.md.c48f44f5.js
rename to assets/dist_classes_Thing.md.d39528a9.js
index 21b26a6..59be57a 100644
--- a/assets/dist_classes_Thing.md.c48f44f5.js
+++ b/assets/dist_classes_Thing.md.d39528a9.js
@@ -1,5 +1,5 @@
import{_ as e,c as a,o as r,N as t}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Thing","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Thing.md"}'),o={name:"dist/classes/Thing.md"},n=t(`Class: Thing<T> 节点,用于构建整个项目的节点树,也是所有组件挂载的节点
ts const node = new Transform () ;
-
Type parameters Hierarchy Table of contents Constructors Properties Accessors Methods Constructors constructor • new Thing <T
>(classConstructor?
)
Type parameters Parameters Overrides Transform .constructor
Defined in src/core/thing/Thing.ts:6
Properties _anchor • _anchor : Vector2
Inherited from Transform ._anchor
Defined in src/core/transform/Transform.ts:165
_rotation • _rotation : number
= 0
Inherited from Transform ._rotation
Defined in src/core/transform/Transform.ts:154
active • active : boolean
= true
Inherited from Transform .active
Defined in src/core/transform/Transform.ts:27
alone • alone : boolean
= false
Inherited from Transform .alone
Defined in src/core/transform/Transform.ts:24
alpha • alpha : number
= 1
透明度
Inherited from Transform .alpha
Defined in src/core/transform/Transform.ts:227
children • children : Transform
<Container
>[] = []
子节点
Inherited from Transform .children
Defined in src/core/transform/Transform.ts:303
components • components : Component
[] = []
所有组件 默认包含一个容器组件,当添加了其他容器组件后自动替换,只能包含一个视觉组件
Inherited from Transform .components
Defined in src/core/transform/Transform.ts:196
container • container : T
Inherited from Transform .container
Defined in src/core/transform/Transform.ts:191
deliver • deliver : boolean
= true
是否继续向父元素传递事件(冒泡)
Inherited from Transform .deliver
Defined in src/core/transform/Transform.ts:218
emitter • emitter : EventEmitter
<TransformEvent
, any
>
Inherited from Transform .emitter
Defined in src/core/transform/Transform.ts:30
id • id : number
= 0
Inherited from Transform .id
Defined in src/core/transform/Transform.ts:22
name • name : string
= 'node'
Inherited from Transform .name
Defined in src/core/transform/Transform.ts:29
parent • Optional
parent : Transform
<Container
>
父节点
Inherited from Transform .parent
Defined in src/core/transform/Transform.ts:201
pierce • pierce : boolean
= false
是否穿透,可触发非父元素外的其它元素事件
Inherited from Transform .pierce
Defined in src/core/transform/Transform.ts:222
redraw • redraw : boolean
= false
Inherited from Transform .redraw
Defined in src/core/transform/Transform.ts:32
Event ▪ Static
Event : Object
事件
Type declaration Name Type Description ADDED
"ADDED"
当添加到显示舞台时 CHILD_ADDED
"CHILD_ADDED"
当添加新的字节点时 REPOSITION
"REPOSITION"
位置发生变化 RESIZE
"RESIZE"
尺寸发生变化时 TICKER_AFTER
"TICKER_AFTER"
帧刷新后 TICKER_BEFORE
"TICKER_BEFORE"
帧刷新前
Inherited from Transform .Event
Defined in src/core/transform/Transform.ts:36
Accessors anchor • get
anchor (): Vector2
锚点
Returns Vector2
Inherited from Transform.anchor
Defined in src/core/transform/Transform.ts:169
• set
anchor (value
): void
Parameters Returns void
Inherited from Transform.anchor
Defined in src/core/transform/Transform.ts:172
anchorX • get
anchorX (): number
Returns number
Inherited from Transform.anchorX
Defined in src/core/transform/Transform.ts:176
• set
anchorX (val
): void
Parameters Returns void
Inherited from Transform.anchorX
Defined in src/core/transform/Transform.ts:179
anchorY • get
anchorY (): number
Returns number
Inherited from Transform.anchorY
Defined in src/core/transform/Transform.ts:183
• set
anchorY (val
): void
Parameters Returns void
Inherited from Transform.anchorY
Defined in src/core/transform/Transform.ts:186
height • get
height (): number
Returns number
Inherited from Transform.height
Defined in src/core/transform/Transform.ts:120
• set
height (val
): void
Parameters Returns void
Inherited from Transform.height
Defined in src/core/transform/Transform.ts:123
position • get
position (): Vector2
位置
Returns Vector2
Inherited from Transform.position
Defined in src/core/transform/Transform.ts:80
• set
position (value
): void
Parameters Returns void
Inherited from Transform.position
Defined in src/core/transform/Transform.ts:83
rotation • get
rotation (): number
旋转
Returns number
Inherited from Transform.rotation
Defined in src/core/transform/Transform.ts:158
• set
rotation (value
): void
Parameters Returns void
Inherited from Transform.rotation
Defined in src/core/transform/Transform.ts:161
scale • get
scale (): Vector2
缩放
Returns Vector2
Inherited from Transform.scale
Defined in src/core/transform/Transform.ts:133
• set
scale (value
): void
Parameters Returns void
Inherited from Transform.scale
Defined in src/core/transform/Transform.ts:136
scaleX • get
scaleX (): number
Returns number
Inherited from Transform.scaleX
Defined in src/core/transform/Transform.ts:140
• set
scaleX (val
): void
Parameters Returns void
Inherited from Transform.scaleX
Defined in src/core/transform/Transform.ts:143
scaleY • get
scaleY (): number
Returns number
Inherited from Transform.scaleY
Defined in src/core/transform/Transform.ts:147
• set
scaleY (val
): void
Parameters Returns void
Inherited from Transform.scaleY
Defined in src/core/transform/Transform.ts:150
size • get
size (): Vector2
大小
Returns Vector2
Inherited from Transform.size
Defined in src/core/transform/Transform.ts:106
• set
size (value
): void
Parameters Returns void
Inherited from Transform.size
Defined in src/core/transform/Transform.ts:109
touch • get
touch (): boolean
Returns boolean
Inherited from Transform.touch
Defined in src/core/transform/Transform.ts:211
• set
touch (val
): void
触摸事件,默认关闭
Parameters Returns void
Inherited from Transform.touch
Defined in src/core/transform/Transform.ts:207
width • get
width (): number
Returns number
Inherited from Transform.width
Defined in src/core/transform/Transform.ts:114
• set
width (val
): void
Parameters Returns void
Inherited from Transform.width
Defined in src/core/transform/Transform.ts:117
x • get
x (): number
Returns number
Inherited from Transform.x
Defined in src/core/transform/Transform.ts:87
• set
x (val
): void
Parameters Returns void
Inherited from Transform.x
Defined in src/core/transform/Transform.ts:90
y • get
y (): number
Returns number
Inherited from Transform.y
Defined in src/core/transform/Transform.ts:95
• set
y (val
): void
Parameters Returns void
Inherited from Transform.y
Defined in src/core/transform/Transform.ts:98
Methods addChild ▸ addChild <U
>(transform
, props?
): U
插入一个子节点
Type parameters Parameters Name Type Description transform
U
待插入的节点 props?
Props
<U
>-
Returns U
Inherited from Transform .addChild
Defined in src/core/transform/Transform.ts:309
addChildAt ▸ addChildAt (child
, index
): void
在指定位置插入节点
Parameters Returns void
Inherited from Transform .addChildAt
Defined in src/core/transform/Transform.ts:324
addComponent ▸ addComponent <T
>(classConstructor
, props?
): T
添加一个组件
Type parameters Parameters Returns T
Inherited from Transform .addComponent
Defined in src/core/transform/Transform.ts:233
destroy ▸ destroy (): void
消毁
Returns void
Inherited from Transform .destroy
Defined in src/core/transform/Transform.ts:373
find ▸ find (path
): Transform
<Container
>
路径查找节点
Type parameters Hierarchy Table of contents Constructors Properties Accessors Methods Constructors constructor • new Thing <T
>(classConstructor?
)
Type parameters Parameters Overrides Transform .constructor
Defined in src/core/thing/Thing.ts:6
Properties _anchor • _anchor : Vector2
Inherited from Transform ._anchor
Defined in src/core/transform/Transform.ts:175
_rotation • _rotation : number
= 0
Inherited from Transform ._rotation
Defined in src/core/transform/Transform.ts:164
active • active : boolean
= true
Inherited from Transform .active
Defined in src/core/transform/Transform.ts:27
alone • alone : boolean
= false
Inherited from Transform .alone
Defined in src/core/transform/Transform.ts:24
alpha • alpha : number
= 1
透明度
Inherited from Transform .alpha
Defined in src/core/transform/Transform.ts:237
children • children : Transform
<Container
>[] = []
子节点
Inherited from Transform .children
Defined in src/core/transform/Transform.ts:313
components • components : Component
[] = []
所有组件 默认包含一个容器组件,当添加了其他容器组件后自动替换,只能包含一个视觉组件
Inherited from Transform .components
Defined in src/core/transform/Transform.ts:206
container • container : T
Inherited from Transform .container
Defined in src/core/transform/Transform.ts:201
deliver • deliver : boolean
= true
是否继续向父元素传递事件(冒泡)
Inherited from Transform .deliver
Defined in src/core/transform/Transform.ts:228
emitter • emitter : EventEmitter
<TransformEvent
, any
>
Inherited from Transform .emitter
Defined in src/core/transform/Transform.ts:30
id • id : number
= 0
Inherited from Transform .id
Defined in src/core/transform/Transform.ts:22
name • name : string
= 'node'
Inherited from Transform .name
Defined in src/core/transform/Transform.ts:29
parent • Optional
parent : Transform
<Container
>
父节点
Inherited from Transform .parent
Defined in src/core/transform/Transform.ts:211
pierce • pierce : boolean
= false
是否穿透,可触发非父元素外的其它元素事件
Inherited from Transform .pierce
Defined in src/core/transform/Transform.ts:232
redraw • redraw : boolean
= false
Inherited from Transform .redraw
Defined in src/core/transform/Transform.ts:32
Event ▪ Static
Event : Object
事件
Type declaration Name Type Description ADDED
"ADDED"
当添加到显示舞台时 CHANGE_DISPLY
"CHANGE_DISPLY"
可见元素发生变化时(需要渲染的元素) CHILD_ADDED
"CHILD_ADDED"
当添加新的字节点时 REMOVED
"REMOVED"
当被移除于舞台时 REPOSITION
"REPOSITION"
位置发生变化 RESIZE
"RESIZE"
尺寸发生变化时 TICKER_AFTER
"TICKER_AFTER"
帧刷新后 TICKER_BEFORE
"TICKER_BEFORE"
帧刷新前
Inherited from Transform .Event
Defined in src/core/transform/Transform.ts:36
Accessors anchor • get
anchor (): Vector2
锚点
Returns Vector2
Inherited from Transform.anchor
Defined in src/core/transform/Transform.ts:179
• set
anchor (value
): void
Parameters Returns void
Inherited from Transform.anchor
Defined in src/core/transform/Transform.ts:182
anchorX • get
anchorX (): number
Returns number
Inherited from Transform.anchorX
Defined in src/core/transform/Transform.ts:186
• set
anchorX (val
): void
Parameters Returns void
Inherited from Transform.anchorX
Defined in src/core/transform/Transform.ts:189
anchorY • get
anchorY (): number
Returns number
Inherited from Transform.anchorY
Defined in src/core/transform/Transform.ts:193
• set
anchorY (val
): void
Parameters Returns void
Inherited from Transform.anchorY
Defined in src/core/transform/Transform.ts:196
height • get
height (): number
Returns number
Inherited from Transform.height
Defined in src/core/transform/Transform.ts:130
• set
height (val
): void
Parameters Returns void
Inherited from Transform.height
Defined in src/core/transform/Transform.ts:133
position • get
position (): Vector2
位置
Returns Vector2
Inherited from Transform.position
Defined in src/core/transform/Transform.ts:90
• set
position (value
): void
Parameters Returns void
Inherited from Transform.position
Defined in src/core/transform/Transform.ts:93
rotation • get
rotation (): number
旋转
Returns number
Inherited from Transform.rotation
Defined in src/core/transform/Transform.ts:168
• set
rotation (value
): void
Parameters Returns void
Inherited from Transform.rotation
Defined in src/core/transform/Transform.ts:171
scale • get
scale (): Vector2
缩放
Returns Vector2
Inherited from Transform.scale
Defined in src/core/transform/Transform.ts:143
• set
scale (value
): void
Parameters Returns void
Inherited from Transform.scale
Defined in src/core/transform/Transform.ts:146
scaleX • get
scaleX (): number
Returns number
Inherited from Transform.scaleX
Defined in src/core/transform/Transform.ts:150
• set
scaleX (val
): void
Parameters Returns void
Inherited from Transform.scaleX
Defined in src/core/transform/Transform.ts:153
scaleY • get
scaleY (): number
Returns number
Inherited from Transform.scaleY
Defined in src/core/transform/Transform.ts:157
• set
scaleY (val
): void
Parameters Returns void
Inherited from Transform.scaleY
Defined in src/core/transform/Transform.ts:160
size • get
size (): Vector2
大小
Returns Vector2
Inherited from Transform.size
Defined in src/core/transform/Transform.ts:116
• set
size (value
): void
Parameters Returns void
Inherited from Transform.size
Defined in src/core/transform/Transform.ts:119
touch • get
touch (): boolean
Returns boolean
Inherited from Transform.touch
Defined in src/core/transform/Transform.ts:221
• set
touch (val
): void
触摸事件,默认关闭
Parameters Returns void
Inherited from Transform.touch
Defined in src/core/transform/Transform.ts:217
width • get
width (): number
Returns number
Inherited from Transform.width
Defined in src/core/transform/Transform.ts:124
• set
width (val
): void
Parameters Returns void
Inherited from Transform.width
Defined in src/core/transform/Transform.ts:127
x • get
x (): number
Returns number
Inherited from Transform.x
Defined in src/core/transform/Transform.ts:97
• set
x (val
): void
Parameters Returns void
Inherited from Transform.x
Defined in src/core/transform/Transform.ts:100
y • get
y (): number
Returns number
Inherited from Transform.y
Defined in src/core/transform/Transform.ts:105
• set
y (val
): void
Parameters Returns void
Inherited from Transform.y
Defined in src/core/transform/Transform.ts:108
Methods addChild ▸ addChild <U
>(transform
, props?
): U
插入一个子节点
Type parameters Parameters Name Type Description transform
U
待插入的节点 props?
Props
<U
>-
Returns U
Inherited from Transform .addChild
Defined in src/core/transform/Transform.ts:319
addChildAt ▸ addChildAt (child
, index
): void
在指定位置插入节点
Parameters Returns void
Inherited from Transform .addChildAt
Defined in src/core/transform/Transform.ts:334
addComponent ▸ addComponent <T
>(classConstructor
, props?
): T
添加一个组件
Type parameters Parameters Returns T
Inherited from Transform .addComponent
Defined in src/core/transform/Transform.ts:243
destroy ▸ destroy (): void
消毁
Returns void
Inherited from Transform .destroy
Defined in src/core/transform/Transform.ts:383
find ▸ find (path
): Transform
<Container
>
路径查找节点
ts // 创建身体节点
const body = new Transform () ;
// 设置名称
body . name = ' body ' ;
@@ -25,4 +25,4 @@ import{_ as e,c as a,o as r,N as t}from"./chunks/framework.2075e729.js";const b=
body . find ( ' head/lEye ' ) ;
// 从身体获取右眼
body . find ( ' head/rEye ' ) ;
-
Path
Parameters Name Type path
string
| string
[]
Returns Transform
<Container
>
Inherited from Transform .find
Defined in src/core/transform/Transform.ts:412
getComponent ▸ getComponent <T
>(classConstructor
): T
获取单个组件,获取首个匹配到的组件
Type parameters Parameters Returns T
Inherited from Transform .getComponent
Defined in src/core/transform/Transform.ts:258
getComponents ▸ getComponents <T
>(classConstructor
): T
[]
获取所有组件
Type parameters Parameters Returns T
[]
Inherited from Transform .getComponents
Defined in src/core/transform/Transform.ts:266
getComponentsInChildren ▸ getComponentsInChildren <T
>(classConstructor
): T
[]
从子节点获取所有组件,不会包含当前节点 递归查询所有子节点的
Type parameters Parameters Returns T
[]
Inherited from Transform .getComponentsInChildren
Defined in src/core/transform/Transform.ts:282
getOffset ▸ getOffset (): Vector2
获取右上角偏真实移量
Returns Vector2
Inherited from Transform .getOffset
Defined in src/core/transform/Transform.ts:450
getWordPoisition ▸ getWordPoisition (): Vector2
获取相对世界坐标
Returns Vector2
Inherited from Transform .getWordPoisition
Defined in src/core/transform/Transform.ts:457
getWordScale ▸ getWordScale (): Vector2
获取相对于世界的缩放
Returns Vector2
Inherited from Transform .getWordScale
Defined in src/core/transform/Transform.ts:469
onDestroy ▸ Optional
onDestroy (): void
Returns void
Inherited from Transform .onDestroy
Defined in src/core/transform/Transform.ts:379
removeAllComponent ▸ removeAllComponent (): void
移除所有组件
Returns void
Inherited from Transform .removeAllComponent
Defined in src/core/transform/Transform.ts:248
removeChild ▸ removeChild (transform
): void
移除一个节点
Parameters Returns void
Inherited from Transform .removeChild
Defined in src/core/transform/Transform.ts:336
removeChildAt ▸ removeChildAt (index
): Transform
<Container
>
移除一个指定位置的元素
Parameters Name Type Description index
number
要移除节点的位置
Returns Transform
<Container
>
Inherited from Transform .removeChildAt
Defined in src/core/transform/Transform.ts:349
removeChildren ▸ removeChildren (): void
移除所有子元素
Returns void
Inherited from Transform .removeChildren
Defined in src/core/transform/Transform.ts:358
removeComponent ▸ removeComponent (component
): void
移除一个组件
Parameters Returns void
Inherited from Transform .removeComponent
Defined in src/core/transform/Transform.ts:241
render ▸ Optional
render (): Thing
<T
>
Returns Thing
<T
>
Defined in src/core/thing/Thing.ts:13
select ▸ select (queryString
): any
[]
根据name查找节点
Parameters Name Type queryString
string
| string
[]
Returns any
[]
Inherited from Transform .select
Defined in src/core/transform/Transform.ts:431
start ▸ Optional
start (): void
Returns void
Defined in src/core/thing/Thing.ts:11
update ▸ update (time
): void
Parameters Returns void
Inherited from Transform .update
Defined in src/core/transform/Transform.ts:366
`,647),d=[n];function i(h,l,s,c,f,m){return r(),a("div",null,d)}const u=e(o,[["render",i]]);export{b as __pageData,u as default};
+Path
Parameters Name Type path
string
| string
[]
Returns Transform
<Container
>
Inherited from Transform .find
Defined in src/core/transform/Transform.ts:422
getComponent ▸ getComponent <T
>(classConstructor
): T
获取单个组件,获取首个匹配到的组件
Type parameters Parameters Returns T
Inherited from Transform .getComponent
Defined in src/core/transform/Transform.ts:268
getComponents ▸ getComponents <T
>(classConstructor
): T
[]
获取所有组件
Type parameters Parameters Returns T
[]
Inherited from Transform .getComponents
Defined in src/core/transform/Transform.ts:276
getComponentsInChildren ▸ getComponentsInChildren <T
>(classConstructor
): T
[]
从子节点获取所有组件,不会包含当前节点 递归查询所有子节点的
Type parameters Parameters Returns T
[]
Inherited from Transform .getComponentsInChildren
Defined in src/core/transform/Transform.ts:292
getOffset ▸ getOffset (): Vector2
获取右上角偏真实移量
Returns Vector2
Inherited from Transform .getOffset
Defined in src/core/transform/Transform.ts:460
getWordPoisition ▸ getWordPoisition (): Vector2
获取相对世界坐标
Returns Vector2
Inherited from Transform .getWordPoisition
Defined in src/core/transform/Transform.ts:467
getWordScale ▸ getWordScale (): Vector2
获取相对于世界的缩放
Returns Vector2
Inherited from Transform .getWordScale
Defined in src/core/transform/Transform.ts:479
onDestroy ▸ Optional
onDestroy (): void
Returns void
Inherited from Transform .onDestroy
Defined in src/core/transform/Transform.ts:389
removeAllComponent ▸ removeAllComponent (): void
移除所有组件
Returns void
Inherited from Transform .removeAllComponent
Defined in src/core/transform/Transform.ts:258
removeChild ▸ removeChild (transform
): void
移除一个节点
Parameters Returns void
Inherited from Transform .removeChild
Defined in src/core/transform/Transform.ts:346
removeChildAt ▸ removeChildAt (index
): Transform
<Container
>
移除一个指定位置的元素
Parameters Name Type Description index
number
要移除节点的位置
Returns Transform
<Container
>
Inherited from Transform .removeChildAt
Defined in src/core/transform/Transform.ts:359
removeChildren ▸ removeChildren (): void
移除所有子元素
Returns void
Inherited from Transform .removeChildren
Defined in src/core/transform/Transform.ts:368
removeComponent ▸ removeComponent (component
): void
移除一个组件
Parameters Returns void
Inherited from Transform .removeComponent
Defined in src/core/transform/Transform.ts:251
render ▸ Optional
render (): Thing
<T
>
Returns Thing
<T
>
Defined in src/core/thing/Thing.ts:13
select ▸ select (queryString
): any
[]
根据name查找节点
Parameters Name Type queryString
string
| string
[]
Returns any
[]
Inherited from Transform .select
Defined in src/core/transform/Transform.ts:441
start ▸ Optional
start (): void
Returns void
Defined in src/core/thing/Thing.ts:11
update ▸ update (time
): void
Parameters Returns void
Inherited from Transform .update
Defined in src/core/transform/Transform.ts:376
`,647),i=[n];function l(h,d,s,c,f,m){return r(),a("div",null,i)}const u=e(o,[["render",l]]);export{b as __pageData,u as default};
diff --git a/assets/dist_classes_Thing.md.c48f44f5.lean.js b/assets/dist_classes_Thing.md.d39528a9.lean.js
similarity index 51%
rename from assets/dist_classes_Thing.md.c48f44f5.lean.js
rename to assets/dist_classes_Thing.md.d39528a9.lean.js
index 21ff5e2..67231d1 100644
--- a/assets/dist_classes_Thing.md.c48f44f5.lean.js
+++ b/assets/dist_classes_Thing.md.d39528a9.lean.js
@@ -1 +1 @@
-import{_ as e,c as a,o as r,N as t}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Thing","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Thing.md"}'),o={name:"dist/classes/Thing.md"},n=t("",647),d=[n];function i(h,l,s,c,f,m){return r(),a("div",null,d)}const u=e(o,[["render",i]]);export{b as __pageData,u as default};
+import{_ as e,c as a,o as r,N as t}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Thing","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Thing.md"}'),o={name:"dist/classes/Thing.md"},n=t("",647),i=[n];function l(h,d,s,c,f,m){return r(),a("div",null,i)}const u=e(o,[["render",l]]);export{b as __pageData,u as default};
diff --git a/assets/dist_classes_Ticker.md.3a22fc28.js b/assets/dist_classes_Ticker.md.39e83cf7.js
similarity index 97%
rename from assets/dist_classes_Ticker.md.3a22fc28.js
rename to assets/dist_classes_Ticker.md.39e83cf7.js
index dad0a1f..4a27a65 100644
--- a/assets/dist_classes_Ticker.md.3a22fc28.js
+++ b/assets/dist_classes_Ticker.md.39e83cf7.js
@@ -1 +1 @@
-import{_ as e,c as t,o as a,N as r}from"./chunks/framework.2075e729.js";const p=JSON.parse('{"title":"Class: Ticker","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Ticker.md"}'),d={name:"dist/classes/Ticker.md"},o=r('Class: Ticker 刷新器
Hierarchy Table of contents Constructors Properties Accessors Methods Constructors constructor • new Ticker ()
Inherited from EE.constructor
Properties _stepTime • _stepTime : number
Defined in src/core/ticker/Ticker.ts:27
animationFrame • animationFrame : number
Defined in src/core/ticker/Ticker.ts:38
deltaTime • deltaTime : number
= 1
上一帧和当前帧间隔时间 ms
Defined in src/core/ticker/Ticker.ts:51
fillTime • fillTime : number
= 0
需要填补的时间
Defined in src/core/ticker/Ticker.ts:60
lastFrameTime • lastFrameTime : number
= 0
上一次屏幕刷新的时间
Defined in src/core/ticker/Ticker.ts:55
lastTime • lastTime : number
= 0
记录上一帧的时间
Defined in src/core/ticker/Ticker.ts:25
paused • paused : boolean
= false
Defined in src/core/ticker/Ticker.ts:92
prefixed ▪ Static
prefixed : string
| boolean
Inherited from EE.prefixed
Defined in node_modules/eventemitter3/index.d.ts:9
Accessors FPS • get
FPS (): number
每秒帧数 最大帧数不会超过浏览器刷新率 默认每秒60帧
Returns number
Defined in src/core/ticker/Ticker.ts:14
• set
FPS (val
): void
Parameters Returns void
Defined in src/core/ticker/Ticker.ts:17
Methods addListener ▸ addListener <T
>(event
, fn
, context?
): Ticker
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
fn
(...args
: any
[]) => void
context?
any
Returns Ticker
Inherited from EE.addListener
Defined in node_modules/eventemitter3/index.d.ts:45
destroy ▸ destroy (): void
销毁
Returns void
Defined in src/core/ticker/Ticker.ts:105
emit ▸ emit <T
>(event
, ...args
): boolean
Calls each of the listeners registered for a given event.
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
...args
any
[]
Returns boolean
Inherited from EE.emit
Defined in node_modules/eventemitter3/index.d.ts:32
eventNames ▸ eventNames (): (string
| symbol
)[]
Return an array listing the events for which the emitter has registered listeners.
Returns (string
| symbol
)[]
Inherited from EE.eventNames
Defined in node_modules/eventemitter3/index.d.ts:15
listenerCount ▸ listenerCount (event
): number
Return the number of listeners listening to a given event.
Parameters Name Type event
string
| symbol
Returns number
Inherited from EE.listenerCount
Defined in node_modules/eventemitter3/index.d.ts:27
listeners ▸ listeners <T
>(event
): (...args
: any
[]) => void
[]
Return the listeners registered for a given event.
Type parameters Name Type T
extends string
| symbol
Parameters Returns (...args
: any
[]) => void
[]
Inherited from EE.listeners
Defined in node_modules/eventemitter3/index.d.ts:20
off ▸ off <T
>(event
, fn?
, context?
, once?
): Ticker
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
fn?
(...args
: any
[]) => void
context?
any
once?
boolean
Returns Ticker
Inherited from EE.off
Defined in node_modules/eventemitter3/index.d.ts:69
on ▸ on <T
>(event
, fn
, context?
): Ticker
Add a listener for a given event.
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
fn
(...args
: any
[]) => void
context?
any
Returns Ticker
Inherited from EE.on
Defined in node_modules/eventemitter3/index.d.ts:40
once ▸ once <T
>(event
, fn
, context?
): Ticker
Add a one-time listener for a given event.
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
fn
(...args
: any
[]) => void
context?
any
Returns Ticker
Inherited from EE.once
Defined in node_modules/eventemitter3/index.d.ts:54
removeAllListeners ▸ removeAllListeners (event?
): Ticker
Remove all listeners, or those of the specified event.
Parameters Name Type event?
string
| symbol
Returns Ticker
Inherited from EE.removeAllListeners
Defined in node_modules/eventemitter3/index.d.ts:79
removeListener ▸ removeListener <T
>(event
, fn?
, context?
, once?
): Ticker
Remove the listeners of a given event.
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
fn?
(...args
: any
[]) => void
context?
any
once?
boolean
Returns Ticker
Inherited from EE.removeListener
Defined in node_modules/eventemitter3/index.d.ts:63
start ▸ start (): void
开始
Returns void
Defined in src/core/ticker/Ticker.ts:32
stop ▸ stop (): void
暂停
Returns void
Defined in src/core/ticker/Ticker.ts:97
update ▸ update (time
): void
每次刷新要执行的内容
Parameters Returns void
Defined in src/core/ticker/Ticker.ts:65
',243),i=[o];function n(l,s,h,c,f,m){return a(),t("div",null,i)}const u=e(d,[["render",n]]);export{p as __pageData,u as default};
+import{_ as e,c as t,o as a,N as r}from"./chunks/framework.2075e729.js";const p=JSON.parse('{"title":"Class: Ticker","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Ticker.md"}'),d={name:"dist/classes/Ticker.md"},o=r('Class: Ticker 刷新器
Hierarchy Table of contents Constructors Properties Accessors Methods Constructors constructor • new Ticker ()
Inherited from EE.constructor
Properties _stepTime • _stepTime : number
Defined in src/core/ticker/Ticker.ts:27
animationFrame • animationFrame : number
Defined in src/core/ticker/Ticker.ts:38
deltaTime • deltaTime : number
= 1
上一帧和当前帧间隔时间 ms
Defined in src/core/ticker/Ticker.ts:51
fillTime • fillTime : number
= 0
需要填补的时间
Defined in src/core/ticker/Ticker.ts:60
lastFrameTime • lastFrameTime : number
= 0
上一次屏幕刷新的时间
Defined in src/core/ticker/Ticker.ts:55
lastTime • lastTime : number
= 0
记录上一帧的时间
Defined in src/core/ticker/Ticker.ts:25
paused • paused : boolean
= false
Defined in src/core/ticker/Ticker.ts:92
prefixed ▪ Static
prefixed : string
| boolean
Inherited from EE.prefixed
Defined in node_modules/eventemitter3/index.d.ts:9
Accessors FPS • get
FPS (): number
每秒帧数 最大帧数不会超过浏览器刷新率 默认每秒60帧
Returns number
Defined in src/core/ticker/Ticker.ts:14
• set
FPS (val
): void
Parameters Returns void
Defined in src/core/ticker/Ticker.ts:17
Methods addListener ▸ addListener <T
>(event
, fn
, context?
): Ticker
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
fn
(...args
: any
[]) => void
context?
any
Returns Ticker
Inherited from EE.addListener
Defined in node_modules/eventemitter3/index.d.ts:45
destroy ▸ destroy (): void
销毁
Returns void
Defined in src/core/ticker/Ticker.ts:105
emit ▸ emit <T
>(event
, ...args
): boolean
Calls each of the listeners registered for a given event.
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
...args
any
[]
Returns boolean
Inherited from EE.emit
Defined in node_modules/eventemitter3/index.d.ts:32
eventNames ▸ eventNames (): (string
| symbol
)[]
Return an array listing the events for which the emitter has registered listeners.
Returns (string
| symbol
)[]
Inherited from EE.eventNames
Defined in node_modules/eventemitter3/index.d.ts:15
listenerCount ▸ listenerCount (event
): number
Return the number of listeners listening to a given event.
Parameters Name Type event
string
| symbol
Returns number
Inherited from EE.listenerCount
Defined in node_modules/eventemitter3/index.d.ts:27
listeners ▸ listeners <T
>(event
): (...args
: any
[]) => void
[]
Return the listeners registered for a given event.
Type parameters Name Type T
extends string
| symbol
Parameters Returns (...args
: any
[]) => void
[]
Inherited from EE.listeners
Defined in node_modules/eventemitter3/index.d.ts:20
off ▸ off <T
>(event
, fn?
, context?
, once?
): Ticker
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
fn?
(...args
: any
[]) => void
context?
any
once?
boolean
Returns Ticker
Inherited from EE.off
Defined in node_modules/eventemitter3/index.d.ts:69
on ▸ on <T
>(event
, fn
, context?
): Ticker
Add a listener for a given event.
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
fn
(...args
: any
[]) => void
context?
any
Returns Ticker
Inherited from EE.on
Defined in node_modules/eventemitter3/index.d.ts:40
once ▸ once <T
>(event
, fn
, context?
): Ticker
Add a one-time listener for a given event.
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
fn
(...args
: any
[]) => void
context?
any
Returns Ticker
Inherited from EE.once
Defined in node_modules/eventemitter3/index.d.ts:54
removeAllListeners ▸ removeAllListeners (event?
): Ticker
Remove all listeners, or those of the specified event.
Parameters Name Type event?
string
| symbol
Returns Ticker
Inherited from EE.removeAllListeners
Defined in node_modules/eventemitter3/index.d.ts:79
removeListener ▸ removeListener <T
>(event
, fn?
, context?
, once?
): Ticker
Remove the listeners of a given event.
Type parameters Name Type T
extends string
| symbol
Parameters Name Type event
T
fn?
(...args
: any
[]) => void
context?
any
once?
boolean
Returns Ticker
Inherited from EE.removeListener
Defined in node_modules/eventemitter3/index.d.ts:63
start ▸ start (): void
开始
Returns void
Defined in src/core/ticker/Ticker.ts:32
stop ▸ stop (): void
暂停
Returns void
Defined in src/core/ticker/Ticker.ts:97
update ▸ update (time
): void
每次刷新要执行的内容
Parameters Returns void
Defined in src/core/ticker/Ticker.ts:65
',243),i=[o];function n(l,s,h,c,f,m){return a(),t("div",null,i)}const u=e(d,[["render",n]]);export{p as __pageData,u as default};
diff --git a/assets/dist_classes_Ticker.md.3a22fc28.lean.js b/assets/dist_classes_Ticker.md.39e83cf7.lean.js
similarity index 100%
rename from assets/dist_classes_Ticker.md.3a22fc28.lean.js
rename to assets/dist_classes_Ticker.md.39e83cf7.lean.js
diff --git a/assets/dist_classes_Transform.md.c373fa87.js b/assets/dist_classes_Transform.md.f311c13e.js
similarity index 50%
rename from assets/dist_classes_Transform.md.c373fa87.js
rename to assets/dist_classes_Transform.md.f311c13e.js
index effba1e..8ae9629 100644
--- a/assets/dist_classes_Transform.md.c373fa87.js
+++ b/assets/dist_classes_Transform.md.f311c13e.js
@@ -1,5 +1,5 @@
import{_ as e,c as t,o as a,N as r}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Class: Transform","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Transform.md"}'),o={name:"dist/classes/Transform.md"},n=r(`节点,用于构建整个项目的节点树,也是所有组件挂载的节点
ts const node = new Transform () ;
-
Type parameters Hierarchy Table of contents Constructors Properties Accessors Methods Constructors constructor • new Transform <T
>(classConstructor?
)
一个节点只能挂载一个视觉组件
Type parameters Parameters Defined in src/core/transform/Transform.ts:69
Properties _anchor • _anchor : Vector2
Defined in src/core/transform/Transform.ts:165
_rotation • _rotation : number
= 0
Defined in src/core/transform/Transform.ts:154
active • active : boolean
= true
Defined in src/core/transform/Transform.ts:27
alone • alone : boolean
= false
Defined in src/core/transform/Transform.ts:24
alpha • alpha : number
= 1
透明度
Defined in src/core/transform/Transform.ts:227
children • children : Transform
<Container
>[] = []
子节点
Defined in src/core/transform/Transform.ts:303
components • components : Component
[] = []
所有组件 默认包含一个容器组件,当添加了其他容器组件后自动替换,只能包含一个视觉组件
Defined in src/core/transform/Transform.ts:196
container • container : T
Defined in src/core/transform/Transform.ts:191
deliver • deliver : boolean
= true
是否继续向父元素传递事件(冒泡)
Defined in src/core/transform/Transform.ts:218
emitter • emitter : EventEmitter
<TransformEvent
, any
>
Defined in src/core/transform/Transform.ts:30
id • id : number
= 0
Defined in src/core/transform/Transform.ts:22
name • name : string
= 'node'
Defined in src/core/transform/Transform.ts:29
parent • Optional
parent : Transform
<Container
>
父节点
Defined in src/core/transform/Transform.ts:201
pierce • pierce : boolean
= false
是否穿透,可触发非父元素外的其它元素事件
Defined in src/core/transform/Transform.ts:222
redraw • redraw : boolean
= false
Defined in src/core/transform/Transform.ts:32
Event ▪ Static
Event : Object
事件
Type declaration Name Type Description ADDED
"ADDED"
当添加到显示舞台时 CHILD_ADDED
"CHILD_ADDED"
当添加新的字节点时 REPOSITION
"REPOSITION"
位置发生变化 RESIZE
"RESIZE"
尺寸发生变化时 TICKER_AFTER
"TICKER_AFTER"
帧刷新后 TICKER_BEFORE
"TICKER_BEFORE"
帧刷新前
Defined in src/core/transform/Transform.ts:36
Accessors anchor • get
anchor (): Vector2
锚点
Returns Vector2
Defined in src/core/transform/Transform.ts:169
• set
anchor (value
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:172
anchorX • get
anchorX (): number
Returns number
Defined in src/core/transform/Transform.ts:176
• set
anchorX (val
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:179
anchorY • get
anchorY (): number
Returns number
Defined in src/core/transform/Transform.ts:183
• set
anchorY (val
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:186
height • get
height (): number
Returns number
Defined in src/core/transform/Transform.ts:120
• set
height (val
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:123
position • get
position (): Vector2
位置
Returns Vector2
Defined in src/core/transform/Transform.ts:80
• set
position (value
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:83
rotation • get
rotation (): number
旋转
Returns number
Defined in src/core/transform/Transform.ts:158
• set
rotation (value
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:161
scale • get
scale (): Vector2
缩放
Returns Vector2
Defined in src/core/transform/Transform.ts:133
• set
scale (value
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:136
scaleX • get
scaleX (): number
Returns number
Defined in src/core/transform/Transform.ts:140
• set
scaleX (val
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:143
scaleY • get
scaleY (): number
Returns number
Defined in src/core/transform/Transform.ts:147
• set
scaleY (val
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:150
size • get
size (): Vector2
大小
Returns Vector2
Defined in src/core/transform/Transform.ts:106
• set
size (value
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:109
touch • get
touch (): boolean
Returns boolean
Defined in src/core/transform/Transform.ts:211
• set
touch (val
): void
触摸事件,默认关闭
Parameters Returns void
Defined in src/core/transform/Transform.ts:207
width • get
width (): number
Returns number
Defined in src/core/transform/Transform.ts:114
• set
width (val
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:117
x • get
x (): number
Returns number
Defined in src/core/transform/Transform.ts:87
• set
x (val
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:90
y • get
y (): number
Returns number
Defined in src/core/transform/Transform.ts:95
• set
y (val
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:98
Methods addChild ▸ addChild <U
>(transform
, props?
): U
插入一个子节点
Type parameters Parameters Name Type Description transform
U
待插入的节点 props?
Props
<U
>-
Returns U
Defined in src/core/transform/Transform.ts:309
addChildAt ▸ addChildAt (child
, index
): void
在指定位置插入节点
Parameters Returns void
Defined in src/core/transform/Transform.ts:324
addComponent ▸ addComponent <T
>(classConstructor
, props?
): T
添加一个组件
Type parameters Parameters Returns T
Defined in src/core/transform/Transform.ts:233
destroy ▸ destroy (): void
消毁
Returns void
Defined in src/core/transform/Transform.ts:373
find ▸ find (path
): Transform
<Container
>
路径查找节点
Type parameters Hierarchy Table of contents Constructors Properties Accessors Methods Constructors constructor • new Transform <T
>(classConstructor?
)
一个节点只能挂载一个视觉组件
Type parameters Parameters Defined in src/core/transform/Transform.ts:79
Properties _anchor • _anchor : Vector2
Defined in src/core/transform/Transform.ts:175
_rotation • _rotation : number
= 0
Defined in src/core/transform/Transform.ts:164
active • active : boolean
= true
Defined in src/core/transform/Transform.ts:27
alone • alone : boolean
= false
Defined in src/core/transform/Transform.ts:24
alpha • alpha : number
= 1
透明度
Defined in src/core/transform/Transform.ts:237
children • children : Transform
<Container
>[] = []
子节点
Defined in src/core/transform/Transform.ts:313
components • components : Component
[] = []
所有组件 默认包含一个容器组件,当添加了其他容器组件后自动替换,只能包含一个视觉组件
Defined in src/core/transform/Transform.ts:206
container • container : T
Defined in src/core/transform/Transform.ts:201
deliver • deliver : boolean
= true
是否继续向父元素传递事件(冒泡)
Defined in src/core/transform/Transform.ts:228
emitter • emitter : EventEmitter
<TransformEvent
, any
>
Defined in src/core/transform/Transform.ts:30
id • id : number
= 0
Defined in src/core/transform/Transform.ts:22
name • name : string
= 'node'
Defined in src/core/transform/Transform.ts:29
parent • Optional
parent : Transform
<Container
>
父节点
Defined in src/core/transform/Transform.ts:211
pierce • pierce : boolean
= false
是否穿透,可触发非父元素外的其它元素事件
Defined in src/core/transform/Transform.ts:232
redraw • redraw : boolean
= false
Defined in src/core/transform/Transform.ts:32
Event ▪ Static
Event : Object
事件
Type declaration Name Type Description ADDED
"ADDED"
当添加到显示舞台时 CHANGE_DISPLY
"CHANGE_DISPLY"
可见元素发生变化时(需要渲染的元素) CHILD_ADDED
"CHILD_ADDED"
当添加新的字节点时 REMOVED
"REMOVED"
当被移除于舞台时 REPOSITION
"REPOSITION"
位置发生变化 RESIZE
"RESIZE"
尺寸发生变化时 TICKER_AFTER
"TICKER_AFTER"
帧刷新后 TICKER_BEFORE
"TICKER_BEFORE"
帧刷新前
Defined in src/core/transform/Transform.ts:36
Accessors anchor • get
anchor (): Vector2
锚点
Returns Vector2
Defined in src/core/transform/Transform.ts:179
• set
anchor (value
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:182
anchorX • get
anchorX (): number
Returns number
Defined in src/core/transform/Transform.ts:186
• set
anchorX (val
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:189
anchorY • get
anchorY (): number
Returns number
Defined in src/core/transform/Transform.ts:193
• set
anchorY (val
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:196
height • get
height (): number
Returns number
Defined in src/core/transform/Transform.ts:130
• set
height (val
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:133
position • get
position (): Vector2
位置
Returns Vector2
Defined in src/core/transform/Transform.ts:90
• set
position (value
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:93
rotation • get
rotation (): number
旋转
Returns number
Defined in src/core/transform/Transform.ts:168
• set
rotation (value
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:171
scale • get
scale (): Vector2
缩放
Returns Vector2
Defined in src/core/transform/Transform.ts:143
• set
scale (value
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:146
scaleX • get
scaleX (): number
Returns number
Defined in src/core/transform/Transform.ts:150
• set
scaleX (val
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:153
scaleY • get
scaleY (): number
Returns number
Defined in src/core/transform/Transform.ts:157
• set
scaleY (val
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:160
size • get
size (): Vector2
大小
Returns Vector2
Defined in src/core/transform/Transform.ts:116
• set
size (value
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:119
touch • get
touch (): boolean
Returns boolean
Defined in src/core/transform/Transform.ts:221
• set
touch (val
): void
触摸事件,默认关闭
Parameters Returns void
Defined in src/core/transform/Transform.ts:217
width • get
width (): number
Returns number
Defined in src/core/transform/Transform.ts:124
• set
width (val
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:127
x • get
x (): number
Returns number
Defined in src/core/transform/Transform.ts:97
• set
x (val
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:100
y • get
y (): number
Returns number
Defined in src/core/transform/Transform.ts:105
• set
y (val
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:108
Methods addChild ▸ addChild <U
>(transform
, props?
): U
插入一个子节点
Type parameters Parameters Name Type Description transform
U
待插入的节点 props?
Props
<U
>-
Returns U
Defined in src/core/transform/Transform.ts:319
addChildAt ▸ addChildAt (child
, index
): void
在指定位置插入节点
Parameters Returns void
Defined in src/core/transform/Transform.ts:334
addComponent ▸ addComponent <T
>(classConstructor
, props?
): T
添加一个组件
Type parameters Parameters Returns T
Defined in src/core/transform/Transform.ts:243
destroy ▸ destroy (): void
消毁
Returns void
Defined in src/core/transform/Transform.ts:383
find ▸ find (path
): Transform
<Container
>
路径查找节点
ts // 创建身体节点
const body = new Transform () ;
// 设置名称
body . name = ' body ' ;
@@ -25,4 +25,4 @@ import{_ as e,c as t,o as a,N as r}from"./chunks/framework.2075e729.js";const b=
body . find ( ' head/lEye ' ) ;
// 从身体获取右眼
body . find ( ' head/rEye ' ) ;
-
Path
Parameters Name Type path
string
| string
[]
Returns Transform
<Container
>
Defined in src/core/transform/Transform.ts:412
getComponent ▸ getComponent <T
>(classConstructor
): T
获取单个组件,获取首个匹配到的组件
Type parameters Parameters Returns T
Defined in src/core/transform/Transform.ts:258
getComponents ▸ getComponents <T
>(classConstructor
): T
[]
获取所有组件
Type parameters Parameters Returns T
[]
Defined in src/core/transform/Transform.ts:266
getComponentsInChildren ▸ getComponentsInChildren <T
>(classConstructor
): T
[]
从子节点获取所有组件,不会包含当前节点 递归查询所有子节点的
Type parameters Parameters Returns T
[]
Defined in src/core/transform/Transform.ts:282
getOffset ▸ getOffset (): Vector2
获取右上角偏真实移量
Returns Vector2
Defined in src/core/transform/Transform.ts:450
getWordPoisition ▸ getWordPoisition (): Vector2
获取相对世界坐标
Returns Vector2
Defined in src/core/transform/Transform.ts:457
getWordScale ▸ getWordScale (): Vector2
获取相对于世界的缩放
Returns Vector2
Defined in src/core/transform/Transform.ts:469
onDestroy ▸ Optional
onDestroy (): void
Returns void
Defined in src/core/transform/Transform.ts:379
removeAllComponent ▸ removeAllComponent (): void
移除所有组件
Returns void
Defined in src/core/transform/Transform.ts:248
removeChild ▸ removeChild (transform
): void
移除一个节点
Parameters Returns void
Defined in src/core/transform/Transform.ts:336
removeChildAt ▸ removeChildAt (index
): Transform
<Container
>
移除一个指定位置的元素
Parameters Name Type Description index
number
要移除节点的位置
Returns Transform
<Container
>
Defined in src/core/transform/Transform.ts:349
removeChildren ▸ removeChildren (): void
移除所有子元素
Returns void
Defined in src/core/transform/Transform.ts:358
removeComponent ▸ removeComponent (component
): void
移除一个组件
Parameters Returns void
Defined in src/core/transform/Transform.ts:241
select ▸ select (queryString
): any
[]
根据name查找节点
Parameters Name Type queryString
string
| string
[]
Returns any
[]
Defined in src/core/transform/Transform.ts:431
update ▸ update (time
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:366
`,506),s=[n];function l(d,i,h,c,f,p){return a(),t("div",null,s)}const u=e(o,[["render",l]]);export{b as __pageData,u as default};
+Path
Parameters Name Type path
string
| string
[]
Returns Transform
<Container
>
Defined in src/core/transform/Transform.ts:422
getComponent ▸ getComponent <T
>(classConstructor
): T
获取单个组件,获取首个匹配到的组件
Type parameters Parameters Returns T
Defined in src/core/transform/Transform.ts:268
getComponents ▸ getComponents <T
>(classConstructor
): T
[]
获取所有组件
Type parameters Parameters Returns T
[]
Defined in src/core/transform/Transform.ts:276
getComponentsInChildren ▸ getComponentsInChildren <T
>(classConstructor
): T
[]
从子节点获取所有组件,不会包含当前节点 递归查询所有子节点的
Type parameters Parameters Returns T
[]
Defined in src/core/transform/Transform.ts:292
getOffset ▸ getOffset (): Vector2
获取右上角偏真实移量
Returns Vector2
Defined in src/core/transform/Transform.ts:460
getWordPoisition ▸ getWordPoisition (): Vector2
获取相对世界坐标
Returns Vector2
Defined in src/core/transform/Transform.ts:467
getWordScale ▸ getWordScale (): Vector2
获取相对于世界的缩放
Returns Vector2
Defined in src/core/transform/Transform.ts:479
onDestroy ▸ Optional
onDestroy (): void
Returns void
Defined in src/core/transform/Transform.ts:389
removeAllComponent ▸ removeAllComponent (): void
移除所有组件
Returns void
Defined in src/core/transform/Transform.ts:258
removeChild ▸ removeChild (transform
): void
移除一个节点
Parameters Returns void
Defined in src/core/transform/Transform.ts:346
removeChildAt ▸ removeChildAt (index
): Transform
<Container
>
移除一个指定位置的元素
Parameters Name Type Description index
number
要移除节点的位置
Returns Transform
<Container
>
Defined in src/core/transform/Transform.ts:359
removeChildren ▸ removeChildren (): void
移除所有子元素
Returns void
Defined in src/core/transform/Transform.ts:368
removeComponent ▸ removeComponent (component
): void
移除一个组件
Parameters Returns void
Defined in src/core/transform/Transform.ts:251
select ▸ select (queryString
): any
[]
根据name查找节点
Parameters Name Type queryString
string
| string
[]
Returns any
[]
Defined in src/core/transform/Transform.ts:441
update ▸ update (time
): void
Parameters Returns void
Defined in src/core/transform/Transform.ts:376
`,506),s=[n];function l(d,i,h,c,f,p){return a(),t("div",null,s)}const u=e(o,[["render",l]]);export{b as __pageData,u as default};
diff --git a/assets/dist_classes_Transform.md.c373fa87.lean.js b/assets/dist_classes_Transform.md.f311c13e.lean.js
similarity index 100%
rename from assets/dist_classes_Transform.md.c373fa87.lean.js
rename to assets/dist_classes_Transform.md.f311c13e.lean.js
diff --git a/assets/dist_classes_Vector2.md.8ccc873b.js b/assets/dist_classes_Vector2.md.c63b31db.js
similarity index 92%
rename from assets/dist_classes_Vector2.md.8ccc873b.js
rename to assets/dist_classes_Vector2.md.c63b31db.js
index cd10489..3f5c01b 100644
--- a/assets/dist_classes_Vector2.md.8ccc873b.js
+++ b/assets/dist_classes_Vector2.md.c63b31db.js
@@ -1 +1 @@
-import{_ as e,c as t,o as a,N as r}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Class: Vector2","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Vector2.md"}'),o={name:"dist/classes/Vector2.md"},d=r('Class: Vector2 二维向量
Table of contents Constructors Properties Accessors Methods Constructors constructor • new Vector2 (num?
)
Parameters Defined in src/core/math/Vector2.ts:10
• new Vector2 (vector2
)
Parameters Defined in src/core/math/Vector2.ts:11
• new Vector2 (x
, y
)
Parameters Defined in src/core/math/Vector2.ts:12
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
Defined in src/core/math/Vector2.ts:8
Accessors x • get
x (): number
Returns number
Defined in src/core/math/Vector2.ts:22
• set
x (val
): void
Parameters Returns void
Defined in src/core/math/Vector2.ts:18
y • get
y (): number
Returns number
Defined in src/core/math/Vector2.ts:31
• set
y (val
): void
Parameters Returns void
Defined in src/core/math/Vector2.ts:27
Methods add ▸ add (num
): Vector2
向量加法
Parameters Returns Vector2
Defined in src/core/math/Vector2.ts:62
▸ add (x
, y
): Vector2
Parameters Returns Vector2
Defined in src/core/math/Vector2.ts:63
▸ add (vector2
): Vector2
Parameters Returns Vector2
Defined in src/core/math/Vector2.ts:64
clone ▸ clone (): Vector2
克隆
Returns Vector2
Defined in src/core/math/Vector2.ts:53
mul ▸ mul (num
): Vector2
向量缩放
Parameters Returns Vector2
Defined in src/core/math/Vector2.ts:80
▸ mul (x
, y
): Vector2
Parameters Returns Vector2
Defined in src/core/math/Vector2.ts:81
▸ mul (num
): Vector2
向量两个方向分别缩放
Parameters Returns Vector2
Defined in src/core/math/Vector2.ts:85
normalized ▸ normalized (): Vector2
向量归一化
Returns Vector2
归一化后的向量
Defined in src/core/math/Vector2.ts:103
set ▸ set (num
): Vector2
Parameters Returns Vector2
Defined in src/core/math/Vector2.ts:34
▸ set (x
, y
): Vector2
Parameters Returns Vector2
Defined in src/core/math/Vector2.ts:35
▸ set (vector2
): Vector2
Parameters Returns Vector2
Defined in src/core/math/Vector2.ts:36
toArray ▸ toArray (): [number
, number
]
Returns [number
, number
]
Defined in src/core/math/Vector2.ts:108
',157),l=[d];function n(h,c,i,s,b,m){return a(),t("div",null,l)}const p=e(o,[["render",n]]);export{u as __pageData,p as default};
+import{_ as e,c as t,o as a,N as r}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Class: Vector2","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Vector2.md"}'),o={name:"dist/classes/Vector2.md"},d=r('Class: Vector2 二维向量
Table of contents Constructors Properties Accessors Methods Constructors constructor • new Vector2 (num?
)
Parameters Defined in src/core/math/Vector2.ts:10
• new Vector2 (vector2
)
Parameters Defined in src/core/math/Vector2.ts:11
• new Vector2 (x
, y
)
Parameters Defined in src/core/math/Vector2.ts:12
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
Defined in src/core/math/Vector2.ts:8
Accessors x • get
x (): number
Returns number
Defined in src/core/math/Vector2.ts:22
• set
x (val
): void
Parameters Returns void
Defined in src/core/math/Vector2.ts:18
y • get
y (): number
Returns number
Defined in src/core/math/Vector2.ts:31
• set
y (val
): void
Parameters Returns void
Defined in src/core/math/Vector2.ts:27
Methods add ▸ add (num
): Vector2
向量加法
Parameters Returns Vector2
Defined in src/core/math/Vector2.ts:62
▸ add (x
, y
): Vector2
Parameters Returns Vector2
Defined in src/core/math/Vector2.ts:63
▸ add (vector2
): Vector2
Parameters Returns Vector2
Defined in src/core/math/Vector2.ts:64
clone ▸ clone (): Vector2
克隆
Returns Vector2
Defined in src/core/math/Vector2.ts:53
mul ▸ mul (num
): Vector2
向量缩放
Parameters Returns Vector2
Defined in src/core/math/Vector2.ts:80
▸ mul (x
, y
): Vector2
Parameters Returns Vector2
Defined in src/core/math/Vector2.ts:81
▸ mul (num
): Vector2
向量两个方向分别缩放
Parameters Returns Vector2
Defined in src/core/math/Vector2.ts:85
normalized ▸ normalized (): Vector2
向量归一化
Returns Vector2
归一化后的向量
Defined in src/core/math/Vector2.ts:103
set ▸ set (num
): Vector2
Parameters Returns Vector2
Defined in src/core/math/Vector2.ts:34
▸ set (x
, y
): Vector2
Parameters Returns Vector2
Defined in src/core/math/Vector2.ts:35
▸ set (vector2
): Vector2
Parameters Returns Vector2
Defined in src/core/math/Vector2.ts:36
toArray ▸ toArray (): [number
, number
]
Returns [number
, number
]
Defined in src/core/math/Vector2.ts:108
',157),l=[d];function n(h,c,i,s,f,m){return a(),t("div",null,l)}const p=e(o,[["render",n]]);export{u as __pageData,p as default};
diff --git a/assets/dist_classes_Vector2.md.8ccc873b.lean.js b/assets/dist_classes_Vector2.md.c63b31db.lean.js
similarity index 83%
rename from assets/dist_classes_Vector2.md.8ccc873b.lean.js
rename to assets/dist_classes_Vector2.md.c63b31db.lean.js
index 137465d..9a1b0f1 100644
--- a/assets/dist_classes_Vector2.md.8ccc873b.lean.js
+++ b/assets/dist_classes_Vector2.md.c63b31db.lean.js
@@ -1 +1 @@
-import{_ as e,c as t,o as a,N as r}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Class: Vector2","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Vector2.md"}'),o={name:"dist/classes/Vector2.md"},d=r("",157),l=[d];function n(h,c,i,s,b,m){return a(),t("div",null,l)}const p=e(o,[["render",n]]);export{u as __pageData,p as default};
+import{_ as e,c as t,o as a,N as r}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Class: Vector2","description":"","frontmatter":{},"headers":[],"relativePath":"dist/classes/Vector2.md"}'),o={name:"dist/classes/Vector2.md"},d=r("",157),l=[d];function n(h,c,i,s,f,m){return a(),t("div",null,l)}const p=e(o,[["render",n]]);export{u as __pageData,p as default};
diff --git a/assets/dist_enums_TextAlgin.md.5dada477.js b/assets/dist_enums_TextAlgin.md.1002f610.js
similarity index 88%
rename from assets/dist_enums_TextAlgin.md.5dada477.js
rename to assets/dist_enums_TextAlgin.md.1002f610.js
index 17f1e05..1189cf7 100644
--- a/assets/dist_enums_TextAlgin.md.5dada477.js
+++ b/assets/dist_enums_TextAlgin.md.1002f610.js
@@ -1 +1 @@
-import{_ as e,c as t,o as a,N as n}from"./chunks/framework.2075e729.js";const f=JSON.parse('{"title":"Enumeration: TextAlgin","description":"","frontmatter":{},"headers":[],"relativePath":"dist/enums/TextAlgin.md"}'),r={name:"dist/enums/TextAlgin.md"},o=n('Enumeration: TextAlgin Table of contents Enumeration Members Enumeration Members CENTER • CENTER = "center"
Defined in src/core/component/Text.ts:7
LEFT • LEFT = "left"
Defined in src/core/component/Text.ts:6
RIGHT • RIGHT = "right"
Defined in src/core/component/Text.ts:8
',19),i=[o];function l(h,s,c,d,m,u){return a(),t("div",null,i)}const x=e(r,[["render",l]]);export{f as __pageData,x as default};
+import{_ as e,c as t,o as a,N as n}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Enumeration: TextAlgin","description":"","frontmatter":{},"headers":[],"relativePath":"dist/enums/TextAlgin.md"}'),r={name:"dist/enums/TextAlgin.md"},o=n('Enumeration: TextAlgin Table of contents Enumeration Members Enumeration Members CENTER • CENTER = "center"
Defined in src/core/component/Text.ts:7
LEFT • LEFT = "left"
Defined in src/core/component/Text.ts:6
RIGHT • RIGHT = "right"
Defined in src/core/component/Text.ts:8
',19),i=[o];function l(h,s,c,d,m,u){return a(),t("div",null,i)}const x=e(r,[["render",l]]);export{b as __pageData,x as default};
diff --git a/assets/dist_enums_TextAlgin.md.5dada477.lean.js b/assets/dist_enums_TextAlgin.md.1002f610.lean.js
similarity index 66%
rename from assets/dist_enums_TextAlgin.md.5dada477.lean.js
rename to assets/dist_enums_TextAlgin.md.1002f610.lean.js
index af075f7..d807fa4 100644
--- a/assets/dist_enums_TextAlgin.md.5dada477.lean.js
+++ b/assets/dist_enums_TextAlgin.md.1002f610.lean.js
@@ -1 +1 @@
-import{_ as e,c as t,o as a,N as n}from"./chunks/framework.2075e729.js";const f=JSON.parse('{"title":"Enumeration: TextAlgin","description":"","frontmatter":{},"headers":[],"relativePath":"dist/enums/TextAlgin.md"}'),r={name:"dist/enums/TextAlgin.md"},o=n("",19),i=[o];function l(h,s,c,d,m,u){return a(),t("div",null,i)}const x=e(r,[["render",l]]);export{f as __pageData,x as default};
+import{_ as e,c as t,o as a,N as n}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Enumeration: TextAlgin","description":"","frontmatter":{},"headers":[],"relativePath":"dist/enums/TextAlgin.md"}'),r={name:"dist/enums/TextAlgin.md"},o=n("",19),i=[o];function l(h,s,c,d,m,u){return a(),t("div",null,i)}const x=e(r,[["render",l]]);export{b as __pageData,x as default};
diff --git a/assets/dist_enums_TouchEvent.md.86c263de.js b/assets/dist_enums_TouchEvent.md.7c759a9a.js
similarity index 88%
rename from assets/dist_enums_TouchEvent.md.86c263de.js
rename to assets/dist_enums_TouchEvent.md.7c759a9a.js
index 39f5b52..8ca95fd 100644
--- a/assets/dist_enums_TouchEvent.md.86c263de.js
+++ b/assets/dist_enums_TouchEvent.md.7c759a9a.js
@@ -1 +1 @@
-import{_ as e,c as t,o as a,N as n}from"./chunks/framework.2075e729.js";const _=JSON.parse('{"title":"Enumeration: TouchEvent","description":"","frontmatter":{},"headers":[],"relativePath":"dist/enums/TouchEvent.md"}'),o={name:"dist/enums/TouchEvent.md"},r=n('Enumeration: TouchEvent 触摸屏事件
Table of contents Enumeration Members Enumeration Members TOUCH_BEGIN • TOUCH_BEGIN = "TOUCH_BEGIN"
触摸开始
Defined in src/core/event/TouchEvent.ts:8
TOUCH_END • TOUCH_END = "TOUCH_END"
触摸结束
Defined in src/core/event/TouchEvent.ts:12
TOUCH_MOVE • TOUCH_MOVE = "ROUCH_MOVE"
移动手指
Defined in src/core/event/TouchEvent.ts:20
',23),h=[r];function i(c,s,d,u,l,m){return a(),t("div",null,h)}const f=e(o,[["render",i]]);export{_ as __pageData,f as default};
+import{_ as e,c as t,o as a,N as n}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Enumeration: TouchEvent","description":"","frontmatter":{},"headers":[],"relativePath":"dist/enums/TouchEvent.md"}'),o={name:"dist/enums/TouchEvent.md"},r=n('Enumeration: TouchEvent 触摸屏事件
Table of contents Enumeration Members Enumeration Members TOUCH_BEGIN • TOUCH_BEGIN = "TOUCH_BEGIN"
触摸开始
Defined in src/core/event/TouchEvent.ts:8
TOUCH_END • TOUCH_END = "TOUCH_END"
触摸结束
Defined in src/core/event/TouchEvent.ts:12
TOUCH_MOVE • TOUCH_MOVE = "ROUCH_MOVE"
移动手指
Defined in src/core/event/TouchEvent.ts:20
',23),h=[r];function i(c,s,u,d,l,m){return a(),t("div",null,h)}const f=e(o,[["render",i]]);export{b as __pageData,f as default};
diff --git a/assets/dist_enums_TouchEvent.md.86c263de.lean.js b/assets/dist_enums_TouchEvent.md.7c759a9a.lean.js
similarity index 50%
rename from assets/dist_enums_TouchEvent.md.86c263de.lean.js
rename to assets/dist_enums_TouchEvent.md.7c759a9a.lean.js
index eae015a..7db966f 100644
--- a/assets/dist_enums_TouchEvent.md.86c263de.lean.js
+++ b/assets/dist_enums_TouchEvent.md.7c759a9a.lean.js
@@ -1 +1 @@
-import{_ as e,c as t,o as a,N as n}from"./chunks/framework.2075e729.js";const _=JSON.parse('{"title":"Enumeration: TouchEvent","description":"","frontmatter":{},"headers":[],"relativePath":"dist/enums/TouchEvent.md"}'),o={name:"dist/enums/TouchEvent.md"},r=n("",23),h=[r];function i(c,s,d,u,l,m){return a(),t("div",null,h)}const f=e(o,[["render",i]]);export{_ as __pageData,f as default};
+import{_ as e,c as t,o as a,N as n}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Enumeration: TouchEvent","description":"","frontmatter":{},"headers":[],"relativePath":"dist/enums/TouchEvent.md"}'),o={name:"dist/enums/TouchEvent.md"},r=n("",23),h=[r];function i(c,s,u,d,l,m){return a(),t("div",null,h)}const f=e(o,[["render",i]]);export{b as __pageData,f as default};
diff --git a/assets/dist_interfaces_IComponent.md.a72d8679.js b/assets/dist_interfaces_IComponent.md.70a7e079.js
similarity index 91%
rename from assets/dist_interfaces_IComponent.md.a72d8679.js
rename to assets/dist_interfaces_IComponent.md.70a7e079.js
index 9b01300..4386ad2 100644
--- a/assets/dist_interfaces_IComponent.md.a72d8679.js
+++ b/assets/dist_interfaces_IComponent.md.70a7e079.js
@@ -1 +1 @@
-import{_ as e,c as t,o as a,N as o}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Interface: IComponent","description":"","frontmatter":{},"headers":[],"relativePath":"dist/interfaces/IComponent.md"}'),r={name:"dist/interfaces/IComponent.md"},n=o('Interface: IComponent Hierarchy Implemented by Table of contents Methods Methods destroy ▸ Optional
destroy (): void
Returns void
Defined in src/core/component/IComponent.ts:4
onDestroy ▸ Optional
onDestroy (): void
Returns void
Defined in src/core/component/IComponent.ts:5
start ▸ Optional
start (): void
Returns void
Defined in src/core/component/IComponent.ts:2
update ▸ Optional
update (time
): void
Parameters Returns void
Defined in src/core/component/IComponent.ts:3
',38),d=[n];function i(h,s,l,c,p,m){return a(),t("div",null,d)}const f=e(r,[["render",i]]);export{b as __pageData,f as default};
+import{_ as e,c as t,o as a,N as o}from"./chunks/framework.2075e729.js";const f=JSON.parse('{"title":"Interface: IComponent","description":"","frontmatter":{},"headers":[],"relativePath":"dist/interfaces/IComponent.md"}'),r={name:"dist/interfaces/IComponent.md"},n=o('Interface: IComponent Hierarchy Implemented by Table of contents Methods Methods destroy ▸ Optional
destroy (): void
Returns void
Defined in src/core/component/IComponent.ts:4
onDestroy ▸ Optional
onDestroy (): void
Returns void
Defined in src/core/component/IComponent.ts:5
start ▸ Optional
start (): void
Returns void
Defined in src/core/component/IComponent.ts:2
update ▸ Optional
update (time
): void
Parameters Returns void
Defined in src/core/component/IComponent.ts:3
',38),d=[n];function i(h,s,l,c,p,m){return a(),t("div",null,d)}const b=e(r,[["render",i]]);export{f as __pageData,b as default};
diff --git a/assets/dist_interfaces_IComponent.md.a72d8679.lean.js b/assets/dist_interfaces_IComponent.md.70a7e079.lean.js
similarity index 67%
rename from assets/dist_interfaces_IComponent.md.a72d8679.lean.js
rename to assets/dist_interfaces_IComponent.md.70a7e079.lean.js
index 68a8372..d3ac4d1 100644
--- a/assets/dist_interfaces_IComponent.md.a72d8679.lean.js
+++ b/assets/dist_interfaces_IComponent.md.70a7e079.lean.js
@@ -1 +1 @@
-import{_ as e,c as t,o as a,N as o}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Interface: IComponent","description":"","frontmatter":{},"headers":[],"relativePath":"dist/interfaces/IComponent.md"}'),r={name:"dist/interfaces/IComponent.md"},n=o("",38),d=[n];function i(h,s,l,c,p,m){return a(),t("div",null,d)}const f=e(r,[["render",i]]);export{b as __pageData,f as default};
+import{_ as e,c as t,o as a,N as o}from"./chunks/framework.2075e729.js";const f=JSON.parse('{"title":"Interface: IComponent","description":"","frontmatter":{},"headers":[],"relativePath":"dist/interfaces/IComponent.md"}'),r={name:"dist/interfaces/IComponent.md"},n=o("",38),d=[n];function i(h,s,l,c,p,m){return a(),t("div",null,d)}const b=e(r,[["render",i]]);export{f as __pageData,b as default};
diff --git a/assets/dist_interfaces_IContainer.md.b14f7694.js b/assets/dist_interfaces_IContainer.md.b7359550.js
similarity index 94%
rename from assets/dist_interfaces_IContainer.md.b14f7694.js
rename to assets/dist_interfaces_IContainer.md.b7359550.js
index a4d0ac6..c1bf897 100644
--- a/assets/dist_interfaces_IContainer.md.b14f7694.js
+++ b/assets/dist_interfaces_IContainer.md.b7359550.js
@@ -1 +1 @@
-import{_ as e,c as t,o as a,N as r}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Interface: IContainer","description":"","frontmatter":{},"headers":[],"relativePath":"dist/interfaces/IContainer.md"}'),o={name:"dist/interfaces/IContainer.md"},n=r('Interface: IContainer 显示对象
Hierarchy Table of contents Methods Methods destroy ▸ Optional
destroy (): void
Returns void
Inherited from IComponent .destroy
Defined in src/core/component/IComponent.ts:4
onDestroy ▸ Optional
onDestroy (): void
Returns void
Inherited from IComponent .onDestroy
Defined in src/core/component/IComponent.ts:5
start ▸ Optional
start (): void
Returns void
Inherited from IComponent .start
Defined in src/core/component/IComponent.ts:2
update ▸ Optional
update (time
): void
Parameters Returns void
Inherited from IComponent .update
Defined in src/core/component/IComponent.ts:3
',45),i=[n];function d(h,s,l,c,m,p){return a(),t("div",null,i)}const b=e(o,[["render",d]]);export{u as __pageData,b as default};
+import{_ as e,c as t,o as a,N as r}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Interface: IContainer","description":"","frontmatter":{},"headers":[],"relativePath":"dist/interfaces/IContainer.md"}'),o={name:"dist/interfaces/IContainer.md"},n=r('Interface: IContainer 显示对象
Hierarchy Table of contents Methods Methods destroy ▸ Optional
destroy (): void
Returns void
Inherited from IComponent .destroy
Defined in src/core/component/IComponent.ts:4
onDestroy ▸ Optional
onDestroy (): void
Returns void
Inherited from IComponent .onDestroy
Defined in src/core/component/IComponent.ts:5
start ▸ Optional
start (): void
Returns void
Inherited from IComponent .start
Defined in src/core/component/IComponent.ts:2
update ▸ Optional
update (time
): void
Parameters Returns void
Inherited from IComponent .update
Defined in src/core/component/IComponent.ts:3
',45),i=[n];function d(h,s,l,c,m,f){return a(),t("div",null,i)}const b=e(o,[["render",d]]);export{u as __pageData,b as default};
diff --git a/assets/dist_interfaces_IContainer.md.b14f7694.lean.js b/assets/dist_interfaces_IContainer.md.b7359550.lean.js
similarity index 83%
rename from assets/dist_interfaces_IContainer.md.b14f7694.lean.js
rename to assets/dist_interfaces_IContainer.md.b7359550.lean.js
index f4403ba..1f8a028 100644
--- a/assets/dist_interfaces_IContainer.md.b14f7694.lean.js
+++ b/assets/dist_interfaces_IContainer.md.b7359550.lean.js
@@ -1 +1 @@
-import{_ as e,c as t,o as a,N as r}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Interface: IContainer","description":"","frontmatter":{},"headers":[],"relativePath":"dist/interfaces/IContainer.md"}'),o={name:"dist/interfaces/IContainer.md"},n=r("",45),i=[n];function d(h,s,l,c,m,p){return a(),t("div",null,i)}const b=e(o,[["render",d]]);export{u as __pageData,b as default};
+import{_ as e,c as t,o as a,N as r}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"Interface: IContainer","description":"","frontmatter":{},"headers":[],"relativePath":"dist/interfaces/IContainer.md"}'),o={name:"dist/interfaces/IContainer.md"},n=r("",45),i=[n];function d(h,s,l,c,m,f){return a(),t("div",null,i)}const b=e(o,[["render",d]]);export{u as __pageData,b as default};
diff --git a/assets/dist_interfaces_ILoader.md.eaa443e6.js b/assets/dist_interfaces_ILoader.md.24a0ddd5.js
similarity index 95%
rename from assets/dist_interfaces_ILoader.md.eaa443e6.js
rename to assets/dist_interfaces_ILoader.md.24a0ddd5.js
index 866c42a..0d9ea3e 100644
--- a/assets/dist_interfaces_ILoader.md.eaa443e6.js
+++ b/assets/dist_interfaces_ILoader.md.24a0ddd5.js
@@ -1 +1 @@
-import{_ as e,c as a,o as t,N as o}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Interface: ILoader","description":"","frontmatter":{},"headers":[],"relativePath":"dist/interfaces/ILoader.md"}'),r={name:"dist/interfaces/ILoader.md"},d=o('Interface: ILoader Implemented by Table of contents Methods Methods load ▸ load (source
): Promise
<any
>
Parameters Returns Promise
<any
>
Defined in src/core/resource/loader/ILoader.ts:2
',15),l=[d];function s(n,i,c,h,m,f){return t(),a("div",null,l)}const _=e(r,[["render",s]]);export{b as __pageData,_ as default};
+import{_ as e,c as a,o as t,N as o}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Interface: ILoader","description":"","frontmatter":{},"headers":[],"relativePath":"dist/interfaces/ILoader.md"}'),r={name:"dist/interfaces/ILoader.md"},d=o('Interface: ILoader Implemented by Table of contents Methods Methods load ▸ load (source
): Promise
<any
>
Parameters Returns Promise
<any
>
Defined in src/core/resource/loader/ILoader.ts:2
',15),l=[d];function s(n,i,c,h,m,f){return t(),a("div",null,l)}const _=e(r,[["render",s]]);export{b as __pageData,_ as default};
diff --git a/assets/dist_interfaces_ILoader.md.eaa443e6.lean.js b/assets/dist_interfaces_ILoader.md.24a0ddd5.lean.js
similarity index 100%
rename from assets/dist_interfaces_ILoader.md.eaa443e6.lean.js
rename to assets/dist_interfaces_ILoader.md.24a0ddd5.lean.js
diff --git a/assets/dist_interfaces_IRes.md.56be1388.js b/assets/dist_interfaces_IRes.md.da0f2c55.js
similarity index 90%
rename from assets/dist_interfaces_IRes.md.56be1388.js
rename to assets/dist_interfaces_IRes.md.da0f2c55.js
index bac1fac..bd76930 100644
--- a/assets/dist_interfaces_IRes.md.56be1388.js
+++ b/assets/dist_interfaces_IRes.md.da0f2c55.js
@@ -1 +1 @@
-import{_ as e,c as a,o as r,N as t}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Interface: IRes","description":"","frontmatter":{},"headers":[],"relativePath":"dist/interfaces/IRes.md"}'),o={name:"dist/interfaces/IRes.md"},i=t('Interface: IRes Table of contents Properties Properties data • data : any
Defined in src/core/resource/Resource.ts:8
type • type : string
Defined in src/core/resource/Resource.ts:9
url • url : string
Defined in src/core/resource/Resource.ts:10
',19),s=[i];function n(c,d,l,h,f,u){return r(),a("div",null,s)}const _=e(o,[["render",n]]);export{b as __pageData,_ as default};
+import{_ as e,c as a,o as r,N as t}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Interface: IRes","description":"","frontmatter":{},"headers":[],"relativePath":"dist/interfaces/IRes.md"}'),o={name:"dist/interfaces/IRes.md"},i=t('Interface: IRes Table of contents Properties Properties data • data : any
Defined in src/core/resource/Resource.ts:8
type • type : string
Defined in src/core/resource/Resource.ts:9
url • url : string
Defined in src/core/resource/Resource.ts:10
',19),s=[i];function n(c,l,d,h,f,u){return r(),a("div",null,s)}const _=e(o,[["render",n]]);export{b as __pageData,_ as default};
diff --git a/assets/dist_interfaces_IRes.md.56be1388.lean.js b/assets/dist_interfaces_IRes.md.da0f2c55.lean.js
similarity index 83%
rename from assets/dist_interfaces_IRes.md.56be1388.lean.js
rename to assets/dist_interfaces_IRes.md.da0f2c55.lean.js
index 8cfd94e..0305294 100644
--- a/assets/dist_interfaces_IRes.md.56be1388.lean.js
+++ b/assets/dist_interfaces_IRes.md.da0f2c55.lean.js
@@ -1 +1 @@
-import{_ as e,c as a,o as r,N as t}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Interface: IRes","description":"","frontmatter":{},"headers":[],"relativePath":"dist/interfaces/IRes.md"}'),o={name:"dist/interfaces/IRes.md"},i=t("",19),s=[i];function n(c,d,l,h,f,u){return r(),a("div",null,s)}const _=e(o,[["render",n]]);export{b as __pageData,_ as default};
+import{_ as e,c as a,o as r,N as t}from"./chunks/framework.2075e729.js";const b=JSON.parse('{"title":"Interface: IRes","description":"","frontmatter":{},"headers":[],"relativePath":"dist/interfaces/IRes.md"}'),o={name:"dist/interfaces/IRes.md"},i=t("",19),s=[i];function n(c,l,d,h,f,u){return r(),a("div",null,s)}const _=e(o,[["render",n]]);export{b as __pageData,_ as default};
diff --git a/assets/dist_modules.md.e54800e7.js b/assets/dist_modules.md.4c491917.js
similarity index 96%
rename from assets/dist_modules.md.e54800e7.js
rename to assets/dist_modules.md.4c491917.js
index e1b88dd..94e28d4 100644
--- a/assets/dist_modules.md.e54800e7.js
+++ b/assets/dist_modules.md.4c491917.js
@@ -1,4 +1,4 @@
-import{_ as e,c as t,o as a,N as l}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"hxg","description":"","frontmatter":{},"headers":[],"relativePath":"dist/modules.md"}'),r={name:"dist/modules.md"},o=l(`hxg Table of contents Enumerations Classes Interfaces Type Aliases Variables Functions Type Aliases AtlasFrame Ƭ AtlasFrame : Object
Type declaration Name Type Description frame
{ h
: number
; w
: number
; x
: number
; y
: number
} 原图裁剪参数 frame.h
number
- frame.w
number
- frame.x
number
- frame.y
number
- pivot
{ x
: number
; y
: number
} - pivot.x
number
- pivot.y
number
- rotated
boolean
- sourceSize
{ h
: number
; w
: number
} 即将渲染的画布尺寸(不确定) sourceSize.h
number
- sourceSize.w
number
- spriteSourceSize
{ h
: number
; w
: number
; x
: number
; y
: number
} 裁剪后的修正尺寸(放到即将渲染的画布的实际位置和尺寸)(不确定) spriteSourceSize.h
number
- spriteSourceSize.w
number
- spriteSourceSize.x
number
- spriteSourceSize.y
number
-
Defined in src/core/component/SpriteSheet.ts:8
Constructor Ƭ Constructor <T
>: (...args
: any
[]) => T
Type parameters Type declaration • (...args
)
Parameters Defined in src/core/transform/Transform.ts:9
LoadOptions Ƭ LoadOptions : Object
资源加载参数
Type declaration Name Type Description loader?
ILoader
当前资源的独特加载器 type
string
类型
Defined in src/core/resource/Resource.ts:19
LoadResListConfig Ƭ LoadResListConfig : (string
| [string
, string
])[]
资源列表
Defined in src/core/resource/GroupLoader.ts:7
Options Ƭ Options : Partial
<{ height
: number
; width
: number
}>
Defined in src/core/Application.ts:5
Props Ƭ Props <T
>: { [P in keyof T]?: Props<T[P]> }
Type parameters Defined in src/core/utils/setProps.ts:1
SheetFrames Ƭ SheetFrames : Object
Type declaration Name Type animations
{ Attack
: string
[] } animations.Attack
string
[]frames
Record
<string
, AtlasFrame
>meta
{ app
: string
; format
: string
; image
: string
; scale
: number
; size
: { h
: number
; w
: number
} ; version
: string
} meta.app
string
meta.format
string
meta.image
string
meta.scale
number
meta.size
{ h
: number
; w
: number
} meta.size.h
number
meta.size.w
number
meta.version
string
Defined in src/core/component/SpriteSheet.ts:43
TextureResource Ƭ TextureResource : HTMLImageElement
| HTMLCanvasElement
| ImageBitmap
Defined in src/core/texture/Texture.ts:4
Ƭ TransformEvent : ValueOf
<typeof Event
> | \`\${TouchEvent}\`
Defined in src/core/transform/Transform.ts:10
Variables ticker • Const
ticker : Ticker
Defined in src/core/ticker/Ticker.ts:110
Functions canvas2d ▸ canvas2d (canvas
): (app
: Application
) => void
canvas2d相关工作
Parameters Name Type canvas
HTMLCanvasElement
Returns fn
▸ (app
): void
Parameters Returns void
Defined in src/core/canvas2d/index.ts:23
isHitPoint ▸ isHitPoint (point
, transform
): boolean
判断点是否落在某个tansform区域
ts // 创建节点
+import{_ as e,c as t,o as a,N as l}from"./chunks/framework.2075e729.js";const u=JSON.parse('{"title":"hxg","description":"","frontmatter":{},"headers":[],"relativePath":"dist/modules.md"}'),r={name:"dist/modules.md"},o=l(`hxg Table of contents Enumerations Classes Interfaces Type Aliases Variables Functions Type Aliases AtlasFrame Ƭ AtlasFrame : Object
Type declaration Name Type Description frame
{ h
: number
; w
: number
; x
: number
; y
: number
} 原图裁剪参数 frame.h
number
- frame.w
number
- frame.x
number
- frame.y
number
- pivot
{ x
: number
; y
: number
} - pivot.x
number
- pivot.y
number
- rotated
boolean
- sourceSize
{ h
: number
; w
: number
} 即将渲染的画布尺寸(不确定) sourceSize.h
number
- sourceSize.w
number
- spriteSourceSize
{ h
: number
; w
: number
; x
: number
; y
: number
} 裁剪后的修正尺寸(放到即将渲染的画布的实际位置和尺寸)(不确定) spriteSourceSize.h
number
- spriteSourceSize.w
number
- spriteSourceSize.x
number
- spriteSourceSize.y
number
-
Defined in src/core/component/SpriteSheet.ts:8
Constructor Ƭ Constructor <T
>: (...args
: any
[]) => T
Type parameters Type declaration • (...args
)
Parameters Defined in src/core/transform/Transform.ts:9
LoadOptions Ƭ LoadOptions : Object
资源加载参数
Type declaration Name Type Description loader?
ILoader
当前资源的独特加载器 type
string
类型
Defined in src/core/resource/Resource.ts:19
LoadResListConfig Ƭ LoadResListConfig : (string
| [string
, string
])[]
资源列表
Defined in src/core/resource/GroupLoader.ts:7
Options Ƭ Options : Partial
<{ height
: number
; width
: number
}>
Defined in src/core/Application.ts:5
Props Ƭ Props <T
>: { [P in keyof T]?: Props<T[P]> }
Type parameters Defined in src/core/utils/setProps.ts:1
SheetFrames Ƭ SheetFrames : Object
Type declaration Name Type animations
{ Attack
: string
[] } animations.Attack
string
[]frames
Record
<string
, AtlasFrame
>meta
{ app
: string
; format
: string
; image
: string
; scale
: number
; size
: { h
: number
; w
: number
} ; version
: string
} meta.app
string
meta.format
string
meta.image
string
meta.scale
number
meta.size
{ h
: number
; w
: number
} meta.size.h
number
meta.size.w
number
meta.version
string
Defined in src/core/component/SpriteSheet.ts:43
TextureResource Ƭ TextureResource : HTMLImageElement
| HTMLCanvasElement
| ImageBitmap
Defined in src/core/texture/Texture.ts:4
Ƭ TransformEvent : ValueOf
<typeof Event
> | \`\${TouchEvent}\`
Defined in src/core/transform/Transform.ts:10
Variables ticker • Const
ticker : Ticker
Defined in src/core/ticker/Ticker.ts:110
Functions canvas2d ▸ canvas2d (canvas
): (app
: Application
) => void
canvas2d相关工作
Parameters Name Type canvas
HTMLCanvasElement
Returns fn
▸ (app
): void
Parameters Returns void
Defined in src/core/canvas2d/index.ts:23
isHitPoint ▸ isHitPoint (point
, transform
): boolean
判断点是否落在某个tansform区域
ts // 创建节点
const node = new Transform () ;
// 设置位置
node . position . set ( 100 , 100 ) ;
@@ -9,4 +9,4 @@ import{_ as e,c as t,o as a,N as l}from"./chunks/framework.2075e729.js";const u=
// 落点判定
const isHit = isHitPoint (node , { x : 150 , y : 150 } ) ;
console . log ( ' isHit ' , isHit) ;
-
Parameters Returns boolean
Defined in src/core/utils/hitTest.ts:23
request ▸ request (url
): Promise
<XMLHttpRequest
>
Parameters Returns Promise
<XMLHttpRequest
>
Defined in src/core/utils/request.ts:1
setProps ▸ setProps <T
>(obj
, props
): void
快速设置
Type parameters Parameters Name Type obj
T
props
Props
<T
>
Returns void
Defined in src/core/utils/setProps.ts:9
touchEventListener ▸ touchEventListener (canvas
): (app
: Application
) => void
Parameters Name Type canvas
HTMLCanvasElement
Returns fn
▸ (app
): void
Parameters Returns void
Defined in src/core/event/touchEventListener.ts:39
`,141),s=[o];function n(d,i,c,h,p,f){return a(),t("div",null,s)}const y=e(r,[["render",n]]);export{u as __pageData,y as default};
+
Parameters Returns boolean
Defined in src/core/utils/hitTest.ts:23
request ▸ request (url
): Promise
<XMLHttpRequest
>
Parameters Returns Promise
<XMLHttpRequest
>
Defined in src/core/utils/request.ts:1
setProps ▸ setProps <T
>(obj
, props
): void
快速设置
Type parameters Parameters Name Type obj
T
props
Props
<T
>
Returns void
Defined in src/core/utils/setProps.ts:9
touchEventListener ▸ touchEventListener (canvas
): (app
: Application
) => void
Parameters Name Type canvas
HTMLCanvasElement
Returns fn
▸ (app
): void
Parameters Returns void
Defined in src/core/event/touchEventListener.ts:39
`,141),s=[o];function n(d,i,c,h,p,f){return a(),t("div",null,s)}const y=e(r,[["render",n]]);export{u as __pageData,y as default};
diff --git a/assets/dist_modules.md.e54800e7.lean.js b/assets/dist_modules.md.4c491917.lean.js
similarity index 100%
rename from assets/dist_modules.md.e54800e7.lean.js
rename to assets/dist_modules.md.4c491917.lean.js
diff --git a/dist/README.html b/dist/README.html
index d67ecb6..f7a713c 100644
--- a/dist/README.html
+++ b/dist/README.html
@@ -36,7 +36,7 @@
// 设置文字内容
text . value = ' hello word! ' ;
-
-
@@ -24,8 +24,8 @@
width : 500 ,
height : 500
} ) ;
-Table of contents Constructors Properties Methods Constructors constructor • new Application (config?
)
Parameters Name Type config
Partial
<{ height
: number
; width
: number
}>
Defined in src/core/Application.ts:43
Properties config • config : Partial
<{ height
: number
; width
: number
}>
Defined in src/core/Application.ts:28
eventSystem • eventSystem : EventSystem
全局事件处理器
Defined in src/core/Application.ts:41
stage • stage : Transform
<Container
>
舞台,根节点
Defined in src/core/Application.ts:36
Methods use ▸ use (install
): Application
插件拓展 可注入到app
Parameters Name Type Description install
(app
: Application
) => void
插件入口函数
Returns Application
Defined in src/core/Application.ts:70
run ▸ Static
run (config?
): Application
Parameters Name Type config
Partial
<Partial
<{ height
: number
; width
: number
}>>
Returns Application
Defined in src/core/Application.ts:75
-
@@ -31,7 +31,7 @@
} ) ;
Hierarchy Table of contents Constructors Properties Accessors Methods Constructors constructor • new Audio ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
loop • loop : number
= 0
循环次数,0:不循环,-1:一直循环
Defined in src/core/component/Audio.ts:118
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
paused • paused : boolean
= true
指示媒体元素是否被暂停
Defined in src/core/component/Audio.ts:151
playCount • playCount : number
= 0
已经播放了的次数 如果要播放指定次数,需要将此参数重置
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
loop • loop : number
= 0
循环次数,0:不循环,-1:一直循环
Defined in src/core/component/Audio.ts:118
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
paused • paused : boolean
= true
指示媒体元素是否被暂停
Defined in src/core/component/Audio.ts:151
playCount • playCount : number
= 0
已经播放了的次数 如果要播放指定次数,需要将此参数重置
ts
// 创建节点
const node = new Transform () ;
// 添加音频组件
@@ -52,8 +52,8 @@
// 播放音频
audio . play () ;
} ) ;
-
Defined in src/core/component/Audio.ts:146
Event ▪ Static
Event : Object
事件
Type declaration Name Type Description ENDED
"ended"
音频播放完成
Defined in src/core/component/Audio.ts:32
Accessors currentTime • get
currentTime (): number
音频当前播放的时间
Returns number
Defined in src/core/component/Audio.ts:65
• set
currentTime (val
): void
Parameters Returns void
Defined in src/core/component/Audio.ts:68
duration • get
duration (): number
获取获取音频总时长
Returns number
Defined in src/core/component/Audio.ts:57
playbackRate • get
playbackRate (): number
音频播放速度0.25-5.0,不在此范围将被静音,默认值 1.0
Returns number
Defined in src/core/component/Audio.ts:79
• set
playbackRate (val
): void
Parameters Returns void
Defined in src/core/component/Audio.ts:82
source • get
source (): HTMLAudioElement
Returns HTMLAudioElement
Defined in src/core/component/Audio.ts:111
• set
source (val
): void
音频资源
Parameters Name Type val
HTMLAudioElement
Returns void
Defined in src/core/component/Audio.ts:95
volume • get
volume (): number
表示音频的音量。值从 0.0(静音)到 1.0(最大音量)。
Returns number
Defined in src/core/component/Audio.ts:44
• set
volume (val
): void
Parameters Returns void
Defined in src/core/component/Audio.ts:47
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
pause ▸ pause (): void
暂停音频
Returns void
Defined in src/core/component/Audio.ts:164
play ▸ play (): void
播放音频
Returns void
Defined in src/core/component/Audio.ts:156
start ▸ Optional
start (): void
组件被挂载到节点时触发
Returns void
Inherited from Component .start
Defined in src/core/component/Component.ts:44
stop ▸ stop (): void
停止播放 会将播放时间重置到0
Returns void
Defined in src/core/component/Audio.ts:173
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Component .update
Defined in src/core/component/Component.ts:50
-
-
-
-
-
@@ -29,8 +29,8 @@
parent . addChild (node) ;
Hierarchy Table of contents Constructors Properties Methods Constructors constructor • new Button ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties callback • callback : Map
<any
, Function
[]>
Defined in src/core/component/Button.ts:62
difftime • difftime : number
= 200
起落时间间隔
Defined in src/core/component/Button.ts:60
emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
Methods add ▸ add (callback
, target
): void
Parameters Name Type callback
Function
target
any
Returns void
Defined in src/core/component/Button.ts:64
destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
remove ▸ remove (callback
, target
): void
Parameters Name Type callback
Function
target
any
Returns void
Defined in src/core/component/Button.ts:73
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Component .start
Defined in src/core/component/Button.ts:24
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Component .update
Defined in src/core/component/Component.ts:50
-
-
-
-
-
-
@@ -71,8 +71,8 @@
g . fill ( ' #000000 ' ) ;
Hierarchy Table of contents Constructors Properties Methods Constructors constructor • new Graphics ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from DisplayObjects .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from DisplayObjects .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from DisplayObjects .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from DisplayObjects .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from DisplayObjects .node
Defined in src/core/component/Component.ts:22
redraw • redraw : boolean
= true
是否需要重绘
Defined in src/core/component/Graphics.ts:78
tasks • tasks : any
[] = []
记录要执行的操作记录
Defined in src/core/component/Graphics.ts:73
texture • Optional
texture : Texture
<TextureResource
>
图片纹理,储存图片的相关信息
Defined in src/core/component/Graphics.ts:69
Methods arc ▸ arc (x
, y
, radians
, startAngle
, endAngle
): void
绘制圆弧
Parameters Name Type Description x
number
圆心位置x坐标 y
number
圆心位置y坐标 radians
number
半径 startAngle
number
圆弧起始位置 endAngle
number
圆弧结束位置
Returns void
Defined in src/core/component/Graphics.ts:193
begin ▸ begin (): void
开启新的绘制
Returns void
Defined in src/core/component/Graphics.ts:111
clear ▸ clear (): void
清空画布(清空操作指令历史)
Returns void
Defined in src/core/component/Graphics.ts:105
closePath ▸ closePath (): void
闭合路径,会将起始点与结束点用直线连接
Returns void
Defined in src/core/component/Graphics.ts:118
destroy ▸ destroy (): void
消毁
Returns void
Inherited from DisplayObjects .destroy
Defined in src/core/component/Component.ts:55
drawCircle ▸ drawCircle (x
, y
, radians
): void
绘制一个圆
Parameters Name Type Description x
number
圆心位置x坐标 y
number
圆心位置y坐标 radians
number
半径
Returns void
Defined in src/core/component/Graphics.ts:203
drawEllipse ▸ drawEllipse (x
, y
, radiusX
, radiusY
): void
绘制一个椭圆
Parameters Name Type Description x
number
椭圆圆心的 x 轴坐标。 y
number
- radiusX
number
椭圆长轴的半径。 radiusY
number
椭圆短轴的半径。
Returns void
Defined in src/core/component/Graphics.ts:229
drawPolygon ▸ drawPolygon (points
): void
绘制一个多边形
Parameters Name Type Description points
number
[]多边形每个点的坐标([x1, y2, x2, y2, x3, y3, ...])
Returns void
Defined in src/core/component/Graphics.ts:237
drawRect ▸ drawRect (x
, y
, width
, height
, radius?
): void
绘制一个矩形,可带圆角
Parameters Name Type Default value Description x
number
undefined
起始位置x坐标 y
number
undefined
起始位置y坐标 width
number
undefined
宽 height
number
undefined
高 radius
number
0
圆角大小
Returns void
Defined in src/core/component/Graphics.ts:162
ellipse ▸ ellipse (x
, y
, radiusX
, radiusY
, rotation
, startAngle
, endAngle
, anticlockwise?
): void
绘制一个椭圆
Parameters Name Type Default value Description x
number
undefined
椭圆圆心的 x 轴坐标。 y
number
undefined
- radiusX
number
undefined
椭圆长轴的半径。 radiusY
number
undefined
椭圆短轴的半径。 rotation
number
undefined
椭圆的旋转角度,以弧度表示 (非角度度数)。 startAngle
number
undefined
将要绘制的起始点角度,从 x 轴测量,以弧度表示 (非角度度数)。 endAngle
number
undefined
椭圆将要绘制的结束点角度,以弧度表示 (非角度度数)。 anticlockwise
boolean
false
Boolean 选项,如果为 true,逆时针方向绘制椭圆(逆时针),反之顺时针方向绘制。
Returns void
Defined in src/core/component/Graphics.ts:218
fill ▸ fill (color
): void
填充颜色
Parameters Name Type Description color
string
颜色
Returns void
Defined in src/core/component/Graphics.ts:126
lineTo ▸ lineTo (x
, y
): void
绘制一条直线到某点
Parameters Name Type Description x
number
x坐标 y
number
y坐标
Returns void
Defined in src/core/component/Graphics.ts:150
moveTo ▸ moveTo (x
, y
): void
移动起始点
Parameters Returns void
Defined in src/core/component/Graphics.ts:141
onDestroy ▸ onDestroy (): void
组件被销毁时触发
Returns void
Overrides DisplayObjects .onDestroy
Defined in src/core/component/Graphics.ts:260
pushTask ▸ pushTask (name
, ...args
): void
新增一条绘制指令
Parameters Name Type Description name
string
指令名 ...args
(string
| number
)[] 指令参数
Returns void
Defined in src/core/component/Graphics.ts:94
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides DisplayObjects .start
Defined in src/core/component/Graphics.ts:80
stroke ▸ stroke (color
, width?
): void
设置边框或线条
Parameters Name Type Default value Description color
string
undefined
颜色 width
number
1
-
Returns void
Defined in src/core/component/Graphics.ts:133
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from DisplayObjects .update
Defined in src/core/component/Component.ts:50
-
@@ -37,14 +37,14 @@
loader . add (list) ;
// 开始加载资源
loader . start () ;
-Table of contents Constructors Properties Methods Constructors constructor • new GroupLoader ()
Defined in src/core/resource/GroupLoader.ts:40
Properties count • count : number
= 0
资源总数
Defined in src/core/resource/GroupLoader.ts:59
emitter • emitter : EventEmitter
<ValueOf
<{ COMPLATE
: "complate"
= 'complate'; LOADED
: "loaded"
= 'loaded' }>, any
>
Defined in src/core/resource/GroupLoader.ts:50
index • index : number
= 0
当前处理的位置
Defined in src/core/resource/GroupLoader.ts:67
list • list : LoadResListConfig
= []
Defined in src/core/resource/GroupLoader.ts:39
loaded • loaded : number
= 0
已经加载数量
Defined in src/core/resource/GroupLoader.ts:63
workerCount • workerCount : number
= 1
同时加载最大数量
Defined in src/core/resource/GroupLoader.ts:55
Event ▪ Static
Event : Object
Type declaration Name Type COMPLATE
"complate"
LOADED
"loaded"
Defined in src/core/resource/GroupLoader.ts:43
Methods add ▸ add (list
): void
添加需要加载的资源
ts const list : LoadResListConfig = [
+
Table of contents Constructors Properties Methods Constructors constructor • new GroupLoader ()
Defined in src/core/resource/GroupLoader.ts:40
Properties count • count : number
= 0
资源总数
Defined in src/core/resource/GroupLoader.ts:59
emitter • emitter : EventEmitter
<ValueOf
<{ COMPLATE
: "complate"
= 'complate'; LOADED
: "loaded"
= 'loaded' }>, any
>
Defined in src/core/resource/GroupLoader.ts:50
index • index : number
= 0
当前处理的位置
Defined in src/core/resource/GroupLoader.ts:67
list • list : LoadResListConfig
= []
Defined in src/core/resource/GroupLoader.ts:39
loaded • loaded : number
= 0
已经加载数量
Defined in src/core/resource/GroupLoader.ts:63
workerCount • workerCount : number
= 1
同时加载最大数量
Defined in src/core/resource/GroupLoader.ts:55
Event ▪ Static
Event : Object
Type declaration Name Type COMPLATE
"complate"
LOADED
"loaded"
Defined in src/core/resource/GroupLoader.ts:43
Methods add ▸ add (list
): void
添加需要加载的资源
ts const list : LoadResListConfig = [
// 只设置路径
' ./assets/photo.png ' ,
// 设置路径加别名
[ ' ./assets/bmg.mp3 ' , ' bgm_mp3 ' ]
] ;
-
Parameters Returns void
Defined in src/core/resource/GroupLoader.ts:119
load ▸ load (): void
顺序加载资源
Returns void
Defined in src/core/resource/GroupLoader.ts:73
start ▸ start (): void
启动加载
Returns void
Defined in src/core/resource/GroupLoader.ts:101
-
-
-
-
-
@@ -27,18 +27,18 @@
parent . addChild (node) ;
Hierarchy Table of contents Constructors Properties Accessors Methods Constructors constructor • new Layout ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties _markResize • _markResize : boolean
= false
Defined in src/core/component/Layout.ts:157
emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
Accessors bottom • get
bottom (): number
相对底部的距离
Returns number
Defined in src/core/component/Layout.ts:67
• set
bottom (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:70
horizontal • get
horizontal (): number
垂直居中 top 和 bottom 将失效 注意:如果要让节点真正实现垂直居中需要设置节点的anchor
ts const node = new Transform () ;
+
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties _markResize • _markResize : boolean
= false
Defined in src/core/component/Layout.ts:157
emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
Accessors bottom • get
bottom (): number
相对底部的距离
Returns number
Defined in src/core/component/Layout.ts:67
• set
bottom (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:70
horizontal • get
horizontal (): number
垂直居中 top 和 bottom 将失效 注意:如果要让节点真正实现垂直居中需要设置节点的anchor
ts const node = new Transform () ;
node . anchor . y = 0.5 ;
node . addComponent (Layout) ;
-
Returns number
Defined in src/core/component/Layout.ts:109
• set
horizontal (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:112
left • get
left (): number
相对左边的距离
Returns number
Defined in src/core/component/Layout.ts:31
• set
left (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:34
right • get
right (): number
相对右边的距离
Returns number
Defined in src/core/component/Layout.ts:55
• set
right (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:58
top • get
top (): number
相对顶部的距离
Returns number
Defined in src/core/component/Layout.ts:43
• set
top (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:46
vertical • get
vertical (): number
水平剧中 left 和 right 将失效 注意:如果要让节点真正实现水平居中需要设置节点的anchor
ts const node = new Transform () ;
+
Returns number
Defined in src/core/component/Layout.ts:109
• set
horizontal (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:112
left • get
left (): number
相对左边的距离
Returns number
Defined in src/core/component/Layout.ts:31
• set
left (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:34
right • get
right (): number
相对右边的距离
Returns number
Defined in src/core/component/Layout.ts:55
• set
right (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:58
top • get
top (): number
相对顶部的距离
Returns number
Defined in src/core/component/Layout.ts:43
• set
top (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:46
vertical • get
vertical (): number
水平剧中 left 和 right 将失效 注意:如果要让节点真正实现水平居中需要设置节点的anchor
ts const node = new Transform () ;
node . anchor . x = 0.5 ;
node . addComponent (Layout) ;
-
Returns number
Defined in src/core/component/Layout.ts:87
• set
vertical (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:90
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
getOffsetLocation ▸ getOffsetLocation (): Vector2
获取本地偏移
Returns Vector2
Defined in src/core/component/Layout.ts:149
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
resize ▸ resize (): void
重新计算布局/矫正布局
ts const node = new Transform () ;
+
Returns number
Defined in src/core/component/Layout.ts:87
• set
vertical (val
): void
Parameters Returns void
Defined in src/core/component/Layout.ts:90
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
getOffsetLocation ▸ getOffsetLocation (): Vector2
获取本地偏移
Returns Vector2
Defined in src/core/component/Layout.ts:149
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
resize ▸ resize (): void
重新计算布局/矫正布局
ts const node = new Transform () ;
const layout = node . addComponent (Layout) ;
node . anchor . set ( 0.5 , 0.5 ) ;
layout . resize () ;
-
Returns void
Defined in src/core/component/Layout.ts:168
saveNewSize ▸ saveNewSize (): void
当挂载节点尺寸发生变化,且需要重新动态计算时调用 将保存当前组件的位置和大小状态
Returns void
Defined in src/core/component/Layout.ts:138
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Component .start
Defined in src/core/component/Layout.ts:121
update ▸ update (): void
每帧调用
Returns void
Overrides Component .update
Defined in src/core/component/Layout.ts:153
-
@@ -23,8 +23,8 @@
parent . addChild (node) ;
Hierarchy Table of contents Constructors Properties Methods Constructors constructor • new Mask ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
renew • renew : boolean
= true
是否需要重绘
Defined in src/core/component/Mask.ts:24
texture • Optional
texture : Texture
<TextureResource
>
最终效果的纹理,这样设计不影响原节点和蒙版节点
Defined in src/core/component/Mask.ts:32
value • Optional
value : Transform
<Container
>
遮罩蒙版
Defined in src/core/component/Mask.ts:28
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Component .start
Defined in src/core/component/Mask.ts:34
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Component .update
Defined in src/core/component/Component.ts:50
-
-
-
@@ -35,8 +35,8 @@
} ) ;
Hierarchy Table of contents Constructors Properties Accessors Methods Constructors constructor • new NinePanel ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
redraw • redraw : boolean
= false
Defined in src/core/component/NinePanel.ts:84
texture • Optional
texture : Texture
<TextureResource
>
Defined in src/core/component/NinePanel.ts:68
Accessors bottom • get
bottom (): number
Returns number
Defined in src/core/component/NinePanel.ts:60
• set
bottom (val
): void
Parameters Returns void
Defined in src/core/component/NinePanel.ts:63
left • get
left (): number
Returns number
Defined in src/core/component/NinePanel.ts:33
• set
left (val
): void
Parameters Returns void
Defined in src/core/component/NinePanel.ts:36
right • get
right (): number
Returns number
Defined in src/core/component/NinePanel.ts:51
• set
right (val
): void
Parameters Returns void
Defined in src/core/component/NinePanel.ts:54
top • get
top (): number
Returns number
Defined in src/core/component/NinePanel.ts:42
• set
top (val
): void
Parameters Returns void
Defined in src/core/component/NinePanel.ts:45
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Component .start
Defined in src/core/component/NinePanel.ts:70
toRedraw ▸ toRedraw (): void
重新生成
Returns void
Defined in src/core/component/NinePanel.ts:81
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Component .update
Defined in src/core/component/Component.ts:50
-
-
@@ -24,8 +24,8 @@
rect . storkeWidth = 3 ;
Hierarchy Table of contents Constructors Properties Methods Constructors constructor • new Rect ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
fill • Optional
fill : string
= '#000000'
填充颜色
Defined in src/core/component/Rect.ts:25
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
radius • radius : number
= 0
圆角大小
Defined in src/core/component/Rect.ts:21
storke • storke : string
= '#FFFFFF'
边框颜色
Defined in src/core/component/Rect.ts:29
storkeWidth • storkeWidth : number
= 0
边框大小
Defined in src/core/component/Rect.ts:33
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ onDestroy (): void
组件被销毁时触发
Returns void
Overrides Component .onDestroy
Defined in src/core/component/Rect.ts:65
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Component .start
Defined in src/core/component/Rect.ts:36
update ▸ update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Overrides Component .update
Defined in src/core/component/Rect.ts:60
-
-
-
-
@@ -27,11 +27,11 @@
} ) ;
Hierarchy Table of contents Constructors Properties Methods Constructors constructor • new Sprite ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from DisplayObjects .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from DisplayObjects .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from DisplayObjects .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from DisplayObjects .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from DisplayObjects .node
Defined in src/core/component/Component.ts:22
texture • Optional
texture : Texture
<TextureResource
>
图片纹理,储存图片的相关信息
Defined in src/core/component/Sprite.ts:23
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from DisplayObjects .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from DisplayObjects .onDestroy
Defined in src/core/component/Component.ts:62
resize ▸ resize (): void
根据当前图片纹理,重置节点尺寸信息
ts const node = new Transform (Sprite) ;
+
Inherited from DisplayObjects .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from DisplayObjects .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from DisplayObjects .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from DisplayObjects .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from DisplayObjects .node
Defined in src/core/component/Component.ts:22
texture • Optional
texture : Texture
<TextureResource
>
图片纹理,储存图片的相关信息
Defined in src/core/component/Sprite.ts:23
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from DisplayObjects .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from DisplayObjects .onDestroy
Defined in src/core/component/Component.ts:62
resize ▸ resize (): void
根据当前图片纹理,重置节点尺寸信息
ts const node = new Transform (Sprite) ;
const sprite = node . getComponent (Sprite) !;
sprite . resize () ;
-
Returns void
Defined in src/core/component/Sprite.ts:37
start ▸ Optional
start (): void
组件被挂载到节点时触发
Returns void
Inherited from DisplayObjects .start
Defined in src/core/component/Component.ts:44
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from DisplayObjects .update
Defined in src/core/component/Component.ts:50
-
@@ -30,8 +30,8 @@
}, this ) ;
Hierarchy Table of contents Constructors Properties Methods Constructors constructor • new SpriteSheet ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from Component .constructor
Defined in src/core/component/Component.ts:37
Properties animations • animations : Record
<string
, string
[]> = {}
动画配置
Defined in src/core/component/SpriteSheet.ts:90
emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Component .emitter
Defined in src/core/component/Component.ts:27
frames • frames : Record
<string
, Texture
<TextureResource
>> = {}
纹理集
Defined in src/core/component/SpriteSheet.ts:86
id • id : number
用于表示组件的唯一标识
Inherited from Component .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Component .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Component .node
Defined in src/core/component/Component.ts:22
sprite • sprite : Sprite
展示的节点
Defined in src/core/component/SpriteSheet.ts:94
Methods add ▸ add (res
, data
, name
): void
添加一个素材
Parameters Returns void
Defined in src/core/component/SpriteSheet.ts:122
destroy ▸ destroy (): void
消毁
Returns void
Inherited from Component .destroy
Defined in src/core/component/Component.ts:55
get ▸ get (name
): Texture
<TextureResource
>
获取素材
Parameters Returns Texture
<TextureResource
>
Defined in src/core/component/SpriteSheet.ts:104
load ▸ load (config
, res?
): void
加载图集 如果没有传入资源,则使用配置里面的资源路径进行加载,但是还是要提前保证路径资源已经被提前加载
Parameters Returns void
Defined in src/core/component/SpriteSheet.ts:152
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Component .onDestroy
Defined in src/core/component/Component.ts:62
set ▸ set (name
, texture
): void
设置要显示的素材
Parameters Returns void
Defined in src/core/component/SpriteSheet.ts:112
show ▸ show (name
): void
设置要现实的素材
Parameters Name Type Description name
string
内部别名
Returns void
Defined in src/core/component/SpriteSheet.ts:142
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Component .start
Defined in src/core/component/SpriteSheet.ts:96
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Component .update
Defined in src/core/component/Component.ts:50
-
@@ -42,8 +42,8 @@
}, this ) ;
Hierarchy Table of contents Constructors Properties Accessors Methods Constructors constructor • new SpriteSheetAnimation ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from Animation .constructor
Defined in src/core/component/Component.ts:37
Properties animation • animation : string
= 'default'
Inherited from Animation .animation
Defined in src/core/component/Animation.ts:107
animations • animations : Record
<string
, Timeline
<{}>[]> = {}
动画配置
Inherited from Animation .animations
Defined in src/core/component/Animation.ts:46
emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Animation .emitter
Defined in src/core/component/Component.ts:27
fps • fps : number
= 60
播放的帧速率,按照每秒计算,每秒播放的帧数
Defined in src/core/component/SpriteSheetAnimation.ts:43
id • id : number
用于表示组件的唯一标识
Inherited from Animation .id
Defined in src/core/component/Component.ts:12
loop • loop : number
= 0
循环次数,0:不循环,-1:一直循环
Inherited from Animation .loop
Defined in src/core/component/Animation.ts:112
name • name : string
= ''
组件名
Inherited from Animation .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Animation .node
Defined in src/core/component/Component.ts:22
paused • paused : boolean
= true
指示是否被暂停
Inherited from Animation .paused
Defined in src/core/component/Animation.ts:125
playCount • playCount : number
= 0
已经播放次数
Inherited from Animation .playCount
Defined in src/core/component/Animation.ts:116
speed • speed : number
= 1
播放速度100%
Inherited from Animation .speed
Defined in src/core/component/Animation.ts:120
spriteSheet • spriteSheet : SpriteSheet
Defined in src/core/component/SpriteSheetAnimation.ts:45
time • time : number
= 0
当前时间线
Inherited from Animation .time
Defined in src/core/component/Animation.ts:32
timeMax • timeMax : number
= 0
动画总长
Inherited from Animation .timeMax
Defined in src/core/component/Animation.ts:24
timeline • timeline : EventEmitter
<string
| symbol
, any
>
用于记录回调的时间线,在target时间线后执行
Inherited from Animation .timeline
Defined in src/core/component/Animation.ts:19
total • total : number
= 0
最大帧数
Inherited from Animation .total
Defined in src/core/component/Animation.ts:28
Event ▪ Static
Event : Object
Type declaration Name Type Description ENDED
"ended"
动画播放完成
Inherited from Animation .Event
Defined in src/core/component/Animation.ts:10
Accessors targets • get
targets (): Timeline
<{}>[]
时间线 每一个对象一个时间线 还有一个总时间线,可以用于记录一些信息
Returns Timeline
<{}>[]
Inherited from Animation.targets
Defined in src/core/component/Animation.ts:39
Methods addFrameAction ▸ addFrameAction (time
, callback
, target
): void
添加事件
Parameters Name Type time
number
callback
() => void
target
any
Returns void
Inherited from Animation .addFrameAction
Defined in src/core/component/Animation.ts:198
addTimeline ▸ addTimeline (timeline
): void
添加一个熟悉变更时间线
Parameters Name Type timeline
Timeline
<{}>
Returns void
Inherited from Animation .addTimeline
Defined in src/core/component/Animation.ts:84
destroy ▸ destroy (): void
消毁
Returns void
Inherited from Animation .destroy
Defined in src/core/component/Component.ts:55
next ▸ next (): void
播放下一帧
Returns void
Inherited from Animation .next
Defined in src/core/component/Animation.ts:53
nextAction ▸ Protected
nextAction (val
): void
每次当需要更新帧动画时调用
Parameters Name Type Description val
Timeline
<{}>即将更新的帧动画配置
Returns void
Overrides Animation .nextAction
Defined in src/core/component/SpriteSheetAnimation.ts:70
onDestroy ▸ Optional
onDestroy (): void
组件被销毁时触发
Returns void
Inherited from Animation .onDestroy
Defined in src/core/component/Component.ts:62
play ▸ play (): void
播放
Returns void
Inherited from Animation .play
Defined in src/core/component/Animation.ts:127
▸ play (name
): void
播放
Parameters Name Type Description name
string
要播放的动画
Returns void
Inherited from Animation .play
Defined in src/core/component/Animation.ts:128
▸ play (loop
): void
播放
Parameters Name Type Description loop
number
要循环的次数
Returns void
Inherited from Animation .play
Defined in src/core/component/Animation.ts:129
▸ play (name
, loop
): void
播放
Parameters Name Type Description name
string
要播放的动画 loop
number
要循环的次数
Returns void
Inherited from Animation .play
Defined in src/core/component/Animation.ts:130
prev ▸ prev (): void
播放上一帧
Returns void
Inherited from Animation .prev
Defined in src/core/component/Animation.ts:103
puase ▸ puase (): void
暂停
Returns void
Inherited from Animation .puase
Defined in src/core/component/Animation.ts:168
removeFrameAction ▸ removeFrameAction (time
, callback
, target
): void
移除事件
Parameters Name Type time
number
callback
() => void
target
any
Returns void
Inherited from Animation .removeFrameAction
Defined in src/core/component/Animation.ts:205
setTimeline ▸ setTimeline (timelines
, name?
): void
设置一个属性变更时间线
Parameters Name Type timelines
Timeline
<{}>[]name?
string
Returns void
Inherited from Animation .setTimeline
Defined in src/core/component/Animation.ts:93
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Animation .start
Defined in src/core/component/SpriteSheetAnimation.ts:47
stop ▸ stop (): void
停止
Returns void
Inherited from Animation .stop
Defined in src/core/component/Animation.ts:160
update ▸ update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Animation .update
Defined in src/core/component/Animation.ts:172
-
@@ -42,8 +42,8 @@
text . color = ' #FF0000 ' ;
Hierarchy Table of contents Constructors Properties Accessors Methods Constructors constructor • new Text ()
组件不能单独实例化,必须通过Transform.addComponent创建
ts const node = new Transform () ;
const componet = node . addComponent (Component) ;
-
Inherited from Container .constructor
Defined in src/core/component/Component.ts:37
Properties emitter • emitter : EventEmitter
<string
| symbol
, any
>
事件处理器
Inherited from Container .emitter
Defined in src/core/component/Component.ts:27
id • id : number
用于表示组件的唯一标识
Inherited from Container .id
Defined in src/core/component/Component.ts:12
name • name : string
= ''
组件名
Inherited from Container .name
Defined in src/core/component/Component.ts:17
node • node : Transform
<Container
>
组件挂载节点
Inherited from Container .node
Defined in src/core/component/Component.ts:22
redraw • redraw : boolean
= false
Defined in src/core/component/Text.ts:218
texture • Optional
texture : Texture
<HTMLCanvasElement
>
记录文本实际宽度,需要动态计算
Defined in src/core/component/Text.ts:216
Accessors algin • get
algin (): TextAlgin
水平对齐方式
Returns TextAlgin
Defined in src/core/component/Text.ts:90
• set
algin (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:93
autoWarp • get
autoWarp (): boolean
是否自动换行 前提条件,设置了宽度,如果没设置宽度自动换行将不生效
Returns boolean
Defined in src/core/component/Text.ts:181
• set
autoWarp (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:184
bold • get
bold (): boolean
文字加粗
Returns boolean
Defined in src/core/component/Text.ts:165
• set
bold (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:168
color • get
color (): string
文字颜色
Returns string
Defined in src/core/component/Text.ts:196
• set
color (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:199
fontFamily • get
fontFamily (): string
字体
Returns string
Defined in src/core/component/Text.ts:120
• set
fontFamily (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:123
fontSize • get
fontSize (): number
字体大小
Returns number
Defined in src/core/component/Text.ts:135
• set
fontSize (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:138
italic • get
italic (): boolean
斜体
Returns boolean
Defined in src/core/component/Text.ts:150
• set
italic (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:153
letterPacing • get
letterPacing (): number
字间距
Returns number
Defined in src/core/component/Text.ts:60
• set
letterPacing (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:63
lineSpace • get
lineSpace (): number
行间距
Returns number
Defined in src/core/component/Text.ts:75
• set
lineSpace (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:78
value • get
value (): string
Returns string
Defined in src/core/component/Text.ts:105
• set
value (val
): void
Parameters Returns void
Defined in src/core/component/Text.ts:108
Methods destroy ▸ destroy (): void
消毁
Returns void
Inherited from Container .destroy
Defined in src/core/component/Component.ts:55
onDestroy ▸ onDestroy (): void
组件被销毁时触发
Returns void
Overrides Container .onDestroy
Defined in src/core/component/Text.ts:48
start ▸ start (): void
组件被挂载到节点时触发
Returns void
Overrides Container .start
Defined in src/core/component/Text.ts:44
update ▸ Optional
update (time
): void
每帧调用
Parameters Name Type Description time
number
和上一帧的间隔时间 ms
Returns void
Inherited from Container .update
Defined in src/core/component/Component.ts:50
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-