mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 01:24:03 +02:00
Model and lightning showing up
This commit is contained in:
parent
e3608534cd
commit
44fd7e8c15
2 changed files with 7 additions and 6 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue