{"size": 1017, "ext": "js", "max_stars_repo_path": "browser/plugins/three_ambient_light.plugin.js", "max_stars_repo_name": "waskosky/patches", "max_stars_repo_stars_event_min_datetime": "2015-09-21T15:08:57.000Z", "max_stars_repo_stars_event_max_datetime": "2017-07-31T08:01:22.000Z", "max_issues_repo_path": "browser/plugins/three_ambient_light.plugin.js", "max_issues_repo_name": "waskosky/patches", "max_issues_repo_issues_event_min_datetime": "2015-09-15T23:49:33.000Z", "max_issues_repo_issues_event_max_datetime": "2017-08-01T08:52:00.000Z", "max_forks_repo_path": "browser/plugins/three_ambient_light.plugin.js", "max_forks_repo_name": "waskosky/patches", "max_forks_repo_forks_event_min_datetime": "2015-10-11T10:42:50.000Z", "max_forks_repo_forks_event_max_datetime": "2017-07-16T22:31:42.000Z"}
{"max_stars_count": 187, "max_issues_count": 1533, "max_forks_count": 52, "avg_line_length": 25.425, "max_line_length": 81, "alphanum_fraction": 0.7433628319}
(function() {
	var ThreeAmbientLightPlugin = E2.plugins.three_ambient_light = function(core) {
		ThreeObject3DPlugin.apply(this, arguments)

		this.input_slots = [
			{ name: 'color', dt: core.datatypes.COLOR }
		]

		this.desc = 'THREE.js Ambient Light'
	}

	ThreeAmbientLightPlugin.prototype = Object.create(ThreeObject3DPlugin.prototype)

	ThreeAmbientLightPlugin.prototype.reset = function() {
		ThreeObject3DPlugin.prototype.reset.apply(this)

		this.setObject3D(new THREE.AmbientLight( 0x777777 )) // soft white light
	}

	ThreeAmbientLightPlugin.prototype.update_input = function(slot, data) {
		if (!this.object3d)
			return;

		this.object3d.color = data
	}

	// disable scaling & quaternion, they don't make sense for ambient lights
	// (position doesn't either but we'll keep it so that the helper can
	// be moved out of the way)
	ThreeAmbientLightPlugin.prototype.canEditScale = function() {
		return false
	}

	ThreeAmbientLightPlugin.prototype.canEditQuaternion = function() {
		return false
	}

})()

