|
15 | 15 | #info { |
16 | 16 | position: absolute; |
17 | 17 | top: 0px; width: 100%; |
18 | | - color: #000000; |
| 18 | + color: #ffffff; |
19 | 19 | padding: 5px; |
20 | 20 | font-family:Monospace; |
21 | 21 | font-size:13px; |
|
66 | 66 | controls = new THREE.TrackballControls( camera ); |
67 | 67 |
|
68 | 68 | scene = new THREE.Scene(); |
69 | | - scene.background = new THREE.Color( 0xf0f0f0 ); |
70 | 69 |
|
71 | 70 | var light = new THREE.PointLight( 0xffffff ); |
72 | 71 | light.position.set( 500, 500, 500 ); |
|
76 | 75 | light.position.set( - 500, - 500, - 500 ); |
77 | 76 | scene.add( light ); |
78 | 77 |
|
79 | | - sphere = new THREE.Mesh( new THREE.SphereBufferGeometry( 200, 20, 10 ), new THREE.MeshLambertMaterial() ); |
| 78 | + sphere = new THREE.Mesh( new THREE.SphereBufferGeometry( 200, 20, 10 ), new THREE.MeshPhongMaterial( { flatShading: true }) ); |
80 | 79 | scene.add( sphere ); |
81 | 80 |
|
82 | 81 | // Plane |
|
86 | 85 | plane.rotation.x = - Math.PI / 2; |
87 | 86 | scene.add( plane ); |
88 | 87 |
|
89 | | - renderer = new THREE.WebGLRenderer( { antialias: true } ); |
| 88 | + renderer = new THREE.WebGLRenderer(); |
90 | 89 | renderer.setSize( window.innerWidth, window.innerHeight ); |
91 | 90 |
|
92 | | - effect = new THREE.AsciiEffect( renderer ); |
| 91 | + effect = new THREE.AsciiEffect( renderer, ' .:-+*=%@#', { invert: true } ); |
93 | 92 | effect.setSize( window.innerWidth, window.innerHeight ); |
| 93 | + effect.domElement.style.color = 'white'; |
| 94 | + effect.domElement.style.backgroundColor = 'black'; |
94 | 95 |
|
95 | 96 | // Special case: append effect.domElement, instead of renderer.domElement. |
96 | 97 | // AsciiEffect creates a custom domElement (a div container) where the ASCII elements are placed. |
|
0 commit comments