代码拉取完成,页面将自动刷新
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;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。