Conversation
- network replicators - bigint PeerIndex/NetworkID types - spawn/despawn/update messages
This reverts commit 8417a42.
|
🚀 Deployed on https://deploy-preview-646--thirdroom.netlify.app |
robertlong
left a comment
There was a problem hiding this comment.
Looking great so far!
| rigVelocity: float_t[3] | ||
| } | ||
|
|
||
| struct AvatarXRModeUpdate { |
There was a problem hiding this comment.
Can we explain what this struct is used for in this document? Is it an RPC?
| const type = schema[key]; | ||
| const value = object[key]; | ||
| const write = BinaryToWriteFunction[type]; | ||
| write(v, value as never); |
There was a problem hiding this comment.
Why are you casting to never here?
| import { Codec } from "./Codec"; | ||
|
|
||
| export enum NetworkMessage { | ||
| // old |
There was a problem hiding this comment.
Can we remove the old messages before we merge?
| let b = 0; | ||
|
|
||
| const position = node.position; | ||
| changeMask |= writePropIfChanged(v, position, 0) ? 1 << b++ : b++ && 0; |
There was a problem hiding this comment.
Can this use your new mutationEncoder?
| @@ -1,28 +1,28 @@ | |||
| import { addComponent } from "bitecs"; | |||
There was a problem hiding this comment.
How much of this file do we still need? Can we get rid of it now?
| addChild(container, rig); | ||
|
|
||
| quat.fromEuler(rig.quaternion, 0, 180, 0); | ||
| const avatarFactory = (ctx: GameContext) => { |
There was a problem hiding this comment.
This looks great! Good proof that using the replicator API internally cleaned some things up.
| registerMatrixNetworkInterface(matrixNetworkInterface); | ||
|
|
||
| await enterWorld(mainThread, session.userId); | ||
| // await enterWorld(mainThread, session.userId, hostId); |
| @@ -1,31 +1,23 @@ | |||
| // import { describe, it } from "vitest"; | |||
| import { ok, strictEqual } from "assert"; | |||
There was a problem hiding this comment.
What happens with these network tests after we've removed the old network messages? Is this no longer needed?
| return createBall(ctx, module, physics, 2, emissiveMaterial, ballAudioData, kinematic); | ||
| }, | ||
| }); | ||
| module.replicators = { |
There was a problem hiding this comment.
We should come up with a better way of registering replicators on load/enter world for our own internal code.
remaining: