This commit is contained in:
chndfang 2025-06-08 16:58:13 +08:00
parent 74c97d077b
commit d80316180b
2 changed files with 1 additions and 19 deletions

View File

@ -52,24 +52,6 @@ onMounted(async () => {
await readScene();
await editor.value?.initRobots();
await monitorScene();
// const id = 'mock-robot-1';
// let x = 800;
// let y = 500;
// const active = true;
// const angle = -90;
// const path = <[number, number][]>[
// [600, 500],
// [100, 400],
// ];
// editor.value?.refreshRobot(id, { x, y, active, angle, path });
// const test = () =>
// requestAnimationFrame(() => {
// x -= 0.1;
// editor.value?.refreshRobot(id, { x, y });
// test();
// });
// test();
});
onUnmounted(() => {
client.value?.close();

View File

@ -404,7 +404,7 @@ export class EditorService extends Meta2d {
): Required<Pick<MapPen, 'image' | 'iconWidth' | 'iconHeight' | 'iconTop'>> {
const theme = this.data().theme;
const image =
import.meta.env.BASE_URL + active ? `/robot/${type}-active-${theme}.png` : `/robot/${type}-${theme}.png`;
import.meta.env.BASE_URL + (active ? `/robot/${type}-active-${theme}.png` : `/robot/${type}-${theme}.png`);
return { image, iconWidth: 34, iconHeight: 54, iconTop: -5 };
}
//#endregion