From 2295627d5a1dc29ad614fcadfb7465bfbcc694e7 Mon Sep 17 00:00:00 2001 From: Simple_Not <44047940+moonbaseDelta@users.noreply.github.com> Date: Wed, 2 Aug 2023 13:34:33 +1000 Subject: [PATCH] upd --- main.js | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/main.js b/main.js index 63cca13..412074b 100644 --- a/main.js +++ b/main.js @@ -44,18 +44,18 @@ import { OutlineEffect } from 'three/addons/effects/OutlineEffect.js'; import { FontLoader } from 'three/addons/loaders/FontLoader.js'; import { TextGeometry } from 'three/addons/geometries/TextGeometry.js'; -import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js'; -import { RenderPass } from 'three/addons/postprocessing/RenderPass.js'; -import { GlitchPass } from 'three/addons/postprocessing/GlitchPass.js'; -import { OutputPass } from 'three/addons/postprocessing/OutputPass.js'; -import { OutlinePass } from 'three/addons/postprocessing/OutlinePass.js'; +// import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js'; +// import { RenderPass } from 'three/addons/postprocessing/RenderPass.js'; +// import { GlitchPass } from 'three/addons/postprocessing/GlitchPass.js'; +// import { OutputPass } from 'three/addons/postprocessing/OutputPass.js'; +// import { OutlinePass } from 'three/addons/postprocessing/OutlinePass.js'; let container, stats; let camera, scene, renderer, effect; let particleLight; -let composer, glitchPass, outlinePass; +//let composer, glitchPass, outlinePass; const loader = new FontLoader(); 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 - composer = new EffectComposer( renderer ); - composer.addPass( new RenderPass( scene, camera ) ); + // // composer = new EffectComposer( renderer ); + // // composer.addPass( new RenderPass( scene, camera ) ); - outlinePass = new OutlinePass( ); - composer.addPass( outlinePass ); + // // // outlinePass = new OutlinePass( ); + // // // composer.addPass( outlinePass ); - //composer.addPass( new OutlineEffect( ) ); + // // //composer.addPass( new OutlineEffect( ) ); - glitchPass = new GlitchPass(); - composer.addPass( glitchPass ); + // // glitchPass = new GlitchPass(); + // // composer.addPass( glitchPass ); - const outputPass = new OutputPass(); - composer.addPass( outputPass ); + // // const outputPass = new OutputPass(); + // // composer.addPass( outputPass ); @@ -225,8 +225,8 @@ function animate() { requestAnimationFrame( animate ); stats.begin(); - //render(); - composer.render(); + render(); + //composer.render(); stats.end(); } @@ -239,7 +239,7 @@ function render() { particleLight.position.y = Math.cos( timer * 5 ) * 400; particleLight.position.z = Math.cos( timer * 3 ) * 300; - //effect.render( scene, camera ); + effect.render( scene, camera ); - composer.render(); + //composer.render(); } \ No newline at end of file