1 |
- {"ast":null,"code":"import { Texture } from \"../Materials/Textures/texture.js\";\nimport { TextureDome } from \"./textureDome.js\";\n/**\n * Display a 360 degree photo on an approximately spherical surface, useful for VR applications or skyboxes.\n * As a subclass of TransformNode, this allow parenting to the camera with different locations in the scene.\n * This class achieves its effect with a Texture and a correctly configured BackgroundMaterial on an inverted sphere.\n * Potential additions to this helper include zoom and and non-infinite distance rendering effects.\n */\nexport class PhotoDome extends TextureDome {\n /**\n * Gets or sets the texture being displayed on the sphere\n */\n get photoTexture() {\n return this.texture;\n }\n /**\n * sets the texture being displayed on the sphere\n */\n set photoTexture(value) {\n this.texture = value;\n }\n /**\n * Gets the current video mode for the video. It can be:\n * * TextureDome.MODE_MONOSCOPIC : Define the texture source as a Monoscopic panoramic 360.\n * * TextureDome.MODE_TOPBOTTOM : Define the texture source as a Stereoscopic TopBottom/OverUnder panoramic 360.\n * * TextureDome.MODE_SIDEBYSIDE : Define the texture source as a Stereoscopic Side by Side panoramic 360.\n */\n get imageMode() {\n return this.textureMode;\n }\n /**\n * Sets the current video mode for the video. It can be:\n * * TextureDome.MODE_MONOSCOPIC : Define the texture source as a Monoscopic panoramic 360.\n * * TextureDome.MODE_TOPBOTTOM : Define the texture source as a Stereoscopic TopBottom/OverUnder panoramic 360.\n * * TextureDome.MODE_SIDEBYSIDE : Define the texture source as a Stereoscopic Side by Side panoramic 360.\n */\n set imageMode(value) {\n this.textureMode = value;\n }\n _initTexture(urlsOrElement, scene, options) {\n return new Texture(urlsOrElement, scene, !options.generateMipMaps, !this._useDirectMapping, undefined, () => {\n this.onLoadObservable.notifyObservers();\n }, (message, exception) => {\n this.onLoadErrorObservable.notifyObservers(message || \"Unknown error occured\");\n if (this.onError) {\n this.onError(message, exception);\n }\n });\n }\n}\n/**\n * Define the image as a Monoscopic panoramic 360 image.\n */\nPhotoDome.MODE_MONOSCOPIC = TextureDome.MODE_MONOSCOPIC;\n/**\n * Define the image as a Stereoscopic TopBottom/OverUnder panoramic 360 image.\n */\nPhotoDome.MODE_TOPBOTTOM = TextureDome.MODE_TOPBOTTOM;\n/**\n * Define the image as a Stereoscopic Side by Side panoramic 360 image.\n */\nPhotoDome.MODE_SIDEBYSIDE = TextureDome.MODE_SIDEBYSIDE;","map":{"version":3,"names":["Texture","TextureDome","PhotoDome","photoTexture","texture","value","imageMode","textureMode","_initTexture","urlsOrElement","scene","options","generateMipMaps","_useDirectMapping","undefined","onLoadObservable","notifyObservers","message","exception","onLoadErrorObservable","onError","MODE_MONOSCOPIC","MODE_TOPBOTTOM","MODE_SIDEBYSIDE"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Helpers/photoDome.js"],"sourcesContent":["import { Texture } from \"../Materials/Textures/texture.js\";\nimport { TextureDome } from \"./textureDome.js\";\n/**\n * Display a 360 degree photo on an approximately spherical surface, useful for VR applications or skyboxes.\n * As a subclass of TransformNode, this allow parenting to the camera with different locations in the scene.\n * This class achieves its effect with a Texture and a correctly configured BackgroundMaterial on an inverted sphere.\n * Potential additions to this helper include zoom and and non-infinite distance rendering effects.\n */\nexport class PhotoDome extends TextureDome {\n /**\n * Gets or sets the texture being displayed on the sphere\n */\n get photoTexture() {\n return this.texture;\n }\n /**\n * sets the texture being displayed on the sphere\n */\n set photoTexture(value) {\n this.texture = value;\n }\n /**\n * Gets the current video mode for the video. It can be:\n * * TextureDome.MODE_MONOSCOPIC : Define the texture source as a Monoscopic panoramic 360.\n * * TextureDome.MODE_TOPBOTTOM : Define the texture source as a Stereoscopic TopBottom/OverUnder panoramic 360.\n * * TextureDome.MODE_SIDEBYSIDE : Define the texture source as a Stereoscopic Side by Side panoramic 360.\n */\n get imageMode() {\n return this.textureMode;\n }\n /**\n * Sets the current video mode for the video. It can be:\n * * TextureDome.MODE_MONOSCOPIC : Define the texture source as a Monoscopic panoramic 360.\n * * TextureDome.MODE_TOPBOTTOM : Define the texture source as a Stereoscopic TopBottom/OverUnder panoramic 360.\n * * TextureDome.MODE_SIDEBYSIDE : Define the texture source as a Stereoscopic Side by Side panoramic 360.\n */\n set imageMode(value) {\n this.textureMode = value;\n }\n _initTexture(urlsOrElement, scene, options) {\n return new Texture(urlsOrElement, scene, !options.generateMipMaps, !this._useDirectMapping, undefined, () => {\n this.onLoadObservable.notifyObservers();\n }, (message, exception) => {\n this.onLoadErrorObservable.notifyObservers(message || \"Unknown error occured\");\n if (this.onError) {\n this.onError(message, exception);\n }\n });\n }\n}\n/**\n * Define the image as a Monoscopic panoramic 360 image.\n */\nPhotoDome.MODE_MONOSCOPIC = TextureDome.MODE_MONOSCOPIC;\n/**\n * Define the image as a Stereoscopic TopBottom/OverUnder panoramic 360 image.\n */\nPhotoDome.MODE_TOPBOTTOM = TextureDome.MODE_TOPBOTTOM;\n/**\n * Define the image as a Stereoscopic Side by Side panoramic 360 image.\n */\nPhotoDome.MODE_SIDEBYSIDE = TextureDome.MODE_SIDEBYSIDE;\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,kCAAkC;AAC1D,SAASC,WAAW,QAAQ,kBAAkB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,SAAS,SAASD,WAAW,CAAC;EACvC;AACJ;AACA;EACI,IAAIE,YAAYA,CAAA,EAAG;IACf,OAAO,IAAI,CAACC,OAAO;EACvB;EACA;AACJ;AACA;EACI,IAAID,YAAYA,CAACE,KAAK,EAAE;IACpB,IAAI,CAACD,OAAO,GAAGC,KAAK;EACxB;EACA;AACJ;AACA;AACA;AACA;AACA;EACI,IAAIC,SAASA,CAAA,EAAG;IACZ,OAAO,IAAI,CAACC,WAAW;EAC3B;EACA;AACJ;AACA;AACA;AACA;AACA;EACI,IAAID,SAASA,CAACD,KAAK,EAAE;IACjB,IAAI,CAACE,WAAW,GAAGF,KAAK;EAC5B;EACAG,YAAYA,CAACC,aAAa,EAAEC,KAAK,EAAEC,OAAO,EAAE;IACxC,OAAO,IAAIX,OAAO,CAACS,aAAa,EAAEC,KAAK,EAAE,CAACC,OAAO,CAACC,eAAe,EAAE,CAAC,IAAI,CAACC,iBAAiB,EAAEC,SAAS,EAAE,MAAM;MACzG,IAAI,CAACC,gBAAgB,CAACC,eAAe,CAAC,CAAC;IAC3C,CAAC,EAAE,CAACC,OAAO,EAAEC,SAAS,KAAK;MACvB,IAAI,CAACC,qBAAqB,CAACH,eAAe,CAACC,OAAO,IAAI,uBAAuB,CAAC;MAC9E,IAAI,IAAI,CAACG,OAAO,EAAE;QACd,IAAI,CAACA,OAAO,CAACH,OAAO,EAAEC,SAAS,CAAC;MACpC;IACJ,CAAC,CAAC;EACN;AACJ;AACA;AACA;AACA;AACAhB,SAAS,CAACmB,eAAe,GAAGpB,WAAW,CAACoB,eAAe;AACvD;AACA;AACA;AACAnB,SAAS,CAACoB,cAAc,GAAGrB,WAAW,CAACqB,cAAc;AACrD;AACA;AACA;AACApB,SAAS,CAACqB,eAAe,GAAGtB,WAAW,CAACsB,eAAe","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|