@devvit/protos 0.10.20-next-2024-05-06-a9757fbcc.0 → 0.10.20-next-2024-05-06-18be4b555.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,326 +0,0 @@
1
- /**
2
- * #glrenderer.ts
3
- *
4
- * @packageDocumentation
5
- */
6
- /* eslint-disable */
7
- import Long from "long";
8
- import _m0 from 'protobufjs/minimal.js';
9
- import { Empty } from '../../../google/protobuf/empty.js';
10
- import { Value } from '../../../google/protobuf/struct.js';
11
- import { messageTypeRegistry } from '../../../typeRegistry.js';
12
- import { gLMethodFromJSON, gLMethodToJSON } from './methods.js';
13
- import { gLMethodTypeFromJSON, gLMethodTypeToJSON } from './methodtype.js';
14
- function createBaseCommandArgument() {
15
- return { null: undefined, scalar: undefined, blob: undefined, referenceId: undefined };
16
- }
17
- export const CommandArgument = {
18
- $type: "devvit.plugin.gl.CommandArgument",
19
- encode(message, writer = _m0.Writer.create()) {
20
- if (message.null !== undefined) {
21
- writer.uint32(8).bool(message.null);
22
- }
23
- if (message.scalar !== undefined) {
24
- Value.encode(Value.wrap(message.scalar), writer.uint32(18).fork()).ldelim();
25
- }
26
- if (message.blob !== undefined) {
27
- writer.uint32(26).bytes(message.blob);
28
- }
29
- if (message.referenceId !== undefined) {
30
- writer.uint32(32).uint64(message.referenceId);
31
- }
32
- return writer;
33
- },
34
- decode(input, length) {
35
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
36
- let end = length === undefined ? reader.len : reader.pos + length;
37
- const message = createBaseCommandArgument();
38
- while (reader.pos < end) {
39
- const tag = reader.uint32();
40
- switch (tag >>> 3) {
41
- case 1:
42
- if (tag !== 8) {
43
- break;
44
- }
45
- message.null = reader.bool();
46
- continue;
47
- case 2:
48
- if (tag !== 18) {
49
- break;
50
- }
51
- message.scalar = Value.unwrap(Value.decode(reader, reader.uint32()));
52
- continue;
53
- case 3:
54
- if (tag !== 26) {
55
- break;
56
- }
57
- message.blob = reader.bytes();
58
- continue;
59
- case 4:
60
- if (tag !== 32) {
61
- break;
62
- }
63
- message.referenceId = longToNumber(reader.uint64());
64
- continue;
65
- }
66
- if ((tag & 7) === 4 || tag === 0) {
67
- break;
68
- }
69
- reader.skipType(tag & 7);
70
- }
71
- return message;
72
- },
73
- fromJSON(object) {
74
- return {
75
- null: isSet(object.null) ? globalThis.Boolean(object.null) : undefined,
76
- scalar: isSet(object?.scalar) ? object.scalar : undefined,
77
- blob: isSet(object.blob) ? bytesFromBase64(object.blob) : undefined,
78
- referenceId: isSet(object.referenceId) ? globalThis.Number(object.referenceId) : undefined,
79
- };
80
- },
81
- toJSON(message) {
82
- const obj = {};
83
- if (message.null !== undefined) {
84
- obj.null = message.null;
85
- }
86
- if (message.scalar !== undefined) {
87
- obj.scalar = message.scalar;
88
- }
89
- if (message.blob !== undefined) {
90
- obj.blob = base64FromBytes(message.blob);
91
- }
92
- if (message.referenceId !== undefined) {
93
- obj.referenceId = Math.round(message.referenceId);
94
- }
95
- return obj;
96
- },
97
- create(base) {
98
- return CommandArgument.fromPartial(base ?? {});
99
- },
100
- fromPartial(object) {
101
- const message = createBaseCommandArgument();
102
- message.null = object.null ?? undefined;
103
- message.scalar = object.scalar ?? undefined;
104
- message.blob = object.blob ?? undefined;
105
- message.referenceId = object.referenceId ?? undefined;
106
- return message;
107
- },
108
- };
109
- messageTypeRegistry.set(CommandArgument.$type, CommandArgument);
110
- function createBaseGLCommand() {
111
- return { method: 0, type: 0, args: [], referenceId: 0 };
112
- }
113
- export const GLCommand = {
114
- $type: "devvit.plugin.gl.GLCommand",
115
- encode(message, writer = _m0.Writer.create()) {
116
- if (message.method !== 0) {
117
- writer.uint32(8).int32(message.method);
118
- }
119
- if (message.type !== 0) {
120
- writer.uint32(16).int32(message.type);
121
- }
122
- for (const v of message.args) {
123
- CommandArgument.encode(v, writer.uint32(26).fork()).ldelim();
124
- }
125
- if (message.referenceId !== 0) {
126
- writer.uint32(32).uint64(message.referenceId);
127
- }
128
- return writer;
129
- },
130
- decode(input, length) {
131
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
132
- let end = length === undefined ? reader.len : reader.pos + length;
133
- const message = createBaseGLCommand();
134
- while (reader.pos < end) {
135
- const tag = reader.uint32();
136
- switch (tag >>> 3) {
137
- case 1:
138
- if (tag !== 8) {
139
- break;
140
- }
141
- message.method = reader.int32();
142
- continue;
143
- case 2:
144
- if (tag !== 16) {
145
- break;
146
- }
147
- message.type = reader.int32();
148
- continue;
149
- case 3:
150
- if (tag !== 26) {
151
- break;
152
- }
153
- message.args.push(CommandArgument.decode(reader, reader.uint32()));
154
- continue;
155
- case 4:
156
- if (tag !== 32) {
157
- break;
158
- }
159
- message.referenceId = longToNumber(reader.uint64());
160
- continue;
161
- }
162
- if ((tag & 7) === 4 || tag === 0) {
163
- break;
164
- }
165
- reader.skipType(tag & 7);
166
- }
167
- return message;
168
- },
169
- fromJSON(object) {
170
- return {
171
- method: isSet(object.method) ? gLMethodFromJSON(object.method) : 0,
172
- type: isSet(object.type) ? gLMethodTypeFromJSON(object.type) : 0,
173
- args: globalThis.Array.isArray(object?.args) ? object.args.map((e) => CommandArgument.fromJSON(e)) : [],
174
- referenceId: isSet(object.referenceId) ? globalThis.Number(object.referenceId) : 0,
175
- };
176
- },
177
- toJSON(message) {
178
- const obj = {};
179
- if (message.method !== 0) {
180
- obj.method = gLMethodToJSON(message.method);
181
- }
182
- if (message.type !== 0) {
183
- obj.type = gLMethodTypeToJSON(message.type);
184
- }
185
- if (message.args?.length) {
186
- obj.args = message.args.map((e) => CommandArgument.toJSON(e));
187
- }
188
- if (message.referenceId !== 0) {
189
- obj.referenceId = Math.round(message.referenceId);
190
- }
191
- return obj;
192
- },
193
- create(base) {
194
- return GLCommand.fromPartial(base ?? {});
195
- },
196
- fromPartial(object) {
197
- const message = createBaseGLCommand();
198
- message.method = object.method ?? 0;
199
- message.type = object.type ?? 0;
200
- message.args = object.args?.map((e) => CommandArgument.fromPartial(e)) || [];
201
- message.referenceId = object.referenceId ?? 0;
202
- return message;
203
- },
204
- };
205
- messageTypeRegistry.set(GLCommand.$type, GLCommand);
206
- function createBaseExecuteMessage() {
207
- return { commands: [] };
208
- }
209
- export const ExecuteMessage = {
210
- $type: "devvit.plugin.gl.ExecuteMessage",
211
- encode(message, writer = _m0.Writer.create()) {
212
- for (const v of message.commands) {
213
- GLCommand.encode(v, writer.uint32(10).fork()).ldelim();
214
- }
215
- return writer;
216
- },
217
- decode(input, length) {
218
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
219
- let end = length === undefined ? reader.len : reader.pos + length;
220
- const message = createBaseExecuteMessage();
221
- while (reader.pos < end) {
222
- const tag = reader.uint32();
223
- switch (tag >>> 3) {
224
- case 1:
225
- if (tag !== 10) {
226
- break;
227
- }
228
- message.commands.push(GLCommand.decode(reader, reader.uint32()));
229
- continue;
230
- }
231
- if ((tag & 7) === 4 || tag === 0) {
232
- break;
233
- }
234
- reader.skipType(tag & 7);
235
- }
236
- return message;
237
- },
238
- fromJSON(object) {
239
- return {
240
- commands: globalThis.Array.isArray(object?.commands)
241
- ? object.commands.map((e) => GLCommand.fromJSON(e))
242
- : [],
243
- };
244
- },
245
- toJSON(message) {
246
- const obj = {};
247
- if (message.commands?.length) {
248
- obj.commands = message.commands.map((e) => GLCommand.toJSON(e));
249
- }
250
- return obj;
251
- },
252
- create(base) {
253
- return ExecuteMessage.fromPartial(base ?? {});
254
- },
255
- fromPartial(object) {
256
- const message = createBaseExecuteMessage();
257
- message.commands = object.commands?.map((e) => GLCommand.fromPartial(e)) || [];
258
- return message;
259
- },
260
- };
261
- messageTypeRegistry.set(ExecuteMessage.$type, ExecuteMessage);
262
- export const GLRendererServiceName = "devvit.plugin.gl.GLRenderer";
263
- export class GLRendererClientImpl {
264
- constructor(rpc, opts) {
265
- this.service = opts?.service || GLRendererServiceName;
266
- this.rpc = rpc;
267
- this.Execute = this.Execute.bind(this);
268
- }
269
- Execute(request, metadata) {
270
- const data = ExecuteMessage.encode(request).finish();
271
- const promise = this.rpc.request(this.service, "Execute", data, metadata);
272
- return promise.then((data) => Empty.decode(_m0.Reader.create(data)));
273
- }
274
- }
275
- export const GLRendererDefinition = {
276
- name: "GLRenderer",
277
- fullName: "devvit.plugin.gl.GLRenderer",
278
- methods: {
279
- execute: {
280
- name: "Execute",
281
- requestType: ExecuteMessage,
282
- requestStream: false,
283
- responseType: Empty,
284
- responseStream: false,
285
- options: {},
286
- },
287
- },
288
- };
289
- function bytesFromBase64(b64) {
290
- if (globalThis.Buffer) {
291
- return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
292
- }
293
- else {
294
- const bin = globalThis.atob(b64);
295
- const arr = new Uint8Array(bin.length);
296
- for (let i = 0; i < bin.length; ++i) {
297
- arr[i] = bin.charCodeAt(i);
298
- }
299
- return arr;
300
- }
301
- }
302
- function base64FromBytes(arr) {
303
- if (globalThis.Buffer) {
304
- return globalThis.Buffer.from(arr).toString("base64");
305
- }
306
- else {
307
- const bin = [];
308
- arr.forEach((byte) => {
309
- bin.push(globalThis.String.fromCharCode(byte));
310
- });
311
- return globalThis.btoa(bin.join(""));
312
- }
313
- }
314
- function longToNumber(long) {
315
- if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
316
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
317
- }
318
- return long.toNumber();
319
- }
320
- if (_m0.util.Long !== Long) {
321
- _m0.util.Long = Long;
322
- _m0.configure();
323
- }
324
- function isSet(value) {
325
- return value !== null && value !== undefined;
326
- }
@@ -1,126 +0,0 @@
1
- /**
2
- * #methods.ts
3
- *
4
- * @packageDocumentation
5
- */
6
- export declare enum GLMethod {
7
- activeTexture = 0,
8
- attachShader = 1,
9
- bindAttribLocation = 2,
10
- bindBuffer = 3,
11
- bindFramebuffer = 4,
12
- bindRenderbuffer = 5,
13
- bindTexture = 6,
14
- blendColor = 7,
15
- blendEquation = 8,
16
- blendEquationSeparate = 9,
17
- blendFunc = 10,
18
- blendFuncSeparate = 11,
19
- bufferData = 12,
20
- bufferSubData = 13,
21
- checkFramebufferStatus = 14,
22
- clear = 15,
23
- clearColor = 16,
24
- clearDepth = 17,
25
- clearStencil = 18,
26
- colorMask = 19,
27
- compileShader = 20,
28
- copyTexImage2D = 21,
29
- copyTexSubImage2D = 22,
30
- createBuffer = 23,
31
- createFramebuffer = 24,
32
- createProgram = 25,
33
- createRenderbuffer = 26,
34
- createShader = 27,
35
- createTexture = 28,
36
- cullFace = 29,
37
- deleteBuffer = 30,
38
- deleteFramebuffer = 31,
39
- deleteProgram = 32,
40
- deleteRenderbuffer = 33,
41
- deleteShader = 34,
42
- deleteTexture = 35,
43
- depthFunc = 36,
44
- depthMask = 37,
45
- depthRange = 38,
46
- detachShader = 39,
47
- disable = 40,
48
- disableVertexAttribArray = 41,
49
- drawArrays = 42,
50
- drawElements = 43,
51
- enable = 44,
52
- enableVertexAttribArray = 45,
53
- finish = 46,
54
- flush = 47,
55
- framebufferRenderbuffer = 48,
56
- framebufferTexture2D = 49,
57
- frontFace = 50,
58
- generateMipmap = 51,
59
- getActiveAttrib = 52,
60
- getActiveUniform = 53,
61
- getAttachedShaders = 54,
62
- getAttribLocation = 55,
63
- getBufferParameter = 56,
64
- getContextAttributes = 57,
65
- getError = 58,
66
- getExtension = 59,
67
- getFramebufferAttachmentParameter = 60,
68
- getParameter = 61,
69
- getProgramInfoLog = 62,
70
- getProgramParameter = 63,
71
- getRenderbufferParameter = 64,
72
- getShaderInfoLog = 65,
73
- getShaderParameter = 66,
74
- getShaderPrecisionFormat = 67,
75
- getShaderSource = 68,
76
- getSupportedExtensions = 69,
77
- getTexParameter = 70,
78
- getUniform = 71,
79
- getUniformLocation = 72,
80
- getVertexAttrib = 73,
81
- getVertexAttribOffset = 74,
82
- hint = 75,
83
- isBuffer = 76,
84
- isContextLost = 77,
85
- isEnabled = 78,
86
- isFramebuffer = 79,
87
- isProgram = 80,
88
- isRenderbuffer = 81,
89
- isShader = 82,
90
- isTexture = 83,
91
- lineWidth = 84,
92
- linkProgram = 85,
93
- polygonOffset = 86,
94
- renderbufferStorage = 87,
95
- sampleCoverage = 88,
96
- scissor = 89,
97
- shaderSource = 90,
98
- stencilFunc = 91,
99
- stencilFuncSeparate = 92,
100
- stencilMask = 93,
101
- stencilMaskSeparate = 94,
102
- stencilOp = 95,
103
- stencilOpSeparate = 96,
104
- texParameterf = 97,
105
- texParameteri = 98,
106
- uniform1f = 99,
107
- uniform1i = 100,
108
- uniform2f = 101,
109
- uniform2i = 102,
110
- uniform3f = 103,
111
- uniform3i = 104,
112
- uniform4f = 105,
113
- uniform4i = 106,
114
- useProgram = 107,
115
- validateProgram = 108,
116
- vertexAttrib1f = 109,
117
- vertexAttrib2f = 110,
118
- vertexAttrib3f = 111,
119
- vertexAttrib4f = 112,
120
- vertexAttribPointer = 113,
121
- viewport = 114,
122
- UNRECOGNIZED = -1
123
- }
124
- export declare function gLMethodFromJSON(object: any): GLMethod;
125
- export declare function gLMethodToJSON(object: GLMethod): number;
126
- //# sourceMappingURL=methods.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"methods.d.ts","sourceRoot":"","sources":["../../../../../src/types/devvit/plugin/gl/methods.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,oBAAY,QAAQ;IAClB,aAAa,IAAI;IACjB,YAAY,IAAI;IAChB,kBAAkB,IAAI;IACtB,UAAU,IAAI;IACd,eAAe,IAAI;IACnB,gBAAgB,IAAI;IACpB,WAAW,IAAI;IACf,UAAU,IAAI;IACd,aAAa,IAAI;IACjB,qBAAqB,IAAI;IACzB,SAAS,KAAK;IACd,iBAAiB,KAAK;IACtB,UAAU,KAAK;IACf,aAAa,KAAK;IAClB,sBAAsB,KAAK;IAC3B,KAAK,KAAK;IACV,UAAU,KAAK;IACf,UAAU,KAAK;IACf,YAAY,KAAK;IACjB,SAAS,KAAK;IACd,aAAa,KAAK;IAClB,cAAc,KAAK;IACnB,iBAAiB,KAAK;IACtB,YAAY,KAAK;IACjB,iBAAiB,KAAK;IACtB,aAAa,KAAK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