Skip to content

Commit

Permalink
fix: configure styling correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Gugustinette committed Aug 14, 2024
1 parent 3bfda04 commit f1c4ed0
Show file tree
Hide file tree
Showing 10 changed files with 273 additions and 139 deletions.
145 changes: 145 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"eslint": "^9.7.0",
"nx": "19.0.2",
"rimraf": "^5.0.5",
"sass": "^1.77.8",
"typedoc": "^0.26.5",
"typedoc-plugin-markdown": "^4.2.2",
"typescript": "^5.5.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools/src/FDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class FDebug {
customElements.define('f-debug-panel', FDebugPanelElement)
// Create and inject the custom element into the DOM
const debugPanel = new FDebugPanelElement({
title: 'Debug Panel Prop Test',
title: 'Fibbo',
scene: this.scene,
})
document.body.appendChild(debugPanel)
Expand Down
27 changes: 27 additions & 0 deletions packages/devtools/src/components/2d/FComponent2d.ce.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<template>
<div class="f-component f-component-2d">
<!-- @vue-skip -->
<h4 class="f-component-id">{{ component.constructor.name }} ({{ component.__ID__ }})</h4>
<div class="f-component-property">
<div class="f-component-property-group">
<p>Position</p>
<p>x : {{ component.position.x }}</p>
<p>y : {{ component.position.y }}</p>
</div>
<p>r : {{ component.rotation }}</p>
</div>
</div>
</template>

<script setup lang="ts">
import type { PropType } from 'vue'
import { defineProps } from 'vue'
import type { FComponent2d } from '@fibbojs/2d';
defineProps({
component: {
type: Object as PropType<FComponent2d>,
required: true
}
})
</script>
23 changes: 23 additions & 0 deletions packages/devtools/src/components/2d/FComponents2d.ce.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<template>
<div class="f-components">
<FComponent2dDom
v-for="component in components"
:key="component.__ID__"
:component="component"
/>
</div>
</template>

<script setup lang="ts">
import type { PropType } from 'vue'
import { defineProps } from 'vue'
import type { FComponent2d } from '@fibbojs/2d';
import FComponent2dDom from './FComponent2d.ce.vue';
defineProps({
components: {
type: Array as PropType<FComponent2d[]>,
default: () => []
}
})
</script>
33 changes: 33 additions & 0 deletions packages/devtools/src/components/3d/FComponent3d.ce.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<template>
<div class="f-component f-component-3d">
<!-- @vue-skip -->
<h4 class="f-component-id">{{ component.constructor.name }} ({{ component.__ID__ }})</h4>
<div class="f-component-property">
<div class="f-component-property-group">
<p>Position</p>
<p>x : {{ component.position.x }}</p>
<p>y : {{ component.position.y }}</p>
<p>z : {{ component.position.z }}</p>
</div>
<div class="f-component-property-group">
<p>Rotation</p>
<p>x : {{ component.rotation.x }}</p>
<p>y : {{ component.rotation.y }}</p>
<p>z : {{ component.rotation.z }}</p>
</div>
</div>
</div>
</template>

<script setup lang="ts">
import type { PropType } from 'vue'
import { defineProps } from 'vue'
import type { FComponent3d } from '@fibbojs/3d';
defineProps({
component: {
type: Object as PropType<FComponent3d>,
required: true
}
})
</script>
23 changes: 23 additions & 0 deletions packages/devtools/src/components/3d/FComponents3d.ce.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<template>
<div class="f-components">
<FComponent3dDom
v-for="component in components"
:key="component.__ID__"
:component="component"
/>
</div>
</template>

<script setup lang="ts">
import type { PropType } from 'vue'
import { defineProps } from 'vue'
import type { FComponent3d } from '@fibbojs/3d';
import FComponent3dDom from './FComponent3d.ce.vue';
defineProps({
components: {
type: Array as PropType<FComponent3d[]>,
default: () => []
}
})
</script>
Loading

0 comments on commit f1c4ed0

Please sign in to comment.