Code Monkey home page Code Monkey logo

picturesnowflakesfalling's Introduction

PictureSnowflakesFalling

基于threejs的图片雪花飘落效果,不需要安装额外插件。

点击这里查看效果。

目录结构

PictureSnowflakesFalling
│  index.html	//主页面
│  README.md	//说明文档
├─img	//图片文件夹
│      bg.png	//背景图
│      cake.png	//飘落图片
├─js	//JavaScript
│      Snow.js
│      ThreeCanvas.js
└─resources	//其他资源
       bg.jpg
       ParticleSmoke.png

使用方法

直接运行index.html即可,不要更改文件目录结构。

  • 修改背景图:修改index.html第12行代码:

    background: url(img/bg.png) repeat-x;

    可以更改repeat方式。

  • 修改飘落图片:修改index.html第49行代码:

    particleImage.src = 'img/cake.png';

    建议使用透明背景的png图片,并调整好大小(建议在100*100以内)。

  • 修改网页标题:修改title标签(index.html第7行代码):

    <title>图片雪花飘落特效</title>

原版效果

将背景和飘落图片更改为resources/bg.jpgresources/ParticleSmoke.png,即为原版雪花飘落效果。

参考

picturesnowflakesfalling's People

Contributors

kaluojushi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.