Naturally Produced Modules

    gm-vr

    0.0.3 • Public • Published

    gm-vr

    vr全景图

    安装
    npm install gm-vr
    
    使用
    • json
    {
        "usingComponents": {
            "gm-vr": "gm-vr/vr"
        }
    }
    
    • js
    Page({
      data: {
        renderGame: true,
        render: "render1",
        gameSource: {
          camera: {
            position: {//相机指向的位置
              x: 0,
              y: 0,
              z: 0.01
            }
          },
          backgrounds: {
            front: "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01LjphTz1FJvckh71IE_!!1080040467.jpg",
            back: "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01sBr7XR1FJvckNhcz9_!!1080040467.jpg",
            top: "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01N0xIJ11FJvchq81eu_!!1080040467.jpg",
            bottom: "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01Q2Dq7O1FJvcbofydM_!!1080040467.jpg",
            left: "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01Ad1lqo1FJvcgXYPu3_!!1080040467.jpg",
            right: "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01BeqUi11FJvckh6cN5_!!1080040467.jpg"
          },
          hots: [
            {
              width: 20,//显示区域尺寸
              height: 20,
              animationTime: 1000,//整个动画时间
              name: "hot1",
              position: {
                x: 20,
                y: 6,
                z: -100,
              },
              rotation: {
                x: 0,
                y: 0,
                z: 0,
              },
              imgs: [
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01kbTi7q1FJvbYxQvfk_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01wRnPov1FJvbShYknv_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01C9HMuO1FJvbKbfTnr_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01F3MLkn1FJvbSz7rs6_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01kCsizV1FJvbT7pIm3_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01xc3pKZ1FJvbTwbJ8r_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01SIzGJR1FJvbVkpKCi_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01oziFtx1FJvbQUQuWH_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01GJ31jG1FJvbX2h65s_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01SmQihp1FJvbW6R3xQ_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01myfalX1FJvbKbe0LV_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01Tog8xb1FJvbQz65j8_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN015zybq21FJvbW6TH9O_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN019VDqb91FJvbPJbaCP_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01jHjNCI1FJvbQz3oMQ_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01HaQOQp1FJvbQz4DIP_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01kPgCCM1FJvbV34ciT_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01KE7M7e1FJvbYZ7guv_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01XnI0b41FJvbYZ69HF_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01LQiGzI1FJvbKbd8HT_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01X5LykS1FJvbYxQzrT_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01VCrvhF1FJvbQz4PnE_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01C2fpKr1FJvbSz7GUF_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01uyaCl61FJvbTl5jd8_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN014QPTkf1FJvbVkpOPK_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01eaG2SD1FJvbW6T8r7_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN011delXC1FJvbPJaF3u_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01sBklRX1FJvbV35E9v_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01y75HZD1FJvbPJamLL_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01XEmV3c1FJvbXgrzFd_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01DKOf0g1FJvbYZ79fz_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01C1CeZG1FJvbKbdCSP_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01K7elMs1FJvbW6SflY_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01wGqtGq1FJvbTwcW2P_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01FdV3Cl1FJvbTl8gZb_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01VBL4dI1FJvbT7qynS_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01LpF1nj1FJvbTwZy3r_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01hoMgp91FJvbSz7Sye_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01nnv1VT1FJvbSz7KfC_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01mXgKgN1FJvbQz69vz_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01t1a9DM1FJvbT7pEg1_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01oDLQWc1FJvbSz9gDz_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01ThYl2r1FJvbT7qe10_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01Csfbs11FJvbYxRnly_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01xMpJ5a1FJvbXgsj0t_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01aqYw5n1FJvbKbgDcQ_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01qx3voA1FJvbTl7XvP_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01P9PnMx1FJvbKbgp3C_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01WqSFvu1FJvbV35tlM_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01ObgBCo1FJvbPJaqXp_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN019CfOs71FJvbT7oEIy_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN019p02f51FJvbShbZX0_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN012ZnSdO1FJvbKbgLwv_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01jxcbOt1FJvbYxQraa_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01Uuhj7O1FJvbVksThO_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN018jN2Ry1FJvbVkswo7_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01maIhHj1FJvbVkpf6E_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01Ybm7Bz1FJvbShbyUs_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01dfpG4p1FJvbTl78y3_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01rPvxFk1FJvbQURJXa_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01sa9eyx1FJvbTl7oZf_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01GaNDTs1FJvbYZ6cSf_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01jfY4mw1FJvbShdJh2_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01Kx8Yho1FJvbShdeU6_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01FNPPXX1FJvbSz7COo_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01ZbMfoe1FJvbSz6nS9_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01XU0mfn1FJvbYZ6Pyp_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01FSiZ681FJvbQz5DlQ_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN010WS1IY1FJvbTl9pJB_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01NEKrKk1FJvbYZ6kmT_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01IpOlFv1FJvbKbdbTz_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN012fGTvO1FJvbShc2fy_!!1080040467.png"
              ],
            },
            {
              width: 20,//显示区域尺寸
              height: 20,
              animationTime: 1000,//整个动画时间
              name: "hot2",
              position: {
                x: -10,
                y: 6,
                z: -100,
              },
              rotation: {
                x: 0,
                y: 0,
                z: 0,
              },
              imgs: [
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01kbTi7q1FJvbYxQvfk_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01wRnPov1FJvbShYknv_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01C9HMuO1FJvbKbfTnr_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01F3MLkn1FJvbSz7rs6_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01kCsizV1FJvbT7pIm3_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01xc3pKZ1FJvbTwbJ8r_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01SIzGJR1FJvbVkpKCi_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01oziFtx1FJvbQUQuWH_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01GJ31jG1FJvbX2h65s_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01SmQihp1FJvbW6R3xQ_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01myfalX1FJvbKbe0LV_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01Tog8xb1FJvbQz65j8_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN015zybq21FJvbW6TH9O_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN019VDqb91FJvbPJbaCP_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01jHjNCI1FJvbQz3oMQ_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01HaQOQp1FJvbQz4DIP_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01kPgCCM1FJvbV34ciT_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01KE7M7e1FJvbYZ7guv_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01XnI0b41FJvbYZ69HF_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01LQiGzI1FJvbKbd8HT_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01X5LykS1FJvbYxQzrT_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01VCrvhF1FJvbQz4PnE_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01C2fpKr1FJvbSz7GUF_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01uyaCl61FJvbTl5jd8_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN014QPTkf1FJvbVkpOPK_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01eaG2SD1FJvbW6T8r7_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN011delXC1FJvbPJaF3u_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01sBklRX1FJvbV35E9v_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01y75HZD1FJvbPJamLL_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01XEmV3c1FJvbXgrzFd_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01DKOf0g1FJvbYZ79fz_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01C1CeZG1FJvbKbdCSP_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01K7elMs1FJvbW6SflY_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01wGqtGq1FJvbTwcW2P_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01FdV3Cl1FJvbTl8gZb_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01VBL4dI1FJvbT7qynS_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01LpF1nj1FJvbTwZy3r_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01hoMgp91FJvbSz7Sye_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01nnv1VT1FJvbSz7KfC_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01mXgKgN1FJvbQz69vz_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01t1a9DM1FJvbT7pEg1_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01oDLQWc1FJvbSz9gDz_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01ThYl2r1FJvbT7qe10_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01Csfbs11FJvbYxRnly_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01xMpJ5a1FJvbXgsj0t_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01aqYw5n1FJvbKbgDcQ_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01qx3voA1FJvbTl7XvP_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01P9PnMx1FJvbKbgp3C_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01WqSFvu1FJvbV35tlM_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01ObgBCo1FJvbPJaqXp_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN019CfOs71FJvbT7oEIy_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN019p02f51FJvbShbZX0_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN012ZnSdO1FJvbKbgLwv_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01jxcbOt1FJvbYxQraa_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01Uuhj7O1FJvbVksThO_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN018jN2Ry1FJvbVkswo7_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01maIhHj1FJvbVkpf6E_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01Ybm7Bz1FJvbShbyUs_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01dfpG4p1FJvbTl78y3_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01rPvxFk1FJvbQURJXa_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01sa9eyx1FJvbTl7oZf_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01GaNDTs1FJvbYZ6cSf_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01jfY4mw1FJvbShdJh2_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01Kx8Yho1FJvbShdeU6_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01FNPPXX1FJvbSz7COo_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01ZbMfoe1FJvbSz6nS9_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01XU0mfn1FJvbYZ6Pyp_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01FSiZ681FJvbQz5DlQ_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN010WS1IY1FJvbTl9pJB_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01NEKrKk1FJvbYZ6kmT_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01IpOlFv1FJvbKbdbTz_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN012fGTvO1FJvbShc2fy_!!1080040467.png"
              ],
            }
          ],
        },
        gameSource2: {
          camera: {
            position: {//相机指向的位置
              x: 0,
              y: 0,
              z: 0.01
            }
          },
          backgrounds: {
            right: "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01zhex7Q1FJva2OKMbH_!!1080040467.jpg",
            left: "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01yFnFoC1FJvZxtPOXZ_!!1080040467.jpg",
            top: "https://img.alicdn.com/imgextra/i4/1080040467/O1CN017LU4cW1FJva11TMep_!!1080040467.jpg",
            bottom: "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01GVKSBE1FJvZytJnwX_!!1080040467.jpg",
            front: "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01mkP49H1FJva6JgEWI_!!1080040467.jpg",
            back: "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01SyA4Lb1FJva37yLp0_!!1080040467.jpg",
          },
          hots: [
            {
              width: 20,//显示区域尺寸
              height: 20,
              animationTime: 1000,//整个动画时间
              name: "hot1",
              position: {
                x: 20,
                y: 6,
                z: -100,
              },
              rotation: {
                x: 0,
                y: 0,
                z: 0,
              },
              imgs: [
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01kbTi7q1FJvbYxQvfk_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01wRnPov1FJvbShYknv_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01C9HMuO1FJvbKbfTnr_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01F3MLkn1FJvbSz7rs6_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01kCsizV1FJvbT7pIm3_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01xc3pKZ1FJvbTwbJ8r_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01SIzGJR1FJvbVkpKCi_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01oziFtx1FJvbQUQuWH_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01GJ31jG1FJvbX2h65s_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01SmQihp1FJvbW6R3xQ_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01myfalX1FJvbKbe0LV_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01Tog8xb1FJvbQz65j8_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN015zybq21FJvbW6TH9O_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN019VDqb91FJvbPJbaCP_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01jHjNCI1FJvbQz3oMQ_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01HaQOQp1FJvbQz4DIP_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01kPgCCM1FJvbV34ciT_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01KE7M7e1FJvbYZ7guv_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01XnI0b41FJvbYZ69HF_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01LQiGzI1FJvbKbd8HT_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01X5LykS1FJvbYxQzrT_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01VCrvhF1FJvbQz4PnE_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01C2fpKr1FJvbSz7GUF_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01uyaCl61FJvbTl5jd8_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN014QPTkf1FJvbVkpOPK_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01eaG2SD1FJvbW6T8r7_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN011delXC1FJvbPJaF3u_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01sBklRX1FJvbV35E9v_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01y75HZD1FJvbPJamLL_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01XEmV3c1FJvbXgrzFd_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01DKOf0g1FJvbYZ79fz_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01C1CeZG1FJvbKbdCSP_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01K7elMs1FJvbW6SflY_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01wGqtGq1FJvbTwcW2P_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01FdV3Cl1FJvbTl8gZb_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01VBL4dI1FJvbT7qynS_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01LpF1nj1FJvbTwZy3r_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01hoMgp91FJvbSz7Sye_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01nnv1VT1FJvbSz7KfC_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01mXgKgN1FJvbQz69vz_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01t1a9DM1FJvbT7pEg1_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01oDLQWc1FJvbSz9gDz_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01ThYl2r1FJvbT7qe10_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01Csfbs11FJvbYxRnly_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01xMpJ5a1FJvbXgsj0t_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01aqYw5n1FJvbKbgDcQ_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01qx3voA1FJvbTl7XvP_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01P9PnMx1FJvbKbgp3C_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01WqSFvu1FJvbV35tlM_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01ObgBCo1FJvbPJaqXp_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN019CfOs71FJvbT7oEIy_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN019p02f51FJvbShbZX0_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN012ZnSdO1FJvbKbgLwv_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01jxcbOt1FJvbYxQraa_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01Uuhj7O1FJvbVksThO_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN018jN2Ry1FJvbVkswo7_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01maIhHj1FJvbVkpf6E_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01Ybm7Bz1FJvbShbyUs_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01dfpG4p1FJvbTl78y3_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01rPvxFk1FJvbQURJXa_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01sa9eyx1FJvbTl7oZf_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01GaNDTs1FJvbYZ6cSf_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01jfY4mw1FJvbShdJh2_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01Kx8Yho1FJvbShdeU6_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01FNPPXX1FJvbSz7COo_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01ZbMfoe1FJvbSz6nS9_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01XU0mfn1FJvbYZ6Pyp_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01FSiZ681FJvbQz5DlQ_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN010WS1IY1FJvbTl9pJB_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01NEKrKk1FJvbYZ6kmT_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01IpOlFv1FJvbKbdbTz_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN012fGTvO1FJvbShc2fy_!!1080040467.png"
              ],
            },
            {
              width: 20,//显示区域尺寸
              height: 20,
              animationTime: 1000,//整个动画时间
              name: "hot2",
              position: {
                x: -10,
                y: 6,
                z: -100,
              },
              rotation: {
                x: 0,
                y: 0,
                z: 0,
              },
              imgs: [
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01kbTi7q1FJvbYxQvfk_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01wRnPov1FJvbShYknv_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01C9HMuO1FJvbKbfTnr_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01F3MLkn1FJvbSz7rs6_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01kCsizV1FJvbT7pIm3_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01xc3pKZ1FJvbTwbJ8r_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01SIzGJR1FJvbVkpKCi_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01oziFtx1FJvbQUQuWH_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01GJ31jG1FJvbX2h65s_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01SmQihp1FJvbW6R3xQ_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01myfalX1FJvbKbe0LV_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01Tog8xb1FJvbQz65j8_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN015zybq21FJvbW6TH9O_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN019VDqb91FJvbPJbaCP_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01jHjNCI1FJvbQz3oMQ_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01HaQOQp1FJvbQz4DIP_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01kPgCCM1FJvbV34ciT_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01KE7M7e1FJvbYZ7guv_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01XnI0b41FJvbYZ69HF_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01LQiGzI1FJvbKbd8HT_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01X5LykS1FJvbYxQzrT_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01VCrvhF1FJvbQz4PnE_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01C2fpKr1FJvbSz7GUF_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01uyaCl61FJvbTl5jd8_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN014QPTkf1FJvbVkpOPK_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01eaG2SD1FJvbW6T8r7_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN011delXC1FJvbPJaF3u_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01sBklRX1FJvbV35E9v_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01y75HZD1FJvbPJamLL_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01XEmV3c1FJvbXgrzFd_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01DKOf0g1FJvbYZ79fz_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01C1CeZG1FJvbKbdCSP_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01K7elMs1FJvbW6SflY_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01wGqtGq1FJvbTwcW2P_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01FdV3Cl1FJvbTl8gZb_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01VBL4dI1FJvbT7qynS_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01LpF1nj1FJvbTwZy3r_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01hoMgp91FJvbSz7Sye_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01nnv1VT1FJvbSz7KfC_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01mXgKgN1FJvbQz69vz_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01t1a9DM1FJvbT7pEg1_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01oDLQWc1FJvbSz9gDz_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01ThYl2r1FJvbT7qe10_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01Csfbs11FJvbYxRnly_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01xMpJ5a1FJvbXgsj0t_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01aqYw5n1FJvbKbgDcQ_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01qx3voA1FJvbTl7XvP_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01P9PnMx1FJvbKbgp3C_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01WqSFvu1FJvbV35tlM_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01ObgBCo1FJvbPJaqXp_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN019CfOs71FJvbT7oEIy_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN019p02f51FJvbShbZX0_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN012ZnSdO1FJvbKbgLwv_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i2/1080040467/O1CN01jxcbOt1FJvbYxQraa_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01Uuhj7O1FJvbVksThO_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN018jN2Ry1FJvbVkswo7_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01maIhHj1FJvbVkpf6E_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01Ybm7Bz1FJvbShbyUs_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01dfpG4p1FJvbTl78y3_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01rPvxFk1FJvbQURJXa_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01sa9eyx1FJvbTl7oZf_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01GaNDTs1FJvbYZ6cSf_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01jfY4mw1FJvbShdJh2_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01Kx8Yho1FJvbShdeU6_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN01FNPPXX1FJvbSz7COo_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01ZbMfoe1FJvbSz6nS9_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01XU0mfn1FJvbYZ6Pyp_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01FSiZ681FJvbQz5DlQ_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN010WS1IY1FJvbTl9pJB_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i4/1080040467/O1CN01NEKrKk1FJvbYZ6kmT_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i3/1080040467/O1CN01IpOlFv1FJvbKbdbTz_!!1080040467.png",
                "https://img.alicdn.com/imgextra/i1/1080040467/O1CN012fGTvO1FJvbShc2fy_!!1080040467.png"
              ],
            }
          ],
        },
      },
      onLoad() {
      },
      onRef(game) {
        this.gameComponent = game;
      },
      onEvent(item) {
        // item:点击到的热点名称,是个数组,可能存在多个
        // 事件回调
        console.log("===", item);
        // my.alert({ content: `点击了热点:${item.join(",")}` })
        if (item.includes("hot1")) {
          // 跳转到指定位置
          this.gameComponent.toPos({ x: 100 });
        } else {
          this.gameComponent.toPos({ x: 0 });
        }
      },
    
      changeRender() {
        this.setData({
          render: this.data.render == "render1" ? "render2" : "render1"
        })
      }
    });
    
    
    • xaml
      <view style="width: 100vw;height: 100vh;top:0vh;left: 0vw;position:absolute;background:#ccc;" a:if="{{render=='render1'}}">
      <gm-vr gameSource="{{gameSource}}" onRef="onRef" onEvent="onEvent" />
      </view>
      <view style="width: 100vw;height: 100vh;top:0vh;left: 0vw;position:absolute;background:#ccc;" a:if="{{render=='render2'}}">
        <gm-vr gameSource="{{gameSource2}}" onRef="onRef" onEvent="onEvent" />
      </view>
    
      <view onTap="changeRender" style="position:fixed;left:0;bottom:0;">切换场景</view>
    

    Keywords

    none

    Install

    npm i gm-vr

    DownloadsWeekly Downloads

    2

    Version

    0.0.3

    License

    ISC

    Unpacked Size

    3.13 MB

    Total Files

    79

    Last publish

    Collaborators

    • singlekai