SHARE
TWEET

Untitled

a guest Mar 24th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public async createThematicObject(object: ThreeDimensionsObject, scene: Three.Scene, theme: Themes): Promise<boolean> {
  2.         const asset: Three.Object3D = theme === Themes.Forest ? await this.model3DLoaderService
  3.                 .loadThematicForestObject(object).toPromise() :
  4.             await this.model3DLoaderService
  5.                 .loadThematicSpaceObject(object).toPromise();
  6.         if (!object) {
  7.             return false;
  8.         }
  9.         asset.position.x = object.position.x;
  10.         asset.position.y = object.position.y;
  11.         asset.position.z = object.position.z;
  12.         asset.scale.set(object.size, object.size, object.size);
  13.         asset.rotateY(object.orientation);
  14.         scene.add(asset);
  15.  
  16.         return true;
  17.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top