Attach cloth to non rigid body moving object (pole)

https://threejs.org/examples/#physics_ammo_cloth
the above example shows cloth simulation

i want to attach this flag to a pole that human avatar can wave the flag.

i need to attach flag to a animated human character.

how can i achieve this please help