Little documentation update

This commit is contained in:
2022-12-14 06:27:10 -08:00
parent 850f4c227d
commit 6404f35b1c
17 changed files with 332 additions and 105 deletions

View File

@ -32,7 +32,8 @@ std::vector<SceneItemComponent*> SimpleVisualNovelBackground::getDependencies(){
void SimpleVisualNovelBackground::setTexture(Texture *texture) {
auto param = this->material->getShader()->getParameterByName("u_Text");
this->material->textureValues[param] = texture;
// Since we go both negative and positive, actual height is doubled
float_t aspect = (float_t)texture->getWidth() / (float_t)texture->getHeight();
float_t height = 0.5f;

View File

@ -12,11 +12,32 @@ namespace Dawn {
Material *material;
MeshHost *meshHost;
/**
* Create a simple Visual Novel Background prefab.
*
* @param scene Scene to add this background to.
* @return Created background Scene Item.
*/
static SimpleVisualNovelBackground * create(Scene *scene);
/**
* Construct a Simple Visual Novel Background. Simple Background is used
* for a quick up and running Visual Novel scene, but does not have any
* special effects or controls beyond updating a texture and mesh.
*
* @param item Scene Item this background belongs to.
*/
SimpleVisualNovelBackground(SceneItem *item);
std::vector<SceneItemComponent*> getDependencies() override;
void onStart() override;
/**
* Set the texture for the background. Auto updates the material and the
* dimensions of the internal quad.
*
* @param texture Texture to use.
*/
void setTexture(Texture *texture);
};
}