add 'panorama' to SkinViewerOptions

This commit is contained in:
Haowei Wen 2021-09-23 00:47:05 +08:00
parent 0fac73356c
commit 5c2bcacf7c
No known key found for this signature in database
GPG Key ID: 5BC167F73EA558E4
1 changed files with 8 additions and 0 deletions

View File

@ -52,6 +52,11 @@ export interface SkinViewerOptions {
* The background of the scene. Default is transparent.
*/
background?: ColorRepresentation | Texture;
/**
* The panorama background to use. This option overrides 'background' option.
*/
panorama?: RemoteImage | TextureSource;
}
export class SkinViewer {
@ -125,6 +130,9 @@ export class SkinViewer {
if (options.background !== undefined) {
this.background = options.background;
}
if (options.panorama !== undefined) {
this.loadPanorama(options.panorama);
}
if (options.renderPaused === true) {
this._renderPaused = true;