Last active
June 9, 2018 00:33
-
-
Save lebek/b474986814fde3c6c62d9de0f78eb361 to your computer and use it in GitHub Desktop.
Transform Tool*
This file contains hidden or 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
Transform Tool* | |
Idle* | |
Trigger down with hover -> Move | |
Trigger down no hover -> Select | |
Move | |
Trigger released -> Idle | |
Snapping Enabled* | |
A-button down -> Snapping Disabled | |
Snapped | |
Snap target not in range -> Unsnapped | |
Animate to snap | |
Animation complete -> Snapped | |
Snap target not in range -> Unsnapped | |
Unsnapped* | |
Snap target in range -> Animate to snap | |
Snapping Disabled | |
A-button released -> Snapping Enabled | |
Select | |
Trigger released -> Idle | |
No Selection* | |
Hover object -> With Selection | |
With Selection |
This file contains hidden or 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
function sceneobject(top, left, color){ | |
return $("div", | |
{style: {position: "absolute", backgroundColor: "green", width: 50, height: 50, top: top, left: left}}, | |
); | |
} | |
function render(model){ | |
let current_state_name = model.active_states[0].name; | |
return $("div", | |
{onClick: function() {model.emit("Move")}, style: {border: "1px solid black", width: 400, height: 200}}, | |
sceneobject(100, 100, "green"), | |
sceneobject(50, 200, "black") | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment