touchcontroller
Advanced tools
Comparing version 3.8.0 to 3.9.0
import { Touch } from '../touch/Touch'; | ||
import { TouchFrame } from '../touch/TouchFrame'; | ||
import { Awaitable } from './Awaitable'; | ||
import { IAwaitable } from './IAwaitable'; | ||
import { IElement } from './IElement'; | ||
@@ -10,4 +10,4 @@ export interface IListener { | ||
acceptsEvent: (event: Event) => boolean; | ||
startFromExternalEvent: (element: IElement, event: Event) => Awaitable<void>; | ||
startFromExternalEvent: (element: IElement, event: Event) => IAwaitable<void>; | ||
startEventType: string; | ||
} |
@@ -8,3 +8,4 @@ import { MultitouchControllerDebugLayer } from './debug/MultiTouchControllerDebugLayer'; | ||
import { IEmulateTouchOptions, IEmulateTouchOptionsAdvanced } from './emulate/IEmulateTouchOptions'; | ||
import { Awaitable } from './interfaces/Awaitable'; | ||
import { IAwaitable } from './interfaces/IAwaitable'; | ||
import { IDestroyable } from './interfaces/IDestroyable'; | ||
import { IElement, IElementListeners } from './interfaces/IElement'; | ||
@@ -33,2 +34,2 @@ import { IEvent } from './interfaces/IEvent'; | ||
import { WithOptional } from './utils/WithOptional'; | ||
export { Omit, sign, Touch, Scene, IEvent, average, padArray, IElement, Particle, IListener, Awaitable, TouchFrame, Multitouch, SourceCache, WithOptional, EventManager, emulateTouch, VectorAverage, TAverageItems, TouchListener, MouseListener, DrawController, CanvasRectangle, TouchController, ITouchController, IParticleOptions, IElementListeners, createImageFromSrc, createCanvasFromSrc, multitouchTransforms, MultitouchController, IEmulateTouchOptions, particleOptionsAverage, IParticleOptionsExternals, TouchControllerDebugLayer, createColoredCanvasFromSrc, IMultitouchTransformsOptions, IEmulateTouchOptionsAdvanced, getBoundingClientRectEnhanced, multitouchTransformsOnElement, MultitouchControllerDebugLayer }; | ||
export { Omit, sign, Touch, Scene, IEvent, average, padArray, IElement, Particle, IListener, TouchFrame, Multitouch, IAwaitable, SourceCache, WithOptional, EventManager, IDestroyable, emulateTouch, VectorAverage, TAverageItems, TouchListener, MouseListener, DrawController, CanvasRectangle, TouchController, ITouchController, IParticleOptions, IElementListeners, createImageFromSrc, createCanvasFromSrc, multitouchTransforms, MultitouchController, IEmulateTouchOptions, particleOptionsAverage, IParticleOptionsExternals, TouchControllerDebugLayer, createColoredCanvasFromSrc, IMultitouchTransformsOptions, IEmulateTouchOptionsAdvanced, getBoundingClientRectEnhanced, multitouchTransformsOnElement, MultitouchControllerDebugLayer }; |
import { Observable } from 'rxjs/internal/Observable'; | ||
import { Subject } from 'rxjs/internal/Subject'; | ||
import { BoundingBox } from 'xyzt'; | ||
import { Awaitable } from '../interfaces/Awaitable'; | ||
import { IAwaitable } from '../interfaces/IAwaitable'; | ||
import { IDestroyable } from '../interfaces/IDestroyable'; | ||
import { ITouchController } from '../interfaces/ITouchController'; | ||
import { TouchFrame } from '../touch/TouchFrame'; | ||
import { Destroyable } from '../utils/Destroyable'; | ||
import { WithOptional } from '../utils/WithOptional'; | ||
@@ -11,3 +13,3 @@ import { Multitouch } from './Multitouch'; | ||
touchController: ITouchController; | ||
elementBinder: (frame: TouchFrame) => Awaitable<TElement | undefined>; | ||
elementBinder: (frame: TouchFrame) => IAwaitable<TElement | undefined>; | ||
} | ||
@@ -17,3 +19,3 @@ declare const multitouchControllerOptionsDefault: { | ||
}; | ||
export declare class MultitouchController<TElement extends BoundingBox> { | ||
export declare class MultitouchController<TElement extends BoundingBox> extends Destroyable implements IDestroyable { | ||
readonly touchController: ITouchController; | ||
@@ -20,0 +22,0 @@ readonly multitouches: Subject<Multitouch<TElement>>; |
import { Subject } from 'rxjs/internal/Subject'; | ||
import { Awaitable } from '../interfaces/Awaitable'; | ||
import { IAwaitable } from '../interfaces/IAwaitable'; | ||
import { IDestroyable } from '../interfaces/IDestroyable'; | ||
import { IElement } from '../interfaces/IElement'; | ||
import { IListener } from '../interfaces/IListener'; | ||
import { ITouchController } from '../interfaces/ITouchController'; | ||
import { Destroyable } from '../utils/Destroyable'; | ||
import { EventManager } from '../utils/EventManager'; | ||
@@ -18,3 +20,3 @@ import { WithOptional } from '../utils/WithOptional'; | ||
}; | ||
export declare class TouchController implements ITouchController { | ||
export declare class TouchController extends Destroyable implements ITouchController, IDestroyable { | ||
static fromCanvas(canvas: HTMLCanvasElement): TouchController; | ||
@@ -30,5 +32,5 @@ readonly elements: IElement[]; | ||
addElement(element: IElement): void; | ||
addInitialElement(element: IElement, newElementCreator: (event: Event) => Awaitable<IElement>): void; | ||
addInitialElement(element: IElement, newElementCreator: (event: Event) => IAwaitable<IElement>): void; | ||
private callListenerOnElement; | ||
} | ||
export {}; |
{ | ||
"name": "touchcontroller", | ||
"version": "3.8.0", | ||
"version": "3.9.0", | ||
"author": "Pavol Hejný <me@pavolhejny.com> (https://pavolhejny.com)", | ||
@@ -5,0 +5,0 @@ "description": "Touch and mouse controller for web apps and games", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
851439
46
1363