[{"data":1,"prerenderedAt":1908},["ShallowReactive",2],{"project-swift-micro-interpreter":3,"content-query-G0xyN7seN2":478,"project-header-swift-micro-interpreter":824,"next-project-swift-micro-interpreter":1170,"project-title-swift-micro-interpreter":1562},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"tags":10,"image":16,"previewImage":17,"createdAt":18,"enabled":19,"source":20,"body":21,"_type":472,"_id":473,"_source":474,"_file":475,"_stem":476,"_extension":477},"\u002Fproject\u002Fswift-micro-interpreter","project",false,"","Swift Micro Interpreter","A small interpreter in C++ for a subset of Swift, Apple's programming language.",[11,12,13,14,15],"C++","Flex","Bison","Swift","Make","\u002Fimg\u002Fprojects\u002Fswift-micro-interpreter\u002Fcover.png","\u002Fimg\u002Fprojects\u002Fswift-micro-interpreter\u002Ftree.png","2025-12-15T00:00:00+03:00",true,"https:\u002F\u002Fgithub.com\u002FVincevdb1\u002Fswift-micro-interpreter",{"type":22,"children":23,"toc":469},"root",[24,39],{"type":25,"tag":26,"props":27,"children":28},"element","project-header",{},[29],{"type":25,"tag":30,"props":31,"children":32},"project-title",{},[33],{"type":25,"tag":34,"props":35,"children":36},"p",{},[37],{"type":38,"value":8},"text",{"type":25,"tag":40,"props":41,"children":42},"project-main",{},[43,170,215,258,424,438,451,462],{"type":25,"tag":44,"props":45,"children":48},"project-section",{"type":46,"style":47},"2-col","--gap: 4rem; --col-1: 50%",[49,164],{"type":25,"tag":50,"props":51,"children":52},"div",{},[53,108],{"type":25,"tag":34,"props":54,"children":55},{},[56,58,64,66,70,72,81,83,88,90,95,97,106],{"type":38,"value":57},"This project was made to learn more about how ",{"type":25,"tag":59,"props":60,"children":61},"strong",{},[62],{"type":38,"value":63},"compilers",{"type":38,"value":65}," work.\nI wrote a small interpreter in ",{"type":25,"tag":59,"props":67,"children":68},{},[69],{"type":38,"value":11},{"type":38,"value":71}," that runs a part of ",{"type":25,"tag":59,"props":73,"children":74},{},[75],{"type":25,"tag":76,"props":77,"children":79},"project-term",{"note":78},"A programming language made by Apple, mostly used to build apps for the iPhone and Mac.",[80],{"type":38,"value":14},{"type":38,"value":82},". It follows the traditional parts of a compiler ",{"type":25,"tag":59,"props":84,"children":85},{},[86],{"type":38,"value":87},"frontend",{"type":38,"value":89},": a lexer, a parser and a typechecker.\nThere is no ",{"type":25,"tag":59,"props":91,"children":92},{},[93],{"type":38,"value":94},"backend",{"type":38,"value":96}," that generates machine code, so the interpreter runs the program by traversing the ",{"type":25,"tag":59,"props":98,"children":99},{},[100],{"type":25,"tag":76,"props":101,"children":103},{"note":102},"Abstract Syntax Tree. The program stored as a tree, where for example a plus has the two things it adds as its children.",[104],{"type":38,"value":105},"AST",{"type":38,"value":107},".",{"type":25,"tag":34,"props":109,"children":110},{},[111,113,121,123,131,133,142,144,153,155,162],{"type":38,"value":112},"First, ",{"type":25,"tag":59,"props":114,"children":115},{},[116],{"type":25,"tag":76,"props":117,"children":119},{"note":118},"A tool that generates the code to cut a text into tokens, such as names, numbers and symbols.",[120],{"type":38,"value":12},{"type":38,"value":122}," splits the code into tokens. Then a parser made with ",{"type":25,"tag":59,"props":124,"children":125},{},[126],{"type":25,"tag":76,"props":127,"children":129},{"note":128},"A tool that generates a parser from the grammar rules of a language.",[130],{"type":38,"value":13},{"type":38,"value":132}," builds the AST from them, based on a grammar.\nI struggled with the grammar, because Bison sometimes gave me ",{"type":25,"tag":59,"props":134,"children":135},{},[136],{"type":25,"tag":76,"props":137,"children":139},{"note":138},"A conflict where the parser cannot decide if it should read the next token or first apply a grammar rule to what it already has.",[140],{"type":38,"value":141},"shift\u002Freduce",{"type":38,"value":143}," or ",{"type":25,"tag":59,"props":145,"children":146},{},[147],{"type":25,"tag":76,"props":148,"children":150},{"note":149},"A conflict where two grammar rules fit the same piece of code, so the parser cannot decide which one to apply.",[151],{"type":38,"value":152},"reduce\u002Freduce",{"type":38,"value":154}," conflicts.\nThe image shows every step for ",{"type":25,"tag":156,"props":157,"children":159},"code",{"className":158},[],[160],{"type":38,"value":161},"print(factorial(n: 5))",{"type":38,"value":163},", which prints 120.",{"type":25,"tag":165,"props":166,"children":169},"project-image",{"alt":167,"src":168},"Every step from the Swift code to the result","\u002Fimg\u002Fprojects\u002Fswift-micro-interpreter\u002Fpipeline.png",[],{"type":25,"tag":44,"props":171,"children":172},{"type":46,"style":47},[173,178],{"type":25,"tag":165,"props":174,"children":177},{"alt":175,"src":176},"Two mistakes that the typechecker finds","\u002Fimg\u002Fprojects\u002Fswift-micro-interpreter\u002Ferrors.png",[],{"type":25,"tag":34,"props":179,"children":180},{},[181,183,189,191,197,199,205,207,213],{"type":38,"value":182},"After that, a typechecker traverses the AST to look for mistakes, like changing a ",{"type":25,"tag":156,"props":184,"children":186},{"className":185},[],[187],{"type":38,"value":188},"let",{"type":38,"value":190}," (",{"type":25,"tag":156,"props":192,"children":194},{"className":193},[],[195],{"type":38,"value":196},"const",{"type":38,"value":198}," in other languages) or giving an ",{"type":25,"tag":156,"props":200,"children":202},{"className":201},[],[203],{"type":38,"value":204},"Int",{"type":38,"value":206}," to a ",{"type":25,"tag":156,"props":208,"children":210},{"className":209},[],[211],{"type":38,"value":212},"Bool",{"type":38,"value":214},", and shows the line it is on. If it finds none, the interpreter traverses the AST again to run the program.",{"type":25,"tag":44,"props":216,"children":217},{"type":46,"style":47},[218,254],{"type":25,"tag":34,"props":219,"children":220},{},[221,223,228,230,236,238,244,246,252],{"type":38,"value":222},"Functions were the hardest part for me. I learned that Swift functions use labels by default when you call them, which I was not used to.\nIn Swift, the labels are part of the function ",{"type":25,"tag":59,"props":224,"children":225},{},[226],{"type":38,"value":227},"signature",{"type":38,"value":229},", together with the types of the arguments, so ",{"type":25,"tag":156,"props":231,"children":233},{"className":232},[],[234],{"type":38,"value":235},"f(x: 3)",{"type":38,"value":237}," and ",{"type":25,"tag":156,"props":239,"children":241},{"className":240},[],[242],{"type":38,"value":243},"f(a: 3)",{"type":38,"value":245}," can be two different functions.\nI also had to make sure that a nested function can still use the variables of the function around it.\nFunctions can call themselves too, like ",{"type":25,"tag":156,"props":247,"children":249},{"className":248},[],[250],{"type":38,"value":251},"factorial",{"type":38,"value":253}," here (recursion). In the tree, that call is just another node.",{"type":25,"tag":165,"props":255,"children":257},{"alt":256,"src":16},"A recursive function and its tree",[],{"type":25,"tag":44,"props":259,"children":260},{"type":38},[261,266,406,419],{"type":25,"tag":34,"props":262,"children":263},{},[264],{"type":38,"value":265},"These are the parts of Swift that work:",{"type":25,"tag":267,"props":268,"children":269},"ul",{},[270,315,340,386,396],{"type":25,"tag":271,"props":272,"children":273},"li",{},[274,279,281,286,287,292,294,300,301,306,308,314],{"type":25,"tag":59,"props":275,"children":276},{},[277],{"type":38,"value":278},"Values",{"type":38,"value":280},": ",{"type":25,"tag":156,"props":282,"children":284},{"className":283},[],[285],{"type":38,"value":204},{"type":38,"value":237},{"type":25,"tag":156,"props":288,"children":290},{"className":289},[],[291],{"type":38,"value":212},{"type":38,"value":293},", with ",{"type":25,"tag":156,"props":295,"children":297},{"className":296},[],[298],{"type":38,"value":299},"var",{"type":38,"value":237},{"type":25,"tag":156,"props":302,"children":304},{"className":303},[],[305],{"type":38,"value":188},{"type":38,"value":307},". You can leave out the type, like ",{"type":25,"tag":156,"props":309,"children":311},{"className":310},[],[312],{"type":38,"value":313},"var a = 5",{"type":38,"value":107},{"type":25,"tag":271,"props":316,"children":317},{},[318,323,325,331,332,338],{"type":25,"tag":59,"props":319,"children":320},{},[321],{"type":38,"value":322},"Math and logic",{"type":38,"value":324},": the usual operators in the right order. ",{"type":25,"tag":156,"props":326,"children":328},{"className":327},[],[329],{"type":38,"value":330},"&&",{"type":38,"value":237},{"type":25,"tag":156,"props":333,"children":335},{"className":334},[],[336],{"type":38,"value":337},"||",{"type":38,"value":339}," skip the right side when it isn't needed.",{"type":25,"tag":271,"props":341,"children":342},{},[343,348,349,355,357,363,364,370,371,377,378,384],{"type":25,"tag":59,"props":344,"children":345},{},[346],{"type":38,"value":347},"Control flow",{"type":38,"value":280},{"type":25,"tag":156,"props":350,"children":352},{"className":351},[],[353],{"type":38,"value":354},"if",{"type":38,"value":356},", ",{"type":25,"tag":156,"props":358,"children":360},{"className":359},[],[361],{"type":38,"value":362},"else if",{"type":38,"value":356},{"type":25,"tag":156,"props":365,"children":367},{"className":366},[],[368],{"type":38,"value":369},"else",{"type":38,"value":356},{"type":25,"tag":156,"props":372,"children":374},{"className":373},[],[375],{"type":38,"value":376},"while",{"type":38,"value":237},{"type":25,"tag":156,"props":379,"children":381},{"className":380},[],[382],{"type":38,"value":383},"do",{"type":38,"value":385}," blocks, where an inner block can reuse a name from outside (shadowing).",{"type":25,"tag":271,"props":387,"children":388},{},[389,394],{"type":25,"tag":59,"props":390,"children":391},{},[392],{"type":38,"value":393},"Functions",{"type":38,"value":395},": labels, recursion, nesting and overloading.",{"type":25,"tag":271,"props":397,"children":398},{},[399,404],{"type":25,"tag":59,"props":400,"children":401},{},[402],{"type":38,"value":403},"Errors",{"type":38,"value":405},": syntax and type errors with line numbers, and an error for dividing by zero.",{"type":25,"tag":34,"props":407,"children":408},{},[409,411,417],{"type":38,"value":410},"In real Swift, an assignment like ",{"type":25,"tag":156,"props":412,"children":414},{"className":413},[],[415],{"type":38,"value":416},"a = 5",{"type":38,"value":418}," is also an expression that gives back an empty value. I kept it as a normal statement, because that was simpler.",{"type":25,"tag":34,"props":420,"children":421},{},[422],{"type":38,"value":423},"Strings, arrays and for loops are not in there yet, but they would be cool to add as the next thing.",{"type":25,"tag":44,"props":425,"children":427},{"type":46,"style":426},"--gap: 2rem; --col-1: 50%",[428,433],{"type":25,"tag":165,"props":429,"children":432},{"alt":430,"src":431},"The labels and types decide which function is called","\u002Fimg\u002Fprojects\u002Fswift-micro-interpreter\u002Foverloads.png",[],{"type":25,"tag":165,"props":434,"children":437},{"alt":435,"src":436},"A nested function that uses a variable of the function around it","\u002Fimg\u002Fprojects\u002Fswift-micro-interpreter\u002Fnested-functions.png",[],{"type":25,"tag":44,"props":439,"children":440},{"type":46,"style":426},[441,446],{"type":25,"tag":165,"props":442,"children":445},{"alt":443,"src":444},"A block that reuses a name from outside","\u002Fimg\u002Fprojects\u002Fswift-micro-interpreter\u002Fshadowing.png",[],{"type":25,"tag":165,"props":447,"children":450},{"alt":448,"src":449},"The right side is skipped when it isn't needed","\u002Fimg\u002Fprojects\u002Fswift-micro-interpreter\u002Fshort-circuit.png",[],{"type":25,"tag":44,"props":452,"children":453},{"type":46,"style":426},[454,459],{"type":25,"tag":165,"props":455,"children":458},{"alt":456,"src":457},"The order of the operators decides the shape of the tree","\u002Fimg\u002Fprojects\u002Fswift-micro-interpreter\u002Fprecedence.png",[],{"type":25,"tag":50,"props":460,"children":461},{},[],{"type":25,"tag":44,"props":463,"children":465},{"type":464},"project-next",[466],{"type":25,"tag":464,"props":467,"children":468},{},[],{"title":7,"searchDepth":470,"depth":470,"links":471},2,[],"markdown","profile:project:swift-micro-interpreter.md","profile","project\u002Fswift-micro-interpreter.md","project\u002Fswift-micro-interpreter","md",{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"tags":479,"image":16,"previewImage":17,"createdAt":18,"enabled":19,"source":20,"body":480,"_type":472,"_id":473,"_source":474,"_file":475,"_stem":476,"_extension":477},[11,12,13,14,15],{"type":22,"children":481,"toc":822},[482,492],{"type":25,"tag":26,"props":483,"children":484},{},[485],{"type":25,"tag":30,"props":486,"children":487},{},[488],{"type":25,"tag":34,"props":489,"children":490},{},[491],{"type":38,"value":8},{"type":25,"tag":40,"props":493,"children":494},{},[495,586,620,653,789,798,807,816],{"type":25,"tag":44,"props":496,"children":497},{"type":46,"style":47},[498,583],{"type":25,"tag":50,"props":499,"children":500},{},[501,541],{"type":25,"tag":34,"props":502,"children":503},{},[504,505,509,510,514,515,522,523,527,528,532,533,540],{"type":38,"value":57},{"type":25,"tag":59,"props":506,"children":507},{},[508],{"type":38,"value":63},{"type":38,"value":65},{"type":25,"tag":59,"props":511,"children":512},{},[513],{"type":38,"value":11},{"type":38,"value":71},{"type":25,"tag":59,"props":516,"children":517},{},[518],{"type":25,"tag":76,"props":519,"children":520},{"note":78},[521],{"type":38,"value":14},{"type":38,"value":82},{"type":25,"tag":59,"props":524,"children":525},{},[526],{"type":38,"value":87},{"type":38,"value":89},{"type":25,"tag":59,"props":529,"children":530},{},[531],{"type":38,"value":94},{"type":38,"value":96},{"type":25,"tag":59,"props":534,"children":535},{},[536],{"type":25,"tag":76,"props":537,"children":538},{"note":102},[539],{"type":38,"value":105},{"type":38,"value":107},{"type":25,"tag":34,"props":542,"children":543},{},[544,545,552,553,560,561,568,569,576,577,582],{"type":38,"value":112},{"type":25,"tag":59,"props":546,"children":547},{},[548],{"type":25,"tag":76,"props":549,"children":550},{"note":118},[551],{"type":38,"value":12},{"type":38,"value":122},{"type":25,"tag":59,"props":554,"children":555},{},[556],{"type":25,"tag":76,"props":557,"children":558},{"note":128},[559],{"type":38,"value":13},{"type":38,"value":132},{"type":25,"tag":59,"props":562,"children":563},{},[564],{"type":25,"tag":76,"props":565,"children":566},{"note":138},[567],{"type":38,"value":141},{"type":38,"value":143},{"type":25,"tag":59,"props":570,"children":571},{},[572],{"type":25,"tag":76,"props":573,"children":574},{"note":149},[575],{"type":38,"value":152},{"type":38,"value":154},{"type":25,"tag":156,"props":578,"children":580},{"className":579},[],[581],{"type":38,"value":161},{"type":38,"value":163},{"type":25,"tag":165,"props":584,"children":585},{"alt":167,"src":168},[],{"type":25,"tag":44,"props":587,"children":588},{"type":46,"style":47},[589,592],{"type":25,"tag":165,"props":590,"children":591},{"alt":175,"src":176},[],{"type":25,"tag":34,"props":593,"children":594},{},[595,596,601,602,607,608,613,614,619],{"type":38,"value":182},{"type":25,"tag":156,"props":597,"children":599},{"className":598},[],[600],{"type":38,"value":188},{"type":38,"value":190},{"type":25,"tag":156,"props":603,"children":605},{"className":604},[],[606],{"type":38,"value":196},{"type":38,"value":198},{"type":25,"tag":156,"props":609,"children":611},{"className":610},[],[612],{"type":38,"value":204},{"type":38,"value":206},{"type":25,"tag":156,"props":615,"children":617},{"className":616},[],[618],{"type":38,"value":212},{"type":38,"value":214},{"type":25,"tag":44,"props":621,"children":622},{"type":46,"style":47},[623,650],{"type":25,"tag":34,"props":624,"children":625},{},[626,627,631,632,637,638,643,644,649],{"type":38,"value":222},{"type":25,"tag":59,"props":628,"children":629},{},[630],{"type":38,"value":227},{"type":38,"value":229},{"type":25,"tag":156,"props":633,"children":635},{"className":634},[],[636],{"type":38,"value":235},{"type":38,"value":237},{"type":25,"tag":156,"props":639,"children":641},{"className":640},[],[642],{"type":38,"value":243},{"type":38,"value":245},{"type":25,"tag":156,"props":645,"children":647},{"className":646},[],[648],{"type":38,"value":251},{"type":38,"value":253},{"type":25,"tag":165,"props":651,"children":652},{"alt":256,"src":16},[],{"type":25,"tag":44,"props":654,"children":655},{"type":38},[656,660,775,785],{"type":25,"tag":34,"props":657,"children":658},{},[659],{"type":38,"value":265},{"type":25,"tag":267,"props":661,"children":662},{},[663,701,721,759,767],{"type":25,"tag":271,"props":664,"children":665},{},[666,670,671,676,677,682,683,688,689,694,695,700],{"type":25,"tag":59,"props":667,"children":668},{},[669],{"type":38,"value":278},{"type":38,"value":280},{"type":25,"tag":156,"props":672,"children":674},{"className":673},[],[675],{"type":38,"value":204},{"type":38,"value":237},{"type":25,"tag":156,"props":678,"children":680},{"className":679},[],[681],{"type":38,"value":212},{"type":38,"value":293},{"type":25,"tag":156,"props":684,"children":686},{"className":685},[],[687],{"type":38,"value":299},{"type":38,"value":237},{"type":25,"tag":156,"props":690,"children":692},{"className":691},[],[693],{"type":38,"value":188},{"type":38,"value":307},{"type":25,"tag":156,"props":696,"children":698},{"className":697},[],[699],{"type":38,"value":313},{"type":38,"value":107},{"type":25,"tag":271,"props":702,"children":703},{},[704,708,709,714,715,720],{"type":25,"tag":59,"props":705,"children":706},{},[707],{"type":38,"value":322},{"type":38,"value":324},{"type":25,"tag":156,"props":710,"children":712},{"className":711},[],[713],{"type":38,"value":330},{"type":38,"value":237},{"type":25,"tag":156,"props":716,"children":718},{"className":717},[],[719],{"type":38,"value":337},{"type":38,"value":339},{"type":25,"tag":271,"props":722,"children":723},{},[724,728,729,734,735,740,741,746,747,752,753,758],{"type":25,"tag":59,"props":725,"children":726},{},[727],{"type":38,"value":347},{"type":38,"value":280},{"type":25,"tag":156,"props":730,"children":732},{"className":731},[],[733],{"type":38,"value":354},{"type":38,"value":356},{"type":25,"tag":156,"props":736,"children":738},{"className":737},[],[739],{"type":38,"value":362},{"type":38,"value":356},{"type":25,"tag":156,"props":742,"children":744},{"className":743},[],[745],{"type":38,"value":369},{"type":38,"value":356},{"type":25,"tag":156,"props":748,"children":750},{"className":749},[],[751],{"type":38,"value":376},{"type":38,"value":237},{"type":25,"tag":156,"props":754,"children":756},{"className":755},[],[757],{"type":38,"value":383},{"type":38,"value":385},{"type":25,"tag":271,"props":760,"children":761},{},[762,766],{"type":25,"tag":59,"props":763,"children":764},{},[765],{"type":38,"value":393},{"type":38,"value":395},{"type":25,"tag":271,"props":768,"children":769},{},[770,774],{"type":25,"tag":59,"props":771,"children":772},{},[773],{"type":38,"value":403},{"type":38,"value":405},{"type":25,"tag":34,"props":776,"children":777},{},[778,779,784],{"type":38,"value":410},{"type":25,"tag":156,"props":780,"children":782},{"className":781},[],[783],{"type":38,"value":416},{"type":38,"value":418},{"type":25,"tag":34,"props":786,"children":787},{},[788],{"type":38,"value":423},{"type":25,"tag":44,"props":790,"children":791},{"type":46,"style":426},[792,795],{"type":25,"tag":165,"props":793,"children":794},{"alt":430,"src":431},[],{"type":25,"tag":165,"props":796,"children":797},{"alt":435,"src":436},[],{"type":25,"tag":44,"props":799,"children":800},{"type":46,"style":426},[801,804],{"type":25,"tag":165,"props":802,"children":803},{"alt":443,"src":444},[],{"type":25,"tag":165,"props":805,"children":806},{"alt":448,"src":449},[],{"type":25,"tag":44,"props":808,"children":809},{"type":46,"style":426},[810,813],{"type":25,"tag":165,"props":811,"children":812},{"alt":456,"src":457},[],{"type":25,"tag":50,"props":814,"children":815},{},[],{"type":25,"tag":44,"props":817,"children":818},{"type":464},[819],{"type":25,"tag":464,"props":820,"children":821},{},[],{"title":7,"searchDepth":470,"depth":470,"links":823},[],{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"tags":825,"image":16,"previewImage":17,"createdAt":18,"enabled":19,"source":20,"body":826,"_type":472,"_id":473,"_source":474,"_file":475,"_stem":476,"_extension":477},[11,12,13,14,15],{"type":22,"children":827,"toc":1168},[828,838],{"type":25,"tag":26,"props":829,"children":830},{},[831],{"type":25,"tag":30,"props":832,"children":833},{},[834],{"type":25,"tag":34,"props":835,"children":836},{},[837],{"type":38,"value":8},{"type":25,"tag":40,"props":839,"children":840},{},[841,932,966,999,1135,1144,1153,1162],{"type":25,"tag":44,"props":842,"children":843},{"type":46,"style":47},[844,929],{"type":25,"tag":50,"props":845,"children":846},{},[847,887],{"type":25,"tag":34,"props":848,"children":849},{},[850,851,855,856,860,861,868,869,873,874,878,879,886],{"type":38,"value":57},{"type":25,"tag":59,"props":852,"children":853},{},[854],{"type":38,"value":63},{"type":38,"value":65},{"type":25,"tag":59,"props":857,"children":858},{},[859],{"type":38,"value":11},{"type":38,"value":71},{"type":25,"tag":59,"props":862,"children":863},{},[864],{"type":25,"tag":76,"props":865,"children":866},{"note":78},[867],{"type":38,"value":14},{"type":38,"value":82},{"type":25,"tag":59,"props":870,"children":871},{},[872],{"type":38,"value":87},{"type":38,"value":89},{"type":25,"tag":59,"props":875,"children":876},{},[877],{"type":38,"value":94},{"type":38,"value":96},{"type":25,"tag":59,"props":880,"children":881},{},[882],{"type":25,"tag":76,"props":883,"children":884},{"note":102},[885],{"type":38,"value":105},{"type":38,"value":107},{"type":25,"tag":34,"props":888,"children":889},{},[890,891,898,899,906,907,914,915,922,923,928],{"type":38,"value":112},{"type":25,"tag":59,"props":892,"children":893},{},[894],{"type":25,"tag":76,"props":895,"children":896},{"note":118},[897],{"type":38,"value":12},{"type":38,"value":122},{"type":25,"tag":59,"props":900,"children":901},{},[902],{"type":25,"tag":76,"props":903,"children":904},{"note":128},[905],{"type":38,"value":13},{"type":38,"value":132},{"type":25,"tag":59,"props":908,"children":909},{},[910],{"type":25,"tag":76,"props":911,"children":912},{"note":138},[913],{"type":38,"value":141},{"type":38,"value":143},{"type":25,"tag":59,"props":916,"children":917},{},[918],{"type":25,"tag":76,"props":919,"children":920},{"note":149},[921],{"type":38,"value":152},{"type":38,"value":154},{"type":25,"tag":156,"props":924,"children":926},{"className":925},[],[927],{"type":38,"value":161},{"type":38,"value":163},{"type":25,"tag":165,"props":930,"children":931},{"alt":167,"src":168},[],{"type":25,"tag":44,"props":933,"children":934},{"type":46,"style":47},[935,938],{"type":25,"tag":165,"props":936,"children":937},{"alt":175,"src":176},[],{"type":25,"tag":34,"props":939,"children":940},{},[941,942,947,948,953,954,959,960,965],{"type":38,"value":182},{"type":25,"tag":156,"props":943,"children":945},{"className":944},[],[946],{"type":38,"value":188},{"type":38,"value":190},{"type":25,"tag":156,"props":949,"children":951},{"className":950},[],[952],{"type":38,"value":196},{"type":38,"value":198},{"type":25,"tag":156,"props":955,"children":957},{"className":956},[],[958],{"type":38,"value":204},{"type":38,"value":206},{"type":25,"tag":156,"props":961,"children":963},{"className":962},[],[964],{"type":38,"value":212},{"type":38,"value":214},{"type":25,"tag":44,"props":967,"children":968},{"type":46,"style":47},[969,996],{"type":25,"tag":34,"props":970,"children":971},{},[972,973,977,978,983,984,989,990,995],{"type":38,"value":222},{"type":25,"tag":59,"props":974,"children":975},{},[976],{"type":38,"value":227},{"type":38,"value":229},{"type":25,"tag":156,"props":979,"children":981},{"className":980},[],[982],{"type":38,"value":235},{"type":38,"value":237},{"type":25,"tag":156,"props":985,"children":987},{"className":986},[],[988],{"type":38,"value":243},{"type":38,"value":245},{"type":25,"tag":156,"props":991,"children":993},{"className":992},[],[994],{"type":38,"value":251},{"type":38,"value":253},{"type":25,"tag":165,"props":997,"children":998},{"alt":256,"src":16},[],{"type":25,"tag":44,"props":1000,"children":1001},{"type":38},[1002,1006,1121,1131],{"type":25,"tag":34,"props":1003,"children":1004},{},[1005],{"type":38,"value":265},{"type":25,"tag":267,"props":1007,"children":1008},{},[1009,1047,1067,1105,1113],{"type":25,"tag":271,"props":1010,"children":1011},{},[1012,1016,1017,1022,1023,1028,1029,1034,1035,1040,1041,1046],{"type":25,"tag":59,"props":1013,"children":1014},{},[1015],{"type":38,"value":278},{"type":38,"value":280},{"type":25,"tag":156,"props":1018,"children":1020},{"className":1019},[],[1021],{"type":38,"value":204},{"type":38,"value":237},{"type":25,"tag":156,"props":1024,"children":1026},{"className":1025},[],[1027],{"type":38,"value":212},{"type":38,"value":293},{"type":25,"tag":156,"props":1030,"children":1032},{"className":1031},[],[1033],{"type":38,"value":299},{"type":38,"value":237},{"type":25,"tag":156,"props":1036,"children":1038},{"className":1037},[],[1039],{"type":38,"value":188},{"type":38,"value":307},{"type":25,"tag":156,"props":1042,"children":1044},{"className":1043},[],[1045],{"type":38,"value":313},{"type":38,"value":107},{"type":25,"tag":271,"props":1048,"children":1049},{},[1050,1054,1055,1060,1061,1066],{"type":25,"tag":59,"props":1051,"children":1052},{},[1053],{"type":38,"value":322},{"type":38,"value":324},{"type":25,"tag":156,"props":1056,"children":1058},{"className":1057},[],[1059],{"type":38,"value":330},{"type":38,"value":237},{"type":25,"tag":156,"props":1062,"children":1064},{"className":1063},[],[1065],{"type":38,"value":337},{"type":38,"value":339},{"type":25,"tag":271,"props":1068,"children":1069},{},[1070,1074,1075,1080,1081,1086,1087,1092,1093,1098,1099,1104],{"type":25,"tag":59,"props":1071,"children":1072},{},[1073],{"type":38,"value":347},{"type":38,"value":280},{"type":25,"tag":156,"props":1076,"children":1078},{"className":1077},[],[1079],{"type":38,"value":354},{"type":38,"value":356},{"type":25,"tag":156,"props":1082,"children":1084},{"className":1083},[],[1085],{"type":38,"value":362},{"type":38,"value":356},{"type":25,"tag":156,"props":1088,"children":1090},{"className":1089},[],[1091],{"type":38,"value":369},{"type":38,"value":356},{"type":25,"tag":156,"props":1094,"children":1096},{"className":1095},[],[1097],{"type":38,"value":376},{"type":38,"value":237},{"type":25,"tag":156,"props":1100,"children":1102},{"className":1101},[],[1103],{"type":38,"value":383},{"type":38,"value":385},{"type":25,"tag":271,"props":1106,"children":1107},{},[1108,1112],{"type":25,"tag":59,"props":1109,"children":1110},{},[1111],{"type":38,"value":393},{"type":38,"value":395},{"type":25,"tag":271,"props":1114,"children":1115},{},[1116,1120],{"type":25,"tag":59,"props":1117,"children":1118},{},[1119],{"type":38,"value":403},{"type":38,"value":405},{"type":25,"tag":34,"props":1122,"children":1123},{},[1124,1125,1130],{"type":38,"value":410},{"type":25,"tag":156,"props":1126,"children":1128},{"className":1127},[],[1129],{"type":38,"value":416},{"type":38,"value":418},{"type":25,"tag":34,"props":1132,"children":1133},{},[1134],{"type":38,"value":423},{"type":25,"tag":44,"props":1136,"children":1137},{"type":46,"style":426},[1138,1141],{"type":25,"tag":165,"props":1139,"children":1140},{"alt":430,"src":431},[],{"type":25,"tag":165,"props":1142,"children":1143},{"alt":435,"src":436},[],{"type":25,"tag":44,"props":1145,"children":1146},{"type":46,"style":426},[1147,1150],{"type":25,"tag":165,"props":1148,"children":1149},{"alt":443,"src":444},[],{"type":25,"tag":165,"props":1151,"children":1152},{"alt":448,"src":449},[],{"type":25,"tag":44,"props":1154,"children":1155},{"type":46,"style":426},[1156,1159],{"type":25,"tag":165,"props":1157,"children":1158},{"alt":456,"src":457},[],{"type":25,"tag":50,"props":1160,"children":1161},{},[],{"type":25,"tag":44,"props":1163,"children":1164},{"type":464},[1165],{"type":25,"tag":464,"props":1166,"children":1167},{},[],{"title":7,"searchDepth":470,"depth":470,"links":1169},[],{"_path":1171,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":1172,"description":1173,"team":1174,"tags":1176,"image":1182,"previewImage":1183,"createdAt":1184,"enabled":19,"live":1185,"source":1186,"body":1187,"_type":472,"_id":1559,"_source":474,"_file":1560,"_stem":1561,"_extension":477},"\u002Fproject\u002Fopengl-micro-engine","OpenGL Micro Engine","A small 3D engine in C++ and OpenGL with a rollercoaster demo: a cart rides on rails through a day-night cycle, with lamp posts, bloom, screen effects and a clickable track switch.",[1175],"Mitch van den Broek",[11,1177,1178,1179,1180,1181],"OpenGL","GLSL","GLFW","glTF","CMake","\u002Fimg\u002Fprojects\u002Fopengl-micro-engine\u002Fstation.jpg","\u002Fimg\u002Fprojects\u002Fopengl-micro-engine\u002Fsunset.jpg","2025-06-06T00:00:00+03:00","\u002Fdemo\u002Fopengl-micro-engine\u002F","https:\u002F\u002Fgithub.com\u002FVincevdb1\u002Fopengl-micro-engine",{"type":22,"children":1188,"toc":1557},[1189,1199],{"type":25,"tag":26,"props":1190,"children":1191},{},[1192],{"type":25,"tag":30,"props":1193,"children":1194},{},[1195],{"type":25,"tag":34,"props":1196,"children":1197},{},[1198],{"type":38,"value":1172},{"type":25,"tag":40,"props":1200,"children":1201},{},[1202,1294,1341,1372,1400,1409,1422,1450,1538,1551],{"type":25,"tag":44,"props":1203,"children":1204},{"type":38},[1205,1227],{"type":25,"tag":34,"props":1206,"children":1207},{},[1208,1210,1215,1217,1225],{"type":38,"value":1209},"This project was made as an introduction to ",{"type":25,"tag":59,"props":1211,"children":1212},{},[1213],{"type":38,"value":1214},"computer graphics",{"type":38,"value":1216},", together with Mitch van den Broek.\nWe wanted to build a small graphics engine with ",{"type":25,"tag":59,"props":1218,"children":1219},{},[1220],{"type":25,"tag":76,"props":1221,"children":1223},{"note":1222},"A standard way for a program to talk to the graphics card. It gives the commands to upload shapes and textures and to draw them with shaders.",[1224],{"type":38,"value":1177},{"type":38,"value":1226}," ourselves, to create one scene with it: a small rollercoaster in a grassy field.\nA cart rides on rails along a track of curves, through a day that turns into night. When the sun goes down, lamp posts light up along the track, and a red button at the station sends the cart onto a second loop.\nWe used libraries only to load files. Everything that ends up on screen is our own OpenGL code.",{"type":25,"tag":34,"props":1228,"children":1229},{},[1230,1232,1237,1239,1247,1248,1256,1258,1264,1265,1271,1272,1278,1280,1285,1287,1292],{"type":38,"value":1231},"We wrote it in ",{"type":25,"tag":59,"props":1233,"children":1234},{},[1235],{"type":38,"value":1236},"C++20",{"type":38,"value":1238},", with the shaders in ",{"type":25,"tag":59,"props":1240,"children":1241},{},[1242],{"type":25,"tag":76,"props":1243,"children":1245},{"note":1244},"The OpenGL Shading Language. Shaders are small programs in this language that run on the graphics card, for example to compute the color of every pixel.",[1246],{"type":38,"value":1178},{"type":38,"value":237},{"type":25,"tag":59,"props":1249,"children":1250},{},[1251],{"type":25,"tag":76,"props":1252,"children":1254},{"note":1253},"A small library that opens a window, creates the OpenGL context to draw in, and reads the keyboard and mouse.",[1255],{"type":38,"value":1179},{"type":38,"value":1257}," for the window and input, and our own small classes around the OpenGL objects (shaders, textures, framebuffers, ",{"type":25,"tag":76,"props":1259,"children":1261},{"note":1260},"Vertex Array Object. It remembers which buffers belong to a shape and how the graphics card must read them.",[1262],{"type":38,"value":1263},"VAO",{"type":38,"value":356},{"type":25,"tag":76,"props":1266,"children":1268},{"note":1267},"Vertex Buffer Object. It holds the data of every corner point of a shape on the graphics card, such as the position, normal and texture coordinates.",[1269],{"type":38,"value":1270},"VBO",{"type":38,"value":237},{"type":25,"tag":76,"props":1273,"children":1275},{"note":1274},"Element Buffer Object. It holds the order in which the corner points form triangles, so a point that several triangles share is stored only once.",[1276],{"type":38,"value":1277},"EBO",{"type":38,"value":1279},").\nThe code is split in two parts: a small ",{"type":25,"tag":59,"props":1281,"children":1282},{},[1283],{"type":38,"value":1284},"engine",{"type":38,"value":1286}," library with the window, the cameras, the meshes, the scene and the render passes, and a ",{"type":25,"tag":59,"props":1288,"children":1289},{},[1290],{"type":38,"value":1291},"rollercoaster demo",{"type":38,"value":1293}," that is built on top of it.",{"type":25,"tag":44,"props":1295,"children":1296},{"type":46,"style":47},[1297,1337],{"type":25,"tag":34,"props":1298,"children":1299},{},[1300,1302,1311,1313,1322,1324,1335],{"type":38,"value":1301},"The track is two loops that share a station. Each loop is a list of waypoints, and between every two waypoints the code fits a cubic ",{"type":25,"tag":59,"props":1303,"children":1304},{},[1305],{"type":25,"tag":76,"props":1306,"children":1308},{"note":1307},"A smooth curve defined by a few control points. A cubic one has four: it starts at the first, ends at the last, and the two in the middle pull the curve toward them.",[1309],{"type":38,"value":1310},"Bézier curve",{"type":38,"value":1312},".\nThe control points of each curve come from its neighbours, so the track flows from one curve into the next without a kink.\nWe sample the curves with ",{"type":25,"tag":59,"props":1314,"children":1315},{},[1316],{"type":25,"tag":76,"props":1317,"children":1319},{"note":1318},"A way to step along a curve by adding a few precomputed differences, instead of calculating the full formula again for every point.",[1320],{"type":38,"value":1321},"forward differencing",{"type":38,"value":1323},", which only needs a few additions per point.\nFrom those samples, each loop builds an ",{"type":25,"tag":59,"props":1325,"children":1326},{},[1327,1333],{"type":25,"tag":76,"props":1328,"children":1330},{"note":1329},"The real distance along a curve. A table from distance to curve parameter lets an object move at a constant speed.",[1331],{"type":38,"value":1332},"arc-length",{"type":38,"value":1334}," table",{"type":38,"value":1336},", so the cart moves at the same speed on the straight parts and in the curves.\nThe same table places the rail objects.",{"type":25,"tag":165,"props":1338,"children":1340},{"alt":1339,"src":1183},"The two loops of the track at sunset",[],{"type":25,"tag":44,"props":1342,"children":1343},{"type":46,"style":47},[1344,1348],{"type":25,"tag":165,"props":1345,"children":1347},{"alt":1346,"src":1182},"The cart at the station, with the control post and its red button",[],{"type":25,"tag":50,"props":1349,"children":1350},{},[1351,1356],{"type":25,"tag":34,"props":1352,"children":1353},{},[1354],{"type":38,"value":1355},"A cart rides on the rails and turns with the curves. At the station stands a control post with a red button.\nClick the button, and it starts to pulse. At the end of the lap, the cart switches to the other loop.",{"type":25,"tag":34,"props":1357,"children":1358},{},[1359,1361,1370],{"type":38,"value":1360},"That button works with ",{"type":25,"tag":59,"props":1362,"children":1363},{},[1364],{"type":25,"tag":76,"props":1365,"children":1367},{"note":1366},"Finding out which object is under the mouse by drawing each object in its own color off-screen and reading back the pixel.",[1368],{"type":38,"value":1369},"color picking",{"type":38,"value":1371},". On a click, the clickable objects are drawn a second time to a hidden framebuffer, each in its own flat color.\nWe then read the color under the cursor and know exactly what you hit.",{"type":25,"tag":44,"props":1373,"children":1374},{"type":46,"style":47},[1375,1395],{"type":25,"tag":50,"props":1376,"children":1377},{},[1378,1383],{"type":25,"tag":34,"props":1379,"children":1380},{},[1381],{"type":38,"value":1382},"The scene has two cameras. A free camera flies around with the keyboard and mouse to look at the whole track, and a second camera rides in the cart to follow the ride in first person.\nThe arrow keys change the speed, and when the speed drops below zero, the ride goes in reverse.",{"type":25,"tag":34,"props":1384,"children":1385},{},[1386,1388,1393],{"type":38,"value":1387},"The engine can also load 3D models from ",{"type":25,"tag":76,"props":1389,"children":1391},{"note":1390},"An open file format for 3D models, often called 'the JPEG of 3D'.",[1392],{"type":38,"value":1180},{"type":38,"value":1394}," files.\nI wrote the loader on top of a JSON parser: it reads the accessors and buffer views by hand and turns them into vertex, normal, UV and index arrays for our own mesh class.",{"type":25,"tag":165,"props":1396,"children":1399},{"alt":1397,"src":1398},"The view from the camera in the cart","\u002Fimg\u002Fprojects\u002Fopengl-micro-engine\u002Fpov.jpg",[],{"type":25,"tag":44,"props":1401,"children":1402},{},[1403],{"type":25,"tag":1404,"props":1405,"children":1408},"project-video",{"alt":1406,"src":1407},"A ride in the cart in first person","\u002Fimg\u002Fprojects\u002Fopengl-micro-engine\u002Fcart-pov.mp4",[],{"type":25,"tag":44,"props":1410,"children":1411},{"type":46,"style":47},[1412,1417],{"type":25,"tag":1404,"props":1413,"children":1416},{"alt":1414,"src":1415},"The day-night cycle of the scene","\u002Fimg\u002Fprojects\u002Fopengl-micro-engine\u002Fday-night.mp4",[],{"type":25,"tag":34,"props":1418,"children":1419},{},[1420],{"type":38,"value":1421},"The scene goes through a full day in two minutes. The sun moves across the sky and sets in orange, and then the moon and the stars come out.\nThe sky colors, the fog and the ambient light all follow the time of day.",{"type":25,"tag":44,"props":1423,"children":1424},{"type":46,"style":47},[1425,1445],{"type":25,"tag":34,"props":1426,"children":1427},{},[1428,1430,1435,1437,1443],{"type":38,"value":1429},"Lighting is done ",{"type":25,"tag":59,"props":1431,"children":1432},{},[1433],{"type":38,"value":1434},"per pixel",{"type":38,"value":1436}," in the fragment shaders, with ",{"type":25,"tag":76,"props":1438,"children":1440},{"note":1439},"A common lighting model. It adds the shiny highlight you see where a light reflects off a surface toward the camera.",[1441],{"type":38,"value":1442},"Blinn-Phong",{"type":38,"value":1444}," highlights.\nEach surface gets ambient light from the sky and the ground, light from the sun or the moon, and fog in the color of the sky that hides the far edge of the world.\nWhen it gets dark, the lamp posts along the track turn on. Each lamp is a point light that fades out with distance, and it flickers a little like a flame.",{"type":25,"tag":165,"props":1446,"children":1449},{"alt":1447,"src":1448},"The lamp posts light up the grass and the track at night","\u002Fimg\u002Fprojects\u002Fopengl-micro-engine\u002Fnight.jpg",[],{"type":25,"tag":44,"props":1451,"children":1452},{"type":38},[1453,1472],{"type":25,"tag":34,"props":1454,"children":1455},{},[1456,1458,1464,1465,1470],{"type":38,"value":1457},"The finished frame never goes straight to the screen. It is first rendered in ",{"type":25,"tag":76,"props":1459,"children":1461},{"note":1460},"High dynamic range. Colors can be brighter than white, so a lamp can be many times brighter than the grass next to it.",[1462],{"type":38,"value":1463},"HDR",{"type":38,"value":206},{"type":25,"tag":59,"props":1466,"children":1467},{},[1468],{"type":38,"value":1469},"framebuffer object",{"type":38,"value":1471}," with two outputs: the full scene, and only the parts that glow.\nThen a few passes draw it again on a quad that fills the screen:",{"type":25,"tag":267,"props":1473,"children":1474},{},[1475,1485,1495,1520],{"type":25,"tag":271,"props":1476,"children":1477},{},[1478,1483],{"type":25,"tag":59,"props":1479,"children":1480},{},[1481],{"type":38,"value":1482},"Bloom",{"type":38,"value":1484},": the glowing parts get blurred back and forth between two buffers at half resolution, and are added back on top so the lamps, the button and the sun glow.",{"type":25,"tag":271,"props":1486,"children":1487},{},[1488,1493],{"type":25,"tag":59,"props":1489,"children":1490},{},[1491],{"type":38,"value":1492},"Tone mapping",{"type":38,"value":1494},": a filmic curve brings the HDR colors back to what a screen can show, with a higher exposure at night.",{"type":25,"tag":271,"props":1496,"children":1497},{},[1498,1503,1505,1510,1512,1518],{"type":25,"tag":59,"props":1499,"children":1500},{},[1501],{"type":38,"value":1502},"Gaussian blur",{"type":38,"value":1504}," and a ",{"type":25,"tag":59,"props":1506,"children":1507},{},[1508],{"type":38,"value":1509},"Laplacian",{"type":38,"value":1511}," edge filter, both with a ",{"type":25,"tag":76,"props":1513,"children":1515},{"note":1514},"A small grid of numbers. Each pixel becomes a weighted mix of its neighbours, which can blur the image or bring out edges.",[1516],{"type":38,"value":1517},"convolution kernel",{"type":38,"value":1519},", on keys 2 and 3.",{"type":25,"tag":271,"props":1521,"children":1522},{},[1523,1528,1530,1536],{"type":25,"tag":59,"props":1524,"children":1525},{},[1526],{"type":38,"value":1527},"Chroma keying",{"type":38,"value":1529},": a decorated frame with a green centre is drawn over the scene, and the shader removes the green by comparing colors in the ",{"type":25,"tag":76,"props":1531,"children":1533},{"note":1532},"A way to store color as brightness plus two color channels. This makes it easier to pick out 'green' regardless of how light or dark it is.",[1534],{"type":38,"value":1535},"YCbCr",{"type":38,"value":1537}," color space.",{"type":25,"tag":44,"props":1539,"children":1540},{"type":46,"style":426},[1541,1546],{"type":25,"tag":165,"props":1542,"children":1545},{"alt":1543,"src":1544},"Bloom on the lamps and the red button at night","\u002Fimg\u002Fprojects\u002Fopengl-micro-engine\u002Fstation-night.jpg",[],{"type":25,"tag":165,"props":1547,"children":1550},{"alt":1548,"src":1549},"The Laplacian edge filter on key 3","\u002Fimg\u002Fprojects\u002Fopengl-micro-engine\u002Fedges.jpg",[],{"type":25,"tag":44,"props":1552,"children":1553},{"type":464},[1554],{"type":25,"tag":464,"props":1555,"children":1556},{},[],{"title":7,"searchDepth":470,"depth":470,"links":1558},[],"profile:project:opengl-micro-engine.md","project\u002Fopengl-micro-engine.md","project\u002Fopengl-micro-engine",{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"tags":1563,"image":16,"previewImage":17,"createdAt":18,"enabled":19,"source":20,"body":1564,"_type":472,"_id":473,"_source":474,"_file":475,"_stem":476,"_extension":477},[11,12,13,14,15],{"type":22,"children":1565,"toc":1906},[1566,1576],{"type":25,"tag":26,"props":1567,"children":1568},{},[1569],{"type":25,"tag":30,"props":1570,"children":1571},{},[1572],{"type":25,"tag":34,"props":1573,"children":1574},{},[1575],{"type":38,"value":8},{"type":25,"tag":40,"props":1577,"children":1578},{},[1579,1670,1704,1737,1873,1882,1891,1900],{"type":25,"tag":44,"props":1580,"children":1581},{"type":46,"style":47},[1582,1667],{"type":25,"tag":50,"props":1583,"children":1584},{},[1585,1625],{"type":25,"tag":34,"props":1586,"children":1587},{},[1588,1589,1593,1594,1598,1599,1606,1607,1611,1612,1616,1617,1624],{"type":38,"value":57},{"type":25,"tag":59,"props":1590,"children":1591},{},[1592],{"type":38,"value":63},{"type":38,"value":65},{"type":25,"tag":59,"props":1595,"children":1596},{},[1597],{"type":38,"value":11},{"type":38,"value":71},{"type":25,"tag":59,"props":1600,"children":1601},{},[1602],{"type":25,"tag":76,"props":1603,"children":1604},{"note":78},[1605],{"type":38,"value":14},{"type":38,"value":82},{"type":25,"tag":59,"props":1608,"children":1609},{},[1610],{"type":38,"value":87},{"type":38,"value":89},{"type":25,"tag":59,"props":1613,"children":1614},{},[1615],{"type":38,"value":94},{"type":38,"value":96},{"type":25,"tag":59,"props":1618,"children":1619},{},[1620],{"type":25,"tag":76,"props":1621,"children":1622},{"note":102},[1623],{"type":38,"value":105},{"type":38,"value":107},{"type":25,"tag":34,"props":1626,"children":1627},{},[1628,1629,1636,1637,1644,1645,1652,1653,1660,1661,1666],{"type":38,"value":112},{"type":25,"tag":59,"props":1630,"children":1631},{},[1632],{"type":25,"tag":76,"props":1633,"children":1634},{"note":118},[1635],{"type":38,"value":12},{"type":38,"value":122},{"type":25,"tag":59,"props":1638,"children":1639},{},[1640],{"type":25,"tag":76,"props":1641,"children":1642},{"note":128},[1643],{"type":38,"value":13},{"type":38,"value":132},{"type":25,"tag":59,"props":1646,"children":1647},{},[1648],{"type":25,"tag":76,"props":1649,"children":1650},{"note":138},[1651],{"type":38,"value":141},{"type":38,"value":143},{"type":25,"tag":59,"props":1654,"children":1655},{},[1656],{"type":25,"tag":76,"props":1657,"children":1658},{"note":149},[1659],{"type":38,"value":152},{"type":38,"value":154},{"type":25,"tag":156,"props":1662,"children":1664},{"className":1663},[],[1665],{"type":38,"value":161},{"type":38,"value":163},{"type":25,"tag":165,"props":1668,"children":1669},{"alt":167,"src":168},[],{"type":25,"tag":44,"props":1671,"children":1672},{"type":46,"style":47},[1673,1676],{"type":25,"tag":165,"props":1674,"children":1675},{"alt":175,"src":176},[],{"type":25,"tag":34,"props":1677,"children":1678},{},[1679,1680,1685,1686,1691,1692,1697,1698,1703],{"type":38,"value":182},{"type":25,"tag":156,"props":1681,"children":1683},{"className":1682},[],[1684],{"type":38,"value":188},{"type":38,"value":190},{"type":25,"tag":156,"props":1687,"children":1689},{"className":1688},[],[1690],{"type":38,"value":196},{"type":38,"value":198},{"type":25,"tag":156,"props":1693,"children":1695},{"className":1694},[],[1696],{"type":38,"value":204},{"type":38,"value":206},{"type":25,"tag":156,"props":1699,"children":1701},{"className":1700},[],[1702],{"type":38,"value":212},{"type":38,"value":214},{"type":25,"tag":44,"props":1705,"children":1706},{"type":46,"style":47},[1707,1734],{"type":25,"tag":34,"props":1708,"children":1709},{},[1710,1711,1715,1716,1721,1722,1727,1728,1733],{"type":38,"value":222},{"type":25,"tag":59,"props":1712,"children":1713},{},[1714],{"type":38,"value":227},{"type":38,"value":229},{"type":25,"tag":156,"props":1717,"children":1719},{"className":1718},[],[1720],{"type":38,"value":235},{"type":38,"value":237},{"type":25,"tag":156,"props":1723,"children":1725},{"className":1724},[],[1726],{"type":38,"value":243},{"type":38,"value":245},{"type":25,"tag":156,"props":1729,"children":1731},{"className":1730},[],[1732],{"type":38,"value":251},{"type":38,"value":253},{"type":25,"tag":165,"props":1735,"children":1736},{"alt":256,"src":16},[],{"type":25,"tag":44,"props":1738,"children":1739},{"type":38},[1740,1744,1859,1869],{"type":25,"tag":34,"props":1741,"children":1742},{},[1743],{"type":38,"value":265},{"type":25,"tag":267,"props":1745,"children":1746},{},[1747,1785,1805,1843,1851],{"type":25,"tag":271,"props":1748,"children":1749},{},[1750,1754,1755,1760,1761,1766,1767,1772,1773,1778,1779,1784],{"type":25,"tag":59,"props":1751,"children":1752},{},[1753],{"type":38,"value":278},{"type":38,"value":280},{"type":25,"tag":156,"props":1756,"children":1758},{"className":1757},[],[1759],{"type":38,"value":204},{"type":38,"value":237},{"type":25,"tag":156,"props":1762,"children":1764},{"className":1763},[],[1765],{"type":38,"value":212},{"type":38,"value":293},{"type":25,"tag":156,"props":1768,"children":1770},{"className":1769},[],[1771],{"type":38,"value":299},{"type":38,"value":237},{"type":25,"tag":156,"props":1774,"children":1776},{"className":1775},[],[1777],{"type":38,"value":188},{"type":38,"value":307},{"type":25,"tag":156,"props":1780,"children":1782},{"className":1781},[],[1783],{"type":38,"value":313},{"type":38,"value":107},{"type":25,"tag":271,"props":1786,"children":1787},{},[1788,1792,1793,1798,1799,1804],{"type":25,"tag":59,"props":1789,"children":1790},{},[1791],{"type":38,"value":322},{"type":38,"value":324},{"type":25,"tag":156,"props":1794,"children":1796},{"className":1795},[],[1797],{"type":38,"value":330},{"type":38,"value":237},{"type":25,"tag":156,"props":1800,"children":1802},{"className":1801},[],[1803],{"type":38,"value":337},{"type":38,"value":339},{"type":25,"tag":271,"props":1806,"children":1807},{},[1808,1812,1813,1818,1819,1824,1825,1830,1831,1836,1837,1842],{"type":25,"tag":59,"props":1809,"children":1810},{},[1811],{"type":38,"value":347},{"type":38,"value":280},{"type":25,"tag":156,"props":1814,"children":1816},{"className":1815},[],[1817],{"type":38,"value":354},{"type":38,"value":356},{"type":25,"tag":156,"props":1820,"children":1822},{"className":1821},[],[1823],{"type":38,"value":362},{"type":38,"value":356},{"type":25,"tag":156,"props":1826,"children":1828},{"className":1827},[],[1829],{"type":38,"value":369},{"type":38,"value":356},{"type":25,"tag":156,"props":1832,"children":1834},{"className":1833},[],[1835],{"type":38,"value":376},{"type":38,"value":237},{"type":25,"tag":156,"props":1838,"children":1840},{"className":1839},[],[1841],{"type":38,"value":383},{"type":38,"value":385},{"type":25,"tag":271,"props":1844,"children":1845},{},[1846,1850],{"type":25,"tag":59,"props":1847,"children":1848},{},[1849],{"type":38,"value":393},{"type":38,"value":395},{"type":25,"tag":271,"props":1852,"children":1853},{},[1854,1858],{"type":25,"tag":59,"props":1855,"children":1856},{},[1857],{"type":38,"value":403},{"type":38,"value":405},{"type":25,"tag":34,"props":1860,"children":1861},{},[1862,1863,1868],{"type":38,"value":410},{"type":25,"tag":156,"props":1864,"children":1866},{"className":1865},[],[1867],{"type":38,"value":416},{"type":38,"value":418},{"type":25,"tag":34,"props":1870,"children":1871},{},[1872],{"type":38,"value":423},{"type":25,"tag":44,"props":1874,"children":1875},{"type":46,"style":426},[1876,1879],{"type":25,"tag":165,"props":1877,"children":1878},{"alt":430,"src":431},[],{"type":25,"tag":165,"props":1880,"children":1881},{"alt":435,"src":436},[],{"type":25,"tag":44,"props":1883,"children":1884},{"type":46,"style":426},[1885,1888],{"type":25,"tag":165,"props":1886,"children":1887},{"alt":443,"src":444},[],{"type":25,"tag":165,"props":1889,"children":1890},{"alt":448,"src":449},[],{"type":25,"tag":44,"props":1892,"children":1893},{"type":46,"style":426},[1894,1897],{"type":25,"tag":165,"props":1895,"children":1896},{"alt":456,"src":457},[],{"type":25,"tag":50,"props":1898,"children":1899},{},[],{"type":25,"tag":44,"props":1901,"children":1902},{"type":464},[1903],{"type":25,"tag":464,"props":1904,"children":1905},{},[],{"title":7,"searchDepth":470,"depth":470,"links":1907},[],1796227133047]