MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / makeFvarInstance

Function makeFvarInstance

libraries/p5.js:4251–4268  ·  view source on GitHub ↗
(inst, axes, names)

Source from the content-addressed store, hash-verified

4249}
4250
4251function makeFvarInstance(inst, axes, names) {
4252 var nameID = addName(inst.name, names);
4253 var fields = [
4254 {name: 'nameID', type: 'USHORT', value: nameID},
4255 {name: 'flags', type: 'USHORT', value: 0}
4256 ];
4257
4258 for (var i = 0; i < axes.length; ++i) {
4259 var axisTag = axes[i].tag;
4260 fields.push({
4261 name: 'axis ' + axisTag,
4262 type: 'FIXED',
4263 value: inst.coordinates[axisTag] << 16
4264 });
4265 }
4266
4267 return new table.Table('fvarInstance', fields);
4268}
4269
4270function parseFvarInstance(data, start, axes, names) {
4271 var inst = {};

Callers 1

makeFvarTableFunction · 0.85

Calls 1

addNameFunction · 0.85

Tested by

no test coverage detected