How does signal working in editor? Is there some examples to refer?

var Signal = signals.Signal;

this.signals = {

	// script

	editScript: new Signal(),

	// player

	startPlayer: new Signal(),
	stopPlayer: new Signal(),

	// notifications

	editorCleared: new Signal(),

	savingStarted: new Signal(),
	savingFinished: new Signal(),

	transformModeChanged: new Signal(),
	snapChanged: new Signal(),
	spaceChanged: new Signal(),
	rendererChanged: new Signal(),
	rendererUpdated: new Signal(),

	sceneBackgroundChanged: new Signal(),
	sceneEnvironmentChanged: new Signal(),
	sceneFogChanged: new Signal(),
	sceneFogSettingsChanged: new Signal(),
	sceneGraphChanged: new Signal(),
	sceneRendered: new Signal(),

	cameraChanged: new Signal(),
	cameraResetted: new Signal(),

	geometryChanged: new Signal(),

	objectSelected: new Signal(),
	objectFocused: new Signal(),

	objectAdded: new Signal(),
	objectChanged: new Signal(),
	objectRemoved: new Signal(),

	cameraAdded: new Signal(),
	cameraRemoved: new Signal(),

	helperAdded: new Signal(),
	helperRemoved: new Signal(),

	materialAdded: new Signal(),
	materialChanged: new Signal(),
	materialRemoved: new Signal(),

	scriptAdded: new Signal(),
	scriptChanged: new Signal(),
	scriptRemoved: new Signal(),

	windowResize: new Signal(),

	showGridChanged: new Signal(),
	showHelpersChanged: new Signal(),
	refreshSidebarObject3D: new Signal(),
	historyChanged: new Signal(),

	viewportCameraChanged: new Signal(),

	animationStopped: new Signal()

};

From Editor.js file

1 Like

js-signals is a custom Event/Messaging system for JavaScript. You can read about this library right here: