How to use the loadProto function from protobufjs
Find comprehensive JavaScript protobufjs.loadProto code examples handpicked from public code repositorys.
60 61 62 63 64 65 66 67 68 69
} catch (e) { callback(e); } }); var contents = cc.loader.loadRes(typeof filename === 'object' ? filename["root"]+"/"+filename["file"] : filename); return contents === null ? null : ProtoBuf.loadProto(contents, builder, filename); }; ``` ---
141
301
11
+ 15 other calls in file
122 123 124 125 126 127 128 129 130
} if (schema.slice(0, 2) == '0x') { schema = schema.slice(2); } var builder = ProtoBuf.loadProto(Schema.decodeHex(schema).get('definition')); // var builder = ProtoBuf.loadJson(ProtoBuf.DotProto.Parser.parse(schema)); var Thing = builder.build('Thing'); var merged = OrUtils.bytes32Array.merge(dataSlices);
17
30
38
protobufjs.load is the most popular function in protobufjs (282 examples)