NOTE: some things may not work yet
Kubiki is wrapper over Three.js which allows for less boilerplate and more intuitive coding.
import*asKfrom'kubiki/src/kubiki.js';constbox=K.box().position(0,-1,0).scale(2,2,2).color(0.3,1.0,0.3).on('click',()=>{alert(1);})constkubiki=K.init({width: 1024,height: 768,controls: 'orbit',}).mount(document.body);kubiki.add(box);functionupdate(t){kubiki.render(t);box.rotation(x=>x+0.03,y=>y+0.01,z=>z);requestAnimationFrame(update);}requestAnimationFrame(update)- no need for creating renderer, camera, lights manually
- but it will be possible to configure cameras, lights etc.
- fluent-interface (jQuery-like)
- DOM rendering (for e.g. labels)
- easy adding events
- utility for creating room geometries (width, height, where are doors, windows...)
- scene tree (which allows for nesting objects)
- reactivity out of the box
- utility for areas (SceneObject::findArea)
- dev tools
- utils for shaders