How to use removeChild method in Playwright Internal

Best JavaScript code snippet using playwright-internal

FuzzTests.js

Source:FuzzTests.js Github

copy

Full Screen

...34 // var text2 = new Text( '2!' );35 node2.insertChild( 0, node0 );36 display.updateDisplay();37 path3.insertChild( 0, node3 );38 path3.removeChild( node3 );39 display.updateDisplay();40 node4.insertChild( 0, node1 );41 path3.insertChild( 0, node4 );42 node2.insertChild( 1, path3 );43 scene.insertChild( 0, path1 );44 node2.insertChild( 1, path1 );45 node4.removeChild( node1 );46 node6.insertChild( 0, scene );47 scene.removeChild( path1 );48 path0.insertChild( 0, node2 );49 path0.insertChild( 0, node6 );50 display.updateDisplay();51 path0.insertChild( 1, path3 );52 node6.removeChild( scene );53 display.updateDisplay();54 display.updateDisplay();55 display.updateDisplay();56 path1.insertChild( 0, node0 );57 display.updateDisplay();58 node4.insertChild( 0, path2 );59 path3.removeChild( node4 );60 display.updateDisplay();61 display.updateDisplay();62 node5.insertChild( 0, node0 );63 node4.insertChild( 0, node5 );64 display.updateDisplay();65 node4.removeChild( path2 );66 display.updateDisplay();67 node4.removeChild( node5 );68 scene.insertChild( 0, node4 );69 scene.removeChild( node4 );70 node3.insertChild( 0, node2 );71 node3.insertChild( 0, path0 );72 path1.removeChild( node0 );73 display.updateDisplay();74 path3.insertChild( 0, node5 );75 display.updateDisplay();76 node2.removeChild( node0 );77 display.updateDisplay();78 display.updateDisplay();79 display.updateDisplay();80 path3.removeChild( node5 );81 display.updateDisplay();82 display.updateDisplay();83 path2.insertChild( 0, path3 );84 node1.insertChild( 0, node2 );85 path3.insertChild( 0, node6 );86 display.updateDisplay();87 path2.insertChild( 0, path1 );88 path2.removeChild( path1 );89 path3.removeChild( node6 );90 scene.insertChild( 0, node4 );91 display.updateDisplay();92 node6.insertChild( 0, node5 );93 scene.removeChild( node4 );94 node4.insertChild( 0, path2 );95 display.updateDisplay();96 node6.removeChild( node5 );97 display.updateDisplay();98 node5.removeChild( node0 );99 path0.removeChild( path3 );100 display.updateDisplay();101 path2.insertChild( 1, path0 );102 display.updateDisplay();103 display.updateDisplay();104 path0.removeChild( node6 );105 path0.removeChild( node2 );106 node1.insertChild( 1, path3 );107 node3.insertChild( 1, node1 );108 display.updateDisplay();109 node4.removeChild( path2 );110 display.updateDisplay();111 path0.insertChild( 0, scene );112 display.updateDisplay();113 node6.insertChild( 0, node2 );114 node5.insertChild( 0, path0 );115 node4.insertChild( 0, node6 );116 node0.insertChild( 0, node4 );117 node0.removeChild( node4 );118 display.updateDisplay();119 node6.removeChild( node2 );120 path2.removeChild( path3 );121 path2.insertChild( 0, path3 );122 node2.insertChild( 1, node6 );123 display.updateDisplay();124 path0.removeChild( scene );125 node2.removeChild( node6 );126 node6.insertChild( 0, path0 );127 display.updateDisplay();128 path2.insertChild( 0, node3 );129 path1.insertChild( 0, node6 );130 node1.removeChild( path3 );131 display.updateDisplay();132 path1.insertChild( 0, node4 );133 path2.insertChild( 1, node1 );134 node5.removeChild( path0 );135 display.updateDisplay();136 display.updateDisplay();137 node2.removeChild( path3 );138 display.updateDisplay();139 display.updateDisplay();140 display.updateDisplay();141 path0.insertChild( 0, node0 );142 node4.removeChild( node6 );143 display.updateDisplay();144 display.updateDisplay();145 node2.insertChild( 0, node5 );146 path2.insertChild( 3, scene );147 display.updateDisplay();148 path3.insertChild( 0, scene );149 display.updateDisplay();150 path1.insertChild( 2, scene );151 path1.removeChild( node6 );152 node1.insertChild( 0, path1 );153 node2.removeChild( node5 );154 path3.insertChild( 1, node5 );155 node0.insertChild( 0, node4 );156 path0.removeChild( node0 );157 node3.removeChild( path0 );158 node0.insertChild( 1, node3 );159 node1.insertChild( 0, path3 );160 path1.removeChild( node4 );161 node3.insertChild( 2, node5 );162 path2.removeChild( node3 );163 node4.insertChild( 0, path1 );164 node5.insertChild( 0, node4 );165 node3.removeChild( node2 );166 path3.removeChild( scene );167 node3.insertChild( 0, node6 );168 node2.insertChild( 1, node5 );169 path0.insertChild( 0, path1 );170 path2.insertChild( 3, node3 );171 node2.removeChild( path1 );172 display.updateDisplay();173 path0.removeChild( path1 );174 node5.removeChild( node4 );175 node4.insertChild( 0, path0 );176 node4.removeChild( path0 );177 node6.removeChild( path0 );178 node1.removeChild( path3 );179 display.updateDisplay();180 node3.removeChild( node6 );181 display.updateDisplay();182 node4.removeChild( path1 );183 node5.insertChild( 0, path0 );184 path3.insertChild( 1, node4 );185 node0.insertChild( 0, path2 );186 path2.removeChild( path3 );187 node5.removeChild( path0 );188 node0.insertChild( 2, path0 );189 node3.removeChild( node1 );190 node2.insertChild( 0, node4 );191 path3.removeChild( node5 );192 path1.removeChild( scene );193 display.updateDisplay();194 display.updateDisplay();195 display.updateDisplay();196 node1.removeChild( path1 );197 node5.insertChild( 0, node6 );198 scene.insertChild( 0, path0 );199 node1.removeChild( node2 );200 path3.removeChild( node4 );201 display.updateDisplay();202 node2.removeChild( node4 );203 node0.removeChild( path2 );204 display.updateDisplay();205 display.updateDisplay();206 path2.insertChild( 1, path3 );207 node3.insertChild( 0, node2 );208 node2.insertChild( 0, path3 );209 node2.removeChild( path3 );210 node3.removeChild( node2 );211 node2.insertChild( 0, node1 );212 path2.removeChild( scene );213 node2.removeChild( node5 );214 scene.removeChild( path0 );215 path1.insertChild( 0, node4 );216 node0.removeChild( path0 );217 node3.insertChild( 0, path1 );218 node5.insertChild( 0, scene );219 node5.removeChild( scene );220 display.updateDisplay();221 node2.insertChild( 1, node0 );222 path3.insertChild( 0, node0 );223 display.updateDisplay();224 node0.insertChild( 2, node1 );225 path2.removeChild( path3 );226 path1.removeChild( node4 );227 node3.removeChild( node5 );228 node6.insertChild( 0, node1 );229 node2.insertChild( 1, path2 );230 path3.removeChild( node0 );231 node2.insertChild( 2, node5 );232 node5.insertChild( 0, path0 );233 display.updateDisplay();234 node2.insertChild( 1, node3 );235 display.updateDisplay();236 node3.insertChild( 0, path0 );237 node3.insertChild( 0, node1 );238 display.updateDisplay();239 path3.insertChild( 0, node5 );240 node5.insertChild( 2, node3 );241 node3.insertChild( 3, node6 );242 node2.removeChild( node5 );243 path1.insertChild( 0, node4 );244 path0.insertChild( 0, node6 );245 node0.removeChild( node1 );246 path1.removeChild( node4 );247 path0.insertChild( 1, node1 );248 node3.removeChild( node6 );249 path2.insertChild( 1, path3 );250 path2.removeChild( node3 );251 path2.removeChild( path0 );252 path2.removeChild( path3 );253 display.updateDisplay();254 path2.removeChild( node1 );255 node3.removeChild( path1 );256 node2.removeChild( node1 );257 node3.removeChild( path0 );258 path1.insertChild( 0, scene );259 node4.insertChild( 0, node6 );260 node5.removeChild( node6 );261 node6.removeChild( node1 );262 node2.insertChild( 3, path0 );263 path1.removeChild( scene );264 node4.removeChild( node6 );265 node6.insertChild( 0, path1 );266 node5.removeChild( path0 );267 node0.insertChild( 1, node6 );268 node5.removeChild( node3 );269 node4.insertChild( 0, node6 );270 path3.removeChild( node5 );271 path0.removeChild( node1 );272 display.updateDisplay();273 path2.insertChild( 0, node6 );274 display.updateDisplay();275 scene.insertChild( 0, path1 );276 scene.insertChild( 1, node1 );277 node6.removeChild( path1 );278 path0.insertChild( 0, node3 );279 node4.removeChild( node6 );280 path1.insertChild( 0, node3 );281 path0.insertChild( 2, path1 );282 path2.insertChild( 1, scene );283 display.updateDisplay();284 path1.removeChild( node3 );285 node3.removeChild( node1 );286 display.updateDisplay();287 display.updateDisplay();288 path3.insertChild( 0, node5 );289 path3.removeChild( node5 );290 path0.removeChild( node3 );291 node5.insertChild( 0, path0 );292 path0.insertChild( 1, path2 );293 node0.insertChild( 2, path2 );294 display.updateDisplay();295 node1.insertChild( 0, node3 );296 path3.insertChild( 0, node5 );297 node2.removeChild( node0 );298 display.updateDisplay();299 node4.insertChild( 0, scene );300 node2.removeChild( path0 );301 node0.removeChild( path2 );302 scene.insertChild( 0, node6 );303 display.updateDisplay();304 node2.insertChild( 0, node0 );305 display.updateDisplay();306 node2.insertChild( 2, scene );307 node2.insertChild( 2, node1 );308 path3.insertChild( 0, path1 );309 path2.removeChild( scene );310 path2.removeChild( node6 );311 node4.removeChild( scene );312 display.updateDisplay();313 path3.removeChild( node5 );314 node4.insertChild( 0, path1 );315 display.updateDisplay();316 path3.insertChild( 1, node5 );317 node4.removeChild( path1 );318 scene.insertChild( 2, path0 );319 node0.insertChild( 2, path2 );320 path0.removeChild( path2 );321 scene.insertChild( 2, node5 );322 node5.removeChild( path0 );323 path3.insertChild( 2, node0 );324 node0.removeChild( node6 );325 display.updateDisplay();326 node0.removeChild( node3 );327 display.updateDisplay();328 display.updateDisplay();329 scene.insertChild( 5, path2 );330 display.updateDisplay();331 display.updateDisplay();332 node6.insertChild( 0, path1 );333 node6.removeChild( path1 );334 node5.insertChild( 0, node3 );335 display.updateDisplay();336 node6.insertChild( 0, node4 );337 node6.removeChild( node4 );338 path3.removeChild( path1 );339 node5.removeChild( node3 );340 path3.insertChild( 0, path2 );341 path1.insertChild( 0, node1 );342 node0.removeChild( node4 );343 node0.insertChild( 0, node4 );344 node1.removeChild( node3 );345 path1.removeChild( node1 );346 node0.insertChild( 1, path0 );347 node4.insertChild( 0, path2 );348 node3.insertChild( 0, path1 );349 display.updateDisplay();350 node0.removeChild( node4 );351 display.updateDisplay();352 path1.insertChild( 0, node1 );353 display.updateDisplay();354 node3.removeChild( path1 );355 node3.insertChild( 0, path0 );356 display.updateDisplay();357 node5.insertChild( 0, node0 );358 display.updateDisplay();359 display.updateDisplay();360 display.updateDisplay();361 node4.insertChild( 1, node0 );362 path1.removeChild( node1 );363 path0.removeChild( path1 );364 node2.insertChild( 3, path3 );365 path3.insertChild( 0, node6 );366 path3.insertChild( 3, node4 );367 display.updateDisplay();368 node5.removeChild( node0 );369 display.updateDisplay();370 node3.insertChild( 1, path1 );371 path0.insertChild( 1, path1 );372 display.updateDisplay();373 node0.insertChild( 2, node1 );374 node3.insertChild( 0, node6 );375 scene.removeChild( path2 );376 scene.removeChild( node6 );377 node4.removeChild( node0 );378 node3.removeChild( node6 );379 node5.insertChild( 0, node1 );380 node1.insertChild( 0, path2 );381 display.updateDisplay();382 display.updateDisplay();383 display.updateDisplay();384 path3.insertChild( 2, node1 );385 display.updateDisplay();386 display.updateDisplay();387 display.updateDisplay();388 scene.removeChild( path0 );389 display.updateDisplay();390 display.updateDisplay();391 path3.removeChild( node0 );392 node6.insertChild( 0, path2 );393 node6.insertChild( 1, node4 );394 node2.removeChild( scene );395 node4.removeChild( path2 );396 scene.removeChild( node5 );397 display.updateDisplay();398 path3.insertChild( 3, path1 );399 display.updateDisplay();400 node2.insertChild( 0, node6 );401 node2.removeChild( node0 );402 node1.removeChild( path2 );403 node2.removeChild( path2 );404 node2.removeChild( node3 );405 display.updateDisplay();406 display.updateDisplay();407 scene.insertChild( 2, node2 );408 path1.insertChild( 0, node5 );409 display.updateDisplay();410 node2.removeChild( node6 );411 display.updateDisplay();412 scene.removeChild( path1 );413 node3.removeChild( path0 );414 node0.removeChild( path2 );415 scene.insertChild( 0, path0 );416 path2.insertChild( 0, node4 );417 scene.insertChild( 3, node0 );418 node2.removeChild( path3 );419 scene.removeChild( path0 );420 path2.removeChild( node4 );421 path1.removeChild( node5 );422 display.updateDisplay();423 scene.insertChild( 2, node3 );424 path1.insertChild( 0, node6 );425 node6.removeChild( node4 );426 node4.insertChild( 0, node0 );427 node3.removeChild( path1 );428 display.updateDisplay();429 display.updateDisplay();430 display.updateDisplay();431 node2.insertChild( 1, path0 );432 display.updateDisplay();433 display.updateDisplay();434 node2.removeChild( node1 );435 node4.insertChild( 0, scene );436 node4.insertChild( 2, path2 );437 display.updateDisplay();438 display.updateDisplay();439 node2.insertChild( 0, node1 );440 display.updateDisplay();441 display.updateDisplay();442 path3.insertChild( 0, scene );443 display.updateDisplay();444 node0.removeChild( node1 );445 node0.removeChild( path0 );446 display.updateDisplay();447 node6.removeChild( path2 );448 path2.insertChild( 0, path0 );449 node2.insertChild( 0, node0 );450 node1.insertChild( 0, path0 );451 node1.removeChild( path0 );452 scene.removeChild( node2 );453 node1.insertChild( 0, path0 );454 node5.removeChild( node1 );455 path1.removeChild( node6 );456 path0.removeChild( path1 );457 path3.removeChild( path2 );458 node3.insertChild( 0, node2 );459 display.updateDisplay();460 node3.insertChild( 0, node6 );461 display.updateDisplay();462 path3.removeChild( path1 );463 display.updateDisplay();464 node4.removeChild( scene );465 display.updateDisplay();466 path3.removeChild( scene );467 node0.insertChild( 0, node6 );468 scene.removeChild( node3 );469 path3.insertChild( 1, node3 );470 path2.removeChild( path0 );471 path2.insertChild( 0, path0 );472 path3.removeChild( node1 );473 path1.insertChild( 0, node2 );474 display.updateDisplay();475 node0.insertChild( 1, node5 );476 display.updateDisplay();477 scene.insertChild( 2, node3 );478 display.updateDisplay();479 node4.removeChild( node0 );480 node2.insertChild( 2, node4 );481 node1.removeChild( path0 );482 node1.insertChild( 0, node6 );483 scene.insertChild( 1, path0 );484 path0.removeChild( node6 );485 display.updateDisplay();486 node1.removeChild( node6 );487 display.updateDisplay();488 node1.insertChild( 0, path0 );489 display.updateDisplay();490 display.updateDisplay();491 path2.removeChild( path0 );492 node3.insertChild( 0, node0 );493 node2.removeChild( node4 );494 node3.insertChild( 3, path0 );495 node1.removeChild( path0 );496 path1.insertChild( 0, node5 );497 node2.removeChild( node0 );498 path2.insertChild( 0, node1 );499 display.updateDisplay();500 scene.removeChild( node1 );501 node0.removeChild( node5 );502 node4.removeChild( path2 );503 node0.removeChild( node6 );504 assert.ok( true, 'so we have at least 1 test in this set' );505 display.dispose();506} );507QUnit.test( 'RelativeTransform matrix mismatch #393', assert => {508 const scene = new Node();509 const display = new Display( scene, { width: 640, height: 480, backgroundColor: '#eee' } );510 display.updateDisplay();511 const node0 = new Node();512 const node4 = new Node();513 const path1 = new Path( null );514 const path3 = new Path( null );515 path1.insertChild( 0, node4 );516 node4.insertChild( 0, path3 );517 scene.insertChild( 0, node0 );518 node0.insertChild( 0, path1 );519 scene.transform.append( Matrix3.scaling( 1.5586118499044517 ) );520 node0.renderer = 'canvas';521 display.updateDisplay();522 assert.ok( true, 'so we have at least 1 test in this set' );523 display.dispose();524} );525QUnit.test( 'computeShapeBounds in requiresSVGBoundsWorkaround', assert => {526 const scene = new Node();527 const display = new Display( scene, { width: 640, height: 480, backgroundColor: '#eee' } );528 display.updateDisplay();529 const node0 = new Node();530 const node1 = new Node();531 const node2 = new Node();532 const node3 = new Node();533 const node4 = new Node();534 const node5 = new Node();535 const node6 = new Node();536 const path0 = new Path( null );537 const path1 = new Path( null );538 const path2 = new Path( null );539 const path3 = new Path( null );540 const text0 = new Text( '0!' );541 const text1 = new Text( '1!' );542 const text2 = new Text( '2!' );543 const shape0 = null;544 const shape1 = Shape.regularPolygon( 6, 50 );545 const shape2 = Shape.circle( 40 );546 const shape3 = Shape.lineSegment( 0, 0, 50, 100 );547 const paint0 = null;548 const paint1 = 'red';549 const paint2 = '#00ff00';550 const paint3 = new Color( 0, 0, 255, 0.8 );551 const paint4 = new LinearGradient( -50, 0, 50, 0 ).addColorStop( 0, 'white' ).addColorStop( 1, 'black' );552 const paint5 = new RadialGradient( 0, 0, 0, 0, 0, 50 ).addColorStop( 0, 'red' ).addColorStop( 1, 'black' );553 node5.insertChild( 0, node6 );554 node5.removeChild( node6 );555 text0.renderer = 'dom';556 display.updateDisplay();557 path1.insertChild( 0, path2 );558 text0.transform.append( Matrix3.translation( 23.65897111594677, 82.57610886357725 ) );559 node0.transform.prepend( Matrix3.translation( -8.093876158818603, -51.45275075919926 ) );560 text2.fill = paint5;561 path1.transform.append( Matrix3.translation( 25.28924555517733, 74.84042081050575 ) );562 path3.stroke = paint1;563 node2.transform.append( Matrix3.scaling( 1.5677800512634406 ) );564 scene.transform.setMatrix( Matrix3.scaling( 0.6745253108669262 ) );565 text1.insertChild( 0, text0 );566 node3.insertChild( 0, path0 );567 text0.transform.append( Matrix3.translation( -33.25916863977909, 39.74149413406849 ) );568 node0.insertChild( 0, path3 );569 node1.transform.prepend( Matrix3.rotation2( 0.19764518009793736 ) );570 text1.insertChild( 0, node6 );571 node5.transform.prepend( Matrix3.scaling( 1.4546443958528528 ) );572 path1.removeChild( path2 );573 node2.transform.setMatrix( Matrix3.rotation2( 1.6781812739575503 ) );574 text0.transform.prepend( Matrix3.translation( 81.62147919647396, -86.02062398567796 ) );575 path1.shape = shape0;576 node4.insertChild( 0, node5 );577 node6.transform.append( Matrix3.rotation2( 5.521820087799294 ) );578 scene.transform.append( Matrix3.translation( -76.50924790650606, 65.40518635883927 ) );579 node3.removeChild( path0 );580 text0.insertChild( 0, node5 );581 node1.transform.prepend( Matrix3.rotation2( 0.2175503720176498 ) );582 path3.shape = shape2;583 node1.transform.append( Matrix3.rotation2( 5.221358463520904 ) );584 path0.shape = shape1;585 display.updateDisplay();586 node0.insertChild( 1, node2 );587 text1.transform.append( Matrix3.rotation2( 4.952918373662239 ) );588 node5.transform.prepend( Matrix3.translation( -90.42610130272806, -73.30460799857974 ) );589 path3.insertChild( 0, node6 );590 path3.removeChild( node6 );591 node3.transform.prepend( Matrix3.scaling( 1.0399274659570494 ) );592 path3.transform.setMatrix( Matrix3.translation( 47.80029118992388, -59.36479954980314 ) );593 node5.transform.prepend( Matrix3.scaling( 0.9175601472374242 ) );594 node0.insertChild( 0, text1 );595 node0.removeChild( node2 );596 node0.insertChild( 2, node5 );597 text0.removeChild( node5 );598 display.updateDisplay();599 path3.fill = paint2;600 path1.stroke = paint3;601 path3.shape = shape3;602 path0.transform.prepend( Matrix3.translation( -45.64221557229757, -57.033079443499446 ) );603 display.updateDisplay();604 text1.fill = paint4;605 text1.insertChild( 2, node2 );606 display.updateDisplay();607 path1.transform.setMatrix( Matrix3.scaling( 1.4735522429686227 ) );608 text0.insertChild( 0, node4 );609 display.updateDisplay();610 path0.insertChild( 0, path1 );611 node3.transform.prepend( Matrix3.translation( 79.5630092266947, 28.07220183312893 ) );612 path0.fill = paint1;613 display.updateDisplay();614 display.updateDisplay();615 display.updateDisplay();616 text1.removeChild( text0 );617 display.updateDisplay();618 node2.transform.setMatrix( Matrix3.translation( -8.951065177097917, 74.39073957502842 ) );619 node3.insertChild( 0, path1 );620 display.updateDisplay();621 text1.removeChild( node6 );622 scene.insertChild( 0, node6 );623 node4.removeChild( node5 );624 text1.insertChild( 1, path3 );625 text0.renderer = 'svg';626 scene.insertChild( 1, path2 );627 text1.transform.prepend( Matrix3.scaling( 1.6156445062946716 ) );628 display.updateDisplay();629 path0.fill = paint2;630 node5.transform.prepend( Matrix3.rotation2( 6.1607974870413384 ) );631 text2.fill = paint0;632 path0.insertChild( 0, text2 );633 text0.insertChild( 0, node0 );634 text0.fill = paint2;635 text2.transform.append( Matrix3.rotation2( 5.287893633789239 ) );636 display.updateDisplay();637 text1.removeChild( path3 );638 path0.transform.append( Matrix3.translation( -83.13991227187216, -98.52546616457403 ) );639 display.updateDisplay();640 path3.transform.append( Matrix3.translation( 95.52967073395848, -63.1988724693656 ) );641 node0.insertChild( 1, text2 );642 node3.insertChild( 1, node5 );643 path3.fill = paint0;644 text1.removeChild( node2 );645 scene.transform.setMatrix( Matrix3.rotation2( 5.932826642752049 ) );646 path1.shape = shape3;647 display.updateDisplay();648 text0.insertChild( 1, node2 );649 node6.insertChild( 0, path0 );650 text1.insertChild( 0, path2 );651 text0.fill = paint4;652 path1.fill = paint1;653 node6.insertChild( 0, node4 );654 path2.transform.append( Matrix3.rotation2( 6.175608833319076 ) );655 node6.transform.setMatrix( Matrix3.translation( -20.43589591048658, 18.251941679045558 ) );656 text2.fill = paint5;657 node6.transform.setMatrix( Matrix3.scaling( 1.5447108320653626 ) );658 path2.stroke = paint2;659 path1.transform.prepend( Matrix3.rotation2( 2.141530786164575 ) );660 path1.transform.append( Matrix3.scaling( 1.1406134773273209 ) );661 scene.removeChild( path2 );662 node6.removeChild( node4 );663 path3.shape = shape1;664 node3.removeChild( path1 );665 node2.transform.setMatrix( Matrix3.rotation2( 5.516405418370864 ) );666 path0.insertChild( 0, node1 );667 path2.insertChild( 0, node5 );668 display.updateDisplay();669 node5.insertChild( 0, path1 );670 node3.insertChild( 0, path1 );671 path1.fill = paint5;672 text1.fill = paint0;673 node2.transform.append( Matrix3.scaling( 1.176399541203324 ) );674 scene.transform.prepend( Matrix3.scaling( 0.8068995553761911 ) );675 text2.fill = paint1;676 path2.insertChild( 0, node1 );677 node0.transform.prepend( Matrix3.scaling( 1.116970949456487 ) );678 node3.removeChild( path1 );679 path0.insertChild( 1, path3 );680 path2.stroke = paint0;681 text0.transform.setMatrix( Matrix3.rotation2( 0.7311607901360053 ) );682 path2.fill = paint2;683 path0.renderer = 'canvas';684 display.updateDisplay();685 node4.insertChild( 0, text1 );686 text1.fill = paint4;687 node4.insertChild( 1, node2 );688 scene.removeChild( node6 );689 node0.transform.setMatrix( Matrix3.scaling( 1.215771926450003 ) );690 node1.transform.setMatrix( Matrix3.scaling( 0.9612389007810693 ) );691 display.updateDisplay();692 path2.removeChild( node5 );693 node2.transform.setMatrix( Matrix3.translation( 46.93744354881346, -27.986287605017424 ) );694 path2.insertChild( 0, node6 );695 text1.transform.append( Matrix3.rotation2( 5.616967681341335 ) );696 path1.transform.setMatrix( Matrix3.translation( -72.17136668041348, 6.126852100715041 ) );697 path1.insertChild( 0, text2 );698 display.updateDisplay();699 path0.fill = paint0;700 path1.removeChild( text2 );701 text0.removeChild( node4 );702 text1.removeChild( path2 );703 path2.shape = shape3;704 path0.removeChild( text2 );705 display.updateDisplay();706 node0.transform.setMatrix( Matrix3.translation( -6.999507173895836, 87.37162877805531 ) );707 node3.transform.setMatrix( Matrix3.scaling( 1.561891864402611 ) );708 path3.fill = paint4;709 path2.fill = paint1;710 node3.transform.prepend( Matrix3.rotation2( 3.6535111776911147 ) );711 display.updateDisplay();712 node3.removeChild( node5 );713 path2.removeChild( node1 );714 node5.removeChild( path1 );715 node0.transform.append( Matrix3.translation( -23.8929261919111, -83.22895020246506 ) );716 path0.transform.setMatrix( Matrix3.rotation2( 2.9077771604531333 ) );717 node6.insertChild( 1, node4 );718 path1.insertChild( 0, text2 );719 node1.transform.append( Matrix3.rotation2( 3.7211737706468453 ) );720 node0.removeChild( node5 );721 node0.insertChild( 2, scene );722 path3.insertChild( 0, node2 );723 text0.renderer = null;724 node1.transform.setMatrix( Matrix3.translation( 89.88619525916874, -92.88952946662903 ) );725 path0.fill = paint3;726 path0.fill = paint0;727 path1.insertChild( 0, node3 );728 path1.insertChild( 0, path3 );729 path2.insertChild( 1, node1 );730 path0.renderer = null;731 node2.transform.setMatrix( Matrix3.translation( 6.8230589386075735, 93.58290364034474 ) );732 text0.transform.append( Matrix3.translation( -70.73598629795015, -35.05054833367467 ) );733 node1.insertChild( 0, text1 );734 display.updateDisplay();735 node0.transform.prepend( Matrix3.translation( 42.59985005483031, -4.169275658205152 ) );736 text1.fill = paint0;737 display.updateDisplay();738 text0.stroke = paint3;739 node4.insertChild( 2, node5 );740 text0.renderer = 'canvas';741 path2.transform.prepend( Matrix3.scaling( 1.1811730723124185 ) );742 path1.shape = shape1;743 display.updateDisplay();744 path3.removeChild( node2 );745 path0.fill = paint2;746 display.updateDisplay();747 path2.removeChild( node6 );748 node6.transform.prepend( Matrix3.rotation2( 3.265904462624187 ) );749 text0.insertChild( 0, node4 );750 node2.transform.setMatrix( Matrix3.scaling( 1.4989715692348966 ) );751 text0.renderer = 'svg';752 scene.transform.append( Matrix3.translation( 44.83502432703972, 94.38534369692206 ) );753 display.updateDisplay();754 display.updateDisplay();755 node6.insertChild( 2, node3 );756 node6.insertChild( 2, node5 );757 path3.shape = shape2;758 scene.transform.setMatrix( Matrix3.rotation2( 4.2462163069245245 ) );759 text2.transform.prepend( Matrix3.scaling( 0.8035193477984708 ) );760 node6.removeChild( path0 );761 node2.transform.prepend( Matrix3.scaling( 1.187786252120901 ) );762 node1.removeChild( text1 );763 path0.removeChild( path3 );764 node4.transform.prepend( Matrix3.scaling( 0.8151351887494516 ) );765 text0.transform.prepend( Matrix3.translation( 57.47851114720106, 36.18123224005103 ) );766 scene.insertChild( 0, node3 );767 display.updateDisplay();768 node4.transform.append( Matrix3.translation( -11.248627118766308, -62.87616486661136 ) );769 path1.shape = shape3;770 node4.transform.append( Matrix3.scaling( 1.171111338189263 ) );771 node6.insertChild( 3, path3 );772 node6.insertChild( 0, path0 );773 path1.insertChild( 3, node0 );774 path2.insertChild( 0, path3 );775 node5.transform.append( Matrix3.translation( 41.748585272580385, 59.56932995468378 ) );776 path0.removeChild( path1 );777 node1.insertChild( 0, path3 );778 node4.transform.prepend( Matrix3.scaling( 0.6510128908552419 ) );779 display.updateDisplay();780 scene.insertChild( 1, node6 );781 text1.transform.prepend( Matrix3.translation( -18.70846562087536, -16.39730636961758 ) );782 display.updateDisplay();783 node3.transform.append( Matrix3.scaling( 0.748753536375631 ) );784 text0.transform.setMatrix( Matrix3.translation( 92.97510990872979, 40.07288310676813 ) );785 display.updateDisplay();786 display.updateDisplay();787 node4.transform.prepend( Matrix3.translation( 77.15684166178107, 18.647625809535384 ) );788 path3.transform.append( Matrix3.scaling( 1.0226189988892713 ) );789 path2.removeChild( node1 );790 scene.transform.prepend( Matrix3.scaling( 1.0265723367914745 ) );791 path0.transform.setMatrix( Matrix3.rotation2( 4.020394309354754 ) );792 node6.transform.setMatrix( Matrix3.rotation2( 1.3480025213729132 ) );793 text1.stroke = paint2;794 node4.removeChild( text1 );795 text1.insertChild( 0, path0 );796 node1.renderer = 'dom';797 node1.renderer = 'canvas';798 node2.insertChild( 0, node5 );799 node3.transform.prepend( Matrix3.rotation2( 3.527586292277044 ) );800 node2.transform.append( Matrix3.rotation2( 4.657131034509444 ) );801 text1.removeChild( path0 );802 scene.insertChild( 0, text1 );803 node2.removeChild( node5 );804 text0.insertChild( 0, path0 );805 path0.transform.prepend( Matrix3.scaling( 1.5312132750399599 ) );806 node4.removeChild( node5 );807 node6.transform.setMatrix( Matrix3.scaling( 1.2589032364770958 ) );808 display.updateDisplay();809 path1.removeChild( node0 );810 display.updateDisplay();811 text2.stroke = paint1;812 node3.transform.prepend( Matrix3.translation( 63.56673683039844, 13.142612343654037 ) );813 text2.transform.append( Matrix3.rotation2( 1.4278196360646898 ) );814 text1.insertChild( 0, node6 );815 node5.transform.prepend( Matrix3.translation( -98.16267783753574, 45.93306481838226 ) );816 path2.removeChild( path3 );817 display.updateDisplay();818 node5.transform.append( Matrix3.rotation2( 3.193159115871359 ) );819 display.updateDisplay();820 text0.removeChild( node4 );821 path3.stroke = paint0;822 path2.renderer = 'svg';823 node1.removeChild( path3 );824 path1.insertChild( 1, text0 );825 node1.renderer = null;826 path0.transform.prepend( Matrix3.translation( 11.588385235518217, 56.96204639971256 ) );827 text0.transform.append( Matrix3.rotation2( 5.68120271282823 ) );828 node6.removeChild( node4 );829 path3.fill = paint3;830 text1.stroke = paint0;831 path1.removeChild( text0 );832 node0.transform.append( Matrix3.scaling( 1.5976065738354066 ) );833 path1.insertChild( 1, node5 );834 text1.fill = paint5;835 path2.insertChild( 0, path0 );836 path1.shape = shape1;837 path0.removeChild( node1 );838 node0.renderer = 'svg';839 node0.renderer = null;840 text2.insertChild( 0, path2 );841 node2.insertChild( 0, node0 );842 path1.renderer = 'canvas';843 display.updateDisplay();844 node2.removeChild( node0 );845 node0.insertChild( 2, path2 );846 display.updateDisplay();847 text0.renderer = null;848 text0.removeChild( node2 );849 text1.removeChild( node6 );850 display.updateDisplay();851 path2.fill = paint2;852 path0.transform.prepend( Matrix3.translation( 0.34216628409922123, 92.05387863330543 ) );853 path3.insertChild( 0, node5 );854 node6.insertChild( 2, node4 );855 path2.fill = paint4;856 node4.removeChild( node2 );857 path3.fill = paint4;858 path1.transform.prepend( Matrix3.scaling( 0.8745874637965303 ) );859 node5.insertChild( 0, path2 );860 node2.insertChild( 0, node1 );861 path2.fill = paint2;862 text2.stroke = paint0;863 node6.removeChild( node5 );864 path0.fill = paint5;865 text0.transform.append( Matrix3.scaling( 0.9438613048982065 ) );866 path0.transform.setMatrix( Matrix3.scaling( 1.3656963593088278 ) );867 path2.removeChild( path0 );868 path2.insertChild( 0, text1 );869 path1.removeChild( text2 );870 path3.fill = paint3;871 path2.removeChild( text1 );872 text2.fill = paint3;873 text1.fill = paint2;874 text2.insertChild( 1, node4 );875 text1.fill = paint3;876 text0.insertChild( 0, node2 );877 text1.stroke = paint3;878 display.updateDisplay();879 path3.transform.prepend( Matrix3.translation( 73.50353361107409, -34.58644752390683 ) );880 node0.transform.setMatrix( Matrix3.translation( 1.3199703302234411, 74.09408940002322 ) );881 text1.insertChild( 0, node6 );882 node6.transform.prepend( Matrix3.scaling( 1.3595488889835963 ) );883 text2.transform.prepend( Matrix3.rotation2( 5.473872026112923 ) );884 path0.shape = shape0;885 text1.removeChild( node6 );886 node5.insertChild( 1, node2 );887 node2.removeChild( node1 );888 text2.removeChild( node4 );889 text1.transform.append( Matrix3.scaling( 0.7709866490908157 ) );890 node6.insertChild( 0, node2 );891 path3.removeChild( node5 );892 node5.transform.prepend( Matrix3.scaling( 1.1847915848478863 ) );893 path3.fill = paint1;894 path1.removeChild( path3 );895 node0.transform.setMatrix( Matrix3.scaling( 0.6245428699761819 ) );896 text1.fill = paint4;897 path1.stroke = paint0;898 path1.transform.prepend( Matrix3.translation( -82.16741997748613, 28.347921930253506 ) );899 scene.insertChild( 3, path3 );900 path3.insertChild( 0, node1 );901 path1.removeChild( node3 );902 path1.insertChild( 1, path0 );903 path1.removeChild( path0 );904 path1.removeChild( node5 );905 path3.renderer = 'svg';906 path0.transform.append( Matrix3.translation( -76.12051209434867, 43.94800164736807 ) );907 path2.renderer = null;908 scene.removeChild( text1 );909 path3.fill = paint0;910 path1.shape = shape3;911 path1.transform.append( Matrix3.rotation2( 0.23282799856354697 ) );912 display.updateDisplay();913 path3.removeChild( node1 );914 node5.insertChild( 0, path3 );915 node3.insertChild( 0, path3 );916 node2.transform.prepend( Matrix3.translation( -80.56120555847883, -25.92358822003007 ) );917 display.updateDisplay();918 node0.removeChild( path3 );919 text2.stroke = paint3;920 path0.fill = paint1;921 display.updateDisplay();922 path2.fill = paint3;923 display.updateDisplay();924 text1.fill = paint2;925 path0.shape = shape3;926 path3.insertChild( 0, path1 );927 node0.transform.append( Matrix3.translation( 12.59584897197783, 20.064754923805594 ) );928 text2.transform.setMatrix( Matrix3.scaling( 1.0618438214291075 ) );929 path2.transform.append( Matrix3.rotation2( 4.132909838958189 ) );930 scene.transform.prepend( Matrix3.translation( 57.32823261059821, -66.15866278298199 ) );931 display.updateDisplay();932 display.updateDisplay();933 node0.transform.prepend( Matrix3.rotation2( 0.10859754825521373 ) );934 path2.fill = paint0;935 display.updateDisplay();936 node5.transform.append( Matrix3.scaling( 0.8364831950742941 ) );937 node1.insertChild( 0, node4 );938 path3.shape = shape3;939 display.updateDisplay();940 node2.insertChild( 0, node1 );941 node6.insertChild( 4, path2 );942 node6.removeChild( path2 );943 node3.insertChild( 0, path0 );944 node5.insertChild( 0, path1 );945 scene.insertChild( 0, node4 );946 path2.shape = shape1;947 path0.fill = paint3;948 node5.transform.prepend( Matrix3.translation( 44.68629630282521, -21.516692312434316 ) );949 node3.transform.prepend( Matrix3.scaling( 1.5199747808505037 ) );950 text2.removeChild( path2 );951 node0.insertChild( 3, node4 );952 display.updateDisplay();953 path1.fill = paint2;954 node1.transform.setMatrix( Matrix3.scaling( 0.8095308953192275 ) );955 path0.fill = paint1;956 node3.transform.setMatrix( Matrix3.scaling( 1.1476977710839549 ) );957 display.updateDisplay();958 scene.removeChild( node6 );959 display.updateDisplay();960 node0.transform.setMatrix( Matrix3.translation( 33.04428271949291, 39.9213848169893 ) );961 display.updateDisplay();962 node6.removeChild( node3 );963 node6.removeChild( node4 );964 node6.transform.prepend( Matrix3.translation( 10.748354811221361, -73.36423271335661 ) );965 node0.removeChild( text1 );966 node6.removeChild( path0 );967 path1.transform.setMatrix( Matrix3.scaling( 1.0104035512771645 ) );968 text2.fill = paint2;969 display.updateDisplay();970 path2.shape = shape2;971 node5.renderer = 'canvas';972 path1.transform.prepend( Matrix3.translation( -69.14590587839484, 19.880587048828602 ) );973 node3.insertChild( 2, node2 );974 path2.insertChild( 0, text1 );975 display.updateDisplay();976 text0.removeChild( node0 );977 path3.transform.setMatrix( Matrix3.rotation2( 3.4165883704823514 ) );978 node0.renderer = 'svg';979 text0.fill = paint5;980 text2.insertChild( 0, node1 );981 display.updateDisplay();982 path3.fill = paint5;983 path0.insertChild( 0, path1 );984 node2.removeChild( node1 );985 display.updateDisplay();986 display.updateDisplay();987 display.updateDisplay();988 display.updateDisplay();989 node4.insertChild( 0, path0 );990 node3.transform.append( Matrix3.translation( -95.82784906961024, -34.498040145263076 ) );991 path2.insertChild( 1, node6 );992 path3.shape = shape0;993 text0.removeChild( node2 );994 node1.insertChild( 1, node3 );995 path0.fill = paint2;996 node5.transform.prepend( Matrix3.scaling( 1.5423861948069373 ) );997 text0.removeChild( path0 );998 node5.transform.setMatrix( Matrix3.scaling( 0.7694384168129604 ) );999 path1.transform.setMatrix( Matrix3.scaling( 0.8319447227981132 ) );1000 path1.transform.append( Matrix3.translation( 42.7957646548748, -58.12502424232662 ) );1001 display.updateDisplay();1002 display.updateDisplay();1003 node1.insertChild( 0, node5 );1004 display.updateDisplay();1005 node1.transform.append( Matrix3.scaling( 0.9261672311689895 ) );1006 text2.transform.setMatrix( Matrix3.translation( 93.89225733466446, -50.05272859707475 ) );1007 node5.transform.setMatrix( Matrix3.scaling( 1.1756866810605118 ) );1008 node4.transform.prepend( Matrix3.translation( 17.80007784254849, 25.68463124334812 ) );1009 text1.insertChild( 0, node4 );1010 node0.removeChild( path2 );1011 path0.shape = shape2;1012 node2.insertChild( 0, path1 );1013 node3.removeChild( node2 );1014 display.updateDisplay();1015 path3.renderer = null;1016 node2.renderer = 'svg';1017 path0.shape = shape1;1018 path2.insertChild( 2, path1 );1019 scene.removeChild( path3 );1020 scene.insertChild( 0, text1 );1021 node6.transform.setMatrix( Matrix3.rotation2( 0.8807963123818441 ) );1022 text2.transform.setMatrix( Matrix3.scaling( 1.4406909212697485 ) );1023 node6.transform.setMatrix( Matrix3.translation( 8.969703316688538, 25.850486429408193 ) );1024 display.updateDisplay();1025 text2.removeChild( node1 );1026 scene.removeChild( text1 );1027 node0.renderer = null;1028 text0.fill = paint0;1029 node2.removeChild( path1 );1030 path0.insertChild( 1, node6 );1031 display.updateDisplay();1032 path1.stroke = paint1;1033 node3.removeChild( path3 );1034 node1.transform.prepend( Matrix3.rotation2( 0.3136961511381274 ) );1035 node0.insertChild( 1, node6 );1036 path3.transform.append( Matrix3.rotation2( 2.967609471223324 ) );1037 display.updateDisplay();1038 path0.removeChild( path1 );1039 node1.removeChild( node4 );1040 path0.removeChild( node6 );1041 path1.renderer = 'svg';1042 node3.removeChild( path0 );1043 node5.removeChild( path3 );1044 node5.insertChild( 0, text1 );1045 node4.insertChild( 0, node6 );1046 path3.removeChild( path1 );1047 path1.transform.prepend( Matrix3.scaling( 0.6747856395080876 ) );1048 node1.transform.setMatrix( Matrix3.scaling( 0.7458631742041748 ) );1049 display.updateDisplay();1050 display.updateDisplay();1051 display.updateDisplay();1052 path3.transform.prepend( Matrix3.scaling( 1.446340951951612 ) );1053 node3.insertChild( 0, node4 );1054 path1.fill = paint1;1055 path3.fill = paint1;1056 node6.removeChild( node2 );1057 node2.renderer = null;1058 path2.transform.append( Matrix3.scaling( 0.6796344484895658 ) );1059 display.updateDisplay();1060 path3.shape = shape3;1061 scene.insertChild( 1, path2 );1062 scene.removeChild( node4 );1063 display.updateDisplay();1064 path3.insertChild( 0, path0 );1065 path0.renderer = 'canvas';1066 path0.renderer = null;1067 path1.transform.append( Matrix3.translation( -35.264304326847196, 96.3960608933121 ) );1068 path0.transform.prepend( Matrix3.scaling( 0.9710232618957948 ) );1069 node1.removeChild( node5 );1070 path3.shape = shape0;1071 node3.renderer = 'svg';1072 path2.stroke = paint2;1073 display.updateDisplay();1074 path0.shape = shape2;1075 node2.transform.setMatrix( Matrix3.rotation2( 4.1226984674192915 ) );1076 node2.transform.setMatrix( Matrix3.rotation2( 4.852877952588577 ) );1077 path3.fill = paint4;1078 node5.transform.setMatrix( Matrix3.translation( 68.04132326506078, 50.3698687069118 ) );1079 scene.removeChild( path2 );1080 display.updateDisplay();1081 display.updateDisplay();1082 node6.transform.setMatrix( Matrix3.scaling( 0.9294793844450455 ) );1083 path2.removeChild( text1 );1084 text0.fill = paint2;1085 node3.insertChild( 1, path1 );1086 path3.shape = shape2;1087 node1.insertChild( 0, path2 );1088 path1.transform.append( Matrix3.translation( 17.683354765176773, -44.996290653944016 ) );1089 node4.insertChild( 1, path1 );1090 node0.insertChild( 2, path3 );1091 text1.stroke = paint4;1092 text1.fill = paint0;1093 scene.transform.append( Matrix3.scaling( 1.598179875756074 ) );1094 path2.removeChild( node6 );1095 node1.insertChild( 0, node6 );1096 display.updateDisplay();1097 display.updateDisplay();1098 path0.transform.prepend( Matrix3.scaling( 1.4355965870194325 ) );1099 scene.transform.append( Matrix3.rotation2( 3.338968324678741 ) );1100 path2.fill = paint3;1101 node5.insertChild( 0, text0 );1102 node4.transform.setMatrix( Matrix3.translation( 39.015086973086, -82.52983423881233 ) );1103 display.updateDisplay();1104 display.updateDisplay();1105 text0.insertChild( 0, path1 );1106 text1.stroke = paint0;1107 path2.removeChild( path1 );1108 path3.removeChild( path0 );1109 node1.removeChild( node6 );1110 node4.removeChild( path0 );1111 text2.transform.append( Matrix3.translation( 90.54536130279303, 32.8832883387804 ) );1112 node3.removeChild( path1 );1113 scene.transform.setMatrix( Matrix3.translation( -63.68664521723986, 29.024989902973175 ) );1114 text1.transform.append( Matrix3.translation( 35.083020152524114, 99.85289294272661 ) );1115 node1.transform.append( Matrix3.translation( -78.29272500239313, -68.44352912157774 ) );1116 node3.removeChild( node4 );1117 node0.removeChild( text2 );1118 scene.insertChild( 0, node5 );1119 display.updateDisplay();1120 display.updateDisplay();1121 node1.insertChild( 2, scene );1122 path0.insertChild( 0, node6 );1123 node5.removeChild( path1 );1124 node0.removeChild( node6 );1125 display.updateDisplay();1126 path2.transform.prepend( Matrix3.scaling( 0.8058666483260881 ) );1127 path3.transform.prepend( Matrix3.scaling( 1.348115322761629 ) );1128 text1.stroke = paint2;1129 display.updateDisplay();1130 display.updateDisplay();1131 scene.removeChild( node5 );1132 path3.fill = paint0;1133 text0.removeChild( path1 );1134 path1.stroke = paint0;1135 path0.shape = shape3;1136 node6.insertChild( 0, node3 );1137 display.updateDisplay();1138 node2.insertChild( 0, path1 );1139 node0.insertChild( 3, node6 );1140 node2.insertChild( 1, text2 );1141 path1.shape = shape2;1142 display.updateDisplay();1143 node1.transform.append( Matrix3.translation( 48.2739788480103, -88.90814171172678 ) );1144 display.updateDisplay();1145 display.updateDisplay();1146 text2.stroke = paint0;1147 scene.removeChild( node3 );1148 text2.stroke = paint3;1149 path0.insertChild( 1, node4 );1150 node4.removeChild( path1 );1151 text1.removeChild( node4 );1152 node0.removeChild( node4 );1153 node6.transform.append( Matrix3.scaling( 1.2273195531446675 ) );1154 node6.transform.setMatrix( Matrix3.scaling( 0.974072394309957 ) );1155 path0.insertChild( 0, text1 );1156 node4.removeChild( node6 );1157 path2.transform.append( Matrix3.translation( -31.928275851532817, 31.42418572679162 ) );1158 display.updateDisplay();1159 node2.insertChild( 0, text1 );1160 path3.insertChild( 0, node5 );1161 path1.renderer = null;1162 text1.stroke = paint3;1163 node2.transform.append( Matrix3.translation( -87.78515825979412, -57.75049920193851 ) );1164 path3.shape = shape1;1165 path0.insertChild( 3, node0 );1166 display.updateDisplay();1167 node5.insertChild( 2, path1 );1168 display.updateDisplay();1169 path3.removeChild( node5 );1170 display.updateDisplay();1171 path2.transform.setMatrix( Matrix3.rotation2( 2.595849141844823 ) );1172 path0.stroke = paint2;1173 display.updateDisplay();1174 node1.transform.setMatrix( Matrix3.rotation2( 5.289866277877784 ) );1175 node5.renderer = null;1176 node3.transform.append( Matrix3.scaling( 0.8371958680212688 ) );1177 node6.removeChild( path3 );1178 text0.fill = paint3;1179 path3.shape = shape2;1180 node2.transform.append( Matrix3.translation( 1.6835276503115892, 58.78804912790656 ) );1181 path1.insertChild( 0, node1 );1182 node5.removeChild( path2 );1183 display.updateDisplay();1184 node1.insertChild( 3, text1 );1185 node4.insertChild( 0, node5 );1186 path0.removeChild( node4 );1187 path2.insertChild( 0, node6 );1188 path2.shape = shape0;1189 path0.removeChild( text1 );1190 node2.removeChild( text2 );1191 path2.removeChild( node6 );1192 node5.removeChild( path1 );1193 display.updateDisplay();1194 path0.removeChild( node0 );1195 path0.removeChild( node6 );1196 node5.transform.setMatrix( Matrix3.translation( 53.765451023355126, 46.17750230245292 ) );1197 display.updateDisplay();1198 path1.fill = paint4;1199 node4.transform.append( Matrix3.translation( -15.302766533568501, -1.2454335577785969 ) );1200 node6.removeChild( node3 );1201 display.updateDisplay();1202 text0.insertChild( 0, node3 );1203 display.updateDisplay();1204 node2.transform.append( Matrix3.translation( 84.65924230404198, -60.87620249018073 ) );1205 node2.removeChild( path1 );1206 text2.insertChild( 0, node1 );1207 node5.removeChild( node2 );1208 node3.renderer = null;1209 path3.fill = paint3;1210 text1.transform.setMatrix( Matrix3.scaling( 1.3864617453649828 ) );1211 path0.transform.setMatrix( Matrix3.scaling( 1.4961199873354474 ) );1212 display.updateDisplay();1213 path1.insertChild( 1, scene );1214 display.updateDisplay();1215 node3.renderer = 'canvas';1216 node5.removeChild( text1 );1217 display.updateDisplay();1218 display.updateDisplay();1219 display.updateDisplay();1220 node5.transform.append( Matrix3.scaling( 1.4155547857511976 ) );1221 text0.transform.prepend( Matrix3.scaling( 1.2851721943583527 ) );1222 node5.removeChild( text0 );1223 node1.transform.prepend( Matrix3.scaling( 1.575174070079271 ) );1224 node0.removeChild( node6 );1225 path3.insertChild( 0, node2 );1226 text0.insertChild( 0, text1 );1227 path3.removeChild( node2 );1228 node4.transform.prepend( Matrix3.translation( 92.18073445372283, -88.26223919168115 ) );1229 node2.removeChild( text1 );1230 path3.stroke = paint4;1231 display.updateDisplay();1232 display.updateDisplay();1233 display.updateDisplay();1234 node4.removeChild( node5 );1235 text0.transform.prepend( Matrix3.scaling( 1.0657979293022493 ) );1236 node2.transform.prepend( Matrix3.rotation2( 1.2734425447020365 ) );1237 node0.removeChild( path3 );1238 text1.transform.setMatrix( Matrix3.translation( 16.231784503906965, -70.51777318120003 ) );1239 node0.transform.prepend( Matrix3.scaling( 1.3482453456375936 ) );1240 text0.removeChild( text1 );1241 text1.transform.prepend( Matrix3.translation( 16.831281781196594, -17.87359449081123 ) );1242 display.updateDisplay();1243 text1.fill = paint2;1244 text2.renderer = 'svg';1245 display.updateDisplay();1246 scene.transform.append( Matrix3.scaling( 1.1725298586528936 ) );1247 path2.stroke = paint4;1248 display.updateDisplay();1249 path3.fill = paint5;1250 display.updateDisplay();1251 display.updateDisplay();1252 path3.insertChild( 0, node3 );1253 node6.insertChild( 0, scene );1254 path1.shape = shape1;1255 text1.transform.prepend( Matrix3.translation( -81.9732257630676, -46.807631151750684 ) );1256 scene.transform.prepend( Matrix3.translation( 17.378842597827315, 21.12641679123044 ) );1257 path3.shape = shape3;1258 path3.stroke = paint5;1259 path0.insertChild( 0, node6 );1260 path0.removeChild( node6 );1261 display.updateDisplay();1262 display.updateDisplay();1263 path0.stroke = paint1;1264 node0.transform.setMatrix( Matrix3.rotation2( 4.652179560054944 ) );1265 scene.insertChild( 0, node4 );1266 path3.transform.prepend( Matrix3.scaling( 1.3556024435669372 ) );1267 text0.removeChild( node3 );1268 text1.fill = paint5;1269 node2.renderer = 'canvas';1270 display.updateDisplay();1271 node6.removeChild( scene );1272 display.updateDisplay();1273 node4.transform.setMatrix( Matrix3.scaling( 1.2692908524763027 ) );1274 display.updateDisplay();1275 text1.transform.setMatrix( Matrix3.translation( 64.43961863406003, -66.9884747825563 ) );1276 node0.transform.append( Matrix3.translation( -86.33558927103877, 80.5636577308178 ) );1277 path2.transform.prepend( Matrix3.scaling( 1.2371882979054192 ) );1278 path2.fill = paint2;1279 path1.transform.prepend( Matrix3.translation( -38.82167376577854, -71.56986258924007 ) );1280 text1.transform.setMatrix( Matrix3.translation( -84.45890285074711, 91.41587358899415 ) );1281 path0.transform.append( Matrix3.scaling( 0.8451847842656266 ) );1282 text2.transform.setMatrix( Matrix3.scaling( 0.6785959604889344 ) );1283 text0.transform.setMatrix( Matrix3.translation( 37.68878132104874, -12.956778379157186 ) );1284 node2.insertChild( 0, text0 );1285 node3.insertChild( 0, path2 );1286 node4.transform.append( Matrix3.scaling( 0.7687972824782323 ) );1287 node5.transform.setMatrix( Matrix3.scaling( 0.6260077016189884 ) );1288 text1.transform.prepend( Matrix3.scaling( 0.8837381858606081 ) );1289 node3.renderer = null;1290 node0.removeChild( scene );1291 path0.insertChild( 0, node0 );1292 path0.shape = shape0;1293 path1.transform.append( Matrix3.scaling( 0.8582783922314834 ) );1294 path1.stroke = paint2;1295 node6.insertChild( 0, path3 );1296 path3.transform.append( Matrix3.translation( 83.328738482669, -46.94196437485516 ) );1297 path1.removeChild( node1 );1298 path3.stroke = paint4;1299 path0.removeChild( node0 );1300 text0.transform.prepend( Matrix3.scaling( 0.821637343731169 ) );1301 node1.renderer = 'canvas';1302 display.updateDisplay();1303 path1.shape = shape2;1304 text0.insertChild( 0, node0 );1305 path2.fill = paint5;1306 scene.transform.append( Matrix3.rotation2( 4.64650113527433 ) );1307 path1.shape = shape0;1308 scene.insertChild( 1, node3 );1309 path3.transform.prepend( Matrix3.scaling( 0.6607098999660652 ) );1310 display.updateDisplay();1311 assert.ok( true, 'so we have at least 1 test in this set' );1312 display.dispose();1313} );

Full Screen

Full Screen

game.js

Source:game.js Github

copy

Full Screen

...328 329function loadMenu(event){330 console.log("LOAD MENU"); 331 buildButton.removeEventListener("click", loadMenu);332 stage.removeChild(attackButton);333 stage.removeChild(settingsButton);334 loadBuildingButton.addEventListener("click", loadBuildingMenu);335 loadBuildingButton.graphics.beginFill("#0000F").drawRect(812, 229, 310, 288);336 337 loadZombieButton.graphics.beginFill("#0000F").drawRect(422, 229, 310, 288); ////Added zombie button to build menu338 loadZombieButton.addEventListener("click", loadZombieMenu);339 loadDefenseButton.graphics.beginFill("#0000F").drawRect(1183, 229, 310, 288); //// " Defense "340 loadDefenseButton.addEventListener("click", loadDefenseMenu);341 closeBuildMenuButton.graphics.beginFill("#0000F").drawRect(1548, 110, 46, 46); //// X close button was built!!342 closeBuildMenuButton.alpha = .1;343 closeBuildMenuButton.addEventListener("click", closeBuildMenu); //Added button Listener to close344 345 stage.addChild(loadDefenseButton); //Sergio346 stage.addChild(loadZombieButton); //Sergio347 stage.addChild(closeBuildMenuButton); //Sergio348 stage.addChild(loadBuildingButton);349 350 buildMenu = new createjs.Bitmap(queue.getResult("buildMenu")); //Declared as global now --Sergio351 buildMenu.x = 310;352 buildMenu.y = 90;353 stage.addChild(buildMenu);354}355function addFpsBmp(){356 switch(fps){357 case 30:358 stage.addChild(fps30);359 break;360 case 45:361 stage.addChild(fps45);362 break;363 case 60:364 stage.addChild(fps60);365 break;366 default:367 console.log("Error: Invalid fps("+ fps +")");368 }369}370function removePrevFpsBmp(){371 switch(prevFPS){372 case 30:373 stage.removeChild(fps30);374 break;375 case 45:376 stage.removeChild(fps45);377 break;378 case 60:379 stage.removeChild(fps60);380 break;381 default:382 console.log("Error: Invalid fps("+ fps +")");383 }384}385function removePrevSoundBmp(){386 if(prevSound)387 stage.removeChild(soundOnBmp);388 else389 stage.removeChild(soundOffBmp);390}391function addSoundBmp(){392 if(soundOn)393 stage.addChild(soundOnBmp);394 else395 stage.addChild(soundOffBmp);396}397function loadSettings(){398 prevFPS = fps;399 prevSound = soundOn;400 buildButton.removeEventListener("click", loadMenu);401 stage.removeChild(attackButton);402 stage.removeChild(settingsButton);403 fps30 = new createjs.Bitmap(queue.getResult("30Fps"));404 fps30.x = 653;405 fps30.y = 393;406 fps45 = new createjs.Bitmap(queue.getResult("45Fps"));407 fps45.x = 653;408 fps45.y = 393;409 fps60 = new createjs.Bitmap(queue.getResult("60Fps"));410 fps60.x = 653;411 fps60.y = 393;412 soundOnBmp = new createjs.Bitmap(queue.getResult("soundOn"));413 soundOnBmp.x = 757;414 soundOnBmp.y = 220;415 soundOffBmp = new createjs.Bitmap(queue.getResult("soundOff"));416 soundOffBmp.x = 757;417 soundOffBmp.y = 220;418 quitGame.graphics.beginFill("#0000F").drawRect(848, 558, 227, 75);419 quitGame.alpha = .01;420 quitGame.addEventListener("click", function() {421 if (confirm('Are you sure you want to leave FORT OUTBREAK?')) {422 window.location.href = "http://engineering.tamu.edu/cse/";423 } else {424 }425 });426 fpsButton30.graphics.beginFill("#0000F").drawRect(653, 393, 210, 58);427 fpsButton30.alpha = .01;428 fpsButton30.addEventListener("click", function() {429 fps = 30;430 removePrevFpsBmp();431 addFpsBmp();432 createjs.Ticker.setFPS(fps);433 prevFPS = fps;434 });435 fpsButton45.graphics.beginFill("#0000F").drawRect(863, 393, 202, 58);436 fpsButton45.alpha = .01;437 fpsButton45.addEventListener("click", function() {438 fps = 45;439 removePrevFpsBmp();440 addFpsBmp();441 createjs.Ticker.setFPS(fps);442 prevFPS = fps;443 });444 fpsButton60.graphics.beginFill("#0000F").drawRect(1064, 393 , 205, 58);445 fpsButton60.alpha = .01;446 fpsButton60.addEventListener("click", function() {447 fps = 60;448 removePrevFpsBmp();449 addFpsBmp();450 createjs.Ticker.setFPS(fps);451 prevFPS = fps;452 });453 soundOnButton.graphics.beginFill("#0000F").drawRect(757, 220, 210, 58);454 soundOnButton.alpha = .01;455 soundOnButton.addEventListener("click", function() {456 soundOn = true;457 removePrevSoundBmp();458 addSoundBmp();459 createjs.Sound.alternateExtensions = ["wav"];460 createjs.Sound.registerSound("sounds/zombieAttack.wav", "zombieAttack");461 createjs.Sound.registerSound("sounds/zombieDied.wav", "zombieDied");462 createjs.Sound.registerSound("sounds/buildingDestroyed.wav", "buildingDestroyed");463 createjs.Sound.registerSound("sounds/buildingPlaced.wav", "buildingPlaced");464 createjs.Sound.registerSound("sounds/smallZombiePlaced.wav", "smallZombiePlaced");465 createjs.Sound.registerSound("sounds/kingZombiePlaced.wav", "kingZombiePlaced");466 createjs.Sound.registerSound("sounds/victory.wav", "victory");467 createjs.Sound.registerSound("sounds/youLose.wav", "youLose");468 //createjs.Sound.registerSound("sounds/flames.mp3", "flames");469 //We only want to have one of this at a time (or it sounds nasty :D)470 createjs.Sound.registerSound("sounds/flames.mp3", "flames", 1);471 createjs.Sound.registerSound("sounds/orbShotFired.mp3", "orbShotFired");472 createjs.Sound.registerSound("sounds/turretShotFired.mp3", "turretShotFired");473 prevSound = soundOn;474 });475 soundOffButton.graphics.beginFill("#0000F").drawRect(967, 220, 210, 58);476 soundOffButton.alpha = .01;477 soundOffButton.addEventListener("click", function() {478 soundOn = false;479 removePrevSoundBmp();480 addSoundBmp();481 createjs.Sound.removeAllSounds();482 prevSound = soundOn;483 });484 closeSettings.graphics.beginFill("#0000F").drawRect(1263, 53, 46, 46);485 closeSettings.alpha = .01;486 closeSettings.addEventListener("click", closeSettingsMenu);487 settingsMenu = new createjs.Bitmap(queue.getResult("settings"));488 settingsMenu.x = 586;489 settingsMenu.y = 40;490 stage.addChild(settingsMenu);491 addFpsBmp();492 addSoundBmp();493 stage.addChild(closeSettings);494 stage.addChild(fpsButton30);495 stage.addChild(fpsButton45);496 stage.addChild(fpsButton60);497 stage.addChild(soundOnButton);498 stage.addChild(soundOffButton);499 stage.addChild(quitGame);500}501function loadZombieMenu(event){502 loadDefenseButton.removeEventListener("click", loadDefenseMenu);503 loadZombieButton.removeEventListener("click", loadZombieMenu);504 loadBuildingButton.removeEventListener("click", loadBuildingMenu);505 closeBuildMenuButton.removeEventListener("click", closeBuildMenu);506 stage.removeChild(buildMenu);507 stage.removeChild(loadBuildingButton); //Remove Old building menu image --Sergio508 stage.removeChild(loadDefenseButton); //Sergio509 stage.removeChild(loadZombieButton); //Sergio510 stage.removeChild(closeBuildMenuButton);511 stage.removeChild(attackButton);512 stage.removeChild(lowerMenu);513 stage.removeChild(lowerMenu);514 stage.removeChild(moneyAmountText);515 stage.removeChild(playerText);516 stage.removeChild(moneyText);517 stage.removeChild(timerText);518 stage.removeChild(zombieCapText);519 stage.removeChild(zombieCapacityText);520 stage.removeChild(usedZombieCapText);521 stage.removeChild(usedZombieCapacityText);522 stage.removeChild(enemyHealthCover);523 stage.removeChild(teamHealthCover);524 doneButton = new createjs.Bitmap(queue.getResult("doneButton"));525 zombiesMenu = new createjs.Bitmap(queue.getResult("zombiesMenu"));526 doneButton.addEventListener("click", closeZombieMenu);527 zombiesMenu.y = 674;528 doneButton.x = 1525;529 doneButton.y = 860;530 greenZombie.x = 454;531 greenZombie.y = 842;532 blueZombie.x = 454;533 blueZombie.y = 842;534 blueKing.x = 953;535 blueKing.y = 814;536 greenKing.x = 953;537 greenKing.y = 814;538 stage.addChild(zombiesMenu);539 stage.addChild(doneButton);540 541 var small;542 var king;543 544 if(myIndex >= 2){545 king = blueKing;546 small = blueZombie;547 }548 else{549 king = greenKing;550 small = greenZombie;551 }552 553 stage.addChild(small);554 stage.addChild(king);555 556 smallZombieButton = new createjs.Shape();557 smallZombieButton.graphics.beginFill("#000").drawRect(350,740,235,225);558 smallZombieButton.alpha = 0.01;559 smallZombieButton.addEventListener("click", function(event) {560 placeZombie(smallZombiePrice, "small");561 });562 563 kingZombieButton = new createjs.Shape();564 kingZombieButton.graphics.beginFill("#000").drawRect(880,740,235,225);565 kingZombieButton.alpha = 0.01;566 kingZombieButton.addEventListener("click", function(event) {567 placeZombie(kingZombiePrice, "king");568 });569 570 smallZombieCost= new createjs.Text("$" + smallZombiePrice, "bold 25px Lithos", "#fff");571 smallZombieCost.x = 433;572 smallZombieCost.y = 923;573 574 kingZombieCost= new createjs.Text("$" + kingZombiePrice, "bold 25px Lithos", "#fff");575 kingZombieCost.x = 961;576 kingZombieCost.y = 923;577 578 //Beginning Stats579 580 kingZombieHpStat = new createjs.Text(kingZombieHp, "bold 23px Lithos", "#fff");581 kingZombieHpStat.x = 1185;582 kingZombieHpStat.y = 798;583 kingZombieSpeedStat = new createjs.Text(kingZombieSpeed, "bold 23px Lithos", "#fff");584 kingZombieSpeedStat.x = 1245;585 kingZombieSpeedStat.y = 842;586 587 kingZombieAttackStat = new createjs.Text(kingZombieAttack, "bold 23px Lithos", "#fff");588 kingZombieAttackStat.x = 1245;589 kingZombieAttackStat.y = 890;590 smallZombieHpStat = new createjs.Text(smallZombieHp, "bold 23px Lithos", "#fff");591 smallZombieHpStat.x = 658;592 smallZombieHpStat.y = 794;593 smallZombieSpeedStat = new createjs.Text(smallZombieSpeed, "bold 23px Lithos", "#fff");594 smallZombieSpeedStat.x = 715;595 smallZombieSpeedStat.y = 840;596 597 smallZombieAttackStat = new createjs.Text(smallZombieAttack, "bold 23px Lithos", "#fff");598 smallZombieAttackStat.x = 715;599 smallZombieAttackStat.y = 885; 600 //End Stats601 602 stage.addChild(smallZombieButton);603 stage.addChild(kingZombieButton);604 stage.addChild(smallZombieCost);605 stage.addChild(kingZombieCost);606 stage.addChild(kingZombieHpStat);607 stage.addChild(kingZombieSpeedStat);608 stage.addChild(kingZombieAttackStat);609 stage.addChild(smallZombieHpStat);610 stage.addChild(smallZombieSpeedStat);611 stage.addChild(smallZombieAttackStat);612}613function loadBuildingMenu(event){614 loadDefenseButton.removeEventListener("click", loadDefenseMenu);615 loadZombieButton.removeEventListener("click", loadZombieMenu);616 loadBuildingButton.removeEventListener("click", loadBuildingMenu);617 closeBuildMenuButton.removeEventListener("click", closeBuildMenu);618 stage.removeChild(buildMenu); //Remove Old building menu image --Sergio619 stage.removeChild(loadBuildingButton); //Remove Old building menu image --Sergio620 stage.removeChild(loadDefenseButton); //Sergio621 stage.removeChild(loadZombieButton); //Sergio622 stage.removeChild(closeBuildMenuButton);623 stage.removeChild(lowerMenu);624 stage.removeChild(moneyAmountText);625 stage.removeChild(playerText);626 stage.removeChild(moneyText);627 stage.removeChild(timerText);628 stage.removeChild(zombieCapText);629 stage.removeChild(zombieCapacityText);630 stage.removeChild(usedZombieCapText);631 stage.removeChild(usedZombieCapacityText);632 stage.removeChild(enemyHealthCover);633 stage.removeChild(teamHealthCover);634 635 console.log("LOAD BUILDING");636 buildingsMenu = new createjs.Bitmap(queue.getResult("buildingsMenu"));637 buildingsMenu.y = 674;638 factoryImage = new createjs.Bitmap(queue.getResult("factory"))639 factoryImage.x = 400;640 factoryImage.y = 800;641 factoryButton = new createjs.Shape();642 factoryButton.graphics.beginFill("#000000").drawRect(350, 740, 235, 225);643 factoryButton.addEventListener("click", function(event) {644 placeBuilding(event, buildingPrice, factoryImage, "factory");645 });646 factoryButton.alpha = 0.01;647 648 bank = new createjs.Bitmap(queue.getResult("bank"));649 bank.x = 940;650 bank.y = 804;651 652 bankButton = new createjs.Shape();653 bankButton.graphics.beginFill("#000").drawRect(880,740,235,225);654 bankButton.addEventListener("click", function(event) {655 placeBuilding(event, buildingPrice, bank, "bank");656 });657 bankButton.alpha = 0.01;658 659 cage = new createjs.Bitmap(queue.getResult("cage"));660 cage.x = 1467;661 cage.y = 797;662 663 cageButton = new createjs.Shape();664 cageButton.graphics.beginFill("#000").drawRect(1400,740,235,225);665 cageButton.addEventListener("click", function(event) {666 placeBuilding(event, buildingPrice, cage, "cage");667 });668 cageButton.alpha = 0.01;669 670 buildingsDoneButton = new createjs.Bitmap(queue.getResult("doneButton"));671 buildingsDoneButton.addEventListener("click", closeBuildingsMenu);672 buildingsDoneButton.x = 1687;673 buildingsDoneButton.y = 874;674 attackButton.graphics.beginFill("#000000").drawRect(260, 906, 147, 55);675 attackButton.alpha = 0.01;676 677 factoryCost= new createjs.Text("$" + buildingPrice, "bold 25px Lithos", "#fff");678 factoryCost.x = 432;679 factoryCost.y = 923;680 681 bankCost= new createjs.Text("$" + buildingPrice, "bold 25px Lithos", "#fff");682 bankCost.x = 966;683 bankCost.y = 923;684 685 cageCost= new createjs.Text("$" + buildingPrice, "bold 25px Lithos", "#fff");686 cageCost.x = 1484;687 cageCost.y = 923;688 689 stage.addChild(factoryButton);690 stage.addChild(buildingsMenu);691 stage.addChild(bank);692 stage.addChild(cage);693 stage.addChild(factoryImage);694 stage.addChild(bankButton);695 stage.addChild(cageButton);696 stage.addChild(buildingsDoneButton);697 stage.addChild(factoryCost);698 stage.addChild(bankCost);699 stage.addChild(cageCost);700}701function loadDefenseMenu(event) {702 loadDefenseButton.removeEventListener("click", loadDefenseMenu);703 loadZombieButton.removeEventListener("click", loadZombieMenu);704 loadBuildingButton.removeEventListener("click", loadBuildingMenu);705 closeBuildMenuButton.removeEventListener("click", closeBuildMenu);706 stage.removeChild(buildMenu); //Remove Old building menu image --Sergio707 stage.removeChild(loadBuildingButton); //Remove Old building menu image --Sergio708 stage.removeChild(loadDefenseButton); //Sergio709 stage.removeChild(loadZombieButton); //Sergio710 stage.removeChild(closeBuildMenuButton);711 stage.removeChild(attackButton);712 stage.removeChild(lowerMenu);713 stage.removeChild(moneyAmountText);714 stage.removeChild(playerText);715 stage.removeChild(moneyText);716 stage.removeChild(timerText);717 stage.removeChild(zombieCapText);718 stage.removeChild(zombieCapacityText);719 stage.removeChild(usedZombieCapText);720 stage.removeChild(usedZombieCapacityText);721 stage.removeChild(enemyHealthCover);722 stage.removeChild(teamHealthCover);723 724 defensesMenu = new createjs.Bitmap(queue.getResult("defensesMenu"));725 defensesDoneButton = new createjs.Bitmap(queue.getResult("doneButton"));726 turret = new createjs.Bitmap(queue.getResult("turret"));727 orb = new createjs.Bitmap(queue.getResult("orb"));728 defensesDoneButton.addEventListener("click", closeDefensesMenu);729 730 defensesMenu.y = 659;731 orb.x = 942;732 orb.y = 805;733 turret.x = 400;734 turret.y = 804;735 defensesDoneButton.x = 1525;736 defensesDoneButton.y = 860;737 turretButton = new createjs.Shape();738 turretButton.graphics.beginFill("#000").drawRect(350,750,240,215);739 turretButton.alpha = 0.01;740 turretButton.addEventListener('click', function(event) {741 placeBuilding(event, turretPrice, turret, "turret");742 });743 744 orbButton = new createjs.Shape();745 orbButton.graphics.beginFill("#000").drawRect(870,750,240,215);746 orbButton.alpha = 0.01;747 orbButton.addEventListener('click', function(event) {748 placeBuilding(event, orbPrice, orb, "orb");749 });750 751 turretCost= new createjs.Text("$" + turretPrice, "bold 25px Lithos", "#fff");752 turretCost.x = 418;753 turretCost.y = 923;754 755 orbCost= new createjs.Text("$" + orbPrice, "bold 25px Lithos", "#fff");756 orbCost.x = 948;757 orbCost.y = 923;758 759 //Beginning Stats760 turretHpStat = new createjs.Text(buildingHp, "bold 23px Lithos", "#fff");761 turretHpStat.x = 674;762 turretHpStat.y = 838;763 turretSpeedStat = new createjs.Text(turretSpeed, "bold 23px Lithos", "#fff");764 turretSpeedStat.x = 730;765 turretSpeedStat.y = 888;766 767 turretAttackStat = new createjs.Text(turretAttack, "bold 23px Lithos", "#fff");768 turretAttackStat.x = 730;769 turretAttackStat.y = 930;770 771 772 orbHpStat = new createjs.Text(buildingHp, "bold 23px Lithos", "#fff");773 orbHpStat.x = 1195;774 orbHpStat.y = 838;775 orbSpeedStat = new createjs.Text(orbSpeed, "bold 23px Lithos", "#fff");776 orbSpeedStat.x = 1249;777 orbSpeedStat.y = 888; 778 779 orbAttackStat = new createjs.Text(orbAttack, "bold 23px Lithos", "#fff");780 orbAttackStat.x = 1249;781 orbAttackStat.y = 930;782 783 //End Stats784 785 stage.addChild(turretButton);786 stage.addChild(orbButton);787 stage.addChild(defensesMenu);788 stage.addChild(defensesDoneButton);789 stage.addChild(orb);790 stage.addChild(turret);791 stage.addChild(orbCost);792 stage.addChild(turretCost);793 stage.addChild(turretHpStat);794 stage.addChild(turretSpeedStat);795 stage.addChild(turretAttackStat);796 stage.addChild(orbHpStat);797 stage.addChild(orbSpeedStat);798 stage.addChild(orbAttackStat);799}800function closeBuildMenu(even){801////-----------------------Dont forget to REMOVE LISTENERS!!!!!!!! -----Sergio802 stage.removeChild(buildMenu); //Remove Old building menu image --Sergio803 stage.removeChild(loadBuildingButton); //Remove Old building menu image --Sergio804 stage.removeChild(loadDefenseButton); //Sergio805 stage.removeChild(loadZombieButton); //Sergio806 stage.removeChild(closeBuildMenuButton);807 stage.addChild(attackButton);808 loadBuildingButton.removeEventListener("click", loadBuildingMenu);809 closeBuildMenuButton.removeEventListener("click", closeBuildMenu);810 buildButton.addEventListener("click", loadMenu);811 settingsButton.addEventListener("click", loadSettings);812 stage.addChild(settingsButton);813}814function closeSettingsMenu(){815 stage.removeChild(settingsMenu);816 stage.removeChild(closeSettings);817 removePrevFpsBmp(prevFPS);818 if(soundOn)819 stage.removeChild(soundOnBmp);820 else821 stage.removeChild(soundOffBmp);822 stage.removeChild(fpsButton30);823 stage.removeChild(fpsButton45);824 stage.removeChild(fpsButton60);825 stage.removeChild(soundOnButton);826 stage.removeChild(soundOffButton);827 stage.removeChild(quitGame);828 // Remember: Remove buildings creation event listeners829 buildButton.addEventListener("click", loadMenu);830 settingsButton.addEventListener("click", loadSettings);831 stage.addChild(settingsButton);832 stage.addChild(attackButton);833}834function closeZombieMenu(even){835 stage.removeChild(zombiesMenu);836 stage.removeChild(doneButton);837 // Remember: Remove zombie creation event listeners838 doneButton.removeEventListener("click", closeZombieMenu);839 stage.addChild(lowerMenu);840 stage.addChild(attackButton);841 buildButton.addEventListener("click", loadMenu);842 stage.removeChild(buildingsMenu);843 stage.addChild(lowerMenu);844 stage.addChild(moneyText);845 stage.addChild(moneyAmountText);846 stage.addChild(playerText);847 stage.addChild(timerText);848 849 stage.addChild(zombieCapText);850 stage.addChild(zombieCapacityText);851 stage.addChild(usedZombieCapText);852 stage.addChild(usedZombieCapacityText);853 854 stage.addChild(enemyHealthCover);855 stage.addChild(teamHealthCover);856 stage.removeChild(greenKing);857 stage.removeChild(greenZombie);858 stage.removeChild(blueKing);859 stage.removeChild(blueZombie);860 stage.removeChild(smallZombieButton);861 stage.removeChild(kingZombieButton);862 stage.removeChild(smallZombieCost);863 stage.removeChild(kingZombieCost);864 stage.removeChild(smallZombieHpStat);865 stage.removeChild(smallZombieAttackStat);866 stage.removeChild(smallZombieSpeedStat);867 stage.removeChild(kingZombieHpStat);868 stage.removeChild(kingZombieAttackStat);869 stage.removeChild(kingZombieSpeedStat);870 settingsButton.addEventListener("click", loadSettings);871 stage.addChild(settingsButton);872}873function closeBuildingsMenu(even){874 stage.removeChild(defensesMenu);875 stage.removeChild(buildingsDoneButton);876 stage.removeChild(factoryButton);877 stage.removeChild(bankButton);878 stage.removeChild(cageButton);879 stage.removeChild(factoryImage);880 stage.removeChild(bank);881 stage.removeChild(cage);882 stage.removeChild(factoryCost);883 stage.removeChild(bankCost);884 stage.removeChild(cageCost);885 886 // Remember: Remove buildings creation event listeners887 factoryButton.removeEventListener("click", factoryButton._onClick);888 889 buildingsDoneButton.removeEventListener("click", closeBuildingsMenu);890 stage.addChild(lowerMenu);891 892 buildButton.addEventListener("click", loadMenu);893 stage.removeChild(buildingsMenu);894 stage.addChild(lowerMenu);895 stage.addChild(moneyText);896 stage.addChild(moneyAmountText);897 stage.addChild(playerText);898 stage.addChild(timerText);899 stage.addChild(attackButton);900 stage.addChild(zombieCapText);901 stage.addChild(zombieCapacityText);902 stage.addChild(usedZombieCapText);903 stage.addChild(usedZombieCapacityText);904 stage.addChild(enemyHealthCover);905 stage.addChild(teamHealthCover);906 settingsButton.addEventListener("click", loadSettings);907 stage.addChild(settingsButton);908}909function closeDefensesMenu(even){910 stage.removeChild(defensesMenu);911 stage.removeChild(defensesDoneButton);912 stage.removeChild(orb);913 stage.removeChild(turret);914 stage.removeChild(orbButton);915 stage.removeChild(turretButton);916 stage.removeChild(orbCost);917 stage.removeChild(turretCost);918 stage.removeChild(turretHpStat);919 stage.removeChild(turretSpeedStat);920 stage.removeChild(turretAttackStat);921 stage.removeChild(orbHpStat);922 stage.removeChild(orbSpeedStat);923 stage.removeChild(orbAttackStat);924 // Remember: Remove defense creation event listeners925 defensesDoneButton.removeEventListener("click", closeDefensesMenu);926 stage.addChild(lowerMenu);927 buildButton.addEventListener("click", loadMenu);928 stage.removeChild(buildingsMenu);929 stage.addChild(lowerMenu);930 stage.addChild(moneyText);931 stage.addChild(moneyAmountText);932 stage.addChild(playerText);933 stage.addChild(timerText);934 stage.addChild(attackButton);935 stage.addChild(zombieCapText);936 stage.addChild(zombieCapacityText);937 stage.addChild(usedZombieCapText);938 stage.addChild(usedZombieCapacityText);939 stage.addChild(enemyHealthCover);940 stage.addChild(teamHealthCover);941 settingsButton.addEventListener("click", loadSettings);942 stage.addChild(settingsButton);943}944function gameAlert(title, text) {945 var alertBg = new createjs.Bitmap(queue.getResult("noticeBox"));946 var alertText = new createjs.Text(text, "bold 50px Lithos", "#fff");947 var alertTitle = new createjs.Text(title, "bold 50px Lithos", "#fff");948 alertTitle.x = 643;949 alertTitle.y = 270;950 alertText.x = 650;951 alertText.y = 370;952 alertBg.x = 643;953 alertBg.y = 265;954 alertBg.alpha = 0;955 alertText.alpha = 0;956 alertTitle.alpha = 0;957 stage.addChild(alertBg);958 stage.addChild(alertText);959 stage.addChild(alertTitle);960 createjs.Tween.get(alertBg).to({alpha:1}, 500);961 createjs.Tween.get(alertText).to({alpha:1}, 500);962 createjs.Tween.get(alertTitle).to({alpha:1}, 500);963 setTimeout(function() {964 createjs.Tween.get(alertBg).to({alpha:0}, 500);965 createjs.Tween.get(alertText).to({alpha:0}, 500);966 createjs.Tween.get(alertTitle).to({alpha:0}, 500);967 setTimeout(function() {968 stage.removeChild(alertBg);969 stage.removeChild(alertText);970 stage.removeChild(alertTitle);971 }, 500);972 }, 2000)973}974function explode(x, y, size, duration) {975 var explosion = new createjs.Bitmap(queue.getResult("explosion"));976 explosion.scaleX = size;977 explosion.scaleY = size;978 explosion.regX = 32.5;979 explosion.regY = 29;980 explosion.x = x + 55.625;981 explosion.y = y + 50.125;982 stage.addChild(explosion);983 createjs.Tween.get(explosion).to({scaleX: 0, scaleY: 0}, duration).call(removeExplosion);984 function removeExplosion(){985 stage.removeChild(explosion);986 }987}988function burst(x, y){989 var burst = new createjs.Bitmap(queue.getResult("burst"));990 burst.scaleX = .5;991 burst.scaleY = .5;992 burst.regX = 166;993 burst.regY = 162;994 burst.alpha = .8;995 burst.x = x + 55.625;996 burst.y = y + 50.125;997 stage.addChild(burst);998 createjs.Tween.get(burst).to({scaleX: 1, scaleY: 1, rotation: 360, alpha: .4}, 800).call(fadeExplosion);999 function fadeExplosion() {1000 createjs.Tween.get(burst).to({alpha: 0}, 500).call(removeExplosion);1001 }1002 function removeExplosion() {1003 stage.removeChild(burst);1004 }1005}1006function victory() {1007 var screen = new createjs.Shape();1008 screen.graphics.beginFill("#000").drawRect(0,0,1920,980);1009 screen.addEventListener("click", function(){});1010 screen.alpha = 0.0;1011 // TODO lets add winning usernames1012 var victoryText = new createjs.Text("Victory!", "bold 150px Lithos", "#fff");1013 victoryText.x = 585;1014 victoryText.y = 280;1015 victoryText.alpha = 0.0;1016 1017 stage.addChild(screen);...

Full Screen

Full Screen

newscript.js

Source:newscript.js Github

copy

Full Screen

...52 var ogplacement = document.getElementById('allScore');53 ogplacement.innerHTML = ogscorz;54 timerOp();55 getQuest1();56 container.removeChild(dip)57 });58// Quest One59 function getQuest1() {60 // Inner HTML61 QN.innerHTML = "Question 1";62 QQ.innerHTML = "What is JavaScript?";63 // Nodes and Childs64 var node1 = document.createElement("LI"); 65 var textnode1 = document.createTextNode("Client-Side Scripting Language"); 66 node1.appendChild(textnode1); 67 QA1.appendChild(node1); 68 69 var node2 = document.createElement("LI"); 70 var textnode2 = document.createTextNode("Pancakes for breakfast"); 71 node2.appendChild(textnode2); 72 QA1.appendChild(node2); 73 var node3 = document.createElement("LI"); 74 var textnode3 = document.createTextNode("A database intended for audio engineering"); 75 node3.appendChild(textnode3); 76 QA1.appendChild(node3); 77 var node4 = document.createElement("LI"); 78 var textnode4 = document.createTextNode("William is the greatest"); 79 node4.appendChild(textnode4); 80 QA1.appendChild(node4); 81 // Buttons82 var btn1 = document.createElement("BUTTON"); 83 var btnli1 = document.createElement("LI");84 btn1.innerHTML = "One"; 85 btnli1.appendChild(btn1); 86 buttons1.appendChild(btnli1); 87 var btn2 = document.createElement("BUTTON"); 88 var btnli2 = document.createElement("LI"); 89 btn2.innerHTML = "Two"; 90 btnli2.appendChild(btn2); 91 buttons1.appendChild(btnli2); 92 var btn3 = document.createElement("BUTTON"); 93 var btnli3 = document.createElement("LI");94 btn3.innerHTML = "Three"; 95 btnli3.appendChild(btn3); 96 buttons1.appendChild(btnli3); 97 var btn4 = document.createElement("BUTTON"); 98 var btnli4 = document.createElement("LI"); 99 btn4.innerHTML = "Four"; 100 btnli4.appendChild(btn4); 101 buttons1.appendChild(btnli4); 102 // Button Clicks103 btn1.onclick = function QOO(event) {104 event.preventDefault();105 106 localStorage.removeItem("A1");107 var A1 = {108 score: 10,109 };110 111 localStorage.setItem("A1", JSON.stringify(A1));112 var allScore = document.getElementById("allScore");113 let giveA1 = JSON.parse(localStorage.getItem('A1'));114 allScore.innerHTML = giveA1.score;115 QA1.removeChild(node1);116 QA1.removeChild(node2);117 QA1.removeChild(node3);118 QA1.removeChild(node4);119 buttons1.removeChild(btnli1);120 buttons1.removeChild(btnli2);121 buttons1.removeChild(btnli3);122 buttons1.removeChild(btnli4);123 getQuest2();124 }125 btn2.onclick = function QOTw(event) {126 event.preventDefault();127 localStorage.removeItem("A1");128 129 var A1 = {130 score: 0,131 };132 133 localStorage.setItem("A1", JSON.stringify(A1));134 var allScore = document.getElementById("allScore");135 let giveA1 = JSON.parse(localStorage.getItem('A1'));136 allScore.innerHTML = giveA1.score;137 QA1.removeChild(node1);138 QA1.removeChild(node2);139 QA1.removeChild(node3);140 QA1.removeChild(node4);141 buttons1.removeChild(btnli1);142 buttons1.removeChild(btnli2);143 buttons1.removeChild(btnli3);144 buttons1.removeChild(btnli4);145 getQuest2();146 147 }148 btn3.onclick = function QOTh(event) {149 event.preventDefault();150 localStorage.removeItem("A1");151 var A1 = {152 score: 0,153 };154 155 localStorage.setItem("A1", JSON.stringify(A1));156 var allScore = document.getElementById("allScore");157 let giveA1 = JSON.parse(localStorage.getItem('A1'));158 allScore.innerHTML = giveA1.score;159 QA1.removeChild(node1);160 QA1.removeChild(node2);161 QA1.removeChild(node3);162 QA1.removeChild(node4);163 buttons1.removeChild(btnli1);164 buttons1.removeChild(btnli2);165 buttons1.removeChild(btnli3);166 buttons1.removeChild(btnli4);167 getQuest2();168 }169 btn4.onclick = function QOTh(event) {170 event.preventDefault();171 localStorage.removeItem("A1");172 var A1 = {173 score: 5,174 };175 176 localStorage.setItem("A1", JSON.stringify(A1));177 var allScore = document.getElementById("allScore");178 let giveA1 = JSON.parse(localStorage.getItem('A1'));179 allScore.innerHTML = giveA1.score;180 console.log("all flattery is truth")181 QA1.removeChild(node1);182 QA1.removeChild(node2);183 QA1.removeChild(node3);184 QA1.removeChild(node4);185 buttons1.removeChild(btnli1);186 buttons1.removeChild(btnli2);187 buttons1.removeChild(btnli3);188 buttons1.removeChild(btnli4);189 getQuest2();190 }191};192// Quest Two193function getQuest2() {194 // Inner HTML195 QN.innerHTML = "Question 2";196 QQ.innerHTML = "What is this: ";197 var divinus = document.createElement("DIV")198 var dankCode = document.createElement("BUTTON");199 var wordz = document.createTextNode("EXAMPLE");200 var div2 = document.createElement("div");201 202 dankCode.appendChild(wordz);203 divinus.appendChild(dankCode);204 QQ.appendChild(divinus);205 divinus.appendChild(div2);206 dankCode.onclick = function tracking() {207 clicks += 1;208 console.log("clicks");209 div2.innerHTML = clicks;210 211 };212 213 // Nodes and Childs214 var node1 = document.createElement("LI"); 215 var textnode1 = document.createTextNode("Click Defusser (yes, to de-fuss)"); 216 node1.appendChild(textnode1); 217 QA1.appendChild(node1); 218 219 var node2 = document.createElement("LI"); 220 var textnode2 = document.createTextNode("Click Refractor"); 221 node2.appendChild(textnode2); 222 QA1.appendChild(node2); 223 var node3 = document.createElement("LI"); 224 var textnode3 = document.createTextNode("Click Counter"); 225 node3.appendChild(textnode3); 226 QA1.appendChild(node3); 227 var node4 = document.createElement("LI"); 228 var textnode4 = document.createTextNode("Click Decapitator"); 229 node4.appendChild(textnode4); 230 QA1.appendChild(node4); 231 // Buttons232 var btn1 = document.createElement("BUTTON"); 233 var btnli1 = document.createElement("LI");234 btn1.innerHTML = "One"; 235 btnli1.appendChild(btn1); 236 buttons1.appendChild(btnli1); 237 var btn2 = document.createElement("BUTTON"); 238 var btnli2 = document.createElement("LI"); 239 btn2.innerHTML = "Two"; 240 btnli2.appendChild(btn2); 241 buttons1.appendChild(btnli2); 242 var btn3 = document.createElement("BUTTON"); 243 var btnli3 = document.createElement("LI");244 btn3.innerHTML = "Three"; 245 btnli3.appendChild(btn3); 246 buttons1.appendChild(btnli3); 247 var btn4 = document.createElement("BUTTON"); 248 var btnli4 = document.createElement("LI"); 249 btn4.innerHTML = "Four"; 250 btnli4.appendChild(btn4); 251 buttons1.appendChild(btnli4); 252 // Button Clicks253 btn1.onclick = function QOO(event) {254 event.preventDefault();255 localStorage.removeItem("A2");256 257 var A2 = {258 score: 0,259 };260 261 localStorage.setItem("A2", JSON.stringify(A2));262 var allScore = document.getElementById("allScore");263 let giveA1 = JSON.parse(localStorage.getItem('A1'));264 let giveA2 = JSON.parse(localStorage.getItem('A2'));265 let add1 = giveA1.score += giveA2.score;266 console.log(add1)267 allScore.innerHTML = add1;268 QA1.removeChild(node1);269 QA1.removeChild(node2);270 QA1.removeChild(node3);271 QA1.removeChild(node4);272 buttons1.removeChild(btnli1);273 buttons1.removeChild(btnli2);274 buttons1.removeChild(btnli3);275 buttons1.removeChild(btnli4);276 getQuest3();277 }278 btn2.onclick = function QOTw(event) {279 event.preventDefault();280 localStorage.removeItem("A2");281 282 var A2 = {283 score: 0,284 };285 286 localStorage.setItem("A2", JSON.stringify(A2));287 var allScore = document.getElementById("allScore");288 let giveA1 = JSON.parse(localStorage.getItem('A1'));289 let giveA2 = JSON.parse(localStorage.getItem('A2'));290 let add1 = giveA1.score += giveA2.score;291 console.log(add1)292 allScore.innerHTML = add1;293 QA1.removeChild(node1);294 QA1.removeChild(node2);295 QA1.removeChild(node3);296 QA1.removeChild(node4);297 buttons1.removeChild(btnli1);298 buttons1.removeChild(btnli2);299 buttons1.removeChild(btnli3);300 buttons1.removeChild(btnli4);301 getQuest3();302 }303 btn3.onclick = function QOTh(event) {304 localStorage.removeItem("A2");305 306 var A2 = {307 score: 10,308 };309 310 localStorage.setItem("A2", JSON.stringify(A2));311 var allScore = document.getElementById("allScore");312 let giveA1 = JSON.parse(localStorage.getItem('A1'));313 let giveA2 = JSON.parse(localStorage.getItem('A2'));314 let add1 = giveA1.score += giveA2.score;315 console.log(add1)316 allScore.innerHTML = add1;317 QA1.removeChild(node1);318 QA1.removeChild(node2);319 QA1.removeChild(node3);320 QA1.removeChild(node4);321 buttons1.removeChild(btnli1);322 buttons1.removeChild(btnli2);323 buttons1.removeChild(btnli3);324 buttons1.removeChild(btnli4);325 getQuest3();326 327 }328 btn4.onclick = function QOF(event) {329 event.preventDefault();330 localStorage.removeItem("A2");331 332 var A2 = {333 score: 5,334 };335 336 localStorage.setItem("A2", JSON.stringify(A2));337 var allScore = document.getElementById("allScore");338 let giveA1 = JSON.parse(localStorage.getItem('A1'));339 let giveA2 = JSON.parse(localStorage.getItem('A2'));340 let add1 = giveA1.score += giveA2.score;341 console.log(add1);342 console.log("metal");343 allScore.innerHTML = add1;344 QA1.removeChild(node1);345 QA1.removeChild(node2);346 QA1.removeChild(node3);347 QA1.removeChild(node4);348 buttons1.removeChild(btnli1);349 buttons1.removeChild(btnli2);350 buttons1.removeChild(btnli3);351 buttons1.removeChild(btnli4);352 getQuest3();353 }354};355// Quest Three356function getQuest3() {357 // Inner HTML358 QN.innerHTML = "Question 3";359 QQ.innerHTML = "Why are JavaScript and Java Interchangible?";360 361 // Nodes and Childs362 var node1 = document.createElement("LI"); 363 var textnode1 = document.createTextNode("Both are a complete programming language"); 364 node1.appendChild(textnode1); 365 QA1.appendChild(node1); 366 367 var node2 = document.createElement("LI"); 368 var textnode2 = document.createTextNode("Both are client-side scripting languages"); 369 node2.appendChild(textnode2); 370 QA1.appendChild(node2); 371 var node3 = document.createElement("LI"); 372 var textnode3 = document.createTextNode("Both were used in the creation of the telescope"); 373 node3.appendChild(textnode3); 374 QA1.appendChild(node3); 375 var node4 = document.createElement("LI"); 376 var textnode4 = document.createTextNode("I don't recognize these as answers"); 377 node4.appendChild(textnode4); 378 QA1.appendChild(node4); 379 // Buttons380 var btn1 = document.createElement("BUTTON"); 381 var btnli1 = document.createElement("LI");382 btn1.innerHTML = "One"; 383 btnli1.appendChild(btn1); 384 buttons1.appendChild(btnli1); 385 var btn2 = document.createElement("BUTTON"); 386 var btnli2 = document.createElement("LI"); 387 btn2.innerHTML = "Two"; 388 btnli2.appendChild(btn2); 389 buttons1.appendChild(btnli2); 390 var btn3 = document.createElement("BUTTON"); 391 var btnli3 = document.createElement("LI");392 btn3.innerHTML = "Three"; 393 btnli3.appendChild(btn3); 394 buttons1.appendChild(btnli3); 395 var btn4 = document.createElement("BUTTON"); 396 var btnli4 = document.createElement("LI"); 397 btn4.innerHTML = "Four"; 398 btnli4.appendChild(btn4); 399 buttons1.appendChild(btnli4); 400 // Button Clicks401 btn1.onclick = function QOO(event) {402 event.preventDefault();403 localStorage.removeItem("A3");404 405 var A3 = {406 score: 0,407 };408 409 localStorage.setItem("A3", JSON.stringify(A3));410 var allScore = document.getElementById("allScore");411 let giveA1 = JSON.parse(localStorage.getItem('A1'));412 let giveA2 = JSON.parse(localStorage.getItem('A2'));413 let giveA3 = JSON.parse(localStorage.getItem('A3'));414 let add1 = giveA1.score += giveA2.score;415 let add2 = add1 += giveA3.score;416 console.log(add2)417 allScore.innerHTML = add2;418 QA1.removeChild(node1);419 QA1.removeChild(node2);420 QA1.removeChild(node3);421 QA1.removeChild(node4);422 buttons1.removeChild(btnli1);423 buttons1.removeChild(btnli2);424 buttons1.removeChild(btnli3);425 buttons1.removeChild(btnli4);426 endGame();427 }428 btn2.onclick = function QOTw(event) {429 event.preventDefault();430 localStorage.removeItem("A3");431 432 var A3 = {433 score: 0,434 };435 436 localStorage.setItem("A3", JSON.stringify(A3));437 var allScore = document.getElementById("allScore");438 let giveA1 = JSON.parse(localStorage.getItem('A1'));439 let giveA2 = JSON.parse(localStorage.getItem('A2'));440 let giveA3 = JSON.parse(localStorage.getItem('A3'));441 let add1 = giveA1.score += giveA2.score;442 let add2 = add1 += giveA3.score;443 console.log(add2)444 allScore.innerHTML = add2;445 QA1.removeChild(node1);446 QA1.removeChild(node2);447 QA1.removeChild(node3);448 QA1.removeChild(node4);449 buttons1.removeChild(btnli1);450 buttons1.removeChild(btnli2);451 buttons1.removeChild(btnli3);452 buttons1.removeChild(btnli4);453 endGame();454 }455 btn3.onclick = function QOTh(event) {456 event.preventDefault();457 localStorage.removeItem("A3");458 459 var A3 = {460 score: 5,461 };462 463 localStorage.setItem("A3", JSON.stringify(A3));464 var allScore = document.getElementById("allScore");465 let giveA1 = JSON.parse(localStorage.getItem('A1'));466 let giveA2 = JSON.parse(localStorage.getItem('A2'));467 let giveA3 = JSON.parse(localStorage.getItem('A3'));468 let add1 = giveA1.score += giveA2.score;469 let add2 = add1 += giveA3.score;470 console.log(add2)471 console.log("because you need them")472 allScore.innerHTML = add2;473 QA1.removeChild(node1);474 QA1.removeChild(node2);475 QA1.removeChild(node3);476 QA1.removeChild(node4);477 buttons1.removeChild(btnli1);478 buttons1.removeChild(btnli2);479 buttons1.removeChild(btnli3);480 buttons1.removeChild(btnli4);481 endGame();482 483 }484 btn4.onclick = function QOF(event) {485 event.preventDefault();486 localStorage.removeItem("A3");487 488 var A3 = {489 score: 10,490 };491 492 localStorage.setItem("A3", JSON.stringify(A3));493 var allScore = document.getElementById("allScore");494 let giveA1 = JSON.parse(localStorage.getItem('A1'));495 let giveA2 = JSON.parse(localStorage.getItem('A2'));496 let giveA3 = JSON.parse(localStorage.getItem('A3'));497 let add1 = giveA1.score += giveA2.score;498 let add2 = add1 += giveA3.score;499 console.log(add2)500 allScore.innerHTML = add2;501 QA1.removeChild(node1);502 QA1.removeChild(node2);503 QA1.removeChild(node3);504 QA1.removeChild(node4);505 buttons1.removeChild(btnli1);506 buttons1.removeChild(btnli2);507 buttons1.removeChild(btnli3);508 buttons1.removeChild(btnli4);509 endGame();510 }511};512// End Game 513function endGame() {514 var dividus = document.createElement("h1");515 var hiskorz = document.createTextNode("Hi-Skorz");516 var outers1 = document.createElement("OL")517 var hsnode1 = document.createElement("LI"); 518 var hstextnode1 = document.createTextNode("HS1"); 519 chere.removeChild(butters);520 chere.removeChild(container);521 chere.removeChild(skip);522 chere.removeChild(cells);523 dividus.appendChild(hiskorz);524 chere.appendChild(dividus); 525 hsnode1.appendChild(hstextnode1); 526 outers1.appendChild(hsnode1);527 chere.appendChild(outers1);528 529 ...

