File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,12 @@ export class Viewer {
210210 }
211211 return null ;
212212 }
213- public async show ( scene : Excursion ) {
213+ /**
214+ * Открыть тур
215+ * @param scene сцена тура, которую нужно открыть
216+ * @param ignoreRotateAngle нужно ли игнорировать первоначальное вращение камеры при открытии сцены
217+ */
218+ public async show ( scene : Excursion , ignoreRotateAngle : boolean = false ) {
214219 this . viewScene = scene ;
215220 for ( const material of this . linkSphereMaterials ) {
216221 material . dispose ( ) ;
@@ -229,7 +234,10 @@ export class Viewer {
229234 await this . goToImage (
230235 targetId ,
231236 ( targetState ) => {
232- this . rotateCamToAngle ( targetState . ifFirstStateRotationAngle || 0 ) ;
237+ // Проверка нужна для live preview в редакторе, где нужно отображать конкретное вращение камеры при открытии сцены
238+ if ( ! ignoreRotateAngle ) {
239+ this . rotateCamToAngle ( targetState . ifFirstStateRotationAngle || 0 ) ;
240+ }
233241 } ,
234242 true
235243 ) ;
You can’t perform that action at this time.
0 commit comments