You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constassert=require("assert").ok;constEventEmitter=require("events");constfs=require("fs");constpath=require("path");constnet=require("net");constglfw=require("node-glfw2");constSYMS=require("./syms.js").Server;constWebGL=require("node-webgl");classServerextendsEventEmitter{constructor(opts={}){super();opts=Object.assign(JSON.parse(fs.readFileSync(path.join(__dirname,"config-defaults.json")).toString()),opts);this[SYMS["document"]]=WebGL.document();this[SYMS["canvas"]]=this[SYMS["document"]].createElement("canvas",opts.res[0],opts.res[1]);glfw.WindowHint(glfw.RESIZABLE,false);if(opts.vsync)glfw.SwapInterval(1);elseglfw.SwapInterval(0);this[SYMS["document"]].setTitle("Droid.JS");console.log(this[SYMS["document"]]);this[SYMS["gl"]]=this[SYMS["canvas"]].getContext("experimental-webgl");this[SYMS["atb"]]=this[SYMS["document"]].AntTweakBar;this[SYMS["atb"]].Init();this[SYMS["atb"]].Define(" GLOBAL help='Droid.JS Alpha' ");this[SYMS["atb"]].WindowSize(opts.res[0],opts.res[1]);this[SYMS["document"]].requestAnimationFrame(()=>this.render(),1000/opts.fps);this[SYMS["socket"]]=net.createServer(opts.net,()=>{});this[SYMS["socket"]].listen(opts.net.port);}destroy(){this[SYMS["socket"]].close();}render(){this[SYMS["atb"]].Draw();}}module.exports=Server;
I'm working on something that requires a server, also I can't get it to not allow resizing and my DE is telling me the window isn't responding.
The text was updated successfully, but these errors were encountered:
I'm working on something that requires a server, also I can't get it to not allow resizing and my DE is telling me the window isn't responding.
The text was updated successfully, but these errors were encountered: