pref: get loli data through backend

This commit is contained in:
KUN1007 2023-10-21 15:35:12 +08:00
parent c71e5bb3f0
commit c24f8410ed
76 changed files with 86 additions and 901 deletions

View file

@ -23,6 +23,7 @@
"Hitomi",
"Hokenshitsu",
"iconify",
"indexdb",
"INTLIFY",
"Irotoridori",
"Joshu",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 840 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 768 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 844 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 802 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 878 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 828 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 826 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 846 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 868 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 702 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 848 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 920 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 690 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 814 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 826 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 902 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 784 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 724 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 928 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 802 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 960 B

View file

@ -1,802 +0,0 @@
[
{
"name": "汗",
"left": 287,
"top": 425,
"width": 12,
"height": 14,
"visible": 1,
"layer_id": 2961,
"group_layer_id": 2931
},
{
"name": "追真剣",
"left": 234,
"top": 383,
"width": 76,
"height": 27,
"visible": 1,
"layer_id": 3022,
"group_layer_id": 2923
},
{
"name": "笑1",
"left": 232,
"top": 380,
"width": 78,
"height": 29,
"visible": 1,
"layer_id": 2842,
"group_layer_id": 2923
},
{
"name": "笑2",
"left": 235,
"top": 385,
"width": 76,
"height": 32,
"visible": 1,
"layer_id": 2845,
"group_layer_id": 2923
},
{
"name": "怒1",
"left": 239,
"top": 382,
"width": 63,
"height": 28,
"visible": 1,
"layer_id": 2848,
"group_layer_id": 2923
},
{
"name": "怒2",
"left": 240,
"top": 382,
"width": 60,
"height": 26,
"visible": 1,
"layer_id": 2864,
"group_layer_id": 2923
},
{
"name": "悲1",
"left": 237,
"top": 386,
"width": 70,
"height": 28,
"visible": 1,
"layer_id": 2855,
"group_layer_id": 2923
},
{
"name": "悲2",
"left": 238,
"top": 391,
"width": 66,
"height": 28,
"visible": 1,
"layer_id": 2859,
"group_layer_id": 2923
},
{
"name": "泣1",
"left": 243,
"top": 388,
"width": 58,
"height": 30,
"visible": 1,
"layer_id": 2865,
"group_layer_id": 2923
},
{
"name": "泣2",
"left": 240,
"top": 386,
"width": 65,
"height": 31,
"visible": 1,
"layer_id": 2870,
"group_layer_id": 2923
},
{
"name": "驚1",
"left": 232,
"top": 379,
"width": 78,
"height": 31,
"visible": 1,
"layer_id": 2877,
"group_layer_id": 2923
},
{
"name": "驚2",
"left": 232,
"top": 379,
"width": 78,
"height": 33,
"visible": 1,
"layer_id": 2882,
"group_layer_id": 2923
},
{
"name": "照1",
"left": 234,
"top": 382,
"width": 77,
"height": 31,
"visible": 1,
"layer_id": 2887,
"group_layer_id": 2923
},
{
"name": "照2",
"left": 239,
"top": 385,
"width": 70,
"height": 31,
"visible": 1,
"layer_id": 2893,
"group_layer_id": 2923
},
{
"name": "えっへん",
"left": 235,
"top": 384,
"width": 72,
"height": 25,
"visible": 1,
"layer_id": 2899,
"group_layer_id": 2923
},
{
"name": "ギャグ笑",
"left": 234,
"top": 383,
"width": 76,
"height": 33,
"visible": 1,
"layer_id": 2905,
"group_layer_id": 2923
},
{
"name": "ギャグ怒",
"left": 239,
"top": 384,
"width": 61,
"height": 29,
"visible": 1,
"layer_id": 2910,
"group_layer_id": 2923
},
{
"name": "ギャグ泣",
"left": 239,
"top": 389,
"width": 63,
"height": 26,
"visible": 1,
"layer_id": 2915,
"group_layer_id": 2923
},
{
"name": "ギャグ驚",
"left": 235,
"top": 383,
"width": 66,
"height": 23,
"visible": 1,
"layer_id": 2918,
"group_layer_id": 2923
},
{
"name": "追真剣",
"left": 238,
"top": 392,
"width": 78,
"height": 41,
"visible": 0,
"layer_id": 3020,
"group_layer_id": 2925
},
{
"name": "笑1",
"left": 238,
"top": 390,
"width": 78,
"height": 43,
"visible": 0,
"layer_id": 2843,
"group_layer_id": 2925
},
{
"name": "笑2",
"left": 244,
"top": 395,
"width": 69,
"height": 37,
"visible": 0,
"layer_id": 2846,
"group_layer_id": 2925
},
{
"name": "怒1",
"left": 238,
"top": 391,
"width": 78,
"height": 42,
"visible": 0,
"layer_id": 2850,
"group_layer_id": 2925
},
{
"name": "怒2",
"left": 238,
"top": 391,
"width": 78,
"height": 42,
"visible": 0,
"layer_id": 2853,
"group_layer_id": 2925
},
{
"name": "悲1",
"left": 238,
"top": 392,
"width": 78,
"height": 41,
"visible": 0,
"layer_id": 2856,
"group_layer_id": 2925
},
{
"name": "悲2",
"left": 240,
"top": 396,
"width": 75,
"height": 37,
"visible": 0,
"layer_id": 2861,
"group_layer_id": 2925
},
{
"name": "泣1",
"left": 243,
"top": 396,
"width": 71,
"height": 37,
"visible": 1,
"layer_id": 3025,
"group_layer_id": 2925
},
{
"name": "泣2",
"left": 238,
"top": 394,
"width": 78,
"height": 60,
"visible": 0,
"layer_id": 3024,
"group_layer_id": 2925
},
{
"name": "驚1",
"left": 238,
"top": 390,
"width": 78,
"height": 43,
"visible": 0,
"layer_id": 2880,
"group_layer_id": 2925
},
{
"name": "驚2",
"left": 238,
"top": 390,
"width": 78,
"height": 43,
"visible": 0,
"layer_id": 2885,
"group_layer_id": 2925
},
{
"name": "照1",
"left": 238,
"top": 392,
"width": 78,
"height": 41,
"visible": 0,
"layer_id": 2891,
"group_layer_id": 2925
},
{
"name": "照2",
"left": 244,
"top": 395,
"width": 69,
"height": 37,
"visible": 0,
"layer_id": 2896,
"group_layer_id": 2925
},
{
"name": "えっへん",
"left": 244,
"top": 396,
"width": 68,
"height": 38,
"visible": 0,
"layer_id": 2902,
"group_layer_id": 2925
},
{
"name": "ギャグ笑",
"left": 244,
"top": 395,
"width": 69,
"height": 37,
"visible": 0,
"layer_id": 2908,
"group_layer_id": 2925
},
{
"name": "ギャグ怒",
"left": 244,
"top": 401,
"width": 66,
"height": 33,
"visible": 0,
"layer_id": 2913,
"group_layer_id": 2925
},
{
"name": "ギャグ泣",
"left": 244,
"top": 405,
"width": 66,
"height": 47,
"visible": 0,
"layer_id": 2916,
"group_layer_id": 2925
},
{
"name": "ギャグ驚",
"left": 248,
"top": 395,
"width": 57,
"height": 37,
"visible": 0,
"layer_id": 2920,
"group_layer_id": 2925
},
{
"name": "追開け",
"left": 270,
"top": 430,
"width": 19,
"height": 16,
"visible": 1,
"layer_id": 2980,
"group_layer_id": 2927
},
{
"name": "追閉じ",
"left": 271,
"top": 430,
"width": 18,
"height": 14,
"visible": 0,
"layer_id": 2969,
"group_layer_id": 2927
},
{
"name": "追真剣",
"left": 273,
"top": 433,
"width": 12,
"height": 13,
"visible": 0,
"layer_id": 3023,
"group_layer_id": 2927
},
{
"name": "笑1",
"left": 269,
"top": 429,
"width": 21,
"height": 18,
"visible": 0,
"layer_id": 2844,
"group_layer_id": 2927
},
{
"name": "笑2",
"left": 268,
"top": 428,
"width": 24,
"height": 22,
"visible": 0,
"layer_id": 2847,
"group_layer_id": 2927
},
{
"name": "怒1",
"left": 272,
"top": 433,
"width": 15,
"height": 12,
"visible": 0,
"layer_id": 2851,
"group_layer_id": 2927
},
{
"name": "怒2",
"left": 268,
"top": 428,
"width": 25,
"height": 23,
"visible": 0,
"layer_id": 2854,
"group_layer_id": 2927
},
{
"name": "悲1",
"left": 272,
"top": 434,
"width": 14,
"height": 11,
"visible": 0,
"layer_id": 2857,
"group_layer_id": 2927
},
{
"name": "悲2",
"left": 272,
"top": 435,
"width": 15,
"height": 12,
"visible": 0,
"layer_id": 2862,
"group_layer_id": 2927
},
{
"name": "泣1",
"left": 270,
"top": 431,
"width": 21,
"height": 17,
"visible": 0,
"layer_id": 2869,
"group_layer_id": 2927
},
{
"name": "泣2",
"left": 270,
"top": 433,
"width": 22,
"height": 13,
"visible": 0,
"layer_id": 2876,
"group_layer_id": 2927
},
{
"name": "驚1",
"left": 272,
"top": 432,
"width": 14,
"height": 16,
"visible": 0,
"layer_id": 2881,
"group_layer_id": 2927
},
{
"name": "驚2",
"left": 268,
"top": 427,
"width": 26,
"height": 25,
"visible": 0,
"layer_id": 2886,
"group_layer_id": 2927
},
{
"name": "照1",
"left": 269,
"top": 431,
"width": 20,
"height": 15,
"visible": 0,
"layer_id": 2892,
"group_layer_id": 2927
},
{
"name": "照2",
"left": 268,
"top": 430,
"width": 23,
"height": 19,
"visible": 0,
"layer_id": 2897,
"group_layer_id": 2927
},
{
"name": "えっへん",
"left": 269,
"top": 429,
"width": 22,
"height": 20,
"visible": 0,
"layer_id": 2903,
"group_layer_id": 2927
},
{
"name": "ギャグ笑",
"left": 267,
"top": 427,
"width": 26,
"height": 24,
"visible": 0,
"layer_id": 2909,
"group_layer_id": 2927
},
{
"name": "ギャグ怒",
"left": 270,
"top": 430,
"width": 20,
"height": 16,
"visible": 0,
"layer_id": 2914,
"group_layer_id": 2927
},
{
"name": "ギャグ泣",
"left": 270,
"top": 434,
"width": 19,
"height": 11,
"visible": 0,
"layer_id": 2917,
"group_layer_id": 2927
},
{
"name": "ギャグ驚",
"left": 267,
"top": 427,
"width": 25,
"height": 24,
"visible": 0,
"layer_id": 2921,
"group_layer_id": 2927
},
{
"name": "G頬",
"left": 249,
"top": 415,
"width": 59,
"height": 28,
"visible": 0,
"layer_id": 813,
"group_layer_id": 2314
},
{
"name": "頬1",
"left": 246,
"top": 410,
"width": 65,
"height": 35,
"visible": 0,
"layer_id": 2369,
"group_layer_id": 2314
},
{
"name": "頬2",
"left": 245,
"top": 410,
"width": 66,
"height": 35,
"visible": 0,
"layer_id": 2364,
"group_layer_id": 2314
},
{
"name": "頬3",
"left": 245,
"top": 408,
"width": 66,
"height": 38,
"visible": 0,
"layer_id": 2360,
"group_layer_id": 2314
},
{
"name": "頬4",
"left": 242,
"top": 406,
"width": 69,
"height": 44,
"visible": 1,
"layer_id": 2356,
"group_layer_id": 2314
},
{
"name": "頬5",
"left": 245,
"top": 410,
"width": 66,
"height": 36,
"visible": 0,
"layer_id": 2352,
"group_layer_id": 2314
},
{
"name": "斜め1",
"left": 148,
"top": 323,
"width": 309,
"height": 600,
"visible": 1,
"layer_id": 2346,
"group_layer_id": 2086
},
{
"name": "斜め2",
"left": 148,
"top": 323,
"width": 309,
"height": 600,
"visible": 0,
"layer_id": 2345,
"group_layer_id": 2086
},
{
"name": "斜め1",
"left": 147,
"top": 323,
"width": 313,
"height": 600,
"visible": 1,
"layer_id": 2934,
"group_layer_id": 2090
},
{
"name": "斜め2",
"left": 147,
"top": 323,
"width": 313,
"height": 600,
"visible": 1,
"layer_id": 2933,
"group_layer_id": 2090
},
{
"name": "斜め1",
"left": 137,
"top": 323,
"width": 367,
"height": 602,
"visible": 1,
"layer_id": 2340,
"group_layer_id": 2094
},
{
"name": "斜め2",
"left": 137,
"top": 323,
"width": 367,
"height": 602,
"visible": 1,
"layer_id": 2339,
"group_layer_id": 2094
},
{
"name": "斜め1",
"left": 148,
"top": 323,
"width": 294,
"height": 599,
"visible": 0,
"layer_id": 2338,
"group_layer_id": 2098
},
{
"name": "斜め2",
"left": 148,
"top": 323,
"width": 290,
"height": 599,
"visible": 1,
"layer_id": 2337,
"group_layer_id": 2098
},
{
"name": "汗",
"left": 0,
"top": 0,
"width": 0,
"height": 0,
"visible": 0,
"layer_id": 2931,
"group_layer_id": 974
},
{
"name": "眉",
"left": 0,
"top": 0,
"width": 0,
"height": 0,
"visible": 0,
"layer_id": 2923,
"group_layer_id": 974
},
{
"name": "目",
"left": 0,
"top": 0,
"width": 0,
"height": 0,
"visible": 1,
"layer_id": 2925,
"group_layer_id": 974
},
{
"name": "口",
"left": 0,
"top": 0,
"width": 0,
"height": 0,
"visible": 0,
"layer_id": 2927,
"group_layer_id": 974
},
{
"name": "頬",
"left": 0,
"top": 0,
"width": 0,
"height": 0,
"visible": 0,
"layer_id": 2314,
"group_layer_id": 975
},
{
"name": "喫茶店服",
"left": 0,
"top": 0,
"width": 0,
"height": 0,
"visible": 0,
"layer_id": 2086,
"group_layer_id": 975
},
{
"name": "パジャマ",
"left": 0,
"top": 0,
"width": 0,
"height": 0,
"visible": 0,
"layer_id": 2090,
"group_layer_id": 975
},
{
"name": "私服2",
"left": 0,
"top": 0,
"width": 0,
"height": 0,
"visible": 0,
"layer_id": 2094,
"group_layer_id": 975
},
{
"name": "私服1",
"left": 0,
"top": 0,
"width": 0,
"height": 0,
"visible": 1,
"layer_id": 2098,
"group_layer_id": 975
}
]

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { getLoli } from '@/utils/loli'
import { useLoliDataURL } from '@/hooks/useLoli'
import { onMounted, ref } from 'vue'
const loliData = ref({
@ -20,10 +20,10 @@ const loliData = ref({
face: '',
})
const reGetLoli = () => (loliData.value = getLoli())
const reGetLoli = async () => (loliData.value = await useLoliDataURL())
onMounted(() => {
loliData.value = getLoli()
onMounted(async () => {
loliData.value = await useLoliDataURL()
})
</script>
@ -72,7 +72,7 @@ onMounted(() => {
position: absolute;
z-index: 9999;
top: -270px;
left: 150px;
left: 130px;
}
.body {
position: absolute;

80
src/hooks/useLoli.ts Normal file
View file

@ -0,0 +1,80 @@
import { useKUNGalgameUserStore } from '@/store/modules/kungalgamer'
// 这里比较怪异buffer 上有个 data 属性,不知道哪里来的
interface LoliBuffer {
data: Uint8Array
}
export interface LoliData {
loliBodyLeft: string
loliBodyTop: string
loliEyeLeft: string
loliEyeTop: string
loliBrowLeft: string
loliBrowTop: string
loliMouthLeft: string
loliMouthTop: string
loliFaceLeft: string
loliFaceTop: string
body: LoliBuffer
eye: LoliBuffer
brow: LoliBuffer
mouth: LoliBuffer
face: LoliBuffer
}
export type LoliDataResponseData = KUNGalgameResponseData<LoliData>
const fetchGetLoliData = async (): Promise<
KUNGalgameResponseData<LoliData>
> => {
const baseUrl = import.meta.env.VITE_API_BASE_URL
const url = `/loli/image`
const fullUrl = `${baseUrl}${url}`
const response = await fetch(fullUrl, {
method: 'GET',
headers: {
Authorization: `Bearer ${useKUNGalgameUserStore().getToken()}`,
},
})
return await response.json()
}
// 这里不缓存 loli 数据了,不然 indexdb 数据太多了太难看了
const createImageUrl = (imageBuffer: LoliBuffer) => {
const uint8Array = new Uint8Array(imageBuffer.data)
const blob = new Blob([uint8Array], { type: 'image/webp' })
return URL.createObjectURL(blob)
}
export const useLoliDataURL = async () => {
const loliData = (await fetchGetLoliData()).data
const imageUrls = [
createImageUrl(loliData.body),
createImageUrl(loliData.eye),
createImageUrl(loliData.brow),
createImageUrl(loliData.mouth),
createImageUrl(loliData.face),
]
return {
loliBodyLeft: loliData.loliBodyLeft,
loliBodyTop: loliData.loliBodyTop,
loliEyeLeft: loliData.loliEyeLeft,
loliEyeTop: loliData.loliEyeTop,
loliBrowLeft: loliData.loliBrowLeft,
loliBrowTop: loliData.loliBrowTop,
loliMouthLeft: loliData.loliMouthLeft,
loliMouthTop: loliData.loliMouthTop,
loliFaceLeft: loliData.loliFaceLeft,
loliFaceTop: loliData.loliFaceTop,
body: imageUrls[0],
eye: imageUrls[1],
brow: imageUrls[2],
mouth: imageUrls[3],
face: imageUrls[4],
}
}

View file

@ -1,94 +0,0 @@
/* KUNGalgame 全局看板娘数据的读取文件 */
// 读取 JSON 文件数据
import loliData from '@/assets/images/ren/ren.json'
/* 随机数 */
import { randomNum } from './random'
export const getLoli = () => {
// 获取本地图片文件,注意这里不能用 @ 作为基础路径,只能用 ..
const getAssetsFile = (url: number) => {
return new URL(`../assets/images/ren/${url}.webp`, import.meta.url).href
}
/* 随机汗水 */
// const randomSweat = randomNum(0, 1)
/* 随机眉毛 */
const randomBrow = randomNum(1, 18)
/* 随机眼睛 */
const randomEye = randomNum(19, 36)
/* 随机嘴巴 */
const randomMouth = randomNum(37, 56)
/* 随机腮红 */
const randomFace = randomNum(57, 62)
/* 随机衣服 */
const randomSkirt = randomNum(63, 70)
// 定义一个 loli 对象
const loli = {
lass: loliData[randomSkirt],
eye: loliData[randomEye],
brow: loliData[randomBrow],
mouth: loliData[randomMouth],
face: loliData[randomFace],
}
// 身体定位
const loliBodyLeft = loli.lass.left + 'px'
const loliBodyTop = loli.lass.top + 'px'
// 眼睛定位
const loliEyeLeft = loli.eye.left + 'px'
const loliEyeTop = loli.eye.top + 'px'
// 眉毛定位
const loliBrowLeft = loli.brow.left + 'px'
const loliBrowTop = loli.brow.top + 'px'
// 嘴巴定位
const loliMouthLeft = loli.mouth.left + 'px'
const loliMouthTop = loli.mouth.top + 'px'
// 腮红定位
const loliFaceLeft = loli.face.left + 'px'
const loliFaceTop = loli.face.top + 'px'
// 身体的图片资源链接
const body = getAssetsFile(loli.lass.layer_id)
// 眼睛的图片资源链接
const eye = getAssetsFile(loli.eye.layer_id)
// 眉毛的图片资源链接
const brow = getAssetsFile(loli.brow.layer_id)
// 嘴巴的图片资源链接
const mouth = getAssetsFile(loli.mouth.layer_id)
// 腮红的图片资源链接
const face = getAssetsFile(loli.face.layer_id)
// 导出模块
return {
loliBodyLeft,
loliBodyTop,
loliEyeLeft,
loliEyeTop,
loliBrowLeft,
loliBrowTop,
loliMouthLeft,
loliMouthTop,
loliFaceLeft,
loliFaceTop,
body,
eye,
brow,
mouth,
face,
}
}