
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@etherealengine/hyperflux
Advanced tools
HyperFlux brings together various state management strategies in Ethereal Engine, in a way that makes it easy to introspect and test.
In Ethereal Engine, we define 3 different stores
The ENGINE store is, meaning actions are dispatched directly on the incoming queue, and run on the Engine timer.
createHyperStore({
name: 'ENGINE',
getDispatchId: () => 'engine',
getDispatchTime: () => Engine.instance.elapsedTime
})
// IncomingActionSystem
import { applyIncomingActions } from '@etherealengine/hyperflux'
export default async function IncomingActionSystem(world) {
return () => {
applyIncomingActions(Engine.instance.store)
}
}
In any case, the appropriate store must be provided when dispatching an action:
dispatchAction( WorldNetworkAction.spawnAvatar({ parameters }))
Likewise when adding or removing receptors:
addActionReceptor((a) =>
matches(a).when(WorldNetworkAction.spawnObject.matches, (a) => recepted.push(a))
)
State objects can also be defined and retrieved from a store:
const PeerState = defineState('peers', () => {
return [] // initial state
})
// get state
const peerState = getState(Engine.instance.store, PeerState)
All incoming, outoing, and historical actions accessible on the store.actions
object.
FAQs
State Management for Ethereal Engine
We found that @etherealengine/hyperflux demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.