@3driseai/3drise-core 1.0.19 → 1.0.20
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.
- package/dist/animations/index.d.ts +2 -0
- package/dist/animations/index.d.ts.map +1 -0
- package/dist/animations/index.js +1 -0
- package/dist/animations/trackGenerators.d.ts +140 -0
- package/dist/animations/trackGenerators.d.ts.map +1 -0
- package/dist/animations/trackGenerators.js +443 -0
- package/dist/autoAnimate/bounds.d.ts +7 -0
- package/dist/autoAnimate/bounds.d.ts.map +1 -0
- package/dist/autoAnimate/bounds.js +23 -0
- package/dist/autoAnimate/composer.d.ts +30 -0
- package/dist/autoAnimate/composer.d.ts.map +1 -0
- package/dist/autoAnimate/composer.js +251 -0
- package/dist/autoAnimate/describeScene.d.ts +105 -0
- package/dist/autoAnimate/describeScene.d.ts.map +1 -0
- package/dist/autoAnimate/describeScene.js +165 -0
- package/dist/autoAnimate/draft.d.ts +59 -0
- package/dist/autoAnimate/draft.d.ts.map +1 -0
- package/dist/autoAnimate/draft.js +2 -0
- package/dist/autoAnimate/index.d.ts +14 -0
- package/dist/autoAnimate/index.d.ts.map +1 -0
- package/dist/autoAnimate/index.js +9 -0
- package/dist/autoAnimate/recipes.d.ts +87 -0
- package/dist/autoAnimate/recipes.d.ts.map +1 -0
- package/dist/autoAnimate/recipes.js +224 -0
- package/dist/autoAnimate/rng.d.ts +10 -0
- package/dist/autoAnimate/rng.d.ts.map +1 -0
- package/dist/autoAnimate/rng.js +16 -0
- package/dist/autoAnimate/sceneAnalyzer.d.ts +7 -0
- package/dist/autoAnimate/sceneAnalyzer.d.ts.map +1 -0
- package/dist/autoAnimate/sceneAnalyzer.js +291 -0
- package/dist/autoAnimate/types.d.ts +124 -0
- package/dist/autoAnimate/types.d.ts.map +1 -0
- package/dist/autoAnimate/types.js +1 -0
- package/dist/autoAnimate/validator.d.ts +10 -0
- package/dist/autoAnimate/validator.d.ts.map +1 -0
- package/dist/autoAnimate/validator.js +59 -0
- package/dist/data/effectsDefaults.d.ts +4 -0
- package/dist/data/effectsDefaults.d.ts.map +1 -1
- package/dist/data/effectsDefaults.js +393 -2
- package/dist/data/gridsDefaults.d.ts +5 -0
- package/dist/data/gridsDefaults.d.ts.map +1 -0
- package/dist/data/gridsDefaults.js +290 -0
- package/dist/data/index.d.ts +1 -0
- package/dist/data/index.d.ts.map +1 -1
- package/dist/data/index.js +1 -0
- package/dist/data/particlesDefaults.d.ts +3 -1
- package/dist/data/particlesDefaults.d.ts.map +1 -1
- package/dist/data/particlesDefaults.js +78 -0
- package/dist/environment/cloudConfigs.d.ts +313 -0
- package/dist/environment/cloudConfigs.d.ts.map +1 -0
- package/dist/environment/cloudConfigs.js +342 -0
- package/dist/environment/index.d.ts +5 -0
- package/dist/environment/index.d.ts.map +1 -0
- package/dist/environment/index.js +6 -0
- package/dist/environment/landscapeConfigs.d.ts +220 -0
- package/dist/environment/landscapeConfigs.d.ts.map +1 -0
- package/dist/environment/landscapeConfigs.js +256 -0
- package/dist/environment/oceanConfigs.d.ts +293 -0
- package/dist/environment/oceanConfigs.d.ts.map +1 -0
- package/dist/environment/oceanConfigs.js +380 -0
- package/dist/environment/terrainConfigs.d.ts +254 -0
- package/dist/environment/terrainConfigs.d.ts.map +1 -0
- package/dist/environment/terrainConfigs.js +292 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/properties/index.d.ts +4 -0
- package/dist/properties/index.d.ts.map +1 -0
- package/dist/properties/index.js +3 -0
- package/dist/properties/registry.d.ts +44 -0
- package/dist/properties/registry.d.ts.map +1 -0
- package/dist/properties/registry.js +343 -0
- package/dist/properties/tables/effectsProperties.d.ts +40 -0
- package/dist/properties/tables/effectsProperties.d.ts.map +1 -0
- package/dist/properties/tables/effectsProperties.js +512 -0
- package/dist/properties/tables/geometryProperties.d.ts +38 -0
- package/dist/properties/tables/geometryProperties.d.ts.map +1 -0
- package/dist/properties/tables/geometryProperties.js +91 -0
- package/dist/properties/tables/getPropertyConfig.d.ts +3 -0
- package/dist/properties/tables/getPropertyConfig.d.ts.map +1 -0
- package/dist/properties/tables/getPropertyConfig.js +16 -0
- package/dist/properties/tables/gridProperties.d.ts +6 -0
- package/dist/properties/tables/gridProperties.d.ts.map +1 -0
- package/dist/properties/tables/gridProperties.js +121 -0
- package/dist/properties/tables/index.d.ts +9 -0
- package/dist/properties/tables/index.d.ts.map +1 -0
- package/dist/properties/tables/index.js +8 -0
- package/dist/properties/tables/lightProperties.d.ts +14 -0
- package/dist/properties/tables/lightProperties.d.ts.map +1 -0
- package/dist/properties/tables/lightProperties.js +263 -0
- package/dist/properties/tables/materialBounds.d.ts +33 -0
- package/dist/properties/tables/materialBounds.d.ts.map +1 -0
- package/dist/properties/tables/materialBounds.js +180 -0
- package/dist/properties/tables/optionalProperties.d.ts +83 -0
- package/dist/properties/tables/optionalProperties.d.ts.map +1 -0
- package/dist/properties/tables/optionalProperties.js +710 -0
- package/dist/properties/tables/particlesProperties.d.ts +17 -0
- package/dist/properties/tables/particlesProperties.d.ts.map +1 -0
- package/dist/properties/tables/particlesProperties.js +334 -0
- package/dist/properties/types.d.ts +43 -0
- package/dist/properties/types.d.ts.map +1 -0
- package/dist/properties/types.js +12 -0
- package/dist/services/ShadersLibrary.d.ts +1 -1
- package/dist/services/ShadersLibrary.d.ts.map +1 -1
- package/dist/shaders/WallpaperGridMaterial.d.ts.map +1 -1
- package/dist/shaders/WallpaperGridMaterial.js +6 -1
- package/dist/three/GalleryLayoutV.d.ts.map +1 -1
- package/dist/three/GalleryLayoutV.js +0 -10
- package/dist/three/SceneBuilderV.d.ts.map +1 -1
- package/dist/three/SceneBuilderV.js +1 -7
- package/dist/types/generativeEffects.d.ts +0 -4
- package/dist/types/generativeEffects.d.ts.map +1 -1
- package/dist/types/generativeParticles.d.ts +175 -2
- package/dist/types/generativeParticles.d.ts.map +1 -1
- package/dist/types/objectSettings.d.ts +45 -4
- package/dist/types/objectSettings.d.ts.map +1 -1
- package/dist/types/scene3d.d.ts +3 -3
- package/dist/types/scene3d.d.ts.map +1 -1
- package/dist/utils/generativeAnimatable.d.ts +1 -1
- package/dist/utils/generativeAnimatable.d.ts.map +1 -1
- package/dist/utils/generativeAnimatable.js +7 -1
- package/dist/utils/getAnimatableProperties.d.ts +12 -1
- package/dist/utils/getAnimatableProperties.d.ts.map +1 -1
- package/dist/utils/getAnimatableProperties.js +35 -138
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/objectEffects.d.ts +6 -0
- package/dist/utils/objectEffects.d.ts.map +1 -0
- package/dist/utils/objectEffects.js +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"materialBounds.d.ts","sourceRoot":"","sources":["../../../src/properties/tables/materialBounds.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;CACxE;AAED;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CA6H3E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,sBAKrC,CAAC;AAEF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,sBAAsB,CAErE;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAS5D;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACnC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAoCrB"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
// Moved from client (client/app/containers/pages/controllers/materialBounds.ts). Property tables — the registry (../registry) is built on these.
|
|
2
|
+
// =============================================================================
|
|
3
|
+
// MATERIAL PROPERTY BOUNDS — Min/Max/Step for Slider Controls
|
|
4
|
+
// =============================================================================
|
|
5
|
+
/**
|
|
6
|
+
* Known bounds for standard Three.js material properties.
|
|
7
|
+
* Used by MaterialControllerUi to render SliderControls with correct ranges.
|
|
8
|
+
*
|
|
9
|
+
* If a property is not in this map, it falls back to a sensible default (0–1, step 0.01).
|
|
10
|
+
*/
|
|
11
|
+
export const MATERIAL_PROPERTY_BOUNDS = {
|
|
12
|
+
// PBR core
|
|
13
|
+
roughness: { min: 0, max: 1, step: 0.01, label: 'Roughness', accentColor: 'cyan' },
|
|
14
|
+
metalness: { min: 0, max: 1, step: 0.01, label: 'Metalness', accentColor: 'blue' },
|
|
15
|
+
opacity: { min: 0, max: 1, step: 0.01, label: 'Opacity', accentColor: 'purple' },
|
|
16
|
+
// Phong
|
|
17
|
+
shininess: { min: 0, max: 100, step: 1, label: 'Shininess', accentColor: 'yellow' },
|
|
18
|
+
reflectivity: { min: 0, max: 1, step: 0.01, label: 'Reflectivity', accentColor: 'cyan' },
|
|
19
|
+
// Physical
|
|
20
|
+
clearcoat: { min: 0, max: 1, step: 0.01, label: 'Clearcoat', accentColor: 'cyan' },
|
|
21
|
+
clearcoatRoughness: { min: 0, max: 1, step: 0.01, label: 'Clearcoat Roughness', accentColor: 'blue' },
|
|
22
|
+
transmission: { min: 0, max: 1, step: 0.01, label: 'Transmission', accentColor: 'purple' },
|
|
23
|
+
ior: { min: 1, max: 2.5, step: 0.01, label: 'IOR', accentColor: 'pink' },
|
|
24
|
+
thickness: { min: 0, max: 5, step: 0.01, label: 'Thickness', accentColor: 'green' },
|
|
25
|
+
attenuationDistance: { min: 0, max: 100, step: 0.5, label: 'Attenuation Distance', accentColor: 'blue' },
|
|
26
|
+
sheen: { min: 0, max: 1, step: 0.01, label: 'Sheen', accentColor: 'pink' },
|
|
27
|
+
sheenRoughness: { min: 0, max: 1, step: 0.01, label: 'Sheen Roughness', accentColor: 'purple' },
|
|
28
|
+
specularIntensity: { min: 0, max: 2, step: 0.01, label: 'Specular Intensity', accentColor: 'yellow' },
|
|
29
|
+
iridescence: { min: 0, max: 1, step: 0.01, label: 'Iridescence', accentColor: 'pink' },
|
|
30
|
+
iridescenceIOR: { min: 1, max: 2.5, step: 0.01, label: 'Iridescence IOR', accentColor: 'purple' },
|
|
31
|
+
// Maps intensity
|
|
32
|
+
envMapIntensity: { min: 0, max: 5, step: 0.1, label: 'Env Map Intensity', accentColor: 'green' },
|
|
33
|
+
emissiveIntensity: { min: 0, max: 5, step: 0.1, label: 'Emissive Intensity', accentColor: 'yellow' },
|
|
34
|
+
aoMapIntensity: { min: 0, max: 2, step: 0.01, label: 'AO Map Intensity', accentColor: 'blue' },
|
|
35
|
+
bumpScale: { min: 0, max: 2, step: 0.01, label: 'Bump Scale', accentColor: 'cyan' },
|
|
36
|
+
displacementScale: { min: 0, max: 5, step: 0.01, label: 'Displacement Scale', accentColor: 'green' },
|
|
37
|
+
// Shader uniforms (common patterns)
|
|
38
|
+
uOpacity: { min: 0, max: 1, step: 0.01, label: 'Opacity', accentColor: 'purple' },
|
|
39
|
+
uPointSize: { min: 0.1, max: 20, step: 0.1, label: 'Point Size', accentColor: 'cyan' },
|
|
40
|
+
// ==========================================================================
|
|
41
|
+
// GENERATIVE EFFECT PROPERTIES
|
|
42
|
+
// ==========================================================================
|
|
43
|
+
// Base (all effects)
|
|
44
|
+
intensity: { min: 0, max: 5, step: 0.05, label: 'Intensity', accentColor: 'yellow' },
|
|
45
|
+
speed: { min: 0.1, max: 10, step: 0.1, label: 'Speed', accentColor: 'cyan' },
|
|
46
|
+
// Molecules
|
|
47
|
+
atomCount: { min: 3, max: 20, step: 1, label: 'Atom Count', accentColor: 'cyan' },
|
|
48
|
+
orbitRadius: { min: 0.5, max: 5, step: 0.1, label: 'Orbit Radius', accentColor: 'blue' },
|
|
49
|
+
atomSize: { min: 0.01, max: 0.3, step: 0.01, label: 'Atom Size', accentColor: 'purple' },
|
|
50
|
+
// Shockwave / smoke ring
|
|
51
|
+
ringCount: { min: 1, max: 5, step: 1, label: 'Ring Count', accentColor: 'cyan' },
|
|
52
|
+
expansionRadius: { min: 1, max: 6, step: 0.1, label: 'Expansion Radius', accentColor: 'blue' },
|
|
53
|
+
intervalSeconds: { min: 0.5, max: 10, step: 0.1, label: 'Interval (s)', accentColor: 'yellow' },
|
|
54
|
+
// Aura / orb
|
|
55
|
+
layerCount: { min: 1, max: 5, step: 1, label: 'Layer Count', accentColor: 'purple' },
|
|
56
|
+
fresnelPower: { min: 1, max: 8, step: 0.1, label: 'Fresnel Power', accentColor: 'pink' },
|
|
57
|
+
pulseSpeed: { min: 0.1, max: 5, step: 0.1, label: 'Pulse Speed', accentColor: 'pink' },
|
|
58
|
+
noiseAmount: { min: 0, max: 1, step: 0.01, label: 'Noise Amount', accentColor: 'green' },
|
|
59
|
+
sizeMultiplier: { min: 1, max: 3, step: 0.1, label: 'Size Multiplier', accentColor: 'blue' },
|
|
60
|
+
coreSize: { min: 0.05, max: 0.5, step: 0.01, label: 'Core Size', accentColor: 'yellow' },
|
|
61
|
+
glowLayers: { min: 1, max: 5, step: 1, label: 'Glow Layers', accentColor: 'purple' },
|
|
62
|
+
// Data stream / constellation
|
|
63
|
+
particleCount: { min: 20, max: 500, step: 10, label: 'Particle Count', accentColor: 'cyan' },
|
|
64
|
+
spiralTurns: { min: 1, max: 12, step: 1, label: 'Spiral Turns', accentColor: 'blue' },
|
|
65
|
+
streamRadius: { min: 0.5, max: 5, step: 0.1, label: 'Stream Radius', accentColor: 'green' },
|
|
66
|
+
particleSize: { min: 0.01, max: 0.2, step: 0.01, label: 'Particle Size', accentColor: 'purple' },
|
|
67
|
+
connectRadius: { min: 0.5, max: 5, step: 0.1, label: 'Connect Radius', accentColor: 'cyan' },
|
|
68
|
+
twinkleSpeed: { min: 0.1, max: 5, step: 0.1, label: 'Twinkle Speed', accentColor: 'pink' },
|
|
69
|
+
lineOpacity: { min: 0, max: 1, step: 0.01, label: 'Line Opacity', accentColor: 'purple' },
|
|
70
|
+
starCount: { min: 10, max: 200, step: 5, label: 'Star Count', accentColor: 'yellow' },
|
|
71
|
+
starSize: { min: 0.01, max: 0.2, step: 0.01, label: 'Star Size', accentColor: 'yellow' },
|
|
72
|
+
// Hologram
|
|
73
|
+
scanlineCount: { min: 2, max: 20, step: 1, label: 'Scanline Count', accentColor: 'cyan' },
|
|
74
|
+
scanSpeed: { min: 0.1, max: 5, step: 0.1, label: 'Scan Speed', accentColor: 'green' },
|
|
75
|
+
flickerAmount: { min: 0, max: 1, step: 0.01, label: 'Flicker Amount', accentColor: 'yellow' },
|
|
76
|
+
// Portal
|
|
77
|
+
radius: { min: 0.5, max: 5, step: 0.1, label: 'Radius', accentColor: 'purple' },
|
|
78
|
+
rotationSpeed: { min: 0.1, max: 5, step: 0.1, label: 'Rotation Speed', accentColor: 'cyan' },
|
|
79
|
+
// DNA Helix
|
|
80
|
+
helixRadius: { min: 0.2, max: 3, step: 0.1, label: 'Helix Radius', accentColor: 'blue' },
|
|
81
|
+
helixHeight: { min: 0.5, max: 5, step: 0.1, label: 'Helix Height', accentColor: 'green' },
|
|
82
|
+
// Lightning
|
|
83
|
+
boltCount: { min: 1, max: 8, step: 1, label: 'Bolt Count', accentColor: 'yellow' },
|
|
84
|
+
branchDepth: { min: 2, max: 6, step: 1, label: 'Branch Depth', accentColor: 'blue' },
|
|
85
|
+
strikeRadius: { min: 1, max: 4, step: 0.1, label: 'Strike Radius', accentColor: 'purple' },
|
|
86
|
+
flickerRate: { min: 2, max: 20, step: 1, label: 'Flicker Rate', accentColor: 'yellow' },
|
|
87
|
+
branchProbability: { min: 0, max: 1, step: 0.05, label: 'Branch Probability', accentColor: 'pink' },
|
|
88
|
+
// Aurora
|
|
89
|
+
ribbonCount: { min: 3, max: 10, step: 1, label: 'Ribbon Count', accentColor: 'green' },
|
|
90
|
+
waveAmplitude: { min: 0.1, max: 1.5, step: 0.05, label: 'Wave Amplitude', accentColor: 'cyan' },
|
|
91
|
+
colorShift: { min: 0, max: 1, step: 0.01, label: 'Color Shift', accentColor: 'pink' },
|
|
92
|
+
arcWidth: { min: 0.3, max: 1, step: 0.05, label: 'Arc Width', accentColor: 'blue' },
|
|
93
|
+
// Fire / smoke plume
|
|
94
|
+
height: { min: 0.5, max: 3, step: 0.1, label: 'Height', accentColor: 'yellow' },
|
|
95
|
+
spread: { min: 0.2, max: 1.5, step: 0.05, label: 'Spread', accentColor: 'yellow' },
|
|
96
|
+
turbulence: { min: 0, max: 1, step: 0.05, label: 'Turbulence', accentColor: 'green' },
|
|
97
|
+
// Forcefield
|
|
98
|
+
hexSize: { min: 0.02, max: 0.15, step: 0.005, label: 'Hex Size', accentColor: 'cyan' },
|
|
99
|
+
// Neural network
|
|
100
|
+
nodeCount: { min: 8, max: 40, step: 1, label: 'Node Count', accentColor: 'blue' },
|
|
101
|
+
signalSpeed: { min: 0.3, max: 3, step: 0.1, label: 'Signal Speed', accentColor: 'cyan' },
|
|
102
|
+
orbitSpeed: { min: 0.1, max: 1, step: 0.05, label: 'Orbit Speed', accentColor: 'purple' },
|
|
103
|
+
// Black hole
|
|
104
|
+
tilt: { min: 0, max: 45, step: 1, label: 'Tilt (°)', accentColor: 'purple' },
|
|
105
|
+
// Ice crystals
|
|
106
|
+
spikeCount: { min: 10, max: 60, step: 1, label: 'Spike Count', accentColor: 'blue' },
|
|
107
|
+
spikeLength: { min: 0.3, max: 2, step: 0.1, label: 'Spike Length', accentColor: 'cyan' },
|
|
108
|
+
// Volumetric fog
|
|
109
|
+
fogRadius: { min: 0.5, max: 3, step: 0.1, label: 'Fog Radius', accentColor: 'blue' },
|
|
110
|
+
driftSpeed: { min: 0.1, max: 2, step: 0.05, label: 'Drift Speed', accentColor: 'cyan' },
|
|
111
|
+
density: { min: 0, max: 1, step: 0.01, label: 'Density', accentColor: 'purple' },
|
|
112
|
+
// Smoke ring
|
|
113
|
+
riseSpeed: { min: 0.1, max: 2, step: 0.1, label: 'Rise Speed', accentColor: 'green' },
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Default bounds for unknown numeric properties.
|
|
117
|
+
*/
|
|
118
|
+
export const DEFAULT_MATERIAL_BOUNDS = {
|
|
119
|
+
min: 0,
|
|
120
|
+
max: 1,
|
|
121
|
+
step: 0.01,
|
|
122
|
+
accentColor: 'cyan',
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Get bounds for a property, falling back to defaults.
|
|
126
|
+
*/
|
|
127
|
+
export function getMaterialBounds(key) {
|
|
128
|
+
return MATERIAL_PROPERTY_BOUNDS[key] || DEFAULT_MATERIAL_BOUNDS;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Get a human-readable label for a property key.
|
|
132
|
+
* Uses the bounds label if available, otherwise converts camelCase to Title Case.
|
|
133
|
+
*/
|
|
134
|
+
export function getMaterialPropertyLabel(key) {
|
|
135
|
+
const bounds = MATERIAL_PROPERTY_BOUNDS[key];
|
|
136
|
+
if (bounds?.label)
|
|
137
|
+
return bounds.label;
|
|
138
|
+
// Convert camelCase to Title Case: "envMapIntensity" → "Env Map Intensity"
|
|
139
|
+
return key
|
|
140
|
+
.replace(/([A-Z])/g, ' $1')
|
|
141
|
+
.replace(/^./, s => s.toUpperCase())
|
|
142
|
+
.trim();
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Generate random values for numeric and color properties within their bounds.
|
|
146
|
+
* Skips texture/mapping properties and internal fields.
|
|
147
|
+
*/
|
|
148
|
+
export function generateRandomMaterialSettings(currentSettings) {
|
|
149
|
+
const randomized = { ...currentSettings };
|
|
150
|
+
for (const [key, value] of Object.entries(currentSettings)) {
|
|
151
|
+
// Skip internal fields
|
|
152
|
+
if (['materialType', 'materialVariant', 'handlers', 'apply', 'uHasTexture', 'transparent', 'side', 'u_time', 'u_resolution', 'u_mouse'].includes(key)) {
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
// Skip textures/maps
|
|
156
|
+
const lower = key.toLowerCase();
|
|
157
|
+
if (lower.includes('map') || lower.includes('texture'))
|
|
158
|
+
continue;
|
|
159
|
+
// Skip arrays (normalScale, etc.)
|
|
160
|
+
if (Array.isArray(value))
|
|
161
|
+
continue;
|
|
162
|
+
// Randomize numbers within bounds
|
|
163
|
+
if (typeof value === 'number') {
|
|
164
|
+
const bounds = getMaterialBounds(key);
|
|
165
|
+
const range = bounds.max - bounds.min;
|
|
166
|
+
const randomValue = bounds.min + Math.random() * range;
|
|
167
|
+
// Round to step precision
|
|
168
|
+
const precision = bounds.step < 1 ? Math.ceil(-Math.log10(bounds.step)) : 0;
|
|
169
|
+
randomized[key] = Number(randomValue.toFixed(precision));
|
|
170
|
+
}
|
|
171
|
+
// Randomize colors
|
|
172
|
+
if (typeof value === 'string' && value.startsWith('#')) {
|
|
173
|
+
const r = Math.floor(Math.random() * 256).toString(16).padStart(2, '0');
|
|
174
|
+
const g = Math.floor(Math.random() * 256).toString(16).padStart(2, '0');
|
|
175
|
+
const b = Math.floor(Math.random() * 256).toString(16).padStart(2, '0');
|
|
176
|
+
randomized[key] = `#${r}${g}${b}`;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return randomized;
|
|
180
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export interface OptionalProperty {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
type: 'number' | 'string' | 'boolean' | 'color' | 'vector3' | 'vector2' | 'select';
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
step?: number;
|
|
8
|
+
options?: string[];
|
|
9
|
+
/** Display labels for `options` (same order); the values are what is stored. */
|
|
10
|
+
optionLabels?: string[];
|
|
11
|
+
/** Display label; defaults to the name split at capitals ("pointerStrength" -> "Pointer Strength"). */
|
|
12
|
+
label?: string;
|
|
13
|
+
/** false = structural: set only, never driven per frame. Absent = numbers / colours
|
|
14
|
+
* animate. Carried from the env schemas; read by the property registry. */
|
|
15
|
+
animatable?: boolean;
|
|
16
|
+
/** Display unit ('°', 'm', 's'…), shown after the value. */
|
|
17
|
+
unit?: string;
|
|
18
|
+
/** Value the panel shows when the settings do not carry one yet. */
|
|
19
|
+
default?: unknown;
|
|
20
|
+
}
|
|
21
|
+
export declare const skyOptionalProperties: OptionalProperty[];
|
|
22
|
+
export declare const oceanOptionalProperties: OptionalProperty[];
|
|
23
|
+
import { type TerrainType, type WaterHost, type WaterType, type LandscapeHost } from '../../environment/index';
|
|
24
|
+
/** Terrain properties for a given landform. Strata, plateau, incision and the dune
|
|
25
|
+
* terms only appear on the types whose shader branch reads them. */
|
|
26
|
+
export declare const terrainOptionalProperties: (type?: TerrainType) => OptionalProperty[];
|
|
27
|
+
/** Ocean properties for a given water type and host. */
|
|
28
|
+
export declare const oceanSurfaceOptionalProperties: (type?: WaterType, host?: WaterHost) => OptionalProperty[];
|
|
29
|
+
export declare const oceanQualityOptionalProperties: OptionalProperty[];
|
|
30
|
+
export declare const terrainQualityOptionalProperties: OptionalProperty[];
|
|
31
|
+
export declare const landscapeOptionalProperties: (host?: LandscapeHost) => OptionalProperty[];
|
|
32
|
+
/** Height and slope rules for a generated splat. Only shown when splatSource is
|
|
33
|
+
* 'auto' — with authored maps they would do nothing, and a row that does nothing
|
|
34
|
+
* reads as a bug in the renderer. */
|
|
35
|
+
export declare const landscapeAutoSplatOptionalProperties: OptionalProperty[];
|
|
36
|
+
export declare const landscapeQualityOptionalProperties: OptionalProperty[];
|
|
37
|
+
/** One surface's rows. Hand-written rather than schema-driven because a surface
|
|
38
|
+
* is not a shader parameter block — it is a material, and its texture slots are
|
|
39
|
+
* rendered by the surface list itself. */
|
|
40
|
+
export declare const landscapeSurfaceOptionalProperties: OptionalProperty[];
|
|
41
|
+
export declare const textOptionalProperties: OptionalProperty[];
|
|
42
|
+
export declare const plainOptionalProperties: OptionalProperty[];
|
|
43
|
+
export declare const meshOptionalProperties: OptionalProperty[];
|
|
44
|
+
export declare const rainOptionalProperties: OptionalProperty[];
|
|
45
|
+
export declare const pathOptionalProperties: OptionalProperty[];
|
|
46
|
+
export declare const edgesOptionalProperties: OptionalProperty[];
|
|
47
|
+
export declare const fogOptionalProperties: OptionalProperty[];
|
|
48
|
+
export declare const starsOptionalProperties: OptionalProperty[];
|
|
49
|
+
export declare const shootingStarsOptionalProperties: OptionalProperty[];
|
|
50
|
+
export declare const hdrOptionalProperties: OptionalProperty[];
|
|
51
|
+
export declare const cloudsOptionalProperties: OptionalProperty[];
|
|
52
|
+
import { type CloudDeckType } from '../../environment/index';
|
|
53
|
+
/** Deck properties for a given type. Anvil and precipitation only appear on a storm. */
|
|
54
|
+
export declare const cloudDeckOptionalProperties: (deckType?: CloudDeckType) => OptionalProperty[];
|
|
55
|
+
export declare const cirrusOptionalProperties: OptionalProperty[];
|
|
56
|
+
export declare const thunderOptionalProperties: OptionalProperty[];
|
|
57
|
+
export declare const cloudQualityOptionalProperties: OptionalProperty[];
|
|
58
|
+
import type { GalleryLayout } from '../../types/gallery';
|
|
59
|
+
/** Defaults mirror getInitialLayoutSettings, so a row left blank by a previous
|
|
60
|
+
* layout still shows a sane starting value instead of disappearing. */
|
|
61
|
+
export declare const GALLERY_FIELD_DEFAULTS: Record<string, number>;
|
|
62
|
+
export declare const galleryCommonProperties: OptionalProperty[];
|
|
63
|
+
/** Only the layout-math fields the given layout actually reads (LayoutCreator). */
|
|
64
|
+
export declare const layoutFieldOptionalProperties: (layout: GalleryLayout) => OptionalProperty[];
|
|
65
|
+
/** Only the fields GalleryCreator.generateGallery actually reads for this layout. */
|
|
66
|
+
export declare const galleryLayoutOptionalProperties: (layout: GalleryLayout) => OptionalProperty[];
|
|
67
|
+
/** meshSettings.layout — the rows above the per-layout fields in the Transform tab. */
|
|
68
|
+
export declare const objectLayoutCommonProperties: OptionalProperty[];
|
|
69
|
+
export declare const environmentOptionalProperties: {
|
|
70
|
+
readonly sky: OptionalProperty[];
|
|
71
|
+
readonly ocean: OptionalProperty[];
|
|
72
|
+
readonly terrain: OptionalProperty[];
|
|
73
|
+
readonly text: OptionalProperty[];
|
|
74
|
+
readonly plain: OptionalProperty[];
|
|
75
|
+
readonly mesh: OptionalProperty[];
|
|
76
|
+
readonly rain: OptionalProperty[];
|
|
77
|
+
readonly fog: OptionalProperty[];
|
|
78
|
+
readonly stars: OptionalProperty[];
|
|
79
|
+
readonly hdr: OptionalProperty[];
|
|
80
|
+
readonly clouds: OptionalProperty[];
|
|
81
|
+
};
|
|
82
|
+
export type EnvironmentType = keyof typeof environmentOptionalProperties;
|
|
83
|
+
//# sourceMappingURL=optionalProperties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"optionalProperties.d.ts","sourceRoot":"","sources":["../../../src/properties/tables/optionalProperties.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IACnF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,gFAAgF;IAChF,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,uGAAuG;IACvG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;gFAC4E;IAC5E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,OAAO,CAAC,EAAE,OA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