@livo-tv/blocks 1.30.1 → 1.31.0
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 +363 -161
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +363 -161
- 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,19 +3826,15 @@ function NumberField({
|
|
|
3646
3826
|
step,
|
|
3647
3827
|
onChange
|
|
3648
3828
|
}) {
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
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: [
|
|
3652
3832
|
/* @__PURE__ */ jsx(
|
|
3653
|
-
"
|
|
3833
|
+
"label",
|
|
3654
3834
|
{
|
|
3655
|
-
|
|
3656
|
-
min,
|
|
3657
|
-
|
|
3658
|
-
step,
|
|
3659
|
-
value,
|
|
3660
|
-
onChange: (event) => onChange(Number(event.target.value)),
|
|
3661
|
-
className: "min-w-0 flex-1"
|
|
3835
|
+
htmlFor: rangeId,
|
|
3836
|
+
className: "text-muted-foreground min-w-0 truncate",
|
|
3837
|
+
children: label
|
|
3662
3838
|
}
|
|
3663
3839
|
),
|
|
3664
3840
|
/* @__PURE__ */ jsx(
|
|
@@ -3669,11 +3845,25 @@ function NumberField({
|
|
|
3669
3845
|
max,
|
|
3670
3846
|
step,
|
|
3671
3847
|
value,
|
|
3848
|
+
"aria-label": label,
|
|
3672
3849
|
onChange: (event) => onChange(Number(event.target.value)),
|
|
3673
|
-
className: "border-input bg-background w-
|
|
3850
|
+
className: "border-input bg-background w-14 shrink-0 rounded-md border px-1.5 py-0.5 text-right tabular-nums"
|
|
3674
3851
|
}
|
|
3675
3852
|
)
|
|
3676
|
-
] })
|
|
3853
|
+
] }),
|
|
3854
|
+
/* @__PURE__ */ jsx(
|
|
3855
|
+
"input",
|
|
3856
|
+
{
|
|
3857
|
+
id: rangeId,
|
|
3858
|
+
type: "range",
|
|
3859
|
+
min,
|
|
3860
|
+
max,
|
|
3861
|
+
step,
|
|
3862
|
+
value,
|
|
3863
|
+
onChange: (event) => onChange(Number(event.target.value)),
|
|
3864
|
+
className: "w-full min-w-0"
|
|
3865
|
+
}
|
|
3866
|
+
)
|
|
3677
3867
|
] });
|
|
3678
3868
|
}
|
|
3679
3869
|
function SelectField({
|
|
@@ -3682,14 +3872,14 @@ function SelectField({
|
|
|
3682
3872
|
options,
|
|
3683
3873
|
onChange
|
|
3684
3874
|
}) {
|
|
3685
|
-
return /* @__PURE__ */ jsxs("label", { className: "grid gap-1 text-xs", children: [
|
|
3686
|
-
/* @__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 }),
|
|
3687
3877
|
/* @__PURE__ */ jsx(
|
|
3688
3878
|
"select",
|
|
3689
3879
|
{
|
|
3690
3880
|
value,
|
|
3691
3881
|
onChange: (event) => onChange(event.target.value),
|
|
3692
|
-
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",
|
|
3693
3883
|
children: options.map((option) => /* @__PURE__ */ jsx("option", { value: option, children: option }, option))
|
|
3694
3884
|
}
|
|
3695
3885
|
)
|
|
@@ -3796,7 +3986,7 @@ var ShaderCurtainEditor = React11.forwardRef(function ShaderCurtainEditor2({ val
|
|
|
3796
3986
|
},
|
|
3797
3987
|
id
|
|
3798
3988
|
)) }),
|
|
3799
|
-
/* @__PURE__ */ jsxs("div", { className: "min-h-0 max-h-[min(22rem,40dvh)] overflow-y-auto pr-1", children: [
|
|
3989
|
+
/* @__PURE__ */ jsxs("div", { className: "min-h-0 max-h-[min(22rem,40dvh)] overflow-x-hidden overflow-y-auto pr-1", children: [
|
|
3800
3990
|
tab === "shape" ? /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
3801
3991
|
/* @__PURE__ */ jsx(
|
|
3802
3992
|
SelectField,
|
|
@@ -4147,7 +4337,7 @@ var ShaderCurtainEditor = React11.forwardRef(function ShaderCurtainEditor2({ val
|
|
|
4147
4337
|
{
|
|
4148
4338
|
label: "Rotation X",
|
|
4149
4339
|
value: config.rotationX,
|
|
4150
|
-
min:
|
|
4340
|
+
min: -360,
|
|
4151
4341
|
max: 360,
|
|
4152
4342
|
step: 1,
|
|
4153
4343
|
onChange: (rotationX) => update({ rotationX })
|
|
@@ -4158,7 +4348,7 @@ var ShaderCurtainEditor = React11.forwardRef(function ShaderCurtainEditor2({ val
|
|
|
4158
4348
|
{
|
|
4159
4349
|
label: "Rotation Y",
|
|
4160
4350
|
value: config.rotationY,
|
|
4161
|
-
min:
|
|
4351
|
+
min: -360,
|
|
4162
4352
|
max: 360,
|
|
4163
4353
|
step: 1,
|
|
4164
4354
|
onChange: (rotationY) => update({ rotationY })
|
|
@@ -4169,7 +4359,7 @@ var ShaderCurtainEditor = React11.forwardRef(function ShaderCurtainEditor2({ val
|
|
|
4169
4359
|
{
|
|
4170
4360
|
label: "Rotation Z",
|
|
4171
4361
|
value: config.rotationZ,
|
|
4172
|
-
min:
|
|
4362
|
+
min: -360,
|
|
4173
4363
|
max: 360,
|
|
4174
4364
|
step: 1,
|
|
4175
4365
|
onChange: (rotationZ) => update({ rotationZ })
|
|
@@ -5562,6 +5752,14 @@ var VIDEO_MEDIA_STYLE = `
|
|
|
5562
5752
|
display: none !important;
|
|
5563
5753
|
}
|
|
5564
5754
|
`;
|
|
5755
|
+
function hasCaptionSource(mode, src, liveCaptionsBaseUrl) {
|
|
5756
|
+
if (mode === "live") {
|
|
5757
|
+
return Boolean(liveCaptionsBaseUrl?.trim());
|
|
5758
|
+
}
|
|
5759
|
+
return CAPTION_LOCALES.some(
|
|
5760
|
+
(locale) => captionsVttUrlFromPlayback(src, locale) != null
|
|
5761
|
+
);
|
|
5762
|
+
}
|
|
5565
5763
|
function captionLocaleLabel(locale, labels) {
|
|
5566
5764
|
switch (locale) {
|
|
5567
5765
|
case "en":
|
|
@@ -5605,6 +5803,7 @@ function VideoPlayer({
|
|
|
5605
5803
|
fit = "aspect-video",
|
|
5606
5804
|
className,
|
|
5607
5805
|
defaultCaptionLocale,
|
|
5806
|
+
captionsEnabled = true,
|
|
5608
5807
|
liveCaptionsBaseUrl
|
|
5609
5808
|
}) {
|
|
5610
5809
|
const t = { ...DEFAULT_LABELS3, ...labels };
|
|
@@ -5652,6 +5851,9 @@ function VideoPlayer({
|
|
|
5652
5851
|
onRebuffer,
|
|
5653
5852
|
onQualityChange
|
|
5654
5853
|
});
|
|
5854
|
+
const liveCaptionPollUrl = liveCaptionsBaseUrl?.trim() || void 0;
|
|
5855
|
+
const showCaptionsMenu = captionsEnabled && hasCaptionSource(mode, src, liveCaptionPollUrl);
|
|
5856
|
+
const activeLiveCaptionsBaseUrl = showCaptionsMenu ? liveCaptionPollUrl : void 0;
|
|
5655
5857
|
const [isPlaying, setIsPlaying] = React11.useState(false);
|
|
5656
5858
|
const [isMuted, setIsMuted] = React11.useState(muted);
|
|
5657
5859
|
const isMutedRef = React11.useRef(isMuted);
|
|
@@ -5737,7 +5939,7 @@ function VideoPlayer({
|
|
|
5737
5939
|
const edge = video.seekable.end(video.seekable.length - 1);
|
|
5738
5940
|
const lagSeconds = edge - video.currentTime;
|
|
5739
5941
|
setBehindLive(lagSeconds > LIVE_EDGE_THRESHOLD_S);
|
|
5740
|
-
if (
|
|
5942
|
+
if (activeLiveCaptionsBaseUrl) {
|
|
5741
5943
|
setLiveLagMs((prev) => stabilizeLiveLagMs(prev, lagSeconds * 1e3));
|
|
5742
5944
|
}
|
|
5743
5945
|
}
|
|
@@ -5768,7 +5970,7 @@ function VideoPlayer({
|
|
|
5768
5970
|
video.removeEventListener("ratechange", onRate);
|
|
5769
5971
|
video.removeEventListener("playing", onPlaying);
|
|
5770
5972
|
};
|
|
5771
|
-
}, [videoRef, active, effectiveMode,
|
|
5973
|
+
}, [videoRef, active, effectiveMode, activeLiveCaptionsBaseUrl]);
|
|
5772
5974
|
React11.useLayoutEffect(() => {
|
|
5773
5975
|
const video = videoRef.current;
|
|
5774
5976
|
if (video) video.muted = isMuted;
|
|
@@ -5882,7 +6084,7 @@ function VideoPlayer({
|
|
|
5882
6084
|
};
|
|
5883
6085
|
}, []);
|
|
5884
6086
|
React11.useEffect(() => {
|
|
5885
|
-
if (captionLocale === "off") {
|
|
6087
|
+
if (captionLocale === "off" || !showCaptionsMenu) {
|
|
5886
6088
|
setCaptionCues([]);
|
|
5887
6089
|
setLiveCaptionCues([]);
|
|
5888
6090
|
return;
|
|
@@ -5890,7 +6092,7 @@ function VideoPlayer({
|
|
|
5890
6092
|
setLiveCaptionCues([]);
|
|
5891
6093
|
let cancelled = false;
|
|
5892
6094
|
const load = async () => {
|
|
5893
|
-
const liveBase =
|
|
6095
|
+
const liveBase = activeLiveCaptionsBaseUrl;
|
|
5894
6096
|
if (liveBase) {
|
|
5895
6097
|
const loaded = await loadLiveCaptions(
|
|
5896
6098
|
liveCaptionsUrl(liveBase, captionLocale)
|
|
@@ -5909,15 +6111,15 @@ function VideoPlayer({
|
|
|
5909
6111
|
if (!cancelled) setCaptionCues(cues);
|
|
5910
6112
|
};
|
|
5911
6113
|
void load();
|
|
5912
|
-
if (!
|
|
6114
|
+
if (!activeLiveCaptionsBaseUrl) return;
|
|
5913
6115
|
const timer = window.setInterval(() => void load(), 2e3);
|
|
5914
6116
|
return () => {
|
|
5915
6117
|
cancelled = true;
|
|
5916
6118
|
window.clearInterval(timer);
|
|
5917
6119
|
};
|
|
5918
|
-
}, [captionLocale,
|
|
6120
|
+
}, [captionLocale, activeLiveCaptionsBaseUrl, showCaptionsMenu, src]);
|
|
5919
6121
|
React11.useEffect(() => {
|
|
5920
|
-
if (!
|
|
6122
|
+
if (!activeLiveCaptionsBaseUrl || captionLocale === "off") {
|
|
5921
6123
|
setLivePlayout(EMPTY_LIVE_CAPTION_PLAYOUT);
|
|
5922
6124
|
return;
|
|
5923
6125
|
}
|
|
@@ -5935,12 +6137,12 @@ function VideoPlayer({
|
|
|
5935
6137
|
tick();
|
|
5936
6138
|
const timer = window.setInterval(tick, LIVE_CAPTION_PLAYOUT_MS);
|
|
5937
6139
|
return () => window.clearInterval(timer);
|
|
5938
|
-
}, [
|
|
6140
|
+
}, [activeLiveCaptionsBaseUrl, captionLocale]);
|
|
5939
6141
|
const captionWrapWidth = compactChrome ? CAPTION_COMPACT_CHARS_PER_LINE : CAPTION_MAX_CHARS_PER_LINE;
|
|
5940
|
-
const captionScreen =
|
|
6142
|
+
const captionScreen = activeLiveCaptionsBaseUrl ? livePlayout.screen : captionScreenAtTime(captionCues, currentTime, captionWrapWidth);
|
|
5941
6143
|
React11.useEffect(() => {
|
|
5942
6144
|
const video = videoRef.current;
|
|
5943
|
-
if (!video || !
|
|
6145
|
+
if (!video || !activeLiveCaptionsBaseUrl) return;
|
|
5944
6146
|
try {
|
|
5945
6147
|
ensureLiveSubtitleTracks(video, {
|
|
5946
6148
|
en: t.captionsEn,
|
|
@@ -5954,7 +6156,7 @@ function VideoPlayer({
|
|
|
5954
6156
|
}, [
|
|
5955
6157
|
videoRef,
|
|
5956
6158
|
active,
|
|
5957
|
-
|
|
6159
|
+
activeLiveCaptionsBaseUrl,
|
|
5958
6160
|
captionLocale,
|
|
5959
6161
|
t.captionsEn,
|
|
5960
6162
|
t.captionsEs,
|
|
@@ -5978,10 +6180,10 @@ function VideoPlayer({
|
|
|
5978
6180
|
setCaptionLocale(showing);
|
|
5979
6181
|
};
|
|
5980
6182
|
return listenTextTracksChange(video.textTracks, onChange);
|
|
5981
|
-
}, [videoRef, active, src,
|
|
6183
|
+
}, [videoRef, active, src, activeLiveCaptionsBaseUrl]);
|
|
5982
6184
|
React11.useEffect(() => {
|
|
5983
6185
|
const video = videoRef.current;
|
|
5984
|
-
if (!video || captionLocale === "off" || !
|
|
6186
|
+
if (!video || captionLocale === "off" || !activeLiveCaptionsBaseUrl) return;
|
|
5985
6187
|
const track = findSubtitleTrack(video, captionLocale);
|
|
5986
6188
|
if (!track) return;
|
|
5987
6189
|
const remaining = livePlayout.screen ? Math.max(0.2, (livePlayout.hideAt - Date.now()) / 1e3) : 0;
|
|
@@ -5991,7 +6193,7 @@ function VideoPlayer({
|
|
|
5991
6193
|
livePlayout.screen?.text ?? "",
|
|
5992
6194
|
remaining
|
|
5993
6195
|
);
|
|
5994
|
-
}, [livePlayout, captionLocale,
|
|
6196
|
+
}, [livePlayout, captionLocale, activeLiveCaptionsBaseUrl]);
|
|
5995
6197
|
function togglePlay() {
|
|
5996
6198
|
const video = videoRef.current;
|
|
5997
6199
|
if (!video) return;
|
|
@@ -6194,7 +6396,7 @@ function VideoPlayer({
|
|
|
6194
6396
|
className: "livo-video-player-media h-full w-full bg-black object-contain",
|
|
6195
6397
|
onClick: active ? toggleControls : void 0,
|
|
6196
6398
|
poster,
|
|
6197
|
-
children: !
|
|
6399
|
+
children: showCaptionsMenu && !activeLiveCaptionsBaseUrl ? CAPTION_LOCALES.map((locale) => {
|
|
6198
6400
|
const url = captionsVttUrlFromPlayback(src, locale);
|
|
6199
6401
|
if (!url) return null;
|
|
6200
6402
|
return /* @__PURE__ */ jsx(
|
|
@@ -6343,7 +6545,7 @@ function VideoPlayer({
|
|
|
6343
6545
|
),
|
|
6344
6546
|
/* @__PURE__ */ jsxs("div", { className: "ml-auto flex shrink-0 items-center gap-1", children: [
|
|
6345
6547
|
!compactChrome && effectiveMode === "vod" && typeof stats?.views === "number" && /* @__PURE__ */ jsx("span", { className: "mr-1 text-xs", children: t.formatViews ? t.formatViews(stats.views) : `${stats.views} views` }),
|
|
6346
|
-
/* @__PURE__ */ jsxs(
|
|
6548
|
+
showCaptionsMenu && /* @__PURE__ */ jsxs(
|
|
6347
6549
|
MenuControl,
|
|
6348
6550
|
{
|
|
6349
6551
|
label: t.captions,
|