xforms for Chaotica
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
616 B

<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="circlecrop_inv">
<node name="input_params">
<real name="circlecrop_inv">1</real>
</node>
<node name="internal_params">
<real name="weight" />
</node>
<string name="winter_init_function">
<![CDATA[
circlecrop_inv_init_result(circlecrop_inv)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
r = length(p_in) * weight
a = atan2(p_in.y, p_in.x) * (1 / sign(floor(dot(p_in, p_in))))
in
vec2(cos(a), sin(a)) * r
]]>
</string>
</transform_def>
</user_transforms>