UNPKG

@awayjs/stage

Version:
41 lines (40 loc) 1.96 kB
var Reg = /** @class */ (function () { function Reg(code, desc) { this.code = code; this.desc = desc; } return Reg; }()); var RegMap = /** @class */ (function () { function RegMap() { } Object.defineProperty(RegMap, "map", { get: function () { if (!RegMap._map) { RegMap._map = {}; RegMap._map['va'] = new Reg(0 /* REGISTER.ATTR */, 'vertex attribute'); RegMap._map['fc'] = new Reg(1 /* REGISTER.CONST */, 'fragment constant'); RegMap._map['vc'] = new Reg(1 /* REGISTER.CONST */, 'vertex constant'); RegMap._map['ft'] = new Reg(2 /* REGISTER.TEMP */, 'fragment temporary'); RegMap._map['vt'] = new Reg(2 /* REGISTER.TEMP */, 'vertex temporary'); RegMap._map['vo'] = new Reg(3 /* REGISTER.OUT */, 'vertex output'); RegMap._map['op'] = new Reg(3 /* REGISTER.OUT */, 'vertex output'); RegMap._map['fd'] = new Reg(3 /* REGISTER.OUT */, 'fragment depth output'); RegMap._map['fo'] = new Reg(3 /* REGISTER.OUT */, 'fragment output'); RegMap._map['oc'] = new Reg(3 /* REGISTER.OUT */, 'fragment output'); RegMap._map['v'] = new Reg(4 /* REGISTER.VAR */, 'varying'); RegMap._map['vi'] = new Reg(4 /* REGISTER.VAR */, 'varying output'); RegMap._map['fi'] = new Reg(4 /* REGISTER.VAR */, 'varying input'); RegMap._map['fs'] = new Reg(5 /* REGISTER.SAMPLER */, 'sampler'); // custom register, vn, fn - vertex native, fragment native RegMap._map['vn'] = new Reg(15 /* REGISTER.NATIVE */, 'native'); RegMap._map['fn'] = new Reg(15 /* REGISTER.NATIVE */, 'native'); } return RegMap._map; }, enumerable: false, configurable: true }); return RegMap; }()); export { RegMap };