Skip to content

Instantly share code, notes, and snippets.

View mrmcpowned's full-sized avatar

Christopher Rodriguez mrmcpowned

View GitHub Profile
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
GamepadList {0: undefined, 1: Gamepad, 2: undefined, 3: undefined, length: 4}0: undefined1: Gamepadaxes: Array[4]buttons: Array[16]connected: trueid: "Xbox 360 Controller (XInput STANDARD GAMEPAD)"index: 1mapping: "standard"timestamp: 728__proto__: Gamepadaxes: (...)get axes: () { [native code] }arguments: nullcaller: nulllength: 0name: ""__proto__: Empty() {}apply: apply() { [native code] }arguments: nullbind: bind() { [native code] }call: call() { [native code] }caller: nullconstructor: Function() { [native code] }length: 0name: "Empty"toString: toString() { [native code] }__proto__: Object<function scope><function scope>Global: WindowInfinity: Infinity$: (e,t){return new x.fn.init(e,t,r)}AnalyserNode: AnalyserNode() { [native code] }AnimationEvent: AnimationEvent() { [native code] }ApplicationCache: ApplicationCache() { [native code] }ApplicationCacheErrorEvent: ApplicationCacheErrorEvent() { [native code] }Array: Array() { [native code] }ArrayBuffer: ArrayBuffer() { [native code] }Attr: Attr() { [native c
GamepadList {0: undefined, 1: Gamepad, 2: undefined, 3: undefined, length: 4}0: undefined1: Gamepadaxes: Array[4]buttons: Array[16]connected: trueid: "Xbox 360 Controller (XInput STANDARD GAMEPAD)"index: 1mapping: "standard"timestamp: 728__proto__: Gamepadaxes: (...)get axes: () { [native code] }arguments: nullcaller: nulllength: 0name: ""__proto__: Empty() {}apply: apply() { [native code] }arguments: nullbind: bind() { [native code] }call: call() { [native code] }caller: nullconstructor: Function() { [native code] }length: 0name: "Empty"toString: toString() { [native code] }__proto__: Object<function scope><function scope>Global: WindowInfinity: Infinity$: (e,t){return new x.fn.init(e,t,r)}AnalyserNode: AnalyserNode() { [native code] }AnimationEvent: AnimationEvent() { [native code] }ApplicationCache: ApplicationCache() { [native code] }ApplicationCacheErrorEvent: ApplicationCacheErrorEvent() { [native code] }Array: Array() { [native code] }ArrayBuffer: ArrayBuffer() { [native code] }Attr: Attr() { [native c
var gamepadsChanged = false;
for (var i = 0; i < rawGamepads.length; i++) {
if (typeof rawGamepads[i] != gamepadSupport.prevRawGamepadTypes[i]) {
gamepadsChanged = true;
gamepadSupport.prevRawGamepadTypes[i] = typeof rawGamepads[i];
}
if (rawGamepads[i]){
gamepadSupport.gamepads.push(rawGamepads[i]);
@mrmcpowned
mrmcpowned / custom gamepad css example.css
Last active September 30, 2023 14:26
Removed .custom.half as there will be no need for it in a future update, as well as removing margin-left and margin-top from .controller.custom for the same reasons
/*
-How to use Custom CSS for the GamePad Viewer-
https://gamepadviewer.com/
Enabling a custom CSS is as easy as adding &css=[url to css file]
to the end of the url like so:
https://gamepadviewer.com/?p=1&css=https://gist.github.com/anonymous/526491dc02014099cd14/raw/d7bb0477ba984f794497f3f0f82cb33484dc7889/ps3.css
If you're going to be using custom CSS for the gamepad viewer
to design your own skin, we're assuming you have some sort of
/*BEGIN Xbox One Controller Styling*/
.controller.custom{
background: url(http://mrmcpowned.com/gamepad/xbox-assets/base.svgz);
height: 630px;
width: 750px;
margin-left: -375px;
margin-top: -285px;
}
.custom.white{
background: url(http://mrmcpowned.com/gamepad/xbox-assets/base-white.svgz);
/*BEGIN Xbox One Controller Styling*/
.controller.custom{
/* background: url(http://mrmcpowned.com/gamepad/xbox-assets/base.svgz); */
height: 630px;
width: 750px;
margin-left: -375px;
margin-top: -285px;
}
.custom.white{
background: url(http://mrmcpowned.com/gamepad/xbox-assets/base-white.svgz);
@keyframes colorhue{
from {-webkit-filter: hue-rotate(0deg); filter: hue-rotate(0deg);}
to {-webkit-filter: hue-rotate(359deg); filter: hue-rotate(359deg);}
}
.edit {
animation: colorhue 1s linear infinite;
}
.controller .stick.left {
display: none;
}
.controller .stick.right{
display: block;
}
.controller .arrows:before{
transform: translateX(8px);
}
@mrmcpowned
mrmcpowned / 0_reuse_code.js
Created March 15, 2016 02:05
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console