All Projects → pissang → Claygl

pissang / Claygl

Licence: bsd-2-clause
A WebGL graphic library for building scalable Web3D applications

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
GLSL
2045 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Claygl

Xeogl
A WebGL-based 3D engine for technical visualization. Not actively maintained.
Stars: ✭ 920 (-61.1%)
Mutual labels:  3d, webgl, gltf
Clay Viewer
3D model viewer with high quality rendering and glTF2.0/GLB export
Stars: ✭ 558 (-76.41%)
Mutual labels:  3d, webgl, gltf
Gltfast
glTF runtime loading library for Unity
Stars: ✭ 156 (-93.4%)
Mutual labels:  3d, webgl, gltf
Cesium
An open-source JavaScript library for world-class 3D globes and maps 🌎
Stars: ✭ 8,095 (+242.28%)
Mutual labels:  3d, webgl, gltf
Model viewer.dart
A Flutter widget for rendering interactive 3D models in the glTF and GLB formats.
Stars: ✭ 134 (-94.33%)
Mutual labels:  3d, gltf
Ashes
WebGL2.0 3D Engine & ECS & RayTracing
Stars: ✭ 191 (-91.92%)
Mutual labels:  webgl, gltf
Jeelizglassesvtowidget
JavaScript/WebGL glasses virtual try on widget. Real time webcam experience, robust to all lighting conditions, high end 3D PBR rendering, easy to integrate, fallback to server-side rendering
Stars: ✭ 134 (-94.33%)
Mutual labels:  3d, webgl
Andromeda
This is a WebGL recreation of the popular music video Gorillaz - Andromeda.
Stars: ✭ 145 (-93.87%)
Mutual labels:  3d, webgl
Wonder Editor
Functional 3D Webgl Editor
Stars: ✭ 113 (-95.22%)
Mutual labels:  3d, webgl
Alien.js
Future web pattern
Stars: ✭ 141 (-94.04%)
Mutual labels:  3d, webgl
Jeelizfacefilter
Javascript/WebGL lightweight face tracking library designed for augmented reality webcam filters. Features : multiple faces detection, rotation, mouth opening. Various integration examples are provided (Three.js, Babylon.js, FaceSwap, Canvas2D, CSS3D...).
Stars: ✭ 2,042 (-13.66%)
Mutual labels:  3d, webgl
Earthjs
D3 Earth JS
Stars: ✭ 128 (-94.59%)
Mutual labels:  3d, webgl
Hilo3d
Hilo3d, a WebGL Rendering Engine.
Stars: ✭ 123 (-94.8%)
Mutual labels:  3d, webgl
Awesome Webgpu
😎 Curated list of awesome things around WebGPU ecosystem.
Stars: ✭ 182 (-92.3%)
Mutual labels:  3d, webgl
Lba2remake
A Little Big Adventure 2 / Twinsen's Odyssey reimplementation in JavaScript / Three.js / React
Stars: ✭ 116 (-95.1%)
Mutual labels:  3d, webgl
3d Force Graph
3D force-directed graph component using ThreeJS/WebGL
Stars: ✭ 2,386 (+0.89%)
Mutual labels:  3d, webgl
Layaair discard
This is old LayaAir veriosn writetten by ActionScript 3.0 ,now LayaAir is using TypeScript as the Engine Script,Please use https://github.com/layabox/LayaAir instead.
Stars: ✭ 1,858 (-21.44%)
Mutual labels:  3d, webgl
Sharpgltf
glTF reader and writer for .NET Standard
Stars: ✭ 159 (-93.28%)
Mutual labels:  3d, gltf
Elm 3d Scene
A high-level 3D rendering engine for Elm, with support for lighting, shadows, and realistic materials.
Stars: ✭ 167 (-92.94%)
Mutual labels:  3d, webgl
Solar System Threejs
The Solar System: Modeled to scale with Three.js
Stars: ✭ 107 (-95.48%)
Mutual labels:  3d, webgl

ClayGL

NPM Version Circle CI

ClayGL is a WebGL graphic library for building scalable Web3D applications.

It's easy to use, configurable for high-quality graphics. Benefit from the modularity and tree shaking, it can be scaled down to 22k(gzipped) for a basic 3D application.

Download

API

Examples

Projects

ECharts GL

Clay Viewer

DOTA2 Hero Viewer

Paper Cut Art Generator

Little Big City

Quick Start

Create a rotating cube
<!DOCTYPE html>
<html lang="en">
<head>
  <script src="lib/claygl.js"></script>
</head>
<body>
  <canvas id="main"></canvas>
  <script>
    clay.application.create('#main', {

      width: window.innerWidth,
      height: window.innerHeight,

      init(app) {
        // Create camera
        this._camera = app.createCamera([0, 2, 5], [0, 0, 0]);

        // Create a RED cube
        this._cube = app.createCube({
            color: '#f00'
        });

        // Create light
        this._mainLight = app.createDirectionalLight([-1, -1, -1]);
      },
      loop(app) {
        this._cube.rotation.rotateY(app.frameTime / 1000);
      }
    });
  </script>
</body>
</html>

Minimum bundle example

This example is about 22k(gzipped) after bundled by webpack 4.0. It draws a triangle on the screen.

import { Renderer, GeometryBase, Shader, Material } from 'claygl';

const vsCode = `
attribute vec3 position: POSITION;
void main() {
    gl_Position = vec4(position, 1.0);
}
`;
const fsCode = `
void main() {
    gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0);
}
`;

const renderer = new Renderer({
    canvas: document.getElementById('main')
});
renderer.resize(400, 400);

const geometry = new GeometryBase();
geometry.createAttribute('position', 'float', 3);
// Add triangle vertices to position attribute.
geometry.attributes.position.fromArray([
    [-0.5, -0.5, 0],
    [0.5, -0.5, 0],
    [0, 0.5, 0]
]);

const material = new Material({
    shader: new Shader(vsCode, fsCode)
});
renderer.renderPass([ { geometry, material } ]);

FBX to glTF2.0 Converter

Get it

Needs python3.3 and FBX SDK 2018.1.1.

usage: fbx2gltf.py [-h] [-e EXCLUDE] [-t TIMERANGE] [-o OUTPUT]
          [-f FRAMERATE] [-p POSE] [-q] [-b]
          file

FBX to glTF converter

positional arguments:
  file

optional arguments:
  -h, --help            show this help message and exit
  -e EXCLUDE, --exclude EXCLUDE
            Data excluded. Can be: scene,animation
  -t TIMERANGE, --timerange TIMERANGE
            Export animation time, in format
            'startSecond,endSecond'
  -o OUTPUT, --output OUTPUT
            Ouput glTF file path
  -f FRAMERATE, --framerate FRAMERATE
            Animation frame per second
  -p POSE, --pose POSE  Start pose time
  -q, --quantize        Quantize accessors with WEB3D_quantized_attributes
            extension
  -b, --binary          Export glTF-binary
  --beautify            Beautify json output.
  --noflipv             If not flip v in texcoord.

Input:

  • FBX
  • COLLADA
  • OBJ

Output:

  • Scene hierarchy
  • Mesh and camera
  • PBR material
  • Texture
  • Skin
  • Animation
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].