From 30390f146af196b2320bcc962d8c6892cefcc3a8 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Sat, 11 Nov 2017 14:55:43 +0100 Subject: [PATCH] Update: CC - Mouse Move - Moorcow (ud33b2z225.js) 1815 bytes modified --- ud33b2z225.js | 82 --------------------------------------------------- 1 file changed, 82 deletions(-) diff --git a/ud33b2z225.js b/ud33b2z225.js index cfbf403..dd953f9 100644 --- a/ud33b2z225.js +++ b/ud33b2z225.js @@ -32,86 +32,4 @@ this.thrower.instance.lookAt( ) ); -/** - * First we find our crosshair - */ -//var crosshair = GameLib.EntityManager.Instance.findComponentById('oxpg88pgzv'); -//var sphere = GameLib.EntityManager.Instance.findComponentById('ijir4gkqya'); - -/** - * Target, is the x / y postion of the crosshair on the z=0 plane in the crosshair scene - */ -//var target = new THREE.Vector3( -// (-1 * (window.innerWidth / 2 - data.event.x)) , -// (window.innerHeight / 2 - data.event.y) , -// 0 -//); -/* -sphere.instance.position.copy(target);//instance.applyMatrix4( mInverse ); -sphere.position.x = sphere.instance.position.x; -sphere.position.y = sphere.instance.position.y; -sphere.position.z = sphere.instance.position.z; -*/ -/** - * Now we get the position of the crosshair, in our world scene space - */ -/* -target.unproject(camera.instance); -*/ -/** - * We want to shoot in the other direction - */ -/* -target.normalize(); - -target.z *= -1; -*/ - -//target.sub(thrower.position.instance).normalize(); -/* -var raycaster = new THREE.Raycaster(); - -raycaster.ray = new THREE.Ray( - cursor.position.instance, - target.instance -); - -var intersects = raycaster.intersectObjects( - GameLib.EntityManager.Instance.queryComponents(GameLib.D3.Mesh).map( - function(mesh){ - - if (mesh.instance.material instanceof Array) { - mesh.instance.material.map( - function(material) { - material.color.setHex(0xffffff); - } - ); - } else { - mesh.instance.material.color.setHex(0xffffff); - } - - return mesh.instance; - } - ) -); - -if (intersects.length > 0) { - console.log('intersected'); - intersects.map( - function(intersect){ - if (mesh.instance.material instanceof Array) { - mesh.instance.material.map( - function(material) { - material.color.setHex(0xff0000); - } - ); - } else { - mesh.instance.material.color.setHex(0xff0000); - } - } - ) -} -*/ - - //@ sourceURL=mouseMove.js \ No newline at end of file