-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
2,317 additions
and
1,234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-6XNCRD7QNC"></script> | ||
<link rel="icon" type="image/svg+xml" href="/synthesis-logo.svg" /> | ||
<link rel='stylesheet' href='https://static-dc.autodesk.net/etc/designs/v201808022224/templates-general/structure/fonts/artifakt/clientlibs/artifakt.css'/> | ||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Fission | Synthesis</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-6XNCRD7QNC"></script> | ||
<link rel="icon" type="image/svg+xml" href="/synthesis-logo.svg" /> | ||
<link | ||
rel="stylesheet" | ||
href="https://static-dc.autodesk.net/etc/designs/v201808022224/templates-general/structure/fonts/artifakt/clientlibs/artifakt.css" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" | ||
/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" /> | ||
<title>Fission | Synthesis</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 20 additions & 19 deletions
39
fission/src/systems/simulation/behavior/synthesis/GenericArmBehavior.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 20 additions & 19 deletions
39
fission/src/systems/simulation/behavior/synthesis/GenericElevatorBehavior.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
fission/src/systems/simulation/behavior/synthesis/SequenceableBehavior.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { SequentialBehaviorPreferences } from "@/systems/preferences/PreferenceTypes" | ||
import Driver from "../../driver/Driver" | ||
import Stimulus from "../../stimulus/Stimulus" | ||
import Behavior from "../Behavior" | ||
import InputSystem from "@/systems/input/InputSystem" | ||
|
||
abstract class SequenceableBehavior extends Behavior { | ||
private _jointIndex: number | ||
private _brainIndex: number | ||
private _sequentialConfig: SequentialBehaviorPreferences | undefined | ||
|
||
abstract maxVelocity: number | ||
|
||
public get jointIndex(): number { | ||
return this._jointIndex | ||
} | ||
|
||
constructor( | ||
jointIndex: number, | ||
brainIndex: number, | ||
drivers: Driver[], | ||
stimuli: Stimulus[], | ||
sequentialConfig: SequentialBehaviorPreferences | undefined | ||
) { | ||
super(drivers, stimuli) | ||
|
||
this._jointIndex = jointIndex | ||
this._brainIndex = brainIndex | ||
this._sequentialConfig = sequentialConfig | ||
} | ||
|
||
abstract applyInput: (velocity: number) => void | ||
|
||
public Update(_: number): void { | ||
const inputName = "joint " + (this._sequentialConfig?.parentJointIndex ?? this._jointIndex) | ||
const inverted = this._sequentialConfig?.inverted ?? false | ||
|
||
this.applyInput(InputSystem.getInput(inputName, this._brainIndex) * this.maxVelocity * (inverted ? -1 : 1)) | ||
} | ||
} | ||
|
||
export default SequenceableBehavior |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.