فهرست منبع

Removed Editor unit tests.

Mr.doob 4 سال پیش
والد
کامیت
1e30dfa877
91فایلهای تغییر یافته به همراه0 افزوده شده و 3007 حذف شده
  1. 0 18
      test/rollup.unit.config.js
  2. 0 1
      test/unit/UnitTests.html
  3. 0 17
      test/unit/editor/Command.tests.js
  4. 0 167
      test/unit/editor/CommonUtilities.js
  5. 0 17
      test/unit/editor/Config.tests.js
  6. 0 17
      test/unit/editor/Editor.tests.js
  7. 0 17
      test/unit/editor/History.tests.js
  8. 0 17
      test/unit/editor/Loader.tests.js
  9. 0 17
      test/unit/editor/Menubar.Add.tests.js
  10. 0 17
      test/unit/editor/Menubar.Edit.tests.js
  11. 0 17
      test/unit/editor/Menubar.Examples.tests.js
  12. 0 17
      test/unit/editor/Menubar.File.tests.js
  13. 0 17
      test/unit/editor/Menubar.Help.tests.js
  14. 0 17
      test/unit/editor/Menubar.Play.tests.js
  15. 0 17
      test/unit/editor/Menubar.Status.tests.js
  16. 0 17
      test/unit/editor/Menubar.View.tests.js
  17. 0 17
      test/unit/editor/Menubar.tests.js
  18. 0 17
      test/unit/editor/Player.tests.js
  19. 0 17
      test/unit/editor/Script.tests.js
  20. 0 17
      test/unit/editor/Sidebar.Animation.tests.js
  21. 0 17
      test/unit/editor/Sidebar.Geometry.BoxGeometry.tests.js
  22. 0 17
      test/unit/editor/Sidebar.Geometry.BufferGeometry.tests.js
  23. 0 17
      test/unit/editor/Sidebar.Geometry.CircleGeometry.tests.js
  24. 0 17
      test/unit/editor/Sidebar.Geometry.CylinderGeometry.tests.js
  25. 0 17
      test/unit/editor/Sidebar.Geometry.Geometry.tests.js
  26. 0 17
      test/unit/editor/Sidebar.Geometry.IcosahedronGeometry.tests.js
  27. 0 17
      test/unit/editor/Sidebar.Geometry.LatheGeometry.tests.js
  28. 0 17
      test/unit/editor/Sidebar.Geometry.Modifiers.tests.js
  29. 0 17
      test/unit/editor/Sidebar.Geometry.PlaneGeometry.tests.js
  30. 0 17
      test/unit/editor/Sidebar.Geometry.SphereGeometry.tests.js
  31. 0 17
      test/unit/editor/Sidebar.Geometry.TeapotBufferGeometry.tests.js
  32. 0 17
      test/unit/editor/Sidebar.Geometry.TorusGeometry.tests.js
  33. 0 17
      test/unit/editor/Sidebar.Geometry.TorusKnotGeometry.tests.js
  34. 0 17
      test/unit/editor/Sidebar.Geometry.tests.js
  35. 0 17
      test/unit/editor/Sidebar.History.tests.js
  36. 0 17
      test/unit/editor/Sidebar.Material.tests.js
  37. 0 17
      test/unit/editor/Sidebar.Object.tests.js
  38. 0 17
      test/unit/editor/Sidebar.Project.tests.js
  39. 0 17
      test/unit/editor/Sidebar.Properties.tests.js
  40. 0 17
      test/unit/editor/Sidebar.Scene.tests.js
  41. 0 17
      test/unit/editor/Sidebar.Script.tests.js
  42. 0 17
      test/unit/editor/Sidebar.Settings.tests.js
  43. 0 17
      test/unit/editor/Sidebar.tests.js
  44. 0 17
      test/unit/editor/Storage.tests.js
  45. 0 17
      test/unit/editor/Toolbar.tests.js
  46. 0 17
      test/unit/editor/Viewport.Info.tests.js
  47. 0 17
      test/unit/editor/Viewport.tests.js
  48. 0 21
      test/unit/editor/commands/AddObjectCommand.tests.js
  49. 0 21
      test/unit/editor/commands/AddScriptCommand.tests.js
  50. 0 21
      test/unit/editor/commands/MoveObjectCommand.tests.js
  51. 0 21
      test/unit/editor/commands/MultiCmdsCommand.tests.js
  52. 0 21
      test/unit/editor/commands/RemoveObjectCommand.tests.js
  53. 0 21
      test/unit/editor/commands/RemoveScriptCommand.tests.js
  54. 0 21
      test/unit/editor/commands/SetColorCommand.tests.js
  55. 0 21
      test/unit/editor/commands/SetGeometryCommand.tests.js
  56. 0 21
      test/unit/editor/commands/SetGeometryValueCommand.tests.js
  57. 0 21
      test/unit/editor/commands/SetMaterialColorCommand.tests.js
  58. 0 21
      test/unit/editor/commands/SetMaterialCommand.tests.js
  59. 0 21
      test/unit/editor/commands/SetMaterialMapCommand.tests.js
  60. 0 21
      test/unit/editor/commands/SetMaterialValueCommand.tests.js
  61. 0 21
      test/unit/editor/commands/SetPositionCommand.tests.js
  62. 0 21
      test/unit/editor/commands/SetRotationCommand.tests.js
  63. 0 21
      test/unit/editor/commands/SetScaleCommand.tests.js
  64. 0 21
      test/unit/editor/commands/SetSceneCommand.tests.js
  65. 0 21
      test/unit/editor/commands/SetScriptValueCommand.tests.js
  66. 0 21
      test/unit/editor/commands/SetUuidCommand.tests.js
  67. 0 21
      test/unit/editor/commands/SetValueCommand.tests.js
  68. 0 52
      test/unit/editor/old_to_convert/AddObjectCommandAndRemoveObjectCommand.tests.js
  69. 0 58
      test/unit/editor/old_to_convert/AddScriptCommand.tests.js
  70. 0 51
      test/unit/editor/old_to_convert/MassUndoAndRedo.tests.js
  71. 0 38
      test/unit/editor/old_to_convert/MoveObjectCommand.tests.js
  72. 0 76
      test/unit/editor/old_to_convert/MultiCmdsCommand.tests.js
  73. 0 51
      test/unit/editor/old_to_convert/NegativeCases.tests.js
  74. 0 104
      test/unit/editor/old_to_convert/NestedDoUndoRedo.tests.js
  75. 0 60
      test/unit/editor/old_to_convert/RemoveScriptCommand.tests.js
  76. 0 356
      test/unit/editor/old_to_convert/Serialization.tests.js
  77. 0 36
      test/unit/editor/old_to_convert/SetColorCommand.tests.js
  78. 0 59
      test/unit/editor/old_to_convert/SetGeometryCommand.tests.js
  79. 0 47
      test/unit/editor/old_to_convert/SetGeometryValueCommand.tests.js
  80. 0 41
      test/unit/editor/old_to_convert/SetMaterialColorCommand.tests.js
  81. 0 62
      test/unit/editor/old_to_convert/SetMaterialCommand.tests.js
  82. 0 66
      test/unit/editor/old_to_convert/SetMaterialMapCommand.tests.js
  83. 0 58
      test/unit/editor/old_to_convert/SetMaterialValueCommand.tests.js
  84. 0 44
      test/unit/editor/old_to_convert/SetPositionCommand.tests.js
  85. 0 47
      test/unit/editor/old_to_convert/SetRotationCommand.tests.js
  86. 0 47
      test/unit/editor/old_to_convert/SetScaleCommand.tests.js
  87. 0 69
      test/unit/editor/old_to_convert/SetSceneCommand.tests.js
  88. 0 73
      test/unit/editor/old_to_convert/SetScriptValueCommand.tests.js
  89. 0 32
      test/unit/editor/old_to_convert/SetUuidCommand.tests.js
  90. 0 49
      test/unit/editor/old_to_convert/SetValueCommand.tests.js
  91. 0 77
      test/unit/three.editor.unit.js

+ 0 - 18
test/rollup.unit.config.js

@@ -36,24 +36,6 @@ function glsl() {
 }
 
 export default [
-	// editor unit conf
-	{
-		input: 'unit/three.editor.unit.js',
-		plugins: [
-			glsl()
-		],
-		// sourceMap: true,
-		output: [
-			{
-				format: 'umd',
-				name: 'THREE',
-				file: 'unit/build/three.editor.unit.js',
-				intro: 'QUnit.module( "Editor", () => {',
-				outro: '} );',
-				indent: '\t',
-			}
-		]
-	},
 	// example unit conf
 	{
 		input: 'unit/three.example.unit.js',

+ 0 - 1
test/unit/UnitTests.html

@@ -16,7 +16,6 @@
         <script src="../../build/three.js"></script>
 
         <!-- add sources to test below -->
-        <!-- <script src="build/three.editor.unit.js"></script> -->
         <script src="build/three.source.unit.js"></script>
         <script src="build/three.example.unit.js"></script>
 

+ 0 - 17
test/unit/editor/Command.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Command';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Command', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 167
test/unit/editor/CommonUtilities.js

@@ -1,167 +0,0 @@
-
-function mergeParams( defaults, customParams ) {
-
-	if ( typeof customParams == "undefined" ) return defaults;
-
-	var defaultKeys = Object.keys( defaults );
-	var params = {};
-
-	defaultKeys.map( function( key ) {
-
-		params[ key ] = customParams[ key ] || defaultKeys[ key ];
-
-	} );
-
-	return params;
-
-}
-
-
-function getGeometryParams( type, customParams ) {
-
-	if ( typeof customParams != "undefined" &&
-		typeof customParams.geometry != "undefined" &&
-		typeof customParams.geometry.parameters != "undefined" ) {
-
-		var customGeometryParams = customParams.geometry.parameters;
-
-	}
-
-	var defaults = {};
-
-	switch ( type ) {
-
-		case "BoxGeometry":
-
-			defaults = { width: 100, height: 100, depth: 100, widthSegments: 1, heightSegments: 1, depthSegments: 1 };
-			break;
-
-		case "SphereGeometry":
-
-			defaults = { radius: 75, widthSegments: 32, heightSegments: 16, phiStart: 0, phiLength: 6.28, thetaStart: 0.00, thetaLength: 3.14 };
-			break;
-
-		default:
-
-			console.error( "Type '" + type + "' is not known while creating params" );
-			return false;
-
-	}
-
-	return mergeParams( defaults, customGeometryParams );
-
-}
-
-function getGeometry( type, customParams ) {
-
-	var params = getGeometryParams( type, customParams );
-
-	switch ( type ) {
-
-		case "BoxGeometry":
-
-			return new THREE.BoxGeometry(
-				params[ 'width' ],
-				params[ 'height' ],
-				params[ 'depth' ],
-				params[ 'widthSegments' ],
-				params[ 'heightSegments' ],
-				params[ 'depthSegments' ]
-			);
-
-		case "SphereGeometry":
-
-			return new THREE.SphereGeometry(
-				params[ 'radius' ],
-				params[ 'widthSegments' ],
-				params[ 'heightSegments' ],
-				params[ 'phiStart' ],
-				params[ 'phiLength' ],
-				params[ 'thetaStart' ],
-				params[ 'thetaLength' ]
-			);
-
-		default:
-
-			console.error( "Type '" + type + "' is not known while creating geometry " );
-			return false;
-
-	}
-
-}
-
-function getObject( name, type, customParams ) {
-
-	var geometry = getGeometry( type, customParams );
-
-	var object = new THREE.Mesh( geometry, new THREE.MeshPhongMaterial() );
-	object.name = name || type + " 1";
-
-	return object;
-
-}
-
-
-function aBox( name, customParams ) {
-
-	return getObject( name, "BoxGeometry", customParams );
-
-}
-
-function aSphere( name, customParams ) {
-
-	return getObject( name, "SphereGeometry", customParams );
-
-}
-
-function aPointlight( name ) {
-
-	var object = new THREE.PointLight( 54321, 1.0, 0.0, 1.0 );
-	object.name = name || "PointLight 1";
-
-	return object;
-
-}
-
-function aPerspectiveCamera( name ) {
-
-	var object = new THREE.PerspectiveCamera( 50.1, 0.4, 1.03, 999.05 );
-	object.name = name || "PerspectiveCamera 1";
-
-	return object;
-
-}
-
-function getScriptCount( editor ) {
-
-	var scriptsKeys = Object.keys( editor.scripts );
-	var scriptCount = 0;
-
-	for ( var i = 0; i < scriptsKeys.length; i ++ ) {
-
-		scriptCount += editor.scripts[ scriptsKeys[ i ] ].length;
-
-	}
-
-	return scriptCount;
-
-}
-
-function exportScene( editor ) {
-
-	var output = editor.scene.toJSON();
-	output = JSON.stringify( output, null, '\t' );
-	output = output.replace( /[\n\t]+([\d\.e\-\[\]]+)/g, '$1' );
-	return output;
-
-}
-
-function importScene( data ) {
-
-	var json = JSON.parse( data );
-	var loader = new THREE.ObjectLoader();
-	var result = loader.parse( json );
-
-	return result;
-
-}

+ 0 - 17
test/unit/editor/Config.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Config';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Config', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Editor.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Editor';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Editor', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/History.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/History';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'History', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Loader.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Loader';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Loader', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Menubar.Add.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Menubar.Add';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Menubar.Add', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Menubar.Edit.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Menubar.Edit';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Menubar.Edit', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Menubar.Examples.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Menubar.Examples';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Menubar.Examples', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Menubar.File.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Menubar.File';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Menubar.File', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Menubar.Help.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Menubar.Help';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Menubar.Help', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Menubar.Play.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Menubar.Play';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Menubar.Play', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Menubar.Status.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Menubar.Status';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Menubar.Status', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Menubar.View.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Menubar.View';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Menubar.View', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Menubar.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Menubar';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Menubar', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Player.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Player';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Player', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Script.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Script';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Script', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Animation.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Animation';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Animation', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Geometry.BoxGeometry.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Geometry.BoxGeometry';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Geometry.BoxGeometry', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Geometry.BufferGeometry.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Geometry.BufferGeometry';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Geometry.BufferGeometry', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Geometry.CircleGeometry.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Geometry.CircleGeometry';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Geometry.CircleGeometry', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Geometry.CylinderGeometry.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Geometry.CylinderGeometry';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Geometry.CylinderGeometry', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Geometry.Geometry.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Geometry';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Geometry', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Geometry.IcosahedronGeometry.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Geometry.IcosahedronGeometry';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Geometry.IcosahedronGeometry', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Geometry.LatheGeometry.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Geometry.LatheGeometry';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Geometry.LatheGeometry', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Geometry.Modifiers.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Geometry.Modifiers';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Geometry.Modifiers', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Geometry.PlaneGeometry.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Geometry.PlaneGeometry';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Geometry.PlaneGeometry', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Geometry.SphereGeometry.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Geometry.SphereGeometry';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Geometry.SphereGeometry', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Geometry.TeapotBufferGeometry.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Geometry.TeapotBufferGeometry';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Geometry.TeapotBufferGeometry', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Geometry.TorusGeometry.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Geometry.TorusGeometry';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Geometry.TorusGeometry', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Geometry.TorusKnotGeometry.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Geometry.TorusKnotGeometry';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Geometry.TorusKnotGeometry', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Geometry.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Geometry';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Geometry', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.History.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.History';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.History', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Material.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Material';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Material', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Object.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Object';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Object', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Project.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Project';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Project', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Properties.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Properties';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Properties', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Scene.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Scene';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Scene', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Script.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Script';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Script', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.Settings.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar.Settings';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar.Settings', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Sidebar.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Sidebar';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Sidebar', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Storage.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Storage';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Storage', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Toolbar.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Toolbar';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Toolbar', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Viewport.Info.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Viewport.Info';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Viewport.Info', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 17
test/unit/editor/Viewport.tests.js

@@ -1,17 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../editor/js/Viewport';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module.todo( 'Viewport', () => {
-
-		QUnit.test( 'write me !', ( assert ) => {
-
-			assert.ok( false, "everything's gonna be alright" );
-
-		} );
-
-	} );
-
-} );

+ 0 - 21
test/unit/editor/commands/AddObjectCommand.tests.js

@@ -1,21 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../../editor/js/commands/AddObjectCommand';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module( 'Commands', () => {
-
-		QUnit.module.todo( 'AddObjectCommand', () => {
-
-			QUnit.test( 'write me !', ( assert ) => {
-
-				assert.ok( false, "everything's gonna be alright" );
-
-			} );
-
-		} );
-
-	} );
-
-} );

+ 0 - 21
test/unit/editor/commands/AddScriptCommand.tests.js

@@ -1,21 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../../editor/js/commands/AddScriptCommand';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module( 'Commands', () => {
-
-		QUnit.module.todo( 'AddScriptCommand', () => {
-
-			QUnit.test( 'write me !', ( assert ) => {
-
-				assert.ok( false, "everything's gonna be alright" );
-
-			} );
-
-		} );
-
-	} );
-
-} );

+ 0 - 21
test/unit/editor/commands/MoveObjectCommand.tests.js

@@ -1,21 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../../editor/js/commands/MoveObjectCommand';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module( 'Commands', () => {
-
-		QUnit.module.todo( 'MoveObjectCommand', () => {
-
-			QUnit.test( 'write me !', ( assert ) => {
-
-				assert.ok( false, "everything's gonna be alright" );
-
-			} );
-
-		} );
-
-	} );
-
-} );

+ 0 - 21
test/unit/editor/commands/MultiCmdsCommand.tests.js

@@ -1,21 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../../editor/js/commands/MultiCmdsCommand';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module( 'Commands', () => {
-
-		QUnit.module.todo( 'MultiCmdsCommand', () => {
-
-			QUnit.test( 'write me !', ( assert ) => {
-
-				assert.ok( false, "everything's gonna be alright" );
-
-			} );
-
-		} );
-
-	} );
-
-} );

+ 0 - 21
test/unit/editor/commands/RemoveObjectCommand.tests.js

@@ -1,21 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../../editor/js/commands/RemoveObjectCommand';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module( 'Commands', () => {
-
-		QUnit.module.todo( 'RemoveObjectCommand', () => {
-
-			QUnit.test( 'write me !', ( assert ) => {
-
-				assert.ok( false, "everything's gonna be alright" );
-
-			} );
-
-		} );
-
-	} );
-
-} );

+ 0 - 21
test/unit/editor/commands/RemoveScriptCommand.tests.js

@@ -1,21 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../../editor/js/commands/RemoveScriptCommand';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module( 'Commands', () => {
-
-		QUnit.module.todo( 'RemoveScriptCommand', () => {
-
-			QUnit.test( 'write me !', ( assert ) => {
-
-				assert.ok( false, "everything's gonna be alright" );
-
-			} );
-
-		} );
-
-	} );
-
-} );

+ 0 - 21
test/unit/editor/commands/SetColorCommand.tests.js

@@ -1,21 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../../editor/js/commands/SetColorCommand';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module( 'Commands', () => {
-
-		QUnit.module.todo( 'SetColorCommand', () => {
-
-			QUnit.test( 'write me !', ( assert ) => {
-
-				assert.ok( false, "everything's gonna be alright" );
-
-			} );
-
-		} );
-
-	} );
-
-} );

+ 0 - 21
test/unit/editor/commands/SetGeometryCommand.tests.js

@@ -1,21 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../../editor/js/commands/SetGeometryCommand';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module( 'Commands', () => {
-
-		QUnit.module.todo( 'SetGeometryCommand', () => {
-
-			QUnit.test( 'write me !', ( assert ) => {
-
-				assert.ok( false, "everything's gonna be alright" );
-
-			} );
-
-		} );
-
-	} );
-
-} );

+ 0 - 21
test/unit/editor/commands/SetGeometryValueCommand.tests.js

@@ -1,21 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../../editor/js/commands/SetGeometryValueCommand';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module( 'Commands', () => {
-
-		QUnit.module.todo( 'SetGeometryValueCommand', () => {
-
-			QUnit.test( 'write me !', ( assert ) => {
-
-				assert.ok( false, "everything's gonna be alright" );
-
-			} );
-
-		} );
-
-	} );
-
-} );

+ 0 - 21
test/unit/editor/commands/SetMaterialColorCommand.tests.js

@@ -1,21 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../../editor/js/commands/SetMaterialColorCommand';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module( 'Commands', () => {
-
-		QUnit.module.todo( 'SetMaterialColorCommand', () => {
-
-			QUnit.test( 'write me !', ( assert ) => {
-
-				assert.ok( false, "everything's gonna be alright" );
-
-			} );
-
-		} );
-
-	} );
-
-} );

+ 0 - 21
test/unit/editor/commands/SetMaterialCommand.tests.js

@@ -1,21 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../../editor/js/commands/SetMaterialCommand';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module( 'Commands', () => {
-
-		QUnit.module.todo( 'SetMaterialCommand', () => {
-
-			QUnit.test( 'write me !', ( assert ) => {
-
-				assert.ok( false, "everything's gonna be alright" );
-
-			} );
-
-		} );
-
-	} );
-
-} );

+ 0 - 21
test/unit/editor/commands/SetMaterialMapCommand.tests.js

@@ -1,21 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../../editor/js/commands/SetMaterialMapCommand';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module( 'Commands', () => {
-
-		QUnit.module.todo( 'SetMaterialMapCommand', () => {
-
-			QUnit.test( 'write me !', ( assert ) => {
-
-				assert.ok( false, "everything's gonna be alright" );
-
-			} );
-
-		} );
-
-	} );
-
-} );

+ 0 - 21
test/unit/editor/commands/SetMaterialValueCommand.tests.js

@@ -1,21 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../../editor/js/commands/SetMaterialValueCommand';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module( 'Commands', () => {
-
-		QUnit.module.todo( 'SetMaterialValueCommand', () => {
-
-			QUnit.test( 'write me !', ( assert ) => {
-
-				assert.ok( false, "everything's gonna be alright" );
-
-			} );
-
-		} );
-
-	} );
-
-} );

+ 0 - 21
test/unit/editor/commands/SetPositionCommand.tests.js

@@ -1,21 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../../editor/js/commands/SetPositionCommand';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module( 'Commands', () => {
-
-		QUnit.module.todo( 'SetPositionCommand', () => {
-
-			QUnit.test( 'write me !', ( assert ) => {
-
-				assert.ok( false, "everything's gonna be alright" );
-
-			} );
-
-		} );
-
-	} );
-
-} );

+ 0 - 21
test/unit/editor/commands/SetRotationCommand.tests.js

@@ -1,21 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../../editor/js/commands/SetRotationCommand';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module( 'Commands', () => {
-
-		QUnit.module.todo( 'SetRotationCommand', () => {
-
-			QUnit.test( 'write me !', ( assert ) => {
-
-				assert.ok( false, "everything's gonna be alright" );
-
-			} );
-
-		} );
-
-	} );
-
-} );

+ 0 - 21
test/unit/editor/commands/SetScaleCommand.tests.js

@@ -1,21 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../../editor/js/commands/SetScaleCommand';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module( 'Commands', () => {
-
-		QUnit.module.todo( 'SetScaleCommand', () => {
-
-			QUnit.test( 'write me !', ( assert ) => {
-
-				assert.ok( false, "everything's gonna be alright" );
-
-			} );
-
-		} );
-
-	} );
-
-} );

+ 0 - 21
test/unit/editor/commands/SetSceneCommand.tests.js

@@ -1,21 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../../editor/js/commands/SetSceneCommand';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module( 'Commands', () => {
-
-		QUnit.module.todo( 'SetSceneCommand', () => {
-
-			QUnit.test( 'write me !', ( assert ) => {
-
-				assert.ok( false, "everything's gonna be alright" );
-
-			} );
-
-		} );
-
-	} );
-
-} );

+ 0 - 21
test/unit/editor/commands/SetScriptValueCommand.tests.js

@@ -1,21 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../../editor/js/commands/SetScriptValueCommand';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module( 'Commands', () => {
-
-		QUnit.module.todo( 'SetScriptValueCommand', () => {
-
-			QUnit.test( 'write me !', ( assert ) => {
-
-				assert.ok( false, "everything's gonna be alright" );
-
-			} );
-
-		} );
-
-	} );
-
-} );

+ 0 - 21
test/unit/editor/commands/SetUuidCommand.tests.js

@@ -1,21 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../../editor/js/commands/SetUuidCommand';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module( 'Commands', () => {
-
-		QUnit.module.todo( 'SetUuidCommand', () => {
-
-			QUnit.test( 'write me !', ( assert ) => {
-
-				assert.ok( false, "everything's gonna be alright" );
-
-			} );
-
-		} );
-
-	} );
-
-} );

+ 0 - 21
test/unit/editor/commands/SetValueCommand.tests.js

@@ -1,21 +0,0 @@
-/* global QUnit */
-
-import { } from '../../../../editor/js/commands/SetValueCommand';
-
-export default QUnit.module( 'Editor', () => {
-
-	QUnit.module( 'Commands', () => {
-
-		QUnit.module.todo( 'SetValueCommand', () => {
-
-			QUnit.test( 'write me !', ( assert ) => {
-
-				assert.ok( false, "everything's gonna be alright" );
-
-			} );
-
-		} );
-
-	} );
-
-} );

+ 0 - 52
test/unit/editor/old_to_convert/AddObjectCommandAndRemoveObjectCommand.tests.js

@@ -1,52 +0,0 @@
-
-QUnit.module( "AddObjectCommandAndRemoveObjectCommand" );
-
-QUnit.test( "Test AddObjectCommand and RemoveObjectCommand (Undo and Redo)", function( assert ) {
-
-	// setup
-	var editor = new Editor();
-
-	var box = aBox( 'The Box' );
-	var light = aPointlight( 'The PointLight' );
-	var camera = aPerspectiveCamera( 'The Camera' );
-
-	var objects = [ box , light, camera ];
-
-	objects.map( function( object ) {
-
-		// Test Add
-		var cmd = new AddObjectCommand( object );
-		cmd.updatable = false;
-
-		editor.execute( cmd );
-		assert.ok( editor.scene.children.length == 1, "OK, adding '" + object.type + "' was successful " );
-
-		editor.undo();
-		assert.ok( editor.scene.children.length == 0, "OK, adding '" + object.type + "' is undone (was removed)" );
-
-		editor.redo();
-		assert.ok( editor.scene.children[ 0 ].name == object.name, "OK, removed '" + object.type + "' was added again (redo)" );
-
-		assert.ok( editor.selected == object, "OK, focus was set on recovered object after Add-Redo" );
-
-
-		// Test Remove
-		var cmd = new RemoveObjectCommand( object );
-		cmd.updatable = false;
-
-		editor.execute( cmd );
-		assert.ok( editor.scene.children.length == 0, "OK, removing object was successful" );
-
-		editor.undo();
-		assert.ok( editor.scene.children[ 0 ].name == object.name, "OK, removed object was added again (undo)" );
-
-		assert.ok( editor.selected == object, "OK, focus was set on recovered object after Delete-Undo" );
-
-		editor.redo();
-		assert.ok( editor.scene.children.length == 0, "OK, object was removed again (redo)" );
-
-
-	} );
-
-
-} );

+ 0 - 58
test/unit/editor/old_to_convert/AddScriptCommand.tests.js

@@ -1,58 +0,0 @@
-
-QUnit.module( "AddScriptCommand" );
-
-QUnit.test( "Test AddScriptCommand (Undo and Redo)", function( assert ) {
-
-	var editor = new Editor();
-
-	// prepare
-	var box    = aBox( "The scripted box" );
-	var sphere = aSphere( "The scripted sphere" );
-	var objects = [ box, sphere ];
-
-	var xMove  = { name: "", source: "function update( event ) { this.position.x = this.position.x + 1; }" };
-	var yMove  = { name: "", source: "function update( event ) { this.position.y = this.position.y + 1; }" };
-	var scripts = [ xMove, yMove ];
-
-	// add objects to editor
-	objects.map( function( item ) {
-
-		editor.execute( new AddObjectCommand( item ) );
-
-	} );
-	assert.ok( editor.scene.children.length == 2, "OK, the box and the sphere have been added" );
-
-	// add scripts to the objects
-	for ( var i = 0; i < scripts.length; i ++ ) {
-
-		var cmd = new AddScriptCommand( objects[ i ], scripts[ i ] );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-	}
-
-	var scriptsKeys = Object.keys( editor.scripts );
-	assert.ok( getScriptCount( editor ) == scripts.length, "OK, correct number of scripts have been added" );
-
-	for ( var i = 0; i < objects.length; i ++ ) {
-
-		assert.ok( objects[ i ].uuid == scriptsKeys[ i ], "OK, script key #" + i + " matches the object's UUID" );
-
-	}
-
-	editor.undo();
-	assert.ok( getScriptCount( editor ) == scripts.length - 1, "OK, one script has been removed by undo" );
-
-	editor.redo();
-	assert.ok( getScriptCount( editor ) == scripts.length, "OK, one script has been added again by redo" );
-
-
-	for ( var i = 0; i < scriptsKeys.length; i ++ ) {
-
-		assert.ok( editor.scripts[ scriptsKeys[ i ] ][ 0 ] == scripts[ i ], "OK, script #" + i + " is still assigned correctly" );
-
-	}
-
-
-} );
-

+ 0 - 51
test/unit/editor/old_to_convert/MassUndoAndRedo.tests.js

@@ -1,51 +0,0 @@
-
-QUnit.module( "MassUndoAndRedo" );
-
-QUnit.test( "MassUndoAndRedo (stress test)", function( assert ) {
-
-	var editor = new Editor();
-
-	var MAX_OBJECTS = 100;
-
-	// add objects
-	var i = 0;
-	while ( i < MAX_OBJECTS ) {
-
-		var object = aSphere( 'Sphere #' + i );
-		var cmd = new AddObjectCommand( object );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-		i ++;
-
-	}
-
-	assert.ok( editor.scene.children.lenght = MAX_OBJECTS,
-		"OK, " + MAX_OBJECTS + " objects have been added" );
-
-	// remove all objects
-	i = 0;
-	while ( i < MAX_OBJECTS ) {
-
-		editor.undo();
-		i ++;
-
-	}
-
-
-	assert.ok( editor.scene.children.length == 0,
-		"OK, all objects have been removed by undos" );
-
-
-	i = 0;
-	while ( i < MAX_OBJECTS ) {
-
-		editor.redo();
-		i ++;
-
-	}
-
-	assert.ok( editor.scene.children.lenght = MAX_OBJECTS,
-		"OK, " + MAX_OBJECTS + " objects have been added again by redos" );
-
-} );

+ 0 - 38
test/unit/editor/old_to_convert/MoveObjectCommand.tests.js

@@ -1,38 +0,0 @@
-
-QUnit.module( "MoveObjectCommand" );
-
-QUnit.test( "Test MoveObjectCommand (Undo and Redo)", function( assert ) {
-
-	var editor = new Editor();
-
-	// create some objects
-	var anakinsName = 'Anakin Skywalker';
-	var lukesName   = 'Luke Skywalker';
-	var anakinSkywalker = aSphere( anakinsName );
-	var lukeSkywalker   = aBox( lukesName );
-
-	editor.execute( new AddObjectCommand( anakinSkywalker ) );
-	editor.execute( new AddObjectCommand( lukeSkywalker ) );
-
-
-	assert.ok( anakinSkywalker.parent.name == "Scene", "OK, Anakin's parent is 'Scene' " );
-	assert.ok( lukeSkywalker.parent.name   == "Scene", "OK, Luke's parent is 'Scene' " );
-
-	// Tell Luke, Anakin is his father
-	editor.execute( new MoveObjectCommand( lukeSkywalker, anakinSkywalker ) );
-
-	assert.ok( true === true, "(Luke has been told who his father is)" );
-	assert.ok( anakinSkywalker.parent.name == "Scene", "OK, Anakin's parent is still 'Scene' " );
-	assert.ok( lukeSkywalker.parent.name   == anakinsName, "OK, Luke's parent is '" + anakinsName + "' " );
-
-	editor.undo();
-	assert.ok( true === true, "(Statement undone)" );
-	assert.ok( anakinSkywalker.parent.name == "Scene", "OK, Anakin's parent is still 'Scene' " );
-	assert.ok( lukeSkywalker.parent.name   == "Scene", "OK, Luke's parent is 'Scene' again " );
-
-	editor.redo();
-	assert.ok( true === true, "(Statement redone)" );
-	assert.ok( anakinSkywalker.parent.name == "Scene", "OK, Anakin's parent is still 'Scene' " );
-	assert.ok( lukeSkywalker.parent.name   == anakinsName, "OK, Luke's parent is '" + anakinsName + "' again " );
-
-} );

+ 0 - 76
test/unit/editor/old_to_convert/MultiCmdsCommand.tests.js

@@ -1,76 +0,0 @@
-
-QUnit.module( "MultiCmdsCommand" );
-
-QUnit.test( "Test MultiCmdsCommand (Undo and Redo)", function( assert ) {
-
-	var editor = new Editor();
-	var box = aBox( 'Multi Command Box' );
-	var boxGeometry1 = { geometry: { parameters: { width: 200, height: 201, depth: 202, widthSegments: 2, heightSegments: 3, depthSegments: 4 } } };
-	var boxGeometry2 = { geometry: { parameters: { width:  50, height:  51, depth:  52, widthSegments: 7, heightSegments: 8, depthSegments: 9 } } };
-	var boxGeometries = [ getGeometry( "BoxGeometry", boxGeometry1 ), getGeometry( "BoxGeometry", boxGeometry2 ) ];
-
-	var cmd = new AddObjectCommand( box );
-	cmd.updatable = false;
-	editor.execute( cmd );
-
-	// setup first multi commands
-	var firstMultiCmds = [
-
-		new SetGeometryCommand( box, boxGeometries[ 0 ] ),
-		new SetPositionCommand( box, new THREE.Vector3( 1, 2, 3 ) ),
-		new SetRotationCommand( box, new THREE.Euler( 0.1, 0.2, 0.2 ) ),
-		new SetScaleCommand( box, new THREE.Vector3( 1.1, 1.2, 1.3 ) )
-
-	];
-
-	firstMultiCmds.map( function( cmd ) {
-
-		cmd.updatable = false;
-
-	} );
-
-	var firstMultiCmd = new MultiCmdsCommand( firstMultiCmds );
-	firstMultiCmd.updatable = false;
-	editor.execute( firstMultiCmd );
-
-
-	// setup second multi commands
-	var secondMultiCmds = [
-
-		new SetGeometryCommand( box, boxGeometries[ 1 ] ),
-		new SetPositionCommand( box, new THREE.Vector3( 4, 5, 6 ) ),
-		new SetRotationCommand( box, new THREE.Euler( 0.4, 0.5, 0.6 ) ),
-		new SetScaleCommand( box, new THREE.Vector3( 1.4, 1.5, 1.6 ) )
-
-	];
-
-	secondMultiCmds.map( function( cmd ) {
-
-		cmd.updatable = false;
-
-	} );
-
-	var secondMultiCmd = new MultiCmdsCommand( secondMultiCmds );
-	secondMultiCmd.updatable = false;
-	editor.execute( secondMultiCmd );
-
-
-	// test one modified value for each command
-	assert.ok( box.geometry.parameters.widthSegments == 7, "OK, widthSegments has been modified accordingly after two multi executes (expected: 7, actual: " + box.geometry.parameters.widthSegments + ")" );
-	assert.ok( box.position.y == 5, "OK, y position has been modified accordingly after two multi executes (expected: 5, actual: " + box.position.y + ")" );
-	assert.ok( box.rotation.x == 0.4, "OK, x rotation has been modified accordingly after two multi executes (expected: 0.4, actual: " + box.rotation.x + ") " );
-	assert.ok( box.scale.z == 1.6, "OK, z scale has been modified accordingly after two multi executes (expected: 1.6, actual: " + box.scale.z + ")" );
-
-	editor.undo();
-	assert.ok( box.geometry.parameters.widthSegments == 2, "OK, widthSegments has been modified accordingly after undo (expected: 2, actual: " + box.geometry.parameters.widthSegments + ")" );
-	assert.ok( box.position.y == 2, "OK, y position has been modified accordingly after undo (expected: 2, actual: " + box.position.y + ")" );
-	assert.ok( box.rotation.x == 0.1, "OK, x rotation has been modified accordingly after undo (expected: 0.1, actual: " + box.rotation.x + ")" );
-	assert.ok( box.scale.z == 1.3, "OK, z scale has been modified accordingly after undo (expected: 1.3, actual: " + box.scale.z + ")" );
-
-	editor.redo();
-	assert.ok( box.geometry.parameters.widthSegments == 7, "OK, widthSegments has been modified accordingly after two multi executes (expected: 7, actual: " + box.geometry.parameters.widthSegments + ")" );
-	assert.ok( box.position.y == 5, "OK, y position has been modified accordingly after two multi executes (expected: 5, actual: " + box.position.y + ")" );
-	assert.ok( box.rotation.x == 0.4, "OK, x rotation has been modified accordingly after two multi executes (expected: 0.4, actual: " + box.rotation.x + ") " );
-	assert.ok( box.scale.z == 1.6, "OK, z scale has been modified accordingly after two multi executes (expected: 1.6, actual: " + box.scale.z + ")" );
-
-} );

+ 0 - 51
test/unit/editor/old_to_convert/NegativeCases.tests.js

@@ -1,51 +0,0 @@
-
-QUnit.module( "NegativeCases" );
-
-QUnit.test( "Test unwanted situations ", function( assert ) {
-
-	var editor = new Editor();
-
-	// illegal
-	editor.undo();
-	assert.ok( editor.history.undos.length == 0, "OK, (illegal) undo did not affect the undo history" );
-	assert.ok( editor.history.redos.length == 0, "OK, (illegal) undo did not affect the redo history" );
-
-	// illegal
-	editor.redo();
-	assert.ok( editor.history.undos.length == 0, "OK, (illegal) redo did not affect the undo history" );
-	assert.ok( editor.history.redos.length == 0, "OK, (illegal) redo did not affect the redo history" );
-
-
-	var box = aBox();
-	var cmd = new AddObjectCommand( box );
-	cmd.updatable = false;
-	editor.execute( cmd );
-
-	assert.ok( editor.history.undos.length == 1, "OK, execute changed undo history" );
-	assert.ok( editor.history.redos.length == 0, "OK, execute did not change redo history" );
-
-	// illegal
-	editor.redo();
-	assert.ok( editor.history.undos.length == 1, "OK, (illegal) redo did not affect the undo history" );
-	assert.ok( editor.history.redos.length == 0, "OK, (illegal) redo did not affect the redo history" );
-
-
-	editor.undo();
-	assert.ok( editor.history.undos.length == 0, "OK, undo changed the undo history" );
-	assert.ok( editor.history.redos.length == 1, "OK, undo changed the redo history" );
-
-	// illegal
-	editor.undo();
-	assert.ok( editor.history.undos.length == 0, "OK, (illegal) undo did not affect the undo history" );
-	assert.ok( editor.history.redos.length == 1, "OK, (illegal) undo did not affect the redo history" );
-
-	editor.redo();
-	assert.ok( editor.history.undos.length == 1, "OK, redo changed the undo history" );
-	assert.ok( editor.history.redos.length == 0, "OK, undo changed the redo history" );
-
-	// illegal
-	editor.redo();
-	assert.ok( editor.history.undos.length == 1, "OK, (illegal) did not affect the undo history" );
-	assert.ok( editor.history.redos.length == 0, "OK, (illegal) did not affect the redo history" );
-
-} );

+ 0 - 104
test/unit/editor/old_to_convert/NestedDoUndoRedo.tests.js

@@ -1,104 +0,0 @@
-
-QUnit.module( "NestedDoUndoRedo" );
-
-QUnit.test( "Test nested Do's, Undo's and Redo's", function( assert ) {
-
-	var editor = new Editor();
-
-	var mesh = aBox( 'One box unlike all others' );
-
-	var initPosX      =  2 ;
-	var initPosY      =  3 ;
-	var initPosZ      =  4 ;
-	var initRotationX = 12 ;
-	var initRotationY = 13 ;
-	var initRotationZ = 14 ;
-	var initScaleX    = 22 ;
-	var initScaleY    = 23 ;
-	var initScaleZ    = 24 ;
-
-	mesh.position.x = initPosX ;
-	mesh.position.y = initPosY ;
-	mesh.position.z = initPosZ ;
-	mesh.rotation.x = initRotationX ;
-	mesh.rotation.y = initRotationY ;
-	mesh.rotation.z = initRotationZ ;
-	mesh.scale.x    = initScaleX ;
-	mesh.scale.y    = initScaleY ;
-	mesh.scale.z    = initScaleZ ;
-
-	// let's begin
-	editor.execute( new AddObjectCommand( mesh ) );
-
-	var newPos = new THREE.Vector3( initPosX + 100, initPosY, initPosZ );
-	editor.execute( new SetPositionCommand( mesh, newPos ) );
-
-	var newRotation = new THREE.Euler( initRotationX, initRotationY + 1000, initRotationZ );
-	editor.execute( new SetRotationCommand( mesh, newRotation ) );
-
-	var newScale = new THREE.Vector3( initScaleX, initScaleY, initScaleZ + 10000 );
-	editor.execute( new SetScaleCommand( mesh, newScale ) );
-
-
-	/* full check */
-
-	assert.ok( mesh.position.x ==   102, "OK, X position is correct " );
-	assert.ok( mesh.position.y ==     3, "OK, Y position is correct " );
-	assert.ok( mesh.position.z ==     4, "OK, Z position is correct " );
-
-	assert.ok( mesh.rotation.x ==    12, "OK, X rotation is correct " );
-	assert.ok( mesh.rotation.y ==  1013, "OK, Y rotation is correct " );
-	assert.ok( mesh.rotation.z ==    14, "OK, Z rotation is correct " );
-
-	assert.ok( mesh.scale.x    ==    22, "OK, X scale is correct " );
-	assert.ok( mesh.scale.y    ==    23, "OK, Y scale is correct " );
-	assert.ok( mesh.scale.z    == 10024, "OK, Z scale is correct " );
-
-
-	editor.undo();  // rescaling undone
-	editor.undo();  // rotation undone
-	editor.undo();  // translation undone
-
-	/* full check */
-
-	assert.ok( mesh.position.x ==     2, "OK, X position is correct " );
-	assert.ok( mesh.position.y ==     3, "OK, Y position is correct " );
-	assert.ok( mesh.position.z ==     4, "OK, Z position is correct " );
-
-	assert.ok( mesh.rotation.x ==    12, "OK, X rotation is correct " );
-	assert.ok( mesh.rotation.y ==    13, "OK, Y rotation is correct " );
-	assert.ok( mesh.rotation.z ==    14, "OK, Z rotation is correct " );
-
-	assert.ok( mesh.scale.x    ==    22, "OK, X scale is correct " );
-	assert.ok( mesh.scale.y    ==    23, "OK, Y scale is correct " );
-	assert.ok( mesh.scale.z    ==    24, "OK, Z scale is correct " );
-
-
-	editor.redo();  // translation redone
-	editor.redo();  // rotation redone
-
-	editor.execute( new RemoveObjectCommand( mesh ) );
-	assert.ok( editor.scene.children.length == 0, "OK, object removal was successful" );
-
-	editor.undo();  // removal undone
-	assert.ok( mesh.rotation.y ==    1013, "OK, Y rotation is correct " );
-
-
-	editor.undo();  // rotation undone (expected!)
-
-	/* full check */
-
-	assert.ok( mesh.position.x ==   102, "OK, X position is correct " );
-	assert.ok( mesh.position.y ==     3, "OK, Y position is correct " );
-	assert.ok( mesh.position.z ==     4, "OK, Z position is correct " );
-
-	assert.ok( mesh.rotation.x ==    12, "OK, X rotation is correct " );
-	assert.ok( mesh.rotation.y ==    13, "OK, Y rotation is correct " );
-	assert.ok( mesh.rotation.z ==    14, "OK, Z rotation is correct " );
-
-	assert.ok( mesh.scale.x    ==    22, "OK, X scale is correct " );
-	assert.ok( mesh.scale.y    ==    23, "OK, Y scale is correct " );
-	assert.ok( mesh.scale.z    ==    24, "OK, Z scale is correct " );
-
-
-} );

+ 0 - 60
test/unit/editor/old_to_convert/RemoveScriptCommand.tests.js

@@ -1,60 +0,0 @@
-
-QUnit.module( "RemoveScriptCommand" );
-
-QUnit.test( "Test RemoveScriptCommand (Undo and Redo)", function( assert ) {
-
-	var editor = new Editor();
-
-	// prepare
-	var box    = aBox( "The scripted box" );
-	var sphere = aSphere( "The scripted sphere" );
-	var objects = [ box, sphere ];
-
-	var xMove  = { name: "", source: "function update( event ) { this.position.x = this.position.x + 1; }" };
-	var yMove  = { name: "", source: "function update( event ) { this.position.y = this.position.y + 1; }" };
-	var scripts = [ xMove, yMove ];
-
-	// add objects to editor
-	objects.map( function( item ) {
-
-		editor.execute( new AddObjectCommand( item ) );
-
-	} );
-	assert.ok( editor.scene.children.length == 2, "OK, the box and the sphere have been added" );
-
-	// add scripts to the objects
-	for ( var i = 0; i < scripts.length; i ++ ) {
-
-		var cmd = new AddScriptCommand( objects[ i ], scripts[ i ] );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-	}
-
-	for ( var i = 0; i < scripts.length; i ++ ) {
-
-		var cmd = new RemoveScriptCommand( objects[ i ], scripts[ i ] );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-	}
-	assert.ok( getScriptCount( editor ) == 0, "OK, all scripts have been removed" );
-
-	scripts.map( function() {
-
-		editor.undo();
-
-	} );
-	assert.ok( getScriptCount( editor ) == scripts.length, "OK, all scripts have been added again by undo(s)" );
-
-	var scriptsKeys = Object.keys( editor.scripts );
-	for ( var i = 0; i < scriptsKeys.length; i ++ ) {
-
-		assert.ok( editor.scripts[ scriptsKeys[ i ] ][ 0 ] == scripts[ i ], "OK, script #" + i + " is still assigned correctly" );
-
-	}
-
-	editor.redo();
-	assert.ok( getScriptCount( editor ) == scripts.length - 1, "OK, one script has been removed again by redo" );
-
-} );

+ 0 - 356
test/unit/editor/old_to_convert/Serialization.tests.js

@@ -1,356 +0,0 @@
-
-QUnit.module( "Serialization" );
-
-QUnit.test( "Test Serialization", function( assert ) {
-
-	assert.timeout( 1000 );
-
-	// setup
-	var editor = new Editor();
-	var done = assert.async();
-	editor.storage.init( function () {
-
-		performTests();
-		done(); // continue running other tests
-
-	} );
-
-	var green   = 12581843; // bffbd3
-
-	var addObject = function () {
-
-		// setup
-		var box = aBox( 'The Box' );
-
-		// Test Add
-		var cmd = new AddObjectCommand( box );
-		cmd.updatable = false;
-
-		editor.execute( cmd );
-
-		return "addObject";
-
-	};
-
-	var addScript = function () {
-
-		// setup
-		var box = aBox( 'The Box' );
-
-		// Test Add
-
-		var cmd = new AddObjectCommand( box );
-		editor.execute( cmd );
-
-		var cmd = new AddScriptCommand( box, { "name": "test", "source": "console.log(\"hello world\");" } );
-		cmd.updatable = false;
-
-		editor.execute( cmd );
-
-		return "addScript";
-
-	};
-
-	var moveObject = function () {
-
-		// create some objects
-		var anakinsName = 'Anakin Skywalker';
-		var lukesName   = 'Luke Skywalker';
-		var anakinSkywalker = aSphere( anakinsName );
-		var lukeSkywalker   = aBox( lukesName );
-
-		editor.execute( new AddObjectCommand( anakinSkywalker ) );
-		editor.execute( new AddObjectCommand( lukeSkywalker ) );
-
-		// Tell Luke, Anakin is his father
-		editor.execute( new MoveObjectCommand( lukeSkywalker, anakinSkywalker ) );
-
-		return "moveObject";
-
-	};
-
-	var removeScript = function () {
-
-		var box = aBox( 'Box with no script' );
-		editor.execute( new AddObjectCommand( box ) );
-
-		var script = { "name": "test", "source": "console.log(\"hello world\");" } ;
-		var cmd = new AddScriptCommand( box, script );
-		cmd.updatable = false;
-
-		editor.execute( cmd );
-
-		cmd = new RemoveScriptCommand( box, script );
-		editor.execute( cmd );
-
-		return "removeScript";
-
-	};
-
-	var setColor = function () {
-
-		var pointLight = aPointlight( "The light Light" );
-
-		editor.execute( new AddObjectCommand( pointLight ) );
-		var cmd = new SetColorCommand( pointLight, 'color', green );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-		return "setColor";
-
-	};
-
-	var setGeometry = function () {
-
-		var box = aBox( 'Guinea Pig' ); // default ( 100, 100, 100, 1, 1, 1 )
-		var boxGeometry = { geometry: { parameters: { width: 200, height: 201, depth: 202, widthSegments: 2, heightSegments: 3, depthSegments: 4 } } };
-
-		editor.execute( new AddObjectCommand( box ) );
-
-		var cmd = new SetGeometryCommand( box, getGeometry( "BoxGeometry", boxGeometry ) );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-		return "setGeometry";
-
-	};
-
-	var setGeometryValue = function() {
-
-		var box = aBox( 'Geometry Value Box' );
-		editor.execute( new AddObjectCommand( box ) );
-
-		cmd = new SetGeometryValueCommand( box, 'uuid', THREE.Math.generateUUID() );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-		return "setGeometryValue";
-
-	};
-
-	var setMaterial = function () {
-
-		var sphere = aSphere( 'The Sun' );
-		editor.execute( new AddObjectCommand( sphere ) );
-
-		var material = new THREE[ 'MeshPhongMaterial' ]();
-		var cmd = new SetMaterialCommand( sphere, material );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-		return "setMaterial";
-
-	};
-
-	var setMaterialColor = function () {
-
-		var box = aBox( 'Box with colored material' );
-		editor.execute( new AddObjectCommand( box ) );
-
-		var cmd = new SetMaterialColorCommand( box, 'color', green );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-		return "setMaterialColor";
-
-	};
-
-	var setMaterialMap = function () {
-
-		var sphere = aSphere( 'Sphere with texture' );
-		editor.execute( new AddObjectCommand( sphere ) );
-
-		// dirt.png
-		var data = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpDMjYxMEI4MzVENDMxMUU1OTdEQUY4QkNGNUVENjg4MyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpDMjYxMEI4NDVENDMxMUU1OTdEQUY4QkNGNUVENjg4MyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkMyNjEwQjgxNUQ0MzExRTU5N0RBRjhCQ0Y1RUQ2ODgzIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkMyNjEwQjgyNUQ0MzExRTU5N0RBRjhCQ0Y1RUQ2ODgzIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+txizaQAAABVQTFRFh4eHbGxsdFhEWT0puYVclmxKeVU6ppwr+AAAAHtJREFUeNosjgEWBCEIQplFuP+RB5h9lZn2EZxkLzC3D1YSgSlmk7i0ctzDZNBz/VSoX1KwjlFI8WmA2R7JqUa0LJJcd1rLNWRRaMyi+3Y16qMKHhdE48XLsDyHKJ0nSMazY1fxHyriXxV584tmEedcfGNrA/5cmK8AAwCT9ATehDDyzwAAAABJRU5ErkJggg==';
-		var img = new Image();
-		img.src = data;
-
-		var texture = new THREE.Texture( img, 'map' );
-		texture.sourceFile = 'dirt.png';
-
-		var cmd = new SetMaterialMapCommand( sphere, 'map', texture );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-		return "setMaterialMap";
-
-	};
-
-	var setMaterialValue = function () {
-
-		var box = aBox( 'Box with values' );
-		editor.execute( new AddObjectCommand( box ) );
-
-		var cmd = new SetMaterialValueCommand( box, 'name', 'Bravo' );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-		return "setMaterialValue";
-
-	};
-
-	var setPosition = function () {
-
-		var sphere = aSphere( 'Sphere with position' );
-		editor.execute( new AddObjectCommand( sphere ) );
-
-		var newPosition = new THREE.Vector3( 101, 202, 303 );
-		var cmd = new SetPositionCommand( sphere, newPosition );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-		return "setPosition";
-
-	};
-
-	var setRotation = function () {
-
-		var box = aBox( 'Box with rotation' );
-		editor.execute( new AddObjectCommand( box ) );
-
-		var newRotation = new THREE.Euler( 0.3, - 1.7, 2 );
-		var cmd = new SetRotationCommand( box, newRotation );
-		cmd.updatable = false;
-		editor.execute ( cmd );
-
-		return "setRotation";
-
-	};
-
-	var setScale = function () {
-
-		var sphere = aSphere( 'Sphere with scale' );
-		editor.execute( new AddObjectCommand( sphere ) );
-
-		var newScale = new THREE.Vector3( 1.2, 3.3, 4.6 );
-		var cmd = new SetScaleCommand( sphere, newScale );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-		return "setScale";
-
-	};
-
-	var setScriptValue = function () {
-
-		var box = aBox( 'Box with script' );
-		editor.execute( new AddObjectCommand( box ) );
-		var script = { name: "Alert", source: "alert( null );" };
-		editor.execute( new AddScriptCommand( box, script ) );
-
-		var newScript = { name: "Console", source: "console.log( null );" };
-		var cmd = new SetScriptValueCommand( box, script, 'source', newScript.source, 0 );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-		return "setScriptValue";
-
-	};
-
-	var setUuid = function () {
-
-		var sphere = aSphere( 'Sphere with UUID' );
-		editor.execute( new AddObjectCommand( sphere ) );
-
-		var cmd = new SetUuidCommand( sphere, THREE.Math.generateUUID() );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-		return "setUuid";
-
-	};
-
-	var setValue = function () {
-
-		var box = aBox( 'Box with value' );
-		editor.execute( new AddObjectCommand( box ) );
-
-		var cmd = new SetValueCommand( box, 'intensity', 2.3 );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-		return "setValue";
-
-	};
-
-	var setups = [
-
-		addObject,
-		addScript,
-		moveObject,
-		removeScript,
-		setColor,
-		setGeometry,
-		setGeometryValue,
-		setMaterial,
-		setMaterialColor,
-		setMaterialMap,
-		setMaterialValue,
-		setPosition,
-		setRotation,
-		setScale,
-		setScriptValue,
-		setUuid,
-		setValue
-
-	];
-
-	function performTests() {
-
-		// Forward tests
-
-		for ( var i = 0; i < setups.length ; i ++ ) {
-
-			var name = setups[ i ]();
-
-			// Check for correct serialization
-
-			editor.history.goToState( 0 );
-			editor.history.goToState( 1000 );
-
-			var history = JSON.stringify( editor.history.toJSON() );
-
-			editor.history.clear();
-
-			editor.history.fromJSON( JSON.parse( history ) );
-
-			editor.history.goToState( 0 );
-			editor.history.goToState( 1000 );
-
-			var history2 = JSON.stringify( editor.history.toJSON() );
-
-			assert.ok( history == history2, "OK, forward serializing was successful for " + name );
-
-			editor.clear();
-
-		}
-
-		// Backward tests
-
-		for ( var i = 0; i < setups.length ; i ++ ) {
-
-			var name = setups[ i ]();
-
-			editor.history.goToState( 0 );
-
-			var history = JSON.stringify( editor.history.toJSON() );
-
-			editor.history.clear();
-
-			editor.history.fromJSON( JSON.parse( history ) );
-
-			editor.history.goToState( 1000 );
-			editor.history.goToState( 0 );
-
-			var history2 = JSON.stringify( editor.history.toJSON() );
-
-			assert.ok( history == history2, "OK, backward serializing was successful for " + name );
-
-			editor.clear();
-
-		}
-
-	}
-
-} );
-

+ 0 - 36
test/unit/editor/old_to_convert/SetColorCommand.tests.js

@@ -1,36 +0,0 @@
-
-QUnit.module( "SetColorCommand" );
-
-QUnit.test( "Test SetColorCommand (Undo and Redo)", function( assert ) {
-
-	var editor = new Editor();
-	var pointLight = aPointlight( "The light Light" );
-	editor.execute( new AddObjectCommand( pointLight ) );
-
-	var green   = 12581843; // bffbd3
-	var blue    = 14152447; // d7f2ff
-	var yellow  = 16775383; // fff8d7
-
-	var colors = [ green, blue, yellow ];
-
-	colors.map( function( color ) {
-
-		var cmd = new SetColorCommand( pointLight, 'color', color );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-	} );
-
-	assert.ok( pointLight.color.getHex() == colors[ colors.length - 1 ],
-		"OK, color has been set successfully (expected: '" + colors[ colors.length - 1 ] + "', actual: '" + pointLight.color.getHex() + "')" );
-
-	editor.undo();
-	assert.ok( pointLight.color.getHex() == colors[ colors.length - 2 ],
-		"OK, color has been set successfully after undo (expected: '" + colors[ colors.length - 2 ] + "', actual: '" + pointLight.color.getHex() + "')" );
-
-	editor.redo();
-	assert.ok( pointLight.color.getHex() == colors[ colors.length - 1 ],
-		"OK, color has been set successfully after redo (expected: '" + colors[ colors.length - 1 ] + "', actual: '" + pointLight.color.getHex() + "')" );
-
-
-} );

+ 0 - 59
test/unit/editor/old_to_convert/SetGeometryCommand.tests.js

@@ -1,59 +0,0 @@
-
-QUnit.module( "SetGeometryCommand" );
-
-QUnit.test( "Test SetGeometryCommand (Undo and Redo)", function( assert ) {
-
-	var editor = new Editor();
-
-	// initialize objects and geometries
-	var box = aBox( 'Guinea Pig' ); // default ( 100, 100, 100, 1, 1, 1 )
-	var boxGeometry1 = { geometry: { parameters: { width: 200, height: 201, depth: 202, widthSegments: 2, heightSegments: 3, depthSegments: 4 } } };
-	var boxGeometry2 = { geometry: { parameters: { width:  50, height:  51, depth:  52, widthSegments: 7, heightSegments: 8, depthSegments: 9 } } };
-	var geometryParams = [ boxGeometry1, boxGeometry2 ];
-
-
-	// add the object
-	var cmd = new AddObjectCommand( box );
-	cmd.updatable = false;
-	editor.execute( cmd );
-
-	for ( var i = 0; i < geometryParams.length; i ++ ) {
-
-		var cmd = new SetGeometryCommand( box, getGeometry( "BoxGeometry", geometryParams[ i ] ) );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-		var actualParams = box.geometry.parameters;
-		var expectedParams = geometryParams[ i ].geometry.parameters;
-
-		assert.ok( actualParams.width == expectedParams.width, "OK, box width matches the corresponding value from boxGeometry"  + ( i + 1 ) );
-		assert.ok( actualParams.height == expectedParams.height, "OK, box height matches the corresponding value from boxGeometry" + ( i + 1 ) );
-		assert.ok( actualParams.depth == expectedParams.depth, "OK, box depth matches the corresponding value from boxGeometry"  + ( i + 1 ) );
-		assert.ok( actualParams.widthSegments == expectedParams.widthSegments, "OK, box widthSegments matches the corresponding value from boxGeometry"  + ( i + 1 ) );
-		assert.ok( actualParams.heightSegments == expectedParams.heightSegments, "OK, box heightSegments matches the corresponding value from boxGeometry"  + ( i + 1 ) );
-		assert.ok( actualParams.depthSegments == expectedParams.depthSegments, "OK, box depthSegments matches the corresponding value from boxGeometry"  + ( i + 1 ) );
-
-	}
-
-	editor.undo();
-	var actualParams = box.geometry.parameters;
-	var expectedParams = geometryParams[ 0 ].geometry.parameters;
-	assert.ok( actualParams.width == expectedParams.width, "OK, box width matches the corresponding value from boxGeometry1 (after undo)" );
-	assert.ok( actualParams.height == expectedParams.height, "OK, box height matches the corresponding value from boxGeometry1 (after undo)" );
-	assert.ok( actualParams.depth == expectedParams.depth, "OK, box depth matches the corresponding value from boxGeometry1 (after undo)" );
-	assert.ok( actualParams.widthSegments == expectedParams.widthSegments, "OK, box widthSegments matches the corresponding value from boxGeometry1 (after undo)" );
-	assert.ok( actualParams.heightSegments == expectedParams.heightSegments, "OK, box heightSegments matches the corresponding value from boxGeometry1 (after undo)" );
-	assert.ok( actualParams.depthSegments == expectedParams.depthSegments, "OK, box depthSegments matches the corresponding value from boxGeometry1 (after undo)" );
-
-	editor.redo();
-	var actualParams = box.geometry.parameters;
-	var expectedParams = geometryParams[ 1 ].geometry.parameters;
-	assert.ok( actualParams.width == expectedParams.width, "OK, box width matches the corresponding value from boxGeometry2 (after redo)" );
-	assert.ok( actualParams.height == expectedParams.height, "OK, box height matches the corresponding value from boxGeometry2 (after redo)" );
-	assert.ok( actualParams.depth == expectedParams.depth, "OK, box depth matches the corresponding value from boxGeometry2 (after redo)" );
-	assert.ok( actualParams.widthSegments == expectedParams.widthSegments, "OK, box widthSegments matches the corresponding value from boxGeometry2 (after redo)" );
-	assert.ok( actualParams.heightSegments == expectedParams.heightSegments, "OK, box heightSegments matches the corresponding value from boxGeometry2 (after redo)" );
-	assert.ok( actualParams.depthSegments == expectedParams.depthSegments, "OK, box depthSegments matches the corresponding value from boxGeometry2 (after redo)" );
-
-
-} );

+ 0 - 47
test/unit/editor/old_to_convert/SetGeometryValueCommand.tests.js

@@ -1,47 +0,0 @@
-
-QUnit.module( "SetGeometryValueCommand" );
-
-QUnit.test( "Test SetGeometryValueCommand (Undo and Redo)", function( assert ) {
-
-	var editor = new Editor();
-	var box = aBox( 'The Box' );
-
-	var cmd = new AddObjectCommand( box );
-	cmd.updatable = false;
-	editor.execute( cmd );
-
-	var testData = [
-		{ uuid: THREE.Math.generateUUID(), name: 'Bruno' },
-		{ uuid: THREE.Math.generateUUID(), name: 'Jack' }
-	];
-
-	for ( var i = 0; i < testData.length; i ++ ) {
-
-		var keys = Object.keys( testData[ i ] );
-
-		keys.map( function( key ) {
-
-			cmd = new SetGeometryValueCommand( box, key, testData[ i ][ key ] );
-			cmd.updatable = false;
-			editor.execute( cmd );
-
-		} );
-
-	}
-
-	assert.ok( box.geometry.name == testData[ 1 ].name, "OK, box.geometry.name is correct after executes" );
-	assert.ok( box.geometry.uuid == testData[ 1 ].uuid, "OK, box.geometry.uuid is correct after executes" );
-
-	editor.undo();
-	editor.undo();
-
-	assert.ok( box.geometry.name == testData[ 0 ].name, "OK, box.geometry.name is correct after undos" );
-	assert.ok( box.geometry.uuid == testData[ 0 ].uuid, "OK, box.geometry.uuid is correct after undos" );
-
-	editor.redo();
-	editor.redo();
-
-	assert.ok( box.geometry.name == testData[ 1 ].name, "OK, box.geometry.name is correct after executes" );
-	assert.ok( box.geometry.uuid == testData[ 1 ].uuid, "OK, box.geometry.uuid is correct after executes" );
-
-} );

+ 0 - 41
test/unit/editor/old_to_convert/SetMaterialColorCommand.tests.js

@@ -1,41 +0,0 @@
-
-QUnit.module( "SetMaterialColorCommand" );
-
-QUnit.test( "Test for SetMaterialColorCommand (Undo and Redo)", function( assert ) {
-
-	// Setup scene
-	var editor = new Editor();
-	var box = aBox();
-	var cmd = new AddObjectCommand( box );
-	cmd.updatable = false;
-	editor.execute( cmd );
-
-	var green   = 12581843; // bffbd3
-	var blue    = 14152447; // d7f2ff
-	var yellow  = 16775383; // fff8d7
-
-	// there have to be at least 2 colors !
-	colors = [ green, blue, yellow ];
-
-	[ 'color', 'emissive', 'specular' ].map( function( attributeName ) {
-
-		colors.map( function ( color )  {
-
-			var cmd = new SetMaterialColorCommand( box, attributeName, color );
-			cmd.updatable = false;
-			editor.execute( cmd );
-
-		} );
-
-		assert.ok( box.material[ attributeName ].getHex() == colors[ colors.length - 1 ], "OK, " + attributeName + " was set correctly to last color " );
-
-		editor.undo();
-		assert.ok( box.material[ attributeName ].getHex() == colors[ colors.length - 2 ], "OK, " + attributeName + " is set correctly to second to last color after undo" );
-
-		editor.redo();
-		assert.ok( box.material[ attributeName ].getHex() == colors[ colors.length - 1 ], "OK, " + attributeName + " is set correctly to last color after redo" );
-
-
-	} );
-
-} );

+ 0 - 62
test/unit/editor/old_to_convert/SetMaterialCommand.tests.js

@@ -1,62 +0,0 @@
-
-QUnit.module( "SetMaterialCommand" );
-
-QUnit.test( "Test for SetMaterialCommand (Undo and Redo)", function( assert ) {
-
-	// setup
-	var editor = new Editor();
-	var box = aBox( 'Material girl in a material world' );
-	var cmd = new AddObjectCommand( box );
-	cmd.updatable = false;
-	editor.execute( cmd );
-
-	materialClasses = [
-
-		'LineBasicMaterial',
-		'LineDashedMaterial',
-		'MeshBasicMaterial',
-		'MeshDepthMaterial',
-		'MeshLambertMaterial',
-		'MeshNormalMaterial',
-		'MeshPhongMaterial',
-		'ShaderMaterial',
-		'SpriteMaterial'
-
-	];
-
-	materialClasses.map( function( materialClass ) {
-
-		material = new THREE[ materialClass ]();
-		editor.execute( new SetMaterialCommand( box, material ) );
-
-	} );
-
-	var i = materialClasses.length - 1;
-
-	// initial test
-	assert.ok( box.material.type == materialClasses[ i ],
-		"OK, initial material type was set correctly (expected: '" + materialClasses[ i ] + "', actual: '" + box.material.type + "')" );
-
-
-
-	// test undos
-	while ( i > 0 ) {
-
-		editor.undo();
-		-- i;
-		assert.ok( box.material.type == materialClasses[ i ],
-			"OK, material type was set correctly after undo (expected: '" + materialClasses[ i ] + "', actual: '" + box.material.type + "')" );
-
-	}
-
-	// test redos
-	while ( i < materialClasses.length - 1 ) {
-
-		editor.redo();
-		++ i;
-		assert.ok( box.material.type == materialClasses[ i ],
-			"OK, material type was set correctly after redo (expected: '" + materialClasses[ i ] + "', actual: '" + box.material.type + "')" );
-
-	}
-
-} );

+ 0 - 66
test/unit/editor/old_to_convert/SetMaterialMapCommand.tests.js

@@ -1,66 +0,0 @@
-
-QUnit.module( "SetMaterialMapCommand" );
-
-QUnit.test( "Test for SetMaterialMapCommand (Undo and Redo)", function( assert ) {
-
-	// setup
-	var editor = new Editor();
-	var box = aBox( 'Material mapped box' );
-	var cmd = new AddObjectCommand( box );
-	cmd.updatable = false;
-	editor.execute( cmd );
-
-	var mapNames = [ 'map', 'alphaMap', 'bumpMap', 'normalMap', 'displacementMap', 'specularMap', 'envMap', 'lightMap', 'aoMap' ];
-
-	// define files
-	var dirt  = { name: 'dirt.png' , data: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpDMjYxMEI4MzVENDMxMUU1OTdEQUY4QkNGNUVENjg4MyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpDMjYxMEI4NDVENDMxMUU1OTdEQUY4QkNGNUVENjg4MyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkMyNjEwQjgxNUQ0MzExRTU5N0RBRjhCQ0Y1RUQ2ODgzIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkMyNjEwQjgyNUQ0MzExRTU5N0RBRjhCQ0Y1RUQ2ODgzIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+txizaQAAABVQTFRFh4eHbGxsdFhEWT0puYVclmxKeVU6ppwr+AAAAHtJREFUeNosjgEWBCEIQplFuP+RB5h9lZn2EZxkLzC3D1YSgSlmk7i0ctzDZNBz/VSoX1KwjlFI8WmA2R7JqUa0LJJcd1rLNWRRaMyi+3Y16qMKHhdE48XLsDyHKJ0nSMazY1fxHyriXxV584tmEedcfGNrA/5cmK8AAwCT9ATehDDyzwAAAABJRU5ErkJggg==' };
-	var stone = { name: 'stone.png', data: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpDMjYxMEI4NzVENDMxMUU1OTdEQUY4QkNGNUVENjg4MyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpDMjYxMEI4ODVENDMxMUU1OTdEQUY4QkNGNUVENjg4MyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkMyNjEwQjg1NUQ0MzExRTU5N0RBRjhCQ0Y1RUQ2ODgzIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkMyNjEwQjg2NUQ0MzExRTU5N0RBRjhCQ0Y1RUQ2ODgzIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+WCxVbAAAAA9QTFRFgICAaGhoj4+Pf39/dHR0lCmHpAAAAG9JREFUeNo8TkkSBDEIEuH/bx7A9HigYlhkKA93sfcaetn10whSQ0jILpqjFQYiqGepXuexaxRpqAQInF2rzJKNx/CZm6yGuoKOzszjL0LbYjlgxzZokJA6CvgsenUaGm3PRPI/W1MUrXC9+v0TYACSUwL7JYc6IAAAAABJRU5ErkJggg==' };
-	var files = [ dirt, stone ];
-
-	// define images for given files
-	var images = files.map( function( file ) {
-
-		var i = new Image();
-		i.src = file.data;
-		return { name: file.name, image: i };
-
-	} );
-
-
-	// test all maps
-	mapNames.map( function( mapName ) {
-
-
-		// define textures for given images
-		var textures = images.map( function( img ) {
-
-			var texture = new THREE.Texture( img.image, mapName );
-			texture.sourceFile = img.name;
-			return texture;
-
-		} );
-
-		// apply the textures
-		textures.map( function( texture ) {
-
-			var cmd = new SetMaterialMapCommand( box, mapName, texture );
-			cmd.updatable = false;
-			editor.execute( cmd );
-
-		} );
-
-
-		assert.ok( box.material[ mapName ].image.src == images[ images.length - 1 ].image.src,
-			"OK, " + mapName + " set correctly " );
-
-		editor.undo();
-		assert.ok( box.material[ mapName ].image.src == images[ images.length - 2 ].image.src,
-			"OK, " + mapName + " set correctly after undo " );
-
-		editor.redo();
-		assert.ok( box.material[ mapName ].image.src == images[ images.length - 1 ].image.src,
-			"OK, " + mapName + " set correctly after redo" );
-
-	} );
-
-} );

+ 0 - 58
test/unit/editor/old_to_convert/SetMaterialValueCommand.tests.js

@@ -1,58 +0,0 @@
-
-QUnit.module( "SetMaterialValueCommand" );
-
-QUnit.test( "Test for SetMaterialValueCommand (Undo and Redo)", function( assert ) {
-
-	// setup scene
-	var editor = new Editor();
-	var box = aBox();
-	var cmd = new AddObjectCommand( box );
-	cmd.updatable = false;
-	editor.execute( cmd );
-
-	// every attribute gets three test values
-	var testData = {
-
-		uuid: [ THREE.Math.generateUUID(), THREE.Math.generateUUID(), THREE.Math.generateUUID() ],
-		name: [ 'Alpha', 'Bravo', 'Charlie' ],
-		shininess: [ 11.1, 22.2, 33.3 ],
-		bumpScale: [ 1.1, 2.2, 3.3 ],
-		reflectivity: [ - 1.3, 2.1, 5.0 ],
-		aoMapIntensity: [ 0.1, 0.4, 0.7 ],
-		side: [ 'Front', 'Back', 'Double' ],
-		shading: [ 'No', 'Flat', 'Smooth' ],
-		blending: [ 'No', 'Normal', 'Additive' ],
-		opacity: [ 0.2, 0.5, 0.8 ],
-		alphaTest: [ 0.1, 0.6, 0.9 ],
-		wireframeLinewidth: [ 1.2, 3.4, 5.6 ]
-
-	};
-
-	var testDataKeys = Object.keys( testData );
-
-	testDataKeys.map( function( attributeName ) {
-
-		testData[ attributeName ].map( function( value ) {
-
-			var cmd = new SetMaterialValueCommand( box, attributeName, value );
-			cmd.updatable = false;
-			editor.execute( cmd );
-
-		} );
-
-		var length = testData[ attributeName ].length;
-		assert.ok( box.material[ attributeName ] == testData[ attributeName ][ length - 1 ],
-			"OK, " + attributeName + " was set correctly to the last value (expected: '" + testData[ attributeName ][ length - 1 ] + "', actual: '" + box.material[ attributeName ] + "')" );
-
-		editor.undo();
-		assert.ok( box.material[ attributeName ] == testData[ attributeName ][ length - 2 ],
-			"OK, " + attributeName + " was set correctly to the second to the last value after undo (expected: '" + testData[ attributeName ][ length - 2 ] + "', actual: '" + box.material[ attributeName ] + "')" );
-
-		editor.redo();
-		assert.ok( box.material[ attributeName ] == testData[ attributeName ][ length - 1 ],
-			"OK, " + attributeName + " was set correctly to the last value again after redo (expected: '" + testData[ attributeName ][ length - 1 ] + "', actual: '" + box.material[ attributeName ] + "')" );
-
-	} );
-
-
-} );

+ 0 - 44
test/unit/editor/old_to_convert/SetPositionCommand.tests.js

@@ -1,44 +0,0 @@
-
-QUnit.module( "SetPositionCommand" );
-
-QUnit.test( "Test SetPositionCommand (Undo and Redo)", function( assert ) {
-
-	var editor = new Editor();
-	var box = aBox();
-	var cmd = new AddObjectCommand( box );
-	editor.execute( cmd );
-
-	var positions = [
-
-		{ x:   50, y: - 80, z: 30 },
-		{ x: - 10, y:  100, z:  0 },
-		{ x:   44, y: - 20, z: 90 }
-
-	];
-
-	positions.map( function( position ) {
-
-		var newPosition = new THREE.Vector3( position.x, position.y, position.z );
-		var cmd = new SetPositionCommand( box, newPosition );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-	} );
-
-	assert.ok( box.position.x == positions[ positions.length - 1 ].x, "OK, changing X position was successful" );
-	assert.ok( box.position.y == positions[ positions.length - 1 ].y, "OK, changing Y position was successful" );
-	assert.ok( box.position.z == positions[ positions.length - 1 ].z, "OK, changing Z position was successful" );
-
-
-	editor.undo();
-	assert.ok( box.position.x == positions[ positions.length - 2 ].x, "OK, changing X position was successful (after undo)" );
-	assert.ok( box.position.y == positions[ positions.length - 2 ].y, "OK, changing Y position was successful (after undo)" );
-	assert.ok( box.position.z == positions[ positions.length - 2 ].z, "OK, changing Z position was successful (after undo)" );
-
-	editor.redo();
-	assert.ok( box.position.x == positions[ positions.length - 1 ].x, "OK, changing X position was successful (after redo)" );
-	assert.ok( box.position.y == positions[ positions.length - 1 ].y, "OK, changing Y position was successful (after redo)" );
-	assert.ok( box.position.z == positions[ positions.length - 1 ].z, "OK, changing Z position was successful (after redo)" );
-
-
-} );

+ 0 - 47
test/unit/editor/old_to_convert/SetRotationCommand.tests.js

@@ -1,47 +0,0 @@
-
-QUnit.module( "SetRotationCommand" );
-
-QUnit.test( "Test SetRotationCommand (Undo and Redo)", function( assert ) {
-
-	// setup
-	var editor = new Editor();
-	var box = aBox();
-	editor.execute( new AddObjectCommand( box ) );
-
-
-	var rotations = [
-
-		{ x: 1.1, y:   0.4, z: - 2.0 },
-		{ x: 2.2, y: - 1.3, z:   1.3 },
-		{ x: 0.3, y: - 0.1, z: - 1.9 }
-
-	];
-
-
-	rotations.map( function( rotation ) {
-
-		var newRotation = new THREE.Euler( rotation.x, rotation.y, rotation.z );
-		var cmd = new SetRotationCommand( box, newRotation );
-		cmd.updatable = false;
-		editor.execute ( cmd );
-
-	} );
-
-
-	assert.ok( box.rotation.x == rotations[ rotations.length - 1 ].x, "OK, changing X rotation was successful" );
-	assert.ok( box.rotation.y == rotations[ rotations.length - 1 ].y, "OK, changing Y rotation was successful" );
-	assert.ok( box.rotation.z == rotations[ rotations.length - 1 ].z, "OK, changing Z rotation was successful" );
-
-	editor.undo();
-	assert.ok( box.rotation.x == rotations[ rotations.length - 2 ].x, "OK, changing X rotation was successful (after undo)" );
-	assert.ok( box.rotation.y == rotations[ rotations.length - 2 ].y, "OK, changing Y rotation was successful (after undo)" );
-	assert.ok( box.rotation.z == rotations[ rotations.length - 2 ].z, "OK, changing Z rotation was successful (after undo)" );
-
-	editor.redo();
-	assert.ok( box.rotation.x == rotations[ rotations.length - 1 ].x, "OK, changing X rotation was successful (after redo)" );
-	assert.ok( box.rotation.y == rotations[ rotations.length - 1 ].y, "OK, changing Y rotation was successful (after redo)" );
-	assert.ok( box.rotation.z == rotations[ rotations.length - 1 ].z, "OK, changing Z rotation was successful (after redo)" );
-
-
-
-} );

+ 0 - 47
test/unit/editor/old_to_convert/SetScaleCommand.tests.js

@@ -1,47 +0,0 @@
-
-QUnit.module( "SetScaleCommand" );
-
-QUnit.test( "Test SetScaleCommand (Undo and Redo)", function( assert ) {
-
-	// setup
-	var editor = new Editor();
-	var box = aBox();
-	editor.execute( new AddObjectCommand( box ) );
-
-
-	// scales
-	var scales = [
-
-		{ x: 1.4, y: 2.7, z: 0.4 },
-		{ x: 0.1, y: 1.3, z: 2.9 },
-		{ x: 3.2, y: 0.3, z: 2.0 }
-
-	];
-
-	scales.map( function( scale ) {
-
-		var newScale = new THREE.Vector3( scale.x, scale.y, scale.z );
-		var cmd = new SetScaleCommand( box, newScale );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-	} );
-
-	assert.ok( box.scale.x == scales[ scales.length - 1 ].x, "OK, setting X scale value was successful" );
-	assert.ok( box.scale.y == scales[ scales.length - 1 ].y, "OK, setting Y scale value was successful" );
-	assert.ok( box.scale.z == scales[ scales.length - 1 ].z, "OK, setting Z scale value was successful" );
-
-
-	editor.undo();
-	assert.ok( box.scale.x == scales[ scales.length - 2 ].x, "OK, X scale is correct after undo" );
-	assert.ok( box.scale.y == scales[ scales.length - 2 ].y, "OK, Y scale is correct after undo" );
-	assert.ok( box.scale.z == scales[ scales.length - 2 ].z, "OK, Z scale is correct after undo" );
-
-
-	editor.redo();
-	assert.ok( box.scale.x == scales[ scales.length - 1 ].x, "OK, X scale is correct after redo" );
-	assert.ok( box.scale.y == scales[ scales.length - 1 ].y, "OK, Y scale is correct after redo" );
-	assert.ok( box.scale.z == scales[ scales.length - 1 ].z, "OK, Z scale is correct after redo" );
-
-
-} );

+ 0 - 69
test/unit/editor/old_to_convert/SetSceneCommand.tests.js

@@ -1,69 +0,0 @@
-
-QUnit.module( "TestCmdSetScene" );
-
-QUnit.test( "Test for SetSceneCommand (Undo and Redo)", function( assert ) {
-
-	// setup
-	var editor = new Editor();
-	objects = [ aBox(), aSphere(), aPointlight() ];
-
-
-	// create multiple editors (scenes) and save the output
-	var scenes = objects.map( function( object ) {
-
-		editor = new Editor();
-		var cmd = new AddObjectCommand( object );
-		cmd.updatable = false;
-		editor.execute( cmd );
-		return { obj: object, exportedData: exportScene( editor ) };
-
-	} );
-
-
-	// create new empty editor (scene), merge the other editors (scenes)
-	editor = new Editor();
-	scenes.map( function( scene ) {
-
-		var importedScene = importScene( scene.exportedData );
-		var cmd = new SetSceneCommand( importedScene );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-	} );
-
-	// tests
-	assert.ok( editor.scene.children.length = scenes.length,
-		"OK, all scenes have been merged" );
-
-	var i = 0;
-	while ( i < editor.scene.children.length ) {
-
-		assert.ok( editor.scene.children[ i ].name == scenes[ i ].obj.name,
-			"OK, editor.scene.children[ " + i + " ].name matches scenes[ " + i + " ].obj.name" );
-		i ++;
-
-	}
-
-	editor.undo();
-	var i = 0;
-	while ( i < editor.scene.children.length ) {
-
-		assert.ok( editor.scene.children[ i ].name == scenes[ i ].obj.name,
-			"OK, editor.scene.children[ " + i + " ].name matches scenes[ " + i + " ].obj.name after undo" );
-		i ++;
-
-	}
-
-
-	editor.redo();
-	var i = 0;
-	while ( i < editor.scene.children.length ) {
-
-		assert.ok( editor.scene.children[ i ].name == scenes[ i ].obj.name,
-			"OK, editor.scene.children[ " + i + " ].name matches scenes[ " + i + " ].obj.name after redo" );
-		i ++;
-
-	}
-
-
-} );

+ 0 - 73
test/unit/editor/old_to_convert/SetScriptValueCommand.tests.js

@@ -1,73 +0,0 @@
-
-QUnit.module( "SetScriptValueCommand" );
-
-QUnit.test( "Test SetScriptValueCommand for source (Undo and Redo)", function( assert ) {
-
-
-	// setup
-	var editor = new Editor();
-	var box    = aBox( "The scripted box" );
-	var cmd = new AddObjectCommand( box );
-	cmd.updatable = false;
-	editor.execute( cmd );
-
-	var translateScript = { name: "Translate", source: "function( update ) {}" };
-	cmd = new AddScriptCommand( box, translateScript );
-	cmd.updatable = false;
-	editor.execute( cmd );
-
-
-	var testSourceData = [
-
-		{ name: "Translate", source: "function update( event ) { this.position.x = this.position.x + 1; }" },
-		{ name: "Translate", source: "function update( event ) { this.position.y = this.position.y + 1; }" },
-		{ name: "Translate", source: "function update( event ) { this.position.z = this.position.z + 1; }" }
-
-	];
-
-
-	// test source
-
-	testSourceData.map( function( script ) {
-
-		var cmd = new SetScriptValueCommand( box, translateScript, 'source', script.source, 0 );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-	} );
-
-	var length = testSourceData.length;
-	assert.ok( editor.scripts[ box.uuid ][ 0 ][ 'source' ] == testSourceData[ length - 1 ].source,
-		"OK, 'source' was set correctly to the last value (expected: '" + testSourceData[ length - 1 ].source + "', actual: '" + editor.scripts[ box.uuid ][ 0 ][ 'source' ] + "')" );
-
-	editor.undo();
-	assert.ok( editor.scripts[ box.uuid ][ 0 ][ 'source' ] == testSourceData[ length - 2 ].source,
-		"OK, 'source' was set correctly to the second to the last value after undo (expected: '" + testSourceData[ length - 2 ].source + "', actual: '" + editor.scripts[ box.uuid ][ 0 ][ 'source' ] + "')" );
-
-	editor.redo();
-	assert.ok( editor.scripts[ box.uuid ][ 0 ][ 'source' ] == testSourceData[ length - 1 ].source,
-		"OK, 'source' was set correctly to the last value again after redo (expected: '" + testSourceData[ length - 1 ].source + "', actual: '" + editor.scripts[ box.uuid ][ 0 ][ 'source' ]	 + "')" );
-
-
-	var names = [ "X Script", "Y Script", "Z Script" ];
-
-	names.map( function( name ) {
-
-		cmd = new SetScriptValueCommand( box, translateScript, 'name', name );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-	} );
-
-	var scriptName = editor.scripts[ box.uuid ][ 0 ][ "name" ];
-	assert.ok( scriptName == names[ names.length - 1 ], "OK, the script name corresponds to the last script name that was assigned" );
-
-	editor.undo();
-	scriptName = editor.scripts[ box.uuid ][ 0 ][ "name" ];
-	assert.ok( scriptName == names[ names.length - 2 ], "OK, the script name corresponds to the second last script name that was assigned" );
-
-	editor.redo();
-	scriptName = editor.scripts[ box.uuid ][ 0 ][ "name" ];
-	assert.ok( scriptName == names[ names.length - 1 ], "OK, the script name corresponds to the last script name that was assigned, again" );
-
-} );

+ 0 - 32
test/unit/editor/old_to_convert/SetUuidCommand.tests.js

@@ -1,32 +0,0 @@
-QUnit.module( "SetUuidCommand" );
-
-QUnit.test( "Test SetUuidCommand (Undo and Redo)", function( assert ) {
-
-	var editor = new Editor();
-	var object = aBox( 'UUID test box' );
-	editor.execute( new AddObjectCommand( object ) );
-
-
-	var uuids = [ THREE.Math.generateUUID(), THREE.Math.generateUUID(), THREE.Math.generateUUID() ];
-
-	uuids.map( function( uuid ) {
-
-		var cmd = new SetUuidCommand( object, uuid );
-		cmd.updatable = false;
-		editor.execute( cmd );
-
-	} );
-
-	assert.ok( object.uuid == uuids[ uuids.length - 1 ],
-		"OK, UUID on actual object matches last UUID in the test data array " );
-
-	editor.undo();
-	assert.ok( object.uuid == uuids[ uuids.length - 2 ],
-		"OK, UUID on actual object matches second to the last UUID in the test data array (after undo)" );
-
-	editor.redo();
-	assert.ok( object.uuid == uuids[ uuids.length - 1 ],
-		"OK, UUID on actual object matches last UUID in the test data array again (after redo) " );
-
-
-} );

+ 0 - 49
test/unit/editor/old_to_convert/SetValueCommand.tests.js

@@ -1,49 +0,0 @@
-QUnit.module( "SetValueCommand" );
-
-QUnit.test( "Test SetValueCommand (Undo and Redo)", function( assert ) {
-
-	var editor = new Editor();
-
-	var valueBefore = 1.10;
-	var valueAfter  = 2.20;
-
-	var box   = aBox( 'A Box' );
-	var light = aPointlight( 'A PointLight' );
-	var cam   = aPerspectiveCamera( 'A PerspectiveCamera' );
-
-	[ box, light, cam ].map( function( object ) {
-
-		editor.execute( new AddObjectCommand( object ) );
-
-		assert.ok( 0 == 0, "Testing object of type '" + object.type + "'" );
-
-		[ 'name', 'fov', 'near', 'far', 'intensity', 'distance', 'angle', 'exponent', 'decay', 'visible', 'userData' ].map( function( item ) {
-
-			if ( object[ item ] !== undefined ) {
-
-				var cmd = new SetValueCommand( object, item, valueBefore );
-				cmd.updatable = false;
-				editor.execute( cmd );
-				assert.ok( object[ item ] == valueBefore, " OK, the attribute '" + item + "' is correct after first execute (expected: '" + valueBefore + "', actual: '" + object[ item ] + "')" );
-
-				var cmd = new SetValueCommand( object, item, valueAfter );
-				cmd.updatable = false;
-				editor.execute( cmd );
-				assert.ok( object[ item ] == valueAfter, " OK, the attribute '" + item + "' is correct after second execute (expected: '" + valueAfter + "', actual: '" + object[ item ] + "')" );
-
-				editor.undo();
-				assert.ok( object[ item ] == valueBefore, " OK, the attribute '" + item + "' is correct after undo (expected: '" + valueBefore + "', actual: '" + object[ item ] + "')" );
-
-				editor.redo();
-				assert.ok( object[ item ] == valueAfter, " OK, the attribute '" + item + "' is correct after redo (expected: '" + valueAfter + "', actual: '" + object[ item ] + "')" );
-
-			}
-
-		} );
-
-	} );
-
-
-
-
-} );

+ 0 - 77
test/unit/three.editor.unit.js

@@ -1,77 +0,0 @@
-// TODO (Itee) Editor is not es6 module so care to include order !!!
-// TODO: all views could not be testable, waiting modular code before implement units tests on them
-
-import './utils/qunit-utils.js';
-
-//editor
-import './editor/Command.tests';
-import './editor/Config.tests';
-import './editor/Editor.tests';
-import './editor/History.tests';
-import './editor/Loader.tests';
-import './editor/Player.tests';
-import './editor/Script.tests';
-
-import './editor/Menubar.tests';
-import './editor/Menubar.Add.tests';
-import './editor/Menubar.Edit.tests';
-import './editor/Menubar.Examples.tests';
-import './editor/Menubar.File.tests';
-import './editor/Menubar.Help.tests';
-import './editor/Menubar.Play.tests';
-import './editor/Menubar.Status.tests';
-import './editor/Menubar.View.tests';
-
-import './editor/Sidebar.tests';
-import './editor/Sidebar.Animation.tests';
-import './editor/Sidebar.Geometry.tests';
-import './editor/Sidebar.Geometry.BoxGeometry.tests';
-import './editor/Sidebar.Geometry.BufferGeometry.tests';
-import './editor/Sidebar.Geometry.CircleGeometry.tests';
-import './editor/Sidebar.Geometry.CylinderGeometry.tests';
-import './editor/Sidebar.Geometry.Geometry.tests';
-import './editor/Sidebar.Geometry.IcosahedronGeometry.tests';
-import './editor/Sidebar.Geometry.LatheGeometry.tests';
-import './editor/Sidebar.Geometry.Modifiers.tests';
-import './editor/Sidebar.Geometry.PlaneGeometry.tests';
-import './editor/Sidebar.Geometry.SphereGeometry.tests';
-import './editor/Sidebar.Geometry.TeapotBufferGeometry.tests';
-import './editor/Sidebar.Geometry.TorusGeometry.tests';
-import './editor/Sidebar.Geometry.TorusKnotGeometry.tests';
-import './editor/Sidebar.History.tests';
-import './editor/Sidebar.Material.tests';
-import './editor/Sidebar.Object.tests';
-import './editor/Sidebar.Project.tests';
-import './editor/Sidebar.Properties.tests';
-import './editor/Sidebar.Scene.tests';
-import './editor/Sidebar.Script.tests';
-import './editor/Sidebar.Settings.tests';
-
-import './editor/Storage.tests';
-import './editor/Toolbar.tests';
-import './editor/Viewport.tests';
-import './editor/Viewport.Info.tests';
-
-//editor/commands
-import './editor/commands/AddObjectCommand.tests';
-import './editor/commands/AddScriptCommand.tests';
-import './editor/commands/MoveObjectCommand.tests';
-import './editor/commands/MultiCmdsCommand.tests';
-import './editor/commands/RemoveObjectCommand.tests';
-import './editor/commands/RemoveScriptCommand.tests';
-import './editor/commands/SetColorCommand.tests';
-import './editor/commands/SetGeometryCommand.tests';
-import './editor/commands/SetGeometryValueCommand.tests';
-import './editor/commands/SetMaterialColorCommand.tests';
-import './editor/commands/SetMaterialCommand.tests';
-import './editor/commands/SetMaterialMapCommand.tests';
-import './editor/commands/SetMaterialValueCommand.tests';
-import './editor/commands/SetPositionCommand.tests';
-import './editor/commands/SetRotationCommand.tests';
-import './editor/commands/SetScaleCommand.tests';
-import './editor/commands/SetSceneCommand.tests';
-import './editor/commands/SetScriptValueCommand.tests';
-import './editor/commands/SetUuidCommand.tests';
-import './editor/commands/SetValueCommand.tests';
-
-//editor/others