Parcourir la source

Fix cylinder/capsule/cone docs;

bjorn il y a 10 mois
Parent
commit
dc96e537af

+ 30 - 9
api/init.lua

@@ -17604,9 +17604,16 @@ return {
                       description = "The position of the center of the capsule."
                     },
                     {
-                      name = "scale",
-                      type = "Vec3",
-                      description = "The size of the capsule (x and y scale the radius, z is the length)."
+                      name = "radius",
+                      type = "number",
+                      description = "The radius of the capsule.",
+                      default = "1.0"
+                    },
+                    {
+                      name = "length",
+                      type = "number",
+                      description = "The length of the capsule.",
+                      default = "1"
                     },
                     {
                       name = "orientation",
@@ -17979,9 +17986,16 @@ return {
                       description = "The position of the center of the base of the cone."
                     },
                     {
-                      name = "scale",
-                      type = "Vec3",
-                      description = "The size of the cone (x and y scale the radius, z is the length)."
+                      name = "radius",
+                      type = "number",
+                      description = "The radius of the cone.",
+                      default = "1"
+                    },
+                    {
+                      name = "length",
+                      type = "number",
+                      description = "The length of the cone.",
+                      default = "1"
                     },
                     {
                       name = "orientation",
@@ -18255,9 +18269,16 @@ return {
                       description = "The position of the center of the cylinder."
                     },
                     {
-                      name = "scale",
-                      type = "Vec3",
-                      description = "The size of the cylinder (x and y scale the radius, z is the length)."
+                      name = "radius",
+                      type = "number",
+                      description = "The radius of the cylinder.",
+                      default = "1"
+                    },
+                    {
+                      name = "length",
+                      type = "number",
+                      description = "The length of the cylinder.",
+                      default = "1"
                     },
                     {
                       name = "orientation",

+ 1 - 5
api/lovr/graphics/Pass/capsule.lua

@@ -54,10 +54,6 @@ return {
       type = 'Vec3',
       description = 'The position of the center of the capsule.'
     },
-    scale = {
-      type = 'Vec3',
-      description = 'The size of the capsule (x and y scale the radius, z is the length).'
-    },
     orientation = {
       type = 'Quat',
       description = 'The orientation of the capsule.'
@@ -92,7 +88,7 @@ return {
       returns = {}
     },
     {
-      arguments = { 'position', 'scale', 'orientation', 'segments' },
+      arguments = { 'position', 'radius', 'length', 'orientation', 'segments' },
       returns = {}
     },
     {

+ 1 - 5
api/lovr/graphics/Pass/cone.lua

@@ -52,10 +52,6 @@ return {
       type = 'Vec3',
       description = 'The position of the center of the base of the cone.'
     },
-    scale = {
-      type = 'Vec3',
-      description = 'The size of the cone (x and y scale the radius, z is the length).'
-    },
     orientation = {
       type = 'Quat',
       description = 'The orientation of the cone.'
@@ -85,7 +81,7 @@ return {
       returns = {}
     },
     {
-      arguments = { 'position', 'scale', 'orientation', 'segments' },
+      arguments = { 'position', 'radius', 'length', 'orientation', 'segments' },
       returns = {}
     },
     {

+ 1 - 5
api/lovr/graphics/Pass/cylinder.lua

@@ -52,10 +52,6 @@ return {
       type = 'Vec3',
       description = 'The position of the center of the cylinder.'
     },
-    scale = {
-      type = 'Vec3',
-      description = 'The size of the cylinder (x and y scale the radius, z is the length).'
-    },
     orientation = {
       type = 'Quat',
       description = 'The orientation of the cylinder.'
@@ -99,7 +95,7 @@ return {
       returns = {}
     },
     {
-      arguments = { 'position', 'scale', 'orientation', 'capped', 'angle1', 'angle2', 'segments' },
+      arguments = { 'position', 'radius', 'length', 'orientation', 'capped', 'angle1', 'angle2', 'segments' },
       returns = {}
     },
     {