Skip to content

Commit 702c69d

Browse files
Benjamin Délèzeomichel
andauthored
Configurable window glass (#6106)
* Configurable window glass * Update changelog-r2023.md * Update changelog-r2023.md * Update projects/objects/apartment_structure/protos/Window.proto Co-authored-by: Olivier Michel <[email protected]> * Update projects/objects/apartment_structure/protos/Window.proto Co-authored-by: Olivier Michel <[email protected]> * Update projects/objects/apartment_structure/protos/Window.proto Co-authored-by: Olivier Michel <[email protected]> --------- Co-authored-by: Olivier Michel <[email protected]>
1 parent a363a56 commit 702c69d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/reference/changelog-r2023.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Released on ??
1414
- Added `maxContactJoints` field to `ContactProperties` node to give users control over the tradeoff between collision accuracy and performance ([#5769](https://github.com/cyberbotics/webots/pull/5769)).
1515
- Improved MATLAB controllers to support input arguments ([#5943](https://github.com/cyberbotics/webots/pull/5943)).
1616
- Update names of TIAGo models and add default RGBD camera ([#6082](https://github.com/cyberbotics/webots/pull/6082)).
17+
- Add parameters to change the glass color and opacity of the `Window.proto` ([#6106](https://github.com/cyberbotics/webots/pull/6106)).
1718

1819
## Webots R2023a Revision 1
1920
Released on ??

projects/objects/apartment_structure/protos/Window.proto

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ PROTO Window [
1414
field SFRotation rotation 0 0 1 0
1515
field SFString name "window"
1616
field SFVec3f size 0.2 0.8 2.4 # Defines the size of the window.
17+
field SFColor glassColor 0.8 0.8 0.8 # Defines the color of the window.
18+
field SFFloat glassTransparency 0.8 # Defines the transparency of the window.
1719
field SFFloat windowThickness 0.05 # Defines the thickness of the window.
1820
field SFFloat bottomWallHeight 0.7 # Defines the height of the top wall.
1921
field SFFloat windowHeight 1.4 # Defines the height of the window.
@@ -126,9 +128,9 @@ PROTO Window [
126128
name "glass"
127129
size %<= windowThickness >% %<= size.y - 2 * frameSize.y >% %<= windowHeight - 2 * frameSize.z >%
128130
appearance PBRAppearance {
129-
baseColor 0.8 0.8 0.8
131+
baseColor IS glassColor
130132
metalness 0
131-
transparency 0.8
133+
transparency IS glassTransparency
132134
}
133135
castShadows IS castShadows
134136
}

0 commit comments

Comments
 (0)