Skip to content

Commit

Permalink
Mild refactor; begin adding Script functionality.
Browse files Browse the repository at this point in the history
  • Loading branch information
digisomni committed Sep 23, 2024
1 parent 08d9c2d commit c8e0866
Show file tree
Hide file tree
Showing 12 changed files with 1,132 additions and 1,019 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ Vircadia Web relies on the Vircadia Assets submodule, so you must pull recursive
git clone --recursive https://github.com/vircadia/vircadia-web.git
```

If you forget to pull recursively, you can initialize the submodule later with:
```sh
git submodule update --init --recursive
```

### Install the dependencies

```sh
Expand Down
9 changes: 1 addition & 8 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
import { onMounted } from "vue";
import { applicationStore } from "@Stores/index";
import { Utility } from "@Modules/utility";
import { Client } from "@World-Client/client";
import Log from "@Modules/debugging/log";

// Fetch and initialize configuration info
Log.debug(Log.types.OTHER, `APP: Initialize`);
Utility.initializeConfig();

onMounted(async () => {
onMounted(() => {
// Log the SDK version.
console.log("Starting Vircadia Web using SDK version:", applicationStore.globalConsts.SDK_VERSION_TAG);
// Called after the APP is visible. This starts the engines doing things.
Expand All @@ -32,11 +31,5 @@ onMounted(async () => {
if (preloader) {
preloader.classList.add("hide");
}

// await Client.Setup.InitializeVircadiaWorld({
// host: "http://localhost",
// port: 3000,
// agentId: "1234567890",
// });
});
</script>
138 changes: 69 additions & 69 deletions src/components/AudioLevel.vue
Original file line number Diff line number Diff line change
@@ -1,69 +1,69 @@
<!--
// AudioLevel.vue
//
// Created by Giga on July 17th, 2023.
// Copyright 2023 Vircadia contributors.
// Copyright 2023 DigiSomni LLC.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
-->

<style scoped lang="scss">
.verticalAudioLevel {
position: relative;
display: block;
width: 0.7ch;
min-height: 40px;
color: $primary;
font-size: 1rem;
background-color: #8884;
border-radius: 0.7ch;
overflow: hidden;

> span {
position: absolute;
bottom: 0px;
display: block;
width: 100%;
height: 0%;
color: inherit;
background-color: currentColor;
border-radius: inherit;
transition: 0.05s ease height;
}
}
</style>

<template>
<div
class="verticalAudioLevel q-my-auto"
:class="{ 'q-ml-sm': compact }"
>
<span
:class="`text-${color ?? 'primary'}`"
:style="{ height }"
></span>
</div>
</template>

<script lang="ts">
import { defineComponent } from "vue";
import { AudioIO } from "@Modules/ui/audioIO";

export default defineComponent({
name: "AudioLevel",

props: {
color: { type: String, required: false },
compact: { type: Boolean, required: false },
level: { type: Number, required: false }
},

computed: {
height(): string {
return `${this.level ?? AudioIO.inputLevel.value}%`;
}
}
});
</script>
<!--
// AudioLevel.vue
//
// Created by Giga on July 17th, 2023.
// Copyright 2023 Vircadia contributors.
// Copyright 2023 DigiSomni LLC.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
-->

<style scoped lang="scss">
.verticalAudioLevel {
position: relative;
display: block;
width: 0.7ch;
min-height: 40px;
color: $primary;
font-size: 1rem;
background-color: #8884;
border-radius: 0.7ch;
overflow: hidden;

> span {
position: absolute;
bottom: 0px;
display: block;
width: 100%;
height: 0%;
color: inherit;
background-color: currentColor;
border-radius: inherit;
transition: 0.05s ease height;
}
}
</style>

<template>
<div
class="verticalAudioLevel q-my-auto"
:class="{ 'q-ml-sm': compact }"
>
<span
:class="`text-${color ?? 'primary'}`"
:style="{ height }"
></span>
</div>
</template>

<script lang="ts">
import { defineComponent } from "vue";
import { AudioIO } from "@Modules/ui/audioIO";

export default defineComponent({
name: "AudioLevel",

props: {
color: { type: String, required: false },
compact: { type: Boolean, required: false },
level: { type: Number, required: false }
},

computed: {
height(): string {
return `${this.level ?? AudioIO.inputLevel.value}%`;
}
}
});
</script>
Loading

0 comments on commit c8e0866

Please sign in to comment.