Advertisement
snake5

sgr editor entityspec

Oct 12th, 2014
569
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. EDITOR_ENTITY
  2. ({
  3.     name = "portal",
  4.     params =
  5.     [
  6.         { name = "x", type = "position.x" },
  7.         { name = "y", type = "position.y" },
  8.         { name = "z", type = "position.z" },
  9.         { name = "d", label = "Diameter", type = "float" },
  10.         { name = "h", label = "Height", type = "float" },
  11.     ],
  12.     render =
  13.     [
  14.         { type = "icon", src = "icon_portal.png" },
  15.         { type = "label", text = "PORTAL" },
  16.         { type = "wire", render = function( ctx, data )
  17.         {
  18.             ctx.DrawCapsule( data.x, data.y, data.z - data.h * 0.5, data.x, data.y, data.z + data.h * 0.5, data.d * 0.5 );
  19.         }},
  20.     ],
  21. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement