Explorar o código

Rename Layer dimensions accessor;

bjorn hai 10 meses
pai
achega
f9d6f502d8

+ 50 - 50
api/init.lua

@@ -25931,6 +25931,31 @@ return {
             "lovr.headset.newLayer"
           },
           methods = {
+            {
+              name = "getDimensions",
+              summary = "Get the size of the layer.",
+              description = "Returns the width and height of the layer.  This is the size of the Layer's plane in meters, not the resolution of the layer's texture in pixels.",
+              key = "Layer:getDimensions",
+              module = "lovr.headset",
+              notes = "When a layer is created, its width and height are 1 meter.",
+              variants = {
+                {
+                  arguments = {},
+                  returns = {
+                    {
+                      name = "width",
+                      type = "number",
+                      description = "The width of the layer, in meters."
+                    },
+                    {
+                      name = "height",
+                      type = "number",
+                      description = "The height of the layer, in meters."
+                    }
+                  }
+                }
+              }
+            },
             {
               name = "getOrientation",
               summary = "Get the orientation of the layer.",
@@ -26085,31 +26110,6 @@ return {
                 }
               }
             },
-            {
-              name = "getSize",
-              summary = "Get the size of the layer.",
-              description = "Returns the width and height of the layer.  This is the size of the plane the layer is rendered onto, not the resolution of the layer's texture in pixels.",
-              key = "Layer:getSize",
-              module = "lovr.headset",
-              notes = "When a layer is created, its width and height are 1 meter.",
-              variants = {
-                {
-                  arguments = {},
-                  returns = {
-                    {
-                      name = "width",
-                      type = "number",
-                      description = "The width of the layer, in meters."
-                    },
-                    {
-                      name = "height",
-                      type = "number",
-                      description = "The height of the layer, in meters."
-                    }
-                  }
-                }
-              }
-            },
             {
               name = "getTexture",
               summary = "Get the texture for the layer.",
@@ -26186,6 +26186,31 @@ return {
                 }
               }
             },
+            {
+              name = "setDimensions",
+              summary = "Set the size of the layer.",
+              description = "Sets the width and height of the layer.  This is the size of the Layer's plane in meters, not not the resolution of the layer's texture in pixels.",
+              key = "Layer:setDimensions",
+              module = "lovr.headset",
+              notes = "When a layer is created, its width and height are 1 meter.",
+              variants = {
+                {
+                  arguments = {
+                    {
+                      name = "width",
+                      type = "number",
+                      description = "The width of the layer, in meters."
+                    },
+                    {
+                      name = "height",
+                      type = "number",
+                      description = "The height of the layer, in meters."
+                    }
+                  },
+                  returns = {}
+                }
+              }
+            },
             {
               name = "setOrientation",
               summary = "Set the orientation of the layer.",
@@ -26342,31 +26367,6 @@ return {
                 }
               }
             },
-            {
-              name = "setSize",
-              summary = "Set the size of the layer.",
-              description = "Sets the width and height of the layer.  This is the size of the plane the layer is rendered onto, not the resolution of the layer's texture in pixels.",
-              key = "Layer:setSize",
-              module = "lovr.headset",
-              notes = "When a layer is created, its width and height are 1 meter.",
-              variants = {
-                {
-                  arguments = {
-                    {
-                      name = "width",
-                      type = "number",
-                      description = "The width of the layer, in meters."
-                    },
-                    {
-                      name = "height",
-                      type = "number",
-                      description = "The height of the layer, in meters."
-                    }
-                  },
-                  returns = {}
-                }
-              }
-            },
             {
               name = "setViewMask",
               summary = "Set the view mask of the layer.",

+ 2 - 2
api/lovr/headset/Layer/getSize.lua → api/lovr/headset/Layer/getDimensions.lua

@@ -1,8 +1,8 @@
 return {
   summary = 'Get the size of the layer.',
   description = [[
-    Returns the width and height of the layer.  This is the size of the plane the layer is rendered
-    onto, not the resolution of the layer's texture in pixels.
+    Returns the width and height of the layer.  This is the size of the Layer's plane in meters, not
+    the resolution of the layer's texture in pixels.
   ]],
   arguments = {},
   returns = {

+ 2 - 2
api/lovr/headset/Layer/setSize.lua → api/lovr/headset/Layer/setDimensions.lua

@@ -1,8 +1,8 @@
 return {
   summary = 'Set the size of the layer.',
   description = [[
-    Sets the width and height of the layer.  This is the size of the plane the layer is rendered
-    onto, not the resolution of the layer's texture in pixels.
+    Sets the width and height of the layer.  This is the size of the Layer's plane in meters, not
+    not the resolution of the layer's texture in pixels.
   ]],
   arguments = {
     width = {