Choosing a library for working with WebGL

    One morning, running past a glorious lesson , I thought: “This is cool, but still there is something missing here.” If you need to write a lot of code easily and quickly, then we need, without a doubt, a library for this. But how can we choose it, if everyone who knows how to start a repository on a github gash their bike? And about this for you, friend, I’ll write a post today suddenly.

    I, like many other users of WebGL technology, began my acquaintance with it from one single library, which I read about somewhere or heard from someone, and now I hammer all nails with the same hammer. However, if I were just starting out with WebGL today, things could have turned out differently. The fact is that last year one good man spent 6 months writing a series of simple examples of working with WebGL using all the libraries that I could reach - which gives you a unique opportunity to compare the APIs of different libraries even before you start an in-depth study of one of them:

    LibraryVersionThe size
    Naked WebGL1.00TytsTytsTytsTyts
    Naked WebGL2.00TytsTytsTytsTyts
    Webgl helper-15KBTytsTytsTytsTyts
    TWGL.jsv0.0.2019KBTytsTytsTytsTyts
    glCubic.jsv0.0122KBTytsTytsTytsTyts
    webgl-utils.js-50KBTytsTytsTytsTyts
    stackglv1.4.067KBTytsTytsTytsTyts
    lightgl.js-72KBTytsTytsTytsTyts
    GLOW.jsr1.177KBTytsTytsTytsTyts
    TDLv0.0.891KBTytsTytsTytsTyts
    GLBoost-132KBTytsTytsTytsTyts
    Philoglv1.4.3136KBTytsTytsTytsTyts
    Webgl-178KBTytsTytsTyts-
    xeoEnginev0.1.0224KBTytsTytsTytsTyts
    Scenejsv4.2.1242KBTytsTytsTytsTyts
    CubicVR.jsv0.2.1347KBTytsTytsTytsTyts
    three.jsr71419KBTytsTytsTytsTyts
    Spiderglv0.2.0498KBTytsTytsTytsTyts
    Babylon.jsv2.1814KBTytsTytsTytsTyts


    This table shows four simple examples of working with procedural geometry within the framework of the API of the respective libraries, and overhead, which your website or application will have to pay for using them. In addition, the author performed the same examples using library primitives, where it was possible:

    LibraryVersionThe size
    lightgl.js-72KBTytsTytsTytsTyts
    Processing.js1.4.13223KBTytsTytsTytsTyts
    p5.jsv0.4.13236KBTytsTytsTytsTyts
    three.jsr71419KBTytsTytsTytsTyts
    Babylon.jsv2.1814KBTytsTytsTytsTyts
    Awayjsv0.4.311,008KBTytsTytsTytsTyts


    Of course, procedural geometry is not all that you need in your work, but from this series of examples you can also learn the general principles of working with a particular API, and make your own informed opinion even before you start to do something.

    Update 9 / III : I thought I would continue to work on the article but, having cast out the reaction , I won’t. Learn to chew before swallowing, dear readers.

    Also popular now: