forked from NTUEELightDance/LightDance-Editor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EDITOR & SERVER] EDITOR-NTUEELightDance#520 (NTUEELightDance#527)
* add dancer layer to LED map * auto create effects when adding color * support new led map structure * attach led effects to models and allow model used by multiple dancers * support new led map and model-dancer structure in editor
- Loading branch information
Showing
48 changed files
with
5,990 additions
and
9,063 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import asyncio | ||
from dataclasses import dataclass | ||
from typing import Optional | ||
|
||
from ..client import client | ||
from ..core.models import ModelsArray | ||
from ..core.utils.convert import models_query_to_state | ||
from ..graphqls.queries import GET_MODELS, QueryModelPayload | ||
|
||
|
||
@dataclass | ||
class ModelAgent: | ||
async def get_models(self) -> Optional[ModelsArray]: | ||
try: | ||
response = await client.execute(QueryModelPayload, GET_MODELS) | ||
models = response["models"] | ||
|
||
return models_query_to_state(models) | ||
|
||
except asyncio.CancelledError: | ||
pass | ||
|
||
except Exception as e: | ||
print(e) | ||
|
||
return None | ||
|
||
|
||
model_agent = ModelAgent() |
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
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.