Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2020
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // listen for socket.io events here
  2. io.on("loadAsset", (filename) => {
  3.  
  4.   // tell babylon to load assets
  5.   BABYLON.SceneLoader.Load("/assets/", filename, engine, function (scene) {
  6.    // do something with the scene
  7.   });
  8.  
  9.   // - or -
  10.  
  11.   // tell babylon to append assets
  12.   BABYLON.SceneLoader.Append("/assets/", filename, function (scene) {
  13.     // do something with the scene
  14.   });
  15.  
  16.  
  17. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement