0.3.13 • Published 10 months ago
@tcool86/zylem
Licence
MIT
Version
0.3.13
Deps
30
Size
25.0 MB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated
Zylem
A powerful and easy-to-use framework for creating simple 3D digital interactive applications using TypeScript.
Note: This project is still in alpha. There are unfinished features and some APIs that may change.
Installation
pnpm install
npm run dev
Examples
Note: The examples are not up to date with the latest version of Zylem. Check out the examples repo here
Basic Usage
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Zylem - Basic Usage</title>
<link rel="stylesheet" href="./index.css" />
</head>
<body>
<script src="./src/index.ts" type="module"></script>
</body>
</html>
import { game, sphere, makeMoveable } from '@tcool86/zylem';
const ball = await sphere();
makeMoveable(ball).onUpdate(({ entity, inputs }) => {
const { Horizontal, Vertical } = inputs.p1.axes;
entity.moveXY(Horizontal.value * 5, -Vertical.value * 5);
});
game(ball).start();
Repository Governance
Conventional commits
feat: A new featurefix: A bug fixdocs: Documentation only changesstyle: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)refactor: A code change that neither fixes a bug nor adds a featurecleanup: Removal of dead code, unused functionality, or code changes involving renamingperf: A code change that improves performancetest: Adding missing or correcting existing testsbuild: Changes that affect the build system or external dependencies (example scopes: vite, npm, typescript, etc)