Skip to content

Commit ddc302d

Browse files
galouomichel
andauthored
Update documentation to 2022b+ (cyberbotics#5782)
* Update documentation to 2022b+ Signed-off-by: Gaël Écorchard <gael.ecorchard@cvut.cz> Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * Minor improvements * Updated screenshots --------- Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com>
1 parent 7d889e9 commit ddc302d

3 files changed

Lines changed: 35 additions & 26 deletions

File tree

-996 KB
Loading
4.3 KB
Loading

docs/reference/proto-example.md

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ This allows to store the position and orientation of the PROTO instances.
1212
"TwoColorChair.proto":
1313

1414
```
15-
#VRML_SIM R2023a utf8
15+
#VRML_SIM {{ webots.version.major }} utf8
1616
# license: Creative Commons Attribution 4.0 International License.
1717
# license url: https://creativecommons.org/licenses/by/4.0/legalcode
1818
# documentation url: https://www.cyberbotics.com/doc/guide/object-chairs
1919
# A two-color chair
2020
2121
PROTO TwoColorChair [
22-
field SFVec3f translation 0 0.91 0
22+
field SFVec3f translation 0 0 0.91
2323
field SFRotation rotation 0 0 1 0
2424
field SFString name "two-color chair"
2525
field SFColor legColor 1 1 0
@@ -33,11 +33,11 @@ PROTO TwoColorChair [
3333
rotation IS rotation
3434
children [
3535
Transform {
36-
translation 0 0 -0.27
36+
translation 0.27 0 0
3737
children IS seatExtensionSlot
3838
}
3939
Transform {
40-
translation 0 -0.35 0
40+
translation 0 0 -0.35
4141
children [
4242
Shape {
4343
appearance Appearance {
@@ -48,26 +48,26 @@ PROTO TwoColorChair [
4848
]
4949
}
5050
Transform {
51-
translation 0.25 -0.65 -0.23
51+
translation 0.23 -0.25 -0.65
5252
children [
5353
DEF LEG_SHAPE Shape {
5454
appearance Appearance {
5555
material Material { diffuseColor IS legColor }
5656
}
57-
geometry Box { size 0.075 0.52 0.075 }
57+
geometry Box { size 0.075 0.075 0.52 }
5858
}
5959
]
6060
}
6161
Transform {
62-
translation -0.25 -0.65 -0.23
62+
translation 0.23 0.25 -0.65
6363
children [ USE LEG_SHAPE ]
6464
}
6565
Transform {
66-
translation 0.25 -0.65 0.2
66+
translation -0.2 -0.25 -0.65
6767
children [ USE LEG_SHAPE ]
6868
}
6969
Transform {
70-
translation -0.25 -0.65 0.2
70+
translation -0.2 0.25 -0.65
7171
children [ USE LEG_SHAPE ]
7272
}
7373
]
@@ -88,30 +88,39 @@ Field values which differ from the default must be specified.
8888
"ThreeChairs.wbt":
8989

9090
```
91-
#VRML_SIM R2023a utf8
91+
#VRML_SIM {{ webots.version.major }} utf8
92+
93+
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/{{ webots.version.major }}/projects/appearances/protos/DamascusSteel.proto"
94+
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/{{ webots.version.major }}/projects/appearances/protos/VarnishedPine.proto"
95+
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/{{ webots.version.major }}/projects/objects/backgrounds/protos/TexturedBackground.proto"
96+
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/{{ webots.version.major }}/projects/objects/backgrounds/protos/TexturedBackgroundLight.proto"
97+
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/{{ webots.version.major }}/projects/objects/floors/protos/Floor.proto"
98+
EXTERNPROTO "../protos/TwoColorChair.proto"
9299
93100
WorldInfo {
94101
}
95102
Viewpoint {
96-
orientation -0.47498 0.85080 0.22479 1.07385
97-
position 4.45734 2.27766 4.69356
103+
orientation -0.141 0.263 0.954 1.078
104+
position -0.863 -3.489 1.757
105+
}
106+
TexturedBackground {
98107
}
99108
TexturedBackgroundLight {
109+
luminosity 0.5
100110
castShadows FALSE
101111
}
102112
PointLight {
103113
attenuation 0 0 1
104-
intensity 21
105-
location 4 4 -1
114+
intensity 20
115+
location -4 -4 1
106116
radius 10
107117
castShadows TRUE
108118
}
109119
Floor {
110-
translation 0 -0.91 0
111120
size 20 20
112121
}
113122
DEF GREEN_STOOL TwoColorChair {
114-
translation 1 0 3
123+
translation 0 0 0.9
115124
name "two-color chair(2)"
116125
legColor 0 0.666667 0
117126
seatColor 0.235294 0.470588 0
@@ -121,13 +130,13 @@ DEF GREEN_STOOL TwoColorChair {
121130
}
122131
}
123132
DEF YELLOW_CHAIR TwoColorChair {
124-
translation 1 0 2
133+
translation 1 0 0.9
125134
seatGeometry Box {
126-
size 0.6 0.1 0.6
135+
size 0.6 0.6 0.1
127136
}
128137
seatExtensionSlot [
129138
Transform {
130-
translation -0.28 -0.014 0.27
139+
translation -0.27 0.28 -0.014
131140
children [
132141
Shape {
133142
appearance PBRAppearance {
@@ -136,20 +145,20 @@ DEF YELLOW_CHAIR TwoColorChair {
136145
metalness 0
137146
}
138147
geometry Box {
139-
size 0.03 0.7 0.6
148+
size 0.6 0.03 0.7
140149
}
141150
}
142151
]
143152
}
144153
]
145154
}
146155
DEF DAMACUS_SPHERE TwoColorChair {
147-
translation 1 0 0
156+
translation 3 0 0.9
148157
name "two-color chair(1)"
149158
legColor 0.678431 0.678431 0.678431
150159
seatExtensionSlot [
151160
Transform {
152-
translation 0 -0.29 0.27
161+
translation -0.27 0 -0.29
153162
children [
154163
Shape {
155164
appearance DamascusSteel {
@@ -164,22 +173,22 @@ DEF DAMACUS_SPHERE TwoColorChair {
164173
]
165174
}
166175
DEF WOODEN_CHAIR TwoColorChair {
167-
translation 1 0 1
176+
translation 2 0 0.9
168177
name "two-color chair(3)"
169178
legColor 0.478431 0.239216 0
170179
seatColor 0.666667 0.333333 0
171180
seatGeometry Box {
172-
size 0.6 0.1 0.6
181+
size 0.6 0.6 0.1
173182
}
174183
seatExtensionSlot [
175184
Transform {
176-
translation -0.25 0.05 0.27
185+
translation -0.27 0.25 0.05
177186
children [
178187
Shape {
179188
appearance VarnishedPine {
180189
}
181190
geometry Box {
182-
size 0.1 0.7 0.6
191+
size 0.6 0.1 0.7
183192
}
184193
}
185194
]

0 commit comments

Comments
 (0)