This commit is contained in:
parent
e78c129a1e
commit
cd8d6e66e8
36
main.js
36
main.js
@ -44,18 +44,18 @@ import { OutlineEffect } from 'three/addons/effects/OutlineEffect.js';
|
|||||||
import { FontLoader } from 'three/addons/loaders/FontLoader.js';
|
import { FontLoader } from 'three/addons/loaders/FontLoader.js';
|
||||||
import { TextGeometry } from 'three/addons/geometries/TextGeometry.js';
|
import { TextGeometry } from 'three/addons/geometries/TextGeometry.js';
|
||||||
|
|
||||||
import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
|
// import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
|
||||||
import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
|
// import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
|
||||||
import { GlitchPass } from 'three/addons/postprocessing/GlitchPass.js';
|
// import { GlitchPass } from 'three/addons/postprocessing/GlitchPass.js';
|
||||||
import { OutputPass } from 'three/addons/postprocessing/OutputPass.js';
|
// import { OutputPass } from 'three/addons/postprocessing/OutputPass.js';
|
||||||
import { OutlinePass } from 'three/addons/postprocessing/OutlinePass.js';
|
// import { OutlinePass } from 'three/addons/postprocessing/OutlinePass.js';
|
||||||
|
|
||||||
let container, stats;
|
let container, stats;
|
||||||
|
|
||||||
let camera, scene, renderer, effect;
|
let camera, scene, renderer, effect;
|
||||||
let particleLight;
|
let particleLight;
|
||||||
|
|
||||||
let composer, glitchPass, outlinePass;
|
// let composer, glitchPass, outlinePass;
|
||||||
|
|
||||||
const loader = new FontLoader();
|
const loader = new FontLoader();
|
||||||
loader.load( 'https://raw.githubusercontent.com/mrdoob/three.js/master/examples/fonts/gentilis_regular.typeface.json', function ( font ) {
|
loader.load( 'https://raw.githubusercontent.com/mrdoob/three.js/master/examples/fonts/gentilis_regular.typeface.json', function ( font ) {
|
||||||
@ -175,24 +175,24 @@ function init( font ) {
|
|||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
/////effect = new OutlineEffect( renderer );
|
effect = new OutlineEffect( renderer );
|
||||||
|
|
||||||
|
|
||||||
// postprocessing
|
// postprocessing
|
||||||
|
|
||||||
composer = new EffectComposer( renderer );
|
// composer = new EffectComposer( renderer );
|
||||||
composer.addPass( new RenderPass( scene, camera ) );
|
// composer.addPass( new RenderPass( scene, camera ) );
|
||||||
|
|
||||||
outlinePass = new OutlinePass( );
|
// outlinePass = new OutlinePass( );
|
||||||
composer.addPass( outlinePass );
|
// composer.addPass( outlinePass );
|
||||||
|
|
||||||
//composer.addPass( new OutlineEffect( ) );
|
// //composer.addPass( new OutlineEffect( ) );
|
||||||
|
|
||||||
glitchPass = new GlitchPass();
|
// glitchPass = new GlitchPass();
|
||||||
composer.addPass( glitchPass );
|
// composer.addPass( glitchPass );
|
||||||
|
|
||||||
const outputPass = new OutputPass();
|
// const outputPass = new OutputPass();
|
||||||
composer.addPass( outputPass );
|
// composer.addPass( outputPass );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -239,7 +239,7 @@ function render() {
|
|||||||
particleLight.position.y = Math.cos( timer * 5 ) * 400;
|
particleLight.position.y = Math.cos( timer * 5 ) * 400;
|
||||||
particleLight.position.z = Math.cos( timer * 3 ) * 300;
|
particleLight.position.z = Math.cos( timer * 3 ) * 300;
|
||||||
|
|
||||||
//effect.render( scene, camera );
|
effect.render( scene, camera );
|
||||||
|
|
||||||
composer.render();
|
//composer.render();
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user