Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 40 additions & 3 deletions Lux/lux_files/kaleido.json
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,18 @@
"max": 9,
"distribution": "uniform",
"enabled": { "functions": [ "autoplay_switch" ] }
},
},
{
"name": "target_image_menu_generator",
"type": "generator_int",
"p": {"functions": ["autoplay_intensity", "autoplay_probability"]},
"a": 0,
"b": 9,
"min": 0,
"max": 9,
"distribution": "uniform",
"enabled": { "functions": [ "autoplay_switch" ] }
},
{
"name": "source_image_menu",
"type": "menu_string",
Expand All @@ -658,6 +669,32 @@
"name": "source_image_dim",
"type": "buffer_dim_fn",
"buf_name": { "functions": [ "source_image_menu" ] }
},
{
"name": "target_image_menu_generator",
"type": "generator_int",
"p": {"functions": ["autoplay_intensity", "autoplay_probability"]},
"a": 0,
"b": 9,
"min": 0,
"max": 9,
"distribution": "uniform",
"enabled": { "functions": [ "autoplay_switch" ] }
},
{
"name": "target_image_menu",
"type": "menu_string",
"tool": "image",
"label": "Target Image",
"description": "Choose an image to apply the transition rule to.",
"items": [ "Ada", "Apples", "Crab Nebula", "Earth", "Everest", "Flower", "Forest", "Hong Kong", "Lighthouse", "Sunrise" ],
"default_choice": 1,
"choice": { "functions": [ "target_image_menu_generator" ] }
},
{
"name": "source_image_dim",
"type": "buffer_dim_fn",
"buf_name": { "functions": [ "target_image_menu" ] }
}
],
"effects":
Expand Down Expand Up @@ -844,8 +881,8 @@
"widgets": [ "scope_menu", "funky_menu", "autoplay_switch", "autoplay_intensity"]
},
{
"name": "source_image_group",
"widgets": [ "source_image_menu" ]
"name": "image_group",
"widgets": [ "source_image_menu", "target_image_menu" ]
},
{
"name": "none_group",
Expand Down
4 changes: 2 additions & 2 deletions Lux/lux_react/src/components/CameraCapture.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ const CameraCapture = ({
if (typeof window.module.add_to_menu === 'function') {
window.module.add_to_menu('source_image_menu', imageName);
}
if (typeof window.module.update_source_name === 'function') {
window.module.update_source_name(imageName);
if (typeof window.module.update_chosen_image === 'function') {
window.module.update_chose_image("source_menu_image", imageName);
}

// Notify parent component
Expand Down
3 changes: 0 additions & 3 deletions Lux/lux_react/src/components/ControlPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,8 @@ function ControlPanel({ dimensions, panelSize, activePane, onPaneChange }) {
console.log(`Successfully loaded panel configuration with ${parsedJSON.length} widget groups`);
setPanelJSON(parsedJSON);

// Mark as initialized and restore slider values
setIsInitialized(true);

// Restore slider values after a short delay to ensure DOM is updated
setTimeout(() => {
restoreSliderValues();
}, 100);
Expand All @@ -160,7 +158,6 @@ function ControlPanel({ dimensions, panelSize, activePane, onPaneChange }) {
}
}, [moduleReady, storeSliderValues, callModuleFunction, restoreSliderValues]);

// Initialize the panel when the module becomes ready
useEffect(() => {
if (moduleReady && !hasSetupRun.current) {
hasSetupRun.current = true;
Expand Down
4 changes: 2 additions & 2 deletions Lux/lux_react/src/components/LiveCameraManager.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ class LiveCameraManager {
}

// Switch source to camera
if (typeof window.module.update_source_name === 'function') {
window.module.update_source_name('ultra_camera');
if (typeof window.module.update_chosen_image === 'function') {
window.module.update_chosen_image("source_image_menu", 'ultra_camera');
console.log('[LiveCamera] Switched source to ultra_camera');
}
}
Expand Down
Loading