Compare commits

..

No commits in common. "7fbbcff9650bfad1b342701ce5629de0f7fef9b2" and "0f7657ad8381dfc4560b8d5d96034d0c9a2c44eb" have entirely different histories.

4 changed files with 96 additions and 111 deletions

View File

@ -9,106 +9,93 @@ div.behavior-list {
div.behavior-item { div.behavior-item {
margin: 5px; margin: 5px;
height: 45px; height: $behavior-item-height;
user-select: none; user-select: none;
border-radius: 3px; border-radius: 3px;
overflow: hidden;
cursor: pointer; cursor: pointer;
display: flex;
div.behavior-color-view { div.behavior-color-view {
height: 0; height: $behavior-item-height;
width: 100%; width: 3px;
min-width: 3px;
border-radius: 3px;
flex-shrink: 0;
}
div { div.behavior-icon-view {
// position: relative; height: $behavior-item-height;
// top: 5px; min-width: $behavior-item-height;
// left: 5px; width: $behavior-item-height;
width: 0; user-select: none;
height: 0; display: flex;
// border-left: 8px solid red; justify-content: center;
border-bottom: 12px solid transparent; align-items: center;
// border-radius: 8px;
}
}
div.behavior-item-root { i {
display: flex; font-size: 25px;
}
}
div.behavior-icon-view { div.behavior-content-view {
height: $behavior-item-height; width: calc( 100% - 68px );
min-width: $behavior-item-height; max-width: 100px;
width: $behavior-item-height; height: $behavior-item-height;
user-select: none; display: flex;
display: flex; justify-content: center;
justify-content: center; flex-direction: column;
align-items: center; align-items: stretch;
i { div.title-view {
font-size: 25px; white-space: nowrap;
} text-overflow: ellipsis;
} overflow: hidden;
width: 100%;
}
div.behavior-content-view { div.info-view {
width: calc( 100% - 50px ); white-space: nowrap;
padding-right: 5px; text-overflow: ellipsis;
max-width: 125px; overflow: hidden;
height: $behavior-item-height; width: 100%;
display: flex; opacity: .75;
justify-content: center; }
flex-direction: column; }
align-items: stretch;
div.title-view { div.behavior-action-view {
white-space: nowrap; height: $behavior-item-height;
text-overflow: ellipsis; min-width: 20px;
overflow: hidden; width: 20px;
width: 100%; flex-shrink: 0;
} display: flex;
flex-direction: column;
justify-content: center;
align-content: center;
align-items: center;
div.info-view { div.behavior-action-button {
white-space: nowrap; height: 100%;
text-overflow: ellipsis; width: 100%;
overflow: hidden; display: flex;
width: 100%; justify-content: center;
opacity: .75; align-items: center;
} user-select: none;
} cursor: pointer;
}
div.behavior-action-view { div.behavior-action-button.hover-red:hover i {
height: $behavior-item-height; color: $lt-red;
min-width: 20px; }
width: 20px;
flex-shrink: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-content: center;
align-items: center;
div.behavior-action-button { div.behavior-action-button.hover-blue:hover i {
height: 100%; color: $lt-blue;
width: 100%; }
display: flex; }
justify-content: center;
align-items: center;
user-select: none;
cursor: pointer;
}
div.behavior-action-button.hover-red:hover i {
color: $lt-red;
}
div.behavior-action-button.hover-blue:hover i {
color: $lt-blue;
}
}
}
} }
div.add-button { div.add-button {
width: 26px; width: 45px;
height: 26px; height: 45px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;

View File

@ -88,7 +88,6 @@ class BehaviorList extends Component<IBehaviorListProps & IMixinSettingProps> {
name = behavior.name; name = behavior.name;
color = behavior.color; color = behavior.color;
needLocal = false; needLocal = false;
info = behavior.behaviorName;
} }
if (behavior instanceof BehaviorRecorder) { if (behavior instanceof BehaviorRecorder) {
@ -112,21 +111,20 @@ class BehaviorList extends Component<IBehaviorListProps & IMixinSettingProps> {
this.isActionClick = false; this.isActionClick = false;
}} }}
> >
<div className="behavior-color-view"> <div
<div style={{ borderLeft: `12px solid ${color}` }}/> className="behavior-color-view"
</div> style={{ backgroundColor: color }}
<div className="behavior-item-root"> />
<div className="behavior-icon-view"> <div className="behavior-icon-view">
<Icon iconName={icon}/> <Icon iconName={icon}/>
</div> </div>
<div className="behavior-content-view"> <div className="behavior-content-view">
{this.renderTerm(behavior, name, "title-view", needLocal)} {this.renderTerm(behavior, name, "title-view", needLocal)}
{this.renderTerm(behavior, info, "info-view", true)} {this.renderTerm(behavior, info, "info-view", true)}
</div> </div>
{/* <div className="behavior-action-view"> <div className="behavior-action-view">
{this.renderActionButton(behavior)} {this.renderActionButton(behavior)}
</div> */} </div>
</div>
</div> </div>
} }

View File

@ -69,13 +69,13 @@ class Actuator extends Emitter<IActuatorEvent> {
// 丢帧判定 // 丢帧判定
if (durTime > 0.1) { if (durTime > 0.1) {
console.log("Actuator: Ticker dur time error. dropping...") console.log("Actuator: Ticker dur time error. dropping...")
} else { }
this.alignTimer += durTime;
if (this.alignTimer > (1 / this.fps)) { this.alignTimer += durTime;
this.model.update(this.alignTimer * this.speed); if (this.alignTimer > (1 / this.fps)) {
this.emit("loop", this.alignTimer); this.model.update(this.alignTimer * this.speed);
this.alignTimer = 0; this.emit("loop", this.alignTimer);
} this.alignTimer = 0;
} }
} }
} else { } else {

View File

@ -56,11 +56,11 @@ class SimulatorWeb extends Component {
this.status.newLabel().name = "New Label"; this.status.newLabel().name = "New Label";
this.status.newLabel().name = "Test Label 01"; this.status.newLabel().name = "Test Label 01";
let dynamic = this.status.model.addBehavior(AllBehaviors[0]); let dynamic = this.status.model.addBehavior(AllBehaviors[0]);
dynamic.name = "Dynamic"; dynamic.color = "rgb(250, 200, 80)"; dynamic.name = "dynamic";
let brownian = this.status.model.addBehavior(AllBehaviors[1]); let brownian = this.status.model.addBehavior(AllBehaviors[1]);
brownian.name = "Brownian"; brownian.color = "rgb(200, 80, 250)"; brownian.name = "brownian";
let boundary = this.status.model.addBehavior(AllBehaviors[2]); let boundary = this.status.model.addBehavior(AllBehaviors[2]);
boundary.name = "Boundary"; boundary.color = "rgb(80, 200, 250)"; boundary.name = "boundary";
boundary.parameter.range = this.status.model.allRangeLabel; boundary.parameter.range = this.status.model.allRangeLabel;
group.addBehavior(dynamic); group.addBehavior(dynamic);
group.addBehavior(brownian); group.addBehavior(brownian);