diff --git a/src/viser/_scene_api.py b/src/viser/_scene_api.py index f3b992b3..599f1cae 100644 --- a/src/viser/_scene_api.py +++ b/src/viser/_scene_api.py @@ -259,7 +259,6 @@ def add_light_directional( self, name: str, color: int = 0xFFFFFF, - cast_shadow: bool = False, intensity: float = 1.0, wxyz: tuple[float, float, float, float] | onp.ndarray = (1.0, 0.0, 0.0, 0.0), position: tuple[float, float, float] = (0.0, 0.0, 0.0), @@ -272,9 +271,6 @@ def add_light_directional( name: A scene tree name. Names in the format of /parent/child can be used to define a kinematic tree. color: hexadecimal color of the light. Default is 0xffffff (white). - cast_shadow: If set to true light will cast dynamic shadows. - Warning: This is expensive and requires tweaking to get shadows looking right. - The default is false. intensity: numeric value of the light's strength/intensity. Default is 1. wxyz: Quaternion rotation to parent frame from local frame (R_pl). position: Translation to parent frame from local frame (t_pl). @@ -286,7 +282,7 @@ def add_light_directional( self._websock_interface.queue_message( _messages.DirectionalLightMessage( - name, position, intensity, color, cast_shadow + name, position, intensity, color, ) ) return LightHandle._make(self, name, wxyz, position, visible) @@ -301,8 +297,7 @@ def add_light_ambient( visible: bool = True, ) -> LightHandle: """ - Add an ambient light to the scene. This light cannot be used to cast shadows as - it does not have a direction. + Add an ambient light to the scene. Args: name: A scene tree name. Names in the format of /parent/child can be used to @@ -362,7 +357,6 @@ def add_light_point( self, name: str, color: int = 0xFFFFFF, - cast_shadow: bool = False, intensity: float = 1.0, distance: float = 0.0, decay: float = 2.0, @@ -378,9 +372,6 @@ def add_light_point( name: A scene tree name. Names in the format of /parent/child can be used to define a kinematic tree. color: hexadecimal color of the light. Default is 0xffffff (white). - cast_shadow: If set to true light will cast dynamic shadows. - Warning: This is expensive and requires tweaking to get shadows looking right. - The default is false. intensity: numeric value of the light's strength/intensity. Default is 1. distance: When distance is zero, light will attenuate according to inverse-square law to infinite distance. When distance is non-zero, light will attenuate according to @@ -400,7 +391,7 @@ def add_light_point( self._websock_interface.queue_message( _messages.PointLightMessage( - name, position, intensity, color, cast_shadow, distance, decay, power + name, position, intensity, color, distance, decay, power ) ) return LightHandle._make(self, name, wxyz, position, visible) @@ -452,7 +443,6 @@ def add_light_spot( angle: float = onp.pi / 3, penumbra: float = 0.0, decay: float = 2.0, - cast_shadow: bool = False, intensity: float = 1.0, wxyz: tuple[float, float, float, float] | onp.ndarray = (1.0, 0.0, 0.0, 0.0), position: tuple[float, float, float] = (0.0, 0.0, 0.0), @@ -475,9 +465,6 @@ def add_light_spot( Takes values between zero and 1. decay: The amount the light dims along the distance of the light. Default is 2. In context of physically-correct rendering the default value should not be changed. - cast_shadow: If set to true light will cast dynamic shadows. - Warning: This is expensive and requires tweaking to get shadows looking right. - The default is false. intensity: numeric value of the light's strength/intensity. Default is 1. wxyz: Quaternion rotation to parent frame from local frame (R_pl). position: Translation to parent frame from local frame (t_pl). @@ -497,7 +484,6 @@ def add_light_spot( angle, penumbra, decay, - cast_shadow, ) ) return LightHandle._make(self, name, wxyz, position, visible)