From 538a71ebb5b83c2e1113bbe34a346f76f886e32c Mon Sep 17 00:00:00 2001 From: darwintree Date: Wed, 21 Feb 2024 00:17:25 +0800 Subject: [PATCH] feat: support anim filter for voice search --- CHANGELOG.md | 4 + src/components/search/VoiceSearchPanel.vue | 47 +- src/helper/path.ts | 2 + src/helper/vals.ts | 665 +++++++++++++++++++++ 4 files changed, 706 insertions(+), 12 deletions(-) create mode 100644 src/helper/vals.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index d6cd3e7..fedb131 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2024/02/21 + +* feat: support anim filter for voice search + ## 2024/02/17 * feat: share diff --git a/src/components/search/VoiceSearchPanel.vue b/src/components/search/VoiceSearchPanel.vue index 496dae8..c1bee96 100644 --- a/src/components/search/VoiceSearchPanel.vue +++ b/src/components/search/VoiceSearchPanel.vue @@ -9,15 +9,24 @@ clearable /> + + Anim + + - - search - + search { + return { + value: item, + label: item, + } +}) + const speakerOptions = ref([] as string[]) +const animOptions = ref([] as string[]) function getEventIdFromVoiceId(_id: string) { const parts = _id.split('/') diff --git a/src/helper/path.ts b/src/helper/path.ts index cfb9e67..d5178c8 100644 --- a/src/helper/path.ts +++ b/src/helper/path.ts @@ -280,6 +280,7 @@ async function queryCollectionMetaInfo(jsonUrl: string) { async function queryVoices( speakers: string[], + anims: string[], pattern: string, page = 1, pageSize = 20 @@ -288,6 +289,7 @@ async function queryVoices( const res = await axios.get(VOICE_SERVICE_SERVER, { params: { speakers, + anims, pattern, page, pageSize, diff --git a/src/helper/vals.ts b/src/helper/vals.ts new file mode 100644 index 0000000..03acc2e --- /dev/null +++ b/src/helper/vals.ts @@ -0,0 +1,665 @@ +const True = true +const False = false +const None = null + +const vals = { + waitType: ['time', 'effect'] as const, + voiceKeep: [True] as const, + textWait: [None, 1500, 500] as const, + textFrame: [ + 'off', + '001', + '002', + '003', + '0001', + '0002', + '0003', + '004', + '0004', + '0005', + '0006', + '0007', + '0008', + '0013', + '0014', + '0015', + '0016', + '0017', + '0018', + '0019', + '0020', + '0021', + '013', + '006', + '005', + '007', + '016', + '015', + '0009', + '0011', + '0010', + '0012', + '0024', + '0023', + '0022', + '014', + ] as const, + textCtrl: ['p', 'l', 'cm', 'r', 'n'] as const, + stillType: ['support_idols', 'game_event_communications', 'idols'] as const, + stillCtrl: ['off', '1300'] as const, + middleFgEffectTime1: ['500', '1000'] as const, + middleFgEffectTime: [ + 200, + 1300, + 800, + 1000, + 300, + 700, + 500, + 600, + 1500, + 4731, + None, + 2500, + 1200, + 1800, + ] as const, + middleFgEffect: ['fade', 'switch_fade'] as const, + middleFg: [ + '002922', + 'fade_out', + '003881', + 'off', + '003861', + '001921', + '004731', + '002681', + '001331', + '002341', + '008331', + '001923', + '003252', + '007711', + '004771', + '005471', + '003981', + '004961', + '008581', + '000221', + '001922', + '006471', + '001741', + '004861', + '007681', + '007721', + '007701', + '007611', + ] as const, + lipAnimDuration: [ + 2.5, 1.5, 1.8, 1.4, 1, 2, 0.5, 1.1, 2.1, 1.3, 0.7, 0.8, 1.2, 4.5, 1.7, 1.6, + 2.7, 3, 3.3, + ] as const, + fgEffectTime1: ['1300'] as const, + fgEffectTime: [ + 2000, 500, 1600, 1000, 1500, 800, 1300, 700, 300, 600, 1400, 400, 1200, + 1800, 200, 1100, 900, 2500, 3000, 100, 150, + ] as const, + fgEffect: ['fade', 'switch_fade', 'fade_out'] as const, + fg: [ + '001331', + 'fade_out', + 'off', + '001741', + '000202', + '000221', + '000481', + '001101', + '002341', + '001891', + '001921', + '001923', + '001922', + '002681', + '002922', + '003861', + '003871', + '003252', + '003981', + '004521', + '002921', + '004731', + '004741', + '003251', + '004861', + '005841', + '005791', + '004961', + '004771', + '006441', + '006361', + '007601', + '007611', + '007591', + '006101', + '006761', + '005471', + '007821', + '007631', + '008311', + '008331', + '008321', + '008661', + '008921', + '002871', + '007431', + '008811', + '003242', + '004681', + '005581', + '008581', + '001041', + '007981', + '006851', + '009051', + '009041', + '007541', + '006471', + '005641', + '009011', + '003241', + '007632', + '008181', + '008182', + '008183', + '008184', + '008185', + '003881', + '007403', + '007402', + '007421', + '007422', + '007423', + '007420', + '007418', + '007417', + '007401', + '007424', + '007419', + '007425', + '007411', + '007413', + '007409', + '007412', + '007410', + '007416', + '007414', + '007415', + '007407', + '007405', + '007408', + '007404', + '007406', + '005801', + ] as const, + effectValue: [ + { type: 'from', x: 1000, alpha: 0, time: 1000 }, + { type: 'to', alpha: 0, time: 1000, easing: 'easeInQuart' }, + { type: 'to', alpha: 0, time: 240 }, + { type: 'from', alpha: 0, time: 240 }, + { type: 'from', alpha: 0, time: 1000, easing: 'easeOutQuart' }, + { type: 'to', alpha: 0, time: 1000 }, + ] as const, + effectTarget: [ + { type: 'rect', width: 1136, height: 640, color: '000000' }, + { type: 'rect', width: 1136, height: 640, color: 'ffffff' }, + ] as const, + commandKey: [ + 'A-1_read', + 'A-2_read', + 'A-3_read', + 'ALL-ED_read', + 'SELECT-1_read', + 'SELECT-2_read', + ] as const, + command: ['conditional_jump'] as const, + charType: ['characters', 'idols', 'sub_characters'] as const, + charLipAnim: [ + 'lip_anger', + 'lip_wait', + 'lip_smile', + 'lip_smile_s', + 'lip_shy', + 'lip_sad', + 'lip_surp_s', + 'lip_surp', + 'lip_surp2_s', + 'lip_surp2', + 'lip_sad_s', + 'lip_serious_s', + 'lip_anger2', + 'lip_wait_s', + 'lip_shy_s', + 'lip_smile2', + 'lip_anger1_s', + 'lip_anger1', + 'lip_smile1_s', + 'lip_smile1', + 'lip_anger_s', + 'lip_shy2_s', + 'lip_trouble', + 'lip_shy2', + 'lip_angry', + 'lip_angry_s', + 'lip_sad_s2', + 'lip_a', + 'lip_smile_s2', + 'lip_anger_s2', + 'lip_ha', + 'lip_serious', + 'lip_fear', + 'lip_sad2', + 'lip_sad2_s', + 'lip_cheat', + 'lip_fa', + 'lip_panic', + 'lip_trouble_s', + 'lip_anger2_s', + 'lip_joy', + 'lip_nothing', + 'lip_bad', + 'blank', + 'lip_a2', + 'lip_jito_s', + 'lip_jito', + 'lip_bad_s', + 'lip_tear', + 'lip_rebellion', + 'lip_smile_s3', + 'lip_shy_surp', + 'lip_anger_wide', + 'lip_anger_strong_s', + 'lip_anger_strong', + 'lip_awkward_s', + 'lip_awkward', + 'lip_sleep_s', + 'lip_bitter_smile', + 'lip_smile2_s', + 'lip_bitter_smile_s', + 'face_anger', + 's', + 'face_sad', + 'lip_tear_s', + ] as const, + charLabel: [ + 'meguru', + 'hiori', + 'mano', + 'kogane', + 'sakuya', + 'kiriko', + 'yuika', + 'mamimi', + 'kaho', + 'rinze', + 'chiyoko', + 'juri', + 'natsuha', + 'amana', + 'tenka', + 'chiyuki', + 'fuyuko', + 'mei', + 'asahi', + 'hinana', + 'madoka', + 'koito', + 'toru', + 'mikoto', + 'nichika', + 'rinze2', + 'hazuki', + 'yuika2', + 'mamimi2', + 'ai', + 'asahi2', + 'fuyuko2', + 'ceo', + 'mano2', + 'chiyoko2', + 'natsuha2', + 'juri2', + 'koito2', + 'madoka2', + 'hinana2', + 'toru2', + 'mei2', + 'security1', + 'suitman', + 'security2', + 'suitman1', + 'suitman2', + 'security3', + 'boy', + 'nichika2', + 'mikoto2', + 'luca', + 'kogane2', + 'kiriko2', + 'girl', + 'meguru2', + 'hiori2', + 'woman', + 'kaho2', + 'sakuya2', + 'mikoto1', + 'nichika1', + 'hazuki2', + 'luca2', + 'maguru', + 'girl2', + 'man', + 'oldman', + 'amana2', + 'amana3', + 'tenka2', + 'nichika3', + 'nathuha', + 'security', + 'natsumi', + 'mikoto3', + 'natuha', + ] as const, + charCategory: [ + 'stand_fix', + 'stand_jersey', + 'stand_costume', + 'stand_silhouette', + '', + 'stand_costume_fix', + 'off', + 'stand_costume_flex', + ] as const, + charAnim5: [ + 'no_bag', + 'eye_right', + 'blank', + 'item_off', + 'hat_off', + 'cheek_red', + 'mittens_off', + 'lip_off', + 'lip_on', + 'bag_off', + 'bag_on', + 'mask_on', + 'mask_off', + 'off', + ] as const, + charAnim4: [ + 'eye_front', + 'blank', + 'eye_left', + 'eye_right', + 'no_bag', + 'swollen_on', + 'swollen_off', + 'tear_L', + 'eye_red_on', + 'eye_red_off', + '', + 'off', + 'eye_off', + 'face_left', + 'lip_anger', + 'mask_on', + 'mask_off', + 'on', + 'cheek_red', + 'tear', + 'mittens_off', + 'bag_off', + 'apron_off', + 'hat_off', + 'eye_on', + 'face_right', + ] as const, + charAnim3Loop: [False] as const, + charAnim3: [ + 'yes', + 'no', + 'eye_right', + 'blank', + 'eye_front', + 'lip_smile_s', + 'eye_left', + 'eye_red_on', + 'eye_red_off', + 'bill_off', + 'bill_on', + 'hat_off', + 'off', + 'apron_off', + 'mask_on', + 'mask_off', + 'no2', + 'face_smile2', + 'face_close', + 'face_anger', + 'face_wait', + 'face_smile', + 'face_sad', + 'lip_sad', + 'lip_smile', + 'eye_off', + 'on', + 'face_shy', + '', + 'bag_off', + 'headphone_off', + 'headphone_on', + ] as const, + charAnim2Loop: [False] as const, + charAnim2: [ + 'face_sad', + 'face_wait', + 'blank', + 'face_smile', + 'face_shy2', + 'face_anger', + 'face_shy', + 'face_close', + 'face_surp', + 'face_close2', + 'face_smile2', + 'face_close7', + 'face_serious', + 'wait', + 'face_cry', + 'face_doya', + 'face_wait2', + 'face_wait3', + 'face_anger2', + 'face_smile1', + 'face_surp2', + 'face_panic', + 'face_fear', + 'face_anger1', + 'face_cry2', + 'face_red', + 'face_tear', + 'face_cheat', + 'face_joy', + 'face_trouble', + 'face_excite', + 'lip_trouble', + 'face_anger4', + 'face_anger3', + 'face_close3', + 'face_nothing', + 'face_bad', + 'face_down', + 'eye_right', + 'eye_left', + 'face_close4', + 'face_jito2', + 'face_jito', + 'face_rebellion1', + 'face_rebellion2', + 'face_close5', + 'face_shy3', + 'face_close6', + 'face_bitter_smile2', + 'lip_wait', + 'yes', + 'no', + 'shy2', + 'face_anger_strong', + 'face_awkward', + 'face_shy_surp', + 'smile1', + 'wait1', + 'lip_surp', + 'lip_sad', + 'face_bitter_smile', + 'face_tear1', + 'face_smile3', + 'face_sleep', + 'x', + 's', + 'face_sad2', + '', + 'face_smile4', + 'lip_anger', + 'lip_shy', + 'off', + 'eye_off', + 'eye_on', + 'face_tear2', + ] as const, + charAnim1Loop: [False] as const, + charAnim1: [ + 'sad1', + 'wait', + 'think', + 'smile2', + 'wait2', + 'surp2', + 'shy2', + 'wait1', + 'wait3', + 'shy3', + 'smile1', + 'smile4', + 'wait4', + 'surp1', + 'anger2', + 'sad2', + 'hello', + 'anger1', + 'shy1', + 'sleep', + 'shrug', + 'smile3', + 'sad3', + 'wait5', + 'surp3', + 'anger3', + 'decide', + 'sexy', + 'touch', + 'play', + '//何か音などなどがここに欲しいかも。もっと「あ危険だ!」と演出したい', + 'hungry', + 'hero2', + 'touch2', + 'wink', + 'sleep1', + 'sleep2', + 'hero', + 'salute', + 'sorry', + 'think2', + 'think1', + 'pain', + 'attack', + 'damage', + 'doubt', + 'why', + 'surp4', + 'wave_hand', + 'yawn', + 'tired', + 'sleep3', + 'serious', + 'sigh', + 'mask_take', + 'no', + 'wait_return_L', + 'yes', + 'shrug2', + 'idol', + 'skirt', + 'moe', + 'panic', + 'pray', + 'android', + 'anger4', + '', + 'no2', + 'fear', + 'dear', + 'blank', + '//ikumo:愛依が背伸びしてる様子をビーチサンダルで走る音(女性1人)SE0262で演出。', + '//ikumo拾う様子を衣擦れの音(0328)で演出。', + 'off', + ] as const, + bgEffectTime: [ + 500, + 800, + 1300, + 1000, + 1100, + 600, + 1600, + 3000, + 2000, + 1500, + 200, + 700, + 1200, + 300, + 150, + 1400, + 400, + 2500, + 900, + 1800, + 250, + 4000, + 100, + 2200, + 3500, + 750, + 5000, + None, + ] as const, + bgEffect1: ['fade'] as const, + bgEffect: [ + 'fade', + 'mask', + 'white_add', + 'blur', + 'white_fade', + 'fade_out', + ] as const, + autoWaitTime: [ + 1000, 2000, 2500, 1500, 1200, 800, 700, 3500, 1300, 500, 2700, 3000, 2800, + 2200, 10500, 6000, 4000, 1800, 5000, 6500, 1700, 4600, 7000, 4500, 1900, + 2300, 2600, 600, 1600, 5500, 300, 1100, 3750, 3200, 900, 5700, 3600, 4300, + 2900, 4700, 3700, 3300, 4400, 3800, 2100, 2400, 400, 3400, 1400, 1750, 4800, + 4200, 3100, + ] as const, + _EMPTY: ['1500', '2000'] as const, +} + +export default vals