Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Jae-Yoon Chung committed May 2, 2019
1 parent 24ef89b commit 1956656
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
8 changes: 3 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22985,7 +22985,7 @@ Object.defineProperty(exports, "__esModule", {
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var handTrack = require('../node_modules/handtrackjs/dist/handtrack.min.js');
require('../node_modules/hammer-simulator/index.js');
require('hammer-simulator');

var start = async function start(element, video, canvas) {
var _ref = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
Expand All @@ -23012,9 +23012,7 @@ var start = async function start(element, video, canvas) {
if (!videoStatus) throw 'Start video failed';
if (!model) model = await handTrack.load(modelParams);

var videoWidth = video.width;
var videoHeight = video.height;

var context = canvas.getContext("2d");
var lastPredictions = [];
var touches = [];
function runDetection() {
Expand Down Expand Up @@ -23048,5 +23046,5 @@ var start = async function start(element, video, canvas) {

exports.start = start;

},{"../node_modules/hammer-simulator/index.js":84,"../node_modules/handtrackjs/dist/handtrack.min.js":85}]},{},[156])(156)
},{"../node_modules/handtrackjs/dist/handtrack.min.js":85,"hammer-simulator":84}]},{},[156])(156)
});
1 change: 0 additions & 1 deletion examples/visual.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@
video.width = 320;
video.height = 240;
var canvas = document.getElementById("handtrackjs").getElementsByTagName("canvas")[0];
const context = canvas.getContext("2d");

var options = {
transform: function (prediction, video, target) {
Expand Down
7 changes: 2 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const handTrack = require('../node_modules/handtrackjs/dist/handtrack.min.js');
require('../node_modules/hammer-simulator/index.js');
require('hammer-simulator');


const start = async (element, video, canvas, {
Expand All @@ -26,10 +26,7 @@ const start = async (element, video, canvas, {
if (!model) model = await handTrack.load(modelParams);


const videoWidth = video.width;
const videoHeight = video.height;


const context = canvas.getContext("2d");
let lastPredictions = [];
let touches = [];
function runDetection() {
Expand Down

0 comments on commit 1956656

Please sign in to comment.