DEV Community

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

Posted on • Updated on

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

I'm posting one demo per day all 2021!

I improved the previous demo by adding new attributes to the <lume-scene> element that give the rendering an "environment map" that reflects off of shiny surfaces in the scene.

This what it looks like now:

And this is what it looked like before:

The gist of it is you can write HTML like the following and you'll have a 3D model on your web site:

    <lume-point-light position="200 -200 200" intensity="1" color="white"></lume-point-light>
    <lume-ambient-light color="white" intensity="1.2"></lume-ambient-light>
    <lume-node id="cameraRig" rotation="0 200 0">
        <lume-perspective-camera size="0 0 0" position="0 0 1000" rotation="0 0 0" active></lume-perspective-camera>

        size="2 2 0"
        scale="400 400 400"
Enter fullscreen mode Exit fullscreen mode

The demo is built with LUME, a software developer toolkit for making interactive 2D or 3D experiences with HTML. We're working towards its initial release.

GitHub logo lume / lume

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


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


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: #webgl #threejs #html #css #webdev #javascript #365DaysOfCode2021

Discussion (0)