mirror of
https://github.com/demostf/demo.js
synced 2026-06-04 00:54:14 +02:00
initial handling of hl2dm
This commit is contained in:
parent
5aa5fe95fd
commit
04fc9b1f76
9 changed files with 730 additions and 479 deletions
|
|
@ -1,6 +1,5 @@
|
|||
import {ParseMode} from "../src/Demo";
|
||||
|
||||
const Demo = require('../index');
|
||||
const ParseMode = require('../build/Demo').ParseMode;
|
||||
const fs = require('fs');
|
||||
const argv = require('minimist')(process.argv.slice(2), {boolean: true});
|
||||
|
||||
|
|
@ -17,7 +16,7 @@ const echo = function (data) {
|
|||
fs.readFile(argv._[0], function (err, data) {
|
||||
if (err) throw err;
|
||||
const demo = Demo.fromNodeBuffer(data);
|
||||
const analyser = demo.getAnalyser(argv.slow ? ParseMode.ENTITIES : ParseMode.MINIMAL);
|
||||
const analyser = demo.getAnalyser(argv.slow ? ParseMode.ENTITIES : Demo.ParseMode.MINIMAL);
|
||||
const head = analyser.getHeader();
|
||||
if (argv.head) {
|
||||
echo(head);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue