Lines Matching refs:fbb
23 var fbb = new flatbuffers.Builder(1);
27 var str = fbb.createString('MyMonster');
29 var inv = MyGame.Example.Monster.createInventoryVector(fbb, [0, 1, 2, 3, 4]);
31 var fred = fbb.createString('Fred');
32 MyGame.Example.Monster.startMonster(fbb);
33 MyGame.Example.Monster.addName(fbb, fred);
34 var mon2 = MyGame.Example.Monster.endMonster(fbb);
36 MyGame.Example.Monster.startTest4Vector(fbb, 2);
37 MyGame.Example.Test.createTest(fbb, 10, 20);
38 MyGame.Example.Test.createTest(fbb, 30, 40);
39 var test4 = fbb.endVector();
41 var testArrayOfString = MyGame.Example.Monster.createTestarrayofstringVector(fbb, [
42 fbb.createString('test1'),
43 fbb.createString('test2')
46 MyGame.Example.Monster.startMonster(fbb);
47 …MyGame.Example.Monster.addPos(fbb, MyGame.Example.Vec3.createVec3(fbb, 1, 2, 3, 3, MyGame.Example.…
48 MyGame.Example.Monster.addHp(fbb, 80);
49 MyGame.Example.Monster.addName(fbb, str);
50 MyGame.Example.Monster.addInventory(fbb, inv);
51 MyGame.Example.Monster.addTestType(fbb, MyGame.Example.Any.Monster);
52 MyGame.Example.Monster.addTest(fbb, mon2);
53 MyGame.Example.Monster.addTest4(fbb, test4);
54 MyGame.Example.Monster.addTestarrayofstring(fbb, testArrayOfString);
55 MyGame.Example.Monster.addTestbool(fbb, false);
56 var mon = MyGame.Example.Monster.endMonster(fbb);
58 MyGame.Example.Monster.finishMonsterBuffer(fbb, mon);
65 fs.writeFileSync('monsterdata_javascript_wire.mon', new Buffer(fbb.asUint8Array()));
69 testMutation(fbb.dataBuffer());
71 testBuffer(fbb.dataBuffer());
147 var fbb = new flatbuffers.Builder();
148 var required = fbb.createString('required');
150 MyGame.Example.Stat.startStat(fbb);
151 var stat2 = MyGame.Example.Stat.endStat(fbb);
153 MyGame.Example.Monster.startMonster(fbb);
154 MyGame.Example.Monster.addName(fbb, required);
155 MyGame.Example.Monster.addTestempty(fbb, stat2);
156 var mon2 = MyGame.Example.Monster.endMonster(fbb);
158 MyGame.Example.Stat.startStat(fbb);
159 MyGame.Example.Stat.addVal(fbb, new flatbuffers.Long(0x12345678, 0x23456789));
160 var stat = MyGame.Example.Stat.endStat(fbb);
162 MyGame.Example.Monster.startMonster(fbb);
163 MyGame.Example.Monster.addName(fbb, required);
164 MyGame.Example.Monster.addEnemy(fbb, mon2);
165 MyGame.Example.Monster.addTestempty(fbb, stat);
166 var mon = MyGame.Example.Monster.endMonster(fbb);
168 MyGame.Example.Monster.finishMonsterBuffer(fbb, mon);
169 var bytes = fbb.asUint8Array();
216 var fbb = new flatbuffers.Builder();
217 var name = fbb.createString(json.name);
219 var name = fbb.createString(new Uint8Array(new Buffer(table.name)));
220 MyGame.Example.Monster.startMonster(fbb);
221 MyGame.Example.Monster.addName(fbb, name);
222 return MyGame.Example.Monster.endMonster(fbb);
224 var testarrayoftablesOffset = MyGame.Example.Monster.createTestarrayoftablesVector(fbb,
226 var testarrayofstringOffset = MyGame.Example.Monster.createTestarrayofstringVector(fbb,
227 json.testarrayofstring.map(function(string) { return fbb.createString(string); }));
228 MyGame.Example.Monster.startMonster(fbb);
229 MyGame.Example.Monster.addTestarrayofstring(fbb, testarrayofstringOffset);
230 MyGame.Example.Monster.addTestarrayoftables(fbb, testarrayoftablesOffset);
231 MyGame.Example.Monster.addName(fbb, name);
232 MyGame.Example.Monster.finishMonsterBuffer(fbb, MyGame.Example.Monster.endMonster(fbb));
233 testReadingUnicode(new flatbuffers.ByteBuffer(fbb.asUint8Array()));