From 9f1332e4af9e79939a5d8b41250a9a3a59a30ced Mon Sep 17 00:00:00 2001 From: rms13 Date: Mon, 30 Jan 2017 12:09:59 -0500 Subject: [PATCH 1/5] wings --- src/main.js | 132 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 124 insertions(+), 8 deletions(-) diff --git a/src/main.js b/src/main.js index fd8fbd4..f2a057e 100755 --- a/src/main.js +++ b/src/main.js @@ -42,9 +42,110 @@ function onLoad(framework) { var featherMesh = new THREE.Mesh(featherGeo, lambertWhite); featherMesh.name = "feather"; - scene.add(featherMesh); +// scene.add(featherMesh); + +/* var randomPoints = []; + var rpos = new THREE.Vector3(0,0,0); + randomPoints.push(rpos); + rpos=(,0,1); + randomPoints.push(rpos); + rpos=(1,0,1); + randomPoints.push(rpos); + rpos=(1,0,1); + randomPoints.push(rpos); + //randomPoints.push(i); + //for ( var i = 0; i < 10; i ++ ) { + // randomPoints.push( new THREE.Vector3( ( i - 4.5 ) * 50, THREE.Math.randFloat( - 50, 50 ), THREE.Math.randFloat( - 50, 50 ) ) ); + // randomPoints.push(i); + //} + var randomSpline = new THREE.CatmullRomCurve3(randomPoints); */ + var curve = new THREE.CatmullRomCurve3( [ + new THREE.Vector3( 0, 0, 0 ), + new THREE.Vector3( -0.25, 0, 1), + new THREE.Vector3( 0, 0, 2 ), + new THREE.Vector3( 0.25, 0, 3 ), + new THREE.Vector3( 0.15, 0, 3.5 ), + new THREE.Vector3( 0.15, 0, 4 ) + ] ); + var max=30; + for(var i=1; i20) // SIDE WING - HARD CURVE PART + { + FMCopy.rotation.y = (10 * (i-20) + 20) * Math.PI/180; + FMCopy.scale.set(-0.9-0.1*(Math.abs(i-20)/20),-1,1); + } + + FMCopy.name = "feather_long"+i; + //console.log(FMCopy.name); + scene.add(FMCopy); + } + + for(var i=1; i20) // SIDE WING - HARD CURVE PART + { + FMCopy.scale.set(-0.6-0.2*(Math.abs(i-20)/20),-1,1); + FMCopy.rotation.y = (10 * (i-20) + 25) * Math.PI/180; + } + FMCopy.name = "feather_short"+i; + scene.add(FMCopy); + } + + for(var i=1; i<21; i++) // VERY SHORT FEATHERS + { + var FMCopy = new THREE.Mesh(featherGeo, lambertWhite); + var ind = curve.getPoint(i/max); + var pos = new THREE.Vector3(ind.x,ind.y,ind.z); + + FMCopy.position.x=pos.x; + FMCopy.position.y=pos.y; + FMCopy.position.z=pos.z; + FMCopy.rotation.z= -6*(41-i)/30 * Math.PI/180; + + FMCopy.scale.set(-0.4,-1,1); + FMCopy.rotation.y = ((20-i)/20+2)/(4) * Math.PI/180; + + FMCopy.name = "feather_very_short"+i; + scene.add(FMCopy); + } }); - + // set camera position camera.position.set(0, 1, 5); camera.lookAt(new THREE.Vector3(0,0,0)); @@ -61,12 +162,27 @@ function onLoad(framework) { // called on frame updates function onUpdate(framework) { - var feather = framework.scene.getObjectByName("feather"); - if (feather !== undefined) { - // Simply flap wing - var date = new Date(); - feather.rotateZ(Math.sin(date.getTime() / 100) * 2 * Math.PI / 180); - } + for(var i=0; i<31; i++) + { + var feather1 = framework.scene.getObjectByName("feather_long"+i); + var feather2 = framework.scene.getObjectByName("feather_short"+i); + var feather3 = framework.scene.getObjectByName("feather_very_short"+i); + if (feather1 !== undefined) { + var date = new Date(); + feather1.position.y+=feather1.position.z/20 * Math.sin(date.getTime() / 1000); + //console.log(feather.name); + } + if(feather2 !== undefined) { + var date = new Date(); + feather2.position.y+=feather2.position.z/20 * Math.sin(date.getTime() / 1000); + //console.log(feather.name); + } + if(feather3 !== undefined) { + var date = new Date(); + feather3.position.y+=feather3.position.z/20 * Math.sin(date.getTime() / 1000); + //console.log(feather.name); + } + } } // when the scene is done initializing, it will call onLoad, then on frame updates, call onUpdate From e61f556997b73e271786e1845b01b3597b7ee17e Mon Sep 17 00:00:00 2001 From: rms13 Date: Tue, 31 Jan 2017 15:56:22 -0500 Subject: [PATCH 2/5] wing flap incomplete --- src/main.js | 92 ++++++++++++++++++++++++++--------------------------- 1 file changed, 45 insertions(+), 47 deletions(-) diff --git a/src/main.js b/src/main.js index f2a057e..15fde8d 100755 --- a/src/main.js +++ b/src/main.js @@ -40,25 +40,8 @@ function onLoad(framework) { // LOOK: This function runs after the obj has finished loading var featherGeo = obj.children[0].geometry; - var featherMesh = new THREE.Mesh(featherGeo, lambertWhite); - featherMesh.name = "feather"; -// scene.add(featherMesh); - -/* var randomPoints = []; - var rpos = new THREE.Vector3(0,0,0); - randomPoints.push(rpos); - rpos=(,0,1); - randomPoints.push(rpos); - rpos=(1,0,1); - randomPoints.push(rpos); - rpos=(1,0,1); - randomPoints.push(rpos); - //randomPoints.push(i); - //for ( var i = 0; i < 10; i ++ ) { - // randomPoints.push( new THREE.Vector3( ( i - 4.5 ) * 50, THREE.Math.randFloat( - 50, 50 ), THREE.Math.randFloat( - 50, 50 ) ) ); - // randomPoints.push(i); - //} - var randomSpline = new THREE.CatmullRomCurve3(randomPoints); */ + //var date = new Date(); + // feather1.position.y+=feather1.position.z/20 * Math.sin(date.getTime() / 1000); var curve = new THREE.CatmullRomCurve3( [ new THREE.Vector3( 0, 0, 0 ), new THREE.Vector3( -0.25, 0, 1), @@ -70,24 +53,17 @@ function onLoad(framework) { var max=30; for(var i=1; i Date: Tue, 31 Jan 2017 23:56:35 -0500 Subject: [PATCH 3/5] final --- README.md | 81 ++----------- src/main.js | 336 ++++++++++++++++++++++++++++++++++++---------------- 2 files changed, 246 insertions(+), 171 deletions(-) diff --git a/README.md b/README.md index 1410c30..b095a37 100644 --- a/README.md +++ b/README.md @@ -1,82 +1,27 @@ -# [Project2: Toolbox Functions](https://github.com/CIS700-Procedural-Graphics/Project2-Toolbox-Functions) +# [Procedural Wing](https:rms13.github.io/Project2-Toolbox-Functions) ## Overview The objective of this assignment is to procedurally model and animate a bird wing. Let's get creative! -Start by forking and then cloning [this repository](https://github.com/CIS700-Procedural-Graphics/Project2-Toolbox-Functions) - ## Modeling -##### Reference images - -Search for three or more images of a bird wing (or any flying creature, really) in order to provide yourself reference material, as you're going to base your modeling and animation from these images. For the more artistic minds, feel free to sketch your own concept. - -##### Make wing curve - -Begin with a 3D curve for your basic wing shape. Three.js provides classes to create many different types of curves, so you may use whatever type of curve you prefer. - -##### Distribute feathers - -We have provided a simple feather model from which to begin. You are not required to use this model if you have others that you prefer. From this base, you must duplicate the feather to model a complete wing, and your wing should consist of at least thirty feathers. Distribute points along the curve you created previously; you will append the feather primitives to the curve at these points. Make sure that you modify the size, orientation, and color of your feathers depending on their location on the wing. - -Feel free to diversify your wings by using multiple base feather models. +Catmull Rom Splines are used to create the shape of the wing. Feathers are distributed over the curve in three layers with some randomness in position. ## Animation -Add a wind force to your scene, and parameterize its direction and speed. You will use this wind force to animate the feathers of your wing by vibrating them slightly. Using Dat.GUI, allow the user to modify these wind parameters. Please note that we don't care about your feather motion being physically accurate, as long as it looks nice. - -Additionally, animate the control points of your wing curve to make the wing flap, and allow the user to control the speed of the wing flapping. +Wind force is simulated using just random vibrations. +Wing Flapping is simulated using sine waves and some randomness. ## Interactivity -Using Dat.GUI and the examples provided in the reference code, allow the user to adjust the following controls: - -1. The curvature of the wing's basic shape -2. Feather distribution -3. Feather size -4. Feather color -5. Feather orientation -6. Flapping speed -7. Flapping motion - -## For the Overachievers - -Suggestions: -- Make a pretty iridescent or otherwise feather appropriate shader. -- Otherwise, going the extra mile for this assignment is really in the polish! - -## Submission - -- Create a folder called `references` to include your reference images. - -- Update `README.md` to contain a solid description of your project - -- Publish your project to gh-pages. `npm run deploy`. It should now be visible at http://username.github.io/repo-name - -- Create a [pull request](https://help.github.com/articles/creating-a-pull-request/) to this repository, and in the comment, include a link to your published project. - -- Submit the link to your pull request on Canvas. - -## Getting Started - -1. [Install Node.js](https://nodejs.org/en/download/). Node.js is a JavaScript runtime. It basically allows you to run JavaScript when not in a browser. For our purposes, this is not necessary. The important part is that with it comes `npm`, the Node Package Manager. This allows us to easily declare and install external dependencies such as [three.js](https://threejs.org/), [dat.GUI](https://workshop.chromeexperiments.com/examples/gui/#1--Basic-Usage), and [glMatrix](http://glmatrix.net/). Some other packages we'll be using make it significantly easier to develop your code and create modules for better code reuse and clarity. These tools make it _signficantly_ easier to write code in multiple `.js` files without globally defining everything. - -2. Fork and clone your repository. - -3. In the root directory of your project, run `npm install`. This will download all of those dependencies. - -4. Do either of the following (but I highly recommend the first one for reasons I will explain later). - - a. Run `npm start` and then go to `localhost:7000` in your web browser - - b. Run `npm run build` and then go open `index.html` in your web browser - - You should hopefully see the framework code with a 3D cube at the center of the screen! - - -## Developing Your Code -All of the JavaScript code is living inside the `src` directory. The main file that gets executed when you load the page as you may have guessed is `main.js`. Here, you can make any changes you want, import functions from other files, etc. The reason that I highly suggest you build your project with `npm start` is that doing so will start a process that watches for any changes you make to your code. If it detects anything, it'll automagically rebuild your project and then refresh your browser window for you. Wow. That's cool. If you do it the other way, you'll need to run `npm build` and then refresh your page every time you want to test something. +1. Feather size - coming soon +2. Feather color - coming soon +3. Feather orientation +4. Flapping speed +5. Flapping motion/Shape +6. Wind Speed +7. Amplitude -## Publishing Your Code -We highly suggest that you put your code on GitHub. One of the reasons we chose to make this course using JavaScript is that the Web is highly accessible and making your awesome work public and visible can be a huge benefit when you're looking to score a job or internship. To aid you in this process, running `npm run deploy` will automatically build your project and push it to `gh-pages` where it will be visible at `username.github.io/repo-name`. \ No newline at end of file +## Site +rms13.github.io/Project2-Toolbox-Functions diff --git a/src/main.js b/src/main.js index 15fde8d..0da17ef 100755 --- a/src/main.js +++ b/src/main.js @@ -4,6 +4,30 @@ const THREE = require('three'); // older modules are imported like this. You shouldn't have to worry about this much import Framework from './framework' +// Helper vars +// var l="0x2f2c31"; +// var m="0x231e1e"; +// var s="0x191517"; +var fs=7.0; +var a=8.0; +var fo=0.0; +var toggle=true; +var sc=2; +var w=25.0; + +// GUI Controls +var GUIoptions = function() +{ + // this.ColorLong="0x2f2c31"; + // this.ColorMedium="0x231e1e"; + // this.ColorShort="0x191517"; + this.FlappingSpeed=7.0; + this.Amplitude=8.0; + this.Orientation=0.0; + this.Shape=2.0; + this.WindSpeed=25.0; +} + // called after the scene loads function onLoad(framework) { var scene = framework.scene; @@ -12,8 +36,12 @@ function onLoad(framework) { var gui = framework.gui; var stats = framework.stats; - // Basic Lambert white - var lambertWhite = new THREE.MeshLambertMaterial({ color: 0xaaaaaa, side: THREE.DoubleSide }); + // Color of Long Feathers + var lambertWhite = new THREE.MeshLambertMaterial({ color: 0x2f2c31, side: THREE.DoubleSide }); + // Color of Medium Feathers + var lambertWhite2 = new THREE.MeshLambertMaterial({ color: 0x231e1e, side: THREE.DoubleSide }); + // Color of Short Feathers + var lambertWhite3 = new THREE.MeshLambertMaterial({ color: 0x191517, side: THREE.DoubleSide }); // Set light var directionalLight = new THREE.DirectionalLight( 0xffffff, 1 ); @@ -37,11 +65,10 @@ function onLoad(framework) { var objLoader = new THREE.OBJLoader(); objLoader.load('/geo/feather.obj', function(obj) { - // LOOK: This function runs after the obj has finished loading - var featherGeo = obj.children[0].geometry; + // LOOK: This function runs after the obj has finished loading + var featherGeo = obj.children[0].geometry; - //var date = new Date(); - // feather1.position.y+=feather1.position.z/20 * Math.sin(date.getTime() / 1000); + // curve along which feathers are plotted.. var curve = new THREE.CatmullRomCurve3( [ new THREE.Vector3( 0, 0, 0 ), new THREE.Vector3( -0.25, 0, 1), @@ -50,76 +77,135 @@ function onLoad(framework) { new THREE.Vector3( 0.15, 0, 3.5 ), new THREE.Vector3( 0.15, 0, 4 ) ] ); - var max=30; - for(var i=1; i20) // SIDE WING - HARD CURVE PART - { - FMCopy.rotation.y = (10 * (i-20) + 20) * Math.PI/180; - FMCopy.scale.set(-0.9-0.1*(Math.abs(i-20)/20),-1,1); - } - - FMCopy.name = "feather_long"+i; - //console.log(FMCopy.name); - scene.add(FMCopy); - } - for(var i=1; i20) // SIDE WING - HARD CURVE PART - { - FMCopy.scale.set(-0.6-0.2*(Math.abs(i-20)/20),-1,1); - FMCopy.rotation.y = (10 * (i-20) + 25) * Math.PI/180; - } - FMCopy.name = "feather_short"+i; - scene.add(FMCopy); - } + var max=30; // Max number of Long feathers.. number of shorter feathers is a little less.. - for(var i=1; i<21; i++) // VERY SHORT FEATHERS - { - var FMCopy = new THREE.Mesh(featherGeo, lambertWhite); - var ind = curve.getPoint(i/max); - var pos = new THREE.Vector3(ind.x,ind.y,ind.z); + for(var k=0; k<2; k++) + { + for(var i=1; imax*2/3) // SIDE WING - HARD CURVE PART + { + if(k===0) + FMCopy.rotation.y = (10 * (i-max*2/3) + max*2/3) * Math.PI/180; + if(k===1) + FMCopy.rotation.y = - (10 * (i-max*2/3) + max*2/3) * Math.PI/180; + FMCopy.scale.set(-0.9-0.1*(Math.abs(i-max*2/3)/max*2/3),-1,1); + } - FMCopy.name = "feather_very_short"+i; - scene.add(FMCopy); - } + if(k===1) + { + FMCopy.position.z=-FMCopy.position.z; + } + FMCopy.name = "feather_long"+k+i; + scene.add(FMCopy); + } + + for(var i=1; imax*2/3) // SIDE WING - HARD CURVE PART + { + FMCopy.scale.set(-0.6-0.2*(Math.abs(i-max*2/3)/max*2/3),-1,1); + if(k===0) + FMCopy.rotation.y = (10 * (i-max*2/3) + max*2/3 +5) * Math.PI/180; + if(k===1) + FMCopy.rotation.y = - (10 * (i-max*2/3) + max*2/3 +5) * Math.PI/180; + } + + if(k===1) + { + FMCopy.position.z=-FMCopy.position.z; + } + FMCopy.name = "feather_short"+k+i; + scene.add(FMCopy); + } + + for(var i=1; i Date: Wed, 1 Feb 2017 00:18:17 -0500 Subject: [PATCH 4/5] Deploy bug in package.json fixed --- npm-debug.log | 47 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 npm-debug.log diff --git a/npm-debug.log b/npm-debug.log new file mode 100644 index 0000000..8dcf97a --- /dev/null +++ b/npm-debug.log @@ -0,0 +1,47 @@ +0 info it worked if it ends with ok +1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', +1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', +1 verbose cli 'start' ] +2 info using npm@3.10.10 +3 info using node@v6.9.4 +4 verbose run-script [ 'prestart', 'start', 'poststart' ] +5 info lifecycle @~prestart: @ +6 silly lifecycle @~prestart: no script for prestart, continuing +7 info lifecycle @~start: @ +8 verbose lifecycle @~start: unsafe-perm in lifecycle true +9 verbose lifecycle @~start: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\rms13\Documents\GitHub\Project2-Toolbox-Functions\node_modules\.bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\nodejs\;C:\Users\rms13\AppData\Local\Microsoft\WindowsApps;C:\Users\rms13\AppData\Roaming\npm;C:\Users\rms13\AppData\Local\atom\bin +10 verbose lifecycle @~start: CWD: C:\Users\rms13\Documents\GitHub\Project2-Toolbox-Functions +11 silly lifecycle @~start: Args: [ '/d /s /c', 'webpack-dev-server --hot --inline' ] +12 silly lifecycle @~start: Returned: code: 3221225786 signal: null +13 info lifecycle @~start: Failed to exec start script +14 verbose stack Error: @ start: `webpack-dev-server --hot --inline` +14 verbose stack Exit status 3221225786 +14 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16) +14 verbose stack at emitTwo (events.js:106:13) +14 verbose stack at EventEmitter.emit (events.js:191:7) +14 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14) +14 verbose stack at emitTwo (events.js:106:13) +14 verbose stack at ChildProcess.emit (events.js:191:7) +14 verbose stack at maybeClose (internal/child_process.js:877:16) +14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) +15 verbose pkgid @ +16 verbose cwd C:\Users\rms13\Documents\GitHub\Project2-Toolbox-Functions +17 error Windows_NT 10.0.14393 +18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start" +19 error node v6.9.4 +20 error npm v3.10.10 +21 error code ELIFECYCLE +22 error @ start: `webpack-dev-server --hot --inline` +22 error Exit status 3221225786 +23 error Failed at the @ start script 'webpack-dev-server --hot --inline'. +23 error Make sure you have the latest version of node.js and npm installed. +23 error If you do, this is most likely a problem with the package, +23 error not with npm itself. +23 error Tell the author that this fails on your system: +23 error webpack-dev-server --hot --inline +23 error You can get information on how to open an issue for this project with: +23 error npm bugs +23 error Or if that isn't available, you can get their info via: +23 error npm owner ls +23 error There is likely additional logging output above. +24 verbose exit [ 1, true ] diff --git a/package.json b/package.json index c80e8a3..cde25c8 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "scripts": { "start": "webpack-dev-server --hot --inline", "build": "webpack", - "deploy": "rm -rf npm-debug.log && git checkout master && git commit -am 'update' && gh-pages-deploy" + "deploy": "gh-pages-deploy" }, "gh-pages-deploy": { "prep": [ From 0e8ac2f138c0fa29c9c74ad70f45f46bc07c2e01 Mon Sep 17 00:00:00 2001 From: rms13 Date: Tue, 7 Feb 2017 18:32:18 -0500 Subject: [PATCH 5/5] fixed path --- npm-debug.log | 47 ----------------------------------------------- src/main.js | 4 ++-- 2 files changed, 2 insertions(+), 49 deletions(-) delete mode 100644 npm-debug.log diff --git a/npm-debug.log b/npm-debug.log deleted file mode 100644 index 8dcf97a..0000000 --- a/npm-debug.log +++ /dev/null @@ -1,47 +0,0 @@ -0 info it worked if it ends with ok -1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', -1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', -1 verbose cli 'start' ] -2 info using npm@3.10.10 -3 info using node@v6.9.4 -4 verbose run-script [ 'prestart', 'start', 'poststart' ] -5 info lifecycle @~prestart: @ -6 silly lifecycle @~prestart: no script for prestart, continuing -7 info lifecycle @~start: @ -8 verbose lifecycle @~start: unsafe-perm in lifecycle true -9 verbose lifecycle @~start: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\rms13\Documents\GitHub\Project2-Toolbox-Functions\node_modules\.bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\nodejs\;C:\Users\rms13\AppData\Local\Microsoft\WindowsApps;C:\Users\rms13\AppData\Roaming\npm;C:\Users\rms13\AppData\Local\atom\bin -10 verbose lifecycle @~start: CWD: C:\Users\rms13\Documents\GitHub\Project2-Toolbox-Functions -11 silly lifecycle @~start: Args: [ '/d /s /c', 'webpack-dev-server --hot --inline' ] -12 silly lifecycle @~start: Returned: code: 3221225786 signal: null -13 info lifecycle @~start: Failed to exec start script -14 verbose stack Error: @ start: `webpack-dev-server --hot --inline` -14 verbose stack Exit status 3221225786 -14 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16) -14 verbose stack at emitTwo (events.js:106:13) -14 verbose stack at EventEmitter.emit (events.js:191:7) -14 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14) -14 verbose stack at emitTwo (events.js:106:13) -14 verbose stack at ChildProcess.emit (events.js:191:7) -14 verbose stack at maybeClose (internal/child_process.js:877:16) -14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) -15 verbose pkgid @ -16 verbose cwd C:\Users\rms13\Documents\GitHub\Project2-Toolbox-Functions -17 error Windows_NT 10.0.14393 -18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start" -19 error node v6.9.4 -20 error npm v3.10.10 -21 error code ELIFECYCLE -22 error @ start: `webpack-dev-server --hot --inline` -22 error Exit status 3221225786 -23 error Failed at the @ start script 'webpack-dev-server --hot --inline'. -23 error Make sure you have the latest version of node.js and npm installed. -23 error If you do, this is most likely a problem with the package, -23 error not with npm itself. -23 error Tell the author that this fails on your system: -23 error webpack-dev-server --hot --inline -23 error You can get information on how to open an issue for this project with: -23 error npm bugs -23 error Or if that isn't available, you can get their info via: -23 error npm owner ls -23 error There is likely additional logging output above. -24 verbose exit [ 1, true ] diff --git a/src/main.js b/src/main.js index 0da17ef..90e39ae 100755 --- a/src/main.js +++ b/src/main.js @@ -51,7 +51,7 @@ function onLoad(framework) { // set skybox var loader = new THREE.CubeTextureLoader(); - var urlPrefix = '/images/skymap/'; + var urlPrefix = 'images/skymap/'; var skymap = new THREE.CubeTextureLoader().load([ urlPrefix + 'px.jpg', urlPrefix + 'nx.jpg', @@ -63,7 +63,7 @@ function onLoad(framework) { // load a simple obj mesh var objLoader = new THREE.OBJLoader(); - objLoader.load('/geo/feather.obj', function(obj) { + objLoader.load('geo/feather.obj', function(obj) { // LOOK: This function runs after the obj has finished loading var featherGeo = obj.children[0].geometry;