Add VisibleTouch.swift to your project then replace window instance variable declaration in AppDelegate.swift file:
var window: UIWindow?
with:
var window: UIWindow? = VisibleTouch.Window(frame: UIScreen.main.bounds)
| // Built with IMPACT - impactjs.org | |
| (function (window) { | |
| "use strict"; | |
| Number.prototype.map = function (istart, istop, ostart, ostop) { | |
| return ostart + (ostop - ostart) * ((this - istart) / (istop - istart)); | |
| }; | |
| Number.prototype.limit = function (min, max) { | |
| return Math.min(max, Math.max(min, this)); | |
| }; | |
| Number.prototype.round = function (precision) { |
| // | |
| // Draw a line with the given curve, and then resample it | |
| // to a new set of points. <step> is the distance to step | |
| // along the line when taking a new point. | |
| // | |
| function drawInterpolate(svg, points, step, curve) { | |
| curve = curve || d3.curveCatmullRom.alpha(1.0); | |
| step = step || 1; | |
| var lineFunc = d3.line() | |
| .curve(curve) |
| /** JSON Feed TypeScript Declaration | |
| * Spec Version: 1 | |
| */ | |
| declare namespace JSONFeed { | |
| const MIME_TYPE = 'application/json' | |
| type DATEstring = RFC3339string | |
| type IDstring = string |
| import * as React from 'react' | |
| import { Component } from 'react' | |
| import { PaperScope } from 'paper' | |
| export class PaperSetup extends Component<any, any> { | |
| constructor(props) { | |
| super(props) | |
| window['paper'] = new PaperScope() | |
| } |
| import Foundation | |
| // Extension allowing enum of Notification.Names. | |
| #if swift(>=3.0) | |
| extension Notification.Name: ExpressibleByStringLiteral { | |
| public init(stringLiteral value: String) { | |
| self.init(value) | |
| } |
| import * as AWS from 'aws-sdk' | |
| // extend S3 class via interface. | |
| // could not get class augmenting to work in time. maybe not be possible even. | |
| declare interface S3Extended extends AWS.S3 { | |
| // missing methods | |
| headBucket(params: any, callback?: (err: Error, data: any) => void): any; | |
| createBucket(params: any, callback?: (err: Error, data: any) => void): any; | |
| getBucketPolicy(params: any, callback?: (err: Error, data: any) => void): any; | |
| putBucketPolicy(params: any, callback?: (err: Error, data: any) => void): any; | |
| getBucketCors(params: any, callback?: (err: Error, data: any) => void): any; |
| var path = require('path'); | |
| var url = require('url'); | |
| var request = require('request'); | |
| var WebClient = require('@slack/client').WebClient; | |
| var token = process.env.SLACK_API_TOKEN || ''; | |
| var web = new WebClient(token); | |
| var s3Url = 'https://testbucket.s3-us-west-2.amazonaws.com/some/file/in/S3.mp4'; | |
| var s3Stream = // from s3.GetObject call |
| var path = require('path'); | |
| var url = require('url'); | |
| var request = require('request'); | |
| var WebClient = require('@slack/client').WebClient; | |
| var token = process.env.SLACK_API_TOKEN || ''; | |
| var web = new WebClient(token); | |
| var fileUrl = 'http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4'; | |
| var fileName = path.basename(url.parse(fileUrl).pathname); |
| const Async = require('async') | |
| const AWS = require('aws-sdk') | |
| const UUID = require('node-uuid') | |
| const config = require('./config') | |
| class S3 { | |
| constructor(options = {}) { | |
| if (!options.accessKey) throw new Error('required S3 accessKey missing'); | |
| if (!options.secretKey) throw new Error('required S3 secretKey missing'); |