content/hifi-content/rebecca/zombies/aNjExplosionServer.js
2022-02-14 02:04:11 +01:00

50 lines
No EOL
1.5 KiB
JavaScript

(function () {
var Explosion = function() {
};
Explosion.prototype = {
remotelyCallable: ['createMannequin', 'createShatteredGlassPieces'],
createMannequin: function () {
print("creating mannequin");
Entities.addEntity({
dimensions: {
x: 0.5697039365768433,
y: 2.143354892730713,
z: 0.7674942016601562
},
modelURL: "http://content.highfidelity.com/baked/avatar_island/mannequin-2/baked/mannequin-2.baked.fbx",
name: "Flying Mannequin",
lifetime: 60,
velocity: { x: 2, y: -2, z: -1 },
angularVelocity: { x: 0.5, y: -0.5, z: -0.25 },
dynamic: true,
shapeType: "simple-hull",
gravity: { x: 0, y: -9.8, z: 0 },
alpha: 0.5,
position: {
x: 24.7291,
y: -4.4427,
z: -4.1873
},
rotation: {
w: -0.844480037689209,
x: 0.062058448791503906,
y: 0.5203174352645874,
z: -0.11076521873474121
},
type: "Model",
userData: "{\"grabbableKey\":{\"grabbable\":false}}"
});
// fade it out
},
createShatteredGlassPieces: function() {
}
};
return new Explosion();
});