mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Removed deprecated rat files
This commit is contained in:
parent
0f4e531be6
commit
c36719cba7
2 changed files with 0 additions and 67 deletions
|
@ -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();
|
||||
});
|
|
@ -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)
|
Loading…
Reference in a new issue