更新脚手架!
This commit is contained in:
31
src/data/data.js
Normal file
31
src/data/data.js
Normal 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
20
src/data/imgList.js
Normal 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 }
|
||||
Reference in New Issue
Block a user