Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

glam

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glam

Experimental WebGL Engine

  • 2.1.1
  • npm
  • Socket score

Version published
Weekly downloads
8K
decreased by-57.46%
Maintainers
1
Weekly downloads
 
Created
Source

Glam Engine

This project is an experimental ES6 WebGL engine built on stack.gl. It tries to combine the small-repo / big-repo philosophies together providing an easy to use environment. The API is built to be composable with the magnificent tools on NPM, while opinionated and centralized in a way to get things done quickly. It's built to be friendly for new users to hack on right away, but provide the raw power needed for expert uses. Shader code will be a first class citizen in the API.

Dive In

Example Code

import Bunny from 'bunny'
import { Mesh, PerspectiveCamera, FlatMaterial, Scene, Geometry, Engine } from 'glam'

Engine(function onReady( engine, scene ) {
	
	var camera   = PerspectiveCamera()
	var material = FlatMaterial({ color : [0.1,0.3,0.4] })
	var geometry = Geometry( Bunny )
	var mesh     = Mesh( geometry, material )

	scene.add( camera )
	scene.add( mesh )

	mesh.position[1] = -5
	camera.position[2] = 20

	engine.on('update', function(e) {
		mesh.euler[0] = e.elapsed * 0.0001
		mesh.euler[1] = e.elapsed * 0.001
		scene.render( camera )
	})
})

Then you will get a spinning flat bunny.

Roadmap

  • Phong shading
  • Optimize and order shader calls
  • Textures
  • Travis CI
  • Live examples
  • Morphs
  • Skeletons
  • Post Processing
  • And more...

Completed Features

  • Camera improvements & controls - v2.0.0
  • Scene graph - v1.0.0
  • Cache and share shaders
  • Lambert shading
  • Directional lighting
  • Normal Color augmentation
  • Fog augmentation
  • Basic testing setup
  • Basic documentation in place
  • Basic working example with a flat material

FAQs

Package last updated on 07 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc