Use in server side apps
See original GitHub issueI’m using (and really enjoying) matter-js as a physics engine in a MMO game with an authoritative server architecture. To achieve this I need to run the physics simulation for the world on the server as well as the clients.
At present matter-js assumes the presence of a document
object which doesn’t exist within node.
To fix, I have included an extra bool option for the engine called createRenderer
then wrapped the Render.create()
call in a check for this property. There were also a couple of other places I needed to wrap, or return a function immediately, but once that was done everything worked perfectly.
Not sure if my solution is the best way to achieve this behaviour, but it would be a nice addition for scenarios such as mine.
Issue Analytics
- State:
- Created 8 years ago
- Comments:23 (8 by maintainers)
Top Results From Across the Web
Server-Side Apps - OAuth 2.0 Simplified
Server -side apps are the most common type of application encountered when dealing with OAuth servers. These apps run on a web server...
Read more >Introduction to the server side - Learn web development | MDN
Server -side programming allows developers to make use of sessions — basically, a mechanism that allows a server to store information on the ......
Read more >What do client side and server side mean? - Cloudflare
Much like with client side, 'server side' means everything that happens on the server, instead of on the client. In the past, nearly...
Read more >Client-Side vs. Server-Side Code: What's the Difference?
Server -side processing is used to interact with permanent storage like databases or files. The server will also render pages to the client...
Read more >Top 20 Server Side Tools You Will Love - Back4App Blog
This article will explore 20 of the best server side tools. The list include names like Back4App, Firebase, Docker, New Relic, etc.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You’re right, I’ll add this information to the readme shortly 👍
Not exactly ‘shortly’… but I’ve added a mention of support for Node.js in the readme!