Browse Source

Rename Layer dimensions accessor;

bjorn 10 months ago
parent
commit
f9d6f502d8
3 changed files with 54 additions and 54 deletions
  1. 50 50
      api/init.lua
  2. 2 2
      api/lovr/headset/Layer/getDimensions.lua
  3. 2 2
      api/lovr/headset/Layer/setDimensions.lua

+ 50 - 50
api/init.lua

@@ -25931,6 +25931,31 @@ return {
             "lovr.headset.newLayer"
             "lovr.headset.newLayer"
           },
           },
           methods = {
           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",
               name = "getOrientation",
               summary = "Get the orientation of the layer.",
               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",
               name = "getTexture",
               summary = "Get the texture for the layer.",
               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",
               name = "setOrientation",
               summary = "Set the orientation of the layer.",
               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",
               name = "setViewMask",
               summary = "Set the view mask of the layer.",
               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 {
 return {
   summary = 'Get the size of the layer.',
   summary = 'Get the size of the layer.',
   description = [[
   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 = {},
   arguments = {},
   returns = {
   returns = {

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

@@ -1,8 +1,8 @@
 return {
 return {
   summary = 'Set the size of the layer.',
   summary = 'Set the size of the layer.',
   description = [[
   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 = {
   arguments = {
     width = {
     width = {