From c87c39fde0af619a5a62c13d5724d9ccfe034466 Mon Sep 17 00:00:00 2001 From: Alexander Gugel Date: Wed, 27 May 2015 18:28:32 -0700 Subject: [PATCH] break: Rename (start|stop)Engine -> (start|stop)RenderLoop --- core/FamousEngine.js | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/core/FamousEngine.js b/core/FamousEngine.js index 1f880ebe..9b0a27d7 100644 --- a/core/FamousEngine.js +++ b/core/FamousEngine.js @@ -1,18 +1,18 @@ /** * The MIT License (MIT) - * + * * Copyright (c) 2015 Famous Industries Inc. - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -362,7 +362,7 @@ FamousEngine.prototype.createScene = function createScene (selector) { * * @return {FamousEngine} this */ -FamousEngine.prototype.startEngine = function startEngine () { +FamousEngine.prototype.startRenderLoop = function startRenderLoop() { this._channel.sendMessage(ENGINE_START); return this; }; @@ -375,9 +375,37 @@ FamousEngine.prototype.startEngine = function startEngine () { * * @return {FamousEngine} this */ -FamousEngine.prototype.stopEngine = function stopEngine () { +FamousEngine.prototype.stopRenderLoop = function stopRenderLoop() { this._channel.sendMessage(ENGINE_STOP); return this; }; +/** + * @method + * @deprecated Use {@link FamousEngine#startRenderLoop} instead! + * + * @return {FamousEngine} this + */ +FamousEngine.prototype.startEngine = function startEngine() { + console.warn( + 'FamousEngine.startEngine is deprecated! Use ' + + 'FamousEngine.startRenderLoop instead!' + ); + return this.startRenderLoop(); +}; + +/** + * @method + * @deprecated Use {@link FamousEngine#stopRenderLoop} instead! + * + * @return {FamousEngine} this + */ +FamousEngine.prototype.stopEngine = function stopEngine() { + console.warn( + 'FamousEngine.stopEngine is deprecated! Use ' + + 'FamousEngine.stopRenderLoop instead!' + ); + return this.stopRenderLoop(); +}; + module.exports = new FamousEngine();