repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
jheckjr/recipe-box2
src/app/app.component.ts
import { Component, Inject } from '@angular/core'; import { AppStore } from './app-store'; import { addRecipe } from './actions'; import { RecipeState } from './reducers/recipe-reducer'; import { Recipe } from './models'; import { RecipeListComponent } from './recipe-list/recipe-list.component'; @Component({ selec...
jheckjr/recipe-box2
src/app/models/sample-recipe.ts
<reponame>jheckjr/recipe-box2 import { Recipe } from './recipe.model'; export const sampleRecipe: Recipe = { name: 'Oatmeal', ingredients: [ '1 pkt. oatmeal', '2/3 cup milk' ] };
jheckjr/recipe-box2
src/app/actions/user-control.ts
<reponame>jheckjr/recipe-box2 export enum UserControl { View, Add, Edit }
jheckjr/recipe-box2
src/app/local-storage-helper/local-storage-helper.spec.ts
<gh_stars>0 import { testRecipes } from '../recipe-list/test/test-recipes'; import { Recipe } from '../models'; import { RecipeEntities } from '../reducers/recipe-reducer'; import { getAllStoredRecipes, getAllStoredRecipeNames } from './local-storage-helper'; describe('Local Storage:', () => { beforeEach(() => { ...
jheckjr/recipe-box2
src/app/recipe-edit/recipe-edit.component.ts
<gh_stars>0 import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; import { FormGroup, FormBuilder, FormArray, FormControl, Validators } from '@angular/forms'; import { Recipe, RecipeItemEvent, RecipeItemEventType } from '../models'; @Component({ selector: 'app-recipe-edit', templ...
jheckjr/recipe-box2
src/app/app.module.ts
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { HttpModule } from '@angular/http'; import { createStore, compose, StoreEnhancer } from 'redux'; import { AppStore } from './app-store'; ...
jheckjr/recipe-box2
src/app/recipe-list/test/test-recipes.ts
<filename>src/app/recipe-list/test/test-recipes.ts import { Recipe } from '../../models'; export let testRecipes: Recipe[] = [ { name: 'Oatmeal', ingredients: [ '1 pkt. oatmeal', '2/3 cup milk' ] }, { name: 'Rice', ingredients: [ '1/3 cup rice', '2/3 cup water' ] ...
jheckjr/recipe-box2
src/app/local-storage-helper/local-storage-helper.ts
<gh_stars>0 import { Recipe } from '../models'; import { RecipeEntities } from '../reducers/recipe-reducer'; export const storeRecipe = (recipe: Recipe) => { localStorage.setItem(recipe.name, JSON.stringify(recipe)); }; export const deleteStoredRecipe = (recipeName: string) => { localStorage.removeItem(recipeName...
jheckjr/recipe-box2
src/app/models/recipe.model.ts
/* * Recipe represents a single recipe of ingredients */ export interface Recipe { name: string; ingredients: string[]; }
jheckjr/recipe-box2
src/app/actions/index.ts
export * from './user-control'; export * from './recipe-actions';
jheckjr/recipe-box2
src/app/recipe-list/recipe-list.component.ts
<reponame>jheckjr/recipe-box2<gh_stars>0 import { Component, Inject } from '@angular/core'; import { AppStore } from '../app-store'; import { UserControl, addRecipe, deleteRecipe, selectRecipe, editRecipe, updateUserControl } from '../actions'; import { RecipeState, getAllRecipes } from '../reducers/recipe-r...
jheckjr/recipe-box2
src/app/app.component.spec.ts
/* tslint:disable:no-unused-variable */ import { TestBed, ComponentFixture, async } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { DebugElement } from '@angular/core'; import { FormBuilder, ReactiveFormsModule } from '@angular/forms'; import { createStore } from 'redux'; import...
jheckjr/recipe-box2
src/app/models/recipe-item-event.model.ts
import { Recipe } from './recipe.model'; export interface RecipeItemEvent { eventType: RecipeItemEventType; recipe: Recipe; } export enum RecipeItemEventType { Delete, Edit, Save, Cancel }
jeffersonsouza/stencil-user-profile
src/components/card/card.tsx
import { Component, h, Prop } from '@stencil/core'; @Component({ tag: 'profile-card', styleUrl: 'card.css', shadow: true }) export class Card { @Prop() name: string; @Prop() avatar: string; @Prop() description: string; render() { // Thanks to https://codepen.io/colinkeany/pen/XJOvXz return ( ...
basu-dev/ngx-lightbox
src/lightbox.service.ts
import { ApplicationRef, ComponentFactoryResolver, ComponentRef, Inject, Injectable, Injector } from '@angular/core'; import { LightboxComponent } from './lightbox.component'; import { LightboxConfig } from './lightbox-config.service'; import { LightboxEvent, LIGHTBOX_EVENT, IAlbum } from './lightbox-event....
basu-dev/ngx-lightbox
src/lightbox.component.ts
import { FileSaverService } from 'ngx-filesaver'; import { DOCUMENT } from '@angular/common'; import { AfterViewInit, Component, ElementRef, Inject, Input, OnDestroy, OnInit, Renderer2, SecurityContext, ViewChild, } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; im...
harmanpa/configurator-example
client/src/app/three/renderer/selection-manager.ts
import {AbstractObject3D} from '../objects/abstract-object-3d'; import * as THREE from 'three'; import {Subject} from 'rxjs'; export class SelectionManager { private scene: AbstractObject3D<THREE.Object3D>; private hovered: Map<THREE.Object3D, AbstractObject3D<THREE.Object3D>>; private selected: Map<THRE...
harmanpa/configurator-example
client/src/app/three/objects/abstract-object-3d.ts
/* * The MIT License * * Copyright (c) 2017 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modif...
harmanpa/configurator-example
client/src/app/three/transformers/transformer.ts
import * as THREE from 'three'; export abstract class Transformer { prepare(scene: THREE.Scene): boolean { return true; } }
harmanpa/configurator-example
client/src/app/three-tools/camera-controls/camera-controls.component.ts
<reponame>harmanpa/configurator-example<gh_stars>0 /* * The MIT License * * Copyright (c) 2019 Onshape Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, inclu...
harmanpa/configurator-example
client/src/app/configurator/services/configurator.service.ts
import {EventEmitter, Injectable, Input} from '@angular/core'; import {HttpClient} from '@angular/common/http'; import { AbstractDocumentElement, Appearance, Configuration, ConfigurationParameter, ConfigurationParameterEnum, ConfigurationParameterQuantity, Configurator, ConfiguredAssembl...
harmanpa/configurator-example
client/src/app/three/renderer/passes/transformer-pass.directive.ts
<reponame>harmanpa/configurator-example import {Directive} from '@angular/core'; import {AbstractPass} from './abstract-pass'; import {Pass} from 'three/examples/jsm/postprocessing/Pass'; import {WebGLRenderer, WebGLRenderTarget} from 'three'; import {WebGLRendererComponent} from '../webgl-renderer.component'; @Direct...
harmanpa/configurator-example
client/src/app/three-tools/orbit-controls/orbit-controls.component.ts
<gh_stars>0 /* * The MIT License * * Copyright (c) 2019 Onshape Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * t...
harmanpa/configurator-example
client/src/app/three/renderer/passes/abstract-pass.spec.ts
<filename>client/src/app/three/renderer/passes/abstract-pass.spec.ts import { AbstractPass } from './abstract-pass'; describe('AbstractPass', () => { it('should create an instance', () => { expect(new AbstractPass()).toBeTruthy(); }); });
harmanpa/configurator-example
client/src/app/configurator/controls/drawing-button/drawing-button.component.ts
<filename>client/src/app/configurator/controls/drawing-button/drawing-button.component.ts import {Component, Input, OnInit} from '@angular/core'; import { ConfigurableDrawing, Configuration, WVM } from '../../../../typescript-generator/configurator'; import {HttpClient} from '@angular/common/http'; import {...
harmanpa/configurator-example
client/src/app/app-routing/app-routing.module.ts
<filename>client/src/app/app-routing/app-routing.module.ts import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { ConfiguratorComponent } from '../configurator/configurator/configurator.component'; const appRoutes: Routes = [{ path: 'configurator/:did/:wvm/:wvmid/e/:...
harmanpa/configurator-example
client/src/app/three-tools/explode/explode-transformer.ts
import {Transformer} from '../../three/transformers/transformer'; export class ExplodeTransformer extends Transformer { }
harmanpa/configurator-example
client/src/app/configurator/controls/assembly-tree/part-tree/part-tree.component.ts
<filename>client/src/app/configurator/controls/assembly-tree/part-tree/part-tree.component.ts import {Component, Input, OnInit} from '@angular/core'; import {ConfiguredPart} from '../../../../../typescript-generator/configurator'; @Component({ selector: 'app-part-tree', templateUrl: './part-tree.component.html...
harmanpa/configurator-example
client/src/app/three/renderer/webgl-renderer.component.ts
/* * The MIT License * * Copyright (c) 2017 <NAME> * Copyright (c) 2019 Onshape Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitatio...
harmanpa/configurator-example
client/src/app/three/renderer/passes/outline-pass.directive.spec.ts
import { OutlinePassDirective } from './outline-pass.directive'; describe('OutlinePassDirective', () => { it('should create an instance', () => { const directive = new OutlinePassDirective(); expect(directive).toBeTruthy(); }); });
harmanpa/configurator-example
client/src/app/configurator/controls/assembly-tree/sub-assembly-tree/sub-assembly-tree.component.ts
<gh_stars>0 import {Component, Input, OnInit} from '@angular/core'; import {SubAssembly} from '../../../../../typescript-generator/configurator'; @Component({ selector: 'app-sub-assembly-tree', templateUrl: './sub-assembly-tree.component.html', styleUrls: ['./sub-assembly-tree.component.scss'] }) export cl...
harmanpa/configurator-example
client/src/app/configurator/configurator.module.ts
<gh_stars>0 import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { ThreeToolsModule } from '../three-tools/three-tools.module'; import { ThreeModule } from '../three/three.module'; import { ConfiguratorComponent } from './configurator/configurator.component'; import { Configu...
harmanpa/configurator-example
client/src/app/three-tools/explode/explode-transformer.spec.ts
import { ExplodeTransformer } from './explode-transformer'; describe('ExplodeTransformer', () => { it('should create an instance', () => { expect(new ExplodeTransformer()).toBeTruthy(); }); });
harmanpa/configurator-example
client/src/app/three/renderer/passes/fxaa-pass.directive.ts
<reponame>harmanpa/configurator-example<filename>client/src/app/three/renderer/passes/fxaa-pass.directive.ts<gh_stars>0 import { Directive } from '@angular/core'; import {AbstractPass} from './abstract-pass'; import {WebGLRendererComponent} from '../webgl-renderer.component'; import {ShaderPass} from 'three/examples/js...
harmanpa/configurator-example
client/src/app/configurator/geometry/configured-part.directive.ts
<reponame>harmanpa/configurator-example import {Directive, forwardRef, Input, OnChanges, SimpleChanges} from '@angular/core'; import {AbstractObject3D} from '../../three/objects/abstract-object-3d'; import * as THREE from 'three'; import { ConfiguredPart } from '../../../typescript-generator/configurator'; import {...
harmanpa/configurator-example
client/src/app/configurator/controls/assembly-tree/assembly-tree.component.ts
import {Component, Input, OnInit} from '@angular/core'; import {ConfiguredAssembly} from '../../../../typescript-generator/configurator'; @Component({ selector: 'app-assembly-tree', templateUrl: './assembly-tree.component.html', styleUrls: ['./assembly-tree.component.scss'] }) export class AssemblyTreeComp...
harmanpa/configurator-example
client/src/app/three/renderer/passes/abstract-pass.ts
<filename>client/src/app/three/renderer/passes/abstract-pass.ts import { Pass } from 'three/examples/jsm/postprocessing/Pass'; import {WebGLRendererComponent} from '../webgl-renderer.component'; export abstract class AbstractPass<T extends Pass> { public abstract setup(renderer: WebGLRendererComponent): T; }
harmanpa/configurator-example
client/src/app/configurator/configurator/configurator.component.ts
import {Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges} from '@angular/core'; import {AbstractDocumentElement, Appearance, Configuration, ConfigurationParameter, ConfigurationParameterEnum, ConfigurationParameterQuantity, Configurator, ConfiguredAssembly, ConfiguredPart, EnumOption, ParameterV...
harmanpa/configurator-example
client/src/app/three/renderer/passes/outline-pass.directive.ts
import {Directive, forwardRef} from '@angular/core'; import {AbstractPass} from './abstract-pass'; import {OutlinePass} from 'three/examples/jsm/postprocessing/OutlinePass'; import {WebGLRendererComponent} from '../webgl-renderer.component'; import {AbstractObject3D} from '../../objects/abstract-object-3d'; import * as...
harmanpa/configurator-example
client/src/app/three/renderer/passes/fxaa-pass.directive.spec.ts
import { FxaaPassDirective } from './fxaa-pass.directive'; describe('FxaaPassDirective', () => { it('should create an instance', () => { const directive = new FxaaPassDirective(); expect(directive).toBeTruthy(); }); });
harmanpa/configurator-example
client/src/app/three/transformers/transformer.spec.ts
import { Transformer } from './transformer'; describe('Transformer', () => { it('should create an instance', () => { expect(new Transformer()).toBeTruthy(); }); });
harmanpa/configurator-example
client/src/app/three/objects/loaders/abstract-model-loader.ts
/* * The MIT License * * Copyright (c) 2017 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modif...
matcharr/nestjs-api-blog
src/posts/entities/post.entity.ts
import { Column, CreateDateColumn, Entity, PrimaryColumn, UpdateDateColumn, } from 'typeorm'; @Entity('posts') export class PostsEntity { @PrimaryColumn({ generated: true }) id: number; @Column() content: string; @Column() title: string; @CreateDateColumn() createdAt: Date; @UpdateDateC...
matcharr/nestjs-api-blog
src/posts/posts.service.ts
import { Injectable } from '@nestjs/common'; import { CreatePostDto } from './dto/create-post.dto'; import { UpdatePostDto } from './dto/update-post.dto'; import { PostsEntity } from './entities/post.entity'; import { Repository, Connection } from 'typeorm'; @Injectable() export class PostsService { private _postsRe...
matcharr/nestjs-api-blog
src/app.module.ts
<filename>src/app.module.ts import { Module } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { TypeOrmModule } from '@nestjs/typeorm'; import { TypeOrmConfigService } from './persistence/typeorm-config.service'; import { PostsModule } from './posts/posts.module'; @Module({ imports: [ ...
matcharr/nestjs-api-blog
src/persistence/typeorm-config.service.ts
<filename>src/persistence/typeorm-config.service.ts import { Injectable } from '@nestjs/common'; import { TypeOrmModuleOptions, TypeOrmOptionsFactory } from '@nestjs/typeorm'; import { ConfigService } from '@nestjs/config'; @Injectable() export class TypeOrmConfigService implements TypeOrmOptionsFactory { constructo...
rojinva/tfjs-models_Tensorflow
coco-ssd/src/index.ts
/** * @license * Copyright 2018 Google LLC. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requ...
rojinva/tfjs-models_Tensorflow
speech-commands/training/cli.ts
<reponame>rojinva/tfjs-models_Tensorflow /** * @license * Copyright 2018 Google LLC. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org...
rojinva/tfjs-models_Tensorflow
posenet/src/util_test.ts
/** * @license * Copyright 2018 Google Inc. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requ...
rojinva/tfjs-models_Tensorflow
posenet/src/multiPose/decodePose.ts
<reponame>rojinva/tfjs-models_Tensorflow<gh_stars>0 /** * @license * Copyright 2018 Google LLC. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www...
rojinva/tfjs-models_Tensorflow
speech-commands/utils/dataset.ts
/** * @license * Copyright 2018 Google LLC. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requ...
rojinva/tfjs-models_Tensorflow
speech-commands/utils/types.ts
/** * @license * Copyright 2018 Google LLC. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requ...
rojinva/tfjs-models_Tensorflow
speech-commands/utils/circular_audio_buffer.ts
<filename>speech-commands/utils/circular_audio_buffer.ts /** * Copyright 2018 Google LLC * * Licensed under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LI...
bevry/memo
source/test.ts
<filename>source/test.ts import { equal } from 'assert-helpers' import kava from 'kava' import memo from './index.js' let count = 0 function counter() { return ++count } kava.suite('memo', function (suite, test) { test('works as expected', function () { const fn = memo(counter) equal(count, 0) equal(fn(), 1)...
bevry/memo
source/index.ts
/** * Wraps the callback in a memo that reuses the first invocation result of the callback to avoid subsequent invocations. * @param callback The callback (that takes no arguments) that we wish to cache the result for. */ export default function memo<T>(callback: () => T): typeof callback { let value: T return () ...
coolreader18/legume-loader
src/when-dom-ready.ts
<gh_stars>1-10 const loadedStates = ["interactive", "complete"]; const whenDOMReady = (doc: Document) => new Promise(function(resolve) { if (loadedStates.indexOf(doc.readyState) !== -1) { resolve(); } else { doc.addEventListener("DOMContentLoaded", () => { resolve(); }); } }); ...
coolreader18/legume-loader
src/index.ts
<filename>src/index.ts import parseUrl, { LegumeUrl } from "./parse-url"; import * as parse from "./parse/parse"; import whenDOMReady from "./when-dom-ready"; const hasOwnProp = <O extends { [k in PropertyKey]: any }, K extends keyof O>( obj: O, key: K ): obj is O & { [k in K]-?: O[k] } => Object.prototype.hasOw...
coolreader18/legume-loader
src/parse-url.ts
export interface LegumeUrl { absUrl: URL; request: URL; method: string; relative: boolean; } const parseUrl = (inUrl: string, ref?: string | URL | LegumeUrl): LegumeUrl => { let origUrl: URL; let relative = false; try { origUrl = new URL(inUrl); } catch (err) { origUrl = new URL( inUrl, ...
coolreader18/legume-loader
src/parse/common.ts
<filename>src/parse/common.ts<gh_stars>1-10 // string regex: /("(?:[^\r\n"]|\\"|\\\r?\n)*"|'(?:[^\r\n']|\\'|\\\r?\n)*')/; export const parseString = str => { str = str.replace(/\\\r?\n/g, ""); return JSON.parse( str[0] === "'" ? `"${str .replace(/"/g, '\\"') .replace(/\\'/g, "'") ...
coolreader18/legume-loader
src/parse/parse-script.ts
import { Parsed, ParseOptions } from "./parse"; import { parseString } from "./common"; const identReg = /([a-zA-Z_$][a-zA-Z_$0-9]*)/.source; const buildRegex = (parts: Array<string | RegExp>, flags?: string) => RegExp( parts.map(cur => (cur instanceof RegExp ? cur.source : cur)).join(""), flags ); const n...
coolreader18/legume-loader
common/bookmarklet.ts
export const makeUrl = (script: string, legumeVer?: string) => `javascript:(function(t,l,d,s,n){\ typeof Legume==n+""?(\ s=d.createElement("script"),\ s.src=l,s.setAttribute("data-legume-entry",t),\ d.head.appendChild(s)\ ):\ Legume(t,{run:true})\ })(${JSON.stringify(script)},${JSON.stringify( `https://cdn.jsdeli...
coolreader18/legume-loader
src/parse/parse.ts
export interface Parsed { content: string; deps: string[]; hadImports: boolean; } export { parseScript } from "./parse-script"; export { parseStyle } from "./parse-style"; export interface ParseOptions { mapId: (modId: string) => string; }
coolreader18/legume-loader
src/parse/parse-style.ts
<reponame>coolreader18/legume-loader import { ParseOptions, Parsed } from "./parse"; import { parseString } from "./common"; export const parseStyle = (input: string, { mapId }: ParseOptions): Parsed => ({ content: input.replace( /\burl\((?:("(?:[^\r\n"]|\\"|\\\r?\n)*"|'(?:[^\r\n']|\\'|\\\r?\n)*')|([^\)"']+))\)/...
zzm2q/WOZLLA.js
src/assets/proxy/AssetProxy.ts
module WOZLLA.assets.proxy { export class AssetProxy { protected proxyTarget:IProxyTarget; protected asset:Asset; protected newAssetSrc:string; protected loading:boolean = false; constructor(proxyTarget:IProxyTarget) { this.proxyTarget = proxyTarget; } ...
zzm2q/WOZLLA.js
src/renderer/internal/ShaderProgram.ts
<reponame>zzm2q/WOZLLA.js module WOZLLA.renderer { /** * @class WOZLLA.renderer.ShaderProgram * @extends WOZLLA.renderer.IShaderProgram */ export class ShaderProgram implements IShaderProgram { get id():any { return this._id ; } get vertexShader():any { return this._vertexShader...
zzm2q/WOZLLA.js
src/core/CoreEvent.ts
/// <reference path="../event/Event.ts"/> module WOZLLA { /** * internal class * @class WOZLLA.CoreEvent * @extends WOZLLA.event.Event */ export class CoreEvent extends WOZLLA.event.Event { /** * new a CoreEvent * @method constructor * @param type ...
zzm2q/WOZLLA.js
src/renderer/ITextureDescriptor.ts
module WOZLLA.renderer { /** * @enum WOZLLA.renderer.TextureFormat */ export enum TextureFormat { /** @property {number} [PNG] */ PNG, /** @property {number} [JPEG] */ JPEG, /** @property {number} [PVR] */ PVR, } /** * @enum WOZLLA.rendere...
zzm2q/WOZLLA.js
src/renderer/ITextureManager.ts
<gh_stars>0 module WOZLLA.renderer { /** * @class WOZLLA.renderer.ITextureManager * @abstract */ export interface ITextureManager { generateTexture(descriptor:ITextureDescriptor):ITexture; updateTexture(texture:ITexture):void; deleteTexture(texture:ITexture):void; ...
zzm2q/WOZLLA.js
src/math/Circle.ts
module WOZLLA.math { /** * @class WOZLLA.math.Circle * a util class for circle */ export class Circle { centerX:number; centerY:number; radius:number; constructor(centerX:number, centerY:number, radius:number) { /** * get or set centerX ...
zzm2q/WOZLLA.js
src/renderer/IShaderProgram.ts
<reponame>zzm2q/WOZLLA.js<filename>src/renderer/IShaderProgram.ts<gh_stars>0 module WOZLLA.renderer { /** * @class WOZLLA.renderer.IShaderProgram * @abstract */ export interface IShaderProgram { id:any; vertexShader:any; fragmentShader:any; useProgram(gl):void; ...
zzm2q/WOZLLA.js
extensions/PureMVC/view/ListAdapter.ts
<filename>extensions/PureMVC/view/ListAdapter.ts ///<reference path='Adapter.ts'/> ///<reference path='AdapterFactory.ts'/> ///<reference path='../view/SimpleView.ts'/> ///<reference path='../model/ArrayStore.ts'/> ///<reference path='../../../src/utils/Assert.ts'/> module WOZLLA.PureMVC { var Assert = WOZLLA.Asse...
zzm2q/WOZLLA.js
src/renderer/internal/Texture.ts
<gh_stars>0 module WOZLLA.renderer { /** * @class WOZLLA.renderer.Texture * @extends WOZLLA.renderer.ITexture */ export class Texture implements ITexture { get id():any { return this._id; } get descriptor():ITextureDescriptor { return this._descriptor; } _id:any; ...
zzm2q/WOZLLA.js
extensions/PureMVC/view/AdapterFactory.ts
module WOZLLA.PureMVC { export class AdapterFactory { private static adapterCtorMap:any = {}; public static create(name:string) { var AdapterClass:any = AdapterFactory.adapterCtorMap[name]; Assert.isNotUndefined(AdapterClass, 'unknow adapter: ' + name); return ...
zzm2q/WOZLLA.js
extensions/PureMVC/model/ArrayStore.ts
///<reference path='../../../libs/puremvc-typescript-multicore-1.1.d.ts'/> ///<reference path='Model.ts'/> ///<reference path='Store.ts'/> module WOZLLA.PureMVC { export class ArrayStore<T extends Model> extends Store { protected list = []; get count():number { return this.list.length; } ...
zzm2q/WOZLLA.js
extensions/DragonBones/WSlot.ts
<filename>extensions/DragonBones/WSlot.ts /// <reference path="../../libs/DragonBones.d.ts"/> /// <reference path="../../src/core/GameObject.ts"/> module WOZLLA.DragonBones { export class WSlot extends dragonBones.Slot { private _display:WOZLLA.GameObject; constructor() { super(this);...
zzm2q/WOZLLA.js
src/layout/VBox.ts
/// <reference path="LayoutBase.ts"/> /// <reference path="../component/PropertyConverter.ts"/> module WOZLLA.layout { export class VBox extends LayoutBase { get padding():Padding { return this._padding; } set padding(padding:Padding) { if(this._padding && this._pa...
zzm2q/WOZLLA.js
extensions/DragonBones/WTextureAtlas.ts
/// <reference path="../../libs/DragonBones.d.ts"/> /// <reference path="../../src/assets/SpriteAtlas.ts"/> module WOZLLA.DragonBones { function getFileName(url) { var idx = url.lastIndexOf('/'); if(idx !== -1) { return url.substr(idx+1, url.length); } return url; } ...
zzm2q/WOZLLA.js
src/core/Scheduler.ts
<filename>src/core/Scheduler.ts /// <reference path="Time.ts"/> module WOZLLA { /** * @class WOZLLA.Scheduler * @singleton */ export class Scheduler { private static instance; /** * @method {WOZLLA.Scheduler} getInstance * @static * @member WOZLLA.Sch...
zzm2q/WOZLLA.js
src/renderer/ILayerManager.ts
module WOZLLA.renderer { /** * @class WOZLLA.renderer.ILayerManager * @abstract */ export interface ILayerManager { define(layer:string, zindex:number):void; undefine(layer:string):void; getZIndex(layer:string):number; getSortedLayers():Array<string>; } ...
zzm2q/WOZLLA.js
src/core/Renderer.ts
<filename>src/core/Renderer.ts module WOZLLA { /** * Abstract base class for Renderer component * @class WOZLLA.Renderer * @abstract */ export class Renderer extends Component { /** * render this object * @param renderer * @param flags */ ...
zzm2q/WOZLLA.js
src/component/collider/MaskCollider.ts
/// <reference path="../../core/Collider.ts"/> /// <reference path="../../math/Rectangle.ts"/> module WOZLLA.component { /** * @class WOZLLA.component.MaskCollider */ export class MaskCollider extends WOZLLA.Collider { collideXY(localX:number, localY:number):boolean { return true...
zzm2q/WOZLLA.js
src/renderer/WebGLExtension.ts
module WOZLLA.renderer { /** * @class WOZLLA.renderer.WebGLExtension */ export class WebGLExtension { public static VENDOR_WEBKIT = 'WEBKIT_'; public static PVRTC = 'WEBGL_compressed_texture_pvrtc'; public static COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02; public sta...
zzm2q/WOZLLA.js
src/renderer/shader/V2T2C1A1.ts
<reponame>zzm2q/WOZLLA.js<filename>src/renderer/shader/V2T2C1A1.ts module WOZLLA.renderer.shader { /** * @class WOZLLA.renderer.shader.V2T2C1A1 */ export class V2T2C1A1 extends WOZLLA.renderer.ShaderProgram implements IShaderProgram { public static VERTEX_SOURCE:string = [ 'attri...
zzm2q/WOZLLA.js
extensions/PureMVC/model/Store.ts
<reponame>zzm2q/WOZLLA.js<filename>extensions/PureMVC/model/Store.ts ///<reference path='../../../libs/puremvc-typescript-multicore-1.1.d.ts'/> ///<reference path='../../../src/event/EventDispatcher.ts' /> module WOZLLA.PureMVC { export class Store extends WOZLLA.event.EventDispatcher { } }
zzm2q/WOZLLA.js
src/core/RectTransform.ts
/// <reference path="Transform.ts"/> module WOZLLA { /** * RectTransform is a subclass of {@link WOZLLA.Transform}, define a rect region * for {@WOZLLA.GameObject} and a anchor mode to specify how to related to it's parent. * @class WOZLLA.RectTransform */ export class RectTransform extends...
zzm2q/WOZLLA.js
extensions/PureMVC/model/Model.ts
///<reference path='../../../libs/puremvc-typescript-multicore-1.1.d.ts'/> ///<reference path='../../../src/event/EventDispatcher.ts' /> module WOZLLA.PureMVC { var modelIdGen = 0; function generateModelId():string { return ++modelIdGen + ''; } export class Model extends WOZLLA.event.EventDisp...
zzm2q/WOZLLA.js
src/core/Transform.ts
/// <reference path="../math/Matrix.ts"/> /// <reference path="../utils/Tween.ts"/> module WOZLLA { var helpMatrix = new WOZLLA.math.Matrix(); /** * this class define the position, scale, rotation and about transform information of {@link WOZLLA.GameObject} * @class WOZLLA.Transform */ expo...
zzm2q/WOZLLA.js
src/component/primitive/RectRenderer.ts
/// <reference path="PrimitiveRenderer.ts"/> module WOZLLA.component { export class RectRenderer extends PrimitiveRenderer { get rect():WOZLLA.math.Rectangle { return this._rect; } set rect(value:WOZLLA.math.Rectangle) { this._rect = value; this._graphi...
zzm2q/WOZLLA.js
src/component/text/TextRenderer.ts
<filename>src/component/text/TextRenderer.ts<gh_stars>0 /// <reference path="../renderer/CanvasRenderer.ts"/> /// <reference path="../PropertyConverter.ts"/> module WOZLLA.component { var helpCanvas = document.createElement('canvas'); helpCanvas.width = 1; helpCanvas.height = 1; var helpContext = helpC...
zzm2q/WOZLLA.js
src/core/Time.ts
module WOZLLA { /** * @class WOZLLA.Time * @static */ export class Time { /** * @property {number} delta * @readonly * @static */ static delta:number = 0; /** * @property {number} now * @readonly * @static ...
zzm2q/WOZLLA.js
src/renderer/RenderCommandBase.ts
<reponame>zzm2q/WOZLLA.js<filename>src/renderer/RenderCommandBase.ts module WOZLLA.renderer { /** * @class WOZLLA.renderer.RenderCommandBase * @abstract */ export class RenderCommandBase implements IRenderCommand { get globalZ():number { return this._globalZ; } get layer():strin...
zzm2q/WOZLLA.js
extensions/DragonBones/WFactory.ts
<filename>extensions/DragonBones/WFactory.ts /// <reference path="../../libs/DragonBones.d.ts"/> /// <reference path="WSlot.ts"/> /// <reference path="WTextureAtlas.ts"/> /// <reference path="../../src/core/Scheduler.ts"/> /// <reference path="../../src/core/GameObject.ts"/> /// <reference path="../../src/component/ren...
zzm2q/WOZLLA.js
src/utils/Ease.ts
module WOZLLA.utils { export class Ease { public static get(amount):Function { if (amount < -1) { amount = -1; } if (amount > 1) { amount = 1; } return function (t) { if (amount == 0) { ...
zzm2q/WOZLLA.js
src/renderer/QuadCommand.ts
/// <reference path="ITexture.ts"/> /// <reference path="Quad.ts"/> /// <reference path="RenderCommandBase.ts"/> /// <reference path="ILayerManager.ts"/> /// <reference path="../utils/ObjectPool.ts"/> module WOZLLA.renderer { var quadCommandPool; /** * @class WOZLLA.renderer.QuadCommand * @extends W...
zzm2q/WOZLLA.js
src/assets/Sprite.ts
<reponame>zzm2q/WOZLLA.js module WOZLLA.assets { /** * an sprite is a part of a sprite atlas * @class WOZLLA.assets.Sprite * <br/> * see also: <br/> * {@link WOZLLA.assets.SpriteAtlas}<br/> */ export class Sprite { /** * get the sprite atlas of this sprite belong...
zzm2q/WOZLLA.js
extensions/PureMVC/AsyncCommand.ts
<reponame>zzm2q/WOZLLA.js ///<reference path='../../libs/puremvc-typescript-multicore-1.1.d.ts'/> module WOZLLA.PureMVC { export class AsyncCommand extends puremvc.SimpleCommand { public execute(notification: puremvc.INotification, onComplete?:Function): void { onComplete && onComplete(); ...
zzm2q/WOZLLA.js
src/renderer/BlendType.ts
module WOZLLA.renderer { /** * @class WOZLLA.renderer.BlendType */ export class BlendType { public static NORMAL = 1; public static ADD = 2; public static MULTIPLY = 3; public static SCREEN = 4; get srcFactor():any { return this._srcFactor; } get dist...
zzm2q/WOZLLA.js
extensions/DragonBones/SkeletonRenderer.ts
<reponame>zzm2q/WOZLLA.js<gh_stars>0 module WOZLLA.DragonBones { export class SkeletonRenderer extends WOZLLA.Renderer { get skeletonSrc():string { return this._skeletonSrc; } set skeletonSrc(value:string) { this._skeletonSrc = value; } get texture...
zzm2q/WOZLLA.js
src/assets/SpriteAtlas.ts
<filename>src/assets/SpriteAtlas.ts /// <reference path="Sprite.ts"/> /// <reference path="../utils/Ajax.ts"/> module WOZLLA.assets { var imageTest = /(\.png|\.jpg)$/i; function isImageURL(url) { return imageTest.test(url); } function getFileName(url) { var idx = url.lastIndexOf('/');...
zzm2q/WOZLLA.js
src/renderer/internal/ShaderManager.ts
<filename>src/renderer/internal/ShaderManager.ts /// <reference path="ShaderProgram.ts"/> /// <reference path="../IShaderProgram.ts"/> /// <reference path="../shader/V2T2C1A1.ts"/> /// <reference path="../WebGLUtils.ts"/> module WOZLLA.renderer { /** * @class WOZLLA.renderer.ShaderManager * @extends WOZL...