Skip to content

Commit

Permalink
Merge pull request #33 from goodtimes-code/newideas
Browse files Browse the repository at this point in the history
Define stars amount via UI
  • Loading branch information
goodtimes-code authored Feb 5, 2024
2 parents b3f8a16 + d8fa8c4 commit b47837d
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osc-receiver/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class StaticStars(LaserObject):
def __init__(self, group=0):
super().__init__()
self.group = group
self.star_count = global_data.parameters.get('stars_amount', 8) # Default to 50 stars if not specified
self.star_count = int(global_data.parameters.get('stars_amount', 8)) # Default to 50 stars if not specified
self.generate_stars()

def generate_stars(self):
Expand All @@ -235,7 +235,7 @@ def generate_stars(self):

def update(self):
if 'stars_amount' in global_data.parameters and self.star_count != global_data.parameters['stars_amount']:
self.star_count = global_data.parameters['stars_amount']
self.star_count = int(global_data.parameters['stars_amount'])
self.generate_stars()
super().update()

Expand Down
89 changes: 89 additions & 0 deletions osc-senders/open-stage-control/osc2laser-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,95 @@
"onCreate": "",
"onValue": "",
"onTouch": ""
},
{
"type": "text",
"top": 410,
"left": 300,
"lock": false,
"id": "effect_parameters_stars_header",
"visible": true,
"comments": "",
"width": 100,
"height": 40,
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "Stars",
"css": "",
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"decimals": 2,
"target": "",
"onCreate": "",
"onValue": "",
"vertical": false,
"wrap": false,
"align": "center"
},
{
"type": "knob",
"top": 450,
"left": 300,
"lock": false,
"id": "parameter_stars_amount",
"visible": true,
"interaction": true,
"comments": "",
"width": 100,
"height": 70,
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "Amount",
"css": "",
"value": 5,
"default": 5,
"linkId": "",
"address": "/parameters/stars_amount",
"preArgs": "",
"typeTags": "",
"decimals": 0,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": "",
"design": "default",
"pips": false,
"dashed": false,
"angle": 270,
"mode": "vertical",
"spring": false,
"doubleTap": false,
"range": {
"min": 3,
"max": 1000
},
"logScale": false,
"sensitivity": 0.05,
"steps": "",
"origin": "auto",
"onTouch": ""
}
],
"tabs": []
Expand Down

0 comments on commit b47837d

Please sign in to comment.