This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const THREE = require('three'); | |
| const { createCanvas, loadImage } = require('canvas') | |
| const { Blob, FileReader } = require('vblob'); | |
| // Patch global scope to imitate browser environment. | |
| global.window = global; | |
| global.Blob = Blob; | |
| global.FileReader = FileReader; | |
| global.THREE = THREE; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Promise.decide = Promise.decide || function(iterablePromises, decidingFunction) { | |
| // Assumes an iterable list of promises | |
| var listOfProxyPromises = [], listOfResponseObjects = []; | |
| for(var counter = 0; counter < iterablePromises.length; counter ++) { | |
| var generatePromiseProxyWrapper = function(pCounter) { | |
| return new Promise(function (resolve, reject) { |