11defineSuite ( [
22 'Core/GeometryPipeline' ,
3+ 'Core/arraySlice' ,
34 'Core/AttributeCompression' ,
45 'Core/BoundingSphere' ,
56 'Core/BoxGeometry' ,
@@ -22,6 +23,7 @@ defineSuite([
2223 'Core/VertexFormat'
2324 ] , function (
2425 GeometryPipeline ,
26+ arraySlice ,
2527 AttributeCompression ,
2628 BoundingSphere ,
2729 BoxGeometry ,
@@ -1739,7 +1741,7 @@ defineSuite([
17391741 minimum : new Cartesian3 ( - 250000.0 , - 250000.0 , - 250000.0 )
17401742 } ) ) ;
17411743 expect ( geometry . attributes . normal ) . toBeDefined ( ) ;
1742- var originalNormals = Array . prototype . slice . call ( geometry . attributes . normal . values ) ;
1744+ var originalNormals = arraySlice ( geometry . attributes . normal . values ) ;
17431745
17441746 geometry = GeometryPipeline . compressVertices ( geometry ) ;
17451747
@@ -1763,7 +1765,7 @@ defineSuite([
17631765 minimum : new Cartesian3 ( - 250000.0 , - 250000.0 , - 250000.0 )
17641766 } ) ) ;
17651767 expect ( geometry . attributes . st ) . toBeDefined ( ) ;
1766- var originalST = Array . prototype . slice . call ( geometry . attributes . st . values ) ;
1768+ var originalST = arraySlice ( geometry . attributes . st . values ) ;
17671769
17681770 geometry = GeometryPipeline . compressVertices ( geometry ) ;
17691771
@@ -1794,8 +1796,8 @@ defineSuite([
17941796 } ) ) ;
17951797 expect ( geometry . attributes . normal ) . toBeDefined ( ) ;
17961798 expect ( geometry . attributes . st ) . toBeDefined ( ) ;
1797- var originalNormals = Array . prototype . slice . call ( geometry . attributes . normal . values ) ;
1798- var originalST = Array . prototype . slice . call ( geometry . attributes . st . values ) ;
1799+ var originalNormals = arraySlice ( geometry . attributes . normal . values ) ;
1800+ var originalST = arraySlice ( geometry . attributes . st . values ) ;
17991801
18001802 geometry = GeometryPipeline . compressVertices ( geometry ) ;
18011803
@@ -1826,9 +1828,9 @@ defineSuite([
18261828 expect ( geometry . attributes . normal ) . toBeDefined ( ) ;
18271829 expect ( geometry . attributes . tangent ) . toBeDefined ( ) ;
18281830 expect ( geometry . attributes . bitangent ) . toBeDefined ( ) ;
1829- var originalNormals = Array . prototype . slice . call ( geometry . attributes . normal . values ) ;
1830- var originalTangents = Array . prototype . slice . call ( geometry . attributes . tangent . values ) ;
1831- var originalBitangents = Array . prototype . slice . call ( geometry . attributes . bitangent . values ) ;
1831+ var originalNormals = arraySlice ( geometry . attributes . normal . values ) ;
1832+ var originalTangents = arraySlice ( geometry . attributes . tangent . values ) ;
1833+ var originalBitangents = arraySlice ( geometry . attributes . bitangent . values ) ;
18321834
18331835 geometry = GeometryPipeline . compressVertices ( geometry ) ;
18341836
@@ -1949,10 +1951,10 @@ defineSuite([
19491951 var index ;
19501952
19511953 // Expect eastern hemisphere vertices to all be 255 or 127 at the end of the value
1952- expect ( newScalars . indexOf ( 127 ) ) . not . toBe ( - 1 ) ;
1953- expect ( newVec4s . indexOf ( 127 ) ) . not . toBe ( - 1 ) ;
1954- expect ( newVec3s . indexOf ( 127 ) ) . not . toBe ( - 1 ) ;
1955- expect ( newVec2s . indexOf ( 127 ) ) . not . toBe ( - 1 ) ;
1954+ expect ( Array . prototype . indexOf . call ( newScalars , 127 ) ) . not . toBe ( - 1 ) ;
1955+ expect ( Array . prototype . indexOf . call ( newVec4s , 127 ) ) . not . toBe ( - 1 ) ;
1956+ expect ( Array . prototype . indexOf . call ( newVec3s , 127 ) ) . not . toBe ( - 1 ) ;
1957+ expect ( Array . prototype . indexOf . call ( newVec2s , 127 ) ) . not . toBe ( - 1 ) ;
19561958 for ( i = 0 ; i < 3 ; i ++ ) {
19571959 expect ( newScalars [ i ] === 255 || newScalars [ i ] === 127 ) . toBe ( true ) ;
19581960
@@ -1981,10 +1983,10 @@ defineSuite([
19811983 newScalars = westHemisphereGeometry . attributes . scalars . values ;
19821984
19831985 // Expect eastern hemisphere vertices to all be 0 or 127 at the end of the value
1984- expect ( newScalars . indexOf ( 127 ) ) . not . toBe ( - 1 ) ;
1985- expect ( newVec4s . indexOf ( 127 ) ) . not . toBe ( - 1 ) ;
1986- expect ( newVec3s . indexOf ( 127 ) ) . not . toBe ( - 1 ) ;
1987- expect ( newVec2s . indexOf ( 127 ) ) . not . toBe ( - 1 ) ;
1986+ expect ( Array . prototype . indexOf . call ( newScalars , 127 ) ) . not . toBe ( - 1 ) ;
1987+ expect ( Array . prototype . indexOf . call ( newVec4s , 127 ) ) . not . toBe ( - 1 ) ;
1988+ expect ( Array . prototype . indexOf . call ( newVec3s , 127 ) ) . not . toBe ( - 1 ) ;
1989+ expect ( Array . prototype . indexOf . call ( newVec2s , 127 ) ) . not . toBe ( - 1 ) ;
19881990 for ( i = 0 ; i < 4 ; i ++ ) {
19891991 expect ( newScalars [ i ] === 0 || newScalars [ i ] === 127 ) . toBe ( true ) ;
19901992
0 commit comments