Skip to content

Commit

Permalink
Remove unused scene functions; add GHA autodeploy.
Browse files Browse the repository at this point in the history
  • Loading branch information
digisomni committed Jan 3, 2023
1 parent 82b3c03 commit 4184b2e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 44 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Automatically deploy the latest changes to the FTP server.
on:
# Triggers the workflow on push events but only for the "master" branch.
push:
branches: [ "master" ]

# Allows this workflow to be run manually from the Actions tab.
workflow_dispatch:

name: 🚀 Auto-Deploy
jobs:
web-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v2

- uses: actions/setup-node@master

- name: 📥 Install project dependencies
run: npm install

- name: ⚒️ Build the project
run: npm run build

- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-Action@4.3.0
with:
server: ftp.vircadia.com
username: ${{ secrets.ftp_username }}
password: ${{ secrets.ftp_password }}
local-dir: dist/spa/
server-dir: /
dry-run: false
14 changes: 0 additions & 14 deletions src/components/overlays/debug/DebugWindow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@
</q-tabs>
<q-tab-panels style="height: calc(100% - 56px);background-color: transparent;" v-model="tab" animated>
<q-tab-panel name="Domains">
<q-btn
:class="{
'bg-grey-9': $q.dark.isActive,
'bg-grey-4': !$q.dark.isActive
}"
@click="switchDomain()"
>Switch domain</q-btn>
</q-tab-panel>
<q-tab-panel name="Messages">
<q-list
Expand Down Expand Up @@ -177,7 +170,6 @@
import { defineComponent } from "vue";
import { AMessage, DefaultChatMessage } from "@Modules/domain/message";
import { Renderer } from "@Modules/scene";
import { Store, Mutations as StoreMutations } from "@Store/index";
Expand Down Expand Up @@ -360,12 +352,6 @@ export default defineComponent({
return fMsg.message;
}
return pMsg.message;
},
switchDomain(): void {
// Switch domain.
const scene = Renderer.getScene();
// eslint-disable-next-line @typescript-eslint/no-floating-promises
scene.switchDomain();
}
}
Expand Down
30 changes: 0 additions & 30 deletions src/modules/scene/vscene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { ScriptComponent, requireScript, requireScripts, reattachScript } from "
import { InputController, MyAvatarController, ScriptAvatarController, AvatarMapper } from "@Modules/avatar";
import { IEntity, IEntityDescription, EntityBuilder, EntityEvent } from "@Modules/entity";
import { ScriptAvatar } from "@vircadia/web-sdk";
import { CAMPUS_URL, SPACE_STATION_URL } from "@Base/config";
import { Utility } from "@Modules/utility";
import { Location } from "@Modules/domain/location";
import { DataMapper } from "@Modules/domain/dataMapper";
Expand All @@ -43,8 +42,6 @@ import { DomainMgr } from "../domain";
// TODO: Put this avatar (and any default scene models/animations/whatever) into the app code to be compiled with the app.
const AvatarAnimationUrl = "https://digisomni.com/cloud/cdn/y7i2mX99WqT9LFb/download/AnimationsBasic.glb";

type DomainName = "Campus" | "SpaceStation";

/**
* VScene is the interface to a single scene's state, entities, and operations.
*/
Expand All @@ -66,7 +63,6 @@ export class VScene {
_domainController : Nullable<DomainController> = null;
_sceneController : Nullable<SceneController> = null;
_sceneManager : Nullable<GameObject> = null;
_currentDomain: DomainName = "Campus";
_currentSceneURL = "";
private _onMyAvatarModelChangedObservable: Observable<GameObject> = new Observable<GameObject>();
private _onEntityEventObservable: Observable<EntityEvent> = new Observable<EntityEvent>();
Expand Down Expand Up @@ -117,14 +113,6 @@ export class VScene {
return this._myAvatarModelURL;
}

public get currentDomain(): DomainName {
return this._currentDomain;
}

public set currentDomain(value: DomainName) {
this._currentDomain = value;
}

public get css3DRenderer(): Nullable<CSS3DRenderer> {
return this._css3DRenderer;
}
Expand Down Expand Up @@ -298,24 +286,6 @@ export class VScene {
Log.info(Log.types.ENTITIES, "Load Entities done.");
}

public async goToDomain(dest: string): Promise<void> {
Log.info(Log.types.ENTITIES, `Go to domain: ${dest}`);
const domain = dest.toLocaleUpperCase();
if (domain.includes("campus")) {
await Utility.connectionSetup(CAMPUS_URL);
} else {
await Utility.connectionSetup(SPACE_STATION_URL);
}
}

public async switchDomain(): Promise<void> {
if (this._currentDomain === "Campus") {
await Utility.connectionSetup(SPACE_STATION_URL);
} else {
await Utility.connectionSetup(CAMPUS_URL);
}
}

/**
* Load an avatar model for the current player.
* @param modelURL The URL to load the model from.
Expand Down

0 comments on commit 4184b2e

Please sign in to comment.