-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: more typesafe version of the debugger
- Loading branch information
1 parent
1e4908e
commit 3bfda04
Showing
5 changed files
with
175 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<template> | ||
<div class="f-debug-panel-2d"> | ||
<div v-for="component in components" :key="component.__ID__"> | ||
<h3 class="f-component-id">{{ component.__ID__ }}</h3> | ||
<div class="f-debug-property"> | ||
<div class="f-debug-property-group"> | ||
<h4>Position</h4> | ||
<p>x : {{ component.position.x }}</p> | ||
<p>y : {{ component.position.y }}</p> | ||
</div> | ||
<p>r : {{ component.rotation }}</p> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import type { PropType } from 'vue' | ||
import { defineProps } from 'vue' | ||
import type { FComponent2d } from '@fibbojs/2d'; | ||
defineProps({ | ||
components: { | ||
type: Array as PropType<FComponent2d[]>, | ||
default: () => [] | ||
} | ||
}) | ||
</script> | ||
|
||
<style scoped> | ||
.f-component-id { | ||
color: #fff; | ||
margin: 0; | ||
} | ||
.f-debug-properties { | ||
padding: 10px; | ||
border-bottom: 1px solid #fff; | ||
} | ||
.f-debug-property { | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
.f-debug-property p { | ||
margin: 0; | ||
color: #fff; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<template> | ||
<div class="f-debug-panel-3d"> | ||
<div v-for="component in components" :key="component.__ID__"> | ||
<h3 class="f-component-id">{{ component.__ID__ }}</h3> | ||
<div class="f-debug-property"> | ||
<div class="f-debug-property-group"> | ||
<h4>Position</h4> | ||
<p>x : {{ component.position.x }}</p> | ||
<p>y : {{ component.position.y }}</p> | ||
<p>y : {{ component.position.z }}</p> | ||
</div> | ||
<div class="f-debug-property-group"> | ||
<h4>Rotation</h4> | ||
<p>x : {{ component.rotation.x }}</p> | ||
<p>y : {{ component.rotation.y }}</p> | ||
<p>y : {{ component.rotation.z }}</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import type { PropType } from 'vue' | ||
import { defineProps } from 'vue' | ||
import type { FComponent3d } from '@fibbojs/3d'; | ||
defineProps({ | ||
components: { | ||
type: Array as PropType<FComponent3d[]>, | ||
default: () => [] | ||
} | ||
}) | ||
</script> | ||
|
||
<style scoped> | ||
.f-component-id { | ||
color: #fff; | ||
margin: 0; | ||
} | ||
.f-debug-properties { | ||
padding: 10px; | ||
border-bottom: 1px solid #fff; | ||
} | ||
.f-debug-property { | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
.f-debug-property p { | ||
margin: 0; | ||
color: #fff; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters