{"action":"opened","issue":{"url":"https://api.github.com/repos/jasonChen1982/three.interaction.js/issues/7","repository_url":"https://api.github.com/repos/jasonChen1982/three.interaction.js","labels_url":"https://api.github.com/repos/jasonChen1982/three.interaction.js/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/jasonChen1982/three.interaction.js/issues/7/comments","events_url":"https://api.github.com/repos/jasonChen1982/three.interaction.js/issues/7/events","html_url":"https://github.com/jasonChen1982/three.interaction.js/issues/7","id":410671953,"node_id":"MDU6SXNzdWU0MTA2NzE5NTM=","number":7,"title":"Question: Pointer events behaviour of untrusted events","user":{"login":"mreiche","id":572453,"node_id":"MDQ6VXNlcjU3MjQ1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/572453?v=4","gravatar_id":"","url":"https://api.github.com/users/mreiche","html_url":"https://github.com/mreiche","followers_url":"https://api.github.com/users/mreiche/followers","following_url":"https://api.github.com/users/mreiche/following{/other_user}","gists_url":"https://api.github.com/users/mreiche/gists{/gist_id}","starred_url":"https://api.github.com/users/mreiche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mreiche/subscriptions","organizations_url":"https://api.github.com/users/mreiche/orgs","repos_url":"https://api.github.com/users/mreiche/repos","events_url":"https://api.github.com/users/mreiche/events{/privacy}","received_events_url":"https://api.github.com/users/mreiche/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-02-15T09:14:34Z","updated_at":"2019-02-15T09:14:34Z","closed_at":null,"author_association":"NONE","body":"Hi.\r\n\r\nI want to understand the event behaviour of three.interaction.\r\nAnd I want to fire events by script into the scene (click and mousedown/mouseup).\r\nBut just click events will be recognized.\r\n\r\n```js\r\nvar element = document.getElementById(\"webgl\");\r\nelement.addEventListener('mousedown', function(ev) {\r\n    console.log(ev);\r\n});\r\nelement.addEventListener('click', function(ev) {\r\n    console.log(ev);\r\n});\r\n\r\nvar pageX= 493, pageY= 730;\r\nvar screenX= 3949, screenY= 493;\r\nvar ev;\r\n\r\n// Recognized and animated\r\nev = document.createEvent(\"MouseEvents\");\r\nev.initMouseEvent(\"click\", true, true, window, 0, screenX, screenY, pageX, pageY, false, false, false, false, 0, null);\r\nelement.dispatchEvent(ev);\r\n\r\n// Not recognized\r\nev = document.createEvent(\"MouseEvents\");\r\nev.initMouseEvent(\"mousedown\", true, true, window, 0, screenX, screenY, pageX, pageY, false, false, false, false, 0, null);\r\nelement.dispatchEvent(ev);\r\n```\r\nBoth events are printed in the debug console, but the threejs scene doesn't catch the mousedown event."}}
{"actor":{"display_login":"mreiche"}}