# THREE.JS研习平台 **Repository Path**: zh520_kh/three--js-study-platform ## Basic Information - **Project Name**: THREE.JS研习平台 - **Description**: 研习three.js,自学练习项目。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-06-24 - **Last Updated**: 2024-06-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # three-case ## Project setup ``` npm install ``` ### Compiles and hot-reloads for development ``` npm run serve ``` ### Compiles and minifies for production ``` npm run build ``` ### Lints and fixes files ``` npm run lint ``` ### Customize configuration See [Configuration Reference](https://cli.vuejs.org/config/). ## 辉光的使用: 1. 引入 // import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer'; // import { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass'; // import { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass'; 2. 函数 // const effectLight = () => { // const renderPass = new RenderPass(scene, camera); // composer = new EffectComposer(renderer); // /** // * UnrealBloomPass的参数 // * 1:辉光所覆盖的场景大小 // * 2:辉光的强度 // * 3:辉光散发的半径 // * 4:辉光的阈值(场景中的光强大于该值就会产生辉光效果) // * 5: https://www.jianshu.com/p/c666cc7bdf25 // */ // const unrealBloomPass = new UnrealBloomPass(new THREE.Vector2(100, 100), 0.3, 1, 0.2); // unrealBloomPass.renderToScreen = true; // composer.addPass(renderPass); // composer.addPass(unrealBloomPass); // function render () { // requestAnimationFrame(render) // composer.render(); // } // render() // } 3. 使用 // effectLight()