From 5c2bcacf7cad75ed8133e656c93f049e761d14b4 Mon Sep 17 00:00:00 2001 From: Haowei Wen Date: Thu, 23 Sep 2021 00:47:05 +0800 Subject: [PATCH] add 'panorama' to SkinViewerOptions --- src/viewer.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/viewer.ts b/src/viewer.ts index efb84d8..0bf5cb0 100644 --- a/src/viewer.ts +++ b/src/viewer.ts @@ -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;