A cubic bezier curve creator for the Defold game engine.
Feel free to ask questions: the topic about this asset is on the Defold forum.
- Add .zip as a Defold library dependency
- Add "adjustable_bezier.collection" from the bezier folder to your collection.
You can find some properties in the script component of the bezier game object
If this is true, curve will have some draggable nodes to adjust it's shape.
Tangent multiplier.
Size of the curve.
You can adjust the curve by sending some messages to the script component.
Updates a point that was used to calculate the curve. Then re-calculates the curve and draws it.
PARAMETERS
- index number - Which point to update
- new_pos vec3 - New position of the point. MUST BE IN WORLD SPACE.
msg.post("/adjustable_bezier/bezier#script", hash("update_point"), {index = 1, new_pos = vmath.vector3(100, 0, 0)})
Enable or disable the adjust nodes.
PARAMETERS
- enabled bool - If true nodes are enabled. if not disabled.
Updates tan_k.
PARAMETERS
- tan_k float - New tan_k.
Updates size of the curve.
PARAMETERS
- size float - New size.
Updates color of the curve.
PARAMETERS
- color vec4 - New color.