SHARE
TWEET

Untitled

a guest Apr 20th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import * as THREE from 'three';
  2. let OrbitControls = require('three-orbit-controls')(THREE);
  3. import img from './___img.JPG';
  4.  
  5. let camera, pos, controls, scene, renderer, geometry, geometry1, mesh, loader;
  6.  
  7. function init() {
  8.   scene = new THREE.Scene();
  9.   scene.background = new THREE.Color(0x000000);
  10.  
  11.   renderer = new THREE.WebGLRenderer();
  12.  
  13.   renderer.setPixelRatio(window.devicePixelRatio);
  14.   renderer.setSize(window.innerWidth, window.innerHeight);
  15.  
  16.   let container = document.getElementById('container');
  17.   container.appendChild(renderer.domElement);
  18.  
  19.   camera = new THREE.PerspectiveCamera(
  20.     90,
  21.     window.innerWidth / window.innerHeight,
  22.     1,
  23.     3000
  24.   );
  25.   camera.position.z = 200;
  26.  
  27.   controls = new OrbitControls(camera, renderer.domElement);
  28.  
  29.   loader = new THREE.TextureLoader();
  30.   loader.load(img, function(texture) {
  31.    
  32.   })
  33. }
  34.  
  35. function animate() {
  36.   render();
  37. }
  38.  
  39. function render() {
  40.   renderer.render(scene, camera);
  41. }
  42.  
  43. init();
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