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
<SoundRecorder | |
style={{ flex: 1 }} | |
onComplete={this.soundRecorderComplete.bind(this)} | |
maxDurationMillis={150000} | |
completeButtonText={'Finished'} | |
/> |
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
// download and use react an react-dom from local directory | |
// to avoid conflicts with Expo version of react | |
import React from "./react.min"; | |
import ReactDOM from "./react-dom.min"; | |
import renderIf from "render-if"; | |
import dropin from "braintree-web-drop-in"; | |
import glamorous from "glamorous"; | |
import RNMessageChannel from "react-native-webview-messaging"; | |
const util = require("util"); |
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 path = require("path"); | |
const webpack = require("webpack"); | |
const HtmlWebpackPlugin = require("html-webpack-plugin"); | |
module.exports = { | |
entry: "./web/braintreeReact.js", | |
output: { | |
path: path.join(__dirname, "dist"), | |
filename: "[name].bundle.js" | |
}, |
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
import RNMessageChannel from "./react-native-webview-messaging"; | |
const dropin = require("braintree-web-drop-in"); | |
const submitButton = document.querySelector("#submit-button"); | |
let clientToken = ""; | |
const goBackButton = document.querySelector("#go-back-button"); | |
const noticeBox = document.querySelector("#notice-box"); | |
const loader = document.querySelector("#loader"); | |
// receive the tokenReceived event |
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 path = require('path'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin'); | |
module.exports = { | |
entry: './web/index.js', | |
output: { | |
path: path.join(__dirname, 'dist'), | |
filename: '[name].bundle.js', | |
}, |
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
/*********************************************************************************** | |
AWS Lambda boilerplate for API functions | |
This boilerplate is designed to be used with AWS API gateway and to return information | |
to a client | |
***********************************************************************************/ | |
const util = require("util"); | |
// - provide access to aws-sdk | |
//const AWS = require('aws-sdk'); |
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
render() { | |
return ( | |
<Expo.MapView.Marker | |
key={this.props.key} | |
coordinate={{ | |
latitude: this.props.location.loc[0], | |
longitude: this.props.location.loc[1], | |
}}> | |
<FontAwesome |
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
componentDidMount = () => { | |
let animation = this.requestAnimationFrame(this.animationLooper.bind(this)); | |
} | |
animationLooper = () => { | |
let now = Date.now(); | |
let deltaTime = now - this.state.then; | |
// user distance = time * rate to determine the amount the marker should grow or shrink | |
let growth = deltaTime / 1000 * this.state.markerGrowthSpeed; |
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
componentWillReceiveProps(nextProps) { | |
if (nextProps.location.distanceAverage < 10) { | |
this.setState({ loopSpeed: 10 }); | |
} | |
else if (nextProps.location.distanceAverage < 100) { | |
this.setState({ loopSpeed: 100 }); | |
} | |
else if (nextProps.location.distanceAverage < 1000) { | |
this.setState({ loopSpeed: 500 }); | |
} |
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 monster1 = require('../assets/sprites/monster/monster_walk01.png') | |
const monster2 = require('../assets/sprites/monster/monster_walk02.png') | |
const monster3 = require('../assets/sprites/monster/monster_walk03.png') | |
class LocationMarker extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
imageCounter: 0, |