MCPcopy Create free account
hub / github.com/GamerHack/GamerHack.github.io /

Class

g2all/900/module/view.js:39–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37
38function ViewMixin(superclass) {
39 const res = class extends superclass {
40 constructor(...args) {
41 super(...args);
42 this.buffer;
43 }
44
45 get addr() {
46 let res = this._addr_cache;
47 if (res !== undefined) {
48 return res;
49 }
50 res = mt.get_view_vector(this);
51 this._addr_cache = res;
52 return res;
53 }
54
55 get size() {
56 return this.byteLength;
57 }
58
59 addr_at(index) {
60 const size = this.BYTES_PER_ELEMENT;
61 return this.addr.add(index * size);
62 }
63
64 sget(index) {
65 return this[index] | 0;
66 }
67 };
68
69 // workaround for known affected versions: ps4 [6.00, 10.00)
70 //

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected