DEV Community

Cover image for <lume-gltf-model> 3D model element (live demo)
Joe Pea
Joe Pea

Posted on • Edited on

<lume-gltf-model> 3D model element (live demo)

New demo! One per day all 2021! Today I added a <lume-gltf-model> element to LUME, an HTML 3D toolkit.

It works similar to an <img> tag: just give it a src attribute to a file like so:

<lume-gltf-model src="path/to/model.gltf"></lume-gltf-model>
Enter fullscreen mode Exit fullscreen mode

Made with LUME:

GitHub logo lume / lume

Create CSS3D/WebGL applications declaratively with HTML. Give regular DOM elements shadow and lighting.

LUME

A toolkit that simplifies the creation of rich and interactive 2D or 3D experiences for any device from mobile to desktop to AR/VR.

Home  ·  Documentation  ·  Examples  ·  Forum  ·  Chat  ·  Source

npm install lume

Features

LUME is composed of several packages that can be used individually, or together as a whole:

lume - HTML elements for rich graphics

HTML elements for easily defining rich and interactive 2D or 3D applications powered by both CSS and WebGL.

This package uses and re-exports features from the below packages.

glas - WebGL engine written in AssemblyScript

This is a port of Three.js to AssemblyScript (TypeScript that compiles to WebAssembly) for running WebGL graphics with consistent performance.

@lume/element - System for defining HTML elements

This is a web component system that allows you to create new, fast, and performant HTML elements in a simple way. It provides the foundation for LUME's…

topics: #threejs #webgl #css #javascript #webdev #graphics #365DaysOfCode2021

Top comments (0)