How to use size1 method in wpt

Best JavaScript code snippet using wpt

fontdata-extra.js

Source:fontdata-extra.js Github

copy

Full Screen

1/*************************************************************2 *3 * MathJax/jax/output/SVG/fonts/Gyre-Termes/fontdata-extra.js4 * 5 * Adds extra stretchy characters to the Gyre-Termes fonts6 * Copyright (c) 2013-2018 The MathJax Consortium7 *8 * Licensed under the Apache License, Version 2.0 (the "License");9 * you may not use this file except in compliance with the License.10 * You may obtain a copy of the License at11 *12 * http://www.apache.org/licenses/LICENSE-2.013 *14 * Unless required by applicable law or agreed to in writing, software15 * distributed under the License is distributed on an "AS IS" BASIS,16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.17 * See the License for the specific language governing permissions and18 * limitations under the License.19 */20(function (SVG) {21 var VERSION = "2.7.4";22 var DELIMITERS = SVG.FONTDATA.DELIMITERS;23 var H = "H", V = "V";24 var ALPHABETS = "GyreTermesMathJax_Alphabets",25 ARROWS = "GyreTermesMathJax_Arrows",26 DOUBLESTRUCK = "GyreTermesMathJax_DoubleStruck",27 FRAKTUR = "GyreTermesMathJax_Fraktur",28 LATIN = "GyreTermesMathJax_Latin",29 MAIN = "GyreTermesMathJax_Main",30 MARKS = "GyreTermesMathJax_Marks",31 MISC = "GyreTermesMathJax_Misc",32 MONOSPACE = "GyreTermesMathJax_Monospace",33 NONUNICODE = "GyreTermesMathJax_NonUnicode",34 NORMAL = "GyreTermesMathJax_Normal",35 OPERATORS = "GyreTermesMathJax_Operators",36 SANSSERIF = "GyreTermesMathJax_SansSerif",37 SCRIPT = "GyreTermesMathJax_Script",38 SHAPES = "GyreTermesMathJax_Shapes",39 SIZE1 = "GyreTermesMathJax_Size1",40 SIZE2 = "GyreTermesMathJax_Size2",41 SIZE3 = "GyreTermesMathJax_Size3",42 SIZE4 = "GyreTermesMathJax_Size4",43 SIZE5 = "GyreTermesMathJax_Size5",44 SIZE6 = "GyreTermesMathJax_Size6",45 SYMBOLS = "GyreTermesMathJax_Symbols",46 VARIANTS = "GyreTermesMathJax_Variants";47 var delim = {48 0x306:49 {50 dir: H,51 HW: [[350,MAIN], [620,SIZE1], [740,SIZE2], [885,SIZE3], [1058,SIZE4], [1266,SIZE5], [1515,SIZE6]]52 },53 0x311:54 {55 dir: H,56 HW: [[350,MARKS], [620,SIZE1], [740,SIZE2], [885,SIZE3], [1058,SIZE4], [1266,SIZE5], [1515,SIZE6]]57 },58 0x32C:59 {60 dir: H,61 HW: [[342,MARKS], [608,SIZE1], [727,SIZE2], [870,SIZE3], [1041,SIZE4], [1249,SIZE5], [1496,SIZE6]]62 },63 0x32D:64 {65 dir: H,66 HW: [[342,MARKS], [608,SIZE1], [727,SIZE2], [870,SIZE3], [1041,SIZE4], [1249,SIZE5], [1496,SIZE6]]67 },68 0x32E:69 {70 dir: H,71 HW: [[350,MARKS], [620,SIZE1], [740,SIZE2], [885,SIZE3], [1058,SIZE4], [1266,SIZE5], [1515,SIZE6]]72 },73 0x32F:74 {75 dir: H,76 HW: [[350,MARKS], [620,SIZE1], [740,SIZE2], [885,SIZE3], [1058,SIZE4], [1266,SIZE5], [1515,SIZE6]]77 },78 0x330:79 {80 dir: H,81 HW: [[334,MARKS], [601,SIZE1], [720,SIZE2], [863,SIZE3], [1037,SIZE4], [1241,SIZE5], [1491,SIZE6]]82 },83 0x333:84 {85 dir: H,86 HW: [[333,MARKS], [500,SIZE1]],87 stretch: {left:[0xE0F8,SIZE6], rep:[0xE0F9,SIZE6], right:[0xE0FA,SIZE6]}88 },89 0x33F:90 {91 dir: H,92 HW: [[333,MARKS], [500,SIZE1]],93 stretch: {left:[0xE0FE,SIZE6], rep:[0xE0FF,SIZE6], right:[0xE100,SIZE6]}94 },95 0x20D0:96 {97 dir: H,98 HW: [[376,MARKS], [500,SIZE1]],99 stretch: {left:[0xE008,SIZE6], rep:[0xE009,SIZE6], right:[0xE00A,SIZE6]}100 },101 0x20D1:102 {103 dir: H,104 HW: [[376,MARKS], [500,SIZE1]],105 stretch: {left:[0xE00B,SIZE6], rep:[0xE00C,SIZE6], right:[0xE00D,SIZE6]}106 },107 0x20D6:108 {109 dir: H,110 HW: [[386,MARKS], [510,SIZE1]],111 stretch: {left:[0xE00E,SIZE6], rep:[0xE00F,SIZE6], right:[0xE010,SIZE6]}112 },113 0x20D7:114 {115 dir: H,116 HW: [[386,MAIN], [510,SIZE1]],117 stretch: {left:[0xE011,SIZE6], rep:[0xE012,SIZE6], right:[0xE013,SIZE6]}118 },119 0x20E1:120 {121 dir: H,122 HW: [[458,MARKS], [582,SIZE1]],123 stretch: {left:[0xE014,SIZE6], rep:[0xE015,SIZE6], right:[0xE016,SIZE6]}124 },125 0x20E9:126 {127 dir: H,128 HW: [[375,MARKS], [750,SIZE1], [1125,SIZE2], [1500,SIZE3], [1875,SIZE4], [2250,SIZE5], [2625,SIZE6]],129 stretch: {left:[0xE11B,SIZE6], rep:[0xE11C,SIZE6], right:[0xE11D,SIZE6]}130 },131 0x20EC:132 {133 dir: H,134 HW: [[376,MARKS], [500,SIZE1]],135 stretch: {left:[0xE017,SIZE6], rep:[0xE018,SIZE6], right:[0xE019,SIZE6]}136 },137 0x20ED:138 {139 dir: H,140 HW: [[376,MARKS], [500,SIZE1]],141 stretch: {left:[0xE01A,SIZE6], rep:[0xE01B,SIZE6], right:[0xE01C,SIZE6]}142 },143 0x20EE:144 {145 dir: H,146 HW: [[386,MARKS], [510,SIZE1]],147 stretch: {left:[0xE01D,SIZE6], rep:[0xE01E,SIZE6], right:[0xE01F,SIZE6]}148 },149 0x20EF:150 {151 dir: H,152 HW: [[386,MARKS], [510,SIZE1]],153 stretch: {left:[0xE020,SIZE6], rep:[0xE021,SIZE6], right:[0xE022,SIZE6]}154 },155 0x2196:156 {157 dir: V,158 HW: [[506,MAIN], [733,SIZE1]]159 },160 0x2197:161 {162 dir: V,163 HW: [[506,MAIN], [733,SIZE1]]164 },165 0x2198:166 {167 dir: V,168 HW: [[506,MAIN], [733,SIZE1]]169 },170 0x2199:171 {172 dir: V,173 HW: [[506,MAIN], [733,SIZE1]]174 },175 0x219A:176 {177 dir: H,178 HW: [[690,MAIN], [1010,SIZE1]],179 stretch: {left:[0xE02F,SIZE6], rep:[0xE030,SIZE6], mid:[0xE031,SIZE6], right:[0xE032,SIZE6]}180 },181 0x219B:182 {183 dir: H,184 HW: [[690,MAIN], [1010,SIZE1]],185 stretch: {left:[0xE033,SIZE6], rep:[0xE034,SIZE6], mid:[0xE035,SIZE6], right:[0xE036,SIZE6]}186 },187 0x219E:188 {189 dir: H,190 HW: [[870,MAIN], [1190,SIZE1]],191 stretch: {left:[0xE041,SIZE6], rep:[0xE042,SIZE6], right:[0xE043,SIZE6]}192 },193 0x219F:194 {195 dir: V,196 HW: [[870,ARROWS], [1190,SIZE1]],197 stretch: {bot:[0xE047,SIZE6], ext:[0xE048,SIZE6], top:[0xE049,SIZE6]}198 },199 0x21A0:200 {201 dir: H,202 HW: [[870,MAIN], [1190,SIZE1]],203 stretch: {left:[0xE044,SIZE6], rep:[0xE045,SIZE6], right:[0xE046,SIZE6]}204 },205 0x21A1:206 {207 dir: V,208 HW: [[870,ARROWS], [1190,SIZE1]],209 stretch: {bot:[0xE04A,SIZE6], ext:[0xE04B,SIZE6], top:[0xE04C,SIZE6]}210 },211 0x21A2:212 {213 dir: H,214 HW: [[880,MAIN], [1200,SIZE1]],215 stretch: {left:[0xE04D,SIZE6], rep:[0xE04E,SIZE6], right:[0xE04F,SIZE6]}216 },217 0x21A3:218 {219 dir: H,220 HW: [[880,MAIN], [1200,SIZE1]],221 stretch: {left:[0xE050,SIZE6], rep:[0xE051,SIZE6], right:[0xE052,SIZE6]}222 },223 0x21A5:224 {225 dir: V,226 HW: [[690,ARROWS], [1010,SIZE1]],227 stretch: {bot:[0xE059,SIZE6], ext:[0xE05A,SIZE6], top:[0xE05B,SIZE6]}228 },229 0x21A7:230 {231 dir: V,232 HW: [[690,ARROWS], [1010,SIZE1]],233 stretch: {bot:[0xE05C,SIZE6], ext:[0xE05D,SIZE6], top:[0xE05E,SIZE6]}234 },235 0x21A9:236 {237 dir: H,238 HW: [[716,MAIN], [1036,SIZE1]],239 stretch: {left:[0xE062,SIZE6], rep:[0xE063,SIZE6], right:[0xE064,SIZE6]}240 },241 0x21AA:242 {243 dir: H,244 HW: [[716,MAIN], [1036,SIZE1]],245 stretch: {left:[0xE05F,SIZE6], rep:[0xE060,SIZE6], right:[0xE061,SIZE6]}246 },247 0x21AB:248 {249 dir: H,250 HW: [[716,MAIN], [1036,SIZE1]],251 stretch: {left:[0xE068,SIZE6], rep:[0xE069,SIZE6], right:[0xE06A,SIZE6]}252 },253 0x21AC:254 {255 dir: H,256 HW: [[716,MAIN], [1036,SIZE1]],257 stretch: {left:[0xE065,SIZE6], rep:[0xE066,SIZE6], right:[0xE067,SIZE6]}258 },259 0x21AD:260 {261 dir: H,262 HW: [[880,MAIN], [1200,SIZE1]]263 },264 0x21AE:265 {266 dir: H,267 HW: [[880,MAIN], [1200,SIZE1]],268 stretch: {left:[0xE03D,SIZE6], rep:[0xE03E,SIZE6], mid:[0xE03F,SIZE6], right:[0xE040,SIZE6]}269 },270 0x21B0:271 {272 dir: V,273 HW: [[696,MAIN], [888,SIZE1]]274 },275 0x21B1:276 {277 dir: V,278 HW: [[696,MAIN], [888,SIZE1]]279 },280 0x21B2:281 {282 dir: V,283 HW: [[696,ARROWS], [888,SIZE1]]284 },285 0x21B3:286 {287 dir: V,288 HW: [[696,ARROWS], [888,SIZE1]]289 },290 0x21B6:291 {292 dir: H,293 HW: [[639,MAIN], [879,SIZE1]]294 },295 0x21B7:296 {297 dir: H,298 HW: [[639,MAIN], [879,SIZE1]]299 },300 0x21BC:301 {302 dir: H,303 HW: [[680,MAIN], [1000,SIZE1]],304 stretch: {left:[0xE06B,SIZE6], rep:[0xE06C,SIZE6], right:[0xE06D,SIZE6]}305 },306 0x21BD:307 {308 dir: H,309 HW: [[680,MAIN], [1000,SIZE1]],310 stretch: {left:[0xE071,SIZE6], rep:[0xE072,SIZE6], right:[0xE073,SIZE6]}311 },312 0x21BE:313 {314 dir: V,315 HW: [[680,MAIN], [1000,SIZE1]],316 stretch: {bot:[0xE077,SIZE6], ext:[0xE078,SIZE6], top:[0xE079,SIZE6]}317 },318 0x21BF:319 {320 dir: V,321 HW: [[680,MAIN], [1000,SIZE1]],322 stretch: {bot:[0xE07D,SIZE6], ext:[0xE07E,SIZE6], top:[0xE07F,SIZE6]}323 },324 0x21C0:325 {326 dir: H,327 HW: [[680,MAIN], [1000,SIZE1]],328 stretch: {left:[0xE06E,SIZE6], rep:[0xE06F,SIZE6], right:[0xE070,SIZE6]}329 },330 0x21C1:331 {332 dir: H,333 HW: [[680,MAIN], [1000,SIZE1]],334 stretch: {left:[0xE074,SIZE6], rep:[0xE075,SIZE6], right:[0xE076,SIZE6]}335 },336 0x21C2:337 {338 dir: V,339 HW: [[680,MAIN], [1000,SIZE1]],340 stretch: {bot:[0xE07A,SIZE6], ext:[0xE07B,SIZE6], top:[0xE07C,SIZE6]}341 },342 0x21C3:343 {344 dir: V,345 HW: [[680,MAIN], [1000,SIZE1]],346 stretch: {bot:[0xE080,SIZE6], ext:[0xE081,SIZE6], top:[0xE082,SIZE6]}347 },348 0x21C4:349 {350 dir: H,351 HW: [[700,MAIN], [1020,SIZE1]],352 stretch: {left:[0xE083,SIZE6], rep:[0xE084,SIZE6], right:[0xE085,SIZE6]}353 },354 0x21C5:355 {356 dir: V,357 HW: [[700,ARROWS], [1020,SIZE1]],358 stretch: {bot:[0xE089,SIZE6], ext:[0xE08A,SIZE6], top:[0xE08B,SIZE6]}359 },360 0x21C6:361 {362 dir: H,363 HW: [[700,MAIN], [1020,SIZE1]],364 stretch: {left:[0xE086,SIZE6], rep:[0xE087,SIZE6], right:[0xE088,SIZE6]}365 },366 0x21C7:367 {368 dir: H,369 HW: [[690,MAIN], [1010,SIZE1]],370 stretch: {left:[0xE08F,SIZE6], rep:[0xE090,SIZE6], right:[0xE091,SIZE6]}371 },372 0x21C8:373 {374 dir: V,375 HW: [[690,MAIN], [1010,SIZE1]],376 stretch: {bot:[0xE095,SIZE6], ext:[0xE096,SIZE6], top:[0xE097,SIZE6]}377 },378 0x21C9:379 {380 dir: H,381 HW: [[690,MAIN], [1010,SIZE1]],382 stretch: {left:[0xE092,SIZE6], rep:[0xE093,SIZE6], right:[0xE094,SIZE6]}383 },384 0x21CA:385 {386 dir: V,387 HW: [[690,MAIN], [1010,SIZE1]],388 stretch: {bot:[0xE098,SIZE6], ext:[0xE099,SIZE6], top:[0xE09A,SIZE6]}389 },390 0x21CB:391 {392 dir: H,393 HW: [[680,MAIN], [1000,SIZE1]],394 stretch: {left:[0xE0A1,SIZE6], rep:[0xE0A2,SIZE6], right:[0xE0A3,SIZE6]}395 },396 0x21CC:397 {398 dir: H,399 HW: [[680,MAIN], [1000,SIZE1]],400 stretch: {left:[0xE0A4,SIZE6], rep:[0xE0A5,SIZE6], right:[0xE0A6,SIZE6]}401 },402 0x21CD:403 {404 dir: H,405 HW: [[690,MAIN], [1010,SIZE1]],406 stretch: {left:[0xE0B9,SIZE6], rep:[0xE0BA,SIZE6], mid:[0xE0BB,SIZE6], right:[0xE0BC,SIZE6]}407 },408 0x21CE:409 {410 dir: H,411 HW: [[880,MAIN], [1200,SIZE1]],412 stretch: {left:[0xE0C1,SIZE6], rep:[0xE0C2,SIZE6], mid:[0xE0C3,SIZE6], right:[0xE0C4,SIZE6]}413 },414 0x21CF:415 {416 dir: H,417 HW: [[690,MAIN], [1010,SIZE1]],418 stretch: {left:[0xE0BD,SIZE6], rep:[0xE0BE,SIZE6], mid:[0xE0BF,SIZE6], right:[0xE0C0,SIZE6]}419 },420 0x21D6:421 {422 dir: V,423 HW: [[560,ARROWS], [787,SIZE1]]424 },425 0x21D7:426 {427 dir: V,428 HW: [[560,ARROWS], [787,SIZE1]]429 },430 0x21D8:431 {432 dir: V,433 HW: [[560,ARROWS], [787,SIZE1]]434 },435 0x21D9:436 {437 dir: V,438 HW: [[560,ARROWS], [787,SIZE1]]439 },440 0x21DA:441 {442 dir: H,443 HW: [[870,MAIN], [1190,SIZE1]],444 stretch: {left:[0xE0CB,SIZE6], rep:[0xE0CC,SIZE6], right:[0xE0CD,SIZE6]}445 },446 0x21DB:447 {448 dir: H,449 HW: [[870,MAIN], [1190,SIZE1]],450 stretch: {left:[0xE0CE,SIZE6], rep:[0xE0CF,SIZE6], right:[0xE0D0,SIZE6]}451 },452 0x21DC:453 {454 dir: H,455 HW: [[690,ARROWS], [1010,SIZE1]]456 },457 0x21DD:458 {459 dir: H,460 HW: [[690,MAIN], [1010,SIZE1]]461 },462 0x21E6:463 {464 dir: H,465 HW: [[913,ARROWS], [1233,SIZE1]],466 stretch: {left:[0xE0D1,SIZE6], rep:[0xE0D2,SIZE6], right:[0xE0D3,SIZE6]}467 },468 0x21E7:469 {470 dir: V,471 HW: [[913,ARROWS], [1233,SIZE1]],472 stretch: {bot:[0xE0D7,SIZE6], ext:[0xE0D8,SIZE6], top:[0xE0D9,SIZE6]}473 },474 0x21E8:475 {476 dir: H,477 HW: [[913,ARROWS], [1233,SIZE1]],478 stretch: {left:[0xE0D4,SIZE6], rep:[0xE0D5,SIZE6], right:[0xE0D6,SIZE6]}479 },480 0x21E9:481 {482 dir: V,483 HW: [[913,ARROWS], [1233,SIZE1]],484 stretch: {bot:[0xE0DA,SIZE6], ext:[0xE0DB,SIZE6], top:[0xE0DC,SIZE6]}485 },486 0x21F3:487 {488 dir: V,489 HW: [[930,ARROWS], [1250,SIZE1]],490 stretch: {bot:[0xE0DD,SIZE6], ext:[0xE0DE,SIZE6], top:[0xE0DF,SIZE6]}491 },492 0x21F5:493 {494 dir: V,495 HW: [[700,ARROWS], [1020,SIZE1]],496 stretch: {bot:[0xE08C,SIZE6], ext:[0xE08D,SIZE6], top:[0xE08E,SIZE6]}497 },498 0x21F6:499 {500 dir: H,501 HW: [[690,ARROWS], [1010,SIZE1]],502 stretch: {left:[0xE09B,SIZE6], rep:[0xE09C,SIZE6], right:[0xE09D,SIZE6]}503 },504 0x220F:505 {506 dir: V,507 HW: [[954,OPERATORS], [1374,SIZE1]]508 },509 0x2210:510 {511 dir: V,512 HW: [[954,OPERATORS], [1374,SIZE1]]513 },514 0x2211:515 {516 dir: V,517 HW: [[954,OPERATORS], [1374,SIZE1]]518 },519 0x222B:520 {521 dir: V,522 HW: [[1092,MAIN], [2025,SIZE1]],523 stretch: {top:[0xE135,SIZE6], ext:[0x23AE,SYMBOLS], bot:[0xE136,SIZE6]}524 },525 0x222C:526 {527 dir: V,528 HW: [[1092,OPERATORS], [2025,SIZE1]],529 stretch: {top:[0xE137,SIZE6], ext:[0xE138,SIZE6], bot:[0xE139,SIZE6]}530 },531 0x222D:532 {533 dir: V,534 HW: [[1092,OPERATORS], [2025,SIZE1]],535 stretch: {top:[0xE13A,SIZE6], ext:[0xE13B,SIZE6], bot:[0xE13C,SIZE6]}536 },537 0x222E:538 {539 dir: V,540 HW: [[1092,OPERATORS,null,0x222F], [2025,SIZE1]]541 },542 0x222F:543 {544 dir: V,545 HW: [[1092,OPERATORS], [2025,SIZE1]]546 },547 0x2230:548 {549 dir: V,550 HW: [[1092,OPERATORS], [2025,SIZE1]]551 },552 0x2231:553 {554 dir: V,555 HW: [[1092,OPERATORS], [2025,SIZE1]]556 },557 0x2232:558 {559 dir: V,560 HW: [[1092,OPERATORS], [2025,SIZE1]]561 },562 0x2233:563 {564 dir: V,565 HW: [[1092,OPERATORS], [2025,SIZE1]]566 },567 0x2261:568 {569 dir: H,570 HW: [[500,MAIN]],571 stretch: {left:[0xE12D,SIZE6], rep:[0xE12E,SIZE6], right:[0xE12F,SIZE6]}572 },573 0x2263:574 {575 dir: H,576 HW: [[500,OPERATORS]],577 stretch: {left:[0xE130,SIZE6], rep:[0xE131,SIZE6], right:[0xE132,SIZE6]}578 },579 0x22A2:580 {581 dir: V,582 HW: [[650,MAIN], [800,SIZE1]]583 },584 0x22A3:585 {586 dir: V,587 HW: [[650,MAIN], [800,SIZE1]]588 },589 0x22A4:590 {591 dir: V,592 HW: [[650,MAIN], [800,SIZE1]]593 },594 0x22A5:595 {596 dir: V,597 HW: [[650,MAIN], [800,SIZE1]]598 },599 0x22C0:600 {601 dir: V,602 HW: [[888,OPERATORS], [1165,SIZE1]]603 },604 0x22C1:605 {606 dir: V,607 HW: [[888,OPERATORS], [1165,SIZE1]]608 },609 0x22C2:610 {611 dir: V,612 HW: [[898,OPERATORS], [1170,SIZE1]]613 },614 0x22C3:615 {616 dir: V,617 HW: [[898,OPERATORS], [1170,SIZE1]]618 },619 0x23B4:620 {621 dir: H,622 HW: [[375,MAIN], [750,SIZE1], [1125,SIZE2], [1500,SIZE3], [1875,SIZE4], [2250,SIZE5], [2625,SIZE6]],623 stretch: {left:[0xE11B,SIZE6], rep:[0xE11C,SIZE6], right:[0xE11D,SIZE6]}624 },625 0x23B5:626 {627 dir: H,628 HW: [[375,MAIN], [750,SIZE1], [1125,SIZE2], [1500,SIZE3], [1875,SIZE4], [2250,SIZE5], [2625,SIZE6]],629 stretch: {left:[0xE11E,SIZE6], rep:[0xE11F,SIZE6], right:[0xE120,SIZE6]}630 },631 0x23DC:632 {633 dir: H,634 HW: [[514,MAIN], [1014,SIZE1], [1514,SIZE2], [2013,SIZE3], [2514,SIZE4], [3014,SIZE5], [3514,SIZE6]],635 stretch: {left:[0xE115,SIZE6], rep:[0xE116,SIZE6], right:[0xE117,SIZE6]}636 },637 0x23DD:638 {639 dir: H,640 HW: [[514,MAIN], [1014,SIZE1], [1514,SIZE2], [2013,SIZE3], [2514,SIZE4], [3014,SIZE5], [3514,SIZE6]],641 stretch: {left:[0xE118,SIZE6], rep:[0xE119,SIZE6], right:[0xE11A,SIZE6]}642 },643 0x23E0:644 {645 dir: H,646 HW: [[562,MAIN], [1066,SIZE1], [1568,SIZE2], [2072,SIZE3], [2576,SIZE4], [3080,SIZE5], [3584,SIZE6]],647 stretch: {left:[0xE121,SIZE6], rep:[0xE122,SIZE6], right:[0xE123,SIZE6]}648 },649 0x23E1:650 {651 dir: H,652 HW: [[562,MAIN], [1066,SIZE1], [1568,SIZE2], [2072,SIZE3], [2576,SIZE4], [3080,SIZE5], [3584,SIZE6]],653 stretch: {left:[0xE124,SIZE6], rep:[0xE125,SIZE6], right:[0xE126,SIZE6]}654 },655 0x27A1:656 {657 dir: H,658 HW: [[870,MISC], [1190,SIZE1]],659 stretch: {left:[0xE0E6,SIZE6], rep:[0xE0E7,SIZE6], right:[0xE0E8,SIZE6]}660 },661 0x27E6:662 {663 dir: V,664 HW: [[836,SYMBOLS], [998,SIZE1], [1190,SIZE2], [1422,SIZE3], [1698,SIZE4], [2032,SIZE5], [2432,SIZE6]],665 stretch: {bot:[0xE107,SIZE6], ext:[0xE108,SIZE6], top:[0xE109,SIZE6]}666 },667 0x27E7:668 {669 dir: V,670 HW: [[836,SYMBOLS], [998,SIZE1], [1190,SIZE2], [1422,SIZE3], [1698,SIZE4], [2032,SIZE5], [2432,SIZE6]],671 stretch: {bot:[0xE10A,SIZE6], ext:[0xE10B,SIZE6], top:[0xE10C,SIZE6]}672 },673 0x27EA:674 {675 dir: V,676 HW: [[812,SYMBOLS], [1060,SIZE1], [1382,SIZE2], [1806,SIZE3], [2364,SIZE4], [3092,SIZE5], [4048,SIZE6]]677 },678 0x27EB:679 {680 dir: V,681 HW: [[812,SYMBOLS], [1060,SIZE1], [1382,SIZE2], [1806,SIZE3], [2364,SIZE4], [3092,SIZE5], [4048,SIZE6]]682 },683 0x2A00:684 {685 dir: V,686 HW: [[876,OPERATORS], [1132,SIZE1]]687 },688 0x2A01:689 {690 dir: V,691 HW: [[876,OPERATORS], [1132,SIZE1]]692 },693 0x2A02:694 {695 dir: V,696 HW: [[876,OPERATORS], [1132,SIZE1]]697 },698 0x2A03:699 {700 dir: V,701 HW: [[898,OPERATORS], [1170,SIZE1]]702 },703 0x2A04:704 {705 dir: V,706 HW: [[898,OPERATORS], [1170,SIZE1]]707 },708 0x2A05:709 {710 dir: V,711 HW: [[880,OPERATORS], [1152,SIZE1]]712 },713 0x2A06:714 {715 dir: V,716 HW: [[880,OPERATORS], [1152,SIZE1]]717 },718 0x2A09:719 {720 dir: V,721 HW: [[716,OPERATORS], [906,SIZE1]]722 },723 0x2A0C:724 {725 dir: V,726 HW: [[1092,OPERATORS], [2025,SIZE1]]727 },728 0x2A11:729 {730 dir: V,731 HW: [[1092,OPERATORS], [2025,SIZE1]]732 },733 0x2B04:734 {735 dir: H,736 HW: [[931,SHAPES], [1251,SIZE1]],737 stretch: {left:[0xE0E0,SIZE6], rep:[0xE0E1,SIZE6], right:[0xE0E2,SIZE6]}738 },739 0x2B05:740 {741 dir: H,742 HW: [[870,SHAPES], [1190,SIZE1]],743 stretch: {left:[0xE0E3,SIZE6], rep:[0xE0E4,SIZE6], right:[0xE0E5,SIZE6]}744 },745 0x2B06:746 {747 dir: V,748 HW: [[870,SHAPES], [1190,SIZE1]],749 stretch: {bot:[0xE0E9,SIZE6], ext:[0xE0EA,SIZE6], top:[0xE0EB,SIZE6]}750 },751 0x2B07:752 {753 dir: V,754 HW: [[870,SHAPES], [1190,SIZE1]],755 stretch: {bot:[0xE0EC,SIZE6], ext:[0xE0ED,SIZE6], top:[0xE0EE,SIZE6]}756 },757 0x2B0C:758 {759 dir: H,760 HW: [[880,SHAPES], [1200,SIZE1]],761 stretch: {left:[0xE0EF,SIZE6], rep:[0xE0F0,SIZE6], right:[0xE0F1,SIZE6]}762 },763 0x2B0D:764 {765 dir: V,766 HW: [[880,SHAPES], [1200,SIZE1]],767 stretch: {bot:[0xE0F2,SIZE6], ext:[0xE0F3,SIZE6], top:[0xE0F4,SIZE6]}768 },769 0x2B31:770 {771 dir: H,772 HW: [[690,SHAPES], [1010,SIZE1]],773 stretch: {left:[0xE09E,SIZE6], rep:[0xE09F,SIZE6], right:[0xE0A0,SIZE6]}774 }775 };776 777 for (var id in delim) {if (delim.hasOwnProperty(id)) {DELIMITERS[id] = delim[id]}};778 MathJax.Ajax.loadComplete(SVG.fontDir + "/fontdata-extra.js");...

Full Screen

Full Screen

MarkBetweenSize.js

Source:MarkBetweenSize.js Github

copy

Full Screen

1"use strict;"2function MarkBetweenSize( main , TargetObj1 , TargetObj2 ){3 var Box = new THREE.Box3();4 var objCenter1 = new THREE.Vector3();5 var objSize1 = new THREE.Vector3();6 var objCenter2 = new THREE.Vector3();7 var objSize2 = new THREE.Vector3();8 var FuniBox = new THREE.Box3();9 var FuniCenter = new THREE.Vector3();10 var group = new THREE.Group();11 main.scene.add(group);12 var num = 1;13 //detect the funiture component14 for(var i = main.furnitures.length - 1; i > -1; i -- ){ 15 var object = main.furnitures[i].getFurniture();16 17 if(object.isObject3D){18 group.add(object.clone());19 }20 }21 for(var i = main.Sceneobjects.length - 1; i > -1; i -- ){22 var object = main.Sceneobjects[i];23 group.add(object.clone());24 }25 //set funiture bounding box , box center26 FuniBox.setFromObject( group );27 FuniBox.getCenter( FuniCenter );28 main.scene.remove( group );29 30 //get object center31 Box.setFromObject( TargetObj1 );32 Box.getCenter(objCenter1);33 Box.getSize(objSize1);34 Box.setFromObject( TargetObj2 );35 Box.getCenter(objCenter2);36 Box.getSize(objSize2);37 //calculate x38 if( objCenter1.x != objCenter2.x ){39 var length = Math.abs(objCenter1.x - objCenter2.x)-objSize1.x/2-objSize2.x/2;40 41 if(objCenter1.x < objCenter2.x){num = 1;}42 else{num = -1;}43 //front the funiture44 if(objCenter1.z >= FuniCenter.z && length>0){45 loadText( main ,46 length ,47 new THREE.Vector3((objCenter1.x + objCenter2.x)/2,48 objCenter1.y - objSize1.y/2 ,49 objCenter1.z + objSize1.z/2 + 1), 50 0 );51 52 loadLine( main ,53 new THREE.Vector3(objCenter1.x + num*objSize1.x/2,54 objCenter1.y - objSize1.y/2 ,55 objCenter1.z + objSize1.z/2 + 1) ,56 new THREE.Vector3(objCenter2.x - num*objSize2.x/2,57 objCenter1.y - objSize1.y/2 ,58 objCenter1.z + objSize1.z/2 + 1));59 loadLine( main ,60 new THREE.Vector3(objCenter1.x + num*objSize1.x/2,61 objCenter1.y - objSize1.y/2 ,62 objCenter1.z + objSize1.z/2 + 0.5) ,63 new THREE.Vector3(objCenter1.x + num*objSize1.x/2,64 objCenter1.y - objSize1.y/2 ,65 objCenter1.z + objSize1.z/2 + 1.5));66 loadLine( main ,67 new THREE.Vector3(objCenter2.x - num*objSize2.x/2,68 objCenter1.y - objSize1.y/2 ,69 objCenter1.z + objSize1.z/2 + 0.5) ,70 new THREE.Vector3(objCenter2.x - num*objSize2.x/2,71 objCenter1.y - objSize1.y/2 ,72 objCenter1.z + objSize1.z/2 + 1.5));73 }74 //back the funiture75 else if(objCenter1.z < FuniCenter.z && length>0){76 loadText( main ,77 length ,78 new THREE.Vector3((objCenter1.x + objCenter2.x)/2,79 objCenter1.y - objSize1.y/2 ,80 objCenter1.z - objSize1.z/2 - 1), 81 180 );82 loadLine( main ,83 new THREE.Vector3(objCenter1.x + num*objSize1.x/2,84 objCenter1.y - objSize1.y/2 ,85 objCenter1.z - objSize1.z/2 - 1) ,86 new THREE.Vector3(objCenter2.x - num*objSize2.x/2,87 objCenter1.y - objSize1.y/2 ,88 objCenter1.z - objSize1.z/2 - 1));89 loadLine( main ,90 new THREE.Vector3(objCenter1.x + num*objSize1.x/2,91 objCenter1.y - objSize1.y/2 ,92 objCenter1.z - objSize1.z/2 - 0.5) ,93 new THREE.Vector3(objCenter1.x + num*objSize1.x/2,94 objCenter1.y - objSize1.y/2 ,95 objCenter1.z - objSize1.z/2 - 1.5));96 loadLine( main ,97 new THREE.Vector3(objCenter2.x - num*objSize2.x/2,98 objCenter1.y - objSize1.y/2 ,99 objCenter1.z - objSize1.z/2 - 0.5) ,100 new THREE.Vector3(objCenter2.x - num*objSize2.x/2,101 objCenter1.y - objSize1.y/2 ,102 objCenter1.z - objSize1.z/2 - 1.5));103 }104 }105 //calculate z106 if( objCenter1.z != objCenter2.z ){107 var length = Math.abs(objCenter1.z - objCenter2.z)-objSize1.z/2-objSize2.z/2;108 if(objCenter1.z > objCenter2.z){num = 1;}109 else{num = -1;}110 //right the funiture111 if(objCenter1.x > FuniCenter.x && length>0){112 loadText( main ,113 length ,114 new THREE.Vector3(objCenter1.x + objSize1.x/2 +1,115 objCenter1.y - objSize1.y/2 ,116 (objCenter1.z + objCenter2.z)/2 ),117 90 );118 119 loadLine( main ,120 new THREE.Vector3(objCenter1.x + objSize1.x/2 +1,121 objCenter1.y - objSize1.y/2 ,122 objCenter1.z - num*objSize1.z/2) ,123 new THREE.Vector3(objCenter1.x + objSize1.x/2 +1,124 objCenter1.y - objSize1.y/2 ,125 objCenter2.z + num*objSize2.z/2));126 loadLine( main ,127 new THREE.Vector3(objCenter1.x + objSize1.x/2 +0.5,128 objCenter1.y - objSize1.y/2 ,129 objCenter1.z - num*objSize1.z/2) ,130 new THREE.Vector3(objCenter1.x + objSize1.x/2 +1.5,131 objCenter1.y - objSize1.y/2 ,132 objCenter1.z - num*objSize1.z/2));133 loadLine( main ,134 new THREE.Vector3(objCenter1.x + objSize1.x/2 +0.5,135 objCenter1.y - objSize1.y/2 ,136 objCenter2.z + num*objSize2.z/2) ,137 new THREE.Vector3(objCenter1.x + objSize1.x/2 +1.5,138 objCenter1.y - objSize1.y/2 ,139 objCenter2.z + num*objSize2.z/2));140 }141 //left the funiture142 else if(objCenter1.x <= FuniCenter.x && length>0){143 loadText( main ,144 length ,145 new THREE.Vector3(objCenter1.x - objSize1.x/2 -1,146 objCenter1.y - objSize1.y/2 ,147 (objCenter1.z + objCenter2.z)/2 ),148 270 );149 loadLine( main ,150 new THREE.Vector3(objCenter1.x - objSize1.x/2 -1,151 objCenter1.y - objSize1.y/2 ,152 objCenter1.z - num*objSize1.z/2) ,153 new THREE.Vector3(objCenter1.x - objSize1.x/2 -1,154 objCenter1.y - objSize1.y/2 ,155 objCenter2.z + num*objSize2.z/2));156 loadLine( main ,157 new THREE.Vector3(objCenter1.x - objSize1.x/2 -0.5,158 objCenter1.y - objSize1.y/2 ,159 objCenter1.z - num*objSize1.z/2) ,160 new THREE.Vector3(objCenter1.x - objSize1.x/2 -1.5,161 objCenter1.y - objSize1.y/2 ,162 objCenter1.z - num*objSize1.z/2));163 loadLine( main ,164 new THREE.Vector3(objCenter1.x - objSize1.x/2 -0.5,165 objCenter1.y - objSize1.y/2 ,166 objCenter2.z + num*objSize2.z/2) ,167 new THREE.Vector3(objCenter1.x - objSize1.x/2 -1.5,168 objCenter1.y - objSize1.y/2 ,169 objCenter2.z + num*objSize2.z/2));170 }171 }172 //calculate y173 if( objCenter1.y != objCenter2.y ){174 var length = Math.abs(objCenter1.y - objCenter2.y)-objSize1.y/2-objSize2.y/2;175 176 if(objCenter1.y < objCenter2.y){num = 1;}177 else{num = -1;}178 //front the funiture179 if(objCenter1.z >= FuniCenter.z && length>0){180 //right the funiture181 if(objCenter1.x > FuniCenter.x){182 loadText( main ,183 length ,184 new THREE.Vector3(objCenter1.x + objSize1.x/2 + 1,185 (objCenter1.y + objCenter2.y)/2 ,186 objCenter1.z + objSize1.z/2 +1),187 45 );188 loadLine( main ,189 new THREE.Vector3(objCenter1.x + objSize1.x/2 + 1,190 objCenter1.y + num*objSize1.y/2 ,191 objCenter1.z + objSize1.z/2 +1) ,192 new THREE.Vector3(objCenter1.x + objSize1.x/2 + 1,193 objCenter2.y - num*objSize2.y/2 ,194 objCenter1.z + objSize1.z/2 +1 ));195 loadLine( main ,196 new THREE.Vector3(objCenter1.x + objSize1.x/2 +0.5,197 objCenter1.y + num*objSize1.y/2 ,198 objCenter1.z + objSize1.z/2 +0.5) ,199 new THREE.Vector3(objCenter1.x + objSize1.x/2 +1.5,200 objCenter1.y + num*objSize1.y/2 ,201 objCenter1.z + objSize1.z/2 +1.5));202 loadLine( main ,203 new THREE.Vector3(objCenter1.x + objSize1.x/2 +0.5,204 objCenter2.y - num*objSize2.y/2 ,205 objCenter1.z + objSize1.z/2 +0.5) ,206 new THREE.Vector3(objCenter1.x + objSize1.x/2 +1.5,207 objCenter2.y - num*objSize2.y/2 ,208 objCenter1.z + objSize1.z/2 +1.5));209 }210 else{//right the funiture211 loadText( main ,212 length ,213 new THREE.Vector3(objCenter1.x - objSize1.x/2 - 1,214 (objCenter1.y + objCenter2.y)/2 ,215 objCenter1.z + objSize1.z/2 +1),216 -45 );217 loadLine( main ,218 new THREE.Vector3(objCenter1.x - objSize1.x/2 - 1,219 objCenter1.y + num*objSize1.y/2 ,220 objCenter1.z + objSize1.z/2 +1) ,221 new THREE.Vector3(objCenter1.x - objSize1.x/2 - 1,222 objCenter2.y - num*objSize2.y/2 ,223 objCenter1.z + objSize1.z/2 +1 ));224 loadLine( main ,225 new THREE.Vector3(objCenter1.x - objSize1.x/2 -0.5,226 objCenter1.y + num*objSize1.y/2 ,227 objCenter1.z + objSize1.z/2 +0.5) ,228 new THREE.Vector3(objCenter1.x - objSize1.x/2 -1.5,229 objCenter1.y + num*objSize1.y/2 ,230 objCenter1.z + objSize1.z/2 +1.5));231 loadLine( main ,232 new THREE.Vector3(objCenter1.x - objSize1.x/2 -0.5,233 objCenter2.y - num*objSize2.y/2 ,234 objCenter1.z + objSize1.z/2 +0.5) ,235 new THREE.Vector3(objCenter1.x - objSize1.x/2 -1.5,236 objCenter2.y - num*objSize2.y/2 ,237 objCenter1.z + objSize1.z/2 +1.5));238 }239 }240 //back the funiture241 else if(objCenter1.z < FuniCenter.z && length>0){242 //right the funiture243 if(objCenter1.x > FuniCenter.x){244 loadText( main ,245 length ,246 new THREE.Vector3(objCenter1.x + objSize1.x/2 + 1,247 (objCenter1.y + objCenter2.y)/2 ,248 objCenter1.z - objSize1.z/2 -1),249 135 );250 loadLine( main ,251 new THREE.Vector3(objCenter1.x + objSize1.x/2 + 1,252 objCenter1.y + num*objSize1.y/2 ,253 objCenter1.z - objSize1.z/2 -1) ,254 new THREE.Vector3(objCenter1.x + objSize1.x/2 + 1,255 objCenter2.y - num*objSize2.y/2 ,256 objCenter1.z - objSize1.z/2 -1 ));257 loadLine( main ,258 new THREE.Vector3(objCenter1.x + objSize1.x/2 +0.5,259 objCenter1.y + num*objSize1.y/2 ,260 objCenter1.z - objSize1.z/2 -0.5) ,261 new THREE.Vector3(objCenter1.x + objSize1.x/2 +1.5,262 objCenter1.y + num*objSize1.y/2 ,263 objCenter1.z - objSize1.z/2 -1.5));264 loadLine( main ,265 new THREE.Vector3(objCenter1.x + objSize1.x/2 +0.5,266 objCenter2.y - num*objSize2.y/2 ,267 objCenter1.z - objSize1.z/2 -0.5) ,268 new THREE.Vector3(objCenter1.x + objSize1.x/2 +1.5,269 objCenter2.y - num*objSize2.y/2 ,270 objCenter1.z - objSize1.z/2 -1.5));271 }272 else{//left the funiture273 loadText( main ,274 length ,275 new THREE.Vector3(objCenter1.x - objSize1.x/2 - 1,276 (objCenter1.y + objCenter2.y)/2 ,277 objCenter1.z - objSize1.z/2 -1),278 135 );279 loadLine( main ,280 new THREE.Vector3(objCenter1.x - objSize1.x/2 - 1,281 objCenter1.y + num*objSize1.y/2 ,282 objCenter1.z - objSize1.z/2 -1) ,283 new THREE.Vector3(objCenter1.x - objSize1.x/2 - 1,284 objCenter2.y - num*objSize2.y/2 ,285 objCenter1.z - objSize1.z/2 -1 ));286 loadLine( main ,287 new THREE.Vector3(objCenter1.x - objSize1.x/2 -0.5,288 objCenter1.y + num*objSize1.y/2 ,289 objCenter1.z - objSize1.z/2 -0.5) ,290 new THREE.Vector3(objCenter1.x - objSize1.x/2 -1.5,291 objCenter1.y + num*objSize1.y/2 ,292 objCenter1.z - objSize1.z/2 -1.5));293 loadLine( main ,294 new THREE.Vector3(objCenter1.x - objSize1.x/2 -0.5,295 objCenter2.y - num*objSize2.y/2 ,296 objCenter1.z - objSize1.z/2 -0.5) ,297 new THREE.Vector3(objCenter1.x - objSize1.x/2 -1.5,298 objCenter2.y - num*objSize2.y/2 ,299 objCenter1.z - objSize1.z/2 -1.5));300 }301 }302 }303}304function loadText(main , num , position , rotat){305 var text = (Math.round(num*10)/100).toString();306 var loader = new THREE.FontLoader();307 var font = loader.load(308 // resource URL309 'three.js-master/examples/fonts/helvetiker_regular.typeface.json',310 // onLoad callback311 function ( font ) {312 var geometry = new THREE.TextGeometry( text , {313 font: font ,314 size: 0.3,315 height: 0.05,316 curveSegments: 12,317 bevelEnabled: false,318 bevelThickness: 5,319 bevelSize: 4,320 bevelSegments: 1321 } );322 var material = new THREE.MeshBasicMaterial( { color: 0x000000 } );323 var mesh = new THREE.Mesh( geometry, material );324 mesh.position.set( position.x , position.y +0.5 , position.z );325 mesh.rotateOnWorldAxis(new THREE.Vector3(0,1,0) , rotat * Math.PI/180);326 main.scene.add( mesh );327 main.SizeObj.push(mesh);328 }329 );330}331function loadLine( main , point1 , point2){332 var material = new THREE.LineBasicMaterial({333 color: 0x000000,334 linewidth: 10,335 linecap: 'round', //ignored by WebGLRenderer336 linejoin: 'round' //ignored by WebGLRenderer337 });338 var geometry = new THREE.Geometry();339 geometry.vertices.push(340 new THREE.Vector3( point1.x , point1.y , point1.z ),341 new THREE.Vector3( point2.x , point2.y , point2.z )342 );343 var line = new THREE.Line( geometry, material );344 main.scene.add( line );345 main.SizeObj.push(line);346 }...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('webpagetest');2var wpt = new WebPageTest('www.webpagetest.org');3 if (err) return console.error(err);4 wpt.getTestStatus(data.data.testId, function(err, data) {5 if (err) return console.error(err);6 var size1 = data.data.median.firstView.ImageSize;7 console.log(size1);8 });9});10var wpt = require('webpagetest');11var wpt = new WebPageTest('www.webpagetest.org');12 if (err) return console.error(err);13 wpt.getTestStatus(data.data.testId, function(err, data) {14 if (err) return console.error(err);15 var size1 = data.data.median.firstView.ImageSize;16 console.log(size1);17 });18});19var wpt = require('webpagetest');20var wpt = new WebPageTest('www.webpagetest.org');21 if (err) return console.error(err);22 wpt.getTestStatus(data.data.testId, function(err, data) {23 if (err) return console.error(err);24 var size1 = data.data.median.firstView.ImageSize;25 console.log(size1);26 });27});28var wpt = require('webpagetest');29var wpt = new WebPageTest('www.webpagetest.org');30 if (err) return console.error(err);31 wpt.getTestStatus(data.data.testId, function(err, data) {32 if (err) return console.error(err);

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('webpagetest');2var wpt = new WebPageTest('www.webpagetest.org');3 if (err) return console.log(err);4 console.log('Test status:', data.statusText);5 if (data.statusCode == 200) {6 console.log('Test completed in', data.data.average.firstView.loadTime, 'ms');7 wpt.getTestResults(data.data.testId, function(err, data) {8 if (err) return console.log(err);9 console.log('Test completed in', data.data.average.firstView.loadTime, 'ms');10 });11 }12});

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run wpt 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