Musical Christmas Lights——一个圣诞树灯光✨随音乐节奏改变的前端开源项目

news2024/11/10 18:42:15

文章目录

  • 前言
  • 视频介绍
  • 项目截图
  • 项目地址
  • 项目源码
  • 以上就是本篇文章的全部内容,将你编写好的项目分享给你的朋友们或者那个TA吧!制作不易,求个三连!❤️ 💬 ⭐️


前言

       今天博主在刷短视频时😐,朋友推来一条视频😦,看完视频的我发现最近“理工男的小浪漫”又开始蠢蠢欲动了,噢😦!原来是圣诞节快到了🎅,又到了让你的程序员朋友们用代码来为你画圣诞树的时候了。那我们怎么能退缩呢!今天为大家介绍一个在codepen上开源的前端项目,Musical Christmas Lights🎄,英文直译“音乐圣诞灯”。这是一款页面中圣诞树上的灯光会随着音乐的节奏而改变,而且可以选择已有的四首歌曲,同时支持自定义上传歌曲。

在这里插入图片描述


视频介绍

一个codepen上的开源项目musical christmas lights,灯光可随音乐节奏改变


项目截图

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述


项目地址

开源项目地址:https://codepen.io/dilums/pen/MWjEqaa
那么,如果不想下载想直接使用怎么办?好说!
我已将项目部署到我的云服务器中,可以用以下地址访问:(域名还在走备案流程)
点击这里直接使用文章项目


项目源码

       为了方便小伙伴们对源码进行学习以及根据自己需求修改源码,给大家把源码直接放在下方供大家学习:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">

    <title>Musical Christmas Lights</title>

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">

    <style>
        * {
            box-sizing: border-box;
        }
        
        body {
            margin: 0;
            height: 100vh;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #161616;
            color: #c5a880;
            font-family: sans-serif;
        }
        
        label {
            display: inline-block;
            background-color: #161616;
            padding: 16px;
            border-radius: 0.3rem;
            cursor: pointer;
            margin-top: 1rem;
            width: 300px;
            border-radius: 10px;
            border: 1px solid #c5a880;
            text-align: center;
        }
        
        ul {
            list-style-type: none;
            padding: 0;
            margin: 0;
        }
        
        .btn {
            background-color: #161616;
            border-radius: 10px;
            color: #c5a880;
            border: 1px solid #c5a880;
            padding: 16px;
            width: 300px;
            margin-bottom: 16px;
            line-height: 1.5;
            cursor: pointer;
        }
        
        .separator {
            font-weight: bold;
            text-align: center;
            width: 300px;
            margin: 16px 0px;
            color: #a07676;
        }
        
        .title {
            color: #a07676;
            font-weight: bold;
            font-size: 1.25rem;
            margin-bottom: 16px;
        }
        
        .text-loading {
            font-size: 2rem;
        }
    </style>

    <script>
        window.console = window.console || function(t) {};
    </script>



    <script>
        if (document.location.search.match(/type=embed/gi)) {
            window.parent.postMessage("resize", "*");
        }
    </script>


</head>

<body translate="no">
    <script src="https://cdn.jsdelivr.net/npm/three@0.115.0/build/three.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/three@0.115.0/examples/js/postprocessing/EffectComposer.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/three@0.115.0/examples/js/postprocessing/RenderPass.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/three@0.115.0/examples/js/postprocessing/ShaderPass.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/three@0.115.0/examples/js/shaders/CopyShader.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/three@0.115.0/examples/js/shaders/LuminosityHighPassShader.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/three@0.115.0/examples/js/postprocessing/UnrealBloomPass.js"></script>

    <div id="overlay">
        <ul>
            <li class="title">请选择音乐</li>
            <li>
                <button class="btn" id="btnA" type="button">
     Snowflakes Falling Down by Simon Panrucker
    </button>
            </li>
            <li><button class="btn" id="btnB" type="button">This Christmas by Dott</button></li>
            <li><button class="btn" id="btnC" type="button">No room at the inn by TRG Banks</button></li>
            <li><button class="btn" id="btnD" type="button">Jingle Bell Swing by Mark Smeby</button></li>
            <li class="separator">或者</li>
            <li>
                <input type="file" id="upload" hidden />
                <label for="upload">Upload File</label>
            </li>
        </ul>
    </div>

    <script id="rendered-js">
        const {
            PI,
            sin,
            cos
        } = Math;
        const TAU = 2 * PI;

        const map = (value, sMin, sMax, dMin, dMax) => {
            return dMin + (value - sMin) / (sMax - sMin) * (dMax - dMin);
        };

        const range = (n, m = 0) =>
            Array(n).
        fill(m).
        map((i, j) => i + j);

        const rand = (max, min = 0) => min + Math.random() * (max - min);
        const randInt = (max, min = 0) => Math.floor(min + Math.random() * (max - min));
        const randChoise = arr => arr[randInt(arr.length)];
        const polar = (ang, r = 1) => [r * cos(ang), r * sin(ang)];

        let scene, camera, renderer, analyser;
        let step = 0;
        const uniforms = {
            time: {
                type: "f",
                value: 0.0
            },
            step: {
                type: "f",
                value: 0.0
            }
        };

        const params = {
            exposure: 1,
            bloomStrength: 0.9,
            bloomThreshold: 0,
            bloomRadius: 0.5
        };

        let composer;

        const fftSize = 2048;
        const totalPoints = 4000;

        const listener = new THREE.AudioListener();

        const audio = new THREE.Audio(listener);

        document.querySelector("input").addEventListener("change", uploadAudio, false);

        const buttons = document.querySelectorAll(".btn");
        buttons.forEach((button, index) =>
            button.addEventListener("click", () => loadAudio(index)));


        function init() {
            const overlay = document.getElementById("overlay");
            overlay.remove();

            scene = new THREE.Scene();
            renderer = new THREE.WebGLRenderer({
                antialias: true
            });
            renderer.setPixelRatio(window.devicePixelRatio);
            renderer.setSize(window.innerWidth, window.innerHeight);
            document.body.appendChild(renderer.domElement);

            camera = new THREE.PerspectiveCamera(
                60,
                window.innerWidth / window.innerHeight,
                1,
                1000);

            camera.position.set(-0.09397456774197047, -2.5597086635726947, 24.420789670889008);
            camera.rotation.set(0.10443543723052419, -0.003827152981119352, 0.0004011488708739715);

            const format = renderer.capabilities.isWebGL2 ?
                THREE.RedFormat :
                THREE.LuminanceFormat;

            uniforms.tAudioData = {
                value: new THREE.DataTexture(analyser.data, fftSize / 2, 1, format)
            };


            addPlane(scene, uniforms, 3000);
            addSnow(scene, uniforms);

            range(10).map(i => {
                addTree(scene, uniforms, totalPoints, [20, 0, -20 * i]);
                addTree(scene, uniforms, totalPoints, [-20, 0, -20 * i]);
            });

            const renderScene = new THREE.RenderPass(scene, camera);

            const bloomPass = new THREE.UnrealBloomPass(
                new THREE.Vector2(window.innerWidth, window.innerHeight),
                1.5,
                0.4,
                0.85);

            bloomPass.threshold = params.bloomThreshold;
            bloomPass.strength = params.bloomStrength;
            bloomPass.radius = params.bloomRadius;

            composer = new THREE.EffectComposer(renderer);
            composer.addPass(renderScene);
            composer.addPass(bloomPass);

            addListners(camera, renderer, composer);
            animate();
        }

        function animate(time) {
            analyser.getFrequencyData();
            uniforms.tAudioData.value.needsUpdate = true;
            step = (step + 1) % 1000;
            uniforms.time.value = time;
            uniforms.step.value = step;
            composer.render();
            requestAnimationFrame(animate);
        }

        function loadAudio(i) {
            document.getElementById("overlay").innerHTML =
                '<div class="text-loading">正在下载音乐,请稍等...</div>';
            const files = [
                "https://files.freemusicarchive.org/storage-freemusicarchive-org/music/no_curator/Simon_Panrucker/Happy_Christmas_You_Guys/Simon_Panrucker_-_01_-_Snowflakes_Falling_Down.mp3",
                "https://files.freemusicarchive.org/storage-freemusicarchive-org/music/no_curator/Dott/This_Christmas/Dott_-_01_-_This_Christmas.mp3",
                "https://files.freemusicarchive.org/storage-freemusicarchive-org/music/ccCommunity/TRG_Banks/TRG_Banks_Christmas_Album/TRG_Banks_-_12_-_No_room_at_the_inn.mp3",
                "https://files.freemusicarchive.org/storage-freemusicarchive-org/music/ccCommunity/Mark_Smeby/En_attendant_Nol/Mark_Smeby_-_07_-_Jingle_Bell_Swing.mp3"
            ];

            const file = files[i];

            const loader = new THREE.AudioLoader();
            loader.load(file, function(buffer) {
                audio.setBuffer(buffer);
                audio.play();
                analyser = new THREE.AudioAnalyser(audio, fftSize);
                init();
            });

        }


        function uploadAudio(event) {
            document.getElementById("overlay").innerHTML =
                '<div class="text-loading">请稍等...</div>';
            const files = event.target.files;
            const reader = new FileReader();

            reader.onload = function(file) {
                var arrayBuffer = file.target.result;

                listener.context.decodeAudioData(arrayBuffer, function(audioBuffer) {
                    audio.setBuffer(audioBuffer);
                    audio.play();
                    analyser = new THREE.AudioAnalyser(audio, fftSize);
                    init();
                });
            };

            reader.readAsArrayBuffer(files[0]);
        }

        function addTree(scene, uniforms, totalPoints, treePosition) {
            const vertexShader = `
      attribute float mIndex;
      varying vec3 vColor;
      varying float opacity;
      uniform sampler2D tAudioData;

      float norm(float value, float min, float max ){
       return (value - min) / (max - min);
      }
      float lerp(float norm, float min, float max){
       return (max - min) * norm + min;
      }

      float map(float value, float sourceMin, float sourceMax, float destMin, float destMax){
       return lerp(norm(value, sourceMin, sourceMax), destMin, destMax);
      }


      void main() {
       vColor = color;
       vec3 p = position;
       vec4 mvPosition = modelViewMatrix * vec4( p, 1.0 );
       float amplitude = texture2D( tAudioData, vec2( mIndex, 0.1 ) ).r;
       float amplitudeClamped = clamp(amplitude-0.4,0.0, 0.6 );
       float sizeMapped = map(amplitudeClamped, 0.0, 0.6, 1.0, 20.0);
       opacity = map(mvPosition.z , -200.0, 15.0, 0.0, 1.0);
       gl_PointSize = sizeMapped * ( 100.0 / -mvPosition.z );
       gl_Position = projectionMatrix * mvPosition;
      }
      `;
            const fragmentShader = `
      varying vec3 vColor;
      varying float opacity;
      uniform sampler2D pointTexture;
      void main() {
       gl_FragColor = vec4( vColor, opacity );
       gl_FragColor = gl_FragColor * texture2D( pointTexture, gl_PointCoord ); 
      }
      `;
            const shaderMaterial = new THREE.ShaderMaterial({
                uniforms: {
                    ...uniforms,
                    pointTexture: {
                        value: new THREE.TextureLoader().load(`https://assets.codepen.io/3685267/spark1.png`)
                    }
                },


                vertexShader,
                fragmentShader,
                blending: THREE.AdditiveBlending,
                depthTest: false,
                transparent: true,
                vertexColors: true
            });


            const geometry = new THREE.BufferGeometry();
            const positions = [];
            const colors = [];
            const sizes = [];
            const phases = [];
            const mIndexs = [];

            const color = new THREE.Color();

            for (let i = 0; i < totalPoints; i++) {
                const t = Math.random();
                const y = map(t, 0, 1, -8, 10);
                const ang = map(t, 0, 1, 0, 6 * TAU) + TAU / 2 * (i % 2);
                const [z, x] = polar(ang, map(t, 0, 1, 5, 0));

                const modifier = map(t, 0, 1, 1, 0);
                positions.push(x + rand(-0.3 * modifier, 0.3 * modifier));
                positions.push(y + rand(-0.3 * modifier, 0.3 * modifier));
                positions.push(z + rand(-0.3 * modifier, 0.3 * modifier));

                color.setHSL(map(i, 0, totalPoints, 1.0, 0.0), 1.0, 0.5);

                colors.push(color.r, color.g, color.b);
                phases.push(rand(1000));
                sizes.push(1);
                const mIndex = map(i, 0, totalPoints, 1.0, 0.0);
                mIndexs.push(mIndex);
            }

            geometry.setAttribute(
                "position",
                new THREE.Float32BufferAttribute(positions, 3).setUsage(
                    THREE.DynamicDrawUsage));


            geometry.setAttribute("color", new THREE.Float32BufferAttribute(colors, 3));
            geometry.setAttribute("size", new THREE.Float32BufferAttribute(sizes, 1));
            geometry.setAttribute("phase", new THREE.Float32BufferAttribute(phases, 1));
            geometry.setAttribute("mIndex", new THREE.Float32BufferAttribute(mIndexs, 1));

            const tree = new THREE.Points(geometry, shaderMaterial);

            const [px, py, pz] = treePosition;

            tree.position.x = px;
            tree.position.y = py;
            tree.position.z = pz;

            scene.add(tree);
        }

        function addSnow(scene, uniforms) {
            const vertexShader = `
      attribute float size;
      attribute float phase;
      attribute float phaseSecondary;

      varying vec3 vColor;
      varying float opacity;


      uniform float time;
      uniform float step;

      float norm(float value, float min, float max ){
       return (value - min) / (max - min);
      }
      float lerp(float norm, float min, float max){
       return (max - min) * norm + min;
      }

      float map(float value, float sourceMin, float sourceMax, float destMin, float destMax){
       return lerp(norm(value, sourceMin, sourceMax), destMin, destMax);
      }
      void main() {
       float t = time* 0.0006;

       vColor = color;

       vec3 p = position;

       p.y = map(mod(phase+step, 1000.0), 0.0, 1000.0, 25.0, -8.0);

       p.x += sin(t+phase);
       p.z += sin(t+phaseSecondary);

       opacity = map(p.z, -150.0, 15.0, 0.0, 1.0);

       vec4 mvPosition = modelViewMatrix * vec4( p, 1.0 );

       gl_PointSize = size * ( 100.0 / -mvPosition.z );

       gl_Position = projectionMatrix * mvPosition;

      }
      `;

            const fragmentShader = `
      uniform sampler2D pointTexture;
      varying vec3 vColor;
      varying float opacity;

      void main() {
       gl_FragColor = vec4( vColor, opacity );
       gl_FragColor = gl_FragColor * texture2D( pointTexture, gl_PointCoord ); 
      }
      `;

            function createSnowSet(sprite) {
                const totalPoints = 300;
                const shaderMaterial = new THREE.ShaderMaterial({
                    uniforms: {
                        ...uniforms,
                        pointTexture: {
                            value: new THREE.TextureLoader().load(sprite)
                        }
                    },


                    vertexShader,
                    fragmentShader,
                    blending: THREE.AdditiveBlending,
                    depthTest: false,
                    transparent: true,
                    vertexColors: true
                });


                const geometry = new THREE.BufferGeometry();
                const positions = [];
                const colors = [];
                const sizes = [];
                const phases = [];
                const phaseSecondaries = [];

                const color = new THREE.Color();

                for (let i = 0; i < totalPoints; i++) {
                    const [x, y, z] = [rand(25, -25), 0, rand(15, -150)];
                    positions.push(x);
                    positions.push(y);
                    positions.push(z);

                    color.set(randChoise(["#f1d4d4", "#f1f6f9", "#eeeeee", "#f1f1e8"]));

                    colors.push(color.r, color.g, color.b);
                    phases.push(rand(1000));
                    phaseSecondaries.push(rand(1000));
                    sizes.push(rand(4, 2));
                }

                geometry.setAttribute(
                    "position",
                    new THREE.Float32BufferAttribute(positions, 3));

                geometry.setAttribute("color", new THREE.Float32BufferAttribute(colors, 3));
                geometry.setAttribute("size", new THREE.Float32BufferAttribute(sizes, 1));
                geometry.setAttribute("phase", new THREE.Float32BufferAttribute(phases, 1));
                geometry.setAttribute(
                    "phaseSecondary",
                    new THREE.Float32BufferAttribute(phaseSecondaries, 1));


                const mesh = new THREE.Points(geometry, shaderMaterial);

                scene.add(mesh);
            }
            const sprites = [
                "https://assets.codepen.io/3685267/snowflake1.png",
                "https://assets.codepen.io/3685267/snowflake2.png",
                "https://assets.codepen.io/3685267/snowflake3.png",
                "https://assets.codepen.io/3685267/snowflake4.png",
                "https://assets.codepen.io/3685267/snowflake5.png"
            ];

            sprites.forEach(sprite => {
                createSnowSet(sprite);
            });
        }

        function addPlane(scene, uniforms, totalPoints) {
            const vertexShader = `
      attribute float size;
      attribute vec3 customColor;
      varying vec3 vColor;

      void main() {
       vColor = customColor;
       vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );
       gl_PointSize = size * ( 300.0 / -mvPosition.z );
       gl_Position = projectionMatrix * mvPosition;

      }
      `;
            const fragmentShader = `
      uniform vec3 color;
      uniform sampler2D pointTexture;
      varying vec3 vColor;

      void main() {
       gl_FragColor = vec4( vColor, 1.0 );
       gl_FragColor = gl_FragColor * texture2D( pointTexture, gl_PointCoord );

      }
      `;
            const shaderMaterial = new THREE.ShaderMaterial({
                uniforms: {
                    ...uniforms,
                    pointTexture: {
                        value: new THREE.TextureLoader().load(`https://assets.codepen.io/3685267/spark1.png`)
                    }
                },


                vertexShader,
                fragmentShader,
                blending: THREE.AdditiveBlending,
                depthTest: false,
                transparent: true,
                vertexColors: true
            });


            const geometry = new THREE.BufferGeometry();
            const positions = [];
            const colors = [];
            const sizes = [];

            const color = new THREE.Color();

            for (let i = 0; i < totalPoints; i++) {
                const [x, y, z] = [rand(-25, 25), 0, rand(-150, 15)];
                positions.push(x);
                positions.push(y);
                positions.push(z);

                color.set(randChoise(["#93abd3", "#f2f4c0", "#9ddfd3"]));

                colors.push(color.r, color.g, color.b);
                sizes.push(1);
            }

            geometry.setAttribute(
                "position",
                new THREE.Float32BufferAttribute(positions, 3).setUsage(
                    THREE.DynamicDrawUsage));


            geometry.setAttribute(
                "customColor",
                new THREE.Float32BufferAttribute(colors, 3));

            geometry.setAttribute("size", new THREE.Float32BufferAttribute(sizes, 1));

            const plane = new THREE.Points(geometry, shaderMaterial);

            plane.position.y = -8;
            scene.add(plane);
        }

        function addListners(camera, renderer, composer) {
            document.addEventListener("keydown", e => {
                const {
                    x,
                    y,
                    z
                } = camera.position;
                console.log(`camera.position.set(${x},${y},${z})`);
                const {
                    x: a,
                    y: b,
                    z: c
                } = camera.rotation;
                console.log(`camera.rotation.set(${a},${b},${c})`);
            });

            window.addEventListener(
                "resize",
                () => {
                    const width = window.innerWidth;
                    const height = window.innerHeight;

                    camera.aspect = width / height;
                    camera.updateProjectionMatrix();

                    renderer.setSize(width, height);
                    composer.setSize(width, height);
                },
                false);

        }
    </script>

</body>

</html>

以上就是本篇文章的全部内容,将你编写好的项目分享给你的朋友们或者那个TA吧!制作不易,求个三连!❤️ 💬 ⭐️

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/60535.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

VMware 虚拟机系统 与 win10 共享文件夹问题的解决

环境描述 本地&#xff1a;Win10 64位 VMware Workstation Pro 16 虚拟机&#xff0c;安装的 ubuntu 20.04 文件夹共享 win10 与 虚拟机的 ubuntu 共享文件夹&#xff0c;之前低版本的 VMware &#xff0c;安装 VMware Tools&#xff0c;并且 win10 端设置好工作目录后&…

秒级使网站变灰,不改代码不上线,如何做到?

注意&#xff1a;文本不是讲如何将网站置灰的那个技术点&#xff0c;那个技术点之前汶川地震的时候说过。 本文不讲如何实现技术&#xff0c;而是讲如何在第一时间知道消息后&#xff0c;更快速的实现这个置灰需求的上线。 实现需求不是乐趣&#xff0c;指挥别人去实现需求才…

广域网技术——SR-MPLS隧道保护技术

目录 TI-LFA FRR保护技术 LFA FRR R-LFA FRR TI-LFA FRR Anycast FRR技术 Host-Standby技术 VPN FRR技术 SR-MPLS防微环技术 场景一 SR本地正切防微环 场景二 SR本地回切防微环 场景三 SR远端正切防微环 场景四 SR远端回切防微环 TI-LFA和防微环的对比 TI-LFA FRR…

