更新脚手架!

This commit is contained in:
Andy Leong
2023-12-29 18:41:59 +08:00
parent f1c3d10fd5
commit c0871a9b1f
29 changed files with 1004 additions and 149 deletions

31
src/data/data.js Normal file
View File

@@ -0,0 +1,31 @@
export default {
//manifest 加载到纹理缓存使用的资源
manifest: [
{
name: "test0",
url: new URL(`@/assets/images/m_0.png`, import.meta.url).href,
position: { x: 110, y: 210, w: 80, h: 80 },
zIndex: 4,
},
{
name: "test1",
url: new URL(`@/assets/images/m_1.png`, import.meta.url).href,
position: { x: 110, y: 200, w: 100, h: 100 },
zIndex: 3,
},
{
name: "test2",
url: new URL(`@/assets/images/m_2.png`, import.meta.url).href,
position: { x: 110, y: 300, w: 100, h: 100 },
zIndex: 2,
},
{
name: "test3",
url: new URL(`@/assets/images/share.jpg`, import.meta.url).href,
position: { x: 110, y: 400, w: 300, h: 300 },
zIndex: 1,
}
]
}

20
src/data/imgList.js Normal file
View File

@@ -0,0 +1,20 @@
const load = [
'load/1.png',
]
// 处理为vite引入图片格式
function imgCreate(url, img) {
let i = new URL(`../assets/images/${url}`, import.meta.url).href
img.push(i)
}
const loadImg = []
const pageImg = []
load.forEach(element => {
imgCreate(element, loadImg)
});
export { loadImg, pageImg }