Skip to content

Commit

Permalink
add getter for background texture
Browse files Browse the repository at this point in the history
  • Loading branch information
aeroheim committed Sep 4, 2021
1 parent f70e921 commit cb77564
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/background.ts
Expand Up @@ -57,6 +57,14 @@ class Background {
this._scene.add(this._plane);
}

/**
* Returns the texture of the background.
* @returns {Texture | null}
*/
get texture(): Texture | null {
return this._plane.material.map;
}

/**
* Sets the size of the background.
* @param {number} width
Expand Down

0 comments on commit cb77564

Please sign in to comment.