This commit is contained in:
James B. Pollack 2016-03-30 17:28:31 -07:00
parent 0d1e7a478a
commit 265e1f0643
7 changed files with 30 additions and 42 deletions

View file

@ -38,22 +38,8 @@
script: TRANSFORMER_SCRIPT
}
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('at location: ' + JSON.stringify(transformerProps.position))
return this;
}

View file

@ -1,17 +1,16 @@
var fishTankPath = Script.resolvePath('atp:/fishTank/wrapper.js');
var fishTankPath = Script.resolvePath('wrapper.js');
Script.include(fishTankPath);
var center = Vec3.sum(Vec3.sum(MyAvatar.position, {
x: 0,
y: 0.5,
z: 0
}), Vec3.multiply(1, Quat.getFront(Camera.getOrientation())));
var fishTank = new FishTank(center, {
x: 0,
y: 0,
z: 0
});
var fishTankPath = Script.resolvePath('wrapper.js');
Script.include(fishTankPath);
var center = Vec3.sum(Vec3.sum(MyAvatar.position, {
x: 0,
y: 0.5,
z: 0
}), Vec3.multiply(1, Quat.getFront(Camera.getOrientation())));
var fishTank = new FishTank(center, {
x: 0,
y: 0,
z: 0
});
Script.scriptEnding.connect(function() {
fishtank.cleanup()
})
Script.scriptEnding.connect(function() {
fishtank.cleanup()
})

View file

@ -64,9 +64,9 @@ FishTank = function(spawnPosition, spawnRotation) {
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_VERTICAL_OFFSET = -0.12;
var ANEMONE_VERTICAL_OFFSET = -0.16;
var ANEMONE_MODEL_URL = 'atp:/fishTank/anemone.fbx';
var ANEMONE_ANIMATION_URL = 'atp:/fishTank/anemone.fbx';

View file

@ -10,7 +10,7 @@
// 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 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) {
var orientation;
if (spawnRotation !== undefined) {
@ -21,6 +21,7 @@ Plant = function(spawnPosition, spawnRotation) {
print("EBL ORIENTATION " + JSON.stringify(orientation));
var bowlPosition = spawnPosition;
var BOWL_MODEL_URL = "atp:/growingPlant/Flowers-Bowl.fbx";
var BOWL_COLLISION_HULL_URL = "atp:/growingPlant/bowl.obj";
var bowlDimensions = {
x: 0.518,
y: 0.1938,
@ -30,6 +31,8 @@ Plant = function(spawnPosition, spawnRotation) {
type: "Model",
modelURL: BOWL_MODEL_URL,
dimensions: bowlDimensions,
shapeType: 'compound',
compoundShapeURL: BOWL_COLLISION_HULL_URL,
name: "plant bowl",
position: bowlPosition,
userData: JSON.stringify({
@ -52,6 +55,7 @@ Plant = function(spawnPosition, spawnRotation) {
y: plantDimensions.y / 2,
z: 0
});
var plant = Entities.addEntity({
type: "Model",
modelURL: PLANT_MODEL_URL,
@ -67,15 +71,14 @@ Plant = function(spawnPosition, spawnRotation) {
}),
});
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 waterCanRotation = orientation;
var waterCan = Entities.addEntity({
type: "Model",
shapeType: 'box',
name: "hifi-water-can",
name: "hifi-water-can-newest",
modelURL: WATER_CAN_MODEL_URL,
script: WATER_CAN_SCRIPT_URL,
dimensions: {
@ -83,6 +86,8 @@ Plant = function(spawnPosition, spawnRotation) {
y: 0.2762,
z: 0.4115
},
shapeType: 'compound',
compoundShapeURL: WATER_CAN_COLLIISION_HULL_URL,
position: waterCanPosition,
collisionSoundURL: "atp:/growingPlant/watering_can_drop.L.wav",
angularDamping: 1,

View file

@ -49,7 +49,6 @@ HomeMusicBox = function(spawnPosition, spawnRotation) {
var LID_OFFSET = {
x: 0,
y: BASE_DIMENSIONS.y / 2,
// y: BASE_DIMENSIONS.y / 2 + (LID_DIMENSIONS.y / 2),
z: 0
};
@ -104,7 +103,7 @@ HomeMusicBox = function(spawnPosition, spawnRotation) {
modelURL: LID_MODEL_URL,
dimensions: LID_DIMENSIONS,
position: backPosition,
registrationPoint: LID_REGISTRATION_POINT,
registrationPoint: LID_REGISTRATION_POINT,
dynamic: false,
script: LID_SCRIPT_URL,
collidesWith: 'myAvatar,otherAvatar',

View file

@ -59,7 +59,7 @@
Reset.prototype = {
tidying: false,
preload: function(entityID) {
_this.entityID = entityID;
},
@ -297,7 +297,7 @@
var rotatorBlockProps = {
name: 'hifi-home-dressing-room-rotator-block',
type: 'Box',
visible: true,
visible: false,
color: {
red: 0,
green: 255,
@ -312,7 +312,7 @@
angularDamping: 0,
angularVelocity: {
x: 0,
y: 6,
y: 0.10472,
z: 0
},
dynamic: false,

View file

@ -60,7 +60,6 @@
preload: function(entityID) {
this.entityID = entityID;
VICTORY_SOUND = SoundCache.getSound("atp:/tiltMaze/levelUp.wav");
Script.update.connect(this.update);
},
startNearGrab: function() {