@@ -82,18 +82,18 @@ describe('Test mesh3d', function() {
8282 y : [ 0 , 0.5 , 1 , 0.5 ] ,
8383 z : [ 0 , 0.5 , 0.5 , 1 ] ,
8484 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 ] ,
8787 type : 'mesh3d'
8888 } ] )
8989 . then ( function ( ) {
90- assertVisibility ( false , 'not to be visible' ) ;
90+ assertVisibility ( true , 'to be visible' ) ;
9191 } )
9292 . catch ( failTest )
9393 . then ( done ) ;
9494 } ) ;
9595
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 ) {
9797 Plotly . plot ( gd , [ {
9898 x : [ 0 , 1 , 0.5 , 0.5 ] ,
9999 y : [ 0 , 0.5 , 1 , 0.5 ] ,
@@ -104,13 +104,13 @@ describe('Test mesh3d', function() {
104104 type : 'mesh3d'
105105 } ] )
106106 . then ( function ( ) {
107- assertVisibility ( false , 'not to be visible' ) ;
107+ assertVisibility ( true , 'to be visible' ) ;
108108 } )
109109 . catch ( failTest )
110110 . then ( done ) ;
111111 } ) ;
112112
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 ) {
114114 Plotly . plot ( gd , [ {
115115 x : [ 0 , 1 , 0.5 , 0.5 ] ,
116116 y : [ 0 , 0.5 , 1 , 0.5 ] ,
@@ -121,13 +121,13 @@ describe('Test mesh3d', function() {
121121 type : 'mesh3d'
122122 } ] )
123123 . then ( function ( ) {
124- assertVisibility ( false , 'not to be visible' ) ;
124+ assertVisibility ( true , 'to be visible' ) ;
125125 } )
126126 . catch ( failTest )
127127 . then ( done ) ;
128128 } ) ;
129129
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 ) {
131131 Plotly . plot ( gd , [ {
132132 x : [ 0 , 1 , 0.5 , 0.5 ] ,
133133 y : [ 0 , 0.5 , 1 , 0.5 ] ,
@@ -138,24 +138,7 @@ describe('Test mesh3d', function() {
138138 type : 'mesh3d'
139139 } ] )
140140 . 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' ) ;
159142 } )
160143 . catch ( failTest )
161144 . then ( done ) ;
@@ -222,6 +205,23 @@ describe('Test mesh3d', function() {
222205 . catch ( failTest )
223206 . then ( done ) ;
224207 } ) ;
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+
225225 } ) ;
226226
227227} ) ;
0 commit comments