41. set()函数:将可迭代对象转换为可变集合

41. set()函数&#xff1a;将可迭代对象转换为可变集合 文章目录41. set()函数&#xff1a;将可迭代对象转换为可变集合1. set( )函数的作用2. set( )函数的语法3. set函数创建空集合4. set函数的参数只能是可迭代对象4.1 将字符串转换为集合4.2 set( )函数的参数不能为整数4.3…

MIT 6.S081 Operating System Lecture8 (非常随意的笔记)

系列文章目录 文章目录系列文章目录Page FaultCOPY ON WRITEPage Fault eager allocation 通常&#xff0c;因为应用程序无法非常准确地估计自己要增加的内存有多少&#xff0c;所以通常申请的内存会比真实要使用的内存要多。 在XV6中&#xff0c;sbrk的实现默认是eager alloc…

基于粒子群算法优化的lssvm回归预测-附代码

基于粒子群算法优化的lssvm回归预测 - 附代码 文章目录基于粒子群算法优化的lssvm回归预测 - 附代码1.数据集2.lssvm模型3.基于粒子群算法优化的LSSVM4.测试结果5.Matlab代码摘要&#xff1a;为了提高最小二乘支持向量机&#xff08;lssvm&#xff09;的回归预测准确率&#xf…

【C++】stack/queue/list

