gate props and fixed the pins not beenig set to false bug

This commit is contained in:
Matei Adriel 2019-07-29 22:51:17 +03:00
parent f06fe88df5
commit 285248435a
33 changed files with 739 additions and 341 deletions
src/modules/saving/templates

View file

@ -0,0 +1,31 @@
import { PartialTemplate } from '../types/PartialTemplate'
import { delayProperties } from '../data/delayProperties'
/**
* The template of the sequentialDelayer gate
*/
const sequentialDelayerTemplate: PartialTemplate = {
metadata: {
name: 'Sequential delayer'
},
material: {
type: 'image',
fill: require('../../../assets/sequential')
},
code: {
activation: `
const i = context.get(0)
return new Promise((res, rej) => {
setTimeout(() => {
res()
},context.getProperty('delay'))
}).then(() => {
context.set(0,i)
})
`,
async: true
},
properties: delayProperties
}
export default sequentialDelayerTemplate