diff --git a/package.json b/package.json
index 7216dda..9233436 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,7 @@
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.4",
- "typescript": "^5.2.2",
+ "typescript": "^5.4.5",
"unplugin-auto-import": "^0.17.5",
"unplugin-vue-components": "^0.27.0",
"vite": "^5.2.0",
diff --git a/public/nan.zip b/public/nan.zip
deleted file mode 100644
index 032e4de..0000000
Binary files a/public/nan.zip and /dev/null differ
diff --git a/src/App.vue b/src/App.vue
index 5ea8e71..f1a496a 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -29,12 +29,14 @@
:value="item.value"
/>
- 12
+ 1
+ 2
-
+
- 123
+
@@ -44,8 +46,11 @@
import AtlasRenderCanvasRegion from "./components/AtlasRenderCanvasRegion.vue";
import AtlasRenderArgument from "./entities/AtlasRenderArgument.ts";
import {onMounted, ref} from "vue";
+import {Skeleton} from "@esotericsoftware/spine-webgl";
+import {RenderArgument} from "./entities/RenderArgument.ts";
+
const show = ref(false);
-const data: AtlasRenderArgument[] = [];
+const data = ref([]);
const spineName = ref('ceshi');
const spineNameList = ref([
{
@@ -55,16 +60,16 @@ const spineNameList = ref([
{
value: 'ceshi1',
label: '测试1',
- },{
+ }, {
value: 'ceshi2',
label: '测试2',
- },{
+ }, {
value: 'ceshi3',
label: '测试3',
- },{
+ }, {
value: 'ceshi4',
label: '测试4',
- },{
+ }, {
value: 'ceshi5',
label: '测试5',
},
@@ -74,9 +79,21 @@ onMounted(async () => {
const jsonBlob = URL.createObjectURL(await json.blob());
const atlas = await fetch("/nan/nan.atlas");
const atlasBlob = URL.createObjectURL(await atlas.blob());
- data.push({skel: jsonBlob, texture: atlasBlob, scale: 1, x: 0, y: 0, animation: "animation", edit: true, textureImage: {"nan.png": "/nan/nan.png"}});
+ data.value.push({
+ skel: jsonBlob,
+ texture: atlasBlob,
+ scale: 2.5,
+ x: 12,
+ y: 92,
+ animation: "animation",
+ edit: true,
+ textureImage: {"nan.png": "/nan/nan.png"}
+ });
show.value = true;
})
+const onEdit = (skel: {skel: Skeleton, obj: RenderArgument}) => {
+ console.log(skel.skel.scaleX, skel.skel.x, skel.skel.y);
+}