diff --git a/LJ.conf b/LJ.conf index 9287c28..5a6e41e 100644 --- a/LJ.conf +++ b/LJ.conf @@ -1,7 +1,7 @@ [General] set = 5 curve = 0 -lasernumber = 2 +lasernumber = 1 debug = 2 ljayserverip = 127.0.0.1 nozoscip = 127.0.0.1 @@ -28,7 +28,7 @@ warpdest = [[-1500., 1500.], [laser1] color = -1 -ip = 192.168.1.4 +ip = 192.168.1.3 kpps = 25000 centerx = 506 centery = 413 @@ -41,9 +41,9 @@ swapx = -1 swapy = -1 lsteps = [ (1.0, 8),(0.25, 3), (0.75, 3), (1.0, 10)] warpdest = [[-1500., 1500.], - [ 1500., 1500.], - [ 1500.,-1500.], - [-1500.,-1500.]] + [ 1500., 1500.], + [ 1500.,-1500.], + [-1500.,-1500.]] [laser2] color = -1 diff --git a/README.md b/README.md index 466dbe6..f39f097 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,25 @@ By Sam Neurohack, Loloster, Cocoa LICENCE : CC BY - +Dear + +I'm part of a group of laser freaks that use etherdreams in demoparty and many other occasions. Recently we started using your wonderful dac emulator that is so useful. + +It compiles and works flawlessly in fairly new computers, we tried successfully several os X and different linux flavors, but with older generation i5 M560 (a dual core 2.67 Ghz) when i run ./visualiser I get an error : + + thread 'main' panicked at 'could not build default app window: GlutinCreationError(NoAvailablePixelFormat)', libcore/result.rs:1009:5 +note: Run with `RUST_BACKTRACE=1` for a backtrace. + +My guess is to modify the display creation in... nannou ? + +I don't speak Rust, but the dac emulator import a nannou crate, so I can't modify the code in dac emulator directly ? + +Would you consider supporting older computers by testing configuration and then modifying the display creation accordingly ? + +This will be very helpfull + + + ![LJ](http://www.teamlaser.fr/thsf/images/fulls/THSF9-33.jpg) A software laser server with GUI for up to 4 lasers live actions. Think creative like Laser "battles", planetarium,... diff --git a/clients/3dsines.py b/clients/3dsines.py index 827e4da..22b10ec 100644 --- a/clients/3dsines.py +++ b/clients/3dsines.py @@ -201,8 +201,6 @@ def Draw1PL(): framy.rPolyLineOneColor(Left, c = red, PL = 0, closed = False, xpos = 0, ypos = 10, resize = 1.5, rotx =0, roty =0 , rotz=0) framy.rPolyLineOneColor(Right, c = green, PL = 0, closed = False, xpos = 0, ypos = 10, resize = 1.5, rotx =0, roty =0 , rotz=0) - - Left = [] Right = [] x = -1 @@ -216,8 +214,6 @@ def Draw1PL(): framy.rPolyLineOneColor(Left, c = red, PL = 0, closed = False, xpos = 0, ypos = 25, resize = 1.5, rotx =0, roty =0 , rotz=0) framy.rPolyLineOneColor(Right, c = green, PL = 0, closed = False, xpos = 0, ypos = 25, resize = 1.5, rotx =0, roty =0 , rotz=0) - - Left = [] Right = [] x = -1 @@ -232,15 +228,8 @@ def Draw1PL(): framy.rPolyLineOneColor(Right, c = green, PL = 0, closed = False, xpos = 0, ypos = 50, resize = 1.5, rotx =0, roty =0 , rotz=0) - - - ''' - framy.rPolyLineOneColor(Shape, c = white, PL = 0, closed = False, xpos = 200, ypos = 250, resize = 1.5, rotx =0, roty =0 , rotz=0) - framy.rPolyLineOneColor(Left, c = red, PL = 1, closed = False, xpos = 200, ypos = 250, resize = 1.5, rotx =0, roty =0 , rotz=0) - framy.rPolyLineOneColor(Right, c = blue, PL = 2, closed = False, xpos = 200, ypos = 250, resize = 1.5, rotx =0, roty =0 , rotz=0) - ''' framy.LinesPL(0) - time.sleep(0.1) + time.sleep(0.005) white = rgb2int(255,255,255) red = rgb2int(255,0,0) diff --git a/clients/laserglyph.py b/clients/laserglyph.py index bd12d95..0f5f34c 100644 --- a/clients/laserglyph.py +++ b/clients/laserglyph.py @@ -169,8 +169,8 @@ def Draw1PL(): Shape.append(Proj(x,y,z,0,0,counter)) - Left.append( Proj(x+LeftShift(z*25),y,z,0,0,counter)) - Right.append(Proj(x+RightShift(z*25),y,z,0,0,counter)) + Left.append( Proj(x+LeftShift(z*25),y,z,0,counter,0)) + Right.append(Proj(x+RightShift(z*25),y,z,0,counter,0)) #framy.PolyLineOneColor(Shape, c = white, PL = 0, closed = False) framy.PolyLineOneColor(Left, c = red, PL = 0, closed = False) diff --git a/main.py b/main.py index 72008ee..b5b0c49 100644 --- a/main.py +++ b/main.py @@ -197,7 +197,7 @@ def osc_thread(): try: while True: - time.sleep(1) + time.sleep(0.1) osc_frame() for laserid in range(0,gstt.LaserNumber): # Laser not used -> led is not lit diff --git a/tracer.py b/tracer.py index 3b928f9..9d08c5c 100644 --- a/tracer.py +++ b/tracer.py @@ -251,10 +251,7 @@ class DAC(object): # Lower case pl is the actual point list coordinates print "Init laser",self.mylaser,"asking for ckey", self.clientkey+str(self.mylaser) self.pl = ast.literal_eval(r.get(self.clientkey + str(self.mylaser))) - #if self.mylaser ==0: - #print "DAC Init Laser", self.mylaser - #print "pl :", self.pl - #print "EDH/"+str(self.mylaser),r.get('/EDH/'+str(self.mylaser)) + if r.get('/EDH/'+str(self.mylaser)) == None: #print "Laser",self.mylaser,"NO EDH !! Computing one..." homographyp.newEDH(self.mylaser) @@ -328,7 +325,6 @@ class DAC(object): def play_stream(self): - # print last playback state #print "laser", self.mylaser, "Pb : ",self.last_status.playback_state # error if etherdream is already playing state (from other source) @@ -347,7 +343,6 @@ class DAC(object): order = int(r.get('/order/'+str(self.mylaser))) - #print "laser", self.mylaser, "order : ",order if order == 0: # USER point list diff --git a/webui/index.html b/webui/index.html index b69f9c1..332ac4e 100644 --- a/webui/index.html +++ b/webui/index.html @@ -551,7 +551,7 @@ var ctx = canvas.getContext("2d"); var lastpoint = { x: 0, y: 0, color: 0}; ctx.clearRect(0,0,400,400); - ctx.save + //ctx.save // Todo : laser point will have black points to go from a polyline to another. Need to discard those black points. @@ -565,8 +565,9 @@ // Begin a new path // 0.7 reduces max coordinates in a more browser compatible resolution. + ctx.clearRect(0,0,400,400); ctx.beginPath(); - //ctx.clearRect(0,0,400,400); + ctx.moveTo(pl2[0]*0.5, pl2[1]*0.5); lastpoint.color = pl2[2]; @@ -585,8 +586,8 @@ { ctx.strokeStyle = "#"+(lastpoint.color + Math.pow(16, 6)).toString(16).slice(-6); ctx.stroke(); - //ctx.closePath() - ctx.restore + ctx.closePath() + //ctx.restore ctx.beginPath(); //ctx.clearRect(0,0,400,400); @@ -600,8 +601,8 @@ ctx.strokeStyle = "#"+((pl2[2+(i*3)]) + Math.pow(16, 6)).toString(16).slice(-6); ctx.stroke(); - //ctx.closePath() - ctx.restore + ctx.closePath() + //ctx.restore //ctx.clearRect(0,0,400,400); }