Is it possible to style AP objects with custom javascript?

Can i use any javascript package to transform the style of an AP object?
eg. add a reflection or visual effect to an object?

Hi,

Yes, you can get the DOM object from an AP object and use CSS to style it.
For example:

var node = prez.object('Shape_3').node;
// webkitBoxReflect style only works on webkit browsers such as Chrome, Safari...
node.style.webkitBoxReflect = 'below 1px linear-gradient(transparent, white)';

Regards

Great thank you, is it possible to use J-query to create a custom drag effect that could work with the AP swipe gestures?

How is the effect do you want?
Please also note that swipe event only fires once, not fire continously while swiping.

I’ve emailed through a few example videos

Your video shows that the effect runs while dragging so it’s not possible with swipe event.
You can use drag event to do that but it’s not a simple task.
Please see this trivial sample: drag swipe effect.approj (804 KB)

Regards

1 Like