From 393a947c7803c390b4ec5a3202bd6dd660e7c4bb Mon Sep 17 00:00:00 2001 From: Marcus Longmuir Date: Sun, 12 May 2024 21:50:17 +0100 Subject: [PATCH] Expose updateLocationHash config --- .../3d-web-client-core/src/character/CharacterManager.ts | 5 ++--- .../src/Networked3dWebExperienceClient.ts | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/3d-web-client-core/src/character/CharacterManager.ts b/packages/3d-web-client-core/src/character/CharacterManager.ts index 53c1d13a..5a632c6d 100644 --- a/packages/3d-web-client-core/src/character/CharacterManager.ts +++ b/packages/3d-web-client-core/src/character/CharacterManager.ts @@ -31,11 +31,10 @@ export type CharacterManagerConfig = { username: string; characterDescription: CharacterDescription; }; + updateLocationHash?: boolean; }; export class CharacterManager { - private updateLocationHash = true; - public readonly headTargetOffset = new Vector3(0, 1.3, 0); private localClientId: number = 0; @@ -234,7 +233,7 @@ export class CharacterManager { } } - if (this.updateLocationHash && this.config.timeManager.frame % 60 === 0) { + if (this.config.updateLocationHash && this.config.timeManager.frame % 60 === 0) { window.location.hash = encodeCharacterAndCamera( this.localCharacter, this.config.cameraManager.camera, diff --git a/packages/3d-web-experience-client/src/Networked3dWebExperienceClient.ts b/packages/3d-web-experience-client/src/Networked3dWebExperienceClient.ts index 95e5342d..353d7abb 100644 --- a/packages/3d-web-experience-client/src/Networked3dWebExperienceClient.ts +++ b/packages/3d-web-experience-client/src/Networked3dWebExperienceClient.ts @@ -207,6 +207,7 @@ export class Networked3dWebExperienceClient { characterResolve: (characterId: number) => { return this.resolveCharacterData(characterId); }, + updateLocationHash: true, }); this.scene.add(this.characterManager.group);