src/loaders/support/LoaderWorkerSupport.js
function ( e ) {
		var payload = e.data;
		switch ( payload.cmd ) {
			case 'meshData':
			case 'materialData':
			case 'imageData':
				this.runtimeRef.callbacks.meshBuilder( payload );
				break;

			case 'complete':
				this.runtimeRef.queuedMessage = null;
				this.started = false;
				this.runtimeRef.callbacks.onLoad( payload.msg );

				if ( this.runtimeRef.terminateRequested ) {

					if ( this.runtimeRef.logging.enabled ) console.info( 'WorkerSupport [' + this.runtimeRef.runnerImplName + ']: Run is complete. Terminating application on request!' );
					this.runtimeRef._terminate();

				}
				break;

			case 'error':
				console.error( 'WorkerSupport [' + this.runtimeRef.runnerImplName + ']: Reported error: ' + payload.msg );
				this.runtimeRef.queuedMessage = null;
				this.started = false;
				this.runtimeRef.callbacks.onLoad( payload.msg );

				if ( this.runtimeRef.terminateRequested ) {

					if ( this.runtimeRef.logging.enabled ) console.info( 'WorkerSupport [' + this.runtimeRef.runnerImplName + ']: Run reported error. Terminating application on request!' );
					this.runtimeRef._terminate();

				}
				break;

			default:
				console.error( 'WorkerSupport [' + this.runtimeRef.runnerImplName + ']: Received unknown command: ' + payload.cmd );
				break;

		}
	}
function ( e ) {
		var payload = e.data;
		switch ( payload.cmd ) {
			case 'meshData':
			case 'materialData':
			case 'imageData':
				this.runtimeRef.callbacks.meshBuilder( payload );
				break;

			case 'complete':
				this.runtimeRef.queuedMessage = null;
				this.started = false;
				this.runtimeRef.callbacks.onLoad( payload.msg );

				if ( this.runtimeRef.terminateRequested ) {

					if ( this.runtimeRef.logging.enabled ) console.info( 'WorkerSupport [' + this.runtimeRef.runnerImplName + ']: Run is complete. Terminating application on request!' );
					this.runtimeRef._terminate();

				}
				break;

			case 'error':
				console.error( 'WorkerSupport [' + this.runtimeRef.runnerImplName + ']: Reported error: ' + payload.msg );
				this.runtimeRef.queuedMessage = null;
				this.started = false;
				this.runtimeRef.callbacks.onLoad( payload.msg );

				if ( this.runtimeRef.terminateRequested ) {

					if ( this.runtimeRef.logging.enabled ) console.info( 'WorkerSupport [' + this.runtimeRef.runnerImplName + ']: Run reported error. Terminating application on request!' );
					this.runtimeRef._terminate();

				}
				break;

			default:
				console.error( 'WorkerSupport [' + this.runtimeRef.runnerImplName + ']: Received unknown command: ' + payload.cmd );
				break;

		}
	}
function ( e ) { var payload = e . data ; switch ( payload . cmd ) { case 'meshData' : case 'materialData' : case 'imageData' : this . runtimeRef . callbacks . meshBuilder ( payload ) ; break ; case 'complete' : this . runtimeRef . queuedMessage = null ; this . started = false ; this . runtimeRef . callbacks . onLoad ( payload . msg ) ; if ( this . runtimeRef . terminateRequested ) { if ( this . runtimeRef . logging . enabled ) console . info ( 'WorkerSupport [' + this . runtimeRef . runnerImplName + ']: Run is complete. Terminating application on request!' ) ; this . runtimeRef . _terminate ( ) ; } break ; case 'error' : console . error ( 'WorkerSupport [' + this . runtimeRef . runnerImplName + ']: Reported error: ' + payload . msg ) ; this . runtimeRef . queuedMessage = null ; this . started = false ; this . runtimeRef . callbacks . onLoad ( payload . msg ) ; if ( this . runtimeRef . terminateRequested ) { if ( this . runtimeRef . logging . enabled ) console . info ( 'WorkerSupport [' + this . runtimeRef . runnerImplName + ']: Run reported error. Terminating application on request!' ) ; this . runtimeRef . _terminate ( ) ; } break ; default : console . error ( 'WorkerSupport [' + this . runtimeRef . runnerImplName + ']: Received unknown command: ' + payload . cmd ) ; break ; } }
Executed in worker scope
Executed in worker scope