File tree 2 files changed +21
-3
lines changed
2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,15 @@ define([
76
76
this . eyeDomeLightingRadius = defaultValue ( pointCloudShading . eyeDomeLightingRadius , 1.0 ) ;
77
77
}
78
78
79
- PointCloudShading . isSupported = PointCloudEyeDomeLighting . isSupported ;
79
+ /**
80
+ * Determines if point cloud shading is supported.
81
+ *
82
+ * @param {Scene } scene The scene.
83
+ * @returns {Boolean } <code>true</code> if point cloud shading is supported; otherwise, returns <code>false</code>
84
+ */
85
+ PointCloudShading . isSupported = function ( scene ) {
86
+ return PointCloudEyeDomeLighting . isSupported ( scene . context ) ;
87
+ }
80
88
81
89
return PointCloudShading ;
82
90
} ) ;
Original file line number Diff line number Diff line change 1
1
defineSuite ( [
2
- 'Scene/PointCloudShading'
2
+ 'Scene/PointCloudShading' ,
3
+ 'Specs/createScene'
3
4
] , function (
4
- PointCloudShading ) {
5
+ PointCloudShading ,
6
+ createScene ) {
5
7
'use strict' ;
6
8
7
9
it ( 'creates expected instance from raw assignment and construction' , function ( ) {
@@ -30,4 +32,12 @@ defineSuite([
30
32
expect ( pointCloudShading . eyeDomeLightingStrength ) . toEqual ( options . eyeDomeLightingStrength ) ;
31
33
expect ( pointCloudShading . eyeDomeLightingRadius ) . toEqual ( options . eyeDomeLightingRadius ) ;
32
34
} ) ;
35
+
36
+ it ( 'provides a method for checking if point cloud shading is supported' , function ( ) {
37
+ var scene = createScene ( ) ;
38
+ var context = scene . context ;
39
+ var expectedSupport = context . floatingPointTexture && context . drawBuffers && context . fragmentDepth ;
40
+ expect ( PointCloudShading . isSupported ( scene ) ) . toEqual ( expectedSupport ) ;
41
+ scene . destroyForSpecs ( ) ;
42
+ } ) ;
33
43
} ) ;
You can’t perform that action at this time.
0 commit comments