abhijitnandy2011 / Age-of-Steam

A WebGL based train simulation
MIT License
0 stars 0 forks source link

Load Mesh for Loco #6

Open abhijitnandy2011 opened 8 years ago

abhijitnandy2011 commented 8 years ago

We can start with a procedural mesh and schedule loading of a larger mesh asynchronously by requesting the Resource Manager. Once its available at the Resource Manager, we can use it - the Resource Manager needs to inform the client which originated the request - use a lambda function here.

The Resource Manager returns a Resource object immediately after the request is made which can be used to monitor the loading of the resource. The object could also be passed to the the callback lambda.