aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSophie Zhang <sophie_zhang@brown.edu>2024-04-11 11:31:13 -0400
committerSophie Zhang <sophie_zhang@brown.edu>2024-04-11 11:31:13 -0400
commit4521dee394f9980a10e35d18cda5f4845eae97b3 (patch)
tree3835dac1b9afc7b38edcc7fd29d977ea1e3f43e9 /src
parentcd3176b1712ae23e41b2b428e23b39e6a4b32861 (diff)
started gpt effect timing integration
Diffstat (limited to 'src')
-rw-r--r--src/client/apis/gpt/customization.ts6
-rw-r--r--src/client/views/nodes/trails/PresBox.tsx1
2 files changed, 4 insertions, 3 deletions
diff --git a/src/client/apis/gpt/customization.ts b/src/client/apis/gpt/customization.ts
index 71467a1e1..8960bc651 100644
--- a/src/client/apis/gpt/customization.ts
+++ b/src/client/apis/gpt/customization.ts
@@ -22,19 +22,19 @@ export const addCustomizationProperty = (type: CustomizationType, name: string,
values ? prompts[type].features.push({ name, description, values }) : prompts[type].features.push({ name, description });
};
-export const gptSlideProperties = ['title', 'presentation_transition', 'presentation_effect', 'presentation_effectDirection', 'config_zoom'];
+export const gptSlideProperties = ['title', 'presentation_transition', 'presentation_effect', 'presentation_effectDirection', 'presEffectTiming', 'config_zoom'];
const setupPresSlideCustomization = () => {
addCustomizationProperty(CustomizationType.PRES_TRAIL_SLIDE, 'title', 'is the title/name of the slide.');
addCustomizationProperty(CustomizationType.PRES_TRAIL_SLIDE, 'presentation_transition', 'is a number in milliseconds for how long it should take to transition/move to a slide.');
- addCustomizationProperty(CustomizationType.PRES_TRAIL_SLIDE, 'presentation_effect', 'is an effect applied to the slide when we transition to it.', ['None', 'Fade in', 'Flip', 'Rotate', 'Bounce', 'Roll']);
+ addCustomizationProperty(CustomizationType.PRES_TRAIL_SLIDE, 'presentation_effect', 'is an effect applied to the slide when we transition to it.', ['None', 'Zoom', 'Fade in', 'Bounce', 'Flip', 'Rotate', 'Roll']);
addCustomizationProperty(CustomizationType.PRES_TRAIL_SLIDE, 'presentation_effectDirection', 'is what direction the effect is applied.', ['Enter from left', 'Enter from right', 'Enter from bottom', 'Enter from Top', 'Enter from center']);
- addCustomizationProperty(CustomizationType.PRES_TRAIL_SLIDE, 'config_zoom', 'is a number from 0 to 1.0 indicating the percentage we should zoom into the slide.');
addCustomizationProperty(
CustomizationType.PRES_TRAIL_SLIDE,
'presEffectTiming',
"is a json object of the format: {type: string, stiffness: number, damping: number, mass: number}. Type is always “custom”. Controls the spring-based timing of the presentation effect animation. Stiffness, damping, and mass control the physics-based properties of spring animations. This is used to create a more natural looking timing, bouncy effects, etc. Use spring physics to adjust these parameters to match the user's description of how they want to animate the effect."
);
+ addCustomizationProperty(CustomizationType.PRES_TRAIL_SLIDE, 'config_zoom', 'is a number from 0 to 1.0 indicating the percentage we should zoom into the slide.');
};
setupPresSlideCustomization();
diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx
index 3d13f0dde..b192dc3db 100644
--- a/src/client/views/nodes/trails/PresBox.tsx
+++ b/src/client/views/nodes/trails/PresBox.tsx
@@ -389,6 +389,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
// this.activeItem
for (let key in resObj) {
if (resObj[key]) {
+ console.log('typeof property', typeof resObj[key]);
this.activeItem[key] = resObj[key];
}
}