feat: engine improvements, new scenes, videos, subtitles, hotspot component and docs update
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
export interface SceneNode {
|
||||
id: string
|
||||
type?: 'video' | 'image'
|
||||
videoUrl: string
|
||||
imageUrl?: string
|
||||
subtitleUrl?: string
|
||||
choices?: Choice[]
|
||||
hotspots?: Hotspot[]
|
||||
qte?: QTEDefinition
|
||||
nextScene?: string
|
||||
onEnter?: Effect[]
|
||||
@@ -13,7 +16,22 @@ export interface Choice {
|
||||
targetScene: string
|
||||
conditions?: Condition[]
|
||||
effects?: Effect[]
|
||||
timeLimit?: number // 单位:秒,超时后自动选择第一项
|
||||
timeLimit?: number
|
||||
}
|
||||
|
||||
export interface Hotspot {
|
||||
id: string
|
||||
label: string
|
||||
targetScene: string
|
||||
x: number
|
||||
y: number
|
||||
width: number
|
||||
height: number
|
||||
showAt?: number
|
||||
hideAt?: number
|
||||
conditions?: Condition[]
|
||||
effects?: Effect[]
|
||||
timeLimit?: number
|
||||
}
|
||||
|
||||
export interface Condition {
|
||||
@@ -73,3 +91,5 @@ export type EngineEvent =
|
||||
| 'qteResult'
|
||||
| 'videoEnd'
|
||||
| 'choiceTimeout'
|
||||
| 'hotspotRequest'
|
||||
| 'hotspotUpdate'
|
||||
|
||||
Reference in New Issue
Block a user