Featured Projects

Installation

Pex is using node.js and npm


npm install pex -g

pex init demo-project
cd demo-project
npm install
npm run watch

open index.html

Basic Example

var sys = require('pex-sys');
var glu = require('pex-glu');
var materials = require('pex-materials');
var gen = require('pex-gen');
var Color = require('pex-color').Color;

sys.Window.create({
  init: function() {
    var cube = new gen.Cube();
    this.material = new materials.ShowNormals();
    this.mesh = new glu.Mesh(cube, this.material);

    var aspectRatio = this.width / this.height;
    this.camera = new glu.PerspectiveCamera(60, aspectRatio);
    this.arcball = new glu.Arcball(this, this.camera);
  },
  draw: function() {
    glu.clearColorAndDepth(Color.White);
    glu.enableDepthReadAndWrite(true);

    this.mesh.draw(this.camera);
  }
});

Result

Getting Started

Packages Reference

Core

Contributions

Examples (Source Code)

Image

audio.Audio

Image

color.Color.lerp

Image

color.Color.spectrum

Image

fx.SSAO

Image

gen.Cube

Image

gen.IsoSurface

Image

gen.LineBuilder

Image

gen.Loft

Image

gen.Primitives

Image

gen.Sphere

Image

geom.Geometry

Image

geom.Geometry.catmullClark

Image

geom.Geometry.dooSabin

Image

geom.Geometry.extrude

Image

geom.Geometry.generateSurfacePoints

Image

geom.Geometry.generateVolumePoints

Image

geom.Geometry.subdivideEdges

Image

geom.Geometry.triangulate

Image

geom.Geometry.wire

Image

geom.Octree

Image

geom.Path

Image

geom.Path.getClosestPoint

Image

geom.Quat.fromDirection

Image

geom.Ray.hitTestTriangle

Image

glu.Arcball

Image

glu.Arcball.pannning

Image

glu.Mesh.draw.instanced

Image

glu.Mesh.drawInstances

Image

glu.Mesh.position

Image

glu.Mesh.primitiveTypes

Image

glu.RenderTarget

Image

glu.RenderTarget.customTextures

Image

glu.RenderTarget.multipleRenderTargets

Image

glu.Texture2D.genNoise

Image

glu.Texture2D.lod

Image

glu.TextureCube

Image

glu.TextureCube.lod

Image

glu.TextureCube.mipmap

Image

gui.GUI

Image

gui.GUI.colorPalette

Image

gui.GUI.textureList

Image

helpers.All

Image

materials.All

Image

materials.All.spaceTransformations

Image

materials.Textured

Image

materials.TexturedCubeMap

Image

materials.TexturedEnvMap

Image

random.noise3

Image

sys.Window.fullscreen

Contributors

Marcin Ignac, Dean McNamee, Szymon Kaliski, Nick Nikolov, Dawid Górny