This file contains 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 createHmac = require("crypto").createHmac; | |
const APP_SECRET = "<APP_SECRET>"; | |
/** | |
* Validates the signature provided by FBInstant.player.getSignedPlayerInfoAsync() | |
* @param {string} signedPayload returned by getSignature() after | |
* @returns response payload as a JSON object; otherwise, returns undefined. | |
* @see https://developers.facebook.com/docs/games/instant-games/sdk/fbinstant6.1/#signedplayerinfo | |
*/ | |
function validateSignedPlayerInfo(signedPayload) { |
This file contains 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 { guid } from '../shared/stringutils'; | |
import { READONLY_ERR_MSG } from './constants'; | |
/** | |
* Components add specific behaviors to their GameObjects through composition. | |
* Components typically span diverse domains from AI and rendering to physics. | |
* This provides a means for them to coexist within a single entity with | |
* minimal coupling. | |
* | |
* @see GameObject |
This file contains 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 { Dictionary, ErrorCallback, parallel } from 'async'; | |
import { AnimationParser, Cache } from 'phaser'; | |
import { Client } from './client'; | |
/** | |
* pending texture atlas 'complete' callbacks | |
*/ | |
const pending: Dictionary<ErrorCallback<string>> = {}; | |
/** |
This file contains 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
/** | |
* Browserify Typescript with sourcemaps that Webstorm can use. | |
* The other secret ingredient is to map the source directory to the | |
* remote directory through Webstorm's "Edit Configurations" dialog. | |
*/ | |
'use strict'; | |
var gulp = require('gulp'), | |
browserify = require('browserify'), | |
tsify = require('tsify'), |