minecraft-renderer 0.1.43 → 0.1.44

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.
@@ -0,0 +1,141 @@
1
+ //@ts-nocheck
2
+ import {
3
+ FUTURISTIC_CAMERA_IDS,
4
+ FUTURISTIC_CAMERA_LABELS,
5
+ FUTURISTIC_SCENE_IDS,
6
+ FUTURISTIC_SCENE_LABELS,
7
+ MINECRAFT_BLOCK_GROUP_IDS,
8
+ MINECRAFT_BLOCK_GROUP_LABELS
9
+ } from './futuristic'
10
+ import { MENU_BACKGROUND_OPTION_DEFAULTS } from './config'
11
+
12
+ export type RendererOptionMeta = {
13
+ possibleValues?: string[] | Array<[string, string]>
14
+ isCustomInput?: boolean
15
+ min?: number
16
+ max?: number
17
+ unit?: string
18
+ text?: string
19
+ tooltip?: string
20
+ requiresRestart?: boolean
21
+ }
22
+
23
+ export type RendererDefaultOptionKey = keyof typeof RENDERER_DEFAULT_OPTIONS
24
+
25
+ const MB = MENU_BACKGROUND_OPTION_DEFAULTS
26
+
27
+ /** Default values for options owned by minecraft-renderer (spread into app `defaultOptions`). */
28
+ export const RENDERER_DEFAULT_OPTIONS = {
29
+ rendererWorldPerformance: 'normal' as 'low-energy' | 'normal' | 'maximum',
30
+ rendererMeshersCountOverride: null as number | null,
31
+ starfieldRendering: true,
32
+ defaultSkybox: true,
33
+ menuBackgroundMode: MB.mode,
34
+ menuBackgroundMinecraftTextures: MB.minecraftTextures,
35
+ menuBackgroundFuturisticScene: MB.futuristicScene,
36
+ menuBackgroundFuturisticCamera: MB.futuristicCamera,
37
+ menuBackgroundFuturisticBlockGroup: MB.futuristicBlockGroup,
38
+ menuBackgroundFuturisticCameraSpeed: MB.futuristicCameraSpeedPercent,
39
+ menuBackgroundFuturisticBlockSpeed: MB.futuristicBlockSpeedPercent,
40
+ rendererFuturisticReveal: false,
41
+ rendererPerfDebugOverlay: false,
42
+ disableBlockEntityTextures: false
43
+ } as const
44
+
45
+ /** Settings UI metadata for {@link RENDERER_DEFAULT_OPTIONS} keys. */
46
+ export const RENDERER_OPTIONS_META: Partial<Record<RendererDefaultOptionKey, RendererOptionMeta>> = {
47
+ menuBackgroundMode: {
48
+ possibleValues: [['classic', 'Classic'], ['futuristic', 'Futuristic']],
49
+ requiresRestart: true
50
+ },
51
+ menuBackgroundMinecraftTextures: {
52
+ text: 'Minecraft block textures',
53
+ tooltip: 'Use block atlas on futuristic menu cubes (loads assets on menu)'
54
+ },
55
+ menuBackgroundFuturisticScene: {
56
+ possibleValues: FUTURISTIC_SCENE_IDS.map(id => [id, FUTURISTIC_SCENE_LABELS[id]] as [string, string])
57
+ },
58
+ menuBackgroundFuturisticCamera: {
59
+ possibleValues: FUTURISTIC_CAMERA_IDS.map(id => [id, FUTURISTIC_CAMERA_LABELS[id]] as [string, string])
60
+ },
61
+ menuBackgroundFuturisticBlockGroup: {
62
+ possibleValues: MINECRAFT_BLOCK_GROUP_IDS.map(id => [id, MINECRAFT_BLOCK_GROUP_LABELS[id]] as [string, string]),
63
+ text: 'Block pool',
64
+ tooltip: 'Block set for textured menu cubes (requires Minecraft textures)'
65
+ },
66
+ menuBackgroundFuturisticCameraSpeed: {
67
+ text: 'Camera speed',
68
+ tooltip: 'Orbit / fly-through camera path speed. 0 freezes the path; mouse parallax still works.',
69
+ min: 0,
70
+ max: 200,
71
+ unit: '%'
72
+ },
73
+ menuBackgroundFuturisticBlockSpeed: {
74
+ text: 'Block speed',
75
+ tooltip: 'Floating blocks and sky rotation. Independent of camera path speed.',
76
+ min: 0,
77
+ max: 200,
78
+ unit: '%'
79
+ },
80
+ rendererWorldPerformance: {
81
+ text: 'World performance',
82
+ tooltip: 'Background workers for chunk geometry. Reload to apply.',
83
+ requiresRestart: true,
84
+ possibleValues: [
85
+ ['low-energy', 'Low Energy'],
86
+ ['normal', 'Normal'],
87
+ ['maximum', 'Maximum']
88
+ ]
89
+ },
90
+ starfieldRendering: {
91
+ text: 'Starfield'
92
+ },
93
+ defaultSkybox: {
94
+ text: 'Default skybox'
95
+ },
96
+ rendererFuturisticReveal: {
97
+ text: 'Futuristic world reveal'
98
+ },
99
+ rendererPerfDebugOverlay: {
100
+ text: 'Performance debug overlay'
101
+ },
102
+ disableBlockEntityTextures: {
103
+ text: 'Disable block entity textures',
104
+ tooltip: 'Skips signs, banners, heads, maps, etc.'
105
+ }
106
+ }
107
+
108
+ /** Grouped keys for the Render settings screen (section title + option keys). */
109
+ export const RENDERER_RENDER_GUI_SECTIONS: ReadonlyArray<{
110
+ title: string
111
+ keys: readonly RendererDefaultOptionKey[]
112
+ }> = [
113
+ {
114
+ title: 'Menu background',
115
+ keys: [
116
+ 'menuBackgroundMode',
117
+ 'menuBackgroundMinecraftTextures',
118
+ 'menuBackgroundFuturisticScene',
119
+ 'menuBackgroundFuturisticCamera',
120
+ 'menuBackgroundFuturisticBlockGroup',
121
+ 'menuBackgroundFuturisticCameraSpeed',
122
+ 'menuBackgroundFuturisticBlockSpeed'
123
+ ]
124
+ },
125
+ {
126
+ title: 'World rendering',
127
+ keys: [
128
+ 'rendererWorldPerformance',
129
+ 'starfieldRendering',
130
+ 'defaultSkybox',
131
+ 'disableBlockEntityTextures'
132
+ ]
133
+ },
134
+ {
135
+ title: 'Renderer debug',
136
+ keys: [
137
+ 'rendererFuturisticReveal',
138
+ 'rendererPerfDebugOverlay'
139
+ ]
140
+ }
141
+ ]