aboutsummaryrefslogtreecommitdiff
path: root/assets/blender/ks
ModeNameSize
-rw-r--r--advtrains_signals_ks_head_dist.obj6709logplain
-rw-r--r--advtrains_signals_ks_head_main.obj7058logplain
-rw-r--r--advtrains_signals_ks_lamps_dist.obj62142logplain
-rw-r--r--advtrains_signals_ks_lamps_main.obj86593logplain
-rw-r--r--advtrains_signals_ks_main_smr0.mtl795logplain
-rw-r--r--advtrains_signals_ks_main_smr0.obj123754logplain
-rw-r--r--advtrains_signals_ks_main_smr30.mtl795logplain
-rw-r--r--advtrains_signals_ks_main_smr30.obj123759logplain
-rw-r--r--advtrains_signals_ks_main_smr45.mtl795logplain
-rw-r--r--advtrains_signals_ks_main_smr45.obj124025logplain
-rw-r--r--advtrains_signals_ks_main_smr60.mtl795logplain
-rw-r--r--advtrains_signals_ks_main_smr60.obj124173logplain
-rw-r--r--advtrains_signals_ks_mast.obj9179logplain
-rw-r--r--advtrains_signals_ks_mast_smr0.obj3990logplain
-rw-r--r--advtrains_signals_ks_mast_smr30.obj3955logplain
-rw-r--r--advtrains_signals_ks_mast_smr45.obj3954logplain
-rw-r--r--advtrains_signals_ks_mast_smr60.obj3955logplain
-rw-r--r--advtrains_signals_ks_zs_bottom.obj25042logplain
-rw-r--r--advtrains_signals_ks_zs_top.obj21497logplain
-rw-r--r--signal_ks.blend770684logplain
-rw-r--r--signal_ks.blend1770684logplain
-rw-r--r--signal_ks_export.blend880352logplain
-rw-r--r--signal_ks_export.blend1880352logplain
-rw-r--r--signal_ks_exportd.blend535508logplain
-rw-r--r--signal_ks_exportd.blend1535316logplain
-rw-r--r--signal_ks_singlemesh.blend703884logplain
-rw-r--r--signal_ks_singlemesh.blend1703884logplain
-rw-r--r--signal_ks_singlemesh_final.blend652332logplain
-rw-r--r--signal_ks_singlemesh_final.blend1661328logplain
-rw-r--r--signal_ks_singlemesh_lampuv.png211402logplain
-rw-r--r--signal_ks_singlemesh_lampuv.xcf1558logplain
-rw-r--r--signal_ks_singlemesh_shuntsig.blend593572logplain
-rw-r--r--signal_ks_singlemesh_shuntsig.blend1593572logplain
-rw-r--r--signal_ks_splt.blend884984logplain
-rw-r--r--signal_ks_splt.blend1867672logplain
um">0 } end function rwt.to_table(rwtime) if type(rwtime) == "table" then return rwtime elseif type(rwtime) == "string" then return rwt.parse(rwtime) elseif type(rwtime) == "number" then local res = {} local seconds = atfloor(rwtime) res.s = seconds % 60 local minutes = atfloor(seconds/60) res.m = minutes % 60 res.c = atfloor(minutes/60) return res end end function rwt.to_secs(rwtime, c_over) local res = rwtime if type(rwtime) == "string" then res = rwt.parse(rwtime) elseif type(rwtime) == "number" then return rwtime end if type(res)=="table" then return (c_over or res.c)*60*60 + res.m*60 + res.s end end function rwt.to_string(rwtime_p, no_cycle) local rwtime = rwt.to_table(rwtime_p) if rwtime.c~=0 and not no_cycle then return string.format("%d;%02d;%02d", rwtime.c, rwtime.m, rwtime.s) else return string.format("%02d;%02d", rwtime.m, rwtime.s) end end --- local function v_n(str, cpl) if not str then return nil end if str == "" then return 0 end local n = tonumber(str) if not cpl and (n<0 or n>59) then return nil end return n end function rwt.parse(str) --atdebug("parse",str) --3-value form local str_c, str_m, str_s = string.match(str, "^(%-?%d?%d?);(%d%d);(%d?%d?)$") if str_c and str_m and str_s then --atdebug("3v",str_c, str_m, str_s) local c, m, s = v_n(str_c, true), v_n(str_m), v_n(str_s) if c and m and s then return rwt.new(c,m,s) end end --2-value form local str_m, str_s = string.match(str, "^(%d?%d?);(%d?%d?)$") if str_m and str_s then --atdebug("2v",str_m, str_s) local m, s = v_n(str_m), v_n(str_s) if m and s then return rwt.new(0,m,s) end end end --- function rwt.add(t1, t2) local t1s = rwt.to_secs(t1) local t2s = rwt.to_secs(t2) return rwt.to_table(t1s + t2s) end -- How many seconds FROM t1 TO t2 function rwt.diff(t1, t2) local t1s = rwt.to_secs(t1) local t2s = rwt.to_secs(t2) return t2s - t1s end -- Subtract t2 from t1 (inverted argument order compared to diff()) function rwt.sub(t1, t2) return rwt.to_table(rwt.diff(t2, t1)) end -- Adjusts t2 by thresh and then returns time from t1 to t2 function rwt.adj_diff(t1, t2, thresh) local newc = rwt.adjust_cycle(t2, thresh, t1) local t1s = rwt.to_secs(t1) local t2s = rwt.to_secs(t2, newc) return t1s - t2s end -- Threshold values -- "reftime" is the time to which this is made relative and defaults to now. rwt.CA_FUTURE = 60*60 - 1 -- Selected so that time lies at or in the future of reftime (at nearest point in time) rwt.CA_FUTURES = 60*60 -- Same, except when times are equal, advances one full cycle rwt.CA_PAST = 0 -- Selected so that time lies at or in the past of reftime rwt.CA_PASTS = -1 -- Same, except when times are equal, goes back one full cycle rwt.CA_CENTER = 30*60 -- If time is within past 30 minutes of reftime, selected as past, else selected as future. -- Adjusts the "cycle" value of a railway time to be in some relation to reftime. -- Returns new cycle function rwt.adjust_cycle(rwtime, reftime_p, thresh) local reftime = reftime_p or rwt.now() local reftimes = rwt.to_secs(reftime) local rwtimes = rwt.to_secs(rwtime, 0)