Best Python code snippet using selene_python
mep-feature-backlight.js
Source: mep-feature-backlight.js
1(function($) {2 $.extend(mejs.MepDefaults, {3 backlightBackground: [0,0,0],4 backlightHorizontalLights: 5,5 backlightVerticalLights: 5,6 backlightSize: 50,7 backlightTimeout: 2008 });9 $.extend(MediaElementPlayer.prototype, {10 buildbacklight : function(player, controls, layers, media) {11 if (!player.isVideo)12 return;13 /โ/โhttp:/โ/โwww.splashnology.com/โblog/โhtml5/โ382.html14 var 15 mediaContainer = player.container.find('.mejs-mediaelement').parent(),16 border = $('<div class="mejs-border"></โdiv>')17 .prependTo(mediaContainer)18 .css('position','absolute')19 .css('top','-10px')20 .css('left','-10px')21 .css('border','solid 10px #010101')22 .width(player.width).height(player.height),23 glowBase = $('<div class="mejs-backlight-glow"></โdiv>')24 .prependTo(mediaContainer)25 .css('position','absolute')26 .css('display','none')27 .css('top',0)28 .css('left',0)29 .width(player.width).height(player.height),30 base = $('<div class="mejs-backlight"></โdiv>')31 .prependTo(mediaContainer)32 .css('position','absolute')33 .css('top',0)34 .css('left',0)35 .width(player.width).height(player.height),36 i,37 copyCanvas = document.createElement('canvas'),38 copyContext = copyCanvas.getContext('2d'),39 pixels,40 keepUpdating = true,41 isActive = true,42 timer = null,43 glowCanvas = document.createElement('canvas'),44 glowContext = glowCanvas.getContext('2d'),45 size = player.options.backlightSize,46 backgroundColor = player.options.backlightBackground,47 gradient,48 width = player.width,49 height = player.height;50 /โ/โ set sizes51 copyCanvas.width = width;52 copyCanvas.height = height;53 glowCanvas.width = width + size + size;54 glowCanvas.height = height + size + size;55 /โ/โ draw glow overlay56 /โ/โ top57 gradient = addGlow(backgroundColor,glowContext.createLinearGradient(size, size, size, 0));58 glowContext.fillStyle = gradient; 59 glowContext.fillRect(size, size, width, -size); 60 /โ/โ tr61 gradient = addGlow(backgroundColor,glowContext.createRadialGradient(width+size, size, 0, width+size, size, size));62 glowContext.fillStyle = gradient; 63 glowContext.fillRect(width+size, size, size, -size); 64 /โ/โ right65 gradient = addGlow(backgroundColor,glowContext.createLinearGradient(width+size, size, width+size+size, size));66 glowContext.fillStyle = gradient; 67 glowContext.fillRect(width+size, size, size, height); 68 /โ/โ br69 gradient = addGlow(backgroundColor,glowContext.createRadialGradient(width+size, height+size, 0, width+size, height+size, size));70 glowContext.fillStyle = gradient; 71 glowContext.fillRect(width+size, height+size, size, size); 72 /โ/โ bottom73 var gradient = addGlow(backgroundColor,glowContext.createLinearGradient(size, size+height, size, size+height+size));74 glowContext.fillStyle = gradient; 75 glowContext.fillRect(size, size+height, width, size); 76 /โ/โ bl77 gradient = addGlow(backgroundColor,glowContext.createRadialGradient(size, height+size, 0, size, height+size, size));78 glowContext.fillStyle = gradient; 79 glowContext.fillRect(0, height+size, size, size); 80 /โ/โ left81 gradient = addGlow(backgroundColor,glowContext.createLinearGradient(size, size, 0, size));82 glowContext.fillStyle = gradient; 83 glowContext.fillRect(size, size, -size, height); 84 /โ/โ tl85 gradient = addGlow(backgroundColor,glowContext.createRadialGradient(size, size, 0, size, size, size));86 glowContext.fillStyle = gradient; 87 glowContext.fillRect(0, 0, size, size); 88 $(glowCanvas)89 .css('position','absolute')90 .css('top',-size)91 .css('left',-size)92 .appendTo(glowBase);93 /โ/โ add toggle control94 $('<div class="mejs-backlight-button mejs-backlight-active"><span></โspan></โdiv>')95 .appendTo(controls)96 .click(function() {97 if (isActive) {98 delete timer;99 timer = null;100 base.hide();101 glowBase.hide();102 $(this)103 .removeClass('mejs-backlight-active')104 .addClass('mejs-backlight-inactive')105 } else {106 updateLights();107 base.show();108 glowBase.show();109 $(this)110 .removeClass('mejs-backlight-inactive')111 .addClass('mejs-backlight-active')112 }113 isActive = !isActive;114 });115 /โ/โ http:/โ/โwww.splashnology.com/โblog/โhtml5/โ382.html116 function updateLights() {117 /โ/โ get a copy of video118 copyContext.drawImage(media, 0, 0, media.width, media.height);119 /โ/โ create the gradient lights120 addLights(base, copyCanvas, copyContext, 121 player.options.backlightVerticalLights, 122 player.options.backlightHorizontalLights, 123 player.options.backlightSize, 124 30);125 if (keepUpdating && isActive) {126 timer = setTimeout(updateLights, player.options.backlightTimeout);127 }128 }129 /โ/โsetTimeout(updateLights, timeOut);130 media.addEventListener('play',function() {131 if (isActive) {132 keepUpdating = true;133 updateLights();134 glowBase.css('display','');135 }136 }, false);137 media.addEventListener('pause',function() {138 keepUpdating = false;139 }, false);140 media.addEventListener('ended',function() {141 keepUpdating = false;142 }, false);143 }144 });145 function addLights(base, canvas, context, vBlocks, hBlocks, size, depth) {146 base.empty();147 var 148 lightsCanvas = document.createElement('canvas'),149 lightsContext = lightsCanvas.getContext('2d'),150 width = canvas.width,151 height = canvas.height,152 g,153 topLights = getMidColors(canvas, context, hBlocks, depth, 'top'),154 bottomLights = getMidColors(canvas, context, hBlocks, depth, 'bottom'),155 leftLights = getMidColors(canvas, context, vBlocks, depth, 'left'),156 rightLights = getMidColors(canvas, context, vBlocks, depth, 'right'),157 corners = [],158 stopSize = 0;159 lightsCanvas.width = width + size + size;160 lightsCanvas.height = height + size + size;161 lightsContext.globalCompositeOperation = 'xor'; /โ/โ'darker'; /โ/โ'lighter';162 /โ/โ draw four gradients163 /โ/โ create corners164 corners.push(averageColor(topLights[topLights.length-1], rightLights[0]) );165 corners.push(averageColor(bottomLights[bottomLights.length-1], rightLights[rightLights.length-1]) );166 corners.push(averageColor(bottomLights[0], leftLights[leftLights.length-1]) );167 corners.push(averageColor(topLights[0], leftLights[0]) );168 /โ/โ top169 stopSize = 1 /โ topLights.length;170 gradient = context.createLinearGradient(size, size, width+size, size);171 gradient.addColorStop(0, 'rgb(' + adjustColor(corners[3]).join(',') + ')');172 for (var i = 0, il = topLights.length; i < il; i++) {173 gradient.addColorStop(i * stopSize + stopSize/โ2, 'rgb(' + adjustColor(topLights[i]).join(',') + ')');174 }175 gradient.addColorStop(1.0, 'rgb(' + adjustColor(corners[0]).join(',') + ')');176 lightsContext.fillStyle = gradient;177 lightsContext.fillRect(size, 0, width, size);178 /โ/โ right179 gradient = context.createLinearGradient(size+width, size, size+width, size+height);180 gradient.addColorStop(0, 'rgb(' + adjustColor(corners[0]).join(',') + ')');181 for (var i = 0, il = rightLights.length; i < il; i++) {182 gradient.addColorStop(i * stopSize + stopSize/โ2, 'rgb(' + adjustColor(rightLights[i]).join(',') + ')');183 }184 gradient.addColorStop(1.0, 'rgb(' + adjustColor(corners[1]).join(',') + ')');185 lightsContext.fillStyle = gradient;186 lightsContext.fillRect(size+width, size, size+width+size, height);187 /โ/โ bottom188 gradient = context.createLinearGradient(size, size+height, size+width, size+height);189 gradient.addColorStop(0, 'rgb(' + adjustColor(corners[2]).join(',') + ')');190 for (var i = 0, il = bottomLights.length; i < il; i++) {191 gradient.addColorStop(i * stopSize + stopSize/โ2, 'rgb(' + adjustColor(bottomLights[i]).join(',') + ')');192 }193 gradient.addColorStop(1.0, 'rgb(' + adjustColor(corners[1]).join(',') + ')');194 lightsContext.fillStyle = gradient;195 lightsContext.fillRect(size, size+height, width, size);196 /โ/โ left197 gradient = context.createLinearGradient(size, size, size, size+height);198 gradient.addColorStop(0, 'rgb(' + adjustColor(corners[3]).join(',') + ')');199 for (var i = 0, il = leftLights.length; i < il; i++) {200 gradient.addColorStop(i * stopSize + stopSize/โ2, 'rgb(' + adjustColor(leftLights[i]).join(',') + ')');201 }202 gradient.addColorStop(1.0, 'rgb(' + adjustColor(corners[2]).join(',') + ')');203 lightsContext.fillStyle = gradient;204 lightsContext.fillRect(0, size, size, height);205 /โ/โ corners206 /โ/โ top right207 lightsContext.fillStyle = 'rgb(' + adjustColor(corners[0]).join(',') + ')';208 lightsContext.fillRect(width+size, 0, size+width+size, size);209 /โ/โ bottom right210 lightsContext.fillStyle = 'rgb(' + adjustColor(corners[1]).join(',') + ')';211 lightsContext.fillRect(width+size, size+height, size+width+size, size+height+size);212 /โ/โ bottom left213 lightsContext.fillStyle = 'rgb(' + adjustColor(corners[2]).join(',') + ')';214 lightsContext.fillRect(0, size+height, size, size+height+size);215 /โ/โ top left216 lightsContext.fillStyle = 'rgb(' + adjustColor(corners[3]).join(',') + ')';217 lightsContext.fillRect(0, 0, size, size);218 $(lightsCanvas)219 .css('position','absolute')220 .css('top',-size)221 .css('left',-size)222 .appendTo(base);223 }224 function addGlow(color, g) {225 g.addColorStop(0.0, 'rgba(' + color.join(',') + ',0)');226 g.addColorStop(1.0, 'rgba(' + color.join(',') + ',1)');227 return g;228 }229 function getMidColors(canvas, context, blocks, blockDepth, side) {230 var width = canvas.width,231 height = canvas.height,232 blockHeight = (side == 'top' || side == 'bottom') ? blockDepth : Math.ceil(height /โ blocks), /โ/โ height of the analyzed block233 blockWidth = (side == 'top' || side == 'bottom') ? Math.ceil(width /โ blocks) : blockDepth,234 result = [],235 imgdata,236 i;237 if (side == 'top' || side == 'bottom') {238 for (i = 0; i < blocks; i++) {239 try {240 imgdata = context.getImageData(i*blockWidth, (side == 'top') ? 0 : height - blockHeight , blockWidth, blockHeight);241 result.push( 242 calcMidColor(imgdata.data)243 );244 } catch (e) {245 console.log(e);246 }247 }248 } else {249 for (i = 0; i < blocks; i++) {250 try {251 imgdata = context.getImageData( (side == 'right') ? width - blockWidth : 0, i*blockHeight, blockWidth, blockHeight);252 result.push( 253 calcMidColor(imgdata.data)254 );255 } catch (e) {256 console.log(e);257 }258 }259 }260 return result;261 }262 function averageColor(c1,c2) {263 var result = 264 [(c1[0] + c2[0]) /โ 2, 265 (c1[1] + c2[1]) /โ 2, 266 (c1[2] + c2[2]) /โ 2];267 268 return result;269 }270 /โ/โ average color for a block271 function calcMidColorVertical(data, from, to) {272 var result = [0, 0, 0];273 var totalPixels = (to - from) /โ 4;274 for (var i = from; i <= to; i += 4) {275 result[0] += data[i];276 result[1] += data[i + 1];277 result[2] += data[i + 2];278 }279 result[0] = Math.round(result[0] /โ totalPixels);280 result[1] = Math.round(result[1] /โ totalPixels);281 result[2] = Math.round(result[2] /โ totalPixels);282 return result;283 }284 /โ/โ average color for a block285 function calcMidColor(data) {286 var result = [0, 0, 0];287 var totalPixels = data.length;288 for (var i = 0; i < totalPixels; i += 4) {289 result[0] += data[i];290 result[1] += data[i + 1];291 result[2] += data[i + 2];292 }293 result[0] = Math.round(result[0] /โ totalPixels);294 result[1] = Math.round(result[1] /โ totalPixels);295 result[2] = Math.round(result[2] /โ totalPixels);296 return result;297 }298 function adjustColor(color) {299 /โ/โif (color[0] <= 2 && color[2] <= 2 && color[3] <= 2)300 /โ/โ return color;301 color = rgb2hsv(color);302 color[1] = Math.min(100, color[1] * 1.2); /โ/โ1.4); /โ/โ saturation303 color[2] = 80; /โ/โMath.min(100, color[2] * 2.7); /โ/โ2.7); /โ/โ brightness304 return hsv2rgb(color);305 }306 function rgb2hsv(color) {307 var r = color[0] /โ 255,308 g = color[1] /โ 255,309 b = color[2] /โ 255,310 x, val, d1, d2, hue, sat, val;311 x = Math.min(Math.min(r, g), b);312 val = Math.max(Math.max(r, g), b);313 /โ/โif (x == val)314 /โ/โ throw Error('h is undefined');315 d1 = (r == x) ? g-b : ((g == x) ? b-r : r-g);316 d2 = (r == x) ? 3 : ((g == x) ? 5 : 1);317 hue = Math.floor((d2 - d1 /โ (val - x)) * 60) % 360;318 sat = Math.floor(((val - x) /โ val) * 100);319 val = Math.floor(val * 100);320 return [hue, sat, val];321 }322 /โ**323 * Convers HSV color to RGB model324 * @param {Number[]} RGB color325 * @return {Number[]} HSV color326 */โ327 function hsv2rgb(color) {328 var h = color[0],329 s = color[1],330 v = color[2];331 var r, g, a, b, c, s = s /โ 100, v = v /โ 100, h = h /โ 360;332 if (s > 0) {333 if (h >= 1) h=0;334 h = 6 * h;335 var f = h - Math.floor(h);336 a = Math.round(255 * v * (1 - s));337 b = Math.round(255 * v * (1 - (s * f)));338 c = Math.round(255 * v * (1 - (s * (1 - f))));339 v = Math.round(255 * v);340 switch (Math.floor(h)) {341 case 0: r = v; g = c; b = a; break;342 case 1: r = b; g = v; b = a; break;343 case 2: r = a; g = v; b = c; break;344 case 3: r = a; g = b; b = v; break;345 case 4: r = c; g = a; b = v; break;346 case 5: r = v; g = a; b = b; break;347 }348 return [r || 0, g || 0, b || 0];349 } else {350 v = Math.round(v * 255);351 return [v, v, v];352 }353 }...
MarkSize.js
Source: MarkSize.js
1"use strict;"2function MarkSize( main , TargetObj ){3 var Box = new THREE.Box3();4 var objCenter = new THREE.Vector3();5 var objSize = new THREE.Vector3();6 var FuniBox = new THREE.Box3();7 var FuniCenter = new THREE.Vector3();8 var group = new THREE.Group();9 main.scene.add(group);10 /โ/โdetect the funiture component11 for(var i = main.furnitures.length - 1; i > -1; i -- ){ 12 var object = main.furnitures[i].getFurniture();13 14 if(object.isObject3D){15 group.add(object.clone());16 }17 }18 for(var i = main.Sceneobjects.length - 1; i > -1; i -- ){19 var object = main.Sceneobjects[i];20 group.add(object.clone());21 }22 /โ/โset funiture bounding box , box center23 FuniBox.setFromObject( group );24 FuniBox.getCenter( FuniCenter );25 main.scene.remove( group );26 /โ/โget object center27 Box.setFromObject(TargetObj);28 Box.getCenter(objCenter);29 Box.getSize(objSize);30 /โ/โ face to the user31 if( objCenter.z >= FuniCenter.z ){32 /โ/โshow size number33 loadText( main , 34 objSize.x ,35 new THREE.Vector3(objCenter.x ,36 objCenter.y - objSize.y/โ2 ,37 objCenter.z + objSize.z/โ2 + 1), 38 0 );39 /โ/โshow line40 loadLine( main , 41 new THREE.Vector3(objCenter.x - objSize.x/โ2 ,42 objCenter.y - objSize.y/โ2 ,43 objCenter.z + objSize.z/โ2 + 1) , 44 new THREE.Vector3(objCenter.x + objSize.x/โ2 ,45 objCenter.y - objSize.y/โ2 ,46 objCenter.z + objSize.z/โ2 + 1) );47 loadLine( main , 48 new THREE.Vector3(objCenter.x - objSize.x/โ2 ,49 objCenter.y - objSize.y/โ2 ,50 objCenter.z + objSize.z/โ2 + 0.5) , 51 new THREE.Vector3(objCenter.x - objSize.x/โ2 ,52 objCenter.y - objSize.y/โ2 ,53 objCenter.z + objSize.z/โ2 + 1.5) );54 loadLine( main , 55 new THREE.Vector3(objCenter.x + objSize.x/โ2 ,56 objCenter.y - objSize.y/โ2 ,57 objCenter.z + objSize.z/โ2 + 0.5) , 58 new THREE.Vector3(objCenter.x + objSize.x/โ2 ,59 objCenter.y - objSize.y/โ2 ,60 objCenter.z + objSize.z/โ2 + 1.5) );61 /โ/โright to the user62 if ( objCenter.x > FuniCenter.x ){63 /โ/โshow high64 loadText( main , 65 objSize.y ,66 new THREE.Vector3(objCenter.x + objSize.x/โ2 +1,67 objCenter.y ,68 objCenter.z + objSize.z/โ2 +1, ), 69 45 );70 /โ/โshow line71 loadLine( main , 72 new THREE.Vector3(objCenter.x + objSize.x/โ2 +1,73 objCenter.y - objSize.y/โ2 ,74 objCenter.z + objSize.z/โ2 +1) , 75 new THREE.Vector3(objCenter.x + objSize.x/โ2 +1,76 objCenter.y + objSize.y/โ2 ,77 objCenter.z + objSize.z/โ2 +1) );78 /โ/โshow line79 loadLine( main , 80 new THREE.Vector3(objCenter.x + objSize.x/โ2 +0.5,81 objCenter.y - objSize.y/โ2 ,82 objCenter.z + objSize.z/โ2 +0.5) , 83 new THREE.Vector3(objCenter.x + objSize.x/โ2 +1.5,84 objCenter.y - objSize.y/โ2 ,85 objCenter.z + objSize.z/โ2 +1.5) );86 /โ/โshow line87 loadLine( main , 88 new THREE.Vector3(objCenter.x + objSize.x/โ2 +0.5,89 objCenter.y + objSize.y/โ2 ,90 objCenter.z + objSize.z/โ2 +0.5) , 91 new THREE.Vector3(objCenter.x + objSize.x/โ2 +1.5,92 objCenter.y + objSize.y/โ2 ,93 objCenter.z + objSize.z/โ2 +1.5) );94 }95 else{/โ/โleft to the user96 /โ/โshow high97 loadText( main , 98 objSize.y ,99 new THREE.Vector3(objCenter.x - objSize.x/โ2 -1,100 objCenter.y ,101 objCenter.z + objSize.z/โ2 +1, ), 102 -45 );103 /โ/โshow line104 loadLine( main , 105 new THREE.Vector3(objCenter.x - objSize.x/โ2 -1,106 objCenter.y - objSize.y/โ2 ,107 objCenter.z + objSize.z/โ2 +1) , 108 new THREE.Vector3(objCenter.x - objSize.x/โ2 -1,109 objCenter.y + objSize.y/โ2 ,110 objCenter.z + objSize.z/โ2 +1) );111 loadLine( main , 112 new THREE.Vector3(objCenter.x - objSize.x/โ2 -0.5,113 objCenter.y - objSize.y/โ2 ,114 objCenter.z + objSize.z/โ2 +0.5) , 115 new THREE.Vector3(objCenter.x - objSize.x/โ2 -1.5,116 objCenter.y - objSize.y/โ2 ,117 objCenter.z + objSize.z/โ2 +1.5) );118 loadLine( main , 119 new THREE.Vector3(objCenter.x - objSize.x/โ2 -0.5,120 objCenter.y + objSize.y/โ2 ,121 objCenter.z + objSize.z/โ2 +0.5) , 122 new THREE.Vector3(objCenter.x - objSize.x/โ2 -1.5,123 objCenter.y + objSize.y/โ2 ,124 objCenter.z + objSize.z/โ2 +1.5) );125 }126 }127 else{/โ/โ back to the user128 /โ/โshow size number129 loadText( main , 130 objSize.x ,131 new THREE.Vector3(objCenter.x ,132 objCenter.y - objSize.y/โ2 ,133 objCenter.z - objSize.z/โ2 - 1), 134 180 );135 /โ/โshow line136 loadLine( main , 137 new THREE.Vector3(objCenter.x - objSize.x/โ2,138 objCenter.y - objSize.y/โ2 ,139 objCenter.z - objSize.z/โ2 - 1) , 140 new THREE.Vector3(objCenter.x + objSize.x/โ2,141 objCenter.y - objSize.y/โ2 ,142 objCenter.z - objSize.z/โ2 - 1) );143 loadLine( main , 144 new THREE.Vector3(objCenter.x - objSize.x/โ2,145 objCenter.y - objSize.y/โ2 ,146 objCenter.z - objSize.z/โ2 - 0.5) , 147 new THREE.Vector3(objCenter.x - objSize.x/โ2,148 objCenter.y - objSize.y/โ2 ,149 objCenter.z - objSize.z/โ2 - 1.5) );150 loadLine( main , 151 new THREE.Vector3(objCenter.x + objSize.x/โ2,152 objCenter.y - objSize.y/โ2 ,153 objCenter.z - objSize.z/โ2 - 0.5) , 154 new THREE.Vector3(objCenter.x + objSize.x/โ2,155 objCenter.y - objSize.y/โ2 ,156 objCenter.z - objSize.z/โ2 - 1.5) );157 /โ/โright to the user158 if ( objCenter.x > FuniCenter.x ){159 /โ/โshow high160 loadText( main , 161 objSize.y ,162 new THREE.Vector3(objCenter.x + objSize.x/โ2 +1,163 objCenter.y ,164 objCenter.z - objSize.z/โ2 -1 ), 165 135 );166 /โ/โshow line167 loadLine( main , 168 new THREE.Vector3(objCenter.x + objSize.x/โ2 +1,169 objCenter.y - objSize.y/โ2 ,170 objCenter.z - objSize.z/โ2 -1) , 171 new THREE.Vector3(objCenter.x + objSize.x/โ2 +1,172 objCenter.y + objSize.y/โ2 ,173 objCenter.z - objSize.z/โ2 -1) );174 loadLine( main , 175 new THREE.Vector3(objCenter.x + objSize.x/โ2 +0.5,176 objCenter.y - objSize.y/โ2 ,177 objCenter.z - objSize.z/โ2 -0.5) , 178 new THREE.Vector3(objCenter.x + objSize.x/โ2 +1.5,179 objCenter.y - objSize.y/โ2 ,180 objCenter.z - objSize.z/โ2 -1.5) );181 loadLine( main , 182 new THREE.Vector3(objCenter.x + objSize.x/โ2 +0.5,183 objCenter.y + objSize.y/โ2 ,184 objCenter.z - objSize.z/โ2 -0.5) , 185 new THREE.Vector3(objCenter.x + objSize.x/โ2 +1.5,186 objCenter.y + objSize.y/โ2 ,187 objCenter.z - objSize.z/โ2 -1.5) );188 }189 else{/โ/โleft to the user190 /โ/โshow high191 loadText( main , 192 objSize.y ,193 new THREE.Vector3(objCenter.x - objSize.x/โ2 -1,194 objCenter.y ,195 objCenter.z - objSize.z/โ2 -1, ), 196 225 );197 /โ/โshow line198 loadLine( main , 199 new THREE.Vector3(objCenter.x - objSize.x/โ2 -1,200 objCenter.y - objSize.y/โ2 ,201 objCenter.z - objSize.z/โ2 -1) , 202 new THREE.Vector3(objCenter.x - objSize.x/โ2 -1,203 objCenter.y + objSize.y/โ2 ,204 objCenter.z - objSize.z/โ2 -1) );205 loadLine( main , 206 new THREE.Vector3(objCenter.x - objSize.x/โ2 -0.5,207 objCenter.y - objSize.y/โ2 ,208 objCenter.z - objSize.z/โ2 -0.5) , 209 new THREE.Vector3(objCenter.x - objSize.x/โ2 -1.5,210 objCenter.y - objSize.y/โ2 ,211 objCenter.z - objSize.z/โ2 -1.5) );212 loadLine( main , 213 new THREE.Vector3(objCenter.x - objSize.x/โ2 -0.5,214 objCenter.y + objSize.y/โ2 ,215 objCenter.z - objSize.z/โ2 -0.5) , 216 new THREE.Vector3(objCenter.x - objSize.x/โ2 -1.5,217 objCenter.y + objSize.y/โ2 ,218 objCenter.z - objSize.z/โ2 -1.5) );219 }220 }221 /โ/โright to the user222 if ( objCenter.x > FuniCenter.x ){223 /โ/โshow size number224 loadText( main , 225 objSize.z ,226 new THREE.Vector3(objCenter.x + objSize.x/โ2 +1,227 objCenter.y - objSize.y/โ2 ,228 objCenter.z ), 229 90 );230 /โ/โshow line231 loadLine( main , 232 new THREE.Vector3(objCenter.x + objSize.x/โ2 +1,233 objCenter.y - objSize.y/โ2 ,234 objCenter.z - objSize.z/โ2) , 235 new THREE.Vector3(objCenter.x + objSize.x/โ2 +1,236 objCenter.y - objSize.y/โ2 ,237 objCenter.z + objSize.z/โ2) );238 loadLine( main , 239 new THREE.Vector3(objCenter.x + objSize.x/โ2 +0.5,240 objCenter.y - objSize.y/โ2 ,241 objCenter.z - objSize.z/โ2) , 242 new THREE.Vector3(objCenter.x + objSize.x/โ2 +1.5,243 objCenter.y - objSize.y/โ2 ,244 objCenter.z - objSize.z/โ2) );245 loadLine( main , 246 new THREE.Vector3(objCenter.x + objSize.x/โ2 +0.5,247 objCenter.y - objSize.y/โ2 ,248 objCenter.z + objSize.z/โ2) , 249 new THREE.Vector3(objCenter.x + objSize.x/โ2 +1.5,250 objCenter.y - objSize.y/โ2 ,251 objCenter.z + objSize.z/โ2) );252 }253 else{/โ/โleft to the user254 /โ/โshow size number255 loadText( main , 256 objSize.z ,257 new THREE.Vector3(objCenter.x - objSize.x/โ2 -1,258 objCenter.y - objSize.y/โ2 ,259 objCenter.z ), 260 270 );261 /โ/โshow line262 loadLine( main , 263 new THREE.Vector3(objCenter.x - objSize.x/โ2 -1,264 objCenter.y - objSize.y/โ2 ,265 objCenter.z - objSize.z/โ2) , 266 new THREE.Vector3(objCenter.x - objSize.x/โ2 -1,267 objCenter.y - objSize.y/โ2 ,268 objCenter.z + objSize.z/โ2) );269 loadLine( main , 270 new THREE.Vector3(objCenter.x - objSize.x/โ2 -0.5,271 objCenter.y - objSize.y/โ2 ,272 objCenter.z - objSize.z/โ2) , 273 new THREE.Vector3(objCenter.x - objSize.x/โ2 -1.5,274 objCenter.y - objSize.y/โ2 ,275 objCenter.z - objSize.z/โ2) );276 loadLine( main , 277 new THREE.Vector3(objCenter.x - objSize.x/โ2 -0.5,278 objCenter.y - objSize.y/โ2 ,279 objCenter.z + objSize.z/โ2) , 280 new THREE.Vector3(objCenter.x - objSize.x/โ2 -1.5,281 objCenter.y - objSize.y/โ2 ,282 objCenter.z + objSize.z/โ2) );283 }284}285function loadText(main , num , position , rotat){286 var text = (Math.round(num*10)/โ100).toString();287 var loader = new THREE.FontLoader();288 var font = loader.load(289 /โ/โ resource URL290 'three.js-master/โexamples/โfonts/โhelvetiker_regular.typeface.json',291 /โ/โ onLoad callback292 function ( font ) {293 var geometry = new THREE.TextGeometry( text , {294 font: font ,295 size: 0.3,296 height: 0.05,297 curveSegments: 12,298 bevelEnabled: false,299 bevelThickness: 5,300 bevelSize: 4,301 bevelSegments: 1302 } );303 var material = new THREE.MeshBasicMaterial( { color: 0x000000 } );304 var mesh = new THREE.Mesh( geometry, material );305 mesh.position.set( position.x , position.y +0.5 , position.z );306 mesh.rotateOnWorldAxis(new THREE.Vector3(0,1,0) , rotat * Math.PI/โ180);307 main.scene.add( mesh );308 main.SizeObj.push( mesh );309 }310 );311}312function loadLine( main , point1 , point2){313 var material = new THREE.LineBasicMaterial({314 color: 0x000000,315 linewidth: 10,316 linecap: 'round', /โ/โignored by WebGLRenderer317 linejoin: 'round' /โ/โignored by WebGLRenderer318 });319 var geometry = new THREE.Geometry();320 geometry.vertices.push(321 new THREE.Vector3( point1.x , point1.y , point1.z ),322 new THREE.Vector3( point2.x , point2.y , point2.z )323 );324 var line = new THREE.Line( geometry, material );325 main.scene.add( line );326 main.SizeObj.push(line);327}...
Stage_8.js
Source: Stage_8.js
1var data; /โ/โ bucket for the notification data2/โ/โeach social media notifications count is listed3/โ/โvalue ranges between 0-20 รยขรขย รขยย circles -->map values?4var instagram, snapchat, messenger, facebook, email, instagramCol, snapchatCol, messengerCol, facebookCol, emailCol;5var whichHour=0; /โ/โfor iterating through data6/โ/โ this will make the circles bigger7var sizeMultiplier = 5; 8var time, size;9var daycounter= 1;10function preload (){11 data =loadJSON("Sunday.json");12}13function setup() {14 15 createCanvas (windowWidth, windowHeight);16 background (255);17 18 instagramCol = color (142, 68, 173, 90);19 messengerCol = color (133, 193, 233, 90);20 snapchatCol = color (247, 220, 111, 90);21 facebookCol = color (118, 215, 196, 90);22 emailCol = color (178, 186, 187, 90); 23 frameRate(0.5);24 25 26 /โ/โtextSize (70);27 /โ/โfill (0);28 /โ/โ textFont ("Futura");29 /โ/โ text ('Sunday',600,600);30 /โ/โ textSize (20);31 /โ/โ text ('Press any key', 150, 380);32 /โ/โ text ('click anywhere on screen',1100, 380);33 /โ/โ textSize(40);34 /โ/โ text ('II',200,350);35 /โ/โ text ('รขยยฅ', 1200, 350);36 /โ/โ var yplay;37 /โ/โ angleMode (DEGREES);38 }39 40 41 42function draw () {43 for (whichHour=0; whichHour<data.hours.length; whichHour++){44 /โ/โif (frameCount > 100 * whichHour) {45 /โ/โ if (mouseX<200) {46 /โ/โ yplay = int(random(100,5));}47 /โ/โ else {yplay=1;}48 /โ/โtranslate (200, 200);49 /โ/โrotate(angle);50 /โ/โellipseMode (CENTER);51 52 /โ/โ Sunday53 fill (instagramCol);54 size = data.hours[whichHour].instagram*sizeMultiplier;55 /โ/โellipse (data[whichHour], whichHour*yplay, whichHour*20, size, size);56 ellipse (random(100, 150), random (150, 500), size, size);57 /โ/โangle++;58 59 60 fill (messengerCol);61 size = data.hours[whichHour].messenger*sizeMultiplier; 62 ellipse(random(100, 150), random(150, 500), size, size);63 64 65 fill (snapchatCol);66 size = data.hours[whichHour].snapchat*sizeMultiplier; 67 rect(random(100, 150), random(150, 500), size, size);68 69 fill (facebookCol);70 size = data.hours[whichHour].facebook*sizeMultiplier; 71 square (random(100, 150), random(150, 500), size, size);72 73 fill (emailCol);74 size = data.hours[whichHour].email*sizeMultiplier; 75 ellipse(random(100, 150), random(150, 500), size, size);76 77/โ/โ Monday78fill (instagramCol);79 size = data.hours[whichHour].instagram*sizeMultiplier;80 /โ/โellipse (data[whichHour], whichHour*yplay, whichHour*20, size, size);81 ellipse (random(270, 320), random (150, 500), size, size);82 /โ/โangle++;83 84 85 fill (messengerCol);86 size = data.hours[whichHour].messenger*sizeMultiplier; 87 ellipse(random(270, 320), random(150, 500), size, size);88 89 90 fill (snapchatCol);91 size = data.hours[whichHour].snapchat*sizeMultiplier; 92 rect(random(270, 320), random(150, 500), size, size);93 94 fill (facebookCol);95 size = data.hours[whichHour].facebook*sizeMultiplier; 96 square (random(270, 320), random(150, 500), size, size);97 98 fill (emailCol);99 size = data.hours[whichHour].email*sizeMultiplier; 100 ellipse(random(270, 320), random(150, 500), size, size);101 102 /โ/โTuesday103 fill (instagramCol);104 size = data.hours[whichHour].instagram*sizeMultiplier;105 /โ/โellipse (data[whichHour], whichHour*yplay, whichHour*20, size, size);106 ellipse (random(440, 490), random (150, 500), size, size);107 /โ/โangle++;108 109 fill (messengerCol);110 size = data.hours[whichHour].messenger*sizeMultiplier; 111 ellipse(random(440, 490), random(150, 500), size, size);112 113 114 fill (snapchatCol);115 size = data.hours[whichHour].snapchat*sizeMultiplier; 116 rect(random(440, 490), random(150, 500), size, size);117 118 fill (facebookCol);119 size = data.hours[whichHour].facebook*sizeMultiplier; 120 square (random(440, 490), random(150, 500), size, size);121 122 fill (emailCol);123 size = data.hours[whichHour].email*sizeMultiplier; 124 ellipse(random(440, 490), random(150, 500), size, size);125 126 /โ/โWednesday127 fill (instagramCol);128 size = data.hours[whichHour].instagram*sizeMultiplier;129 /โ/โellipse (data[whichHour], whichHour*yplay, whichHour*20, size, size);130 ellipse (random(610, 660), random (150, 500), size, size);131 /โ/โangle++;132 133 fill (messengerCol);134 size = data.hours[whichHour].messenger*sizeMultiplier; 135 ellipse(random(610, 660), random(150, 500), size, size);136 137 138 fill (snapchatCol);139 size = data.hours[whichHour].snapchat*sizeMultiplier; 140 rect(random(610, 660), random(150, 500), size, size);141 142 fill (facebookCol);143 size = data.hours[whichHour].facebook*sizeMultiplier; 144 square (random(610, 660), random(150, 500), size, size);145 146 fill (emailCol);147 size = data.hours[whichHour].email*sizeMultiplier; 148 ellipse(random(610, 660), random(150, 500), size, size);149 150 /โ/โThursday151 fill (instagramCol);152 size = data.hours[whichHour].instagram*sizeMultiplier;153 /โ/โellipse (data[whichHour], whichHour*yplay, whichHour*20, size, size);154 ellipse (random(780, 830), random (150, 500), size, size);155 /โ/โangle++;156 157 fill (messengerCol);158 size = data.hours[whichHour].messenger*sizeMultiplier; 159 ellipse(random(780, 830), random(150, 500), size, size);160 161 162 fill (snapchatCol);163 size = data.hours[whichHour].snapchat*sizeMultiplier; 164 rect(random(780, 830), random(150, 500), size, size);165 166 fill (facebookCol);167 size = data.hours[whichHour].facebook*sizeMultiplier; 168 square (random(780, 830), random(150, 500), size, size);169 170 fill (emailCol);171 size = data.hours[whichHour].email*sizeMultiplier; 172 ellipse(random(780, 830), random(150, 500), size, size);173 174 /โ/โFriday175 fill (instagramCol);176 size = data.hours[whichHour].instagram*sizeMultiplier;177 /โ/โellipse (data[whichHour], whichHour*yplay, whichHour*20, size, size);178 ellipse (random(950, 1000), random (150, 500), size, size);179 /โ/โangle++;180 181 fill (messengerCol);182 size = data.hours[whichHour].messenger*sizeMultiplier; 183 ellipse(random(950, 1000), random(150, 500), size, size);184 185 186 fill (snapchatCol);187 size = data.hours[whichHour].snapchat*sizeMultiplier; 188 rect(random(950, 1000), random(150, 500), size, size);189 190 fill (facebookCol);191 size = data.hours[whichHour].facebook*sizeMultiplier; 192 square (random(950, 1000), random(150, 500), size, size);193 194 fill (emailCol);195 size = data.hours[whichHour].email*sizeMultiplier; 196 ellipse(random(950, 1000), random(150, 500), size, size);197 198 /โ/โSaturday199 fill (instagramCol);200 size = data.hours[whichHour].instagram*sizeMultiplier;201 /โ/โellipse (data[whichHour], whichHour*yplay, whichHour*20, size, size);202 ellipse (random(1120, 1170), random (150, 500), size, size);203 /โ/โangle++;204 205 fill (messengerCol);206 size = data.hours[whichHour].messenger*sizeMultiplier; 207 ellipse(random(1120, 1170), random(150, 500), size, size);208 209 210 fill (snapchatCol);211 size = data.hours[whichHour].snapchat*sizeMultiplier; 212 rect(random(1120, 1170), random(150, 500), size, size);213 214 fill (facebookCol);215 size = data.hours[whichHour].facebook*sizeMultiplier; 216 square (random(1120, 1170), random(150, 500), size, size);217 218 fill (emailCol);219 size = data.hours[whichHour].email*sizeMultiplier; 220 ellipse(random(1120, 1170), random(150, 500), size, size);221 }222}223/โ/โthis allows you to pause the sketch with just pressing any key on the keyboard. 224function keyPressed (){225 noLoop();226}227function keyReleased (){228 loop();229}230function mousePressed (){231 background (255);232 /โ/โ fill (0);233 /โ/โ textSize (70);234 /โ/โ textFont ("Futura");235 236 /โ/โ /โ/โ changing the title days everytime mouse is pressed237 /โ/โ if (mousePressed) {238 /โ/โ daycounter = daycounter +1;239 /โ/โ }240 /โ/โ if (daycounter > 7) {241 /โ/โ daycounter = 1;242 /โ/โ }243 244 /โ/โ if (daycounter ==2) {245 /โ/โ text ("Monday", 600, 600);246 /โ/โ }247 /โ/โif (daycounter ==3) {248 /โ/โ text ("Tuesday", 600,600);249 /โ/โ }250 251 252 /โ/โ if (daycounter ==4) {253 /โ/โ text ("Wednesday", 540,600);254 /โ/โ } 255 256 /โ/โ if (daycounter ==5) {257 /โ/โ text ("Thursday", 600,600);258 /โ/โ }259 260 /โ/โ if (daycounter ==6) {261 /โ/โ text ("Friday", 620,600);262 /โ/โ }263 264 /โ/โ if (daycounter ==7) {265 /โ/โ text ("Saturday", 600,600);266 /โ/โ }267 268 269 /โ/โ textSize (20);270 /โ/โ text ('Press any key', 150, 380);271 /โ/โ text ('click anywhere on screen',1100, 380);272 /โ/โ textSize(40);273 /โ/โ text ('II',200,350);274 /โ/โ text ('รขยยฅ', 1200, 350);275 276 ...
Zoomify.js
Source: Zoomify.js
1/โ* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for2 * full list of contributors). Published under the 2-clause BSD license.3 * See license.txt in the OpenLayers distribution or repository for the4 * full text of the license. */โ5/โ*6 * Development supported by a R&D grant DC08P02OUK006 - Old Maps Online7 * (www.oldmapsonline.org) from Ministry of Culture of the Czech Republic.8 */โ9/โ**10 * @requires OpenLayers/โLayer/โGrid.js11 */โ12/โ**13 * Class: OpenLayers.Layer.Zoomify14 *15 * Inherits from:16 * - <OpenLayers.Layer.Grid>17 */โ18OpenLayers.Layer.Zoomify = OpenLayers.Class(OpenLayers.Layer.Grid, {19 /โ**20 * Property: size21 * {<OpenLayers.Size>} The Zoomify image size in pixels.22 */โ23 size: null,24 /โ**25 * APIProperty: isBaseLayer26 * {Boolean}27 */โ28 isBaseLayer: true,29 /โ**30 * Property: standardTileSize31 * {Integer} The size of a standard (non-border) square tile in pixels.32 */โ33 standardTileSize: 256,34 /โ** 35 * Property: tileOriginCorner36 * {String} This layer uses top-left as tile origin37 **/โ38 tileOriginCorner: "tl",39 /โ**40 * Property: numberOfTiers41 * {Integer} Depth of the Zoomify pyramid, number of tiers (zoom levels)42 * - filled during Zoomify pyramid initialization.43 */โ44 numberOfTiers: 0,45 /โ**46 * Property: tileCountUpToTier47 * {Array(Integer)} Number of tiles up to the given tier of pyramid.48 * - filled during Zoomify pyramid initialization.49 */โ50 tileCountUpToTier: null,51 /โ**52 * Property: tierSizeInTiles53 * {Array(<OpenLayers.Size>)} Size (in tiles) for each tier of pyramid.54 * - filled during Zoomify pyramid initialization.55 */โ56 tierSizeInTiles: null,57 /โ**58 * Property: tierImageSize59 * {Array(<OpenLayers.Size>)} Image size in pixels for each pyramid tier.60 * - filled during Zoomify pyramid initialization.61 */โ62 tierImageSize: null,63 /โ**64 * Constructor: OpenLayers.Layer.Zoomify65 *66 * Parameters:67 * name - {String} A name for the layer.68 * url - {String} - Relative or absolute path to the image or more69 * precisly to the TileGroup[X] directories root.70 * Flash plugin use the variable name "zoomifyImagePath" for this.71 * size - {<OpenLayers.Size>} The size (in pixels) of the image.72 * options - {Object} Hashtable of extra options to tag onto the layer73 */โ74 initialize: function(name, url, size, options) {75 /โ/โ initilize the Zoomify pyramid for given size76 this.initializeZoomify(size);77 OpenLayers.Layer.Grid.prototype.initialize.apply(this, [78 name, url, size, {}, options79 ]);80 },81 /โ**82 * Method: initializeZoomify83 * It generates constants for all tiers of the Zoomify pyramid84 *85 * Parameters:86 * size - {<OpenLayers.Size>} The size of the image in pixels87 *88 */โ89 initializeZoomify: function( size ) {90 var imageSize = size.clone();91 this.size = size.clone();92 var tiles = new OpenLayers.Size(93 Math.ceil( imageSize.w /โ this.standardTileSize ),94 Math.ceil( imageSize.h /โ this.standardTileSize )95 );96 this.tierSizeInTiles = [tiles];97 this.tierImageSize = [imageSize];98 while (imageSize.w > this.standardTileSize ||99 imageSize.h > this.standardTileSize ) {100 imageSize = new OpenLayers.Size(101 Math.floor( imageSize.w /โ 2 ),102 Math.floor( imageSize.h /โ 2 )103 );104 tiles = new OpenLayers.Size(105 Math.ceil( imageSize.w /โ this.standardTileSize ),106 Math.ceil( imageSize.h /โ this.standardTileSize )107 );108 this.tierSizeInTiles.push( tiles );109 this.tierImageSize.push( imageSize );110 }111 this.tierSizeInTiles.reverse();112 this.tierImageSize.reverse();113 this.numberOfTiers = this.tierSizeInTiles.length;114 var resolutions = [1];115 this.tileCountUpToTier = [0];116 for (var i = 1; i < this.numberOfTiers; i++) {117 resolutions.unshift(Math.pow(2, i));118 this.tileCountUpToTier.push(119 this.tierSizeInTiles[i-1].w * this.tierSizeInTiles[i-1].h +120 this.tileCountUpToTier[i-1]121 );122 }123 if (!this.serverResolutions) {124 this.serverResolutions = resolutions;125 }126 },127 /โ**128 * APIMethod:destroy129 */โ130 destroy: function() {131 /โ/โ for now, nothing special to do here.132 OpenLayers.Layer.Grid.prototype.destroy.apply(this, arguments);133 /โ/โ Remove from memory the Zoomify pyramid - is that enough?134 this.tileCountUpToTier.length = 0;135 this.tierSizeInTiles.length = 0;136 this.tierImageSize.length = 0;137 },138 /โ**139 * APIMethod: clone140 *141 * Parameters:142 * obj - {Object}143 *144 * Returns:145 * {<OpenLayers.Layer.Zoomify>} An exact clone of this <OpenLayers.Layer.Zoomify>146 */โ147 clone: function (obj) {148 if (obj == null) {149 obj = new OpenLayers.Layer.Zoomify(this.name,150 this.url,151 this.size,152 this.options);153 }154 /โ/โget all additions from superclasses155 obj = OpenLayers.Layer.Grid.prototype.clone.apply(this, [obj]);156 /โ/โ copy/โset any non-init, non-simple values here157 return obj;158 },159 /โ**160 * Method: getURL161 *162 * Parameters:163 * bounds - {<OpenLayers.Bounds>}164 *165 * Returns:166 * {String} A string with the layer's url and parameters and also the167 * passed-in bounds and appropriate tile size specified as168 * parameters169 */โ170 getURL: function (bounds) {171 bounds = this.adjustBounds(bounds);172 var res = this.getServerResolution();173 var x = Math.round((bounds.left - this.tileOrigin.lon) /โ (res * this.tileSize.w));174 var y = Math.round((this.tileOrigin.lat - bounds.top) /โ (res * this.tileSize.h));175 var z = this.getZoomForResolution( res );176 var tileIndex = x + y * this.tierSizeInTiles[z].w + this.tileCountUpToTier[z];177 var path = "TileGroup" + Math.floor( (tileIndex) /โ 256 ) +178 "/โ" + z + "-" + x + "-" + y + ".jpg";179 var url = this.url;180 if (OpenLayers.Util.isArray(url)) {181 url = this.selectUrl(path, url);182 }183 return url + path;184 },185 /โ**186 * Method: getImageSize187 * getImageSize returns size for a particular tile. If bounds are given as188 * first argument, size is calculated (bottom-right tiles are non square).189 *190 */โ191 getImageSize: function() {192 if (arguments.length > 0) {193 var bounds = this.adjustBounds(arguments[0]);194 var res = this.getServerResolution();195 var x = Math.round((bounds.left - this.tileOrigin.lon) /โ (res * this.tileSize.w));196 var y = Math.round((this.tileOrigin.lat - bounds.top) /โ (res * this.tileSize.h));197 var z = this.getZoomForResolution( res );198 var w = this.standardTileSize;199 var h = this.standardTileSize;200 if (x == this.tierSizeInTiles[z].w -1 ) {201 var w = this.tierImageSize[z].w % this.standardTileSize;202 }203 if (y == this.tierSizeInTiles[z].h -1 ) {204 var h = this.tierImageSize[z].h % this.standardTileSize;205 }206 return (new OpenLayers.Size(w, h));207 } else {208 return this.tileSize;209 }210 },211 /โ**212 * APIMethod: setMap213 * When the layer is added to a map, then we can fetch our origin214 * (if we don't have one.)215 *216 * Parameters:217 * map - {<OpenLayers.Map>}218 */โ219 setMap: function(map) {220 OpenLayers.Layer.Grid.prototype.setMap.apply(this, arguments);221 this.tileOrigin = new OpenLayers.LonLat(this.map.maxExtent.left,222 this.map.maxExtent.top);223 },224 CLASS_NAME: "OpenLayers.Layer.Zoomify"...
Check out the latest blogs from LambdaTest on this topic:
There are times when developers get stuck with a problem that has to do with version changes. Trying to run the code or test without upgrading the package can result in unexpected errors.
Automating testing is a crucial step in the development pipeline of a software product. In an agile development environment, where there is continuous development, deployment, and maintenance of software products, automation testing ensures that the end software products delivered are error-free.
Web applications continue to evolve at an unbelievable pace, and the architecture surrounding web apps get more complicated all of the time. With the growth in complexity of the web application and the development process, web application testing also needs to keep pace with the ever-changing demands.
โTest frequently and early.โ If youโve been following my testing agenda, youโre probably sick of hearing me repeat that. However, it is making sense that if your tests detect an issue soon after it occurs, it will be easier to resolve. This is one of the guiding concepts that makes continuous integration such an effective method. Iโve encountered several teams who have a lot of automated tests but donโt use them as part of a continuous integration approach. There are frequently various reasons why the team believes these tests cannot be used with continuous integration. Perhaps the tests take too long to run, or they are not dependable enough to provide correct results on their own, necessitating human interpretation.
Hey LambdaTesters! Weโve got something special for you this week. ????
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!