mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 15:42:39 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into 20305
This commit is contained in:
commit
5949d01bbd
5 changed files with 25 additions and 26 deletions
|
@ -1,6 +1,7 @@
|
|||
(function(){
|
||||
var teleport;
|
||||
var portalDestination;
|
||||
var animationURL;
|
||||
|
||||
function playSound() {
|
||||
Audio.playSound(teleport, { volume: 0.40, localOnly: true });
|
||||
|
@ -11,6 +12,7 @@
|
|||
|
||||
var properties = Entities.getEntityProperties(entityID);
|
||||
portalDestination = properties.userData;
|
||||
animationURL = properties.modelURL;
|
||||
|
||||
print("The portal destination is " + portalDestination);
|
||||
}
|
||||
|
@ -25,7 +27,7 @@
|
|||
|
||||
this.leaveEntity = function(entityID) {
|
||||
Entities.editEntity(entityID, {
|
||||
animationURL: "http://hifi-public.s3.amazonaws.com/models/content/phonebooth.fbx",
|
||||
animationURL: animationURL,
|
||||
animationSettings: '{ "frameIndex": 1, "running": false }'
|
||||
});
|
||||
|
||||
|
@ -34,7 +36,7 @@
|
|||
|
||||
this.hoverEnterEntity = function(entityID) {
|
||||
Entities.editEntity(entityID, {
|
||||
animationURL: "http://hifi-public.s3.amazonaws.com/models/content/phonebooth.fbx",
|
||||
animationURL: animationURL,
|
||||
animationSettings: '{ "fps": 24, "firstFrame": 1, "lastFrame": 25, "frameIndex": 1, "running": true, "hold": true }'
|
||||
});
|
||||
};
|
||||
|
|
|
@ -105,37 +105,27 @@ function makeTable(pos) {
|
|||
}
|
||||
|
||||
function makeBalls(pos) {
|
||||
var colors = [{ red: 255, green: 255, blue: 0}, // Yellow
|
||||
{ red: 0, green: 0, blue: 255}, // Blue
|
||||
{ red: 255, green: 0, blue: 0}, // Red
|
||||
{ red: 128, green: 0, blue: 128}, // Purple
|
||||
{ red: 255, green: 165, blue: 0}, // Orange
|
||||
{ red: 0, green: 255, blue: 0}, // Green
|
||||
{ red: 128, green: 0, blue: 0}, // Maroon
|
||||
{ red: 0, green: 0, blue: 0}, // Black
|
||||
{ red: 255, green: 255, blue: 224}, // Light Yellow
|
||||
{ red: 173, green: 216, blue: 230}, // Light Blue
|
||||
{ red: 205, green: 92, blue: 92}, // Indian Red
|
||||
{ red: 218, green: 112, blue: 214}, // Orchid
|
||||
{ red: 218, green: 165, blue: 32}, // GoldenRod
|
||||
{ red: 255, green: 99, blue: 71}, // Tomato
|
||||
{ red: 128, green: 128, blue: 128}]; // Gray
|
||||
|
||||
// Object balls
|
||||
var whichBall = [ 1, 14, 15, 4, 8, 7, 12, 9, 3, 13, 10, 5, 6, 11, 2 ];
|
||||
var ballNumber = 0;
|
||||
var ballPosition = { x: pos.x + (LENGTH / 4.0) * SCALE, y: pos.y + HEIGHT / 2.0 + DROP_HEIGHT, z: pos.z };
|
||||
for (var row = 1; row <= 5; row++) {
|
||||
ballPosition.z = pos.z - ((row - 1.0) / 2.0 * (BALL_SIZE + BALL_GAP) * SCALE);
|
||||
for (var spot = 0; spot < row; spot++) {
|
||||
balls.push(Entities.addEntity(
|
||||
{ type: "Sphere",
|
||||
{ type: "Model",
|
||||
modelURL: "https://s3.amazonaws.com/hifi-public/models/props/Pool/ball_" + whichBall[ballNumber].toString() + ".fbx",
|
||||
position: ballPosition,
|
||||
dimensions: { x: BALL_SIZE * SCALE, y: BALL_SIZE * SCALE, z: BALL_SIZE * SCALE },
|
||||
color: colors[balls.length],
|
||||
rotation: Quat.fromPitchYawRollDegrees((Math.random() - 0.5) * 20, (Math.random() - 0.5) * 20, (Math.random() - 0.5) * 20),
|
||||
color: { red: 255, green: 255, blue: 255 },
|
||||
gravity: { x: 0, y: GRAVITY, z: 0 },
|
||||
ignoreCollisions: false,
|
||||
damping: 0.50,
|
||||
shapeType: 2,
|
||||
collisionsWillMove: true }));
|
||||
ballPosition.z += (BALL_SIZE + BALL_GAP) * SCALE;
|
||||
ballNumber++;
|
||||
}
|
||||
ballPosition.x += (BALL_GAP + Math.sqrt(3.0) / 2.0 * BALL_SIZE) * SCALE;
|
||||
}
|
||||
|
@ -143,7 +133,8 @@ function makeBalls(pos) {
|
|||
// Cue Ball
|
||||
cuePosition = { x: pos.x - (LENGTH / 4.0) * SCALE, y: pos.y + HEIGHT / 2.0 + DROP_HEIGHT, z: pos.z };
|
||||
cueBall = Entities.addEntity(
|
||||
{ type: "Sphere",
|
||||
{ type: "Model",
|
||||
modelURL: "https://s3.amazonaws.com/hifi-public/models/props/Pool/cue_ball.fbx",
|
||||
position: cuePosition,
|
||||
dimensions: { x: BALL_SIZE * SCALE, y: BALL_SIZE * SCALE, z: BALL_SIZE * SCALE },
|
||||
color: { red: 255, green: 255, blue: 255 },
|
||||
|
@ -152,6 +143,7 @@ function makeBalls(pos) {
|
|||
velocity: {x: 0, y: 0, z: 0 },
|
||||
ignoreCollisions: false,
|
||||
damping: 0.50,
|
||||
shapeType: 2,
|
||||
collisionsWillMove: true });
|
||||
|
||||
}
|
||||
|
|
|
@ -477,7 +477,7 @@ CameraManager = function() {
|
|||
// Last mode that was first or third person
|
||||
var lastAvatarCameraMode = "first person";
|
||||
Camera.modeUpdated.connect(function(newMode) {
|
||||
if (newMode == "first person" || newMode == "third person") {
|
||||
if (newMode != "independent") {
|
||||
lastAvatarCameraMode = newMode;
|
||||
that.disable(true);
|
||||
} else {
|
||||
|
|
|
@ -84,7 +84,7 @@ var users = [];
|
|||
var ctrlIsPressed = false;
|
||||
var ready = true;
|
||||
|
||||
var randomSounds = new SoundArray({}, true);
|
||||
var randomSounds = new SoundArray({ localOnly: true }, true);
|
||||
var numberOfSounds = 2;
|
||||
for (var i = 1; i <= numberOfSounds; i++) {
|
||||
randomSounds.addSound(HIFI_PUBLIC_BUCKET + "sounds/UI/notification-general" + i + ".raw");
|
||||
|
|
11
interface/external/faceshift/readme.txt
vendored
11
interface/external/faceshift/readme.txt
vendored
|
@ -13,9 +13,14 @@ You may optionally choose to place this folder in a location outside the reposit
|
|||
|
||||
If so our CMake find module expects you to set the ENV variable 'HIFI_LIB_DIR' to a directory containing a subfolder ‘faceshift’ that contains the lib and include folders.
|
||||
|
||||
1. Build a Faceshift static library from the fsbinarystream.cpp file. If you build a release version call it libfaceshift.a. The debug version should be called libfaceshiftd.a. Place this in the ‘lib’ folder in your Faceshift folder.
|
||||
1. Build a Faceshift static library from the fsbinarystream.cpp file.
|
||||
Windows: Win32 console application; no precompiled header or SDL checks; no ATL or MFC headers; Project Properties, Configuration Type = Static Library (.lib).
|
||||
|
||||
2. Copy the fsbinarystream.h header file from the Faceshift SDK into the ‘include’ folder in your Faceshift folder.
|
||||
2. Copy the library files to the ‘lib’ folder in your Faceshift folder.
|
||||
OSX: If you build a release version call it libfaceshift.a. The debug version should be called libfaceshiftd.a.
|
||||
Windows: The release and debug versions should be called faceshift.lib and faceshiftd.lib, respectively. Copy them into a ‘Win32’ folder in your ‘lib’ folder.
|
||||
|
||||
3. Clear your build directory, run cmake and build, and you should be all set.
|
||||
3. Copy the fsbinarystream.h header file from the Faceshift SDK into the ‘include’ folder in your Faceshift folder.
|
||||
|
||||
4. Clear your build directory, run cmake and build, and you should be all set.
|
||||
|
||||
|
|
Loading…
Reference in a new issue