mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 03:50:16 +02:00
ControlledAC.js refactoring
This commit is contained in:
parent
f17af601ab
commit
b6c27588b6
1 changed files with 18 additions and 18 deletions
|
@ -38,11 +38,11 @@ var SHOW = 4;
|
||||||
var HIDE = 5;
|
var HIDE = 5;
|
||||||
var LOAD = 6;
|
var LOAD = 6;
|
||||||
|
|
||||||
Avatar.setPlayFromCurrentLocation(playFromCurrentLocation);
|
Recording.setPlayFromCurrentLocation(playFromCurrentLocation);
|
||||||
Avatar.setPlayerUseDisplayName(useDisplayName);
|
Recording.setPlayerUseDisplayName(useDisplayName);
|
||||||
Avatar.setPlayerUseAttachments(useAttachments);
|
Recording.setPlayerUseAttachments(useAttachments);
|
||||||
Avatar.setPlayerUseHeadModel(false);
|
Recording.setPlayerUseHeadModel(false);
|
||||||
Avatar.setPlayerUseSkeletonModel(useAvatarModel);
|
Recording.setPlayerUseSkeletonModel(useAvatarModel);
|
||||||
|
|
||||||
function setupEntityViewer() {
|
function setupEntityViewer() {
|
||||||
var entityViewerOffset = 10;
|
var entityViewerOffset = 10;
|
||||||
|
@ -96,25 +96,25 @@ function update(event) {
|
||||||
if (!Agent.isAvatar) {
|
if (!Agent.isAvatar) {
|
||||||
Agent.isAvatar = true;
|
Agent.isAvatar = true;
|
||||||
}
|
}
|
||||||
if (!Avatar.isPlaying()) {
|
if (!Recording.isPlaying()) {
|
||||||
Avatar.startPlaying();
|
Recording.startPlaying();
|
||||||
}
|
}
|
||||||
Avatar.setPlayerLoop(false);
|
Recording.setPlayerLoop(false);
|
||||||
break;
|
break;
|
||||||
case PLAY_LOOP:
|
case PLAY_LOOP:
|
||||||
print("Play loop");
|
print("Play loop");
|
||||||
if (!Agent.isAvatar) {
|
if (!Agent.isAvatar) {
|
||||||
Agent.isAvatar = true;
|
Agent.isAvatar = true;
|
||||||
}
|
}
|
||||||
if (!Avatar.isPlaying()) {
|
if (!Recording.isPlaying()) {
|
||||||
Avatar.startPlaying();
|
Recording.startPlaying();
|
||||||
}
|
}
|
||||||
Avatar.setPlayerLoop(true);
|
Recording.setPlayerLoop(true);
|
||||||
break;
|
break;
|
||||||
case STOP:
|
case STOP:
|
||||||
print("Stop");
|
print("Stop");
|
||||||
if (Avatar.isPlaying()) {
|
if (Recording.isPlaying()) {
|
||||||
Avatar.stopPlaying();
|
Recording.stopPlaying();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SHOW:
|
case SHOW:
|
||||||
|
@ -125,15 +125,15 @@ function update(event) {
|
||||||
break;
|
break;
|
||||||
case HIDE:
|
case HIDE:
|
||||||
print("Hide");
|
print("Hide");
|
||||||
if (Avatar.isPlaying()) {
|
if (Recording.isPlaying()) {
|
||||||
Avatar.stopPlaying();
|
Recording.stopPlaying();
|
||||||
}
|
}
|
||||||
Agent.isAvatar = false;
|
Agent.isAvatar = false;
|
||||||
break;
|
break;
|
||||||
case LOAD:
|
case LOAD:
|
||||||
print("Load");
|
print("Load");
|
||||||
if(clip_url !== null) {
|
if(clip_url !== null) {
|
||||||
Avatar.loadRecording(clip_url);
|
Recording.loadRecording(clip_url);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DO_NOTHING:
|
case DO_NOTHING:
|
||||||
|
@ -143,8 +143,8 @@ function update(event) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Avatar.isPlaying()) {
|
if (Recording.isPlaying()) {
|
||||||
Avatar.play();
|
Recording.play();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue