From 785ba6c835af1d6825e904480980ed54ad16c1f7 Mon Sep 17 00:00:00 2001 From: Theunis Johannes Botha Date: Fri, 25 May 2018 17:12:58 +0200 Subject: [PATCH 01/15] Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 127 bytes modified --- ff0fsum4zx.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ff0fsum4zx.js b/ff0fsum4zx.js index 92faf75..33b30f0 100644 --- a/ff0fsum4zx.js +++ b/ff0fsum4zx.js @@ -188,7 +188,7 @@ R3.CustomCode.prototype.render = function(delta) { var goalDistanceL = this.goalL.position.distanceTo(ball.mesh.position); var goalDistanceR = this.goalR.position.distanceTo(ball.mesh.position); - if (goalDistanceL < (this.goalL.geometry.boundingSphere.radius - ball.mesh.geometry.boundingSphere.radius)) { + if (goalDistanceL < (this.goalL.geometry.instance.boundingSphere.radius - ball.mesh.geometry.boundingSphere.radius)) { if (ball.scored === false) { console.log('left goal!'); ball.scored = true; @@ -209,7 +209,7 @@ R3.CustomCode.prototype.render = function(delta) { } } - if (goalDistanceR < (this.goalR.geometry.boundingSphere.radius - ball.mesh.geometry.boundingSphere.radius)) { + if (goalDistanceR < (this.goalR.geometry.instance.boundingSphere.radius - ball.mesh.geometry.boundingSphere.radius)) { if (ball.scored === false) { console.log('right goal!'); ball.scored = true; @@ -573,6 +573,9 @@ this.footballPlayer.instance.position.z = this.football.instance.geometry.boundi this.football.instance.position.y = this.ballY; this.football.instance.visible = false; +this.goalL.geometry.instance.computeBoundingSphere(); +this.goalR.geometry.instance.computeBoundingSphere(); + R3.Event.Emit(R3.Event.GAME_LOADED); //@ sourceURL=entityLoaded.js From 46e706c413e431c1a086e01b561233b4752da97e Mon Sep 17 00:00:00 2001 From: Theunis Johannes Botha Date: Mon, 28 May 2018 09:11:55 +0200 Subject: [PATCH 02/15] Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 6 bytes modified --- ff0fsum4zx.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ff0fsum4zx.js b/ff0fsum4zx.js index 33b30f0..7fac407 100644 --- a/ff0fsum4zx.js +++ b/ff0fsum4zx.js @@ -41,7 +41,7 @@ this.playerRotation = { y : 0 }; -R3.CustomCode.TIME_LIMIT = 1.5 * 90; +R3.CustomCode.TIME_LIMIT = 90; this.balls = []; From ed8e724328ff76c676fde3676f23a1b51f2229ec Mon Sep 17 00:00:00 2001 From: Theunis Johannes Botha Date: Mon, 28 May 2018 10:49:46 +0200 Subject: [PATCH 03/15] Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 4 bytes modified --- ff0fsum4zx.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ff0fsum4zx.js b/ff0fsum4zx.js index 7fac407..6425e96 100644 --- a/ff0fsum4zx.js +++ b/ff0fsum4zx.js @@ -41,7 +41,7 @@ this.playerRotation = { y : 0 }; -R3.CustomCode.TIME_LIMIT = 90; +R3.CustomCode.TIME_LIMIT = 45; this.balls = []; @@ -109,8 +109,8 @@ R3.CustomCode.prototype.render = function(delta) { this.totalTime -= delta; this.secondCounter += delta; - if (this.secondCounter >= 1) { - this.secondCounter -= 1; + if (this.secondCounter >= 0.5) { + this.secondCounter -= 0.5; R3.Event.Emit( R3.Event.GAME_DATA, { From e1826550aad913a51e36a71ba8968aeef506999b Mon Sep 17 00:00:00 2001 From: Theunis Johannes Botha Date: Mon, 28 May 2018 10:50:42 +0200 Subject: [PATCH 04/15] Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 31 bytes modified --- ff0fsum4zx.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ff0fsum4zx.js b/ff0fsum4zx.js index 6425e96..680781a 100644 --- a/ff0fsum4zx.js +++ b/ff0fsum4zx.js @@ -111,6 +111,7 @@ R3.CustomCode.prototype.render = function(delta) { this.secondCounter += delta; if (this.secondCounter >= 0.5) { this.secondCounter -= 0.5; + console.log(this.totalTime); R3.Event.Emit( R3.Event.GAME_DATA, { From 5ae41e0fc278904eb9dc517ee50215b27c146cb7 Mon Sep 17 00:00:00 2001 From: Theunis Johannes Botha Date: Mon, 28 May 2018 10:52:29 +0200 Subject: [PATCH 05/15] Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 43 bytes modified --- ff0fsum4zx.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ff0fsum4zx.js b/ff0fsum4zx.js index 680781a..c9561cf 100644 --- a/ff0fsum4zx.js +++ b/ff0fsum4zx.js @@ -111,12 +111,11 @@ R3.CustomCode.prototype.render = function(delta) { this.secondCounter += delta; if (this.secondCounter >= 0.5) { this.secondCounter -= 0.5; - console.log(this.totalTime); R3.Event.Emit( R3.Event.GAME_DATA, { type : 'timer', - time : Math.round(this.totalTime) + time : this.totalTime } ) } From d4d481c03368a3d0971f0a7df94ea0f6d58bb472 Mon Sep 17 00:00:00 2001 From: Theunis Johannes Botha Date: Mon, 28 May 2018 10:55:29 +0200 Subject: [PATCH 06/15] Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 181 bytes modified --- ff0fsum4zx.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/ff0fsum4zx.js b/ff0fsum4zx.js index c9561cf..1aa4c52 100644 --- a/ff0fsum4zx.js +++ b/ff0fsum4zx.js @@ -108,17 +108,13 @@ R3.CustomCode.prototype.render = function(delta) { this.totalTime -= delta; - this.secondCounter += delta; - if (this.secondCounter >= 0.5) { - this.secondCounter -= 0.5; - R3.Event.Emit( - R3.Event.GAME_DATA, - { - type : 'timer', - time : this.totalTime - } - ) - } + R3.Event.Emit( + R3.Event.GAME_DATA, + { + type : 'timer', + time : this.totalTime + } + ) if (this.totalTime <= 0) { From da3306e7c1c614b222b3e066a1d1e71d370b0ff1 Mon Sep 17 00:00:00 2001 From: Theunis Johannes Botha Date: Mon, 28 May 2018 10:59:45 +0200 Subject: [PATCH 07/15] Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 36 bytes modified --- ff0fsum4zx.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ff0fsum4zx.js b/ff0fsum4zx.js index 1aa4c52..5dd7cfd 100644 --- a/ff0fsum4zx.js +++ b/ff0fsum4zx.js @@ -134,7 +134,8 @@ R3.CustomCode.prototype.render = function(delta) { return result; }, [] - ) + ), + totalBalls : this.balls.length } ) } From 0ac0c23f15a8a930fdf5c5178652a71ceda9c84a Mon Sep 17 00:00:00 2001 From: Theunis Johannes Botha Date: Mon, 28 May 2018 12:14:03 +0200 Subject: [PATCH 08/15] Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 128 bytes modified --- ff0fsum4zx.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/ff0fsum4zx.js b/ff0fsum4zx.js index 5dd7cfd..febbc3d 100644 --- a/ff0fsum4zx.js +++ b/ff0fsum4zx.js @@ -79,6 +79,8 @@ this.ballY = this.football.instance.geometry.boundingSphere.radius / 2; this.activeBall = null; +this.invertMouse = true; + if (this.debug) { this.arrowHelper = new THREE.ArrowHelper( new THREE.Vector3(0,0,-1), @@ -305,9 +307,22 @@ R3.CustomCode.prototype.render = function(delta) { R3.CustomCode.prototype.move = function(data) { var x = data.x || 0; - var y = data.y || 0; - x *= 0.0025; + + var y = 0; + + if (data && data.y) { + + if (this.invertMouse) { + y = data.y; + } else { + y = -data.y; + } + + } + + x *= 0.0025; y *= 0.0075; + this.playerRotation.x += x; this.playerRotation.y += y; From fcd08eae9ad9b5531f1fb2d8612ba429510f456a Mon Sep 17 00:00:00 2001 From: Theunis Johannes Botha Date: Mon, 28 May 2018 12:14:40 +0200 Subject: [PATCH 09/15] Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 1 bytes modified --- ff0fsum4zx.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ff0fsum4zx.js b/ff0fsum4zx.js index febbc3d..8556b35 100644 --- a/ff0fsum4zx.js +++ b/ff0fsum4zx.js @@ -79,7 +79,7 @@ this.ballY = this.football.instance.geometry.boundingSphere.radius / 2; this.activeBall = null; -this.invertMouse = true; +this.invertMouse = false; if (this.debug) { this.arrowHelper = new THREE.ArrowHelper( From e683c7a690a7cf703045e0d00f085753e4adfab4 Mon Sep 17 00:00:00 2001 From: Theunis Johannes Botha Date: Mon, 28 May 2018 12:38:42 +0200 Subject: [PATCH 10/15] Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 98 bytes modified --- ff0fsum4zx.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/ff0fsum4zx.js b/ff0fsum4zx.js index 8556b35..638c034 100644 --- a/ff0fsum4zx.js +++ b/ff0fsum4zx.js @@ -79,7 +79,9 @@ this.ballY = this.football.instance.geometry.boundingSphere.radius / 2; this.activeBall = null; -this.invertMouse = false; +this.invertY = false; + +this.invertX = false; if (this.debug) { this.arrowHelper = new THREE.ArrowHelper( @@ -306,13 +308,21 @@ R3.CustomCode.prototype.render = function(delta) { R3.CustomCode.prototype.move = function(data) { - var x = data.x || 0; - + var x = 0; + + if (data && data.x) { + if (this.invertX) { + x = data.x; + } else { + x = -data.x; + } + } + var y = 0; if (data && data.y) { - if (this.invertMouse) { + if (this.invertY) { y = data.y; } else { y = -data.y; From ce60ccb7edf51deff377c196b46ff86464677a0e Mon Sep 17 00:00:00 2001 From: Theunis Johannes Botha Date: Mon, 28 May 2018 17:04:35 +0200 Subject: [PATCH 11/15] Update: CC - Mouse Move - AR Football 3 (dwxvtxzrun.js) 8 bytes modified --- dwxvtxzrun.js | 1 + 1 file changed, 1 insertion(+) diff --git a/dwxvtxzrun.js b/dwxvtxzrun.js index 76e4577..5e4df00 100644 --- a/dwxvtxzrun.js +++ b/dwxvtxzrun.js @@ -1,3 +1,4 @@ +return; if (!this.entityLoaded) { return; From 70600a37be5b67f83de10809690799095693f3dd Mon Sep 17 00:00:00 2001 From: Theunis Johannes Botha Date: Mon, 28 May 2018 17:04:41 +0200 Subject: [PATCH 12/15] Update: CC - Touch Move - AR Football 3 (p49pad0i7l.js) 8 bytes modified --- p49pad0i7l.js | 1 + 1 file changed, 1 insertion(+) diff --git a/p49pad0i7l.js b/p49pad0i7l.js index 23e5a26..2f143b5 100644 --- a/p49pad0i7l.js +++ b/p49pad0i7l.js @@ -1,3 +1,4 @@ +return; if (!this.entityLoaded) { return; From 022b7de538cde406103cf7cfc734b0bd7d5192fe Mon Sep 17 00:00:00 2001 From: Theunis Johannes Botha Date: Mon, 28 May 2018 17:08:14 +0200 Subject: [PATCH 13/15] Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 2 bytes modified --- ff0fsum4zx.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ff0fsum4zx.js b/ff0fsum4zx.js index 638c034..522120e 100644 --- a/ff0fsum4zx.js +++ b/ff0fsum4zx.js @@ -79,9 +79,9 @@ this.ballY = this.football.instance.geometry.boundingSphere.radius / 2; this.activeBall = null; -this.invertY = false; +this.invertY = true; -this.invertX = false; +this.invertX = true; if (this.debug) { this.arrowHelper = new THREE.ArrowHelper( From 3448b5f4b1d4c88e7ce9dcf511a09dfa6fe3f738 Mon Sep 17 00:00:00 2001 From: Theunis Johannes Botha Date: Mon, 28 May 2018 17:08:32 +0200 Subject: [PATCH 14/15] Update: CC - Mouse Move - AR Football 3 (dwxvtxzrun.js) 9 bytes modified --- dwxvtxzrun.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/dwxvtxzrun.js b/dwxvtxzrun.js index 5e4df00..6c245a6 100644 --- a/dwxvtxzrun.js +++ b/dwxvtxzrun.js @@ -1,5 +1,3 @@ -return; - if (!this.entityLoaded) { return; } From e621cf074e233e3a62b04282d31eabdada90523d Mon Sep 17 00:00:00 2001 From: Theunis Johannes Botha Date: Mon, 28 May 2018 17:08:32 +0200 Subject: [PATCH 15/15] Update: CC - Touch Move - AR Football 3 (p49pad0i7l.js) 9 bytes modified --- p49pad0i7l.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/p49pad0i7l.js b/p49pad0i7l.js index 2f143b5..190d333 100644 --- a/p49pad0i7l.js +++ b/p49pad0i7l.js @@ -1,5 +1,3 @@ -return; - if (!this.entityLoaded) { return; }