Giter Club home page Giter Club logo

blackcell's Introduction

BLACKCELL.js

Modern, JS-friendly API for real-time 3D-rendering over WebGL.

API documentation | Guide | Samples | Contributing | Developer guide | FAQ

Build Status Coverage Status

Features

  • Linear algebra (vectors, rotations, transformations) and geometry primitives
  • Staging graphics core (designed for custom rendering pipelines and shaders)
  • Common implementations (frustum culling, attributes & uniforms binding, context lost handling)
  • WebGL Extensions supported / WebGL 2.0 oriented

Download

The current version is v.0.0.1

Licensing

BLACKCELL is licensed under the MIT license.

Example

var M = B.Math, R = B.Render,
    dev = R.makeDevice(canvas);

dev.stage("main").output(dev.target()).
    view(M.makeMatrix4().lookAt(M.makeVector3(0,1,-1), M.Vector3.ZERO, M.Vector3.Y)).
    proj(M.makeMatrix4().perspective(Math.PI / 3, canvas.width / canvas.height, 0.1, 1000)).
    uniform("mxVP", R.Stage.VIEW_PROJ);

dev.material("default").
    pass("main", dev.makePass(
        "attribute vec3 position;" +
        "uniform mat4 mxT;" +
        "uniform mat4 mxVP;" +
        "void main() { gl_Position = mxVP * mxT * vec4(position, 1.0); }",
        "void main() { gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0); }"));

dev.instance("default",
    dev.makeMesh().
        attribute("position", R.Attribute.POSITION).
        vertices([-1,0,-1, -1,0,1, 1,0,1, 1,0,-1, 0,1,0]).
        indices([0,1, 1,2, 2,3, 3,0, 0,4, 1,4, 2,4, 3,4]).
        primitive(R.Primitive.LINE),
    M.makeMatrix4().scale(0.3, 0.4, 0.3)
).
    uniform("mxT", R.Instance.TRANSFORM);

dev.frame();

blackcell's People

Contributors

vsergey3d avatar chibilo avatar

Watchers

Luiz Filipe Freitas Carneiro avatar James Cloos 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.