GraphicsandGame
library

A collection of graphics and game engine related libraries including packages to work with webGL, 3D math, content processing, scene management, shader composition and more.

Choose the tools you need or use them all and have a gg.

This is a spare time project. Frequently changed. Occassionally maintained. Mainly to learn concepts of 3D programming.

Github

https://github.com/giniedp/glib

Get the source at github, fork and contribute

git clone git@github.com:giniedp/glib.git
cd glib
yarn install
yarn build

NPM

https://www.npmjs.com/search?q=gglib

gglib is split into several packages so you can reference only what you need. Each package is distributed with typescript definition files.

yarn add \
  @gglib/utils \
  @gglib/math \
  @gglib/graphics \
  @gglib/content \
  @gglib/content-loader \
  @gglib/fx-materials \
  @gglib/fx-post \
  @gglib/ecs \
  @gglib/ecs-components \
  -D \

CDN

https://unpkg.com/

All packages are accessible via unpkg.com as UMD bundles.

Either references the main bundle that contains all gglib packages.

<script src="https://unpkg.com/@gglib/gglib@x.x.x/bundles/gglib.umd.js"></script>

Or reference individual packages. However, these must be in correct order.

<script src="https://unpkg.com/@gglib/utils@x.x.x/bundles/utils.umd.js"></script>
<script src="https://unpkg.com/@gglib/math@x.x.x/bundles/math.umd.js"></script>
<script src="https://unpkg.com/@gglib/gglib@x.x.x/bundles/gglib.umd.js"></script>

Replace the x.x.x with a specific version or leave the placeholder as is so unpkg will forward you to the recent version.

How to learn?

Follow the examples, read the source code.

Assets

Assets used in the examples mostly have a CC0 license or have been distributed in a free prototype package. Contact me if you encounter any wrongly licensed asset. Here are some content creators and websites i like to mention.