Skip to content

Commit

Permalink
feat: change name to scenegraphitem
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosabu committed Dec 6, 2023
1 parent e35d546 commit 8368efc
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 4 deletions.
Expand Up @@ -34,6 +34,56 @@ function roundNumber(num: number) {
>
{{ item.name }}
</UBadge>
<template v-if="item.type.includes('Light') && !isExpanded">
<UBadge
color="gray"
variant="soft"
>
<span
class="w4 h4 rounded-full mr-2 border border-gray-200"
:style="{ backgroundColor: `#${item.color}` }"
/>
#{{ item.color }}
</UBadge>
<UBadge
color="green"
variant="soft"
>
{{ item.intensity }}
</UBadge>
</template>
<template v-if="item.type.includes('Camera') && !isExpanded">
<UTooltip
text="X"

Check warning on line 57 in client/components/SceneGraphItem.vue

View workflow job for this annotation

GitHub Actions / Lint (16)

Expected indentation of 12 spaces but found 14 spaces
>

Check warning on line 58 in client/components/SceneGraphItem.vue

View workflow job for this annotation

GitHub Actions / Lint (16)

Expected indentation of 10 spaces but found 12 spaces
<UBadge

Check warning on line 59 in client/components/SceneGraphItem.vue

View workflow job for this annotation

GitHub Actions / Lint (16)

Expected indentation of 12 spaces but found 14 spaces
color="gray"

Check warning on line 60 in client/components/SceneGraphItem.vue

View workflow job for this annotation

GitHub Actions / Lint (16)

Expected indentation of 14 spaces but found 16 spaces
variant="soft"

Check warning on line 61 in client/components/SceneGraphItem.vue

View workflow job for this annotation

GitHub Actions / Lint (16)

Expected indentation of 14 spaces but found 16 spaces
>

Check warning on line 62 in client/components/SceneGraphItem.vue

View workflow job for this annotation

GitHub Actions / Lint (16)

Expected indentation of 12 spaces but found 14 spaces
{{ roundNumber(item.position.x) }}

Check warning on line 63 in client/components/SceneGraphItem.vue

View workflow job for this annotation

GitHub Actions / Lint (16)

Expected indentation of 14 spaces but found 16 spaces
</UBadge>

Check warning on line 64 in client/components/SceneGraphItem.vue

View workflow job for this annotation

GitHub Actions / Lint (16)

Expected indentation of 12 spaces but found 14 spaces
</UTooltip>

Check warning on line 65 in client/components/SceneGraphItem.vue

View workflow job for this annotation

GitHub Actions / Lint (16)

Expected indentation of 10 spaces but found 12 spaces
<UTooltip

Check warning on line 66 in client/components/SceneGraphItem.vue

View workflow job for this annotation

GitHub Actions / Lint (16)

Expected indentation of 10 spaces but found 12 spaces
text="Y"
>
<UBadge
color="gray"
variant="soft"
>
{{ roundNumber(item.position.y) }}
</UBadge>
</UTooltip>
<UTooltip
text="Z"
>
<UBadge
color="gray"
variant="soft"
>
{{ roundNumber(item.position.z) }}
</UBadge>
</UTooltip>
</template>
</div>
</div>
<div
Expand All @@ -42,7 +92,7 @@ function roundNumber(num: number) {
:class="{ 'border-l border-gray-300': item.children.length > 0 }"
>
<template v-if="item.children.length > 0">
<TreeItem
<SceneGraphItem
v-for="(child, index) in item.children"
:key="index"
:depth="depth + 1"
Expand Down
3 changes: 1 addition & 2 deletions client/pages/index.vue
@@ -1,6 +1,5 @@
<script setup lang="ts">
import { useDevtoolsClient } from '@nuxt/devtools-kit/iframe-client'
import { bytesToMB } from '../utils'
import { useDevtoolsHook } from '~/composables/useDevtoolsHook'
const client = useDevtoolsClient()
Expand Down Expand Up @@ -55,7 +54,7 @@ const icons: Record<string, string> = {
text="Scene Graph"
:description="`Total Objects ${scene.objects}`"
>
<TreeItem :item="scene.graph" />
<SceneGraphItem :item="scene.graph" />
</NSectionBlock>
<NSectionBlock
icon="i-iconoir-dashboard-speed"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -23,7 +23,7 @@
"dist"
],
"scripts": {
"prepack": "nuxt-module-build",
"prepack": "nuxt-module-build && npm run client:build",
"client:build": "nuxi generate client",
"client:dev": "nuxi dev client --port 3300",
"dev": "nuxi dev playground",
Expand Down

0 comments on commit 8368efc

Please sign in to comment.