0.3.2 • Published 10 months ago

@slzr/three-app v0.3.2

Weekly downloads
-
License
MIT
Repository
github
Last release
10 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

1 year ago

0.1.12

1 year ago

0.1.14

1 year ago

0.3.0

10 months ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.16

1 year ago

0.1.8

1 year ago

0.1.17

1 year ago

0.1.7

1 year ago

0.1.9

1 year ago

0.3.2

10 months ago

0.2.3

1 year ago

0.3.1

10 months ago

0.2.2

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.0

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.4

1 year ago

0.0.5

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago