You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
roundsPerMinute: this.roundsPerMinute,// Rotation speed of the animation launched once home is loaded in rounds per minute, no animation if missing or equal to 0
69
-
navigationPanel: "none",// Displayed navigation arrows, "none" or "default" for default one or an HTML string containing elements with data-simulated-key
70
-
level: this.level,// Uncomment to select the displayed level, default level if missing */
71
-
camera: this.camera,// Uncomment to select a camera, default camera if missing */
72
-
activateCameraSwitchKey: true// Switch between top view / virtual visit with space bar if not false or missing */
73
-
};
74
-
75
-
//@ts-ignore
76
-
viewHome(this._viewerCanvas,// Id of the canvas
77
-
this.url,// URL or relative URL of the home to display
78
-
err=>console.error(err),// Callback called in case of error
79
-
(part,info,percentage)=>{},// Callback called while loading
80
-
options);
68
+
69
+
this.#ready =true;
70
+
this.createViewer();
71
+
72
+
}
73
+
74
+
privatecreateViewer(){
75
+
if(this.#ready){
76
+
constoptions={
77
+
roundsPerMinute: this.roundsPerMinute,// Rotation speed of the animation launched once home is loaded in rounds per minute, no animation if missing or equal to 0
78
+
navigationPanel: "none",// Displayed navigation arrows, "none" or "default" for default one or an HTML string containing elements with data-simulated-key
79
+
level: this.level,// Uncomment to select the displayed level, default level if missing */
80
+
camera: this.camera,// Uncomment to select a camera, default camera if missing */
81
+
activateCameraSwitchKey: true// Switch between top view / virtual visit with space bar if not false or missing */
82
+
};
83
+
84
+
if(this.isConnected){
85
+
//@ts-ignore
86
+
this.#viewer =viewHome(this.#viewerCanvas,// Id of the canvas
87
+
this.url,// URL or relative URL of the home to display
88
+
err=>console.error(err),// Callback called in case of error
89
+
(part,info,percentage)=>{},// Callback called while loading
0 commit comments