-
Notifications
You must be signed in to change notification settings - Fork 8
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
1 parent
8490be9
commit d895deb
Showing
9 changed files
with
79 additions
and
33 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import json, options | ||
import frameos/types | ||
|
||
type | ||
AppConfig* = object | ||
duration*: float | ||
|
||
App* = ref object | ||
nodeId*: NodeId | ||
scene*: FrameScene | ||
appConfig*: AppConfig | ||
frameConfig*: FrameConfig | ||
|
||
proc init*(nodeId: NodeId, scene: FrameScene, appConfig: AppConfig): App = | ||
result = App( | ||
nodeId: nodeId, | ||
scene: scene, | ||
appConfig: appConfig, | ||
frameConfig: scene.frameConfig, | ||
) | ||
|
||
proc log*(self: App, message: string) = | ||
self.scene.logger.log(%*{"event": "setNextSleep:log", "message": message}) | ||
|
||
proc run*(self: App, context: ExecutionContext) = | ||
context.nextSleep = self.appConfig.duration | ||
self.log("Set sleep duration between renders to " & $context.nextSleep & " seconds") |
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,14 @@ | ||
{ | ||
"name": "Next sleep duration", | ||
"description": "Override the delay between renders", | ||
"category": "logic", | ||
"version": "1.0.0", | ||
"fields": [ | ||
{ | ||
"name": "duration", | ||
"type": "float", | ||
"required": true, | ||
"label": "Duration in seconds" | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import pixie, options, json, unicode | ||
import pixie, options, unicode | ||
|
||
import frameos/types | ||
import frameos/config | ||
|
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