File tree 1 file changed +27
-0
lines changed
src/viewer/scene/sectionPlane
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,29 @@ class SectionPlane extends Component {
172
172
return this . _state . quaternion ;
173
173
}
174
174
175
+ /**
176
+ * Sets the roll of this SectionPlane's plane.
177
+ *
178
+ * Default value is ````0````.
179
+ *
180
+ * @param {Number[] } value New roll.
181
+ */
182
+ set roll ( value ) {
183
+ this . _state . roll = value || 0 ;
184
+ this . _onDirRollUpdated ( ) ;
185
+ }
186
+
187
+ /**
188
+ * Gets the roll of this SectionPlane's plane.
189
+ *
190
+ * Default value is ````0````.
191
+ *
192
+ * @returns {Number[] } value Current roll.
193
+ */
194
+ get roll ( ) {
195
+ return this . _state . roll ;
196
+ }
197
+
175
198
/**
176
199
* Sets the direction of this SectionPlane's plane.
177
200
*
@@ -181,6 +204,10 @@ class SectionPlane extends Component {
181
204
*/
182
205
set dir ( value ) {
183
206
this . _state . dir . set ( value || front ) ;
207
+ this . _onDirRollUpdated ( ) ;
208
+ }
209
+
210
+ _onDirRollUpdated ( ) {
184
211
math . vec3PairToQuaternion ( back , this . _state . dir , this . _state . quaternion ) ;
185
212
186
213
tempVec4a [ 0 ] = 0 ;
You can’t perform that action at this time.
0 commit comments