Hello everyone, I am just getting started with THREE.js and have a few questions...
I'm wondering if anyone can assist me with implementing a feature where the ball gets squished when it contacts the border and changes direction? Perhaps even scaling the ball based on the angle of contact to make it appear more realistic.
Here is some code I've been working on: Creating a rotating 3D sphere with velocity
Code reference from this topic:
THREE.js - moving a 3D ball with rotation
for (var y = 0; y < 16; y++)
for (var x = 0; x < 16; x++)
if ((x & 1) != (y & 1)) ctx.fillRect(x * 16, y * 16, 16, 16);
var ballTex = new THREE.Texture(canv);
ballTex.needsUpdate = true;
Apologies for any language errors in my writing!