GithubHelp home page GithubHelp logo

timelyportfolio / gl-plot3d Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gl-vis/gl-plot3d

0.0 3.0 0.0 326 KB

A common interface for setting up 3D plots

Home Page: https://mikolalysenko.github.io/gl-plot3d

JavaScript 98.29% C 1.71%

gl-plot3d's Introduction

gl-plot3d

A highly opinionated wrapper module which handles camera set up, picking, axes and rendering order. Meant to be used with the following visualization modules:

Lots of options, but reasonable defaults which should make it suitable for small projects like mesh viewers or quick data visualization.

Example

var createScene = require('gl-plot3d')
var createMesh = require('gl-simplicial-complex')
var bunny = require('bunny')
var fit = require('canvas-fit')

var canvas = document.createElement('canvas')
document.body.appendChild(canvas)
window.addEventListener('resize', fit(canvas))

var scene = createScene(canvas, {
  autoBounds: true
})

var mesh = createMesh(scene.gl, {
  cells:      bunny.cells,
  positions:  bunny.positions,
  colormap:   'jet'
})

scene.addObject(mesh)

Install

npm i gl-plot3d

API

Constructor

var scene = require('gl-plot3d')(canvas[, options])

Methods

scene.addObject(obj)

scene.removeObject(obj)

scene.dispose()

Properties

scene.gl

scene.axes

scene.camera

scene.bounds

scene.zNear

scene.zFar

scene.fovy

scene.clearColor

gl-plot3d's People

Contributors

mikolalysenko avatar

Watchers

 avatar  avatar  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.