Full Screen

Full Screen

schedule-back-script.js

Source:schedule-back-script.js Github

copy

Full Screen

...3 var ch = document.head.childNodes;4 for (i = 0; i < ch.length; i++) {5 if (ch[i].nodeName == "STYLE") {6 if (ch[i].textContent == "#LA-07{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {7 h.removeChild(ch[i]);8 } else if (ch[i].textContent == "#LA-08{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {9 h.removeChild(ch[i]);10 } else if (ch[i].textContent == "#LA-09{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {11 h.removeChild(ch[i]);12 } else if (ch[i].textContent == "#LA-10{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {13 h.removeChild(ch[i]);14 } else if (ch[i].textContent == "#LA-11{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {15 h.removeChild(ch[i]);16 } else if (ch[i].textContent == "#LA-12{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {17 h.removeChild(ch[i]);18 } else if (ch[i].textContent == "#LA-13{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {19 h.removeChild(ch[i]);20 } else if (ch[i].textContent == "#LA-14{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {21 h.removeChild(ch[i]);22 } else if (ch[i].textContent == "#LA-15{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {23 h.removeChild(ch[i]);24 } else if (ch[i].textContent == "#LA-16{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {25 h.removeChild(ch[i]);26 } else if (ch[i].textContent == "#LA-17{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {27 h.removeChild(ch[i]);28 } else if (ch[i].textContent == "#LA-18{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {29 h.removeChild(ch[i]);30 } else if (ch[i].textContent == "#LA-19{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {31 h.removeChild(ch[i]);32 } else if (ch[i].textContent == "#LA-20{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {33 h.removeChild(ch[i]);34 } else if (ch[i].textContent == "#LA-21{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {35 h.removeChild(ch[i]);36 } else if (ch[i].textContent == "#LA-22{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {37 h.removeChild(ch[i]);38 } else if (ch[i].textContent == "#LT-07{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {39 h.removeChild(ch[i]);40 } else if (ch[i].textContent == "#LT-08{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {41 h.removeChild(ch[i]);42 } else if (ch[i].textContent == "#LT-09{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {43 h.removeChild(ch[i]);44 } else if (ch[i].textContent == "#LT-10{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {45 h.removeChild(ch[i]);46 } else if (ch[i].textContent == "#LT-11{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {47 h.removeChild(ch[i]);48 } else if (ch[i].textContent == "#LT-12{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {49 h.removeChild(ch[i]);50 } else if (ch[i].textContent == "#LT-13{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {51 h.removeChild(ch[i]);52 } else if (ch[i].textContent == "#LT-14{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {53 h.removeChild(ch[i]);54 } else if (ch[i].textContent == "#LT-15{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {55 h.removeChild(ch[i]);56 } else if (ch[i].textContent == "#LT-16{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {57 h.removeChild(ch[i]);58 } else if (ch[i].textContent == "#LT-17{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {59 h.removeChild(ch[i]);60 } else if (ch[i].textContent == "#LT-18{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {61 h.removeChild(ch[i]);62 } else if (ch[i].textContent == "#LT-19{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {63 h.removeChild(ch[i]);64 } else if (ch[i].textContent == "#LT-20{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {65 h.removeChild(ch[i]);66 } else if (ch[i].textContent == "#LT-21{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {67 h.removeChild(ch[i]);68 } else if (ch[i].textContent == "#LT-22{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {69 h.removeChild(ch[i]);70 } else if (ch[i].textContent == "#LB-07{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {71 h.removeChild(ch[i]);72 } else if (ch[i].textContent == "#LB-08{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {73 h.removeChild(ch[i]);74 } else if (ch[i].textContent == "#LB-09{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {75 h.removeChild(ch[i]);76 } else if (ch[i].textContent == "#LB-10{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {77 h.removeChild(ch[i]);78 } else if (ch[i].textContent == "#LB-11{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {79 h.removeChild(ch[i]);80 } else if (ch[i].textContent == "#LB-12{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {81 h.removeChild(ch[i]);82 } else if (ch[i].textContent == "#LB-13{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {83 h.removeChild(ch[i]);84 } else if (ch[i].textContent == "#LB-14{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {85 h.removeChild(ch[i]);86 } else if (ch[i].textContent == "#LB-15{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {87 h.removeChild(ch[i]);88 } else if (ch[i].textContent == "#LB-16{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {89 h.removeChild(ch[i]);90 } else if (ch[i].textContent == "#LB-17{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {91 h.removeChild(ch[i]);92 } else if (ch[i].textContent == "#LB-18{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {93 h.removeChild(ch[i]);94 } else if (ch[i].textContent == "#LB-19{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {95 h.removeChild(ch[i]);96 } else if (ch[i].textContent == "#LB-20{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {97 h.removeChild(ch[i]);98 } else if (ch[i].textContent == "#LB-21{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {99 h.removeChild(ch[i]);100 } else if (ch[i].textContent == "#LB-22{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}") {101 h.removeChild(ch[i]);102 }103 console.log(ch[i].textContent);104 }105 }106}107//fungsi untuk mengganti warna108function gantiWarna(kode) {109 //ubah warna110 var css = "#" + kode.kode_lapangan + "{background:#00331e; color: white; pointer-events: none; cursor: not-allowed;}";111 var style = document.createElement('style');112 if (style.styleSheet) {113 style.styleSheet.cssText = css;114 } else {115 style.appendChild(document.createTextNode(css));...

Full Screen

Full Screen

functions.js

Source:functions.js Github

copy

Full Screen

...49 50 51 if(q1==""){52 while(div.firstChild){53 div.removeChild(div.firstChild);54 } document.getElementById("feedback").style.color="red";55 div.innerHTML = '------Missing Selection';56 57 } else { while(div.firstChild){div.removeChild(div.firstChild);} }58 59 60 if(q2==""){61 while(div2.firstChild){62 div2.removeChild(div2.firstChild);63 } document.getElementById("feedback2").style.color="red";64 div2.innerHTML = '------Missing Selection';65 66 } else { while(div2.firstChild){div2.removeChild(div2.firstChild);} }67 68 69 70 if(q3==""){71 while(div3.firstChild){72 div3.removeChild(div3.firstChild);73 } document.getElementById("feedback3").style.color="red";74 div3.innerHTML = '------Missing Selection';75 76 } else { while(div3.firstChild){div3.removeChild(div3.firstChild);} }77 78 79 if (q4==""){80 while(div4.firstChild){81 div4.removeChild(div4.firstChild);82 }83 document.getElementById("feedback4").style.color="red";84 div4.innerHTML = '------Missing Answer';85 86 } else { while(div4.firstChild){div4.removeChild(div4.firstChild);} }87 88 89 90 if (q5==""){91 while(div5.firstChild){92 div5.removeChild(div5.firstChild);93 } document.getElementById("feedback5").style.color="red";94 div5.innerHTML = '------Missing Selection';95 96 } else { while(div5.firstChild){div5.removeChild(div5.firstChild);} } 97 98 99 100 101 102 103 }104 105 else { //if all fields filled 106 var score=0;107 108 if (q1=="Radio2"){ score++;109 while(div.firstChild){ div.removeChild(div.firstChild);}110 document.getElementById("feedback").style.color="green";111 div.innerHTML = '------Correct';112 }113 else { while(div.firstChild){ div.removeChild(div.firstChild);}114 document.getElementById("feedback").style.color="red";115 div.innerHTML = '------Incorrect, the answer is b';116 117 }118 119 120 if (q2=="Radio4"){ score++;121 while(div2.firstChild){ div2.removeChild(div2.firstChild);}122 document.getElementById("feedback2").style.color="green";123 div2.innerHTML = '------Correct';124 }125 else {while(div2.firstChild){ div2.removeChild(div2.firstChild);}126 document.getElementById("feedback2").style.color="red";127 div2.innerHTML = '------Incorrect, the answer is d';128 129 }130 131 132 if (q3=="Radio1"){ score++;133 while(div3.firstChild){ div3.removeChild(div3.firstChild);}134 document.getElementById("feedback3").style.color="green";135 div3.innerHTML = '------Correct';136 }137 else {while(div3.firstChild){ div3.removeChild(div3.firstChild);}138 document.getElementById("feedback3").style.color="red";139 div3.innerHTML = '------Incorrect, the answer is a';140 141 }142 143 144 145 if (q4=="delete" || q4=="DELETE"){ score++;146 while(div4.firstChild){ div4.removeChild(div4.firstChild);}147 document.getElementById("feedback4").style.color="green";148 div4.innerHTML = '------Correct';149 }150 else {while(div4.firstChild){ div4.removeChild(div4.firstChild);}151 document.getElementById("feedback4").style.color="red";152 div4.innerHTML = '------Incorrect, the answer is DELETE';153 154 }155 156 157 158 159 if(this.myform.check.checked==true && this.myform.check3.checked==true && this.myform.check2.checked==false && this.myform.check4.checked==false ){160 while(div5.firstChild){ div5.removeChild(div5.firstChild);}161 document.getElementById("feedback5").style.color="green";162 div5.innerHTML = '------Correct'; score ++;163 }164 165 else {166 while(div5.firstChild){ div5.removeChild(div5.firstChild);}167 document.getElementById("feedback5").style.color="red";168 div5.innerHTML = '------Incorrect, the answer is a and c';169 170 }171 172 173 174 175 //display score176 var Score = document.getElementById('score');177 while(Score.firstChild){ Score.removeChild(Score.firstChild);} Score.innerHTML = "Score: " + score + "/5" ;178 }179 180 181 182 183 184 185 186 187 188 return false;...

Full Screen

Full Screen

3.js

Source:3.js Github

copy

Full Screen

...28 let gun=boxFLex[i].getElementsByClassName("gun")[0];29 let save=boxFLex[i].getElementsByClassName("save")[0];30 switch(true){31 case outValue[i]=="村民":32 fun.removeChild(knife);33 fun.removeChild(check);34 fun.removeChild(gun);35 fun.removeChild(save);36 console.log(1);37 break;38 case outValue[i]=="狼人":39 fun.removeChild(check);40 fun.removeChild(gun);41 fun.removeChild(save);42 break;43 case outValue[i]=="猎人":44 fun.removeChild(knife);45 fun.removeChild(check);46 fun.removeChild(save);47 break;48 case outValue[i]=="女巫":49 fun.removeChild(check);50 fun.removeChild(gun);51 break;52 case outValue[i]=="白痴":53 fun.removeChild(knife);54 fun.removeChild(check);55 fun.removeChild(gun);56 fun.removeChild(save);57 break;58 case outValue[i]=="守卫":59 fun.removeChild(knife);60 fun.removeChild(check);61 fun.removeChild(gun);62 break;63 case outValue[i]=="预言家":64 fun.removeChild(knife);65 fun.removeChild(save);66 fun.removeChild(gun);67 break;68 }69 }70}71clone();...

Full Screen

Full Screen

controller.js

Source:controller.js Github

copy

Full Screen

...7 ellierun.animationSpeed = 0.1;8 ellierun.play();9 ellierun.position.set(Ellie.position.x,Ellie.position.y);10 ellierun.x -= 5;11 app.stage.removeChild(Ellie);12 app.stage.removeChild(ellieaim);13 app.stage.removeChild(ellieshoot);14}15function goRight(){16 ellierun.vx += 5;17 ellierun.vy = 0;18 ellierun.scale.x = 1;19 ellierun.animationSpeed = 0.1;20 ellierun.play();21 ellierun.position.set(Ellie.position.x,Ellie.position.y);22 ellierun.x += 5;23 zombie_stand.x -=1;24 app.stage.removeChild(Ellie);25 app.stage.removeChild(ellieaim);26 app.stage.removeChild(ellieshoot);27}28function shoot(){29 ellierun.vx = 5;30 ellierun.vy = 0;31 ellieshoot.animationSpeed = 0.1;32 ellieshoot.play();33 ellieshoot.position.set(ellierun.position.x,ellierun.position.y);34 app.stage.removeChild(Ellie);35 app.stage.removeChild(ellierun);36 app.stage.removeChild(ellieaim);37 app.stage.addChild(ellieshoot);38 app.stage.removeChild(zombie_stand);39 app.stage.addChild(zombie_die);40 zombie_die.play();41 ellieshoot.position.set(Ellie.position.x,Ellie.position.y);42}43function aim(){app.stage.addChild(ellieaim);44ellieaim.animationSpeed = 0.1;45ellieaim.position.set(Ellie.position.x,Ellie.position.y);46app.stage.removeChild(Ellie);47app.stage.removeChild(ellierun);48app.stage.removeChild(ellieshoot);49ellieaim.play();50}51// import * as tf from '@tensorflow/tfjs';52var can = document.getElementById("myCanvas");53var ctx = can.getContext("2d");54function guess(classId) {55 app.stage.addChild(zombie_stand);56 zombie_stand.play();57 app.stage.addChild(ellierun);58 console.log(classId);59 switch(classId){60 case 0:61 goLeft();62 break;...

Full Screen

Full Screen

avoid-removeChild.js

Source:avoid-removeChild.js Github

copy

Full Screen

...13function invalidCode(code, message) {14 if (!message) {15 message =16 "use element.remove() instead of " +17 "element.parentNode.removeChild(element)";18 }19 return { code, errors: [{ message, type: "CallExpression" }] };20}21ruleTester.run("avoid-removeChild", rule, {22 valid: [23 "elt.remove();",24 "elt.parentNode.parentNode.removeChild(elt2.parentNode);",25 "elt.parentNode.removeChild(elt2);",26 "elt.removeChild(elt2);",27 ],28 invalid: [29 invalidCode("elt.parentNode.removeChild(elt);"),30 invalidCode("elt.parentNode.parentNode.removeChild(elt.parentNode);"),31 invalidCode("$(e).parentNode.removeChild($(e));"),32 invalidCode("$('e').parentNode.removeChild($('e'));"),33 invalidCode(34 "elt.removeChild(elt.firstChild);",35 "use element.firstChild.remove() instead of " +36 "element.removeChild(element.firstChild)"37 ),38 ],...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const { chromium } = require('playwright');2(async () => {3 const browser = await chromium.launch();4 const context = await browser.newContext();5 const page = await context.newPage();6 const input = await page.$('input[name="q"]');7 await input.type('Hello World');8 await input.press('Enter');9 await page.waitForNavigation();10 await page.screenshot({ path: 'google.png' });11 await browser.close();12})();13const { chromium } = require('playwright');14(async () => {15 const browser = await chromium.launch();16 const context = await browser.newContext();17 const page = await context.newPage();18 const input = await page.$('input[name="q"]');19 await input.type('Hello World');20 await input.press('Enter');21 await page.waitForNavigation();22 await page.screenshot({ path: 'google.png' });23 await browser.close();24})();25const { chromium } = require('playwright');26(async () => {27 const browser = await chromium.launch();28 const context = await browser.newContext();29 const page = await context.newPage();30 const input = await page.$('input[name="q"]');31 await input.type('Hello World');32 await input.press('Enter');33 await page.waitForNavigation();34 await page.screenshot({ path: 'google.png' });35 await browser.close();36})();

Full Screen

Using AI Code Generation

copy

Full Screen

1const { chromium } = require('playwright');2(async () => {3 const browser = await chromium.launch();4 const context = await browser.newContext();5 const page = await context.newPage();6 await page.waitForSelector('text=Get started');7 const element = await page.$('text=Get started');8 await element.evaluate(element => element.parentNode.removeChild(element));9 await page.screenshot({ path: 'screenshot.png' });10 await browser.close();11})();12const { chromium } = require('playwright');13(async () => {14 const browser = await chromium.launch();15 const context = await browser.newContext();16 const page = await context.newPage();17 await page.click('text=Get started');18 await page.screenshot({ path: 'screenshot.png' });19 await browser.close();20})();

Full Screen

Using AI Code Generation

copy

Full Screen

1const {chromium} = require('playwright');2(async () => {3 const browser = await chromium.launch();4 const context = await browser.newContext();5 const page = await context.newPage();6 await page.evaluate(() => {7 const div = document.createElement('div');8 div.id = 'testDiv';9 document.body.appendChild(div);10 });11 await page.evaluate(() => {12 const div = document.getElementById('testDiv');13 document.body.removeChild(div);14 });15 await page.screenshot({path: 'test.png'});16 await browser.close();17})();18const {chromium} = require('playwright');19(async () => {20 const browser = await chromium.launch();21 const context = await browser.newContext();22 const page = await context.newPage();23 await page.evaluate(() => {24 const div = document.createElement('div');25 div.id = 'testDiv';26 document.body.appendChild(div);27 });28 await page.evaluate(() => {29 const div = document.getElementById('testDiv');30 document.body.removeChild(div);31 });32 await page.screenshot({path: 'test.png'});33 await browser.close();34})();35const {chromium} = require('playwright');36(async () => {37 const browser = await chromium.launch();38 const context = await browser.newContext();39 const page = await context.newPage();40 await page.evaluate(() => {41 const div = document.createElement('div');42 div.id = 'testDiv';43 document.body.appendChild(div);44 });45 await page.evaluate(() => {46 const div = document.getElementById('testDiv');47 document.body.removeChild(div);48 });49 await page.screenshot({path: 'test.png'});50 await browser.close();51})();52const {chromium} = require('playwright');

Full Screen

Using AI Code Generation

copy

Full Screen

1const { chromium } = require('playwright');2(async () => {3 const browser = await chromium.launch();4 const context = await browser.newContext();5 const page = await context.newPage();6 const element = await page.$('input[name="q"]');7 await element.evaluate(element => element.parentElement.removeChild(element), element);8 await page.screenshot({ path: `example.png` });9 await browser.close();10})();

Full Screen

Using AI Code Generation

copy

Full Screen

1const { chromium } = require('playwright');2(async () => {3 const browser = await chromium.launch({headless: false});4 const context = await browser.newContext();5 const page = await context.newPage();6 await page.click('input[aria-label="Search"]');7 await page.fill('input[aria-label="Search"]', 'Playwright');8 await page.keyboard.press('Enter');9 await page.waitForSelector('text=Playwright - Google Search');10 const selector = await page.$('text=Playwright - Google Search');

Full Screen

Using AI Code Generation

copy

Full Screen

1const { firefox } = require('playwright');2(async () => {3 const browser = await firefox.launch();4 const context = await browser.newContext();5 const page = await context.newPage();6 await page.click('input[placeholder="What needs to be done?"]');7 await page.type('input[placeholder="What needs to be done?"]', 'a');8 await page.press('input[placeholder="What needs to be done?"]', 'Enter');9 await page.click('input[placeholder="What needs to be done?"]');10 await page.type('input[placeholder="What needs to be done?"]', 'b');11 await page.press('input[placeholder="What needs to be done?"]', 'Enter');12 await page.click('input[placeholder="What needs to be done?"]');13 await page.type('input[placeholder="What needs to be done?"]', 'c');14 await page.press('input[placeholder="What needs to be done?"]', 'Enter');15 await page.click('input[placeholder="What needs to be done?"]');16 await page.type('input[placeholder="What needs to be done?"]', 'd');17 await page.press('input[placeholder="What needs to be done?"]', 'Enter');18 await page.click('input[placeholder="What needs to be done?"]');19 await page.type('input[placeholder="What needs to be done?"]', 'e');20 await page.press('input[placeholder="What needs to be done?"]', 'Enter');21 await page.click('input[placeholder="What needs to be done?"]');22 await page.type('input[placeholder="What needs to be done?"]', 'f');23 await page.press('input[placeholder="What needs to be done?"]', 'Enter');24 await page.click('input[placeholder="What needs to be done?"]');25 await page.type('input[placeholder="What needs to be done?"]', 'g');26 await page.press('input[placeholder="What needs to be done?"]', 'Enter');27 await page.click('input[placeholder="What needs to be done?"]');28 await page.type('input[placeholder="What needs to be done?"]', 'h');29 await page.press('input[placeholder="What needs to be done

Full Screen

Using AI Code Generation

copy

Full Screen

1const { removeChild } = require('playwright/lib/server/dom');2const { chromium } = require('playwright');3(async () => {4 const browser = await chromium.launch();5 const context = await browser.newContext();6 const page = await context.newPage();7 const element = await page.$('text=Get Started');8 await removeChild(page, element);9 await browser.close();10})();11const { removeChild } = require('playwright/lib/server/dom');12const { chromium } = require('playwright');13(async () => {14 const browser = await chromium.launch();15 const context = await browser.newContext();16 const page = await context.newPage();17 const element = await page.$('text=Get Started');18 await removeChild(page, element);19 await browser.close();20})();21const { removeChild } = require('playwright/lib/server/dom');22const { chromium } = require('playwright');23(async () => {24 const browser = await chromium.launch();25 const context = await browser.newContext();26 const page = await context.newPage();27 const element = await page.$('text=Get Started');28 await removeChild(page, element);29 await browser.close();30})();31const { removeChild } = require('playwright/lib/server/dom');32const { chromium } = require('playwright');33(async () => {34 const browser = await chromium.launch();35 const context = await browser.newContext();36 const page = await context.newPage();37 const element = await page.$('text=Get Started');38 await removeChild(page, element);39 await browser.close();40})();41const { removeChild } = require('playwright/lib/server/dom');42const { chromium } = require('playwright');43(async () => {44 const browser = await chromium.launch();45 const context = await browser.newContext();

Full Screen

Using AI Code Generation

copy

Full Screen

1const {webkit, devices} = require('playwright');2(async () => {3 const browser = await webkit.launch();4 const context = await browser.newContext({5 geolocation: { longitude: 12.492507, latitude: 41.889938 },6 });7 const page = await context.newPage();8 await page.waitForTimeout(3000);9 await page.click('text="Ristorante La Taverna"');10 await page.waitForTimeout(3000);11 const element = await page.$('div[data-attrid="kc:/location/location:address"]');12 await element.evaluate(element => element.parentElement.removeChild(element));13 await page.waitForTimeout(3000);14 await browser.close();15})();16const {webkit, devices} = require('playwright');17(async () => {18 const browser = await webkit.launch();19 const context = await browser.newContext({20 geolocation: { longitude: 12.492507, latitude: 41.889938 },21 });22 const page = await context.newPage();23 await page.waitForTimeout(3000);24 await page.click('text="Ristorante La Taverna"');25 await page.waitForTimeout(3000);26 const element = await page.$('div[data-attrid="kc:/location/location:address"]');27 await element.evaluate(element => element.parentElement.removeChild(element));28 await page.waitForTimeout(3000);29 await browser.close();30})();

Full Screen

Using AI Code Generation

copy

Full Screen

1const { removeChild } = require('@playwright/test/lib/server/frames');2const { test, expect } = require('@playwright/test');3test('test', async ({ page }) => {4 const element = await page.$('text=Get Started');5 const parent = await element.parentElement();6 await removeChild(parent, element);7 expect(await element.parentElement()).toBe(null);8});9 ✓ test (1s)10 1 passed (1s)11const { test } = require('@playwright/test');12test.describe('Group 1', () => {13 test('test 1', async ({ page }) => {14 });15 test('test 2', async ({ page }) => {16 });17});18 ✓ test 1 (1s)19 ✓ test 2 (1s)20 2 passed (1s)21const { test } = require('@playwright/test');22test.beforeEach(async ({ page }) => {23 await page.goto('https

Full Screen

Using AI Code Generation

copy

Full Screen

1const { chromium } = require('playwright');2(async () => {3 const browser = await chromium.launch();4 const context = await browser.newContext();5 const page = await context.newPage();6 const element = await page.$('text=Get started');7 await element.evaluate(element => element.parentNode.removeChild(element));8 await page.screenshot({ path: `example.png` });9 await browser.close();10})();11const { chromium } = require('playwright');12(async () => {13 const browser = await chromium.launch();14 const context = await browser.newContext();15 const page = await context.newPage();16 const element = await page.$('text=Get started');17 await element.evaluate(element => element.parentNode.removeChild(element));18 await page.screenshot({ path: `example.png` });19 await browser.close();20})();21const { chromium } = require('playwright');22(async () => {23 const browser = await chromium.launch();24 const context = await browser.newContext();25 const page = await context.newPage();26 const element = await page.$('text=Get started');27 await element.evaluate(element => element.parentNode.removeChild(element));28 await page.screenshot({ path: `example.png` });29 await browser.close();30})();

Full Screen

Playwright tutorial

LambdaTest’s Playwright tutorial will give you a broader idea about the Playwright automation framework, its unique features, and use cases with examples to exceed your understanding of Playwright testing. This tutorial will give A to Z guidance, from installing the Playwright framework to some best practices and advanced concepts.

Chapters:

  1. What is Playwright : Playwright is comparatively new but has gained good popularity. Get to know some history of the Playwright with some interesting facts connected with it.
  2. How To Install Playwright : Learn in detail about what basic configuration and dependencies are required for installing Playwright and run a test. Get a step-by-step direction for installing the Playwright automation framework.
  3. Playwright Futuristic Features: Launched in 2020, Playwright gained huge popularity quickly because of some obliging features such as Playwright Test Generator and Inspector, Playwright Reporter, Playwright auto-waiting mechanism and etc. Read up on those features to master Playwright testing.
  4. What is Component Testing: Component testing in Playwright is a unique feature that allows a tester to test a single component of a web application without integrating them with other elements. Learn how to perform Component testing on the Playwright automation framework.
  5. Inputs And Buttons In Playwright: Every website has Input boxes and buttons; learn about testing inputs and buttons with different scenarios and examples.
  6. Functions and Selectors in Playwright: Learn how to launch the Chromium browser with Playwright. Also, gain a better understanding of some important functions like “BrowserContext,” which allows you to run multiple browser sessions, and “newPage” which interacts with a page.
  7. Handling Alerts and Dropdowns in Playwright : Playwright interact with different types of alerts and pop-ups, such as simple, confirmation, and prompt, and different types of dropdowns, such as single selector and multi-selector get your hands-on with handling alerts and dropdown in Playright testing.
  8. Playwright vs Puppeteer: Get to know about the difference between two testing frameworks and how they are different than one another, which browsers they support, and what features they provide.
  9. Run Playwright Tests on LambdaTest: Playwright testing with LambdaTest leverages test performance to the utmost. You can run multiple Playwright tests in Parallel with the LammbdaTest test cloud. Get a step-by-step guide to run your Playwright test on the LambdaTest platform.
  10. Playwright Python Tutorial: Playwright automation framework support all major languages such as Python, JavaScript, TypeScript, .NET and etc. However, there are various advantages to Python end-to-end testing with Playwright because of its versatile utility. Get the hang of Playwright python testing with this chapter.
  11. Playwright End To End Testing Tutorial: Get your hands on with Playwright end-to-end testing and learn to use some exciting features such as TraceViewer, Debugging, Networking, Component testing, Visual testing, and many more.
  12. Playwright Video Tutorial: Watch the video tutorials on Playwright testing from experts and get a consecutive in-depth explanation of Playwright automation testing.

Run Playwright Internal automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful