Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
beckyfeng08 committed Sep 9, 2024
1 parent c046cc3 commit eb4f30d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
3 changes: 0 additions & 3 deletions src/viser/_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ class DirectionalLightMessage(Message):
position: Tuple[float, float, float]
intensity: float
color: int
castShadow: bool


@dataclasses.dataclass
Expand Down Expand Up @@ -303,7 +302,6 @@ class PointLightMessage(Message):
position: Tuple[float, float, float]
intensity: float
color: int
castShadow: bool
distance: float
decay: float
power: float
Expand Down Expand Up @@ -334,7 +332,6 @@ class SpotLightMessage(Message):
angle: float
penumbra: float
decay: float
castShadow: bool

def __post_init__(self):
assert self.angle <= onp.pi / 2
Expand Down
13 changes: 2 additions & 11 deletions src/viser/_scene_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,7 @@ def add_light_directional(
"""

self._websock_interface.queue_message(
_messages.DirectionalLightMessage(
name, position, intensity, color,
)
_messages.DirectionalLightMessage(name, position, intensity, color)
)
return LightHandle._make(self, name, wxyz, position, visible)

Expand Down Expand Up @@ -476,14 +474,7 @@ def add_light_spot(

self._websock_interface.queue_message(
_messages.SpotLightMessage(
name,
position,
intensity,
color,
distance,
angle,
penumbra,
decay,
name, position, intensity, color, distance, angle, penumbra, decay
)
)
return LightHandle._make(self, name, wxyz, position, visible)
Expand Down
6 changes: 1 addition & 5 deletions src/viser/client/src/MessageHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ function useMessageHandler() {
position={message.position}
intensity={message.intensity}
color={message.color}
castShadow={message.castShadow}
/>
)),
);
Expand Down Expand Up @@ -343,10 +342,8 @@ function useMessageHandler() {
position={message.position}
intensity={message.intensity}
color={message.color}
castShadow={message.castShadow}
distance={message.distance}
decay={message.decay}
power={message.power}
/>
)),
);
Expand Down Expand Up @@ -380,10 +377,9 @@ function useMessageHandler() {
intensity={message.intensity}
color={message.color}
distance={message.distance}
decay={message.decay}
angle={message.angle}
penumbra={message.penumbra}
castShadow={message.castShadow}
decay={message.decay}
/>
)),
);
Expand Down

0 comments on commit eb4f30d

Please sign in to comment.