Skip to content

gy1016/lamb3d

Repository files navigation

lamb3d

✨ Author: lamb ✨

repo_lamb3d npm_lamb3d star_lamb3d release_lamb3d

Introduction

A 3d gis engine written in TypeScript and WebAssembly.

Document

Here you can see the mind map of the design engine, system architecture and my brainstorming.

Documentation generated with Typedoc is here!

Architecture

The modules currently included in lamb3d are shown in the following figure:

Engine Xmind

The system architecture diagram of lamb3d is as follows:

Engine Architecture

The most important and basic module of the engine is how the program organizes and manages data and how to communicate with the GPU. The graphic module is used to create buffer objects and store vertex and index data. The architecture is as follows:

Graphic Module

The shader module is used to manage the WebGL program context and data upload. The architecture is as follows:

Shader Module

Usage

First we use pnpm to install.

pnpm install lamb3d

Then we create a canvas tag and specify the id.

<canvas id="lamb">Your browser does not support canvas~<canvas>

Finally, we write a piece of js code.

import { Engine } from 'lamb3d';

const lamb3d = new Engine('lamb');
lamb3d.run();

Let's see the effect:

Engine Architecture

Reference