three-demo
TypeScript icon, indicating that this package has built-in type declarations

5.1.3 • Public • Published

Three Demo

CI Version

A compact demo framework for three.js.

Demo · Documentation

Installation

This library requires the peer dependencies three and dat.gui.

npm install dat.gui three three-demo

Usage

import { DemoManager } from "three-demo";
import { MyDemo } from "./MyDemo";

const manager = new DemoManager(document.getElementById("viewport"), {
	aside: document.getElementById("aside"),
	renderer
});

manager.addEventListener("change", (event) => console.log(event));
manager.addEventListener("load", (event) => console.log(event));

manager.addDemo(new MyDemo());

requestAnimationFrame(function render(timestamp) {

	requestAnimationFrame(render);
	manager.render(timestamp);

});

Custom Demos

You can create custom demos by extending the Demo class. For details, take a look at the ExampleDemo.

Contributing

Please refer to the contribution guidelines for details.

Readme

Keywords

Package Sidebar

Install

npm i three-demo

Weekly Downloads

14

Version

5.1.3

License

Zlib

Unpacked Size

17.5 kB

Total Files

12

Last publish

Collaborators

  • vanruesc