Giter Site home page Giter Site logo

nette22 / threex.laser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeromeetienne/threex.laser

0.0 2.0 0.0 122 KB

three.js extension provide a laser-like display

Home Page: http://jeromeetienne.github.io/threex.laser/examples/demo.html

License: MIT License

threex.laser's Introduction

threex.laser

It is a threex extension for three.js which provide a laser like display. You can do a simple laser beam which display the laser as transparent and additive blending. Or you can get something more cooked. THREEx.LaserCooked provides dynamic collision, cool impact effect with point light and impact sprites.

Show Don't Tell

How To Install It

You can install it via script tag

<script src='threex.laserbeam.js'></script>
<script src='threex.lasercooked.js'></script>

Or you can install with bower, as you wish.

bower install threex.laser

How To Use It

threex.laserbeam.js

It is a raw laser beam using dynamic textures. Here is to create the laser beam and add it to the scene.

var laserBeam	= new THREEx.LaserBeam()
scene.add(laserBeam)

threex.lasercooked.js

It is a laser beam with dynamic collision. On impacts, to increase realism, there is sprite and point light. It depends on THREEx.LaserBeam so first create it and add it to the scene

var laserBeam	= new THREEx.LaserBeam()
scene.add(laserBeam)

Then you create the laserCooked based on it. Don't forget to update it in your render loop.

var laserCooked	= new THREEx.LaserCooked(laserBeam)
onRenderFcts.push(function(delta, now){
	// every time you render the scene, update laserCooked
	laserCooked.update(delta, now)
})

Possible Improvements

  • make light vary random for realism
  • leave a mark on the wall
    • multimaterialobject
    • each object for a texture in a empty canvas
    • draw in this canvas and update the texture
  • laser with pointing leap

threex.laser's People

Contributors

jeromeetienne avatar

Watchers

James Cloos avatar Joan 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.