@minecraft/server-graphics 1.0.0-beta.1.21.130-preview.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +9 -0
  2. package/index.d.ts +430 -0
  3. package/package.json +20 -0
package/README.md ADDED
@@ -0,0 +1,9 @@
1
+ # `@minecraft/server-graphics`
2
+
3
+ The `@minecraft/server-graphics` module contains APIs to change graphics and rendering settings.
4
+
5
+ ## **NOTE: This version of this module is still in pre-release. It may change or it may be removed in future releases.**
6
+
7
+ See full documentation for this module here:
8
+
9
+ https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/minecraft/server-graphics/minecraft-server-graphics
package/index.d.ts ADDED
@@ -0,0 +1,430 @@
1
+ // Type definitions for Minecraft Bedrock Edition script APIs
2
+ // Project: https://docs.microsoft.com/minecraft/creator/
3
+ // Definitions by: Jake Shirley <https://github.com/JakeShirley>
4
+ // Mike Ammerlaan <https://github.com/mammerla>
5
+
6
+ /* *****************************************************************************
7
+ Copyright (c) Microsoft Corporation.
8
+ ***************************************************************************** */
9
+ /**
10
+ * @beta
11
+ * @packageDocumentation
12
+ * The `@minecraft/server-graphics` module contains APIs to
13
+ * change graphics and rendering settings.
14
+ *
15
+ * Manifest Details
16
+ * ```json
17
+ * {
18
+ * "module_name": "@minecraft/server-graphics",
19
+ * "version": "1.0.0-beta"
20
+ * }
21
+ * ```
22
+ *
23
+ */
24
+ import * as minecraftcommon from '@minecraft/common';
25
+ import * as minecraftserver from '@minecraft/server';
26
+ /**
27
+ * Used to affect atmospheric scattering for Vibrant Visuals
28
+ */
29
+ export class Atmospherics {
30
+ private constructor();
31
+ /**
32
+ * @remarks
33
+ * Resets the horizon blend max to the value set by resource
34
+ * packs
35
+ *
36
+ * This function can't be called in read-only mode.
37
+ *
38
+ * @param biomeIdentifier
39
+ * Biome Identifier. If the corresponding biome has had its
40
+ * horizon blend max overriden using scripting, then the
41
+ * override value will be removed and the biome will use the
42
+ * value provided by json
43
+ * @throws This function can throw errors.
44
+ *
45
+ * {@link minecraftcommon.EngineError}
46
+ */
47
+ resetHorizonBlendMax(biomeIdentifier: minecraftserver.BiomeType): void;
48
+ /**
49
+ * @remarks
50
+ * Resets the horizon blend mie start to the value set by
51
+ * resource packs
52
+ *
53
+ * This function can't be called in read-only mode.
54
+ *
55
+ * @param biomeIdentifier
56
+ * Biome Identifier. If the corresponding biome has had its
57
+ * horizon blend mie start overriden using scripting, then the
58
+ * override value will be removed and the biome will use the
59
+ * value provided by json
60
+ * @throws This function can throw errors.
61
+ *
62
+ * {@link minecraftcommon.EngineError}
63
+ */
64
+ resetHorizonBlendMieStart(biomeIdentifier: minecraftserver.BiomeType): void;
65
+ /**
66
+ * @remarks
67
+ * Resets the horizon blend min to the value set by resource
68
+ * packs
69
+ *
70
+ * This function can't be called in read-only mode.
71
+ *
72
+ * @param biomeIdentifier
73
+ * Biome Identifier. If the corresponding biome has had its
74
+ * horizon blend min overriden using scripting, then the
75
+ * override value will be removed and the biome will use the
76
+ * value provided by json
77
+ * @throws This function can throw errors.
78
+ *
79
+ * {@link minecraftcommon.EngineError}
80
+ */
81
+ resetHorizonBlendMin(biomeIdentifier: minecraftserver.BiomeType): void;
82
+ /**
83
+ * @remarks
84
+ * Resets the horizon blend start to the value set by resource
85
+ * packs
86
+ *
87
+ * This function can't be called in read-only mode.
88
+ *
89
+ * @param biomeIdentifier
90
+ * Biome Identifier. If the corresponding biome has had its
91
+ * horizon blend start overriden using scripting, then the
92
+ * override value will be removed and the biome will use the
93
+ * value provided by json
94
+ * @throws This function can throw errors.
95
+ *
96
+ * {@link minecraftcommon.EngineError}
97
+ */
98
+ resetHorizonBlendStart(biomeIdentifier: minecraftserver.BiomeType): void;
99
+ /**
100
+ * @remarks
101
+ * Resets the moon mie strength to the value set by resource
102
+ * packs
103
+ *
104
+ * This function can't be called in read-only mode.
105
+ *
106
+ * @param biomeIdentifier
107
+ * Biome Identifier. If the corresponding biome has had its
108
+ * moon mie strength overriden using scripting, then the
109
+ * override value will be removed and the biome will use the
110
+ * value provided by json
111
+ * @throws This function can throw errors.
112
+ *
113
+ * {@link minecraftcommon.EngineError}
114
+ */
115
+ resetMoonMieStrength(biomeIdentifier: minecraftserver.BiomeType): void;
116
+ /**
117
+ * @remarks
118
+ * Resets the rayleigh strength to the value set by resource
119
+ * packs
120
+ *
121
+ * This function can't be called in read-only mode.
122
+ *
123
+ * @param biomeIdentifier
124
+ * Biome Identifier. If the corresponding biome has had its
125
+ * rayleigh strength overriden using scripting, then the
126
+ * override value will be removed and the biome will use the
127
+ * value provided by json
128
+ * @throws This function can throw errors.
129
+ *
130
+ * {@link minecraftcommon.EngineError}
131
+ */
132
+ resetRayleighStrength(biomeIdentifier: minecraftserver.BiomeType): void;
133
+ /**
134
+ * @remarks
135
+ * Resets the sky horizon color to the color set by resource
136
+ * packs
137
+ *
138
+ * This function can't be called in read-only mode.
139
+ *
140
+ * @param biomeIdentifier
141
+ * Biome Identifier. If the corresponding biome has had its sky
142
+ * horizon color overriden using scripting, then the override
143
+ * value will be removed and the biome will use the value
144
+ * provided by json
145
+ * @throws This function can throw errors.
146
+ *
147
+ * {@link minecraftcommon.EngineError}
148
+ */
149
+ resetSkyHorizonColor(biomeIdentifier: minecraftserver.BiomeType): void;
150
+ /**
151
+ * @remarks
152
+ * Resets the sky zenith color to the color set by resource
153
+ * packs
154
+ *
155
+ * This function can't be called in read-only mode.
156
+ *
157
+ * @param biomeIdentifier
158
+ * Biome Identifier. If the corresponding biome has had its sky
159
+ * zenith color overriden using scripting, then the override
160
+ * value will be removed and the biome will use the value
161
+ * provided by json
162
+ * @throws This function can throw errors.
163
+ *
164
+ * {@link minecraftcommon.EngineError}
165
+ */
166
+ resetSkyZenithColor(biomeIdentifier: minecraftserver.BiomeType): void;
167
+ /**
168
+ * @remarks
169
+ * Resets the sun glare shape to the value set by resource
170
+ * packs
171
+ *
172
+ * This function can't be called in read-only mode.
173
+ *
174
+ * @param biomeIdentifier
175
+ * Biome Identifier. If the corresponding biome has had its sun
176
+ * glare shape overriden using scripting, then the override
177
+ * value will be removed and the biome will use the value
178
+ * provided by json
179
+ * @throws This function can throw errors.
180
+ *
181
+ * {@link minecraftcommon.EngineError}
182
+ */
183
+ resetSunGlareShape(biomeIdentifier: minecraftserver.BiomeType): void;
184
+ /**
185
+ * @remarks
186
+ * Resets the sun mie strength to the value set by resource
187
+ * packs
188
+ *
189
+ * This function can't be called in read-only mode.
190
+ *
191
+ * @param biomeIdentifier
192
+ * Biome Identifier. If the corresponding biome has had its sun
193
+ * mie strength overriden using scripting, then the override
194
+ * value will be removed and the biome will use the value
195
+ * provided by json
196
+ * @throws This function can throw errors.
197
+ *
198
+ * {@link minecraftcommon.EngineError}
199
+ */
200
+ resetSunMieStrength(biomeIdentifier: minecraftserver.BiomeType): void;
201
+ /**
202
+ * @remarks
203
+ * Sets the horizon blend max for atmospheric scattering in
204
+ * Vibrant Visuals
205
+ *
206
+ * This function can't be called in read-only mode.
207
+ *
208
+ * @param blendMax
209
+ * Either a number (range [0,1]) or a set of keyframes. The
210
+ * keyframes are composed of key value pairs. The key is a
211
+ * number (range [0,1]) to signify a time of day (0.0 and 1.0
212
+ * are noon, 0.25 is sunset, 0.5 is midnight, and 0.75 is
213
+ * sunrise). The value is also a number (range [0,1])
214
+ * @param biomeIdentifier
215
+ * Biome Identifier. The horizon blend max will be set for the
216
+ * specified biome.
217
+ * @throws This function can throw errors.
218
+ *
219
+ * {@link minecraftcommon.InvalidArgumentError}
220
+ */
221
+ setHorizonBlendMax(blendMax: number | Record<number, number>, biomeIdentifier: minecraftserver.BiomeType): void;
222
+ /**
223
+ * @remarks
224
+ * Sets the horizon blend mie start for atmospheric scattering
225
+ * in Vibrant Visuals
226
+ *
227
+ * This function can't be called in read-only mode.
228
+ *
229
+ * @param blendMieStart
230
+ * Either a number (range [0,1.2]) or a set of keyframes. The
231
+ * keyframes are composed of key value pairs. The key is a
232
+ * number (range [0,1]) to signify a time of day (0.0 and 1.0
233
+ * are noon, 0.25 is sunset, 0.5 is midnight, and 0.75 is
234
+ * sunrise). The value is also a number (range [0,1.2])
235
+ * @param biomeIdentifier
236
+ * Biome Identifier. The horizon blend mie start will be set
237
+ * for the specified biome.
238
+ * @throws This function can throw errors.
239
+ *
240
+ * {@link minecraftcommon.InvalidArgumentError}
241
+ */
242
+ setHorizonBlendMieStart(
243
+ blendMieStart: number | Record<number, number>,
244
+ biomeIdentifier: minecraftserver.BiomeType,
245
+ ): void;
246
+ /**
247
+ * @remarks
248
+ * Sets the horizon blend min for atmospheric scattering in
249
+ * Vibrant Visuals
250
+ *
251
+ * This function can't be called in read-only mode.
252
+ *
253
+ * @param blendMin
254
+ * Either a number (range [0,1]) or a set of keyframes. The
255
+ * keyframes are composed of key value pairs. The key is a
256
+ * number (range [0,1]) to signify a time of day (0.0 and 1.0
257
+ * are noon, 0.25 is sunset, 0.5 is midnight, and 0.75 is
258
+ * sunrise). The value is also a number (range [0,1])
259
+ * @param biomeIdentifier
260
+ * Biome Identifier. The horizon blend min will be set for the
261
+ * specified biome.
262
+ * @throws This function can throw errors.
263
+ *
264
+ * {@link minecraftcommon.InvalidArgumentError}
265
+ */
266
+ setHorizonBlendMin(blendMin: number | Record<number, number>, biomeIdentifier: minecraftserver.BiomeType): void;
267
+ /**
268
+ * @remarks
269
+ * Sets the horizon blend start for atmospheric scattering in
270
+ * Vibrant Visuals
271
+ *
272
+ * This function can't be called in read-only mode.
273
+ *
274
+ * @param blendStart
275
+ * Either a number (range [0,1]) or a set of keyframes. The
276
+ * keyframes are composed of key value pairs. The key is a
277
+ * number (range [0,1]) to signify a time of day (0.0 and 1.0
278
+ * are noon, 0.25 is sunset, 0.5 is midnight, and 0.75 is
279
+ * sunrise). The value is also a number (range [0,1])
280
+ * @param biomeIdentifier
281
+ * Biome Identifier. The horizon blend start will be set for
282
+ * the specified biome.
283
+ * @throws This function can throw errors.
284
+ *
285
+ * {@link minecraftcommon.InvalidArgumentError}
286
+ */
287
+ setHorizonBlendStart(blendStart: number | Record<number, number>, biomeIdentifier: minecraftserver.BiomeType): void;
288
+ /**
289
+ * @remarks
290
+ * Sets the moon mie strength for atmospheric scattering in
291
+ * Vibrant Visuals
292
+ *
293
+ * This function can't be called in read-only mode.
294
+ *
295
+ * @param moonMieStrength
296
+ * Either a number (range [0,60]) or a set of keyframes. The
297
+ * keyframes are composed of key value pairs. The key is a
298
+ * number (range [0,1]) to signify a time of day (0.0 and 1.0
299
+ * are noon, 0.25 is sunset, 0.5 is midnight, and 0.75 is
300
+ * sunrise). The value is also a number (range [0,60])
301
+ * @param biomeIdentifier
302
+ * Biome Identifier. The moon mie strength will be set for the
303
+ * specified biome.
304
+ * @throws This function can throw errors.
305
+ *
306
+ * {@link minecraftcommon.InvalidArgumentError}
307
+ */
308
+ setMoonMieStrength(
309
+ moonMieStrength: number | Record<number, number>,
310
+ biomeIdentifier: minecraftserver.BiomeType,
311
+ ): void;
312
+ /**
313
+ * @remarks
314
+ * Sets the rayleigh strength for atmospheric scattering in
315
+ * Vibrant Visuals
316
+ *
317
+ * This function can't be called in read-only mode.
318
+ *
319
+ * @param rayleighStrength
320
+ * Either a number (range [0,11]) or a set of keyframes. The
321
+ * keyframes are composed of key value pairs. The key is a
322
+ * number (range [0,1]) to signify a time of day (0.0 and 1.0
323
+ * are noon, 0.25 is sunset, 0.5 is midnight, and 0.75 is
324
+ * sunrise). The value is also a number (range [0,11])
325
+ * @param biomeIdentifier
326
+ * Biome Identifier. The rayleigh strength will be set for the
327
+ * specified biome.
328
+ * @throws This function can throw errors.
329
+ *
330
+ * {@link minecraftcommon.InvalidArgumentError}
331
+ */
332
+ setRayleighStrength(
333
+ rayleighStrength: number | Record<number, number>,
334
+ biomeIdentifier: minecraftserver.BiomeType,
335
+ ): void;
336
+ /**
337
+ * @remarks
338
+ * Sets the sky horizon color for atmospheric scattering in
339
+ * Vibrant Visuals
340
+ *
341
+ * This function can't be called in read-only mode.
342
+ *
343
+ * @param color
344
+ * Either a RGB triplet or a set of keyframes. The keyframes
345
+ * are composed of key value pairs. The key is a number (range
346
+ * [0,1]) to signify a time of day (0.0 and 1.0 are noon, 0.25
347
+ * is sunset, 0.5 is midnight, and 0.75 is sunrise). The value
348
+ * is a RGB triplet
349
+ * @param biomeIdentifier
350
+ * Biome Identifier. The sky horizon color will be set for the
351
+ * specified biome.
352
+ * @throws This function can throw errors.
353
+ *
354
+ * {@link minecraftcommon.InvalidArgumentError}
355
+ */
356
+ setSkyHorizonColor(
357
+ color: Record<number, minecraftserver.RGB> | minecraftserver.RGB,
358
+ biomeIdentifier: minecraftserver.BiomeType,
359
+ ): void;
360
+ /**
361
+ * @remarks
362
+ * Sets the sky zenith color for atmospheric scattering in
363
+ * Vibrant Visuals
364
+ *
365
+ * This function can't be called in read-only mode.
366
+ *
367
+ * @param color
368
+ * Either a RGB triplet or a set of keyframes. The keyframes
369
+ * are composed of key value pairs. The key is a float in the
370
+ * range 0-1 to signify a time of day and the value is a RGB
371
+ * triplet
372
+ * @param biomeIdentifier
373
+ * Biome Identifier. The sky zenith color will be set for the
374
+ * specified biome.
375
+ * @throws This function can throw errors.
376
+ *
377
+ * {@link minecraftcommon.InvalidArgumentError}
378
+ */
379
+ setSkyZenithColor(
380
+ color: Record<number, minecraftserver.RGB> | minecraftserver.RGB,
381
+ biomeIdentifier: minecraftserver.BiomeType,
382
+ ): void;
383
+ /**
384
+ * @remarks
385
+ * Sets the sun glare shape for atmospheric scattering in
386
+ * Vibrant Visuals
387
+ *
388
+ * This function can't be called in read-only mode.
389
+ *
390
+ * @param sunGlareShape
391
+ * Either a number (range [0,50]) or a set of keyframes. The
392
+ * keyframes are composed of key value pairs. The key is a
393
+ * number (range [0,1]) to signify a time of day (0.0 and 1.0
394
+ * are noon, 0.25 is sunset, 0.5 is midnight, and 0.75 is
395
+ * sunrise). The value is also a number (range [0,50])
396
+ * @param biomeIdentifier
397
+ * Biome Identifier. The sun glare shape will be set for the
398
+ * specified biome.
399
+ * @throws This function can throw errors.
400
+ *
401
+ * {@link minecraftcommon.InvalidArgumentError}
402
+ */
403
+ setSunGlareShape(sunGlareShape: number | Record<number, number>, biomeIdentifier: minecraftserver.BiomeType): void;
404
+ /**
405
+ * @remarks
406
+ * Sets the sun mie strength for atmospheric scattering in
407
+ * Vibrant Visuals
408
+ *
409
+ * This function can't be called in read-only mode.
410
+ *
411
+ * @param sunMieStrength
412
+ * Either a number (range [0,60]) or a set of keyframes. The
413
+ * keyframes are composed of key value pairs. The key is a
414
+ * number (range [0,1]) to signify a time of day (0.0 and 1.0
415
+ * are noon, 0.25 is sunset, 0.5 is midnight, and 0.75 is
416
+ * sunrise). The value is also a number (range [0,60])
417
+ * @param biomeIdentifier
418
+ * Biome Identifier. The sun mie will be set for the specified
419
+ * biome.
420
+ * @throws This function can throw errors.
421
+ *
422
+ * {@link minecraftcommon.InvalidArgumentError}
423
+ */
424
+ setSunMieStrength(
425
+ sunMieStrength: number | Record<number, number>,
426
+ biomeIdentifier: minecraftserver.BiomeType,
427
+ ): void;
428
+ }
429
+
430
+ export const atmosphere: Atmospherics;
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@minecraft/server-graphics",
3
+ "version": "1.0.0-beta.1.21.130-preview.22",
4
+ "description": "",
5
+ "contributors": [
6
+ {
7
+ "name": "Jake Shirley",
8
+ "email": "jake@xbox.com"
9
+ },
10
+ {
11
+ "name": "Mike Ammerlaan",
12
+ "email": "mikeam@microsoft.com"
13
+ }
14
+ ],
15
+ "peerDependencies": {
16
+ "@minecraft/common": "^1.0.0",
17
+ "@minecraft/server": "^1.17.0 || ^2.0.0 || ^2.5.0-beta.1.21.130-preview.22"
18
+ },
19
+ "license": "MIT"
20
+ }