import * as Blockly from 'blockly/core'; import './language/loader'; import { Profile } from 'mixly'; import { PythonVariablesBlocks, PythonControlBlocks, PythonMathBlocks, PythonTextBlocks, PythonListsBlocks, PythonDictsBlocks, PythonLogicBlocks, PythonStorageBlocks, PythonProceduresBlocks, PythonTupleBlocks, PythonSetBlocks, PythonHtmlBlocks, PythonUtilityBlocks, PythonVariablesGenerators, PythonControlGenerators, PythonMathGenerators, PythonTextGenerators, PythonListsGenerators, PythonDictsGenerators, PythonLogicGenerators, PythonStorageGenerators, PythonProceduresGenerators, PythonTupleGenerators, PythonSetGenerators, PythonHtmlGenerators, PythonUtilityGenerators, Procedures, Variables, Python } from '@mixly/python'; import { PythonMixpyAIBlocks, PythonMixpyAlgorithmBlocks, PythonMixpyCommunicateBlocks, PythonMixpyCVBlocks, PythonMixpyDataBlocks, PythonMixpyDatastructureBlocks, PythonMixpyFactoryBlocks, PythonMixpyHardwareBlocks, PythonMixpyInoutBlocks, PythonMixpyIOTBlocks, PythonMixpyPinsBlocks, PythonMixpySerialBlocks, PythonMixpySKLearnBlocks, PythonMixpySystemBlocks, PythonMixpyTurtleBlocks, PythonMixpyAIGenerators, PythonMixpyAlgorithmGenerators, PythonMixpyCommunicateGenerators, PythonMixpyCVGenerators, PythonMixpyDataGenerators, PythonMixpyDatastructureGenerators, PythonMixpyFactoryGenerators, PythonMixpyHardwareGenerators, PythonMixpyInoutGenerators, PythonMixpyIOTGenerators, PythonMixpyPinsGenerators, PythonMixpySerialGenerators, PythonMixpySKLearnGenerators, PythonMixpySystemGenerators, PythonMixpyTurtleGenerators } from '@mixly/python-mixpy'; import { PythonPyodideSKLearnBlocks, PythonPyodideSKLearnGenerators, PythonTensorflowBlocks, PythonTensorflowGenerators } from './'; import './others/loader'; import sound from './others/sound.js'; import './css/color_mixpy_python_advance.css'; Object.assign(Blockly.Variables, Variables); Object.assign(Blockly.Procedures, Procedures); Blockly.Python = Python; Blockly.generator = Python; Profile.default = {}; Object.assign( Blockly.Blocks, PythonVariablesBlocks, PythonControlBlocks, PythonMathBlocks, PythonTextBlocks, PythonListsBlocks, PythonDictsBlocks, PythonLogicBlocks, PythonStorageBlocks, PythonProceduresBlocks, PythonTupleBlocks, PythonSetBlocks, PythonHtmlBlocks, PythonUtilityBlocks, PythonMixpyAIBlocks, PythonMixpyAlgorithmBlocks, PythonMixpyCommunicateBlocks, PythonMixpyCVBlocks, PythonMixpyDataBlocks, PythonMixpyDatastructureBlocks, PythonMixpyFactoryBlocks, PythonMixpyHardwareBlocks, PythonMixpyInoutBlocks, PythonMixpyIOTBlocks, PythonMixpyPinsBlocks, PythonMixpySerialBlocks, PythonMixpySKLearnBlocks, PythonMixpySystemBlocks, PythonMixpyTurtleBlocks, PythonPyodideSKLearnBlocks, PythonTensorflowBlocks ); Object.assign( Blockly.Python.forBlock, PythonVariablesGenerators, PythonControlGenerators, PythonMathGenerators, PythonTextGenerators, PythonListsGenerators, PythonDictsGenerators, PythonLogicGenerators, PythonStorageGenerators, PythonProceduresGenerators, PythonTupleGenerators, PythonSetGenerators, PythonHtmlGenerators, PythonUtilityGenerators, PythonMixpyAIGenerators, PythonMixpyAlgorithmGenerators, PythonMixpyCommunicateGenerators, PythonMixpyCVGenerators, PythonMixpyDataGenerators, PythonMixpyDatastructureGenerators, PythonMixpyFactoryGenerators, PythonMixpyHardwareGenerators, PythonMixpyInoutGenerators, PythonMixpyIOTGenerators, PythonMixpyPinsGenerators, PythonMixpySerialGenerators, PythonMixpySKLearnGenerators, PythonMixpySystemGenerators, PythonMixpyTurtleGenerators, PythonPyodideSKLearnGenerators, PythonTensorflowGenerators ); import { sound_play } from './blocks/sound/play/play.js'; import { sound_play_wait } from './blocks/sound/play/play_wait.js'; import { sound_stop_all } from './blocks/sound/play/sound_stop_all.js'; import { sound_effect_add } from './blocks/sound/effect/add.js'; import { sound_effect_set } from './blocks/sound/effect/sound_effect_set.js'; import { sound_effect_clear } from './blocks/sound/effect/sound_effect_clear.js'; import { sound_volume_add } from './blocks/sound/volume/add.js'; import { sound_volume_set } from './blocks/sound/volume/set.js'; import { sound_volume_get } from './blocks/sound/volume/get.js'; import { sound_record } from './blocks/sound/play/record.js'; import { sound_play_frequency } from './blocks/sound/play/play_frequency.js'; import { sound_play_frequency_no_duration } from './blocks/sound/play/play_frequency_no_duration.js'; import { sound_play_note_list } from './blocks/sound/play/play_note_list.js'; import { sound_note } from './blocks/sound/play/sound_note.js'; import { sound_play as sound_play_gen } from './generators/sound/play/play.js'; import { sound_play_wait as sound_play_wait_gen } from './generators/sound/play/play_wait.js'; import { sound_stop_all as sound_stop_all_gen } from './generators/sound/play/sound_stop_all.js'; import { sound_effect_add as sound_effect_add_gen } from './generators/sound/effect/add.js'; import { sound_effect_set as sound_effect_set_gen } from './generators/sound/effect/sound_effect_set.js'; import { sound_effect_clear as sound_effect_clear_gen } from './generators/sound/effect/sound_effect_clear.js'; import { sound_volume_add as sound_volume_add_gen } from './generators/sound/volume/add.js'; import { sound_volume_set as sound_volume_set_gen } from './generators/sound/volume/set.js'; import { sound_volume_get as sound_volume_get_gen } from './generators/sound/volume/get.js'; import { sound_record as sound_record_gen } from './generators/sound/play/record.js'; import { sound_play_frequency as sound_play_frequency_gen } from './generators/sound/play/play_frequency.js'; import { sound_play_frequency_no_duration as sound_play_frequency_no_duration_gen } from './generators/sound/play/play_frequency_no_duration.js'; import { sound_play_note_list as sound_play_note_list_gen } from './generators/sound/play/play_note_list.js'; import { sound_note as sound_note_gen } from './generators/sound/play/sound_note.js'; const soundBlocks = { sound_play, sound_play_wait, sound_stop_all, sound_effect_add, sound_effect_set, sound_effect_clear, sound_volume_add, sound_volume_set, sound_volume_get, sound_record, sound_play_frequency, sound_play_frequency_no_duration, sound_play_note_list, sound_note }; const soundGenerators = { sound_play: sound_play_gen, sound_play_wait: sound_play_wait_gen, sound_stop_all: sound_stop_all_gen, sound_effect_add: sound_effect_add_gen, sound_effect_set: sound_effect_set_gen, sound_effect_clear: sound_effect_clear_gen, sound_volume_add: sound_volume_add_gen, sound_volume_set: sound_volume_set_gen, sound_volume_get: sound_volume_get_gen, sound_record: sound_record_gen, sound_play_frequency: sound_play_frequency_gen, sound_play_frequency_no_duration: sound_play_frequency_no_duration_gen, sound_play_note_list: sound_play_note_list_gen, sound_note: sound_note_gen }; Object.assign(Blockly.Blocks, soundBlocks); Object.assign(Blockly.Python.forBlock, soundGenerators); window.sound = sound;