open-index/open-npm huggingface dataset:
npm package: @gwenjs/cli
Description: GWEN Engine CLI
Latest version: 0.1.0

# @gwenjs/cli

> Command Line Interface for the [GWEN Game Engine](https://github.com/gwenjs/gwen)

[![CI](https://github.com/gwenjs/cli/actions/workflows/ci.yml/badge.svg)](https://github.com/gwenjs/cli/actions/workflows/ci.yml)
[![npm](https://img.shields.io/npm/v/@gwenjs/cli)](https://www.npmjs.com/package/@gwenjs/cli)
[![License: MIT](https://img.shields.io/badge/License-MIT-violet.svg)](LICENSE)
[![Docs](https://img.shields.io/badge/docs-gwenjs.github.io%2Fcli-blue)](https://gwenjs.github.io/cli)

## Installation

```bash
# npm
npm install -g @gwenjs/cli

# pnpm
pnpm add -g @gwenjs/cli

# yarn
yarn global add @gwenjs/cli
```

## Usage

```bash
gwen [command] [options]
```

### Global options

| Option      | Alias | Description                           |
| ----------- | ----- | ------------------------------------- |
| `--verbose` | `-v`  | Show detailed logs                    |
| `--debug`   |       | Show debug information (very verbose) |

## Commands

| Command             | Description                                  |
| ------------------- | -------------------------------------------- |
| `gwen init [name]`  | Scaffold a new GWEN game project             |
| `gwen dev`          | Start development server with hot reload     |
| `gwen build`        | Build project for production                 |
| `gwen prepare`      | Generate `.gwen/` (tsconfig + types)         |
| `gwen preview`      | Preview the production build locally         |
| `gwen add <module>` | Install and register a GWEN module           |
| `gwen scaffold`     | Scaffold artefacts (plugin, module, package) |
| `gwen lint`         | Lint source code with oxlint                 |
| `gwen format`       | Format source code with oxfmt                |
| `gwen info`         | Show parsed `gwen.config.ts` as JSON         |
| `gwen doctor`       | Run project health checks                    |

📖 **Full reference:** [gwenjs.github.io/cli](https://gwenjs.github.io/cli)

## Quick start

Scaffold a project without installing the CLI globally:

```bash
# npm
npx @gwenjs/cli init my-game

# pnpm
pnpm dlx @gwenjs/cli init my-game

# yarn
yarn dlx @gwenjs/cli init my-game

# bun
bunx @gwenjs/cli init my-game
```

Then start developing:

```bash
cd my-game
pnpm install
gwen prepare
gwen dev
```

## Development

```bash
# Install dependencies
pnpm install

# Run tests
pnpm test

# Build
pnpm build

# Docs (dev server)
pnpm docs:dev
```

## License

MIT
npm package: @gwenjs/physics3d
Description: 3D physics plugin foundation for GWEN — Rapier3D adapter surface
Latest version: 0.2.0

# @gwenjs/physics3d

Physics3D plugin foundation for GWEN.

Current scope:

- validates `physics3d` core variant,
- initializes 3D physics world via `physics3d_init`,
- auto-steps simulation on engine `onBeforeUpdate` when enabled,
- registers typed `physics3d` service,
- exposes an EntityId-native body registry foundation (`createBody/removeBody/hasBody/getBodyCount`).

## Installation

```bash
npm install @gwenjs/physics3d
```

## Usage

```ts
import { initWasm, createEngine } from "@gwenjs/core";
import { Physics3DPlugin } from "@gwenjs/physics3d";

await initWasm("physics3d");

const { engine } = await createEngine({
  plugins: [new Physics3DPlugin({ gravity: { y: -9.81 } })],
});

await engine.start();

const physics3d = engine.getAPI().services.get("physics3d");
const body = physics3d.createBody(1n, {
  kind: "dynamic",
  initialPosition: { x: 0, y: 1, z: 0 },
});
physics3d.setBodyKind(1n, "kinematic");
console.log("kind", physics3d.getBodyKind(1n));
physics3d.setBodyState(1n, {
  linearVelocity: { x: 3, y: 0, z: 0 },
});
physics3d.setLinearVelocity(1n, { x: 5 });
console.log("vx", physics3d.getLinearVelocity(1n)?.x);
physics3d.setAngularVelocity(1n, { y: 1.2 });
console.log("wy", physics3d.getAngularVelocity(1n)?.y);
physics3d.applyImpulse(1n, { y: 2 });
const state = physics3d.getBodyState(1n);
console.log(body.bodyId, physics3d.getBodyCount(), state?.position.y);
```

## Notes

- This package is intentionally minimal for RFC-005 foundation.
- Body registry APIs are EntityId-first and align with RFC-009 migration goals.
- `physics3d.step(delta)` remains available for advanced/manual control paths.
- Local deterministic stepping rules:
  - `dynamic`: gravity + velocity integration,
  - `kinematic`: velocity integration without gravity,
  - `fixed`: no position integration.
- `mass`, `linearDamping`, and `angularDamping` options are applied in local simulation.
- Higher-level rigid-body and collider APIs are added incrementally.
npm package: @gwenjs/renderer-html
Description: RendererHtml plugin for GWEN
Latest version: 0.1.0

# @gwenjs/renderer-html

[![npm version](https://img.shields.io/npm/v/@gwenjs/renderer-html)](https://www.npmjs.com/package/@gwenjs/renderer-html)
[![CI](https://github.com/gwenjs/renderer-html/actions/workflows/ci.yml/badge.svg)](https://github.com/gwenjs/renderer-html/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

HTML/CSS renderer plugin for the [Gwen](https://github.com/gwenjs/gwen) game engine.

Mount DOM elements, JSX components, and HTML templates directly into named game layers — HUDs, speech bubbles, world-space health bars, and more.

## Features

- **Named layers** — declare background, game, and HUD layers at different z-indices
- **String · HTMLElement · JSX** — pass raw HTML strings, existing DOM nodes, or JSX elements from any framework via a `FrameworkRenderFn` adapter
- **World-space projection** — attach UI to world coordinates with `syncWorldPosition()` for speech bubbles, floating labels, and similar effects
- **Auto-cleanup** — `useHTML()` registers `onCleanup()` automatically; works in actors, systems, and scenes

## Documentation

**[gwenjs.github.io/renderer-html](https://gwenjs.github.io/renderer-html)**

## Installation

```bash
pnpm add @gwenjs/renderer-html
```

## Quick start

```ts
// gwen.config.ts
export default defineConfig({
  modules: [
    ['@gwenjs/renderer-html', {
      layers: {
        background: { order: 0 },
        hud:        { order: 100 },
      },
    }],
  ],
})
```

```ts
import { defineActor, useEntityId } from '@gwenjs/core/actor'
import { useHTML } from '@gwenjs/renderer-html'

export const EnemyActor = defineActor(EnemyPrefab, () => {
  const entityId = useEntityId()
  const label = useHTML('hud', String(entityId))

  onStart(() => label.mount(`<div class="label">Enemy</div>`))
  onUpdate(() => label.syncWorldPosition(Position.x[entityId], Position.y[entityId] - 40))
})
```

## License

MIT