Now on development, supporting below features:
- Basic 3D objects
- Directional and point lights
- PBR Material, with basic properties(base color, metallic, roughness, emissive)
- Composable scripting API, inspired by modern web frameworks(React, Vue...)
The latest version of node
and npm
should be installed in your environment.
Install the packages
npm i dalpeng
Or install the core part without a scripting API
npm i @dalpeng/core
You can define App, Scene, and GameEntity with function form.
defineGameEntity(() => {
withName("Box");
const transform = useComponent(Transform);
transform.position = vec3(0, 0, 0);
const renderer = useBox();
renderer.material.baseColor = vec3(0, 1, 1);
renderer.material.metallic = 0.2;
renderer.material.roughness = 0.4;
});
You can group or preconfigure components with composable scripting API.
const useBox = () => {
const renderer = useComponent(MeshRenderer);
renderer.mesh = MeshBuilder.box();
return renderer;
};
Check out demo for details.
The latest version of node
and pnpm
should be installed in your environment.
-
Clone this repository.
git clone https://github.com/threedalpeng/dalpeng
-
Install the packages
pnpm i
-
Prebuild internal packages using turbo
pnpm turbo build
-
Run the demo you want
cd demo/basic-3d-objects pnpm run dev
- dalpeng: Scripting API wrapper of @dalpeng/core.
- @dalpeng/core: Core part of this game engine.
- @dalpeng/math: Supporting math for 3D Graphics, including Vector, Matrix and Quaternion.
I learned computer graphics and was inspired by many amazing materials:
- Books
- Game Programming Patterns by Robert Nystrom
- Game Engine Architecture by Jason Gregory
- Web materials
and several more...
I presented to other students what I learned and experienced through this project. Check out here(Only in Korean/한국어) and click the '게임엔진을 만들어보자!' tab if you're interested.