@@ -82,18 +82,18 @@ describe('Test mesh3d', function() {
82
82
y : [ 0 , 0.5 , 1 , 0.5 ] ,
83
83
z : [ 0 , 0.5 , 0.5 , 1 ] ,
84
84
i : [ 0 , 0 , 0 , 1.00001 ] ,
85
- j : [ 1 , 1 , 2 , 2 ] ,
86
- k : [ 2 , 3 , 3 , 2.99999 ] ,
85
+ j : [ 1 , 1 , 2 , 1.99999 ] ,
86
+ k : [ 2 , 3 , 3 , 3.00001 ] ,
87
87
type : 'mesh3d'
88
88
} ] )
89
89
. then ( function ( ) {
90
- assertVisibility ( false , 'not to be visible' ) ;
90
+ assertVisibility ( true , 'to be visible' ) ;
91
91
} )
92
92
. catch ( failTest )
93
93
. then ( done ) ;
94
94
} ) ;
95
95
96
- it ( '@gl mesh3d should be invisible when the indices are equal or greater than the number of vertices' , function ( done ) {
96
+ it ( '@gl mesh3d should be visible when the indices are equal or greater than the number of vertices' , function ( done ) {
97
97
Plotly . plot ( gd , [ {
98
98
x : [ 0 , 1 , 0.5 , 0.5 ] ,
99
99
y : [ 0 , 0.5 , 1 , 0.5 ] ,
@@ -104,13 +104,13 @@ describe('Test mesh3d', function() {
104
104
type : 'mesh3d'
105
105
} ] )
106
106
. then ( function ( ) {
107
- assertVisibility ( false , 'not to be visible' ) ;
107
+ assertVisibility ( true , 'to be visible' ) ;
108
108
} )
109
109
. catch ( failTest )
110
110
. then ( done ) ;
111
111
} ) ;
112
112
113
- it ( '@gl mesh3d should be invisible when the indices are negative' , function ( done ) {
113
+ it ( '@gl mesh3d should be visible when the indices are negative' , function ( done ) {
114
114
Plotly . plot ( gd , [ {
115
115
x : [ 0 , 1 , 0.5 , 0.5 ] ,
116
116
y : [ 0 , 0.5 , 1 , 0.5 ] ,
@@ -121,13 +121,13 @@ describe('Test mesh3d', function() {
121
121
type : 'mesh3d'
122
122
} ] )
123
123
. then ( function ( ) {
124
- assertVisibility ( false , 'not to be visible' ) ;
124
+ assertVisibility ( true , 'to be visible' ) ;
125
125
} )
126
126
. catch ( failTest )
127
127
. then ( done ) ;
128
128
} ) ;
129
129
130
- it ( '@gl mesh3d should be invisible when the indices have different sizes' , function ( done ) {
130
+ it ( '@gl mesh3d should be visible when the indices have different sizes' , function ( done ) {
131
131
Plotly . plot ( gd , [ {
132
132
x : [ 0 , 1 , 0.5 , 0.5 ] ,
133
133
y : [ 0 , 0.5 , 1 , 0.5 ] ,
@@ -138,24 +138,7 @@ describe('Test mesh3d', function() {
138
138
type : 'mesh3d'
139
139
} ] )
140
140
. then ( function ( ) {
141
- assertVisibility ( false , 'not to be visible' ) ;
142
- } )
143
- . catch ( failTest )
144
- . then ( done ) ;
145
- } ) ;
146
-
147
- it ( '@gl mesh3d should be invisible when the indices of a triangle point to identical vertex twice' , function ( done ) {
148
- Plotly . plot ( gd , [ {
149
- x : [ 0 , 1 , 0.5 , 0.5 ] ,
150
- y : [ 0 , 0.5 , 1 , 0.5 ] ,
151
- z : [ 0 , 0.5 , 0.5 , 1 ] ,
152
- i : [ 0 , 0 , 0 , 1 ] ,
153
- j : [ 1 , 1 , 2 , 3 ] ,
154
- k : [ 2 , 3 , 3 , 3 ] ,
155
- type : 'mesh3d'
156
- } ] )
157
- . then ( function ( ) {
158
- assertVisibility ( false , 'not to be visible' ) ;
141
+ assertVisibility ( true , 'to be visible' ) ;
159
142
} )
160
143
. catch ( failTest )
161
144
. then ( done ) ;
@@ -222,6 +205,23 @@ describe('Test mesh3d', function() {
222
205
. catch ( failTest )
223
206
. then ( done ) ;
224
207
} ) ;
208
+
209
+ it ( '@gl mesh3d should be visible when values are passed in string format' , function ( done ) {
210
+ Plotly . plot ( gd , [ {
211
+ x : [ '0' , '1' , '0.5' , '0.5' ] ,
212
+ y : [ '0' , '0.5' , '1' , '0.5' ] ,
213
+ z : [ '0' , '0.5' , '0.5' , '1' ] ,
214
+ i : [ '0' , '0' , '0' , '1' ] ,
215
+ j : [ '1' , '1' , '2' , '2' ] ,
216
+ k : [ '2' , '3' , '3' , '3' ] ,
217
+ type : 'mesh3d'
218
+ } ] ) . then ( function ( ) {
219
+ assertVisibility ( true , 'not to be visible' ) ;
220
+ } )
221
+ . catch ( failTest )
222
+ . then ( done ) ;
223
+ } ) ;
224
+
225
225
} ) ;
226
226
227
227
} ) ;
0 commit comments