mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +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
|
||||
Avatar.position = { x:1, y: 1, z: 1 };
|
||||
Avatar.orientation = Quat.fromPitchYawRollDegrees(0, 0, 0);
|
||||
Avatar.scale = 1.0;
|
||||
|
||||
Agent.isAvatar = true;
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
Script.include("toolBars.js");
|
||||
|
||||
var recordingFile = "recording.rec";
|
||||
var playFromCurrentLocation = true;
|
||||
var loop = true;
|
||||
|
||||
var windowDimensions = Controller.getViewportDimensions();
|
||||
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()) {
|
||||
MyAvatar.stopPlaying();
|
||||
} else {
|
||||
MyAvatar.setPlayFromCurrentLocation(true);
|
||||
MyAvatar.setPlayerLoop(true);
|
||||
MyAvatar.setPlayFromCurrentLocation(playFromCurrentLocation);
|
||||
MyAvatar.setPlayerLoop(loop);
|
||||
MyAvatar.startPlaying(true);
|
||||
}
|
||||
} else if (saveIcon === toolBar.clicked(clickedOverlay)) {
|
||||
|
@ -167,8 +169,7 @@ function mousePressEvent(event) {
|
|||
if (!MyAvatar.isRecording()) {
|
||||
recordingFile = Window.browse("Load recorcding from file", ".", "*.rec");
|
||||
if (recordingFile != "null") {
|
||||
} else {
|
||||
MyAvatar.loadRecording(recordingFile);
|
||||
MyAvatar.loadRecording(recordingFile);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -515,9 +515,6 @@ void writeRecordingToFile(RecordingPointer recording, QString filename) {
|
|||
RecordingPointer readRecordingFromFile(RecordingPointer recording, QString filename) {
|
||||
QElapsedTimer timer;
|
||||
timer.start();
|
||||
if (!recording) {
|
||||
recording.reset(new Recording());
|
||||
}
|
||||
|
||||
QByteArray byteArray;
|
||||
QUrl url(filename);
|
||||
|
@ -544,6 +541,11 @@ RecordingPointer readRecordingFromFile(RecordingPointer recording, QString filen
|
|||
byteArray = file.readAll();
|
||||
file.close();
|
||||
}
|
||||
|
||||
if (!recording) {
|
||||
recording.reset(new Recording());
|
||||
}
|
||||
|
||||
QDataStream fileStream(byteArray);
|
||||
|
||||
fileStream >> recording->_timestamps;
|
||||
|
|
Loading…
Reference in a new issue