{"id":20430783,"url":"https://github.com/whitestormjs/network-module","last_synced_at":"2025-12-06T01:02:20.082Z","repository":{"id":123650087,"uuid":"165711355","full_name":"WhitestormJS/network-module","owner":"WhitestormJS","description":"🚀💬 Network module for Whitestorm.js (alpha)","archived":false,"fork":false,"pushed_at":"2019-01-14T19:38:25.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-24T14:15:10.146Z","etag":null,"topics":["networking","node","nodejs","npm","socket-io","websocket","whs"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WhitestormJS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-01-14T18:17:43.000Z","updated_at":"2019-01-17T09:37:39.000Z","dependencies_parsed_at":"2023-06-26T02:01:40.057Z","dependency_job_id":null,"html_url":"https://github.com/WhitestormJS/network-module","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WhitestormJS%2Fnetwork-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WhitestormJS%2Fnetwork-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WhitestormJS%2Fnetwork-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WhitestormJS%2Fnetwork-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WhitestormJS","download_url":"https://codeload.github.com/WhitestormJS/network-module/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241975135,"owners_count":20051428,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["networking","node","nodejs","npm","socket-io","websocket","whs"],"created_at":"2024-11-15T08:09:07.404Z","updated_at":"2025-12-06T01:02:19.987Z","avatar_url":"https://github.com/WhitestormJS.png","language":null,"readme":"# network-module [![NPM Version](https://img.shields.io/npm/v/physics-module-ammonext.svg?style=flat-square)](https://www.npmjs.com/package/network-module)\nNetworking module for Whitestorm.js [Alpha]\n\n\u003e Go to [WhitestormJS/whitestorm.js](https://github.com/WhitestormJS/whitestorm.js)\n\n![physics module](http://i.imgur.com/ZdMhDwb.png)\n\n# Modules List\n\n## `new NETWORK.Connection()`\n\n```javascript\nconst app = new WHS.App({\n  // ...\n  new NETWORK.Connection({\n    host: 'localhost',\n    port: 3000,\n    protocol: 'http'\n  })\n});\n\napp.start();\n```\n\n## `new NETWORK.Identity()`\n\n```javascript\nconst box = new WHS.Box({\n  geometry: {\n    width: 2,\n    height: 2,\n    depth: 2\n  },\n  \n  modules: [\n    new NETWORK.Identity()\n  ],\n  \n  material: new THREE.MeshBasicMaterial({color: 0xff0000})\n});\n\nbox.addTo(app);\n```\n\n## `new NETWORK.Transform()`\n\n```javascript\nconst box = new WHS.Box({\n  geometry: {\n    width: 2,\n    height: 2,\n    depth: 4\n  },\n  \n  modules: [\n    new NETWORK.Transform({\n      position: true,\n      rotation: true,\n      scale: false,\n      animation: true\n    })\n  ],\n  \n  material: new THREE.MeshBasicMaterial({color: 0xff0000})\n});\n\nbox.addTo(app);\n```\n\n## `new NETWORK.Event()`\nYou can use this to allow for special events to be fired on objects. This is easy to do, and allows for great control over different objects.\n\n```javascript\nconst box = new WHS.Box({\n  geometry: {\n    width: 2,\n    height: 2,\n    depth: 4\n  },\n  \n  modules: [\n    new NETWORK.Event({\n      name: 'myCustomEvent'\n      id: 0,\n      handler: (data) =\u003e {\n        doSomething();\n      };\n    })\n  ],\n  \n  material: new THREE.MeshBasicMaterial({color: 0xff0000})\n});\n\nbox.addTo(app);\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhitestormjs%2Fnetwork-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhitestormjs%2Fnetwork-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhitestormjs%2Fnetwork-module/lists"}