-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documentation: StaticMesh, Texture, AssetManager
- Loading branch information
Showing
6 changed files
with
324 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# StaticMesh | ||
|
||
An asset that contains a triangle mesh. | ||
|
||
--- | ||
### GetMaterial | ||
Get the default material. | ||
|
||
Sig: `material = StaticMesh:GetMaterial()` | ||
- Ret: `Material material` Default material | ||
--- | ||
### SetMaterial | ||
Set the default material. | ||
|
||
Sig: `StaticMesh:SetMaterial(material)` | ||
- Arg: `Material material` Default material | ||
--- | ||
### GetNumIndices | ||
Get the number of indices. | ||
|
||
Sig: `num = StaticMesh:GetNumIndices()` | ||
- Ret: `integer num` Number of indices | ||
--- | ||
### GetNumFaces | ||
Get the number of faces. | ||
|
||
Sig: `num = StaticMesh:GetNumFaces()` | ||
- Ret: `integer num` Number of faces | ||
--- | ||
### GetNumVertices | ||
Get the number of vertices. | ||
|
||
Sig: `num = StaticMesh:GetNumVertices()` | ||
- Ret: `integer num` Number of vertices | ||
--- | ||
### HasVertexColor | ||
Check if the mesh has vertex color data. | ||
|
||
Sig: `hasColor = StaticMesh:HasVertexColor()` | ||
- Ret: `boolean hasColor` Has vertex color | ||
--- | ||
### HasTriangleMeshCollision | ||
Check if the mesh has triangle collision data. | ||
|
||
Sig: `triCollision = StaticMesh:HasTriangleMeshCollision()` | ||
- Ret: `boolean triCollision` Has triangle collision data | ||
--- | ||
### EnableTriangleMeshCollision | ||
Set whether this mesh should have triangle collision data generated. | ||
|
||
Sig: `StaticMesh:EnableTriangleMeshCollision(enable)` | ||
- Arg: `boolean enable` Enable triangle collision | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Texture | ||
|
||
An asset containing image data. | ||
|
||
--- | ||
### IsMipmapped | ||
Check if the texture is mipmapped. | ||
|
||
Sig: `mipmapped = Texture:IsMipmapped()` | ||
- Ret: `boolean mipmapped` Is mipmapped | ||
--- | ||
### GetWidth | ||
Get the texture width. | ||
|
||
Sig: `width = Texture:GetWidth()` | ||
- Ret: `integer width` Texture width | ||
--- | ||
### GetHeight | ||
Get the texture height. | ||
|
||
Sig: `height = Texture:GetHeight()` | ||
- Ret: `integer height` Texture height | ||
--- | ||
### GetMipLevels | ||
Get the number of mip levels. | ||
|
||
Sig: `levels = Texture:GetMipLevels()` | ||
- Ret: `integer levels` Number of mip levels | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Globals | ||
|
||
Global functions. | ||
|
||
--- | ||
### RefSweep | ||
Unload any assets that are no longer references. | ||
|
||
Sig: `RefSweep()` | ||
|
||
--- | ||
### GetAsset | ||
Get an asset by name. Does not load it. Will return nil if the asset hasn't been loaded. | ||
|
||
Sig: `asset = GetAsset(name)` | ||
- Arg: `string name` Asset name | ||
- Ret: `Asset asset` Asset | ||
--- | ||
### LoadAsset | ||
Load and get an asset immediately. | ||
|
||
Sig: `asset = LoadAsset(name)` | ||
- Arg: `string name` Asset name | ||
- Ret: `Asset asset` Loaded asset | ||
--- | ||
### AsyncLoadAsset | ||
Request the an asset be loaded asynchronously. This function will return a reference to an asset, and you can check if it has been loaded. Call asset:IsLoaded() to see if it has been loaded. TODO: Add function callback to handle when asset is loaded. | ||
|
||
Sig: `asset = AsyncLoadAsset(name)` | ||
- Arg: `string name` Asset name | ||
- Ret: `Asset asset` Pending asset | ||
--- | ||
### UnloadAsset | ||
Unload an unreferenced asset. | ||
|
||
Sig: `UnloadAsset(name)` | ||
- Arg: `string name` Asset name | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# AssetManager | ||
|
||
System that manages loading and unloading assets. | ||
|
||
--- | ||
### RefSweep | ||
Unload any assets that are no longer references. | ||
|
||
Sig: `AssetManager.RefSweep()` | ||
|
||
--- | ||
### GetAsset | ||
Get an asset by name. Does not load it. Will return nil if the asset hasn't been loaded. | ||
|
||
Sig: `asset = AssetManager.GetAsset(name)` | ||
- Arg: `string name` Asset name | ||
- Ret: `Asset asset` Asset | ||
--- | ||
### LoadAsset | ||
Load and get an asset immediately. | ||
|
||
Sig: `asset = AssetManager.LoadAsset(name)` | ||
- Arg: `string name` Asset name | ||
- Ret: `Asset asset` Loaded asset | ||
--- | ||
### SaveAsset | ||
Save an asset. Only available in Editor. | ||
|
||
Sig: `AssetManager.Save(name)` | ||
- Arg: `string name` Asset name | ||
--- | ||
### AsyncLoadAsset | ||
Request the an asset be loaded asynchronously. This function will return a reference to an asset, and you can check if it has been loaded. Call asset:IsLoaded() to see if it has been loaded. TODO: Add function callback to handle when asset is loaded. | ||
|
||
Sig: `asset = AssetManager.AsyncLoadAsset(name)` | ||
- Arg: `string name` Asset name | ||
- Ret: `Asset asset` Pending asset | ||
--- | ||
### UnloadAsset | ||
Unload an unreferenced asset. | ||
|
||
Sig: `AssetManager.UnloadAsset(name)` | ||
- Arg: `string name` Asset name | ||
--- | ||
### CreateAndRegisterAsset | ||
Create an asset of a given type. | ||
|
||
Sig: `asset = AssetManager.CreateAndRegisterAsset(typeName, path, name)` | ||
- Arg: `string typeName` Name of the type to create (e.g. MaterialLite) | ||
- Arg: `string path` Where the asset should be saved | ||
- Arg: `string name` Name of the new asset | ||
- Ret: `Asset asset` The newly created asset | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters