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
hahah |
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 Eventbus from '../launcher/services/eventbus' | |
// This comes from https://developers.google.com/web/tools/workbox/guides/advanced-recipes | |
// It allows activating the new service worker right away on reload | |
if ('serviceWorker' in navigator) { | |
window.addEventListener('load', function () { | |
navigator.serviceWorker.register('/sbvr-service-worker.js') | |
.then(function (registration) { | |
// Track updates to the Service Worker. | |
if (!navigator.serviceWorker.controller) { |
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 { mapValues } from 'lodash4' | |
export function namespace(prefix, getters) { | |
return mapValues(getters, v => | |
(state) => { | |
const subState = state[prefix] | |
return v(subState) | |
} | |
) | |
} |
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
using UnityEngine; | |
using System.Collections; | |
using UnityEngine.EventSystems; | |
public class SetupPointerInterface : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler | |
{ | |
public void OnPointerEnter(PointerEventData eventData) | |
{ | |
Debug.Log("Pointer Enter"); | |
} |
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
function getSymbolInstanceForElement(hypeDocument, element, event) { | |
var symbolInstance = null; | |
var parentSymbolElement = element.parentNode; | |
while (symbolInstance == null && parentSymbolElement != null) { | |
symbolInstance = hypeDocument.getSymbolInstanceById(parentSymbolElement.id); | |
parentSymbolElement = parentSymbolElement.parentNode; | |
} | |
console.log(symbolInstance); | |
} |
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
/** | |
* Generate a unique id | |
*/ | |
export const generateId = (numbers = 7) => { | |
const uniqueKey = Math.random().toString(36).substr(2, (2 + numbers)) // should be unique because of the seed | |
return `_${uniqueKey}` | |
} |
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
export const castToNumber = (string) => parseInt(string) |
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
<script type="text/babel"> | |
import $ from 'jquery' | |
const tmpComponent = { | |
template: '<div><slot></div>', | |
} | |
module.exports = { | |
name: 'fader-tile', | |
props: { | |
duration: { |
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
<script> | |
let $ = require('jquery') | |
module.exports= { | |
props: { | |
src: { | |
required: true, | |
}, | |
hypeDocument: { | |
twoWay: true |