Does anyone have any experience testing with Cesium/Electron/Jenkins? If so, could you share any tips on how you set it up?
If this can't be done in Jenkins, are there any systems that you would recommend that would allow for testing with Cesium/Electron?
P.S. Currently using spectron/mocha/chai for testing. Is there something better?
Thanks in advance
--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
// initialize the Cesium globe
this.view = new Cesium.Viewer( 'cesium', {
contextOptions: {
getWebGLStub: getWebGLStub
}
} )
This is my Viewer creation. I have included the stub, defaultValue, and all the other files needed for the Stub to function. The globe still renders. Is there something I'm missing?
I have it declared in the same file.
let options = defaultValue( options, {} )
options.contextOptions = defaultValue( options.contextOptions, {} )
options.contextOptions.webgl = defaultValue( options.contextOptions.webgl, {} )
if ( !!window.webglStub ) {
options.contextOptions.getWebGLStub = getWebGLStub
}
this.view = new Cesium.Viewer( 'cesium', options )
This is how I'm defining the options.
All of the files needed:
clone.js
defaultValue.js
defined.js
DeveloperError.js
freezeObject.js
getWebGLStub.js
WebGLConstants.js
These files are all in the same folder together and all of their requirements match up to the same directory as well eg.
define( [
'./clone',
'./defaultValue',
'./defined',
'./DeveloperError',
'./WebGLConstants'
], function(
clone,
defaultValue,
defined,
DeveloperError,
WebGLConstants ) ...
For the rest of the initialization of cesium, I'm doing this:
this.view.scene.globe.imageryLayers._layers[ 0 ].name = 'Natural Earth (Default)'
this.eventhandler = new Cesium.ScreenSpaceEventHandler( this.view.scene.canvas )
this.createCollections()
Cesium.knockout.getObservable( this.view.animation.viewModel, 'timeLabel' ).subscribe( this.throttleEmitTimeUpdate.call( this ) )
this.ipc.on( 'render-data', ( event, sources ) => this.render( sources ) )
this.ipc.on( 'clear-data', () => {
this.view.dataSources.removeAll()
this.createCollections()
} )
Cesium.CzmlDataSource.updaters.push( this.processCustomStaticProperty )
Cesium.DataSourceCollection.prototype.__defineGetter__( 'sources', function() {
return this._dataSources
} )
Cesium.CzmlDataSource.prototype.getById = function( id ) {
return _.find( this.entities.values, {
id: id
} )
}
this.registerCustomEventEmitters()
}
AFAIK, nothing I've done here should cause the webGL stub to break.
Currently the scene still renders and tries to default to Bing.
I feel like I'm missing something to do with activating the stub.
Was I supposed to take all of those files out of cesium?
Am I supposed to pass something to the stub as parameters when assigning it to: options.contextOptions.getWebGLStub = getWebGLStub
I'm not quite sure what I'm missing and have no logs to follow.
Thanks a bunch for the help!
The issue turned out to be that we had Cesium 1.29 and the ability to use the WebGL Stub was introduced at 1.30. It was on the line right above the 1.29 changes in the Changelog. If you hear screaming and stuff smashing, it may be Jonathan and I :)
Thanks man