
A tilted green cube with rounded edges, two black eyes and a two-leaf sprout on top. It hovers while the leaves sway in the breeze; click it and it jumps, spins and the leaves flap on landing.
What’s inside
- Mesh
- 69,213 vertices, 135,948 triangles
- Animation
fluttua, 4 seconds, looping. It rises and sinks, breathes, turns a little and blinks; the stem sways and the leaves follow a beat later, as if in a breeze. It loops seamlessly.- Animation
lavora, 2 seconds, looping. Working: it hops on the spot twice a second, squashing at each touchdown, and turns this way and that like someone busy. It loops seamlessly.- Animation
dorme, 6 seconds, looping. Sleeping: a little lower and tilted, eyes closed, breathing slowly; the small parts drift closer and slow down. It loops seamlessly.- Animation
salto, 1.2 seconds, looping. It winds up, jumps with a full spin and lands with a squash; the leaves lift in the air and flap on landing.- Parts
saltothe node that rises in the jumpcorposquashes and stretches, pivoting at the basepellethe surfaceocchithe two eyes (occhio_sinistro, occhio_destro)germoglio_gambothe stemfoglia_destra, foglia_sinistrathe two leaves
- Materials
- Germoglio (green, light at the top and deep at the bottom, glossy), Foglie (leaf green), Occhi (glossy black)
- Weight
- 0.4 MB
How to use it
Load the GLB and loop “fluttua”; when it is clicked, play “salto” once and then go back to “fluttua”. Every part is a named node: “salto” rises, “corpo” squashes, “occhi” blink.
import * as THREE from 'three';
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
import { MeshoptDecoder } from 'three/addons/libs/meshopt_decoder.module.js';
import { RoomEnvironment } from 'three/addons/environments/RoomEnvironment.js';
// the model: meshopt-compressed, it needs its decoder
const loader = new GLTFLoader().setMeshoptDecoder(MeshoptDecoder);
const gltf = await loader.loadAsync('agente-germoglio.glb');
scene.add(gltf.scene);
// the "fluttua" animation: 4 seconds, looping
const mixer = new THREE.AnimationMixer(gltf.scene);
mixer.clipAction(gltf.animations[0]).play();
// the light: a white studio, and white stays white
renderer.toneMapping = THREE.NoToneMapping;
scene.environment = new THREE.PMREMGenerator(renderer)
.fromScene(new RoomEnvironment(), 0.04).texture;
const clock = new THREE.Clock();
renderer.setAnimationLoop(() => {
mixer.update(clock.getDelta());
renderer.render(scene, camera);
});How it’s made
From the drawing
The cube is a box with very rounded edges, turned as in the drawing: you see the face with the eyes and the right side. The sprout is a curved stem and two drop-shaped leaves, barely inflated, attached on top.
A springy jump
The jump follows cartoon rules: it squashes to wind up, takes off stretched, spins a full turn in the air, lands squashed and settles with a little bounce. The detached parts follow a beat later, and the eyes open wide in the air and squeeze shut on landing.
Colours in the vertices
No textures: each agent’s gradient is baked into the vertex colours, under a glossy clear coat. The GLB stays light and looks the same in Three.js, in Blender and in any program that reads glTF.