Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

WhitestormJS/network-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

6 Commits

Repository files navigation

network-module NPM Version

Networking module for Whitestorm.js [Alpha]

Go to WhitestormJS/whitestorm.js

physics module

Modules List

new NETWORK.Connection()

const app = new WHS.App({
 // ...
 new NETWORK.Connection({
 host: 'localhost',
 port: 3000,
 protocol: 'http'
 })
});
app.start();

new NETWORK.Identity()

const box = new WHS.Box({
 geometry: {
 width: 2,
 height: 2,
 depth: 2
 },
 
 modules: [
 new NETWORK.Identity()
 ],
 
 material: new THREE.MeshBasicMaterial({color: 0xff0000})
});
box.addTo(app);

new NETWORK.Transform()

const box = new WHS.Box({
 geometry: {
 width: 2,
 height: 2,
 depth: 4
 },
 
 modules: [
 new NETWORK.Transform({
 position: true,
 rotation: true,
 scale: false,
 animation: true
 })
 ],
 
 material: new THREE.MeshBasicMaterial({color: 0xff0000})
});
box.addTo(app);

new NETWORK.Event()

You 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.

const box = new WHS.Box({
 geometry: {
 width: 2,
 height: 2,
 depth: 4
 },
 
 modules: [
 new NETWORK.Event({
 name: 'myCustomEvent'
 id: 0,
 handler: (data) => {
 doSomething();
 };
 })
 ],
 
 material: new THREE.MeshBasicMaterial({color: 0xff0000})
});
box.addTo(app);

About

πŸš€πŸ’¬ Network module for Whitestorm.js (alpha)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /