Merge pull request #11 from ericrius1/homereset

water can fixes (updated model and position) and new second hand
This commit is contained in:
James B. Pollack 2016-03-22 13:27:57 -07:00
commit 899d6e7c88
4 changed files with 21 additions and 14 deletions

View file

@ -14,6 +14,7 @@ var CLOCK_BODY_URL = "http://hifi-content.s3.amazonaws.com/DomainContent/Home/cu
var CLOCK_FACE_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/cuckooClock2_FACE.fbx";
var CLOCK_HOUR_HAND_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/cuckooClock2_HOUR_HAND.fbx";
var CLOCK_MINUTE_HAND_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/cuckooClock2_MINUTE_HAND.fbx";
var CLOCK_SECOND_HAND_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/secondHand.fbx";
MyCuckooClock = function(spawnPosition, spawnRotation) {
var clockBody, clockFace, clockMinuteHand, clockHourHand, clockSecondHand;
@ -23,7 +24,7 @@ MyCuckooClock = function(spawnPosition, spawnRotation) {
clockBody = Entities.addEntity({
type: "Model",
modelURL: CLOCK_BODY_URL,
name: "home_model_clockbody",
name: "hifi-home_model_clockbody",
animation: {
url: CLOCK_BODY_URL,
running: false,
@ -55,7 +56,7 @@ MyCuckooClock = function(spawnPosition, spawnRotation) {
clockFace = Entities.addEntity({
type: "Model",
parentID: clockBody,
name: "home_model_clockface",
name: "hifi-home_model_clockface",
modelURL: CLOCK_FACE_URL,
position: clockFacePosition,
dimensions: {
@ -91,7 +92,7 @@ MyCuckooClock = function(spawnPosition, spawnRotation) {
var ANGULAR_ROLL_SPEED_HOUR_RADIANS = 0.000029098833;
clockHourHand = Entities.addEntity({
type: "Model",
name: "home_model_clockHourHand",
name: "hifi-home_model_clockHourHand",
parentID: clockFace,
modelURL: CLOCK_HOUR_HAND_URL,
position: Vec3.sum(clockFacePosition, clockHandOffset),
@ -126,16 +127,16 @@ MyCuckooClock = function(spawnPosition, spawnRotation) {
secondRollDegrees = -seconds * DEGREES_FOR_SECOND;
var ANGULAR_ROLL_SPEED_SECOND_RADIANS = 0.10472
clockSecondHand = Entities.addEntity({
type: "Box",
type: "Model",
parentID: clockBody,
// modelURL: CLOCK_SECOND_HAND_URL,
name: "home_model_clockSecondHand",
modelURL: CLOCK_SECOND_HAND_URL,
name: "hifi-home_model_clockSecondHand",
position: Vec3.sum(clockFacePosition, clockHandOffset),
dimensions: {
x: 0.00263,
y: 0.0982,
z: 0.0024
},
// dimensions: {
// x: 0.00263,
// y: 0.0982,
// z: 0.0024
// },
color: {
red: 200,
green: 10,
@ -146,7 +147,7 @@ MyCuckooClock = function(spawnPosition, spawnRotation) {
y: 0.05,
z: 0.5
},
rotation: Quat.fromPitchYawRollDegrees(0, 0, secondRollDegrees),
// rotation: Quat.fromPitchYawRollDegrees(0, 0, secondRollDegrees),
angularDamping: 0,
angularVelocity: {
x: 0,
@ -169,7 +170,7 @@ MyCuckooClock = function(spawnPosition, spawnRotation) {
clockMinuteHand = Entities.addEntity({
type: "Model",
modelURL: CLOCK_MINUTE_HAND_URL,
name: "home_model_clockMinuteHand",
name: "hifi-home_model_clockMinuteHand",
parentID: clockFace,
position: Vec3.sum(clockFacePosition, clockHandOffset),
registrationPoint: {

View file

@ -69,7 +69,7 @@ Plant = function(spawnPosition, spawnRotation) {
});
var WATER_CAN_MODEL_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/waterCan.fbx?v1" + Math.random();
var WATER_CAN_MODEL_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/models/waterCan.fbx";
var waterCanPosition = Vec3.sum(plantPosition, Vec3.multiply(0.6, Quat.getRight(orientation)));
var waterCanRotation = orientation;
@ -92,6 +92,7 @@ Plant = function(spawnPosition, spawnRotation) {
y: -2.0,
z: 0
},
velocity: {x: -0, y: -0.2, z: 0},
rotation: waterCanRotation,
userData: JSON.stringify({
'hifiHomeKey': {

View file

@ -4,6 +4,7 @@
"collisionsWillMove": 1,
"compoundShapeURL": "http://hifi-content.s3.amazonaws.com/alan/dev/Trash-Can-4.obj",
"created": "2016-03-15T23:06:41Z",
"name": "hifi-home-model-trashcan",
"dimensions": {
"x": 0.4264354407787323,
"y": 0.50489801168441772,

View file

@ -148,6 +148,10 @@
x: 1099.8785,
y: 460.3115,
z: -84.7736
}, {
x: 0,
y: 0,
z: 0
});
var pingPongGun = new _PingPongGun({