Skip to content

Commit

Permalink
fix visual debug tweening
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartcaunt committed Jan 22, 2025
1 parent 0fc1320 commit 7b5fc5e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
15 changes: 4 additions & 11 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"@types/three": "^0.133.1",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"@tweenjs/tween.js": "^25.0.0",
"buffer": "^6.0.3",
"css-loader": "^6.11.0",
"eslint": "^7.32.0",
Expand All @@ -44,6 +43,7 @@
},
"dependencies": {
"@illgrenoble/webx-client": "^0.1.1",
"@tweenjs/tween.js": "^18.6.4",
"axios": "^1.0.0",
"query-string": "^7.1.3",
"sass": "^1.83.1"
Expand Down
11 changes: 11 additions & 0 deletions src/demo/Application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Login } from './Login';
import { WebXDemoDevTools } from './WebXDemoDevTools';
import { WebxRelayProvider } from './WebxRelayProvider';
import { WebXClient, WebXDisplay, WebXWebSocketTunnel } from '@illgrenoble/webx-client';
import * as TWEEN from '@tweenjs/tween.js';

export class Application {

Expand Down Expand Up @@ -47,6 +48,9 @@ export class Application {
})

this._login.onLogin(this._onLogin.bind(this));

// start animation control
this._animate();
}

private async getConfiguration(): Promise<{standaloneHost: string, standalonePort: number}> {
Expand All @@ -60,6 +64,13 @@ export class Application {

}

private _animate(): void {
requestAnimationFrame((time) => {
TWEEN.update(time);
this._animate();
});
}

private async _onLogin(config?: {host: string, port: number, username: string, password: string, width: number, height: number, keyboard: string}): Promise<void> {
if (!this._client) {

Expand Down

0 comments on commit 7b5fc5e

Please sign in to comment.