diff --git a/src/api.js b/src/api.js index 1cfdf13d..b1fbb4c4 100644 --- a/src/api.js +++ b/src/api.js @@ -149,9 +149,6 @@ module.exports = class DanceAPI { changePropEachBy: (group, property, val) => { return nativeAPI.changePropEachBy(group, property, val); }, - ai: value => { - nativeAPI.ai(value); - }, }; } }; diff --git a/src/p5.dance.js b/src/p5.dance.js index 0372a2a3..3cf37daf 100644 --- a/src/p5.dance.js +++ b/src/p5.dance.js @@ -49,7 +49,6 @@ module.exports = class DanceParty { i18n = { measure: () => 'Measure:', }, - doAi, // For testing: Can provide a custom resource loader class // to load fixtures and/or isolate us entirely from network activity resourceLoader = new ResourceLoader(), @@ -109,8 +108,6 @@ module.exports = class DanceParty { this.world.SPRITE_NAMES = constants.SPRITE_NAMES; this.world.MOVE_NAMES = constants.MOVE_NAMES; - this.doAi = doAi; - if (spriteConfig) { spriteConfig(this.world); } @@ -1119,28 +1116,6 @@ module.exports = class DanceParty { }, this); } - ai(value) { - // We can use AI to transform this value into something usable by - // dance party and send that back over to dance party's native - // handler. - - const response = this.doAi(value); - console.log('do AI', value, response); - } - - handleAi(result) { - console.log('handle AI', result); - - const params = JSON.parse(result); - - this.setBackgroundEffect(params.backgroundEffect, params.backgroundColor); - this.setForegroundEffect(params.foregroundEffect); - - if (params.setDancer) { - this.makeNewDanceSprite('MOOSE', 'harold', null); - } - } - // Music Helpers getEnergy(range) {