Created
April 15, 2014 10:27
-
-
Save Gerjo/10720980 to your computer and use it in GitHub Desktop.
C++ memory dump to be imported into JavaScript (WebGL)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(function(require) { | |
/// Here's a scene I baked earlier. Bunch of cubes and a plane. | |
/// | |
///// 6 float triplets | |
/// | |
/// struct Face { | |
/// Vector3 a; | |
/// Vector3 b; | |
/// Vector3 c; | |
/// | |
/// Vector2 u; | |
/// GLfloat sampler{1}; | |
/// | |
/// Vector2 v; | |
/// GLfloat padding1{0}; | |
/// | |
/// Vector2 w; | |
/// GLfloat padding2{0}; | |
/// | |
/// // Normals | |
/// Vector3 n1; | |
/// Vector3 n2; | |
/// Vector3 n3; | |
/// }; | |
var data = []; | |
// Face [-1] (Let's count from -1.) | |
data[0] = 20.000; | |
data[1] = 20.000; | |
data[2] = -20.000; | |
data[3] = 20.000; | |
data[4] = -20.000; | |
data[5] = -20.000; | |
data[6] = -20.000; | |
data[7] = 20.000; | |
data[8] = -20.000; | |
data[9] = 0.000; | |
data[10] = 1.000; | |
data[11] = 0.000; | |
data[12] = 1.000; | |
data[13] = 1.000; | |
data[14] = 0.000; | |
data[15] = 0.000; | |
data[16] = 0.000; | |
data[17] = 0.000; | |
// Face [0] | |
data[18] = 20.000; | |
data[19] = 20.000; | |
data[20] = 20.000; | |
data[21] = -20.000; | |
data[22] = 20.000; | |
data[23] = 20.000; | |
data[24] = 20.000; | |
data[25] = -20.000; | |
data[26] = 20.000; | |
data[27] = 0.000; | |
data[28] = 1.000; | |
data[29] = 0.000; | |
data[30] = 1.000; | |
data[31] = 1.000; | |
data[32] = 0.000; | |
data[33] = 0.000; | |
data[34] = 0.000; | |
data[35] = 0.000; | |
// Face [1] | |
data[36] = 20.000; | |
data[37] = 20.000; | |
data[38] = -20.000; | |
data[39] = 20.000; | |
data[40] = 20.000; | |
data[41] = 20.000; | |
data[42] = 20.000; | |
data[43] = -20.000; | |
data[44] = -20.000; | |
data[45] = 0.000; | |
data[46] = 1.000; | |
data[47] = 0.000; | |
data[48] = 1.000; | |
data[49] = 1.000; | |
data[50] = 0.000; | |
data[51] = 0.000; | |
data[52] = 0.000; | |
data[53] = 0.000; | |
// Face [2] | |
data[54] = 20.000; | |
data[55] = -20.000; | |
data[56] = -20.000; | |
data[57] = 20.000; | |
data[58] = -20.000; | |
data[59] = 20.000; | |
data[60] = -20.000; | |
data[61] = -20.000; | |
data[62] = -20.000; | |
data[63] = 0.000; | |
data[64] = 1.000; | |
data[65] = 0.000; | |
data[66] = 1.000; | |
data[67] = 1.000; | |
data[68] = 0.000; | |
data[69] = 0.000; | |
data[70] = 0.000; | |
data[71] = 0.000; | |
// Face [3] | |
data[72] = -20.000; | |
data[73] = -20.000; | |
data[74] = -20.000; | |
data[75] = -20.000; | |
data[76] = -20.000; | |
data[77] = 20.000; | |
data[78] = -20.000; | |
data[79] = 20.000; | |
data[80] = -20.000; | |
data[81] = 0.000; | |
data[82] = 1.000; | |
data[83] = 0.000; | |
data[84] = 1.000; | |
data[85] = 1.000; | |
data[86] = 0.000; | |
data[87] = 0.000; | |
data[88] = 0.000; | |
data[89] = 0.000; | |
// Face [4] | |
data[90] = 20.000; | |
data[91] = 20.000; | |
data[92] = 20.000; | |
data[93] = 20.000; | |
data[94] = 20.000; | |
data[95] = -20.000; | |
data[96] = -20.000; | |
data[97] = 20.000; | |
data[98] = 20.000; | |
data[99] = 0.000; | |
data[100] = 1.000; | |
data[101] = 0.000; | |
data[102] = 1.000; | |
data[103] = 1.000; | |
data[104] = 0.000; | |
data[105] = 0.000; | |
data[106] = 0.000; | |
data[107] = 0.000; | |
// Face [5] | |
data[108] = 20.000; | |
data[109] = -20.000; | |
data[110] = -20.000; | |
data[111] = -20.000; | |
data[112] = -20.000; | |
data[113] = -20.000; | |
data[114] = -20.000; | |
data[115] = 20.000; | |
data[116] = -20.000; | |
data[117] = 1.000; | |
data[118] = 1.000; | |
data[119] = 0.000; | |
data[120] = 1.000; | |
data[121] = 0.000; | |
data[122] = 0.000; | |
data[123] = 0.000; | |
data[124] = 0.000; | |
data[125] = 0.000; | |
// Face [6] | |
data[126] = -20.000; | |
data[127] = 20.000; | |
data[128] = 20.000; | |
data[129] = -20.000; | |
data[130] = -20.000; | |
data[131] = 20.000; | |
data[132] = 20.000; | |
data[133] = -20.000; | |
data[134] = 20.000; | |
data[135] = 1.000; | |
data[136] = 1.000; | |
data[137] = 0.000; | |
data[138] = 1.000; | |
data[139] = 0.000; | |
data[140] = 0.000; | |
data[141] = 0.000; | |
data[142] = 0.000; | |
data[143] = 0.000; | |
// Face [7] | |
data[144] = 20.000; | |
data[145] = 20.000; | |
data[146] = 20.000; | |
data[147] = 20.000; | |
data[148] = -20.000; | |
data[149] = 20.000; | |
data[150] = 20.000; | |
data[151] = -20.000; | |
data[152] = -20.000; | |
data[153] = 1.000; | |
data[154] = 1.000; | |
data[155] = 0.000; | |
data[156] = 1.000; | |
data[157] = 0.000; | |
data[158] = 0.000; | |
data[159] = 0.000; | |
data[160] = 0.000; | |
data[161] = 0.000; | |
// Face [8] | |
data[162] = 20.000; | |
data[163] = -20.000; | |
data[164] = 20.000; | |
data[165] = -20.000; | |
data[166] = -20.000; | |
data[167] = 20.000; | |
data[168] = -20.000; | |
data[169] = -20.000; | |
data[170] = -20.000; | |
data[171] = 1.000; | |
data[172] = 1.000; | |
data[173] = 0.000; | |
data[174] = 1.000; | |
data[175] = 0.000; | |
data[176] = 0.000; | |
data[177] = 0.000; | |
data[178] = 0.000; | |
data[179] = 0.000; | |
// Face [9] | |
data[180] = -20.000; | |
data[181] = -20.000; | |
data[182] = 20.000; | |
data[183] = -20.000; | |
data[184] = 20.000; | |
data[185] = 20.000; | |
data[186] = -20.000; | |
data[187] = 20.000; | |
data[188] = -20.000; | |
data[189] = 1.000; | |
data[190] = 1.000; | |
data[191] = 0.000; | |
data[192] = 1.000; | |
data[193] = 0.000; | |
data[194] = 0.000; | |
data[195] = 0.000; | |
data[196] = 0.000; | |
data[197] = 0.000; | |
// Face [10] | |
data[198] = 20.000; | |
data[199] = 20.000; | |
data[200] = -20.000; | |
data[201] = -20.000; | |
data[202] = 20.000; | |
data[203] = -20.000; | |
data[204] = -20.000; | |
data[205] = 20.000; | |
data[206] = 20.000; | |
data[207] = 1.000; | |
data[208] = 1.000; | |
data[209] = 0.000; | |
data[210] = 1.000; | |
data[211] = 0.000; | |
data[212] = 0.000; | |
data[213] = 0.000; | |
data[214] = 0.000; | |
data[215] = 0.000; | |
// Face [11] | |
data[216] = 1.000; | |
data[217] = 1.000; | |
data[218] = -1.000; | |
data[219] = 1.000; | |
data[220] = -1.000; | |
data[221] = -1.000; | |
data[222] = -1.000; | |
data[223] = 1.000; | |
data[224] = -1.000; | |
data[225] = 0.000; | |
data[226] = 1.000; | |
data[227] = 0.000; | |
data[228] = 1.000; | |
data[229] = 1.000; | |
data[230] = 0.000; | |
data[231] = 0.000; | |
data[232] = 0.000; | |
data[233] = 0.000; | |
// Face [12] | |
data[234] = 1.000; | |
data[235] = 1.000; | |
data[236] = 1.000; | |
data[237] = -1.000; | |
data[238] = 1.000; | |
data[239] = 1.000; | |
data[240] = 1.000; | |
data[241] = -1.000; | |
data[242] = 1.000; | |
data[243] = 0.000; | |
data[244] = 1.000; | |
data[245] = 0.000; | |
data[246] = 1.000; | |
data[247] = 1.000; | |
data[248] = 0.000; | |
data[249] = 0.000; | |
data[250] = 0.000; | |
data[251] = 0.000; | |
// Face [13] | |
data[252] = 1.000; | |
data[253] = 1.000; | |
data[254] = -1.000; | |
data[255] = 1.000; | |
data[256] = 1.000; | |
data[257] = 1.000; | |
data[258] = 1.000; | |
data[259] = -1.000; | |
data[260] = -1.000; | |
data[261] = 0.000; | |
data[262] = 1.000; | |
data[263] = 0.000; | |
data[264] = 1.000; | |
data[265] = 1.000; | |
data[266] = 0.000; | |
data[267] = 0.000; | |
data[268] = 0.000; | |
data[269] = 0.000; | |
// Face [14] | |
data[270] = 1.000; | |
data[271] = -1.000; | |
data[272] = -1.000; | |
data[273] = 1.000; | |
data[274] = -1.000; | |
data[275] = 1.000; | |
data[276] = -1.000; | |
data[277] = -1.000; | |
data[278] = -1.000; | |
data[279] = 0.000; | |
data[280] = 1.000; | |
data[281] = 0.000; | |
data[282] = 1.000; | |
data[283] = 1.000; | |
data[284] = 0.000; | |
data[285] = 0.000; | |
data[286] = 0.000; | |
data[287] = 0.000; | |
// Face [15] | |
data[288] = -1.000; | |
data[289] = -1.000; | |
data[290] = -1.000; | |
data[291] = -1.000; | |
data[292] = -1.000; | |
data[293] = 1.000; | |
data[294] = -1.000; | |
data[295] = 1.000; | |
data[296] = -1.000; | |
data[297] = 0.000; | |
data[298] = 1.000; | |
data[299] = 0.000; | |
data[300] = 1.000; | |
data[301] = 1.000; | |
data[302] = 0.000; | |
data[303] = 0.000; | |
data[304] = 0.000; | |
data[305] = 0.000; | |
// Face [16] | |
data[306] = 1.000; | |
data[307] = 1.000; | |
data[308] = 1.000; | |
data[309] = 1.000; | |
data[310] = 1.000; | |
data[311] = -1.000; | |
data[312] = -1.000; | |
data[313] = 1.000; | |
data[314] = 1.000; | |
data[315] = 0.000; | |
data[316] = 1.000; | |
data[317] = 0.000; | |
data[318] = 1.000; | |
data[319] = 1.000; | |
data[320] = 0.000; | |
data[321] = 0.000; | |
data[322] = 0.000; | |
data[323] = 0.000; | |
// Face [17] | |
data[324] = 1.000; | |
data[325] = -1.000; | |
data[326] = -1.000; | |
data[327] = -1.000; | |
data[328] = -1.000; | |
data[329] = -1.000; | |
data[330] = -1.000; | |
data[331] = 1.000; | |
data[332] = -1.000; | |
data[333] = 1.000; | |
data[334] = 1.000; | |
data[335] = 0.000; | |
data[336] = 1.000; | |
data[337] = 0.000; | |
data[338] = 0.000; | |
data[339] = 0.000; | |
data[340] = 0.000; | |
data[341] = 0.000; | |
// Face [18] | |
data[342] = -1.000; | |
data[343] = 1.000; | |
data[344] = 1.000; | |
data[345] = -1.000; | |
data[346] = -1.000; | |
data[347] = 1.000; | |
data[348] = 1.000; | |
data[349] = -1.000; | |
data[350] = 1.000; | |
data[351] = 1.000; | |
data[352] = 1.000; | |
data[353] = 0.000; | |
data[354] = 1.000; | |
data[355] = 0.000; | |
data[356] = 0.000; | |
data[357] = 0.000; | |
data[358] = 0.000; | |
data[359] = 0.000; | |
// Face [19] | |
data[360] = 1.000; | |
data[361] = 1.000; | |
data[362] = 1.000; | |
data[363] = 1.000; | |
data[364] = -1.000; | |
data[365] = 1.000; | |
data[366] = 1.000; | |
data[367] = -1.000; | |
data[368] = -1.000; | |
data[369] = 1.000; | |
data[370] = 1.000; | |
data[371] = 0.000; | |
data[372] = 1.000; | |
data[373] = 0.000; | |
data[374] = 0.000; | |
data[375] = 0.000; | |
data[376] = 0.000; | |
data[377] = 0.000; | |
// Face [20] | |
data[378] = 1.000; | |
data[379] = -1.000; | |
data[380] = 1.000; | |
data[381] = -1.000; | |
data[382] = -1.000; | |
data[383] = 1.000; | |
data[384] = -1.000; | |
data[385] = -1.000; | |
data[386] = -1.000; | |
data[387] = 1.000; | |
data[388] = 1.000; | |
data[389] = 0.000; | |
data[390] = 1.000; | |
data[391] = 0.000; | |
data[392] = 0.000; | |
data[393] = 0.000; | |
data[394] = 0.000; | |
data[395] = 0.000; | |
// Face [21] | |
data[396] = -1.000; | |
data[397] = -1.000; | |
data[398] = 1.000; | |
data[399] = -1.000; | |
data[400] = 1.000; | |
data[401] = 1.000; | |
data[402] = -1.000; | |
data[403] = 1.000; | |
data[404] = -1.000; | |
data[405] = 1.000; | |
data[406] = 1.000; | |
data[407] = 0.000; | |
data[408] = 1.000; | |
data[409] = 0.000; | |
data[410] = 0.000; | |
data[411] = 0.000; | |
data[412] = 0.000; | |
data[413] = 0.000; | |
// Face [22] | |
data[414] = 1.000; | |
data[415] = 1.000; | |
data[416] = -1.000; | |
data[417] = -1.000; | |
data[418] = 1.000; | |
data[419] = -1.000; | |
data[420] = -1.000; | |
data[421] = 1.000; | |
data[422] = 1.000; | |
data[423] = 1.000; | |
data[424] = 1.000; | |
data[425] = 0.000; | |
data[426] = 1.000; | |
data[427] = 0.000; | |
data[428] = 0.000; | |
data[429] = 0.000; | |
data[430] = 0.000; | |
data[431] = 0.000; | |
// Face [23] | |
data[432] = -5.532; | |
data[433] = 1.644; | |
data[434] = -5.112; | |
data[435] = -4.888; | |
data[436] = 0.532; | |
data[437] = -6.644; | |
data[438] = -6.644; | |
data[439] = 0.112; | |
data[440] = -4.468; | |
data[441] = 0.000; | |
data[442] = 1.000; | |
data[443] = 0.000; | |
data[444] = 1.000; | |
data[445] = 1.000; | |
data[446] = 0.000; | |
data[447] = 0.000; | |
data[448] = 0.000; | |
data[449] = 0.000; | |
// Face [24] | |
data[450] = -4.000; | |
data[451] = 1.000; | |
data[452] = -4.000; | |
data[453] = -5.112; | |
data[454] = -0.532; | |
data[455] = -3.356; | |
data[456] = -3.356; | |
data[457] = -0.112; | |
data[458] = -5.532; | |
data[459] = 0.000; | |
data[460] = 1.000; | |
data[461] = 0.000; | |
data[462] = 1.000; | |
data[463] = 1.000; | |
data[464] = 0.000; | |
data[465] = 0.000; | |
data[466] = 0.000; | |
data[467] = 0.000; | |
// Face [25] | |
data[468] = -5.532; | |
data[469] = 1.644; | |
data[470] = -5.112; | |
data[471] = -4.000; | |
data[472] = 1.000; | |
data[473] = -4.000; | |
data[474] = -4.888; | |
data[475] = 0.532; | |
data[476] = -6.644; | |
data[477] = 0.000; | |
data[478] = 1.000; | |
data[479] = 0.000; | |
data[480] = 1.000; | |
data[481] = 1.000; | |
data[482] = 0.000; | |
data[483] = 0.000; | |
data[484] = 0.000; | |
data[485] = 0.000; | |
// Face [26] | |
data[486] = -4.888; | |
data[487] = 0.532; | |
data[488] = -6.644; | |
data[489] = -3.356; | |
data[490] = -0.112; | |
data[491] = -5.532; | |
data[492] = -6.000; | |
data[493] = -1.000; | |
data[494] = -6.000; | |
data[495] = 0.000; | |
data[496] = 1.000; | |
data[497] = 0.000; | |
data[498] = 1.000; | |
data[499] = 1.000; | |
data[500] = 0.000; | |
data[501] = 0.000; | |
data[502] = 0.000; | |
data[503] = 0.000; | |
// Face [27] | |
data[504] = -6.000; | |
data[505] = -1.000; | |
data[506] = -6.000; | |
data[507] = -4.468; | |
data[508] = -1.644; | |
data[509] = -4.888; | |
data[510] = -6.644; | |
data[511] = 0.112; | |
data[512] = -4.468; | |
data[513] = 0.000; | |
data[514] = 1.000; | |
data[515] = 0.000; | |
data[516] = 1.000; | |
data[517] = 1.000; | |
data[518] = 0.000; | |
data[519] = 0.000; | |
data[520] = 0.000; | |
data[521] = 0.000; | |
// Face [28] | |
data[522] = -4.000; | |
data[523] = 1.000; | |
data[524] = -4.000; | |
data[525] = -5.532; | |
data[526] = 1.644; | |
data[527] = -5.112; | |
data[528] = -5.112; | |
data[529] = -0.532; | |
data[530] = -3.356; | |
data[531] = 0.000; | |
data[532] = 1.000; | |
data[533] = 0.000; | |
data[534] = 1.000; | |
data[535] = 1.000; | |
data[536] = 0.000; | |
data[537] = 0.000; | |
data[538] = 0.000; | |
data[539] = 0.000; | |
// Face [29] | |
data[540] = -4.888; | |
data[541] = 0.532; | |
data[542] = -6.644; | |
data[543] = -6.000; | |
data[544] = -1.000; | |
data[545] = -6.000; | |
data[546] = -6.644; | |
data[547] = 0.112; | |
data[548] = -4.468; | |
data[549] = 1.000; | |
data[550] = 1.000; | |
data[551] = 0.000; | |
data[552] = 1.000; | |
data[553] = 0.000; | |
data[554] = 0.000; | |
data[555] = 0.000; | |
data[556] = 0.000; | |
data[557] = 0.000; | |
// Face [30] | |
data[558] = -5.112; | |
data[559] = -0.532; | |
data[560] = -3.356; | |
data[561] = -4.468; | |
data[562] = -1.644; | |
data[563] = -4.888; | |
data[564] = -3.356; | |
data[565] = -0.112; | |
data[566] = -5.532; | |
data[567] = 1.000; | |
data[568] = 1.000; | |
data[569] = 0.000; | |
data[570] = 1.000; | |
data[571] = 0.000; | |
data[572] = 0.000; | |
data[573] = 0.000; | |
data[574] = 0.000; | |
data[575] = 0.000; | |
// Face [31] | |
data[576] = -4.000; | |
data[577] = 1.000; | |
data[578] = -4.000; | |
data[579] = -3.356; | |
data[580] = -0.112; | |
data[581] = -5.532; | |
data[582] = -4.888; | |
data[583] = 0.532; | |
data[584] = -6.644; | |
data[585] = 1.000; | |
data[586] = 1.000; | |
data[587] = 0.000; | |
data[588] = 1.000; | |
data[589] = 0.000; | |
data[590] = 0.000; | |
data[591] = 0.000; | |
data[592] = 0.000; | |
data[593] = 0.000; | |
// Face [32] | |
data[594] = -3.356; | |
data[595] = -0.112; | |
data[596] = -5.532; | |
data[597] = -4.468; | |
data[598] = -1.644; | |
data[599] = -4.888; | |
data[600] = -6.000; | |
data[601] = -1.000; | |
data[602] = -6.000; | |
data[603] = 1.000; | |
data[604] = 1.000; | |
data[605] = 0.000; | |
data[606] = 1.000; | |
data[607] = 0.000; | |
data[608] = 0.000; | |
data[609] = 0.000; | |
data[610] = 0.000; | |
data[611] = 0.000; | |
// Face [33] | |
data[612] = -4.468; | |
data[613] = -1.644; | |
data[614] = -4.888; | |
data[615] = -5.112; | |
data[616] = -0.532; | |
data[617] = -3.356; | |
data[618] = -6.644; | |
data[619] = 0.112; | |
data[620] = -4.468; | |
data[621] = 1.000; | |
data[622] = 1.000; | |
data[623] = 0.000; | |
data[624] = 1.000; | |
data[625] = 0.000; | |
data[626] = 0.000; | |
data[627] = 0.000; | |
data[628] = 0.000; | |
data[629] = 0.000; | |
// Face [34] | |
data[630] = -5.532; | |
data[631] = 1.644; | |
data[632] = -5.112; | |
data[633] = -6.644; | |
data[634] = 0.112; | |
data[635] = -4.468; | |
data[636] = -5.112; | |
data[637] = -0.532; | |
data[638] = -3.356; | |
data[639] = 1.000; | |
data[640] = 1.000; | |
data[641] = 0.000; | |
data[642] = 1.000; | |
data[643] = 0.000; | |
data[644] = 0.000; | |
data[645] = 0.000; | |
data[646] = 0.000; | |
data[647] = 0.000; | |
// Face [35] | |
data[648] = -0.936; | |
data[649] = -5.289; | |
data[650] = -1.775; | |
data[651] = 3.514; | |
data[652] = 0.840; | |
data[653] = -4.353; | |
data[654] = -3.514; | |
data[655] = -0.840; | |
data[656] = 4.353; | |
data[657] = 0.000; | |
data[658] = 1.000; | |
data[659] = 1.000; | |
data[660] = 1.000; | |
data[661] = 1.000; | |
data[662] = 0.000; | |
data[663] = 0.000; | |
data[664] = 0.000; | |
data[665] = 0.000; | |
// Face [36] | |
data[666] = 3.514; | |
data[667] = 0.840; | |
data[668] = -4.353; | |
data[669] = 0.936; | |
data[670] = 5.289; | |
data[671] = 1.775; | |
data[672] = -3.514; | |
data[673] = -0.840; | |
data[674] = 4.353; | |
data[675] = 1.000; | |
data[676] = 1.000; | |
data[677] = 1.000; | |
data[678] = 1.000; | |
data[679] = 0.000; | |
data[680] = 0.000; | |
data[681] = 0.000; | |
data[682] = 0.000; | |
data[683] = 0.000; | |
return new Float32Array(data); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment