diff --git a/.build.json b/.build.json index 7e8790e1..459b55ab 100644 --- a/.build.json +++ b/.build.json @@ -145,6 +145,7 @@ { "name": "tfjs/browser/esm/custom", "platform": "browser", + "target": "esnext", "format": "esm", "input": "tfjs/tf-custom.ts", "output": "dist/tfjs.esm.js", @@ -154,6 +155,7 @@ { "name": "human/browser/esm/custom", "platform": "browser", + "target": "esnext", "format": "esm", "input": "src/human.ts", "output": "dist/human.custom.esm.js", @@ -162,11 +164,22 @@ "external": ["fs", "os", "buffer", "util"], "typings": "types", "typedoc": "typedoc" + }, + { + "name": "demo/browser", + "platform": "browser", + "target": "esnext", + "format": "esm", + "input": "demo/typescript/index.ts", + "output": "demo/typescript/index.js", + "sourcemap": true, + "minify": false, + "external": ["*/human.custom.esm.js"] } ] }, "watch": { - "locations": [ "src/**/*", "tfjs/**/*" ] + "locations": [ "src/**/*", "tfjs/**/*", "demo/**/*.ts" ] }, "typescript": { "allowJs": false diff --git a/.eslintrc.json b/.eslintrc.json index 570d374e..3f753a3b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -27,7 +27,8 @@ ], "ignorePatterns": [ "assets", - "demo/helpers", + "demo/helpers/*.js", + "demo/typescript/*.js", "dist", "media", "models", diff --git a/CHANGELOG.md b/CHANGELOG.md index 655406ef..3c364063 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ### **HEAD -> main** 2021/10/26 mandic00@live.com +- switch to custom tfjs for demos ### **release: 2.4.1** 2021/10/25 mandic00@live.com diff --git a/demo/index.js b/demo/index.js index cdb4f751..053ca929 100644 --- a/demo/index.js +++ b/demo/index.js @@ -415,7 +415,7 @@ async function setupCamera() { } const track = stream.getVideoTracks()[0]; const settings = track.getSettings(); - if (initialCameraAccess) log('selected video source:', track, settings); // log('selected camera:', track.label, 'id:', settings.deviceId); + if (initialCameraAccess) log('selected video source:', track, settings); ui.camera = { name: track.label.toLowerCase(), width: settings.width, height: settings.height, facing: settings.facingMode === 'user' ? 'front' : 'back' }; initialCameraAccess = false; diff --git a/demo/simple/index.html b/demo/simple/index.html index 896be6e3..7d0b5135 100644 --- a/demo/simple/index.html +++ b/demo/simple/index.html @@ -14,7 +14,7 @@ + +
+ + + + +