Skip to content

Commit

Permalink
Expose updateLocationHash config (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusLongmuir authored May 13, 2024
1 parent c4ef44a commit a3bab94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/3d-web-client-core/src/character/CharacterManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ export class Networked3dWebExperienceClient {
characterResolve: (characterId: number) => {
return this.resolveCharacterData(characterId);
},
updateLocationHash: true,
});
this.scene.add(this.characterManager.group);

Expand Down

0 comments on commit a3bab94

Please sign in to comment.