mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:25:52 +02:00
end of day
This commit is contained in:
parent
3929af7187
commit
2740391c3b
2 changed files with 19 additions and 18 deletions
|
@ -27,7 +27,7 @@ var TANK_SCRIPT = Script.resolvePath('tank.js?' + Math.random())
|
||||||
|
|
||||||
var TANK_MODEL_URL = "http://hifi-content.s3.amazonaws.com/DomainContent/Home/fishTank/aquarium-6.fbx";
|
var TANK_MODEL_URL = "http://hifi-content.s3.amazonaws.com/DomainContent/Home/fishTank/aquarium-6.fbx";
|
||||||
|
|
||||||
var BUBBLE_SYSTEM_FORWARD_OFFSET = TANK_DIMENSIONS.x ;
|
var BUBBLE_SYSTEM_FORWARD_OFFSET = TANK_DIMENSIONS.x;
|
||||||
//depth of tank
|
//depth of tank
|
||||||
var BUBBLE_SYSTEM_LATERAL_OFFSET = 0.15;
|
var BUBBLE_SYSTEM_LATERAL_OFFSET = 0.15;
|
||||||
var BUBBLE_SYSTEM_VERTICAL_OFFSET = -0.5;
|
var BUBBLE_SYSTEM_VERTICAL_OFFSET = -0.5;
|
||||||
|
@ -41,7 +41,7 @@ var BUBBLE_SYSTEM_DIMENSIONS = {
|
||||||
var BUBBLE_SOUND_URL = "http://hifi-content.s3.amazonaws.com/DomainContent/Home/Sounds/aquarium_small.L.wav";
|
var BUBBLE_SOUND_URL = "http://hifi-content.s3.amazonaws.com/DomainContent/Home/Sounds/aquarium_small.L.wav";
|
||||||
var bubbleSound = SoundCache.getSound(BUBBLE_SOUND_URL);
|
var bubbleSound = SoundCache.getSound(BUBBLE_SOUND_URL);
|
||||||
|
|
||||||
var URCHIN_FORWARD_OFFSET =-TANK_DIMENSIONS.x;
|
var URCHIN_FORWARD_OFFSET = -TANK_DIMENSIONS.x;
|
||||||
//depth of tank
|
//depth of tank
|
||||||
var URCHIN_LATERAL_OFFSET = -0.15;
|
var URCHIN_LATERAL_OFFSET = -0.15;
|
||||||
var URCHIN_VERTICAL_OFFSET = -0.37;
|
var URCHIN_VERTICAL_OFFSET = -0.37;
|
||||||
|
@ -54,10 +54,10 @@ var URCHIN_DIMENSIONS = {
|
||||||
z: 0.35
|
z: 0.35
|
||||||
}
|
}
|
||||||
|
|
||||||
var ROCKS_FORWARD_OFFSET = (TANK_DIMENSIONS.x/2)-0.75;
|
var ROCKS_FORWARD_OFFSET = (TANK_DIMENSIONS.x / 2) - 0.75;
|
||||||
//depth of tank
|
//depth of tank
|
||||||
var ROCKS_LATERAL_OFFSET = 0.0;
|
var ROCKS_LATERAL_OFFSET = 0.0;
|
||||||
var ROCKS_VERTICAL_OFFSET = (-TANK_DIMENSIONS.y/2)+0.25;
|
var ROCKS_VERTICAL_OFFSET = (-TANK_DIMENSIONS.y / 2) + 0.25;
|
||||||
|
|
||||||
var ROCK_MODEL_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/fishTank/Aquarium-Rocks-2.fbx';
|
var ROCK_MODEL_URL = 'http://hifi-content.s3.amazonaws.com/DomainContent/Home/fishTank/Aquarium-Rocks-2.fbx';
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ function createBubbleSystem() {
|
||||||
},
|
},
|
||||||
"emitDimensions": {
|
"emitDimensions": {
|
||||||
"x": -0.2,
|
"x": -0.2,
|
||||||
"y": 1.2000000000000002,
|
"y": 1.6000000000000002,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"polarStart": 0,
|
"polarStart": 0,
|
||||||
|
@ -144,7 +144,7 @@ function createBubbleSystem() {
|
||||||
bubbleProperties.position = finalOffset;
|
bubbleProperties.position = finalOffset;
|
||||||
|
|
||||||
bubbleSystem = Entities.addEntity(bubbleProperties);
|
bubbleSystem = Entities.addEntity(bubbleProperties);
|
||||||
//createBubbleSound(finalOffset);
|
createBubbleSound(finalOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ function getOffsetFromTankCenter(VERTICAL_OFFSET, FORWARD_OFFSET, LATERAL_OFFSET
|
||||||
|
|
||||||
function createBubbleSound(position) {
|
function createBubbleSound(position) {
|
||||||
var audioProperties = {
|
var audioProperties = {
|
||||||
volume: 0,
|
volume: 1,
|
||||||
position: position,
|
position: position,
|
||||||
loop: true
|
loop: true
|
||||||
};
|
};
|
||||||
|
@ -221,7 +221,7 @@ function createEntitiesAtCorners() {
|
||||||
},
|
},
|
||||||
collisionless: true,
|
collisionless: true,
|
||||||
position: bounds.brn,
|
position: bounds.brn,
|
||||||
visible:false
|
visible: false
|
||||||
}
|
}
|
||||||
|
|
||||||
var upperProps = {
|
var upperProps = {
|
||||||
|
@ -240,7 +240,7 @@ function createEntitiesAtCorners() {
|
||||||
},
|
},
|
||||||
collisionless: true,
|
collisionless: true,
|
||||||
position: bounds.tfl,
|
position: bounds.tfl,
|
||||||
visible:false
|
visible: false
|
||||||
}
|
}
|
||||||
|
|
||||||
lowerCorner = Entities.addEntity(lowerProps);
|
lowerCorner = Entities.addEntity(lowerProps);
|
||||||
|
@ -312,16 +312,16 @@ var data = {
|
||||||
}
|
}
|
||||||
|
|
||||||
//fisthank initialize has a different UUID than the model that i see
|
//fisthank initialize has a different UUID than the model that i see
|
||||||
Script.setTimeout(function(){
|
Script.setTimeout(function() {
|
||||||
print('CREATE TIMEOUT!!!')
|
print('CREATE TIMEOUT!!!')
|
||||||
print('TANK AT CREATE IS::: '+ fishTank)
|
print('TANK AT CREATE IS::: ' + fishTank)
|
||||||
print('DATA AT CREATE IS:::' + JSON.stringify(data));
|
print('DATA AT CREATE IS:::' + JSON.stringify(data));
|
||||||
|
|
||||||
setEntityCustomData(customKey, fishTank, data);
|
setEntityCustomData(customKey, fishTank, data);
|
||||||
// setEntityCustomData('grabbableKey', id, {
|
// setEntityCustomData('grabbableKey', id, {
|
||||||
// grabbable: false
|
// grabbable: false
|
||||||
// });
|
// });
|
||||||
},2000)
|
}, 2000)
|
||||||
|
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
var TANK_SEARCH_RADIUS = 5;
|
var TANK_SEARCH_RADIUS = 5;
|
||||||
var WANT_LOOK_DEBUG_LINE = false;
|
var WANT_LOOK_DEBUG_LINE = false;
|
||||||
var WANT_LOOK_DEBUG_SPHERE = true;
|
var WANT_LOOK_DEBUG_SPHERE = false;
|
||||||
|
|
||||||
var INTERSECT_COLOR = {
|
var INTERSECT_COLOR = {
|
||||||
red: 255,
|
red: 255,
|
||||||
|
@ -540,7 +540,8 @@
|
||||||
velocity.x *= -0.15
|
velocity.x *= -0.15
|
||||||
} else if (position.x > upperCorner.x) {
|
} else if (position.x > upperCorner.x) {
|
||||||
position.x = upperCorner.x;
|
position.x = upperCorner.x;
|
||||||
velocity.x *= -0.15 }
|
velocity.x *= -0.15
|
||||||
|
}
|
||||||
if (position.y < lowerCorner.y) {
|
if (position.y < lowerCorner.y) {
|
||||||
position.y = lowerCorner.y;
|
position.y = lowerCorner.y;
|
||||||
velocity.y *= -0.15
|
velocity.y *= -0.15
|
||||||
|
|
Loading…
Reference in a new issue