From 504d3ed3420761da178d42db18e29cb1d01bcaeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Roux?= Date: Tue, 7 Mar 2017 09:44:22 +0100 Subject: [PATCH 1/4] Fix camera radius on parallax setter --- src/camera/Camera.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/camera/Camera.js b/src/camera/Camera.js index 1b60c6bf..b2775060 100644 --- a/src/camera/Camera.js +++ b/src/camera/Camera.js @@ -1081,6 +1081,7 @@ Object.defineProperty(FORGE.Camera.prototype, "parallax", set: function(value) { this._parallax = FORGE.Math.clamp(value, 0, 1); + this._radius = this._parallax * FORGE.Camera.RADIUS; this._updateComplete(); } }); From 1047b2634cbf5de117dc478d852278efad979f8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Roux?= Date: Tue, 7 Mar 2017 09:46:05 +0100 Subject: [PATCH 2/4] Add sceneUid, sceneUids, groupUid, groupUids getter / setter on Story.js --- src/story/Story.js | 56 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 8 deletions(-) diff --git a/src/story/Story.js b/src/story/Story.js index 0161e843..67871089 100755 --- a/src/story/Story.js +++ b/src/story/Story.js @@ -663,7 +663,7 @@ FORGE.Story.prototype.destroy = function() Object.defineProperty(FORGE.Story.prototype, "config", { /** @this {FORGE.Story} */ - get: function () + get: function() { return this._config; } @@ -724,7 +724,7 @@ Object.defineProperty(FORGE.Story.prototype, "description", Object.defineProperty(FORGE.Story.prototype, "scenes", { /** @this {FORGE.Story} */ - get: function () + get: function() { return FORGE.UID.get(this._scenes); } @@ -738,7 +738,7 @@ Object.defineProperty(FORGE.Story.prototype, "scenes", Object.defineProperty(FORGE.Story.prototype, "scene", { /** @this {FORGE.Story} */ - get: function () + get: function() { if(this._sceneUid === null || this._sceneUid === "") { @@ -755,18 +755,38 @@ Object.defineProperty(FORGE.Story.prototype, "scene", } }); +/** +* Get all the sceneUids. +* @name FORGE.Story#sceneUids +* @readonly +* @type {Array} +*/ +Object.defineProperty(FORGE.Story.prototype, "sceneUids", +{ + /** @this {FORGE.Story} */ + get: function() + { + return this._scenes; + } +}); + /** * Get the current sceneUid. * @name FORGE.Story#sceneUid -* @readonly * @type {string} */ Object.defineProperty(FORGE.Story.prototype, "sceneUid", { /** @this {FORGE.Story} */ - get: function () + get: function() { return this._sceneUid; + }, + + /** @this {FORGE.Story} */ + set: function(value) + { + this.loadScene(value); } }); @@ -793,7 +813,7 @@ Object.defineProperty(FORGE.Story.prototype, "groups", Object.defineProperty(FORGE.Story.prototype, "group", { /** @this {FORGE.Story} */ - get: function () + get: function() { if(this._groupUid === null || this._groupUid === "") { @@ -810,18 +830,38 @@ Object.defineProperty(FORGE.Story.prototype, "group", } }); +/** +* Get all the group Uids. +* @name FORGE.Story#groupUids +* @readonly +* @type {Array} +*/ +Object.defineProperty(FORGE.Story.prototype, "groupUids", +{ + /** @this {FORGE.Story} */ + get: function() + { + return this._groups; + } +}); + /** * Get the current groupUid. * @name FORGE.Story#groupUid -* @readonly * @type {string} */ Object.defineProperty(FORGE.Story.prototype, "groupUid", { /** @this {FORGE.Story} */ - get: function () + get: function() { return this._groupUid; + }, + + /** @this {FORGE.Story} */ + set: function(value) + { + this.loadGroup(value); } }); From 9152d357b7828e7cae78ec71dfb5ca3928c2321c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Roux?= Date: Tue, 7 Mar 2017 09:48:09 +0100 Subject: [PATCH 3/4] Clean --- src/display/components/Canvas.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/display/components/Canvas.js b/src/display/components/Canvas.js index fed9fe4f..2f30b61b 100644 --- a/src/display/components/Canvas.js +++ b/src/display/components/Canvas.js @@ -33,7 +33,7 @@ FORGE.Canvas.prototype._boot = function() * @type {CanvasRenderingContext2D} * @readonly */ -Object.defineProperty(FORGE.Canvas.prototype, "context2D", +Object.defineProperty(FORGE.Canvas.prototype, "context2D", { /** @this {FORGE.Canvas} */ get: function() @@ -48,7 +48,7 @@ Object.defineProperty(FORGE.Canvas.prototype, "context2D", * @type {WebGLRenderingContext} * @readonly */ -Object.defineProperty(FORGE.Canvas.prototype, "context3D", +Object.defineProperty(FORGE.Canvas.prototype, "context3D", { /** @this {FORGE.Canvas} */ get: function() @@ -63,7 +63,7 @@ Object.defineProperty(FORGE.Canvas.prototype, "context3D", * @type {HTMLCanvasElement} * @readonly */ -Object.defineProperty(FORGE.Canvas.prototype, "element", +Object.defineProperty(FORGE.Canvas.prototype, "element", { /** @this {FORGE.Canvas} */ get: function() From 1c4d07933939af3cc0ab2127df6754dd8d813142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Roux?= Date: Tue, 7 Mar 2017 09:53:01 +0100 Subject: [PATCH 4/4] Update changelog 0.9.1 --- tools/changelog/0.9.1.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/changelog/0.9.1.md b/tools/changelog/0.9.1.md index 7fe19d0e..b26a831c 100644 --- a/tools/changelog/0.9.1.md +++ b/tools/changelog/0.9.1.md @@ -2,7 +2,6 @@ ### Viewer -- Update the way we detect Safari browser in FORGE.Device - Fix default background configuration for the main container ### Scene @@ -17,7 +16,7 @@ - Don't update texture when the video is paused. - Don't render the background when a scene has no media. -- Unload scene background on scene exit. +- Unload scene background on scene unload. - Fix onBeforeRender and onAfterRender events on Hotspot3D objects. - Fix render routine when pipeline has no fx. @@ -28,7 +27,6 @@ ### Audio - - Redesign of the HTMLAudioElement loader to solve events never fired on Microsoft Edge. - Deactivation of the AudioContext suspend and resume methods for Safari browser compatibility @@ -36,7 +34,7 @@ - Video auto quality improvements when you use multiple video sources as quality levels. - Fix multiple quality issues on Microsoft browsers. -- Add `playslinline` attribute for HTMLVideoElement to display the video properly on iOS. +- Add `playslinline` attribute for HTMLVideoElement to display the video properly on iOS 10.x. - Video levels can now target a specific environement. Useful to prevent the use of a too high video resolution on Safari or Firefox. ### Media @@ -85,6 +83,7 @@ ### Misc +- Update the way we detect Safari browser in FORGE.Device - Remove unused classes CameraViewFinder.js, CameraViewFinderType.js, Debug.js. - Cubemap videos on cdn.forgejs.org for testing. - Array.prototype.keys polyfill for cubemap media type under Internet Explorer 11.