aiPptSemanticDesign.mjs 2.1 KB

12345678910111213141516171819202122232425
  1. import { modelDesignFixture } from './aiPptModelDesign.mjs'
  2. // 复现测试环境暴露的内容组织问题,图片仅为本地渲染测试资源。
  3. export function semanticDesignFixture(imageUrl) {
  4. const outline = modelDesignFixture(imageUrl)
  5. const set = (i, title, headline, points, composition, mode = 'text_only', presentation = 'plain') => {
  6. const page = outline.pages[i]
  7. Object.assign(page, { title, subtitle: '', bullets: points, studentContent: { headline, points }, classroomAction: {}, interaction: null,
  8. image: mode === 'generated_image' ? { url: imageUrl, width: 960, height: 720 } : undefined, requiredVisual: false, resourceBindings: [],
  9. visualPlan: { composition, visualMode: mode, textPresentation: presentation, visualShare: .55, imageNecessity: mode === 'generated_image' ? 'supporting' : 'none', imagePurpose: mode === 'generated_image' ? 'scene' : 'none' } })
  10. return page
  11. }
  12. set(0, '凤鸣山谷的故事', '听听山谷里的声音', [], 'full_scene')
  13. set(3, '风与虎(对比听)', '听听风和虎', ['风的声音:有时强,有时弱', '老虎的声音:又长又沉'], 'comparison', 'generated_image', 'cards')
  14. const structured = set(4, '比较两种声音', '哪种声音更长?', ['说说你的发现'], 'comparison')
  15. structured.studentContent.comparisonGroups = [{ label: '风', points: ['声音有时强,有时弱'] }, { label: '老虎', points: ['声音又长又沉'] }]
  16. structured.classroomAction.studentTask = '用手势表现声音'
  17. set(5, '模仿小演员', '学学它们的声音', ['学小鸟叫', '学蜜蜂嗡嗡', '学风吹树叶', '学老虎吼叫'], 'steps', 'native_diagram', 'steps')
  18. set(6, '动物节奏队', '给动物配节奏', ['老虎:X - | X -', '蜜蜂:XX XX | XX XX'], 'concept_grid', 'native_diagram', 'grid')
  19. const steps = set(7, '合作小乐队', '和伙伴一起试试', [], 'steps', 'native_diagram', 'steps')
  20. steps.studentContent.steps = ['两人轮流拍一拍', '一起完成节奏']
  21. steps.classroomAction.studentTask = '听到提示后一起开始'
  22. steps.bullets = ['旧正文不应再次混入步骤']
  23. return outline
  24. }