Poker chip flip

A game I'm working on has a need for a chip/coin flip, so I'd like to put (I think) 3 shapes/bitmaps onto a 3D form. Namely, the two faces and the edge. Then, of course, do some flipping. Is this straight-forward to implement with ZIM and its integration with ThreeJS? I rarely do 3D stuff, so I'm pretty uninformed on the topic. Any guidance will be helpful!

Hi @josephd - completely missed this one! How did it go?

It should not be too bad in three.js and then bring it into ZIM. It would be a cylinder geometry.

const texture = new THREE.TextureLoader().load("assets/stucco.jpg");
const cylinderGeometry = new THREE.CylinderGeometry(10, 10, 1, 30);
 const cylinderMaterial = [
    new THREE.MeshBasicMaterial({map:texture}),
    new THREE.MeshLambertMaterial({color: red}),
    new THREE.MeshLambertMaterial({color: blue})
const coin = new THREE.Mesh(cylinderGeometry, cylinderMaterial);    

animate(coin, {"rotation.x":String(360*4*RAD)}, .7);
// or something like that...