"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=["src"],f=e.defineComponent({name:"zv-scene-unity-webgl"}),m=e.defineComponent({...f,props:{basicOption:{},sources:{},useEvents:{},uuid:{},isPreview:{type:Boolean},disableDrag:{type:Boolean}},emits:["unity-scene-on-message"],setup(i,{emit:o}){const s=i,a=o,r=()=>{const n=e.ref();return e.onMounted(()=>{window.SHJSceneUnityIframeInstance||(window.SHJSceneUnityIframeInstance={}),window.SHJSceneUnityIframeInstance.url=s.basicOption.url+"/index.html",window.SHJSceneUnityIframeInstance.ref=n.value}),e.onBeforeUnmount(()=>{window.SHJSceneUnityIframeInstance=null}),window.addEventListener("message",t=>{a("unity-scene-on-message",t.data),window.SHJParseEvent(s.useEvents,"unity-scene-on-message",t.data)},!1),{unityIframeRef:n}},{unityIframeRef:c}=r();return(n,t)=>(e.openBlock(),e.createElementBlock("iframe",{ref_key:"unityIframeRef",ref:c,class:"unity-wrap",src:`${n.basicOption.url}/index.html`,frameborder:"0"},null,8,u))}});exports.default=m;
