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
599 B

<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="handgrenade">
<node name="input_params">
<real name="handgrenade">1</real>
</node>
<node name="internal_params">
<real name="weight" />
</node>
<string name="winter_init_function">
<![CDATA[
handgrenade_init_result(handgrenade)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
r = weight * exp(0.5 * log(dot(p_in, p_in)))
ab = 2 * atan2(p_in.x, p_in.y) + pi()
in
vec2(sin(ab), cos(ab)) * r
]]>
</string>
</transform_def>
</user_transforms>