Socket
Socket
Sign inDemoInstall

phaser-input

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phaser-input - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

4

build/phaser-input.d.ts

@@ -12,4 +12,2 @@ declare module Fabrique {

borderRadius?: number;
boxShadow?: string;
innerShadow?: string;
placeHolderColor?: string;

@@ -25,3 +23,2 @@ type?: InputType;

box: Phaser.Graphics;
boxShadow: Phaser.Graphics;
private focus;

@@ -39,3 +36,2 @@ private cursor;

private createBox(inputOptions);
private createBoxShadow(inputOptions);
/**

@@ -42,0 +38,0 @@ * This is a generic input down handler for the game.

@@ -19,3 +19,2 @@ var __extends = (this && this.__extends) || function (d, b) {

this.box = null;
this.boxShadow = null;
this.focus = false;

@@ -33,3 +32,2 @@ this.type = InputType.text;

this.padding = inputOptions.padding || 0;
//this.createBoxShadow(inputOptions);
this.createBox(inputOptions);

@@ -81,18 +79,2 @@ if (inputOptions.placeHolder && inputOptions.placeHolder.length > 0) {

};
InputField.prototype.createBoxShadow = function (inputOptions) {
var bgColor = (inputOptions.backgroundColor) ? parseInt(inputOptions.backgroundColor.slice(1), 16) : 0xffffff;
var borderColor = (inputOptions.borderColor) ? parseInt(inputOptions.borderColor.slice(1), 16) : 0x959595;
var height = inputOptions.height || 14;
if (inputOptions.font) {
//fetch height from font;
height = Math.max(parseInt(inputOptions.font.substr(0, inputOptions.font.indexOf('px')), 10), height);
}
height = this.padding * 2 + height;
var width = inputOptions.width || 150;
width = this.padding * 2 + width;
this.boxShadow = new Phaser.Graphics(this.game, 0, 0);
this.boxShadow.beginFill(bgColor, 1)
.drawRoundedRect(0, 0, width, height, inputOptions.borderRadius || 3);
this.addChild(this.boxShadow);
};
/**

@@ -99,0 +81,0 @@ * This is a generic input down handler for the game.

2

package.json
{
"name": "phaser-input",
"author": "OrangeGames",
"version": "0.0.2",
"version": "0.0.3",
"description": "Adds input boxes to Phaser like CanvasInput, but also works for WebGL.",

@@ -6,0 +6,0 @@ "contributors": [

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc