mishig HF Staff commited on
Commit
403d84a
Β·
verified Β·
1 Parent(s): 52051c7

Sync from huggingface/lerobot-dataset-visualizer via hub-sync

Browse files
Files changed (1) hide show
  1. src/components/urdf-viewer.tsx +39 -33
src/components/urdf-viewer.tsx CHANGED
@@ -738,6 +738,44 @@ function PlaybackDriver({
738
  return null;
739
  }
740
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
741
  // ═══════════════════════════════════════
742
  // ─── Main URDF Viewer ───
743
  // ═══════════════════════════════════════
@@ -1017,39 +1055,7 @@ export default function URDFViewer({
1017
  }}
1018
  >
1019
  <color attach="background" args={[dark ? "#141c2e" : "#f3f4f6"]} />
1020
- {/* IBL: procedural studio softboxes give mesh highlights somewhere to
1021
- bounce. Not preset="studio": drei downloads that 1.6 MB HDR from
1022
- raw.githack.com and suspends the canvas until it arrives. */}
1023
- <Environment resolution={256} background={false}>
1024
- <Lightformer
1025
- form="rect"
1026
- intensity={5}
1027
- position={[0, 5, 0]}
1028
- rotation-x={Math.PI / 2}
1029
- scale={[10, 10, 1]}
1030
- />
1031
- <Lightformer
1032
- form="rect"
1033
- intensity={3}
1034
- position={[-5, 1.5, -1]}
1035
- rotation-y={Math.PI / 2}
1036
- scale={[10, 2, 1]}
1037
- />
1038
- <Lightformer
1039
- form="rect"
1040
- intensity={3}
1041
- position={[5, 1.5, -1]}
1042
- rotation-y={-Math.PI / 2}
1043
- scale={[10, 2, 1]}
1044
- />
1045
- <Lightformer
1046
- form="rect"
1047
- intensity={2.5}
1048
- position={[0, 1.5, 5]}
1049
- rotation-y={Math.PI}
1050
- scale={[10, 3, 1]}
1051
- />
1052
- </Environment>
1053
  {/* 3-point studio rig β€” key is the only shadow caster */}
1054
  <ambientLight intensity={0.12} />
1055
  <directionalLight
 
738
  return null;
739
  }
740
 
741
+ // IBL: procedural studio softboxes give mesh highlights somewhere to bounce.
742
+ // Not preset="studio": drei downloads that 1.6 MB HDR from raw.githack.com and
743
+ // suspends the canvas until it arrives. Module scope keeps the element's
744
+ // identity across URDFViewer renders (one per playback frame): drei re-captures
745
+ // the cube map and three re-runs PMREM whenever Environment's children change.
746
+ const STUDIO_ENVIRONMENT = (
747
+ <Environment resolution={256} background={false}>
748
+ <Lightformer
749
+ form="rect"
750
+ intensity={5}
751
+ position={[0, 5, 0]}
752
+ rotation-x={Math.PI / 2}
753
+ scale={[10, 10, 1]}
754
+ />
755
+ <Lightformer
756
+ form="rect"
757
+ intensity={3}
758
+ position={[-5, 1.5, -1]}
759
+ rotation-y={Math.PI / 2}
760
+ scale={[10, 2, 1]}
761
+ />
762
+ <Lightformer
763
+ form="rect"
764
+ intensity={3}
765
+ position={[5, 1.5, -1]}
766
+ rotation-y={-Math.PI / 2}
767
+ scale={[10, 2, 1]}
768
+ />
769
+ <Lightformer
770
+ form="rect"
771
+ intensity={2.5}
772
+ position={[0, 1.5, 5]}
773
+ rotation-y={Math.PI}
774
+ scale={[10, 3, 1]}
775
+ />
776
+ </Environment>
777
+ );
778
+
779
  // ═══════════════════════════════════════
780
  // ─── Main URDF Viewer ───
781
  // ═══════════════════════════════════════
 
1055
  }}
1056
  >
1057
  <color attach="background" args={[dark ? "#141c2e" : "#f3f4f6"]} />
1058
+ {STUDIO_ENVIRONMENT}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1059
  {/* 3-point studio rig β€” key is the only shadow caster */}
1060
  <ambientLight intensity={0.12} />
1061
  <directionalLight