Skip to content

syao1026/threex.bubble

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

threex.bubble

It is a threex extension for three.js which provide realistic bubble with fresnel effect.

Show Don't Tell

How To Install It

You can install it via script tag

<script src='threex.bubble.js'></script>

Or you can install with bower, as you wish.

bower install threex.bubble

How To Use It

You can create a bubble with those simple lines. You create the mesh and adds it to the scene. The texture cube can be dynamic or static, it is up to you.

var mesh	= new THREEx.BubbleMesh(textureCube)
scene.add(mesh)

You can use only the material if you want. Just create a THREEx.BubbleMaterial to get a material suitable for bubble. Internally, this is simply a THREE.FresnelShader in a THREE.ShaderMaterial.

var material	= new THREEx.BubbleMaterial(textureCube)

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 92.0%
  • Makefile 8.0%