mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +02:00
CR
This commit is contained in:
parent
1a131b0e29
commit
9b5b83117f
3 changed files with 12 additions and 7 deletions
|
@ -19,6 +19,8 @@ Avatar.skeletonModelURL = "http://public.highfidelity.io/models/skeletons/Philip
|
||||||
|
|
||||||
// Set position here if playFromCurrentLocation is true
|
// Set position here if playFromCurrentLocation is true
|
||||||
Avatar.position = { x:1, y: 1, z: 1 };
|
Avatar.position = { x:1, y: 1, z: 1 };
|
||||||
|
Avatar.orientation = Quat.fromPitchYawRollDegrees(0, 0, 0);
|
||||||
|
Avatar.scale = 1.0;
|
||||||
|
|
||||||
Agent.isAvatar = true;
|
Agent.isAvatar = true;
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
Script.include("toolBars.js");
|
Script.include("toolBars.js");
|
||||||
|
|
||||||
var recordingFile = "recording.rec";
|
var recordingFile = "recording.rec";
|
||||||
|
var playFromCurrentLocation = true;
|
||||||
|
var loop = true;
|
||||||
|
|
||||||
var windowDimensions = Controller.getViewportDimensions();
|
var windowDimensions = Controller.getViewportDimensions();
|
||||||
var TOOL_ICON_URL = "http://s3-us-west-1.amazonaws.com/highfidelity-public/images/tools/";
|
var TOOL_ICON_URL = "http://s3-us-west-1.amazonaws.com/highfidelity-public/images/tools/";
|
||||||
|
@ -152,8 +154,8 @@ function mousePressEvent(event) {
|
||||||
if (MyAvatar.isPlaying()) {
|
if (MyAvatar.isPlaying()) {
|
||||||
MyAvatar.stopPlaying();
|
MyAvatar.stopPlaying();
|
||||||
} else {
|
} else {
|
||||||
MyAvatar.setPlayFromCurrentLocation(true);
|
MyAvatar.setPlayFromCurrentLocation(playFromCurrentLocation);
|
||||||
MyAvatar.setPlayerLoop(true);
|
MyAvatar.setPlayerLoop(loop);
|
||||||
MyAvatar.startPlaying(true);
|
MyAvatar.startPlaying(true);
|
||||||
}
|
}
|
||||||
} else if (saveIcon === toolBar.clicked(clickedOverlay)) {
|
} else if (saveIcon === toolBar.clicked(clickedOverlay)) {
|
||||||
|
@ -167,8 +169,7 @@ function mousePressEvent(event) {
|
||||||
if (!MyAvatar.isRecording()) {
|
if (!MyAvatar.isRecording()) {
|
||||||
recordingFile = Window.browse("Load recorcding from file", ".", "*.rec");
|
recordingFile = Window.browse("Load recorcding from file", ".", "*.rec");
|
||||||
if (recordingFile != "null") {
|
if (recordingFile != "null") {
|
||||||
} else {
|
MyAvatar.loadRecording(recordingFile);
|
||||||
MyAvatar.loadRecording(recordingFile);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -515,9 +515,6 @@ void writeRecordingToFile(RecordingPointer recording, QString filename) {
|
||||||
RecordingPointer readRecordingFromFile(RecordingPointer recording, QString filename) {
|
RecordingPointer readRecordingFromFile(RecordingPointer recording, QString filename) {
|
||||||
QElapsedTimer timer;
|
QElapsedTimer timer;
|
||||||
timer.start();
|
timer.start();
|
||||||
if (!recording) {
|
|
||||||
recording.reset(new Recording());
|
|
||||||
}
|
|
||||||
|
|
||||||
QByteArray byteArray;
|
QByteArray byteArray;
|
||||||
QUrl url(filename);
|
QUrl url(filename);
|
||||||
|
@ -544,6 +541,11 @@ RecordingPointer readRecordingFromFile(RecordingPointer recording, QString filen
|
||||||
byteArray = file.readAll();
|
byteArray = file.readAll();
|
||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!recording) {
|
||||||
|
recording.reset(new Recording());
|
||||||
|
}
|
||||||
|
|
||||||
QDataStream fileStream(byteArray);
|
QDataStream fileStream(byteArray);
|
||||||
|
|
||||||
fileStream >> recording->_timestamps;
|
fileStream >> recording->_timestamps;
|
||||||
|
|
Loading…
Reference in a new issue