Skip to content
/ Vizi Public

A Component-Based Framework for Visual Web Applications

License

Notifications You must be signed in to change notification settings

tparisi/Vizi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vizi

A Framework for Building Interactive 3D Applications in WebGL

Getting Started

Download the latest version and include it into your HTML:

<script src="js/vizi.min.js"></script>

Note that this version is the minified release version. Checkout the engine/build directory for other versions (e.g. unminified, no-dependencies, etc.).

Create your Vizi-based application:

<div id="container" style="width: 98%; height:98%; position: absolute; background-color: #000;"></div>
<script>
  // Create Vizi application
  var container = document.getElementById("container");
  var app = new Vizi.Application({ container: container });

  // Create a phong-shaded cube
  var cube = new Vizi.Object;
  var visual = new Vizi.Visual({
    geometry: new THREE.CubeGeometry(2,2,2),
    material: new THREE.MeshPhongMaterial({ color: 0xcccccc })
  });
  cube.addComponent(visual);

  // Add rotation behaviour
  var rotator = new Vizi.RotateBehavior({autoStart:true});
  cube.addComponent(rotator);

  // Rotate cube to demonstrate 3D
  cube.transform.rotation.x = Math.PI / 5;

  // Create light to show shading
  var light = new Vizi.Object;
  light.addComponent(new Vizi.DirectionalLight);

  // Add cube and light to the scene
  app.addObject(cube);
  app.addObject(light);

  // Run the app
  app.run();
</script>

About

A Component-Based Framework for Visual Web Applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages