Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion : Channel Broadcast instead of locale storage #8

Open
zakarialaoui10 opened this issue Nov 24, 2023 · 2 comments
Open

Suggestion : Channel Broadcast instead of locale storage #8

zakarialaoui10 opened this issue Nov 24, 2023 · 2 comments

Comments

@zakarialaoui10
Copy link

zakarialaoui10 commented Nov 24, 2023

I suggest to use Channel Broadcast instead of locale storage

Using Channel Broadcast can be a more efficient way to manage communication between components or services compared to local storage, as it allows for real-time updates without the need for persistent storage.

I am already using this approach on similar project
Screenshot_20231124-155728_GitHub.jpg

https://github.com/zakarialaoui10/ziko.js

@zakarialaoui10 zakarialaoui10 changed the title Suggestion Suggestion : Channel Broadcast instead of locale storage Nov 24, 2023
@szucsz
Copy link

szucsz commented Nov 25, 2023

in case someone is interested, here you can find the window manager implemented with channel broadcast:
https://github.com/szucsz/multipleWindow3dScene/tree/broadcast-channel

and the published app:
https://szucsz.github.io/multipleWindow3dScene/

@liushengrui527
Copy link

I suggest to use Channel Broadcast instead of locale storage
Scene=new SceneGl ( 400, 400 )

b=cube3(2)

Scene .addGl(b)

c=Ziko. Events. Channel( "test")

btn("Update Scene Color") .onClick(( )=>[

const Color=Random.color( )

Scene . background(Color)

c. emit("update_ scene_ color", Color

c. on( "update_ scene_ color" , e=>Scene[0]color(e))

btn("Update Mesh Color") .onClick(()=>

const Color=Random.color ( )

Scene[0] .color (Color)

c. emit("update mesh_ color" , Color )

))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants