repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
zzm2q/WOZLLA.js
src/core/GameObject.ts
/// <reference path="Transform.ts"/> /// <reference path="RectTransform.ts"/> /// <reference path="Collider.ts"/> /// <reference path="../event/EventDispatcher.ts"/> module WOZLLA { var comparator = function(a:GameObject, b:GameObject) { return a.z - b.z; }; var idMap:any = {}; /** * Ga...
zzm2q/WOZLLA.js
src/layout/Grid.ts
/// <reference path="LayoutBase.ts"/> /// <reference path="../math/Size.ts"/> /// <reference path="../component/PropertyConverter.ts"/> module WOZLLA.layout { var helpSize = new WOZLLA.math.Size(0, 0); export class Grid extends LayoutBase { listRequiredComponents():Array<Function> { retur...
zzm2q/WOZLLA.js
build/dist/WOZLLA.d.ts
<filename>build/dist/WOZLLA.d.ts /// <reference path="../../libs/hammerjs.d.ts" /> /// <reference path="../../libs/DragonBones.d.ts" /> declare module WOZLLA.event { /** * @enum {number} WOZLLA.event.EventPhase * all enumerations of event phase */ enum EventPhase { /** @property {number} ...
zzm2q/WOZLLA.js
src/renderer/IRenderCommand.ts
<filename>src/renderer/IRenderCommand.ts<gh_stars>0 module WOZLLA.renderer { /** * @class WOZLLA.renderer.IRenderCommand * @abstract */ export interface IRenderCommand { globalZ:number; layer:string; _addIndex:number; } }
zzm2q/WOZLLA.js
src/component/renderer/CanvasRenderer.ts
<gh_stars>0 /// <reference path="../../assets/GLTextureAsset.ts"/> /// <reference path="QuadRenderer.ts"/> module WOZLLA.component { export class CanvasRenderer extends QuadRenderer { get canvasSize():WOZLLA.math.Size { return this._canvasSize; } set canvasSize(value:WOZLLA.mat...
zzm2q/WOZLLA.js
src/assets/proxy/SpriteAtlasProxy.ts
module WOZLLA.assets.proxy { export class SpriteAtlasProxy extends AssetProxy { getSprite(spriteName:any):Sprite { if(this.asset) { return (<SpriteAtlas>this.asset).getSprite(spriteName); } return null; } getFrameLength():number { ...
zzm2q/WOZLLA.js
extensions/PureMVC/view/View.ts
///<reference path='../../../src/core/Component.ts' /> module WOZLLA.PureMVC { export class View extends WOZLLA.Component { init():void { this.onInit(); super.init(); } destroy():void { this.onDestroy(); super.destroy(); } o...
zzm2q/WOZLLA.js
src/math/Size.ts
module WOZLLA.math { /** * @class WOZLLA.math.Size * a util class contains width and height properties */ export class Size { width: number; height: number; /** * @method constructor * create a new instance of Size * @member WOZLLA.math.Size...
zzm2q/WOZLLA.js
extensions/PureMVC/view/ListView.ts
///<reference path='AdapterView.ts'/> ///<reference path='ListAdapter.ts'/> module WOZLLA.PureMVC { export class ListView extends AdapterView { public static DEFAUL_ITEM_MODEL_KEY = 'item'; get itemViewSrc():string { return this._itemViewSrc; } set itemViewSrc(src:stri...
zzm2q/WOZLLA.js
tests/renderer/LayerManagerTest.ts
/// <reference path="../../libs/WOZLLA.d.ts"/> /// <reference path="../../libs/jasmine.d.ts"/> /// <reference path="../data.ts"/> module WOZLLA.renderer { describe('WOZLLA.renderer', function() { describe("LayerManagerTest", function () { it("define and undefine layer", function () { ...
zzm2q/WOZLLA.js
src/renderer/IMaterial.ts
<filename>src/renderer/IMaterial.ts module WOZLLA.renderer { /** * @class WOZLLA.renderer.IMaterial * @abstract */ export interface IMaterial { id:string; shaderProgramId:string; blendType:number; equals(other:IMaterial):boolean; } export module IMateria...
zzm2q/WOZLLA.js
src/renderer/WebGLUtils.ts
module WOZLLA.renderer { function applyProperties(target, source) { for(var i in source) { if(typeof target[i] === 'undefined') { target[i] = source[i]; } } return target; } /** * @class WOZLLA.renderer.WebGLUtils * @abstract *...
zzm2q/WOZLLA.js
src/event/EventDispatcher.ts
/// <reference path="Event.ts"/> module WOZLLA.event { var SCOPE = '_EventDispatcher_scope'; class ListenerList { _listeners = []; add(listener:Function) { this._listeners.push(listener); } remove(listener:Function, scope?:any) { var i, len = this._li...
zzm2q/WOZLLA.js
tests/renderer/TextureModuleTest.ts
/// <reference path="../../libs/WOZLLA.d.ts"/> /// <reference path="../../libs/jasmine.d.ts"/> /// <reference path="../data.ts"/> /// <reference path="test_help_classes.ts"/> module WOZLLA.renderer { describe('WOZLLA.renderer', function() { describe("TextureModuleTest", function () { var canva...
zzm2q/WOZLLA.js
src/component/renderer/SpriteRenderer.ts
/// <reference path="QuadRenderer.ts"/> /// <reference path="../../assets/proxy/SpriteAtlasProxy.ts"/> /// <reference path="../../assets/Sprite.ts"/> /// <reference path="../../assets/SpriteAtlas.ts"/> module WOZLLA.component { /** * @class WOZLLA.component.SpriteRenderer */ export class SpriteRender...
zzm2q/WOZLLA.js
extensions/PureMVC/Service.ts
<reponame>zzm2q/WOZLLA.js ///<reference path='../../libs/puremvc-typescript-multicore-1.1.d.ts'/> module WOZLLA.PureMVC { export class Service extends puremvc.Proxy { } }
zzm2q/WOZLLA.js
tests/renderer/RendererTest.ts
/// <reference path="../../libs/WOZLLA.d.ts"/> /// <reference path="../../libs/jasmine.d.ts"/> /// <reference path="../data.ts"/> /// <reference path="test_help_classes.ts"/> module WOZLLA.renderer { describe('WOZLLA.renderer', function() { describe("RendererTest", function () { it("render qua...
zzm2q/WOZLLA.js
src/renderer/IRenderer.ts
module WOZLLA.renderer { /** * @class WOZLLA.renderer.IRenderer * @abstract */ export interface IRenderer { /** * @property {WOZLLA.renderer.ILayerManager} layerManager */ layerManager:ILayerManager; materialManager:IMaterialManager; shaderManag...
zzm2q/WOZLLA.js
src/renderer/Quad.ts
module WOZLLA.renderer { /** * @class WOZLLA.renderer.QuadType */ export class QuadType { get size() {return this.strade * 4; } get strade() { return this._info[0]; } get vertexIndex() { return this._info[1]; } get texCoordIndex() { return this._info[2]; } get...
zzm2q/WOZLLA.js
src/math/MathUtils.ts
<filename>src/math/MathUtils.ts<gh_stars>0 module WOZLLA.math { export module MathUtils { export function rectIntersect(a, b) { return a.x < b.x + b.width && b.x < a.x + a.width && a.y < b.y + b.height && b.y < a.y + a.height; } ...
zzm2q/WOZLLA.js
src/component/mask/RectMask.ts
/// <reference path="../../core/Mask.ts"/> /// <reference path="../renderer/QuadRenderer.ts"/> module WOZLLA.component { /** * @class WOZLLA.component.RectMask */ export class RectMask extends Mask { get region():WOZLLA.math.Rectangle { return this._region; } set region(value:WOZLLA....
zzm2q/WOZLLA.js
libs/DragonBones.d.ts
<filename>libs/DragonBones.d.ts /** * Copyright (c) 2014,Egret-Labs.org * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright...
zzm2q/WOZLLA.js
src/renderer/IShaderManager.ts
<gh_stars>0 module WOZLLA.renderer { /** * @class WOZLLA.renderer.IShaderManager * @abstract */ export interface IShaderManager { createShaderProgram(vertexSource:string, fragmentSource:string, ShaderClass:Function):IShaderProgram; getShaderProgram(id):IShaderProgram; del...
zzm2q/WOZLLA.js
tests/renderer/ShaderModuleTest.ts
/// <reference path="../../libs/WOZLLA.d.ts"/> /// <reference path="../../libs/jasmine.d.ts"/> /// <reference path="../data.ts"/> module WOZLLA.renderer { describe('WOZLLA.renderer', function() { describe("ShaderModuleTest", function () { var canvas:HTMLCanvasElement = <HTMLCanvasElement>docum...
zzm2q/WOZLLA.js
src/core/Director.ts
<gh_stars>0 /// <reference path="Stage.ts"/> /// <reference path="Touch.ts"/> /// <reference path="../renderer/WebGLUtils.ts"/> /// <reference path="../renderer/internal/Renderer.ts"/> /// <reference path="Scheduler.ts"/> /// <reference path="../assets/AssetLoader.ts"/> module WOZLLA { var requestAnimationFrame = ...
zzm2q/WOZLLA.js
tests/renderer/test_help_classes.ts
<reponame>zzm2q/WOZLLA.js module WOZLLA.renderer { export class Test_HTMLImageDescriptor implements ITextureDescriptor { get width():number { return this._source.width; } get height():number { return this._source.height; } get source():any { return this._source; } get textureFormat...
zzm2q/WOZLLA.js
src/assets/Asset.ts
/// <reference path="../event/EventDispatcher.ts"/> /// <reference path="../event/Event.ts"/> module WOZLLA.assets { /** * Base class of all assets in WOZLLA engine. * an asset contains a reference count which increase by **retain** function, * decrease by **release** function. * an asset would...
zzm2q/WOZLLA.js
src/core/Component.ts
/// <reference path="Transform.ts"/> /// <reference path="../utils/Assert.ts"/> module WOZLLA { /** * Top class of all components * @class WOZLLA.Component * @extends WOZLLA.event.EventDispatcher * @abstract */ export class Component extends WOZLLA.event.EventDispatcher { /** ...
zzm2q/WOZLLA.js
src/ui/StateWidget.ts
<reponame>zzm2q/WOZLLA.js<gh_stars>0 /// <reference path="../core/Component.ts"/> /// <reference path="../utils/StateMachine.ts"/> /// <reference path="../component/renderer/SpriteRenderer.ts"/> module WOZLLA.ui { var StateMachine = WOZLLA.utils.StateMachine; /** * @class WOZLLA.ui.StateWidget * @pr...
zzm2q/WOZLLA.js
src/core/Collider.ts
<filename>src/core/Collider.ts /// <reference path="Component.ts"/> module WOZLLA { /** * abstract base class for all colliders * @class WOZLLA.Collider * @extends WOZLLA.Component * @abstract */ export class Collider extends Component { /** * @method {boolean} contai...
zzm2q/WOZLLA.js
src/event/Event.ts
module WOZLLA.event { /** * @enum {number} WOZLLA.event.EventPhase * all enumerations of event phase */ export enum EventPhase { /** @property {number} [CAPTURE] */ CAPTURE, /** @property {number} [BUBBLE] */ BUBBLE, /** @property {number} [TARGET] */ ...
zzm2q/WOZLLA.js
src/math/Matrix.ts
module WOZLLA.math { /** * @class WOZLLA.math.Matrix * a util class for 2d matrix */ export class Matrix { /** * @property DEG_TO_RAD * @member WOZLLA.math.Matrix * @readonly * @static */ public static DEG_TO_RAD = Math.PI/180; ...
zzm2q/WOZLLA.js
src/renderer/internal/Renderer.ts
/// <reference path="LayerManager.ts"/> /// <reference path="../BlendType.ts"/> /// <reference path="MaterialManager.ts"/> /// <reference path="ShaderManager.ts"/> /// <reference path="TextureManager.ts"/> module WOZLLA.renderer { export class Renderer implements IRenderer { public static MAX_QUAD_SIZE = ...
zzm2q/WOZLLA.js
src/renderer/internal/TextureManager.ts
/// <reference path="Texture.ts"/> module WOZLLA.renderer { function isPowerOf2(num) { return (num & (num - 1)) === 0; } /** * @class WOZLLA.renderer.TextureManager * @extends WOZLLA.renderer.ITextureManager */ export class TextureManager implements ITextureManager { _g...
zzm2q/WOZLLA.js
extensions/PureMVC/view/Adapter.ts
<filename>extensions/PureMVC/view/Adapter.ts ///<reference path='AdapterView.ts'/> ///<reference path='../model/Model.ts'/> module WOZLLA.PureMVC { export class Adapter { _adapterView:AdapterView; setAdapterView(view:AdapterView) { this._adapterView = view; } getCount...
zzm2q/WOZLLA.js
src/assets/GLTextureAsset.ts
/// <reference path="Asset.ts"/> /// <reference path="../renderer/ITexture.ts"/> /// <reference path="../renderer/IRenderer.ts"/> /// <reference path="../core/Director.ts"/> module WOZLLA.assets { /** * internal class * @class WOZLLA.assets.GLTextureAsset * @extends WOZLLA.assets.Asset * @abstr...
zzm2q/WOZLLA.js
src/renderer/internal/Material.ts
<reponame>zzm2q/WOZLLA.js module WOZLLA.renderer { /** * @class WOZLLA.renderer.Material * @extends WOZLLA.renderer.IMaterial */ export class Material implements IMaterial { get id():any { return this._id; } get shaderProgramId():string { return this._shaderProgramId; } ...
zzm2q/WOZLLA.js
src/component/renderer/NinePatchRenderer.ts
<filename>src/component/renderer/NinePatchRenderer.ts<gh_stars>0 /// <reference path="SpriteRenderer.ts"/> module WOZLLA.component { var QuadCommand = WOZLLA.renderer.QuadCommand; /** * @class WOZLLA.component.NinePatchRenderer */ export class NinePatchRenderer extends SpriteRenderer { ...
zzm2q/WOZLLA.js
src/utils/Assert.ts
<filename>src/utils/Assert.ts module WOZLLA { export class Assert { public static DEFAULT_MESSAGE = 'Assertion Fail'; public static isTrue(test:any, msg=Assert.DEFAULT_MESSAGE) { if(test !== true) { throw new Error(msg); } } public static i...
zzm2q/WOZLLA.js
src/assets/JSONAsset.ts
/// <reference path="Asset.ts"/> /// <reference path="../utils/Ajax.ts"/> module WOZLLA.assets { function deepCopyJSON(o) { var copy = o,k; if (o && typeof o === 'object') { copy = Object.prototype.toString.call(o) === '[object Array]' ? [] : {}; for (k in o) { ...
zzm2q/WOZLLA.js
extensions/PureMVC/view/SimpleBinder.ts
<filename>extensions/PureMVC/view/SimpleBinder.ts ///<reference path='../../../src/utils/Assert.ts'/> ///<reference path='../../../../WOZLLA.js/src/core/GameObject.ts'/> module WOZLLA.PureMVC { var Assert = WOZLLA.Assert; var helpRecord:WOZLLA.QueryRecord = new WOZLLA.QueryRecord(); export class SimpleBin...
zzm2q/WOZLLA.js
src/component/renderer/QuadRenderer.ts
/// <reference path="../../core/Renderer.ts"/> /// <reference path="../../renderer/IRenderer.ts"/> /// <reference path="../../renderer/ILayerManager.ts"/> /// <reference path="../../renderer/QuadCommand.ts"/> module WOZLLA.component { var QuadCommand = WOZLLA.renderer.QuadCommand; /** * @class WOZLLA.com...
zzm2q/WOZLLA.js
src/layout/LayoutBase.ts
module WOZLLA.layout { export class LayoutBase extends Behaviour { private _layoutRequired:boolean = true; init():void { super.init(); this.gameObject.addListenerScope('childadd', this.onChildAdd, this); this.gameObject.addListenerScope('childremove', this.onCh...
zzm2q/WOZLLA.js
src/component/collider/CircleCollider.ts
<gh_stars>0 /// <reference path="../../core/Collider.ts"/> /// <reference path="../../math/Rectangle.ts"/> module WOZLLA.component { /** * @class WOZLLA.component.CircleCollider */ export class CircleCollider extends WOZLLA.Collider { region:WOZLLA.math.Circle; collideXY(localX:numb...
zzm2q/WOZLLA.js
src/jsonx/JSONXBuilder.ts
module WOZLLA.jsonx { function emptyCallback(root:WOZLLA.GameObject, done:Function) { done(); } // reference: @src#asGameObject export class JSONXBuilder { public static Factory:Function; public static create():JSONXBuilder { if(JSONXBuilder.Factory) { ...
zzm2q/WOZLLA.js
src/renderer/CustomCommand.ts
/// <reference path="RenderCommandBase.ts"/> /// <reference path="IRenderer.ts"/> module WOZLLA.renderer { /** * @class WOZLLA.renderer.CustomCommand * @extends WOZLLA.renderer.RenderCommandBase */ export class CustomCommand extends RenderCommandBase { constructor(globalZ:number, layer:...
zzm2q/WOZLLA.js
src/renderer/IMaterialManager.ts
<gh_stars>0 module WOZLLA.renderer { /** * @class WOZLLA.renderer.IMaterialManager * @abstract */ export interface IMaterialManager { createMaterial(id:string, shaderProgramId:string, blendType:number):IMaterial; getMaterial(id:string):IMaterial; deleteMaterial(material:...
zzm2q/WOZLLA.js
src/renderer/ITexture.ts
module WOZLLA.renderer { /** * @class WOZLLA.renderer.ITexture * @abstract */ export interface ITexture { id:any; descriptor:ITextureDescriptor; bind(gl):void; } export module ITexture { /** * @property DOC * @readonly * @static...
zzm2q/WOZLLA.js
src/ui/CheckBox.ts
/// <reference path="StateWidget.ts"/> /// <reference path="../component/renderer/SpriteRenderer.ts"/> module WOZLLA.ui { /** * @class WOZLLA.ui.CheckBox */ export class CheckBox extends StateWidget { public static STATE_UNCHECKED = 'unchecked'; public static STATE_CHECKED = 'checked...
zzm2q/WOZLLA.js
src/core/Mask.ts
<gh_stars>0 /// <reference path="Component.ts"/> /// <reference path="../renderer/ILayerManager.ts"/> /// <reference path="../renderer/CustomCommand.ts"/> module WOZLLA { /** * Base class for all mask, mask is based on webgl stencil. * @class WOZLLA.Mask * @extends WOZLLA.Component * @abstract ...
zzm2q/WOZLLA.js
extensions/PureMVC/Proxy.ts
<gh_stars>0 ///<reference path='../../libs/puremvc-typescript-multicore-1.1.d.ts'/> module WOZLLA.PureMVC { export class Proxy extends puremvc.Proxy { } }
zzm2q/WOZLLA.js
src/core/Behaviour.ts
<reponame>zzm2q/WOZLLA.js /// <reference path="Component.ts"/> module WOZLLA { /** * Abstract base class for all behaviours, the {@link WOZLLA.Behaviour#update} function would be call * by WOZLLA engine every frame when the gameObject is actived and the property enabled of this behaviour is true * @...
zzm2q/WOZLLA.js
src/math/Rectangle.ts
module WOZLLA.math { /** * @class WOZLLA.math.Rectangle * a utils class for rectangle, provider some math methods */ export class Rectangle { x: number; y: number; width: number; height: number; /** * @property {number} left x * @re...
zzm2q/WOZLLA.js
src/renderer/internal/MaterialManager.ts
/// <reference path="Material.ts"/> /// <reference path="../IMaterial.ts"/> /// <reference path="../IShaderProgram.ts"/> module WOZLLA.renderer { /** * @class WOZLLA.renderer.MaterialManager * @extends WOZLLA.renderer.IMaterialManager */ export class MaterialManager implements IMaterialManager {...
zzm2q/WOZLLA.js
extensions/PureMVC/view/SimpleView.ts
///<reference path='View.ts'/> ///<reference path='../model/Model.ts'/> module WOZLLA.PureMVC { export class SimpleView extends View { get modelKey():string { return this._modelKey; } set modelKey(key:string) { this._modelKey = key; } get model():Model { return this._model; ...
zzm2q/WOZLLA.js
extensions/PureMVC/Mediator.ts
<gh_stars>0 module WOZLLA.PureMVC { export class Mediator extends puremvc.Mediator { getStage():WOZLLA.Stage { return Director.getInstance().stage; } getView():View { return <View>this.getViewComponent(); } show(callback?:Function) { va...
zzm2q/WOZLLA.js
src/component/primitive/PrimitiveRenderer.ts
<gh_stars>0 /// <reference path="../renderer/CanvasRenderer.ts"/> module WOZLLA.component { export class PrimitiveRenderer extends CanvasRenderer { get primitiveStyle():PrimitiveStyle { return this._primitiveStyle; } set primitiveStyle(value:PrimitiveStyle) { this....
zzm2q/WOZLLA.js
src/component/primitive/CircleRenderer.ts
<gh_stars>0 /// <reference path="PrimitiveRenderer.ts"/> module WOZLLA.component { export class CircleRenderer extends PrimitiveRenderer { get circle():WOZLLA.math.Circle { return this._circle; } set circle(value:WOZLLA.math.Circle) { this._circle = value; ...
zzm2q/WOZLLA.js
src/utils/Ajax.ts
<filename>src/utils/Ajax.ts module WOZLLA.utils { function applyProperties(target, source) { for(var i in source) { if(typeof target[i] === 'undefined') { target[i] = source[i]; } } return target; } var contentParser = { 'json' : func...
zzm2q/WOZLLA.js
src/assets/AssetLoader.ts
module WOZLLA.assets { export interface AssetDescription { src:string; AssetClass:Function; callback:Function; } /** * an singleton class for asset loading and asset management * @class WOZLLA.assets.AssetLoader * @singleton */ export class AssetLoader { ...
zzm2q/WOZLLA.js
src/utils/ObjectPool.ts
module WOZLLA.utils { export interface Poolable { isPoolable:boolean; release(); } export class ObjectPool<T extends Poolable> { _minCount; _factory; _pool:Array<T>; constructor(minCount:number, factory:()=>T) { this._minCount = minCount; ...
zzm2q/WOZLLA.js
extensions/PureMVC/view/AdapterView.ts
///<reference path='View.ts'/> ///<reference path='AdapterFactory.ts'/> ///<reference path='../model/Store.ts'/> module WOZLLA.PureMVC { export class AdapterView extends View { get adapter():Adapter { return this._adapter; } set adapter(value:Adapter) { this.setAda...
zzm2q/WOZLLA.js
extensions/PureMVC/view/ViewBuilder.ts
///<reference path='View.ts'/> ///<reference path='../../../../WOZLLA.js/src/utils/Assert.ts'/> ///<reference path='../../../../WOZLLA.js/src/jsonx/JSONXBuilder.ts'/> module WOZLLA.PureMVC { var Assert = WOZLLA.Assert; export class ViewBuilder extends WOZLLA.jsonx.JSONXBuilder { public static fullBui...
zzm2q/WOZLLA.js
src/component/renderer/AnimationRenderer.ts
<filename>src/component/renderer/AnimationRenderer.ts /// <reference path="SpriteRenderer.ts"/> /// <reference path="../../utils/Tween.ts"/> module WOZLLA.component { export class AnimationRenderer extends SpriteRenderer { public static MODE_LOOP = 'loop'; public static MODE_NONLOOP = 'nonloop'; ...
zzm2q/WOZLLA.js
src/component/collider/RectCollider.ts
<reponame>zzm2q/WOZLLA.js<filename>src/component/collider/RectCollider.ts<gh_stars>0 /// <reference path="../../core/Collider.ts"/> /// <reference path="../../math/Rectangle.ts"/> module WOZLLA.component { /** * @class WOZLLA.component.RectCollider */ export class RectCollider extends WOZLLA.Collider...
zzm2q/WOZLLA.js
src/component/PropertyConverter.ts
module WOZLLA.component { export class PropertyConverter { public static array2rect(arr:Array<number>):WOZLLA.math.Rectangle { return new WOZLLA.math.Rectangle(arr[0], arr[1], arr[2], arr[3]); } public static array2circle(arr:Array<number>):WOZLLA.math.Circle { ret...
zzm2q/WOZLLA.js
src/core/Touch.ts
/// <reference path="../../libs/hammerjs.d.ts"/> /// <reference path="Scheduler.ts"/> /// <reference path="Stage.ts"/> /// <reference path="Director.ts"/> module WOZLLA { function getCanvasOffset(canvas:any) { var obj = canvas; var offset = { x : obj.offsetLeft, y : obj.offsetTop }; while (...
zzm2q/WOZLLA.js
extensions/PureMVC/AsyncMacroCommand.ts
///<reference path='../../libs/puremvc-typescript-multicore-1.1.d.ts'/> ///<reference path='AsyncCommand.ts'/> module WOZLLA.PureMVC { export class AsyncMacroCommand extends puremvc.MacroCommand { public execute(notification: puremvc.INotification):void { var me = this; var subComm...
zzm2q/WOZLLA.js
extensions/PureMVC/ApplicationFacade.ts
///<reference path='../../libs/puremvc-typescript-multicore-1.1.d.ts'/> module WOZLLA.PureMVC { export class ApplicationFacade extends puremvc.Facade { public static getInstance(key:string):ApplicationFacade { if(ApplicationFacade.instanceMap[key] == null) { ApplicationFacade.i...
zzm2q/WOZLLA.js
src/layout/Padding.ts
<reponame>zzm2q/WOZLLA.js module WOZLLA.layout { export class Padding { constructor(public top:number, public left:number, public bottom:number, public right:number) { } equals(padding:Padding) { return this.top === ...
zzm2q/WOZLLA.js
src/core/Stage.ts
<filename>src/core/Stage.ts /// <reference path="GameObject.ts"/> module WOZLLA { /** * the root game object of WOZLLA engine * @class WOZLLA.Stage * @extends WOZLLA.GameObject */ export class Stage extends GameObject { public static ID:string = 'WOZLLAStage'; get viewRect...
zzm2q/WOZLLA.js
extensions/Cocos2dx/AnimationRenderer.ts
module WOZLLA.Cocos2dx { export class AnimationRenderer extends WOZLLA.Renderer { } }
zzm2q/WOZLLA.js
src/ui/Button.ts
<reponame>zzm2q/WOZLLA.js /// <reference path="StateWidget.ts"/> /// <reference path="../component/renderer/SpriteRenderer.ts"/> module WOZLLA.ui { /** * @class WOZLLA.ui.Button */ export class Button extends StateWidget { public static STATE_NORMAL = 'normal'; public static STATE_DI...
zzm2q/WOZLLA.js
src/utils/StateMachine.ts
/// <reference path="../event/EventDispatcher.ts"/> /// <reference path="Assert.ts"/> module WOZLLA.utils { export class StateMachine extends WOZLLA.event.EventDispatcher { public static INIT:string = 'state.init'; public static CHANGE:string = 'state.change'; _defaultState:string; ...
zzm2q/WOZLLA.js
src/renderer/internal/LayerManager.ts
<filename>src/renderer/internal/LayerManager.ts /// <reference path="../ILayerManager.ts"/> module WOZLLA.renderer { /** * @class WOZLLA.renderer.LayerManager * @extends WOZLLA.renderer.ILayerManager */ export class LayerManager implements ILayerManager { _layerIndexMap; _sorted...
John31337/Diamond
deployment/index.ts
import "./deploy"
John31337/Diamond
test/units/ProjectToken.test.ts
import {expect} from "chai"; import {ethers} from "hardhat"; import {Contract} from "ethers"; import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers"; export function likeProjectToken(): void { describe("- Project Token SC", function () { let projectToken: Contract; let owner: SignerWithAddress;...
e-ntro-py/jupyterlab-git
src/components/SinglePastCommitInfo.tsx
import { TranslationBundle } from '@jupyterlab/translation'; import { CommandRegistry } from '@lumino/commands'; import * as React from 'react'; import { LoggerContext } from '../logger'; import { GitExtension } from '../model'; import { discardIcon, rewindIcon } from '../style/icons'; import { actionButtonClass, c...
e-ntro-py/jupyterlab-git
src/style/StatusWidget.ts
<filename>src/style/StatusWidget.ts import { keyframes, style } from 'typestyle'; const fillAnimation = keyframes({ to: { fillOpacity: 1 } }); export const statusIconClass = style({ $nest: { '& .jp-icon3': { animationName: fillAnimation, animationDuration: '1s' } } }); const pathAnimation =...
ExLibrisGroup/cloudapp-tutorials
cloudapp/src/app/app.module.ts
import { NgModule } from '@angular/core'; import { HttpClientModule } from '@angular/common/http'; import { BrowserModule, Title } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { MaterialModule, AlertModule, MenuModule, CloudAppTranslateModule }...
brandboxmarketplace/themify
__tests__/palettes/tiny-palette.ts
export default { light: { 'primary-700': '#303030' }, dark: { 'primary-700': '#ffffff' } };
brandboxmarketplace/themify
__tests__/utils.spec.ts
import {_handleUnSupportedBrowsers, _generateNewVariables} from '../src/utils'; import palette from './palettes/palette'; const whitelabel = { "dark": { "primary-100": "#c333d3", "primary-200": "#c333d3" }, "light": { "accent-300": "#ff0000" } } const whitelabelOnlyDark = { "dark": { "primar...
brandboxmarketplace/themify
__tests__/palettes/palette.ts
export default { light: { 'primary-700': '#303030', 'primary-600': '#383838', 'primary-500': '#505050', 'primary-400': '#666a6b', 'primary-300': '#9ca0a0', 'primary-200': '#cccece', 'primary-100': '#f2f2f4', 'primary-50': '#f8f8f9', 'primary-0'...
brandboxmarketplace/themify
src/helpers/json.util.ts
<reponame>brandboxmarketplace/themify const removeNewLineRegex = /(\r\n|\n|\r)/gm; /** * Minify the JSON * @param jsonStr * @return {any | string | void} */ export function minifyJSON(jsonStr) { return jsonStr && jsonStr.trim().replace(removeNewLineRegex, ''); }
brandboxmarketplace/themify
__tests__/fallback.spec.ts
<gh_stars>100-1000 import {TestUtils} from "./test.util"; import {ThemifyOptions} from "../src/index"; import {minifyJSON} from "../src/helpers/json.util"; const glob = require("glob"); const tmp = require('tmp'); const options: Partial<ThemifyOptions> = { palette: TestUtils.tinyPalette, screwIE11: false, fallb...
brandboxmarketplace/themify
src/helpers/js-sass.ts
<filename>src/helpers/js-sass.ts const { isArray } = Array; /** * Convert a JS object to SASS * Credits to https://github.com/acdlite/json-sass * @example {color: 'red'} -> (color: red) * @param jsValue */ function JSToSASS(jsValue) { function _JSToSASS(value, initialIndentLevel = 0) { let indentLevel = ini...
brandboxmarketplace/themify
src/index.ts
<gh_stars>100-1000 import { minifyJSON } from './helpers/json.util'; import { minifyCSS } from './helpers/css.util'; const postcss = require('postcss'); const fs = require('fs-extra'); const THEMIFY = 'themify'; const JSToSass = require('./helpers/js-sass'); export interface ThemifyOptions { /** * Whether we wou...
brandboxmarketplace/themify
__tests__/unmatch-palette.spec.ts
<filename>__tests__/unmatch-palette.spec.ts import {TestUtils} from "./test.util"; const options = { palette: TestUtils.unmatchPalette }; const plugins = [TestUtils.plugin.sass(), TestUtils.plugin.themify(options)]; TestUtils.run('Themify - Valid CSS with Unmatch Palette', '__tests__/unmatch-palette/*.input.spec.scs...
brandboxmarketplace/themify
__tests__/test.util.ts
<reponame>brandboxmarketplace/themify import {minifyCSS} from "../src/helpers/css.util"; const glob = require("glob"); const path = require('path'); const fs = require('fs'); const postcss = require('postcss'); const sass = require('@datorama/postcss-node-sass'); import {ProcessOptions} from "postcss"; import palette ...
brandboxmarketplace/themify
src/utils.ts
let JSONFallbackCache; let _hasNativeSupport; export type Theme = { [name: string]: { [variable: string]: string; }; }; /** * * @param {string} path */ export function loadCSS(path: string, callback) { const head = document.getElementsByTagName('head')[0]; const style = document.createElement('link'); ...
brandboxmarketplace/themify
src/helpers/css.util.ts
const _cleanCSS = require('clean-css'); const cleanCSS = new _cleanCSS({}); export function minifyCSS(css): string { return cleanCSS.minify(css).styles; }
brandboxmarketplace/themify
__tests__/css-helpers.spec.ts
<filename>__tests__/css-helpers.spec.ts import {TestUtils} from "./test.util"; const options = { palette: TestUtils.tinyPalette }; const plugins = [TestUtils.plugin.initThemify(options), TestUtils.plugin.sass(), TestUtils.plugin.themify(options)]; TestUtils.run('Themify - CSS Helpers', '__tests__/theme-helpers/*.inp...
brandboxmarketplace/themify
__tests__/invalid-css.spec.ts
import {TestUtils} from "./test.util"; const options = { palette: TestUtils.defaultPalette }; const plugins = [TestUtils.plugin.sass(), TestUtils.plugin.themify(options)]; TestUtils.run('Themify - Invalid CSS', '__tests__/invalid-css/*.input.spec.scss', plugins, true);
brandboxmarketplace/themify
__tests__/valid-css.spec.ts
<filename>__tests__/valid-css.spec.ts import {TestUtils} from "./test.util"; const options = { palette: TestUtils.defaultPalette }; const plugins = [TestUtils.plugin.sass(), TestUtils.plugin.themify(options)]; TestUtils.run('Themify - Valid CSS', '__tests__/valid-css/*.input.spec.scss', plugins);
ies-fe-sh/hire
promise-concurrency/src/index.ts
import { ConcurrencyResult } from './concurrency-result' export type Task<T> = () => Promise<T> export class PromiseConcurrencyController<T> { activeCount = 0 pendingCount = 0 constructor(public readonly size: number) {} run(...tasks: Task<T>[]): ConcurrencyResult<T> {} async stop(): Promise<void> {} ...
zhangCan112/stm_web_project
stmproject/src/utils/urls.ts
const prefix = '/v1' /// 用户信息 const USER = prefix + '/user/' ///登录 const LOGIN = prefix + '/user/login' ///注册 const LOGOUT = prefix + '/user/logout' /// 健康检查 const HEALTH = prefix + '/user/health' const URLS = { USER, LOGIN, LOGOUT, HEALTH, } export default URLS
zhangCan112/stm_web_project
stmproject/src/pages/login/login.tsx
import React, { Component } from 'react'; import { Form, Icon, Input, Button, Checkbox, message } from 'antd'; import css from './login.module.css'; import { FormComponentProps } from 'antd/lib/form/Form'; import { Link } from 'react-router-dom'; import { CheckboxChangeEvent } from 'antd/lib/checkbox'; import { GET, fi...
zhangCan112/stm_web_project
stmproject/src/utils/tools.ts
<filename>stmproject/src/utils/tools.ts<gh_stars>0 /** * 延时毫秒执行 * @param millisecond 延时的毫秒数 */ export const delay = async (millisecond: number) => { await new Promise((resovle) => { setTimeout(()=>{ resovle() }, millisecond) }) } /** * 倒计时 * @param handler 每次间隔的回调 * @param ...
zhangCan112/stm_web_project
stmproject/src/components/tomato/countdownButton.tsx
import React, { Component } from 'react'; import { Icon, Modal } from 'antd'; import { countdown } from "../../utils/tools"; import css from './tomato.module.css'; const { confirm } = Modal; enum CountdownStage { /** * 未开始 */ Normal, /** * 工作 */ Working, /** * 休息 */ ...
zhangCan112/stm_web_project
stmproject/src/pages/register/register.tsx
import React, { Component } from 'react'; import { Form, Input, Tooltip, Icon, Button, message } from 'antd'; import { FormComponentProps } from 'antd/lib/form/Form'; import styles from './register.module.css'; import { POST, filterSuccessCode } from "../../utils/request"; import URLS from "../../utils/urls"; import { ...