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,30 +9,19 @@ 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;
div { border-radius: 3px;
// position: relative; flex-shrink: 0;
// top: 5px;
// left: 5px;
width: 0;
height: 0;
// border-left: 8px solid red;
border-bottom: 12px solid transparent;
// border-radius: 8px;
} }
}
div.behavior-item-root {
display: flex;
div.behavior-icon-view { div.behavior-icon-view {
height: $behavior-item-height; height: $behavior-item-height;
@ -49,9 +38,8 @@ div.behavior-list {
} }
div.behavior-content-view { div.behavior-content-view {
width: calc( 100% - 50px ); width: calc( 100% - 68px );
padding-right: 5px; max-width: 100px;
max-width: 125px;
height: $behavior-item-height; height: $behavior-item-height;
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -104,11 +92,10 @@ div.behavior-list {
} }
} }
} }
}
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,10 +111,10 @@ 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>
@ -123,9 +122,8 @@ class BehaviorList extends Component<IBehaviorListProps & IMixinSettingProps> {
{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,7 +69,8 @@ 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; this.alignTimer += durTime;
if (this.alignTimer > (1 / this.fps)) { if (this.alignTimer > (1 / this.fps)) {
this.model.update(this.alignTimer * this.speed); this.model.update(this.alignTimer * this.speed);
@ -77,7 +78,6 @@ class Actuator extends Emitter<IActuatorEvent> {
this.alignTimer = 0; this.alignTimer = 0;
} }
} }
}
} else { } else {
this.emit("loop", Infinity); this.emit("loop", Infinity);
} }

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);