Update motor SVG assets and connections
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
namespace pxsim.visuals {
|
||||
export class LargeMotorView extends ModuleView implements LayoutElement {
|
||||
|
||||
private static ROTATING_ECLIPSE_ID = "1eb2ae58-2419-47d4-86bf-4f26a7f0cf61";
|
||||
private static ROTATING_ECLIPSE_ID = "hole";
|
||||
|
||||
constructor(port: number) {
|
||||
super(LARGE_MOTOR_SVG, "large-motor", NodeType.LargeMotor, port);
|
||||
@ -20,14 +20,14 @@ namespace pxsim.visuals {
|
||||
|
||||
private setMotorAngle(angle: number) {
|
||||
const holeEl = this.content.getElementById(this.normalizeId(LargeMotorView.ROTATING_ECLIPSE_ID))
|
||||
const width = 34;
|
||||
const height = 34;
|
||||
const width = 125.92;
|
||||
const height = 37.9;
|
||||
const transform = `rotate(${angle} ${width / 2} ${height / 2})`;
|
||||
holeEl.setAttribute("transform", transform);
|
||||
}
|
||||
|
||||
getWiringRatio() {
|
||||
return 0.62;
|
||||
return 0.37;
|
||||
}
|
||||
}
|
||||
}
|
@ -6,7 +6,7 @@ namespace pxsim.visuals {
|
||||
|
||||
export class MediumMotorView extends ModuleView implements LayoutElement {
|
||||
|
||||
private static ROTATING_ECLIPSE_ID = "Hole";
|
||||
private static ROTATING_ECLIPSE_ID = "medmotor_Hole";
|
||||
|
||||
private hasPreviousAngle: boolean;
|
||||
private previousAngle: number;
|
||||
@ -30,9 +30,9 @@ namespace pxsim.visuals {
|
||||
|
||||
private setMotorAngle(angle: number) {
|
||||
const holeEl = this.content.getElementById(this.normalizeId(MediumMotorView.ROTATING_ECLIPSE_ID))
|
||||
const width = 47.9;
|
||||
const height = 47.2;
|
||||
const transform = `translate(-1.5 -1.49) rotate(${angle} ${width / 2} ${height / 2})`;
|
||||
const width = 44.45;
|
||||
const height = 44.45;
|
||||
const transform = `translate(2 1.84) rotate(${angle} ${width / 2} ${height / 2})`;
|
||||
holeEl.setAttribute("transform", transform);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user