presentation

This commit is contained in:
2025-03-17 19:49:41 +02:00
parent d5d8d60212
commit 9eb14f0668
13 changed files with 218 additions and 117 deletions
+4 -2
View File
@@ -3,9 +3,10 @@
<g @mousedown="$emit('target', {target:vd, attrs:['x1', 'y1'], delta: true})" :class="{gameObject: true, selected}" v-show="visible && parent.visible">
<line :x1="vd.x1" :y1="vd.y1" :x2="parent.vd.x1" :y2="parent.vd.y1"></line>
<svg-icon :src="`/asset/thumb/${modelValue.go||0}.webp`" :x="vd.x1" :y="vd.y1" :size="37"></svg-icon>
<text :x="vd.x1" :y="vd.y1" dy="58">{{ modelValue.title }}</text>
</g>
</teleport>
<v-card v-if="selected" class="py-4">
<v-card v-if="selected" :title="modelValue.title">
<asset-selector @select="assignGameObject" type="GameObject">
<template v-slot:activator="props">
<v-btn v-bind="props" prepend-icon="mdi-panorama-outline" color="success" block>Choose game object</v-btn>
@@ -13,6 +14,7 @@
</asset-selector>
<v-form class="py-4">
<v-text-field density="compact" :label="$l.name" v-model="modelValue.title"></v-text-field>
<v-textarea :label="$l.description" v-model="modelValue.description"></v-textarea>
</v-form>
</v-card>
</template>
@@ -46,7 +48,7 @@ export default {
modifiers: ['x1', 'y1'],
methods:{
intersect(v){
return Utils.intersectLineRect(this.vd, v);
return Utils.intersectPointRect([this.vd.x1, this.vd.y1], v);
},
assignGameObject(e){
this.modelValue.go = e.id;