Thin Instance Scaling Example?

Can someone point me to a thin instance scaling example using thinInstanceSetMatrixAt?

I did a quick search and found this one : Thin instances simple example | Babylon.js Playground

I need the instances to scale (grow / shrink).

You have to use compose method:

const scale = new BABYLON.Vector3(2, 2, 2);
const rot = new BABYLON.Quaternion.RotationYawPitchRoll(Math.PI/3, 0, 0);
const trans = new BABYLON.Vector3(-1, 2, 0);
var newMat = BABYLON.Matrix.Compose(scale, rot, trans);
sphere.thinInstanceSetMatrixAt(idx, newMat);

for some reason it is working in 4.2 and not in 5.0 at PG
just saw a PR by @Evgeni_Popov in the topic , it maybe identical

1 Like

Thanks Dshah!

Yes, the PR will fix the problem in 5.0.