-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Comments
in case someone is interested, here you can find the window manager implemented with channel broadcast: and the published app: |
I suggest to use Channel Broadcast instead of locale storage 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 ) )) |
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://private-user-images.githubusercontent.com/63521765/285488403-fb6fdf4f-8fdb-4845-83c0-84863b7d3abb.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk5ODE5NjgsIm5iZiI6MTcxOTk4MTY2OCwicGF0aCI6Ii82MzUyMTc2NS8yODU0ODg0MDMtZmI2ZmRmNGYtOGZkYi00ODQ1LTgzYzAtODQ4NjNiN2QzYWJiLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzAzVDA0NDEwOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgzNzBlZjEzMDU0M2MxNjMwODY5MzdlYmNiNjkxYjQ1YmIxZjg5OWVhNzg3MjczMWRkNmVhNGRkM2MwMWYzZDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.JbGr2bkE7GaXu8KhniC_6l_TsZ9NMMGZNVdwzzCRf5c)
https://github.com/zakarialaoui10/ziko.js
The text was updated successfully, but these errors were encountered: