Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Boardroom.show = function(cb){
startDate = new Date();
lastTime = Date.now();
$("#boardroom").css({"visibility": "visible"});
for(var i = 0; i< 20; i++){
locationAreaColors[i] = pushercolor('#00eeee').blend('#ffcc00', i/20).hex6();
}
//animate();
// render the other elements intro animations
$(".footer-bar").delay(1000).animate({"margin-top": "0"}, 500);
$("#globe-footer img").delay(1500).animate({"opacity": "1"}, 1000);
$("#globalization").delay(600).animate({
top: "0px",
left: "0px",
width: "180px"
}, 500);
side: THREE.DoubleSide
});
var triangles = this.tiles.length * 4;
var geometry = new THREE.BufferGeometry();
geometry.addAttribute( 'index', Uint16Array, triangles * 3, 1 );
geometry.addAttribute( 'position', Float32Array, triangles * 3, 3 );
geometry.addAttribute( 'normal', Float32Array, triangles * 3, 3 );
geometry.addAttribute( 'color', Float32Array, triangles * 3, 3 );
geometry.addAttribute( 'lng', Float32Array, triangles * 3, 1 );
var lng_values = geometry.attributes.lng.array;
var baseColorSet = pusherColor(this.baseColor).hueSet();
var myColors = [];
for(var i = 0; i< baseColorSet.length; i++){
myColors.push(baseColorSet[i].shade(Math.random()/3.0));
}
// break geometry into
// chunks of 21,845 triangles (3 unique vertices per triangle)
// for indices to fit into 16 bit integer number
// floor(2^16 / 3) = 21845
var chunkSize = 21845;
var indices = geometry.attributes.index.array;
for ( var i = 0; i < indices.length; i ++ ) {
for(var i = 0; i< this.boxWidth * this.boxDepth; i++){
var x = i % this.boxWidth - this.boxWidth/2;
var z = (Math.floor(i / this.boxDepth) -this.boxDepth/2 );
var vertex = new THREE.Vector3();
vertex.x = x;
vertex.y = (this.boxHeight)*Math.sin(x/8)*Math.cos(z/8) * (((this.boxDepth/2)-Math.abs(x))/this.boxWidth/2) * ((this.boxDepth/2-Math.abs(z))/this.boxDepth/2);
vertex.z = z;
this.particleGeometry.vertices.push( vertex );
this.shaderAttributes.color.value[i] = new THREE.Color(0x00eeee);
this.shaderAttributes.opacity.value[i] = 0.0;
}
this.particleColors = [];
for(var i = 0; i< 5; i++){
this.particleColors.push(new THREE.Color(pushercolor("#00eeee").blend("#ffcc00", i/4).hex6()));
}
var particleSystem = new THREE.ParticleSystem( this.particleGeometry, this.shaderMaterial);
this.scene.add( particleSystem);
this.frameGeometry = new THREE.Geometry();
var frameMaterial = new THREE.LineBasicMaterial({
color: 0xFFFFFF,
opacity: .5,
transparent: true
});
var maxTime = 2000;
this.frameSegments = [];