Skip to content

Commit

Permalink
Http API endpoint for image extrusion (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
andybak committed Apr 14, 2024
1 parent 3a7f442 commit 2fbe853
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Assets/Scripts/API/ApiMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,16 @@ public static ImageWidget ImportImage(string location)
return imageWidget;
}

[ApiEndpoint(
"image.extrude",
"Sets an image to be extruded by a given depth and color. Set depth to 0 to remove extrusion.",
"0.5, 0.5, 0.5, 1")]
public static void ExtrudeImage(int index, float depth, Color color)
{
var imageWidget = _GetActiveImage(index);
imageWidget.SetExtrusion(depth, color);
}

[ApiEndpoint("environment.type", "Sets the current environment")]
public static void SetEnvironment(string name)
{
Expand Down

0 comments on commit 2fbe853

Please sign in to comment.