Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(() => {
  2.     var v = document.getElementById("stream");
  3.    
  4.     var full = false;
  5.     _360.config({
  6.         context: $("#view")[0],
  7.         video: v,
  8.         animation: true, //tweenjs
  9.         fps: 30,
  10.         main: $("#main")[0],
  11.         usingMipmaps: false, // пока не рекомендую это включать
  12.         data: [{
  13.             "color": "#000000",
  14.             "isActive": true,
  15.             "uuid": "9ce825e4-b6bc-4687-cd78-d69e949580c6",
  16.             "object": "plane",
  17.             "image": true,
  18.             "imagePath": "./mts.jpg",
  19.             "px": -27,
  20.             "py": -51,
  21.             "pz": -29,
  22.             "rx": 91,
  23.             "ry": 177,
  24.             "rz": -136,
  25.             "scale": -0.28,
  26.             "width": 100,
  27.             "height": 36
  28.         }]
  29.      
  30.        
  31.     }).ready(function () {
  32.         v.play(); // запустим видос, см. html5 video api
  33.         _360.start(); // начнём рендерить картинку
  34.         setTimeout(function () { _360.showEnabled(); }, 6000); // покажем АКТИВНЫЕ банеры через 6 сек.
  35.         v.muted = true;  // выключим звук
  36.     });
  37.  
  38.     $("#fullscreen").click(function () { full = !full; _360.fullscreen(full); })
  39.     _360.onclick(function (uuid) {
  40.         alert(uuid);
  41.     });
  42.     _360.ondata(function (data) {
  43.         alert("added/removed/changed \n" + JSON.stringify(data, null, 2));
  44.     });
  45. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement