Skip to content

Commit

Permalink
refactor: get rid of schema semantics (tbc...)
Browse files Browse the repository at this point in the history
  • Loading branch information
b-ma committed Oct 2, 2024
1 parent fa5d571 commit 3311196
Show file tree
Hide file tree
Showing 2 changed files with 135 additions and 136 deletions.
13 changes: 7 additions & 6 deletions src/client/ClientStateManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ import BaseStateManager from '../common/BaseStateManager.js';
/**
* @callback ClientStateManager~ObserveCallback
* @async
* @param {String} schemaName - name of the schema
* @param {Number} stateId - id of the state
* @param {Number} nodeId - id of the node that created the state
* @param {String} className - Name of the shared state class.
* @param {Number} stateId - Id of the state.
* @param {Number} nodeId - Id of the node that created the state.
*/

/**
* The `ClientStateManager` allows to create new {@link SharedState}s, or attach
* to {@link SharedState}s created by other nodes (clients or server). It
* can also track all the {@link SharedState}s created by other nodes.
* to {@link SharedState}s created by other nodes (clients or server) on the network.
*
* It can also observe all the {@link SharedState}s created on the network.
*
* An instance of `ClientStateManager` is automatically created by the `soundworks.Client`
* at initialization (cf. {@link client.Client#stateManager}).
Expand All @@ -25,7 +26,7 @@ import BaseStateManager from '../common/BaseStateManager.js';
* import { Server } from '@soundworks/server/index.js';
*
* const server = new Server(config);
* // declare and register the schema of a shared state.
* // define a class of shared state.
* server.stateManager.registerSchema('some-global-state', {
* myRandom: {
* type: 'float',
Expand Down
Loading

0 comments on commit 3311196

Please sign in to comment.