Removed deprecated rat files

This commit is contained in:
ericrius1 2015-11-23 15:24:28 -08:00
parent 0f4e531be6
commit c36719cba7
2 changed files with 0 additions and 67 deletions

View file

@ -1,44 +0,0 @@
//
// Rat.js
// examples/toybox/entityScripts
//
// Created by Eric Levin on11/11/15.
// Copyright 2015 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
/*global Rat, print, MyAvatar, Entities, AnimationCache, SoundCache, Scene, Camera, Overlays, Audio, HMD, AvatarList, AvatarManager, Controller, UndoStack, Window, Account, GlobalServices, Script, ScriptDiscoveryService, LODManager, Menu, Vec3, Quat, AudioDevice, Paths, Clipboard, Settings, XMLHttpRequest, randFloat, randInt */
(function() {
var _this;
Rat = function() {
_this = this;
this.forceMultiplier = 1;
};
Rat.prototype = {
onShot: function(myId, params) {
var data = JSON.parse(params[0]);
var force = Vec3.multiply(data.forceDirection, this.forceMultiplier);
Entities.editEntity(this.entityID, {
velocity: force
});
Script.setTimeout(function() {
var vel = Entities.getEntityProperties(_this.entityID, 'velocity').velocity;
}, 1000);
},
preload: function(entityID) {
this.entityID = entityID;
},
};
// entity scripts always need to return a newly constructed object of our type
return new Rat();
});

View file

@ -1,23 +0,0 @@
var scriptURL = Script.resolvePath('rat.js');
var naturalDimensions = {x: 11.31, y: 3.18, z: 2.19};
var sizeScale = 0.2;
var dimensions = Vec3.multiply(naturalDimensions, sizeScale);
var center = Vec3.sum(MyAvatar.position, Vec3.multiply(3, Quat.getFront(Camera.getOrientation())));
var rat = Entities.addEntity({
type: "Model",
modelURL: "https://hifi-public.s3.amazonaws.com/ryan/rat.fbx",
name: 'rat',
position: center,
dimensions: dimensions,
shapeType: 'box',
color: {red: 200, green: 20, blue: 200},
gravity: {x: 0, y: -9.8, z: 0},
collisionsWillMove: true,
script: scriptURL
});
function cleanup() {
Entities.deleteEntity(rat);
}
Script.scriptEnding.connect(cleanup)