mapTo

Maps the axis value to a different property of the element.

Accepts

String

Default

null

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>