Skip to content

Repository files navigation

@codedev168/tiny-three-site

A tiny three.js website starter that mounts a minimal scene with a rotating cube into a DOM element.

Installation

npm install @codedev168/tiny-three-site three

Usage

<!doctype html><html><head><metacharset="utf-8" /><title>tiny-three-site demo</title><style>body,html,#app { width:100%; height:100%; margin:0; }
</style></head><body><divid="app"></div><scripttype="module">importcreateTinyThreeSitefrom'@codedev168/tiny-three-site';constcontainer=document.getElementById('app');if(container){createTinyThreeSite(container,{animate: true});}</script></body></html>

API

  • createTinyThreeSite(container: HTMLElement, opts?: TinyThreeOptions)
    • returns an object with scene, camera, renderer, cube, stop(), resize(w,h)

License: MIT

About

TinyThreeSite: Minimal Three.js website starter for 3D web projects.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages