diff --git a/tests/AppHarness.js b/tests/AppHarness.js deleted file mode 100755 index a8b76a44..00000000 --- a/tests/AppHarness.js +++ /dev/null @@ -1,337 +0,0 @@ -//--------------------------------------------------- -// Application Harness -var AppHarness = (function () { - //------------------------------------------------------------------------------ - function AppHarness() { - var _this = this; - //------------------------------------------------------------------------------ - this.tests = new Array(); - this.counter = 0; - this.sourceVisible = false; - this.loadDefault = true; - this.initFrameSet(); - this.initInterface(); - this.previousBtn.onclick = function () { return _this.nagigateBy(-1); }; - this.nextBtn.onclick = function () { return _this.nagigateBy(1); }; - this.sourceBtn.onclick = function () { return _this.toggleSource(); }; - this.dropDown.onchange = function (e) { return _this.dropDownChange(e); }; - } - //------------------------------------------------------------------------------ - /** - * - * Load a test - * - * @param classPath - Module and Class path of test - * @param js Path to JavaScript file - * @param ts Path to Typescript file ( not yet used - reserved for future show source ) - */ - AppHarness.prototype.load = function (classPath, js, ts) { - this.loadFromURL(); - if (this.loadDefault) { - window.history.pushState(js, js, '?test=' + js); - this.testIframe.src = 'frame.html?name=' + classPath + '&js=' + js; - this.srcIframe.src = "data:text/html;charset=utf-8," + this.createSourceViewHTML(ts); - } - }; - /** - * - * Add a test to the AppHarness - * - * @param name Name of test - * @param classPath - Module and Class path of test - * @param js Path to JavaScript file - * @param ts Path to Typescript file ( not yet used - reserved for future show source ) - */ - AppHarness.prototype.addTest = function (name, classpath, js, ts) { - this.tests.push(new TestData(name, classpath, js, ts)); - }; - /** - * - * Add a separator to the menu - * - * @param name - */ - AppHarness.prototype.addSeperator = function (name) { - if (name === void 0) { name = ''; } - this.tests.push(new TestData('-- ' + name, '', '', '')); - }; - /** - * - * Start the application harness - * - */ - AppHarness.prototype.start = function (slideshowMode) { - var _this = this; - if (slideshowMode === void 0) { slideshowMode = false; } - for (var c = 0; c < this.tests.length; c++) { - var option = new Option(this.tests[c].name, String(c)); - this.dropDown.add(option); - } - if (slideshowMode) { - setInterval(function () { return _this.nagigateBy(1); }, 15000); - } - }; - //------------------------------------------------------------------------------ - AppHarness.prototype.loadFromURL = function () { - var queryParams = Utils.getQueryParams(document.location.search); - if (queryParams.test != null) { - var l = this.tests.length; - for (var c = 0; c < l; c++) { - if (this.tests[c].js == queryParams.test) { - console.log('======>>>> LOAD TEST'); - this.navigateToSection(this.tests[c]); - this.loadDefault = false; - } - } - } - }; - /** - * - */ - AppHarness.prototype.initInterface = function () { - var testSelector = document.createElement('div'); - testSelector.style.cssFloat = 'none'; - testSelector.style.position = 'absolute'; - testSelector.style.bottom = '15px'; - testSelector.style.width = '600px'; - testSelector.style.left = '50%'; - testSelector.style.marginLeft = '-300px'; - testSelector.style.textAlign = 'center'; - this.dropDown = document.createElement('select'); - this.dropDown.name = "selectTestDropDown"; - this.dropDown.id = "selectTest"; - this.sourceBtn = document.createElement('button'); - this.sourceBtn.innerHTML = 'Show Source'; - this.sourceBtn.id = 'previous'; - this.previousBtn = document.createElement('button'); - this.previousBtn.innerHTML = '<<'; - this.previousBtn.id = 'previous'; - this.nextBtn = document.createElement('button'); - this.nextBtn.innerHTML = '>>'; - this.nextBtn.id = 'next'; - testSelector.appendChild(this.sourceBtn); - testSelector.appendChild(this.previousBtn); - testSelector.appendChild(this.dropDown); - testSelector.appendChild(this.nextBtn); - document.body.appendChild(testSelector); - }; - /** - * - */ - AppHarness.prototype.initFrameSet = function () { - var iframeContainer = document.createElement('div'); - iframeContainer.style.width = '100%'; - iframeContainer.style.height = '100%'; - this.testIframe = document.createElement('iframe'); - this.testIframe.id = 'testContainer'; - this.testIframe.style.backgroundColor = '#9e9e9e'; - this.testIframe.style.cssFloat = 'none'; - this.testIframe.style.position = 'absolute'; - this.testIframe.style.top = '0px'; - this.testIframe.style.left = '0px'; - this.testIframe.style.border = '0px'; - this.testIframe.style.width = '100%'; - this.testIframe.style.height = '100%'; - //bottom: 120px; - this.srcIframe = document.createElement('iframe'); - this.srcIframe.id = 'testSourceContainer'; - this.srcIframe.style.backgroundColor = '#9e9e9e'; - this.srcIframe.style.cssFloat = 'none'; - this.srcIframe.style.position = 'absolute'; - this.srcIframe.style.right = '0px'; - this.srcIframe.style.top = '0px'; - this.srcIframe.style.bottom = '0px'; - this.srcIframe.style.border = '0px'; - this.srcIframe.style.width = '0%'; - this.srcIframe.style.height = '100%'; - iframeContainer.appendChild(this.testIframe); - iframeContainer.appendChild(this.srcIframe); - document.body.appendChild(iframeContainer); - }; - /** - * - * Selectnext / previous menu item - * - * @param direction - */ - AppHarness.prototype.nagigateBy = function (direction) { - if (direction === void 0) { direction = 1; } - var l = this.tests.length; - var nextCounter = this.counter + direction; - if (nextCounter < 0) { - nextCounter = this.tests.length - 1; - } - else if (nextCounter > this.tests.length - 1) { - nextCounter = 0; - } - var testData = this.tests[nextCounter]; - if (testData.name.indexOf('--') != -1) { - this.counter = nextCounter; - this.nagigateBy(direction); - } - else { - this.navigateToSection(testData); - this.dropDown.selectedIndex = nextCounter; - this.counter = nextCounter; - } - }; - /** - * - * Navigate to a section - * - * @param testData - */ - AppHarness.prototype.navigateToSection = function (testData) { - window.history.pushState(testData.js, testData.js, '?test=' + testData.js); - this.srcIframe.src = "data:text/html;charset=utf-8," + this.createSourceViewHTML(testData.src); - this.testIframe.src = 'frame.html?name=' + testData.classpath + '&js=' + testData.js; - }; - AppHarness.prototype.toggleSource = function () { - if (this.sourceVisible) { - this.testIframe.style.width = '100%'; - this.srcIframe.style.width = '0%'; - this.sourceBtn.innerHTML = 'Show Source'; - } - else { - this.testIframe.style.width = '20%'; - this.srcIframe.style.width = '80%'; - this.sourceBtn.innerHTML = 'Hide Source'; - } - this.sourceVisible = !this.sourceVisible; - }; - AppHarness.prototype.createSourceViewHTML = function (url) { - var html = ''; - html += ''; - html += ''; - html += ' '; - html += ' '; - html += ' '; - html += ' '; - html += ''; - html += ''; - html += ''; - html += ''; - return html; - }; - //------------------------------------------------------------------------------ - // Utils - /** - * - * Util function - get Element by ID - * - * @param id - * @returns {HTMLElement} - */ - AppHarness.prototype.getId = function (id) { - return document.getElementById(id); - }; - //------------------------------------------------------------------------------ - // Events - /** - * - * Dropbox event handler - * - * @param e - */ - AppHarness.prototype.dropDownChange = function (e) { - this.dropDown.options[this.dropDown.selectedIndex].value; - this.counter = this.dropDown.selectedIndex; - var dataIndex = parseInt(this.dropDown.options[this.dropDown.selectedIndex].value); - if (!isNaN(dataIndex)) { - this.navigateToSection(this.tests[dataIndex]); - } - }; - return AppHarness; -})(); -//--------------------------------------------------- -// Application Frame -var AppFrame = (function () { - function AppFrame() { - this.classPath = ''; - this.jsPath = ''; - var queryParams = Utils.getQueryParams(document.location.search); - if (queryParams.js != undefined && queryParams.name != undefined) { - this.jsPath = queryParams.js; - this.classPath = queryParams.name; - this.loadJS(this.jsPath); - } - } - /** - * - * Load a JavaScript file - * - * @param url - URL of JavaScript file - */ - AppFrame.prototype.loadJS = function (url) { - var _this = this; - var head = document.getElementsByTagName("head")[0]; - var script = document.createElement("script"); - script.type = "text/javascript"; - script.src = url; - script.onload = function () { return _this.jsLoaded(); }; - head.appendChild(script); - }; - /** - * - * Event Handler for loaded JavaScript files - * - */ - AppFrame.prototype.jsLoaded = function () { - var createPath = this.classPath.split('.'); // Split the classpath - var obj; - for (var c = 0; c < createPath.length; c++) { - if (obj == null) { - obj = window[createPath[c]]; // reference base module ( will be a child of the window ) - } - else { - obj = obj[createPath[c]]; // reference sub module / Class - } - } - if (obj != null) { - new obj(); // if Class has been found - start the test - } - }; - return AppFrame; -})(); -//--------------------------------------------------- -// Common Utilities -var Utils = (function () { - function Utils() { - } - /** - * - * Utility function - Parse a Query formatted string - * - * @param qs - * @returns {{}} - */ - Utils.getQueryParams = function (qs) { - qs = qs.split("+").join(" "); - var params = {}, tokens, re = /[?&]?([^=]+)=([^&]*)/g; - while (tokens = re.exec(qs)) { - params[decodeURIComponent(tokens[1])] = decodeURIComponent(tokens[2]); - } - return params; - }; - return Utils; -})(); -//--------------------------------------------------- -// Data -var TestData = (function () { - function TestData(name, classpath, js, src) { - this.js = js; - this.classpath = classpath; - this.src = src; - this.name =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5zdHlsZS53aWR0aCAgICAgICAgPSAnNjAwcHgnO1xuXHRcdFx0dGVzdFNlbGVjdG9yLnN0eWxlLmxlZnQgICAgICAgICA9ICc1MCUnO1xuXHRcdFx0dGVzdFNlbGVjdG9yLnN0eWxlLm1hcmdpbkxlZnQgICA9ICctMzAwcHgnXG5cdFx0XHR0ZXN0U2VsZWN0b3Iuc3R5bGUudGV4dEFsaWduICAgID0gJ2NlbnRlcic7XG5cblxuXHRcdHRoaXMuZHJvcERvd24gICAgICAgICAgICAgICAgICAgICAgID0gPEhUTUxTZWxlY3RFbGVtZW50PiBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCAnc2VsZWN0JyApO1xuXHRcdHRoaXMuZHJvcERvd24ubmFtZSAgICAgICAgICAgICAgICAgID0gXCJzZWxlY3RUZXN0RHJvcERvd25cIlxuXHRcdHRoaXMuZHJvcERvd24uaWQgICAgICAgICAgICAgICAgICAgID0gXCJzZWxlY3RUZXN0XCJcblxuXHRcdHRoaXMuc291cmNlQnRuICAgICAgICAgICAgICAgICAgICAgID0gPEhUTUxCdXR0b25FbGVtZW50PiBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCAnYnV0dG9uJyApO1xuXHRcdHRoaXMuc291cmNlQnRuLmlubmVySFRNTCAgICAgICAgICAgID0gJ1Nob3cgU291cmNlJztcblx0XHR0aGlzLnNvdXJjZUJ0bi5pZCAgICAgICAgICAgICAgICAgICA9ICdwcmV2aW91cyc7XG5cblx0XHR0aGlzLnByZXZpb3VzQnRuICAgICAgICAgICAgICAgICAgICA9IDxIVE1MQnV0dG9uRWxlbWVudD4gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCggJ2J1dHRvbicgKTtcblx0XHR0aGlzLnByZXZpb3VzQnRuLmlubmVySFRNTCAgICAgICAgICA9ICc8PCc7XG5cdFx0dGhpcy5wcmV2aW91c0J0bi5pZCAgICAgICAgICAgICAgICAgPSAncHJldmlvdXMnO1xuXG5cdFx0dGhpcy5uZXh0QnRuICA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dGljIGdldFF1ZXJ5UGFyYW1zKCBxcyApIDogT2JqZWN0IHtcblxuXHRcdHFzID0gcXMuc3BsaXQoXCIrXCIpLmpvaW4oXCIgXCIpO1xuXG5cdFx0dmFyIHBhcmFtcyA9IHt9LCB0b2tlbnMsXG5cdFx0XHRyZSA9IC9bPyZdPyhbXj1dKyk9KFteJl0qKS9nO1xuXG5cdFx0d2hpbGUgKHRva2VucyA9IHJlLmV4ZWMocXMpKSB7XG5cdFx0XHRwYXJhbXNbZGVjb2RlVVJJQ29tcG9uZW50KHRva2Vuc1sxXSldID0gZGVjb2RlVVJJQ29tcG9uZW50KHRva2Vuc1syXSk7XG5cdFx0fVxuXG5cdFx0cmV0dXJuIHBhcmFtcztcblx0fVxufVxuXG4vLy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLVxuLy8gRGF0YVxuXG5jbGFzcyBUZXN0RGF0YVxue1xuXHRwdWJsaWMganMgICAgICAgICAgIDogc3RyaW5nO1xuXHRwdWJsaWMgY2xhc3NwYXRoICAgIDogc3RyaW5nO1xuXHRwdWJsaWMgc3JjICAgICAgICAgIDogc3RyaW5nO1xuXHRwdWJsaWMgbmFtZSAgICAgICAgIDogc3RyaW5nO1xuXG5cdGNvbnN0cnVjdG9yKCBuYW1lIDogc3RyaW5nICwgY2xhc3NwYXRoIDogc3RyaW5nICwganMgOiBzdHJpbmcgLCBzcmMgOiBzdHJpbmcgKVxuXHR7XG5cdFx0dGhpcy5qcyAgICAgICAgID0ganM7XG5cdFx0dGhpcy5jbGFzc3BhdGggID0gY2xhc3NwYXRoO1xuXHRcdHRoaXMuc3JjICAgICAgICA9IHNyYztcblx0XHR0aGlzLm5hbWUgICAgICAgPSBuYW1lO1xuXHR9XG59Il19 \ No newline at end of file diff --git a/tests/AppHarness.ts b/tests/AppHarness.ts deleted file mode 100644 index dbd1bf03..00000000 --- a/tests/AppHarness.ts +++ /dev/null @@ -1,465 +0,0 @@ -//--------------------------------------------------- -// Application Harness - -class AppHarness -{ - - //------------------------------------------------------------------------------ - - private tests : Array = new Array(); - private dropDown : HTMLSelectElement; - private previousBtn : HTMLButtonElement; - private nextBtn : HTMLButtonElement; - private sourceBtn : HTMLButtonElement; - private testIframe : HTMLIFrameElement; - private srcIframe : HTMLIFrameElement; - private counter : number = 0; - private sourceVisible : boolean = false; - private loadDefault : boolean = true; - - //------------------------------------------------------------------------------ - - constructor() - { - - this.initFrameSet(); - this.initInterface(); - - - this.previousBtn.onclick = () => this.nagigateBy( -1 ); - this.nextBtn.onclick = () => this.nagigateBy( 1 ); - this.sourceBtn.onclick = () => this.toggleSource(); - this.dropDown.onchange = ( e ) => this.dropDownChange( e ); - - } - - //------------------------------------------------------------------------------ - - /** - * - * Load a test - * - * @param classPath - Module and Class path of test - * @param js Path to JavaScript file - * @param ts Path to Typescript file ( not yet used - reserved for future show source ) - */ - public load( classPath : string , js : string , ts : string ) : void - { - - this.loadFromURL(); - - if ( this.loadDefault ) - { - window.history.pushState(js, js, '?test=' + js); - this.testIframe.src = 'frame.html?name=' + classPath + '&js=' + js; - this.srcIframe.src = "data:text/html;charset=utf-8," + this.createSourceViewHTML( ts ); - - } - } - - /** - * - * Add a test to the AppHarness - * - * @param name Name of test - * @param classPath - Module and Class path of test - * @param js Path to JavaScript file - * @param ts Path to Typescript file ( not yet used - reserved for future show source ) - */ - public addTest( name : string , classpath : string , js : string , ts : string ) : void - { - this.tests.push ( new TestData( name , classpath , js , ts ) ); - } - - /** - * - * Add a separator to the menu - * - * @param name - */ - public addSeperator( name : string = '' ) : void - { - this.tests.push ( new TestData( '-- ' + name , '' , '' , '') ); - } - - /** - * - * Start the application harness - * - */ - public start( slideshowMode : boolean = false ) : void - { - for ( var c : number = 0 ; c < this.tests.length ; c ++ ) - { - var option : HTMLOptionElement = new Option( this.tests[c].name , String( c ) ); - this.dropDown.add( option ); - } - - if ( slideshowMode ) - { - - setInterval( () => this.nagigateBy( 1 ) , 15000); - } - } - - //------------------------------------------------------------------------------ - - private loadFromURL() : void - { - var queryParams : any = Utils.getQueryParams( document.location.search ); - - if ( queryParams.test != null ) - { - var l : number = this.tests.length; - - for ( var c : number = 0 ; c < l ; c ++ ) - { - if ( this.tests[c].js == queryParams.test ) - { - console.log ( '======>>>> LOAD TEST'); - - this.navigateToSection( this.tests[c] ); - this.loadDefault = false; - } - } - } - } - /** - * - */ - private initInterface() : void - { - - var testSelector : HTMLDivElement = document.createElement( 'div' ); - testSelector.style.cssFloat = 'none'; - testSelector.style.position = 'absolute'; - testSelector.style.bottom = '15px'; - testSelector.style.width = '600px'; - testSelector.style.left = '50%'; - testSelector.style.marginLeft = '-300px' - testSelector.style.textAlign = 'center'; - - - this.dropDown = document.createElement( 'select' ); - this.dropDown.name = "selectTestDropDown" - this.dropDown.id = "selectTest" - - this.sourceBtn = document.createElement( 'button' ); - this.sourceBtn.innerHTML = 'Show Source'; - this.sourceBtn.id = 'previous'; - - this.previousBtn = document.createElement( 'button' ); - this.previousBtn.innerHTML = '<<'; - this.previousBtn.id = 'previous'; - - this.nextBtn = document.createElement( 'button' ); - this.nextBtn.innerHTML = '>>'; - this.nextBtn.id = 'next'; - - - testSelector.appendChild( this.sourceBtn ); - testSelector.appendChild( this.previousBtn ); - testSelector.appendChild( this.dropDown ); - testSelector.appendChild( this.nextBtn ); - document.body.appendChild( testSelector ); - } - /** - * - */ - private initFrameSet() : void - { - - var iframeContainer : HTMLDivElement = document.createElement( 'div' ); - iframeContainer.style.width = '100%'; - iframeContainer.style.height = '100%'; - - this.testIframe = document.createElement( 'iframe' ); - this.testIframe.id = 'testContainer'; - this.testIframe.style.backgroundColor = '#9e9e9e'; - this.testIframe.style.cssFloat = 'none'; - this.testIframe.style.position = 'absolute'; - this.testIframe.style.top = '0px'; - this.testIframe.style.left = '0px'; - this.testIframe.style.border = '0px'; - this.testIframe.style.width = '100%'; - this.testIframe.style.height = '100%'; - //bottom: 120px; - - this.srcIframe = document.createElement( 'iframe' ); - this.srcIframe.id = 'testSourceContainer'; - this.srcIframe.style.backgroundColor = '#9e9e9e'; - this.srcIframe.style.cssFloat = 'none'; - this.srcIframe.style.position = 'absolute'; - this.srcIframe.style.right = '0px'; - this.srcIframe.style.top = '0px'; - this.srcIframe.style.bottom = '0px'; - this.srcIframe.style.border = '0px'; - this.srcIframe.style.width = '0%'; - this.srcIframe.style.height = '100%'; - - iframeContainer.appendChild( this.testIframe ); - iframeContainer.appendChild( this.srcIframe ); - - document.body.appendChild( iframeContainer ); - - } - - /** - * - * Selectnext / previous menu item - * - * @param direction - */ - private nagigateBy( direction : number = 1 ) : void - { - - var l : number = this.tests.length; - var nextCounter = this.counter + direction; - - if ( nextCounter < 0 ) - { - nextCounter = this.tests.length - 1; - } - else if ( nextCounter > this.tests.length - 1 ) - { - nextCounter = 0; - } - - var testData : TestData = this.tests[nextCounter]; - - if ( testData.name.indexOf ('--') != -1 ) // skip section headers - { - this.counter = nextCounter; - this.nagigateBy( direction ); - } - else - { - this.navigateToSection( testData ); - this.dropDown.selectedIndex = nextCounter; - this.counter = nextCounter; - } - - } - - /** - * - * Navigate to a section - * - * @param testData - */ - private navigateToSection ( testData : TestData ) : void - { - window.history.pushState(testData.js, testData.js, '?test=' + testData.js); - this.srcIframe.src = "data:text/html;charset=utf-8," + this.createSourceViewHTML( testData.src ); - this.testIframe.src = 'frame.html?name=' + testData.classpath + '&js=' + testData.js; - } - - private toggleSource() : void - { - - if ( this.sourceVisible ) - { - this.testIframe.style.width = '100%'; - this.srcIframe.style.width = '0%'; - this.sourceBtn.innerHTML = 'Show Source'; - } - else - { - this.testIframe.style.width = '20%'; - this.srcIframe.style.width = '80%'; - this.sourceBtn.innerHTML = 'Hide Source'; - } - - this.sourceVisible = !this.sourceVisible; - - } - - private createSourceViewHTML ( url : string ) : string - { - - var html : string = ''; - - html += ''; - html += ''; - html += ' '; - html += ' '; - html += ' '; - html += ' '; - html += ''; - html += ''; - html += ''; - html += ''; - - return html; - } - - //------------------------------------------------------------------------------ - // Utils - - /** - * - * Util function - get Element by ID - * - * @param id - * @returns {HTMLElement} - */ - private getId(id : string ) : HTMLElement - { - return document.getElementById( id ); - } - - //------------------------------------------------------------------------------ - // Events - - /** - * - * Dropbox event handler - * - * @param e - */ - private dropDownChange( e ) : void - { - this.dropDown.options[this.dropDown.selectedIndex].value - this.counter = this.dropDown.selectedIndex; - var dataIndex : number = parseInt( this.dropDown.options[this.dropDown.selectedIndex].value ) ; - - if ( ! isNaN( dataIndex ) ) - { - this.navigateToSection( this.tests[dataIndex] ); - } - } - -} - -//--------------------------------------------------- -// Application Frame - -class AppFrame -{ - - private classPath : string = ''; - private jsPath : string = ''; - - constructor( ) - { - - var queryParams : any = Utils.getQueryParams( document.location.search ); - - if ( queryParams.js != undefined && queryParams.name != undefined ) - { - - this.jsPath = queryParams.js; - this.classPath = queryParams.name; - this.loadJS( this.jsPath ); - - } - - } - - /** - * - * Load a JavaScript file - * - * @param url - URL of JavaScript file - */ - private loadJS(url : string ) - { - - var head : HTMLElement = document.getElementsByTagName("head")[0]; - var script : HTMLScriptElement = document.createElement("script"); - script.type = "text/javascript"; - script.src = url; - script.onload = () => this.jsLoaded(); - - head.appendChild(script); - } - - /** - * - * Event Handler for loaded JavaScript files - * - */ - private jsLoaded() - { - - var createPath : Array = this.classPath.split('.'); // Split the classpath - var obj : any; - - for ( var c : number = 0 ; c < createPath.length ; c++ ) - { - - if ( obj == null ) - { - obj = window[createPath[c]]; // reference base module ( will be a child of the window ) - } - else - { - obj = obj[createPath[c]]; // reference sub module / Class - } - - - } - - if ( obj != null ) - { - new obj(); // if Class has been found - start the test - } - - } - - - -} - -//--------------------------------------------------- -// Common Utilities - -class Utils -{ - /** - * - * Utility function - Parse a Query formatted string - * - * @param qs - * @returns {{}} - */ - static getQueryParams( qs ) : Object { - - qs = qs.split("+").join(" "); - - var params = {}, tokens, - re = /[?&]?([^=]+)=([^&]*)/g; - - while (tokens = re.exec(qs)) { - params[decodeURIComponent(tokens[1])] = decodeURIComponent(tokens[2]); - } - - return params; - } -} - -//--------------------------------------------------- -// Data - -class TestData -{ - public js : string; - public classpath : string; - public src : string; - public name : string; - - constructor( name : string , classpath : string , js : string , src : string ) - { - this.js = js; - this.classpath = classpath; - this.src = src; - this.name = name; - } -} \ No newline at end of file diff --git a/tests/Object3D/TorusObject3DDemo.ts b/tests/Object3D/TorusObject3DDemo.ts deleted file mode 100644 index 75dbe3ba..00000000 --- a/tests/Object3D/TorusObject3DDemo.ts +++ /dev/null @@ -1,160 +0,0 @@ -/// - -module tests.object3d -{ - import PerspectiveProjection = away.projections.PerspectiveProjection; - import View = away.containers.View; - import Mesh = away.entities.Mesh; - import PointLight = away.entities.PointLight; - import URLLoader = away.net.URLLoader; - import URLRequest = away.net.URLRequest; - import StaticLightPicker = away.materials.StaticLightPicker; - import TriangleMethodMaterial = away.materials.TriangleMethodMaterial; - import PrimitiveTorusPrefab = away.prefabs.PrimitiveTorusPrefab; - import DefaultRenderer = away.render.DefaultRenderer; - import ContextGLProfile = away.stagegl.ContextGLProfile; - import ImageTexture = away.textures.ImageTexture; - import RequestAnimationFrame = away.utils.RequestAnimationFrame; - - export class TorusObject3DDemo - { - - private view:View; - private torus:PrimitiveTorusPrefab; - - private light:PointLight; - private raf:RequestAnimationFrame; - private meshes:Mesh[]; - - private t:number = 0; - private tPos:number = 0; - private radius:number = 1000; - private follow:boolean = true; - - private pointLight:PointLight; - private lightPicker:StaticLightPicker; - - private _image:HTMLImageElement; - - constructor() - { - away.Debug.THROW_ERRORS = false; - away.Debug.LOG_PI_ERRORS = false; - - this.meshes = new Array(); - this.light = new PointLight(); - this.view = new View(new DefaultRenderer()); - this.pointLight = new PointLight(); - this.lightPicker = new StaticLightPicker([this.pointLight]) - - this.view.scene.addChild(this.pointLight); - - var perspectiveLens:PerspectiveProjection = this.view.camera.projection; - perspectiveLens.fieldOfView = 75; - - this.view.camera.z = 0; - this.view.backgroundColor = 0x000000; - this.view.backgroundAlpha = 1; - this.torus = new PrimitiveTorusPrefab(150, 50, 32, 32, false); - - var l:number = 10; - //var radius:number = 1000; - - for (var c : number = 0; c < l ; c++) { - - var t : number=Math.PI * 2 * c / l; - - var mesh:Mesh = this.torus.getNewObject(); - mesh.x = Math.cos(t)*this.radius; - mesh.y = 0; - mesh.z = Math.sin(t)*this.radius; - - this.view.scene.addChild(mesh); - this.meshes.push(mesh); - - } - - this.view.scene.addChild(this.light); - - this.raf = new RequestAnimationFrame(this.tick, this); - this.raf.start(); - this.onResize(); - - document.onmousedown = (event:MouseEvent) => this.followObject(event); - - window.onresize = (event:UIEvent) => this.onResize(event); - - this.loadResources(); - } - - private loadResources() - { - var urlRequest:URLRequest = new URLRequest("assets/custom_uv_horizontal.png"); - var urlLoader:URLLoader = new URLLoader(); - urlLoader.dataFormat = away.net.URLLoaderDataFormat.BLOB; - urlLoader.addEventListener(away.events.Event.COMPLETE, (event:away.events.Event) => this.imageCompleteHandler(event)); - urlLoader.load(urlRequest); - } - - private imageCompleteHandler(event:away.events.Event) - { - var urlLoader:URLLoader = event.target; - - this._image = away.parsers.ParserUtils.blobToImage(urlLoader.data); - this._image.onload = (event:Event) => this.onImageLoadComplete(event); - - } - - private onImageLoadComplete(event:Event) - { - var matTx: TriangleMethodMaterial = new TriangleMethodMaterial(new ImageTexture(this._image, false), true, true, false); - matTx.lightPicker = this.lightPicker; - - for (var c:number = 0; c < this.meshes.length; c ++) - this.meshes[c].material = matTx; - } - - private tick(dt:number) - { - this.tPos += .02; - - for (var c:number = 0 ; c < this.meshes.length ; c ++) { - var objPos:number=Math.PI*2*c/this.meshes.length; - - this.t += .005; - var s:number = 1.2 + Math.sin(this.t + objPos); - - this.meshes[c].rotationY += 2*(c/this.meshes.length); - this.meshes[c].rotationX += 2*(c/this.meshes.length); - this.meshes[c].rotationZ += 2*(c/this.meshes.length); - this.meshes[c].scaleX = this.meshes[c].scaleY = this.meshes[c].scaleZ = s; - this.meshes[c].x = Math.cos(objPos + this.tPos)*this.radius; - this.meshes[c].y = Math.sin(this.t)*500; - this.meshes[c].z = Math.sin(objPos + this.tPos)*this.radius; - } - - //this.view.camera.y = Math.sin( this.tPos ) * 1500; - - if (this.follow) - this.view.camera.lookAt(this.meshes[0].transform.position); - - this.view.camera.y = Math.sin(this.tPos) * 1500; - - this.view.render(); - } - - public onResize(event:UIEvent = null) - { - this.view.y = 0; - this.view.x = 0; - - this.view.width = window.innerWidth; - this.view.height = window.innerHeight; - } - - public followObject(e) - { - this.follow = !this.follow; - } - } -} \ No newline at end of file diff --git a/tests/Object3D/TorusVortex.ts b/tests/Object3D/TorusVortex.ts deleted file mode 100644 index 1f9b9992..00000000 --- a/tests/Object3D/TorusVortex.ts +++ /dev/null @@ -1,119 +0,0 @@ -/// - -module tests.object3d -{ - import BlendMode = away.base.BlendMode; - import Scene = away.containers.Scene; - import View = away.containers.View; - import ContextMode = away.display.ContextMode; - import Mesh = away.entities.Mesh; - import Vector3D = away.geom.Vector3D; - import TriangleMethodMaterial = away.materials.TriangleMethodMaterial; - import URLLoader = away.net.URLLoader; - import URLLoaderDataFormat = away.net.URLLoaderDataFormat; - import URLRequest = away.net.URLRequest; - import ParserUtils = away.parsers.ParserUtils; - import PrimitiveTorusPrefab = away.prefabs.PrimitiveTorusPrefab; - import PrimitiveCubePrefab = away.prefabs.PrimitiveCubePrefab; - import PerspectiveProjection = away.projections.PerspectiveProjection; - import DefaultRenderer = away.render.DefaultRenderer; - import ContextGLProfile = away.stagegl.ContextGLProfile; - import ImageTexture = away.textures.ImageTexture; - import RequestAnimationFrame = away.utils.RequestAnimationFrame; - - export class TorusVortex - { - private _view:View; - - private _cube:PrimitiveCubePrefab; - private _torus:PrimitiveTorusPrefab; - private _mesh:Mesh; - private _mesh2:Mesh; - - private _raf:RequestAnimationFrame; - private _image:HTMLImageElement; - private _cameraAxis:Vector3D; - - constructor() - { - away.Debug.THROW_ERRORS = false; - - this._view = new View(new DefaultRenderer()); - - this._view.backgroundColor = 0x000000; - this._view.camera.x = 130; - this._view.camera.y = 0; - this._view.camera.z = 0; - this._cameraAxis = new Vector3D(0, 0, 1); - - this._view.camera.projection = new PerspectiveProjection(120); - this._view.camera.projection.near = 0.1; - - this._cube = new PrimitiveCubePrefab(20.0, 20.0, 20.0); - this._torus = new PrimitiveTorusPrefab(150, 80, 32, 16, true); - - this.loadResources(); - } - - private loadResources() - { - var urlRequest:URLRequest = new URLRequest( "assets/130909wall_big.png" ); - var urlLoader:URLLoader = new URLLoader(); - urlLoader.dataFormat = URLLoaderDataFormat.BLOB; - urlLoader.addEventListener(away.events.Event.COMPLETE, (event:away.events.Event) => this.imageCompleteHandler(event)); - urlLoader.load(urlRequest); - } - - private imageCompleteHandler(event:away.events.Event) - { - var imageLoader:URLLoader = event.target; - this._image = ParserUtils.blobToImage(imageLoader.data); - this._image.onload = (event) => this.onLoadComplete(event); - } - - private onLoadComplete(event) - { - var matTx:TriangleMethodMaterial = new TriangleMethodMaterial(new ImageTexture(this._image, false), true, true, false); - - matTx.blendMode = BlendMode.ADD; - matTx.bothSides = true; - - this._torus.material = matTx; - this._cube.material = matTx; - - this._mesh = this._torus.getNewObject(); - this._mesh2 = this._cube.getNewObject(); - this._mesh2.x = 130; - this._mesh2.z = 40; - - this._view.scene.addChild(this._mesh); - this._view.scene.addChild(this._mesh2); - - this._raf = new RequestAnimationFrame(this.render, this); - this._raf.start(); - - window.onresize = (event:UIEvent) => this.onResize(event); - - this.onResize(); - } - - public render(dt:number = null):void - { - - this._view.camera.rotate(this._cameraAxis, 1); - this._mesh.rotationY += 1; - this._mesh2.rotationX += 0.4; - this._mesh2.rotationY += 0.4; - this._view.render(); - } - - public onResize(event:UIEvent = null) - { - this._view.y = 0; - this._view.x = 0; - - this._view.width = window.innerWidth; - this._view.height = window.innerHeight; - } - } -} diff --git a/tests/assets/1.png b/tests/assets/1.png deleted file mode 100755 index 109d8dde..00000000 Binary files a/tests/assets/1.png and /dev/null differ diff --git a/tests/assets/130909wall_big.png b/tests/assets/130909wall_big.png deleted file mode 100755 index 109d8dde..00000000 Binary files a/tests/assets/130909wall_big.png and /dev/null differ diff --git a/tests/assets/256x256.png b/tests/assets/256x256.png deleted file mode 100755 index 109d8dde..00000000 Binary files a/tests/assets/256x256.png and /dev/null differ diff --git a/tests/assets/CubeTextureTest.cube b/tests/assets/CubeTextureTest.cube deleted file mode 100644 index ddc90681..00000000 --- a/tests/assets/CubeTextureTest.cube +++ /dev/null @@ -1,28 +0,0 @@ -{ - "data":[ - { - "id":"posX", - "image":"sky_posX.jpg" - }, - { - "id":"negX", - "image":"sky_negX.jpg" - }, - { - "id":"posY", - "image":"sky_posY.jpg" - }, - { - "id":"negY", - "image":"sky_negY.jpg" - }, - { - "id":"posZ", - "image":"sky_posZ.jpg" - }, - { - "id":"negZ", - "image":"sky_negZ.jpg" - } - ] -} diff --git a/tests/assets/custom_uv_horizontal.png b/tests/assets/custom_uv_horizontal.png deleted file mode 100755 index 7db084b9..00000000 Binary files a/tests/assets/custom_uv_horizontal.png and /dev/null differ diff --git a/tests/assets/dots.png b/tests/assets/dots.png deleted file mode 100755 index ce903166..00000000 Binary files a/tests/assets/dots.png and /dev/null differ diff --git a/tests/assets/sky_negX.jpg b/tests/assets/sky_negX.jpg deleted file mode 100755 index a7cff5ae..00000000 Binary files a/tests/assets/sky_negX.jpg and /dev/null differ diff --git a/tests/assets/sky_negY.jpg b/tests/assets/sky_negY.jpg deleted file mode 100755 index 57f7a532..00000000 Binary files a/tests/assets/sky_negY.jpg and /dev/null differ diff --git a/tests/assets/sky_negZ.jpg b/tests/assets/sky_negZ.jpg deleted file mode 100755 index 8458a09e..00000000 Binary files a/tests/assets/sky_negZ.jpg and /dev/null differ diff --git a/tests/assets/sky_posX.jpg b/tests/assets/sky_posX.jpg deleted file mode 100755 index 511555f7..00000000 Binary files a/tests/assets/sky_posX.jpg and /dev/null differ diff --git a/tests/assets/sky_posY.jpg b/tests/assets/sky_posY.jpg deleted file mode 100755 index c18ce753..00000000 Binary files a/tests/assets/sky_posY.jpg and /dev/null differ diff --git a/tests/assets/sky_posZ.jpg b/tests/assets/sky_posZ.jpg deleted file mode 100755 index e8130bca..00000000 Binary files a/tests/assets/sky_posZ.jpg and /dev/null differ diff --git a/tests/containers/View3DTest.js b/tests/containers/View3DTest.js deleted file mode 100755 index 2dbdfa1a..00000000 --- a/tests/containers/View3DTest.js +++ /dev/null @@ -1,53 +0,0 @@ -var View = require("awayjs-core/lib/containers/View"); -var PointLight = require("awayjs-core/lib/entities/PointLight"); -var PrimitiveTorusPrefab = require("awayjs-core/lib/prefabs/PrimitiveTorusPrefab"); -var RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); -var Debug = require("awayjs-core/lib/utils/Debug"); -var DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -var TriangleMethodMaterial = require("awayjs-stagegl/lib/materials/TriangleMethodMaterial"); -var View3DTest = (function () { - function View3DTest() { - var _this = this; - Debug.THROW_ERRORS = false; - Debug.LOG_PI_ERRORS = false; - this.meshes = new Array(); - this.light = new PointLight(); - this.view = new View(new DefaultRenderer()); - this.view.camera.z = 0; - this.view.backgroundColor = 0x776655; - this.torus = new PrimitiveTorusPrefab(150, 50, 32, 32, false); - var l = 10; - var radius = 1000; - var matB = new TriangleMethodMaterial(); - this.torus.material = matB; - for (var c = 0; c < l; c++) { - var t = Math.PI * 2 * c / l; - var mesh = this.torus.getNewObject(); - mesh.x = Math.cos(t) * radius; - mesh.y = 0; - mesh.z = Math.sin(t) * radius; - this.view.scene.addChild(mesh); - this.meshes.push(mesh); - } - this.view.scene.addChild(this.light); - this.raf = new RequestAnimationFrame(this.tick, this); - this.raf.start(); - this.resize(null); - window.onresize = function (e) { return _this.resize(null); }; - } - View3DTest.prototype.tick = function (e) { - for (var c = 0; c < this.meshes.length; c++) - this.meshes[c].rotationY += 2; - this.view.camera.rotationY += .5; - this.view.render(); - }; - View3DTest.prototype.resize = function (e) { - this.view.y = 0; - this.view.x = 0; - this.view.width = window.innerWidth; - this.view.height = window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mUuYWRkQ2hpbGQobWVzaCk7XG5cdFx0XHR0aGlzLm1lc2hlcy5wdXNoKG1lc2gpO1xuXG5cdFx0fVxuXG5cdFx0dGhpcy52aWV3LnNjZW5lLmFkZENoaWxkKHRoaXMubGlnaHQpO1xuXG5cdFx0dGhpcy5yYWYgPSBuZXcgUmVxdWVzdEFuaW1hdGlvbkZyYW1lKHRoaXMudGljayAsIHRoaXMpO1xuXHRcdHRoaXMucmFmLnN0YXJ0KCk7XG5cdFx0dGhpcy5yZXNpemUoIG51bGwgKTtcblxuXHRcdHdpbmRvdy5vbnJlc2l6ZSA9IChlKSA9PiB0aGlzLnJlc2l6ZShudWxsKTtcblxuXHR9XG5cblx0cHJpdmF0ZSB0aWNrKGUpXG5cdHtcblxuXHRcdGZvciAodmFyIGM6bnVtYmVyID0gMDsgYyA8IHRoaXMubWVzaGVzLmxlbmd0aDsgYysrKVxuXHRcdFx0dGhpcy5tZXNoZXNbY10ucm90YXRpb25ZICs9IDI7XG5cblx0XHR0aGlzLnZpZXcuY2FtZXJhLnJvdGF0aW9uWSArPSAuNTtcblx0XHR0aGlzLnZpZXcucmVuZGVyKCk7XG5cdH1cblxuXHRwdWJsaWMgcmVzaXplKGUpXG5cdHtcblx0XHR0aGlzLnZpZXcueSA9IDA7XG5cdFx0dGhpcy52aWV3LnggPSAwO1xuXG5cdFx0dGhpcy52aWV3LndpZHRoID0gd2luZG93LmlubmVyV2lkdGg7XG5cdFx0dGhpcy52aWV3LmhlaWdodCA9IHdpbmRvdy5pbm5lckhlaWdodDtcblx0fVxufSJdfQ== \ No newline at end of file diff --git a/tests/containers/View3DTest.ts b/tests/containers/View3DTest.ts deleted file mode 100644 index 87b3b15a..00000000 --- a/tests/containers/View3DTest.ts +++ /dev/null @@ -1,82 +0,0 @@ -import View = require("awayjs-core/lib/containers/View"); -import Mesh = require("awayjs-core/lib/entities/Mesh"); -import PointLight = require("awayjs-core/lib/entities/PointLight"); -import PrimitiveTorusPrefab = require("awayjs-core/lib/prefabs/PrimitiveTorusPrefab"); -import RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); -import Debug = require("awayjs-core/lib/utils/Debug"); - -import DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -import TriangleMethodMaterial = require("awayjs-stagegl/lib/materials/TriangleMethodMaterial"); - -class View3DTest -{ - - private view:View; - private torus:PrimitiveTorusPrefab; - - private light:PointLight; - private raf:RequestAnimationFrame; - private meshes:Array; - - constructor() - { - - Debug.THROW_ERRORS = false; - Debug.LOG_PI_ERRORS = false; - - this.meshes = new Array(); - this.light = new PointLight(); - this.view = new View(new DefaultRenderer()) - this.view.camera.z = 0; - this.view.backgroundColor = 0x776655; - this.torus = new PrimitiveTorusPrefab(150 , 50 , 32 , 32 , false); - - var l:number = 10; - var radius:number = 1000; - var matB:TriangleMethodMaterial = new TriangleMethodMaterial(); - - this.torus.material = matB; - - for (var c:number = 0; c < l; c++) { - - var t:number=Math.PI * 2 * c / l; - - var mesh:Mesh = this.torus.getNewObject(); - mesh.x = Math.cos(t)*radius; - mesh.y = 0; - mesh.z = Math.sin(t)*radius; - - this.view.scene.addChild(mesh); - this.meshes.push(mesh); - - } - - this.view.scene.addChild(this.light); - - this.raf = new RequestAnimationFrame(this.tick , this); - this.raf.start(); - this.resize( null ); - - window.onresize = (e) => this.resize(null); - - } - - private tick(e) - { - - for (var c:number = 0; c < this.meshes.length; c++) - this.meshes[c].rotationY += 2; - - this.view.camera.rotationY += .5; - this.view.render(); - } - - public resize(e) - { - this.view.y = 0; - this.view.x = 0; - - this.view.width = window.innerWidth; - this.view.height = window.innerHeight; - } -} \ No newline at end of file diff --git a/tests/controllers/HoverControllerTest.js b/tests/controllers/HoverControllerTest.js deleted file mode 100755 index 11fc419a..00000000 --- a/tests/controllers/HoverControllerTest.js +++ /dev/null @@ -1,53 +0,0 @@ -var View = require("awayjs-core/lib/containers/View"); -var HoverController = require("awayjs-core/lib/controllers/HoverController"); -var PrimitiveCubePrefab = require("awayjs-core/lib/prefabs/PrimitiveCubePrefab"); -var RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); -var DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -var HoverControllerTest = (function () { - function HoverControllerTest() { - var _this = this; - this._move = false; - this._view = new View(new DefaultRenderer()); - this._cube = new PrimitiveCubePrefab(400, 400, 400); - this._cube.geometryType = "lineSubGeometry"; - this._mesh = this._cube.getNewObject(); - this._view.scene.addChild(this._mesh); - this._hoverControl = new HoverController(this._view.camera, this._mesh, 150, 10); - window.onresize = function (event) { return _this.onResize(event); }; - document.onmousedown = function (event) { return _this.onMouseDown(event); }; - document.onmouseup = function (event) { return _this.onMouseUp(event); }; - document.onmousemove = function (event) { return _this.onMouseMove(event); }; - this.onResize(); - this._timer = new RequestAnimationFrame(this.render, this); - this._timer.start(); - } - HoverControllerTest.prototype.onResize = function (event) { - if (event === void 0) { event = null; } - this._view.y = 0; - this._view.x = 0; - this._view.width = window.innerWidth; - this._view.height = window.innerHeight; - }; - HoverControllerTest.prototype.render = function (dt) { - this._view.render(); - }; - HoverControllerTest.prototype.onMouseUp = function (event) { - this._move = false; - }; - HoverControllerTest.prototype.onMouseMove = function (event) { - if (this._move) { - this._hoverControl.panAngle = 0.3 * (event.clientX - this._lastMouseX) + this._lastPanAngle; - this._hoverControl.tiltAngle = 0.3 * (event.clientY - this._lastMouseY) + this._lastTiltAngle; - } - }; - HoverControllerTest.prototype.onMouseDown = function (event) { - this._lastPanAngle = this._hoverControl.panAngle; - this._lastTiltAngle = this._hoverControl.tiltAngle; - this._lastMouseX = event.clientX; - this._lastMouseY = event.clientY; - this._move = true; - }; - return HoverControllerTest; -})(); - -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbnRyb2xsZXJzL2hvdmVyY29udHJvbGxlcnRlc3QudHMiXSwibmFtZXMiOlsiSG92ZXJDb250cm9sbGVyVGVzdCIsIkhvdmV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0gdGhpcy5faG92ZXJDb250cm9sLnBhbkFuZ2xlO1xuXHRcdHRoaXMuX2xhc3RUaWx0QW5nbGUgPSB0aGlzLl9ob3ZlckNvbnRyb2wudGlsdEFuZ2xlO1xuXHRcdHRoaXMuX2xhc3RNb3VzZVggPSBldmVudC5jbGllbnRYO1xuXHRcdHRoaXMuX2xhc3RNb3VzZVkgPSBldmVudC5jbGllbnRZO1xuXHRcdHRoaXMuX21vdmUgPSB0cnVlO1xuXHR9XG59Il19 \ No newline at end of file diff --git a/tests/controllers/HoverControllerTest.ts b/tests/controllers/HoverControllerTest.ts deleted file mode 100644 index 502412c5..00000000 --- a/tests/controllers/HoverControllerTest.ts +++ /dev/null @@ -1,83 +0,0 @@ -import View = require("awayjs-core/lib/containers/View"); -import HoverController = require("awayjs-core/lib/controllers/HoverController"); -import Mesh = require("awayjs-core/lib/entities/Mesh"); -import LoaderEvent = require("awayjs-core/lib/events/LoaderEvent"); -import PrimitiveCubePrefab = require("awayjs-core/lib/prefabs/PrimitiveCubePrefab"); -import RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); - -import DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); - -class HoverControllerTest -{ - - private _view:View; - private _timer:RequestAnimationFrame; - private _hoverControl:HoverController; - - private _move:boolean = false; - private _lastPanAngle:number; - private _lastTiltAngle:number; - private _lastMouseX:number; - private _lastMouseY:number; - private _cube:PrimitiveCubePrefab; - private _mesh:Mesh; - - constructor() - { - this._view = new View(new DefaultRenderer()); - - this._cube = new PrimitiveCubePrefab(400, 400, 400); - this._cube.geometryType = "lineSubGeometry"; - this._mesh = this._cube.getNewObject(); - this._view.scene.addChild(this._mesh); - - this._hoverControl = new HoverController(this._view.camera, this._mesh, 150, 10); - - window.onresize = (event:UIEvent) => this.onResize(event); - - document.onmousedown = (event:MouseEvent) => this.onMouseDown(event); - document.onmouseup = (event:MouseEvent) => this.onMouseUp(event); - document.onmousemove = (event:MouseEvent) => this.onMouseMove(event); - - - this.onResize(); - - this._timer = new RequestAnimationFrame(this.render , this); - this._timer.start(); - } - - private onResize(event:UIEvent = null) - { - this._view.y = 0; - this._view.x = 0; - this._view.width = window.innerWidth; - this._view.height = window.innerHeight; - } - - private render(dt:number) - { - this._view.render(); - } - - private onMouseUp(event:MouseEvent) - { - this._move = false; - } - - private onMouseMove(event:MouseEvent) - { - if (this._move) { - this._hoverControl.panAngle = 0.3*(event.clientX - this._lastMouseX) + this._lastPanAngle; - this._hoverControl.tiltAngle = 0.3*(event.clientY - this._lastMouseY) + this._lastTiltAngle; - } - } - - private onMouseDown(event:MouseEvent) - { - this._lastPanAngle = this._hoverControl.panAngle; - this._lastTiltAngle = this._hoverControl.tiltAngle; - this._lastMouseX = event.clientX; - this._lastMouseY = event.clientY; - this._move = true; - } -} \ No newline at end of file diff --git a/tests/display/BitmapDataReflectionTest.js b/tests/display/BitmapDataReflectionTest.js deleted file mode 100755 index 87991553..00000000 --- a/tests/display/BitmapDataReflectionTest.js +++ /dev/null @@ -1,78 +0,0 @@ -var View = require("awayjs-core/lib/containers/View"); -var BitmapData = require("awayjs-core/lib/core/base/BitmapData"); -var AssetLibrary = require("awayjs-core/lib/core/library/AssetLibrary"); -var AssetType = require("awayjs-core/lib/core/library/AssetType"); -var URLRequest = require("awayjs-core/lib/core/net/URLRequest"); -var LoaderEvent = require("awayjs-core/lib/events/LoaderEvent"); -var PrimitivePlanePrefab = require("awayjs-core/lib/prefabs/PrimitivePlanePrefab"); -var BitmapTexture = require("awayjs-core/lib/textures/BitmapTexture"); -var RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); -var DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -var TriangleMethodMaterial = require("awayjs-stagegl/lib/materials/TriangleMethodMaterial"); -var BitmapDataReflectionTest = (function () { - function BitmapDataReflectionTest() { - var _this = this; - this.view = new View(new DefaultRenderer()); - this.raf = new RequestAnimationFrame(this.render, this); - var token = AssetLibrary.load(new URLRequest('assets/dots.png')); - token.addEventListener(LoaderEvent.RESOURCE_COMPLETE, function (event) { return _this.onResourceComplete(event); }); - window.onresize = function (event) { return _this.onResize(event); }; - } - BitmapDataReflectionTest.prototype.onResourceComplete = function (event) { - var loader = event.target; - var l = loader.baseDependency.assets.length; - for (var c = 0; c < l; c++) { - var asset = loader.baseDependency.assets[c]; - switch (asset.assetType) { - case AssetType.TEXTURE: - var prefab = new PrimitivePlanePrefab(500, 500, 1, 1, false); - var tx = asset; - var bitmap = new BitmapData(1024, 1024, true, 0x00000000); - bitmap.context.translate(0, 1024); - bitmap.context.scale(1, -1); - bitmap.context.drawImage(tx.htmlImageElement, 0, 0, 1024, 1024); - var gradient = bitmap.context.createLinearGradient(0, 0, 0, 1024); - gradient.addColorStop(0.8, "rgba(255, 255, 255, 1.0)"); - gradient.addColorStop(1, "rgba(255, 255, 255, 0.5)"); - bitmap.context.fillStyle = gradient; - bitmap.context.rect(0, 0, 1024, 1024); - bitmap.context.globalCompositeOperation = "destination-out"; - bitmap.context.fill(); - var bitmapClone = new BitmapData(1024, 1024, true, 0x00000000); - bitmapClone.copyPixels(bitmap, bitmapClone.rect, bitmapClone.rect); - document.body.appendChild(bitmap.canvas); - var bmpTX = new BitmapTexture(bitmapClone, false); - var material = new TriangleMethodMaterial(bmpTX); - material.bothSides = true; - material.alphaBlending = true; - var material2 = new TriangleMethodMaterial(tx); - material2.bothSides = true; - material2.alphaBlending = true; - this.reflectionMesh = prefab.getNewObject(); - this.reflectionMesh.material = material; - this.view.scene.addChild(this.reflectionMesh); - this.fullmesh = prefab.getNewObject(); - this.fullmesh.material = material2; - this.fullmesh.rotationY = 90; - this.view.scene.addChild(this.fullmesh); - break; - } - } - this.raf.start(); - this.onResize(); - }; - BitmapDataReflectionTest.prototype.onResize = function (event) { - if (event === void 0) { event = null; } - this.view.x = window.innerWidth / 2; - this.view.width = window.innerWidth / 2; - this.view.height = window.innerHeight; - }; - BitmapDataReflectionTest.prototype.render = function () { - this.fullmesh.rotationY += .5; - this.reflectionMesh.rotationY += .5; - this.view.render(); - }; - return BitmapDataReflectionTest; -})(); - -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRpc3BsYXkvYml0bWFwZGF0YXJlZmxlY3Rpb250ZXN0LnRzIl0sIm5hbWVzIjpbIkJpdG1hcERhdGFSZWZsZWN0aW9uVGVzdCIsIkJpdG1hcERhdGFSZWZsZWN0aW9uVGVzdC5jb25zdHJ1Y3RvciIsIkJpdG1hcERhdGFSZWZsZWN0aW9uVGVzdC5vblJlc291cmNlQ29tcGxldGUiLCJCaXRtYXBEYXRhUmVmbGVjdGlvblRlc3Qub25SZXNpemUiLCJCaXRtYXBEYXRhUmVmbGVjdGlvblRlc3QucmVuZGVyIl0sIm1hcHBpbmdzIjoiQUFBQSxJQUFPLElBQUksV0FBaUIsaUNBQWlDLENBQUMsQ0FBQztBQUMvRCxJQUFPLFVBQVUsV0FBZSxzQ0FBc0MsQ0FBQyxDQUFDO0FBQ3hFLElBQU8sWUFBWSxXQUFlLDJDQUEyQyxDQUFDLENBQUM7QUFHL0UsSUFBTyxTQUFTLFdBQWUsd0NBQXdDLENBQUMsQ0FBQztBQUV6RSxJQUFPLFVBQVUsV0FBZSxxQ0FBcUMsQ0FBQyxDQUFDO0FBRXZFLElBQU8sV0FBVyxXQUFlLG9DQUFvQyxDQUFDLENBQUM7QUFDdkUsSUFBTyxvQkFBb0IsV0FBYSw4Q0FBOEMsQ0FBQyxDQUFDO0FBQ3hGLElBQU8sYUFBYSxXQUFjLHdDQUF3QyxDQUFDLENBQUM7QUFFNUUsSUFBTyxxQkFBcUIsV0FBWSw2Q0FBNkMsQ0FBQyxDQUFDO0FBRXZGLElBQU8sZUFBZSxXQUFjLGdEQUFnRCxDQUFDLENBQUM7QUFDdEYsSUFBTyxzQkFBc0IsV0FBWSxxREFBcUQsQ0FBQyxDQUFDO0FBRWhHLElBQU0sd0JBQXdCO0lBTzdCQS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ZXJpYWwgPSBtYXRlcmlhbDtcblx0XHRcdFx0XHR0aGlzLnZpZXcuc2NlbmUuYWRkQ2hpbGQodGhpcy5yZWZsZWN0aW9uTWVzaCk7XG5cblx0XHRcdFx0XHR0aGlzLmZ1bGxtZXNoID0gPE1lc2g+IHByZWZhYi5nZXROZXdPYmplY3QoKTtcblx0XHRcdFx0XHR0aGlzLmZ1bGxtZXNoLm1hdGVyaWFsID0gbWF0ZXJpYWwyO1xuXHRcdFx0XHRcdHRoaXMuZnVsbG1lc2gucm90YXRpb25ZID0gOTA7XG5cdFx0XHRcdFx0dGhpcy52aWV3LnNjZW5lLmFkZENoaWxkKHRoaXMuZnVsbG1lc2gpO1xuXG5cdFx0XHRcdFx0YnJlYWs7XG5cdFx0XHR9XG5cdFx0fVxuXG5cdFx0dGhpcy5yYWYuc3RhcnQoKTtcblx0XHR0aGlzLm9uUmVzaXplKCk7XG5cdH1cblxuXHRwcml2YXRlIG9uUmVzaXplKGV2ZW50OlVJRXZlbnQgPSBudWxsKVxuXHR7XG5cdFx0dGhpcy52aWV3LnggPSB3aW5kb3cuaW5uZXJXaWR0aC8yO1xuXHRcdHRoaXMudmlldy53aWR0aCA9IHdpbmRvdy5pbm5lcldpZHRoLzI7XG5cdFx0dGhpcy52aWV3LmhlaWdodCA9IHdpbmRvdy5pbm5lckhlaWdodDtcblx0fVxuXG5cdHByaXZhdGUgcmVuZGVyKClcblx0e1xuXHRcdHRoaXMuZnVsbG1lc2gucm90YXRpb25ZICs9LjU7XG5cdFx0dGhpcy5yZWZsZWN0aW9uTWVzaC5yb3RhdGlvblkgKz0uNTtcblxuXHRcdHRoaXMudmlldy5yZW5kZXIoKTtcblx0fVxufSJdfQ== \ No newline at end of file diff --git a/tests/display/BitmapDataReflectionTest.ts b/tests/display/BitmapDataReflectionTest.ts deleted file mode 100644 index 7301fa5b..00000000 --- a/tests/display/BitmapDataReflectionTest.ts +++ /dev/null @@ -1,112 +0,0 @@ -import View = require("awayjs-core/lib/containers/View"); -import BitmapData = require("awayjs-core/lib/core/base/BitmapData"); -import AssetLibrary = require("awayjs-core/lib/core/library/AssetLibrary"); -import AssetLoader = require("awayjs-core/lib/core/library/AssetLoader"); -import AssetLoaderToken = require("awayjs-core/lib/core/library/AssetLoaderToken"); -import AssetType = require("awayjs-core/lib/core/library/AssetType"); -import IAsset = require("awayjs-core/lib/core/library/IAsset"); -import URLRequest = require("awayjs-core/lib/core/net/URLRequest"); -import Mesh = require("awayjs-core/lib/entities/Mesh"); -import LoaderEvent = require("awayjs-core/lib/events/LoaderEvent"); -import PrimitivePlanePrefab = require("awayjs-core/lib/prefabs/PrimitivePlanePrefab"); -import BitmapTexture = require("awayjs-core/lib/textures/BitmapTexture"); -import ImageTexture = require("awayjs-core/lib/textures/ImageTexture"); -import RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); - -import DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -import TriangleMethodMaterial = require("awayjs-stagegl/lib/materials/TriangleMethodMaterial"); - -class BitmapDataReflectionTest -{ - private view:View; - private raf:RequestAnimationFrame; - private reflectionMesh:Mesh; - private fullmesh:Mesh; - - constructor() - { - this.view = new View(new DefaultRenderer()); - this.raf = new RequestAnimationFrame(this.render, this); - - var token:AssetLoaderToken = AssetLibrary.load( new URLRequest('assets/dots.png')); - token.addEventListener(LoaderEvent.RESOURCE_COMPLETE, (event:LoaderEvent) => this.onResourceComplete(event)); - - window.onresize = (event:UIEvent) => this.onResize(event); - } - - private onResourceComplete(event:LoaderEvent) - { - var loader:AssetLoader = event.target; - var l:number = loader.baseDependency.assets.length; - - for (var c:number = 0; c < l; c++) { - - var asset:IAsset = loader.baseDependency.assets[c]; - - switch (asset.assetType) { - case AssetType.TEXTURE: - - var prefab:PrimitivePlanePrefab = new PrimitivePlanePrefab(500 , 500, 1, 1, false); - var tx:ImageTexture = asset; - var bitmap:BitmapData = new BitmapData(1024, 1024, true, 0x00000000); - - bitmap.context.translate(0, 1024); - bitmap.context.scale(1, -1); - bitmap.context.drawImage(tx.htmlImageElement, 0, 0, 1024, 1024); - - var gradient = bitmap.context.createLinearGradient(0, 0, 0, 1024); - gradient.addColorStop(0.8, "rgba(255, 255, 255, 1.0)"); - gradient.addColorStop(1, "rgba(255, 255, 255, 0.5)"); - - bitmap.context.fillStyle = gradient; - bitmap.context.rect(0, 0, 1024, 1024); - bitmap.context.globalCompositeOperation = "destination-out"; - bitmap.context.fill(); - - var bitmapClone:BitmapData = new BitmapData(1024, 1024, true, 0x00000000); - bitmapClone.copyPixels(bitmap, bitmapClone.rect, bitmapClone.rect); - - document.body.appendChild(bitmap.canvas); - - var bmpTX:BitmapTexture = new BitmapTexture(bitmapClone, false); - - var material:TriangleMethodMaterial = new TriangleMethodMaterial(bmpTX); - material.bothSides = true; - material.alphaBlending = true; - - var material2:TriangleMethodMaterial = new TriangleMethodMaterial(tx); - material2.bothSides = true; - material2.alphaBlending = true; - - this.reflectionMesh = prefab.getNewObject(); - this.reflectionMesh.material = material; - this.view.scene.addChild(this.reflectionMesh); - - this.fullmesh = prefab.getNewObject(); - this.fullmesh.material = material2; - this.fullmesh.rotationY = 90; - this.view.scene.addChild(this.fullmesh); - - break; - } - } - - this.raf.start(); - this.onResize(); - } - - private onResize(event:UIEvent = null) - { - this.view.x = window.innerWidth/2; - this.view.width = window.innerWidth/2; - this.view.height = window.innerHeight; - } - - private render() - { - this.fullmesh.rotationY +=.5; - this.reflectionMesh.rotationY +=.5; - - this.view.render(); - } -} \ No newline at end of file diff --git a/tests/entities/BillboardTest.js b/tests/entities/BillboardTest.js deleted file mode 100755 index b562918d..00000000 --- a/tests/entities/BillboardTest.js +++ /dev/null @@ -1,152 +0,0 @@ -var View = require("awayjs-core/lib/containers/View"); -var HoverController = require("awayjs-core/lib/controllers/HoverController"); -var AlignmentMode = require("awayjs-core/lib/core/base/AlignmentMode"); -var OrientationMode = require("awayjs-core/lib/core/base/OrientationMode"); -var Vector3D = require("awayjs-core/lib/core/geom/Vector3D"); -var AssetLibrary = require("awayjs-core/lib/core/library/AssetLibrary"); -var URLRequest = require("awayjs-core/lib/core/net/URLRequest"); -var Billboard = require("awayjs-core/lib/entities/Billboard"); -var LoaderEvent = require("awayjs-core/lib/events/LoaderEvent"); -var RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); -var DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -var TriangleMethodMaterial = require("awayjs-stagegl/lib/materials/TriangleMethodMaterial"); -var BillboardTest = (function () { - /** - * Constructor - */ - function BillboardTest() { - this._time = 0; - this._move = false; - this.init(); - } - /** - * Global initialise function - */ - BillboardTest.prototype.init = function () { - this.initEngine(); - this.initListeners(); - this.loadTexture(); - }; - /** - * Initialise the engine - */ - BillboardTest.prototype.initEngine = function () { - this._view = new View(new DefaultRenderer()); - //setup the camera for optimal shadow rendering - this._view.camera.projection.far = 2100; - //setup controller to be used on the camera - this._cameraController = new HoverController(this._view.camera, null, 45, 20, 1000, 10); - }; - /** - * Initialise the listeners - */ - BillboardTest.prototype.initListeners = function () { - var _this = this; - document.onmousedown = function (event) { return _this.onMouseDown(event); }; - document.onmouseup = function (event) { return _this.onMouseUp(event); }; - document.onmousemove = function (event) { return _this.onMouseMove(event); }; - window.onresize = function (event) { return _this.onResize(event); }; - this.onResize(); - this._timer = new RequestAnimationFrame(this.onEnterFrame, this); - this._timer.start(); - }; - /** - * start loading our texture - */ - BillboardTest.prototype.loadTexture = function () { - var _this = this; - AssetLibrary.addEventListener(LoaderEvent.RESOURCE_COMPLETE, function (event) { return _this.onResourceComplete(event); }); - AssetLibrary.load(new URLRequest("assets/130909wall_big.png")); - }; - /** - * Navigation and render loop - */ - BillboardTest.prototype.onEnterFrame = function (dt) { - this._time += dt; - this._view.render(); - }; - /** - * Listener function for resource complete event on asset library - */ - BillboardTest.prototype.onResourceComplete = function (event) { - var assets = event.assets; - var length = assets.length; - for (var c = 0; c < length; c++) { - var asset = assets[c]; - switch (event.url) { - case "assets/130909wall_big.png": - var material = new TriangleMethodMaterial(); - material.texture = AssetLibrary.getAsset(asset.name); - var s; - s = new Billboard(material); - s.pivot = new Vector3D(150, 150, 0); - s.width = 300; - s.height = 300; - //s.rotationX = 45; - s.orientationMode = OrientationMode.CAMERA_PLANE; - s.alignmentMode = AlignmentMode.PIVOT_POINT; - this._view.scene.addChild(s); - for (var c = 0; c < 100; c++) { - var size = this.getRandom(5, 50); - s = new Billboard(material); - s.pivot = new Vector3D(size / 2, size / 2, 0); - s.width = size; - s.height = size; - s.orientationMode = OrientationMode.CAMERA_PLANE; - s.alignmentMode = AlignmentMode.PIVOT_POINT; - s.x = this.getRandom(-400, 400); - s.y = this.getRandom(-400, 400); - s.z = this.getRandom(-400, 400); - this._view.scene.addChild(s); - } - this._timer.start(); - break; - } - } - }; - /** - * Mouse down listener for navigation - */ - BillboardTest.prototype.onMouseDown = function (event) { - this._lastPanAngle = this._cameraController.panAngle; - this._lastTiltAngle = this._cameraController.tiltAngle; - this._lastMouseX = event.clientX; - this._lastMouseY = event.clientY; - this._move = true; - }; - /** - * Mouse up listener for navigation - */ - BillboardTest.prototype.onMouseUp = function (event) { - this._move = false; - }; - /** - * - * @param event - */ - BillboardTest.prototype.onMouseMove = function (event) { - if (this._move) { - this._cameraController.panAngle = 0.3 * (event.clientX - this._lastMouseX) + this._lastPanAngle; - this._cameraController.tiltAngle = 0.3 * (event.clientY - this._lastMouseY) + this._lastTiltAngle; - } - }; - /** - * stage listener for resize events - */ - BillboardTest.prototype.onResize = function (event) { - if (event === void 0) { event = null; } - this._view.y = 0; - this._view.x = 0; - this._view.width = window.innerWidth; - this._view.height = window.innerHeight; - }; - /** - * Util function - getRandom Number - */ - BillboardTest.prototype.getRandom = function (min, max) { - return Math.random() * (max - min) + min; - }; - return BillboardTest; -})(); - -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImVudGl0aWVzL2JpbGxib2FyZHRlc3QudHMiXSwibmFtZX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FBhbkFuZ2xlO1xuXHRcdFx0dGhpcy5fY2FtZXJhQ29udHJvbGxlci50aWx0QW5nbGUgPSAwLjMqKGV2ZW50LmNsaWVudFkgLSB0aGlzLl9sYXN0TW91c2VZKSArIHRoaXMuX2xhc3RUaWx0QW5nbGU7XG5cdFx0fVxuXHR9XG5cblx0LyoqXG5cdCAqIHN0YWdlIGxpc3RlbmVyIGZvciByZXNpemUgZXZlbnRzXG5cdCAqL1xuXHRwcml2YXRlIG9uUmVzaXplKGV2ZW50OlVJRXZlbnQgPSBudWxsKTp2b2lkXG5cdHtcblx0XHR0aGlzLl92aWV3LnkgPSAwO1xuXHRcdHRoaXMuX3ZpZXcueCA9IDA7XG5cdFx0dGhpcy5fdmlldy53aWR0aCA9IHdpbmRvdy5pbm5lcldpZHRoO1xuXHRcdHRoaXMuX3ZpZXcuaGVpZ2h0ID0gd2luZG93LmlubmVySGVpZ2h0O1xuXHR9XG5cblx0LyoqXG5cdCAqIFV0aWwgZnVuY3Rpb24gLSBnZXRSYW5kb20gTnVtYmVyXG5cdCAqL1xuXHRwcml2YXRlIGdldFJhbmRvbShtaW46bnVtYmVyLCBtYXg6bnVtYmVyKTpudW1iZXJcblx0e1xuXHRcdHJldHVybiBNYXRoLnJhbmRvbSgpKihtYXggLSBtaW4pICsgbWluO1xuXHR9XG59Il19 \ No newline at end of file diff --git a/tests/entities/BillboardTest.ts b/tests/entities/BillboardTest.ts deleted file mode 100644 index b0e759f6..00000000 --- a/tests/entities/BillboardTest.ts +++ /dev/null @@ -1,201 +0,0 @@ -import View = require("awayjs-core/lib/containers/View"); -import HoverController = require("awayjs-core/lib/controllers/HoverController"); -import AlignmentMode = require("awayjs-core/lib/core/base/AlignmentMode"); -import OrientationMode = require("awayjs-core/lib/core/base/OrientationMode"); -import Vector3D = require("awayjs-core/lib/core/geom/Vector3D"); -import AssetLibrary = require("awayjs-core/lib/core/library/AssetLibrary"); -import IAsset = require("awayjs-core/lib/core/library/IAsset"); -import URLLoader = require("awayjs-core/lib/core/net/URLLoader"); -import URLRequest = require("awayjs-core/lib/core/net/URLRequest"); -import Billboard = require("awayjs-core/lib/entities/Billboard"); -import Mesh = require("awayjs-core/lib/entities/Mesh"); -import LoaderEvent = require("awayjs-core/lib/events/LoaderEvent"); -import Texture2DBase = require("awayjs-core/lib/textures/Texture2DBase"); -import RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); - -import DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -import TriangleMethodMaterial = require("awayjs-stagegl/lib/materials/TriangleMethodMaterial"); - -class BillboardTest -{ - //engine variables - private _view:View; - private _cameraController:HoverController; - - //navigation variables - private _timer:RequestAnimationFrame; - private _time:number = 0; - private _move:boolean = false; - private _lastPanAngle:number; - private _lastTiltAngle:number; - private _lastMouseX:number; - private _lastMouseY:number; - - /** - * Constructor - */ - constructor() - { - this.init(); - } - - /** - * Global initialise function - */ - private init():void - { - this.initEngine(); - this.initListeners(); - this.loadTexture(); - } - - /** - * Initialise the engine - */ - private initEngine():void - { - this._view = new View(new DefaultRenderer()); - - //setup the camera for optimal shadow rendering - this._view.camera.projection.far = 2100; - - //setup controller to be used on the camera - this._cameraController = new HoverController(this._view.camera, null, 45, 20, 1000, 10); - } - - /** - * Initialise the listeners - */ - private initListeners():void - { - document.onmousedown = (event:MouseEvent) => this.onMouseDown(event); - document.onmouseup = (event:MouseEvent) => this.onMouseUp(event); - document.onmousemove = (event:MouseEvent) => this.onMouseMove(event); - - window.onresize = (event:UIEvent) => this.onResize(event); - - this.onResize(); - - this._timer = new RequestAnimationFrame(this.onEnterFrame, this); - this._timer.start(); - } - - /** - * start loading our texture - */ - private loadTexture():void - { - AssetLibrary.addEventListener(LoaderEvent.RESOURCE_COMPLETE, (event:LoaderEvent) => this.onResourceComplete(event)); - AssetLibrary.load(new URLRequest("assets/130909wall_big.png")); - } - - /** - * Navigation and render loop - */ - private onEnterFrame(dt:number):void - { - this._time += dt; - - this._view.render(); - } - - /** - * Listener function for resource complete event on asset library - */ - private onResourceComplete(event:LoaderEvent) - { - var assets:Array = event.assets; - var length:number = assets.length; - - for (var c:number = 0; c < length; c ++) { - var asset:IAsset = assets[c]; - - switch(event.url) { - - case "assets/130909wall_big.png": - - var material:TriangleMethodMaterial = new TriangleMethodMaterial(); - material.texture = AssetLibrary.getAsset(asset.name); - - var s:Billboard; - s = new Billboard(material); - s.pivot = new Vector3D(150, 150, 0); - s.width = 300; - s.height = 300; - //s.rotationX = 45; - s.orientationMode = OrientationMode.CAMERA_PLANE; - s.alignmentMode = AlignmentMode.PIVOT_POINT; - - this._view.scene.addChild(s); - - for (var c:number = 0; c < 100; c ++) { - var size:number = this.getRandom(5 , 50); - s = new Billboard(material); - s.pivot = new Vector3D(size/2, size/2, 0); - s.width = size; - s.height = size; - s.orientationMode = OrientationMode.CAMERA_PLANE; - s.alignmentMode = AlignmentMode.PIVOT_POINT; - s.x = this.getRandom(-400 , 400); - s.y = this.getRandom(-400 , 400); - s.z = this.getRandom(-400 , 400); - this._view.scene.addChild(s); - } - - this._timer.start(); - break; - } - } - } - - /** - * Mouse down listener for navigation - */ - private onMouseDown(event:MouseEvent):void - { - this._lastPanAngle = this._cameraController.panAngle; - this._lastTiltAngle = this._cameraController.tiltAngle; - this._lastMouseX = event.clientX; - this._lastMouseY = event.clientY; - this._move = true; - } - - /** - * Mouse up listener for navigation - */ - private onMouseUp(event:MouseEvent):void - { - this._move = false; - } - - /** - * - * @param event - */ - private onMouseMove(event:MouseEvent) - { - if (this._move) { - this._cameraController.panAngle = 0.3*(event.clientX - this._lastMouseX) + this._lastPanAngle; - this._cameraController.tiltAngle = 0.3*(event.clientY - this._lastMouseY) + this._lastTiltAngle; - } - } - - /** - * stage listener for resize events - */ - private onResize(event:UIEvent = null):void - { - this._view.y = 0; - this._view.x = 0; - this._view.width = window.innerWidth; - this._view.height = window.innerHeight; - } - - /** - * Util function - getRandom Number - */ - private getRandom(min:number, max:number):number - { - return Math.random()*(max - min) + min; - } -} \ No newline at end of file diff --git a/tests/entities/LayoutTest.js b/tests/entities/LayoutTest.js deleted file mode 100755 index 8add1151..00000000 --- a/tests/entities/LayoutTest.js +++ /dev/null @@ -1,105 +0,0 @@ -var View = require("awayjs-core/lib/containers/View"); -var HoverController = require("awayjs-core/lib/controllers/HoverController"); -var AssetLibrary = require("awayjs-core/lib/core/library/AssetLibrary"); -var URLRequest = require("awayjs-core/lib/core/net/URLRequest"); -var Billboard = require("awayjs-core/lib/entities/Billboard"); -var LoaderEvent = require("awayjs-core/lib/events/LoaderEvent"); -var AwayMouseEvent = require("awayjs-core/lib/events/MouseEvent"); -var CoordinateSystem = require("awayjs-core/lib/projections/CoordinateSystem"); -var RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); -var DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -var TriangleMethodMaterial = require("awayjs-stagegl/lib/materials/TriangleMethodMaterial"); -var LayoutTest = (function () { - function LayoutTest() { - var _this = this; - this._move = false; - this._billboards = new Array(); - //listen for a resource complete event - AssetLibrary.addEventListener(LoaderEvent.RESOURCE_COMPLETE, function (event) { return _this.onResourceComplete(event); }); - //load an image - AssetLibrary.load(new URLRequest('assets/256x256.png')); - } - /** - * Listener for resource complete event - * - * @param event - */ - LayoutTest.prototype.onResourceComplete = function (event) { - var _this = this; - //get the image texture - this._imageTexture = event.assets[0]; - //create the view - this._view = new View(new DefaultRenderer()); - this._projection = this._view.camera.projection; - this._projection.coordinateSystem = CoordinateSystem.RIGHT_HANDED; - this._projection.focalLength = 1000; - this._projection.preserveFocalLength = true; - this._projection.originX = 0; - this._projection.originY = 0; - //create a bitmap material - this._bitmapMaterial = new TriangleMethodMaterial(this._imageTexture); - var billboard; - var numHBillboards = 2; - var numVBillboards = 2; - for (var i = 0; i < numHBillboards; i++) { - for (var j = 0; j < numVBillboards; j++) { - billboard = new Billboard(this._bitmapMaterial); - //billboard.width = 50; - //billboard.height = 50; - //billboard.pivot = new Vector3D(billboard.billboardWidth/2, billboard.billboardHeight/2, 0); - billboard.x = j * 300; - billboard.y = i * 300; - billboard.z = 0; - billboard.addEventListener(AwayMouseEvent.MOUSE_MOVE, this.onMouseEvent); - //billboard.orientationMode = away.base.OrientationMode.CAMERA_PLANE; - //billboard.alignmentMode = away.base.AlignmentMode.PIVOT_POINT; - this._billboards.push(billboard); - //add billboard to the scene - this._view.scene.addChild(billboard); - } - } - this._hoverControl = new HoverController(this._view.camera, null, 180, 0, 1000); - document.onmousedown = function (event) { return _this.onMouseDownHandler(event); }; - document.onmouseup = function (event) { return _this.onMouseUpHandler(event); }; - document.onmousemove = function (event) { return _this.onMouseMove(event); }; - window.onresize = function (event) { return _this.onResize(event); }; - //trigger an initial resize for the view - this.onResize(null); - //setup the RAF for a render listener - this._timer = new RequestAnimationFrame(this.render, this); - this._timer.start(); - }; - LayoutTest.prototype.onMouseEvent = function (event) { - console.log(event); - }; - LayoutTest.prototype.onResize = function (event) { - this._view.x = 0; - this._view.y = 0; - this._view.width = window.innerWidth; - this._view.height = window.innerHeight; - }; - LayoutTest.prototype.render = function (dt) { - for (var i = 0; i < this._billboards.length; i++) { - } - this._view.render(); - }; - LayoutTest.prototype.onMouseUpHandler = function (event) { - this._move = false; - }; - LayoutTest.prototype.onMouseMove = function (event) { - if (this._move) { - this._hoverControl.panAngle = 0.3 * (event.clientX - this._lastMouseX) + this._lastPanAngle; - this._hoverControl.tiltAngle = -0.3 * (event.clientY - this._lastMouseY) + this._lastTiltAngle; - } - }; - LayoutTest.prototype.onMouseDownHandler = function (event) { - this._lastPanAngle = this._hoverControl.panAngle; - this._lastTiltAngle = this._hoverControl.tiltAngle; - this._lastMouseX = event.clientX; - this._lastMouseY = event.clientY; - this._move = true; - }; - return LayoutTest; -})(); - -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImVudGl0aWVzL2xheW91dHRlc3QudHMiXSwibmFtZXMiOlsiTGF5b3V0VGVzdCIsIkxhe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hbkFuZ2xlID0gMC4zKihldmVudC5jbGllbnRYIC0gdGhpcy5fbGFzdE1vdXNlWCkgKyB0aGlzLl9sYXN0UGFuQW5nbGU7XG5cdFx0XHR0aGlzLl9ob3ZlckNvbnRyb2wudGlsdEFuZ2xlID0gLTAuMyooZXZlbnQuY2xpZW50WSAtIHRoaXMuX2xhc3RNb3VzZVkpICsgdGhpcy5fbGFzdFRpbHRBbmdsZTtcblx0XHR9XG5cdH1cblxuXHRwcml2YXRlIG9uTW91c2VEb3duSGFuZGxlcihldmVudDpNb3VzZUV2ZW50KVxuXHR7XG5cdFx0dGhpcy5fbGFzdFBhbkFuZ2xlID0gdGhpcy5faG92ZXJDb250cm9sLnBhbkFuZ2xlO1xuXHRcdHRoaXMuX2xhc3RUaWx0QW5nbGUgPSB0aGlzLl9ob3ZlckNvbnRyb2wudGlsdEFuZ2xlO1xuXHRcdHRoaXMuX2xhc3RNb3VzZVggPSBldmVudC5jbGllbnRYO1xuXHRcdHRoaXMuX2xhc3RNb3VzZVkgPSBldmVudC5jbGllbnRZO1xuXHRcdHRoaXMuX21vdmUgPSB0cnVlO1xuXHR9XG59Il19 \ No newline at end of file diff --git a/tests/entities/LayoutTest.ts b/tests/entities/LayoutTest.ts deleted file mode 100644 index 75ce0790..00000000 --- a/tests/entities/LayoutTest.ts +++ /dev/null @@ -1,151 +0,0 @@ -import View = require("awayjs-core/lib/containers/View"); -import HoverController = require("awayjs-core/lib/controllers/HoverController"); -import Vector3D = require("awayjs-core/lib/core/geom/Vector3D"); -import AssetLibrary = require("awayjs-core/lib/core/library/AssetLibrary"); -import URLLoader = require("awayjs-core/lib/core/net/URLLoader"); -import URLRequest = require("awayjs-core/lib/core/net/URLRequest"); -import Billboard = require("awayjs-core/lib/entities/Billboard"); -import Mesh = require("awayjs-core/lib/entities/Mesh"); -import LoaderEvent = require("awayjs-core/lib/events/LoaderEvent"); -import AwayMouseEvent = require("awayjs-core/lib/events/MouseEvent"); -import CoordinateSystem = require("awayjs-core/lib/projections/CoordinateSystem"); -import PerspectiveProjection = require("awayjs-core/lib/projections/PerspectiveProjection"); -import ImageTexture = require("awayjs-core/lib/textures/ImageTexture"); -import RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); - -import DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -import TriangleMethodMaterial = require("awayjs-stagegl/lib/materials/TriangleMethodMaterial"); - -class LayoutTest -{ - private _view:View; - private _projection:PerspectiveProjection; - private _timer:RequestAnimationFrame; - private _hoverControl:HoverController; - - private _move:boolean = false; - private _lastPanAngle:number; - private _lastTiltAngle:number; - private _lastMouseX:number; - private _lastMouseY:number; - - private _imageTexture:ImageTexture; - private _bitmapMaterial:TriangleMethodMaterial; - private _billboards:Array = new Array(); - - constructor() - { - //listen for a resource complete event - AssetLibrary.addEventListener(LoaderEvent.RESOURCE_COMPLETE , (event:LoaderEvent) => this.onResourceComplete(event)); - - //load an image - AssetLibrary.load(new URLRequest('assets/256x256.png') ); - } - - /** - * Listener for resource complete event - * - * @param event - */ - private onResourceComplete(event:LoaderEvent) - { - //get the image texture - this._imageTexture = event.assets[0]; - - //create the view - this._view = new View(new DefaultRenderer()); - - this._projection = this._view.camera.projection; - - - this._projection.coordinateSystem = CoordinateSystem.RIGHT_HANDED; - this._projection.focalLength = 1000; - this._projection.preserveFocalLength = true; - this._projection.originX = 0; - this._projection.originY = 0; - - //create a bitmap material - this._bitmapMaterial = new TriangleMethodMaterial(this._imageTexture); - - var billboard:Billboard; - var numHBillboards:number = 2; - var numVBillboards:number = 2; - for (var i:number = 0; i < numHBillboards; i++) { - for (var j:number = 0; j < numVBillboards; j++) { - billboard = new Billboard(this._bitmapMaterial); - //billboard.width = 50; - //billboard.height = 50; - //billboard.pivot = new Vector3D(billboard.billboardWidth/2, billboard.billboardHeight/2, 0); - billboard.x = j*300; - billboard.y = i*300; - billboard.z = 0; - billboard.addEventListener(AwayMouseEvent.MOUSE_MOVE, this.onMouseEvent) - //billboard.orientationMode = away.base.OrientationMode.CAMERA_PLANE; - //billboard.alignmentMode = away.base.AlignmentMode.PIVOT_POINT; - this._billboards.push(billboard); - //add billboard to the scene - this._view.scene.addChild(billboard); - } - } - - this._hoverControl = new HoverController(this._view.camera, null, 180, 0, 1000); - - document.onmousedown = (event:MouseEvent) => this.onMouseDownHandler(event); - document.onmouseup = (event:MouseEvent) => this.onMouseUpHandler(event); - document.onmousemove = (event:MouseEvent) => this.onMouseMove(event); - - window.onresize = (event:UIEvent) => this.onResize(event); - - //trigger an initial resize for the view - this.onResize(null); - - //setup the RAF for a render listener - this._timer = new RequestAnimationFrame(this.render, this); - this._timer.start(); - } - - private onMouseEvent(event:AwayMouseEvent) - { - console.log(event); - } - - private onResize(event:UIEvent) - { - this._view.x = 0; - this._view.y = 0; - this._view.width = window.innerWidth; - this._view.height = window.innerHeight; - } - - private render(dt:number) - { - for (var i:number = 0; i < this._billboards.length; i++) { - //this._billboards[i].rotationZ +=2; - } - - this._view.render(); - - } - - private onMouseUpHandler(event:MouseEvent) - { - this._move = false; - } - - private onMouseMove(event:MouseEvent) - { - if (this._move) { - this._hoverControl.panAngle = 0.3*(event.clientX - this._lastMouseX) + this._lastPanAngle; - this._hoverControl.tiltAngle = -0.3*(event.clientY - this._lastMouseY) + this._lastTiltAngle; - } - } - - private onMouseDownHandler(event:MouseEvent) - { - this._lastPanAngle = this._hoverControl.panAngle; - this._lastTiltAngle = this._hoverControl.tiltAngle; - this._lastMouseX = event.clientX; - this._lastMouseY = event.clientY; - this._move = true; - } -} \ No newline at end of file diff --git a/tests/frame.html b/tests/frame.html deleted file mode 100755 index 9ba0db00..00000000 --- a/tests/frame.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/index.html b/tests/index.html deleted file mode 100755 index afbcfacb..00000000 --- a/tests/index.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/lights/TorusLight.js b/tests/lights/TorusLight.js deleted file mode 100755 index 8dcb410d..00000000 --- a/tests/lights/TorusLight.js +++ /dev/null @@ -1,75 +0,0 @@ -var View = require("awayjs-core/lib/containers/View"); -var Vector3D = require("awayjs-core/lib/core/geom/Vector3D"); -var URLLoader = require("awayjs-core/lib/core/net/URLLoader"); -var URLLoaderDataFormat = require("awayjs-core/lib/core/net/URLLoaderDataFormat"); -var URLRequest = require("awayjs-core/lib/core/net/URLRequest"); -var DirectionalLight = require("awayjs-core/lib/entities/DirectionalLight"); -var AwayEvent = require("awayjs-core/lib/events/Event"); -var StaticLightPicker = require("awayjs-core/lib/materials/lightpickers/StaticLightPicker"); -var ParserUtils = require("awayjs-core/lib/parsers/ParserUtils"); -var PerspectiveProjection = require("awayjs-core/lib/projections/PerspectiveProjection"); -var PrimitiveTorusPrefab = require("awayjs-core/lib/prefabs/PrimitiveTorusPrefab"); -var ImageTexture = require("awayjs-core/lib/textures/ImageTexture"); -var RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); -var Debug = require("awayjs-core/lib/utils/Debug"); -var DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -var TriangleMethodMaterial = require("awayjs-stagegl/lib/materials/TriangleMethodMaterial"); -var TorusLight = (function () { - function TorusLight() { - Debug.THROW_ERRORS = false; - Debug.ENABLE_LOG = false; - Debug.LOG_PI_ERRORS = false; - this._view = new View(new DefaultRenderer()); - this._view.camera.projection = new PerspectiveProjection(60); - this._torus = new PrimitiveTorusPrefab(220, 80, 32, 16, false); - this.loadResources(); - } - TorusLight.prototype.loadResources = function () { - var _this = this; - var urlRequest = new URLRequest("assets/dots.png"); - var urlLoader = new URLLoader(); - urlLoader.dataFormat = URLLoaderDataFormat.BLOB; - urlLoader.addEventListener(AwayEvent.COMPLETE, function (event) { return _this.imageCompleteHandler(event); }); - urlLoader.load(urlRequest); - }; - TorusLight.prototype.imageCompleteHandler = function (event) { - var _this = this; - var imageLoader = event.target; - this._image = ParserUtils.blobToImage(imageLoader.data); - this._image.onload = function (event) { return _this.onLoadComplete(event); }; - }; - TorusLight.prototype.onLoadComplete = function (event) { - var _this = this; - var ts = new ImageTexture(this._image, false); - var light = new DirectionalLight(); - light.direction = new Vector3D(0, 0, 1); - light.diffuse = .7; - light.specular = 1; - this._view.scene.addChild(light); - var lightPicker = new StaticLightPicker([light]); - var matTx = new TriangleMethodMaterial(ts, true, true, false); - matTx.lightPicker = lightPicker; - this._torus.material = matTx; - this._mesh = this._torus.getNewObject(); - this._view.scene.addChild(this._mesh); - this._raf = new RequestAnimationFrame(this.render, this); - this._raf.start(); - window.onresize = function (event) { return _this.resize(event); }; - this.resize(); - }; - TorusLight.prototype.render = function (dt) { - if (dt === void 0) { dt = null; } - this._mesh.rotationY += 1; - this._view.render(); - }; - TorusLight.prototype.resize = function (event) { - if (event === void 0) { event = null; } - this._view.y = 0; - this._view.x = 0; - this._view.width = window.innerWidth; - this._view.height = window.innerHeight; - }; - return TorusLight; -})(); - -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpZ2h0cy90b3J1c2xpZ2h0LnRzIl0sIm5hbWVzIjpbIlRvcnVzTGlnaHQiLCJUb3J1c0xpZ2h0LmNvbnN0cnVjdG9yIiwiVG9ydXNMaWdodC5sb2FkUmVzb3VyY2VzIiwiVG9ydXNMaWdodC5pbWFnZUNvbXBsZXRlSGFuZGxlciIsIlRvcnVzTGlnaHQub25Mb2FkQ29tcGxldGUiLCJUb3J1c0xpZ2h0LnJlbmRlciIsIlRvcnVzTGlnaHQucmVzaXplIl0sIm1hcHBpbmdzIjoiQUFBQSxJQUFPLElBQUksV0FBaUIsaUNBQWlDLENBQUMsQ0FBQztBQUMvRCxJQUFPLFFBQVEsV0FBZ0Isb0NBQW9DLENBQUMsQ0FBQztBQUNyRSxJQUFPLFNBQVMsV0FBZSxvQ0FBb0MsQ0FBQyxDQUFDO0FBQ3JFLElBQU8sbUJBQW1CLFdBQ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b25ZICs9IDE7XG5cdFx0dGhpcy5fdmlldy5yZW5kZXIoKTtcblx0fVxuXG5cblx0cHVibGljIHJlc2l6ZShldmVudDpVSUV2ZW50ID0gbnVsbClcblx0e1xuXHRcdHRoaXMuX3ZpZXcueSA9IDA7XG5cdFx0dGhpcy5fdmlldy54ID0gMDtcblxuXHRcdHRoaXMuX3ZpZXcud2lkdGggPSB3aW5kb3cuaW5uZXJXaWR0aDtcblx0XHR0aGlzLl92aWV3LmhlaWdodCA9IHdpbmRvdy5pbm5lckhlaWdodDtcblx0fVxufSJdfQ== \ No newline at end of file diff --git a/tests/lights/TorusLight.ts b/tests/lights/TorusLight.ts deleted file mode 100644 index 1791ef6f..00000000 --- a/tests/lights/TorusLight.ts +++ /dev/null @@ -1,105 +0,0 @@ -import View = require("awayjs-core/lib/containers/View"); -import Vector3D = require("awayjs-core/lib/core/geom/Vector3D"); -import URLLoader = require("awayjs-core/lib/core/net/URLLoader"); -import URLLoaderDataFormat = require("awayjs-core/lib/core/net/URLLoaderDataFormat"); -import URLRequest = require("awayjs-core/lib/core/net/URLRequest"); -import Mesh = require("awayjs-core/lib/entities/Mesh"); -import DirectionalLight = require("awayjs-core/lib/entities/DirectionalLight"); -import AwayEvent = require("awayjs-core/lib/events/Event"); -import StaticLightPicker = require("awayjs-core/lib/materials/lightpickers/StaticLightPicker"); -import ParserUtils = require("awayjs-core/lib/parsers/ParserUtils"); -import PerspectiveProjection = require("awayjs-core/lib/projections/PerspectiveProjection"); -import PrimitiveTorusPrefab = require("awayjs-core/lib/prefabs/PrimitiveTorusPrefab"); -import ImageTexture = require("awayjs-core/lib/textures/ImageTexture"); -import RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); -import Debug = require("awayjs-core/lib/utils/Debug"); - -import DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -import TriangleMethodMaterial = require("awayjs-stagegl/lib/materials/TriangleMethodMaterial"); - -class TorusLight -{ - private _view:View; - private _torus:PrimitiveTorusPrefab; - private _mesh:Mesh; - private _raf:RequestAnimationFrame; - private _image:HTMLImageElement; - - constructor() - { - Debug.THROW_ERRORS = false; - Debug.ENABLE_LOG = false; - Debug.LOG_PI_ERRORS = false; - - this._view = new View(new DefaultRenderer()); - this._view.camera.projection = new PerspectiveProjection(60); - this._torus = new PrimitiveTorusPrefab(220, 80, 32, 16, false); - - this.loadResources(); - } - - private loadResources() - { - var urlRequest:URLRequest = new URLRequest("assets/dots.png"); - - var urlLoader:URLLoader = new URLLoader(); - urlLoader.dataFormat = URLLoaderDataFormat.BLOB; - urlLoader.addEventListener(AwayEvent.COMPLETE, (event:AwayEvent) => this.imageCompleteHandler(event)); - urlLoader.load(urlRequest); - } - - private imageCompleteHandler(event:AwayEvent) - { - var imageLoader:URLLoader = event.target; - - this._image = ParserUtils.blobToImage(imageLoader.data); - this._image.onload = (event:Event) => this.onLoadComplete(event); - } - - private onLoadComplete(event:Event) - { - var ts:ImageTexture = new ImageTexture(this._image, false); - - var light:DirectionalLight = new DirectionalLight(); - light.direction = new Vector3D(0, 0, 1); - light.diffuse = .7; - light.specular = 1; - - this._view.scene.addChild(light); - - var lightPicker:StaticLightPicker = new StaticLightPicker([light]); - - var matTx:TriangleMethodMaterial = new TriangleMethodMaterial(ts, true, true, false); - matTx.lightPicker = lightPicker; - - this._torus.material = matTx; - - this._mesh = this._torus.getNewObject(); - - this._view.scene.addChild(this._mesh); - - this._raf = new RequestAnimationFrame(this.render , this); - this._raf.start(); - - window.onresize = (event:UIEvent) => this.resize(event); - - this.resize(); - } - - - public render(dt:number = null):void - { - this._mesh.rotationY += 1; - this._view.render(); - } - - - public resize(event:UIEvent = null) - { - this._view.y = 0; - this._view.x = 0; - - this._view.width = window.innerWidth; - this._view.height = window.innerHeight; - } -} \ No newline at end of file diff --git a/tests/materials/ColorMultiPassMatTest.js b/tests/materials/ColorMultiPassMatTest.js deleted file mode 100755 index b0191283..00000000 --- a/tests/materials/ColorMultiPassMatTest.js +++ /dev/null @@ -1,64 +0,0 @@ -var View = require("awayjs-core/lib/containers/View"); -var Vector3D = require("awayjs-core/lib/core/geom/Vector3D"); -var PointLight = require("awayjs-core/lib/entities/PointLight"); -var StaticLightPicker = require("awayjs-core/lib/materials/lightpickers/StaticLightPicker"); -var PrimitiveTorusPrefab = require("awayjs-core/lib/prefabs/PrimitiveTorusPrefab"); -var RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); -var Debug = require("awayjs-core/lib/utils/Debug"); -var DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -var TriangleMethodMaterial = require("awayjs-stagegl/lib/materials/TriangleMethodMaterial"); -var ColorMultiPassMatTest = (function () { - function ColorMultiPassMatTest() { - var _this = this; - this.counter = 0; - this.center = new Vector3D(); - Debug.THROW_ERRORS = false; - Debug.LOG_PI_ERRORS = false; - this.light = new PointLight(); - this.view = new View(new DefaultRenderer()); - this.view.camera.z = -1000; - this.view.backgroundColor = 0x000000; - this.torus = new PrimitiveTorusPrefab(50, 10, 32, 32, false); - var l = 20; - var radius = 500; - var mat = new TriangleMethodMaterial(0xff0000); - mat.lightPicker = new StaticLightPicker([this.light]); - this.torus.material = mat; - for (var c = 0; c < l; c++) { - var t = Math.PI * 2 * c / l; - var m = this.torus.getNewObject(); - m.x = Math.cos(t) * radius; - m.y = 0; - m.z = Math.sin(t) * radius; - this.view.scene.addChild(m); - } - this.view.scene.addChild(this.light); - this.view.y = this.view.x = 0; - this.view.width = window.innerWidth; - this.view.height = window.innerHeight; - console.log("renderer ", this.view.renderer); - console.log("scene ", this.view.scene); - console.log("view ", this.view); - this.view.render(); - window.onresize = function (event) { return _this.onResize(event); }; - this.raf = new RequestAnimationFrame(this.tick, this); - this.raf.start(); - } - ColorMultiPassMatTest.prototype.tick = function (dt) { - this.counter += 0.005; - this.view.camera.lookAt(this.center); - this.view.camera.x = Math.cos(this.counter) * 800; - this.view.camera.z = Math.sin(this.counter) * 800; - this.view.render(); - }; - ColorMultiPassMatTest.prototype.onResize = function (event) { - if (event === void 0) { event = null; } - this.view.y = 0; - this.view.x = 0; - this.view.width = window.innerWidth; - this.view.height = window.innerHeight; - }; - return ColorMultiPassMatTest; -})(); - -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm1hdGVyaWFscy9jb2xvcm11bHRpcGFzc21hdHRlc3QudHMiXSwibmFtZXMiOlsiQ29sb3JNdWx0aVBhc3NNYXRUZXN0IiwiQ29sb3JNdWx0aVBhc3NNYXRUZXN0LmNvbnN0cnVjdG9yIiwiQ29sb3JNdWx0aVBhc3NNYXRUZXN0LnRpY2siLCJDb2xvck11bHRpUGFzc01hdFRlc3Qub25SZXNpemUiXSwibWFwcGluZ3MiOiJBQUFBLElBQU8sSUFBSSxXQUFpQixpQ0FBaUMsQ0FBQyxDQUFDO0FBQy9ELElBQU8sUUFBUSxXQUFnQixvQ0FBb0MsQ0FBQyxDQUFDO0FBSXJFLElBQU8sVUFBVSxXQUFlLHFDQUFxQyxDQUFDLENBQUM7QUFFdkUsSUFBTyxpQkFBaUIsV0FBYSwwREFBMEQsQ0FBQyxDQUFDO0FBQ2pHLElBQU8sb0JBQW9CLFdBQWEsOENBQThDLENBQUMsQ0FBQztBQUN4RixJQUFPLHFCQUFxQixXQUFZLDZDQUE2QyxDQUFDLENBQUM7QUFDdkYsSUFBTyxLQUFLLFdBQWdCLDZCQUE2QixDQUFDLENBQUM7QUFFM0QsSUFBTyxlQUFlLFdBQWMsZ0RBQWdELENBQUMsQ0FBQztBQUN0RixJQUFPLHNCQUFzQixXQUFZLHFEQUFxRCxDQUFDLENBQUM7QUFFaEcsSUFBTSxxQkFBcUI7SUFTMUJBLFNBVEtBLHFCQUFxQkE7UUFBM0JDLGlCQTRFQ0E7UUF0RVFBLFlBQU9BLEdBQVVBLENBQUNBLENBQUNBO1FBQ25CQSxXQUFNQSxHQUFZQSxJQUFJQSxRQUFRQSxFQUFFQSxDQUFDQTtRQUl4Q0E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jb25zb2xlLmxvZyhcInJlbmRlcmVyIFwiLCB0aGlzLnZpZXcucmVuZGVyZXIpO1xuXHRcdGNvbnNvbGUubG9nKFwic2NlbmUgXCIsIHRoaXMudmlldy5zY2VuZSk7XG5cdFx0Y29uc29sZS5sb2coXCJ2aWV3IFwiLCB0aGlzLnZpZXcpO1xuXG5cdFx0dGhpcy52aWV3LnJlbmRlcigpO1xuXG5cdFx0d2luZG93Lm9ucmVzaXplID0gKGV2ZW50OlVJRXZlbnQpID0+IHRoaXMub25SZXNpemUoZXZlbnQpO1xuXG5cdFx0dGhpcy5yYWYgPSBuZXcgUmVxdWVzdEFuaW1hdGlvbkZyYW1lKHRoaXMudGljaywgdGhpcyk7XG5cdFx0dGhpcy5yYWYuc3RhcnQoKTtcblx0fVxuXG5cblx0cHJpdmF0ZSB0aWNrKGR0Om51bWJlcilcblx0e1xuXHRcdHRoaXMuY291bnRlciArPSAwLjAwNTtcblx0XHR0aGlzLnZpZXcuY2FtZXJhLmxvb2tBdCh0aGlzLmNlbnRlcik7XG5cdFx0dGhpcy52aWV3LmNhbWVyYS54ID0gTWF0aC5jb3ModGhpcy5jb3VudGVyKSo4MDA7XG5cdFx0dGhpcy52aWV3LmNhbWVyYS56ID0gTWF0aC5zaW4odGhpcy5jb3VudGVyKSo4MDA7XG5cblx0XHR0aGlzLnZpZXcucmVuZGVyKCk7XG5cdH1cblxuXHRwdWJsaWMgb25SZXNpemUoZXZlbnQ6VUlFdmVudCA9IG51bGwpXG5cdHtcblx0XHR0aGlzLnZpZXcueSA9IDA7XG5cdFx0dGhpcy52aWV3LnggPSAwO1xuXHRcdHRoaXMudmlldy53aWR0aCA9IHdpbmRvdy5pbm5lcldpZHRoO1xuXHRcdHRoaXMudmlldy5oZWlnaHQgPSB3aW5kb3cuaW5uZXJIZWlnaHQ7XG5cdH1cbn0iXX0= \ No newline at end of file diff --git a/tests/materials/ColorMultiPassMatTest.ts b/tests/materials/ColorMultiPassMatTest.ts deleted file mode 100644 index 3666d107..00000000 --- a/tests/materials/ColorMultiPassMatTest.ts +++ /dev/null @@ -1,92 +0,0 @@ -import View = require("awayjs-core/lib/containers/View"); -import Vector3D = require("awayjs-core/lib/core/geom/Vector3D"); -import URLLoader = require("awayjs-core/lib/core/net/URLLoader"); -import URLRequest = require("awayjs-core/lib/core/net/URLRequest"); -import Mesh = require("awayjs-core/lib/entities/Mesh"); -import PointLight = require("awayjs-core/lib/entities/PointLight"); -import Event = require("awayjs-core/lib/events/Event"); -import StaticLightPicker = require("awayjs-core/lib/materials/lightpickers/StaticLightPicker"); -import PrimitiveTorusPrefab = require("awayjs-core/lib/prefabs/PrimitiveTorusPrefab"); -import RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); -import Debug = require("awayjs-core/lib/utils/Debug"); - -import DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -import TriangleMethodMaterial = require("awayjs-stagegl/lib/materials/TriangleMethodMaterial"); - -class ColorMultiPassMatTest -{ - private view:View; - private torus:PrimitiveTorusPrefab; - private light:PointLight; - private raf:RequestAnimationFrame; - private counter:number = 0; - private center:Vector3D = new Vector3D(); - - constructor() - { - Debug.THROW_ERRORS = false; - Debug.LOG_PI_ERRORS = false; - - this.light = new PointLight(); - this.view = new View(new DefaultRenderer()); - this.view.camera.z = -1000; - this.view.backgroundColor = 0x000000; - this.torus = new PrimitiveTorusPrefab(50 , 10, 32 , 32 , false); - - var l:number = 20; - var radius:number = 500; - - var mat:TriangleMethodMaterial = new TriangleMethodMaterial(0xff0000); - - mat.lightPicker = new StaticLightPicker([this.light]); - - this.torus.material = mat; - - for (var c:number = 0; c < l ; c++) { - var t:number = Math.PI*2*c/l; - var m:Mesh = this.torus.getNewObject(); - - m.x = Math.cos(t)*radius; - m.y = 0; - m.z = Math.sin(t)*radius; - - this.view.scene.addChild(m); - } - - this.view.scene.addChild(this.light); - - this.view.y = this.view.x = 0; - this.view.width = window.innerWidth; - this.view.height = window.innerHeight; - - console.log("renderer ", this.view.renderer); - console.log("scene ", this.view.scene); - console.log("view ", this.view); - - this.view.render(); - - window.onresize = (event:UIEvent) => this.onResize(event); - - this.raf = new RequestAnimationFrame(this.tick, this); - this.raf.start(); - } - - - private tick(dt:number) - { - this.counter += 0.005; - this.view.camera.lookAt(this.center); - this.view.camera.x = Math.cos(this.counter)*800; - this.view.camera.z = Math.sin(this.counter)*800; - - this.view.render(); - } - - public onResize(event:UIEvent = null) - { - this.view.y = 0; - this.view.x = 0; - this.view.width = window.innerWidth; - this.view.height = window.innerHeight; - } -} \ No newline at end of file diff --git a/tests/materials/TextureMultiPassMatTest.js b/tests/materials/TextureMultiPassMatTest.js deleted file mode 100755 index 3091b488..00000000 --- a/tests/materials/TextureMultiPassMatTest.js +++ /dev/null @@ -1,83 +0,0 @@ -var View = require("awayjs-core/lib/containers/View"); -var Vector3D = require("awayjs-core/lib/core/geom/Vector3D"); -var URLLoader = require("awayjs-core/lib/core/net/URLLoader"); -var URLLoaderDataFormat = require("awayjs-core/lib/core/net/URLLoaderDataFormat"); -var URLRequest = require("awayjs-core/lib/core/net/URLRequest"); -var PointLight = require("awayjs-core/lib/entities/PointLight"); -var Event = require("awayjs-core/lib/events/Event"); -var ParserUtils = require("awayjs-core/lib/parsers/ParserUtils"); -var PrimitiveTorusPrefab = require("awayjs-core/lib/prefabs/PrimitiveTorusPrefab"); -var ImageTexture = require("awayjs-core/lib/textures/ImageTexture"); -var RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); -var Debug = require("awayjs-core/lib/utils/Debug"); -var DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -var TriangleMethodMaterial = require("awayjs-stagegl/lib/materials/TriangleMethodMaterial"); -var TextureMultiPassMatTest = (function () { - function TextureMultiPassMatTest() { - var _this = this; - this.counter = 0; - this.center = new Vector3D(); - var pngURLRequest = new URLRequest('assets/256x256.png'); - this.pngLoader = new URLLoader(); - this.pngLoader.dataFormat = URLLoaderDataFormat.BLOB; - this.pngLoader.addEventListener(Event.COMPLETE, function (event) { return _this.pngLoaderComplete(event); }); - this.pngLoader.load(pngURLRequest); - } - TextureMultiPassMatTest.prototype.pngLoaderComplete = function (event) { - var _this = this; - var imageLoader = event.target; - this.image = ParserUtils.blobToImage(imageLoader.data); - this.image.onload = function (event) { return _this.onLoadComplete(event); }; - }; - TextureMultiPassMatTest.prototype.onLoadComplete = function (event) { - var _this = this; - Debug.THROW_ERRORS = false; - Debug.LOG_PI_ERRORS = false; - this.light = new PointLight(); - this.view = new View(new DefaultRenderer()); - this.view.camera.z = -1000; - this.view.backgroundColor = 0x000000; - this.torus = new PrimitiveTorusPrefab(50, 10, 32, 32, false); - var l = 20; - var radius = 500; - var ts = new ImageTexture(this.image, false); - var mat = new TriangleMethodMaterial(ts); - this.torus.material = mat; - for (var c = 0; c < l; c++) { - var t = Math.PI * 2 * c / l; - var m = this.torus.getNewObject(); - m.x = Math.cos(t) * radius; - m.y = 0; - m.z = Math.sin(t) * radius; - this.view.scene.addChild(m); - } - this.view.scene.addChild(this.light); - this.view.y = this.view.x = 0; - this.view.width = window.innerWidth; - this.view.height = window.innerHeight; - console.log("renderer ", this.view.renderer); - console.log("scene ", this.view.scene); - console.log("view ", this.view); - this.view.render(); - window.onresize = function (event) { return _this.onResize(event); }; - this.raf = new RequestAnimationFrame(this.tick, this); - this.raf.start(); - }; - TextureMultiPassMatTest.prototype.tick = function (dt) { - this.counter += 0.005; - this.view.camera.lookAt(this.center); - this.view.camera.x = Math.cos(this.counter) * 800; - this.view.camera.z = Math.sin(this.counter) * 800; - this.view.render(); - }; - TextureMultiPassMatTest.prototype.onResize = function (event) { - if (event === void 0) { event = null; } - this.view.y = 0; - this.view.x = 0; - this.view.width = window.innerWidth; - this.view.height = window.innerHeight; - }; - return TextureMultiPassMatTest; -})(); - -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm1hdGVyaWFscy90ZXh0dXJlbXVsdGlwYXNzb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V2ZW50OlVJRXZlbnQgPSBudWxsKVxuXHR7XG5cdFx0dGhpcy52aWV3LnkgPSAwO1xuXHRcdHRoaXMudmlldy54ID0gMDtcblx0XHR0aGlzLnZpZXcud2lkdGggPSB3aW5kb3cuaW5uZXJXaWR0aDtcblx0XHR0aGlzLnZpZXcuaGVpZ2h0ID0gd2luZG93LmlubmVySGVpZ2h0O1xuXHR9XG59Il19 \ No newline at end of file diff --git a/tests/materials/TextureMultiPassMatTest.ts b/tests/materials/TextureMultiPassMatTest.ts deleted file mode 100644 index 9cf06eba..00000000 --- a/tests/materials/TextureMultiPassMatTest.ts +++ /dev/null @@ -1,111 +0,0 @@ -import View = require("awayjs-core/lib/containers/View"); -import Vector3D = require("awayjs-core/lib/core/geom/Vector3D"); -import URLLoader = require("awayjs-core/lib/core/net/URLLoader"); -import URLLoaderDataFormat = require("awayjs-core/lib/core/net/URLLoaderDataFormat"); -import URLRequest = require("awayjs-core/lib/core/net/URLRequest"); -import Mesh = require("awayjs-core/lib/entities/Mesh"); -import PointLight = require("awayjs-core/lib/entities/PointLight"); -import Event = require("awayjs-core/lib/events/Event"); -import ParserUtils = require("awayjs-core/lib/parsers/ParserUtils"); -import PrimitiveTorusPrefab = require("awayjs-core/lib/prefabs/PrimitiveTorusPrefab"); -import ImageTexture = require("awayjs-core/lib/textures/ImageTexture"); -import RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); -import Debug = require("awayjs-core/lib/utils/Debug"); - -import DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -import TriangleMethodMaterial = require("awayjs-stagegl/lib/materials/TriangleMethodMaterial"); - -class TextureMultiPassMatTest -{ - private view:View; - private torus:PrimitiveTorusPrefab; - private light:PointLight; - private raf:RequestAnimationFrame; - private counter:number = 0; - private center:Vector3D = new Vector3D(); - private pngLoader : URLLoader; - private image:HTMLImageElement; - - constructor() - { - var pngURLRequest:URLRequest = new URLRequest('assets/256x256.png'); - - this.pngLoader = new URLLoader(); - this.pngLoader.dataFormat = URLLoaderDataFormat.BLOB; - this.pngLoader.addEventListener(Event.COMPLETE, (event:Event) => this.pngLoaderComplete(event)); - this.pngLoader.load(pngURLRequest); - } - - private pngLoaderComplete(event:Event) - { - var imageLoader:URLLoader = event.target; - this.image = ParserUtils.blobToImage(imageLoader.data); - this.image.onload = (event) => this.onLoadComplete(event); - } - - private onLoadComplete(event) - { - Debug.THROW_ERRORS = false; - Debug.LOG_PI_ERRORS = false; - - this.light = new PointLight(); - this.view = new View(new DefaultRenderer()); - this.view.camera.z = -1000; - this.view.backgroundColor = 0x000000; - this.torus = new PrimitiveTorusPrefab(50 , 10, 32 , 32 , false); - - var l:number = 20; - var radius:number = 500; - - var ts:ImageTexture = new ImageTexture(this.image, false); - var mat:TriangleMethodMaterial = new TriangleMethodMaterial(ts); - - this.torus.material = mat; - - for (var c:number = 0; c < l ; c++) { - var t:number = Math.PI*2*c/l; - var m:Mesh = this.torus.getNewObject(); - - m.x = Math.cos(t)*radius; - m.y = 0; - m.z = Math.sin(t)*radius; - - this.view.scene.addChild(m); - } - - this.view.scene.addChild(this.light); - - this.view.y = this.view.x = 0; - this.view.width = window.innerWidth; - this.view.height = window.innerHeight; - - console.log("renderer ", this.view.renderer); - console.log("scene ", this.view.scene); - console.log("view ", this.view); - - this.view.render(); - - window.onresize = (event:UIEvent) => this.onResize(event); - - this.raf = new RequestAnimationFrame(this.tick, this); - this.raf.start(); - } - - private tick(dt:number) - { - this.counter += 0.005; - this.view.camera.lookAt(this.center); - this.view.camera.x = Math.cos(this.counter)*800; - this.view.camera.z = Math.sin(this.counter)*800; - - this.view.render(); - } - - public onResize(event:UIEvent = null) - { - this.view.y = 0; - this.view.x = 0; - this.view.width = window.innerWidth; - this.view.height = window.innerHeight; - } -} \ No newline at end of file diff --git a/tests/primitives/PrimitivesTest.js b/tests/primitives/PrimitivesTest.js deleted file mode 100755 index 83b9cbb0..00000000 --- a/tests/primitives/PrimitivesTest.js +++ /dev/null @@ -1,90 +0,0 @@ -var View = require("awayjs-core/lib/containers/View"); -var Vector3D = require("awayjs-core/lib/core/geom/Vector3D"); -var DirectionalLight = require("awayjs-core/lib/entities/DirectionalLight"); -var StaticLightPicker = require("awayjs-core/lib/materials/lightpickers/StaticLightPicker"); -var PrimitiveCapsulePrefab = require("awayjs-core/lib/prefabs/PrimitiveCapsulePrefab"); -var PrimitiveConePrefab = require("awayjs-core/lib/prefabs/PrimitiveConePrefab"); -var PrimitiveCubePrefab = require("awayjs-core/lib/prefabs/PrimitiveCubePrefab"); -var PrimitiveCylinderPrefab = require("awayjs-core/lib/prefabs/PrimitiveCylinderPrefab"); -var PrimitivePlanePrefab = require("awayjs-core/lib/prefabs/PrimitivePlanePrefab"); -var PrimitiveSpherePrefab = require("awayjs-core/lib/prefabs/PrimitiveSpherePrefab"); -var PrimitiveTorusPrefab = require("awayjs-core/lib/prefabs/PrimitiveTorusPrefab"); -var RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); -var Debug = require("awayjs-core/lib/utils/Debug"); -var DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -var TriangleMethodMaterial = require("awayjs-stagegl/lib/materials/TriangleMethodMaterial"); -var DefaultMaterialManager = require("awayjs-stagegl/lib/materials/utils/DefaultMaterialManager"); -var PrimitivesTest = (function () { - function PrimitivesTest() { - var _this = this; - this.meshes = new Array(); - this.radius = 400; - Debug.LOG_PI_ERRORS = false; - Debug.THROW_ERRORS = false; - this.view = new View(new DefaultRenderer()); - this.raf = new RequestAnimationFrame(this.render, this); - this.light = new DirectionalLight(); - this.light.color = 0xFFFFFF; - this.light.direction = new Vector3D(1, 1, 0); - this.light.ambient = 0; - this.light.ambientColor = 0xFFFFFF; - this.light.diffuse = 1; - this.light.specular = 1; - this.lightB = new DirectionalLight(); - this.lightB.color = 0xFF0000; - this.lightB.direction = new Vector3D(-1, 0, 1); - this.lightB.ambient = 0; - this.lightB.ambientColor = 0xFFFFFF; - this.lightB.diffuse = 1; - this.lightB.specular = 1; - this.staticLightPicker = new StaticLightPicker([this.light, this.lightB]); - this.view.scene.addChild(this.light); - this.view.scene.addChild(this.lightB); - this.view.backgroundColor = 0x222222; - window.onresize = function (event) { return _this.onResize(event); }; - this.initMeshes(); - this.raf.start(); - this.onResize(); - } - PrimitivesTest.prototype.initMeshes = function () { - var primitives = new Array(); - var material = new TriangleMethodMaterial(DefaultMaterialManager.getDefaultTexture()); - material.lightPicker = this.staticLightPicker; - material.smooth = false; - primitives.push(new PrimitiveTorusPrefab()); - primitives.push(new PrimitiveSpherePrefab()); - primitives.push(new PrimitiveCapsulePrefab()); - primitives.push(new PrimitiveCylinderPrefab()); - primitives.push(new PrimitivePlanePrefab()); - primitives.push(new PrimitiveConePrefab()); - primitives.push(new PrimitiveCubePrefab()); - var mesh; - for (var c = 0; c < primitives.length; c++) { - primitives[c].material = material; - var t = Math.PI * 2 * c / primitives.length; - mesh = primitives[c].getNewObject(); - mesh.x = Math.cos(t) * this.radius; - mesh.y = Math.sin(t) * this.radius; - mesh.z = 0; - mesh.transform.scale = new Vector3D(2, 2, 2); - this.view.scene.addChild(mesh); - this.meshes.push(mesh); - } - }; - PrimitivesTest.prototype.render = function () { - if (this.meshes) - for (var c = 0; c < this.meshes.length; c++) - this.meshes[c].rotationY += 1; - this.view.render(); - }; - PrimitivesTest.prototype.onResize = function (event) { - if (event === void 0) { event = null; } - this.view.y = 0; - this.view.x = 0; - this.view.width = window.innerWidth; - this.view.height = window.innerHeight; - }; - return PrimitivesTest; -})(); - -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByaW1pdGl2ZXMvcHJpbWl0aXZlc3Rlc3QudHMiXSwibmFtZXMiOlsiUHJpbWl0aXZlc1Rlc3QiLCJQcmltaXRpdmVzVGVzdC5jb25zdHJ1Y3RvciIsIlByaW1pdGl2ZXNUZXN0LmluaXRNZXNoZXMiLCJQcmltaXRpdmVzVGVzdC5yZW5kZXIiLCJ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UoZXZlbnQ6VUlFdmVudCA9IG51bGwpXG5cdHtcblx0XHR0aGlzLnZpZXcueSA9IDA7XG5cdFx0dGhpcy52aWV3LnggPSAwO1xuXG5cdFx0dGhpcy52aWV3LndpZHRoID0gd2luZG93LmlubmVyV2lkdGg7XG5cdFx0dGhpcy52aWV3LmhlaWdodCA9IHdpbmRvdy5pbm5lckhlaWdodDtcblx0fVxufSJdfQ== \ No newline at end of file diff --git a/tests/primitives/PrimitivesTest.ts b/tests/primitives/PrimitivesTest.ts deleted file mode 100644 index d3f17b82..00000000 --- a/tests/primitives/PrimitivesTest.ts +++ /dev/null @@ -1,125 +0,0 @@ -import View = require("awayjs-core/lib/containers/View"); -import Vector3D = require("awayjs-core/lib/core/geom/Vector3D"); -import Mesh = require("awayjs-core/lib/entities/Mesh"); -import DirectionalLight = require("awayjs-core/lib/entities/DirectionalLight"); -import Event = require("awayjs-core/lib/events/Event"); -import StaticLightPicker = require("awayjs-core/lib/materials/lightpickers/StaticLightPicker"); -import PrimitivePrefabBase = require("awayjs-core/lib/prefabs/PrimitivePrefabBase"); -import PrimitiveCapsulePrefab = require("awayjs-core/lib/prefabs/PrimitiveCapsulePrefab"); -import PrimitiveConePrefab = require("awayjs-core/lib/prefabs/PrimitiveConePrefab"); -import PrimitiveCubePrefab = require("awayjs-core/lib/prefabs/PrimitiveCubePrefab"); -import PrimitiveCylinderPrefab = require("awayjs-core/lib/prefabs/PrimitiveCylinderPrefab"); -import PrimitivePlanePrefab = require("awayjs-core/lib/prefabs/PrimitivePlanePrefab"); -import PrimitiveSpherePrefab = require("awayjs-core/lib/prefabs/PrimitiveSpherePrefab"); -import PrimitiveTorusPrefab = require("awayjs-core/lib/prefabs/PrimitiveTorusPrefab"); -import RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); -import Debug = require("awayjs-core/lib/utils/Debug"); - -import DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -import TriangleMethodMaterial = require("awayjs-stagegl/lib/materials/TriangleMethodMaterial"); -import DefaultMaterialManager = require("awayjs-stagegl/lib/materials/utils/DefaultMaterialManager"); - -class PrimitivesTest -{ - - private view:View; - private raf:RequestAnimationFrame; - private meshes:Array = new Array(); - private light:DirectionalLight; - private lightB:DirectionalLight; - private staticLightPicker:StaticLightPicker; - private radius:number = 400; - - constructor() - { - - Debug.LOG_PI_ERRORS = false; - Debug.THROW_ERRORS = false; - - this.view = new View(new DefaultRenderer()); - this.raf = new RequestAnimationFrame(this.render, this); - - this.light = new DirectionalLight(); - this.light.color = 0xFFFFFF; - this.light.direction = new Vector3D(1, 1, 0); - this.light.ambient = 0; - this.light.ambientColor = 0xFFFFFF; - this.light.diffuse = 1; - this.light.specular = 1; - - this.lightB = new DirectionalLight(); - this.lightB.color = 0xFF0000; - this.lightB.direction = new Vector3D( -1 , 0 ,1 ); - this.lightB.ambient = 0; - this.lightB.ambientColor = 0xFFFFFF; - this.lightB.diffuse = 1; - this.lightB.specular = 1; - - this.staticLightPicker = new StaticLightPicker([this.light , this.lightB]); - - this.view.scene.addChild(this.light); - this.view.scene.addChild(this.lightB); - - this.view.backgroundColor = 0x222222; - - window.onresize = (event:UIEvent) => this.onResize(event); - - this.initMeshes(); - this.raf.start(); - this.onResize(); - } - - private initMeshes():void - { - - var primitives:Array = new Array(); - var material:TriangleMethodMaterial = new TriangleMethodMaterial(DefaultMaterialManager.getDefaultTexture()); - material.lightPicker = this.staticLightPicker; - material.smooth = false; - - primitives.push(new PrimitiveTorusPrefab()); - primitives.push(new PrimitiveSpherePrefab()); - primitives.push(new PrimitiveCapsulePrefab()); - primitives.push(new PrimitiveCylinderPrefab()); - primitives.push(new PrimitivePlanePrefab()); - primitives.push(new PrimitiveConePrefab()); - primitives.push(new PrimitiveCubePrefab()); - - var mesh:Mesh; - - for (var c:number = 0; c < primitives.length; c ++) { - primitives[c].material = material; - - var t:number = Math.PI*2*c/primitives.length; - - mesh = primitives[c].getNewObject(); - mesh.x = Math.cos(t)*this.radius; - mesh.y = Math.sin(t)*this.radius; - mesh.z = 0; - mesh.transform.scale = new Vector3D(2, 2, 2); - - this.view.scene.addChild(mesh); - this.meshes.push(mesh); - } - - - } - - private render() - { - if (this.meshes) - for (var c:number = 0; c < this.meshes.length; c++) - this.meshes[c].rotationY += 1; - - this.view.render(); - } - - public onResize(event:UIEvent = null) - { - this.view.y = 0; - this.view.x = 0; - - this.view.width = window.innerWidth; - this.view.height = window.innerHeight; - } -} \ No newline at end of file diff --git a/tests/primitives/WireframePrimitiveTest.js b/tests/primitives/WireframePrimitiveTest.js deleted file mode 100755 index 73f4658d..00000000 --- a/tests/primitives/WireframePrimitiveTest.js +++ /dev/null @@ -1,66 +0,0 @@ -var View = require("awayjs-core/lib/containers/View"); -var Vector3D = require("awayjs-core/lib/core/geom/Vector3D"); -var PrimitivePolygonPrefab = require("awayjs-core/lib/prefabs/PrimitivePolygonPrefab"); -var PrimitiveConePrefab = require("awayjs-core/lib/prefabs/PrimitiveConePrefab"); -var PrimitiveCubePrefab = require("awayjs-core/lib/prefabs/PrimitiveCubePrefab"); -var PrimitiveCylinderPrefab = require("awayjs-core/lib/prefabs/PrimitiveCylinderPrefab"); -var PrimitivePlanePrefab = require("awayjs-core/lib/prefabs/PrimitivePlanePrefab"); -var PrimitiveSpherePrefab = require("awayjs-core/lib/prefabs/PrimitiveSpherePrefab"); -var RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); -var Debug = require("awayjs-core/lib/utils/Debug"); -var DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -var ContextGLProfile = require("awayjs-stagegl/lib/core/stagegl/ContextGLProfile"); -var WireframePrimitiveTest = (function () { - function WireframePrimitiveTest() { - var _this = this; - this.meshes = new Array(); - this.radius = 400; - Debug.LOG_PI_ERRORS = false; - Debug.THROW_ERRORS = false; - this.view = new View(new DefaultRenderer(false, ContextGLProfile.BASELINE)); - this.raf = new RequestAnimationFrame(this.render, this); - this.view.backgroundColor = 0x222222; - window.onresize = function (event) { return _this.onResize(event); }; - this.initMeshes(); - this.raf.start(); - this.onResize(); - } - WireframePrimitiveTest.prototype.initMeshes = function () { - var primitives = new Array(); - primitives.push(new PrimitivePolygonPrefab()); - primitives.push(new PrimitiveSpherePrefab()); - primitives.push(new PrimitiveSpherePrefab()); - primitives.push(new PrimitiveCylinderPrefab()); - primitives.push(new PrimitivePlanePrefab()); - primitives.push(new PrimitiveConePrefab()); - primitives.push(new PrimitiveCubePrefab()); - var mesh; - for (var c = 0; c < primitives.length; c++) { - primitives[c].geometryType = "lineSubGeometry"; - var t = Math.PI * 2 * c / primitives.length; - mesh = primitives[c].getNewObject(); - mesh.x = Math.cos(t) * this.radius; - mesh.y = Math.sin(t) * this.radius; - mesh.z = 0; - mesh.transform.scale = new Vector3D(2, 2, 2); - this.view.scene.addChild(mesh); - this.meshes.push(mesh); - } - }; - WireframePrimitiveTest.prototype.render = function () { - if (this.meshes) - for (var c = 0; c < this.meshes.length; c++) - this.meshes[c].rotationY += 1; - this.view.render(); - }; - WireframePrimitiveTest.prototype.onResize = function (event) { - if (event === void 0) { event = null; } - this.view.y = 0; - this.view.x = 0; - this.view.width = window.innerWidth; - this.view.height = window.innerHeight; - }; - return WireframePrimitiveTest; -})(); - -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByaW1pdGl2ZXMvd2lyZWZyYW1lcHJpbWl0aXZldGVzdC50cyJdLCJuYW1lcyI6WyJXaXJlZnJhbWVQcmltaXRpdmVUZXN0IiwiV2lyZWZyYW1lUHJpbWl0aXZlVGVzdC5jb25zdHJ1Y3RvciIsIldpcmVmcmFtZVByaW1pdGl2ZVRlc3QuaW5pdE1lc2hlcyIsIldpcmVmcmFtZVByaW1pdGl2ZVRlc3QucmVuZGVyIiwiV2lyZWZyYW1lUHJpbWl0aXZlVGVzdC5vblJlc2l6ZSJdLCJtYXBwaW5ncyI6IkFBQUEsSUFBTyxJQUFJLFdBQWlCLGlDQUF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TWF0aC5zaW4odCkqdGhpcy5yYWRpdXM7XG5cdFx0XHRtZXNoLnogPSAwO1xuXHRcdFx0bWVzaC50cmFuc2Zvcm0uc2NhbGUgPSBuZXcgVmVjdG9yM0QoMiwgMiwgMik7XG5cblx0XHRcdHRoaXMudmlldy5zY2VuZS5hZGRDaGlsZChtZXNoKTtcblx0XHRcdHRoaXMubWVzaGVzLnB1c2gobWVzaCk7XG5cdFx0fVxuXG5cblx0fVxuXG5cdHByaXZhdGUgcmVuZGVyKClcblx0e1xuXHRcdGlmKHRoaXMubWVzaGVzKVxuXHRcdFx0Zm9yICh2YXIgYzpudW1iZXIgPSAwOyBjIDwgdGhpcy5tZXNoZXMubGVuZ3RoOyBjKyspXG5cdFx0XHRcdHRoaXMubWVzaGVzW2NdLnJvdGF0aW9uWSArPSAxO1xuXG5cdFx0dGhpcy52aWV3LnJlbmRlcigpO1xuXHR9XG5cblx0cHVibGljIG9uUmVzaXplKGV2ZW50OlVJRXZlbnQgPSBudWxsKVxuXHR7XG5cdFx0dGhpcy52aWV3LnkgPSAwO1xuXHRcdHRoaXMudmlldy54ID0gMDtcblxuXHRcdHRoaXMudmlldy53aWR0aCA9IHdpbmRvdy5pbm5lcldpZHRoO1xuXHRcdHRoaXMudmlldy5oZWlnaHQgPSB3aW5kb3cuaW5uZXJIZWlnaHQ7XG5cdH1cbn0iXX0= \ No newline at end of file diff --git a/tests/primitives/WireframePrimitiveTest.ts b/tests/primitives/WireframePrimitiveTest.ts deleted file mode 100644 index 12b034b4..00000000 --- a/tests/primitives/WireframePrimitiveTest.ts +++ /dev/null @@ -1,93 +0,0 @@ -import View = require("awayjs-core/lib/containers/View"); -import Vector3D = require("awayjs-core/lib/core/geom/Vector3D"); -import Mesh = require("awayjs-core/lib/entities/Mesh"); -import PrimitivePrefabBase = require("awayjs-core/lib/prefabs/PrimitivePrefabBase"); -import PrimitivePolygonPrefab = require("awayjs-core/lib/prefabs/PrimitivePolygonPrefab"); -import PrimitiveConePrefab = require("awayjs-core/lib/prefabs/PrimitiveConePrefab"); -import PrimitiveCubePrefab = require("awayjs-core/lib/prefabs/PrimitiveCubePrefab"); -import PrimitiveCylinderPrefab = require("awayjs-core/lib/prefabs/PrimitiveCylinderPrefab"); -import PrimitivePlanePrefab = require("awayjs-core/lib/prefabs/PrimitivePlanePrefab"); -import PrimitiveSpherePrefab = require("awayjs-core/lib/prefabs/PrimitiveSpherePrefab"); -import RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); -import Debug = require("awayjs-core/lib/utils/Debug"); - -import DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -import ContextGLProfile = require("awayjs-stagegl/lib/core/stagegl/ContextGLProfile"); -import TriangleMethodMaterial = require("awayjs-stagegl/lib/materials/TriangleMethodMaterial"); -import DefaultMaterialManager = require("awayjs-stagegl/lib/materials/utils/DefaultMaterialManager"); - -class WireframePrimitiveTest -{ - private view:View; - private raf:RequestAnimationFrame; - private meshes:Array = new Array(); - - private radius:number = 400; - - constructor() - { - Debug.LOG_PI_ERRORS = false; - Debug.THROW_ERRORS = false; - - this.view = new View(new DefaultRenderer(false, ContextGLProfile.BASELINE)); - this.raf = new RequestAnimationFrame(this.render, this); - - this.view.backgroundColor = 0x222222; - - window.onresize = (event:UIEvent) => this.onResize(event); - - this.initMeshes(); - this.raf.start(); - this.onResize(); - } - - private initMeshes():void - { - - var primitives:Array = new Array(); - primitives.push(new PrimitivePolygonPrefab()); - primitives.push(new PrimitiveSpherePrefab()); - primitives.push(new PrimitiveSpherePrefab()); - primitives.push(new PrimitiveCylinderPrefab()); - primitives.push(new PrimitivePlanePrefab()); - primitives.push(new PrimitiveConePrefab()); - primitives.push(new PrimitiveCubePrefab()); - - var mesh:Mesh; - - for (var c:number = 0; c < primitives.length; c++) { - primitives[c].geometryType = "lineSubGeometry"; - - var t:number = Math.PI*2*c/primitives.length; - - mesh = primitives[c].getNewObject(); - mesh.x = Math.cos(t)*this.radius; - mesh.y = Math.sin(t)*this.radius; - mesh.z = 0; - mesh.transform.scale = new Vector3D(2, 2, 2); - - this.view.scene.addChild(mesh); - this.meshes.push(mesh); - } - - - } - - private render() - { - if(this.meshes) - for (var c:number = 0; c < this.meshes.length; c++) - this.meshes[c].rotationY += 1; - - this.view.render(); - } - - public onResize(event:UIEvent = null) - { - this.view.y = 0; - this.view.x = 0; - - this.view.width = window.innerWidth; - this.view.height = window.innerHeight; - } -} \ No newline at end of file diff --git a/tests/textures/CubeTextures.js b/tests/textures/CubeTextures.js deleted file mode 100755 index 88086dd6..00000000 --- a/tests/textures/CubeTextures.js +++ /dev/null @@ -1,54 +0,0 @@ -var View = require("awayjs-core/lib/containers/View"); -var URLRequest = require("awayjs-core/lib/core/net/URLRequest"); -var AssetLibrary = require("awayjs-core/lib/core/library/AssetLibrary"); -var Skybox = require("awayjs-core/lib/entities/Skybox"); -var LoaderEvent = require("awayjs-core/lib/events/LoaderEvent"); -var RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); -var Debug = require("awayjs-core/lib/utils/Debug"); -var DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -var SkyboxMaterial = require("awayjs-stagegl/lib/materials/SkyboxMaterial"); -var CubeTextures = (function () { - function CubeTextures() { - var _this = this; - Debug.LOG_PI_ERRORS = false; - Debug.THROW_ERRORS = false; - this._view = new View(new DefaultRenderer()); - this._view.camera.z = -500; - this._view.camera.y = 250; - this._view.camera.rotationX = 20; - this._view.camera.projection.near = 0.5; - this._view.camera.projection.far = 14000; - this._view.backgroundColor = 0x2c2c32; - var token = AssetLibrary.load(new URLRequest('assets/CubeTextureTest.cube')); - token.addEventListener(LoaderEvent.RESOURCE_COMPLETE, function (event) { return _this.onResourceComplete(event); }); - window.onresize = function (event) { return _this.onResize(event); }; - this.onResize(); - this._timer = new RequestAnimationFrame(this.render, this); - this._timer.start(); - } - CubeTextures.prototype.onResourceComplete = function (event) { - var loader = event.target; - switch (event.url) { - case 'assets/CubeTextureTest.cube': - this._skyboxCubeTexture = loader.baseDependency.assets[0]; - this._skyboxMaterial = new SkyboxMaterial(this._skyboxCubeTexture); - this._skybox = new Skybox(this._skyboxMaterial); - this._view.scene.addChild(this._skybox); - break; - } - }; - CubeTextures.prototype.render = function (dt) { - this._view.camera.rotationY += 0.01 * dt; - this._view.render(); - }; - CubeTextures.prototype.onResize = function (event) { - if (event === void 0) { event = null; } - this._view.y = 0; - this._view.x = 0; - this._view.width = window.innerWidth; - this._view.height = window.innerHeight; - }; - return CubeTextures; -})(); - -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRleHR1cmVzL2N1YmV0ZXh0dXJlcy50cyJdLCJuYW1lcyI6WyJDdWJlVGV4dHVyZXMiLCJDdWJlVGV4dHVyZXMuY29uc3RydWN0b3IiLCJDdWJlVGV4dHVyZXMub25SZXNvdXJjZUNvbXBsZXRlIiwiQ3ViZVRleHR1cmVzLnJlbmRlciIsIkN1YmVUZXh0dXJlcy5vblJlc2l6ZSJdLCJtYXBwaW5ncyI6IkFBQUEsSUFBTyxJQUFJLFdBQWlCLGlDQUFpQyxDQUFDLENBQUM7QUFFL0QsSUFBTyxVQUFVLFdBQWUscUNBQXFDLENBQUMsQ0FBQztBQUN2RSxJQUFPLFlBQVksV0FBZSwyQ0FBMkMsQ0FBQyxDQUFDO0FBSy9FLElBQU8sTUFBTSxXQUFnQixpQ0FBaUMsQ0FBQyxDQUFDO0FBQ2hFLElBQU8sV0FBVyxXQUFlLG9DQUFvQyxDQUFDLENBQUM7QUFHdkUsSUFBTyxxQkFBcUIsV0FBWSw2Q0FBNkMsQ0FBQyxDQUFDO0FBQ3ZGLElBQU8sS0FBSyxXQUFnQiw2QkFBNkIsQ0FBQyxDQUFDO0FBRTNELElBQU8sZUFBZSxXQUFjLGdEQUFnRCxDQUFDLENBQUM7QUFDdEYsSUFBTyxjQUFjLFdBQWMsNkNBQTZDLENBQUMsQ0FBQztBQUVsRixJQUFNL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 No newline at end of file diff --git a/tests/textures/CubeTextures.ts b/tests/textures/CubeTextures.ts deleted file mode 100644 index e85cb881..00000000 --- a/tests/textures/CubeTextures.ts +++ /dev/null @@ -1,81 +0,0 @@ -import View = require("awayjs-core/lib/containers/View"); -import Vector3D = require("awayjs-core/lib/core/geom/Vector3D"); -import URLRequest = require("awayjs-core/lib/core/net/URLRequest"); -import AssetLibrary = require("awayjs-core/lib/core/library/AssetLibrary"); -import AssetLoader = require("awayjs-core/lib/core/library/AssetLoader"); -import AssetLoaderToken = require("awayjs-core/lib/core/library/AssetLoaderToken"); -import DirectionalLight = require("awayjs-core/lib/entities/DirectionalLight"); -import Mesh = require("awayjs-core/lib/entities/Mesh"); -import Skybox = require("awayjs-core/lib/entities/Skybox"); -import LoaderEvent = require("awayjs-core/lib/events/LoaderEvent"); -import PrimitiveTorusPrefab = require("awayjs-core/lib/prefabs/PrimitiveTorusPrefab"); -import ImageCubeTexture = require("awayjs-core/lib/textures/ImageCubeTexture"); -import RequestAnimationFrame = require("awayjs-core/lib/utils/RequestAnimationFrame"); -import Debug = require("awayjs-core/lib/utils/Debug"); - -import DefaultRenderer = require("awayjs-stagegl/lib/core/render/DefaultRenderer"); -import SkyboxMaterial = require("awayjs-stagegl/lib/materials/SkyboxMaterial"); - -class CubeTextures -{ - private _view:View; - private _timer:RequestAnimationFrame; - private _skyboxCubeTexture:ImageCubeTexture; - private _skyboxMaterial:SkyboxMaterial; - - private _skybox:Skybox; - - constructor() - { - Debug.LOG_PI_ERRORS = false; - Debug.THROW_ERRORS = false; - - this._view = new View(new DefaultRenderer()); - this._view.camera.z = -500; - this._view.camera.y = 250; - this._view.camera.rotationX = 20; - this._view.camera.projection.near = 0.5; - this._view.camera.projection.far = 14000; - this._view.backgroundColor = 0x2c2c32; - - var token:AssetLoaderToken = AssetLibrary.load( new URLRequest('assets/CubeTextureTest.cube')); - token.addEventListener(LoaderEvent.RESOURCE_COMPLETE, (event:LoaderEvent) => this.onResourceComplete(event)); - - window.onresize = (event:UIEvent) => this.onResize(event); - - this.onResize(); - - this._timer = new RequestAnimationFrame(this.render, this); - this._timer.start(); - } - - public onResourceComplete(event:LoaderEvent) - { - var loader:AssetLoader = event.target; - - switch(event.url) { - case 'assets/CubeTextureTest.cube': - this._skyboxCubeTexture = loader.baseDependency.assets[0]; - this._skyboxMaterial = new SkyboxMaterial(this._skyboxCubeTexture); - - this._skybox = new Skybox(this._skyboxMaterial); - this._view.scene.addChild(this._skybox); - - break; - } - } - - private render(dt:number) - { - this._view.camera.rotationY += 0.01 * dt; - this._view.render(); - } - - public onResize(event:UIEvent = null) - { - this._view.y = 0; - this._view.x = 0; - this._view.width = window.innerWidth; - this._view.height = window.innerHeight; - } -} \ No newline at end of file