mapTo code example
import { createDraggable, utils } from 'animejs';
utils.set('.square', { z: 100 });
createDraggable('.square', {
x: { mapTo: 'rotateY' },
y: { mapTo: 'z' },
});
<div class="large grid centered perspective square-grid">
<div class="square draggable"></div>
</div>