ERROR: loadscene() - scene "null" not found
mvilera opened this issue · 2 comments
Hey there, amazing job integrating this software with Vue,
I have a couple days giving your component a try and so far it's working good for simple images, but there's a problem which i have not been able to work out.
INFO: krpano 1.19-pr10 (build 2017-05-10)
INFO: HTML5/Desktop - Chrome 58.0 - WebGL
ERROR: loadscene() - scene "null" not found
This error shows on the console when the image is loaded, i don't have this problem when using the desktop viewer or the html generated by the makepano file, but when using the same xml on the vue-krpano component it shows up, although everything is working correctly.
My xmls are like this:
<krpano>
<!-- the skin -->
<include url="skin/defaultskin.xml" />
<!-- view settings -->
<view hlookat="0" vlookat="0" maxpixelzoom="1.0" fovmax="150" limitview="auto" />
<preview url="1_propertyid_2017-07-02_25V.tiles/preview.jpg" />
<image>
<cube url="1_propertyid_2017-07-02_25V.tiles/pano_%s.jpg" />
</image>
</krpano>
And this is my component call:
<krpano v-if="selected.id" :xml="selected.path" style="width:100%;height:400px" :lazy-load="true">
</krpano>
Please let me know if you have any suggestion.
I just solved it by replacing:
loadScene(){
let scene = this.scene;
if (this.krpanoObj && scene !== null) {
let str = `if(scene[${scene}]===null,
loadscene(get(scene[0].name),null,MERGE,BLEND(0.5)),
loadscene(${scene},null,MERGE,BLEND(0.5)))`;
this.krpanoObj.call(str);
this.log("scene changed: " + scene);
this.$emit("sceneChanged", scene);
}
}
Added && scene !== null on the if statement, i'm not sure if this is a good solution but it's working for me.
Thanks for the update. Your advice will be taken.