feat: P2 - QTE system, subtitles, save thumbnails
- QTESystem: trigger detection via timeupdate, multi-key matching, timeout handling - QTEOverlay: SVG countdown ring + key prompts + success/fail animation - Engine: integrate QTE (timeupdate check, conditional branching, effect application) - Subtitles: WebVTT parsing + synchronized subtitle rendering - GamePlayer: overlay QTE and subtitle components - SaveSystem: DB v2 with thumbnail field, canvas snapshot at 320x180 JPEG - SaveLoadMenu: thumbnail preview for save slots - VideoManager: getActiveVideoElement() for canvas capture - App.vue: QTE/subtitle integration, thumbnail capture on save - stores: QTE state management, save list with thumbnails - demo.json: QTE scene (right_door), subtitles, new event types - ROADMAP: mark P2 as completed
This commit is contained in:
@@ -8,11 +8,11 @@
|
||||
"intro": {
|
||||
"id": "intro",
|
||||
"videoUrl": "/videos/intro.mp4",
|
||||
"subtitleUrl": "/subtitles/intro.vtt",
|
||||
"choices": [
|
||||
{
|
||||
"text": "走向左边那扇发光的门",
|
||||
"targetScene": "left_door",
|
||||
"timeLimit": 5,
|
||||
"effects": [
|
||||
{ "type": "add", "target": "courage", "value": 10 }
|
||||
]
|
||||
@@ -33,6 +33,7 @@
|
||||
"left_door": {
|
||||
"id": "left_door",
|
||||
"videoUrl": "/videos/left_door.mp4",
|
||||
"subtitleUrl": "/subtitles/left_door.vtt",
|
||||
"choices": [
|
||||
{
|
||||
"text": "与陌生人握手",
|
||||
@@ -50,6 +51,36 @@
|
||||
"right_door": {
|
||||
"id": "right_door",
|
||||
"videoUrl": "/videos/right_door.mp4",
|
||||
"qte": {
|
||||
"triggerTime": 1.0,
|
||||
"prompt": "躲避飞来的石块!",
|
||||
"keys": ["ArrowLeft", "ArrowRight", "a", "d"],
|
||||
"timeLimit": 3.0,
|
||||
"successScene": "qte_success",
|
||||
"failScene": "qte_fail",
|
||||
"effects": {
|
||||
"success": [{ "type": "add", "target": "courage", "value": 15 }],
|
||||
"fail": [{ "type": "add", "target": "trust", "value": -20 }]
|
||||
}
|
||||
}
|
||||
},
|
||||
"qte_success": {
|
||||
"id": "qte_success",
|
||||
"videoUrl": "/videos/qte_success.mp4",
|
||||
"choices": [
|
||||
{
|
||||
"text": "继续前进",
|
||||
"targetScene": "continue_ending"
|
||||
},
|
||||
{
|
||||
"text": "回头",
|
||||
"targetScene": "intro"
|
||||
}
|
||||
]
|
||||
},
|
||||
"qte_fail": {
|
||||
"id": "qte_fail",
|
||||
"videoUrl": "/videos/qte_fail.mp4",
|
||||
"choices": [
|
||||
{
|
||||
"text": "继续前进",
|
||||
@@ -64,6 +95,7 @@
|
||||
"stay": {
|
||||
"id": "stay",
|
||||
"videoUrl": "/videos/stay.mp4",
|
||||
"subtitleUrl": "/subtitles/stay.vtt",
|
||||
"nextScene": "alone_ending"
|
||||
},
|
||||
"trust_ending": {
|
||||
|
||||
Reference in New Issue
Block a user