0.3.2 • Published 3 months ago

@slzr/three-app v0.3.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

⚠️ Warning This project/package was created for learning purposes. Do not use in production.

🚀 Features

ThreeApp is simply a set of functions and helpers designed to speed up your ThreeJs development

  • 🍦 Vanilla and framework agnostic
  • 🔑 Type Safe
  • ⚡ Batteries included (Default Camera and Renderer, render loop and common event handling)
  • 📦 Lightweight
  • 🔌 ESM & CommonJs compatible

🛸 Getting Started

Installation

npm install three @slzr/three-app
npm install -D @types/three

Add the container element to your markup

<div id="three-app"></div>

Basic Usage

import { BoxGeometry, Mesh, MeshBasicMaterial } from 'three'
import { createThreeApp } from '@slzr/three-app'

// It can be composed into `components`
const geometry = new BoxGeometry(1, 1, 1)
const material = new MeshBasicMaterial({ color: 0x00FF00 })
const cube = new Mesh(geometry, material)

const app = await createThreeApp({
  container: '#container',
  onInit({ scene }) {
    scene.add(cube)
  },
  onRender({ time, }) {
    cube.rotation.x += 0.01
    cube.rotation.y += 0.01
  }
})

app.start()

🗃️ Documentation

To learn more about Three App, check the documentation.

0.1.11

7 months ago

0.1.12

7 months ago

0.1.14

7 months ago

0.3.0

4 months ago

0.2.1

6 months ago

0.2.0

6 months ago

0.1.16

7 months ago

0.1.8

7 months ago

0.1.17

7 months ago

0.1.7

8 months ago

0.1.9

7 months ago

0.3.2

3 months ago

0.2.3

6 months ago

0.3.1

4 months ago

0.2.2

6 months ago

0.1.6

8 months ago

0.1.5

8 months ago

0.1.2

9 months ago

0.1.1

9 months ago

0.1.4

9 months ago

0.1.3

9 months ago

0.1.0

9 months ago

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.4

10 months ago

0.0.5

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago