@livo-tv/blocks 1.30.0 → 1.30.2
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/index.cjs +745 -545
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +745 -545
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2360,29 +2360,36 @@ var SHADER_LIGHT_TYPES = ["3d", "env"];
|
|
|
2360
2360
|
var SHADER_ENV_PRESETS = ["city", "dawn", "lobby"];
|
|
2361
2361
|
var SHADER_ON_OFF = ["on", "off"];
|
|
2362
2362
|
var SHADER_RANGE = ["enabled", "disabled"];
|
|
2363
|
-
var
|
|
2364
|
-
type: "plane",
|
|
2363
|
+
var PRESET_BASE = {
|
|
2365
2364
|
shader: "defaults",
|
|
2366
2365
|
animate: "on",
|
|
2367
|
-
uTime: 0,
|
|
2368
|
-
uSpeed: 0.4,
|
|
2369
|
-
uStrength: 2,
|
|
2370
|
-
uDensity: 1.2,
|
|
2371
|
-
uFrequency: 5.5,
|
|
2372
|
-
uAmplitude: 1,
|
|
2373
2366
|
wireframe: false,
|
|
2374
2367
|
loop: "on",
|
|
2375
2368
|
loopDuration: 10,
|
|
2376
2369
|
range: "disabled",
|
|
2377
2370
|
rangeStart: 0,
|
|
2378
|
-
rangeEnd:
|
|
2379
|
-
|
|
2371
|
+
rangeEnd: 40,
|
|
2372
|
+
fov: 45,
|
|
2373
|
+
zoomOut: false,
|
|
2374
|
+
grainBlending: 0.3,
|
|
2375
|
+
pixelDensity: 1
|
|
2376
|
+
};
|
|
2377
|
+
var DEFAULT_SHADER_CURTAIN_CONFIG = {
|
|
2378
|
+
...PRESET_BASE,
|
|
2379
|
+
type: "plane",
|
|
2380
|
+
uTime: 0,
|
|
2381
|
+
uSpeed: 0.4,
|
|
2382
|
+
uStrength: 4,
|
|
2383
|
+
uDensity: 1.3,
|
|
2384
|
+
uFrequency: 5.5,
|
|
2385
|
+
uAmplitude: 1,
|
|
2386
|
+
positionX: -1.4,
|
|
2380
2387
|
positionY: 0,
|
|
2381
2388
|
positionZ: 0,
|
|
2382
2389
|
rotationX: 0,
|
|
2383
|
-
rotationY:
|
|
2384
|
-
rotationZ:
|
|
2385
|
-
color1: "#
|
|
2390
|
+
rotationY: 10,
|
|
2391
|
+
rotationZ: 50,
|
|
2392
|
+
color1: "#ff5005",
|
|
2386
2393
|
color2: "#dbba95",
|
|
2387
2394
|
color3: "#d0bce1",
|
|
2388
2395
|
reflection: 0.1,
|
|
@@ -2391,13 +2398,9 @@ var DEFAULT_SHADER_CURTAIN_CONFIG = {
|
|
|
2391
2398
|
cPolarAngle: 90,
|
|
2392
2399
|
cDistance: 3.6,
|
|
2393
2400
|
cameraZoom: 1,
|
|
2394
|
-
fov: 45,
|
|
2395
|
-
zoomOut: false,
|
|
2396
2401
|
lightType: "3d",
|
|
2397
2402
|
envPreset: "city",
|
|
2398
|
-
grain: "
|
|
2399
|
-
grainBlending: 0.3,
|
|
2400
|
-
pixelDensity: 1
|
|
2403
|
+
grain: "on"
|
|
2401
2404
|
};
|
|
2402
2405
|
var SHADER_CURTAIN_PRESETS = [
|
|
2403
2406
|
{ id: "halo", title: "Halo", config: { ...DEFAULT_SHADER_CURTAIN_CONFIG } },
|
|
@@ -2405,52 +2408,127 @@ var SHADER_CURTAIN_PRESETS = [
|
|
|
2405
2408
|
id: "pensive",
|
|
2406
2409
|
title: "Pensive",
|
|
2407
2410
|
config: {
|
|
2408
|
-
...
|
|
2409
|
-
type: "
|
|
2411
|
+
...PRESET_BASE,
|
|
2412
|
+
type: "sphere",
|
|
2413
|
+
uTime: 0,
|
|
2414
|
+
uSpeed: 0.3,
|
|
2415
|
+
uStrength: 0.4,
|
|
2416
|
+
uDensity: 0.8,
|
|
2417
|
+
uFrequency: 5.5,
|
|
2418
|
+
uAmplitude: 7,
|
|
2419
|
+
positionX: 0,
|
|
2420
|
+
positionY: 0,
|
|
2421
|
+
positionZ: 0,
|
|
2422
|
+
rotationX: 0,
|
|
2423
|
+
rotationY: 0,
|
|
2424
|
+
rotationZ: 140,
|
|
2410
2425
|
color1: "#809bd6",
|
|
2411
2426
|
color2: "#910aff",
|
|
2412
2427
|
color3: "#af38ff",
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2428
|
+
reflection: 0.5,
|
|
2429
|
+
brightness: 1.5,
|
|
2430
|
+
cAzimuthAngle: 250,
|
|
2431
|
+
cPolarAngle: 140,
|
|
2432
|
+
cDistance: 1.5,
|
|
2433
|
+
cameraZoom: 12.5,
|
|
2434
|
+
lightType: "3d",
|
|
2435
|
+
envPreset: "city",
|
|
2436
|
+
grain: "on"
|
|
2416
2437
|
}
|
|
2417
2438
|
},
|
|
2418
2439
|
{
|
|
2419
2440
|
id: "mint",
|
|
2420
2441
|
title: "Mint",
|
|
2421
2442
|
config: {
|
|
2422
|
-
...
|
|
2443
|
+
...PRESET_BASE,
|
|
2423
2444
|
type: "waterPlane",
|
|
2424
|
-
|
|
2425
|
-
color2: "#ffcc81",
|
|
2426
|
-
color3: "#c9f5d3",
|
|
2445
|
+
uTime: 0,
|
|
2427
2446
|
uSpeed: 0.2,
|
|
2428
|
-
uStrength:
|
|
2447
|
+
uStrength: 3.4,
|
|
2448
|
+
uDensity: 1.2,
|
|
2449
|
+
uFrequency: 0,
|
|
2450
|
+
uAmplitude: 0,
|
|
2451
|
+
positionX: 0,
|
|
2452
|
+
positionY: 0.9,
|
|
2453
|
+
positionZ: -0.3,
|
|
2454
|
+
rotationX: 45,
|
|
2455
|
+
rotationY: 0,
|
|
2456
|
+
rotationZ: 0,
|
|
2457
|
+
color1: "#94ffd1",
|
|
2458
|
+
color2: "#6bf5ff",
|
|
2459
|
+
color3: "#ffffff",
|
|
2460
|
+
reflection: 0.1,
|
|
2461
|
+
brightness: 1.2,
|
|
2462
|
+
cAzimuthAngle: 170,
|
|
2463
|
+
cPolarAngle: 70,
|
|
2464
|
+
cDistance: 4.4,
|
|
2465
|
+
cameraZoom: 1,
|
|
2466
|
+
lightType: "3d",
|
|
2467
|
+
envPreset: "city",
|
|
2468
|
+
grain: "off"
|
|
2429
2469
|
}
|
|
2430
2470
|
},
|
|
2431
2471
|
{
|
|
2432
2472
|
id: "interstella",
|
|
2433
2473
|
title: "Interstella",
|
|
2434
2474
|
config: {
|
|
2435
|
-
...
|
|
2475
|
+
...PRESET_BASE,
|
|
2436
2476
|
type: "sphere",
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
uDensity:
|
|
2441
|
-
|
|
2442
|
-
|
|
2477
|
+
uTime: 0,
|
|
2478
|
+
uSpeed: 0.3,
|
|
2479
|
+
uStrength: 0.3,
|
|
2480
|
+
uDensity: 0.8,
|
|
2481
|
+
uFrequency: 5.5,
|
|
2482
|
+
uAmplitude: 3.2,
|
|
2483
|
+
positionX: -0.1,
|
|
2484
|
+
positionY: 0,
|
|
2485
|
+
positionZ: 0,
|
|
2486
|
+
rotationX: 0,
|
|
2487
|
+
rotationY: 130,
|
|
2488
|
+
rotationZ: 70,
|
|
2489
|
+
color1: "#73bfc4",
|
|
2490
|
+
color2: "#ff810a",
|
|
2491
|
+
color3: "#8da0ce",
|
|
2492
|
+
reflection: 0.4,
|
|
2493
|
+
brightness: 0.8,
|
|
2494
|
+
cAzimuthAngle: 270,
|
|
2495
|
+
cPolarAngle: 180,
|
|
2496
|
+
cDistance: 0.5,
|
|
2497
|
+
cameraZoom: 15.1,
|
|
2498
|
+
lightType: "env",
|
|
2499
|
+
envPreset: "city",
|
|
2500
|
+
grain: "on"
|
|
2443
2501
|
}
|
|
2444
2502
|
},
|
|
2445
2503
|
{
|
|
2446
2504
|
id: "nightyNight",
|
|
2447
2505
|
title: "Nighty night",
|
|
2448
2506
|
config: {
|
|
2449
|
-
...
|
|
2507
|
+
...PRESET_BASE,
|
|
2450
2508
|
type: "waterPlane",
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2509
|
+
uTime: 8,
|
|
2510
|
+
uSpeed: 0.3,
|
|
2511
|
+
uStrength: 1.5,
|
|
2512
|
+
uDensity: 1.5,
|
|
2513
|
+
uFrequency: 0,
|
|
2514
|
+
uAmplitude: 0,
|
|
2515
|
+
positionX: 0,
|
|
2516
|
+
positionY: 0,
|
|
2517
|
+
positionZ: 0,
|
|
2518
|
+
rotationX: 50,
|
|
2519
|
+
rotationY: 0,
|
|
2520
|
+
rotationZ: -60,
|
|
2521
|
+
color1: "#606080",
|
|
2522
|
+
color2: "#8d7dca",
|
|
2523
|
+
color3: "#212121",
|
|
2524
|
+
reflection: 0.1,
|
|
2525
|
+
brightness: 1,
|
|
2526
|
+
cAzimuthAngle: 180,
|
|
2527
|
+
cPolarAngle: 80,
|
|
2528
|
+
cDistance: 2.8,
|
|
2529
|
+
cameraZoom: 9.1,
|
|
2530
|
+
lightType: "3d",
|
|
2531
|
+
envPreset: "city",
|
|
2454
2532
|
grain: "on"
|
|
2455
2533
|
}
|
|
2456
2534
|
},
|
|
@@ -2458,67 +2536,160 @@ var SHADER_CURTAIN_PRESETS = [
|
|
|
2458
2536
|
id: "violaOrientalis",
|
|
2459
2537
|
title: "Viola orientalis",
|
|
2460
2538
|
config: {
|
|
2461
|
-
...
|
|
2462
|
-
type: "
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2539
|
+
...PRESET_BASE,
|
|
2540
|
+
type: "sphere",
|
|
2541
|
+
uTime: 0,
|
|
2542
|
+
uSpeed: 0.1,
|
|
2543
|
+
uStrength: 1,
|
|
2544
|
+
uDensity: 1.1,
|
|
2545
|
+
uFrequency: 5.5,
|
|
2546
|
+
uAmplitude: 1.4,
|
|
2547
|
+
positionX: 0,
|
|
2548
|
+
positionY: 0,
|
|
2549
|
+
positionZ: 0,
|
|
2550
|
+
rotationX: 0,
|
|
2551
|
+
rotationY: 0,
|
|
2552
|
+
rotationZ: 0,
|
|
2553
|
+
color1: "#ffffff",
|
|
2554
|
+
color2: "#ffbb00",
|
|
2555
|
+
color3: "#0700ff",
|
|
2556
|
+
reflection: 0.1,
|
|
2557
|
+
brightness: 1.1,
|
|
2558
|
+
cAzimuthAngle: 0,
|
|
2559
|
+
cPolarAngle: 140,
|
|
2560
|
+
cDistance: 7.1,
|
|
2561
|
+
cameraZoom: 17.3,
|
|
2562
|
+
lightType: "3d",
|
|
2563
|
+
envPreset: "city",
|
|
2564
|
+
grain: "off"
|
|
2467
2565
|
}
|
|
2468
2566
|
},
|
|
2469
2567
|
{
|
|
2470
2568
|
id: "universe",
|
|
2471
2569
|
title: "Universe",
|
|
2472
2570
|
config: {
|
|
2473
|
-
...
|
|
2571
|
+
...PRESET_BASE,
|
|
2474
2572
|
type: "waterPlane",
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
uDensity:
|
|
2479
|
-
|
|
2480
|
-
|
|
2573
|
+
uTime: 0.2,
|
|
2574
|
+
uSpeed: 0.1,
|
|
2575
|
+
uStrength: 2.4,
|
|
2576
|
+
uDensity: 1.1,
|
|
2577
|
+
uFrequency: 5.5,
|
|
2578
|
+
uAmplitude: 0,
|
|
2579
|
+
positionX: -0.5,
|
|
2580
|
+
positionY: 0.1,
|
|
2581
|
+
positionZ: 0,
|
|
2582
|
+
rotationX: 0,
|
|
2583
|
+
rotationY: 0,
|
|
2584
|
+
rotationZ: 235,
|
|
2585
|
+
color1: "#5606ff",
|
|
2586
|
+
color2: "#fe8989",
|
|
2587
|
+
color3: "#000000",
|
|
2588
|
+
reflection: 0.1,
|
|
2589
|
+
brightness: 1.1,
|
|
2590
|
+
cAzimuthAngle: 180,
|
|
2591
|
+
cPolarAngle: 115,
|
|
2592
|
+
cDistance: 3.9,
|
|
2593
|
+
cameraZoom: 1,
|
|
2594
|
+
lightType: "3d",
|
|
2595
|
+
envPreset: "city",
|
|
2596
|
+
grain: "off"
|
|
2481
2597
|
}
|
|
2482
2598
|
},
|
|
2483
2599
|
{
|
|
2484
2600
|
id: "sunset",
|
|
2485
2601
|
title: "Sunset",
|
|
2486
2602
|
config: {
|
|
2487
|
-
...
|
|
2488
|
-
type: "
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2603
|
+
...PRESET_BASE,
|
|
2604
|
+
type: "sphere",
|
|
2605
|
+
uTime: 0,
|
|
2606
|
+
uSpeed: 0.1,
|
|
2607
|
+
uStrength: 0.4,
|
|
2608
|
+
uDensity: 1.1,
|
|
2609
|
+
uFrequency: 5.5,
|
|
2610
|
+
uAmplitude: 1.4,
|
|
2611
|
+
positionX: 0,
|
|
2612
|
+
positionY: -0.15,
|
|
2613
|
+
positionZ: 0,
|
|
2614
|
+
rotationX: 0,
|
|
2615
|
+
rotationY: 0,
|
|
2616
|
+
rotationZ: 0,
|
|
2617
|
+
color1: "#ff7a33",
|
|
2618
|
+
color2: "#33a0ff",
|
|
2619
|
+
color3: "#ffc53d",
|
|
2620
|
+
reflection: 0.1,
|
|
2621
|
+
brightness: 1.5,
|
|
2622
|
+
cAzimuthAngle: 60,
|
|
2623
|
+
cPolarAngle: 90,
|
|
2624
|
+
cDistance: 7.1,
|
|
2625
|
+
cameraZoom: 15.3,
|
|
2626
|
+
lightType: "3d",
|
|
2627
|
+
envPreset: "dawn",
|
|
2628
|
+
grain: "off"
|
|
2494
2629
|
}
|
|
2495
2630
|
},
|
|
2496
2631
|
{
|
|
2497
2632
|
id: "mandarin",
|
|
2498
2633
|
title: "Mandarin",
|
|
2499
2634
|
config: {
|
|
2500
|
-
...
|
|
2501
|
-
type: "
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2635
|
+
...PRESET_BASE,
|
|
2636
|
+
type: "waterPlane",
|
|
2637
|
+
uTime: 0.2,
|
|
2638
|
+
uSpeed: 0.2,
|
|
2639
|
+
uStrength: 3,
|
|
2640
|
+
uDensity: 1.8,
|
|
2641
|
+
uFrequency: 5.5,
|
|
2642
|
+
uAmplitude: 0,
|
|
2643
|
+
positionX: 0,
|
|
2644
|
+
positionY: -2.1,
|
|
2645
|
+
positionZ: 0,
|
|
2646
|
+
rotationX: 0,
|
|
2647
|
+
rotationY: 0,
|
|
2648
|
+
rotationZ: 225,
|
|
2649
|
+
color1: "#ff6a1a",
|
|
2650
|
+
color2: "#c73c00",
|
|
2651
|
+
color3: "#fd4912",
|
|
2652
|
+
reflection: 0.1,
|
|
2653
|
+
brightness: 1.2,
|
|
2654
|
+
cAzimuthAngle: 180,
|
|
2655
|
+
cPolarAngle: 95,
|
|
2656
|
+
cDistance: 2.4,
|
|
2657
|
+
cameraZoom: 1,
|
|
2658
|
+
lightType: "3d",
|
|
2659
|
+
envPreset: "city",
|
|
2660
|
+
grain: "off"
|
|
2509
2661
|
}
|
|
2510
2662
|
},
|
|
2511
2663
|
{
|
|
2512
2664
|
id: "cottonCandy",
|
|
2513
2665
|
title: "Cotton candy",
|
|
2514
2666
|
config: {
|
|
2515
|
-
...
|
|
2516
|
-
type: "
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2667
|
+
...PRESET_BASE,
|
|
2668
|
+
type: "waterPlane",
|
|
2669
|
+
uTime: 0.2,
|
|
2670
|
+
uSpeed: 0.3,
|
|
2671
|
+
uStrength: 3,
|
|
2672
|
+
uDensity: 1,
|
|
2673
|
+
uFrequency: 5.5,
|
|
2674
|
+
uAmplitude: 0,
|
|
2675
|
+
positionX: 0,
|
|
2676
|
+
positionY: 1.8,
|
|
2677
|
+
positionZ: 0,
|
|
2678
|
+
rotationX: 0,
|
|
2679
|
+
rotationY: 0,
|
|
2680
|
+
rotationZ: -90,
|
|
2681
|
+
color1: "#ebedff",
|
|
2682
|
+
color2: "#f3f2f8",
|
|
2683
|
+
color3: "#dbf8ff",
|
|
2684
|
+
reflection: 0.1,
|
|
2685
|
+
brightness: 1.2,
|
|
2686
|
+
cAzimuthAngle: 180,
|
|
2687
|
+
cPolarAngle: 120,
|
|
2688
|
+
cDistance: 2.9,
|
|
2689
|
+
cameraZoom: 1,
|
|
2690
|
+
lightType: "3d",
|
|
2691
|
+
envPreset: "city",
|
|
2692
|
+
grain: "off"
|
|
2522
2693
|
}
|
|
2523
2694
|
}
|
|
2524
2695
|
];
|
|
@@ -2601,9 +2772,9 @@ function parseShaderGradientUrl(input) {
|
|
|
2601
2772
|
positionX: numberParam(q.get("positionX"), base.positionX, -20, 20),
|
|
2602
2773
|
positionY: numberParam(q.get("positionY"), base.positionY, -20, 20),
|
|
2603
2774
|
positionZ: numberParam(q.get("positionZ"), base.positionZ, -20, 20),
|
|
2604
|
-
rotationX: numberParam(q.get("rotationX"), base.rotationX,
|
|
2605
|
-
rotationY: numberParam(q.get("rotationY"), base.rotationY,
|
|
2606
|
-
rotationZ: numberParam(q.get("rotationZ"), base.rotationZ,
|
|
2775
|
+
rotationX: numberParam(q.get("rotationX"), base.rotationX, -360, 360),
|
|
2776
|
+
rotationY: numberParam(q.get("rotationY"), base.rotationY, -360, 360),
|
|
2777
|
+
rotationZ: numberParam(q.get("rotationZ"), base.rotationZ, -360, 360),
|
|
2607
2778
|
color1: hexParam(q.get("color1"), base.color1),
|
|
2608
2779
|
color2: hexParam(q.get("color2"), base.color2),
|
|
2609
2780
|
color3: hexParam(q.get("color3"), base.color3),
|
|
@@ -2713,57 +2884,66 @@ function ShaderCurtain({
|
|
|
2713
2884
|
}
|
|
2714
2885
|
const { ShaderGradientCanvas, ShaderGradient } = module;
|
|
2715
2886
|
const animate = resolved.animate === "off" || reducedMotion ? "off" : "on";
|
|
2716
|
-
return /* @__PURE__ */ jsx(
|
|
2717
|
-
|
|
2887
|
+
return /* @__PURE__ */ jsx(
|
|
2888
|
+
"div",
|
|
2718
2889
|
{
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
ShaderGradient,
|
|
2890
|
+
className: cn(
|
|
2891
|
+
"relative h-full w-full overflow-hidden [container-type:size]",
|
|
2892
|
+
className
|
|
2893
|
+
),
|
|
2894
|
+
children: /* @__PURE__ */ jsx("div", { className: "absolute top-1/2 left-1/2 h-[max(100cqh,56.25cqw)] w-[max(100cqw,177.778cqh)] -translate-x-1/2 -translate-y-1/2", children: /* @__PURE__ */ jsx(
|
|
2895
|
+
ShaderGradientCanvas,
|
|
2726
2896
|
{
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2897
|
+
style: { position: "absolute", inset: 0 },
|
|
2898
|
+
pixelDensity: resolved.pixelDensity,
|
|
2899
|
+
fov: resolved.fov,
|
|
2900
|
+
envBasePath,
|
|
2901
|
+
preserveDrawingBuffer,
|
|
2902
|
+
children: /* @__PURE__ */ jsx(
|
|
2903
|
+
ShaderGradient,
|
|
2904
|
+
{
|
|
2905
|
+
control: "props",
|
|
2906
|
+
type: resolved.type,
|
|
2907
|
+
shader: resolved.shader,
|
|
2908
|
+
animate,
|
|
2909
|
+
uTime: resolved.uTime,
|
|
2910
|
+
uSpeed: resolved.uSpeed,
|
|
2911
|
+
uStrength: resolved.uStrength,
|
|
2912
|
+
uDensity: resolved.uDensity,
|
|
2913
|
+
uFrequency: resolved.uFrequency,
|
|
2914
|
+
uAmplitude: resolved.uAmplitude,
|
|
2915
|
+
wireframe: resolved.wireframe,
|
|
2916
|
+
loop: resolved.loop,
|
|
2917
|
+
loopDuration: resolved.loopDuration,
|
|
2918
|
+
range: resolved.range,
|
|
2919
|
+
rangeStart: resolved.rangeStart,
|
|
2920
|
+
rangeEnd: resolved.rangeEnd,
|
|
2921
|
+
positionX: resolved.positionX,
|
|
2922
|
+
positionY: resolved.positionY,
|
|
2923
|
+
positionZ: resolved.positionZ,
|
|
2924
|
+
rotationX: resolved.rotationX,
|
|
2925
|
+
rotationY: resolved.rotationY,
|
|
2926
|
+
rotationZ: resolved.rotationZ,
|
|
2927
|
+
color1: resolved.color1,
|
|
2928
|
+
color2: resolved.color2,
|
|
2929
|
+
color3: resolved.color3,
|
|
2930
|
+
reflection: resolved.reflection,
|
|
2931
|
+
brightness: resolved.brightness,
|
|
2932
|
+
cAzimuthAngle: resolved.cAzimuthAngle,
|
|
2933
|
+
cPolarAngle: resolved.cPolarAngle,
|
|
2934
|
+
cDistance: resolved.cDistance,
|
|
2935
|
+
cameraZoom: resolved.cameraZoom,
|
|
2936
|
+
zoomOut: resolved.zoomOut,
|
|
2937
|
+
lightType: resolved.lightType,
|
|
2938
|
+
envPreset: resolved.envPreset,
|
|
2939
|
+
grain: resolved.grain,
|
|
2940
|
+
grainBlending: resolved.grainBlending
|
|
2941
|
+
}
|
|
2942
|
+
)
|
|
2763
2943
|
}
|
|
2764
|
-
)
|
|
2944
|
+
) })
|
|
2765
2945
|
}
|
|
2766
|
-
)
|
|
2946
|
+
);
|
|
2767
2947
|
}
|
|
2768
2948
|
var DEFAULT_LABELS2 = {
|
|
2769
2949
|
play: "Play",
|
|
@@ -3646,29 +3826,42 @@ function NumberField({
|
|
|
3646
3826
|
step,
|
|
3647
3827
|
onChange
|
|
3648
3828
|
}) {
|
|
3649
|
-
|
|
3650
|
-
|
|
3829
|
+
const rangeId = React11.useId();
|
|
3830
|
+
return /* @__PURE__ */ jsxs("div", { className: "grid min-w-0 gap-1 text-xs", children: [
|
|
3831
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
3832
|
+
/* @__PURE__ */ jsx(
|
|
3833
|
+
"label",
|
|
3834
|
+
{
|
|
3835
|
+
htmlFor: rangeId,
|
|
3836
|
+
className: "text-muted-foreground min-w-0 truncate",
|
|
3837
|
+
children: label
|
|
3838
|
+
}
|
|
3839
|
+
),
|
|
3840
|
+
/* @__PURE__ */ jsx(
|
|
3841
|
+
"input",
|
|
3842
|
+
{
|
|
3843
|
+
type: "number",
|
|
3844
|
+
min,
|
|
3845
|
+
max,
|
|
3846
|
+
step,
|
|
3847
|
+
value,
|
|
3848
|
+
"aria-label": label,
|
|
3849
|
+
onChange: (event) => onChange(Number(event.target.value)),
|
|
3850
|
+
className: "border-input bg-background w-14 shrink-0 rounded-md border px-1.5 py-0.5 text-right tabular-nums"
|
|
3851
|
+
}
|
|
3852
|
+
)
|
|
3853
|
+
] }),
|
|
3651
3854
|
/* @__PURE__ */ jsx(
|
|
3652
3855
|
"input",
|
|
3653
3856
|
{
|
|
3857
|
+
id: rangeId,
|
|
3654
3858
|
type: "range",
|
|
3655
3859
|
min,
|
|
3656
3860
|
max,
|
|
3657
3861
|
step,
|
|
3658
3862
|
value,
|
|
3659
|
-
onChange: (event) => onChange(Number(event.target.value))
|
|
3660
|
-
}
|
|
3661
|
-
),
|
|
3662
|
-
/* @__PURE__ */ jsx(
|
|
3663
|
-
"input",
|
|
3664
|
-
{
|
|
3665
|
-
type: "number",
|
|
3666
|
-
min,
|
|
3667
|
-
max,
|
|
3668
|
-
step,
|
|
3669
|
-
value,
|
|
3670
3863
|
onChange: (event) => onChange(Number(event.target.value)),
|
|
3671
|
-
className: "
|
|
3864
|
+
className: "w-full min-w-0"
|
|
3672
3865
|
}
|
|
3673
3866
|
)
|
|
3674
3867
|
] });
|
|
@@ -3679,14 +3872,14 @@ function SelectField({
|
|
|
3679
3872
|
options,
|
|
3680
3873
|
onChange
|
|
3681
3874
|
}) {
|
|
3682
|
-
return /* @__PURE__ */ jsxs("label", { className: "grid gap-1 text-xs", children: [
|
|
3683
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: label }),
|
|
3875
|
+
return /* @__PURE__ */ jsxs("label", { className: "grid min-w-0 gap-1 text-xs", children: [
|
|
3876
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground truncate", children: label }),
|
|
3684
3877
|
/* @__PURE__ */ jsx(
|
|
3685
3878
|
"select",
|
|
3686
3879
|
{
|
|
3687
3880
|
value,
|
|
3688
3881
|
onChange: (event) => onChange(event.target.value),
|
|
3689
|
-
className: "border-input bg-background rounded-md border px-2 py-1",
|
|
3882
|
+
className: "border-input bg-background min-w-0 w-full rounded-md border px-2 py-1",
|
|
3690
3883
|
children: options.map((option) => /* @__PURE__ */ jsx("option", { value: option, children: option }, option))
|
|
3691
3884
|
}
|
|
3692
3885
|
)
|
|
@@ -3755,13 +3948,16 @@ var ShaderCurtainEditor = React11.forwardRef(function ShaderCurtainEditor2({ val
|
|
|
3755
3948
|
return /* @__PURE__ */ jsxs(
|
|
3756
3949
|
"div",
|
|
3757
3950
|
{
|
|
3758
|
-
className: cn(
|
|
3951
|
+
className: cn(
|
|
3952
|
+
"grid min-h-0 gap-4 md:grid-cols-2 md:items-start",
|
|
3953
|
+
className
|
|
3954
|
+
),
|
|
3759
3955
|
children: [
|
|
3760
3956
|
/* @__PURE__ */ jsx(
|
|
3761
3957
|
"div",
|
|
3762
3958
|
{
|
|
3763
3959
|
ref: previewRef,
|
|
3764
|
-
className: "relative aspect-video overflow-hidden rounded-lg bg-zinc-950",
|
|
3960
|
+
className: "relative aspect-video overflow-hidden rounded-lg bg-zinc-950 md:sticky md:top-0",
|
|
3765
3961
|
children: /* @__PURE__ */ jsx(
|
|
3766
3962
|
ShaderCurtain,
|
|
3767
3963
|
{
|
|
@@ -3773,7 +3969,7 @@ var ShaderCurtainEditor = React11.forwardRef(function ShaderCurtainEditor2({ val
|
|
|
3773
3969
|
)
|
|
3774
3970
|
}
|
|
3775
3971
|
),
|
|
3776
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
3972
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-col gap-3", children: [
|
|
3777
3973
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: [
|
|
3778
3974
|
["shape", copy.shape],
|
|
3779
3975
|
["colors", copy.colors],
|
|
@@ -3790,396 +3986,398 @@ var ShaderCurtainEditor = React11.forwardRef(function ShaderCurtainEditor2({ val
|
|
|
3790
3986
|
},
|
|
3791
3987
|
id
|
|
3792
3988
|
)) }),
|
|
3793
|
-
|
|
3794
|
-
/* @__PURE__ */
|
|
3795
|
-
SelectField,
|
|
3796
|
-
{
|
|
3797
|
-
label: "Type",
|
|
3798
|
-
value: config.type,
|
|
3799
|
-
options: SHADER_CURTAIN_TYPES,
|
|
3800
|
-
onChange: (type) => update({ type })
|
|
3801
|
-
}
|
|
3802
|
-
),
|
|
3803
|
-
/* @__PURE__ */ jsx(
|
|
3804
|
-
SelectField,
|
|
3805
|
-
{
|
|
3806
|
-
label: "Shader",
|
|
3807
|
-
value: config.shader,
|
|
3808
|
-
options: SHADER_VARIANTS,
|
|
3809
|
-
onChange: (shader) => update({ shader })
|
|
3810
|
-
}
|
|
3811
|
-
),
|
|
3812
|
-
/* @__PURE__ */ jsx(
|
|
3813
|
-
SelectField,
|
|
3814
|
-
{
|
|
3815
|
-
label: "Animate",
|
|
3816
|
-
value: config.animate,
|
|
3817
|
-
options: ["on", "off"],
|
|
3818
|
-
onChange: (animate) => update({ animate })
|
|
3819
|
-
}
|
|
3820
|
-
),
|
|
3821
|
-
/* @__PURE__ */ jsx(
|
|
3822
|
-
SelectField,
|
|
3823
|
-
{
|
|
3824
|
-
label: "Loop",
|
|
3825
|
-
value: config.loop,
|
|
3826
|
-
options: ["on", "off"],
|
|
3827
|
-
onChange: (loop) => update({ loop })
|
|
3828
|
-
}
|
|
3829
|
-
),
|
|
3830
|
-
/* @__PURE__ */ jsx(
|
|
3831
|
-
NumberField,
|
|
3832
|
-
{
|
|
3833
|
-
label: "Speed",
|
|
3834
|
-
value: config.uSpeed,
|
|
3835
|
-
min: 0,
|
|
3836
|
-
max: 4,
|
|
3837
|
-
step: 0.05,
|
|
3838
|
-
onChange: (uSpeed) => update({ uSpeed })
|
|
3839
|
-
}
|
|
3840
|
-
),
|
|
3841
|
-
/* @__PURE__ */ jsx(
|
|
3842
|
-
NumberField,
|
|
3843
|
-
{
|
|
3844
|
-
label: "Strength",
|
|
3845
|
-
value: config.uStrength,
|
|
3846
|
-
min: 0,
|
|
3847
|
-
max: 10,
|
|
3848
|
-
step: 0.1,
|
|
3849
|
-
onChange: (uStrength) => update({ uStrength })
|
|
3850
|
-
}
|
|
3851
|
-
),
|
|
3852
|
-
/* @__PURE__ */ jsx(
|
|
3853
|
-
NumberField,
|
|
3854
|
-
{
|
|
3855
|
-
label: "Density",
|
|
3856
|
-
value: config.uDensity,
|
|
3857
|
-
min: 0,
|
|
3858
|
-
max: 8,
|
|
3859
|
-
step: 0.1,
|
|
3860
|
-
onChange: (uDensity) => update({ uDensity })
|
|
3861
|
-
}
|
|
3862
|
-
),
|
|
3863
|
-
/* @__PURE__ */ jsx(
|
|
3864
|
-
NumberField,
|
|
3865
|
-
{
|
|
3866
|
-
label: "Frequency",
|
|
3867
|
-
value: config.uFrequency,
|
|
3868
|
-
min: 0,
|
|
3869
|
-
max: 12,
|
|
3870
|
-
step: 0.1,
|
|
3871
|
-
onChange: (uFrequency) => update({ uFrequency })
|
|
3872
|
-
}
|
|
3873
|
-
),
|
|
3874
|
-
/* @__PURE__ */ jsx(
|
|
3875
|
-
NumberField,
|
|
3876
|
-
{
|
|
3877
|
-
label: "Amplitude",
|
|
3878
|
-
value: config.uAmplitude,
|
|
3879
|
-
min: 0,
|
|
3880
|
-
max: 8,
|
|
3881
|
-
step: 0.1,
|
|
3882
|
-
onChange: (uAmplitude) => update({ uAmplitude })
|
|
3883
|
-
}
|
|
3884
|
-
),
|
|
3885
|
-
/* @__PURE__ */ jsx(
|
|
3886
|
-
NumberField,
|
|
3887
|
-
{
|
|
3888
|
-
label: "Time",
|
|
3889
|
-
value: config.uTime,
|
|
3890
|
-
min: 0,
|
|
3891
|
-
max: 40,
|
|
3892
|
-
step: 0.1,
|
|
3893
|
-
onChange: (uTime) => update({ uTime })
|
|
3894
|
-
}
|
|
3895
|
-
),
|
|
3896
|
-
/* @__PURE__ */ jsx(
|
|
3897
|
-
NumberField,
|
|
3898
|
-
{
|
|
3899
|
-
label: "Loop duration",
|
|
3900
|
-
value: config.loopDuration,
|
|
3901
|
-
min: 1,
|
|
3902
|
-
max: 60,
|
|
3903
|
-
step: 1,
|
|
3904
|
-
onChange: (loopDuration) => update({ loopDuration })
|
|
3905
|
-
}
|
|
3906
|
-
),
|
|
3907
|
-
/* @__PURE__ */ jsx(
|
|
3908
|
-
SelectField,
|
|
3909
|
-
{
|
|
3910
|
-
label: "Range",
|
|
3911
|
-
value: config.range,
|
|
3912
|
-
options: ["enabled", "disabled"],
|
|
3913
|
-
onChange: (range) => update({ range })
|
|
3914
|
-
}
|
|
3915
|
-
),
|
|
3916
|
-
/* @__PURE__ */ jsx(
|
|
3917
|
-
NumberField,
|
|
3918
|
-
{
|
|
3919
|
-
label: "Range start",
|
|
3920
|
-
value: config.rangeStart,
|
|
3921
|
-
min: 0,
|
|
3922
|
-
max: 40,
|
|
3923
|
-
step: 0.1,
|
|
3924
|
-
onChange: (rangeStart) => update({ rangeStart })
|
|
3925
|
-
}
|
|
3926
|
-
),
|
|
3927
|
-
/* @__PURE__ */ jsx(
|
|
3928
|
-
NumberField,
|
|
3929
|
-
{
|
|
3930
|
-
label: "Range end",
|
|
3931
|
-
value: config.rangeEnd,
|
|
3932
|
-
min: 0,
|
|
3933
|
-
max: 40,
|
|
3934
|
-
step: 0.1,
|
|
3935
|
-
onChange: (rangeEnd) => update({ rangeEnd })
|
|
3936
|
-
}
|
|
3937
|
-
),
|
|
3938
|
-
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 text-xs", children: [
|
|
3989
|
+
/* @__PURE__ */ jsxs("div", { className: "min-h-0 max-h-[min(22rem,40dvh)] overflow-x-hidden overflow-y-auto pr-1", children: [
|
|
3990
|
+
tab === "shape" ? /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
3939
3991
|
/* @__PURE__ */ jsx(
|
|
3940
|
-
|
|
3992
|
+
SelectField,
|
|
3941
3993
|
{
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3994
|
+
label: "Type",
|
|
3995
|
+
value: config.type,
|
|
3996
|
+
options: SHADER_CURTAIN_TYPES,
|
|
3997
|
+
onChange: (type) => update({ type })
|
|
3945
3998
|
}
|
|
3946
3999
|
),
|
|
3947
|
-
"Wireframe"
|
|
3948
|
-
] })
|
|
3949
|
-
] }) : null,
|
|
3950
|
-
tab === "colors" ? /* @__PURE__ */ jsxs("div", { className: "grid gap-3", children: [
|
|
3951
|
-
/* @__PURE__ */ jsx(
|
|
3952
|
-
ColorField,
|
|
3953
|
-
{
|
|
3954
|
-
label: "Color 1",
|
|
3955
|
-
value: config.color1,
|
|
3956
|
-
onChange: (color1) => update({ color1 })
|
|
3957
|
-
}
|
|
3958
|
-
),
|
|
3959
|
-
/* @__PURE__ */ jsx(
|
|
3960
|
-
ColorField,
|
|
3961
|
-
{
|
|
3962
|
-
label: "Color 2",
|
|
3963
|
-
value: config.color2,
|
|
3964
|
-
onChange: (color2) => update({ color2 })
|
|
3965
|
-
}
|
|
3966
|
-
),
|
|
3967
|
-
/* @__PURE__ */ jsx(
|
|
3968
|
-
ColorField,
|
|
3969
|
-
{
|
|
3970
|
-
label: "Color 3",
|
|
3971
|
-
value: config.color3,
|
|
3972
|
-
onChange: (color3) => update({ color3 })
|
|
3973
|
-
}
|
|
3974
|
-
),
|
|
3975
|
-
/* @__PURE__ */ jsx(
|
|
3976
|
-
NumberField,
|
|
3977
|
-
{
|
|
3978
|
-
label: "Reflection",
|
|
3979
|
-
value: config.reflection,
|
|
3980
|
-
min: 0,
|
|
3981
|
-
max: 1,
|
|
3982
|
-
step: 0.05,
|
|
3983
|
-
onChange: (reflection) => update({ reflection })
|
|
3984
|
-
}
|
|
3985
|
-
),
|
|
3986
|
-
/* @__PURE__ */ jsx(
|
|
3987
|
-
NumberField,
|
|
3988
|
-
{
|
|
3989
|
-
label: "Brightness",
|
|
3990
|
-
value: config.brightness,
|
|
3991
|
-
min: 0,
|
|
3992
|
-
max: 4,
|
|
3993
|
-
step: 0.05,
|
|
3994
|
-
onChange: (brightness) => update({ brightness })
|
|
3995
|
-
}
|
|
3996
|
-
)
|
|
3997
|
-
] }) : null,
|
|
3998
|
-
tab === "light" ? /* @__PURE__ */ jsxs("div", { className: "grid gap-3", children: [
|
|
3999
|
-
/* @__PURE__ */ jsx(
|
|
4000
|
-
SelectField,
|
|
4001
|
-
{
|
|
4002
|
-
label: "Light",
|
|
4003
|
-
value: config.lightType,
|
|
4004
|
-
options: SHADER_LIGHT_TYPES,
|
|
4005
|
-
onChange: (lightType) => update({ lightType })
|
|
4006
|
-
}
|
|
4007
|
-
),
|
|
4008
|
-
/* @__PURE__ */ jsx(
|
|
4009
|
-
SelectField,
|
|
4010
|
-
{
|
|
4011
|
-
label: "Environment",
|
|
4012
|
-
value: config.envPreset,
|
|
4013
|
-
options: SHADER_ENV_PRESETS,
|
|
4014
|
-
onChange: (envPreset) => update({ envPreset })
|
|
4015
|
-
}
|
|
4016
|
-
),
|
|
4017
|
-
/* @__PURE__ */ jsx(
|
|
4018
|
-
SelectField,
|
|
4019
|
-
{
|
|
4020
|
-
label: "Grain",
|
|
4021
|
-
value: config.grain,
|
|
4022
|
-
options: ["on", "off"],
|
|
4023
|
-
onChange: (grain) => update({ grain })
|
|
4024
|
-
}
|
|
4025
|
-
),
|
|
4026
|
-
/* @__PURE__ */ jsx(
|
|
4027
|
-
NumberField,
|
|
4028
|
-
{
|
|
4029
|
-
label: "Grain blending",
|
|
4030
|
-
value: config.grainBlending,
|
|
4031
|
-
min: 0,
|
|
4032
|
-
max: 1,
|
|
4033
|
-
step: 0.05,
|
|
4034
|
-
onChange: (grainBlending) => update({ grainBlending })
|
|
4035
|
-
}
|
|
4036
|
-
)
|
|
4037
|
-
] }) : null,
|
|
4038
|
-
tab === "camera" ? /* @__PURE__ */ jsxs("div", { className: "grid gap-3", children: [
|
|
4039
|
-
/* @__PURE__ */ jsx(
|
|
4040
|
-
NumberField,
|
|
4041
|
-
{
|
|
4042
|
-
label: "Azimuth",
|
|
4043
|
-
value: config.cAzimuthAngle,
|
|
4044
|
-
min: 0,
|
|
4045
|
-
max: 360,
|
|
4046
|
-
step: 1,
|
|
4047
|
-
onChange: (cAzimuthAngle) => update({ cAzimuthAngle })
|
|
4048
|
-
}
|
|
4049
|
-
),
|
|
4050
|
-
/* @__PURE__ */ jsx(
|
|
4051
|
-
NumberField,
|
|
4052
|
-
{
|
|
4053
|
-
label: "Polar",
|
|
4054
|
-
value: config.cPolarAngle,
|
|
4055
|
-
min: 0,
|
|
4056
|
-
max: 180,
|
|
4057
|
-
step: 1,
|
|
4058
|
-
onChange: (cPolarAngle) => update({ cPolarAngle })
|
|
4059
|
-
}
|
|
4060
|
-
),
|
|
4061
|
-
/* @__PURE__ */ jsx(
|
|
4062
|
-
NumberField,
|
|
4063
|
-
{
|
|
4064
|
-
label: "Distance",
|
|
4065
|
-
value: config.cDistance,
|
|
4066
|
-
min: 0.1,
|
|
4067
|
-
max: 40,
|
|
4068
|
-
step: 0.1,
|
|
4069
|
-
onChange: (cDistance) => update({ cDistance })
|
|
4070
|
-
}
|
|
4071
|
-
),
|
|
4072
|
-
/* @__PURE__ */ jsx(
|
|
4073
|
-
NumberField,
|
|
4074
|
-
{
|
|
4075
|
-
label: "Zoom",
|
|
4076
|
-
value: config.cameraZoom,
|
|
4077
|
-
min: 0.1,
|
|
4078
|
-
max: 50,
|
|
4079
|
-
step: 0.1,
|
|
4080
|
-
onChange: (cameraZoom) => update({ cameraZoom })
|
|
4081
|
-
}
|
|
4082
|
-
),
|
|
4083
|
-
/* @__PURE__ */ jsx(
|
|
4084
|
-
NumberField,
|
|
4085
|
-
{
|
|
4086
|
-
label: "FOV",
|
|
4087
|
-
value: config.fov,
|
|
4088
|
-
min: 10,
|
|
4089
|
-
max: 120,
|
|
4090
|
-
step: 1,
|
|
4091
|
-
onChange: (fov) => update({ fov })
|
|
4092
|
-
}
|
|
4093
|
-
),
|
|
4094
|
-
/* @__PURE__ */ jsx(
|
|
4095
|
-
NumberField,
|
|
4096
|
-
{
|
|
4097
|
-
label: "Pixel density",
|
|
4098
|
-
value: config.pixelDensity,
|
|
4099
|
-
min: 0.5,
|
|
4100
|
-
max: 2,
|
|
4101
|
-
step: 0.1,
|
|
4102
|
-
onChange: (pixelDensity) => update({ pixelDensity })
|
|
4103
|
-
}
|
|
4104
|
-
),
|
|
4105
|
-
/* @__PURE__ */ jsx(
|
|
4106
|
-
NumberField,
|
|
4107
|
-
{
|
|
4108
|
-
label: "Position X",
|
|
4109
|
-
value: config.positionX,
|
|
4110
|
-
min: -20,
|
|
4111
|
-
max: 20,
|
|
4112
|
-
step: 0.1,
|
|
4113
|
-
onChange: (positionX) => update({ positionX })
|
|
4114
|
-
}
|
|
4115
|
-
),
|
|
4116
|
-
/* @__PURE__ */ jsx(
|
|
4117
|
-
NumberField,
|
|
4118
|
-
{
|
|
4119
|
-
label: "Position Y",
|
|
4120
|
-
value: config.positionY,
|
|
4121
|
-
min: -20,
|
|
4122
|
-
max: 20,
|
|
4123
|
-
step: 0.1,
|
|
4124
|
-
onChange: (positionY) => update({ positionY })
|
|
4125
|
-
}
|
|
4126
|
-
),
|
|
4127
|
-
/* @__PURE__ */ jsx(
|
|
4128
|
-
NumberField,
|
|
4129
|
-
{
|
|
4130
|
-
label: "Position Z",
|
|
4131
|
-
value: config.positionZ,
|
|
4132
|
-
min: -20,
|
|
4133
|
-
max: 20,
|
|
4134
|
-
step: 0.1,
|
|
4135
|
-
onChange: (positionZ) => update({ positionZ })
|
|
4136
|
-
}
|
|
4137
|
-
),
|
|
4138
|
-
/* @__PURE__ */ jsx(
|
|
4139
|
-
NumberField,
|
|
4140
|
-
{
|
|
4141
|
-
label: "Rotation X",
|
|
4142
|
-
value: config.rotationX,
|
|
4143
|
-
min: 0,
|
|
4144
|
-
max: 360,
|
|
4145
|
-
step: 1,
|
|
4146
|
-
onChange: (rotationX) => update({ rotationX })
|
|
4147
|
-
}
|
|
4148
|
-
),
|
|
4149
|
-
/* @__PURE__ */ jsx(
|
|
4150
|
-
NumberField,
|
|
4151
|
-
{
|
|
4152
|
-
label: "Rotation Y",
|
|
4153
|
-
value: config.rotationY,
|
|
4154
|
-
min: 0,
|
|
4155
|
-
max: 360,
|
|
4156
|
-
step: 1,
|
|
4157
|
-
onChange: (rotationY) => update({ rotationY })
|
|
4158
|
-
}
|
|
4159
|
-
),
|
|
4160
|
-
/* @__PURE__ */ jsx(
|
|
4161
|
-
NumberField,
|
|
4162
|
-
{
|
|
4163
|
-
label: "Rotation Z",
|
|
4164
|
-
value: config.rotationZ,
|
|
4165
|
-
min: 0,
|
|
4166
|
-
max: 360,
|
|
4167
|
-
step: 1,
|
|
4168
|
-
onChange: (rotationZ) => update({ rotationZ })
|
|
4169
|
-
}
|
|
4170
|
-
),
|
|
4171
|
-
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 text-xs", children: [
|
|
4172
4000
|
/* @__PURE__ */ jsx(
|
|
4173
|
-
|
|
4001
|
+
SelectField,
|
|
4174
4002
|
{
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4003
|
+
label: "Shader",
|
|
4004
|
+
value: config.shader,
|
|
4005
|
+
options: SHADER_VARIANTS,
|
|
4006
|
+
onChange: (shader) => update({ shader })
|
|
4178
4007
|
}
|
|
4179
4008
|
),
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4009
|
+
/* @__PURE__ */ jsx(
|
|
4010
|
+
SelectField,
|
|
4011
|
+
{
|
|
4012
|
+
label: "Animate",
|
|
4013
|
+
value: config.animate,
|
|
4014
|
+
options: ["on", "off"],
|
|
4015
|
+
onChange: (animate) => update({ animate })
|
|
4016
|
+
}
|
|
4017
|
+
),
|
|
4018
|
+
/* @__PURE__ */ jsx(
|
|
4019
|
+
SelectField,
|
|
4020
|
+
{
|
|
4021
|
+
label: "Loop",
|
|
4022
|
+
value: config.loop,
|
|
4023
|
+
options: ["on", "off"],
|
|
4024
|
+
onChange: (loop) => update({ loop })
|
|
4025
|
+
}
|
|
4026
|
+
),
|
|
4027
|
+
/* @__PURE__ */ jsx(
|
|
4028
|
+
NumberField,
|
|
4029
|
+
{
|
|
4030
|
+
label: "Speed",
|
|
4031
|
+
value: config.uSpeed,
|
|
4032
|
+
min: 0,
|
|
4033
|
+
max: 4,
|
|
4034
|
+
step: 0.05,
|
|
4035
|
+
onChange: (uSpeed) => update({ uSpeed })
|
|
4036
|
+
}
|
|
4037
|
+
),
|
|
4038
|
+
/* @__PURE__ */ jsx(
|
|
4039
|
+
NumberField,
|
|
4040
|
+
{
|
|
4041
|
+
label: "Strength",
|
|
4042
|
+
value: config.uStrength,
|
|
4043
|
+
min: 0,
|
|
4044
|
+
max: 10,
|
|
4045
|
+
step: 0.1,
|
|
4046
|
+
onChange: (uStrength) => update({ uStrength })
|
|
4047
|
+
}
|
|
4048
|
+
),
|
|
4049
|
+
/* @__PURE__ */ jsx(
|
|
4050
|
+
NumberField,
|
|
4051
|
+
{
|
|
4052
|
+
label: "Density",
|
|
4053
|
+
value: config.uDensity,
|
|
4054
|
+
min: 0,
|
|
4055
|
+
max: 8,
|
|
4056
|
+
step: 0.1,
|
|
4057
|
+
onChange: (uDensity) => update({ uDensity })
|
|
4058
|
+
}
|
|
4059
|
+
),
|
|
4060
|
+
/* @__PURE__ */ jsx(
|
|
4061
|
+
NumberField,
|
|
4062
|
+
{
|
|
4063
|
+
label: "Frequency",
|
|
4064
|
+
value: config.uFrequency,
|
|
4065
|
+
min: 0,
|
|
4066
|
+
max: 12,
|
|
4067
|
+
step: 0.1,
|
|
4068
|
+
onChange: (uFrequency) => update({ uFrequency })
|
|
4069
|
+
}
|
|
4070
|
+
),
|
|
4071
|
+
/* @__PURE__ */ jsx(
|
|
4072
|
+
NumberField,
|
|
4073
|
+
{
|
|
4074
|
+
label: "Amplitude",
|
|
4075
|
+
value: config.uAmplitude,
|
|
4076
|
+
min: 0,
|
|
4077
|
+
max: 8,
|
|
4078
|
+
step: 0.1,
|
|
4079
|
+
onChange: (uAmplitude) => update({ uAmplitude })
|
|
4080
|
+
}
|
|
4081
|
+
),
|
|
4082
|
+
/* @__PURE__ */ jsx(
|
|
4083
|
+
NumberField,
|
|
4084
|
+
{
|
|
4085
|
+
label: "Time",
|
|
4086
|
+
value: config.uTime,
|
|
4087
|
+
min: 0,
|
|
4088
|
+
max: 40,
|
|
4089
|
+
step: 0.1,
|
|
4090
|
+
onChange: (uTime) => update({ uTime })
|
|
4091
|
+
}
|
|
4092
|
+
),
|
|
4093
|
+
/* @__PURE__ */ jsx(
|
|
4094
|
+
NumberField,
|
|
4095
|
+
{
|
|
4096
|
+
label: "Loop duration",
|
|
4097
|
+
value: config.loopDuration,
|
|
4098
|
+
min: 1,
|
|
4099
|
+
max: 60,
|
|
4100
|
+
step: 1,
|
|
4101
|
+
onChange: (loopDuration) => update({ loopDuration })
|
|
4102
|
+
}
|
|
4103
|
+
),
|
|
4104
|
+
/* @__PURE__ */ jsx(
|
|
4105
|
+
SelectField,
|
|
4106
|
+
{
|
|
4107
|
+
label: "Range",
|
|
4108
|
+
value: config.range,
|
|
4109
|
+
options: ["enabled", "disabled"],
|
|
4110
|
+
onChange: (range) => update({ range })
|
|
4111
|
+
}
|
|
4112
|
+
),
|
|
4113
|
+
/* @__PURE__ */ jsx(
|
|
4114
|
+
NumberField,
|
|
4115
|
+
{
|
|
4116
|
+
label: "Range start",
|
|
4117
|
+
value: config.rangeStart,
|
|
4118
|
+
min: 0,
|
|
4119
|
+
max: 40,
|
|
4120
|
+
step: 0.1,
|
|
4121
|
+
onChange: (rangeStart) => update({ rangeStart })
|
|
4122
|
+
}
|
|
4123
|
+
),
|
|
4124
|
+
/* @__PURE__ */ jsx(
|
|
4125
|
+
NumberField,
|
|
4126
|
+
{
|
|
4127
|
+
label: "Range end",
|
|
4128
|
+
value: config.rangeEnd,
|
|
4129
|
+
min: 0,
|
|
4130
|
+
max: 40,
|
|
4131
|
+
step: 0.1,
|
|
4132
|
+
onChange: (rangeEnd) => update({ rangeEnd })
|
|
4133
|
+
}
|
|
4134
|
+
),
|
|
4135
|
+
/* @__PURE__ */ jsxs("label", { className: "col-span-2 flex items-center gap-2 text-xs", children: [
|
|
4136
|
+
/* @__PURE__ */ jsx(
|
|
4137
|
+
"input",
|
|
4138
|
+
{
|
|
4139
|
+
type: "checkbox",
|
|
4140
|
+
checked: config.wireframe,
|
|
4141
|
+
onChange: (event) => update({ wireframe: event.target.checked })
|
|
4142
|
+
}
|
|
4143
|
+
),
|
|
4144
|
+
"Wireframe"
|
|
4145
|
+
] })
|
|
4146
|
+
] }) : null,
|
|
4147
|
+
tab === "colors" ? /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
4148
|
+
/* @__PURE__ */ jsx(
|
|
4149
|
+
ColorField,
|
|
4150
|
+
{
|
|
4151
|
+
label: "Color 1",
|
|
4152
|
+
value: config.color1,
|
|
4153
|
+
onChange: (color1) => update({ color1 })
|
|
4154
|
+
}
|
|
4155
|
+
),
|
|
4156
|
+
/* @__PURE__ */ jsx(
|
|
4157
|
+
ColorField,
|
|
4158
|
+
{
|
|
4159
|
+
label: "Color 2",
|
|
4160
|
+
value: config.color2,
|
|
4161
|
+
onChange: (color2) => update({ color2 })
|
|
4162
|
+
}
|
|
4163
|
+
),
|
|
4164
|
+
/* @__PURE__ */ jsx(
|
|
4165
|
+
ColorField,
|
|
4166
|
+
{
|
|
4167
|
+
label: "Color 3",
|
|
4168
|
+
value: config.color3,
|
|
4169
|
+
onChange: (color3) => update({ color3 })
|
|
4170
|
+
}
|
|
4171
|
+
),
|
|
4172
|
+
/* @__PURE__ */ jsx(
|
|
4173
|
+
NumberField,
|
|
4174
|
+
{
|
|
4175
|
+
label: "Reflection",
|
|
4176
|
+
value: config.reflection,
|
|
4177
|
+
min: 0,
|
|
4178
|
+
max: 1,
|
|
4179
|
+
step: 0.05,
|
|
4180
|
+
onChange: (reflection) => update({ reflection })
|
|
4181
|
+
}
|
|
4182
|
+
),
|
|
4183
|
+
/* @__PURE__ */ jsx(
|
|
4184
|
+
NumberField,
|
|
4185
|
+
{
|
|
4186
|
+
label: "Brightness",
|
|
4187
|
+
value: config.brightness,
|
|
4188
|
+
min: 0,
|
|
4189
|
+
max: 4,
|
|
4190
|
+
step: 0.05,
|
|
4191
|
+
onChange: (brightness) => update({ brightness })
|
|
4192
|
+
}
|
|
4193
|
+
)
|
|
4194
|
+
] }) : null,
|
|
4195
|
+
tab === "light" ? /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
4196
|
+
/* @__PURE__ */ jsx(
|
|
4197
|
+
SelectField,
|
|
4198
|
+
{
|
|
4199
|
+
label: "Light",
|
|
4200
|
+
value: config.lightType,
|
|
4201
|
+
options: SHADER_LIGHT_TYPES,
|
|
4202
|
+
onChange: (lightType) => update({ lightType })
|
|
4203
|
+
}
|
|
4204
|
+
),
|
|
4205
|
+
/* @__PURE__ */ jsx(
|
|
4206
|
+
SelectField,
|
|
4207
|
+
{
|
|
4208
|
+
label: "Environment",
|
|
4209
|
+
value: config.envPreset,
|
|
4210
|
+
options: SHADER_ENV_PRESETS,
|
|
4211
|
+
onChange: (envPreset) => update({ envPreset })
|
|
4212
|
+
}
|
|
4213
|
+
),
|
|
4214
|
+
/* @__PURE__ */ jsx(
|
|
4215
|
+
SelectField,
|
|
4216
|
+
{
|
|
4217
|
+
label: "Grain",
|
|
4218
|
+
value: config.grain,
|
|
4219
|
+
options: ["on", "off"],
|
|
4220
|
+
onChange: (grain) => update({ grain })
|
|
4221
|
+
}
|
|
4222
|
+
),
|
|
4223
|
+
/* @__PURE__ */ jsx(
|
|
4224
|
+
NumberField,
|
|
4225
|
+
{
|
|
4226
|
+
label: "Grain blending",
|
|
4227
|
+
value: config.grainBlending,
|
|
4228
|
+
min: 0,
|
|
4229
|
+
max: 1,
|
|
4230
|
+
step: 0.05,
|
|
4231
|
+
onChange: (grainBlending) => update({ grainBlending })
|
|
4232
|
+
}
|
|
4233
|
+
)
|
|
4234
|
+
] }) : null,
|
|
4235
|
+
tab === "camera" ? /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
4236
|
+
/* @__PURE__ */ jsx(
|
|
4237
|
+
NumberField,
|
|
4238
|
+
{
|
|
4239
|
+
label: "Azimuth",
|
|
4240
|
+
value: config.cAzimuthAngle,
|
|
4241
|
+
min: 0,
|
|
4242
|
+
max: 360,
|
|
4243
|
+
step: 1,
|
|
4244
|
+
onChange: (cAzimuthAngle) => update({ cAzimuthAngle })
|
|
4245
|
+
}
|
|
4246
|
+
),
|
|
4247
|
+
/* @__PURE__ */ jsx(
|
|
4248
|
+
NumberField,
|
|
4249
|
+
{
|
|
4250
|
+
label: "Polar",
|
|
4251
|
+
value: config.cPolarAngle,
|
|
4252
|
+
min: 0,
|
|
4253
|
+
max: 180,
|
|
4254
|
+
step: 1,
|
|
4255
|
+
onChange: (cPolarAngle) => update({ cPolarAngle })
|
|
4256
|
+
}
|
|
4257
|
+
),
|
|
4258
|
+
/* @__PURE__ */ jsx(
|
|
4259
|
+
NumberField,
|
|
4260
|
+
{
|
|
4261
|
+
label: "Distance",
|
|
4262
|
+
value: config.cDistance,
|
|
4263
|
+
min: 0.1,
|
|
4264
|
+
max: 40,
|
|
4265
|
+
step: 0.1,
|
|
4266
|
+
onChange: (cDistance) => update({ cDistance })
|
|
4267
|
+
}
|
|
4268
|
+
),
|
|
4269
|
+
/* @__PURE__ */ jsx(
|
|
4270
|
+
NumberField,
|
|
4271
|
+
{
|
|
4272
|
+
label: "Zoom",
|
|
4273
|
+
value: config.cameraZoom,
|
|
4274
|
+
min: 0.1,
|
|
4275
|
+
max: 50,
|
|
4276
|
+
step: 0.1,
|
|
4277
|
+
onChange: (cameraZoom) => update({ cameraZoom })
|
|
4278
|
+
}
|
|
4279
|
+
),
|
|
4280
|
+
/* @__PURE__ */ jsx(
|
|
4281
|
+
NumberField,
|
|
4282
|
+
{
|
|
4283
|
+
label: "FOV",
|
|
4284
|
+
value: config.fov,
|
|
4285
|
+
min: 10,
|
|
4286
|
+
max: 120,
|
|
4287
|
+
step: 1,
|
|
4288
|
+
onChange: (fov) => update({ fov })
|
|
4289
|
+
}
|
|
4290
|
+
),
|
|
4291
|
+
/* @__PURE__ */ jsx(
|
|
4292
|
+
NumberField,
|
|
4293
|
+
{
|
|
4294
|
+
label: "Pixel density",
|
|
4295
|
+
value: config.pixelDensity,
|
|
4296
|
+
min: 0.5,
|
|
4297
|
+
max: 2,
|
|
4298
|
+
step: 0.1,
|
|
4299
|
+
onChange: (pixelDensity) => update({ pixelDensity })
|
|
4300
|
+
}
|
|
4301
|
+
),
|
|
4302
|
+
/* @__PURE__ */ jsx(
|
|
4303
|
+
NumberField,
|
|
4304
|
+
{
|
|
4305
|
+
label: "Position X",
|
|
4306
|
+
value: config.positionX,
|
|
4307
|
+
min: -20,
|
|
4308
|
+
max: 20,
|
|
4309
|
+
step: 0.1,
|
|
4310
|
+
onChange: (positionX) => update({ positionX })
|
|
4311
|
+
}
|
|
4312
|
+
),
|
|
4313
|
+
/* @__PURE__ */ jsx(
|
|
4314
|
+
NumberField,
|
|
4315
|
+
{
|
|
4316
|
+
label: "Position Y",
|
|
4317
|
+
value: config.positionY,
|
|
4318
|
+
min: -20,
|
|
4319
|
+
max: 20,
|
|
4320
|
+
step: 0.1,
|
|
4321
|
+
onChange: (positionY) => update({ positionY })
|
|
4322
|
+
}
|
|
4323
|
+
),
|
|
4324
|
+
/* @__PURE__ */ jsx(
|
|
4325
|
+
NumberField,
|
|
4326
|
+
{
|
|
4327
|
+
label: "Position Z",
|
|
4328
|
+
value: config.positionZ,
|
|
4329
|
+
min: -20,
|
|
4330
|
+
max: 20,
|
|
4331
|
+
step: 0.1,
|
|
4332
|
+
onChange: (positionZ) => update({ positionZ })
|
|
4333
|
+
}
|
|
4334
|
+
),
|
|
4335
|
+
/* @__PURE__ */ jsx(
|
|
4336
|
+
NumberField,
|
|
4337
|
+
{
|
|
4338
|
+
label: "Rotation X",
|
|
4339
|
+
value: config.rotationX,
|
|
4340
|
+
min: -360,
|
|
4341
|
+
max: 360,
|
|
4342
|
+
step: 1,
|
|
4343
|
+
onChange: (rotationX) => update({ rotationX })
|
|
4344
|
+
}
|
|
4345
|
+
),
|
|
4346
|
+
/* @__PURE__ */ jsx(
|
|
4347
|
+
NumberField,
|
|
4348
|
+
{
|
|
4349
|
+
label: "Rotation Y",
|
|
4350
|
+
value: config.rotationY,
|
|
4351
|
+
min: -360,
|
|
4352
|
+
max: 360,
|
|
4353
|
+
step: 1,
|
|
4354
|
+
onChange: (rotationY) => update({ rotationY })
|
|
4355
|
+
}
|
|
4356
|
+
),
|
|
4357
|
+
/* @__PURE__ */ jsx(
|
|
4358
|
+
NumberField,
|
|
4359
|
+
{
|
|
4360
|
+
label: "Rotation Z",
|
|
4361
|
+
value: config.rotationZ,
|
|
4362
|
+
min: -360,
|
|
4363
|
+
max: 360,
|
|
4364
|
+
step: 1,
|
|
4365
|
+
onChange: (rotationZ) => update({ rotationZ })
|
|
4366
|
+
}
|
|
4367
|
+
),
|
|
4368
|
+
/* @__PURE__ */ jsxs("label", { className: "col-span-2 flex items-center gap-2 text-xs", children: [
|
|
4369
|
+
/* @__PURE__ */ jsx(
|
|
4370
|
+
"input",
|
|
4371
|
+
{
|
|
4372
|
+
type: "checkbox",
|
|
4373
|
+
checked: config.zoomOut,
|
|
4374
|
+
onChange: (event) => update({ zoomOut: event.target.checked })
|
|
4375
|
+
}
|
|
4376
|
+
),
|
|
4377
|
+
"Zoom out"
|
|
4378
|
+
] })
|
|
4379
|
+
] }) : null
|
|
4380
|
+
] }),
|
|
4183
4381
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
4184
4382
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: copy.presets }),
|
|
4185
4383
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: SHADER_CURTAIN_PRESETS.map((preset) => /* @__PURE__ */ jsx(
|
|
@@ -4197,25 +4395,27 @@ var ShaderCurtainEditor = React11.forwardRef(function ShaderCurtainEditor2({ val
|
|
|
4197
4395
|
/* @__PURE__ */ jsxs("div", { className: "grid gap-2", children: [
|
|
4198
4396
|
/* @__PURE__ */ jsxs("label", { className: "grid gap-1 text-xs", children: [
|
|
4199
4397
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: copy.importUrl }),
|
|
4200
|
-
/* @__PURE__ */
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4398
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
4399
|
+
/* @__PURE__ */ jsx(
|
|
4400
|
+
"input",
|
|
4401
|
+
{
|
|
4402
|
+
value: url,
|
|
4403
|
+
onChange: (event) => setUrl(event.target.value),
|
|
4404
|
+
className: "border-input bg-background min-w-0 flex-1 rounded-md border px-2 py-1"
|
|
4405
|
+
}
|
|
4406
|
+
),
|
|
4407
|
+
/* @__PURE__ */ jsx(
|
|
4408
|
+
Button,
|
|
4409
|
+
{
|
|
4410
|
+
type: "button",
|
|
4411
|
+
size: "sm",
|
|
4412
|
+
variant: "secondary",
|
|
4413
|
+
onClick: applyUrl,
|
|
4414
|
+
children: copy.importApply
|
|
4415
|
+
}
|
|
4416
|
+
)
|
|
4417
|
+
] })
|
|
4208
4418
|
] }),
|
|
4209
|
-
/* @__PURE__ */ jsx(
|
|
4210
|
-
Button,
|
|
4211
|
-
{
|
|
4212
|
-
type: "button",
|
|
4213
|
-
size: "sm",
|
|
4214
|
-
variant: "secondary",
|
|
4215
|
-
onClick: applyUrl,
|
|
4216
|
-
children: copy.importApply
|
|
4217
|
-
}
|
|
4218
|
-
),
|
|
4219
4419
|
urlError ? /* @__PURE__ */ jsx("p", { className: "text-destructive text-xs", role: "alert", children: urlError }) : null
|
|
4220
4420
|
] })
|
|
4221
4421
|
] })
|