mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 01:36:26 +02:00
homereset
This commit is contained in:
parent
54a5b31930
commit
333abddeee
2 changed files with 12 additions and 7 deletions
|
@ -16,7 +16,9 @@
|
||||||
|
|
||||||
preload: function(entityID) {
|
preload: function(entityID) {
|
||||||
_this.entityID = entityID; // this.animation.isRunning = true;
|
_this.entityID = entityID; // this.animation.isRunning = true;
|
||||||
print("PRELOAD ENTITY SCRIPT!!!")
|
// print("ANIMATION!!! " + JSON.stringify(_this.animationURL));
|
||||||
|
Entities.editEntity(_this.entityID, {animation: {running: true}})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,11 +23,12 @@ MyCuckooClock = function(spawnPosition, spawnRotation) {
|
||||||
clockBody = Entities.addEntity({
|
clockBody = Entities.addEntity({
|
||||||
type: "Model",
|
type: "Model",
|
||||||
modelURL: CLOCK_BODY_URL,
|
modelURL: CLOCK_BODY_URL,
|
||||||
|
name: "home_model_clockbody",
|
||||||
animation: {
|
animation: {
|
||||||
url: CLOCK_BODY_URL,
|
url: CLOCK_BODY_URL,
|
||||||
running: true,
|
running: false,
|
||||||
currentFrame: 100,
|
currentFrame: 0,
|
||||||
loop: true
|
loop: false
|
||||||
},
|
},
|
||||||
position: spawnPosition,
|
position: spawnPosition,
|
||||||
dimensions: {
|
dimensions: {
|
||||||
|
@ -46,6 +47,7 @@ MyCuckooClock = function(spawnPosition, spawnRotation) {
|
||||||
var clockFacePosition = Vec3.sum(spawnPosition, clockFaceOffset);
|
var clockFacePosition = Vec3.sum(spawnPosition, clockFaceOffset);
|
||||||
clockFace = Entities.addEntity({
|
clockFace = Entities.addEntity({
|
||||||
type: "Model",
|
type: "Model",
|
||||||
|
name: "home_model_clockface",
|
||||||
modelURL: CLOCK_FACE_URL,
|
modelURL: CLOCK_FACE_URL,
|
||||||
animation: {
|
animation: {
|
||||||
url: CLOCK_FACE_URL,
|
url: CLOCK_FACE_URL,
|
||||||
|
@ -82,6 +84,7 @@ MyCuckooClock = function(spawnPosition, spawnRotation) {
|
||||||
var ANGULAR_ROLL_SPEED_HOUR_RADIANS = 0.000029098833;
|
var ANGULAR_ROLL_SPEED_HOUR_RADIANS = 0.000029098833;
|
||||||
clockHourHand = Entities.addEntity({
|
clockHourHand = Entities.addEntity({
|
||||||
type: "Model",
|
type: "Model",
|
||||||
|
name: "home_model_clockHourHand",
|
||||||
modelURL: CLOCK_HOUR_HAND_URL,
|
modelURL: CLOCK_HOUR_HAND_URL,
|
||||||
position: Vec3.sum(clockFacePosition, clockHandOffset),
|
position: Vec3.sum(clockFacePosition, clockHandOffset),
|
||||||
registrationPoint: {
|
registrationPoint: {
|
||||||
|
@ -113,6 +116,7 @@ MyCuckooClock = function(spawnPosition, spawnRotation) {
|
||||||
clockMinuteHand = Entities.addEntity({
|
clockMinuteHand = Entities.addEntity({
|
||||||
type: "Model",
|
type: "Model",
|
||||||
modelURL: CLOCK_MINUTE_HAND_URL,
|
modelURL: CLOCK_MINUTE_HAND_URL,
|
||||||
|
name: "home_model_clockMinuteHand",
|
||||||
position: Vec3.sum(clockFacePosition, clockHandOffset),
|
position: Vec3.sum(clockFacePosition, clockHandOffset),
|
||||||
registrationPoint: {
|
registrationPoint: {
|
||||||
x: 0.5,
|
x: 0.5,
|
||||||
|
@ -141,7 +145,8 @@ MyCuckooClock = function(spawnPosition, spawnRotation) {
|
||||||
var ANGULAR_ROLL_SPEED_SECOND_RADIANS = 0.10472
|
var ANGULAR_ROLL_SPEED_SECOND_RADIANS = 0.10472
|
||||||
clockSecondHand = Entities.addEntity({
|
clockSecondHand = Entities.addEntity({
|
||||||
type: "Box",
|
type: "Box",
|
||||||
// modelURL: CLOCK_MINUTE_HAND_URL,
|
// modelURL: CLOCK_SECOND_HAND_URL,
|
||||||
|
name: "home_model_clockSecondHand",
|
||||||
position: Vec3.sum(clockFacePosition, clockHandOffset),
|
position: Vec3.sum(clockFacePosition, clockHandOffset),
|
||||||
dimensions: {
|
dimensions: {
|
||||||
x: 0.00263,
|
x: 0.00263,
|
||||||
|
@ -169,8 +174,6 @@ MyCuckooClock = function(spawnPosition, spawnRotation) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print("EBL IM A CUCKOO CLOCK");
|
|
||||||
|
|
||||||
createClock();
|
createClock();
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
|
|
Loading…
Reference in a new issue