From 6ec6463c598601a1e7b59b840459cfad599430f8 Mon Sep 17 00:00:00 2001 From: Mr F Date: Thu, 3 Dec 2015 23:10:35 +0300 Subject: [PATCH 01/10] ignore bones that affect no vertices when calculating AABB --- src/scene/scene_mesh.js | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/scene/scene_mesh.js b/src/scene/scene_mesh.js index 48899aa6adb..a2230f69578 100644 --- a/src/scene/scene_mesh.js +++ b/src/scene/scene_mesh.js @@ -141,6 +141,7 @@ pc.extend(pc, function () { if (!this.mesh.boneAabb) { this.mesh.boneAabb = []; + this.mesh.boneUsed = []; var elems = this.mesh.vertexBuffer.format.elements; var numVerts = this.mesh.vertexBuffer.numVertices; var vertSize = this.mesh.vertexBuffer.format.size; @@ -167,6 +168,7 @@ pc.extend(pc, function () { var x, y, z; var boneMin = []; var boneMax = []; + var boneUsed = this.mesh.boneUsed; for(i=0; i Date: Thu, 3 Dec 2015 23:20:10 +0300 Subject: [PATCH 02/10] fix previous commit --- src/scene/scene_mesh.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scene/scene_mesh.js b/src/scene/scene_mesh.js index a2230f69578..a66b4b46a23 100644 --- a/src/scene/scene_mesh.js +++ b/src/scene/scene_mesh.js @@ -228,8 +228,8 @@ pc.extend(pc, function () { for(i=0; i Date: Thu, 3 Dec 2015 20:38:57 +0000 Subject: [PATCH 03/10] [RELEASE] v0.178.3 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 753e10c983b..e51fca59971 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.178.2-dev +0.178.3 From 4e700760b2d1d5fe574dcab59ab2c76e2905fcc0 Mon Sep 17 00:00:00 2001 From: Maksims Mihejevs Date: Thu, 3 Dec 2015 20:39:53 +0000 Subject: [PATCH 04/10] [VERSION] v0.178.3-dev --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index e51fca59971..9b93a7ed870 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.178.3 +0.178.3-dev From 4eeb9505a507e4d2d220ca1c8d3ec0e364bed0ae Mon Sep 17 00:00:00 2001 From: Vaios Kalpias-Ilias Date: Mon, 7 Dec 2015 11:50:23 +0200 Subject: [PATCH 05/10] [FIX] Don't resume 3d sounds when switching tabs, [FIX] Don't start sounds when changing '3d' property --- src/audio/audio_channel.js | 8 ++++++++ src/audio/audio_channel3d.js | 5 +++++ .../components/audiosource/audiosource_component.js | 12 ++++++++++++ 3 files changed, 25 insertions(+) diff --git a/src/audio/audio_channel.js b/src/audio/audio_channel.js index e423dca9b19..9feba027ce3 100644 --- a/src/audio/audio_channel.js +++ b/src/audio/audio_channel.js @@ -66,6 +66,10 @@ pc.extend(pc, function () { this.manager.on('volumechange', this.onManagerVolumeChange, this); this.manager.on('suspend', this.onManagerSuspend, this); this.manager.on('resume', this.onManagerResume, this); + + // suspend immediately if manager is suspended + if (this.manager.suspended) + this.onManagerSuspend(); }, /** @@ -227,6 +231,10 @@ pc.extend(pc, function () { this.manager.on('suspend', this.onManagerSuspend, this); this.manager.on('resume', this.onManagerResume, this); + // suspend immediately if manager is suspended + if (this.manager.suspended) + this.onManagerSuspend(); + }, pause: function () { diff --git a/src/audio/audio_channel3d.js b/src/audio/audio_channel3d.js index c1896809f9d..ce899d228d3 100644 --- a/src/audio/audio_channel3d.js +++ b/src/audio/audio_channel3d.js @@ -75,6 +75,11 @@ pc.extend(pc, function () { this.source.connect(this.panner); this.panner.connect(this.gain); this.gain.connect(context.destination); + + if (!this.loop) { + // mark source as paused when it ends + this.source.onended = this.pause.bind(this); + } } }); } else if (pc.AudioManager.hasAudio()) { diff --git a/src/framework/components/audiosource/audiosource_component.js b/src/framework/components/audiosource/audiosource_component.js index 037c133bb4a..c74067d8e70 100644 --- a/src/framework/components/audiosource/audiosource_component.js +++ b/src/framework/components/audiosource/audiosource_component.js @@ -223,7 +223,19 @@ pc.extend(pc, function () { onSet3d: function (name, oldValue, newValue) { if (oldValue !== newValue) { if (this.system.initialized && this.currentSource) { + var paused = false; + var suspended = false; + if (this.channel) { + paused = this.channel.paused; + suspended = this.channel.suspended; + } + this.play(this.currentSource); + + if (this.channel) { + this.channel.paused = paused; + this.channel.suspended = suspended; + } } } }, From 03e82b52a49b9b9572aba0bacd7866af99848ed8 Mon Sep 17 00:00:00 2001 From: Vaios Kalpias-Ilias Date: Mon, 7 Dec 2015 11:52:31 +0200 Subject: [PATCH 06/10] [RELEASE] v0.178.4 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 9b93a7ed870..788970d6cbd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.178.3-dev +0.178.4 From 20ecba844d2f7b0820d8dd0591eb711bb8d85b50 Mon Sep 17 00:00:00 2001 From: Vaios Kalpias-Ilias Date: Mon, 7 Dec 2015 11:52:31 +0200 Subject: [PATCH 07/10] [VERSION] v0.179.0-dev --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 788970d6cbd..2f983a6a73b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.178.4 +0.179.0-dev From 873630dabfb045c3a04b38aaa4a4dcace08ceec6 Mon Sep 17 00:00:00 2001 From: Vaios Kalpias-Ilias Date: Mon, 7 Dec 2015 18:12:50 +0200 Subject: [PATCH 08/10] [FIX] Synchronous loading of scripts that are already loaded --- src/framework/components/script/script_component.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/framework/components/script/script_component.js b/src/framework/components/script/script_component.js index b2ede054bd8..dedbdee293b 100644 --- a/src/framework/components/script/script_component.js +++ b/src/framework/components/script/script_component.js @@ -134,8 +134,16 @@ pc.extend(pc, function () { var i, len; var cached = []; + var prefix = this.system._prefix || ""; + var regex = /^http(s)?:\/\//i; + for (i = 0, len = urls.length; i < len; i++) { - var type = this.system.app.loader.getFromCache(urls[i]); + var url = urls[i]; + if (! regex.test(url)) { + url = pc.path.join(prefix, url); + } + + var type = this.system.app.loader.getFromCache(url, 'script'); // if we cannot find the script in the cache then return and load // all scripts with the resource loader From 72203cc9b0ef40be396d52c29b85b209fc93eff7 Mon Sep 17 00:00:00 2001 From: Vaios Kalpias-Ilias Date: Mon, 7 Dec 2015 18:14:31 +0200 Subject: [PATCH 09/10] [RELEASE] v0.178.5 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 2f983a6a73b..ca45a5a64ed 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.179.0-dev +0.178.5 From 56042fbef723109d06c09a2357dc771aaf0f8211 Mon Sep 17 00:00:00 2001 From: Vaios Kalpias-Ilias Date: Mon, 7 Dec 2015 18:14:31 +0200 Subject: [PATCH 10/10] [VERSION] v0.179.0-dev --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index ca45a5a64ed..2f983a6a73b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.178.5 +0.179.0-dev