presentation
This commit is contained in:
@@ -2,10 +2,11 @@
|
||||
<teleport to=".scene-designer .scenes" v-if="active">
|
||||
<g @mousedown="$emit('target', {target:vd, attrs:['x1', 'y1'], delta: true})" :class="{scene: true, selected}" v-show="visible">
|
||||
<svg-icon :src="`/asset/thumb/${modelValue.environment||0}.webp`" :x="vd.x1" :y="vd.y1" :size="65"></svg-icon>
|
||||
<text :x="vd.x1" :y="vd.y1" dy="86">{{ modelValue.title }}</text>
|
||||
</g>
|
||||
</teleport>
|
||||
<v-card title="Scene" v-if="selected">
|
||||
<asset-selector @select="assignGameObject" type="Scene">
|
||||
<v-card :title="modelValue.title" v-if="selected">
|
||||
<asset-selector @select="assignEnvironment" type="Scene">
|
||||
<template v-slot:activator="props">
|
||||
<v-btn v-bind="props" prepend-icon="mdi-panorama-outline" block color="success" class="py-4">Choose environment</v-btn>
|
||||
</template>
|
||||
@@ -13,8 +14,8 @@
|
||||
|
||||
<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>
|
||||
|
||||
@@ -48,9 +49,9 @@ 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){
|
||||
assignEnvironment(e){
|
||||
this.modelValue.environment = e.id;
|
||||
if (this.modelValue.id == this.modelValue.title){
|
||||
this.modelValue.title = e.name
|
||||
|
||||
Reference in New Issue
Block a user