|
@@ -7,18 +7,14 @@ return {
|
|
which will create an empty texture.
|
|
which will create an empty texture.
|
|
]],
|
|
]],
|
|
arguments = {
|
|
arguments = {
|
|
- filename = {
|
|
|
|
- type = 'string',
|
|
|
|
- description = 'The filename of an image to load.'
|
|
|
|
|
|
+ file = {
|
|
|
|
+ type = 'string | Blob',
|
|
|
|
+ description = 'A filename or Blob containing an image file to load.'
|
|
},
|
|
},
|
|
image = {
|
|
image = {
|
|
type = 'string',
|
|
type = 'string',
|
|
description = 'An Image object holding pixel data to load into the Texture.'
|
|
description = 'An Image object holding pixel data to load into the Texture.'
|
|
},
|
|
},
|
|
- blob = {
|
|
|
|
- type = 'Blob',
|
|
|
|
- description = 'A Blob object holding pixel data to load into the Texture.'
|
|
|
|
- },
|
|
|
|
width = {
|
|
width = {
|
|
type = 'number',
|
|
type = 'number',
|
|
description = 'The width of the Texture, in pixels.'
|
|
description = 'The width of the Texture, in pixels.'
|
|
@@ -32,7 +28,7 @@ return {
|
|
description = 'The number of layers in the Texture.'
|
|
description = 'The number of layers in the Texture.'
|
|
},
|
|
},
|
|
images = {
|
|
images = {
|
|
- type = 'table',
|
|
|
|
|
|
+ type = '{string | Blob | Image}',
|
|
description = 'A table of filenames or Images to load into the Texture.'
|
|
description = 'A table of filenames or Images to load into the Texture.'
|
|
},
|
|
},
|
|
options = {
|
|
options = {
|
|
@@ -70,7 +66,7 @@ return {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name = 'mipmaps',
|
|
name = 'mipmaps',
|
|
- type = '*',
|
|
|
|
|
|
+ type = 'boolean | number',
|
|
default = 'true',
|
|
default = 'true',
|
|
description = [[
|
|
description = [[
|
|
The number of mipmap levels in the texture, or a boolean. If true, a full mipmap chain
|
|
The number of mipmap levels in the texture, or a boolean. If true, a full mipmap chain
|
|
@@ -79,7 +75,7 @@ return {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name = 'usage',
|
|
name = 'usage',
|
|
- type = 'table',
|
|
|
|
|
|
+ type = '{TextureUsage}',
|
|
description = 'A list of `TextureUsage` indicating how the texture will be used.'
|
|
description = 'A list of `TextureUsage` indicating how the texture will be used.'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -98,7 +94,7 @@ return {
|
|
},
|
|
},
|
|
variants = {
|
|
variants = {
|
|
{
|
|
{
|
|
- arguments = { 'filename', 'options' },
|
|
|
|
|
|
+ arguments = { 'file', 'options' },
|
|
returns = { 'texture' }
|
|
returns = { 'texture' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -116,10 +112,6 @@ return {
|
|
{
|
|
{
|
|
arguments = { 'images', 'options' },
|
|
arguments = { 'images', 'options' },
|
|
returns = { 'texture' }
|
|
returns = { 'texture' }
|
|
- },
|
|
|
|
- {
|
|
|
|
- arguments = { 'blob', 'options' },
|
|
|
|
- returns = { 'texture' }
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
notes = [[
|
|
notes = [[
|