文章目录注意事项1 emplace 与 push 的区别一、stack&#xff08;栈&#xff09;&#xff08;先进后出、【头部插入、删除】、不许遍历&#xff09;1 基本概念&#xff08;栈是自顶向下(top在下)&#xff0c;堆是向上&#xff09;2 stack 常用接口&#xff08;构造函数、赋值操…

[蓝牙 Mesh Zephyr]-[005]-Key

[蓝牙 Mesh & Zephyr]-[005]-Key 1. Keys Mesh Profile specification 定义了 2 种key&#xff1a;application keys &#xff08;AppKey&#xff09;和 network keys&#xff08;NetKey&#xff09;。AppKeys 用于保护 upper transport layer 的通信安全&#xff0c;Net…

如何手动添加NLTK data

一、问题描述 Python的自然语言处理库NLTK在安装之后需要下载一些data文件才能使用。官方比较推荐的方式是直接运行下载data的代码&#xff1a; import nltk nltk.download(punkt) 但是实际操作之后发现由于网络原因无法下载成功。 除了运行代码之外&#xff0c;官方还推荐…

分布式队列celery学习

说明&#xff1a;本文内容来自《python自动化运维快速入门》学习 一、介绍 Celery是由纯Python编写的&#xff0c;但协议可以用任何语言实现。目前&#xff0c;已有Ruby实现的RCelery、Node.js实现的node-celery及一个PHP客户端&#xff0c;语言互通也可以通过using webhooks…

