mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 03:37:49 +02:00
fixes
This commit is contained in:
parent
0d1e7a478a
commit
265e1f0643
7 changed files with 30 additions and 42 deletions
|
@ -38,22 +38,8 @@
|
||||||
script: TRANSFORMER_SCRIPT
|
script: TRANSFORMER_SCRIPT
|
||||||
}
|
}
|
||||||
var transformer = Entities.addEntity(transformerProps);
|
var transformer = Entities.addEntity(transformerProps);
|
||||||
// Script.setTimeout(function() {
|
|
||||||
// var actualProps = Entities.getEntityProperties(transformer);
|
|
||||||
// var quarterSize = Vec3.multiply(SHRINK_AMOUNT, actualProps.naturalDimensions);
|
|
||||||
// Entities.editEntity(transformer, {
|
|
||||||
// dimensions: quarterSize,
|
|
||||||
// visible:true,
|
|
||||||
// // velocity: {
|
|
||||||
// // x: 0,
|
|
||||||
// // y: -0.1,
|
|
||||||
// // z: 0
|
|
||||||
// // }
|
|
||||||
// });
|
|
||||||
// }, 1000)
|
|
||||||
|
|
||||||
print('CREATED TRANSFORMER' + transformer);
|
print('CREATED TRANSFORMER' + transformer);
|
||||||
// print('at location: ' + JSON.stringify(transformerProps.position))
|
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
|
@ -1,17 +1,16 @@
|
||||||
var fishTankPath = Script.resolvePath('atp:/fishTank/wrapper.js');
|
var fishTankPath = Script.resolvePath('wrapper.js');
|
||||||
var fishTankPath = Script.resolvePath('wrapper.js');
|
Script.include(fishTankPath);
|
||||||
Script.include(fishTankPath);
|
var center = Vec3.sum(Vec3.sum(MyAvatar.position, {
|
||||||
var center = Vec3.sum(Vec3.sum(MyAvatar.position, {
|
x: 0,
|
||||||
x: 0,
|
y: 0.5,
|
||||||
y: 0.5,
|
z: 0
|
||||||
z: 0
|
}), Vec3.multiply(1, Quat.getFront(Camera.getOrientation())));
|
||||||
}), Vec3.multiply(1, Quat.getFront(Camera.getOrientation())));
|
var fishTank = new FishTank(center, {
|
||||||
var fishTank = new FishTank(center, {
|
x: 0,
|
||||||
x: 0,
|
y: 0,
|
||||||
y: 0,
|
z: 0
|
||||||
z: 0
|
});
|
||||||
});
|
|
||||||
|
|
||||||
Script.scriptEnding.connect(function() {
|
Script.scriptEnding.connect(function() {
|
||||||
fishtank.cleanup()
|
fishtank.cleanup()
|
||||||
})
|
})
|
|
@ -64,9 +64,9 @@ FishTank = function(spawnPosition, spawnRotation) {
|
||||||
var bubbleSound = SoundCache.getSound(BUBBLE_SOUND_URL);
|
var bubbleSound = SoundCache.getSound(BUBBLE_SOUND_URL);
|
||||||
|
|
||||||
|
|
||||||
var ANEMONE_FORWARD_OFFSET = -TANK_DIMENSIONS.x+0.1;
|
var ANEMONE_FORWARD_OFFSET = -TANK_DIMENSIONS.x+0.06;
|
||||||
var ANEMONE_LATERAL_OFFSET = 0.2;
|
var ANEMONE_LATERAL_OFFSET = 0.2;
|
||||||
var ANEMONE_VERTICAL_OFFSET = -0.12;
|
var ANEMONE_VERTICAL_OFFSET = -0.16;
|
||||||
|
|
||||||
var ANEMONE_MODEL_URL = 'atp:/fishTank/anemone.fbx';
|
var ANEMONE_MODEL_URL = 'atp:/fishTank/anemone.fbx';
|
||||||
var ANEMONE_ANIMATION_URL = 'atp:/fishTank/anemone.fbx';
|
var ANEMONE_ANIMATION_URL = 'atp:/fishTank/anemone.fbx';
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
var PLANT_SCRIPT_URL = Script.resolvePath("atp:/growingPlant/growingPlantEntityScript.js");
|
var PLANT_SCRIPT_URL = Script.resolvePath("atp:/growingPlant/growingPlantEntityScript.js");
|
||||||
var WATER_CAN_SCRIPT_URL = Script.resolvePath("atp:/growingPlant/waterCanEntityScript.js");
|
var WATER_CAN_SCRIPT_URL = Script.resolvePath("atp:/growingPlant/waterCanEntityScript.js");
|
||||||
Plant = function(spawnPosition, spawnRotation) {
|
Plant = function(spawnPosition, spawnRotation) {
|
||||||
var orientation;
|
var orientation;
|
||||||
if (spawnRotation !== undefined) {
|
if (spawnRotation !== undefined) {
|
||||||
|
@ -21,6 +21,7 @@ Plant = function(spawnPosition, spawnRotation) {
|
||||||
print("EBL ORIENTATION " + JSON.stringify(orientation));
|
print("EBL ORIENTATION " + JSON.stringify(orientation));
|
||||||
var bowlPosition = spawnPosition;
|
var bowlPosition = spawnPosition;
|
||||||
var BOWL_MODEL_URL = "atp:/growingPlant/Flowers-Bowl.fbx";
|
var BOWL_MODEL_URL = "atp:/growingPlant/Flowers-Bowl.fbx";
|
||||||
|
var BOWL_COLLISION_HULL_URL = "atp:/growingPlant/bowl.obj";
|
||||||
var bowlDimensions = {
|
var bowlDimensions = {
|
||||||
x: 0.518,
|
x: 0.518,
|
||||||
y: 0.1938,
|
y: 0.1938,
|
||||||
|
@ -30,6 +31,8 @@ Plant = function(spawnPosition, spawnRotation) {
|
||||||
type: "Model",
|
type: "Model",
|
||||||
modelURL: BOWL_MODEL_URL,
|
modelURL: BOWL_MODEL_URL,
|
||||||
dimensions: bowlDimensions,
|
dimensions: bowlDimensions,
|
||||||
|
shapeType: 'compound',
|
||||||
|
compoundShapeURL: BOWL_COLLISION_HULL_URL,
|
||||||
name: "plant bowl",
|
name: "plant bowl",
|
||||||
position: bowlPosition,
|
position: bowlPosition,
|
||||||
userData: JSON.stringify({
|
userData: JSON.stringify({
|
||||||
|
@ -52,6 +55,7 @@ Plant = function(spawnPosition, spawnRotation) {
|
||||||
y: plantDimensions.y / 2,
|
y: plantDimensions.y / 2,
|
||||||
z: 0
|
z: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
var plant = Entities.addEntity({
|
var plant = Entities.addEntity({
|
||||||
type: "Model",
|
type: "Model",
|
||||||
modelURL: PLANT_MODEL_URL,
|
modelURL: PLANT_MODEL_URL,
|
||||||
|
@ -67,15 +71,14 @@ Plant = function(spawnPosition, spawnRotation) {
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var WATER_CAN_MODEL_URL = "atp:/growingPlant/waterCan.fbx";
|
var WATER_CAN_MODEL_URL = "atp:/growingPlant/waterCan.fbx";
|
||||||
|
var WATER_CAN_COLLIISION_HULL_URL = "atp:/growingPlant/can.obj";
|
||||||
|
|
||||||
var waterCanPosition = Vec3.sum(plantPosition, Vec3.multiply(0.6, Quat.getRight(orientation)));
|
var waterCanPosition = Vec3.sum(plantPosition, Vec3.multiply(0.6, Quat.getRight(orientation)));
|
||||||
var waterCanRotation = orientation;
|
var waterCanRotation = orientation;
|
||||||
var waterCan = Entities.addEntity({
|
var waterCan = Entities.addEntity({
|
||||||
type: "Model",
|
type: "Model",
|
||||||
shapeType: 'box',
|
name: "hifi-water-can-newest",
|
||||||
name: "hifi-water-can",
|
|
||||||
modelURL: WATER_CAN_MODEL_URL,
|
modelURL: WATER_CAN_MODEL_URL,
|
||||||
script: WATER_CAN_SCRIPT_URL,
|
script: WATER_CAN_SCRIPT_URL,
|
||||||
dimensions: {
|
dimensions: {
|
||||||
|
@ -83,6 +86,8 @@ Plant = function(spawnPosition, spawnRotation) {
|
||||||
y: 0.2762,
|
y: 0.2762,
|
||||||
z: 0.4115
|
z: 0.4115
|
||||||
},
|
},
|
||||||
|
shapeType: 'compound',
|
||||||
|
compoundShapeURL: WATER_CAN_COLLIISION_HULL_URL,
|
||||||
position: waterCanPosition,
|
position: waterCanPosition,
|
||||||
collisionSoundURL: "atp:/growingPlant/watering_can_drop.L.wav",
|
collisionSoundURL: "atp:/growingPlant/watering_can_drop.L.wav",
|
||||||
angularDamping: 1,
|
angularDamping: 1,
|
||||||
|
|
|
@ -49,7 +49,6 @@ HomeMusicBox = function(spawnPosition, spawnRotation) {
|
||||||
var LID_OFFSET = {
|
var LID_OFFSET = {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: BASE_DIMENSIONS.y / 2,
|
y: BASE_DIMENSIONS.y / 2,
|
||||||
// y: BASE_DIMENSIONS.y / 2 + (LID_DIMENSIONS.y / 2),
|
|
||||||
z: 0
|
z: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -104,7 +103,7 @@ HomeMusicBox = function(spawnPosition, spawnRotation) {
|
||||||
modelURL: LID_MODEL_URL,
|
modelURL: LID_MODEL_URL,
|
||||||
dimensions: LID_DIMENSIONS,
|
dimensions: LID_DIMENSIONS,
|
||||||
position: backPosition,
|
position: backPosition,
|
||||||
registrationPoint: LID_REGISTRATION_POINT,
|
registrationPoint: LID_REGISTRATION_POINT,
|
||||||
dynamic: false,
|
dynamic: false,
|
||||||
script: LID_SCRIPT_URL,
|
script: LID_SCRIPT_URL,
|
||||||
collidesWith: 'myAvatar,otherAvatar',
|
collidesWith: 'myAvatar,otherAvatar',
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
|
|
||||||
Reset.prototype = {
|
Reset.prototype = {
|
||||||
tidying: false,
|
tidying: false,
|
||||||
|
|
||||||
preload: function(entityID) {
|
preload: function(entityID) {
|
||||||
_this.entityID = entityID;
|
_this.entityID = entityID;
|
||||||
},
|
},
|
||||||
|
@ -297,7 +297,7 @@
|
||||||
var rotatorBlockProps = {
|
var rotatorBlockProps = {
|
||||||
name: 'hifi-home-dressing-room-rotator-block',
|
name: 'hifi-home-dressing-room-rotator-block',
|
||||||
type: 'Box',
|
type: 'Box',
|
||||||
visible: true,
|
visible: false,
|
||||||
color: {
|
color: {
|
||||||
red: 0,
|
red: 0,
|
||||||
green: 255,
|
green: 255,
|
||||||
|
@ -312,7 +312,7 @@
|
||||||
angularDamping: 0,
|
angularDamping: 0,
|
||||||
angularVelocity: {
|
angularVelocity: {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 6,
|
y: 0.10472,
|
||||||
z: 0
|
z: 0
|
||||||
},
|
},
|
||||||
dynamic: false,
|
dynamic: false,
|
||||||
|
|
|
@ -60,7 +60,6 @@
|
||||||
preload: function(entityID) {
|
preload: function(entityID) {
|
||||||
this.entityID = entityID;
|
this.entityID = entityID;
|
||||||
VICTORY_SOUND = SoundCache.getSound("atp:/tiltMaze/levelUp.wav");
|
VICTORY_SOUND = SoundCache.getSound("atp:/tiltMaze/levelUp.wav");
|
||||||
Script.update.connect(this.update);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
startNearGrab: function() {
|
startNearGrab: function() {
|
||||||
|
|
Loading…
Reference in a new issue