lance
lance copied to clipboard
Handle first sync event ( sync world )
For convenience reasons ( eg. initialize visual scene/world ) should be usefull a firstSyncReceived/worldSync or something similar , maybe with pre/post addition .
I can execute once 'client__syncReceived' , but a interesting thing can be add diferent params as syncReceived .
Eg.
beforeWorldSync( theFirstSyncData )
onWorldSync( the objectInstancesCreated ) // this implies divide onAddToWorld ( to onCreateRenderEl onAddToWorld )
afterWorldSync() // the instances are added to the world now
You're correct in that practically in all cases the game engine has "nothing to do" before the first full sync. but maybe instead of adding to the API we can just make sure that the 'start' for the client game engine only happens after it receives the first full sync.
Thoughts?
Was the original purpose, but as you mention some one should be interested on run some "local scene", maybe loading another assets or waiting for connection . So could be diferent things , handle first sync and allow run step before or when first sync .