Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

EasyMeshDictionnary.js 11 KiB

11 лет назад
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. //-------------------------------------------------------------------------
  2. //Command vars operations
  3. //-------------------------------------------------------------------------
  4. CmdVar("[ ]", ["Opens a new context,\nevery operations between the braces will only be done to the vertices added since the start of this context."]);
  5. CmdVar("float", ["Fraction value", "0.0"]);
  6. CmdVar("int", ["No decimal value", "0"]);
  7. CmdVar("bool", ["Boolean value", "true/false", "1/0"]);
  8. CmdVar("color", ["Red/Green/Blue/{Alpha}",
  9. "HEXA: #ABC{D}", "      #AABBCC{DD}",
  10. "FLOAT: f f f f", "      (f f f f)", "      (f)"]);
  11. CmdVar("vec3", ["X/Y/Z as float", " f f f", "(f f f)", "(f)"]);
  12. //-------------------------------------------------------------------------
  13. //Mesh CSG operations
  14. //-------------------------------------------------------------------------
  15. CmdType(["csgu", "csgunion"], "Performs a Union operation as (mesh0_Outside + mesh1_Outside)");
  16. CmdType(["csgs", "csgsubstract"], "Performs a Substract operation as (mesh0_Outside + mesh1_Inside-inverted)");
  17. CmdType(["csgsl", "csgsubstractloss"], "Performs a Substract operation without keeping the mesh1 part");
  18. CmdType(["csga", "csgand"], "Performs an And operation as (mesh0_Inside + mesh1_Inside)");
  19. CmdType(["csgx", "csgxor"], "Performs a Xor operation as (m0_Outside/m0_Inside-inverted + m1_Outside/m1_Inside-inverted)");
  20. //-------------------------------------------------------------------------
  21. //Mesh Base operations
  22. //-------------------------------------------------------------------------
  23. CmdType(["tsw", "scalewinding"], "When activated, on negative-scaling,\nnormal-vector correction will not occur");
  24. CmdType(["sc", "setcolor"], "Set A color", [CmdArg("color", "color")]);
  25. CmdType(["scb", "setbgcolor"], "Set B color", [CmdArg("color", "color")]);
  26. //-------------------------------------------------------------------------
  27. //Mesh transform operations
  28. //-------------------------------------------------------------------------
  29. CmdType(["tx", "translatex"], "Translate vertices along the X axis", [CmdArg("float", "n")]);
  30. CmdType(["ty", "translatey"], "Translate vertices along the Y axis", [CmdArg("float", "n")]);
  31. CmdType(["tz", "translatez"], "Translate vertices along the Z axis", [CmdArg("float", "n")]);
  32. CmdType(["t", "translate"], "Translate vertices", [CmdArg("vec3", "v")]);
  33. CmdType(["rx", "rotatex"], "Rotate vertices along the X axis", [CmdArg("float", "degree")]);
  34. CmdType(["ry", "rotatey"], "Rotate vertices along the Y axis", [CmdArg("float", "degree")]);
  35. CmdType(["rz", "rotatez"], "Rotate vertices along the Z axis", [CmdArg("float", "degree")]);
  36. CmdType(["r", "rotate"], "Rotate vertices along the given axis", [CmdArg("float", "degree"), CmdArg("vec3", "axis")]);
  37. CmdType(["rj", "radialjitter"], "Randomly move vertices along Origin-to-vertex as f(vtx) = vtx + o2v * (1.0 + rand(r))", [CmdArg("float", "r")]);
  38. CmdType(["tax", "taperx"], "multiply axis y/z by f(x)\nf(z) = z * (1.0 + (nz * f(x) + xoff))\nf(x) = absolute ? abs_x : x", [CmdArg("float", "ny"), CmdArg("float", "nz"), CmdArg("float", "xoff", "0.0"), CmdArg("bool", "absolute", "true")]);
  39. CmdType(["tay", "tapery"], "multiply axis x/z by f(y)\nf(x) = x * (1.0 + (nx * f(y) + yoff))\nf(y) = absolute ? abs_y : y", [CmdArg("float", "nx"), CmdArg("float", "nz"), CmdArg("float", "yoff", "0.0"), CmdArg("bool", "absolute", "true")]);
  40. CmdType(["taz", "taperz"], "multiply axis x/y by f(z)\nf(y) = y * (1.0 + (ny * f(z) + zoff))\nf(z) = absolute ? abs_z : z", [CmdArg("float", "nx"), CmdArg("float", "ny"), CmdArg("float", "zoff", "0.0"), CmdArg("bool", "absolute", "true")]);
  41. CmdType(["twx", "twistx"], "Twist vertices around x axis with x as rotation value\nf(p) = (RotateX(x * t + toff) * p)", [CmdArg("float", "t"), CmdArg("float", "toff", "0.0")]);
  42. CmdType(["twy", "twisty"], "Twist vertices around y axis with y as rotation value\nf(p) = (RotateY(y * t + toff) * p)", [CmdArg("float", "t"), CmdArg("float", "toff", "0.0")]);
  43. CmdType(["twz", "twistz"], "Twist vertices around z axis with z as rotation value\nf(p) = (RotateZ(z * t + toff) * p)", [CmdArg("float", "t"), CmdArg("float", "toff", "0.0")]);
  44. CmdType(["shx", "shearx"], "Shear vertices using x value as shear quantity\nf(z) = z + (nz * f(x) + xoff)\nf(x) = absolute ? abs_x : x", [CmdArg("float", "ny"), CmdArg("float", "nz"), CmdArg("float", "xoff", "0.0"), CmdArg("bool", "absolute", "true")]);
  45. CmdType(["shy", "sheary"], "Shear vertices using y value as shear quantity\nf(x) = x + (nx * f(y) + yoff)\nf(y) = absolute ? abs_y : y", [CmdArg("float", "nx"), CmdArg("float", "nz"), CmdArg("float", "yoff", "0.0"), CmdArg("bool", "absolute", "true")]);
  46. CmdType(["shz", "shearz"], "Shear vertices using z value as shear quantity\nf(y) = y + (ny * f(z) + zoff)\nf(z) = absolute ? abs_z : z", [CmdArg("float", "nx"), CmdArg("float", "ny"), CmdArg("float", "zoff", "0.0"), CmdArg("bool", "absolute", "true")]);
  47. CmdType(["stx", "stretchx"], "Stretch vertices using x value as stretch quantity\nf(z) = z + (pow(x, nz) + xoff)", [CmdArg("float", "ny"), CmdArg("float", "nz"), CmdArg("float", "xoff", "0.0")]);
  48. CmdType(["sty", "stretchy"], "Stretch vertices using y value as stretch quantity\nf(x) = x + (pow(y, nx) + yoff)", [CmdArg("float", "nx"), CmdArg("float", "nz"), CmdArg("float", "yoff", "0.0")]);
  49. CmdType(["stz", "stretchz"], "Stretch vertices using z value as stretch quantity\nf(y) = y + (pow(z, ny) + zoff)", [CmdArg("float", "nx"), CmdArg("float", "ny"), CmdArg("float", "zoff", "0.0")]);
  50. CmdType(["bdxy", "bendxy"], "Bend vertices using x as bend quantity along y axis\nf(p) = (RotateY(x * t + toff) * p)", [CmdArg("float", "t"), CmdArg("float", "toff", "0.0")]);
  51. CmdType(["bdxz", "bendxz"], "Bend vertices using x as bend quantity along z axis\nf(p) = (RotateZ(x * t + toff) * p)", [CmdArg("float", "t"), CmdArg("float", "toff", "0.0")]);
  52. CmdType(["bdyx", "bendyx"], "Bend vertices using y as bend quantity along x axis\nf(p) = (RotateX(y * t + toff) * p)", [CmdArg("float", "t"), CmdArg("float", "toff", "0.0")]);
  53. CmdType(["bdyz", "bendyz"], "Bend vertices using y as bend quantity along z axis\nf(p) = (RotateZ(y * t + toff) * p)", [CmdArg("float", "t"), CmdArg("float", "toff", "0.0")]);
  54. CmdType(["bdzx", "bendzx"], "Bend vertices using z as bend quantity along x axis\nf(p) = (RotateX(z * t + toff) * p)", [CmdArg("float", "t"), CmdArg("float", "toff", "0.0")]);
  55. CmdType(["bdzy", "bendzy"], "Bend vertices using z as bend quantity along y axis\nf(p) = (RotateY(z * t + toff) * p)", [CmdArg("float", "t"), CmdArg("float", "toff", "0.0")]);
  56. CmdType(["sx", "scalex"], "Scale vertices", [CmdArg("vec3", "s")]);
  57. CmdType(["sy", "scaley"], "Scale vertices", [CmdArg("vec3", "s")]);
  58. CmdType(["sz", "scalez"], "Scale vertices", [CmdArg("vec3", "s")]);
  59. CmdType(["s", "scale"], "Uniformly Scale vertices", [CmdArg("float", "s")]);
  60. CmdType(["mx", "mirrorx"], "Mirror vertices through X-plane");
  61. CmdType(["my", "mirrory"], "Mirror vertices through Y-plane");
  62. CmdType(["mz", "mirrorz"], "Mirror vertices through Z-plane");
  63. CmdType(["ch", "chamfer"], "DOES NOT WORK: Performs a chamfer operation", [CmdArg("float", "f")]);
  64. CmdType(["splt", "splittriangle"], "split triangles in 4 smaller ones", [CmdArg("int", "pass")]);
  65. CmdType(["smth", "smooth"], "Smooth the mesh by subdivising it", [CmdArg("int", "pass"), CmdArg("int", "split_per_pass"), CmdArg("int", "smooth_per_pass")]);
  66. //-------------------------------------------------------------------------
  67. //Mesh shape operations
  68. //-------------------------------------------------------------------------
  69. CmdType(["ac", "addcylinder"], "Cylinder centered on (0,0,0) with BBox:\nMin: [-.5 * max(d1, d2),-.5 * h,-.5 * max(d1, d2)]\nMax: [ .5 * max(d1, d2), .5 * h, .5 * max(d1, d2)]",
  70. [CmdArg("int", "nsides"), CmdArg("float", "h"), CmdArg("float", "d1"), CmdArg("float", "d2"),
  71. CmdArg("bool", "dualsides", "false"), CmdArg("bool", "smooth", "false"), CmdArg("bool", "close", "false")]);
  72. CmdType(["asph", "addsphere"], "Sphere centered on (0,0,0) with BBox:\nMin: [-.5 * d]\nMax: [ .5 * d]", [CmdArg("int", "ndivisions"), CmdArg("float", "d")]);
  73. CmdType(["acap", "addcapsule"], "Capsule centered on (0,0,0) with BBox:\nMin: [-.5 * d,-(.5 * d + h),-.5 * d]\nMax: [ .5 * d, (.5 * d + h), .5 * d]", [CmdArg("int", "ndivisions"), CmdArg("float", "h"), CmdArg("float", "d")]);
  74. CmdType(["ato", "addtorus"], "Torus centered on (0,0,0) with BBox:\nMax: [-.5 * d2]\nMax: [ .5 * d2]", [CmdArg("int", "ndivisions"), CmdArg("float", "d1"), CmdArg("float", "d2")]);
  75. CmdType(["ab", "addbox"], "Box centered on (0,0,0) with BBox:\nMin: [-.5 * size]\nMax: [ .5 * size]", [CmdArg("vec3", "size"), CmdArg("float", "chamf", "0.0")]);
  76. CmdType(["ascb", "addsmoothchamfbox"], "Box centered on (0,0,0) with BBox:\nMin: [-.5 * size]\nMax: [ .5 * size]", [CmdArg("vec3", "size"), CmdArg("float", "chamf")]);
  77. CmdType(["afcb", "addflatchamfbox"], "Box centered on (0,0,0) with BBox:\nMin: [-.5 * size]\nMax: [ .5 * size]", [CmdArg("vec3", "size"), CmdArg("float", "chamf")]);
  78. CmdType(["as", "addstar"], "Append a Star centered on (0,0,0)\nContained in a disc of max(d1, d2) diameter.",
  79. [CmdArg("int", "nbranches"), CmdArg("float", "d1"), CmdArg("float", "d2"),
  80. CmdArg("bool", "fade", "false"), CmdArg("bool", "fade2", "false")]);
  81. CmdType(["aes", "addexpandedstar"], "Star centered on (0,0,0)\nContained in a disc of max(max(d1, d2), max(d1 + extrad, d2 + extrad)) diameter.\nExpanded star branches use Color2.",
  82. [CmdArg("int", "nbranches"), CmdArg("float", "d1"), CmdArg("float", "d2"), CmdArg("float", "extrad", "0.0")]);
  83. CmdType(["ad", "adddisc"], "Disc centered on (0,0,0) with d diameter.", [CmdArg("int", "nsides"), CmdArg("float", "d"), CmdArg("bool", "fade", "false")]);
  84. CmdType(["at", "addtriangle"], "Triangle centered on (0,0,0)\nContained in a disc of d diameter.", [CmdArg("float", "d"), CmdArg("bool", "fade", "false")]);
  85. CmdType(["aq", "addquad"], "Quad centered on (0,0,0) with BBox:\nMin: [-size * .5f, 0,-size * .5f]\nMax: [ size * .5f, 0, size * .5f]", [CmdArg("float", "size"), CmdArg("bool", "fade", "false")]);
  86. CmdType(["acg", "addcog"], "Gear centered on (0,0,0) with BBox:\nMin: [-.5 * max(d1, d2),-.5 * h,-.5 * max(d1, d2)]\nMax: [ .5 * max(d1, d2), .5 * h, .5 * max(d1, d2)]",
  87. [CmdArg("float", "h"), CmdArg("float", "d10"), CmdArg("float", "d20"), CmdArg("float", "d1"), CmdArg("float", "d2"), CmdArg("float", "d12"), CmdArg("float", "d22"),
  88. CmdArg("float", "sidemul", "1.0"), CmdArg("bool", "offset", "false")]);