demrec
NodeJS wrapper for SourceVideoRender!
Setup
Usage
let DemRec = require('demrec')
let dr = new DemRec('config.ini')
let Events = Object.keys(DemRec.Events)
dr.on('log', data => {
console.log(`EVENT: ${Events[data.event]}`)
})
await dr.launch()
await dr.record('cooldemo.dem', {
ticks: [300, 1800],
spec: 'soupcan',
cmd: 'mat_fullbright 1; volume 0.2',
out: 'soupcan_does_cool_stuff'
}, 'output')
await dr.record('Z:/demos/auto-20200724-224342-jump_haze.dem', [
{
ticks: [12710, 14067],
spec: 'STEAM_0:0:443798979',
out: 'toss_bonus1'
},
{
ticks: [14359, 15936],
spec: 'STEAM_0:0:443798979',
out: 'toss_bonus2'
},
{
ticks: [19334, 20723],
spec: 'STEAM_0:1:50458194',
cmd: 'spec_mode 5',
out: 'tom_wallclimbing'
},
{
ticks: [21051, 22219],
spec: 'STEAM_0:1:50458194'
}
], 'output')
await dr.exit()