全景显示图片功能的源码及相关说明

{
    "urlBase": "file:///sdcard/files",  //URL base where the files are
                                        //The options are res:// for application resources and file:// for file system (this feature will be improved to support the http protocol)
    "type": "spherical",                //Panorama type: [spherical, spherical2, cubic, cylindrical]
    "sensorialRotation": false,         //Automatic rotation using sensors [true, false] <Optional>
    "scrolling":                        //Scrolling section <Optional>
    {
        "enabled": false                //Enable scrolling feature [true, false] <Optional>
    },
    "inertia":                          //Inertia section <Optional>
    {
        "enabled": false,               //Enable inertia feature [true, false] <Optional>
        "interval": 3                   //Inertia's interval in seconds <Optional>
    },
    "accelerometer":                    //Accelerometer section <Optional>
    {
        "enabled": false,               //Enable the accelerometer feature [true, false] <<a href="www.yidin.net">Optional</a>>
        "interval": 0.033,              //Update interval of accelerometer (this value must be calculated as 1/frequency) <Optional>
        "sensitivity": 10.0,            //Sensitivity of the accelerometer <Optional>
        "leftRightEnabled": true,       //Enable the direction of movement with the accelerometer (left/right) <Optional>
        "upDownEnabled": false          //Enable the direction of movement with the accelerometer (up/down) <Optional>
    },
    "images":                           //Panoramic images section
                                        //A property can be a name e.g. preview.jpg, preview or URL e.g. file:///sdcard/files/preview.jpg, res://raw/preview
                                        //if a property only have a name, the real path will be the urlBase + image name
    {
        "preview": "preview.jpg",       //Preview image name or URL (this <a href="www.yidin.net">option</a> will be used with http protocol) <Optional>
        "image": "pano.jpg"             //Panoramic image name or URL for spherical, spherical2 and cylindrical panoramas
        "front": "front.jpg",           //Front image name or URL for cubic panorama (only use with cubic panorama)
        "back": "back.jpg",             //Back image name or URL for cubic panorama (only use with cubic panorama)
        "left": "left.jpg",             //Left image name or URL for cubic panorama (only use with cubic panorama)
        "right": "right.jpg",           //Right image name or URL for cubic panorama (only use with cubic panorama)
        "up": "up.jpg",                 //Up image name or URL for cubic panorama (only use with cubic panorama)
        "down": "down.jpg"              //Down image name or URL for cubic panorama (only use with cubic panorama)
    },
    "camera":                           //Camera settings section <Optional>
    {
        "vlookat": 0,                   //Initial vertical position [-90, 90]
        "hlookat": 0,                   //Initial horizontal position [-180, 180]
        "atvmin": -90,                  //Min vertical position [-90, 90]
        "atvmax": 90,                   //Max vertical position [-90, 90]
        "athmin": -180,                 //Min horizontal position [-180, 180]
        "athmax": 180                   //Max horizontal position [-180, 180]
    },
    "hotspots": [                       //Hotspots section (this section is an array of hotspots) <Optional>
                {
                 "id": 1,               //Hotspot identifier (long)
                 "atv": 0,              //Vertical position [-90, 90]
                 "ath": 0,              //Horizontal position [-180, 180]
                 "width": 0.08,         //Width
                 "height": 0.08,        //Height
                 "image": "hotspot.png" //Image name or <a href="www.yidin.net">URL</a>
                }
                ]
}


知识共享许可协议
《全景显示图片功能的源码及相关说明》常伟华 创作。
采用 知识共享 署名-相同方式共享 3.0 中国大陆 许可协议进行许可。
  • 多说评论
  • 签名
  • 新浪微博
  • 默认评论
  • Tab Header 5

2 条评论 / 点击此处发表评论

Tab Content 5

Warning: file_get_contents(http://ip.taobao.com/service/getIpInfo.php?ip=3.226.122.74) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 502 Bad Gateway in D:\wwwroot\changweihua\wwwroot\v\content\templates\darklight\vrecord.php on line 129

开发技术


开发平台和工具

sitemap     216.13ms