[附源码]JAVA毕业设计客户台账管理(系统+LW)

[附源码]JAVA毕业设计客户台账管理&#xff08;系统LW&#xff09; 目运行 环境项配置&#xff1a; Jdk1.8 Tomcat8.5 Mysql HBuilderX&#xff08;Webstorm也行&#xff09; Eclispe&#xff08;IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持&#xff09;。 项目技术&…

Activiti7工作流(二)

流程定义相关 流程定义查询 查询流程相关信息&#xff0c;包含流程定义&#xff0c;流程部署&#xff0c;流程定义版本 Test public void testDefinitionQuery(){//创建ProcessEngine对象ProcessEngine processEngine ProcessEngines.getDefaultProcessEngine();//获取仓库…

自动识别验证码实现系统自动登录(可扩展实现无人自动化操作,如领取各个平台的优惠券),不依赖第三方可以支持离线识别处理,附源码可直接运行

自动识别验证码实现系统自动登录(可扩展实现无人自动化操作,如领取各个平台的优惠券),不依赖第三方可以支持离线识别处理,附源码可直接运行。 实现过程: 1、只要是图片验证码都支持识别; 2、通过百度API实现验证码识别;(依赖第三方,且需要连接互联网,内网不可用,实…

7-FreeRTOS软件定时器

1- 简介 1.1 软件定时器简述 软件定时器就是允许函数设置一定的等待时间&#xff0c;然后执行。定时器执行的函数被称为定时器的回调函数。定时器从启动到执行回调函数之间的时间称为定时器的周期。定时器的回调函数在定时器的时间到达时执行。 软件定时器要先创建才能使用。…

实战Docker未授权访问提权

1、fofa关键字 port“2375” && body“page not found” 2、docker -H tcp://ip:port 可查看到当前所有的实例 3、docker -H tcp://ip:port pull alpine 4、docker -H tcp://ip:port run -it --privileged alpine bin/sh 5、fdisk -l 查看其分区结构 6、创建一个…

Java安全-CC1

CC1 这里用的是组长的链子和yso好像不太一样&#xff0c;不过大体上都是差不多的。后半条的链子都是一样的&#xff0c;而且这条更短更易理解。yso的CC1过段时间再看一下。 环境 Maven依赖&#xff1a; <dependencies><dependency><groupId>commons-colle…

十四、使用 Vue Router 开发单页应用(3)

本章概要 命名路由命名视图编程式导航传递 prop 到路由组件HTML 5 history 模式 14.5 命名路由 有时通过一个名称来标识路由会更方便&#xff0c;特别是在链接到路由&#xff0c;或者执行导航时。可以在创建 Router 实例时&#xff0c;在routes 选项中为路由设置名称。 修改…

用Unity实现FXAA

用Unity实现FXAAFXAA是现代的常用抗锯齿手段之一&#xff0c;这次我们来在Unity中从零开始实现它。 首先我们来看一个测试场景&#xff0c;我们在Game视角下将scale拉到2x&#xff1a; 可以看到画面的锯齿比较严重&#xff0c;下面我们将一步一步地实现FXAA&#xff0c;消除锯…

BDD - SpecFlow ExternalData Plugin 导入外部测试数据

BDD - SpecFlow ExternalData Plugin 导入外部测试数据引言SpecFlow ExternalData 插件支持的数据源Tags实践创建一个 Class Libary Project添加 NuGet Packages添加测试数据源文件CSV 文件Excel 文件添加 Feature 文件实现 Step Definition执行Scenario 导入测试数据源Scenari…

深入URP之Shader篇4: Depth Only Pass

Depth only pass unlit shader中包含了一个Depth Only Pass&#xff0c;这个pass的代码在Packages\com.unity.render-pipelines.universal\Shaders\DepthOnlyPass.hlsl中。这是一个公共pass&#xff0c;几乎所有的URP shader都会包含这个pass。本篇说一说这个pass的作用以及实…