From 44fd7e8c154d84041a541cfe8a9dcae9008aa5be Mon Sep 17 00:00:00 2001 From: ericrius1 Date: Wed, 20 Jan 2016 11:57:33 -0800 Subject: [PATCH] Model and lightning showing up --- examples/flowArts/lightSaber/lightSaberEntityScript.js | 3 ++- examples/widgets/weatherBox.js | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/flowArts/lightSaber/lightSaberEntityScript.js b/examples/flowArts/lightSaber/lightSaberEntityScript.js index a86f471449..a23abcc695 100644 --- a/examples/flowArts/lightSaber/lightSaberEntityScript.js +++ b/examples/flowArts/lightSaber/lightSaberEntityScript.js @@ -105,7 +105,8 @@ alphaStart: 0.5, alphaFinish: 0.5, textures: "https://s3.amazonaws.com/hifi-public/eric/textures/particleSprites/beamParticle.png", - emitterShouldTrail: false + emitterShouldTrail: false, + lifetime: 1000 } this.beam = Entities.addEntity(props); diff --git a/examples/widgets/weatherBox.js b/examples/widgets/weatherBox.js index da2d6fc69c..f60bc52d6f 100644 --- a/examples/widgets/weatherBox.js +++ b/examples/widgets/weatherBox.js @@ -59,11 +59,10 @@ createLightningStrike(center) createLightningStrike(center) -function createLightningStrike(position) { - print("LIGHTNING STRIKE") +function createLightningStrike(basePosition) { var normal = Vec3.subtract(position, MyAvatar.position); normal.y = 0; - var textureURL = "file:///C:/Users/Eric/Desktop/lightning.png" + var textureURL = "http://localhost:8080/lightning.png" var linePoints = []; var normals = []; var strokeWidths = []; @@ -79,7 +78,7 @@ function createLightningStrike(position) { strokeWidths.push(strokeWidth); strokeWidths.push(strokeWidth); } - + var position = Vec3.sum(basePosition, {x: randFloat(-boxDimensions.x/8, boxDimensions.x/8), y: 0, z: randFloat(-boxDimensions.x/8, boxDimensions.x/8)}); bolt = Entities.addEntity({ type: "PolyLine", textures: textureURL, @@ -109,10 +108,11 @@ function createWeatherBox(position) { z: 1.11 }; boxDimensions = Vec3.multiply(naturalDimensions, 0.7); - var modelURL = "localhost:8080:weatherBox.fbx?v1" + Math.random(); + var modelURL = "http://localhost:8080/weatherBox.fbx?v1" + Math.random(); // var modelURL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/raveStick.fbx"; weatherBox = Entities.addEntity({ type: "Model", + name: "Weather Box", modelURL: modelURL, position: position, dimensions: boxDimensions