File: //home/www/aritmodecarnaval/wp-content/plugins/photo-gallery/js/3DEngine/3DEngine.min.js
var DisplayObject3D=function(){return this};DisplayObject3D.prototype._x=0,DisplayObject3D.prototype._y=0,DisplayObject3D.prototype.make3DPoint=function(t,e,n){var o={};return o.x=t,o.y=e,o.z=n,o},DisplayObject3D.prototype.make2DPoint=function(t,e,n,o){var a={};return a.x=t,a.y=e,a.depth=n,a.scaleFactor=o,a},DisplayObject3D.prototype.container=void 0,DisplayObject3D.prototype.pointsArray=[],DisplayObject3D.prototype.init=function(t){if(this.container=t,this.containerId=this.container.attr("id"),0===t.has("ul").length)for(i=0;i<this.pointsArray.length;i++)this.container.append('<b id="tags_cloud_item'+i+'">+</b>')};var Camera3D=function(){};Camera3D.prototype.x=0,Camera3D.prototype.y=0,Camera3D.prototype.z=500,Camera3D.prototype.focalLength=1e3,Camera3D.prototype.scaleRatio=function(t){return this.focalLength/(this.focalLength+t.z-this.z)},Camera3D.prototype.init=function(t,e,n,o){this.x=t,this.y=e,this.z=n,this.focalLength=o};var Object3D=function(t){this.container=t};Object3D.prototype.objects=[],Object3D.prototype.addChild=function(t){return this.objects.push(t),t.init(this.container),t};var Scene3D=function(){};Scene3D.prototype.sceneItems=[],Scene3D.prototype.addToScene=function(t){this.sceneItems.push(t)},Scene3D.prototype.Transform3DPointsTo2DPoints=function(t,e,n){for(var o,a,i,r,s,c,p,h,y,l=[],D=Math.sin(e.x),u=Math.cos(e.x),m=Math.sin(e.y),d=Math.cos(e.y),f=Math.sin(e.z),g=Math.cos(e.z),j=t.length;j--;){o=t[j].x,p=d*(s=D*(a=t[j].y)+u*(i=t[j].z))-m*o,h=f*(c=m*s+d*o)+g*(r=u*a-D*i),o=(g*c-f*r)*(y=n.focalLength/(n.focalLength+p)),a=h*y,i=p;var b=new DisplayObject3D;l[j]=b.make2DPoint(o,a,-i,y)}return l},Scene3D.prototype.renderCamera=function(t){for(var e=0;e<this.sceneItems.length;e++){var n=this.sceneItems[e].objects[0],o=this.Transform3DPointsTo2DPoints(n.pointsArray,axisRotation,t),a=0<document.getElementById(n.containerId).getElementsByTagName("ul").length;for(k=0;k<n.pointsArray.length;k++){var i=null;(i=a?document.getElementById(n.containerId).getElementsByTagName("ul")[0].getElementsByTagName("li")[k]:document.getElementById(n.containerId).getElementsByTagName("*")[k])&&(i._x=o[k].x,i._y=o[k].y,i.scale=o[k].scaleFactor,i.style.position="absolute",i.style.top=i._y+.4*jQuery("#"+n.containerId).height()+"px",i.style.left=i._x+.4*jQuery("#"+n.containerId).width()+"px",i.style.fontSize=100*i.scale+"%",jQuery(i).css({opacity:i.scale-.5}),curChild=jQuery(i).find("#imgg"),curChild&&(jQuery(i).css("zIndex",Math.round(100*i.scale)),curChild.css({maxWidth:50*i.scale}),curChild.css({maxHeight:50*i.scale})))}}};var axisRotation=(new DisplayObject3D).make3DPoint(0,0,0),Sphere=function(t,e,n){for(var o=e;0<o;o--)for(var a=n/e;0<a;a--){var i=a*Math.PI/(n/e+1),r=o*Math.PI*2/e,s=Math.sin(r)*Math.sin(i)*t,c=Math.cos(r)*Math.sin(i)*t,p=Math.cos(i)*t;this.pointsArray.push(this.make3DPoint(s,c,p))}};Sphere.prototype=new DisplayObject3D;